/* Clean Vendor Check — ProcurementExpress
 *
 * Tokens: PEX teal is the working colour (navigation, links, primary actions); PEX orange is the
 * brand accent (marks, the evidence stamp, the main call to action). Status colours always ship
 * with an icon and words, never colour alone. Every text/background pair below meets WCAG AA.
 */

@font-face {
  font-family: 'Public Sans';
  src: url('/static/fonts/public-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Public Sans';
  src: url('/static/fonts/public-sans-latin-wght-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Brand */
  --teal: #005c88;          /* 7.3:1 on white */
  --teal-ink: #003b57;      /* headings, top bar */
  --teal-hover: #004a6e;
  --teal-50: #e9f3f8;
  --teal-100: #cfe4ee;
  --orange: #f75123;        /* accent only — never under body text */
  --cta: #d2400f;           /* 4.7:1 with white text */
  --cta-hover: #b8360f;
  --orange-50: #fff1ec;

  /* Neutrals */
  --ink: #17212b;
  --body: #2c3a47;
  --muted: #536171;         /* 5.9:1 on paper */
  --paper: #f5f7f9;
  --card: #ffffff;
  --line: #dde4ea;          /* dividers only */
  --field: #7d8e9d;         /* control borders: 3.4:1, meets 1.4.11 */
  --shade: #eef2f5;

  /* Status */
  --ok: #1e7a4c;      --ok-50: #e8f5ee;   --ok-200: #b9dfc9;
  --bad: #b42318;     --bad-50: #fdeeec;  --bad-200: #f4c4bd;
  --warn: #9a4305;    --warn-50: #fef4e6; --warn-200: #f6d4a8;
  --grey: #475467;    --grey-50: #eef1f4; --grey-200: #d3d9e0;

  /* Type: major third scale on a 16px base */
  --font: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
  --t-xs: 0.8125rem;  /* 13 */
  --t-sm: 0.875rem;   /* 14 */
  --t-md: 1rem;       /* 16 */
  --t-lg: 1.25rem;    /* 20 */
  --t-xl: 1.5625rem;  /* 25 */
  --t-2xl: 1.953rem;  /* 31 */
  --t-3xl: 2.75rem;   /* 44 */

  /* Space: 4px grid */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --lift: 0 1px 2px rgba(23, 33, 43, 0.06), 0 2px 8px rgba(23, 33, 43, 0.05);
  --float: 0 12px 32px rgba(23, 33, 43, 0.18);
  --ring: 0 0 0 2px var(--ring-gap), 0 0 0 4px var(--ring-color);

  /* Roles that differ between themes */
  color-scheme: light;
  --link: var(--teal);
  --teal-btn: var(--teal);
  --teal-btn-hover: var(--teal-hover);
  --brand-navy: #003b57;     /* fixed: top bar and on-dark buttons */
  --topbar: var(--brand-navy);
  --heading-brand: var(--teal-ink);
  --selected-bg: var(--teal-ink);
  --selected-fg: #fff;
  --subtle: #fafbfc;
  --row-hover: #f4f8fa;
  --press: #e3edf2;
  --ring-gap: #fff;
  --ring-color: var(--teal-ink);
  --pre-bg: #0f2533;
  --pre-fg: #e6f1f6;
  --placeholder: #6a7887;
  --bar: rgba(255, 255, 255, 0.96);
  --backdrop: rgba(10, 30, 45, 0.45);
  --toast-bg: #17212b;
  --toast-fg: #fff;
  --toast-ok: #8fe0b6;
  --toast-bad: #ffb4a8;
}

/* Dark theme: follows the device unless the person picked a theme. Every pair meets WCAG AA. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { 
    color-scheme: dark;
    --teal: #6cc2ec; --teal-ink: #bfe3f5; --teal-hover: #93d3f2; --teal-50: #0f2b3b; --teal-100: #164259;
    --teal-btn: #0a6a99; --teal-btn-hover: #0c7cb3;
    --orange-50: #331a10;
    --ink: #e9eff4; --body: #c6d2dc; --muted: #94a6b5;
    --paper: #0e1620; --card: #152029; --line: #2a3a48; --field: #5f7487; --shade: #1e2a35;
    --ok: #5fd49a; --ok-50: #0f2a1d; --ok-200: #1f5a3c;
    --bad: #ff9585; --bad-50: #33150f; --bad-200: #6b2a20;
    --warn: #f2b45a; --warn-50: #2e1f0b; --warn-200: #6a4614;
    --grey: #b0bdc9; --grey-50: #1e2a35; --grey-200: #3a4a58;
    --heading-brand: #e9eff4;
    --selected-bg: #bfe3f5; --selected-fg: #08202e;
    --topbar: #08202e;
    --subtle: #18242e; --row-hover: #1f303d; --press: #26394a;
    --ring-gap: #0e1620; --ring-color: #8fd3f5;
    --pre-bg: #0a141c; --pre-fg: #d6e6ef;
    --placeholder: #7d8f9e;
    --bar: rgba(21, 32, 41, 0.96);
    --backdrop: rgba(0, 0, 0, 0.6);
    --toast-bg: #e9eff4; --toast-fg: #0e1620; --toast-ok: #1e7a4c; --toast-bad: #b42318;
    --lift: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
    --float: 0 12px 32px rgba(0, 0, 0, 0.55);
   }
}
:root[data-theme='dark'] { 
    color-scheme: dark;
    --teal: #6cc2ec; --teal-ink: #bfe3f5; --teal-hover: #93d3f2; --teal-50: #0f2b3b; --teal-100: #164259;
    --teal-btn: #0a6a99; --teal-btn-hover: #0c7cb3;
    --orange-50: #331a10;
    --ink: #e9eff4; --body: #c6d2dc; --muted: #94a6b5;
    --paper: #0e1620; --card: #152029; --line: #2a3a48; --field: #5f7487; --shade: #1e2a35;
    --ok: #5fd49a; --ok-50: #0f2a1d; --ok-200: #1f5a3c;
    --bad: #ff9585; --bad-50: #33150f; --bad-200: #6b2a20;
    --warn: #f2b45a; --warn-50: #2e1f0b; --warn-200: #6a4614;
    --grey: #b0bdc9; --grey-50: #1e2a35; --grey-200: #3a4a58;
    --heading-brand: #e9eff4;
    --selected-bg: #bfe3f5; --selected-fg: #08202e;
    --topbar: #08202e;
    --subtle: #18242e; --row-hover: #1f303d; --press: #26394a;
    --ring-gap: #0e1620; --ring-color: #8fd3f5;
    --pre-bg: #0a141c; --pre-fg: #d6e6ef;
    --placeholder: #7d8f9e;
    --bar: rgba(21, 32, 41, 0.96);
    --backdrop: rgba(0, 0, 0, 0.6);
    --toast-bg: #e9eff4; --toast-fg: #0e1620; --toast-ok: #1e7a4c; --toast-bad: #b42318;
    --lift: 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.25);
    --float: 0 12px 32px rgba(0, 0, 0, 0.55);
   }

*, *::before, *::after { box-sizing: border-box; }
body > main { flex: 1 0 auto; width: 100%; }
.footer { flex-shrink: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--body);
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.55;
  font-feature-settings: 'tnum' 1; /* figures line up in tables and IDs */
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 var(--s3); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: var(--t-2xl); }
h2 { font-size: var(--t-xl); }
h3 { font-size: var(--t-lg); }
h4 { font-size: var(--t-md); }
p { margin: 0 0 var(--s3); }
a { color: var(--link); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-hover); text-decoration-thickness: 2px; }
code, .mono { font-family: var(--mono); font-size: 0.9em; }
pre { background: var(--pre-bg); color: var(--pre-fg); padding: var(--s4); border-radius: var(--r-sm); overflow-x: auto; font-size: var(--t-sm); line-height: 1.6; margin: 0 0 var(--s3); }
small, .small { font-size: var(--t-sm); }
.muted { color: var(--muted); }
.wrap { overflow-wrap: anywhere; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { box-shadow: var(--ring); border-radius: 4px; }
/* Headings receive focus programmatically on navigation (for screen readers); no ring needed. */
[tabindex='-1']:focus, [tabindex='-1']:focus-visible { box-shadow: none; }
input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: 0 0 0 3px var(--teal-100); border-color: var(--teal); }
.skip { position: absolute; left: var(--s3); top: -60px; z-index: 50; background: var(--card); color: var(--ink); padding: var(--s2) var(--s4); border-radius: var(--r-sm); box-shadow: var(--float); }
.skip:focus { top: var(--s3); }

