/* Cars4Me Insights tokens: the same Material 3 colour roles, shape, motion and glass recipe as the web app
   (app/src/styles/app.css) and the website, copied as the repo does for the widget and the sign-in pages, plus the
   chart roles (dataviz skill): categorical slots validated for both surfaces, a one-hue ordinal ramp for the funnel. */
:root {
  color-scheme: light dark;
  --surface:#FFFFFF; --surface-container-lowest:#FFFFFF; --surface-container-low:#F6F8FB; --surface-container:#EEF2F7;
  --surface-container-high:#E7ECF2; --surface-container-highest:#DFE5EC; --card:var(--surface-container-lowest);
  --on-surface:#14212E; --on-surface-variant:#4A5A6B; --outline:#74859A; --outline-variant:#DCE3EB;
  --primary:#1F4E79; --on-primary:#FFFFFF; --primary-container:#E7EFF7; --on-primary-container:#0E2A47;
  --tertiary:#B8935A; --on-tertiary:#1A1205; --tertiary-text:#8A6A35; --tertiary-container:#F5EDE0;
  --error:#B42318; --error-container:#FEF3F2; --success:#1E7F4F; --on-success:#FFFFFF; --success-container:rgb(30 127 79 / 0.10);
  --warning:#9A6700; --warning-container:rgb(154 103 0 / 0.12);
  --inverse-surface:#14212E; --inverse-on-surface:#F6F8FB; --scrim:rgb(20 40 60 / 0.35); --shadow-rgb:20 40 60;
  --shape-xs:4px; --shape-sm:8px; --shape-md:12px; --shape-lg:16px; --shape-xl:28px; --shape-full:9999px;
  --wt-strong:600; --wt-num:700;
  --dur-short:150ms; --dur-medium:300ms; --dur-long:500ms;
  --ease-standard:cubic-bezier(0.2, 0, 0, 1); --ease-decel:cubic-bezier(0.05, 0.7, 0.1, 1); --ease-accel:cubic-bezier(0.3, 0, 0.8, 0.15);
  --state-hover:8%; --state-focus:12%; --state-press:12%;
  --elev-1:0 1px 2px rgb(var(--shadow-rgb) / 0.06), 0 1px 3px rgb(var(--shadow-rgb) / 0.10);
  --elev-2:0 2px 6px rgb(var(--shadow-rgb) / 0.10), 0 6px 20px rgb(var(--shadow-rgb) / 0.08);
  --elev-3:0 8px 24px rgb(var(--shadow-rgb) / 0.14);
  /* glass: three tiers of translucent white (cards / text panels / popovers), a fill for controls, hairlines, blur radii */
  --glass-1:rgb(255 255 255 / 0.50); --glass-2:rgb(255 255 255 / 0.66); --glass-3:rgb(255 255 255 / 0.84); --glass-fill:rgb(255 255 255 / 0.40);
  --glass-bg:var(--glass-2); --glass-bg-strong:var(--glass-3); --glass-dark:rgb(14 24 35 / 0.62);
  --glass-border:rgb(255 255 255 / 0.70); --glass-border-strong:rgb(255 255 255 / 0.95);
  --glass-hi:inset 0 1px 0 rgb(255 255 255 / 0.95), inset 0 0 0 1px rgb(255 255 255 / 0.22);
  --glass-blur:28px; --glass-blur-sm:16px; --glass-blur-lg:40px; --glass-sat:180%;
  /* the frost: a top sheen and a fine grain over the tint (the grain is a data: SVG; img-src allows data:) */
  --sheen:linear-gradient(180deg, rgb(255 255 255 / 0.34), rgb(255 255 255 / 0) 46%);
  --grain:url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27180%27 height=%27180%27%3E%3Cfilter id=%27n%27%3E%3CfeTurbulence type=%27fractalNoise%27 baseFrequency=%27.85%27 numOctaves=%272%27 stitchTiles=%27stitch%27/%3E%3CfeColorMatrix values=%270 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .04 0%27/%3E%3C/filter%3E%3Crect width=%27100%25%27 height=%27100%25%27 filter=%27url(%23n)%27/%3E%3C/svg%3E");
  --frost-1:var(--sheen), var(--grain), var(--glass-1); --frost-2:var(--sheen), var(--grain), var(--glass-2); --frost-3:var(--sheen), var(--grain), var(--glass-3);
  --elev-glass:0 8px 32px rgb(20 40 60 / 0.12), 0 1px 2px rgb(20 40 60 / 0.06); --elev-glass-hover:0 14px 40px rgb(20 40 60 / 0.16), 0 1px 2px rgb(20 40 60 / 0.06);
  /* the aurora behind everything: the page base and three brand colours with their strengths */
  --aurora-base:#EEF3F8; --aurora-a:#1F4E79; --aurora-b:#6EA8DC; --aurora-c:#B8935A; --aurora-wa:70%; --aurora-wb:82%; --aurora-wc:70%;
  /* the website's names, as aliases */
  --bg:var(--aurora-base); --bg-alt:var(--surface); --ink:var(--on-surface); --ink-2:var(--on-surface-variant); --line:var(--outline-variant);
  --brand:var(--primary); --brand-ink:var(--on-primary); --brand-soft:var(--primary-container); --accent:var(--tertiary); --accent-soft:var(--tertiary-container);
  --focus:var(--primary); --ok:var(--success); --bad:var(--error); --bad-soft:var(--error-container);
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --fs-700: 1.375rem; --fs-600: 1.2rem; --fs-500: 1.125rem; --fs-400: 1rem; --fs-300: 0.875rem; --fs-200: 0.8rem;
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem; --s-5: 1.5rem; --s-6: 2rem; --s-7: 3rem;
  --r-sm:var(--shape-sm); --r-md:var(--shape-md); --r-lg:var(--shape-lg); --r-pill:var(--shape-full);
  --sh-1:var(--elev-1); --sh-2:var(--elev-2); --sh-3:var(--elev-3);
  --ease:var(--ease-standard); --top-h: 56px; --side-w: 272px; --tabs-h: 52px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --surface:#0E1823; --surface-container-lowest:#0A121B; --surface-container-low:#142232; --surface-container:#1A2B3D;
    --surface-container-high:#22364B; --surface-container-highest:#2A4159; --card:var(--surface-container);
    --on-surface:#E8EEF5; --on-surface-variant:#A9B7C6; --outline:#7C8EA1; --outline-variant:#27394D;
    --primary:#6EA8DC; --on-primary:#0E1823; --primary-container:#1B3350; --on-primary-container:#CFE3F5;
    --tertiary:#D0AD76; --on-tertiary:#1A1205; --tertiary-text:#D0AD76; --tertiary-container:#3A2F1E;
    --error:#FFB4AB; --error-container:#3A1714; --success:#6CCB94; --on-success:#0E1823; --success-container:rgb(108 203 148 / 0.14);
    --warning:#E0B04C; --warning-container:rgb(224 176 76 / 0.14);
    --inverse-surface:#E8EEF5; --inverse-on-surface:#0E1823; --scrim:rgb(0 0 0 / 0.5); --shadow-rgb:0 0 0;
    --elev-1:0 1px 2px rgb(0 0 0 / 0.4), 0 1px 3px rgb(0 0 0 / 0.3);
    --elev-2:0 2px 6px rgb(0 0 0 / 0.35), 0 6px 20px rgb(0 0 0 / 0.35);
    --elev-3:0 8px 24px rgb(0 0 0 / 0.5);
    --glass-1:rgb(22 36 52 / 0.54); --glass-2:rgb(22 36 52 / 0.68); --glass-3:rgb(22 36 52 / 0.84); --glass-fill:rgb(255 255 255 / 0.08);
    --glass-border:rgb(255 255 255 / 0.16); --glass-border-strong:rgb(255 255 255 / 0.30); --glass-hi:inset 0 1px 0 rgb(255 255 255 / 0.18), inset 0 0 0 1px rgb(255 255 255 / 0.05); --sheen:linear-gradient(180deg, rgb(255 255 255 / 0.09), rgb(255 255 255 / 0) 46%);
    --elev-glass:0 8px 32px rgb(0 0 0 / 0.45), 0 1px 2px rgb(0 0 0 / 0.30); --elev-glass-hover:0 14px 40px rgb(0 0 0 / 0.55), 0 1px 2px rgb(0 0 0 / 0.30);
    --aurora-base:#0B1420; --aurora-a:#2A5A86; --aurora-b:#6EA8DC; --aurora-c:#D0AD76; --aurora-wa:66%; --aurora-wb:52%; --aurora-wc:40%;
  }
}
:root[data-theme="dark"] {
  --surface:#0E1823; --surface-container-lowest:#0A121B; --surface-container-low:#142232; --surface-container:#1A2B3D;
  --surface-container-high:#22364B; --surface-container-highest:#2A4159; --card:var(--surface-container);
  --on-surface:#E8EEF5; --on-surface-variant:#A9B7C6; --outline:#7C8EA1; --outline-variant:#27394D;
  --primary:#6EA8DC; --on-primary:#0E1823; --primary-container:#1B3350; --on-primary-container:#CFE3F5;
  --tertiary:#D0AD76; --on-tertiary:#1A1205; --tertiary-text:#D0AD76; --tertiary-container:#3A2F1E;
  --error:#FFB4AB; --error-container:#3A1714; --success:#6CCB94; --on-success:#0E1823; --success-container:rgb(108 203 148 / 0.14);
  --warning:#E0B04C; --warning-container:rgb(224 176 76 / 0.14);
  --inverse-surface:#E8EEF5; --inverse-on-surface:#0E1823; --scrim:rgb(0 0 0 / 0.5); --shadow-rgb:0 0 0;
  --elev-1:0 1px 2px rgb(0 0 0 / 0.4), 0 1px 3px rgb(0 0 0 / 0.3);
  --elev-2:0 2px 6px rgb(0 0 0 / 0.35), 0 6px 20px rgb(0 0 0 / 0.35);
  --elev-3:0 8px 24px rgb(0 0 0 / 0.5);
  --glass-1:rgb(22 36 52 / 0.54); --glass-2:rgb(22 36 52 / 0.68); --glass-3:rgb(22 36 52 / 0.84); --glass-fill:rgb(255 255 255 / 0.08);
  --glass-border:rgb(255 255 255 / 0.16); --glass-border-strong:rgb(255 255 255 / 0.30); --glass-hi:inset 0 1px 0 rgb(255 255 255 / 0.18), inset 0 0 0 1px rgb(255 255 255 / 0.05); --sheen:linear-gradient(180deg, rgb(255 255 255 / 0.09), rgb(255 255 255 / 0) 46%);
  --elev-glass:0 8px 32px rgb(0 0 0 / 0.45), 0 1px 2px rgb(0 0 0 / 0.30); --elev-glass-hover:0 14px 40px rgb(0 0 0 / 0.55), 0 1px 2px rgb(0 0 0 / 0.30);
  --aurora-base:#0B1420; --aurora-a:#2A5A86; --aurora-b:#6EA8DC; --aurora-c:#D0AD76; --aurora-wa:66%; --aurora-wb:52%; --aurora-wc:40%;
}
/* ---------- Chart roles ---------- */
/* Categorical: five slots in a fixed order (validated: adjacent CVD ΔE ≥ 8.4, normal-vision ≥ 19 in both modes); the
   three light slots below 3:1 always ship with visible labels or the table view. Sequential/ordinal: one hue, the
   brand blue, light→dark; its light end clears 2:1 on the surface in both modes. Series colour goes on marks only;
   text wears text tokens. */
