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

:root {
  --background: #f8f6f1;
  --foreground: #171614;
  --muted-foreground: #57544c;
  --card: #f0ede5;
  --secondary: rgba(23, 22, 20, 0.08);
  --border: rgba(23, 22, 20, 0.18);
  --destructive: #b91c1c;
  --info: #1d4ed8;
  --warning: #9a3412;
  --success: #15803d;
  --chart-1: #1d4ed8;
  --chart-2: #57534e;
  --radius: 4px;
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --background: #111110;
    --foreground: #eae7df;
    --muted-foreground: #a6a298;
    --card: #191917;
    --secondary: rgba(234, 231, 223, 0.1);
    --border: rgba(234, 231, 223, 0.18);
    --destructive: #f87171;
    --info: #60a5fa;
    --warning: #fbbf24;
    --success: #4ade80;
    --chart-1: #60a5fa;
    --chart-2: #8c867c;
  }
}

html[data-theme="dark"] {
  --background: #111110;
  --foreground: #eae7df;
  --muted-foreground: #a6a298;
  --card: #191917;
  --secondary: rgba(234, 231, 223, 0.1);
  --border: rgba(234, 231, 223, 0.18);
  --destructive: #f87171;
  --info: #60a5fa;
  --warning: #fbbf24;
  --success: #4ade80;
  --chart-1: #60a5fa;
  --chart-2: #8c867c;
}

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

body {
  margin: 0;
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.68;
  padding: clamp(24px, 4.5vw, 56px) clamp(20px, 5vw, 56px) clamp(52px, 6.5vw, 88px);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--foreground);
  z-index: 999;
  transition: width 0.08s linear;
}

.paper {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  container-type: inline-size;
  container-name: paper;
}

.serif { font-family: var(--font-serif); }
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

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

/* =========================================================
   ACCESSIBILITY (WCAG 2.1 AA): Skip Link, SR-Only, Focus Rings
   ========================================================= */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  background: var(--foreground);
  color: var(--background);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 2px;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--destructive);
  outline-offset: 2px;
}

.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;
}

:where(a, button, input, [tabindex]):focus-visible {
  outline: 2px solid var(--foreground);
  outline-offset: 2px;
  border-radius: 2px;
}

main:focus {
  outline: none;
}

.kbd-active {
  box-shadow: inset 3px 0 0 var(--foreground);
  padding-left: 10px !important;
}

code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--secondary);
  padding: 1px 4px;
  border-radius: 2px;
}

/* =========================================================
   1. MASTHEAD & NAVIGATION
   ========================================================= */
.masthead {
  padding-bottom: 10px;
  border-top: 3px solid var(--foreground);
  border-bottom: 1px solid var(--foreground);
}
.masthead::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 10px;
  margin-bottom: -8px;
  background: var(--foreground);
  opacity: 0.35;
}

.folio-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 5px 0 7px;
  border-bottom: 1px solid var(--border);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.folio-left, .folio-right {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.folio-bar a:hover {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--destructive);
  margin-right: 5px;
  vertical-align: 1px;
}

.flag-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding-top: 11px;
}
.flag-brand {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.flag-title {
  margin: 0;
  font-size: clamp(26px, 5cqi, 38px);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1;
}
.flag-en {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  border-bottom: 1px solid var(--border);
}
.nav-tabs {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.nav-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  appearance: none;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 4px 0 8px;
  margin-bottom: -1px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.tab-btn:hover { color: var(--foreground); }
.tab-btn.active {
  color: var(--foreground);
  border-bottom-color: var(--foreground);
  font-weight: 700;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-bottom: 4px;
}

.mode-switch {
  appearance: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 3px 9px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.mode-switch:hover {
  border-color: var(--foreground);
  color: var(--foreground);
}
.mode-switch.active {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

/* =========================================================
   2. RESTRAINED LIKE BUTTON (PER-ARTICLE & PER-ISSUE)
   ========================================================= */
.like-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 1px 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--muted-foreground);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease, transform 0.1s ease;
}
.like-btn:hover {
  border-color: var(--foreground);
  color: var(--foreground);
}
.like-btn:active { transform: translateY(-1px); }
.like-btn.liked {
  border-color: var(--destructive);
  color: var(--destructive);
  background: color-mix(in srgb, var(--destructive) 8%, transparent);
  font-weight: 700;
}
.like-btn .like-icon {
  font-size: 9px;
  line-height: 1;
}
.like-btn.issue-like {
  padding: 3px 10px;
  font-size: 11px;
}

/* =========================================================
   3. HERO & SIGNAL LEDGER
   ========================================================= */
.hero {
  padding: 20px 0 22px;
  border-bottom: 2px solid var(--foreground);
}
.kicker-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 7px;
}
.kicker-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--destructive);
}
.kicker.blue { color: var(--info); }
.kicker.amber { color: var(--warning); }
.kicker.ink { color: var(--muted-foreground); }