.icon { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

/* ---------------------------------------------------------------- Top bar */
.topbar { background: var(--topbar); color: #fff; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 0 var(--s5); min-height: 60px; display: flex; align-items: center; gap: var(--s5); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); color: #fff; text-decoration: none; font-weight: 700; font-size: 1.05rem; white-space: nowrap; }
.brand:hover { color: #fff; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--orange); display: grid; place-items: center; }
.brand .mark .icon { width: 18px; height: 18px; color: #fff; stroke-width: 2.4; }
.brand .by { font-weight: 400; color: #c5d9e4; font-size: var(--t-sm); }
.topnav { display: flex; align-items: center; gap: var(--s1); margin-left: auto; }
.topnav a { color: #e3eef4; text-decoration: none; font-size: var(--t-sm); font-weight: 500; padding: var(--s2) var(--s3); border-radius: var(--r-sm); }
.topnav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.topnav .btn { margin-left: var(--s2); }
.topnav a.btn-on-dark, .topnav a.btn-on-dark:hover { color: var(--brand-navy); }

/* App header navigation (signed in) */
.appnav { display: flex; gap: 2px; margin-left: var(--s5); align-self: stretch; }
.appnav a { white-space: nowrap; display: inline-flex; align-items: center; gap: var(--s2); padding: 0 var(--s3); color: #d4e5ee; text-decoration: none; font-weight: 600; font-size: var(--t-sm); border-bottom: 3px solid transparent; border-top: 3px solid transparent; }
.appnav a:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.appnav a[aria-current='page'] { color: #fff; border-bottom-color: var(--orange); }
.appnav .count { background: var(--orange); color: var(--ink); font-size: 0.75rem; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-weight: 700; }
.account { margin-left: auto; display: flex; align-items: center; gap: var(--s3); font-size: var(--t-sm); color: #c5d9e4; }
.account .who { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account button { color: #fff; white-space: nowrap; min-height: 40px; padding: 0 var(--s2); }
@media (max-width: 1180px) { .account .who { display: none; } }

/* ---------------------------------------------------------------- Buttons & controls */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-sm);
  border: 1px solid var(--field); background: var(--card); color: var(--ink);
  font: inherit; font-weight: 600; font-size: var(--t-sm); line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 80ms ease;
}
.btn:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-50); text-decoration: none; }
.btn:active { transform: translateY(1px); background: var(--press); }
.btn-primary { background: var(--cta); border-color: var(--cta); color: #fff; }
.btn-primary:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: #fff; }
.btn-primary:active { background: #9e2f0c; border-color: #9e2f0c; }
.btn-teal { background: var(--teal-btn); border-color: var(--teal-btn); color: #fff; }
.btn-teal:hover { background: var(--teal-btn-hover); border-color: var(--teal-btn-hover); color: #fff; }
.btn-teal:active { background: var(--brand-navy); border-color: var(--brand-navy); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--teal); }
.btn-quiet:hover { background: var(--teal-50); border-color: transparent; color: var(--teal); }
.btn-danger { color: var(--bad); border-color: var(--bad-200); }
.btn-danger:hover { background: var(--bad-50); color: var(--bad); border-color: var(--bad); }
.btn-sm { min-height: 36px; padding: 0 var(--s3); }
.btn-on-dark { background: #fff; border-color: #fff; color: var(--brand-navy); }
.btn-on-dark:hover { background: #e3f0f7; color: var(--brand-navy); border-color: #e3f0f7; }
.btn-on-dark:active { background: #cfe4ee; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn.is-busy { cursor: progress; }
.btn.is-busy::after { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 700ms linear infinite; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--teal); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.linklike:hover { text-decoration-thickness: 2px; }
.on-dark { color: #fff; }

.field { display: block; margin-bottom: var(--s4); }
.field > span:not(.hint), .label { display: block; font-weight: 600; font-size: var(--t-sm); color: var(--ink); margin-bottom: var(--s1); }
.field .opt { font-weight: 400; color: var(--muted); }
.check.field > span { font-weight: 400; color: var(--body); margin: 0; }
.hint { display: block; color: var(--muted); font-size: var(--t-sm); margin-top: var(--s1); font-weight: 400; }
input[type='text'], input[type='email'], input[type='search'], input[type='date'], input[type='url'], input:not([type]), select, textarea {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--field); border-radius: var(--r-sm); background: var(--card); color: var(--ink);
  font: inherit; font-size: var(--t-md);
}
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--placeholder); }
input[aria-invalid='true'] { border-color: var(--bad); }
.field-error { color: var(--bad); font-size: var(--t-sm); margin-top: var(--s1); display: flex; gap: var(--s1); align-items: flex-start; }
.check { display: flex; gap: var(--s3); align-items: flex-start; font-size: var(--t-sm); color: var(--body); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--teal); flex: none; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--s4); }

/* Choice cards (radio) */
.choices { display: grid; gap: var(--s2); border: 0; padding: 0; margin: 0 0 var(--s4); }
.choices legend { font-weight: 600; font-size: var(--t-sm); color: var(--ink); margin-bottom: var(--s2); padding: 0; }
.choice { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); cursor: pointer; }
.choice:hover { border-color: var(--field); background: var(--subtle); }
.choice:has(input:checked) { border-color: var(--teal); background: var(--teal-50); box-shadow: inset 0 0 0 1px var(--teal); }
.choice input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--teal); flex: none; }
.choice strong { display: block; color: var(--ink); font-size: var(--t-sm); }
.choice span { display: block; color: var(--muted); font-size: var(--t-sm); }

/* ---------------------------------------------------------------- Status */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: var(--t-xs); font-weight: 700; white-space: nowrap; line-height: 1.4; border: 1px solid transparent; }
.status .icon { width: 15px; height: 15px; stroke-width: 2.4; }
.status-NO_MATCH { background: var(--ok-50); color: var(--ok); border-color: var(--ok-200); }
.status-MATCH_FOUND { background: var(--bad-50); color: var(--bad); border-color: var(--bad-200); }
.status-POSSIBLE_MATCH { background: var(--warn-50); color: var(--warn); border-color: var(--warn-200); }
.status-INSUFFICIENT_INPUT, .status-neutral { background: var(--grey-50); color: var(--grey); border-color: var(--grey-200); }
.status-open { background: var(--bad-50); color: var(--bad); border-color: var(--bad-200); }
.status-false_positive, .status-resolved { background: var(--grey-50); color: var(--grey); border-color: var(--grey-200); }
.status-confirmed_match { background: var(--bad-50); color: var(--bad); border-color: var(--bad-200); }
.tag { display: inline-block; background: var(--shade); color: var(--grey); border-radius: 4px; padding: 0 6px; font-size: var(--t-xs); font-weight: 600; margin: 2px 4px 2px 0; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-xs); font-weight: 600; color: var(--muted); }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-50); }
.badge.is-stale .dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-50); }

