/* ==================================================================================================================
   usefulweb design system — foundation (tokens, base elements, forms, tables, shared components).
   platform.css adds the page layouts; apps.css the premium-app chrome; account.css the account UI.
   Themes: light tokens on :root; dark tokens when <html data-theme="dark"> (explicit choice, set by the server from the
   uw_theme cookie) or when the OS prefers dark and the visitor has not chosen light. Premium-app workspaces
   (html.uwapp-html) keep their own app themes: there only the platform top bar (.uwapp-bar) follows the site theme.
   The two dark blocks below are
   identical on purpose (tests/platform/theme.test.ts keeps them in sync). All colour pairs meet WCAG 2.2 AA in both
   themes: text ≥ 4.5:1, large text / UI parts / focus ring ≥ 3:1 (docs/ACCESSIBILITY.md "Themes").
   No web fonts are downloaded: the system UI font of each platform, with script-specific fallbacks in platform.css.
   ================================================================================================================== */
:root {
  color-scheme: light;
  /* surfaces & text */
  --canvas: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #f1f3f6;
  --surface-3: #e8ebf0;
  --line: #e2e5ea;
  --line-strong: #cdd2da;
  --control: #6b7588; /* form-control borders: ≥ 3:1 on every surface (1.4.11) */
  --ink: #101828;
  --ink-2: #344054;
  --muted: #556274;
  /* brand + state */
  --primary: #1652f0;
  --primary-text: #1346cc;
  --on-accent: #ffffff;
  --focus-color: #b45309; /* amber-700: ≥ 3:1 on white, the tints and the dark code blocks */
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --danger-line: #f4c7c2;
  --success: #0b6b2e;
  --success-bg: #edfaf1;
  --success-line: #b6e3c4;
  --warning: #8a4b00;
  --warning-bg: #fff8e6;
  --warning-line: #f3d58a;
  --info-bg: #eef4ff;
  --info-line: #c8d8fb;
  --code-bg: #0f172a;
  --code-ink: #e2e8f0;
  --code-line: #0f172a;
  --overlay: rgb(15 23 42 / .6);
  --shadow-1: 0 1px 2px rgb(16 24 40 / .05), 0 1px 3px rgb(16 24 40 / .05);
  --shadow-2: 0 2px 4px rgb(16 24 40 / .04), 0 10px 28px rgb(16 24 40 / .09);
  --shadow-3: 0 16px 48px rgb(16 24 40 / .2);
  /* HeaderLens status badges */
  --b-up: #0b6b2e; --b-up-bg: #e7f6ec;
  --b-restricted: #6b4e00; --b-restricted-bg: #fff6d6;
  --b-degraded: #8a3f00; --b-degraded-bg: #fff0e0;
  --b-down: #a11a1a; --b-down-bg: #fde8e8;
  --b-inconclusive: #374151; --b-inconclusive-bg: #eef0f4;
  /* category accent (platform.css sets it per [data-cat]); dark variant in --accent-dk */
  --accent: #1652f0;
  --accent-dk: #7aa7ff;

  /* scale */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --fs-xs: .78rem;
  --fs-sm: .875rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.3rem;
  --fs-2xl: clamp(1.4rem, 1.15rem + .9vw, 1.7rem);
  --fs-3xl: clamp(1.75rem, 1.3rem + 1.9vw, 2.5rem);
  --fs-display: clamp(2rem, 1.3rem + 2.9vw, 3.15rem);
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --r-sm: 6px; --r-md: 10px; --r-lg: 14px; --r-xl: 20px; --r-pill: 999px;
  --wrap: 1160px;
  --measure: 44rem;
  --control-h: 44px;
  --ease: cubic-bezier(.2, .7, .3, 1);

  /* legacy aliases (HeaderLens views, app/admin styles) */
  --blue: var(--primary);
  --blue-dark: var(--primary-text);
  --bg: var(--surface);
  --bg-soft: var(--surface-2);
  --ink-strong: var(--ink);
  --radius: var(--r-md);
  --tile-radius: var(--r-lg);
  --focus: 3px solid var(--focus-color);

  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* ---- dark theme: explicit choice (keep identical to the block in the media query below) ---- */
:root[data-theme="dark"]:not(.uwapp-html), :root.uwapp-html[data-theme="dark"] .uwapp-bar {
  color-scheme: dark;
  --canvas: #0d1015;
  --surface: #151920;
  --surface-2: #1c2129;
  --surface-3: #252b35;
  --line: #2a303a;
  --line-strong: #3b4350;
  --control: #7f8a9c;
  --ink: #e8ebf0;
  --ink-2: #c4cad4;
  --muted: #9ba5b4;
  --primary: #7aa7ff;
  --primary-text: #7aa7ff;
  --on-accent: #0b0e14;
  --focus-color: #fbbf24;
  --danger: #ff8f87;
  --danger-bg: #2a1517;
  --danger-line: #5c2a2c;
  --success: #5fd38d;
  --success-bg: #11251a;
  --success-line: #24533a;
  --warning: #f6c560;
  --warning-bg: #2a2110;
  --warning-line: #5a4519;
  --info-bg: #142036;
  --info-line: #2a4170;
  --code-bg: #0a0d12;
  --code-ink: #dfe5ee;
  --code-line: #2a303a;
  --overlay: rgb(0 0 0 / .7);
  --shadow-1: 0 1px 2px rgb(0 0 0 / .4);
  --shadow-2: 0 2px 4px rgb(0 0 0 / .3), 0 10px 28px rgb(0 0 0 / .35);
  --shadow-3: 0 16px 48px rgb(0 0 0 / .55);
  --b-up: #6ee7a0; --b-up-bg: #11251a;
  --b-restricted: #f5d36b; --b-restricted-bg: #2a2410;
  --b-degraded: #fdba74; --b-degraded-bg: #2c1d0e;
  --b-down: #fca5a5; --b-down-bg: #2c1416;
  --b-inconclusive: #cbd5e1; --b-inconclusive-bg: #1f242c;
}
/* ---- dark theme: follow the OS unless light was chosen ---- */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"], .uwapp-html), :root.uwapp-html:not([data-theme="light"]) .uwapp-bar {
    color-scheme: dark;
    --canvas: #0d1015;
    --surface: #151920;
    --surface-2: #1c2129;
    --surface-3: #252b35;
    --line: #2a303a;
    --line-strong: #3b4350;
    --control: #7f8a9c;
    --ink: #e8ebf0;
    --ink-2: #c4cad4;
    --muted: #9ba5b4;
    --primary: #7aa7ff;
    --primary-text: #7aa7ff;
    --on-accent: #0b0e14;
    --focus-color: #fbbf24;
    --danger: #ff8f87;
    --danger-bg: #2a1517;
    --danger-line: #5c2a2c;
    --success: #5fd38d;
    --success-bg: #11251a;
    --success-line: #24533a;
    --warning: #f6c560;
    --warning-bg: #2a2110;
    --warning-line: #5a4519;
    --info-bg: #142036;
    --info-line: #2a4170;
    --code-bg: #0a0d12;
    --code-ink: #dfe5ee;
    --code-line: #2a303a;
    --overlay: rgb(0 0 0 / .7);
    --shadow-1: 0 1px 2px rgb(0 0 0 / .4);
    --shadow-2: 0 2px 4px rgb(0 0 0 / .3), 0 10px 28px rgb(0 0 0 / .35);
    --shadow-3: 0 16px 48px rgb(0 0 0 / .55);
    --b-up: #6ee7a0; --b-up-bg: #11251a;
    --b-restricted: #f5d36b; --b-restricted-bg: #2a2410;
    --b-degraded: #fdba74; --b-degraded-bg: #2c1d0e;
    --b-down: #fca5a5; --b-down-bg: #2c1416;
    --b-inconclusive: #cbd5e1; --b-inconclusive-bg: #1f242c;
  }
}