.stat-tag {
  font-size: 10.5px;
  color: var(--muted-foreground);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.hero-headline {
  margin: 0 0 11px;
  font-size: clamp(22px, 3.6cqi, 31px);
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.015em;
  max-width: 34ch;
}
.hero-headline a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
}

.hero-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.copy-lead {
  margin: 0 0 8px;
  font-size: 14.5px;
  line-height: 1.7;
}
.copy-sub {
  margin: 0 0 10px;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted-foreground);
}

.signal-ledger {
  border-left: 1px solid var(--border);
  padding-left: 18px;
}
.ledger-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--foreground);
  margin-bottom: 4px;
}
.ledger-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding: 5.5px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.ledger-row:last-child { border-bottom: none; padding-bottom: 0; }
.ledger-k {
  color: var(--muted-foreground);
  white-space: nowrap;
  font-size: 11px;
}
.ledger-v {
  text-align: right;
  font-weight: 600;
}

.refs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 12px;
  margin-top: 9px;
}
.ref-link {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted-foreground);
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.ref-link:hover {
  color: var(--foreground);
  border-bottom-color: var(--foreground);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-top: 14px;
}
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--foreground);
  color: var(--background);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 2px;
  transition: opacity 0.15s ease;
}
.cta-primary:hover { opacity: 0.86; }

/* =========================================================
   4. SECTION BANDS & BROADSHEET COLUMNS
   ========================================================= */
.band {
  padding-top: 22px;
}
.band-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding-bottom: 5px;
  margin-bottom: 15px;
  border-bottom: 1px solid var(--foreground);
}
.band-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.band-sub {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.two-col > .cell {
  padding: 0 20px 16px 0;
}
.two-col > .cell:nth-child(2n) {
  padding: 0 0 16px 20px;
  border-left: 1px solid var(--border);
}
.row-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 16px;
}

.art-title {
  margin: 0 0 6px;
  font-size: clamp(16.5px, 2.2cqi, 19px);
  font-weight: 700;
  line-height: 1.32;
}
.art-dek {
  margin: 0 0 7px;
  font-size: 13.5px;
  line-height: 1.64;
}
.art-note {
  margin: 0 0 7px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.debate-strip {
  margin: 9px 0 7px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  font-size: 12px;
  line-height: 1.5;
}
.debate-col {
  padding-left: 9px;
  border-left: 2px solid var(--border);
}
.debate-col.con { border-left-color: var(--destructive); }
.debate-col.pro { border-left-color: var(--success); }
.debate-lbl {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

/* =========================================================
   5. BENCHMARK CHART & WIRE DISPATCHES
   ========================================================= */
.bench-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.bench-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 11px;
}
.bench-sub {
  font-size: 13px;
  font-weight: 700;
  margin-top: 2px;
}

.bchart {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bchart-row {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 76px;
  gap: 10px;
  align-items: center;
}
.bchart-label {
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bchart-label.top { font-weight: 700; }

.bchart-track-wrap {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
}
.bchart-track {
  position: relative;
  width: 100%;
  height: 10px;
  background: var(--secondary);
  border-radius: 2px;
}
.bchart-track::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  bottom: -4px;
  border-left: 1px dashed var(--muted-foreground);
  opacity: 0.55;
  pointer-events: none;
}
.bchart-fill {
  height: 100%;
  border-radius: 2px;
  background: var(--chart-2);
  opacity: 0.78;
}
.bchart-fill.lead { background: var(--chart-1); opacity: 1; }
.bchart-fill.budget { background: var(--warning); opacity: 1; }

.bchart-val {
  position: absolute;
  left: calc(var(--pct) + 6px);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}
.bchart-cost {
  text-align: right;
  font-size: 10.5px;
  color: var(--muted-foreground);
  white-space: nowrap;
}
.bchart-cost.budget {
  color: var(--warning);
  font-weight: 700;
}
.bchart-axis {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 76px;
  gap: 10px;
  margin-top: 2px;
}
.bchart-axis-scale {
  position: relative;
  height: 14px;
  font-size: 9.5px;
  color: var(--muted-foreground);
}
.bchart-axis-scale span { position: absolute; top: 0; }
.bchart-axis-scale .a0 { left: 0; }
.bchart-axis-scale .a50 { left: 50%; transform: translateX(-50%); }
.bchart-axis-scale .a100 { right: 0; }

.bench-foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--muted-foreground);
}