/* ---------------------------------------------------------------- Notices */
.notice { display: flex; gap: var(--s3); align-items: flex-start; border-radius: var(--r-sm); padding: var(--s3) var(--s4); margin: 0 0 var(--s3); font-size: var(--t-sm); border: 1px solid; }
.notice > .icon { margin-top: 2px; }
.notice p:last-child { margin-bottom: 0; }
.notice-info { background: var(--teal-50); color: var(--teal-ink); border-color: var(--teal-100); }
.notice-warn { background: var(--warn-50); color: var(--warn); border-color: var(--warn-200); }
.notice-bad { background: var(--bad-50); color: var(--bad); border-color: var(--bad-200); }
.notice-ok { background: var(--ok-50); color: var(--ok); border-color: var(--ok-200); }
.notice a { color: inherit; font-weight: 600; }

/* ---------------------------------------------------------------- The evidence receipt (signature element) */
.receipt { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--lift); margin-top: var(--s4); overflow: hidden; }
.receipt::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--grey); }
.receipt.is-NO_MATCH::before { background: var(--ok); }
.receipt.is-MATCH_FOUND::before { background: var(--bad); }
.receipt.is-POSSIBLE_MATCH::before { background: var(--warn); }
.receipt-head { padding: var(--s4) var(--s5) var(--s3) calc(var(--s5) + 5px); }
.verdict { display: flex; align-items: center; gap: var(--s3); margin: 0 0 var(--s2); font-size: var(--t-lg); font-weight: 700; color: var(--ink); line-height: 1.25; }
.verdict .icon { width: 28px; height: 28px; stroke-width: 2.2; }
.is-NO_MATCH .verdict .icon { color: var(--ok); }
.is-MATCH_FOUND .verdict .icon { color: var(--bad); }
.is-POSSIBLE_MATCH .verdict .icon { color: var(--warn); }
.is-INSUFFICIENT_INPUT .verdict .icon { color: var(--grey); }
.receipt-summary { color: var(--body); font-size: var(--t-sm); margin: 0; }
.receipt-body { padding: 0 var(--s5) var(--s3) calc(var(--s5) + 5px); }
.receipt-tear { border: 0; border-top: 2px dashed var(--line); margin: var(--s2) 0 0; }
.receipt-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--s3) var(--s5); padding: var(--s3) var(--s5) var(--s4) calc(var(--s5) + 5px); background: var(--subtle); font-size: var(--t-xs); }
.receipt-meta dt { color: var(--muted); font-weight: 600; }
.receipt-meta dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.receipt-meta .mono { font-size: var(--t-xs); }
.receipt-actions { display: flex; gap: var(--s2); flex-wrap: wrap; padding: 0 var(--s5) var(--s4) calc(var(--s5) + 5px); background: var(--subtle); }
.receipt-notes { padding: 0 var(--s5) var(--s3) calc(var(--s5) + 5px); margin: 0; color: var(--muted); font-size: var(--t-sm); }