:root {
  --series-1:#2a78d6; --series-2:#eb6834; --series-3:#1baf7a; --series-4:#eda100; --series-5:#e87ba4;
  --ord-1:#86AED6; --ord-2:#6194C4; --ord-3:#4379AE; --ord-4:#2C6194; --ord-5:#1F4E79;
  --chart-surface:var(--surface-container-low); --grid:var(--outline-variant); --mark-muted:#B8C4D0;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --series-1:#3987e5; --series-2:#d95926; --series-3:#199e70; --series-4:#c98500; --series-5:#d55181;
    --ord-1:#466C97; --ord-2:#5A86B3; --ord-3:#729FCA; --ord-4:#8FB8DC; --ord-5:#B9D6EE;
    --mark-muted:#3E5068;
  }
}
:root[data-theme="dark"] {
  --series-1:#3987e5; --series-2:#d95926; --series-3:#199e70; --series-4:#c98500; --series-5:#d55181;
  --ord-1:#466C97; --ord-2:#5A86B3; --ord-3:#729FCA; --ord-4:#8FB8DC; --ord-5:#B9D6EE;
  --mark-muted:#3E5068;
}
/* Cars4Me Insights: the dashboard shell (top bar, nav), KPI tiles, chart cards, tables, the user pages, the sign-in
   screen. Tokens come from tokens.css (shared with the web app); marks and chart text follow the dataviz skill. */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: var(--fs-400); line-height: 1.5; position: relative; isolation: isolate; }
