/* The typefaces (fonts/README.md): Geist Sans for text, Newsreader for page headings, Geist Mono for hashes and ids,
   each under the SIL Open Font License 1.1 and served from this origin only. Geist Sans ships a Latin subset only. */
@font-face { font-family: 'Geist Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/geist-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/geist-sans-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(/static/fonts/geist-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/geist-mono-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/geist-mono-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/geist-mono-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Geist Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/geist-mono-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/newsreader-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 400; font-display: swap; src: url(/static/fonts/newsreader-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/newsreader-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 500; font-display: swap; src: url(/static/fonts/newsreader-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

/* The instance's pages (web.js, pages.js), in the design of design/mockups/r8/attesio-client-portal.html: a dark
   sidebar with the lockup, the client and the TEST badge; a light grey page; white cards with a hairline border and
   14 px corners; Newsreader page headings. Every status is a filled rounded chip with its word (red for Strong and
   critical, Anthony's decision of 28 October 2026), never colour alone. Buttons and menu links are at least 40 px
   tall. A phone stacks the menu and the columns; a wide table scrolls inside its own box. Served from this origin only. */
:root {
  --page: #F4F5F6; --card: #FFFFFF; --wash: #FAFAFB; --ink: #15171A; --ink-soft: #40454C; --sub: #5C6169; --line: #E3E5E8; --line2: #EEF0F2;
  --field: #D3D6DA; --field-hover: #9EA3A9; --link-hover: #94600F; --accent: #D9A04B; --focus: #2563EB; --hover: #F4F5F6;
  --strong: #A8251B; --strong-wash: #FDEEEC; --strong-line: #EBC3BE; --possible: #8A4B08; --possible-wash: #FDF3E3; --warn-ink: #7A4407;
  --ok: #1B6B43; --ok-wash: #E9F6EF; --info: #1E4F78; --info-wash: #E8F0F7; --muted: #40454C; --muted-wash: #EEF0F2; --badge: #C23A2E;
  --side: #15171A; --side-on: #25282D; --side-box: #1D2024; --side-line: #2C2F34; --side-ink: #E9EAEC; --side-sub: #C4C7CB; --side-hi: #FFFFFF;
  --side-ok: #8FD3AE; --side-warn: #F2C77A; --test: #F2C77A; --test-wash: #2B2416;
  --sans: 'Geist Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --serif: 'Newsreader', Georgia, serif;
  --mono: 'Geist Mono', ui-monospace, Menlo, Consolas, monospace;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font: 400 14px/1.5 var(--sans); color: var(--ink); background: var(--page); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
.skip { position: absolute; left: -9999px; top: 0; padding: 10px 14px; background: var(--card); color: var(--ink); z-index: 40; border-radius: 10px; }
.skip:focus { left: 16px; top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* The shell: the dark sidebar beside the page. */
.shell { min-height: 100vh; display: flex; }
.side { width: 248px; flex: none; background: var(--side); color: var(--side-ink); padding: 20px 14px; display: flex; flex-direction: column; gap: 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side a { color: var(--side-ink); }
.side-head { padding: 0 10px; display: flex; flex-direction: column; gap: 14px; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lockup { display: inline-flex; align-items: center; min-height: 40px; color: var(--side-hi); }
.lockup svg { height: 26px; width: auto; display: block; }
.side .lockup:hover { color: var(--side-hi); }
.menu-btn { width: 44px; min-height: 44px; padding: 0; border: 1px solid var(--side-line); border-radius: 10px; background: transparent; color: var(--side-ink); }
.menu-btn:hover { background: var(--side-on); border-color: var(--side-line); color: var(--side-hi); }
.firm { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px; border: 1px solid var(--side-line); border-radius: 12px; }
.firm-name { font-weight: 500; color: var(--side-ink); overflow-wrap: anywhere; }
.firm-sub { font-size: 12.5px; color: var(--side-sub); }
.navwrap { display: flex; flex-direction: column; gap: 10px; flex: 1; }
.nav { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-group { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--side-sub); font-weight: 600; padding: 0 12px 4px; }
.nav a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--side-sub); text-decoration: none; }
.nav a:hover { background: var(--side-on); color: var(--side-hi); }
.nav a[aria-current] { background: var(--side-on); color: var(--side-hi); font-weight: 500; }
.nav a[aria-current]::before { content: ''; position: absolute; left: 0; top: 13px; bottom: 13px; width: 3px; border-radius: 2px; background: var(--accent); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.lists-box { padding: 12px; border-radius: 12px; background: var(--side-box); display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--side-sub); }
.lists-box strong { color: var(--side-ok); font-weight: 500; }
.me { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.me-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.me-name { color: var(--side-hi); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-role { color: var(--side-sub); font-size: 12px; }
.me form button { min-height: 40px; padding: 0 12px; font-size: 12.5px; background: transparent; color: var(--side-ink); border-color: var(--side-line); }
.me form button:hover { background: var(--side-on); color: var(--side-hi); border-color: var(--side-line); }
.me form button.icon-btn { width: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.av { width: 34px; height: 34px; border-radius: 50%; background: var(--muted-wash); color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; flex: none; }
.side .av { background: var(--side-on); color: var(--side-hi); }
.av-co { border-radius: 9px; background: var(--info-wash); color: var(--info); }

/* The page: an eyebrow, a serif heading, then cards. */
main { max-width: 1360px; width: 100%; margin: 0 auto; padding: 32px 32px 56px; display: flex; flex-direction: column; gap: 22px; }
main:focus { outline: none; }
main > * { margin-top: 0; margin-bottom: 0; }
.signed-out main { max-width: 1040px; }
.back { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; color: var(--sub); text-decoration: none; align-self: flex-start; }
.back:hover { color: var(--ink); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.page-head-top { align-items: flex-start; }
.page-aside { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
h1 { margin: 4px 0 0; font: 400 40px/1.1 var(--serif); letter-spacing: -0.01em; overflow-wrap: anywhere; }
h2 { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.35; }
h3 { margin: 0; font-size: 14px; font-weight: 600; }
p { margin: 0; }
.kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--sub); font-weight: 600; margin: 0; }
.page-lead { margin: 10px 0 0; color: var(--sub); font-size: 15px; max-width: 720px; }
.lead { font-size: 15px; max-width: 72ch; }
.note, .hint, .sub { color: var(--sub); }
.note { max-width: 80ch; }
.hint, .sub { font-size: 12.5px; }
footer { max-width: 1360px; width: 100%; margin: 0 auto; padding: 0 32px 32px; color: var(--sub); font-size: 12.5px; }
.zone-line { margin-top: 6px; }
.th-note { display: block; font-weight: 400; font-size: 11px; color: var(--sub); white-space: nowrap; }
.device-zone { margin: 0; }
.lockup-plain { color: var(--ink); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.card > :first-child { border-top-left-radius: 14px; border-top-right-radius: 14px; }
.card-pad { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.card-foot { padding: 12px 16px; border-top: 1px solid var(--line2); color: var(--sub); font-size: 12.5px; }
.card-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.stack-gap { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 22px; align-items: start; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 22px; align-items: start; }
/* R11: the decision column stays in view in its column at 1280 px and wider only (below, normal flow, never covering
   anything), under the sticky head (--head-h, set by app.js from its height; 10rem without script), and scrolls in
   itself when taller than the window, so its buttons are always reachable. */
.two-col > aside { position: static; }
@media (min-width: 1280px) {
  .two-col > aside.decision { position: sticky; top: var(--head-h, 10rem); max-height: calc(100vh - var(--head-h, 10rem) - 16px); overflow-y: auto; }
}
/* R11: a page's head (the name, its band, a page's search) stays at the top while the page scrolls; links into the
   page land below it. */
.sticky-head { position: sticky; top: 0; z-index: 6; background: var(--page); padding: 12px 0 14px; display: flex; flex-direction: column; gap: 14px;
  box-shadow: 0 1px 0 var(--line); }
main [id] { scroll-margin-top: calc(var(--head-h, 10rem) + 8px); }
/* R11: a card that folds: its head is the summary. */
details.fold > summary.card-head { list-style: none; }
details.fold:not([open]) > summary.card-head { border-bottom: 0; }
details.fold.card-pad > summary { min-height: 0; }
/* R11, item 1: a figure's whole card is its link, with a visible focus ring. */
dl.kpis > div { position: relative; }
dl.kpis a.card-link::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }
dl.kpis a.card-link:focus-visible { outline: none; }
dl.kpis a.card-link:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
dl.kpis > div:hover { border-color: var(--field-hover); }
.narrow { max-width: 32rem; }

/* Figures: a card each, as the mockup's tiles. */
dl.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; margin: 0; }
dl.kpis > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
dl.kpis dt { color: var(--sub); font-size: 12.5px; }
dl.kpis dt a { color: var(--sub); }
dl.kpis dt a:hover { color: var(--ink); }
dl.kpis dd { margin: 0; }
dl.kpis dd.figure { font-size: 38px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
dl.kpis dd.figure .unit { font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--sub); margin-left: 4px; }
dl.kpis dd.state-line { margin-top: 4px; }
dl.kpis dd.sub { margin-top: 0; }
dl.facts { display: grid; grid-template-columns: minmax(140px, 200px) minmax(0, 1fr); gap: 10px 20px; margin: 0; }
dl.facts div { display: contents; }
dl.facts dt { color: var(--sub); font-size: 13px; }
dl.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* The overview: the queue, the next steps and the watchlists. */
.cols { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.c2 { flex: 2 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.c1 { flex: 1 1 330px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
ul.queue { list-style: none; margin: 0; padding: 0; }
ul.queue a { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; min-height: 64px; padding: 12px 20px; border-top: 1px solid var(--line2); text-decoration: none; color: var(--ink); }
ul.queue li:first-child a { border-top: 0; }
ul.queue a:hover { background: var(--wash); color: var(--ink); }
.q-who { display: flex; gap: 12px; align-items: center; flex: 1 1 220px; min-width: 0; }
.q-name { display: block; font-weight: 500; overflow-wrap: anywhere; }
.q-list { flex: 1 1 220px; min-width: 0; }
.q-list > span { display: block; }
.q-band { margin-left: auto; }
.start { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.start a { display: flex; justify-content: space-between; gap: 12px; align-items: center; min-height: 58px; padding: 8px 0; border-bottom: 1px solid var(--line2);
  text-decoration: none; color: inherit; }
.start li:last-child a { border-bottom: 0; }
.start a:hover .start-title { text-decoration: underline; text-underline-offset: 3px; }
.start a:hover { color: inherit; }
.start-title { display: block; font-weight: 500; }
.watch { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 13px; }
.watch dt { color: var(--sub); }
.watch dd { margin: 0; }
.demo { border: 2px dashed #C9CDD2; border-radius: 14px; background: var(--card); padding: 20px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }

/* Tables: a header row on a wash, hairlines between rows, numbers right-aligned; the box scrolls, never the page. Columns
   size to their content: times, ids, statuses, scores, counts and buttons never wrap (.nowrap, .num); only long free
   text does (.wrap). A wide table scrolls sideways in its own box, with a scrollbar that shows, by touch on a phone;
   in a .sticky-first table the first column (the subject's name) stays in view while it scrolls. */
/* R11, item 3: the scrollbar always shows, 14 px, dark on grey; a shadow on each edge that has more beyond it (the
   cover gradients move with the content, the shadows stay with the box). Firefox reads scrollbar-width and
   scrollbar-color; Chrome and Safari the ::-webkit-scrollbar rules, which those two properties would override. */
.pane { overflow: auto; max-height: min(72vh, 46rem); -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
  background: linear-gradient(to right, var(--card) 40%, rgba(255, 255, 255, 0)) left center / 32px 100% no-repeat local,
    linear-gradient(to left, var(--card) 40%, rgba(255, 255, 255, 0)) right center / 32px 100% no-repeat local,
    linear-gradient(to right, rgba(21, 23, 26, .18), rgba(21, 23, 26, 0)) left center / 14px 100% no-repeat scroll,
    linear-gradient(to left, rgba(21, 23, 26, .18), rgba(21, 23, 26, 0)) right center / 14px 100% no-repeat scroll, var(--card); }
@supports not selector(::-webkit-scrollbar) { .pane { scrollbar-width: auto; scrollbar-color: var(--ink-soft) var(--line); } }
.pane::-webkit-scrollbar { height: 14px; width: 14px; }
.pane::-webkit-scrollbar-track { background: var(--line); }
.pane::-webkit-scrollbar-thumb { background: var(--ink-soft); border-radius: 7px; border: 3px solid var(--line); }
.pane::-webkit-scrollbar-corner { background: var(--line); }
.pane-compact { max-height: none; }
table { border-collapse: separate; border-spacing: 0; width: 100%; }
td.wrap { white-space: normal; min-width: 16rem; }
time { white-space: nowrap; }
.sticky-first td:first-child, .sticky-first th:first-child { position: sticky; left: 0; background: var(--card); }
.sticky-first th:first-child { z-index: 2; background: var(--wash); }
.sticky-first td:first-child { z-index: 1; box-shadow: inset -1px 0 0 var(--line2); min-width: 9rem; }
.sticky-first tbody tr:hover td:first-child { background: var(--wash); }
caption { text-align: left; padding: 12px 16px; color: var(--sub); font-size: 12.5px; caption-side: bottom; border-top: 1px solid var(--line2); }
/* Column headers 15% larger than R9's 12 px, and bold (the R10 amendment); still never wrapping, as R9 set. */
th { position: sticky; top: 0; z-index: 1; text-align: left; font-weight: 700; font-size: 13.8px; color: var(--sub); padding: 11px 16px;
  border-bottom: 1px solid var(--line); background: var(--wash); vertical-align: bottom; white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--wash); }
tr[aria-current] td { background: var(--wash); }
tr[aria-current] td:first-child { box-shadow: inset 3px 0 0 var(--ink); }
tr.row-critical td { background: var(--strong-wash); }
tr.row-critical td:first-child { box-shadow: inset 3px 0 0 var(--strong); }
tr.row-warning td:first-child { box-shadow: inset 3px 0 0 var(--possible); }
.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.list-cell { min-width: 16rem; }
.strong-name { font-weight: 500; }
a.strong-name { text-decoration: none; }
a.strong-name:hover { text-decoration: underline; }
table.compare th[scope=row] { position: static; background: none; border-bottom: 1px solid var(--line2); color: var(--sub); font-size: 13px; font-weight: 400; vertical-align: middle; }
table.compare tbody tr:last-child th { border-bottom: 0; }
table.compare tbody tr:hover td { background: none; }
code { font: 12.5px/1.4 var(--mono); }
code.long { display: inline-block; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; user-select: all; }
code.long-wide { max-width: 30ch; }
code.long:hover, code.long:focus { overflow: visible; max-width: none; white-space: normal; word-break: break-all; }
.empty { margin: 0; padding: 40px 20px; color: var(--sub); text-align: center; }
main > .empty, .card-pad > .empty { border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 14px 20px; border-bottom: 1px solid var(--line2); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
ul.plain li:last-child { border-bottom: 0; }
blockquote { margin: 6px 0; padding: 10px 12px; background: var(--page); border-radius: 10px; white-space: pre-wrap; color: var(--ink-soft); }
ol.codes { columns: 2; font: 15px/1.9 var(--mono); padding: 12px 14px 12px 40px; margin: 0; background: var(--wash); border: 1px solid var(--line); border-radius: 10px; max-width: 40rem; }
.handout { font: 15px/1.6 var(--mono); padding: 12px 14px; background: var(--wash); border: 1px solid var(--line); border-radius: 10px; word-break: break-all; max-width: 72ch; user-select: all; }

/* What happened so far: a timeline, newest last. */
ol.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
ol.history > li { position: relative; padding: 0 0 16px 24px; }
ol.history > li::before { content: ''; position: absolute; left: 0; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
ol.history > li::after { content: ''; position: absolute; left: 4px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
ol.history > li:last-child { padding-bottom: 0; }
ol.history > li:last-child::after { display: none; }
ol.history .when { display: block; color: var(--sub); font-size: 12.5px; }

/* Statuses: a filled, fully rounded chip with a dot and its word (the mockups' chips). Red is Strong and critical;
   amber is Possible and waiting; green is cleared; blue is a check to make; grey is inactive. The word is always there. */
.state, .band, .agree, .chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500;
  line-height: 18px; white-space: nowrap; color: var(--muted); background: var(--muted-wash); }
.state::before, .band::before, .agree::before { content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.state-cleared, .agree-differs, .chip-ok { color: var(--ok); background: var(--ok-wash); }
.state-awaiting, .band-possible, .agree-partly, .agree-year, .agree-month, .chip-possible { color: var(--possible); background: var(--possible-wash); }
.state-critical, .band-strong, .agree-agrees, .chip-strong { color: var(--strong); background: var(--strong-wash); }
.state-inactive, .band-weak, .agree-missing, .chip-muted { color: var(--muted); background: var(--muted-wash); }
.state-inactive::before, .band-weak::before, .agree-missing::before { background: none; border: 1.5px solid currentColor; }
.agree-check, .chip-info { color: var(--info); background: var(--info-wash); }
.band-large { font-size: 13px; padding: 4px 12px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 18px;
  white-space: nowrap; color: var(--muted); background: var(--muted-wash); }
.tag-test { color: var(--test); background: var(--test-wash); }
.tag-test::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Messages. */
.error, .warning, .notice { max-width: 80ch; padding: 12px 14px; border-radius: 10px; font-size: 13.5px; }
.error { background: var(--strong-wash); color: var(--strong); }
.error::before { content: 'Refused: '; font-weight: 600; }
.warning { background: var(--possible-wash); color: var(--warn-ink); }
.notice { background: var(--ok-wash); color: var(--ok); }
.obligation { padding: 12px 14px; border-radius: 10px; background: var(--possible-wash); color: var(--warn-ink); font-size: 13px; max-width: 80ch; }
.facts-panel { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; max-width: 80ch; }
.facts-panel h3 { font-size: 13.5px; margin: 4px 0 0; }
.facts-panel ul.plain li p { margin: 0; }
blockquote.procedure { white-space: pre-line; margin: 0; padding: 8px 12px; border-left: 3px solid var(--line); }
details.template { margin: 8px 0; }
a.alert-row { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.callout { padding: 12px 14px; border-radius: 10px; background: var(--info-wash); color: var(--info); font-size: 13px; }

/* Forms: labels above fields; every control at least 40 px tall. */
form { margin: 0; }
form.stack { display: flex; flex-direction: column; align-items: stretch; gap: 8px; max-width: 32rem; }
form.stack button { align-self: flex-start; margin-top: 6px; }
form.stack.full { max-width: none; gap: 10px; }
form.stack.full button[type=submit] { align-self: stretch; }
form.inline { display: inline; }
form.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; }
form.filters label { display: inline-flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 500; color: var(--ink); }
/* E1: the Subjects page's filter a column, one row under the search box. */
form.filters .col-filters { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 8px 12px; margin: 0; padding: 0; border: 0; }
form.filters .col-filters legend { flex-basis: 100%; padding: 0; font-size: 13px; font-weight: 500; color: var(--ink); }
form.filters .col-filter { display: inline-flex; flex-direction: column; gap: 4px; min-width: 9rem; }
form .find { display: flex; flex-direction: column; gap: 6px; }
form.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 14px 16px; align-items: end; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; font-weight: 500; color: var(--ink); }
.field-wide { grid-column: 1 / -1; max-width: 36rem; }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 0; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; min-width: 0; }
legend { color: var(--sub); padding: 0; margin-bottom: 6px; width: 100%; font-size: 13px; }
label { font-size: 13px; font-weight: 500; color: var(--ink); }
fieldset label { display: inline-flex; gap: 8px; align-items: center; min-height: 40px; font-weight: 400; font-size: 14px; }
fieldset.options { flex-direction: column; flex-wrap: nowrap; gap: 8px; }
fieldset.options label.opt { display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px; border: 1px solid var(--field); border-radius: 12px; min-height: 44px; cursor: pointer; background: var(--card); }
fieldset.options label.opt:hover { border-color: var(--field-hover); }
fieldset.options label.opt:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--wash); }
.opt-title { display: block; font-weight: 500; }
button, select, input, textarea { font: 400 14px/1.3 var(--sans); }
input, select, textarea { color: var(--ink); background: var(--card); border: 1px solid var(--field); border-radius: 10px; padding: 0 12px; min-height: 44px; max-width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(21, 23, 26, .08); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: var(--sub); }
textarea { padding: 10px 12px; width: 100%; min-height: 96px; resize: vertical; line-height: 1.5; }
input[type=radio], input[type=checkbox] { min-height: 0; width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--ink); flex: none; box-shadow: none; }
input[type=file] { padding: 10px 12px; }
button, a.button, a.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px;
  font-weight: 500; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  color: var(--card); background: var(--ink); border: 1px solid var(--ink); }
button:hover, a.button:hover { background: #2A2D31; border-color: #2A2D31; color: var(--card); }
button.act, button.quiet, a.btn { color: var(--ink); background: var(--card); border-color: var(--field); }
button.act:hover, button.quiet:hover, a.btn:hover { background: var(--card); color: var(--ink); border-color: var(--field-hover); }
button.act-danger { color: var(--strong); background: var(--card); border-color: var(--strong-line); }
button.act-danger:hover { background: var(--card); color: var(--strong); border-color: var(--strong); }
button:disabled { opacity: .45; cursor: progress; }
.act-group { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* The alert states: a segmented control, one chosen. */
.pills ul { display: flex; gap: 4px; flex-wrap: wrap; margin: 0; padding: 4px; list-style: none; background: #E9EBED; border-radius: 12px; width: fit-content; max-width: 100%; }
.pills a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid transparent; border-radius: 9px;
  color: var(--ink-soft); font-weight: 500; font-size: 14px; text-decoration: none; }
.pills a:hover { color: var(--ink); }
.pills a[aria-current] { background: var(--card); border-color: var(--field); color: var(--ink); box-shadow: 0 1px 2px rgba(21, 23, 26, .06); }
.cnt { font-size: 12px; background: #DADDE1; color: var(--ink-soft); border-radius: 999px; padding: 0 8px; line-height: 20px; }
.pills a[aria-current] .cnt { background: var(--ink); color: var(--card); }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; }

/* The alert page. */
.hit { display: flex; flex-direction: column; gap: 12px; }
.hit > p:first-child { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
details { min-width: 0; }
details > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; min-height: 44px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: '+'; color: var(--sub); font-size: 18px; margin-left: auto; }
details[open] > summary::after { content: '\2212'; }
details.evidence { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 6px 20px 18px; display: flex; flex-direction: column; gap: 12px; }
details.evidence > summary { font-size: 16px; font-weight: 600; }
details.evidence > summary .sub { font-weight: 400; }
details.evidence h2 { margin: 14px 0 10px; font-size: 14px; }
details.evidence .pane { border: 1px solid var(--line); border-radius: 10px; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: auto; height: auto; position: static; padding: 12px 16px; gap: 12px; }
  .side-head { padding: 0; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .side-top { flex: 1 1 auto; }
  .firm { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px 10px; }
  .side.collapsed .navwrap, .side.collapsed .side-foot { display: none; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
  main { padding: 24px 16px 48px; }
  footer { padding: 0 16px 28px; }
  h1 { font-size: 32px; }
}
@media (max-width: 760px) {
  .page-aside { align-items: flex-start; }
  dl.facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  dl.facts dd { margin-bottom: 8px; }
  dl.kpis { grid-template-columns: minmax(0, 1fr); }
  td.wrap { white-space: normal; min-width: 14rem; }
  table.compare td, table.compare th { white-space: normal; }
  .sticky-first td:first-child { min-width: 8rem; max-width: 10rem; }
  /* R11: on a phone the sticky head is compact, so it keeps most of the screen for the page. */
  .sticky-head { padding: 8px 0 10px; gap: 8px; }
  .sticky-head h1 { font-size: 24px; }
  .sticky-head .page-lead { margin-top: 4px; font-size: 13px; }
  .sticky-head .page-head { gap: 8px; }
  .sticky-head .toolbar label { font-size: 12.5px; }
  ol.codes { columns: 1; }
  .q-band { margin-left: 46px; }
}
@media print {
  .side, nav, footer, button, form { display: none !important; }
  #recovery { display: block !important; }
  body { background: #FFFFFF; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
