:root {
  color-scheme: light;
  --paper: #f3f7fb;
  --paper-strong: #eaf2f9;
  --ink: #071f43;
  --muted: #526f8c;
  --muted-2: #6a839c;
  --blue: #135fca;
  --blue-dark: #08346d;
  --rule: #1361c7;
  --rule-soft: rgb(19 97 199 / 28%);
  --good: #0a7b5f;
  --watch: #a56a00;
  --probable: #c94f17;
  --strong: #b82436;
  --unavailable: #5e7690;
  --state: var(--unavailable);
  --grid: rgb(21 91 183 / 5%);
  --header-surface: rgb(243 247 251 / 92%);
  --panel-surface: rgb(243 247 251 / 58%);
  --detail-surface: rgb(243 247 251 / 72%);
  --raised-surface: rgb(255 255 255 / 30%);
  --tooltip-surface: #f4f8fc;
  --shadow: rgb(16 41 78 / 16%);
  --notice-ink: #704900;
  --notice-surface: #fff3ce;
  --control-border: #7595b8;
  --hover-surface: rgb(23 75 128 / 7%);
  --bar-normal: rgb(19 95 202 / 7%);
  --bar-watch: rgb(165 106 0 / 14%);
  --bar-probable: rgb(201 79 23 / 14%);
  --bar-strong: rgb(184 36 54 / 15%);
  --bar-unavailable: rgb(94 118 144 / 8%);
  --sans: "Open Sans", "Noto Sans", ui-sans-serif, system-ui, sans-serif;
  --condensed: "Open Sans", "Noto Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "Noto Sans Mono", "Adwaita Mono", ui-monospace, monospace;
}

