/* Federal Form Blocks: the worksheet on screen as the government form it descends from.
   Square ruled blocks, small-caps field labels, a form number in the corner, navy for structure and action.
   Screen only: print.css and the base rules keep paper output matching the approver's template.
   Every size, colour and block measure below comes from a token in :root; add a token before adding a literal. */
@media screen {
  :root {
    /* Colour: grey desk under white sheets, so each block reads as its own ruled page. */
    --desk: #f2f3f5;
    --paper: #ffffff;
    --band: #eef0f2;
    --band-soft: #f6f7f8;
    --ink: #1b1f24;
    --ink-2: #4a525c;
    --on-dark: #ffffff;
    --rule: #1b1f24;
    --hairline: #cdd2d8;
    --control-edge: #8a929c;
    --placeholder: #69717b;
    --navy: #1f3a5f;
    --navy-hover: #152a46;
    --navy-tint: #e6edf5;
    --red: #b3261e;
    --red-tint: #fbeae8;
    --amber: #7a4a00;
    --amber-tint: #fff3d6;
    --amber-edge: #c98a00;
    --green: #1e6b3a;
    --green-tint: #e6f2ea;
    --green-edge: #9cc9ab;
    --purple: #58308c;
    --purple-tint: #f0eaf8;
    --purple-edge: #bfa8df;

    /* Type: one system sans, one mono for numbers; a 1.125-ish ramp for dense product UI. */
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    --text-xs: .8125rem;   /* counts, badges */
    --text-sm: .875rem;    /* meta, notes, numbers, compact labels */
    --text-base: 1rem;     /* body, controls, field labels */
    --text-md: 1.125rem;   /* block titles, status line, register vendor */
    --text-lg: 1.5rem;     /* page titles on narrow screens, sign-in */
    --text-xl: 2rem;       /* page titles, vendor name on phones */
    --text-2xl: 2.5rem;    /* vendor name on wide screens */
    --caps-spacing: .05em;

    /* Measure */
    --gutter: 1rem;
    --block-pad: 1.1rem;
    --block-gap: 1.25rem;
    --control-h: 2.5rem;
    --control-h-sm: 2.25rem;

    /* Corners: a light round on every edge, larger on sheets than on marks. */
    --radius-mark: 2px; /* stage marks and drawn checkboxes */
    --radius-sm: 3px;   /* badges, counts, the brand box, the form number */
    --radius: 5px;      /* controls, buttons, notices, menus */
    --radius-lg: 8px;   /* ruled blocks and tables */
    --strip-h: 2.75rem;
    --page-max: 1120px;

    /* Motion: short, and only to say something new arrived. */
    --motion-fast: 150ms;   /* controls */
    --motion-step: 220ms;   /* a walkthrough step arriving */
    --motion-stagger: 40ms; /* between questions in a step */
    --ease-out: cubic-bezier(.2, .7, .3, 1);

    /* Base-rule aliases, so shared rules in application.css pick up the screen palette. */
    --fg: var(--ink); --muted: var(--ink-2); --line: var(--hairline); --card: var(--paper); --accent: var(--navy); --bg: var(--desk);

    font-family: var(--sans);
    color: var(--ink);
    background: var(--desk);
    accent-color: var(--navy);
  }
  @media (min-width: 720px) { :root { --gutter: 1.5rem; } }
  @media (pointer: coarse) { :root { --control-h: 2.75rem; } }

  /* ---------- Page ---------- */
  html { scrollbar-color: var(--control-edge) var(--desk); scroll-padding-top: calc(var(--strip-h) + .75rem); -webkit-text-size-adjust: 100%; }
  body { background: var(--desk); font-size: var(--text-base); line-height: 1.5; font-variant-numeric: tabular-nums; }
  ::selection { background: var(--navy); color: var(--on-dark); }
  main { max-width: var(--page-max); padding: 1.25rem var(--gutter) 5rem; }
  .site-footer { max-width: var(--page-max); margin: -3rem auto 0; padding: 0 var(--gutter) 1.5rem; font-size: var(--text-sm); color: var(--ink-2); }

  a { color: var(--navy); text-underline-offset: .18em; text-decoration-thickness: 1px; }
  a:hover { text-decoration-thickness: 2px; }
  :focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

  h1, h2, h3 { text-wrap: balance; letter-spacing: -.01em; }
  h1 { font-size: var(--text-xl); line-height: 1.15; margin: 0; }
  main > h1 { margin: .5rem 0 .25rem; }
  main > h1 + .muted { margin: 0 0 1.5rem; max-width: 65ch; }
  h2 { font-size: var(--text-md); line-height: 1.3; margin: 2rem 0 .5rem; }
  h3 { font-size: var(--text-base); line-height: 1.4; margin: 1.5rem 0 .5rem; }
  p { max-width: 75ch; }
  .muted { color: var(--ink-2); }
  .icon { flex: none; display: block; }
  [hidden] { display: none !important; }

  /* Field labels: the small-caps voice of every form block. */
  .block-label, .register-head, .fields dt, .form label, .form legend, .form .checks > span, .stage-line .step-label,
  .form-title, .form-note, .menu-group, main table th, .intake-summary dt {
    font-variant-caps: all-small-caps; letter-spacing: var(--caps-spacing);
  }

  /* Grey label band at the top of a ruled block. */
  .block-label, .form-title, .report-section > h2 {
    margin: 0 calc(-1 * var(--block-pad)); padding: .4rem var(--block-pad); background: var(--band);
    border-bottom: 1px solid var(--rule); font-size: var(--text-base); font-weight: 700; line-height: 1.35; color: var(--ink);
  }

  /* Drawn disclosure chevron shared by every <details> summary. */
  .evidence-toggle, .disclosure-toggle {
    display: inline-flex; align-items: center; gap: .5rem; padding: .2rem 0; border: 0; background: none; cursor: pointer;
    font: inherit; font-weight: 600; color: var(--ink-2);
  }
  .evidence-toggle::before, .disclosure-toggle::before {
    content: ""; width: .45rem; height: .45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg); transition: transform var(--motion-fast) ease-out; flex: none;
  }
  .evidence-toggle[aria-expanded="true"]::before, .disclosure-toggle[aria-expanded="true"]::before { transform: rotate(45deg); }
  .evidence-toggle:hover, .disclosure-toggle:hover { color: var(--ink); }
  .disclosure-toggle { font-size: var(--text-sm); margin: .35rem 0; }
  .disclosure-panel { margin-top: .25rem; }
  .tools-menu > summary, .form details > summary {
    cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem; width: fit-content; font-weight: 600;
  }
  .tools-menu > summary::-webkit-details-marker, .form details > summary::-webkit-details-marker { display: none; }
  .tools-menu > summary::before, .form details > summary::before {
    content: ""; width: .45rem; height: .45rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg); transition: transform var(--motion-fast) ease-out; flex: none;
  }
  .tools-menu[open] > summary::before, .form details[open] > summary::before { transform: rotate(45deg); }

  /* ---------- Top bar ---------- */
  .topbar { display: block; padding: 0; border-bottom: 2px solid var(--rule); background: var(--paper); position: relative; z-index: 20; }
  .topbar-inner { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: stretch; gap: .25rem; min-height: 3.25rem; }
  .brand {
    align-self: center; display: inline-grid; place-items: center; height: 2rem; padding: 0 .55rem; margin-right: .75rem;
    background: var(--ink); color: var(--on-dark); font-weight: 800; letter-spacing: .08em; font-size: var(--text-base); text-decoration: none; border-radius: var(--radius-sm);
  }
  .brand:hover { background: var(--navy); }
  .topbar .primary-nav { display: flex; align-items: stretch; gap: .25rem; }
  .topbar .primary-nav a {
    display: inline-flex; align-items: center; gap: .4rem; padding: 0 .7rem; color: var(--ink); text-decoration: none;
    font-size: var(--text-md); font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -2px;
  }
  .topbar .primary-nav a:hover { background: var(--band-soft); }
  .topbar .primary-nav a[aria-current="page"] { border-bottom-color: var(--navy); color: var(--navy); }

  .topbar-end { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
  .account { display: none; align-items: center; gap: .75rem; padding-left: .75rem; border-left: 1px solid var(--hairline); }
  .who, .account .link, .menu-account .link { color: var(--ink-2); font-size: var(--text-sm); }

  .menu { position: relative; }
  .menu > summary {
    list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45rem; min-height: var(--control-h);
    padding: 0 .75rem; border: 1px solid var(--rule); border-radius: var(--radius); font-weight: 600; background: var(--paper);
  }
  .menu > summary::-webkit-details-marker { display: none; }
  .menu > summary::after {
    content: ""; width: .4rem; height: .4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg); transition: transform var(--motion-fast) ease-out;
  }
  .menu[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
  .menu > summary:hover { background: var(--band-soft); }
  .menu > summary.is-current { color: var(--navy); border-color: var(--navy); }
  .menu[open] > summary { background: var(--ink); border-color: var(--ink); color: var(--on-dark); }
  .topbar .menu-panel {
    position: absolute; right: 0; top: calc(100% + 6px); min-width: 15rem; background: var(--paper);
    border: 1px solid var(--rule); border-radius: var(--radius); overflow: clip; display: grid; z-index: 30;
  }
  .topbar .menu-panel nav { display: grid; gap: 0; }
  .menu-group { margin: 0; padding: .35rem 1rem; background: var(--band); border-bottom: 1px solid var(--hairline); font-size: var(--text-sm); font-weight: 700; color: var(--ink-2); }
  .menu-panel nav a { padding: .65rem 1rem; border-bottom: 1px solid var(--hairline); color: var(--ink); text-decoration: none; font-weight: 600; }
  .menu-panel nav a:hover { background: var(--band-soft); }
  .menu-panel nav a[aria-current="page"] { color: var(--navy); background: var(--navy-tint); }
  .menu-account { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; }
  /* The smallest phones: tighter brand and nav spacing so the Settings menu stays on the page. */
  @media (max-width: 399px) {
    .topbar-inner { gap: 0; }
    .brand { margin-right: .25rem; }
    .topbar .primary-nav { gap: 0; }
    .topbar .primary-nav a { padding: 0 .5rem; }
    .menu > summary { padding: 0 .55rem; }
  }
  /* Under 360px the Settings word gives way to its icon; screen readers still hear it. */
  @media (max-width: 359px) {
    .menu > summary > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  }
  @media (min-width: 900px) {
    .account { display: flex; }
    .menu-account { display: none; }
    .menu-panel nav a:last-child { border-bottom: 0; }
  }

  /* ---------- Notices ---------- */
  .flash { max-width: var(--page-max); width: calc(100% - 2 * var(--gutter)); margin: 1rem auto 0; padding: .7rem 1rem; border-radius: var(--radius); background: var(--navy-tint); border: 1px solid var(--navy); }
  .flash-alert, .warning { background: var(--amber-tint); color: var(--amber); border: 1px solid var(--amber-edge); border-radius: var(--radius); padding: .6rem .8rem; }
  .errors { color: var(--red); background: var(--red-tint); border: 1px solid var(--red); border-radius: var(--radius); padding: .6rem .8rem; }
  main .flash { width: auto; max-width: none; margin: 0 0 1.5rem; }
  .flash p:first-child { margin-top: 0; } .flash p:last-child { margin-bottom: 0; }

  /* ---------- Buttons ---------- */
  .button, button.button, input[type=submit].button {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: var(--control-h); padding: .45rem .9rem;
    border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); color: var(--ink); font: inherit; font-variant-caps: normal; letter-spacing: normal; font-weight: 600;
    text-decoration: none; line-height: 1.2; cursor: pointer; transition: background-color var(--motion-fast) ease-out, color var(--motion-fast) ease-out;
  }
  .button:hover { background: var(--band-soft); }
  .button.primary, input[type=submit].button.primary { background: var(--navy); border-color: var(--navy); color: var(--on-dark); }
  .button.primary:hover, input[type=submit].button.primary:hover { background: var(--navy-hover); }
  .button.small { min-height: var(--control-h-sm); padding: .3rem .7rem; font-size: var(--text-sm); }
  .button:disabled, .button[disabled] { opacity: .45; cursor: not-allowed; }
  .button.danger { color: var(--red); border-color: var(--red); }
  .button.danger:hover { background: var(--red-tint); }
  .delete-draft { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--hairline); max-width: 46rem; }
  .exception.is-draft { border-style: dashed; }
  .button.link, button.link { min-height: 0; border: 0; background: none; color: var(--navy); padding: 0; font-weight: 400; text-decoration: underline; text-underline-offset: .18em; }
  .button.link:hover, button.link:hover { background: none; text-decoration-thickness: 2px; }

  /* ---------- Page head ---------- */
  .page-head { align-items: flex-end; flex-wrap: wrap; margin: .5rem 0 1rem; }
  .page-head p { margin: .25rem 0 0; }

  /* ---------- Status tabs ---------- */
  .tabs { display: flex; margin: 0 0 1rem; overflow-x: auto; border-bottom: 1px solid var(--rule); scrollbar-width: thin; }
  @media (max-width: 899px) { .tabs { mask-image: linear-gradient(to right, var(--ink) calc(100% - 2.5rem), transparent); padding-right: 2rem; } }
  .tabs .tab {
    flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .8rem; color: var(--ink-2);
    text-decoration: none; font-weight: 600; border: 1px solid transparent; border-bottom: 0; margin-bottom: -1px; border-radius: var(--radius) var(--radius) 0 0;
  }
  .tabs .tab:hover { color: var(--ink); background: var(--paper); }
  .tabs .tab[aria-current="page"] { color: var(--ink); background: var(--paper); border-color: var(--rule); }
  .tabs .count, .strip-count { font-size: var(--text-xs); font-weight: 700; min-width: 1.4rem; padding: 0 .3rem; text-align: center; border-radius: var(--radius-sm); }
  .tabs .count { background: var(--band); color: var(--ink); }
  .tabs .tab[aria-current="page"] .count { background: var(--ink); color: var(--on-dark); }

  /* ---------- The register (VTR list) ---------- */
  .register { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: clip; }
  .register-head { display: none; }
  .register-row {
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "number stage" "priority priority" "vendor vendor" "summary summary" "meta meta";
    gap: .3rem .75rem; padding: .85rem 1rem; color: var(--ink); text-decoration: none; border-top: 1px solid var(--hairline);
  }
  .register-row:first-of-type { border-top: 0; }
  .register-row:hover { background: var(--band-soft); }
  .register-row:focus-visible { outline-offset: -3px; }
  .reg-number { grid-area: number; font-family: var(--mono); font-size: var(--text-sm); color: var(--ink-2); align-self: center; }
  /* Priority: the number for every row; the highest also gets a filled ink mark and the word, so it stands out without colour. */
  .reg-priority { grid-area: priority; display: flex; align-items: center; gap: .4rem; font-size: var(--text-sm); color: var(--ink-2); align-self: center; }
  .priority-label { font-weight: 700; font-variant-caps: all-small-caps; letter-spacing: var(--caps-spacing); margin-right: .15rem; }
  .priority-number { font-family: var(--mono); }
  .reg-priority.is-highest { color: var(--ink); font-weight: 700; }
  .reg-priority.is-highest::before { content: ""; width: .7rem; height: .7rem; flex: none; background: var(--ink); border-radius: var(--radius-mark); }
  .priority-word { font-weight: 700; }
  .reg-stage { grid-area: stage; justify-self: end; align-self: center; }
  .reg-vendor { grid-area: vendor; display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; }
  .reg-vendor strong { font-size: var(--text-md); }
  .reg-vendor .muted, .conditions-hint, .reg-meta { font-size: var(--text-sm); }
  .reg-summary { grid-area: summary; display: flex; flex-wrap: wrap; gap: .1rem .6rem; align-items: baseline; }
  .reg-summary strong { font-weight: 700; }
  .register-row.is-review .reg-summary strong, .register-row.is-check .reg-summary strong { color: var(--amber); }
  .register-row.is-decision .reg-summary strong { color: var(--navy); }
  .register-row.is-rejected .reg-summary strong { color: var(--red); }
  .conditions-hint { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
  .reg-meta { grid-area: meta; }
  @media (min-width: 900px) {
    .register-head, .register-row { grid-template-columns: 6.5rem 7rem minmax(9rem, 1fr) 13.5rem minmax(15rem, 1.8fr) 10.5rem; grid-template-areas: none; gap: 1rem; }
    .register-head { display: grid; padding: .45rem 1rem; background: var(--band); border-bottom: 1px solid var(--rule); font-weight: 700; color: var(--ink); }
    .register-row > * { grid-area: auto; }
    .register-row { align-items: center; padding: .75rem 1rem; }
    .reg-stage { justify-self: start; }
    .priority-label { display: none; } /* the column header says it */
    .reg-summary, .reg-vendor { flex-direction: column; gap: 0; min-width: 0; }
  }
  .empty { background: var(--paper); border: 1px dashed var(--ink-2); border-radius: var(--radius-lg); padding: 1.5rem; max-width: 40rem; }
  .empty p { margin: 0 0 .75rem; } .empty p:last-child { margin: 0; }

  /* ---------- Stage line: mark and word ---------- */
  .stage-line { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; }
  .stage-line .step { display: flex; align-items: center; gap: .35rem; color: var(--ink-2); }
  .stage-line .step + .step::before { content: ""; width: 1.1rem; height: 1px; background: var(--ink-2); margin: 0 .35rem; }
  .stage-line .step.is-done + .step::before { background: var(--ink); }
  .step-mark { width: .7rem; height: .7rem; border: 1.5px solid var(--ink-2); border-radius: var(--radius-mark); background: var(--paper); flex: none; }
  .stage-line .is-done .step-mark { background: var(--ink); border-color: var(--ink); }
  .stage-line .is-current .step-mark { width: .85rem; height: .85rem; background: var(--navy); border-color: var(--navy); outline: 1.5px solid var(--navy); outline-offset: 2px; }
  .stage-line .is-current { color: var(--ink); font-weight: 700; }
  .stage-line.is-rejected .is-current .step-mark { background: linear-gradient(135deg, transparent 42%, var(--on-dark) 42% 58%, transparent 58%), var(--red); border-color: var(--red); outline-color: var(--red); }
  /* Escalated: out of the process, not rejected. An ink square with a bar across it, never red. */
  .stage-line.is-escalated .is-current .step-mark { background: linear-gradient(0deg, transparent 42%, var(--on-dark) 42% 58%, transparent 58%), var(--ink); border-color: var(--ink); outline-color: var(--ink); }
  .stage-line-compact .step:not(.is-current) .step-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .stage-line-compact .step + .step::before { width: .6rem; margin: 0 .2rem; }

  /* ---------- VTR page ---------- */
  .crumb { margin: 0 0 .75rem; }
  .crumb a { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; text-decoration: none; padding: .35rem .1rem; }
  .crumb a:hover span { text-decoration: underline; }

  .report-head { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: clip; padding: 0 var(--block-pad) var(--block-pad); position: relative; }
  .form-id { position: absolute; top: .35rem; right: var(--block-pad); margin: 0; }
  .form-number { display: inline-block; font-family: var(--mono); font-size: var(--text-sm); font-weight: 700; padding: 0 .4rem; border: 1px solid var(--rule); border-radius: var(--radius-sm); color: var(--ink); background: var(--paper); }
  .form-status, .title-sep, .report-head .research-errors { display: none; }
  .report-head h1 { display: grid; gap: .6rem; }
  .form-title { padding-right: 7rem; }
  .vendor-name { font-size: var(--text-xl); line-height: 1.1; }
  .form-note { margin: .4rem 0 0; font-size: var(--text-sm); color: var(--ink-2); }
  .report-head .warning { margin: .75rem 0 0; }
  .status-block .ai-contradiction { margin: 0 0 .75rem; max-width: 70ch; }
  .sources .unreadable { margin: 0; padding-left: 1.25rem; }
  @media (min-width: 720px) { .vendor-name { font-size: var(--text-2xl); } }

  .status-block { background: var(--paper); border: 1px solid var(--rule); border-top: 0; padding: 0 var(--block-pad) var(--block-pad); display: grid; gap: .8rem; justify-items: start; }
  .block-label { width: calc(100% + 2 * var(--block-pad)); }
  .status-block .stage-line { width: 100%; max-width: 40rem; }
  .status-block .stage-line .step + .step { flex: 1; }
  .status-block .stage-line .step + .step::before { flex: 1; min-width: .5rem; width: auto; }
  /* The line of steps needs about 38rem; narrower than that (a phone, a landscape phone, a split screen) the steps sit
     in equal columns, measured on the status block itself so no window width can push the page sideways. */
  .status-block { container: status / inline-size; }
  @container status (max-width: 40rem) {
    .status-block .stage-line { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
    .status-block .stage-line .step { flex-direction: column; align-items: flex-start; gap: .3rem; min-width: 0; }
    .status-block .stage-line .step + .step::before { display: none; }
    .status-block .stage-line .step-label { font-size: var(--text-sm); }
  }
  /* On a phone even one row of columns is too tight for the step words: rows of three. */
  @container status (max-width: 34rem) {
    .status-block .stage-line { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: .6rem; }
  }
  .status-line { margin: 0; font-size: var(--text-md); max-width: 60ch; }
  .status-block.is-review .status-line strong, .status-block.is-check .status-line strong { color: var(--amber); }
  .status-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0; }
  .status-block.is-rejected .decision-outcome strong { color: var(--red); }
  .status-block.is-escalated .status-line strong { color: var(--ink); }
  .decision-outcome strong { font-size: var(--text-lg); line-height: 1.25; }
  .decision-outcome .muted { display: block; font-size: var(--text-sm); }
  .conditions { margin: 0; padding: 0; list-style: none; counter-reset: cond; border: 1px solid var(--hairline); border-radius: var(--radius); width: 100%; }
  .conditions li { counter-increment: cond; display: grid; grid-template-columns: 2rem 1fr; padding: .5rem .75rem .5rem 0; border-top: 1px solid var(--hairline); }
  .conditions li:first-child { border-top: 0; }
  .conditions li::before { content: counter(cond); font-family: var(--mono); font-size: var(--text-sm); color: var(--ink-2); text-align: center; padding-top: .1rem; }
  .status-block .button.primary { min-width: 12rem; }

  /* The review agenda: open items needing a closer look, each a word for why, before the worksheet. */
  .agenda, .requester-unknowns { width: 100%; max-width: 46rem; display: grid; gap: .4rem; }
  .agenda-heading, .requester-unknowns h3 { display: flex; align-items: center; gap: .5rem; margin: 0; font-size: var(--text-base); }
  .agenda-heading .count, .requester-unknowns .count { font-size: var(--text-xs); font-weight: 700; min-width: 1.4rem; padding: 0 .3rem; text-align: center; border-radius: var(--radius-sm); background: var(--amber-tint); color: var(--amber); border: 1px solid var(--amber-edge); }
  .agenda-list, .requester-unknowns ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--paper); }
  .agenda-item { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: .1rem .6rem; align-items: baseline; padding: .45rem .7rem; border-top: 1px solid var(--hairline); font-size: var(--text-sm); }
  .agenda-item:first-child { border-top: 0; }
  .agenda-section { font-weight: 700; font-variant-caps: all-small-caps; letter-spacing: var(--caps-spacing); color: var(--ink-2); }
  .agenda-title { grid-column: 2; min-width: 0; display: flex; align-items: baseline; gap: .5rem; }
  .agenda-question { font-weight: 600; }
  .agenda-answer { grid-column: 2; font-weight: 800; letter-spacing: .02em; }
  .agenda-why { grid-column: 2; display: inline-flex; align-items: start; gap: .4rem; color: var(--amber); font-weight: 600; }
  .agenda-why::before, .requester-unknowns .mark-diamond { content: ""; width: .45rem; height: .45rem; flex: none; margin-top: .45em; border: 1.5px solid var(--amber); transform: rotate(45deg) scale(.9); }
  .agenda-note { margin: 0; font-size: var(--text-sm); }
  /* The questions the requester answered "I don't know": the agenda's list, one diamond per gap. */
  .requester-unknowns li { display: flex; align-items: start; gap: .4rem; padding: .45rem .7rem; border-top: 1px solid var(--hairline); font-size: var(--text-sm); font-weight: 600; }
  .requester-unknowns li:first-child { border-top: 0; }
  .requester-unknowns .field-note { margin: 0; }

  /* Questions for the vendor: numbered, in a hairline list like the agenda, with a copy button for an email. */
  .vendor-questions { width: 100%; max-width: 46rem; display: grid; gap: .4rem; }
  .vq-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hairline); border-radius: var(--radius); background: var(--paper); }
  .vq-item { display: flex; align-items: baseline; gap: .6rem; padding: .45rem .7rem; border-top: 1px solid var(--hairline); font-size: var(--text-sm); }
  .vq-item:first-child { border-top: 0; }
  .vq-text a { font-weight: 600; }
  .q-tag { flex: none; display: inline-block; font-family: var(--mono); font-size: var(--text-xs); font-weight: 700; padding: 0 .35rem; border: 1px solid var(--navy); border-radius: var(--radius-sm); color: var(--navy); background: var(--navy-tint); text-decoration: none; line-height: 1.5; }
  .vq-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; font-size: var(--text-sm); }
  .vq-source { width: 100%; min-height: 8rem; font: inherit; font-size: var(--text-sm); }
  .vq-none, .vq-resolved { margin: 0; font-size: var(--text-sm); }
  @media (min-width: 720px) {
    .agenda-item { grid-template-columns: 2.25rem minmax(0, 1fr) auto; }
    .agenda-answer { grid-column: 3; grid-row: 1; justify-self: end; }
    .agenda-why { grid-column: 2 / -1; }
  }
  .how-to { margin: 0; padding-left: 1.25rem; display: grid; gap: .2rem; max-width: 60ch; }
  .reviewers, .status-block > .muted { margin: 0; font-size: var(--text-sm); max-width: 70ch; }
  .form details > .muted { margin: 0; font-size: var(--text-sm); }

  .tools { display: flex; flex-wrap: wrap; gap: .5rem; }
  .tools form { display: inline; }
  .tools-inline { display: none; }
  .tools-menu { width: 100%; border-top: 1px solid var(--hairline); padding-top: .6rem; }
  .tools-menu > summary { color: var(--ink-2); padding: .25rem 0; }
  .tools-menu[open] > summary { margin-bottom: .6rem; }
  @media (min-width: 720px) {
    .tools-menu { display: none; }
    .tools-inline { display: flex; width: 100%; border-top: 1px solid var(--hairline); padding-top: .8rem; }
  }

  .section-strip {
    position: sticky; top: 0; z-index: 10; display: flex; overflow-x: auto; background: var(--paper);
    border: 1px solid var(--rule); border-top-width: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); margin: 0 0 var(--block-gap); min-height: var(--strip-h); scrollbar-width: none;
  }
  .section-strip::-webkit-scrollbar { display: none; }
  .strip-link { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .35rem .75rem; color: var(--ink); text-decoration: none; border-left: 1px solid var(--hairline); }
  .strip-link:first-child { border-left: 0; }
  .strip-link:hover { background: var(--band-soft); }
  .strip-letter { font-weight: 800; font-size: var(--text-md); }
  .strip-name { display: none; color: var(--ink-2); font-size: var(--text-sm); }
  .strip-count { background: var(--amber-tint); color: var(--amber); border: 1px solid var(--amber-edge); }
  @media (min-width: 720px) { .strip-name { display: inline; } }

  .progress { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: .8rem var(--block-pad); margin: 0 0 var(--block-gap); }
  .progress h2 { margin: 0 0 .4rem; }
  .progress li { padding: .2rem 0; }

  /* ---------- Worksheet sections as form blocks ---------- */
  .report-section, .unfinished-drafts { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: clip; padding: 0 var(--block-pad) 1rem; margin: 0 0 var(--block-gap); }
  .report-section > h2 { margin-top: 0; margin-bottom: .25rem; font-variant-caps: normal; letter-spacing: -.01em; font-size: var(--text-md); }
  .report-section > h2 + .muted { margin: .6rem 0 .25rem; font-size: var(--text-sm); }
  .report-section h3 { margin-top: 1rem; }

  .fields { grid-template-columns: 1fr; gap: 0; margin: 0; }
  .fields dt { font-weight: 700; color: var(--ink-2); padding: .6rem 0 0; border-top: 1px solid var(--hairline); }
  .fields dt:first-child { border-top: 0; }
  .fields dd { padding: .1rem 0 .6rem; overflow-wrap: anywhere; }
  .fields dd p { margin: 0 0 .4rem; }
  @media (min-width: 720px) {
    .fields { grid-template-columns: 15rem 1fr; }
    .fields dt, .fields dd { padding: .6rem 0; border-top: 1px solid var(--hairline); }
    .fields dt { padding-right: 1rem; }
    .fields dt:first-child, .fields dt:first-child + dd { border-top: 0; }
  }
  .checklist { padding: 0; margin: 0 0 .5rem; display: grid; gap: .35rem; }
  .checklist li { display: flex; align-items: center; gap: .55rem; }
  .print-only { display: none; }
  .check-box { width: .9rem; height: .9rem; border: 1.5px solid var(--ink-2); border-radius: var(--radius-mark); background: var(--paper); flex: none; }
  .check-box.is-checked {
    background: linear-gradient(45deg, transparent 44%, var(--on-dark) 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, var(--on-dark) 44% 56%, transparent 56%), var(--ink);
    border-color: var(--ink);
  }

  .answers { margin: 0; }
  /* A sub-heading within a section's answers, such as the supplemental checks after the standard eleven. */
  .answer-group { margin: 1rem 0 .25rem; padding-top: .75rem; border-top: 1px solid var(--rule); font-size: var(--text-base); font-variant-caps: all-small-caps; letter-spacing: var(--caps-spacing); color: var(--ink-2); }
  .answer { padding: .65rem 0; border-top: 1px solid var(--hairline); }
  .answer:first-child { border-top: 0; }
  .answer-line { display: grid; grid-template-columns: 1fr; gap: .25rem .75rem; align-items: baseline; }
  .answer-line .q { font-weight: 600; }
  .answer-result { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; }
  .answer-line .note { grid-column: 1 / -1; font-size: var(--text-sm); }
  @media (min-width: 720px) {
    .answer-line { grid-template-columns: minmax(0, 1fr) auto; }
    .answer-result { justify-content: flex-end; }
    #section-d .answer-line { grid-template-columns: minmax(12rem, 20rem) 1fr; }
    #section-d .answer-result { justify-content: flex-start; }
  }
  .value { font-weight: 800; letter-spacing: .02em; }
  .basis { grid-column: 1 / -1; font-size: var(--text-sm); color: var(--ink-2); max-width: 75ch; }
  .contradiction {
    grid-column: 1 / -1; justify-self: start; font-size: var(--text-sm); font-weight: 600; color: var(--red);
    background: var(--red-tint); border: 1px solid var(--red); border-radius: var(--radius-sm); padding: .15rem .5rem;
  }
  .finding-cause { font-weight: 600; max-width: 75ch; }
  .evidence blockquote.considered { border-left-style: dashed; }
  .given { margin: .25rem 0 0; padding-left: 1.25rem; font-size: var(--text-sm); }
  .set-aside { font-size: var(--text-sm); padding-left: 1.25rem; }
  .activities { list-style: none; margin: 0; padding: 0; max-height: min(32rem, 70vh); overflow-y: auto; overscroll-behavior: contain; }
  .activity { display: grid; grid-template-columns: 8.5rem 1fr; gap: .75rem; padding: .45rem 0; border-top: 1px solid var(--hairline); font-size: var(--text-sm); }
  .activity:first-child { border-top: 0; }
  .activity time { color: var(--ink-2); font-family: var(--mono); }
  @media (max-width: 559px) { .activity { grid-template-columns: 1fr; gap: .1rem; } }
  .recommendation-draft { border: 1px solid var(--hairline); background: var(--band-soft); border-radius: var(--radius); padding: .75rem 1rem; margin: 0 0 1rem; max-width: 75ch; }
  .recommendation-draft h3 { font-size: var(--text-md); margin: 0 0 .25rem; }
  .recommendation-draft ul { margin: .25rem 0 .75rem; }
  .recommendation-draft .draft-label { font-weight: 700; font-variant-caps: all-small-caps; letter-spacing: var(--caps-spacing); margin: .5rem 0 0; }
  .recommendation-summary { max-width: 75ch; margin: 0 0 .75rem; }
  .worksheet-downloads { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1rem; max-width: 46rem; }
  .reopen-form { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; max-width: 46rem; }
  .reopen-form input[type=text] { flex: 1 1 18rem; height: var(--control-h-sm); min-height: 0; }
  .reopen-form input[type=submit].button { height: var(--control-h-sm); min-height: 0; }
  .reopen-form input[type=url] { flex: 1 1 18rem; height: var(--control-h-sm); min-height: 0; }
  .soc2-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; max-width: 46rem; }
  .soc2-actions .reopen-form { margin-top: .5rem; width: 100%; }
  .soc2-access { max-width: 46rem; }
  .set-aside li { overflow-wrap: anywhere; margin: .2rem 0; }
  .note { color: var(--ink-2); }

  /* One compact line under each answer: review controls, evidence, exception. */
  .confirm-bar { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: .75rem 0; }
  .confirm-vendor { margin: .5rem 0; }
  .answer-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin-top: .45rem; font-size: var(--text-sm); }
  .answer-tools:empty { display: none; }
  .review-form { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }
  .review-form select { height: var(--control-h-sm); min-height: 0; padding: 0 2rem 0 .6rem; font-size: var(--text-sm); max-width: 16rem; }
  .review-form input[type=submit].button { height: var(--control-h-sm); min-height: 0; padding: 0 .9rem; font-size: var(--text-sm); }
  .review-form input[type=text] { height: var(--control-h-sm); min-height: 0; }
  .review-form input[type=text] { flex: 1 1 18rem; min-width: 0; min-height: var(--control-h-sm); padding: .25rem .5rem; font-size: var(--text-sm); }
  .review-form:has(input[type=text]:not([hidden])) { flex: 1 1 100%; }
  .draft-exception { display: inline; margin: 0; }
  .draft-exception .button.link { font-size: var(--text-sm); }
  .draft-exception .button.link:disabled { opacity: 1; color: var(--ink-2); text-decoration: none; cursor: progress; }
  .exception-note { color: var(--ink-2); }
  .row-message { margin: .5rem 0 0; font-size: var(--text-sm); }
  .row-message p { margin: 0; }
  .row-message-action { margin: .5rem 0 0; }
  .row-note, .renewal-note { color: var(--navy); background: var(--navy-tint); border: 1px solid var(--navy); border-radius: var(--radius); padding: .4rem .7rem; }
  .report-head .renewal-note { margin: .75rem 0 0; max-width: 75ch; }

  /* Annual re-reviews VTR opened on its own: a navy notice for admins on the list, and a tag on the row for everyone. */
  .renewal-notice { background: var(--navy-tint); border: 1px solid var(--navy); border-radius: var(--radius); padding: .7rem 1rem; margin: 0 0 var(--block-gap); max-width: 75ch; }
  .renewal-notice h2 { margin: 0 0 .3rem; font-size: var(--text-base); }
  .renewal-notice ul { margin: 0; padding-left: 1.25rem; }
  .renewal-notice li { margin: .15rem 0; }
  .renewal-tag { font-size: var(--text-xs); font-weight: 600; color: var(--navy); background: var(--navy-tint); border: 1px solid var(--navy); border-radius: var(--radius-sm); padding: .1rem .45rem; width: fit-content; }
  #section-e > .row-message { margin: .75rem 0; }

  /* Items waiting on a reviewer stand apart from confident ones. */
  .answer.is-flagged { background: var(--amber-tint); margin: 0 calc(-1 * var(--block-pad)); padding-left: var(--block-pad); padding-right: var(--block-pad); border-top-color: var(--amber-edge); }
  .answer.is-flagged + .answer { border-top-color: var(--amber-edge); }
  .flag-label {
    display: inline-block; margin-left: .5rem; padding: 0 .4rem; vertical-align: .1em; font-size: var(--text-xs); font-weight: 700;
    color: var(--amber); border: 1px solid var(--amber-edge); border-radius: var(--radius-sm); background: var(--paper);
  }
  .answer:target { outline: 2px solid var(--navy); outline-offset: -2px; }
  @media (max-width: 479px) { .review-form select { flex: 1 1 auto; max-width: none; } }

  /* Badges: each author has its own mark as well as its colour, so they stay distinct without colour. */
  .badge { display: inline-flex; align-items: center; gap: .35rem; width: fit-content; font-size: var(--text-xs); font-weight: 600; padding: .1rem .45rem; border-radius: var(--radius-sm); border: 1px solid; }
  .badge::before { content: ""; width: .5rem; height: .5rem; flex: none; }
  .badge-jev { color: var(--green); border-color: var(--green-edge); background: var(--green-tint); }
  .badge-jev::before { background: var(--green); }
  .badge-review { color: var(--amber); border-color: var(--amber-edge); background: var(--amber-tint); }
  .badge-review::before { border: 1.5px solid var(--amber); transform: rotate(45deg) scale(.9); }
  .badge-human { color: var(--purple); border-color: var(--purple-edge); background: var(--purple-tint); }
  .badge-human::before { background: var(--purple); border-radius: 50%; }
  .badge-system { color: var(--ink-2); border-color: var(--hairline); background: var(--band-soft); }
  .badge-system::before { border: 1.5px solid var(--ink-2); }
  .badge-claude { color: var(--ink); border-color: var(--ink-2); background: var(--band-soft); }
  .badge-claude::before { background: var(--ink); clip-path: polygon(50% 0, 100% 100%, 0 100%); }

  /* Long evidence scrolls inside its panel instead of stretching the worksheet; print shows it all. */
  .evidence {
    margin-top: .5rem; padding: .6rem .8rem; background: var(--paper); border: 1px solid var(--hairline); border-radius: var(--radius);
    max-height: min(28rem, 60vh); overflow-y: auto; overscroll-behavior: contain;
  }
  .evidence-body > :first-child { margin-top: 0; } .evidence-body > :last-child { margin-bottom: 0; }
  .evidence blockquote { margin: .5rem 0; padding: .1rem 0 .1rem .9rem; border-left: 1px solid var(--ink-2); max-width: 75ch; }
  .evidence mark { background: var(--amber-tint); color: var(--ink); border-radius: var(--radius-mark); }
  .evidence footer { margin-top: .25rem; }
  .evidence footer, .evidence .muted, .history { font-size: var(--text-sm); }
  .history { color: var(--ink-2); }

  /* ---------- Decision ---------- */
  .decision-recap { border: 1px solid var(--hairline); border-radius: var(--radius); padding: .75rem 1rem; margin: 1rem 0; background: var(--band-soft); max-width: 46rem; }
  .decision-recap h3 { margin: 0 0 .5rem; }
  .recap { display: grid; grid-template-columns: 1fr; gap: .15rem 1rem; margin: 0; font-size: var(--text-sm); }
  .recap dt { font-weight: 700; color: var(--ink-2); font-variant-caps: all-small-caps; letter-spacing: var(--caps-spacing); margin-top: .4rem; }
  .recap dd { margin: 0; }
  @media (min-width: 720px) { .recap { grid-template-columns: 13rem 1fr; } .recap dt { margin-top: 0; } }

  .outcome-choices { display: grid; gap: .5rem; }
  .form label.choice {
    display: flex; align-items: flex-start; gap: .65rem; padding: .7rem .85rem; margin-top: .5rem;
    border: 1px solid var(--control-edge); border-radius: var(--radius); background: var(--paper); cursor: pointer;
    font-variant-caps: normal; letter-spacing: normal; color: var(--ink); font-weight: 400;
  }
  .form label.choice:hover { border-color: var(--ink); }
  .form label.choice:has(input:checked) { border-color: var(--navy); background: var(--navy-tint); }
  .form label.choice:has(input[value=rejected]:checked) { border-color: var(--red); background: var(--red-tint); }
  .choice input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; flex: none; }
  .choice > span { display: grid; gap: .1rem; }
  .choice .muted { font-size: var(--text-sm); }
  .confirm-step { border: 1px solid var(--navy); border-radius: var(--radius); background: var(--navy-tint); padding: .75rem 1rem; }
  .confirm-step p { margin: 0 0 .6rem; font-weight: 600; }
  .form .confirm-step .actions, .form > .button { justify-self: start; }

  /* ---------- Form controls ---------- */
  input[type=text], input[type=url], input[type=email], input[type=date], textarea, select {
    font: inherit; font-variant-caps: normal; letter-spacing: normal; color: var(--ink); background: var(--paper);
    border: 1px solid var(--control-edge); border-radius: var(--radius); padding: .5rem .6rem; min-height: var(--control-h); max-width: 100%;
  }
  /* Selects are drawn by us, not the browser: Safari's native select ignores height and padding, so it never
     lined up with the buttons beside it. The arrow is two gradient strokes in the control's own colour. */
  select {
    appearance: none; -webkit-appearance: none; padding-right: 2rem; line-height: 1.2; cursor: pointer;
    background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
    background-position: calc(100% - 1rem) 55%, calc(100% - .7rem) 55%;
    background-size: .3rem .3rem; background-repeat: no-repeat;
  }
  input:hover, textarea:hover, select:hover { border-color: var(--ink); }
  input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--navy); outline-offset: 0; border-color: var(--navy); }
  ::placeholder { color: var(--placeholder); opacity: 1; }

  .form { max-width: 46rem; gap: 1rem; }
  .form label, .form .checks > span { font-weight: 700; color: var(--ink-2); gap: .3rem; }
  .form label.check { font-variant-caps: normal; letter-spacing: 0; color: var(--ink); font-weight: 400; }
  /* The box is an inset outline, not the fieldset's border: browsers draw a <legend> inside the top border, so the
     grey band sat on the border line and the corner showed through (worst in Safari). */
  .form fieldset {
    border: 0; outline: 1px solid var(--rule); outline-offset: -1px; border-radius: var(--radius-lg); overflow: clip;
    background: var(--paper); padding: 0 var(--block-pad) var(--block-pad); margin: 0; min-width: 0;
  }
  .form legend { float: left; width: calc(100% + 2 * var(--block-pad)); margin: 0 calc(-1 * var(--block-pad)) .25rem; padding: .4rem var(--block-pad); background: var(--band); border-bottom: 1px solid var(--rule); font-weight: 700; color: var(--ink); }
  .form legend + * { clear: both; }
  .form fieldset > label, .form fieldset > .checks { margin-top: .75rem; }
  .form input[type=text], .form input[type=date], .form textarea, .form select { width: 100%; font-weight: 400; color: var(--ink); font-variant-caps: normal; letter-spacing: normal; }
  .form .checks { display: grid; gap: .35rem; }
  .form .field-note, .form .checks > .field-note, .intake-sheet .field-note, .requester-unknowns .field-note { display: block; font-size: var(--text-sm); font-weight: 400; color: var(--ink-2); font-variant-caps: normal; letter-spacing: normal; max-width: 60ch; }
  .form .kind-choices { gap: 0; }
  /* The vendor lookup under the website field: its button, a status line, and what it found. */
  .form .lookup { display: grid; gap: .35rem; justify-items: start; margin-top: .75rem; }
  .form .lookup-panel { justify-self: stretch; margin-top: .25rem; }
  .form .lookup-panel .warning { margin: 0 0 .5rem; }
  .form .lookup-panel .fields { margin: 0; font-size: var(--text-sm); }
  .form .prefill-note { margin-top: .25rem; }
  .provenance { display: block; margin-top: .15rem; font-size: var(--text-sm); color: var(--ink-2); }
  .form fieldset > .muted { margin: .5rem 0 0; font-size: var(--text-sm); }
  /* One worksheet row as a line of fields: a system's impact and access, or an integration's name, direction, data and auth. */
  .form .row-fields { display: grid; gap: .5rem; margin-top: .75rem; padding-top: .5rem; border-top: 1px solid var(--hairline); }
  .form .row-fields label { margin: 0; }
  .form .row-fields label.check { align-self: end; }
  .form .row-fields input[type=text], .form .row-fields select { font-weight: 400; }
  @media (min-width: 720px) {
    .form .impact-row { grid-template-columns: 1fr 9rem; }
    .form .integration-row { grid-template-columns: 1.2fr 1fr 1fr 1fr auto; align-items: end; }
  }
  /* Condition rows on the recommendation and decision forms: text, owner, date and a remove control per line. */
  .form .condition-rows > div { display: grid; gap: .25rem; }
  .form .condition-remove { align-self: end; justify-self: start; }
  @media (min-width: 720px) {
    .form .condition-row { grid-template-columns: 1.6fr 1fr 10rem auto; align-items: end; }
  }
  .form .condition-rows > .button { margin-top: .75rem; width: fit-content; justify-self: start; }
  .condition-list { counter-reset: cond; }
  .condition-list li::before { content: "C-" counter(cond); }
  .condition-list .condition-meta { grid-column: 2; display: block; font-size: var(--text-sm); }

  /* Evidence on file: one article per filed document, its facts as a field list, CUECs and answers as lists. */
  .evidence-doc { padding: .75rem 0; border-top: 1px solid var(--hairline); }
  .evidence-doc:first-of-type { border-top: 0; }
  .evidence-doc h3 { margin: 0 0 .25rem; }
  .evidence-doc h3 .muted { font-size: var(--text-sm); font-weight: 400; }
  .evidence-facts { margin: .5rem 0; }
  .evidence-label { margin: .75rem 0 .25rem; font-weight: 700; font-size: var(--text-sm); color: var(--ink-2); font-variant-caps: all-small-caps; letter-spacing: var(--caps-spacing); }
  .evidence-cuecs, .evidence-keys { margin: 0; padding-left: 1.25rem; font-size: var(--text-sm); }
  .evidence-passages { margin: .15rem 0 .5rem; padding-left: 1rem; color: var(--ink-2); max-width: 75ch; }
  .on-file { font-size: var(--text-sm); }
  .evidence-form { margin-top: 1rem; }

  .b-table { margin: .25rem 0 .5rem; }
  .b-table th[scope=row] { background: var(--paper); font-weight: 600; white-space: nowrap; }
  .b-table td, .b-table th { font-size: var(--text-sm); vertical-align: top; }
  @media (max-width: 719px) { .b-table th[scope=row] { white-space: normal; } .b-table td { min-width: 12rem; } }
  .form .kind-choices .choice { margin-top: .5rem; }
  .form details { display: grid; gap: 1rem; }
  .form details > summary { color: var(--navy); padding: .25rem 0; }
  .form > .button, .form > input[type=submit] { justify-self: start; }

  /* A single labelled field with its button, such as naming a new token. */
  .inline-form { display: grid; gap: .45rem; max-width: 46rem; }
  .inline-form label { font-weight: 700; color: var(--ink-2); font-variant-caps: all-small-caps; letter-spacing: var(--caps-spacing); }
  .inline-form input[type=text], .inline-form input[type=email] { width: 100%; }
  .inline-form input[type=submit] { justify-self: start; }
  @media (min-width: 720px) { .inline-form { grid-template-columns: 1fr auto; align-items: center; } .inline-form label, .inline-form .warning { grid-column: 1 / -1; } }

  .title-cell { display: inline-flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
  .title-cell .link, .title-form .link { font-size: var(--text-sm); }
  .title-form { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
  .title-form input[type=text] { height: var(--control-h-sm); min-height: 0; width: 14rem; max-width: 100%; }
  .title-form input[type=submit].button { height: var(--control-h-sm); min-height: 0; }

  /* ---------- Tables (users, tokens) ---------- */
  main table { width: 100%; border-collapse: collapse; background: var(--paper); border: 1px solid var(--rule); }
  main table:not(.table-wrap table) { border-radius: var(--radius-lg); }
  main table th { text-align: left; background: var(--band); font-weight: 700; border-bottom: 1px solid var(--rule); }
  main table th, main table td { padding: .55rem .75rem; border-bottom: 1px solid var(--hairline); vertical-align: middle; }
  main table form { display: inline; }
  .table-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius-lg); }
  .table-wrap table { border: 0; }

  .sources ol { padding-left: 1.5rem; max-height: min(32rem, 70vh); overflow-y: auto; overscroll-behavior: contain; }
  .sources li { overflow-wrap: anywhere; }

  .signin { max-width: 26rem; margin: 12vh auto 0; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: 1.5rem; text-align: left; }
  .signin h1 { font-size: var(--text-lg); margin-bottom: .5rem; }

  pre { background: var(--band-soft); border: 1px solid var(--hairline); border-radius: var(--radius); padding: .75rem; overflow-x: auto; }
  code { font-family: var(--mono); font-size: var(--text-sm); overflow-wrap: anywhere; }

  /* ---------- Guided intake: one step per page on a single sheet ---------- */
  .intake-sheet { max-width: 46rem; margin: 0 auto; background: var(--paper); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: clip; padding: 0 var(--block-pad) var(--block-pad); }
  .intake-sheet > .block-label { max-width: none; }
  .intake-progress { margin: .75rem 0 0; flex-wrap: wrap; row-gap: .35rem; }
  .intake-body { view-transition-name: intake-step; }
  .intake-body h1 { font-size: var(--text-xl); margin: 1rem 0 .5rem; }
  .intake-body h1:focus { outline: none; }
  .intake-body > .errors, .intake-body > .warning { margin: 0 0 .75rem; }
  .intake-sheet .lookup-status:empty { display: none; }
  .intake-form { gap: 0; }
  .intake-field { padding: .75rem 0; border-top: 1px solid var(--hairline); animation: intake-in var(--motion-step) var(--ease-out) both; }
  .intake-field:first-of-type { border-top: 0; }
  .intake-field:nth-of-type(2) { animation-delay: calc(1 * var(--motion-stagger)); }
  .intake-field:nth-of-type(3) { animation-delay: calc(2 * var(--motion-stagger)); }
  .intake-field:nth-of-type(4) { animation-delay: calc(3 * var(--motion-stagger)); }
  .intake-field:nth-of-type(5) { animation-delay: calc(4 * var(--motion-stagger)); }
  .intake-field:nth-of-type(6) { animation-delay: calc(5 * var(--motion-stagger)); }
  .intake-field:nth-of-type(n+7) { animation-delay: calc(6 * var(--motion-stagger)); }
  /* No grid gap: Chrome keeps a closed <details>' content box, so a gap would leave a blank line under the summary. */
  .form .intake-help { gap: 0; margin-top: .35rem; }
  .intake-help p { margin: .25rem 0 0; font-size: var(--text-sm); color: var(--ink-2); max-width: 60ch; }
  .intake-unknown { font-size: var(--text-sm); margin-top: .35rem; }
  /* Choice and check questions are fieldsets for screen readers, but not ruled blocks: only the row groups
     (systems, integrations) are. Undo exactly what .form fieldset and .form legend draw, so the legend reads as a field label. */
  .intake-form fieldset.checks { outline: 0; border-radius: 0; overflow: visible; background: none; padding: 0; }
  .intake-form fieldset.checks > legend { float: none; width: auto; margin: 0 0 .35rem; padding: 0; background: none; border: 0; color: var(--ink-2); }
  .intake-form fieldset > p.field-note { margin: .25rem 0 0; }
  .prefill-note.is-arriving { animation: intake-in var(--motion-step) var(--ease-out) both; }
  .intake-actions { display: flex; gap: .75rem; justify-content: space-between; align-items: center; margin-top: 1rem; }
  .intake-actions .primary { margin-left: auto; }
  .intake-actions form, .unfinished-drafts form { display: inline-flex; margin: 0; }
  .intake-summary { padding: .25rem 0 .75rem; border-bottom: 1px solid var(--hairline); }
  .intake-summary h2 { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: .75rem 0 .5rem; font-size: var(--text-md); }
  .intake-summary dl { display: grid; grid-template-columns: 15rem 1fr; gap: .35rem 1rem; margin: 0; }
  .intake-summary dt { font-weight: 700; color: var(--ink-2); }
  .intake-summary dd { margin: 0; overflow-wrap: anywhere; }
  /* A requester's own unfinished drafts, above the VTR list's tabs. */
  .unfinished-drafts ul { list-style: none; margin: 0; padding: 0; }
  .unfinished-drafts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .75rem; padding: .6rem 0; border-top: 1px solid var(--hairline); }
  .unfinished-drafts li:first-child { border-top: 0; }
  .unfinished-drafts li .muted { font-size: var(--text-sm); flex: 1 1 16rem; }
  @media (max-width: 719px) {
    .intake-actions { flex-direction: column-reverse; align-items: stretch; }
    .intake-actions .primary { margin-left: 0; }
    .intake-actions .button, .intake-actions form, .intake-actions input, .intake-actions button { width: 100%; }
    .intake-summary dl { grid-template-columns: 1fr; gap: .1rem; }
    .intake-summary dd + dt { margin-top: .4rem; }
  }

  @keyframes intake-in { from { opacity: 0; transform: translateY(6px); } }
  @keyframes intake-out { to { opacity: 0; transform: translateY(-6px); } }
  /* The leaving step goes faster than the arriving one, so the next question is never waiting on the last. */
  ::view-transition-old(intake-step) { animation: intake-out var(--motion-fast) var(--ease-out) both; }
  ::view-transition-new(intake-step) { animation: intake-in var(--motion-step) var(--ease-out) both; }
  html[data-turbo-visit-direction="back"]::view-transition-old(intake-step) { animation-name: intake-in; animation-direction: reverse; }

  @media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; animation: none !important; }
    ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  }
}