.wire-table {
  list-style: none;
  margin: 0;
  padding: 0;
}
.wire-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  line-height: 1.56;
}
.wire-row:first-child { padding-top: 0; }
.wire-row:last-child { border-bottom: none; padding-bottom: 0; }
.wire-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--muted-foreground);
  text-transform: uppercase;
}
.wire-lead {
  font-weight: 700;
}

/* =========================================================
   6. RADAR, PULL-QUOTE & V2EX TICKER
   ========================================================= */
.radar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.radar-item {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.radar-item:first-child { padding-top: 0; }
.radar-item:last-child { border-bottom: none; padding-bottom: 0; }
.radar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.radar-name {
  font-size: 13px;
  font-weight: 700;
}
.radar-name:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.radar-stat {
  font-size: 10px;
  font-weight: 600;
  color: var(--warning);
  white-space: nowrap;
}
.radar-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.52;
  color: var(--muted-foreground);
}

.pull-quote {
  margin: 0 0 13px;
  padding: 0 0 12px 13px;
  border-left: 2px solid var(--foreground);
  border-bottom: 1px solid var(--border);
}
.pull-text {
  margin: 0 0 6px;
  font-size: 13.5px;
  line-height: 1.62;
}
.pull-meta {
  font-size: 11px;
  color: var(--muted-foreground);
}

.ticker-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 5px;
}
.ticker-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ticker-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4.5px 0;
  font-size: 12.5px;
  line-height: 1.48;
}
.ticker-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.ticker-dots {
  flex: 1 1 14px;
  min-width: 10px;
  border-bottom: 1px dotted var(--border);
  transform: translateY(-3px);
}
.ticker-num {
  font-size: 10.5px;
  color: var(--muted-foreground);
  white-space: nowrap;
  flex-shrink: 0;
}

/* =========================================================
   7. INDEX PAGE: RUNNING THREADS, SEARCH & ARCHIVE LEDGER
   ========================================================= */
.threads-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.thread-card {
  padding-right: 16px;
  border-right: 1px solid var(--border);
}
.thread-card:last-child { border-right: none; padding-right: 0; }
.thread-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--destructive);
  margin-bottom: 4px;
  display: block;
}
.thread-title {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.32;
}
.thread-summary {
  margin: 0 0 8px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted-foreground);
}
.thread-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px dotted var(--border);
}
.thread-step {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0;
  font-size: 11.5px;
  border-bottom: 1px dotted var(--border);
}
.thread-step:last-child { border-bottom: none; }
.thread-step a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.thread-step-no {
  font-size: 10px;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.archive-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-bottom: 14px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 3px;
  min-width: 210px;
}
.search-box:focus-within {
  border-bottom-color: var(--foreground);
}
.search-input {
  appearance: none;
  background: transparent;
  border: none;
  outline: none;
  color: var(--foreground);
  font-family: var(--font-mono);
  font-size: 11.5px;
  width: 100%;
}
.search-input::placeholder { color: var(--muted-foreground); }
.search-kbd {
  font-size: 9.5px;
  color: var(--muted-foreground);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0 4px;
}

.archive-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.archive-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) 108px;
  gap: 16px;
  align-items: start;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.archive-row:first-child { padding-top: 2px; }
.archive-row:last-child { border-bottom: none; }
.archive-row.is-hidden { display: none; }

.arc-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.arc-no {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.arc-date {
  font-size: 11px;
  color: var(--muted-foreground);
}
.arc-type {
  display: inline-block;
  width: fit-content;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--muted-foreground);
}
.arc-type.weekly { color: var(--info); border-color: var(--info); }
.arc-type.monthly { color: var(--warning); border-color: var(--warning); }
.arc-type.yearly { color: var(--destructive); border-color: var(--destructive); }

.arc-title {
  margin: 0 0 5px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.32;
}
.arc-title a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.arc-summary {
  margin: 0 0 6px;
  font-size: 13px;
  line-height: 1.58;
  color: var(--muted-foreground);
}
.arc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 10.5px;
  color: var(--muted-foreground);
}

.arc-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
.arc-likes {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted-foreground);
}
.arc-links {
  display: flex;
  gap: 8px;
  font-size: 10.5px;
}
.arc-empty {
  padding: 24px 0;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 12.5px;
  display: none;
}