body::before { content: ""; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background: radial-gradient(42% 38% at 18% 22%, color-mix(in srgb, var(--aurora-a) calc(var(--aurora-wa) * 0.5), transparent), transparent 70%),
              radial-gradient(36% 34% at 82% 18%, color-mix(in srgb, var(--aurora-b) calc(var(--aurora-wb) * 0.5), transparent), transparent 70%),
              radial-gradient(40% 36% at 70% 86%, color-mix(in srgb, var(--aurora-c) calc(var(--aurora-wc) * 0.5), transparent), transparent 70%);
  filter: blur(26px); }
:root[data-theme="dark"] body { -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-family: var(--font-display); font-variation-settings: "opsz" 144; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }
h2 { font-size: var(--fs-600); } h3 { font-size: var(--fs-400); }
p { margin: 0 0 var(--s-3); } p:last-child { margin-bottom: 0; }
a { color: var(--brand); text-underline-offset: 0.15em; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: var(--shape-xs); }
.muted { color: var(--ink-2); } .small { font-size: var(--fs-300); } .num { font-variant-numeric: tabular-nums; text-align: right; }
.empty { padding: var(--s-4) 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); padding: 0.6rem 1.1rem; border-radius: var(--shape-full); font-weight: var(--wt-strong); font-size: var(--fs-300); text-decoration: none; border: 1px solid transparent; cursor: pointer; background: none; white-space: nowrap; transition: background var(--dur-short) var(--ease-standard), border-color var(--dur-short) var(--ease-standard); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--elev-1); }
.btn--primary:hover { background: color-mix(in srgb, var(--on-primary) var(--state-hover), var(--primary)); }
.btn--ghost { color: var(--on-surface); border-color: var(--outline-variant); }
.btn--ghost:hover { border-color: var(--outline); color: var(--primary); background: color-mix(in srgb, var(--primary) var(--state-hover), transparent); }
.btn--sm { padding: 0.4rem 0.8rem; } .btn--lg { padding: 0.9rem 1.5rem; font-size: var(--fs-400); }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border: 1px solid transparent; border-radius: var(--shape-full); background: none; cursor: pointer; color: var(--on-surface-variant); }
.icon-btn:hover { background: color-mix(in srgb, var(--primary) var(--state-hover), transparent); color: var(--primary); }
.icon-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .icon-moon { display: none; } :root[data-theme="dark"] .theme-toggle .icon-moon { display: block; } :root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; } :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; } }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; color: var(--ink); font-weight: 600; letter-spacing: -0.01em; }
.brand img { border-radius: var(--shape-sm); }
.brand small { font-weight: 500; color: var(--ink-2); }

