/* OCC proof application, status page. Mirrors the OWL-IT portal (Mantine theme in the frontend's
   src/app/features/global/theme/theme.tsx): Anek Latin for text, Space Grotesk for headings,
   primary #0054BC, radius 10px, light badges, light and dark scheme.
   One spacing scale: 4 / 8 / 12 / 16 / 24 / 32. One gutter: 16 between columns, 24 between rows.
   Fonts: Anek Latin and Space Grotesk, SIL Open Font License 1.1 (licence in the font files). */

@font-face {
  font-family: "Anek Latin";
  src: url("anek-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("space-grotesk.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Follows the system unless the theme switch set data-theme on <html>. */
  color-scheme: light dark;
  --font: "Anek Latin", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-head: "Space Grotesk", "Anek Latin", -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px;
  --gutter: 16px;
  --row-gap: 24px;
  --r-sm: 8px; --r-md: 10px;
  --row-h: 36px;

  /* light-dark(<light>, <dark>): the portal's gray-0 / dark-6 surfaces. */
  --page: light-dark(#ffffff, #111111);
  --surface: light-dark(#fafafa, #171717);
  --surface-2: light-dark(#f3f5f7, #1f1f1f);
  --ink: light-dark(#061d2a, #f1f1f1);
  --dimmed: light-dark(#56676f, #9a9a9a);
  --line: light-dark(#e1e7eb, #2c2c2c);
  --line-strong: light-dark(#c9d1d6, #3d3d3d);
  --primary: light-dark(#0054bc, #69aafb);
  --primary-fill: light-dark(#0054bc, #1e77fb);
  --primary-fill-hover: light-dark(#004db2, #1165e1);
  --primary-tint: light-dark(rgba(0, 84, 188, .08), rgba(30, 119, 251, .15));

  --ok: light-dark(#276c0a, #87de57);
  --ok-fill: light-dark(#4da91b, #59be23);
  --ok-tint: light-dark(rgba(77, 169, 27, .11), rgba(107, 215, 49, .14));
  --bad: light-dark(#c10008, #f76d6d);
  --bad-fill: light-dark(#f22625, #f34141);
  --bad-tint: light-dark(rgba(242, 38, 37, .08), rgba(242, 38, 37, .15));
  --warn: light-dark(#8c4800, #fdb766);
  --warn-fill: light-dark(#fb931d, #fca13a);
  --warn-tint: light-dark(rgba(251, 147, 29, .12), rgba(251, 147, 29, .14));
  --off: light-dark(#4a5a63, #b5bdc2);
  --off-tint: light-dark(rgba(107, 124, 133, .11), rgba(181, 189, 194, .1));
  --flag: light-dark(#6741d9, #9775fa);
  --start: light-dark(#0054bc, #69aafb);
  --bubble: light-dark(#222222, #3a3a3a);
  --shadow-c: light-dark(rgba(6, 29, 42, .05), transparent);
  --shadow: 0 1px 2px var(--shadow-c), 0 1px 1px var(--shadow-c);
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

/* Base */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 15px/1.5 var(--font); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; margin: 0; line-height: 1.3; }
p { margin: 0; }
a { color: var(--primary); text-underline-offset: 2px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--font-mono); font-size: .875em; letter-spacing: 0; }
.dim { color: var(--dimmed); }
.num, td, .tile-value, .fv { font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ico.accent { color: var(--primary); }
.container { max-width: 1360px; margin: 0 auto; padding: 0 var(--s8); }
.page { padding-top: var(--s6); padding-bottom: var(--s8); display: flex; flex-direction: column; gap: var(--s6); }
.stack { display: flex; flex-direction: column; gap: var(--s6); }
.stack:not(:has(> *)) { display: none; }
.stack-sm { display: flex; flex-direction: column; gap: var(--s4); }
.empty { color: var(--dimmed); font-size: 14px; }

/* Authorised-use notice: one compact line, a soft amber signal (AA in both schemes). */
.legal { background: light-dark(#fdf1d3, #2a2110); border-bottom: 1px solid light-dark(#f2c862, #4d3c16); color: light-dark(#6b4500, #f3c66b); font-size: 13px; line-height: 20px; }
.legal .container { display: flex; justify-content: center; height: 34px; align-items: center; }
.legal-line { display: inline-flex; align-items: center; gap: var(--s2); min-width: 0; max-width: 100%; }
.legal-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legal b { font-weight: 600; }
.legal .ico { width: 14px; height: 14px; }
.legal .tip { color: inherit; }
.legal .tip:hover, .legal .tip:focus-visible { color: inherit; opacity: .75; }

/* Header */
.appbar { border-bottom: 1px solid var(--line); background: var(--page); }
.appbar .container { display: flex; align-items: center; gap: var(--s6); min-height: 72px; padding-top: var(--s3); padding-bottom: var(--s3); flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: var(--s4); min-width: 0; }
.logo { display: block; height: 22px; width: auto; color: var(--ink); flex: none; }
.brand .divider { width: 1px; height: 36px; background: var(--line); }
.brand h1 { font-size: 20px; line-height: 24px; }
.brand .subtitle { color: var(--dimmed); font-size: 14px; line-height: 20px; }
.install { margin-left: auto; display: flex; align-items: center; gap: var(--s4); flex-wrap: wrap; justify-content: flex-end; }
.install .app { text-align: right; line-height: 20px; min-width: 0; max-width: 300px; }
.install .app strong, .install .app span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.install .app strong { font-weight: 600; }
.install .app span { color: var(--dimmed); font-size: 13px; }
.live { display: inline-flex; align-items: center; gap: var(--s2); height: 32px; padding: 0 var(--s3); font-size: 13px; color: var(--dimmed); border: 1px solid var(--line); border-radius: 999px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.live .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok-fill); animation: pulse 2s infinite; }
.live.stale .dot { background: var(--bad-fill); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(77, 169, 27, .45); } 70% { box-shadow: 0 0 0 6px rgba(77, 169, 27, 0); } 100% { box-shadow: 0 0 0 0 rgba(77, 169, 27, 0); } }

/* Buttons and segmented controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s2); height: 36px; padding: 0 var(--s4); border-radius: var(--r-sm); border: 1px solid transparent; font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { background: var(--primary-fill); color: #fff; }
.btn-primary:hover { background: var(--primary-fill-hover); }
.btn-secondary { background: var(--page); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn:disabled { opacity: .6; cursor: progress; }
.icon-btn { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--dimmed); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.seg { display: inline-flex; padding: 2px; gap: 2px; height: 32px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.seg button { display: grid; place-items: center; min-width: 28px; padding: 0 var(--s3); border: 0; border-radius: 6px; background: transparent; color: var(--dimmed); cursor: pointer; font: 600 13px/1 var(--font); }
.theme-switch button { padding: 0; width: 28px; }
.seg a { display: grid; place-items: center; min-width: 32px; padding: 0 var(--s2); border-radius: 6px; color: var(--dimmed); font: 700 12px/1 var(--font); letter-spacing: .04em; text-decoration: none; }
.seg a:hover { color: var(--ink); }
.seg a[aria-current="true"] { background: var(--page); color: var(--primary); box-shadow: 0 1px 2px light-dark(rgba(6, 29, 42, .12), rgba(0, 0, 0, .5)); }
.seg .ico { width: 16px; height: 16px; stroke-width: 1.8; }
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--page); color: var(--primary); box-shadow: 0 1px 2px light-dark(rgba(6, 29, 42, .12), rgba(0, 0, 0, .5)); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s6); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; min-height: 36px; padding-bottom: var(--s4); margin-bottom: var(--s6); border-bottom: 1px solid var(--line); }
.head-title { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.card-head h2 { font-size: 18px; line-height: 24px; }
.head-meta, .section-meta { font-size: 13px; color: var(--dimmed); font-variant-numeric: tabular-nums; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.section-title { display: flex; align-items: center; gap: var(--s1); font-size: 15px; line-height: 20px; margin: 0 0 var(--s3); }
.section-head .section-title { margin: 0; }
.label, .tile-label { font-size: 13px; line-height: 20px; font-weight: 500; color: var(--dimmed); display: flex; align-items: center; gap: var(--s1); }

/* Badges: Mantine "light" variant. */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 10px; border-radius: 999px; font: 700 11px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.b-ok { color: var(--ok); background: var(--ok-tint); }
.b-error { color: var(--bad); background: var(--bad-tint); }
.b-warn, .b-connecting { color: var(--warn); background: var(--warn-tint); }
.b-off { color: var(--off); background: var(--off-tint); }
.b-info { color: var(--primary); background: var(--primary-tint); }
.b-neutral { color: var(--ink); background: var(--surface-2); }
.b-connecting::before { animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* Info tips: a quiet circled "i"; the bubble is position: fixed (placed by the script) and carries
   the hidden attribute, so it never shows as inline text, not even without this stylesheet. */
.tipwrap { display: inline-flex; vertical-align: middle; }
.tip { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--dimmed); cursor: help; }
.tip svg { width: 16px; height: 16px; display: block; }
.tip:hover, .tip:focus-visible, .tip[aria-expanded="true"] { color: var(--primary); }
.tip-bubble[hidden] { display: block !important; }
.tip-bubble { position: fixed; z-index: 60; left: 0; top: 0; width: max-content; max-width: min(320px, calc(100vw - 16px)); padding: var(--s2) var(--s3); border-radius: var(--r-sm); background: var(--bubble); color: #fff; font: 400 13px/1.45 var(--font); text-transform: none; letter-spacing: 0; text-align: left; white-space: normal; box-shadow: 0 4px 16px rgba(0, 0, 0, .2); visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .12s ease; }
.tip-bubble::after { content: ""; position: absolute; top: 100%; left: var(--arrow, 50%); margin-left: -5px; border: 5px solid transparent; border-top-color: var(--bubble); }
.tip-bubble { white-space: pre-line; }
.svg-tip.on { visibility: visible; opacity: 1; }
.tip-bubble.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--bubble); }
.tip:hover + .tip-bubble, .tip:focus + .tip-bubble, .tip[aria-expanded="true"] + .tip-bubble { visibility: visible; opacity: 1; }
.tip.closed + .tip-bubble { visibility: hidden; opacity: 0; }

/* Restore banner: prominent, calm (yellow like the portal's backup hold banner). */
.banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s4) var(--s6); align-items: start; padding: var(--s6); border-radius: var(--r-md); background: var(--warn-tint); border: 1px solid color-mix(in srgb, var(--warn-fill) 45%, transparent); }
.banner-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--warn-fill) 22%, transparent); color: var(--warn); }
.banner-icon .ico { width: 22px; height: 22px; }
.banner h2 { font-size: 20px; line-height: 28px; display: flex; align-items: center; gap: var(--s2); }
.banner-kinds { display: flex; gap: var(--s2); flex-wrap: wrap; margin: var(--s2) 0; }
.banner p { max-width: 80ch; }
.banner-cut { text-align: right; white-space: nowrap; }
.banner-cut .label { justify-content: flex-end; }
.banner-cut .when { font: 700 28px/36px var(--font-head); }
.banner-cut .sub { font-size: 13px; line-height: 20px; color: var(--dimmed); }
/* A stop of the application lost nothing: neutral, with the orange of the timeline's stops. */
.banner.banner-stop { background: var(--surface); border-color: var(--line-strong); border-left: 4px solid var(--warn-fill); }
.banner.banner-stop .banner-icon { background: var(--warn-tint); }

/* Explainer */
details.explain { padding: 0; }
details.explain summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s6); font: 700 16px/24px var(--font-head); border-radius: var(--r-md); }
details.explain summary::-webkit-details-marker { display: none; }
details.explain .chev { margin-left: auto; color: var(--dimmed); transition: transform .15s ease; }
details.explain[open] .chev { transform: rotate(180deg); }
.explain-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s6); padding: 0 var(--s6) var(--s6); }
.explain-body > div { border-top: 1px solid var(--line); padding-top: var(--s4); }
.explain-body h3 { font-size: 15px; line-height: 20px; display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.explain-body p { color: var(--dimmed); font-size: 14px; }
.step-n { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-tint); color: var(--primary); font: 700 12px/1 var(--font); flex: none; }

/* Facts row: one line of equal tiles; long values are cut with an ellipsis (full value in the
   title and in the tile's popover). */
.card.facts { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); padding: 0; }
.fact { padding: var(--s4); border-left: 1px solid var(--line); min-width: 0; }
.fact:first-child { border-left: 0; }
.fact .label { gap: var(--s1); min-width: 0; }
.fact .label-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fv { font-weight: 600; font-size: 15px; line-height: 24px; margin-top: var(--s1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fv .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-block; line-height: 22px; vertical-align: top; margin-top: 1px; }
.fv.mono { font-size: 13px; }
.fsub { font-size: 13px; line-height: 20px; color: var(--dimmed); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* OCC detail popover (click to open, ids can be selected and copied). */
.popwrap { display: inline-flex; flex: none; }
.popover[hidden] { display: none !important; }
.popover { position: fixed; z-index: 65; width: min(440px, calc(100vw - 16px)); background: var(--page); color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--r-md); box-shadow: 0 12px 32px rgba(0, 0, 0, .18); font-size: 14px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.pop-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); border-bottom: 1px solid var(--line); font: 700 15px/20px var(--font-head); }
.pop-list { margin: 0; padding: var(--s2) var(--s4) var(--s3); }
.pop-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s3); align-items: center; min-height: 36px; border-bottom: 1px solid var(--line); }
.pop-row:last-child { border-bottom: 0; }
.pop-row dt { color: var(--dimmed); font-size: 13px; }
.pop-row dd { margin: 0; display: flex; align-items: center; gap: var(--s2); min-width: 0; }
.pop-val { min-width: 0; overflow-wrap: anywhere; user-select: all; line-height: 20px; padding: var(--s1) 0; }
.pop-val.mono { font-size: 12.5px; }
.copy-btn { flex: none; margin-left: auto; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--dimmed); cursor: pointer; }
.copy-btn:hover { color: var(--primary); border-color: var(--line-strong); }
.copy-btn .ico { width: 14px; height: 14px; }
.copy-btn .i-done { display: none; }
.copy-btn.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok-fill) 50%, var(--line)); }
.copy-btn.done .i-copy { display: none; }
.copy-btn.done .i-done { display: block; }
.popover .empty { padding: 0 var(--s4) var(--s3); }

/* Timeline */
.timeline .legend { margin: calc(-1 * var(--s2)) 0 var(--s4); }
.timeline svg { display: block; width: 100%; height: auto; overflow: visible; }
.timeline svg text { font: 500 13px var(--font); fill: var(--ink); }
.timeline svg .row-title { font: 700 14px var(--font-head); }
.timeline svg .row-title.off { fill: var(--dimmed); }
.timeline svg .axis { fill: var(--dimmed); font-size: 12px; }
.timeline svg .axis.date { fill: var(--ink); font-weight: 700; }
.timeline svg .now { fill: var(--primary); font-weight: 700; font-size: 12px; }
.timeline svg .now-line { stroke: var(--primary); stroke-width: 1.5; stroke-dasharray: 3 3; }
.timeline svg .grid { stroke: var(--line); stroke-width: 1; }
.timeline svg .grid.date { stroke: var(--line-strong); }
.timeline svg .tick, .timeline svg .baseline { stroke: var(--line-strong); stroke-width: 1; }
.timeline svg .track { fill: var(--surface-2); stroke: var(--line); }
.timeline svg .track.off { fill: none; stroke: var(--line-strong); stroke-dasharray: 4 4; }
.timeline svg .note { fill: var(--dimmed); font-size: 12.5px; }
.timeline svg .span { fill: var(--ok-fill); }
.timeline svg .pause { fill: var(--warn-fill); }
.timeline svg .gap { fill: var(--bad-fill); }
.timeline svg .gap-label { fill: #fff; font-weight: 700; font-size: 12px; }
.timeline svg .stop { fill: var(--warn-fill); }
.timeline svg .stop-label { fill: #2b1600; font-weight: 700; font-size: 12px; }
.timeline svg .start { stroke: var(--start); stroke-width: 2; }
.timeline svg .start-cap { fill: var(--start); }
.timeline svg .flag { stroke: var(--flag); stroke-width: 2; }
.timeline svg .flag-c { fill: var(--flag); }
.timeline svg .hit-area { fill: transparent; stroke: none; }
.timeline svg .marker { cursor: default; outline: none; }
.timeline svg .flag-m { cursor: pointer; }
.timeline svg .marker:hover .hit-area { fill: light-dark(rgba(0, 84, 188, .07), rgba(105, 170, 251, .12)); }
.timeline svg .marker:focus-visible .hit-area { stroke: var(--primary); stroke-width: 2; fill: var(--primary-tint); }
.timeline svg .count-bg { fill: var(--flag); stroke: var(--surface); stroke-width: 2; }
.timeline svg .count-bg.start-bg { fill: var(--start); }
.timeline svg .count-t { fill: #fff; font: 700 10px var(--font); }
.legend { display: flex; gap: var(--s2) var(--s6); flex-wrap: wrap; font-size: 13px; line-height: 20px; color: var(--dimmed); }
.legend span { display: inline-flex; align-items: center; gap: var(--s2); }
.legend i { display: inline-block; width: 16px; height: 10px; border-radius: 3px; }
.legend i.line { width: 3px; height: 14px; border-radius: 1px; }
.legend .l-span { background: var(--ok-fill); }
.legend .l-gap { background: var(--bad-fill); }
.legend .l-stop { background: var(--warn-fill); }
.legend .l-start { background: var(--start); }
.legend .l-flag { background: var(--flag); }

/* The 12-column grid inside a data-kind card. */
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--row-gap) var(--gutter); align-items: start; }
.span-3 { grid-column: span 3; }
.span-6 { grid-column: span 6; }
.span-12 { grid-column: 1 / -1; }
.grid12 > .tile { align-self: stretch; }

/* Key-figure tiles: label, value and sub line on the same baselines in every tile. */
.tile { background: var(--page); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); min-width: 0; }
.tile-value { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s1); font: 700 24px/32px var(--font-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-value .ico { width: 22px; height: 22px; stroke-width: 2.6; }
.tile-value.ok, .age { color: var(--ok); }
.tile-value.bad, .age.stale { color: var(--bad); }
.tile-value.none { color: var(--dimmed); }
.tile-sub { font-size: 13px; line-height: 20px; color: var(--dimmed); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-ok { border-color: color-mix(in srgb, var(--ok-fill) 40%, var(--line)); }
.tile-bad { border-color: color-mix(in srgb, var(--bad-fill) 50%, var(--line)); background: color-mix(in srgb, var(--bad-tint) 60%, var(--page)); }

/* Alerts and notes */
.alert { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s1) var(--s3); border-radius: var(--r-md); padding: var(--s4); }
.alert > .ico { margin-top: 1px; }
.alert-error { background: var(--bad-tint); color: var(--bad); }
.alert-title { font-weight: 700; }
.alert-msg { color: var(--ink); font-size: 14px; word-break: break-word; margin-top: var(--s1); }
.alert-since { color: var(--dimmed); font-size: 13px; margin-top: var(--s1); }
.note-warn { background: var(--warn-tint); border-radius: var(--r-sm); padding: var(--s2) var(--s3); font-size: 14px; margin-bottom: var(--s3); }
.note-warn b { color: var(--warn); }
.table-note.shared-fs { display: block; }
.shared-fs .tipwrap { margin-left: 2px; }
.gap-list { display: flex; flex-direction: column; gap: var(--s2); }
.gap-row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; min-height: var(--row-h); padding: var(--s1) var(--s3); border-radius: var(--r-sm); background: var(--bad-tint); font-size: 14px; }
.gap-dur { margin-left: auto; color: var(--bad); font-weight: 700; }
.gap-row.stop { background: var(--warn-tint); }
.gap-row.stop .gap-dur { color: var(--warn); }

/* Volume usage */
.usage { background: var(--page); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4); margin-bottom: var(--s3); }
.usage-head, .usage-foot { display: flex; justify-content: space-between; gap: var(--s3); font-size: 14px; line-height: 20px; }
.usage-foot { font-size: 13px; color: var(--dimmed); }
.usage-bar { height: 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin: var(--s2) 0; }
.usage-bar span { display: block; height: 100%; background: var(--ok-fill); border-radius: 999px; }
.usage-bar.high span { background: var(--warn-fill); }
.usage-bar.crit span { background: var(--bad-fill); }

/* Tables: compact, content-sized columns (the last text column takes the rest), one row height
   and the same cell padding on both sides everywhere; counts and sizes right-aligned. */
.table-wrap { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--page); overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { height: var(--row-h); padding: 0 var(--s4); text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
table.data th { font-size: 13px; font-weight: 600; color: var(--dimmed); background: var(--surface-2); }
table.data th .tipwrap { margin-left: var(--s1); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover td { background: var(--surface); }
table.data .grow { width: 99%; }
table.data .r { text-align: right; }
table.data .c { text-align: center; }
.kind table.data.hb tbody tr:first-child td { font-weight: 600; }
.table-note { display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s2); font-size: 13px; line-height: 20px; color: var(--dimmed); }
.table-note .mk { width: 20px; height: 20px; font-size: 12px; }
.table-note .mk:not(:first-child) { margin-left: var(--s3); }

/* A disabled kind collapses to one line. */
.kind-off { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; min-height: 56px; padding: var(--s3) var(--s6); border: 1px dashed var(--line-strong); border-radius: var(--r-md); color: var(--dimmed); }
.kind-off h2 { font-size: 16px; line-height: 24px; color: var(--dimmed); }
.kind-off p { font-size: 14px; }

/* Bookmarks */
.marks tr.partial td { background: var(--bad-tint); }
.marks tr.reset td { background: var(--warn-tint); }
/* A reset bookmark says why under its badge, wrapping inside the cell. */
.marks td.wrap { white-space: normal; padding-top: var(--s2); padding-bottom: var(--s2); }
.mark-note { display: block; margin-top: var(--s1); font-size: 13px; line-height: 18px; color: var(--dimmed); }
.mk { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 700; font-size: 14px; line-height: 1; }
.mk.yes { color: var(--ok); background: var(--ok-tint); }
.mk.no { color: var(--bad); background: var(--bad-tint); }
.mk.unk { color: var(--dimmed); background: var(--off-tint); }

/* Inputs */
input[name="label"] { width: 100%; height: 36px; padding: 0 var(--s3); font: 400 15px var(--font); color: var(--ink); background: var(--page); border: 1px solid var(--line-strong); border-radius: var(--r-sm); }
input[name="label"]:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: var(--primary); }
.form-msg { min-height: 20px; font-size: 14px; line-height: 20px; font-weight: 600; }
.form-msg.bad { color: var(--bad); }
.form-msg.busy { color: var(--dimmed); font-weight: 400; }

/* Bookmarks panel under the header: open by default without JS, collapsed by default with JS
   (data-marks on <html>, set before paint). The height animates via grid rows 0fr/1fr. */
#marks-toggle .count { display: inline-grid; place-items: center; position: relative; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 2px; border-radius: 999px; background: rgba(255, 255, 255, .22); font: 700 12px/1 var(--font); font-variant-numeric: tabular-nums; }
#marks-toggle .warn-dot { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--warn-fill); box-shadow: 0 0 0 2px var(--primary-fill); }
#marks-toggle[aria-expanded="true"] { background: var(--primary-fill-hover); }
.marks-panel { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .22s ease; }
:root[data-marks="closed"] .marks-panel { grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows .22s ease, visibility 0s .22s; }
.marks-clip { overflow: hidden; min-height: 0; }
.marks-inner { padding-top: var(--s6); }
.card.marks { border-color: color-mix(in srgb, var(--primary-fill) 30%, var(--line)); }
.marks-intro { display: flex; align-items: baseline; gap: var(--s3) var(--s4); flex-wrap: wrap; margin-bottom: var(--s4); }
.marks-intro h2 { font-size: 18px; line-height: 24px; }
.marks-intro p { font-size: 14px; display: inline-flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.mark-row { display: flex; gap: var(--s3); align-items: center; }
.mark-row input[name="label"] { flex: 0 1 420px; }
.form-msg { margin: var(--s2) 0 var(--s4); }
.form-msg.ok { color: var(--ok); }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s2); }
.table-foot .table-note { margin-top: 0; }
.link-btn { border: 0; background: none; padding: 0; color: var(--primary); font: 600 13px var(--font); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.marks-panel:not([data-all]) tr.more { display: none; }
.marks-panel:not([data-all]) .when-all, .marks-panel[data-all] .when-less { display: none; }
@keyframes flash { from { background: color-mix(in srgb, var(--primary-fill) 22%, transparent); } to { background: var(--primary-tint); } }
.marks tr.flash td { background: var(--primary-tint); animation: flash 1.2s ease-out; }
.names { font-size: 14px; line-height: 20px; margin-bottom: var(--s2); }

/* Footer */
footer.page-foot { border-top: 1px solid var(--line); color: var(--dimmed); font-size: 13px; }
footer.page-foot .container { display: flex; gap: var(--s2) var(--s6); flex-wrap: wrap; justify-content: space-between; padding-top: var(--s4); padding-bottom: var(--s6); }

/* Responsive */
@media (max-width: 1180px) {
  .card.facts { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .fact:nth-child(6) { border-left: 0; }
  .fact:nth-child(n+6) { border-top: 1px solid var(--line); }
  .span-3 { grid-column: span 6; }
}
@media (max-width: 900px) {
  .span-6 { grid-column: 1 / -1; }
  .explain-body { grid-template-columns: 1fr; gap: 0; }
  .banner { grid-template-columns: auto minmax(0, 1fr); }
  .banner-cut { grid-column: 2; text-align: left; }
  .banner-cut .label { justify-content: flex-start; }
  .install { margin-left: 0; justify-content: flex-start; }
  .install .app { text-align: left; }
}
@media (max-width: 640px) {
  .container { padding: 0 var(--s4); }
  .card { padding: var(--s4); }
  .card.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; }
  .fact { border-left: 0; border-top: 1px solid var(--line); }
  .span-3 { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.form-msg:empty { min-height: 0; margin: 0 0 var(--s4); }
