/* DeepSeek 观测站 · Signal Desk
   Palette: paper / ink / cobalt / alarm orange / teal */

:root {
  --paper: #f4f1e9;
  --paper-raised: #faf8f2;
  --paper-deep: #ebe6da;
  --ink: #10181d;
  --ink-soft: #25363d;
  --muted: #5d6b70;
  --line: #d5cfc1;
  --line-strong: #b9b1a1;
  --blue: #1e4cf0;
  --blue-soft: #dce3ff;
  --orange: #d9481c;
  --orange-soft: #fbe1d6;
  --teal: #0b6e6b;
  --teal-soft: #d8ede9;
  --gold: #b7791f;
  --gold-soft: #f3e7c9;
  --white: #ffffff;
  --font-sans: "Space Grotesk", "Aptos", "Segoe UI Variable", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-body: "Aptos", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --max: 1360px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 0px;
}

[data-theme="dark"] {
  --paper: #0c161b;
  --paper-raised: #122229;
  --paper-deep: #182b33;
  --ink: #edf2f3;
  --ink-soft: #d1dee1;
  --muted: #a2b2b7;
  --line: #25363d;
  --line-strong: #3a4b52;
  --blue: #7b97ff;
  --blue-soft: #1b2b55;
  --orange: #ff7048;
  --orange-soft: #43231c;
  --teal: #5ed3c8;
  --teal-soft: #123a38;
  --gold: #e5b45b;
  --gold-soft: #3a2c16;
  --white: #10181d;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c161b;
    --paper-raised: #122229;
    --paper-deep: #182b33;
    --ink: #edf2f3;
    --ink-soft: #d1dee1;
    --muted: #a2b2b7;
    --line: #25363d;
    --line-strong: #3a4b52;
    --blue: #7b97ff;
    --blue-soft: #1b2b55;
    --orange: #ff7048;
    --orange-soft: #43231c;
    --teal: #5ed3c8;
    --teal-soft: #123a38;
    --gold: #e5b45b;
    --gold-soft: #3a2c16;
    --white: #10181d;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--blue);
  color: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.mono {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1.5;
  text-transform: uppercase;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  width: min(var(--max), 100% - var(--gutter));
  height: 66px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.brand-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  width: 18px;
  height: 17px;
}

.brand-mark i {
  display: block;
  width: 3px;
  background: var(--ink);
}

.brand-mark i:nth-child(1) {
  height: 9px;
}

.brand-mark i:nth-child(2) {
  height: 16px;
  background: var(--blue);
}

.brand-mark i:nth-child(3) {
  height: 5px;
}

.brand-name {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-en {
  margin-left: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  padding: 4px 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nav-link::after {
  position: absolute;
  right: 0;
  bottom: -3px;
  left: 0;
  height: 2px;
  background: var(--blue);
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rss-button,
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.rss-button {
  gap: 7px;
  padding: 0 10px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.rss-button svg {
  width: 15px;
  height: 15px;
}

.theme-toggle {
  width: 32px;
  padding: 0;
}

.theme-toggle svg {
  width: 15px;
  height: 15px;
}

.theme-toggle svg:last-child {
  display: none;
}

[data-theme="dark"] .theme-toggle svg:first-child {
  display: none;
}

[data-theme="dark"] .theme-toggle svg:last-child {
  display: block;
}

.rss-button:hover,
.theme-toggle:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ---------- shared ---------- */

.hero,
.home-grid,
.page-main,
.footer-inner {
  width: min(var(--max), 100% - var(--gutter));
  margin-right: auto;
  margin-left: auto;
}

.hero {
  padding-top: clamp(54px, 8vw, 108px);
}

.hero-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--ink);
}

.hero-stamp {
  color: var(--muted);
  white-space: nowrap;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.33fr) minmax(255px, 0.67fr);
  gap: clamp(36px, 7vw, 110px);
  padding: clamp(34px, 5vw, 64px) 0 clamp(42px, 6vw, 76px);
  border-bottom: 1px solid var(--line);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  max-width: 920px;
  margin: 0 0 28px;
  font-family: var(--font-sans);
  font-size: clamp(3.3rem, 7.7vw, 7.6rem);
  font-weight: 600;
  letter-spacing: -0.075em;
  line-height: 0.93;
}

.mark {
  position: relative;
  color: var(--blue);
  white-space: nowrap;
}

.mark::after {
  position: absolute;
  right: 0.03em;
  bottom: 0.04em;
  left: 0.03em;
  height: 0.06em;
  background: var(--orange);
  content: "";
}

.hero-lead {
  max-width: 590px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.13rem);
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.button-primary,
.button-quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 43px;
  padding: 0 17px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.button-primary {
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.button-primary svg {
  width: 15px;
  height: 15px;
}

.button-primary:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.button-quiet {
  border: 1px solid transparent;
  color: var(--ink-soft);
}

.button-quiet svg {
  width: 15px;
  height: 15px;
  color: var(--orange);
}

.button-quiet:hover {
  border-color: var(--line-strong);
  color: var(--blue);
}

.button-primary.full,
.button-quiet.full {
  width: 100%;
  margin-top: 9px;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-left: 1px solid var(--line);
  padding-left: clamp(20px, 3vw, 42px);
}

.hero-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}

.hero-stat:first-child {
  border-top: 0;
}

.hero-stat strong {
  font-family: var(--font-sans);
  font-size: clamp(2.1rem, 3vw, 3.1rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1;
}

.hero-stat .unit {
  margin-left: 2px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.34em;
  letter-spacing: 0.04em;
}

.hero-stat span {
  max-width: 110px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  line-height: 1.5;
  text-align: right;
  text-transform: uppercase;
}

.hero-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
  line-height: 1.9;
}

.status-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.live-mark {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  transition: color 160ms ease;
}

.status-chip b {
  color: var(--ink-soft);
  font-weight: 400;
}

.status-chip:hover {
  color: var(--blue);
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}

.status-ok {
  color: var(--teal);
}

.live-mark .status-dot {
  color: var(--blue);
  animation: pulse 2.4s ease-in-out infinite;
}

.status-warn {
  color: var(--gold);
}

.status-error {
  color: var(--orange);
}

.status-unknown {
  color: var(--muted);
  background: transparent;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.28; }
}

/* ---------- home / feed ---------- */

.home-grid {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 78px);
  padding-top: 42px;
  padding-bottom: 96px;
}