/* ---- accent-derived tokens: recomputed wherever --accent changes ([data-cat], [data-app]) ---- */
:root, [data-cat], [data-app], .app-page, .uwapp-bar {
  --accent-text: color-mix(in srgb, var(--accent) 85%, #000);
  --accent-solid: var(--accent);
  --accent-hover: color-mix(in srgb, var(--accent) 82%, #000);
  --accent-tint: color-mix(in srgb, var(--accent) 7%, var(--surface));
  --accent-tint-2: color-mix(in srgb, var(--accent) 13%, var(--surface));
  --accent-line: color-mix(in srgb, var(--accent) 32%, var(--line));
}
:root[data-theme="dark"]:not(.uwapp-html), :root[data-theme="dark"]:not(.uwapp-html) :is([data-cat], [data-app], .app-page), :root.uwapp-html[data-theme="dark"] .uwapp-bar {
  --accent-text: var(--accent);
  --accent-hover: color-mix(in srgb, var(--accent) 85%, #fff);
  --accent-tint: color-mix(in srgb, var(--accent) 10%, var(--surface));
  --accent-tint-2: color-mix(in srgb, var(--accent) 18%, var(--surface));
  --accent-line: color-mix(in srgb, var(--accent) 40%, var(--line));
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"], .uwapp-html), :root:not([data-theme="light"], .uwapp-html) :is([data-cat], [data-app], .app-page), :root.uwapp-html:not([data-theme="light"]) .uwapp-bar {
    --accent-text: var(--accent);
    --accent-hover: color-mix(in srgb, var(--accent) 85%, #fff);
    --accent-tint: color-mix(in srgb, var(--accent) 10%, var(--surface));
    --accent-tint-2: color-mix(in srgb, var(--accent) 18%, var(--surface));
    --accent-line: color-mix(in srgb, var(--accent) 40%, var(--line));
  }
}

/* ================================================================== base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 84px; }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); text-rendering: optimizeLegibility; }
:where(html:not(.uwapp-html), .uwapp-bar) img, :where(html:not(.uwapp-html), .uwapp-bar) svg, :where(html:not(.uwapp-html), .uwapp-bar) video, :where(html:not(.uwapp-html), .uwapp-bar) canvas, :where(html:not(.uwapp-html), .uwapp-bar) picture { max-width: 100%; }
:where(html:not(.uwapp-html), .uwapp-bar) img, :where(html:not(.uwapp-html), .uwapp-bar) video { height: auto; }
:where(html:not(.uwapp-html), .uwapp-bar) h1, :where(html:not(.uwapp-html), .uwapp-bar) h2, :where(html:not(.uwapp-html), .uwapp-bar) h3, :where(html:not(.uwapp-html), .uwapp-bar) h4 { color: var(--ink); line-height: 1.22; text-wrap: balance; margin: 1.4em 0 .5em; }
:where(html:not(.uwapp-html), .uwapp-bar) h1 { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -.022em; margin-top: .4em; }
:where(html:not(.uwapp-html), .uwapp-bar) h2 { font-size: var(--fs-2xl); font-weight: 700; letter-spacing: -.015em; }
:where(html:not(.uwapp-html), .uwapp-bar) h3 { font-size: var(--fs-xl); font-weight: 600; letter-spacing: -.01em; }
:where(html:not(.uwapp-html), .uwapp-bar) h4 { font-size: var(--fs-lg); font-weight: 600; }
:where(html:not(.uwapp-html), .uwapp-bar) p, :where(html:not(.uwapp-html), .uwapp-bar) li { text-wrap: pretty; }
:where(html:not(.uwapp-html), .uwapp-bar) p { margin: 0 0 1em; }
:where(html:not(.uwapp-html), .uwapp-bar) ul, :where(html:not(.uwapp-html), .uwapp-bar) ol { padding-inline-start: 1.35em; }
:where(html:not(.uwapp-html), .uwapp-bar) li + li { margin-top: .25em; }
:where(html:not(.uwapp-html), .uwapp-bar) hr { border: 0; border-top: 1px solid var(--line); margin: var(--sp-6) 0; }
:where(html:not(.uwapp-html), .uwapp-bar) a { color: var(--accent-text); text-decoration-thickness: from-font; text-underline-offset: .18em; }
:where(html:not(.uwapp-html), .uwapp-bar) a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus-color); outline-offset: 2px; }
main:focus, [tabindex="-1"]:focus:not(:focus-visible) { outline: none; }
:where(html:not(.uwapp-html), .uwapp-bar) strong, :where(html:not(.uwapp-html), .uwapp-bar) b { font-weight: 600; }
:where(html:not(.uwapp-html), .uwapp-bar) small, .small { font-size: var(--fs-sm); }
.muted { color: var(--muted); }
.break { word-break: break-all; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: clamp(16px, 4vw, 28px); }
.narrow { max-width: calc(var(--measure) + 56px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
/* Off-screen upwards, not sideways: no horizontal scrollbar in RTL. */
.skip { position: absolute; inset-inline-start: 8px; top: 8px; z-index: 100; transform: translateY(calc(-100% - 16px)); background: var(--ink); color: var(--surface); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 600; text-decoration: none; }
.skip:focus { transform: none; color: var(--surface); }
:where(html:not(.uwapp-html), .uwapp-bar) code, :where(html:not(.uwapp-html), .uwapp-bar) kbd, :where(html:not(.uwapp-html), .uwapp-bar) samp { font-family: var(--font-mono); font-size: .9em; }
:where(html:not(.uwapp-html), .uwapp-bar) code { background: var(--surface-2); color: var(--ink); padding: .08em .35em; border-radius: 5px; border: 1px solid var(--line); overflow-wrap: anywhere; }
:where(html:not(.uwapp-html), .uwapp-bar) pre { background: var(--code-bg); color: var(--code-ink); border: 1px solid var(--code-line); padding: 14px 16px; border-radius: var(--r-md); overflow: auto; max-width: 100%; max-height: 520px; font-size: .88rem; line-height: 1.55; tab-size: 2; }
:where(html:not(.uwapp-html), .uwapp-bar) pre code { background: none; color: inherit; border: 0; padding: 0; white-space: pre; font-size: inherit; overflow-wrap: normal; }
:where(html:not(.uwapp-html), .uwapp-bar) kbd { display: inline-block; min-width: 1.6em; padding: .05em .45em; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: .82em; text-align: center; }
:where(html:not(.uwapp-html), .uwapp-bar) blockquote { margin: 1.2em 0; padding: .2em 1.1em; border-inline-start: 3px solid var(--line-strong); color: var(--ink-2); }
:where(html:not(.uwapp-html), .uwapp-bar) details > summary { cursor: pointer; }
::selection { background: color-mix(in srgb, var(--primary) 28%, transparent); }

/* ================================================================== forms & buttons */
:where(html:not(.uwapp-html), .uwapp-bar) input, :where(html:not(.uwapp-html), .uwapp-bar) select, :where(html:not(.uwapp-html), .uwapp-bar) textarea, :where(html:not(.uwapp-html), .uwapp-bar) button { font: inherit; color: inherit; }
:where(html:not(.uwapp-html), .uwapp-bar) input:not([type=checkbox], [type=radio], [type=range], [type=color], [type=file], [type=submit], [type=button]), :where(html:not(.uwapp-html), .uwapp-bar) select, :where(html:not(.uwapp-html), .uwapp-bar) textarea {
  min-height: var(--control-h); padding: 9px 12px; border: 1.5px solid var(--control); border-radius: var(--r-md); background: var(--surface); color: var(--ink); max-width: 100%;
  transition: border-color .12s var(--ease), box-shadow .12s var(--ease);
}
:where(html:not(.uwapp-html), .uwapp-bar) textarea { min-height: 6rem; line-height: 1.5; resize: vertical; }
:where(html:not(.uwapp-html), .uwapp-bar) select { padding-inline-end: 34px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
[dir=rtl]:not(.uwapp-html) select, [dir=rtl] .uwapp-bar select { background-position: 13px 50%, 18px 50%; }
:where(html:not(.uwapp-html), .uwapp-bar) input::placeholder, :where(html:not(.uwapp-html), .uwapp-bar) textarea::placeholder { color: var(--muted); opacity: 1; }
:where(html:not(.uwapp-html), .uwapp-bar) input:focus-visible, :where(html:not(.uwapp-html), .uwapp-bar) select:focus-visible, :where(html:not(.uwapp-html), .uwapp-bar) textarea:focus-visible { border-color: var(--accent-text); outline: 3px solid var(--focus-color); outline-offset: 1px; }
:where(html:not(.uwapp-html), .uwapp-bar) input[type=checkbox], :where(html:not(.uwapp-html), .uwapp-bar) input[type=radio] { width: 1.2em; height: 1.2em; accent-color: var(--accent-solid); margin: 0; flex: none; }
:where(html:not(.uwapp-html), .uwapp-bar) input[type=file] { max-width: 100%; padding: 8px; border: 1.5px dashed var(--control); border-radius: var(--r-md); background: var(--surface-2); color: var(--ink); }
:where(html:not(.uwapp-html), .uwapp-bar) input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-inline-end: 12px; padding: 7px 14px; border: 0; border-radius: var(--r-sm); background: var(--accent-solid); color: var(--on-accent); cursor: pointer; }
[aria-invalid="true"] { border-color: var(--danger) !important; }

:where(html:not(.uwapp-html), .uwapp-bar) button, .button-link {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: var(--control-h);
  font-weight: 600; font-size: 1rem; line-height: 1.2; padding: 10px 20px; border: 1.5px solid transparent; border-radius: var(--r-md);
  background: var(--accent-solid); color: var(--on-accent); cursor: pointer; text-decoration: none;
  transition: background-color .12s var(--ease), border-color .12s var(--ease), color .12s var(--ease), transform .12s var(--ease);
}
:where(html:not(.uwapp-html), .uwapp-bar) button:hover { background: var(--accent-hover); color: var(--on-accent); }
:where(html:not(.uwapp-html), .uwapp-bar) button:active { transform: translateY(1px); }
:where(html:not(.uwapp-html), .uwapp-bar) button[aria-busy="true"] { opacity: .75; cursor: progress; }
:where(html:not(.uwapp-html), .uwapp-bar) button.secondary, .button-link { background: var(--surface); color: var(--accent-text); border-color: var(--accent-line); }
:where(html:not(.uwapp-html), .uwapp-bar) button.secondary:hover, .button-link:hover { background: var(--accent-tint); color: var(--accent-text); border-color: var(--accent-text); }
.button-link.button-primary { background: var(--accent-solid); color: var(--on-accent); border-color: transparent; }
.button-link.button-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.hint { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--muted); }
.error { margin: 6px 0 0; color: var(--danger); font-weight: 600; }

/* HeaderLens check form */
.check-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--sp-4); box-shadow: var(--shadow-2); }
.check-form.compact { box-shadow: none; }
.check-label { display: block; font-weight: 600; margin-bottom: 6px; }
.check-row { display: flex; gap: 8px; }
.check-row input { flex: 1; min-width: 0; font-size: 1.05rem; }
@media (max-width: 560px) { .check-row { flex-direction: column; } .check-row button { width: 100%; } }

