/* ItsThem UI. Plain CSS, system fonts only, no third-party assets (NFR-8).
   Tokens first; components below use tokens only.

   Design reference for page issues (#245, #250, #329). Reuse these; do not
   add per-page colours or sizes.

   Colour tokens (light and dark values, all AA on --paper and --surface):
     --paper/--surface  page and card background; --ink body text
     --muted            secondary text (>= 7:1 on --paper); never lighter
     --rule/--haze      hairlines and tinted fills; --blue links and quiet buttons
     --ok/--warn/--bad/--idle  status colours; never the only signal (see Status)
     --focus            focus ring (3:1 or more on the surface it sits on)
   Type scale: h1 --step-3 (page title), h2 --step-1 (section), h3 --step-0
     bold (sub-section). Card and band titles set their own size explicitly.
   Spacing: --s1..--s7. Radii: --radius (controls), --radius-lg (cards).
   Components:
     buttons   button, .button (primary, star yellow), .button-quiet (outline);
               :disabled and [aria-disabled] are dimmed.
     forms     label above control, form card in main, .hint for help text.
     tables    .table-wrap > table.table (+ --dense --kv --actions --wide
               --hover --sticky --stack); row actions are .row-actions > .btn
               (--primary --secondary --danger --icon, 32px hit area, ADR-121). See
               "Data table" below and internal/web/ui/README.md (#363).
     notices   .notice (info), .success, .error, [role="note"]; each has a
               glyph plus the text, so colour is never the only cue.
     empty     .empty: dashed box with a short message and one next action.
     status    .pill/.status-badge/.status-dot with .status-<state>. Known
               states are filled; Unknown is a dashed ring with "?"; Under
               maintenance is a solid blue diamond/"i". Shape and text differ.
     focus     outline 3px var(--focus); light-on-dark chrome uses --star. */

:root {
  color-scheme: light dark;

  --paper: #f6f8fc;
  --surface: #ffffff;
  --ink: #0f1d38;
  --muted: #4b5870;
  --rule: #d5deee;
  --haze: #e4ebf7;
  --blue: #1f449c;
  --blue-ink: #ffffff;
  --sun: #f4b400;
  --night: #0b1f5c;
  --euro: #003399;
  --star: #ffcc00;

  --ok: #17744a;
  --warn: #8f5400;
  --bad: #b42318;
  --idle: #566176;
  --focus: #1f449c;
  --field-border: #7d8aa3;
  --ctl: 2.25rem;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: .875rem;
  --step-0: 1rem;
  --step-1: 1.3rem;
  --step-2: 1.65rem;
  --step-3: 2.15rem;
  --step-4: clamp(2.2rem, 1.6rem + 2.6vw, 3.1rem);

  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem;
  --s5: 1.5rem; --s6: 2.5rem; --s7: 4rem;
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(15, 29, 56, .05);
  --tint: 11%;
  --measure: 40rem;
  --page: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0c1424;
    --surface: #121c31;
    --ink: #e8edf7;
    --muted: #a3b0c7;
    --rule: #26334f;
    --haze: #18233b;
    --blue: #8fb0ff;
    --blue-ink: #0c1424;
    --ok: #4cc58a;
    --warn: #e0a23a;
    --bad: #ff7f73;
    --idle: #94a1b8;
    --focus: #8fb0ff;
    --field-border: #66769a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35);
    --tint: 18%;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: var(--step-0)/1.55 var(--sans);
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

/* Type */
h1, h2, h3 { font-family: var(--sans); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin: var(--s6) 0 var(--s3); }
h1 { font-size: var(--step-3); margin-top: var(--s5); }
h2 { font-size: var(--step-1); }
h3 { font-size: var(--step-0); }
p, ul, ol { margin: 0 0 var(--s4); }
p, li { max-width: var(--measure); }
small, .muted { color: var(--muted); font-size: var(--step--1); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }

a {
  color: var(--blue); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, currentColor 38%, transparent); border-radius: 2px;
  transition: text-decoration-color .12s, color .12s;
}
a:hover { text-decoration-color: currentColor; }
a:active { text-decoration-color: currentColor; text-decoration-thickness: 2px; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible, .eu :focus-visible,
.cta-card :focus-visible, .gate > .wrap > :not(.gate-card) :focus-visible { outline-color: var(--star); }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--surface); color: var(--ink); padding: var(--s2) var(--s4); z-index: 10; }
.skip-link:focus { left: var(--s2); top: var(--s2); }

/* Header and footer: the same night-blue chrome on every page */
.site-header { background: var(--night); color: #fff; }
.site-header .header-inner { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); align-items: center; justify-content: space-between; padding-top: var(--s2); padding-bottom: var(--s2); min-height: 3.5rem; }
.brand { display: inline-flex; align-items: center; gap: var(--s2); font-size: 1.125rem; font-weight: 800; letter-spacing: -.03em; color: #fff; text-decoration: none; }
.brand img { width: 24px; height: 24px; display: block; }
.site-header ul, .settings-nav ul, .legal-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s1) var(--s5); flex-wrap: wrap; }
.site-header ul { gap: var(--s1); }
.site-header li, .settings-nav li, .legal-nav li { max-width: none; }
.site-header nav a { color: #c7d3f0; text-decoration: none; font-size: .9375rem; font-weight: 500; padding: 0 var(--s3); border-radius: var(--radius); }
.site-header nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.site-header nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.14); }

main { width: 100%; max-width: var(--page); margin: 0 auto; padding: var(--s2) var(--s5) var(--s7); }
main:focus { outline: none; }