/* A matched exclusion record */
.record { border-top: 1px solid var(--line); padding: var(--s4) 0; }
.record:first-child { border-top: 0; padding-top: var(--s2); }
.record-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); margin: 0 0 var(--s1); font-size: var(--t-md); }
.record-why { color: var(--muted); font-size: var(--t-sm); margin: 0 0 var(--s2); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 2px var(--s4); margin: 0; font-size: var(--t-sm); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- Landing */
.hero { max-width: 1200px; margin: 0 auto; padding: var(--s8) var(--s5) var(--s7); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: var(--s7); align-items: start; }
.hero h1 { font-size: clamp(2.1rem, 4.2vw, var(--t-3xl)); line-height: 1.08; letter-spacing: -0.025em; color: var(--heading-brand); margin-bottom: var(--s4); max-width: 15ch; }
.lead { font-size: var(--t-lg); line-height: 1.5; color: var(--body); max-width: 36rem; margin-bottom: var(--s5); }
.hero-points { list-style: none; padding: 0; margin: 0 0 var(--s5); display: grid; gap: var(--s2); }
.hero-points li { display: flex; gap: var(--s3); align-items: flex-start; color: var(--body); }
.hero-points .icon { color: var(--teal); margin-top: 3px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--lift); }
.check-panel h2 { font-size: var(--t-lg); margin-bottom: var(--s1); }
.check-panel > p { color: var(--muted); font-size: var(--t-sm); margin-bottom: var(--s4); }

.band { max-width: 1200px; margin: 0 auto; padding: var(--s7) var(--s5); }
.band-tint { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-tint > .band { padding-top: var(--s7); padding-bottom: var(--s7); }
.band h2 { margin-bottom: var(--s2); }
.band .intro { color: var(--muted); max-width: 40rem; margin-bottom: var(--s6); }

/* How it works: a real sequence, drawn as one */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s6); counter-reset: step; position: relative; }
.steps::before { content: ''; position: absolute; top: 19px; left: 20px; right: calc(33% - 20px); border-top: 2px solid var(--teal-100); }
.steps li { position: relative; counter-increment: step; }
.steps li::before { content: counter(step); position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--teal-btn); color: #fff; font-weight: 700; margin-bottom: var(--s4); box-shadow: 0 0 0 6px var(--card); }
.steps h3 { font-size: var(--t-lg); margin-bottom: var(--s2); }
.steps p { color: var(--body); margin: 0; max-width: 32ch; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: var(--s4) 0; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: var(--s4); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--link); }
.faq summary::after { content: '+'; font-size: 1.4rem; line-height: 1; color: var(--teal); }
.faq details[open] summary::after { content: '−'; }
.faq details p { padding-bottom: var(--s4); max-width: 65ch; margin: 0; }

.footer { border-top: 1px solid var(--line); background: var(--card); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: var(--s6) var(--s5); color: var(--muted); font-size: var(--t-sm); display: grid; grid-template-columns: 2fr 1fr; gap: var(--s6); }
.footer p { max-width: 70ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* Explainer video: a local poster until someone presses play, so Google's player (and its
   cookies) only load on request. */