/* ---------- Shell ---------- */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: var(--s-4); padding: 0 var(--s-4); height: var(--top-h);
  background: var(--glass-2); backdrop-filter: blur(var(--glass-blur-sm)) saturate(var(--glass-sat)); -webkit-backdrop-filter: blur(var(--glass-blur-sm)) saturate(var(--glass-sat)); border-bottom: 1px solid var(--glass-border); }
.top__nav { display: flex; gap: var(--s-1); margin-left: var(--s-2); overflow-x: auto; }
.top__nav a { padding: 0.4rem 0.8rem; border-radius: var(--shape-full); text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: var(--fs-300); white-space: nowrap; }
.top__nav a:hover { background: color-mix(in srgb, var(--primary) var(--state-hover), transparent); color: var(--primary); }
.top__nav a.is-on { background: var(--primary-container); color: var(--on-primary-container); }
.top__actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }
.page { max-width: 1240px; margin: 0 auto; padding: var(--s-5) var(--s-4) var(--s-7); }
.page__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-5); }
.page__head p { max-width: 60ch; }
.range { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--shape-full); background: var(--glass-fill); border: 1px solid var(--glass-border); }
.range button { border: 0; background: none; padding: 0.35rem 0.8rem; border-radius: var(--shape-full); cursor: pointer; font-size: var(--fs-300); font-weight: 500; color: var(--ink-2); }
.range button.is-on { background: var(--surface); color: var(--primary); box-shadow: var(--elev-1); }
.grid { display: grid; gap: var(--s-4); grid-template-columns: repeat(12, 1fr); }
.grid > * { grid-column: span 12; }
@media (min-width: 720px) { .grid > .card { grid-column: span 6; } .grid > .card--wide { grid-column: span 12; } .grid > .card--third { grid-column: span 4; } }
@media (min-width: 1100px) { .grid > .card { grid-column: span 4; } .grid > .card--half { grid-column: span 6; } .grid > .card--wide { grid-column: span 12; } .grid > .card--third { grid-column: span 4; } }
.kpis { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: var(--s-5); }
.kpi { padding: var(--s-3) var(--s-4); border-radius: var(--shape-lg); background: var(--frost-2); border: 1px solid var(--glass-border); box-shadow: var(--glass-hi), var(--elev-glass); min-width: 0; }
.kpi__label { font-size: var(--fs-300); color: var(--ink-2); }
.kpi__value { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; margin: var(--s-1) 0; }
.kpi__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); min-height: 22px; font-size: var(--fs-200); }
.kpi__delta--good { color: var(--success); } .kpi__delta--bad { color: var(--error); } .kpi__delta--flat { color: var(--ink-2); }
.spark__line { fill: none; stroke: var(--mark-muted); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.spark__dot { fill: var(--primary); stroke: var(--surface); stroke-width: 2; }
.card { padding: var(--s-4); border-radius: var(--shape-lg); background: var(--frost-2); border: 1px solid var(--glass-border); box-shadow: var(--glass-hi), var(--elev-glass); min-width: 0; }
.card__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-2); }
.card__toggle { border: 0; background: none; color: var(--primary); font-size: var(--fs-200); font-weight: 600; cursor: pointer; padding: 0.2rem 0.4rem; border-radius: var(--shape-xs); }
.card__note { margin-bottom: var(--s-3); }
.notice { padding: var(--s-3) var(--s-4); border-radius: var(--shape-md); background: var(--primary-container); color: var(--on-primary-container); }
.notice--warn { background: var(--warning-container); color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: var(--s-5); transform: translateX(-50%); padding: var(--s-3) var(--s-4); border-radius: var(--shape-md); background: var(--inverse-surface); color: var(--inverse-on-surface); box-shadow: var(--elev-3); z-index: 9; }