/* Follow system appearance, including changes while the page is open. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0c1624;
    --paper-strong: #142337;
    --ink: #e4edf8;
    --muted: #a5b8cf;
    --muted-2: #94aac4;
    --blue: #77afff;
    --blue-dark: #b0d0ff;
    --rule: #426b9f;
    --rule-soft: rgb(119 175 255 / 24%);
    --good: #55d5ac;
    --watch: #f2bf58;
    --probable: #ff9b68;
    --strong: #ff8294;
    --unavailable: #9eafc3;
    --grid: rgb(119 175 255 / 4%);
    --header-surface: rgb(12 22 36 / 94%);
    --panel-surface: rgb(12 22 36 / 58%);
    --detail-surface: rgb(12 22 36 / 72%);
    --raised-surface: rgb(119 175 255 / 5%);
    --tooltip-surface: #18283d;
    --shadow: rgb(0 0 0 / 40%);
    --notice-ink: #f5cd7d;
    --notice-surface: #352a17;
    --control-border: #6786ac;
    --hover-surface: rgb(119 175 255 / 12%);
    --bar-normal: rgb(119 175 255 / 14%);
    --bar-watch: rgb(242 191 88 / 18%);
    --bar-probable: rgb(255 155 104 / 18%);
    --bar-strong: rgb(255 130 148 / 18%);
    --bar-unavailable: rgb(158 175 195 / 12%);
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0c1624;
  --paper-strong: #142337;
  --ink: #e4edf8;
  --muted: #a5b8cf;
  --muted-2: #94aac4;
  --blue: #77afff;
  --blue-dark: #b0d0ff;
  --rule: #426b9f;
  --rule-soft: rgb(119 175 255 / 24%);
  --good: #55d5ac;
  --watch: #f2bf58;
  --probable: #ff9b68;
  --strong: #ff8294;
  --unavailable: #9eafc3;
  --grid: rgb(119 175 255 / 4%);
  --header-surface: rgb(12 22 36 / 94%);
  --panel-surface: rgb(12 22 36 / 58%);
  --detail-surface: rgb(12 22 36 / 72%);
  --raised-surface: rgb(119 175 255 / 5%);
  --tooltip-surface: #18283d;
  --shadow: rgb(0 0 0 / 40%);
  --notice-ink: #f5cd7d;
  --notice-surface: #352a17;
  --control-border: #6786ac;
  --hover-surface: rgb(119 175 255 / 12%);
  --bar-normal: rgb(119 175 255 / 14%);
  --bar-watch: rgb(242 191 88 / 18%);
  --bar-probable: rgb(255 155 104 / 18%);
  --bar-strong: rgb(255 130 148 / 18%);
  --bar-unavailable: rgb(158 175 195 / 12%);
}

.tone-normal { --state: var(--good); }
.tone-watch { --state: var(--watch); }
.tone-probable { --state: var(--probable); }
.tone-strong { --state: var(--strong); }

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; scroll-padding-top: 112px; background: var(--paper); }
body {
  min-width: 320px;
  margin: 0;
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl { margin-top: 0; }

.site-header, .page {
  width: min(1540px, calc(100% - 48px));
  margin-right: auto;
  margin-left: auto;
}
.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  min-height: 92px;
  grid-template-columns: 1.15fr auto .75fr auto 180px;
  align-items: stretch;
  border-right: 1px solid var(--rule);
  border-bottom: 2px solid var(--rule);
  border-left: 1px solid var(--rule);
  background: var(--header-surface);
  backdrop-filter: blur(14px);
}
.site-header > * { display: flex; align-items: center; padding: 0 26px; border-left: 1px solid var(--rule); }
.site-header > *:first-child { border-left: 0; }
.brand { gap: 13px; font-size: 18px; letter-spacing: -.035em; }
.brand-mark {
  display: block;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}
.brand strong { font-weight: 730; }
.site-header nav { gap: 30px; color: var(--muted); font-size: 14px; }
.site-header nav a {
  font-weight: 700;
  position: relative;
  transition: color .15s ease;
}
.site-header nav a::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 2px;
  background: var(--blue);
  content: "";
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms cubic-bezier(.22, 1, .36, 1);
}
.site-header nav a:hover, .site-header nav a.active { color: var(--blue); font-weight: 700; }
.site-header nav a:hover::after, .site-header nav a.active::after { transform: scaleX(1); }
.mode-label {
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.mode-label i { width: 7px; height: 7px; border-radius: 50%; background: var(--good); }
.language-switcher { justify-content: center; gap: 5px; color: var(--muted-2); }
.language-switcher button {
  padding: 7px 5px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .02em;
  transition: color .15s ease, opacity .15s ease;
}
.language-switcher button:hover, .language-switcher button.active { color: var(--blue); font-weight: 750; }
.language-switcher span { font-size: 11px; opacity: .65; }
.header-time { flex-direction: column; align-items: flex-end; justify-content: center; color: var(--muted); text-align: right; }
.header-time span { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.header-time strong { margin-top: 4px; color: var(--muted); font-family: var(--mono); font-size: 12px; font-weight: 500; line-height: 1.45; }
.local-datetime { color: inherit; font: inherit; }

.page { padding-bottom: 38px; }
.signal-frame {
  display: grid;
  grid-template-columns: 78px minmax(0, 1.7fr) minmax(350px, .72fr);
  border-right: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  background: var(--panel-surface);
}
.section-rail {
  padding: 28px 19px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.7;
}
.section-rail i { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; font-style: normal; letter-spacing: .08em; text-transform: uppercase; writing-mode: vertical-rl; }
.rail-overview { grid-row: 1; grid-column: 1; }
.rail-readout { grid-row: 2; grid-column: 1; }
.rail-trace { grid-row: 3; grid-column: 1; }
.overline { margin-bottom: 8px; color: var(--blue); font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

.signal-hero {
  min-height: 400px;
  grid-row: 1;
  grid-column: 2;
  padding: 42px 46px 36px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.signal-hero h1 {
  margin: 34px 0 31px;
  font-family: var(--condensed);
  font-size: clamp(58px, 5vw, 84px);
  font-weight: 700;
  letter-spacing: -.045em;
  line-height: .92;
}
html[lang="zh-hans"] .signal-hero h1 { line-height: 1.08; }
.signal-hero h1 em { color: var(--state); font-style: normal; }
.hero-foot { display: grid; grid-template-columns: minmax(0, 530px) auto; align-items: end; justify-content: space-between; gap: 28px; }
.hero-foot p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.hero-foot span { color: var(--muted); font-family: var(--mono); font-size: 11px; text-transform: uppercase; }

.status-panel {
  display: grid;
  min-width: 0;
  grid-row: 1;
  grid-column: 3;
  grid-template-rows: 1fr 1fr;
  border-bottom: 1px solid var(--rule);
}
.status-panel > div { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 30px 32px; }
.status-panel > div + div { border-top: 1px solid var(--rule); }
.status-panel span { color: var(--muted); font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.current-state > strong { display: flex; align-items: center; gap: 12px; margin: 13px 0 10px; color: var(--state); font-family: var(--condensed); font-size: clamp(34px, 2.5vw, 44px); letter-spacing: -.025em; line-height: 1; }
.current-state > strong i { width: 12px; height: 12px; flex: 0 0 auto; border-radius: 50%; background: var(--state); }
.current-state p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.score-panel > strong { margin: 10px 0 11px; color: var(--blue); font-family: var(--mono); font-size: 38px; font-weight: 400; line-height: 1; }
.score-meter { height: 6px; margin-bottom: 7px; border: 1px solid var(--blue); }
.score-meter i { display: block; width: 0; height: 100%; background: var(--state); }
.tone-normal .score-meter i { width: 22%; }
.tone-watch .score-meter i { width: 48%; }
.tone-probable .score-meter i { width: 72%; }
.tone-strong .score-meter i { width: 92%; }
.score-panel small { color: var(--muted); font-family: var(--mono); font-size: 12px; }

.metric-strip { display: grid; min-height: 142px; grid-row: 2; grid-column: 2 / 4; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--rule); }
.metric-strip article { display: flex; min-width: 0; flex-direction: column; justify-content: center; padding: 24px 28px; border-left: 1px solid var(--rule); }
.metric-strip article:first-child { border-left: 0; }
.metric-strip span, .metric-strip small { color: var(--muted); font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
.metric-strip strong { margin: 9px 0 5px; color: var(--blue-dark); font-size: 30px; font-weight: 650; letter-spacing: -.02em; line-height: 1; }
.metric-strip .coverage-metric strong { color: var(--state); font-size: 24px; }

.chart-panel { min-width: 0; min-height: 570px; grid-row: 3; grid-column: 2 / 4; padding: 32px 36px 22px; border-bottom: 1px solid var(--rule); }
.chart-panel > header { display: flex; justify-content: space-between; gap: 24px; }
.chart-panel header h2 { margin: 4px 0 0; font-family: var(--condensed); font-size: 28px; letter-spacing: -.02em; }
.chart-panel header > p { color: var(--muted); font-family: var(--mono); font-size: 11px; line-height: 1.5; text-align: right; text-transform: uppercase; }
.chart-wrap { overflow-x: auto; margin-top: 10px; }
.signal-chart { display: block; min-width: 650px; width: 100%; height: 400px; }
.grid-line { stroke: var(--rule-soft); stroke-width: 1; }
.axis-line { stroke: var(--rule); stroke-width: 1; }
.history-bar { fill: url(#none); stroke: var(--blue); stroke-width: 1; vector-effect: non-scaling-stroke; }
.history-bar.normal { fill: var(--bar-normal); }
.history-bar.watch { fill: var(--bar-watch); stroke: var(--watch); }
.history-bar.probable { fill: var(--bar-probable); stroke: var(--probable); }
.history-bar.strong { fill: var(--bar-strong); stroke: var(--strong); }
.history-bar.unavailable { fill: var(--bar-unavailable); stroke: var(--unavailable); }
.expected-line { fill: none; stroke: var(--blue-dark); stroke-width: 1.3; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }
.axis-label, .y-label { fill: var(--muted); font-family: var(--mono); font-size: 12px; }
.chart-legend { display: flex; align-items: center; gap: 22px; padding-top: 14px; border-top: 1px solid var(--rule-soft); color: var(--muted); font-size: 12px; }
.chart-legend span { display: flex; align-items: center; gap: 6px; }
.chart-legend i.actual { width: 7px; height: 7px; background: var(--blue); }
.chart-legend i.expected { width: 18px; border-top: 1px dashed var(--blue-dark); }
.chart-legend small { margin-left: auto; font-family: var(--mono); font-size: 11px; }
.empty-chart { display: grid; min-height: 300px; place-items: center; color: var(--muted); font-size: 15px; }

.context-panel { display: grid; grid-row: 4; grid-column: 2 / 4; grid-template-columns: 1fr; border-bottom: 1px solid var(--rule); }
.context-panel section { min-width: 0; padding: 30px 34px; }
.context-panel section + section { border-left: 1px solid var(--rule); }
.context-panel h2 { margin-bottom: 13px; color: var(--state); font-family: var(--condensed); font-size: 31px; letter-spacing: -.02em; }
.context-panel section > p:last-child { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.65; }
.timeline-panel .timeline-intro { max-width: 880px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.timeline-panel dl { display: grid; grid-template-columns: repeat(4, 1fr); margin: 20px 0 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.timeline-panel dl > div { display: grid; min-height: 108px; grid-template-columns: 16px 1fr; grid-template-rows: auto 1fr; padding: 17px 16px; border-left: 1px solid var(--rule); }
.timeline-panel dl > div:first-child { border-left: 0; }
.timeline-panel dl i { z-index: 1; width: 8px; height: 8px; margin-top: 5px; border: 1px solid var(--control-border); border-radius: 50%; background: var(--paper); }
.timeline-panel dl .active i { border-color: var(--state); background: var(--state); }
.timeline-panel dt { color: var(--muted); font-size: 12px; line-height: 1.4; }
.timeline-panel dd { overflow-wrap: anywhere; grid-column: 2; margin: 8px 0 0; color: var(--blue-dark); font-size: 13px; font-weight: 700; line-height: 1.45; }

.complaint-frame { display: grid; grid-template-columns: 78px 1fr; border-right: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.complaint-content { min-width: 0; padding: 38px 42px 34px; border-bottom: 1px solid var(--rule); }
.complaint-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.complaint-heading h2 { margin-bottom: 6px; font-family: var(--condensed); font-size: 34px; letter-spacing: -.02em; }
.complaint-heading p:last-child { max-width: 790px; margin-bottom: 0; color: var(--muted); font-size: 15px; line-height: 1.6; }
.complaint-heading > span { flex: 0 0 auto; padding: 8px 11px; border: 1px solid var(--rule); color: var(--muted); font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.complaint-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
.complaint-grid article { display: flex; min-height: 170px; flex-direction: column; justify-content: space-between; padding: 22px 24px 18px; border: 1px solid var(--rule-soft); background: var(--raised-surface); }
.complaint-grid article[hidden] { display: none; }
.complaint-grid blockquote { margin: 0; }
.complaint-grid blockquote p { margin: 0; color: var(--blue-dark); font-size: 15px; line-height: 1.65; }
.complaint-grid footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 22px; color: var(--muted-2); font-family: var(--mono); font-size: 10px; letter-spacing: .03em; text-transform: uppercase; }
.complaint-grid time { text-align: right; }
.complaint-controls { display: flex; justify-content: center; margin-top: 18px; }
.complaint-controls[hidden] { display: none; }
.complaint-controls button { min-height: 42px; padding: 9px 18px; border: 1px solid var(--control-border); border-radius: 0; background: transparent; color: var(--blue-dark); font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; }
.complaint-controls button:hover, .complaint-controls button:focus-visible { border-color: var(--blue-dark); background: var(--hover-surface); }
.complaint-controls button[hidden] { display: none; }
.complaint-empty { margin: 24px 0 0; padding: 22px 24px; border: 1px solid var(--rule-soft); color: var(--muted); }
.complaint-note { margin: 18px 0 0; color: var(--muted-2); font-size: 12px; }

.method-frame { display: grid; grid-template-columns: 78px 1fr; border-right: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.method-frame > .section-rail { grid-column: 1; }
.method-content { min-width: 0; grid-column: 2; padding: 38px 42px 36px; border-bottom: 1px solid var(--rule); }
.method-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.method-heading h2 { margin-bottom: 6px; font-family: var(--condensed); font-size: 34px; letter-spacing: -.02em; }
.method-heading p:last-child { margin-bottom: 0; color: var(--muted); font-size: 15px; }
.method-heading > span { padding: 8px 11px; border: 1px solid var(--rule); color: var(--muted); font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 24px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.method-grid article { min-width: 0; padding: 27px 28px 29px; border-left: 1px solid var(--rule); }
.method-grid article:first-child { padding-left: 0; border-left: 0; }
.method-grid article:last-child { padding-right: 0; }
.method-grid article > span { color: var(--blue); font-family: var(--mono); font-size: 12px; }
.method-grid h3 { margin: 10px 0 9px; font-size: 18px; }
.method-grid p { min-height: 70px; margin-bottom: 16px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.method-grid code { display: block; overflow-x: auto; padding: 12px 13px; border: 1px solid var(--rule-soft); background: var(--raised-surface); color: var(--blue-dark); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.method-readout { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.method-readout span { min-width: 130px; text-align: center; }
.method-readout small { display: block; color: var(--muted-2); font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.method-readout strong { display: block; margin-top: 4px; color: var(--blue-dark); font-family: var(--mono); font-size: 25px; }
.method-readout span:last-child strong { color: var(--blue); }
.method-readout > i { color: var(--muted-2); font-style: normal; }
.threshold-row { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 18px 0 2px; }
.threshold-row > span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.threshold-row i { width: 7px; height: 7px; border-radius: 50%; background: var(--unavailable); }
.threshold-row i.normal { background: var(--good); }
.threshold-row i.watch { background: var(--watch); }
.threshold-row i.probable { background: var(--probable); }
.threshold-row i.strong { background: var(--strong); }
.threshold-row strong { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.method-note { max-width: 1120px; margin: 17px 0 0; color: var(--muted-2); font-size: 13px; line-height: 1.65; }

.empty-frame { display: grid; grid-template-columns: 78px 1fr; border-right: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.empty-state { min-height: 570px; padding: 65px 55px; border-bottom: 1px solid var(--rule); }
.empty-state h1 { margin: 28px 0 18px; color: var(--unavailable); font-family: var(--condensed); font-size: clamp(50px, 7vw, 84px); letter-spacing: -.035em; line-height: .95; }
.empty-state > p { max-width: 760px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.empty-metrics { display: grid; max-width: 780px; grid-template-columns: repeat(3, 1fr); margin-top: 42px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.empty-metrics span { padding: 18px 20px; border-left: 1px solid var(--rule); }
.empty-metrics span:first-child { border-left: 0; }
.empty-metrics small { display: block; color: var(--muted-2); font-family: var(--mono); font-size: 12px; text-transform: uppercase; }
.empty-metrics strong { display: block; margin-top: 7px; font-size: 28px; }

.lab-details { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); background: var(--detail-surface); }
.lab-details > summary { display: grid; min-height: 88px; grid-template-columns: 360px 1fr 25px; align-items: center; gap: 30px; padding: 0 32px; cursor: pointer; list-style: none; }
.lab-details > summary::-webkit-details-marker { display: none; }
.lab-details > summary strong { font-family: var(--condensed); font-size: 23px; }
.lab-details > summary span { color: var(--muted); font-size: 14px; }
.lab-details > summary i { color: var(--blue); font-size: 24px; font-style: normal; font-weight: 300; transition: transform .18s ease; }
.lab-details[open] > summary i { transform: rotate(45deg); }
.lab-content { border-top: 1px solid var(--rule); }
.lab-panel-heading { display: grid; min-height: 88px; grid-template-columns: 360px 1fr; align-items: center; gap: 30px; padding: 0 32px; }
.lab-panel-heading strong { font-family: var(--condensed); font-size: 23px; }
.lab-panel-heading span { color: var(--muted); font-size: 14px; }
.details-hero { display: grid; min-height: 260px; grid-template-columns: 78px 1fr; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); }
.details-hero > div:last-child { display: flex; align-items: flex-start; flex-direction: column; justify-content: center; padding: 42px; }
.details-hero h1 { margin: 10px 0 12px; font-family: var(--condensed); font-size: clamp(48px, 7vw, 78px); letter-spacing: -.035em; line-height: .95; }
.details-hero p:last-child { margin: 0; color: var(--muted); font-size: 16px; }
.details-content { border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); background: var(--detail-surface); }
.details-content .lab-details { border: 0; border-bottom: 1px solid var(--rule); background: transparent; }
.details-content .lab-details:last-child { border-bottom: 0; }
.details-content .lab-panel { border-bottom: 1px solid var(--rule); }
.lab-section { padding: 34px 42px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 15px; }
.lab-section:first-child { border-top: 0; }
.lab-section h2 { margin-bottom: 10px; color: var(--ink); font-family: var(--condensed); font-size: 30px; letter-spacing: -.015em; }
.lab-section > p { max-width: 1050px; }
.lab-section a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.warning-copy { color: var(--probable); }
.fact-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 20px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.fact-grid > div { padding: 14px 16px; border-left: 1px solid var(--rule); }
.fact-grid > div:first-child { border-left: 0; }
.fact-grid dt { color: var(--muted-2); font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.fact-grid dd { margin: 6px 0 0; color: var(--ink); font-family: var(--mono); font-size: 18px; font-weight: 650; }
.calculation-method { max-width: 1120px; margin: 34px 0 28px; padding-top: 30px; border-top: 1px solid var(--rule); }
.calculation-method > header > p:last-child { max-width: 800px; margin: 8px 0 0; line-height: 1.65; }
.calculation-method h2 { margin-top: 5px; }
.calculation-steps { margin: 26px 0 0; padding: 0; border-top: 1px solid var(--rule); list-style: none; }
.calculation-steps > li { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 20px; padding: 25px 0; border-bottom: 1px solid var(--rule); }
.calculation-steps > li > span { color: var(--blue); font-family: var(--mono); font-size: 12px; }
.calculation-steps h3 { margin: 0 0 8px; color: var(--ink); font-size: 18px; }
.calculation-steps p { max-width: 950px; margin: 0; line-height: 1.65; }
.formula-pair { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 10px; }
.formula-pair code { overflow-x: auto; max-width: 100%; padding: 10px 12px; border: 1px solid var(--rule-soft); background: var(--raised-surface); color: var(--blue-dark); font-family: var(--mono); font-size: 12px; white-space: nowrap; }
.calculation-steps .formula-key { color: var(--muted-2); font-size: 13px; }
.calculation-thresholds { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 15px 0 12px; }
.calculation-thresholds > span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; }
.calculation-thresholds i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--unavailable); }
.calculation-thresholds i.normal { background: var(--good); }
.calculation-thresholds i.watch { background: var(--watch); }
.calculation-thresholds i.probable { background: var(--probable); }
.calculation-thresholds i.strong { background: var(--strong); }
.calculation-thresholds strong { color: var(--ink); font-family: var(--mono); font-weight: 500; }
.calculation-readout { display: grid; grid-template-columns: repeat(4, 1fr); margin: 22px 0 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.calculation-readout > div { padding: 14px 16px; border-left: 1px solid var(--rule); }
.calculation-readout > div:first-child { border-left: 0; }
.calculation-readout dt { color: var(--muted-2); font-family: var(--mono); font-size: 11px; text-transform: uppercase; }
.calculation-readout dd { margin: 6px 0 0; color: var(--ink); font-family: var(--mono); font-size: 20px; font-weight: 650; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { min-width: 760px; width: 100%; border-collapse: collapse; color: var(--ink); font-size: 14px; }
th, td { padding: 13px 11px; border-bottom: 1px solid var(--rule-soft); text-align: left; vertical-align: top; }
thead th { color: var(--muted-2); font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
tbody th { font-family: var(--mono); font-weight: 600; }
.table-history { margin-top: 10px; }
.table-history > summary { display: flex; min-height: 48px; align-items: center; justify-content: space-between; padding: 0 12px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); color: var(--blue); cursor: pointer; font-family: var(--mono); font-size: 12px; font-weight: 650; list-style: none; text-transform: uppercase; }
.table-history > summary::-webkit-details-marker { display: none; }
.table-history > summary i { font-size: 20px; font-style: normal; font-weight: 300; transition: transform .18s ease; }
.table-history-open { display: none; }
.table-history[open] .table-history-closed { display: none; }
.table-history[open] .table-history-open { display: inline; }
.table-history[open] > summary i { transform: rotate(45deg); }
.table-history > .table-wrap { margin-top: 0; }
.evidence-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin: 18px 0 0; padding: 0; border-top: 1px solid var(--rule); list-style: none; }
.evidence-list li { padding: 16px 14px; border-bottom: 1px solid var(--rule); }
.evidence-list p { margin-bottom: 4px; }

.site-footer { display: grid; min-height: 82px; grid-template-columns: .7fr 2fr; align-items: center; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); border-left: 1px solid var(--rule); color: var(--muted); font-size: 12px; }
.site-footer > * { margin: 0; padding: 0 20px; }
.site-footer > span { color: var(--blue); font-family: var(--mono); text-transform: uppercase; }
.footer-cadence { display: block; margin-bottom: 5px; color: var(--muted); font-weight: 650; }

@media (max-width: 1050px) {
  .site-header { grid-template-columns: 1fr auto auto auto; }
  .header-time { display: none; }
  .signal-frame { grid-template-columns: 68px minmax(0, 1.5fr) minmax(300px, .78fr); }
  .signal-hero { padding-right: 28px; padding-left: 28px; }
  .hero-foot { grid-template-columns: 1fr; }
  .hero-foot span { display: none; }
  .metric-strip article { padding-right: 15px; padding-left: 15px; }
  .context-panel { grid-template-columns: 1fr; }
  .context-panel section + section { border-top: 1px solid var(--rule); border-left: 0; }
  .timeline-panel dl { grid-template-columns: repeat(2, 1fr); }
  .timeline-panel dl > div:nth-child(odd) { border-left: 0; }
  .timeline-panel dl > div:nth-child(n + 3) { border-top: 1px solid var(--rule); }
  .complaint-grid { grid-template-columns: 1fr; }
  .method-grid { grid-template-columns: 1fr; }
  .method-grid article, .method-grid article:first-child, .method-grid article:last-child { padding: 18px 0; border-top: 1px solid var(--rule); border-left: 0; }
  .method-grid article:first-child { border-top: 0; }
  .method-grid p { min-height: 0; }
}

@media (max-width: 760px) {
  .site-header, .page { width: min(100% - 24px, 1368px); }
  .site-header { grid-template-columns: 1fr auto; min-height: 76px; }
  .site-header nav { display: flex; min-height: 46px; grid-row: 2; grid-column: 1 / -1; border-top: 1px solid var(--rule); border-left: 0; }
  .site-header nav a { min-height: 46px; flex: 1; }
  .mode-label, .header-time { display: none; }
  .site-header > * { padding: 0 16px; }
  .mode-label { font-size: 10px; }
  .signal-frame { display: block; }
  .section-rail { display: flex; min-height: 54px; align-items: center; gap: 12px; padding: 0 16px; border-right: 0; }
  .section-rail i { display: inline; margin: 0; writing-mode: initial; }
  .signal-hero { min-height: 350px; padding: 32px 24px; border-right: 0; }
  .signal-hero h1 { margin: 30px 0 26px; font-size: 46px; line-height: .95; }
  .status-panel { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .status-panel > div { min-height: 180px; padding: 24px; }
  .status-panel > div + div { border-top: 0; border-left: 1px solid var(--rule); }
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .metric-strip article { min-height: 132px; border-top: 1px solid var(--rule); }
  .metric-strip article:nth-child(odd) { border-left: 0; }
  .chart-panel { min-height: 500px; padding: 24px 20px 16px; border-right: 0; }
  .signal-chart { height: 330px; }
  .context-panel { grid-template-columns: 1fr; }
  .context-panel section + section { border-top: 1px solid var(--rule); border-left: 0; }
  .complaint-frame { display: block; }
  .complaint-content { padding: 32px 24px 30px; }
  .complaint-heading { flex-direction: column; gap: 14px; }
  .method-frame { display: block; }
  .method-content { padding: 32px 24px 30px; }
  .method-heading { flex-direction: column; gap: 14px; }
  .method-readout { gap: 9px; }
  .method-readout span { min-width: 0; flex: 1; }
  .method-readout strong { font-size: 23px; }
  .empty-frame { display: block; }
  .details-hero { display: block; min-height: 0; }
  .details-hero > div:last-child { min-height: 250px; padding: 34px 24px; }
  .empty-state { min-height: 500px; padding: 45px 25px; }
  .empty-metrics { grid-template-columns: 1fr; }
  .empty-metrics span { border-top: 1px solid var(--rule); border-left: 0; }
  .empty-metrics span:first-child { border-top: 0; }
  .lab-details > summary { grid-template-columns: 1fr 24px; gap: 9px; padding: 18px 22px; }
  .lab-details > summary span { grid-column: 1; }
  .lab-details > summary i { grid-row: 1 / span 2; grid-column: 2; }
  .lab-panel-heading { grid-template-columns: 1fr; gap: 9px; padding: 18px 22px; }
  .lab-section { padding: 30px 24px; }
  .fact-grid { grid-template-columns: repeat(2, 1fr); }
  .fact-grid > div:nth-child(3) { border-left: 0; }
  .calculation-readout { grid-template-columns: repeat(2, 1fr); }
  .calculation-readout > div:nth-child(3) { border-left: 0; }
  .site-footer { grid-template-columns: 1fr; gap: 8px; padding: 16px 0; }
  .site-footer > * { text-align: left; }
}

@media (max-width: 480px) {
  .brand strong { font-size: 16px; }
  .site-header > * { padding-right: 12px; padding-left: 12px; }
  .mode-label { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  .language-switcher { padding-right: 8px; padding-left: 8px; }
  .signal-hero h1 { font-size: 40px; }
  .status-panel { grid-template-columns: 1fr; }
  .status-panel > div + div { border-top: 1px solid var(--rule); border-left: 0; }
  .context-panel { grid-template-columns: 1fr; }
  .context-panel section + section { border-top: 1px solid var(--rule); border-left: 0; }
  .timeline-panel dl { grid-template-columns: 1fr; }
  .timeline-panel dl > div { border-top: 1px solid var(--rule); border-left: 0; }
  .timeline-panel dl > div:first-child { border-top: 0; }
  .chart-legend { flex-wrap: wrap; }
  .chart-legend small { width: 100%; margin-left: 0; }
  .method-content { padding-right: 16px; padding-left: 16px; }
  .complaint-content { padding-right: 16px; padding-left: 16px; }
  .complaint-grid article { padding-right: 18px; padding-left: 18px; }
  .complaint-grid footer { align-items: flex-start; flex-direction: column; gap: 6px; }
  .complaint-grid time { text-align: left; }
  .method-readout { align-items: stretch; flex-direction: column; }
  .method-readout > i { text-align: center; }
  .calculation-steps > li { grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
  .calculation-thresholds { display: grid; grid-template-columns: 1fr; }
  .calculation-thresholds > span { flex-wrap: wrap; }
  .calculation-thresholds .threshold-condition { flex-basis: 100%; margin-left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header nav a, .site-header nav a::after, .language-switcher button, .lab-details > summary i, .table-history > summary i { transition: none; }
}
/* Keep the age warning visible without presenting old evidence as current. */
.stale-notice { padding: 1rem 2rem; color: var(--notice-ink); background: var(--notice-surface); border-bottom: 1px solid currentColor; }
.stale-notice[hidden] { display: none; }