.site-footer { background: var(--night); color: #a9b9e0; font-size: var(--step--1); padding: var(--s5) 0; }
.footer-inner { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s6); justify-content: space-between; }
.site-footer p { margin: 0; }
.site-footer .legal-note { margin-top: var(--s3); max-width: 70ch; }
.site-footer a { color: #c7d3f0; }

/* Settings layout */
.settings { display: grid; grid-template-columns: 13rem 1fr; gap: var(--s6); padding-top: var(--s5); }
.settings-nav h2 { font-size: var(--step-1); margin: 0 0 var(--s3); }
.settings-nav ul { flex-direction: column; gap: var(--s1); }
.settings-nav a { display: block; padding: var(--s1) var(--s3); margin-left: calc(var(--s3) * -1); font-size: .9375rem; border-radius: var(--radius); color: var(--muted); text-decoration: none; }
.settings-nav a:hover { background: var(--haze); color: var(--ink); }
.settings-nav a[aria-current="page"] { background: var(--haze); color: var(--ink); font-weight: 600; }
.settings-content > :first-child h1, .settings-content > h1:first-child { margin-top: 0; }
@media (max-width: 40rem) {
  .settings { grid-template-columns: 1fr; gap: var(--s4); }
  main { padding: 0 var(--s4) var(--s6); }
}

/* Forms and buttons */
label { display: block; font-size: .875rem; font-weight: 600; margin: var(--s4) 0 var(--s1); }
input, select, textarea {
  font: inherit; font-size: .9375rem; line-height: 1.4; color: var(--ink); background: var(--surface);
  min-height: var(--ctl); padding: 0 var(--s3); border: 1px solid var(--field-border); border-radius: var(--radius);
  max-width: 100%; transition: border-color .12s, box-shadow .12s;
}
textarea { padding: var(--s2) var(--s3); min-height: 5rem; }
select:not([multiple]) {
  appearance: none; padding-right: 2rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:hover:not(:disabled), select:hover:not(:disabled), textarea:hover:not(:disabled) { border-color: var(--muted); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 0; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 28%, transparent);
}
input:disabled, select:disabled, textarea:disabled { background: var(--haze); color: var(--muted); cursor: not-allowed; }
input[type="checkbox"], input[type="radio"] { min-height: 0; padding: 0; accent-color: var(--blue); }
input:not([type="checkbox"]):not([type="radio"]), textarea { width: min(100%, 28rem); }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  font: inherit; font-size: .9375rem; font-weight: 600; line-height: 1.2;
  min-height: var(--ctl); padding: 0 var(--s4); border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--night) 18%, var(--star)); background: var(--star); color: var(--night);
  box-shadow: 0 1px 0 rgba(15, 29, 56, .08), inset 0 1px 0 rgba(255, 255, 255, .35);
  cursor: pointer; text-decoration: none; transition: background-color .12s, border-color .12s;
}
button:hover, .button:hover { background: color-mix(in srgb, var(--night) 7%, var(--star)); }
button:active, .button:active { background: color-mix(in srgb, var(--night) 12%, var(--star)); box-shadow: none; }
button:disabled, .button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.button-quiet { background: var(--surface); color: var(--ink); border-color: var(--field-border); font-weight: 500; box-shadow: var(--shadow); min-height: 2rem; padding: 0 var(--s3); font-size: .875rem; }
.button-quiet:hover { background: var(--haze); }
.button-quiet:active { background: var(--haze); }

/* Tables */
/* Bare table rules were retired in #364-#366: every table is table.table inside
   div.table-wrap (see "Data table" below). */
.table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: var(--step--1); margin: 0 0 var(--s4); background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
caption { text-align: left; color: var(--muted); padding-bottom: var(--s2); caption-side: top; }
.table th, .table td { text-align: left; vertical-align: top; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule); }
.table tbody tr:last-child > * { border-bottom: 0; }
.table thead th { font-weight: 600; color: var(--muted); background: var(--haze); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.table tbody th { font-weight: 500; }

/* Language switch (legal pages) */
.lang-switch ul { display: flex; gap: var(--s2); list-style: none; margin: 0 0 var(--s3); padding: 0; }
.lang-switch a { display: inline-block; padding: var(--s2) var(--s3); min-height: 44px; box-sizing: border-box; line-height: 28px; }
.lang-switch a[aria-current] { font-weight: 600; text-decoration: none; }

/* Notices */
[role="note"] {
  max-width: var(--measure); padding: var(--s3) var(--s4);
  border-left: 4px solid var(--sun); background: var(--haze); border-radius: 0 var(--radius) var(--radius) 0;
}
[role="note"] strong { font-weight: 600; }
.notice, .error { max-width: var(--measure); padding: var(--s3) var(--s4); border-left: 4px solid var(--sun); background: var(--haze); border-radius: 0 var(--radius) var(--radius) 0; }
.error { border-left-color: var(--bad); }
.success { max-width: var(--measure); padding: var(--s3) var(--s4); border-left: 4px solid var(--ok); background: var(--haze); border-radius: 0 var(--radius) var(--radius) 0; }
.error::before, .success::before { font-weight: 800; margin-right: var(--s2); }
.error::before { content: "\2715"; color: var(--bad); }
.success::before { content: "\2713"; color: var(--ok); }
.empty { max-width: var(--measure); padding: var(--s5); border: 2px dashed var(--rule); border-radius: var(--radius-lg); color: var(--muted); text-align: center; }
.empty > :last-child { margin-bottom: 0; }
.error-page { max-width: var(--measure); padding-top: var(--s6); }
.error-page h1 { margin-top: 0; }
.hint { color: var(--muted); font-size: var(--step--1); }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); padding: 0; margin: var(--s4) 0 var(--s5); }
.steps li { max-width: none; color: var(--muted); padding-bottom: var(--s1); border-bottom: 3px solid var(--rule); }
.steps [aria-current="step"] { color: var(--ink); font-weight: 700; border-bottom-color: var(--star); }

/* Status: a marker plus the words, never colour alone.
   Known states: filled dot. Unknown: dashed ring (no data, not "fine").
   Under maintenance: solid blue diamond (planned work). */
.status-badge, .status-operational, .status-degraded, .status-partial_outage,
.status-major_outage, .status-maintenance, .status-unknown { --c: var(--idle); }
.status-operational { --c: var(--ok); }
.status-degraded, .status-partial_outage { --c: var(--warn); }
.status-major_outage { --c: var(--bad); }
.status-maintenance { --c: var(--blue); }
.status-badge, .status-operational, .status-degraded, .status-partial_outage,
.status-major_outage, .status-maintenance, .status-unknown {
  color: var(--ink);
}
.status-badge::before, .status-operational::before, .status-degraded::before, .status-partial_outage::before,
.status-major_outage::before, .status-maintenance::before, .status-unknown::before {
  content: ""; display: inline-block; width: .7em; height: .7em; margin-right: var(--s2); border-radius: 50%;
  background: var(--c); border: 2px solid var(--c);
}
.status-unknown::before { background: transparent; border-style: dashed; }
.status-maintenance::before { border-radius: 2px; transform: rotate(45deg) scale(.9); }
.status-unknown { font-style: italic; }
.status-badge strong, strong.status-operational, strong.status-degraded, strong.status-partial_outage,
strong.status-major_outage, strong.status-maintenance, strong.status-unknown { font-weight: 600; }
.status-badge { margin: 0; }

/* Vendor logos */
.logo { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; vertical-align: -6px; margin-right: var(--s1); }
.logo-initials { display: inline-flex; align-items: center; justify-content: center; background: var(--haze); color: var(--ink); font-size: .7rem; font-weight: 700; }