/* ---------- Charts ---------- */
.chart { position: relative; }
.chart__svg { display: block; max-width: 100%; overflow: visible; }
.grid { } /* (the layout grid above; chart gridlines are `.grid` lines inside svg) */
svg line.grid { stroke: var(--grid); stroke-width: 1; }
.axis { fill: var(--ink-2); font-size: 11px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.value { fill: var(--ink); font-size: 11px; font-weight: 600; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.crosshair { stroke: var(--outline); stroke-width: 1; }
.hit { fill: transparent; }
.line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.dot { stroke: var(--surface); stroke-width: 2; }
.mark--s1 .line, .mark--s1.line { stroke: var(--series-1); } .mark--s1 .dot, .mark--s1.dot, .mark--s1 .bar, .mark--s1.hbar__fill, .mark--s1 .segments__part, .swatch.mark--s1 { fill: var(--series-1); background: var(--series-1); }
.mark--s2 .line { stroke: var(--series-2); } .mark--s2 .dot, .mark--s2.dot, .mark--s2 .bar, .mark--s2 .segments__part, .swatch.mark--s2 { fill: var(--series-2); background: var(--series-2); }
.mark--s3 .line { stroke: var(--series-3); } .mark--s3 .dot, .mark--s3.dot, .mark--s3 .bar, .mark--s3 .segments__part, .swatch.mark--s3 { fill: var(--series-3); background: var(--series-3); }
.mark--s4 .line { stroke: var(--series-4); } .mark--s4 .dot, .mark--s4.dot, .mark--s4 .bar, .mark--s4 .segments__part, .swatch.mark--s4 { fill: var(--series-4); background: var(--series-4); }
.mark--s5 .line { stroke: var(--series-5); } .mark--s5 .dot, .mark--s5.dot, .mark--s5 .bar, .mark--s5 .segments__part, .swatch.mark--s5 { fill: var(--series-5); background: var(--series-5); }
.ord--1 { fill: var(--ord-1); } .ord--2 { fill: var(--ord-2); } .ord--3 { fill: var(--ord-3); } .ord--4 { fill: var(--ord-4); } .ord--5 { fill: var(--ord-5); }
.ord-bg--1 { background: var(--ord-1); } .ord-bg--2 { background: var(--ord-2); } .ord-bg--3 { background: var(--ord-3); } .ord-bg--4 { background: var(--ord-4); } .ord-bg--5 { background: var(--ord-5); }
.ord-bg--1, .ord-bg--2 { color: var(--on-surface); } .ord-bg--3, .ord-bg--4, .ord-bg--5 { color: #fff; }
:root[data-theme="dark"] .ord-bg--1, :root[data-theme="dark"] .ord-bg--2, :root[data-theme="dark"] .ord-bg--3 { color: #fff; } :root[data-theme="dark"] .ord-bg--4, :root[data-theme="dark"] .ord-bg--5 { color: #0E1823; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ord-bg--1, :root:not([data-theme="light"]) .ord-bg--2, :root:not([data-theme="light"]) .ord-bg--3 { color: #fff; } :root:not([data-theme="light"]) .ord-bg--4, :root:not([data-theme="light"]) .ord-bg--5 { color: #0E1823; } }
.tip { position: absolute; top: 0; right: 0; padding: var(--s-2) var(--s-3); border-radius: var(--shape-md); background: var(--glass-3); border: 1px solid var(--glass-border-strong); box-shadow: var(--elev-2); font-size: var(--fs-200); pointer-events: none; min-width: 140px; }
.tip__h { font-weight: 600; margin-bottom: 2px; } .tip__row { display: flex; align-items: center; gap: 6px; } .tip__row b { margin-left: auto; font-variant-numeric: tabular-nums; }
.legend { list-style: none; margin: var(--s-2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); font-size: var(--fs-200); color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 3px; flex: none; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hbar { display: grid; grid-template-columns: minmax(96px, 36%) 1fr auto; align-items: center; gap: var(--s-3); font-size: var(--fs-300); }
.hbar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar__track { width: 100%; height: 8px; border-radius: 4px; }
.hbar__value { font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar__value small { font-size: var(--fs-200); }
.segments__bar { display: block; max-width: 100%; }
.segments__text { fill: #fff; font-size: 12px; font-weight: 600; font-family: var(--font-body); }
.mark--s4 .segments__text, .mark--s3 .segments__text { fill: #14212E; }
.heat { width: 100%; border-collapse: separate; border-spacing: 2px; font-size: var(--fs-200); font-variant-numeric: tabular-nums; }
.heat th { font-weight: 500; color: var(--ink-2); text-align: left; padding: 2px 6px; white-space: nowrap; }
.heat th.num, .heat td.num { text-align: right; }
.heat td { padding: 6px; border-radius: var(--shape-xs); text-align: center; }
.heat__na { background: transparent; }

/* ---------- Tables ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: var(--fs-300); }
.tbl th, .tbl td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--outline-variant); text-align: left; vertical-align: top; }
.tbl th { font-weight: 600; color: var(--ink-2); font-size: var(--fs-200); white-space: nowrap; }
.tbl th.num, .tbl td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--primary) 5%, transparent); }
.tbl a { text-decoration: none; font-weight: 500; }
.tbl--mini th, .tbl--mini td { padding: 0.35rem 0.4rem; }
.tbl__wrap { overflow-x: auto; }
.tbl th button { border: 0; background: none; color: inherit; font: inherit; cursor: pointer; padding: 0; }
.tbl th button.is-on { color: var(--primary); }
.pager { display: flex; align-items: center; gap: var(--s-3); justify-content: flex-end; margin-top: var(--s-3); font-size: var(--fs-300); }
.search { display: flex; gap: var(--s-2); }
.search input { flex: 1; min-width: 0; padding: 0.55rem 0.8rem; border-radius: var(--shape-full); border: 1px solid var(--outline-variant); background: var(--surface); color: var(--ink); font: inherit; }
.mask { font-variant-numeric: tabular-nums; }
.mask button { border: 0; background: none; color: var(--primary); cursor: pointer; font-size: var(--fs-200); margin-left: 6px; padding: 0; }
.tag { display: inline-block; padding: 0.1rem 0.5rem; border-radius: var(--shape-full); background: var(--primary-container); color: var(--on-primary-container); font-size: var(--fs-200); font-weight: 500; }
.tag--off { background: var(--surface-container-high); color: var(--ink-2); }
.steps { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--s-3); }
.fact__k { font-size: var(--fs-200); color: var(--ink-2); } .fact__v { font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: var(--fs-300); }
.timeline li { display: grid; grid-template-columns: 120px 1fr; gap: var(--s-3); padding: 4px 0; border-bottom: 1px solid var(--outline-variant); }
.timeline time { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.timeline .tag { margin-right: 6px; }
.back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-size: var(--fs-300); margin-bottom: var(--s-3); }
.loading { opacity: 0.55; transition: opacity var(--dur-medium) var(--ease-standard); }
pre.json { margin: 0; font-size: var(--fs-200); white-space: pre-wrap; word-break: break-word; background: var(--surface-container-low); padding: var(--s-3); border-radius: var(--shape-md); max-height: 50vh; overflow: auto; }

/* ---------- Sign-in / denied ---------- */
.signin { min-height: 100vh; display: grid; place-items: center; padding: var(--s-5) var(--s-4); position: relative; }
.signin__top { position: absolute; top: var(--s-3); right: var(--s-3); }
.signin__card { width: min(100%, 460px); padding: var(--s-6); border-radius: var(--shape-xl); background: var(--frost-3); border: 1px solid var(--glass-border-strong); box-shadow: var(--glass-hi), var(--elev-glass); text-align: center; display: grid; gap: var(--s-4); justify-items: center; }
.signin__card .brand { justify-content: center; }

@media (max-width: 720px) {
  .top { gap: var(--s-2); padding: 0 var(--s-3); }
  .top__nav { margin-left: 0; }
  .top .brand span { display: none; }
  .page { padding: var(--s-4) var(--s-3) var(--s-6); }
  .hbar { grid-template-columns: minmax(80px, 40%) 1fr auto; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