/* Periodic Roadmap Row */
.cadence-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 6px;
}
.cadence-item {
  border-top: 1px solid var(--border);
  padding-top: 8px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted-foreground);
}
.cadence-item strong {
  display: block;
  color: var(--foreground);
  font-size: 12px;
  margin-bottom: 2px;
}

/* =========================================================
   8. MARKDOWN-RENDERED EDITION PROSE (BACKFILL COMPATIBLE)
   ========================================================= */
.prose-section {
  padding-top: 18px;
}
.prose-article {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.prose-article:first-of-type { padding-top: 0; }
.prose-article:last-of-type { border-bottom: none; }
.prose-article p {
  margin: 0 0 7px;
  font-size: 13.5px;
  line-height: 1.66;
}
.prose-article p:last-child { margin-bottom: 0; }
.prose-article a {
  border-bottom: 1px dotted var(--muted-foreground);
}
.prose-article a:hover {
  border-bottom-color: var(--foreground);
}
.prose-list {
  margin: 4px 0 0;
  padding-left: 18px;
}
.prose-list li {
  margin-bottom: 6px;
  font-size: 13.5px;
  line-height: 1.62;
}
.prose-list li a {
  border-bottom: 1px dotted var(--muted-foreground);
}
.prose-list li a:hover {
  border-bottom-color: var(--foreground);
}
.prose-sublist {
  margin: 5px 0 2px;
  padding-left: 18px;
}
.table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 12px 0;
}
.prose-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  line-height: 1.5;
}
.prose-table th,
.prose-table td {
  text-align: left;
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.prose-table thead th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  border-bottom: 1.5px solid var(--foreground);
  color: var(--muted-foreground);
}

/* =========================================================
   9. EDITION PREV/NEXT & COLOPHON
   ========================================================= */
.edition-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 22px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.edition-pager a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.colophon {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 2px solid var(--foreground);
}
.picks-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 10px 0 14px;
}
.pick-col {
  padding-right: 14px;
  border-right: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.54;
  color: var(--muted-foreground);
}
.pick-col:last-child { border-right: none; padding-right: 0; }
.pick-title {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 3px;
}
.colophon-meta {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-top: 9px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.colophon-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.colophon-links a:hover {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* =========================================================
   PROGRESSIVE DISCLOSURE STATES
   ========================================================= */
.paper.scan-mode .copy-sub,
.paper.scan-mode .art-note,
.paper.scan-mode .debate-strip,
.paper.scan-mode .signal-ledger,
.paper.scan-mode .bench-foot {
  display: none;
}
.paper.scan-mode .hero-body-grid { grid-template-columns: 1fr; }
.band.is-hidden, .hero.is-hidden { display: none; }

/* =========================================================
   CONTAINER-QUERY RESPONSIVE SYSTEM
   ========================================================= */
@container paper (max-width: 680px) {
  .hero-body-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .signal-ledger {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--border);
    padding-top: 12px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .two-col > .cell,
  .two-col > .cell:nth-child(2n) {
    padding: 0 0 14px 0;
    border-left: none;
  }
  .two-col > .cell:nth-child(2n) {
    padding-top: 14px;
    border-top: 1px solid var(--border);
  }
  .threads-grid, .picks-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .thread-card, .pick-col {
    border-right: none;
    padding-right: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
  }
  .thread-card:last-child, .pick-col:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
  .cadence-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .archive-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .arc-meta {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .arc-right {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
}

@container paper (max-width: 520px) {
  .bchart-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    gap: 3px 8px;
  }
  .bchart-label { grid-column: 1; grid-row: 1; }
  .bchart-cost { grid-column: 2; grid-row: 1; }
  .bchart-track-wrap { grid-column: 1 / -1; grid-row: 2; }
  .bchart-axis { grid-template-columns: 1fr; }
  .bchart-axis-spacer { display: none; }
  .band-sub { display: none; }
  .wire-row {
    grid-template-columns: 1fr auto;
    gap: 4px 8px;
  }
  .wire-cat { grid-column: 1 / -1; }
}

@container paper (max-width: 440px) {
  .folio-hide-sm, .flag-en { display: none; }
  .debate-strip { grid-template-columns: 1fr; gap: 8px; }
  .ticker-dots { display: none; }
  .ticker-item { justify-content: space-between; }
  .cadence-grid { grid-template-columns: 1fr; }
}

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

@media print {
  html, body {
    background: #ffffff !important;
    color: #111111 !important;
    padding: 10mm !important;
  }
  .nav-bar, .read-progress, .like-btn, .edition-pager, .archive-controls {
    display: none !important;
  }
  .paper { max-width: 100% !important; }
}