.ledger {
  position: sticky;
  top: 90px;
  align-self: start;
  border-top: 1px solid var(--ink);
}

.ledger-block {
  padding: 19px 0 21px;
  border-bottom: 1px solid var(--line);
}

.ledger-block > .eyebrow {
  margin-bottom: 12px;
}

.source-nav,
.level-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.source-nav a,
.level-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-height: 30px;
  padding: 4px 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.35;
  transition: color 150ms ease, padding 150ms ease;
}

.source-nav a b {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 400;
}

.source-nav a:hover,
.level-nav a:hover,
.source-nav a.is-active,
.level-nav a.is-active {
  color: var(--blue);
}

.source-nav a:hover,
.level-nav a:hover {
  padding-left: 3px;
}

.source-nav a.is-active {
  font-weight: 600;
}

.source-nav a.is-active b {
  color: var(--blue);
}

.level-nav a {
  justify-content: flex-start;
  gap: 7px;
}

.level-nav a b {
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 400;
}

.level-nav a.is-active b {
  color: var(--blue);
}

.search-form {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--ink);
}

.search-form input {
  width: 100%;
  min-width: 0;
  padding: 7px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.search-form input::placeholder {
  color: var(--muted);
}

.search-form button {
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.search-form button svg {
  width: 15px;
  height: 15px;
}

.search-form button:hover {
  color: var(--blue);
}

.ledger-note p {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.ledger-note .mono {
  margin-top: 13px;
  font-size: 8px;
}

.feed {
  min-width: 0;
}

.feed-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0 18px;
  border-top: 2px solid var(--ink);
}

.feed-head h2 {
  margin: 5px 0 0;
  font-family: var(--font-sans);
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  font-weight: 500;
  letter-spacing: -0.055em;
  line-height: 1.05;
}

.feed-count {
  padding-bottom: 3px;
  color: var(--muted);
  white-space: nowrap;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.active-filters a {
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.active-filters a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.signal-list {
  border-top: 1px solid var(--line);
}

.signal {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: clamp(12px, 2.5vw, 24px);
  padding: 25px 4px 26px 0;
  border-bottom: 1px solid var(--line);
}

.signal:hover h3 a {
  color: var(--blue);
}

.signal-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.signal-rail::before {
  position: absolute;
  top: 23px;
  bottom: -27px;
  left: 50%;
  width: 1px;
  background: var(--line);
  content: "";
}

.signal:last-child .signal-rail::before {
  display: none;
}

.signal-index {
  position: relative;
  z-index: 1;
  padding: 1px 0;
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.signal-dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 1px var(--muted);
}

.signal-dot.level-3 {
  background: var(--orange);
  box-shadow: 0 0 0 1px var(--orange);
}

.signal-dot.level-2 {
  background: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
}

.signal-dot.level-1 {
  background: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.signal-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.045em;
  line-height: 1.5;
  text-transform: uppercase;
}

.source-tag {
  color: var(--blue);
}

.meta-divider {
  color: var(--line-strong);
}

.signal h3 {
  margin: 8px 0 5px;
  font-family: var(--font-sans);
  font-size: clamp(1.15rem, 2vw, 1.48rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.35;
}

.signal h3 a {
  transition: color 160ms ease;
}

.signal-summary {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.signal-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.level {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  border: 1px solid currentColor;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
  line-height: 1.2;
  white-space: nowrap;
}

.level-num {
  font-weight: 700;
}

.level-3 {
  border-color: var(--orange);
  background: var(--orange);
  color: var(--white);
}

.level-2 {
  border-color: var(--blue);
  color: var(--blue);
}

.level-1 {
  border-color: var(--teal);
  color: var(--teal);
}

.level-0 {
  border-color: var(--line-strong);
  color: var(--muted);
}

.signal-arrow {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.signal-arrow svg {
  width: 14px;
  height: 14px;
}

.signal:hover .signal-arrow {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.empty-state {
  padding: 58px 20px 64px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.empty-mark {
  display: block;
  margin-bottom: 10px;
  color: var(--line-strong);
  font-family: var(--font-mono);
  font-size: 3.4rem;
  line-height: 1;
}

.empty-state h3 {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.empty-state p {
  max-width: 420px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.text-link svg {
  width: 13px;
  height: 13px;
}

.text-link:hover {
  color: var(--orange);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 24px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.pagination a:hover {
  color: var(--blue);
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-numbers a,
.page-numbers span {
  display: inline-block;
}

.page-numbers a.is-current {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-gap {
  color: var(--line-strong);
}

.is-disabled {
  opacity: 0.4;
}

/* ---------- page heads ---------- */

.page-main {
  padding-top: clamp(40px, 6vw, 74px);
  padding-bottom: 96px;
}

.page-head {
  padding-bottom: clamp(34px, 5vw, 55px);
  border-bottom: 1px solid var(--ink);
}

.page-head > .eyebrow {
  margin-bottom: 15px;
}

.page-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 260px);
  gap: clamp(25px, 5vw, 80px);
  align-items: end;
}

.page-head h1 {
  max-width: 900px;
  margin: 0 0 20px;
  font-family: var(--font-sans);
  font-size: clamp(2.8rem, 6vw, 6.4rem);
  font-weight: 600;
  letter-spacing: -0.07em;
  line-height: 0.96;
}

.page-lead {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.35vw, 1.12rem);
  line-height: 1.85;
}

.page-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  color: var(--muted);
}

.big-count {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: clamp(2.8rem, 5vw, 4.4rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.95;
}

.page-head-side .mono + .mono {
  margin-top: 7px;
}

/* ---------- detail ---------- */

.detail-page {
  max-width: 1240px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 23px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.breadcrumb a:hover {
  color: var(--blue);
}

.breadcrumb span:nth-child(even) {
  color: var(--line-strong);
}

.detail-head {
  padding: 22px 0 clamp(35px, 5vw, 58px);
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.detail-kicker {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 24px;
  color: var(--muted);
}

.detail-kicker .mono:first-child {
  color: var(--blue);
}

.detail-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: clamp(25px, 5vw, 80px);
  align-items: start;
}

.detail-title-row h1 {
  max-width: 900px;
  margin: 0 0 19px;
  font-family: var(--font-sans);
  font-size: clamp(2.25rem, 4.7vw, 4.8rem);
  font-weight: 600;
  letter-spacing: -0.065em;
  line-height: 1.02;
}

.detail-lead {
  max-width: 750px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.15rem);
  line-height: 1.8;
  white-space: pre-line;
}

.detail-level-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
}

.detail-level-num {
  font-family: var(--font-mono);
  font-size: clamp(3.8rem, 7vw, 6.5rem);
  font-weight: 300;
  letter-spacing: -0.09em;
  line-height: 0.8;
}

.level-text-3 { color: var(--orange); }
.level-text-2 { color: var(--blue); }
.level-text-1 { color: var(--teal); }
.level-text-0 { color: var(--muted); }

.detail-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: clamp(34px, 6vw, 84px);
  padding-top: clamp(35px, 5vw, 56px);
}

.detail-content {
  min-width: 0;
}

.detail-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.note-block {
  padding: 19px 24px 21px 0;
}

.note-block + .note-block {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.note-block p:last-child {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.75;
}

.detail-section {
  margin-top: clamp(32px, 4vw, 46px);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ink);
}

.section-head h2 {
  margin: 5px 0 0;
  font-family: var(--font-sans);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.04em;
}

.section-head > .mono {
  color: var(--muted);
  white-space: nowrap;
}

.detail-copy,
.detail-section > p {
  margin: 18px 0 0;
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-line;
}

.detail-section > .muted {
  color: var(--muted);
}

.change-list {
  border-top: 1px solid var(--line);
}

.change {
  padding: 20px 0 22px;
  border-bottom: 1px solid var(--line);
}

.change-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.change-page {
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
  text-transform: none;
}

.change-kind {
  padding: 2px 5px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.05em;
}

.change-kind.is-error {
  border-color: var(--orange);
  color: var(--orange);
}

.change ul {
  margin: 0;
  padding-left: 19px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.75;
}

.change li + li {
  margin-top: 3px;
}

.diff {
  margin: 12px 0 0;
  padding: 13px 15px;
  overflow-x: auto;
  background: var(--ink);
  color: #d8e0e1;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.diff-add { color: #7ce0c8; }
.diff-del { color: #ffab8f; }

.evidence-list {
  margin: 17px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: evidence;
}

.evidence-list li {
  position: relative;
  padding: 10px 0 11px 37px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
  counter-increment: evidence;
}

.evidence-list li::before {
  position: absolute;
  top: 10px;
  left: 0;
  color: var(--blue);
  content: counter(evidence, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 9px;
}

.model-note {
  padding: 15px 17px;
  border: 1px solid var(--line);
  background: var(--paper-deep);
}

.model-note p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.detail-aside {
  align-self: start;
  position: sticky;
  top: 92px;
}

.aside-box {
  padding: 17px 0 20px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.aside-box + .aside-box {
  margin-top: 25px;
}

.aside-box dl {
  margin: 14px 0 16px;
}

.aside-box dl > div {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 11px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
}

.aside-box dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.03em;
}

.aside-box dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}

.aside-box dd.small {
  color: var(--muted);
  font-size: 9px;
  word-break: break-word;
}

.aside-note p:not(.eyebrow) {
  margin: 11px 0 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.prev-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: clamp(42px, 6vw, 72px);
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.prev-next a {
  display: flex;
  min-height: 80px;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px 15px;
  border: 1px solid var(--line);
  transition: border-color 160ms ease, background 160ms ease;
}

.prev-next a:hover {
  border-color: var(--blue);
  background: var(--paper-raised);
}

.prev-next .next {
  text-align: right;
}

.prev-next .mono {
  color: var(--muted);
}

.prev-next strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

/* ---------- status ---------- */

.status-layout {
  display: grid;
  gap: 42px;
  padding-top: 38px;
}

.status-panel {
  border-top: 1px solid var(--ink);
}

.status-panel .section-head {
  border-bottom: 1px solid var(--line);
}

.status-table {
  width: 100%;
}

.status-row {
  display: grid;
  grid-template-columns: 150px 90px 165px 165px minmax(0, 1fr);
  gap: 16px;
  align-items: baseline;
  padding: 14px 3px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.status-head {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-source {
  font-weight: 600;
}

.status-source a:hover {
  color: var(--blue);
}

.status-detail {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats-section {
  padding-top: 20px;
}

.stats-section .section-head {
  border-bottom: 1px solid var(--ink);
}

.stats-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  color: var(--muted);
}

.stats-total strong {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 2.2rem;
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.9;
}

.stats-today {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0 4px;
  border: 1px solid var(--line);
  background: var(--line);
}

.stats-today div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--paper-raised);
}

.stats-today strong {
  font-family: var(--font-sans);
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}

.stats-today span {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.stats-note {
  max-width: 740px;
  margin: 16px 0 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.bars {
  display: grid;
  gap: 3px;
}

.bar-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  gap: 14px;
  align-items: center;
}

.bar-day,
.bar-value {
  color: var(--muted);
  font-size: 9px;
}

.bar-value {
  text-align: right;
}

.bar-track {
  position: relative;
  display: block;
  height: 10px;
  background: var(--paper-deep);
}

.bar-track i {
  display: block;
  height: 100%;
  min-width: 2px;
  background: var(--blue);
}

.bar-track.is-event i {
  background: var(--orange);
}

.bar-fill-0 { width: 0%; min-width: 0; }
.bar-fill-5 { width: 5%; }
.bar-fill-10 { width: 10%; }
.bar-fill-15 { width: 15%; }
.bar-fill-20 { width: 20%; }
.bar-fill-25 { width: 25%; }
.bar-fill-30 { width: 30%; }
.bar-fill-35 { width: 35%; }
.bar-fill-40 { width: 40%; }
.bar-fill-45 { width: 45%; }
.bar-fill-50 { width: 50%; }
.bar-fill-55 { width: 55%; }
.bar-fill-60 { width: 60%; }
.bar-fill-65 { width: 65%; }
.bar-fill-70 { width: 70%; }
.bar-fill-75 { width: 75%; }
.bar-fill-80 { width: 80%; }
.bar-fill-85 { width: 85%; }
.bar-fill-90 { width: 90%; }
.bar-fill-95 { width: 95%; }
.bar-fill-100 { width: 100%; }

.stats-foot {
  margin-top: 20px;
  color: var(--muted);
  font-size: 8px;
  line-height: 1.8;
}

.compact .coverage-list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
}

.coverage-list a {
  display: flex;
  min-height: 80px;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px 10px;
  border-right: 1px solid var(--line);
  background: var(--paper-raised);
  color: var(--muted);
  font-size: 11px;
}

.coverage-list a:first-child {
  border-left: 1px solid var(--line);
}

.coverage-list a:hover {
  color: var(--blue);
}

.coverage-list b {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -0.04em;
}

/* ---------- about ---------- */

.about-head {
  border-bottom: 1px solid var(--ink);
}

.about-head h1 {
  max-width: 1040px;
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: clamp(35px, 7vw, 100px);
  padding-top: 32px;
}

.about-copy section {
  padding: 26px 0 34px;
  border-bottom: 1px solid var(--line);
}

.about-copy h2 {
  margin: 9px 0 18px;
  font-family: var(--font-sans);
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.about-copy p:not(.eyebrow) {
  max-width: 760px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.9;
}

.level-explain {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
  margin-top: 23px;
  border-top: 1px solid var(--line);
}

.level-explain > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.level-explain p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.feed-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.feed-links a {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 12px;
}

.feed-links a:nth-child(odd) {
  padding-right: 20px;
  border-right: 1px solid var(--line);
}

.feed-links a:nth-child(even) {
  padding-left: 20px;
}

.feed-links code {
  color: var(--blue);
  font-family: var(--font-mono);
  font-size: 9px;
}

.feed-links a:hover code {
  color: var(--orange);
}

.about-side {
  align-self: start;
  position: sticky;
  top: 92px;
}

/* ---------- 404 / error ---------- */

.not-found {
  width: min(var(--max), 100% - var(--gutter));
  min-height: 62vh;
  margin: 0 auto;
  padding: clamp(70px, 12vw, 150px) 0 100px;
}

.not-found h1 {
  margin: 15px 0 22px;
  font-family: var(--font-sans);
  font-size: clamp(3.1rem, 7vw, 6.5rem);
  font-weight: 600;
  letter-spacing: -0.075em;
  line-height: 0.94;
}

.not-found p:not(.eyebrow) {
  margin-bottom: 25px;
  color: var(--muted);
  font-size: 14px;
}

/* ---------- footer ---------- */

.footer {
  margin-top: auto;
  background: var(--ink);
  color: var(--paper);
}

[data-theme="dark"] .footer {
  background: #122229;
  color: #edf2f3;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.7fr);
  gap: 50px;
  padding-top: 44px;
  padding-bottom: 45px;
}

.footer-brand {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}

.footer-brand .brand-mark i {
  background: var(--paper);
}

.footer-brand .brand-mark i:nth-child(2) {
  background: #7b97ff;
}

.footer-brand strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-sans);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.footer-brand p {
  margin: 0;
  color: color-mix(in srgb, var(--paper) 62%, transparent);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.footer-meta p {
  margin: 0 0 10px;
  color: color-mix(in srgb, var(--paper) 65%, transparent);
  font-size: 11px;
  line-height: 1.7;
}

.footer-meta .mono {
  color: color-mix(in srgb, var(--paper) 45%, transparent);
  font-size: 8px;
}

.footer-meta a {
  color: var(--paper);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--paper) 35%, transparent);
  text-underline-offset: 3px;
}

.footer-meta a:hover {
  color: #7b97ff;
}

.sep {
  padding: 0 4px;
  color: color-mix(in srgb, var(--paper) 35%, transparent);
}

/* ---------- responsive ---------- */

@media (max-width: 1080px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(230px, 0.8fr);
    gap: 42px;
  }

  .home-grid {
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 35px;
  }

  .detail-body-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 40px;
  }

  .status-row {
    grid-template-columns: 125px 80px 145px 145px minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 820px) {
  .topbar-inner {
    height: 58px;
  }

  .brand-en,
  .theme-toggle {
    display: none;
  }

  .main-nav {
    gap: 17px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero-aside {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hero-stat {
    display: block;
    padding: 15px 0;
    border-top: 0;
    border-right: 1px solid var(--line);
  }

  .hero-stat:last-of-type {
    border-right: 0;
  }

  .hero-stat span {
    display: block;
    max-width: none;
    margin-top: 5px;
    text-align: left;
  }

  .hero-note {
    display: none;
  }

  .home-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 28px;
  }

  .ledger {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
    border-top: 1px solid var(--ink);
  }

  .ledger-block:nth-child(3) {
    grid-column: 1 / -1;
  }

  .ledger-note {
    display: none;
  }

  .source-nav,
  .level-nav {
    display: flex;
    flex-flow: row wrap;
    gap: 2px 14px;
  }

  .source-nav a,
  .level-nav a {
    min-height: 26px;
  }

  .source-nav a b,
  .level-nav a b {
    margin-left: 3px;
  }

  .page-head-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .page-head-side {
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    padding-top: 13px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .page-head-side .mono + .mono {
    margin-top: 0;
  }

  .big-count {
    font-size: 2rem;
  }

  .detail-title-row {
    grid-template-columns: 1fr;
    gap: 23px;
  }

  .detail-level-block {
    flex-direction: row;
    align-items: center;
    gap: 13px;
    padding-top: 12px;
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .detail-level-num {
    font-size: 2.4rem;
  }

  .detail-body-grid {
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .detail-aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .aside-box + .aside-box {
    margin-top: 0;
  }

  .status-row {
    grid-template-columns: 110px 1fr;
    gap: 5px 14px;
  }

  .status-head {
    display: none;
  }

  .status-row > span:nth-child(3),
  .status-row > span:nth-child(4) {
    color: var(--muted);
    font-size: 10px;
  }

  .status-row > span:nth-child(3)::before {
    content: "最后成功：";
  }

  .status-row > span:nth-child(4)::before {
    content: "最后信号：";
  }

  .status-detail {
    grid-column: 1 / -1;
    white-space: normal;
  }

  .compact .coverage-list {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-side {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 14px;
  }

  .main-nav {
    gap: 13px;
  }

  .nav-link {
    font-size: 9px;
  }

  .rss-button span {
    display: none;
  }

  .rss-button {
    width: 32px;
    padding: 0;
  }

  .hero {
    padding-top: 42px;
  }

  .hero-top {
    display: block;
  }

  .hero-stamp {
    margin-top: 8px;
    font-size: 8px;
  }

  .hero h1 {
    font-size: clamp(2.35rem, 11.5vw, 3.8rem);
  }

  .hero-lead {
    font-size: 14px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .hero-aside {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .hero-stat strong {
    font-size: 1.65rem;
  }

  .hero-stat span {
    font-size: 8px;
  }

  .status-strip {
    gap: 5px 12px;
  }

  .status-chip span {
    display: none;
  }

  .ledger {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .ledger-block:nth-child(3) {
    grid-column: auto;
  }

  .feed-head {
    display: block;
  }

  .feed-count {
    display: block;
    margin-top: 8px;
  }

  .signal {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    padding-top: 20px;
  }

  .signal-rail::before {
    bottom: -21px;
  }

  .signal-side {
    grid-column: 2;
    flex-direction: row;
    align-items: center;
  }

  .signal h3 {
    font-size: 1.1rem;
  }

  .signal-summary {
    font-size: 12px;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .page-numbers {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .page-head h1 {
    font-size: clamp(2.6rem, 12vw, 3.8rem);
  }

  .detail-notes {
    grid-template-columns: 1fr;
  }

  .note-block + .note-block {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .detail-aside,
  .about-side {
    grid-template-columns: 1fr;
  }

  .prev-next {
    grid-template-columns: 1fr;
  }

  .prev-next .next {
    text-align: left;
  }

  .level-explain,
  .feed-links {
    grid-template-columns: 1fr;
  }

  .feed-links a:nth-child(odd) {
    padding-right: 0;
    border-right: 0;
  }

  .feed-links a:nth-child(even) {
    padding-left: 0;
  }

  .compact .coverage-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-today {
    grid-template-columns: 1fr;
  }

  .stats-today div {
    padding: 12px 14px;
  }

  .stats-today strong {
    font-size: 1.45rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