/* Dashboard: one hairline-separated row per vendor */
.dashboard > h1 + p { color: var(--muted); }
h1 { font-size: var(--step-3); font-weight: 800; letter-spacing: -.03em; }
.vendors { list-style: none; padding: 0; margin: var(--s5) 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: var(--s4); }
.vendors > li { max-width: none; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: var(--s4); min-width: 0; display: flex; }
.vendors > li.open { border-color: color-mix(in srgb, var(--bad) 45%, var(--rule)); border-left: 6px solid var(--bad); }
.vcard { display: flex; flex-direction: column; gap: var(--s2); width: 100%; min-width: 0; }
.vcard-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s3); }
.vendors h2 { display: flex; align-items: center; gap: var(--s2); min-width: 0; flex: 1 1 9rem; font-family: var(--sans); font-size: var(--step-0); font-weight: 600; letter-spacing: 0; margin: 0; }
.vendors h2 .logo { width: 32px; height: 32px; margin: 0; flex: none; vertical-align: 0; font-size: .8rem; }
.vcard-name { overflow-wrap: break-word; }
img.logo { background: #fff; padding: 2px; box-sizing: border-box; }
.pill { display: inline-flex; align-items: center; gap: var(--s1); flex: none; padding: 2px var(--s3) 2px var(--s1); border-radius: 999px; font-size: var(--step--1); font-weight: 600; color: var(--ink); border: 1px solid color-mix(in srgb, var(--c) 45%, var(--rule)); background: color-mix(in srgb, var(--c) var(--tint), var(--surface)); }
.pill-icon { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--c); color: var(--surface); font-size: .75rem; line-height: 1; font-weight: 800; }
.pill.status-maintenance { border-width: 2px; border-color: var(--c); }
.pill.status-maintenance .pill-icon { border-radius: 3px; font-style: italic; }
.pill.status-unknown { border-style: dashed; background: transparent; font-style: italic; }
.pill.status-unknown .pill-icon { background: transparent; color: var(--ink); border: 2px dashed var(--c); }
.pill::before { display: none; }
.vcard-sub { margin: 0; color: var(--muted); font-size: var(--step--1); max-width: none; }
.vcard-tags { margin: 0; display: flex; flex-wrap: wrap; gap: var(--s1); max-width: none; }
.tag { font-size: var(--step--1); padding: 0 var(--s2); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--muted); }
.tag-stale { color: var(--muted); border: 1px dashed var(--muted); }
.vendors .timeline { margin: var(--s1) 0 0; max-width: none; }
.legend { color: var(--muted); font-size: var(--step--1); margin: var(--s1) 0 0; max-width: none; }
.attention { margin: var(--s2) 0; max-width: none; }
.vcard-incident { margin: 0; max-width: none; font-size: var(--step--1); display: flex; flex-direction: column; gap: 2px; }
.vcard-incident span { color: var(--muted); }
.src-details { margin: 0; font-size: var(--step--1); color: var(--muted); }
.vendors .src-details summary { font-weight: 400; color: var(--muted); cursor: pointer; }
.timeline-none { display: block; color: var(--muted); font-size: var(--step--1); }
.timeline-clean .timeline-bars { display: none; }
.timeline-bars { display: flex; align-items: flex-end; gap: 1px; height: 1.5rem; }
.bar { flex: 1 1 0; min-width: 1px; height: 30%; border-radius: 1px; background: var(--rule); }
.bar-1 { height: 50%; background: var(--idle); }
.bar-2 { height: 65%; background: var(--warn); }
.bar-3 { height: 85%; background: var(--bad); }
.bar-4 { height: 100%; background: var(--bad); }
.vendors details { margin: var(--s1) 0; overflow-x: auto; }
.vendors summary { cursor: pointer; font-weight: 600; font-size: var(--step--1); color: var(--muted); }
.vendors details[open] summary { margin-bottom: var(--s3); }
.vendors .table { background: var(--paper); }
.vendors h3 { font-size: var(--step-0); }
.vcard-foot { margin: auto 0 0; padding-top: var(--s2); font-size: var(--step--1); max-width: none; }

/* Public pages */
.public-status > h1, .public-index > h1 { margin-top: var(--s6); }
.vendor-list { list-style: none; padding: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.vendor-list li { max-width: none; display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule); }
.vendor-list li:last-child { border-bottom: 0; }
.incidents { list-style: none; padding: 0; }
.incidents li { border-top: 1px solid var(--rule); padding-top: var(--s3); }

/* Landing: full-width bands. The alert card in the hero is the one loud thing. */
.is-landing main { max-width: none; padding: 0; display: flex; flex-direction: column; }
.is-landing main > * { flex: 1 0 auto; }
.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--s5); }