.how-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: var(--s7); align-items: start; }
.video { margin: 0; }
.video-play, .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r-lg); overflow: hidden; background: #0f2533; box-shadow: var(--lift); }
.video-play { position: relative; padding: 0; cursor: pointer; }
.video-play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 300ms ease; }
.video-play:hover img { transform: scale(1.015); }
.video-badge { position: absolute; left: var(--s4); bottom: var(--s4); display: inline-flex; align-items: center; gap: var(--s2); padding: var(--s2) var(--s4) var(--s2) var(--s3); border-radius: 999px; background: var(--cta); color: #fff; font-weight: 700; font-size: var(--t-sm); box-shadow: var(--float); transition: background-color 120ms ease; }
.video-badge .icon { width: 22px; height: 22px; stroke: none; }
.video-play:hover .video-badge { background: var(--cta-hover); }
.video-play:active .video-badge { transform: translateY(1px); }
.video figcaption { margin-top: var(--s2); }
.steps.steps-stacked { grid-template-columns: 1fr; gap: var(--s5); }
.steps.steps-stacked::before { top: 20px; bottom: 20px; left: 19px; right: auto; border-top: 0; border-left: 2px solid var(--teal-100); }
.steps.steps-stacked li { padding-left: 60px; }
.steps.steps-stacked li::before { position: absolute; left: 0; top: 0; margin: 0; }
.steps.steps-stacked p { max-width: none; }
.hint-link { font-size: var(--t-sm); margin-left: var(--s1); white-space: nowrap; }

/* ---------------------------------------------------------------- App layout */
.app { max-width: 1200px; margin: 0 auto; padding: var(--s6) var(--s5) var(--s8); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.page-head h1 { margin: 0 0 var(--s1); }
.page-head p { margin: 0; color: var(--muted); }
.page-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.section { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s5); margin-bottom: var(--s4); }
.section > h2, .section > h3 { font-size: var(--t-lg); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.section-head h2 { font-size: var(--t-lg); margin: 0; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
.grid-aside { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }

/* Attention banner */
.attention { display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; background: var(--card); border: 1px solid var(--bad-200); border-left: 5px solid var(--bad); border-radius: var(--r); padding: var(--s4) var(--s5); margin-bottom: var(--s5); box-shadow: var(--lift); }
.attention .icon { width: 26px; height: 26px; color: var(--bad); }
.attention div { flex: 1 1 260px; }
.attention strong { display: block; color: var(--ink); font-size: var(--t-lg); }
.attention span { color: var(--muted); font-size: var(--t-sm); }
.attention.is-upgrade { border-color: var(--teal-100); border-left-color: var(--teal); }
.attention.is-upgrade .icon { color: var(--teal); }

/* Filter chips (radio group) */
.toolbar { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; margin-bottom: var(--s4); }
.chips { display: flex; gap: var(--s2); flex-wrap: wrap; border: 0; padding: 0; margin: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { transition: background-color 120ms ease, border-color 120ms ease; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 var(--s3); border: 1px solid var(--line); background: var(--card); border-radius: 999px; font-size: var(--t-sm); font-weight: 600; color: var(--body); cursor: pointer; }
.chip span b { font-weight: 700; color: var(--muted); }
.chip span:hover { border-color: var(--field); background: var(--row-hover); }
.chip input:checked + span { background: var(--selected-bg); border-color: var(--selected-bg); color: var(--selected-fg); }
.chip input:checked + span b { color: inherit; opacity: 0.75; }
.chip input:focus-visible + span { box-shadow: var(--ring); }
.searchbox { position: relative; margin-left: auto; width: 300px; max-width: 100%; }
.searchbox .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbox input { padding-left: 38px; }

/* Data tables */
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
.data th { text-align: left; font-weight: 600; color: var(--muted); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); background: var(--subtle); white-space: nowrap; font-size: var(--t-xs); }
.data td { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); vertical-align: top; color: var(--body); }
.data tr:last-child td { border-bottom: 0; }
.data tbody tr:hover td { background: var(--row-hover); }
.data .num { text-align: right; }
.data .name { font-weight: 600; color: var(--ink); }
.data .rowlink { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; }
.data .rowlink:hover { color: var(--teal); text-decoration-color: currentColor; }
.data .sub { display: block; color: var(--muted); font-size: var(--t-xs); font-weight: 400; margin-top: 2px; }
.data td.actions { text-align: right; white-space: nowrap; }
.data .links { display: flex; gap: var(--s3); white-space: nowrap; }

/* Inline controls in tables get real tap targets: 24px minimum (WCAG 2.2), 44px on touch screens. */
.data .rowlink, .data .sub a, .data .sub .linklike, .data .links a { display: inline-flex; align-items: center; min-height: 28px; }
@media (pointer: coarse) {
  .data .rowlink, .data .sub a, .data .sub .linklike, .data .links a { min-height: 44px; }
  .data .links { gap: var(--s5); }
}

/* Pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); flex-wrap: wrap; margin-top: var(--s4); }
.pager-info { margin: 0; color: var(--muted); font-size: var(--t-sm); }
.pager-controls { display: flex; align-items: center; gap: var(--s2); }
.pager-pages { display: flex; align-items: center; gap: var(--s1); list-style: none; margin: 0; padding: 0; }
.pager-num { min-width: 36px; min-height: 36px; padding: 0 var(--s2); border-radius: var(--r-sm); border: 1px solid transparent; background: transparent; color: var(--body); font: inherit; font-size: var(--t-sm); font-weight: 600; cursor: pointer; }
.pager-num:hover { background: var(--row-hover); border-color: var(--line); }
.pager-num[aria-current='page'] { background: var(--selected-bg); color: var(--selected-fg); border-color: var(--selected-bg); }
.pager-gap { color: var(--muted); padding: 0 var(--s1); }
.pager-compact { display: none; font-size: var(--t-sm); font-weight: 600; color: var(--ink); }
.pager-size { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); color: var(--muted); }
.pager-size select { width: auto; min-height: 36px; padding: 4px 28px 4px 10px; display: inline-block; }
.icon.flip { transform: scaleX(-1); }
.table-wrap.is-loading tbody { opacity: 0.5; transition: opacity 120ms ease; }
.table-wrap:focus-visible { box-shadow: var(--ring); }

/* Empty + loading */
.empty { text-align: center; padding: var(--s7) var(--s5); background: var(--card); border: 1px dashed var(--field); border-radius: var(--r); }
.empty > .icon { width: 40px; height: 40px; color: var(--teal); stroke-width: 1.6; margin-bottom: var(--s3); }
.empty h2 { font-size: var(--t-lg); }
.empty p { color: var(--muted); max-width: 46ch; margin: 0 auto var(--s4); }
.skeleton { display: grid; gap: var(--s3); }
.skeleton div { height: 44px; border-radius: var(--r-sm); background: linear-gradient(90deg, var(--shade) 0%, var(--subtle) 50%, var(--shade) 100%); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }

/* Upload */
.stepper { list-style: none; display: flex; gap: var(--s2); padding: 0; margin: 0 0 var(--s5); flex-wrap: wrap; }
.stepper li { display: flex; align-items: center; gap: var(--s2); font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.stepper li + li::before { content: ''; width: 32px; border-top: 2px solid var(--line); margin-right: var(--s2); }
.stepper .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line); background: var(--card); font-size: var(--t-xs); }
.stepper [aria-current='step'] { color: var(--ink); }
.stepper [aria-current='step'] .n { border-color: var(--teal-btn); background: var(--teal-btn); color: #fff; }
.stepper .done { color: var(--ok); }
.stepper .done .n { border-color: var(--ok); background: var(--ok); color: #fff; }
.dropzone { display: grid; place-items: center; text-align: center; gap: var(--s2); padding: var(--s7) var(--s5); border: 2px dashed var(--field); border-radius: var(--r-lg); background: var(--card); cursor: pointer; transition: border-color 120ms, background-color 120ms; }
.dropzone:hover, .dropzone.is-drag { border-color: var(--teal); background: var(--teal-50); }
.dropzone:focus-within { box-shadow: var(--ring); }
.dropzone > .icon { width: 40px; height: 40px; color: var(--teal); stroke-width: 1.6; }
.dropzone strong { font-size: var(--t-lg); color: var(--ink); }
.fixes { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.fixes li { display: flex; gap: var(--s3); align-items: flex-start; font-size: var(--t-sm); }
.fixes .icon { margin-top: 2px; color: var(--ok); }
.fixes .todo .icon { color: var(--warn); }
.summary-line { font-size: var(--t-lg); color: var(--ink); margin-bottom: var(--s4); }
.summary-line strong { font-weight: 700; }
.actionbar { position: sticky; bottom: 0; z-index: 5; display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; background: var(--bar); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: var(--r); padding: var(--s3) var(--s4); box-shadow: 0 -4px 16px rgba(23, 33, 43, 0.06); margin-top: var(--s4); }
.actionbar p { margin: 0 auto 0 0; color: var(--muted); font-size: var(--t-sm); flex: 1 1 260px; }
details.more > summary { cursor: pointer; font-weight: 600; color: var(--link); padding: var(--s2) 0; text-underline-offset: 0.2em; }
details.more > summary:hover { text-decoration: underline; }
details.more[open] > summary { margin-bottom: var(--s3); }

/* Alerts: compare view */
.alert-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: var(--s5); box-shadow: var(--lift); overflow: hidden; }
.alert-card header { padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); display: flex; gap: var(--s3); align-items: flex-start; flex-wrap: wrap; }
.alert-card header h2 { font-size: var(--t-lg); margin: 0; flex: 1 1 auto; }
.alert-card header p { margin: 2px 0 0; color: var(--muted); font-size: var(--t-sm); width: 100%; }
.alert-body { padding: var(--s4) var(--s5); }
.compare { width: 100%; border-collapse: collapse; font-size: var(--t-sm); margin-bottom: var(--s3); table-layout: fixed; }
.compare caption { text-align: left; font-weight: 600; color: var(--ink); padding-bottom: var(--s2); }
.compare th, .compare td { text-align: left; padding: var(--s2) var(--s3); border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.compare thead th { font-size: var(--t-xs); color: var(--muted); font-weight: 600; background: var(--subtle); }
.compare tbody th { color: var(--muted); font-weight: 600; width: 22%; }
.compare .same { color: var(--ok); }
.compare .diff { color: var(--bad); }
.compare .cue { display: inline-flex; gap: 4px; align-items: center; font-size: var(--t-xs); font-weight: 600; margin-left: var(--s1); }
.decision { background: var(--subtle); border-top: 1px solid var(--line); padding: var(--s4) var(--s5); }
.decision h3 { font-size: var(--t-md); }
.decided { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s4) var(--s5); background: var(--subtle); border-top: 1px solid var(--line); font-size: var(--t-sm); }

/* A possible match a person has ruled out */
.status-reviewed { background: var(--shade); color: var(--body); border-color: var(--line); }

/* Asking vendors for their UEI */
.ask-notice { align-items: center; }
.ask-notice p { flex: 1 1 auto; margin: 0; }
.ask-notice .btn { flex: none; }
.uei-note { display: flex; flex-wrap: wrap; gap: 4px var(--s2); align-items: center; }
.uei-note .icon { width: 14px; height: 14px; margin-right: 4px; vertical-align: -2px; }
.uei-note .linklike { margin-left: var(--s2); }
.uei-note .linklike:first-child { margin-left: 0; }
.ask-pending { display: inline-flex; gap: var(--s1); align-items: center; }
dialog.modal.ask-dialog { width: min(720px, calc(100vw - 32px)); }
.ask-tools { display: flex; gap: var(--s3); align-items: center; font-size: var(--t-sm); margin-bottom: var(--s2); }
.ask-tools #ask-count { flex: 1; color: var(--muted); }
.ask-list { list-style: none; margin: 0 0 var(--s3); padding: 0; border: 1px solid var(--line); border-radius: var(--r); max-height: min(46vh, 420px); overflow: auto; }
.ask-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 15rem); gap: var(--s2) var(--s3); align-items: center; padding: var(--s2) var(--s3); }
.ask-item + .ask-item { border-top: 1px solid var(--line); }
.ask-item .check strong { color: var(--ink); }
.ask-item .check .sub { display: block; color: var(--muted); font-size: var(--t-xs); }
.ask-item.is-off { opacity: 0.6; }
.ask-email input { width: 100%; }
.ask-err { grid-column: 1 / -1; margin: 0; color: var(--bad); font-size: var(--t-sm); }
.mail-head { display: grid; grid-template-columns: max-content 1fr; gap: 2px var(--s3); font-size: var(--t-sm); margin: 0 0 var(--s2); }
.mail-head dt { color: var(--muted); }
.mail-head dd { margin: 0; overflow-wrap: anywhere; }
.mail-body { white-space: pre-wrap; font-family: inherit; font-size: var(--t-sm); background: var(--subtle); border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s3); margin: 0; max-height: 40vh; overflow: auto; color: var(--body); }
/* The vendor's UEI form */
.uei-input { font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }
.uei-panel .notice { margin: var(--s2) 0 var(--s4); }
.uei-alt { border-top: 1px solid var(--line); margin-top: var(--s5); padding-top: var(--s4); }
.uei-alt p { margin: 0 0 var(--s2); }
.uei-foot { margin: var(--s5) 0 0; }

