/* =========================================================================
   Compliance portal, Ducenta Squared edition.
   Taken from ducentasquared.com: indigo Caslon headings, the dusk-over-the-city
   palette of the hero photograph, a pale harbor-mist panel and one thin indigo rule.
   The memorable thing is the workspace sidebar (dusk) with the engraved wordmark;
   everything else stays quiet.

   --brand-base is each firm's color (Organization.primary_color). Every other
   brand tone is derived from it, so another firm's color re-themes the whole app.
   ========================================================================= */

@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/libre-caslon-text-latin-400-normal.6564df5cd887.woff2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("../fonts/libre-caslon-text-latin-400-italic.dab39c7e25a9.woff2") format("woff2"); }
@font-face { font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/libre-caslon-text-latin-700-normal.882609d7e89f.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/work-sans-latin-300-700-normal.97b33529e13b.woff2") format("woff2"); }
@font-face { font-family: "Work Sans"; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url("../fonts/work-sans-latin-300-700-italic.5585cd850333.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --brand-base: #1d2285;              /* Ducenta indigo; overridden per firm */

  /* Ducenta palette (from the site's theme) */
  --night: color-mix(in oklab, var(--brand-base) 16%, #06111a);
  --dusk: color-mix(in oklab, var(--brand-base) 22%, #1b4560);
  --harbor: #378dbd;
  --mist: #dce7ee;

  --paper: #f3f6f9;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --ink: #0e1c27;
  --ink-2: #455665;
  --ink-3: #5f6f7e;
  --rule: #dce3ea;
  --rule-strong: #b6c3cf;
  --brand: var(--brand-base);
  --brand-ink: #ffffff;
  --brand-wash: color-mix(in oklab, var(--brand) 7%, var(--surface));
  --brand-line: color-mix(in oklab, var(--brand) 32%, var(--surface));
  --heading: color-mix(in oklab, var(--brand) 80%, var(--ink));
  --alert: #b42318;
  --alert-wash: #fdeceA;
  --caution: #7a5b00;
  --caution-dot: #dcab06;            /* the brand gold, reserved for "due soon" */
  --caution-wash: #fff6d8;
  --done: #19744f;
  --done-wash: #e5f3eb;
  --shadow: 0 1px 2px rgba(14, 28, 39, .06), 0 8px 24px -12px rgba(14, 28, 39, .18);

  /* charts (validated: lightness band, chroma, CVD separation, contrast) */
  --series-1: #4b53d3;
  --series-2: #00968a;
  --grid: #e6ebf0;

  --serif: "Libre Caslon Text", "Big Caslon", "Iowan Old Style", Georgia, serif;
  --sans: "Work Sans", "Segoe UI", system-ui, sans-serif;

  --t-xs: .8rem; --t-sm: .89rem; --t-md: 1rem; --t-lg: 1.25rem; --t-xl: 1.56rem; --t-2xl: 1.95rem; --t-3xl: 2.44rem;
  --r-sm: 4px; --r: 6px; --r-lg: 10px;
  --measure: 72ch;
  --content-max: 1440px;
  --gutter: clamp(1rem, 2.6vw, 2.75rem);
  --cell-y: .62rem; --cell-x: .85rem;
}

/* Dark: its own steps from the same palette, not an inversion. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --night: color-mix(in oklab, var(--brand-base) 14%, #040b11);
    --dusk: color-mix(in oklab, var(--brand-base) 18%, #12304a);
    --paper: #0b1820; --surface: #13232f; --surface-2: #182b38;
    --ink: #e7eef3; --ink-2: #a9b8c4; --ink-3: #8a9cab;
    --rule: #233848; --rule-strong: #36506a;
    --brand: color-mix(in oklab, var(--brand-base) 32%, #ccd3ff);
    --brand-ink: #0b1820;
    --heading: color-mix(in oklab, var(--brand-base) 25%, #dfe3ff);
    --alert: #ff8a7a; --alert-wash: #3a1a19;
    --caution: #f2cc55; --caution-dot: #e8b917; --caution-wash: #33290c;
    --done: #6fd3a5; --done-wash: #12302a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .55);
    --series-1: #7077e8; --series-2: #00a194; --grid: #22374a;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --night: color-mix(in oklab, var(--brand-base) 14%, #040b11);
  --dusk: color-mix(in oklab, var(--brand-base) 18%, #12304a);
  --paper: #0b1820; --surface: #13232f; --surface-2: #182b38;
  --ink: #e7eef3; --ink-2: #a9b8c4; --ink-3: #8a9cab;
  --rule: #233848; --rule-strong: #36506a;
  --brand: color-mix(in oklab, var(--brand-base) 32%, #ccd3ff);
  --brand-ink: #0b1820;
  --heading: color-mix(in oklab, var(--brand-base) 25%, #dfe3ff);
  --alert: #ff8a7a; --alert-wash: #3a1a19;
  --caution: #f2cc55; --caution-dot: #e8b917; --caution-wash: #33290c;
  --done: #6fd3a5; --done-wash: #12302a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -12px rgba(0, 0, 0, .55);
  --series-1: #7077e8; --series-2: #00a194; --grid: #22374a;
}
:root[data-density="compact"] { --cell-y: .34rem; --cell-x: .65rem; }

* { box-sizing: border-box; }
html { font-size: clamp(16px, 14.5px + .2vw, 18px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--t-md)/1.55 var(--sans); }
img, svg { max-width: 100%; }
a { color: var(--brand); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid color-mix(in oklab, var(--brand) 55%, var(--surface)); outline-offset: 2px; border-radius: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 50; background: var(--surface); padding: .5rem .8rem; }

h1, h2 { font-family: var(--serif); font-weight: 400; color: var(--heading); letter-spacing: -.01em; }
h3 { font-family: var(--sans); font-weight: 600; color: var(--ink); }
h1 { font-size: var(--t-2xl); line-height: 1.18; margin: .2rem 0 .55rem; text-wrap: balance; }
h2 { font-size: var(--t-lg); line-height: 1.3; margin: 2rem 0 .7rem; }
h3 { font-size: 1.02rem; line-height: 1.35; margin: 1.2rem 0 .4rem; }
p { margin: .35rem 0 .8rem; max-width: var(--measure); }
.muted { color: var(--ink-2); }
.small { font-size: var(--t-sm); }
.num, td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- the wordmark: firm name engraved in small caps over one indigo rule ---------- */
.firm { text-decoration: none; color: var(--ink); line-height: 1.15; display: block; min-width: 0; }
.firm b { display: block; font: 400 1.32rem/1.1 var(--serif); font-variant: small-caps; letter-spacing: .035em;
  color: var(--heading); padding-bottom: .38rem; border-bottom: 2px solid var(--brand); }
.firm span { display: block; margin-top: .4rem; font-size: var(--t-xs); color: var(--ink-3); letter-spacing: .01em; }
.firm img.logo { display: block; max-height: 46px; max-width: 190px; object-fit: contain; }
.firm .logo-plate { display: inline-block; background: #fff; border-radius: var(--r-sm); padding: .3rem .45rem; }

/* ---------- plain header (pages without a firm) ---------- */
.masthead { background: var(--surface); border-bottom: 1px solid var(--rule); }
.masthead .inner { max-width: 1160px; margin: 0 auto; padding: 1rem 1.25rem; display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; }
.masthead .me { display: flex; align-items: center; gap: 1rem; font-size: var(--t-sm); margin-left: auto; }
.masthead .me a { color: var(--ink-2); text-decoration: none; }

/* ---------- app shell: left sidebar + page ---------- */
/* sidebar width grows a little on large monitors; it never scrolls sideways */
.shell.has-sidebar { display: grid; grid-template-columns: clamp(264px, 17vw, 300px) minmax(0, 1fr); min-height: 100vh; }
.page { min-width: 0; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--rule-strong) transparent; background: var(--surface); border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; }
.side-head { padding: 1.5rem 1.25rem 1.1rem; display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }
.side-body { display: flex; flex-direction: column; flex: 1; padding: 0 .75rem 1rem; }
.side-nav { display: flex; flex-direction: column; gap: .1rem; }
.side-nav a, .side-foot > a { display: flex; align-items: center; gap: .7rem; padding: .5rem .7rem; border-radius: var(--r);
  color: var(--ink-2); text-decoration: none; font-weight: 500; min-width: 0; overflow-wrap: anywhere; }
.side-nav a:hover, .side-foot > a:hover { background: var(--surface-2); color: var(--ink); }
.side-nav a[aria-current="page"], .side-foot > a[aria-current="page"] { background: var(--brand-wash); color: var(--ink); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--brand); }
.side-nav a[aria-current="page"] .icon { color: var(--brand); }
.icon { flex: none; color: var(--ink-3); }
.side-group { margin: 1.15rem .7rem .3rem; font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); }
.side-group:first-child { margin-top: 0; }
/* collapsible sidebar groups (the workspace has many pages) */
.side-section { display: flex; flex-direction: column; gap: .1rem; }
.side-section > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  border-radius: var(--r); padding: .25rem .7rem; margin: .9rem 0 .2rem; }
.side-section:first-child > summary { margin-top: 0; }
.side-section > summary::-webkit-details-marker { display: none; }
.side-section > summary::after { content: ""; width: .4rem; height: .4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg); margin-top: -.2rem; transition: transform .15s ease; }
.side-section:not([open]) > summary::after { transform: rotate(-45deg); margin-top: 0; }
.side-section > summary:hover { color: var(--ink); }
.sidebar .side-section > summary:hover { color: #fff; }
.side-nav .count, .side-foot .count { margin-left: auto; min-width: 1.3rem; height: 1.3rem; padding: 0 .35rem; border-radius: 999px;
  background: #b42318; color: #fff; font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.side-nav .count.quiet { background: var(--rule); color: var(--ink); }
.side-foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: .1rem; }
a.switch { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; padding: .55rem .7rem; border-radius: var(--r);
  border: 1px solid var(--brand-line); color: var(--brand); font-weight: 600; font-size: var(--t-sm); text-decoration: none; }
a.switch .icon { color: var(--brand); }
a.switch:hover { background: var(--brand-wash); }
.who { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem .7rem .2rem; font-size: var(--t-sm); }
.who a { color: var(--ink); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who a.who-link { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; min-height: 36px; margin-left: -.5rem;
  padding: .3rem .5rem; border-radius: var(--r); transition: background-color .15s ease, color .15s ease; }
.who a.who-link span { overflow: hidden; text-overflow: ellipsis; }
.who a.who-link .icon { flex: none; color: var(--ink-3); transition: color .15s ease; }
.who a.who-link:hover, .who a.who-link[aria-current="page"] { background: var(--surface-2); }
.who a.who-link:hover .icon, .who a.who-link[aria-current="page"] .icon { color: var(--brand); }
.who .btn-link { color: var(--ink-2); font-size: var(--t-sm); }
.foot-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; padding: .3rem .4rem 0; }
.foot-tools [data-palette-open] { margin-right: auto; }
.tool { display: inline-flex; align-items: center; gap: .4rem; background: none; border: 1px solid transparent; border-radius: var(--r);
  color: var(--ink-2); font: 500 var(--t-xs) var(--sans); padding: .35rem .5rem; cursor: pointer; min-height: 34px; }
.tool:hover { background: var(--surface-2); color: var(--ink); }
.tool kbd { white-space: nowrap; font: 600 .68rem var(--sans); border: 1px solid var(--rule-strong); border-radius: 4px; padding: 0 .3rem; color: var(--ink-3); }
.menu-toggle { display: none; align-items: center; gap: .4rem; background: none; border: 1px solid var(--rule-strong); border-radius: var(--r);
  padding: .4rem .7rem; font: 600 var(--t-sm) var(--sans); color: var(--ink); cursor: pointer; min-height: 40px; }

/* every sidebar: dusk over the city. The label under the firm name says which view you're in. */
.sidebar { background: linear-gradient(180deg, var(--dusk) 0%, var(--night) 78%); border-right: 0; color: #fff;
  scrollbar-color: rgba(255, 255, 255, .25) transparent; }
.sidebar .firm b { color: #fff; border-bottom-color: color-mix(in oklab, var(--brand-base) 45%, #c4cbff); }
.sidebar .firm span { color: rgba(255, 255, 255, .66); }
.sidebar .side-nav a, .sidebar .side-foot > a { color: rgba(255, 255, 255, .8); }
.sidebar .icon { color: rgba(255, 255, 255, .55); }
.sidebar .side-nav a:hover, .sidebar .side-foot > a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sidebar .side-nav a[aria-current="page"], .sidebar .side-foot > a[aria-current="page"] { background: rgba(255, 255, 255, .11); color: #fff;
  box-shadow: inset 3px 0 0 #fff; }
.sidebar .side-nav a[aria-current="page"] .icon, .sidebar .side-foot > a[aria-current="page"] .icon { color: #fff; }
.sidebar .side-group { color: rgba(255, 255, 255, .5); }
.sidebar .side-foot { border-top-color: rgba(255, 255, 255, .13); }
.sidebar a.switch { color: #fff; border-color: rgba(255, 255, 255, .3); }
.sidebar a.switch .icon { color: #fff; }
.sidebar a.switch:hover { background: rgba(255, 255, 255, .08); }
/* firm switcher: only for people in more than one firm */
.firm-switch { margin: 0 0 .6rem; }
.firm-switch > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; padding: .45rem .7rem;
  border-radius: var(--r); color: rgba(255, 255, 255, .8); font-size: var(--t-sm); font-weight: 500; }
.firm-switch > summary::-webkit-details-marker { display: none; }
.firm-switch > summary::after { content: ""; margin-left: auto; width: .4rem; height: .4rem; border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor; transform: rotate(45deg); margin-top: -.2rem; transition: transform .15s ease; }
.firm-switch[open] > summary::after { transform: rotate(-135deg); margin-top: .15rem; }
.firm-switch > summary:hover, .firm-switch[open] > summary { background: rgba(255, 255, 255, .07); color: #fff; }
.firm-switch ul { list-style: none; margin: .2rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .1rem; }
.firm-switch form { margin: 0; }
.firm-switch button { width: 100%; display: flex; flex-direction: column; gap: .1rem; text-align: left;
  background: none; border: 0; border-radius: var(--r); padding: .45rem .7rem .45rem 2.05rem; cursor: pointer;
  color: #fff; font: 500 var(--t-sm) var(--sans); overflow-wrap: anywhere; }
.firm-switch button span { color: rgba(255, 255, 255, .6); font-size: var(--t-xs); font-weight: 400; }
.firm-switch button:hover { background: rgba(255, 255, 255, .09); }
.sidebar .who a { color: rgba(255, 255, 255, .9); }
.sidebar .who a.who-link .icon { color: rgba(255, 255, 255, .6); }
.sidebar .who a.who-link:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.sidebar .who a.who-link:hover .icon { color: #fff; }
.sidebar .who a.who-link[aria-current="page"] { background: rgba(255, 255, 255, .11); color: #fff; }
.sidebar .who a.who-link[aria-current="page"] .icon { color: #fff; }
.sidebar .who .btn-link:hover { color: #fff; }
.sidebar .who .btn-link { color: rgba(255, 255, 255, .75); }
.sidebar .tool { color: rgba(255, 255, 255, .72); }
.sidebar .tool:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar .tool kbd { border-color: rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .6); }
.sidebar .side-nav .count.quiet { background: rgba(255, 255, 255, .16); color: #fff; }
.sidebar .menu-toggle { color: #fff; border-color: rgba(255, 255, 255, .35); }
.sidebar :focus-visible { outline-color: rgba(255, 255, 255, .85); }

/* view-as banner */
.viewas { background: var(--caution-wash); border-bottom: 1px solid color-mix(in oklab, var(--caution-dot) 50%, var(--surface)); color: var(--caution);
  position: sticky; top: 0; z-index: 10; }
.viewas .inner { max-width: var(--content-max); margin: 0 auto; padding: .55rem var(--gutter); display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; font-size: var(--t-sm); }

main { max-width: var(--content-max); margin: 0 auto; padding: clamp(1.4rem, 2.4vw, 2.6rem) var(--gutter) 4rem; container-type: inline-size; }
main.narrow { max-width: 860px; }
footer.site { max-width: var(--content-max); margin: 0 auto; padding: 1.5rem var(--gutter) 3rem; color: var(--ink-3); font-size: var(--t-xs); border-top: 1px solid var(--rule); }
footer.site { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
footer.site nav, .auth-foot nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
footer.site nav a, .auth-foot nav a { color: var(--ink-2); text-decoration: none; }
footer.site nav a:hover, .auth-foot nav a:hover { color: var(--ink); text-decoration: underline; }

/* legal pages: a readable document, not an app screen */
.legal-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; margin: 0 0 2rem; padding-bottom: .75rem; border-bottom: 1px solid var(--rule); font-size: var(--t-sm); }
.legal-nav a { color: var(--ink-2); text-decoration: none; padding: .35rem 0; }
.legal-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); }
.prose { max-width: 68ch; }
.prose h1 { font-size: var(--t-3xl); margin-bottom: .75rem; }
.prose .lede { font-size: 1.08rem; color: var(--ink-2); margin-bottom: 2rem; }
.prose h2 { margin: 2.25rem 0 .6rem; }
.prose p, .prose li { line-height: 1.65; }
.prose ul { padding-left: 1.2rem; margin: .4rem 0 1rem; }
.prose li + li { margin-top: .45rem; }
.legal-meta { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--rule); color: var(--ink-3); font-size: var(--t-sm); }

/* page header: title, one line of context, actions on the right */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem 2rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head h1 { margin-bottom: .2rem; }
.page-head p { margin: 0; color: var(--ink-2); }

/* ---------- surfaces ---------- */
.card, .panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1.3rem 1.45rem; margin-bottom: 1.2rem; }
.card > h2:first-child, .card > h3:first-child, .panel > h2:first-child,
.card > .spread:first-child h2, .card > .spread:first-child h3 { margin-top: 0; }
.card > .spread:first-child { margin-bottom: .6rem; }
.card.quiet { background: var(--surface-2); }
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.grid.top { align-items: start; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.sep { display: inline-block; width: .9rem; }
.back { display: inline-block; font-size: var(--t-sm); color: var(--ink-2); text-decoration: none; margin-bottom: .6rem; }
.back:hover { color: var(--ink); text-decoration: underline; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .55rem 1.1rem;
  border-radius: var(--r); border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink);
  font: 600 var(--t-sm)/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink-3); background: var(--surface-2); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: color-mix(in oklab, var(--brand) 84%, black); border-color: transparent; }
.btn-big { font-size: var(--t-md); padding: .75rem 1.45rem; min-height: 50px; }
.btn-danger { color: var(--alert); border-color: color-mix(in oklab, var(--alert) 35%, var(--surface)); }
.btn-danger.btn-confirm { background: var(--alert); border-color: var(--alert); color: #fff; }
.btn-danger.btn-confirm:hover { background: color-mix(in oklab, var(--alert) 86%, black); }
.btn-link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-sm { min-height: 36px; padding: .3rem .75rem; font-size: var(--t-xs); }

/* ---------- status words ---------- */
.pill { display: inline-flex; align-items: center; gap: .35rem; font-size: var(--t-xs); font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--rule-strong); }
.pill.ok { color: var(--done); } .pill.ok::before { background: var(--done); }
.pill.warn { color: var(--caution); } .pill.warn::before { background: var(--caution-dot); }
.pill.bad { color: var(--alert); } .pill.bad::before { background: var(--alert); }
.pill.info { color: var(--brand); } .pill.info::before { background: var(--brand); }
.tag { display: inline-block; font-size: var(--t-xs); font-weight: 600; color: var(--brand); background: var(--brand-wash);
  border-radius: 999px; padding: .05rem .55rem; }

.alert { border-radius: var(--r); padding: .8rem 1rem; margin-bottom: 1rem; border: 1px solid var(--rule); background: var(--surface); }
.alert.success { border-color: color-mix(in oklab, var(--done) 30%, var(--surface)); background: var(--done-wash); }
.alert.error { border-color: color-mix(in oklab, var(--alert) 30%, var(--surface)); background: var(--alert-wash); color: color-mix(in oklab, var(--alert) 70%, var(--ink)); }
.alert.warning { border-color: color-mix(in oklab, var(--caution-dot) 40%, var(--surface)); background: var(--caution-wash); }
.alert.info { border-color: var(--brand-line); background: var(--brand-wash); }
.alert p:last-child { margin-bottom: 0; }

/* ---------- toasts (Django messages) ---------- */
.toasts { position: fixed; right: clamp(.75rem, 2vw, 1.5rem); bottom: clamp(.75rem, 2vw, 1.5rem); z-index: 60; display: grid; gap: .6rem;
  width: min(26rem, calc(100vw - 1.5rem)); }
.toast { display: grid; grid-template-columns: auto 1fr auto; gap: .7rem; align-items: start; padding: .8rem .9rem .8rem 1rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--shadow);
  font-size: var(--t-sm); }
.toast .icon { margin-top: .1rem; color: var(--brand); }
.toast.success .icon { color: var(--done); }
.toast.error .icon { color: var(--alert); }
.toast.warning .icon { color: var(--caution-dot); }
.toast.error { border-color: color-mix(in oklab, var(--alert) 40%, var(--surface)); }
.toast button { background: none; border: 0; color: var(--ink-3); cursor: pointer; padding: .1rem; line-height: 0; border-radius: 4px; }
.toast button:hover { color: var(--ink); }
.js .toast { animation: toast-in .28s cubic-bezier(.2, .8, .3, 1) both; }
.toast.leaving { animation: toast-out .2s ease-in both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }
html:not(.js) .toasts { position: static; width: auto; margin-bottom: 1rem; }
html:not(.js) .toast { box-shadow: none; }

/* ---------- home: the statement ---------- */
.statement { padding: .4rem 0 1.6rem; border-bottom: 1px solid var(--rule); margin-bottom: 1.8rem; }
.statement .greeting { color: var(--ink-2); margin: 0; }
.statement h1 { font-size: var(--t-3xl); max-width: 26ch; margin: .25rem 0 1.1rem; line-height: 1.1; }
.statement .lede { max-width: 60ch; color: var(--ink-2); }
.statement-row { display: flex; gap: 1.2rem 2.5rem; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }

/* this period's progress: one segment per certification */
.tally { min-width: min(100%, 300px); }
.tally .label { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--t-sm); color: var(--ink-2); margin-bottom: .45rem; }
.tally .label strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.tally ol { list-style: none; display: flex; gap: 3px; margin: 0; padding: 0; }
.tally li { flex: 1; height: 10px; border-radius: 3px; background: var(--rule); }
.tally li.done { background: var(--brand); }
.tally li.overdue { background: var(--alert); }
.tally li.soon { background: var(--caution-dot); }

.ledger { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; }
.ledger a.item, .ledger .item { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1.5rem; align-items: center;
  padding: 1rem 1.25rem; text-decoration: none; color: inherit; border-top: 1px solid var(--rule); position: relative; }
.ledger .item:first-child { border-top: 0; }
.ledger a.item:hover { background: var(--brand-wash); }
.ledger .item .what { font: 400 1.08rem/1.3 var(--serif); color: var(--heading); }
.ledger .item .sub { color: var(--ink-2); font-size: var(--t-sm); }
.ledger .item .when { text-align: right; font-size: var(--t-sm); color: var(--ink-2); white-space: nowrap; }
.ledger .item .when strong { display: block; color: var(--ink); font-size: var(--t-md); }
.ledger .item.overdue::before, .ledger .item.soon::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.ledger .item.overdue::before { background: var(--alert); }
.ledger .item.overdue .when strong { color: var(--alert); }
.ledger .item.soon::before { background: var(--caution-dot); }
.ledger .empty { padding: 2rem 1.25rem; text-align: left; }

.actions-list { list-style: none; margin: 0; padding: 0; columns: 2 300px; column-gap: 2.5rem; }
.actions-list li { break-inside: avoid; padding: .7rem 0; border-top: 1px solid var(--rule); }
.actions-list a { font-weight: 600; text-decoration: none; color: var(--ink); }
.actions-list a:hover { color: var(--brand); text-decoration: underline; }
.actions-list span { display: block; color: var(--ink-2); font-size: var(--t-sm); }
/* whole-row choices (Report or ask): the entire block is the target */
.choices-list { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; }
a.choice { display: grid; grid-template-columns: auto 1fr; gap: 0 .85rem; align-items: start; position: relative;
  padding: .9rem 2.8rem .9rem 1.1rem; border-top: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
a.choice:first-child { border-top: 0; }
.choice-head { margin: 1.1rem 0 .45rem; font-size: var(--t-sm); color: var(--ink-2); }
h2 + .choice-head { margin-top: 0; }
.home-side .ledger .item .what { font: 600 var(--t-sm)/1.35 var(--sans); color: var(--ink); }
.home-side .ledger a.item, .home-side .ledger .item { padding: .8rem 1rem; }
a.choice > .icon { grid-row: span 2; margin-top: .15rem; color: var(--brand); }
a.choice b { display: block; font-weight: 600; }
a.choice span { display: block; color: var(--ink-2); font-size: var(--t-sm); margin-top: .1rem; }
a.choice::after { content: ""; position: absolute; right: 1.25rem; top: 50%; width: .5rem; height: .5rem; margin-top: -.25rem;
  border-right: 2px solid var(--ink-3); border-top: 2px solid var(--ink-3); transform: rotate(45deg); }
a.choice:hover { background: var(--brand-wash); }
a.choice:hover b { color: var(--brand); }
a.choice:hover::after { border-color: var(--brand); }
a.choice:focus-visible { outline: 3px solid color-mix(in oklab, var(--brand) 55%, var(--surface)); outline-offset: -3px; border-radius: 0; }

/* filter tabs, filter chips and compact row buttons */
.tabs { display: flex; gap: 1.4rem; border-bottom: 1px solid var(--rule); margin: .4rem 0 1.2rem; overflow-x: auto; }
.tabs a { padding: .55rem 0; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 500; white-space: nowrap; }
.tabs a span { color: var(--ink-3); font-weight: 400; margin-left: .2rem; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brand); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin: .4rem 0 1.1rem; }
.chips a, .chips button { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .8rem; min-height: 34px; border-radius: 999px;
  border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink-2); font: 500 var(--t-sm) var(--sans); text-decoration: none; cursor: pointer; }
.chips a:hover, .chips button:hover { border-color: var(--ink-3); color: var(--ink); }
.chips a[aria-current], .chips a[aria-pressed="true"], .chips button[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.chips .n { font-variant-numeric: tabular-nums; color: var(--ink-3); }
.chips a[aria-current] .n, .chips a[aria-pressed="true"] .n, .chips button[aria-pressed="true"] .n { color: inherit; }
td.row-actions { white-space: nowrap; text-align: right; }
td.row-actions .btn + .btn, td.row-actions form + .btn { margin-left: .4rem; }
form.inline { display: inline; }

/* template editor */
.qedit { border: 1px solid var(--rule); border-radius: var(--r); padding: 1rem 1.1rem .3rem; margin: 0 0 1rem; background: var(--surface-2); }
.qedit-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .7rem; }
.qorder { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin: 0; }
.qedit .qorder input { width: 4.5rem; min-height: 38px; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }
ul[id$="audience"], ul[id$="sections"], ul[id$="policies"], div[id$="audience"], div[id$="sections"], div[id$="policies"] { list-style: none; padding: 0; margin: .2rem 0 0; }
[id$="audience"] label, [id$="sections"] label, [id$="policies"] label { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; margin: .35rem 0; }

.quick { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.quick a { display: block; padding: .9rem 1rem; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; }
.quick a span { display: block; font-weight: 400; color: var(--ink-2); font-size: var(--t-sm); }
.quick a:hover { border-color: var(--brand); }

/* ---------- home layout ---------- */
.home-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.home-grid > * > h2:first-child { margin-top: 0; }
.home-side { display: grid; gap: 2rem; align-content: start; }
@container (min-width: 980px) {
  .home-grid { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); }
}
@container (min-width: 700px) and (max-width: 979px) {
  .home-side { grid-template-columns: 1fr 1fr; }
}

/* ---------- policy library: collapsible sections ---------- */
.library-tools { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 1.2rem 0 1rem; }
.library-tools input[type=search] { max-width: 26rem; }
.policy-groups { display: grid; gap: .8rem; }
.policy-group { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); }
.policy-group > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem;
  align-items: center; padding: 1rem 3rem 1rem 1.25rem; position: relative; border-radius: var(--r-lg); }
.policy-group > summary::-webkit-details-marker { display: none; }
.policy-group > summary::after { content: ""; position: absolute; right: 1.35rem; top: 50%; width: .55rem; height: .55rem; margin-top: -.4rem;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); transition: transform .15s ease; }
.policy-group[open] > summary::after { transform: rotate(-135deg); margin-top: -.1rem; }
.policy-group > summary:hover { background: var(--surface-2); }
.policy-group > summary:focus-visible { outline-offset: -3px; }
.policy-group[open] > summary { border-bottom: 1px solid var(--rule); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.g-title { font: 400 1.12rem/1.3 var(--serif); color: var(--heading); }
.g-meta { color: var(--ink-2); font-size: var(--t-sm); }
.g-desc { color: var(--ink-2); font-size: var(--t-sm); margin: .8rem 1.25rem .2rem; }
.doc-rows { list-style: none; margin: 0; padding: 0 0 .3rem; }
.doc-rows li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1.25rem; border-top: 1px solid var(--rule); }
.doc-rows li:first-child { border-top: 0; }
.doc-title { font-weight: 600; text-decoration: none; color: var(--ink); }
.doc-title:hover { color: var(--brand); text-decoration: underline; }
.doc-meta { color: var(--ink-2); font-size: var(--t-sm); display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; margin-top: .1rem; }
.table-wrap.unbounded { max-height: none; }
table.trades td { padding-top: .5rem; padding-bottom: .5rem; }
table.trades .sub { margin-top: .1rem; color: var(--ink-3); font-size: var(--t-xs); }
td.nowrap { white-space: nowrap; }
.section-head { margin-top: 2rem; align-items: center; }
.section-head h2 { margin: 0; }
.quarter-nav { display: inline-flex; align-items: center; gap: .75rem; font-size: var(--t-sm); }
.quarter-nav strong { font-weight: 600; }
.table-wrap.flush { border: 0; border-radius: 0 0 var(--r-lg) var(--r-lg); max-height: none; }
@container (max-width: 520px) {
  .policy-group > summary { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .policy-group > summary::after { transition: none; } }

/* ---------- tables: sticky header inside the scroll box, aligned numbers ---------- */
.table-wrap:focus-visible { outline-offset: 2px; }
.table-wrap { overflow: auto; max-height: min(78vh, 60rem); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: var(--cell-y) var(--cell-x); border-bottom: 1px solid var(--rule); vertical-align: top; }
th { position: sticky; top: 0; z-index: 1; font-weight: 600; color: var(--ink-2); background: var(--surface-2); white-space: nowrap; }
tbody tr:hover td { background: color-mix(in oklab, var(--brand) 3%, var(--surface)); }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
tr.problem td, tr.row-bad td { background: var(--alert-wash); }
tr.row-warn td { background: var(--caution-wash); }
.prewrap { white-space: pre-line; }
.progress { height: 6px; background: var(--rule); border-radius: 99px; overflow: hidden; min-width: 90px; }
.progress span { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* people: initials avatars (hue from the name, so a person keeps their color) */
.person { display: inline-flex; align-items: center; gap: .6rem; min-width: 0; }
.avatar { flex: none; width: 2rem; height: 2rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font: 600 .72rem/1 var(--sans); letter-spacing: .02em;
  background: hsl(var(--h, 220) 42% 90%); color: hsl(var(--h, 220) 48% 26%); }
.avatar.lg { width: 3rem; height: 3rem; font-size: 1rem; }
:root[data-theme="dark"] .avatar { background: hsl(var(--h, 220) 30% 24%); color: hsl(var(--h, 220) 60% 86%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: hsl(var(--h, 220) 30% 24%); color: hsl(var(--h, 220) 60% 86%); } }

/* ---------- stats (compliance overview) ---------- */
.stat { display: block; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1rem 1.1rem; text-decoration: none; color: inherit; position: relative; }
.stat .n { font: 600 var(--t-2xl)/1.05 var(--sans); }
.stat .l { color: var(--ink-2); font-size: var(--t-sm); margin-top: .25rem; }
.stat.bad { border-color: color-mix(in oklab, var(--alert) 35%, var(--rule)); }
.stat.bad .n { color: var(--alert); }
.stat.warn .n { color: var(--caution); }
.stat.bad::before, .stat.warn::before { content: ""; position: absolute; left: 1.1rem; right: 1.1rem; top: -1px; height: 3px; border-radius: 0 0 3px 3px; }
.stat.bad::before { background: var(--alert); }
.stat.warn::before { background: var(--caution-dot); }
a.stat:hover { border-color: var(--ink-3); }

.stat-row { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); }
.overview-grid { display: grid; gap: 1.2rem; grid-template-columns: minmax(0, 1fr); align-items: start; margin-top: 1.2rem; }
.overview-grid > .col { display: grid; gap: 1.2rem; align-content: start; }
.overview-grid > .col > .card { margin-bottom: 0; }
@container (min-width: 900px) { .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- charts (inline SVG) ---------- */
.chart-card h2 { margin-bottom: .2rem; }
.chart-card .sub { color: var(--ink-2); font-size: var(--t-sm); margin: 0 0 .9rem; }
.legend { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-size: var(--t-xs); color: var(--ink-2); margin: 0 0 .6rem; padding: 0; list-style: none; }
.legend li { display: inline-flex; align-items: center; gap: .4rem; }
.legend .key { width: .85rem; height: .3rem; border-radius: 2px; }
.key.s1, .bar.s1, .dot.s1 { background: var(--series-1); }
.key.s2, .bar.s2, .dot.s2 { background: var(--series-2); }
svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
svg.chart .grid line { stroke: var(--grid); stroke-width: 1; }
svg.chart .axis text, svg.chart text.tick { fill: var(--ink-3); font: 500 11px var(--sans); font-variant-numeric: tabular-nums; }
svg.chart .s1 { fill: var(--series-1); }
svg.chart .s2 { fill: var(--series-2); }
svg.chart .hit { fill: transparent; }
svg.chart .col:hover .s1, svg.chart .col:hover .s2 { filter: brightness(1.12); }
svg.chart .col:hover .hit { fill: color-mix(in oklab, var(--ink) 5%, transparent); }
svg.chart text.val { fill: var(--ink); font: 600 11px var(--sans); }

/* completion bars: one row per open certification */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem 1rem; align-items: baseline; }
.bars a.name { color: var(--ink); text-decoration: none; font-weight: 600; font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars a.name:hover { color: var(--brand); text-decoration: underline; }
.bars .figs { font-size: var(--t-xs); color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bars .figs strong { color: var(--ink); font-size: var(--t-sm); }
.bars .track { grid-column: 1 / -1; height: 10px; border-radius: 3px; background: color-mix(in oklab, var(--series-1) 14%, var(--surface)); position: relative; overflow: hidden; }
.bars .track span { position: absolute; inset: 0 auto 0 0; background: var(--series-1); border-radius: 0 3px 3px 0; }
.bars .meta { grid-column: 1 / -1; font-size: var(--t-xs); color: var(--ink-3); }
.bars .meta .late { color: var(--alert); font-weight: 600; }

/* activity feed (newest exceptions, recent records) */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li + li { border-top: 1px solid var(--rule); }
.feed a { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: center; padding: .65rem .2rem; color: inherit; text-decoration: none; }
.feed a:hover .title { color: var(--brand); text-decoration: underline; }
.feed .body { min-width: 0; display: flex; flex-direction: column; }
.feed .title { font-weight: 500; font-size: var(--t-sm); }
.feed a:not(:has(.avatar)) { grid-template-columns: 1fr auto; }

/* 90-day timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 3.6rem; top: .4rem; bottom: .4rem; width: 1px; background: var(--rule); }
.timeline li { display: grid; grid-template-columns: 3rem 1rem 1fr; gap: .6rem; align-items: start; padding: .4rem 0; }
.timeline .d { font-size: var(--t-xs); color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; line-height: 1.25; padding-top: .1rem; }
.timeline .d b { display: block; color: var(--ink); font-size: var(--t-sm); }
.timeline .dot { width: .7rem; height: .7rem; border-radius: 50%; margin: .35rem 0 0 .15rem; background: var(--brand); box-shadow: 0 0 0 3px var(--surface); position: relative; z-index: 1; }
.timeline li.overdue .dot { background: var(--alert); }
.timeline li.soon .dot { background: var(--caution-dot); }
.timeline .t { font-size: var(--t-sm); }
.timeline .t small { display: block; color: var(--ink-3); }
.timeline .month { grid-column: 1 / -1; font: 400 .95rem var(--serif); color: var(--heading); padding: .6rem 0 .1rem; }

/* ---------- forms ---------- */
form .field { margin-bottom: 1.1rem; }
label, .label { display: block; font-weight: 600; margin-bottom: .3rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], input[type=file],
input[type=search], input[type=datetime-local], input[type=tel], select, textarea {
  width: 100%; max-width: 34rem; font: inherit; color: var(--ink); background: var(--surface); padding: .6rem .75rem; min-height: 46px;
  border: 1px solid var(--rule-strong); border-radius: var(--r); }
textarea { max-width: 100%; min-height: 5.5rem; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid color-mix(in oklab, var(--brand) 20%, transparent); outline-offset: 0; }
input[type=checkbox], input[type=radio] { width: 1.15rem; height: 1.15rem; accent-color: var(--brand); margin: 0; }
input[type=color] { width: 4rem; height: 2.6rem; padding: .2rem; border: 1px solid var(--rule-strong); border-radius: var(--r); background: var(--surface); }
.checkbox { display: flex; gap: .65rem; align-items: flex-start; font-weight: 500; }
.checkbox input { margin-top: .22rem; flex: none; }
.help { color: var(--ink-3); font-size: var(--t-sm); margin-top: .25rem; max-width: var(--measure); }
.error-text { color: var(--alert); font-size: var(--t-sm); font-weight: 600; margin-top: .3rem; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--alert); }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-top: 1.4rem; }
/* filter bars: controls sit side by side at their natural width */
form.row { margin: .2rem 0 1.1rem; }
form.row > .field, form.row > div, form.row > label { margin: 0; }
form.row select, form.row input[type=text], form.row input[type=search], form.row input[type=date], form.row input[type=number] {
  width: auto; min-width: 9.5rem; max-width: 18rem; min-height: 42px; }
form.row .btn { min-height: 42px; }

/* ---------- certification: steps rail + content ---------- */
.task-head { margin-bottom: 1.6rem; }
.task-head .meta { display: flex; gap: 1.5rem; flex-wrap: wrap; color: var(--ink-2); font-size: var(--t-sm); margin-top: .3rem; }
.task-head .meta strong { color: var(--ink); }
.task-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.rail { position: sticky; top: 1.25rem; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.rail li { counter-increment: step; position: relative; padding: .5rem 0 .5rem 2.2rem; font-size: var(--t-sm); color: var(--ink-2); }
.rail li::before { content: counter(step); position: absolute; left: 0; top: .42rem; width: 1.55rem; height: 1.55rem; border-radius: 50%;
  border: 1px solid var(--rule-strong); background: var(--surface); display: flex; align-items: center; justify-content: center;
  font-size: var(--t-xs); font-weight: 700; color: var(--ink-2); }
.rail li.done::before { content: "\2713"; background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.rail li a { color: inherit; text-decoration: none; }
.rail li a:hover { color: var(--ink); text-decoration: underline; }
.step-block { scroll-margin-top: 1rem; }
.step-block > header { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.step-block > header h2 { margin-top: 0; }
.step-block .step-no { color: var(--ink-3); font: 500 var(--t-sm)/1 var(--sans); }

.record-group + .record-group { margin-top: 1.3rem; }
.record-group h3 { margin: 0 0 .5rem; font-size: var(--t-md); }
.add-ways { font-size: var(--t-sm); color: var(--ink-2); margin: 1rem 0 0; }

.question { padding: 1.05rem 0; border-top: 1px solid var(--rule); }
.question:first-of-type { border-top: 0; }
.question .q { font-weight: 600; max-width: var(--measure); }
.choices { display: flex; gap: .6rem; margin-top: .6rem; flex-wrap: wrap; }
.choices label { display: inline-flex; align-items: center; gap: .5rem; min-width: 100px; min-height: 46px; padding: .5rem 1rem; margin: 0;
  border: 1px solid var(--rule-strong); border-radius: var(--r); background: var(--surface); cursor: pointer; font-weight: 600; }
.choices label:hover { border-color: var(--ink-3); }
.choices label:has(input:checked) { border-color: var(--brand); background: var(--brand-wash); box-shadow: inset 0 0 0 1px var(--brand); }
.dup-choices { display: grid; gap: .5rem; }
.dup-choices label { min-width: 0; }
fieldset.card { min-width: 0; }
fieldset.card legend { padding: 0 .35rem; margin-left: -.35rem; font-size: 1.05rem; }

/* small inline filter / test forms */
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .25rem 1rem; align-items: end; }
.grid-form .actions { grid-column: 1 / -1; margin-top: 0; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li + li { margin-top: .2rem; }
.explain { margin-top: .7rem; display: none; }
.explain.show { display: block; }

.docs { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); }
.docs li { display: grid; grid-template-columns: 1.6rem 1fr auto; gap: .9rem; align-items: center; padding: .85rem 1.1rem; border-top: 1px solid var(--rule); }
.docs li:first-child { border-top: 0; }
.docs .mark { width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 1.5px solid var(--rule-strong); display: flex; align-items: center; justify-content: center; font-size: .8rem; color: var(--brand-ink); }
.docs li.opened .mark { border-color: var(--brand); }
.docs li.acked .mark { background: var(--brand); border-color: var(--brand); }
.docs .title { font-weight: 600; }
.docs .title small { display: block; font-weight: 400; color: var(--ink-3); font-size: var(--t-xs); }
.docs .state { font-size: var(--t-sm); color: var(--ink-2); white-space: nowrap; }

/* ---------- the signature ---------- */
.signing { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); padding: 1.6rem 1.6rem 1.3rem; }
.signing .attest { font: 400 1.04rem/1.7 var(--serif); max-width: 64ch; margin: 0 0 1.6rem; }
.sigline { position: relative; max-width: 30rem; margin-top: 1.4rem; }
.sigline label { position: absolute; left: 0; top: calc(100% + .35rem); font-size: var(--t-xs); font-weight: 500; color: var(--ink-3); }
.sigline input[type=text] { width: 100%; max-width: none; min-height: 0; border: 0; border-bottom: 1.5px solid var(--ink); border-radius: 0;
  padding: .1rem .2rem .25rem; background: transparent; font: italic 400 2rem/1.2 var(--serif); color: var(--heading); }
.sigline input[type=text]:focus { outline: none; border-bottom-color: var(--brand); box-shadow: 0 2px 0 0 var(--brand); }
.sigline input::placeholder { color: var(--rule-strong); }
.sigline .x { position: absolute; left: -1.3rem; bottom: .4rem; font: 400 1.1rem var(--serif); color: var(--ink-3); }
.sig-meta { display: flex; gap: 2rem; margin-top: 2.6rem; flex-wrap: wrap; color: var(--ink-2); font-size: var(--t-sm); }
.consent { margin-top: 1.4rem; }

.certified { display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: center; }
.seal { width: 132px; height: 132px; color: var(--brand); transform: rotate(-6deg); }
.seal .ring-text { font: 700 9.5px var(--sans); letter-spacing: .14em; fill: currentColor; }
.seal .date { font: 400 12px var(--serif); fill: currentColor; }
.seal.stamp { animation: stamp .55s cubic-bezier(.2, .9, .3, 1.2) .15s both; }
@keyframes stamp { from { transform: scale(1.35) rotate(-14deg); opacity: 0; } to { transform: scale(1) rotate(-6deg); opacity: 1; } }
.signed-name { font: italic 400 1.9rem/1.2 var(--serif); color: var(--heading); border-bottom: 1.5px solid var(--ink); display: inline-block; padding: 0 .3rem .15rem; }

/* ---------- policy reader ---------- */
.reader { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.reader .doclist { position: sticky; top: 1rem; }
.reader .doclist .docs li { grid-template-columns: 1.4rem 1fr; padding: .7rem .9rem; }
.reader .doclist .docs li.current { background: var(--brand-wash); box-shadow: inset 3px 0 0 var(--brand); }
.reader .doclist .docs a { text-decoration: none; color: var(--ink); }
.viewer { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; }
.viewer header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--rule); }
.viewer header h1 { font-size: var(--t-xl); margin: 0; }
.viewer header .meta { color: var(--ink-2); font-size: var(--t-sm); display: flex; gap: 1.25rem; flex-wrap: wrap; margin-top: .25rem; }
.viewer iframe { display: block; width: 100%; height: 70vh; border: 0; background: var(--mist); }
.pdf { height: 70vh; overflow-y: auto; background: color-mix(in oklab, var(--mist) 70%, var(--paper)); padding: 1rem; display: flex; flex-direction: column; align-items: center; gap: 1rem; }
:root[data-theme="dark"] .pdf { background: #0a141b; }
.pdf .pdf-page { background: #fff; box-shadow: 0 1px 3px rgba(14, 28, 39, .18); width: 100%; max-width: 920px; }
.pdf .pdf-page canvas { display: block; }
.pdf .pdf-status { color: var(--ink-2); margin: auto; }
.pdf iframe { height: 100%; width: 100%; border: 0; }
.viewer .nonpdf { padding: 2.5rem 1.25rem; }
.ackbar { position: sticky; bottom: 0; display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: .9rem 1.25rem; background: var(--surface); border-top: 1px solid var(--rule); }
.ackbar .where { color: var(--ink-2); font-size: var(--t-sm); }

/* ---------- empty states: say what to do next ---------- */
.empty { padding: 2rem 1rem; color: var(--ink-2); }
.card.empty { padding: 2.2rem 1.6rem; text-align: center; background: var(--surface-2); border-style: dashed; }
.card.empty p { margin-left: auto; margin-right: auto; max-width: 52ch; }
.empty .big { font: 400 var(--t-xl)/1.2 var(--serif); color: var(--heading); margin-bottom: .3rem; }
.empty .glyph { display: inline-flex; width: 3rem; height: 3rem; border-radius: 50%; align-items: center; justify-content: center;
  background: var(--brand-wash); color: var(--brand); margin-bottom: .6rem; }
.empty .glyph .icon { color: var(--brand); }

/* met / not-met checklists (e.g. the returned-contribution exception) */
ul.checks { list-style: none; margin: .4rem 0 1rem; padding: 0; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); }
ul.checks li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: .6rem 1rem; border-top: 1px solid var(--rule); }
ul.checks li:first-child { border-top: 0; }

/* ---------- misc ---------- */
dl.kv { display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: .45rem 1.2rem; margin: 0; }
dl.kv dt { color: var(--ink-2); }
dl.kv dd { margin: 0; }
code { font-size: .88em; background: var(--surface-2); border: 1px solid var(--rule); padding: .05rem .35rem; border-radius: 3px; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 1.6rem 0; }

/* ---------- quick find (Ctrl+K) ---------- */
dialog.palette { width: min(40rem, calc(100vw - 2rem)); max-height: min(70vh, 34rem); margin: 12vh auto auto; padding: 0;
  border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); overflow: hidden; }
dialog.palette::backdrop, dialog.idle-dialog::backdrop { background: rgba(6, 17, 26, .45); }
dialog.idle-dialog { width: min(30rem, calc(100vw - 2rem)); padding: 1.5rem 1.6rem 1.3rem; border: 1px solid var(--rule);
  border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog.idle-dialog h2 { margin: 0 0 .5rem; }
dialog.idle-dialog p { margin: 0 0 1rem; color: var(--ink-2); }
dialog.idle-dialog [data-idle-countdown] { color: var(--ink); font-variant-numeric: tabular-nums; }
dialog.idle-dialog .actions { margin: 0; }

/* this week, on the compliance overview */
.week-list { list-style: none; margin: .4rem 0 0; padding: 0; }
.week-list li a { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--rule); }
.week-list li a:hover { color: var(--brand); }
.week-list .dot { width: .55rem; height: .55rem; border-radius: 50%; flex: none; background: var(--ink-3); }
.week-list li.bad .dot { background: var(--alert, #b42318); }
.week-list li.warn .dot { background: #d29a00; }
.week .quiet { margin: .4rem 0 0; }
.week .week-foot { margin: .7rem 0 0; }
dialog.palette[open] { display: flex; flex-direction: column; }
.palette .search { display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border-bottom: 1px solid var(--rule); }
.palette .search input { border: 0; outline: 0; max-width: none; min-height: 40px; padding: 0; font-size: var(--t-md); background: transparent; }
.palette .search input:focus { outline: 0; }
.palette ul { list-style: none; margin: 0; padding: .4rem; overflow-y: auto; }
.palette li.group { padding: .55rem .7rem .2rem; font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); }
.palette a.hit { display: flex; align-items: center; gap: .7rem; padding: .55rem .7rem; border-radius: var(--r); color: var(--ink); text-decoration: none; }
.palette a.hit small { margin-left: auto; color: var(--ink-3); font-size: var(--t-xs); white-space: nowrap; }
.palette a.hit[aria-selected="true"] { background: var(--brand-wash); box-shadow: inset 3px 0 0 var(--brand); }
.palette .none { padding: 1rem; color: var(--ink-2); font-size: var(--t-sm); }
.palette footer { padding: .5rem 1rem; border-top: 1px solid var(--rule); font-size: var(--t-xs); color: var(--ink-3); display: flex; gap: 1rem; }
.palette kbd { font: 600 .68rem var(--sans); border: 1px solid var(--rule-strong); border-radius: 4px; padding: 0 .3rem; }

/* ---------- sign-in and account pages: dusk panel beside one calm form column ---------- */
body.auth-page { background: var(--surface); }
.auth-shell { display: grid; grid-template-columns: minmax(300px, 5fr) 7fr; min-height: 100vh; min-height: 100dvh; }
.auth-panel { position: relative; overflow: hidden; color: #fff; padding: clamp(2rem, 4.5vw, 3.5rem);
  background: linear-gradient(172deg, var(--dusk) 0%, var(--night) 82%);
  display: flex; flex-direction: column; justify-content: space-between; gap: 3rem; }
.auth-panel .firm b { color: #fff; font-size: clamp(1.45rem, 2.1vw, 1.9rem); padding-bottom: .5rem;
  border-bottom-color: color-mix(in oklab, var(--brand-base) 45%, #c4cbff); }
.auth-panel .firm span { color: color-mix(in oklab, #fff 70%, var(--dusk)); font-size: var(--t-sm); margin-top: .55rem; }
.auth-statement { position: relative; z-index: 1; margin: 0; max-width: 18ch; text-wrap: balance;
  font: 400 clamp(1.5rem, 2.4vw, 2.15rem)/1.22 var(--serif); letter-spacing: -.01em; color: #fff; }

.auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 5vw, 4rem) 1.5rem; }
.auth-main main.auth { margin: auto 0; padding: 0; width: 100%; max-width: 25rem; container-type: normal; }
.auth-foot { margin: 0; padding-top: 2.5rem; width: 100%; max-width: 25rem; font-size: var(--t-xs); color: var(--ink-3);
  display: grid; justify-items: center; gap: .45rem; text-align: center; }
.auth-foot p { margin: 0; max-width: none; }
.auth-foot nav { justify-content: center; }
main.auth .auth-consent { margin: .25rem 0 0; font-size: var(--t-xs); color: var(--ink-2); text-align: center; text-wrap: balance; }
main.auth .auth-consent a { white-space: nowrap; }

main.auth h1 { margin: 0 0 .5rem; font-size: clamp(1.9rem, 2.6vw, 2.3rem); line-height: 1.12; }
main.auth h2 { margin: 2rem 0 .75rem; font: 600 var(--t-sm)/1.3 var(--sans); color: var(--ink-2); }
main.auth > p, main.auth .auth-head p { color: var(--ink-2); margin: 0 0 1.25rem; }
.auth-head { margin-bottom: 2rem; }
.auth-head p { margin: 0; text-wrap: pretty; }
main.auth .auth-note { margin: 1.5rem 0 0; color: var(--ink-2); font-size: var(--t-sm); text-wrap: pretty; }
main.auth .auth-note .btn-link { min-height: 0; display: inline; vertical-align: baseline; font-weight: 500; color: var(--brand); font-size: var(--t-sm); }
.auth-actions .btn-link { justify-self: center; }
main.auth .alert { margin-bottom: 1.25rem; }
main.auth .alert p { margin: 0; }

.auth-form { display: grid; gap: 1.25rem; }
.auth-form.is-hidden { display: none; }
.auth-field { display: grid; gap: .4rem; }
.auth-field .label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.auth-field label { margin: 0; font-weight: 600; font-size: var(--t-sm); }
.auth-field .label-row .small a { color: var(--brand); font-weight: 500; text-decoration: none; }
.auth-field .label-row .small a:hover { text-decoration: underline; }
.auth-field input:not([type=checkbox]):not([type=radio]), .auth-field select, .auth-field textarea {
  max-width: none; min-height: 48px; border-radius: 8px; padding: .65rem .85rem; background: var(--surface); }
.auth-field input::placeholder { color: var(--ink-3); }
.auth-field .help, .auth-field .error-text { margin: 0; }
.auth-field .help ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.auth-field.check { gap: .3rem; }
.auth-turnstile { margin: .25rem 0 .75rem; min-height: 65px; }
.auth-actions { display: grid; gap: .75rem; margin-top: .5rem; }

/* buttons: one primary, quiet secondaries, a real pressed and busy state */
.btn-secondary { background: var(--surface); border-color: var(--rule-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn-block { display: flex; width: 100%; }
.btn-stack { display: flex; gap: .75rem; flex-wrap: wrap; }
.btn-stack.vertical { flex-direction: column; }
main.auth .btn { min-height: 48px; border-radius: 8px; font-size: var(--t-md); font-weight: 600; letter-spacing: .005em;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .08s ease; }
main.auth .btn-primary { box-shadow: 0 1px 2px rgba(6, 17, 26, .18), inset 0 1px 0 rgba(255, 255, 255, .08); }
main.auth .btn-primary:hover { box-shadow: 0 4px 12px -4px color-mix(in oklab, var(--brand) 60%, transparent); }
main.auth .btn:active { transform: translateY(1px); }
main.auth .btn .icon { color: currentColor; }
main.auth .btn-link { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; font-weight: 500; }
.btn[aria-busy="true"] { position: relative; color: transparent !important; pointer-events: none; }
.btn[aria-busy="true"]::after { content: ""; position: absolute; inset: 0; margin: auto; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 2px solid var(--brand-ink); border-right-color: transparent; animation: spin .7s linear infinite; }
.btn-secondary[aria-busy="true"]::after { border-color: var(--ink); border-right-color: transparent; }
/* Sign in with Microsoft: Microsoft's button colors (light: #5e5e5e on white, #8c8c8c border; dark: white on #2f2f2f). */
.btn-microsoft { gap: .75rem; background: #fff; border-color: #8c8c8c; color: #5e5e5e; font-family: "Segoe UI", var(--sans); }
.btn-microsoft:hover { background: #f3f3f3; border-color: #5e5e5e; }
.btn-microsoft[aria-busy="true"]::after { border-color: #5e5e5e; border-right-color: transparent; }
:root[data-theme="dark"] .btn-microsoft { background: #2f2f2f; border-color: #2f2f2f; color: #fff; }
:root[data-theme="dark"] .btn-microsoft:hover { background: #3b3b3b; border-color: #8c8c8c; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-microsoft { background: #2f2f2f; border-color: #2f2f2f; color: #fff; }
  :root:not([data-theme="light"]) .btn-microsoft:hover { background: #3b3b3b; border-color: #8c8c8c; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.auth-or { display: flex; align-items: center; gap: .9rem; margin: 1.75rem 0; color: var(--ink-3); font-size: var(--t-sm); }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.auth-rule { border: 0; border-top: 1px solid var(--rule); margin: 1.75rem 0; }
.auth-links { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; margin-top: 2rem; padding-top: 1.25rem;
  border-top: 1px solid var(--rule); font-size: var(--t-sm); }
.auth-links a { color: var(--ink-2); }
.auth-links .btn-link { color: var(--ink-2); font-size: var(--t-sm); }
main.auth .errorlist { list-style: none; margin: 0; padding: 0; color: var(--alert); font-weight: 600; font-size: var(--t-sm); }
main.auth table { margin-bottom: 1rem; }

@media (max-width: 860px) {
  .shell.has-sidebar { display: block; }
  .sidebar { position: sticky; top: 0; height: auto; max-height: 100vh; z-index: 20; border-right: 0; border-bottom: 1px solid var(--rule); }
  .side-head { padding: .75rem 1rem; align-items: center; }
  .side-head .firm b { font-size: 1.1rem; padding-bottom: .25rem; }
  .side-head .firm span { display: none; }
  .js .menu-toggle { display: inline-flex; }
  .js .sidebar[data-open="false"] .side-body { display: none; }
  .side-body { padding-bottom: .8rem; }
  .viewas { top: 0; position: relative; }
  .task-layout, .reader { grid-template-columns: 1fr; gap: 1.2rem; }
  .rail { position: static; display: flex; gap: .3rem 1.2rem; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding-bottom: .6rem; }
  .reader .doclist { position: static; }
  .viewer iframe { height: 60vh; }
  .auth-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-panel { padding: 1.1rem 1.25rem 1.2rem; gap: 0; }
  .auth-panel .firm b { font-size: 1.25rem; padding-bottom: .3rem; }
  .auth-panel .firm span { margin-top: .35rem; }
  .auth-statement { display: none; }
  .auth-main { justify-content: flex-start; padding-top: 2.25rem; }
}
@media (max-width: 640px) {
  html { font-size: 16px; }
  .statement h1 { font-size: var(--t-2xl); }
  .ledger a.item, .ledger .item { grid-template-columns: 1fr; }
  .ledger .item .when { text-align: left; }
  .docs li { grid-template-columns: 1.6rem 1fr; }
  .docs .state { grid-column: 2; white-space: normal; }
  dl.kv { grid-template-columns: 1fr; }
  .certified { grid-template-columns: 1fr; }
  .signing { padding: 1.2rem; }
  .sigline .x { display: none; }
  .table-wrap { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  main.auth .btn { transition: none; }
  .btn[aria-busy="true"]::after { animation-duration: 2s; }
  .side-section > summary::after { transition: none; }
  .who a.who-link, .who a.who-link .icon { transition: none; }
  .seal.stamp, .js .toast, .toast.leaving { animation: none; }
  * { scroll-behavior: auto !important; }
}
@media print {
  .masthead, .sidebar, .viewas, .actions, .rail, .ackbar, .no-print, .toasts, dialog.palette { display: none !important; }
  .shell.has-sidebar { display: block; }
  body { background: #fff; }
  .table-wrap { max-height: none; overflow: visible; }
  th { position: static; }
}

/* phones: wide tables become one card per row, each value labelled with its column */
@media (max-width: 640px) {
  .table-wrap:has(table.stack) { max-height: none; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: .65rem .9rem; border-bottom: 1px solid var(--rule); }
  table.stack tr:last-child { border-bottom: 0; }
  /* the label floats in the left gutter; flow-root makes the row as tall as whichever is taller */
  table.stack td { display: flow-root; padding: .2rem 0 .2rem 9.25rem; border: 0; text-align: left; }
  table.stack td::before { content: attr(data-label); float: left; width: 8.5rem; margin-left: -9.25rem; padding-top: .12rem;
    color: var(--ink-3); font-size: var(--t-xs); font-weight: 600; line-height: 1.3; }
  table.stack td.full, table.stack td[data-label=""] { padding-left: 0; }
  table.stack td.full::before, table.stack td[data-label=""]::before { display: none; }
  table.stack td.num, table.stack td.row-actions { text-align: left; white-space: normal; }
}

/* ops console (vendor staff): traceback, the 90-day uptime strip, the signed-in name without a profile link */
pre.traceback { background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 1rem 1.1rem;
  overflow: auto; max-height: 70vh; font: .8rem/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre; }
.uptime-days { display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; margin-top: .4rem; }
.uptime-days span { height: 2rem; border-radius: 2px; background: var(--rule); }
.uptime-days .ok { background: var(--done); }
.uptime-days .warn { background: var(--caution-dot); }
.uptime-days .bad { background: var(--alert); }
.who span.who-link { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; overflow: hidden; color: rgba(255, 255, 255, .9); }
@media (max-width: 640px) {
  .uptime-days { grid-template-columns: repeat(30, minmax(0, 1fr)); }
  .uptime-days span:nth-child(-n+60) { display: none; }
}

/* Release notes page */
.release h2 { margin: 0; }
.release-items { margin: .4rem 0 0; padding-left: 1.2rem; }
.release-items li { margin: .45rem 0; max-width: var(--measure); }

/* complete export progress */
progress.meter { width: 100%; height: 10px; border: 0; border-radius: 99px; background: var(--rule); overflow: hidden; accent-color: var(--brand); }
progress.meter::-webkit-progress-bar { background: var(--rule); border-radius: 99px; }
progress.meter::-webkit-progress-value { background: var(--brand); border-radius: 99px; }
progress.meter::-moz-progress-bar { background: var(--brand); border-radius: 99px; }
.export-status h2 { margin-top: 0; }

/* review queue keyboard shortcuts */
.kbd-hint:not([hidden]) { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .2rem 0 .8rem; font-size: var(--t-xs); color: var(--ink-2); }
.kbd-hint .btn-link { font-size: var(--t-xs); }
.kbd-hint kbd, .shortcut-list kbd { font: 600 .72rem var(--sans); border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; background: var(--surface); color: var(--ink); }
[data-review-row]:focus { outline: none; }
[data-review-row]:focus-visible, .card[data-review-row]:focus { outline: 3px solid color-mix(in oklab, var(--brand) 55%, var(--surface)); outline-offset: 2px; }
tr[data-review-row]:focus td { background: var(--brand-wash); }
tr[data-review-row]:focus td:first-child { box-shadow: inset 3px 0 0 var(--brand); }
.review-armed { margin: .3rem 0 0; color: var(--alert); font-weight: 600; }
dialog.shortcuts-dialog { width: min(32rem, calc(100vw - 2rem)); padding: 1.5rem 1.6rem 1.3rem; border: 1px solid var(--rule);
  border-radius: var(--r-lg); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog.shortcuts-dialog::backdrop { background: rgba(6, 17, 26, .45); }
dialog.shortcuts-dialog h2 { margin: 0 0 .8rem; }
dialog.shortcuts-dialog .actions { margin: 0; }
.shortcut-list { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1rem; margin: 0 0 1rem; font-size: var(--t-sm); }
.shortcut-list dt { white-space: nowrap; }
.shortcut-list dd { margin: 0; color: var(--ink-2); }
/* touch screens have no keyboard to use them with */
@media (hover: none) and (pointer: coarse) { .kbd-hint:not([hidden]) { display: none; } }