.hero { background: var(--night); color: #fff; padding: var(--s7) 0 calc(var(--s7) + var(--s5)); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--s6) var(--s7); align-items: center; }
.hero h1 { color: #fff; font-size: clamp(2.6rem, 1.4rem + 4vw, 4.4rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; margin: 0 0 var(--s5); }
.hero-lede { font-size: var(--step-1); line-height: 1.5; color: #c7d3f0; max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); align-items: center; margin-top: var(--s5); }
.hero-link { color: #fff; }
.button-star { min-height: 2.75rem; font-size: 1rem; padding: 0 var(--s5); }

.alert-demo { margin: 0; }
.alert-demo figcaption { color: #a9b9e0; font-size: var(--step--1); margin-top: var(--s3); }
.alert-card { background: #fff; color: #0f1d38; border-radius: 10px; padding: var(--s4) var(--s5) var(--s5); box-shadow: 0 18px 40px rgba(2, 10, 40, .45); --ok: #17744a; --idle: #566176; }
.alert-channel { margin: 0 0 var(--s4); padding-bottom: var(--s3); border-bottom: 1px solid #d5deee; font-weight: 700; color: #4b5870; }
.alert-msg { display: grid; grid-template-columns: 36px 1fr; gap: var(--s3); }
.alert-avatar { width: 36px; height: 36px; border-radius: 8px; background: var(--night); padding: 5px; }
.alert-card p { max-width: none; margin: 0 0 var(--s2); }
.alert-time { color: #566176; font-size: var(--step--1); margin-left: var(--s2); }
.alert-title { font-weight: 700; font-size: var(--step-1); }
.alert-title [class^="status-"] { color: #17744a; margin-right: var(--s2); }
.alert-body { color: #4b5870; }
.alert-thread { list-style: none; margin: var(--s3) 0 0; padding: 0 0 0 var(--s4); border-left: 3px solid #d5deee; font-size: var(--step--1); }
.alert-thread li { max-width: none; padding: var(--s1) 0; }
.alert-thread time { display: inline-block; min-width: 3.1em; color: #566176; font-variant-numeric: tabular-nums; }

.band { padding: var(--s7) 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s6) var(--s7); align-items: center; }
.split-text h2 { font-size: var(--step-3); letter-spacing: -.03em; margin-top: 0; }
.split-text p { font-size: var(--step-1); line-height: 1.5; color: var(--muted); }
.preview { margin: 0; min-width: 0; }
.preview figcaption { color: var(--muted); font-size: var(--step--1); margin-top: var(--s3); }
.preview-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.preview-list li { max-width: none; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule); }
.preview-list li:last-child { border-bottom: 0; }
.preview-list li > div { display: flex; justify-content: space-between; gap: var(--s4); }
.preview-open { background: var(--haze); }
.preview-list code { display: block; overflow: hidden; white-space: nowrap; color: var(--blue); line-height: 1.2; margin-top: var(--s1); }

.eu { position: relative; overflow: hidden; background: var(--euro); color: #fff; padding: var(--s7) 0; }
.eu-ring { position: absolute; right: -4rem; top: 50%; width: 30rem; max-width: 70vw; transform: translateY(-50%); }
.eu-body { position: relative; }
.eu h2 { color: #fff; font-size: var(--step-3); letter-spacing: -.03em; margin: 0 0 var(--s5); }
.facts { list-style: none; padding: 0; margin: 0 0 var(--s5); font-size: var(--step-1); }
.facts li { max-width: 34rem; padding: var(--s2) 0 var(--s2) var(--s5); position: relative; }
.facts li::before { content: ""; position: absolute; left: 0; top: 1.05em; width: .6em; height: .6em; border-radius: 50%; background: var(--star); }
@media (max-width: 52rem) {
  .hero-grid, .split { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: var(--s6) 0 var(--s7); }
  .band, .eu { padding: var(--s6) 0; }
  .eu-ring { display: none; }
}
@media (max-width: 40rem) { .wrap { padding: 0 var(--s4); } }

.gate { background: var(--night); padding: var(--s7) 0; }
.gate-card { max-width: 26rem; margin: 0 auto; background: var(--surface); color: var(--ink); border-radius: var(--radius-lg); padding: var(--s5); box-shadow: 0 12px 32px rgba(2, 10, 40, .4); }
.gate-card h1 { font-size: var(--step-2); margin: 0 0 var(--s3); }
.gate-card p { max-width: none; }
.gate-lede { color: var(--muted); }
.gate-card input:not([type="hidden"]) { width: 100%; }
.gate-card button, .gate-card .button { width: 100%; }
.gate-alt { display: flex; align-items: center; gap: var(--s3); color: var(--muted); font-size: var(--step--1); margin: var(--s4) 0; }
.gate-alt::before, .gate-alt::after { content: ""; flex: 1; border-top: 1px solid var(--rule); }
.gate-card .error { margin: 0 0 var(--s4); max-width: none; }
.gate-card .error:focus { outline: 3px solid var(--blue); outline-offset: 2px; }
.gate-card .button-quiet { margin-top: 0; }
@media (max-width: 40rem) {
  .gate { padding: var(--s5) 0; }
  .gate-card { max-width: none; padding: var(--s5) var(--s4); }
}
.gate-note { max-width: 28rem; margin: var(--s4) auto 0; text-align: center; color: #a9b9e0; font-size: var(--step--1); }
.gate-note a { color: #c7d3f0; }

.status-hero { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: var(--s4) var(--s5); margin: var(--s4) 0; box-shadow: var(--shadow); }
.status-hero h2 { font-size: var(--step-0); font-weight: 600; color: var(--muted); margin: 0 0 var(--s2); }
.status-big { font-size: var(--step-2); font-weight: 800; letter-spacing: -.03em; }
.status-big::before { width: .6em; height: .6em; }
.panel-list { list-style: none; padding: 0; margin: 0 0 var(--s4); background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
.panel-list li { max-width: none; display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s3) var(--s4); border-bottom: 1px solid var(--rule); }
.panel-list li:last-child { border-bottom: 0; }
.cta-card { background: var(--night); color: #fff; border-radius: var(--radius-lg); padding: var(--s5); margin-top: var(--s5); display: flex; flex-wrap: wrap; gap: var(--s3) var(--s5); align-items: center; justify-content: space-between; }
.cta-card > * { margin: 0; }
.cta-card h2 { color: #fff; margin: 0 0 var(--s2); }
.cta-card p { color: #c7d3f0; }
.public-index nav ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2); }
.public-status p a + a { margin-left: var(--s4); }
.public-index nav a { display: inline-block; padding: var(--s1) var(--s3); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; }
.public-index nav a:hover { border-color: var(--blue); }
:where(main form:not(td form):not(.gate-card form):not(.inline)) { max-width: 40rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: var(--s2) var(--s5) var(--s5); margin: var(--s4) 0; }
main form label:first-child, main form p:first-child label { margin-top: var(--s3); }
.catalog form[role="search"] { max-width: none; padding-top: var(--s4); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); align-items: end; }
.catalog form[role="search"] p { margin: 0; }
.catalog form[role="search"] .grow { flex: 1 1 18rem; }
.catalog form[role="search"] .grow input { width: 100%; }
.catalog form[role="search"] #q-hint { flex-basis: 100%; order: 5; color: var(--muted); font-size: var(--step--1); }
.catalog form[role="search"] button { order: 4; }
.cat-inline { display: none; }
.catalog .pager, .catalog nav[aria-label] { margin-top: var(--s4); }
/* Add and request vendor forms: full-width fields, one column (#334) */
.add-vendor form, .vendoradd form, .vendorrequest form { max-width: 36rem; }
.add-vendor form input:not([type="checkbox"]):not([type="radio"]), .vendoradd form input:not([type="checkbox"]):not([type="radio"]),
.vendorrequest form input:not([type="checkbox"]) { width: 100%; }
.add-vendor form p:has(> #q) { display: flex; flex-wrap: wrap; gap: var(--s2); align-items: end; }
.add-vendor form p:has(> #q) label { flex-basis: 100%; }
.add-vendor form p:has(> #q) input { flex: 1 1 14rem; width: auto; }
.add-vendor section, .vendoradd section { margin-bottom: var(--s5); }
.vendoradd .actions { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s4); align-items: center; }
.vendorrequest .error, .vendoradd .error { margin-bottom: var(--s3); }
@media (max-width: 40rem) {
  .table .col-aux { display: none; }
  .cat-inline { display: block; }
}

.vendors [role="note"] { background: none; border: 0; padding: 0; color: var(--muted); font-size: var(--step--1); max-width: none; }
.vendors > li > section > p { margin: 0 0 var(--s2); }
.vendors > li > section > p:last-child { margin: var(--s2) 0 0; font-size: var(--step--1); }
.public-index .vendor-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: var(--s2); background: none; border: 0; border-radius: 0; overflow: visible; }
.public-index .vendor-list li { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s2) var(--s3); }
.vendor-list strong { font-weight: 500; font-size: var(--step--1); white-space: nowrap; }
.public-index .vendor-list li:last-child { border-bottom: 1px solid var(--rule); }

/* Vendor pages (catalog detail and public status) */
.crumb { margin: var(--s4) 0 0; font-size: var(--step--1); }
.vhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); margin: var(--s4) 0 var(--s5); }
.vhead h1 { margin: 0; display: flex; align-items: center; gap: var(--s3); }
.vhead h1 .logo { width: 40px; height: 40px; border-radius: var(--radius); margin: 0; vertical-align: 0; flex: none; font-size: .95rem; }
.vmeta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); margin: var(--s2) 0 0; max-width: none; color: var(--muted); font-size: var(--step--1); }
.vmeta a { color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; padding: var(--s1) var(--s3); border-radius: 999px; font-size: .9375rem; font-weight: 600; border: 1px solid color-mix(in srgb, var(--c) 45%, var(--rule)); background: color-mix(in srgb, var(--c) var(--tint), var(--surface)); }
.vlayout { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; grid-template-areas: "main side"; gap: var(--s6); align-items: start; }
.vmain { grid-area: main; min-width: 0; }
.vside { grid-area: side; position: sticky; top: var(--s4); }
.vside:empty { display: none; }
.vlayout:not(:has(.vside:not(:empty))) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
.vside .watch-panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: var(--s4) var(--s5); box-shadow: var(--shadow); }
.vside .watch-panel h2 { font-size: var(--step-0); margin: 0 0 var(--s2); }
.vside .watch-panel form { max-width: none; padding: 0; border: 0; background: none; margin: 0 0 var(--s3); }
.vside .watch-panel button[type="submit"] { margin: 0 var(--s1) var(--s1) 0; }
.vside .watch-panel select { width: 100%; }
.vside .watch-panel fieldset { border: 0; padding: 0; margin: var(--s3) 0; }
/* Watch component picker (#362): server-rendered, no-JS-safe. */
.watch-panel .comp-picker { min-width: 0; }
.watch-panel .seg { display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; box-sizing: border-box; padding: var(--s2) var(--s3); width: 50%; border: 1px solid var(--rule); background: var(--surface); cursor: pointer; font-size: var(--step--1); }
.watch-panel .seg:first-of-type { border-radius: var(--radius) 0 0 var(--radius); }
.watch-panel .seg:nth-of-type(2) { border-radius: 0 var(--radius) var(--radius) 0; margin-left: -1px; }
.watch-panel .seg-in:checked + .seg { background: var(--haze); font-weight: 600; border-color: var(--muted); }
.watch-panel .seg-in:focus-visible + .seg { outline: 3px solid var(--focus, currentColor); outline-offset: 2px; position: relative; }
.watch-panel .comp-groups { margin-top: var(--s3); }
.watch-panel #scope-all:checked ~ .comp-groups { display: none; }
.watch-panel .comp-count { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); margin: 0 0 var(--s2); color: var(--muted); font-size: var(--step--1); max-width: none; }
.watch-panel .btn-link { background: none; border: 0; padding: var(--s2) 0; min-height: 44px; color: var(--link, inherit); text-decoration: underline; cursor: pointer; font: inherit; }
.watch-panel details.comp-group { border-top: 1px solid var(--rule); }
.watch-panel details.comp-group > summary { padding: var(--s2) 0; min-height: 44px; box-sizing: border-box; }
.watch-panel details.comp-group fieldset { margin: 0 0 var(--s2); min-width: 0; }
.watch-panel .comp-row { position: relative; display: flex; align-items: center; min-height: 44px; }
.watch-panel .comp-row input { position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 1.25rem; height: 1.25rem; margin: 0; }
.watch-panel .comp-row label { display: flex; align-items: center; gap: var(--s2); flex: 1; min-width: 0; min-height: 44px; box-sizing: border-box; padding: var(--s2) 0 var(--s2) 2rem; cursor: pointer; }
.watch-panel .comp-row input:focus-visible + label { outline: 3px solid var(--focus, currentColor); outline-offset: -2px; }
.watch-panel .comp-label { min-width: 0; overflow-wrap: anywhere; }
.vmain h2 { font-size: var(--step-1); margin: var(--s6) 0 var(--s3); }
.vmain > section:first-child h2 { margin-top: 0; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: var(--s4) var(--s5); box-shadow: var(--shadow); }
.card h2 { font-size: var(--step-0); margin: 0 0 var(--s2); }
.card p { max-width: none; }
.card .watch-state { color: var(--muted); font-size: var(--step--1); }
.card .watching::before { content: "\2713"; color: var(--ok); font-weight: 700; margin-right: var(--s2); }
.card form { margin: 0; }
.card button { width: 100%; }
.link-list { list-style: none; padding: 0; margin: var(--s4) 0 0; font-size: var(--step--1); }
.link-list li { max-width: none; padding: var(--s2) 0; border-top: 1px solid var(--rule); }
.link-list li:first-child { border-top: 0; }

.chip { display: inline-flex; align-items: center; padding: 2px var(--s3); border-radius: 999px; background: var(--haze); color: var(--ink); font-size: .8125rem; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.chip-bad, .impact-critical, .impact-major { color: var(--bad); background: color-mix(in srgb, var(--bad) var(--tint), var(--surface)); }
.impact-minor { color: var(--warn); background: color-mix(in srgb, var(--warn) var(--tint), var(--surface)); }
.impact-none { color: var(--muted); }
h2 .chip { vertical-align: middle; margin-left: var(--s2); letter-spacing: 0; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2); padding: 0; margin: 0; }
.chips li { max-width: none; }
.comp-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4); margin-bottom: var(--s3); }
.comp-summary p { margin: 0; color: var(--muted); max-width: none; }

.incident-rows { list-style: none; margin: 0; padding: 0; }
.groups, .incident-list, .incident-rows { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
details.group, details.incident, .incident-rows > li { border-top: 1px solid var(--rule); max-width: none; }
details.group:first-child, details.incident:first-child, .incident-rows > li:first-child { border-top: 0; }
details.group > summary, details.incident > summary { cursor: pointer; list-style: none; padding: var(--s3) var(--s4); }
details.group > summary::-webkit-details-marker, details.incident > summary::-webkit-details-marker { display: none; }
details.group > summary:hover, details.incident > summary:hover { background: var(--haze); }
details.group > summary::before, details.incident > summary::before {
  content: ""; width: .5rem; height: .5rem; flex: none; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s;
}
details[open] > summary::before { transform: rotate(45deg); }
details.group > summary { display: flex; align-items: center; gap: var(--s3); }
.group-name { flex: 1; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.group-meta { color: var(--muted); font-size: var(--step--1); }
.status-dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; background: var(--c); border: 2px solid var(--c); flex: none; }
.status-dot::before { display: none; }
.status-dot.status-unknown { background: transparent; border-style: dashed; }
.status-dot.status-maintenance { border-radius: 2px; transform: rotate(45deg) scale(.85); }
.comp-list { list-style: none; margin: 0; padding: 0 var(--s4) var(--s3) calc(var(--s4) + .5rem + var(--s3)); display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0 var(--s6); }
.comp-list li { max-width: none; display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: var(--s2) 0; border-top: 1px solid var(--rule); font-size: var(--step--1); }
details.healthy { padding: 0 var(--s4) var(--s3) calc(var(--s4) + .5rem + var(--s3)); }
details.healthy > summary { cursor: pointer; color: var(--muted); font-size: var(--step--1); padding: var(--s2) 0; border-top: 1px solid var(--rule); }
details.healthy .comp-list { padding: 0; }
.comp-name { min-width: 0; overflow-wrap: anywhere; }
.comp-list .status-badge { white-space: nowrap; color: var(--muted); }

details.incident > summary { display: grid; grid-template-columns: .5rem 1fr; column-gap: var(--s3); align-items: center; }
details.incident > summary::before { grid-row: 1 / span 2; }
details.incident > summary > * { grid-column: 2; }
.incident h3, .incident-rows h3 { font-size: var(--step-0); font-weight: 600; letter-spacing: 0; margin: 0; line-height: 1.35; max-width: none; }
.incident h3 { display: inline; }
.incident-rows > li { padding: var(--s3) var(--s4); }
.inc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); margin: var(--s1) 0 0; max-width: none; font-size: var(--step--1); color: var(--muted); }
.inc-state { font-weight: 600; color: var(--ink); }
.updates { list-style: none; margin: 0; padding: 0 var(--s4) var(--s3) calc(var(--s4) + .5rem + var(--s3)); }
.updates li { max-width: none; position: relative; padding: 0 0 var(--s3) var(--s4); border-left: 2px solid var(--rule); }
.updates li::before { content: ""; position: absolute; left: -5px; top: .45em; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.updates li:last-child { padding-bottom: 0; }
.updates p { margin: 0; max-width: none; }
.update-head { font-size: var(--step--1); }
.update-head time { color: var(--muted); margin-left: var(--s2); font-variant-numeric: tabular-nums; }
.update-body { color: var(--muted); font-size: var(--step--1); }
.attribution { margin-top: var(--s5); }
.incident > .hint { padding: 0 var(--s4) var(--s3) calc(var(--s4) + .5rem + var(--s3)); margin: 0; }

@media (max-width: 52rem) {
  .vlayout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "side" "main"; gap: var(--s4); }
  .vside { position: static; }
  .vmain h2 { margin-top: var(--s5); }
  details.healthy { padding-left: var(--s4); }
  .comp-list { padding-left: var(--s4); grid-template-columns: minmax(0, 1fr); }
  .updates, .incident > .hint { padding-left: var(--s4); }
}

.htmx-request { opacity: .6; }

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

.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Honeypot: off-screen, not display:none, so naive bots still fill it */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Shared pager */
.pager { display: flex; align-items: center; justify-content: center; gap: var(--s4); margin: var(--s5) 0; }
.pager-status { color: var(--muted); font-size: var(--step--1); }
.pager-link[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }

/* Header user menu */
.header-inner { display: flex; align-items: center; gap: var(--s4); }
.user-menu { position: relative; margin-left: auto; }
.user-menu > summary { list-style: none; cursor: pointer; display: inline-flex; border-radius: 50%; }
.user-menu > summary::-webkit-details-marker { display: none; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--haze); color: var(--ink); border: 1px solid var(--rule); font-size: .8rem; font-weight: 700; }
.user-menu-panel { position: absolute; right: 0; top: calc(100% + var(--s2)); z-index: 20; min-width: 14rem; max-width: calc(100vw - 2rem); background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius-lg); padding: var(--s2); box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 12px 28px rgba(0,0,0,.22); font-size: .9375rem; }
/* The panel sits inside the night-blue header but has its own surface: use the page text and focus colours, not the header's white. */
.user-menu-panel :focus-visible { outline-color: var(--focus); }
.user-menu-panel ul { list-style: none; padding: 0; margin: var(--s2) 0; }
.user-menu-panel li { max-width: none; }
.user-menu-panel li a, .user-menu-panel button.linkish { display: block; width: 100%; min-height: 2rem; padding: var(--s1) var(--s2); border-radius: var(--radius); color: var(--ink); text-decoration: none; text-align: left; box-shadow: none; }
.user-menu-panel li a:hover, .user-menu-panel button.linkish:hover { background: var(--haze); }
.user-menu-panel form { margin: 0; padding: 0; border: 0; background: none; }
.user-menu-id { margin: 0; padding: var(--s1) var(--s2) var(--s2); border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.user-menu-id span { color: var(--muted); font-size: var(--step--1); }
button.linkish { display: inline; min-height: 0; background: none; border: 0; box-shadow: none; padding: 0; color: var(--blue); text-decoration: underline; cursor: pointer; font: inherit; }
button.linkish:hover, button.linkish:active { background: none; }

/* Header navigation: burger toggle on small screens (#295). */
.site-header nav { margin-left: var(--s2); }
.site-header nav a { display: inline-flex; align-items: center; min-height: 2rem; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; min-height: 0; padding: 0; background: transparent; color: #fff; border: 1px solid #3a4a78; box-shadow: none; border-radius: var(--radius); cursor: pointer; }
.nav-toggle:hover { background: rgba(255,255,255,.08); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 1.25rem; height: 2px; background: currentColor; border-radius: 1px; }
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; transition: transform .15s; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }
@media (prefers-reduced-motion: reduce) { .nav-toggle-bars::before, .nav-toggle-bars::after { transition: none; } }
@media (max-width: 40rem) {
  .site-header .header-inner { flex-wrap: wrap; gap: var(--s2) var(--s3); }
  .nav-toggle:not([hidden]) { display: inline-flex; margin-left: auto; }
  .nav-toggle:not([hidden]) ~ .user-menu { margin-left: 0; }
  .site-header nav { order: 3; flex-basis: 100%; margin-left: 0; }
  .site-header nav[data-collapsible]:not([data-open]) ul { display: none; }
  .site-header nav ul { flex-direction: column; gap: 0; }
  .site-header nav a { width: 100%; min-height: 2.5rem; }
  input, select, textarea { font-size: 1rem; }
}
.tag-new { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--rule)); font-weight: 600; }
.add-list { list-style: none; padding: 0; }
.add-list li { max-width: none; display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
.add-list label { margin: 0; font-weight: 600; }

/* Landing logo strip (#270, ADR-117): uniform tiles, no vendor more prominent,
   logos never recoloured or distorted. White tiles keep them readable in dark mode. */
.logo-strip { padding: var(--s6) 0; border-top: 1px solid var(--rule); }
.logo-strip-caption { margin: 0 0 var(--s4); font-size: var(--step-0); font-weight: 500; color: var(--muted); text-align: center; }
.logo-strip-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); }
.logo-strip-list li { display: flex; align-items: center; justify-content: center; width: 8.5rem; height: 4rem; padding: var(--s2); background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); }
.logo-strip-list img { display: block; width: 100%; height: 100%; max-width: 120px; max-height: 48px; object-fit: contain; }
.logo-strip-note { margin: var(--s4) auto 0; max-width: var(--measure); text-align: center; font-size: .85rem; color: var(--muted); }
.chip-eu { background: var(--euro); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .04em; margin-left: var(--s1); }
/* Onboarding, discover and the Slack channel picker (#332). Choice lists
   (proposed vendors) are a checkbox, a name and a line of evidence per row;
   .actions holds the one primary action of a step; .inline forms (skip,
   dismiss) are quiet and sit below it. */