/* Alert triage */
.alert-group { margin-bottom: var(--s6); }
.alert-group-head { display: flex; align-items: flex-end; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s3); }
.alert-group-head > div { flex: 1 1 320px; }
.alert-group-head h2 { font-size: var(--t-lg); margin: 0 0 2px; display: flex; align-items: center; gap: var(--s2); }
.alert-group-head p { margin: 0; }
.count-pill { font-size: var(--t-xs); font-weight: 700; background: var(--shade); color: var(--body); border-radius: 999px; padding: 1px 8px; }
.alert-group.is-high .count-pill { background: var(--bad-50); color: var(--bad); }
.alert-group.is-medium .count-pill { background: var(--warn-50); color: var(--warn); }
.alert-list { list-style: none; margin: 0; padding: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.alert-item + .alert-item { border-top: 1px solid var(--line); }
.alert-group.is-high .alert-item { box-shadow: inset 4px 0 0 var(--bad); }
.alert-group.is-medium .alert-item { box-shadow: inset 4px 0 0 var(--warn); }
.alert-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 8.5rem; align-items: center; gap: var(--s3); padding: var(--s2) var(--s4); }
.alert-row .sel { width: 18px; height: 18px; accent-color: var(--teal); }
.alert-toggle { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(0, 1.4fr); gap: var(--s4); align-items: start; text-align: left; background: none; border: 0; padding: var(--s2) 0; font: inherit; font-size: var(--t-sm); color: var(--body); cursor: pointer; min-height: 44px; }
.alert-toggle:hover .ar-vendor strong { color: var(--link); text-decoration: underline; }
.alert-toggle .sub, .ar-why .sub { display: block; color: var(--muted); font-size: var(--t-xs); }
.ar-vendor strong { color: var(--ink); }
.ar-record { color: var(--ink); }
.ar-why { color: var(--muted); }
.alert-item.is-open { background: var(--subtle); }
.alert-item.is-open .alert-toggle .ar-vendor strong::after { content: ' ▾'; color: var(--muted); }
.alert-detail { padding: 0 var(--s4) var(--s4) calc(var(--s4) + 28px + var(--s3)); }
.alert-detail .decision { border: 1px solid var(--line); border-radius: var(--r); margin-top: var(--s3); background: var(--card); }
.signals { list-style: none; padding: 0; margin: 0 0 var(--s3); display: grid; gap: 4px; font-size: var(--t-sm); }
.signals li { display: flex; gap: var(--s2); align-items: flex-start; }
.signals .for .icon { color: var(--ok); margin-top: 2px; }
.signals .against .icon { color: var(--bad); margin-top: 2px; }
.ar-act { justify-self: end; }
.kbd-btn { margin-left: auto; }
.note-preview { margin: var(--s2) 0 0; padding-left: 1.2em; font-size: var(--t-sm); display: grid; gap: 4px; max-height: 14rem; overflow: auto; }
.bulkbar { position: sticky; bottom: var(--s3); }
.bulkbar p { flex: 1 1 auto; }
kbd { font-family: var(--mono); font-size: var(--t-xs); border: 1px solid var(--field); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--subtle); color: var(--ink); }
.kbd-list { grid-template-columns: max-content 1fr; }