/* ================================================================== tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); margin: 8px 0 14px; }
.table-wrap > table { margin: 0; }
:where(html:not(.uwapp-html), .uwapp-bar) table { border-collapse: collapse; width: 100%; margin: 8px 0 14px; font-size: .94rem; font-variant-numeric: tabular-nums; }
:where(html:not(.uwapp-html), .uwapp-bar) caption { text-align: start; font-weight: 600; padding: 10px 12px 6px; color: var(--ink); caption-side: top; }
:where(html:not(.uwapp-html), .uwapp-bar) th, :where(html:not(.uwapp-html), .uwapp-bar) td { text-align: start; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
:where(html:not(.uwapp-html), .uwapp-bar) thead th { background: var(--surface-2); color: var(--ink-2); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
:where(html:not(.uwapp-html), .uwapp-bar) tbody tr:last-child > * { border-bottom: 0; }
:where(html:not(.uwapp-html), .uwapp-bar) tbody tr:nth-child(even) { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
:where(html:not(.uwapp-html), .uwapp-bar) tbody th { font-weight: 600; }
:where(html:not(.uwapp-html), .uwapp-bar) th .small { font-weight: 400; }
.kv th { width: 140px; }

/* ---- premium-app workspaces (html.uwapp-html): the app UIs were built against these element defaults; keep them
   stable there (light, as before the redesign). Only the platform top bar (.uwapp-bar) uses the element styles above. */