fieldset { border: 1px solid var(--rule); border-radius: var(--radius); margin: 0 0 var(--s4); padding: var(--s2) var(--s4) var(--s3); min-width: 0; }
legend { font-weight: 700; padding: 0 var(--s2); }
.choices { list-style: none; padding: 0; margin: 0; }
.choices li { display: grid; grid-template-columns: auto 1fr; column-gap: var(--s3); align-items: start; max-width: none; padding: var(--s3) 0; border-top: 1px solid var(--rule); }
.choices li:first-child { border-top: 0; }
.choices input[type="checkbox"] { width: 1.25rem; height: 1.25rem; margin: .1rem 0 0; }
.choices label { margin: 0; }
.choices .evidence { grid-column: 2; margin: var(--s1) 0 0; color: var(--muted); font-size: var(--step--1); overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); max-width: none; margin-bottom: 0; }
form.inline { max-width: var(--measure); }
form.inline p { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.steps { counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before { content: counter(step) ". "; }
.steps li.done::before { content: "\2713  "; color: var(--ok); font-weight: 700; }
@media (max-width: 40rem) {
  .actions .button, .actions button { flex: 1 1 100%; text-align: center; }
}
/* Settings pass (#335). .button-danger is for destructive actions only: a
   red outline that fills on hover, with the confirmation text beside it;
   .danger-zone groups an irreversible action under its own heading;
   dl.facts is a compact label/value list (roles, plan limits). */
.button-danger { background: transparent; color: var(--bad); border-color: var(--bad); box-shadow: none; }
.button-danger:hover, .button-danger:active { background: var(--bad); color: var(--surface); }
.danger-zone { max-width: 40rem; margin: var(--s6) 0 var(--s4); padding: 0 var(--s4) var(--s2); border: 1px solid var(--bad); border-left-width: 4px; border-radius: var(--radius); background: var(--surface); }
.danger-zone h2 { margin-top: var(--s4); color: var(--bad); }
.danger-zone form { max-width: none; border: 0; padding: 0; margin: 0; background: none; }
dl.facts { max-width: var(--measure); margin: 0 0 var(--s4); }
dl.facts dt { font-weight: 700; margin-top: var(--s2); }
dl.facts dd { margin: 0; color: var(--muted); }
/* Destinations pass (#336): .row-actions groups a table row's actions,
   .dest-form is the shared add-destination form, .secret-once frames a
   secret that is shown a single time, ul.add-list lists the add links. */
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.row-actions form { margin: 0; padding: 0; border: 0; background: none; max-width: none; }
.dest-form { max-width: 40rem; }
.secret-once { max-width: var(--measure); padding: 0 var(--s4) var(--s3); border: 2px solid var(--star); border-radius: var(--radius); background: var(--surface); }
.secret-once code { display: block; overflow-wrap: anywhere; padding: var(--s3); background: var(--haze); border-radius: var(--radius); }
ul.add-list { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); padding-left: 0; list-style: none; }
/* Admin pass (#337). .admin-nav is the shared sub-navigation (adminnav
   partial; aria-current marks the page). Admin pages use the wider main so
   dense tables fit at 1280px without scrolling; long values (td.wrap) break
   instead of widening the table, and each table scrolls inside its own
   .table-wrap. tr.problem (shared table modifier) marks failing/stale
   sources; details.confirm holds a
   destructive form behind a summary with the audit consequence in a note. */
main:has(> .admin) { max-width: 90rem; }
.admin-nav { margin: 0 0 var(--s5); border-bottom: 1px solid var(--rule); }
.admin-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); }
.admin-nav li { max-width: none; }
.admin-nav a { display: block; font-size: .9375rem; padding: var(--s2) var(--s1); color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.admin-nav a:hover { color: var(--ink); }
.admin-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--blue); }
/* Data table and row actions (#363, #364-#366). Markup: div.table-wrap (the
   scroll container, so the page never scrolls sideways) > table.table with
   modifiers. Row actions are compact .btn controls inside td > .row-actions
   (32px tall, 8px gap; the owner chose this over 44px, ADR-121, and WCAG 2.2
   SC 2.5.8 asks for 24px). A row shows at most two inline actions; more go in
   a details.row-menu popover ("More actions for <row>") whose panel menu.js
   positions with fixed coordinates so the table-wrap never clips it. A
   details.confirm in a cell is the same compact button opening a popover form.
   The old bare-table, cell-button and catalog-specific rules were retired once
   the last templates moved. */
