:root {
  color-scheme: dark;
  --page: #0B0F19;
  --surface: #121827;
  --surface-2: #161D2E;
  --border: #232B3D;
  --text: #F0EFEC;
  --text-2: #B8BDC9;
  --muted: #8A90A0;
  --grid: #232B3D;
  --axis: #3A4357;
  --accent: #F59E0B;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --s6: #0ca30c;
  --other: #5A6275;
  --good: #0ca30c; --bad: #e66767;
}
* { box-sizing: border-box; margin: 0; padding: 0; min-width: 0; }
body { background: var(--page); color: var(--text); font: 16px/1.6 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
main { max-width: 1120px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 32px) 48px; }
a { color: #FBBF24; }
abbr { text-decoration: underline dotted; cursor: help; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.intro { margin-bottom: 28px; max-width: 780px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.eyebrow a { color: inherit; text-decoration: none; }
h1 { font-size: clamp(32px, 5vw, 48px); line-height: 1.1; font-weight: 700; margin-bottom: 14px; text-wrap: balance; }
.lede { color: var(--text-2); font-size: 17px; }
.lede strong { color: var(--text); font-weight: 600; }
h2 { font-size: 19px; font-weight: 600; margin-bottom: 4px; }
.note { color: var(--muted); font-size: 14px; margin-bottom: 18px; max-width: 72ch; }
.note em { color: var(--text-2); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: clamp(18px, 3vw, 28px); margin-bottom: 18px; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.two .card { margin-bottom: 18px; }
@media (max-width: 860px) { .two { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr); gap: 28px; align-items: center; }
@media (max-width: 760px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero-label { color: var(--text-2); font-size: 15px; }
.hero-value { font-size: clamp(56px, 9vw, 88px); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; margin: 4px 0; }
.hero-sub { color: var(--muted); font-size: 14px; }
.delta-up { color: var(--good); font-weight: 600; }
.delta-down { color: var(--bad); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 520px) { .tiles { grid-template-columns: minmax(0, 1fr); } }
.tile { background: var(--surface-2); border-radius: 10px; padding: 14px 16px; }
.tile-label { color: var(--text-2); font-size: 13px; }
.tile-value { font-size: 26px; font-weight: 600; line-height: 1.2; margin-top: 2px; white-space: nowrap; }
.tile-sub { color: var(--muted); font-size: 12.5px; }

/* Line chart */
.chart { position: relative; height: 260px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .base { stroke: var(--axis); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .line { fill: none; stroke: var(--s1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--s1); opacity: .1; }
.chart .dot { fill: var(--s1); stroke: var(--surface); stroke-width: 2; }
.chart .endlabel { fill: var(--text); font-size: 13px; font-weight: 600; }
.chart .cross { stroke: var(--axis); stroke-width: 1; }
.chart .empty { fill: var(--muted); font-size: 13px; }

/* Horizontal bars */
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 30%) minmax(0, 1fr); gap: 14px; align-items: center; border-radius: 6px; outline: none; }
.bar-row:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.bar-name { font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-name small { display: block; color: var(--muted); font-size: 12px; }
.bar-track { position: relative; height: 22px; margin-right: 52px;
  background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px);
  background-size: 25% 100%; background-repeat: repeat-x; box-shadow: inset -1px 0 0 var(--grid); }
.bar-fill { position: absolute; left: 0; top: 3px; height: 16px; background: var(--s1); border-radius: 0 4px 4px 0; min-width: 2px; }
.bar-fill.other { background: var(--other); }
.bar-val { position: absolute; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-axis { display: grid; grid-template-columns: minmax(96px, 30%) minmax(0, 1fr); gap: 14px; }
.bar-axis div { margin-right: 52px; display: flex; justify-content: space-between; color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* Segmented bar */
.seg { display: flex; gap: 2px; height: 28px; margin: 6px 0 14px; }
.seg-part { height: 100%; border-radius: 4px; display: flex; align-items: center; padding-left: 8px; font-size: 12.5px; font-weight: 600; color: #fff; overflow: visible; white-space: nowrap; outline: none; }
.seg-part:focus-visible { box-shadow: 0 0 0 2px var(--text); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* Tables */
.table-view { margin-top: 16px; font-size: 13px; color: var(--muted); }
.table-view summary { cursor: pointer; width: max-content; }
.table-view table { width: 100%; border-collapse: collapse; margin-top: 10px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table-view th:first-child, .table-view td:first-child { text-align: left; white-space: normal; }
.table-view th { color: var(--muted); font-weight: 500; }

/* Checker */
.check-form { display: flex; gap: 10px; max-width: 560px; }
.check-form input { flex: 1; height: 46px; padding: 0 14px; font: inherit; color: var(--text); background: var(--page); border: 1px solid var(--border); border-radius: 10px; }
.check-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.check-form button { height: 46px; padding: 0 22px; font: inherit; font-weight: 600; color: #0B0F19; background: var(--accent); border: 0; border-radius: 10px; cursor: pointer; }
.check-form button:disabled { opacity: .6; cursor: wait; }
.check-form button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.check-result { margin-top: 18px; background: var(--surface-2); border-radius: 10px; padding: 16px 18px; }
.verdict { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; margin-bottom: 10px; }
.verdict .icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: #fff; flex: none; }
.verdict.yes .icon { background: var(--good); }
.verdict.no .icon { background: #d03b3b; }
.verdict.err .icon { background: var(--other); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { color: var(--text); overflow-wrap: anywhere; }

.method ul { padding-left: 20px; color: var(--text-2); font-size: 14.5px; }
.method li { margin: 8px 0; }
.method strong { color: var(--text); font-weight: 600; }
.downloads { margin-top: 14px; font-size: 14px; color: var(--muted); }
footer { margin-top: 28px; font-size: 14px; }

/* Tooltip */
.tip { position: fixed; z-index: 10; pointer-events: none; background: #1E2638; border: 1px solid #2E3850; color: var(--text); font-size: 13px; line-height: 1.45; padding: 8px 11px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.35); max-width: 260px; }
.tip b { font-weight: 600; }
.tip .m { color: var(--muted); }

@media (forced-colors: active) {
  .bar-fill, .seg-part, .chart .line, .chart .dot { forced-color-adjust: none; }
}