/* Daily history details stay outside the horizontally scrolling SVG. */
.history-hit { fill: transparent; cursor: pointer; }
.history-day { outline: none; }
.history-day.is-active .history-bar, .history-day:focus-visible .history-bar { stroke-width: 3; }
.history-day:focus-visible .history-hit { stroke: var(--blue); stroke-dasharray: 3 3; stroke-width: 1; }
.chart-hint { margin: 4px 0 14px; color: var(--muted); font-size: 12px; }
.history-tooltip { position: fixed; z-index: 20; width: 290px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow-y: auto; box-sizing: border-box; padding: 18px; border: 1px solid var(--blue); background: var(--tooltip-surface); color: var(--ink); box-shadow: 0 6px 24px var(--shadow); font-size: 13px; }
.history-tooltip[hidden] { display: none; }
.history-date { font-family: var(--mono); font-size: 16px; }
.history-window { margin: 5px 0 12px; color: var(--muted); font-size: 11px; }
.history-state { margin: 0 0 12px; font-weight: 700; }
.history-tooltip dl { margin: 0; }
.history-tooltip dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border-top: 1px solid var(--rule-soft); }
.history-tooltip dd { margin: 0; font-family: var(--mono); font-weight: 600; }

/* Compact appearance control shares the header with language selection. */
.header-controls { gap: 14px; }
.header-controls .language-switcher { display: flex; align-items: center; margin: 0; padding: 0; }
.theme-switcher { position: relative; flex: 0 0 auto; }
.theme-switcher[hidden], .theme-options[hidden], .theme-trigger svg[hidden] { display: none; }
.theme-trigger { display: grid; width: 40px; height: 44px; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.theme-trigger svg { width: 19px; height: 19px; }
.theme-trigger:hover, .theme-trigger[aria-expanded="true"] { background: var(--hover-surface); color: var(--blue); }
.theme-trigger:focus-visible, .theme-options button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.theme-options { position: absolute; z-index: 30; top: calc(100% + 12px); right: 0; display: grid; width: 176px; padding: 6px; border: 1px solid var(--rule-soft); border-radius: 10px; background: var(--tooltip-surface); box-shadow: 0 8px 28px var(--shadow); }
.theme-options button { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-family: var(--sans); font-size: 13px; text-align: left; cursor: pointer; }
.theme-options button svg { width: 17px; height: 17px; flex: 0 0 auto; }
.theme-options button:hover { background: var(--hover-surface); color: var(--ink); }
.theme-options button[aria-pressed="true"] { background: var(--hover-surface); color: var(--blue); }
.theme-check { margin-left: auto; visibility: hidden; }
.theme-options button[aria-pressed="true"] .theme-check { visibility: visible; }
@media (max-width: 480px) {
  .header-controls { gap: 4px; padding-right: 8px; padding-left: 8px; }
  .brand { gap: 8px; }
  .brand-mark { width: 32px; height: 32px; }
  .brand strong { font-size: 14px; }
  .theme-trigger { width: 36px; height: 44px; }
}

/* Keep navigation native: no intercepted links, extra requests, or loading delay. */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
::view-transition-group(*) { animation-duration: 180ms; animation-timing-function: ease-out; }
::view-transition-old(root) { animation: page-out 120ms ease-out both; }
::view-transition-new(root) { animation: page-in 180ms ease-out both; }
::view-transition-group(site-header),
::view-transition-new(site-header) { animation: none; }
::view-transition-old(site-header) { animation: none; opacity: 0; }
@keyframes page-out { to { opacity: 0; } }
@keyframes page-in { from { opacity: 0; } }

/* A short dropdown entrance also works independently of page-transition support. */
.theme-options:not([hidden]) { transform-origin: top right; animation: menu-in 140ms ease-out; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }

.skip-link { position: fixed; z-index: 100; top: 10px; left: 24px; padding: 12px 18px; border: 1px solid var(--blue); border-radius: 6px; background: var(--paper); color: var(--ink); font-weight: 700; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
:where(a, button, summary):focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; border-radius: 3px; }
.page:focus { outline: none; }
.language-switcher button { flex: 0 0 auto; min-height: 44px; min-width: 28px; white-space: nowrap; }
.lab-details > summary:hover, .table-history > summary:hover { background: var(--hover-surface); }
.theme-trigger, .theme-options button, .complaint-controls button { transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease; }
.complaint-controls button { min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; }
  .theme-options:not([hidden]) { animation: none; }
  .theme-trigger, .theme-options button, .complaint-controls button { transition: none; }
}