.btn, .table details.confirm > summary, .row-menu > summary {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-height: 2rem; min-width: 2rem; padding: var(--s1) var(--s3);
  font: inherit; font-size: .875rem; font-weight: 500; line-height: 1.2; text-align: center;
  border: 1px solid var(--field-border); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow); cursor: pointer; text-decoration: none; list-style: none;
}
.table details.confirm > summary::-webkit-details-marker, .row-menu > summary::-webkit-details-marker { display: none; }
.btn:hover, .table details.confirm > summary:hover, .row-menu > summary:hover { background: var(--haze); text-decoration: none; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--star); border-color: color-mix(in srgb, var(--night) 18%, var(--star)); color: var(--night); font-weight: 600; }
.btn--primary:hover { background: color-mix(in srgb, var(--night) 7%, var(--star)); }
.btn--secondary { color: var(--ink); }
.btn--danger, .table details.confirm > summary.btn--danger { background: var(--surface); border-color: color-mix(in srgb, var(--bad) 55%, var(--rule)); color: var(--bad); }
.btn--danger:hover { background: color-mix(in srgb, var(--bad) var(--tint), var(--surface)); }
.btn--icon, .row-menu > summary { padding: var(--s1); }
.row-menu > summary { font-size: 1.125rem; line-height: 1; letter-spacing: .05em; }
.row-menu[open] > summary, .table details.confirm[open] > summary { background: var(--haze); }
.row-menu, .table details.confirm { position: relative; display: inline-block; }
.row-menu-panel, .table details.confirm > form {
  position: absolute; right: 0; top: calc(100% + var(--s1)); z-index: 30; box-sizing: border-box;
  background: var(--surface); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius-lg); box-shadow: 0 1px 2px rgba(15, 29, 56, .06), 0 8px 24px rgba(15, 29, 56, .14);
  white-space: normal; text-align: left;
}
.row-menu-panel { display: flex; flex-direction: column; gap: 2px; min-width: 11rem; max-width: calc(100vw - 1rem); padding: var(--s1); }
.row-menu-panel form { display: block; margin: 0; }
.row-menu-panel .btn { display: flex; width: 100%; justify-content: flex-start; border-color: transparent; font-weight: 500; text-align: left; }
.row-menu-panel .btn { background: transparent; box-shadow: none; }
.row-menu-panel .btn:hover { background: var(--haze); }
.row-menu-panel > .btn--danger, .row-menu-panel > form:has(.btn--danger) { margin-top: var(--s1); padding-top: var(--s1); border-top: 1px solid var(--rule); border-radius: 0; }
.table details.confirm > form { width: 20rem; max-width: calc(100vw - 1rem); padding: var(--s3); border-color: var(--bad); }
.table details.confirm [role="note"] { font-size: var(--step--1); }
.table details.confirm label { display: block; margin-top: var(--s2); }
.table details.confirm select, .table details.confirm input:not([type="hidden"]) { width: 100%; box-sizing: border-box; }
.table details.confirm .btn { margin-top: var(--s2); }
.settings-content { min-width: 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
dd code { overflow-wrap: anywhere; }
.table-wrap { position: relative; max-width: 100%; margin: 0 0 var(--s4); overflow-x: auto; border-radius: 10px; }
.table-wrap:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.table-wrap > .table { display: table; margin: 0; }
.table--dense th, .table--dense td { padding: var(--s2) var(--s3); }
.table--kv thead th { text-transform: none; letter-spacing: 0; font-size: var(--step--1); }
.table--kv tbody th { width: 30%; color: var(--muted); font-weight: 600; }
.table--actions th:last-child, .table--actions td:last-child { width: 1%; white-space: nowrap; }
.table--actions td:last-child .row-actions { flex-wrap: nowrap; }
.table--wide { min-width: 40rem; }
.table td.wrap { overflow-wrap: anywhere; max-width: 28rem; }
/* td.wrap-word: names and domains. Break at spaces, never inside a word unless
   one token exceeds the cap; break-word (unlike anywhere) keeps the longest word
   as the column minimum, so the auto layout does not squeeze it. */
.table td.wrap-word { overflow-wrap: break-word; max-width: 16rem; }
.table tr.problem > * { background: color-mix(in srgb, var(--bad) var(--tint), var(--surface)); }
.table tr.problem > th:first-child { box-shadow: inset 4px 0 0 var(--bad); }
.table td form { margin: 0; }
.table td form p { margin: var(--s2) 0; }
.table .btn { white-space: nowrap; }
.table td:not(:last-child), .table th:not(:last-child) { min-width: 5rem; }
.table th[scope="row"] { min-width: 8rem; overflow-wrap: break-word; }
.table--actions th[scope="row"] { min-width: 12rem; }
@media (max-width: 40rem) { .table th, .table td { padding-left: var(--s2); padding-right: var(--s2); } }
.table .nowrap, .table details.confirm > summary { white-space: nowrap; }
.table td.nowrap .row-actions { flex-wrap: nowrap; }
.cell-detail { display: block; margin-top: var(--s1); max-width: 18rem; color: var(--muted); font-size: .8125rem; font-weight: 400; line-height: 1.35; overflow-wrap: anywhere; }
.table--hover tbody tr:hover > * { background: var(--haze); }
.table-wrap--sticky { max-height: 70vh; overflow-y: auto; }
.table--sticky thead th { position: sticky; top: 0; z-index: 1; }
.table-wrap--pager { margin-bottom: 0; }
.table-wrap--pager + .pager { margin-top: var(--s3); }
@media (max-width: 40rem) {
  .table--stack thead { display: none; }
  .table--stack caption { display: block; }
  .table-wrap > .table.table--stack, .table--stack tbody, .table--stack tr, .table--stack td, .table--stack th { display: block; }
  .table--stack { min-width: 0; }
  .table--stack tr { padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
  .table--stack tbody tr:last-child { border-bottom: 0; }
  .table--stack td, .table--stack th { border: 0; padding: var(--s1) var(--s3); }
  .table--stack td:not(:last-child), .table--stack th:not(:last-child) { min-width: 0; }
  .table--stack th[scope="row"] { font-weight: 600; }
  .table--stack td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
  .table--actions.table--stack td:last-child .row-actions, .table--stack .row-actions { flex-wrap: wrap; }
  .table--actions.table--stack td:last-child, .table--actions.table--stack th:last-child { width: auto; white-space: normal; }
  .table--wide.table--stack { min-width: 0; }
  .table--stack td.wrap, .table--stack td.wrap-word { max-width: none; }
  .table--stack .cell-detail { max-width: none; }
}
@media (max-width: 64rem) {
  .table--stack-lg thead { display: none; }
  .table--stack-lg caption { display: block; }
  .table-wrap > .table.table--stack-lg, .table--stack-lg tbody, .table--stack-lg tr, .table--stack-lg td, .table--stack-lg th { display: block; }
  .table--stack-lg { min-width: 0; }
  .table--stack-lg tr { padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
  .table--stack-lg tbody tr:last-child { border-bottom: 0; }
  .table--stack-lg td, .table--stack-lg th { border: 0; padding: var(--s1) var(--s3); }
  .table--stack-lg td:not(:last-child), .table--stack-lg th:not(:last-child) { min-width: 0; }
  .table--stack-lg th[scope="row"] { font-weight: 600; }
  .table--stack-lg td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
  .table--actions.table--stack-lg td:last-child .row-actions, .table--stack-lg .row-actions { flex-wrap: wrap; }
  .table--actions.table--stack-lg td:last-child, .table--actions.table--stack-lg th:last-child { width: auto; white-space: normal; }
  .table--wide.table--stack-lg { min-width: 0; }
  .table--stack-lg td.wrap, .table--stack-lg td.wrap-word { max-width: none; }
  .table--stack-lg .cell-detail { max-width: none; }
}
/* Always stacked: tables in narrow cards (dashboard incidents). */
.table--stack-all thead { display: none; }
.table--stack-all caption { display: block; }
.table-wrap > .table.table--stack-all, .table--stack-all tbody, .table--stack-all tr, .table--stack-all td, .table--stack-all th { display: block; }
.table--stack-all { min-width: 0; }
.table--stack-all tr { padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
.table--stack-all tbody tr:last-child { border-bottom: 0; }
.table--stack-all td, .table--stack-all th { border: 0; padding: var(--s1) var(--s3); }
.table--stack-all td:not(:last-child), .table--stack-all th:not(:last-child) { min-width: 0; }
.table--stack-all th[scope="row"] { font-weight: 600; }
.table--stack-all td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.table--actions.table--stack-all td:last-child .row-actions, .table--stack-all .row-actions { flex-wrap: wrap; }
.table--actions.table--stack-all td:last-child, .table--actions.table--stack-all th:last-child { width: auto; white-space: normal; }
.table--wide.table--stack-all { min-width: 0; }
.table--stack-all td.wrap, .table--stack-all td.wrap-word { max-width: none; }
.table--stack-all .cell-detail { max-width: none; }
/* Source times and stale note (#393): three labelled times; the stale note is neutral (no red/amber), the shape is a dashed rule like the Unknown ring. */
.src-times { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); margin: var(--s2) 0; font-size: var(--step--1); max-width: none; }
.src-times > div { min-width: 0; }
.src-times dt { color: var(--muted); }
.src-times dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.src-times .na { color: var(--muted); font-style: italic; }
.stale-note { max-width: var(--measure); margin: var(--s2) 0; padding: var(--s2) var(--s3); border: 1px dashed var(--muted); border-radius: var(--radius); background: var(--haze); color: var(--ink); font-size: var(--step--1); }
@media print {
  .site-header, .site-footer, .legal-nav, .cta-card { display: none; }
  body { background: #fff; color: #000; }
  a { color: inherit; text-decoration: underline; }
  p, li { max-width: none; }
}

/* Contract acceptance block (#375). */
.clickwrap { border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s3) var(--s4); margin: var(--s4) 0; min-width: 0; }
.clickwrap legend { font-weight: 600; padding: 0 var(--s2); }
.clickwrap .keyterms { max-width: none; }
.clickwrap .doc-links { margin: var(--s2) 0 var(--s3); padding-left: var(--s4); }
.clickwrap .check { display: flex; align-items: flex-start; gap: var(--s3); max-width: none; }
.clickwrap .check input { flex: none; width: 1.25rem; height: 1.25rem; margin: .2rem 0 0; }
.clickwrap .check label { min-height: 44px; display: block; }
