:root {
  color-scheme: light;
  --bg: #f9fafb; --surface: #fff; --sunken: #f2f3f5; --line: #e1e3e6; --text: #151619; --muted: #67696c;
  --accent: #b3261e; --on-accent: #fff; --warning: #875410; --warning-bg: #fff8e8; --error: #a52222;
  --error-bg: #fff0f0; --good: #218740;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d0e10; --surface: #161719; --sunken: #131416; --line: #2a2b2e; --text: #eff0f2; --muted: #a0a2a6;
    --accent: #ff8a80; --on-accent: #1a0b0a; --warning: #e4bb74; --warning-bg: #262117; --error: #ffa6a6;
    --error-bg: #2d191b; --good: #4fb768;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0e10; --surface: #161719; --sunken: #131416; --line: #2a2b2e; --text: #eff0f2; --muted: #a0a2a6;
  --accent: #ff8a80; --on-accent: #1a0b0a; --warning: #e4bb74; --warning-bg: #262117; --error: #ffa6a6;
  --error-bg: #2d191b; --good: #4fb768;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); text-underline-offset: 3px; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
code, .eyebrow, .fine, .mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
code { font-size: .9em; }
[hidden] { display: none !important; }

header { border-bottom: 1px solid var(--line); background: var(--surface); }
.bar { max-width: 1120px; margin: auto; min-height: 68px; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; font-size: 17px; white-space: nowrap; }
.brand > span:last-child { font-weight: 400; color: var(--muted); font-size: 14px; }
.mark { display: grid; grid-template-columns: repeat(2, 9px); gap: 2px; margin-right: 3px; }
.mark i { display: block; width: 9px; height: 9px; background: var(--text); }
.mark i:nth-child(2) { background: var(--accent); }
.mark i:last-child { opacity: .3; }
nav { display: flex; align-items: center; gap: 24px; font-size: 13px; }
nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current] { color: var(--text); }
.plain { border: 0; background: none; color: var(--muted); padding: 8px; font-size: 13px; }
.plain:hover { color: var(--text); }
#theme { font-size: 19px; padding: 3px; }

main { max-width: 1024px; margin: auto; padding: 58px 24px 36px; }
.intro { max-width: 680px; margin-bottom: 30px; }
.intro > p:last-child { color: var(--muted); margin-bottom: 0; }
.eyebrow { color: var(--muted); letter-spacing: .12em; font-size: 11px; margin-bottom: 12px; text-transform: uppercase; }
h1 { font-size: clamp(29px, 4vw, 43px); line-height: 1.15; letter-spacing: -.035em; font-weight: 650; margin-bottom: 18px; }
h2 { font-size: 20px; letter-spacing: -.02em; font-weight: 650; margin: 44px 0 14px; }

.panel { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding: 19px 26px; }
.panel-heading h2 { font-size: 15px; margin: 0; font-weight: 600; letter-spacing: 0; }
.local { font-size: 12px; color: var(--muted); }
.local b { color: var(--good); font-size: 9px; margin-right: 5px; }
.panel-body { padding: 24px 26px; }
.panel-body > p { color: var(--muted); font-size: 13px; max-width: 640px; }
.action-row { border-top: 1px solid var(--line); padding: 17px 26px; display: flex; gap: 12px; align-items: center; }
.action-row > p { margin: 0 auto 0 0; font-size: 12px; color: var(--muted); }
.button { display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600; font-size: 13px; padding: 11px 20px; white-space: nowrap; }
.button:hover:not(:disabled) { filter: brightness(.94); }

.checks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.checks li { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: baseline; padding: 13px 26px; border-bottom: 1px solid var(--line); font-size: 13px; }
.checks li:last-child { border-bottom: 0; }
.checks .state { font-weight: 700; text-align: center; color: var(--muted); }
.checks li[data-state="ok"] .state { color: var(--good); }
.checks li[data-state="warn"] .state { color: var(--warning); }
.checks li[data-state="bad"] .state { color: var(--error); }
.checks strong { font-weight: 600; }
.checks .detail { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.checks .value { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 11px; color: var(--muted); text-align: right; overflow-wrap: anywhere; max-width: 260px; }
.verdict { border-top: 1px solid var(--line); padding: 22px 26px; }
.verdict h3 { font-size: 20px; margin-bottom: 6px; }
.verdict[data-state="ok"] h3 { color: var(--good); }
.verdict[data-state="warn"] h3 { color: var(--warning); }
.verdict[data-state="bad"] h3 { color: var(--error); }
.verdict p { font-size: 13px; color: var(--muted); margin-bottom: 0; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 30px; }
.facts div { background: var(--surface); padding: 18px 20px; }
.facts b { display: block; font-size: 24px; letter-spacing: -.03em; font-weight: 650; }
.facts span { font-size: 12px; color: var(--muted); }

.how { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 36px; margin: 0; padding: 0; list-style: none; }
.how li { font-size: 13px; color: var(--muted); }
.how strong { display: block; color: var(--text); font-weight: 600; font-size: 14px; margin-bottom: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
th, td { text-align: left; padding: 10px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; font-weight: 600; color: var(--muted); background: var(--sunken); letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.tag.done { color: var(--good); }
.tag.part { color: var(--warning); }
.tag.none { color: var(--muted); }
.tag.open { color: var(--error); }
.table-wrap { overflow-x: auto; }

.chart { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 18px 20px 10px; }
.chart svg { display: block; width: 100%; height: auto; }
.chart .axis { stroke: var(--line); }
.chart text { fill: var(--muted); font: 11px ui-monospace, "Cascadia Mono", Consolas, monospace; }
.chart .series-a { stroke: var(--accent); }
.chart .series-b { stroke: var(--muted); }
.chart .dot-a { fill: var(--accent); }
.chart .dot-b { fill: var(--muted); }
.legend { display: flex; gap: 20px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 14px; height: 3px; vertical-align: middle; margin-right: 6px; }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 22px 22px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.timeline time { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.timeline h3 { font-size: 15px; font-weight: 600; margin: 2px 0 4px; }
.timeline p { font-size: 13px; color: var(--muted); margin-bottom: 0; }

.fine { font-size: 11px; line-height: 1.7; color: var(--muted); }
.limits { border-top: 1px solid var(--line); padding-top: 22px; margin: 30px 0 0; }
footer { max-width: 1024px; margin: auto; border-top: 1px solid var(--line); padding: 22px 24px; display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
footer div { display: flex; gap: 20px; flex-wrap: wrap; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }

@media (max-width: 680px) {
  .bar { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  nav { gap: 17px; font-size: 12px; }
  main { padding: 34px 16px 26px; }
  .panel-heading, .panel-body, .action-row, .verdict { padding-left: 16px; padding-right: 16px; }
  .action-row { flex-wrap: wrap; }
  .action-row > p { width: 100%; }
  .checks li { padding: 12px 16px; grid-template-columns: 18px 1fr; }
  .checks .value { grid-column: 2; text-align: left; max-width: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts b { font-size: 19px; }
  .how { grid-template-columns: 1fr; }
  th, td { padding: 9px 10px; }
  footer { flex-wrap: wrap; padding: 22px 16px; }
}