/* Settings */
.keylist { list-style: none; padding: 0; margin: var(--s3) 0 0; }
.keylist li { display: flex; align-items: center; gap: var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.keylist li > :last-child { margin-left: auto; }
.copyfield { display: flex; gap: var(--s2); align-items: stretch; }
.copyfield code { flex: 1; display: block; background: var(--shade); border-radius: var(--r-sm); padding: 10px 12px; overflow-wrap: anywhere; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s5); margin: 0; font-size: var(--t-sm); }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- Dialogs & toasts */
dialog { border: 0; padding: 0; color: var(--body); background: var(--card); box-shadow: var(--float); }
dialog::backdrop { background: var(--backdrop); }
dialog.sheet { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(720px, 100vw); max-width: 100vw; border-radius: var(--r-lg) 0 0 var(--r-lg); }
dialog.modal { width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border-radius: var(--r-lg); }
dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog .dialog-body { overflow-y: auto; flex: 1 1 auto; overscroll-behavior: contain; }
dialog .dialog-head h2:focus { box-shadow: none; }
dialog[open].sheet { animation: slidein 200ms ease-out; }
.dialog-head { flex: none; position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: var(--s3); justify-content: space-between; padding: var(--s4) var(--s5); background: var(--card); border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: var(--t-lg); margin: 0; }
.dialog-body { padding: var(--s5); }
.dialog-foot { flex: none; display: flex; justify-content: flex-end; gap: var(--s2); padding: var(--s4) var(--s5); border-top: 1px solid var(--line); background: var(--subtle); }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.iconbtn:hover { background: var(--shade); color: var(--ink); }
.iconbtn:active { background: var(--press); }
.iconbtn.on-bar { color: #d4e5ee; }
.iconbtn.on-bar:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.toasts { position: fixed; bottom: var(--s5); left: 50%; transform: translateX(-50%); z-index: 100; display: grid; gap: var(--s2); width: min(480px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: var(--s3); align-items: center; background: var(--toast-bg); color: var(--toast-fg); padding: var(--s3) var(--s4); border-radius: var(--r); box-shadow: var(--float); font-size: var(--t-sm); animation: rise 180ms ease-out; }
.toast .icon { color: var(--toast-ok); }
.toast.is-error .icon { color: var(--toast-bad); }

/* Quick-check examples */
.qc-name { position: relative; }
.samples { position: absolute; left: 0; right: 0; z-index: 20; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--float); padding: var(--s2); }
.samples[hidden] { display: none; }
.samples-title { font-size: var(--t-sm); font-weight: 600; color: var(--ink); margin: var(--s1) var(--s2) var(--s2); }
.samples-group { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: var(--s2) var(--s2) var(--s1); }
.sample { display: flex; align-items: center; gap: var(--s2); width: 100%; min-height: 40px; padding: var(--s1) var(--s2); border: 0; border-radius: var(--r-sm); background: transparent; color: var(--body); font: inherit; font-size: var(--t-sm); text-align: left; cursor: pointer; }
.sample:hover, .sample:focus-visible { background: var(--shade); color: var(--ink); }
.sample .icon { flex: none; width: 18px; height: 18px; }
.sample.is-clean .icon { color: var(--ok); }
.sample.is-excluded .icon { color: var(--bad); }
.sample > span:first-of-type { flex: 1 1 auto; }
.sample-state { color: var(--muted); font-size: 0.75rem; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.plan { display: flex; flex-direction: column; }
.plan h3 { font-size: var(--t-lg); margin-bottom: var(--s2); }
.plan .hero-points { flex: 1 1 auto; align-content: start; }
.plan .page-actions { margin-bottom: var(--s2); }
.plan.is-featured { border: 2px solid var(--teal); }
.plan-price { margin: 0 0 var(--s4); color: var(--muted); }
.plan-price strong { font-size: 2rem; color: var(--ink); font-feature-settings: 'tnum' 1; margin-right: var(--s1); }
.plan-price .hint { display: block; }
.upgrade { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); }
.upgrade .page-actions { margin-top: var(--s3); }
.upgrade > .btn { margin-bottom: var(--s2); }

/* Sign in + consent */
.cta-panel h3 { font-size: var(--t-lg); margin-bottom: var(--s1); }
.auth-page { max-width: 520px; padding-top: var(--s7); }
.auth-panel h1 { font-size: var(--t-xl); margin-bottom: var(--s2); }
.auth-panel > .notice { margin-bottom: var(--s4); }
.btn-block { width: 100%; }
.auth-switch { margin: var(--s4) 0 0; text-align: center; }
.code-input { font-size: 1.6rem !important; letter-spacing: 0.4em; text-align: center; font-feature-settings: 'tnum' 1; }
.form-msg:not(:empty) { margin-top: var(--s3); }
.consent-list { margin: var(--s3) 0 var(--s4); }
.consent-list .icon { color: var(--teal); }
.consent-actions { display: flex; gap: var(--s3); justify-content: flex-end; margin-top: var(--s5); }
.consent-actions .btn { min-width: 120px; }

/* Verify page + prose */
.narrow { max-width: 820px; margin: 0 auto; padding: var(--s7) var(--s5); }
.prose { max-width: 72ch; }
.prose h1 { color: var(--heading-brand); margin-bottom: var(--s4); }
.prose h2 { margin-top: var(--s7); color: var(--heading-brand); }
.prose h3 { margin-top: var(--s5); }
.prose li { margin-bottom: var(--s1); }
.prose table { border-collapse: collapse; width: 100%; font-size: var(--t-sm); margin: var(--s3) 0 var(--s5); background: var(--card); }
.prose th, .prose td { text-align: left; border-bottom: 1px solid var(--line); padding: var(--s2) var(--s3); vertical-align: top; }
.prose th { background: var(--teal-50); color: var(--teal-ink); }
.seal { display: flex; gap: var(--s4); align-items: center; padding: var(--s5); border-radius: var(--r-lg); margin-bottom: var(--s5); border: 1px solid; }
.seal .icon { width: 44px; height: 44px; stroke-width: 1.8; }
.seal h1 { font-size: var(--t-xl); margin: 0 0 var(--s1); color: inherit; }
.seal p { margin: 0; }
.seal.is-valid { background: var(--ok-50); color: var(--ok); border-color: var(--ok-200); }
.seal.is-invalid { background: var(--bad-50); color: var(--bad); border-color: var(--bad-200); }

/* ---------------------------------------------------------------- Motion */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 960px) {
  .hero, .split, .grid-2, .grid-aside, .footer-inner, .how-grid, .plans { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: var(--s6); gap: var(--s6); }
  .steps { grid-template-columns: 1fr; gap: var(--s5); }
  .steps::before { top: 20px; bottom: 20px; left: 19px; right: auto; border-top: 0; border-left: 2px solid var(--teal-100); }
  .steps li { padding-left: 60px; }
  .steps li::before { position: absolute; left: 0; top: 0; margin: 0; }
  .appnav { margin-left: 0; order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; border-top: 1px solid rgba(255, 255, 255, 0.12); }
  .appnav::-webkit-scrollbar { display: none; }
  .appnav a { padding: var(--s3); }
  .topbar-inner { flex-wrap: wrap; row-gap: 0; }
  .account { padding: var(--s2) 0; }
  .searchbox { margin-left: 0; min-width: 0; flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .topbar-inner, .app, .band, .hero, .narrow, .footer-inner { padding-left: var(--s4); padding-right: var(--s4); }
  .topnav a:not(.btn) { display: none; }
  .topbar-inner { gap: var(--s2); }
  .brand { font-size: 0.98rem; gap: 6px; }
  .topnav { gap: 0; }
  .topnav .btn { margin-left: var(--s1); padding: 0 var(--s3); }
  /* Key/value lists and the verify seal stack on phones */
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { margin-top: var(--s3); }
  .kv dt:first-child { margin-top: 0; }
  .seal { flex-direction: column; align-items: flex-start; gap: var(--s3); padding: var(--s4); }
  .seal h1 { font-size: var(--t-lg); }
  .account { gap: var(--s1); }
  /* Attention banner: icon beside the text, action full width underneath */
  .attention { display: grid; grid-template-columns: auto 1fr; gap: var(--s3); padding: var(--s4); }
  .attention .btn { grid-column: 1 / -1; }
  /* Stacked rows: drop cells with nothing in them */
  table.stack td.is-empty, .compare td.is-empty { display: none; }
  table.stack td:first-child { padding-bottom: var(--s1); }
  table.stack tr { display: flex; flex-direction: column; }
  table.stack td.primary { order: -1; }
  .result-placeholder { display: none; }
  .alert-row { grid-template-columns: 24px minmax(0, 1fr); padding: var(--s2) var(--s3); }
  .ask-item { grid-template-columns: 1fr; }
  .ask-notice { flex-wrap: wrap; }
  .alert-toggle { grid-template-columns: 1fr; gap: 2px; }
  .ar-act { grid-column: 2; justify-self: start; padding-bottom: var(--s2); }
  .kbd-btn { display: none; }
  .alert-detail { padding: 0 var(--s3) var(--s3); }
  .actionbar.bulkbar { bottom: 0; display: grid; grid-template-columns: 1fr auto; }
  .actionbar.bulkbar p { display: block; align-self: center; }
  .bulkbar [data-bulk=clear] { flex: none; }
  .alert-row { align-items: start; }
  .alert-row .sel { margin-top: 12px; }
  .pager { justify-content: center; }
  .pager-info { width: 100%; text-align: center; }
  .pager-pages, .pager-word { display: none; }
  .pager-compact { display: inline; padding: 0 var(--s2); }
  .pager-controls .btn { min-width: 44px; min-height: 44px; }
  .actionbar { gap: var(--s2); padding: var(--s3); }
  .actionbar p { display: none; }
  .actionbar .btn { flex: 1 1 auto; }
  .actionbar #restart { flex: 0 0 auto; order: 3; }
  dialog.modal.is-form { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; margin: 0; border-radius: 0; }
  .copyfield { flex-wrap: wrap; }
  .copyfield code { flex: 1 1 100%; }
  .brand .by, .account .who { display: none; }
  .row, .row-3 { grid-template-columns: 1fr; gap: 0; }
  .panel, .section { padding: var(--s4); }
  /* Tables become stacked rows */
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack, table.stack tbody, table.stack tr, table.stack td { display: block; width: 100%; }
  table.stack tr { padding: var(--s3) var(--s4); border-bottom: 1px solid var(--line); }
  table.stack td { border: 0; padding: 2px 0; }
  table.stack td[data-label]:not([data-label=''])::before { content: attr(data-label) ': '; color: var(--muted); font-size: var(--t-xs); font-weight: 600; }
  table.stack td.actions { text-align: left; padding-top: var(--s2); }
  dialog.sheet { border-radius: 0; }
  .receipt-head, .receipt-body, .receipt-meta, .receipt-actions, .receipt-notes { padding-left: calc(var(--s4) + 5px); padding-right: var(--s4); }
  /* Comparison stacks: label, then your vendor, then the record. */
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: 100%; }
  .compare caption { display: block; width: 100%; }
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare tr { padding: var(--s2) 0; border-bottom: 1px solid var(--line); }
  .compare tbody th, .compare td { border: 0; padding: 2px 0; width: 100%; }
  .compare tbody th { color: var(--ink); }
  .compare td::before { content: attr(data-label); display: block; color: var(--muted); font-size: var(--t-xs); font-weight: 600; }
}
@media (max-width: 400px) {
  /* Narrowest phones: the marketing header keeps one row (theme still follows the device). */
  .topnav #theme-toggle { display: none; }
}
@media (forced-colors: active) {
  .status, .chip span, .btn { border: 1px solid CanvasText; }
  .receipt::before { background: CanvasText; }
}
@media print {
  .topbar, .footer, .actionbar, .receipt-actions, .toasts { display: none !important; }
  :root { color-scheme: light; }
  body { background: #fff; color: #17212b; }
}