:where(.uwapp-html) a { color: color-mix(in srgb, var(--accent) 85%, #000); text-underline-offset: 2px; }
:where(.uwapp-html) code { font-family: var(--font-mono); font-size: .92em; background: #f5f7fb; padding: .05em .3em; border-radius: 4px; }
:where(.uwapp-html) pre { background: #0f172a; color: #e2e8f0; padding: 14px; border-radius: 8px; overflow-x: auto; max-width: 100%; max-height: 520px; }
:where(.uwapp-html) pre code { background: none; color: inherit; white-space: pre; }
:where(.uwapp-html) button { font: inherit; font-weight: 600; font-size: 1.05rem; padding: 12px 20px; border: 0; border-radius: 10px; background: #1652f0; color: #fff; cursor: pointer; }
:where(.uwapp-html) button[type=submit] { background: var(--accent); border-color: var(--accent); }
:where(.uwapp-html) button:hover { background: #0b3cc1; }
:where(.uwapp-html) button[type=submit]:hover { background: color-mix(in srgb, var(--accent) 80%, #000); }
:where(.uwapp-html) button[aria-busy="true"] { opacity: .75; cursor: progress; }
:where(.uwapp-html) button.secondary { background: #fff; color: #1652f0; border: 2px solid #1652f0; padding: 8px 14px; font-size: .95rem; }
:where(.uwapp-html) table { border-collapse: collapse; width: 100%; margin: 8px 0 12px; font-size: .95rem; }
:where(.uwapp-html) caption { text-align: start; font-weight: 600; padding: 4px 0; }
:where(.uwapp-html) :is(th, td) { text-align: start; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; }
:where(.uwapp-html) thead th { background: #f5f7fb; }
:where(.uwapp-html) .uwapp-bar button { min-height: 32px; }

/* ================================================================== callouts & badges */
.callout { background: var(--warning-bg); border: 1px solid var(--warning-line); color: var(--ink); padding: 12px 16px; border-radius: var(--r-md); margin: 12px 0; }
.callout-info, .callout.info { background: var(--info-bg); border-color: var(--info-line); }
.callout-good { background: var(--success-bg); border-color: var(--success-line); }
.callout-warning { background: var(--warning-bg); border-color: var(--warning-line); }
.callout > :last-child { margin-bottom: 0; }
.callout > :first-child { margin-top: 0; }
/* Badges: icon + text, never colour alone */
.badge { display: inline-flex; align-items: center; gap: 4px; border-radius: var(--r-pill); padding: 2px 10px; font-weight: 700; font-size: .85rem; border: 1px solid currentColor; }
.badge-lg { font-size: 1.15rem; padding: 6px 16px; }
.badge-icon { font-weight: 900; }
.badge-up { background: var(--b-up-bg); color: var(--b-up); }
.badge-reachable_restricted { background: var(--b-restricted-bg); color: var(--b-restricted); }
.badge-degraded { background: var(--b-degraded-bg); color: var(--b-degraded); }
.badge-down { background: var(--b-down-bg); color: var(--b-down); }
.badge-inconclusive { background: var(--b-inconclusive-bg); color: var(--b-inconclusive); }
.sev { white-space: nowrap; font-weight: 700; }
.sev-good { color: var(--success); }
.sev-info { color: var(--ink-2); }
.sev-warning { color: var(--warning); }

/* ================================================================== HeaderLens pages (views/pages.ts) */
.hero { padding: var(--sp-6) 0 var(--sp-5); }
.hero h1 { margin: 0 0 8px; }
.lede { font-size: var(--fs-lg); color: var(--ink-2); margin: 0 0 var(--sp-4); max-width: 46em; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--sp-6); margin-top: var(--sp-5); }
@media (max-width: 760px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
.recent-list a { font-weight: 600; }
.ticks { padding-inline-start: 1.2em; }
.ticks li { margin-bottom: 8px; }
.faq details { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 16px; margin-bottom: 8px; background: var(--surface); }
.faq summary { font-weight: 600; }
.result-head { padding: var(--sp-5) 0 var(--sp-2); }
.result-head h1 { margin: 0 0 12px; }
.result-head h1:focus, #result-title:focus { outline: none; } /* programmatic focus targets (platform.js) */
.verdict { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.verdict-text { margin: 0; font-size: var(--fs-lg); font-weight: 500; }
.inline-form { margin-top: 8px; }
.machine code { word-break: break-all; }
.check-another { margin-top: var(--sp-6); }
.prose h2 { margin-top: 1.7em; }

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