/* ============================================================
   CHINA SNAPSHOT v2 — editorial newsroom, white canvas
   Libre Franklin (news grotesque) + IBM Plex Mono (data/chrome)
   Cinnabar accent · framing-corner motif on the brief.
   Vanilla · no build step.
   ============================================================ */
:root {
  --sans: 'Libre Franklin', system-ui, -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Consolas, monospace;

  /* White canvas (the logo is black/white) */
  --paper:   #ffffff;
  --paper-2: #f6f6f4;   /* faint off-white for hover / sub fills */
  --paper-3: #f0efec;
  --card:    #ffffff;
  --ink:     #161518;
  --ink-2:   #54535a;
  --ink-3:   #8b8a92;
  --line:    #e7e6e2;
  --line-2:  #f0efec;

  --red:      #cf3a22;   /* cinnabar — live / accent */
  --red-deep: #a72c18;
  --red-soft: #fbeae5;
  --link:     #2456a6;
  --up:   #1f8a4c;
  --down: #c23320;

  /* Pillar identity — used as small dots/labels only */
  --p-politics:   #c0392b;
  --p-economy:    #b07d12;
  --p-geopolitics:#36499a;
  --p-tech:       #15847a;
  --p-regulatory: #6a4fb0;
  --p-society:    #5f6b76;

  --r: 10px; --r-lg: 14px;
  --maxw: 1200px;
  --header-offset: 150px;
  --shadow:    0 1px 2px rgba(20,20,25,.05), 0 4px 14px rgba(20,20,25,.05);
  --shadow-hi: 0 10px 30px rgba(20,20,25,.11), 0 2px 8px rgba(20,20,25,.05);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: var(--header-offset); }
html, body { overflow-x: clip; }   /* prevent sideways paint without breaking sticky descendants */
body {
  margin: 0; font-family: var(--sans); color: var(--ink);
  font-size: 15px; line-height: 1.55; background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
.visually-hidden { position: absolute !important; 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: 8px; left: 12px; z-index: 1000; transform: translateY(-150%); background: var(--ink); color: var(--paper); border-radius: 6px; padding: 10px 14px; font: 600 12px var(--mono); transition: transform .15s; }
.skip-link:focus { transform: translateY(0); }
:where(a, button, input, [tabindex]):focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.section { scroll-margin-top: var(--header-offset); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.grow { flex: 1; }
[data-lang="en"] .only-zh, [data-lang="zh"] .only-en { display: none; }

/* ============ TICKER (original style, very top) ============ */
.ticker-wrapper {
  display: flex; align-items: stretch; background: var(--paper-2);
  border-bottom: 1px solid var(--line); overflow: hidden;
  position: sticky; top: 0; z-index: 100; height: 36px;
}
.ticker-label {
  display: flex; align-items: center; justify-content: center; padding: 0 16px;
  background: var(--red); color: #fff; font-family: var(--mono); font-size: 11px;
  font-weight: 600; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; position: relative;
}
.ticker-label::after {
  content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
  border: 6px solid transparent; border-left-color: var(--red);
}
.ticker-track { flex: 1; overflow: hidden; position: relative; display: flex; align-items: center; }
.ticker-track::before, .ticker-track::after { content: ''; position: absolute; top: 0; bottom: 0; width: 44px; z-index: 2; pointer-events: none; }
.ticker-track::before { left: 0; background: linear-gradient(to right, var(--paper-2), transparent); }
.ticker-track::after  { right: 0; background: linear-gradient(to left, var(--paper-2), transparent); }
.ticker-content { display: flex; align-items: center; gap: 38px; padding: 0 24px; white-space: nowrap;
  animation: tick 70s linear infinite; will-change: transform; font-size: 13px; }
.ticker-wrapper:hover .ticker-content { animation-play-state: paused; }
.ticker-wrapper.is-paused .ticker-content { animation-play-state: paused; }
.ticker-content a { color: var(--ink-2); display: inline-flex; gap: 8px; align-items: baseline; }
.ticker-content a:hover { color: var(--ink); }
.ticker-content .src { font-family: var(--mono); font-size: 9.5px; color: var(--red); letter-spacing: .06em; text-transform: uppercase; }
.ticker-pause { width: 38px; flex: 0 0 38px; border: 0; border-left: 1px solid var(--line); background: var(--paper-2); color: var(--ink-3); cursor: pointer; font: 600 11px var(--mono); }
.ticker-pause:hover { color: var(--ink); background: var(--paper-3); }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============ MASTHEAD ============ */
.masthead {
  position: sticky; top: 36px; z-index: 90; background: rgba(255,255,255,.9);
  backdrop-filter: saturate(1.2) blur(12px); -webkit-backdrop-filter: saturate(1.2) blur(12px);
  border-bottom: 1.5px solid var(--ink);
}
.masthead-inner { max-width: var(--maxw); margin: 0 auto; padding: 12px 24px; display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 22px; }
.brand { grid-column: 1; justify-self: start; flex-shrink: 0; display: flex; align-items: center; }
.brand-logo { height: 58px; width: auto; display: block; }

.navrail { grid-column: 2; display: flex; gap: 2px; margin: 0; }
.navrail a { font-family: var(--mono); font-size: 12px; letter-spacing: .05em; color: var(--ink-2);
  padding: 7px 13px; position: relative; text-transform: uppercase; transition: color .15s; }
.navrail a:hover { color: var(--ink); }
.navrail a:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; border-radius: 4px; }
.navrail a.is-active { color: var(--ink); }
.navrail a.is-active::after { content: ''; position: absolute; left: 13px; right: 13px; bottom: -1px; height: 2px; background: var(--red); }

/* Local contents navigation: distinct from the three global destinations. */
.section-nav { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; min-height: 36px; display: flex; align-items: center; gap: 18px; border-top: 1px solid var(--line-2); }
.section-nav-label { flex: 0 0 auto; color: var(--ink-3); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.section-nav-links { display: flex; align-items: stretch; gap: 4px; }
.section-nav-links a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 12px; position: relative; color: var(--ink-3); font: 500 10px var(--mono); letter-spacing: .05em; text-transform: uppercase; }
.section-nav-links a:hover,.section-nav-links a.is-active { color: var(--ink); }
.section-nav-links a.is-active::after { content:""; position:absolute; left:12px; right:12px; bottom:0; height:2px; background:var(--red); }
.section-nav-trigger { display: none; }

.masthead-tools { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.search-trigger { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line);
  color: var(--ink-3); font-family: var(--mono); font-size: 12px; padding: 7px 9px 7px 11px; cursor: pointer; transition: all .15s; border-radius: var(--r); }
.search-trigger:hover { border-color: var(--ink); color: var(--ink-2); }
.search-trigger kbd, .palette kbd, .palette-foot kbd { font-family: var(--mono); font-size: 10px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--ink-3); }
.lang-toggle { display: flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.lang-toggle button { border: 0; background: var(--card); cursor: pointer; font-family: var(--mono); font-size: 12px;
  font-weight: 500; color: var(--ink-3); padding: 6px 11px; transition: all .15s; }
.lang-toggle button + button { border-left: 1px solid var(--line); }
.lang-toggle button.is-active { background: var(--ink); color: var(--paper); }
.livestat { display: flex; align-items: center; gap: 6px; }
.livestat-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--up); animation: pulse 2.4s ease-in-out infinite; }
.livestat-dot.stale { background: var(--ink-3); animation: none; }
.livestat-text { font-size: 11px; color: var(--ink-3); }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

/* KPI tape */
.kpitape { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: flex; gap: 0; overflow-x: auto; border-top: 1px solid var(--line-2); }
.kpi { display: flex; align-items: baseline; gap: 8px; padding: 7px 18px 7px 0; margin-right: 18px; border-right: 1px solid var(--line-2); white-space: nowrap; flex-shrink: 0; }
.kpi:last-child { border-right: 0; }
.kpi-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.kpi-value { font-family: var(--mono); font-size: 13px; font-weight: 600; }
.kpi-delta { font-family: var(--mono); font-size: 11px; }

/* ============ PAGE / SECTIONS ============ */
.page { max-width: var(--maxw); margin: 0 auto; padding: 0 24px 80px; }
.section { padding-top: 50px; }
.kicker { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.sec-head { margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1.5px solid var(--ink); display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.sec-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.05; }
.sec-sub { margin: 0; color: var(--ink-3); font-size: 12.5px; font-family: var(--mono); }
.subhead { display: flex; align-items: baseline; gap: 12px; margin: 30px 0 14px; }
.subhead-name { font-size: 12px; color: var(--ink-2); }

/* ============ TAG RESULTS VIEW ============ */
.tagview { position: fixed; inset: 0; z-index: 200; background: rgba(20,20,25,.42); backdrop-filter: blur(2px);
           display: flex; align-items: flex-start; justify-content: center; padding: 7vh 20px 20px; overflow-y: auto; animation: tv-fade .14s ease; }
.tagview[hidden] { display: none; }
.tagview-panel { background: var(--paper); border-radius: var(--r-lg); max-width: 900px; width: 100%;
                 padding: 20px 24px 24px; box-shadow: var(--shadow-hi); animation: tv-rise .16s ease; }
@keyframes tv-fade { from { opacity: 0; } }
@keyframes tv-rise { from { opacity: 0; transform: translateY(8px); } }
.tagview-head { display: flex; align-items: baseline; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1.5px solid var(--ink); }
.tagview-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0; }
.tagview-count { font-size: 11px; color: var(--ink-3); }
.dialog-close { width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink-2); cursor: pointer; font-size: 15px; }
.dialog-close:hover { border-color: var(--ink); color: var(--ink); }
.tagview-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 14px; }
@media (max-width: 820px) { .tagview-list { grid-template-columns: 1fr; } }
.tagview-list .tvrow:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tvrow { background: var(--card); padding: 13px 16px; transition: background .15s; }
.tvrow:hover { background: var(--paper-2); }
.tvrow-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; }
.tvrow-date { font-family: var(--mono); font-size: 10px; color: var(--red); }
.tvrow-src { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.tvrow-title { font-size: 14.5px; font-weight: 700; line-height: 1.35; margin: 0; letter-spacing: -.01em; }
.tvrow-title a:hover { color: var(--link); }
.tvrow-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }

/* ============ FRAMING-CORNER MOTIF ============ */
.frame { position: relative; }
.frame::before, .frame::after { content: ''; position: absolute; width: 16px; height: 16px; pointer-events: none; border: 1.5px solid var(--red); }
.frame::before { top: -6px; left: -6px; border-right: 0; border-bottom: 0; }
.frame::after  { bottom: -6px; right: -6px; border-left: 0; border-top: 0; }

/* ============ BRIEF ============ */
.brief-rewound { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; background: var(--red-soft);
  border: 1px solid #e7c3b6; border-radius: var(--r); padding: 9px 14px; font-size: 13px; color: var(--red-deep); }
.brief-rewound button { margin-left: auto; border: 0; background: transparent; color: var(--red-deep); font-weight: 600; cursor: pointer; font-family: var(--sans); font-size: 13px; }
.brief-frame { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px 30px; box-shadow: var(--shadow); }
.brief-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.brief-stamp { font-size: 11.5px; color: var(--ink-3); }
.ghost { font-family: var(--mono); font-size: 11px; color: var(--ink-2); cursor: pointer; background: transparent; border: 1px solid var(--line); border-radius: 6px; padding: 4px 9px; transition: all .15s; }
.ghost:hover { border-color: var(--ink); color: var(--ink); }
.brief-headline { font-size: 39px; line-height: 1.06; font-weight: 800; letter-spacing: -.025em; margin: 2px 0 20px; max-width: 24ch; }
[data-lang="zh"] .brief-headline { letter-spacing: -.01em; line-height: 1.2; font-weight: 700; }

.brief-body { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 36px; }
@media (max-width: 820px) { .brief-body { grid-template-columns: 1fr; gap: 22px; } }
.brief-narrative p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.62; color: #2a2930; }
.brief-rest[hidden] { display: none; }
.brief-toggle { border: 0; background: transparent; color: var(--red); cursor: pointer; font-family: var(--mono); font-size: 12px; padding: 0; margin-top: 2px; letter-spacing: .03em; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.chip { border: 1px solid var(--line); background: var(--paper); cursor: pointer; border-radius: 999px; padding: 5px 12px;
  font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; transition: all .15s; }
.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip .tr { font-size: 10px; color: var(--ink-3); }
.chip.is-new { border-color: var(--red); color: var(--red); }

/* Brief sidebar — fills the box */
.brief-aside { display: flex; flex-direction: column; gap: 20px; border-left: 1px solid var(--line); padding-left: 28px; }
.brief-hero { margin: 0; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--paper-2); }
.brief-hero img { display: block; width: 100%; aspect-ratio: 16/10; object-fit: cover; }
.brief-hero-cap { padding: 7px 10px; font-size: 10px; color: var(--ink-3); letter-spacing: .02em; line-height: 1.4;
  border-top: 1px solid var(--line); background: var(--paper); }
@media (max-width: 820px) { .brief-hero { aspect-ratio: 16/8; } .brief-hero img { aspect-ratio: 16/8; } }
@media (max-width: 820px) { .brief-aside { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 18px; } }
.aside-kicker { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.aside-mkt { list-style: none; margin: 0; padding: 0; }
.aside-mkt li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.aside-mkt li:last-child { border-bottom: 0; }
.aside-mkt .mname { color: var(--ink-2); flex: 1; }
.aside-mkt .mval { font-weight: 600; }
.aside-mkt .mdelta { font-size: 11px; }
.aside-devs { list-style: none; margin: 0; padding: 0; }
.aside-devs li { padding: 6px 0 6px 14px; border-bottom: 1px solid var(--line-2); font-size: 12px; line-height: 1.45; color: var(--ink-2); position: relative; }
.aside-devs li::before { content: "▲"; position: absolute; left: 0; top: 7px; font-size: 9px; color: var(--red); }
.aside-devs li:last-child { border-bottom: 0; }
.aside-entities { display: flex; flex-wrap: wrap; gap: 6px; }

/* Full-width band below the brief body — deviations + entities use the space that
   would otherwise leave a long empty "chin" beside the taller sidebar. Columns align
   with the body grid (deviations under the narrative, entities under the sidebar). */
.brief-foot { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 36px;
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.brief-foot:empty, .brief-foot:not(:has(> *:not([hidden]))) { display: none; }
.brief-foot .aside-devs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 820px) { .brief-foot { grid-template-columns: 1fr; gap: 18px; }
  .brief-foot .aside-devs { grid-template-columns: 1fr; } }
.entity { font-family: var(--mono); font-size: 11px; color: var(--ink-2); background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 6px; padding: 4px 9px; cursor: pointer; transition: all .15s; }
.entity:hover { border-color: var(--ink); color: var(--ink); }

/* Pillar blocks — header rule, no left bars */
.brief-blocks { margin-top: 38px; display: flex; flex-direction: column; gap: 38px; }
.block-head { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.block-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.block-title { font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.block-count { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.block-rule { flex: 1; height: 1px; background: var(--line); }
.story-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 38px; }
.story { min-width: 0; padding: 17px 0 20px; border-top: 1px solid var(--line); }
.story:nth-child(-n + 2) { border-top-color: var(--ink); }
.story:nth-child(n + 3) { border-top-color: var(--line); }
.story:hover .story-title a { color: var(--link); }
/* A one-story section reads as a short editorial dispatch, not a stranded card. */
.story-grid .story:only-child { grid-column: 1 / -1; max-width: 72ch; }
.story-byline { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0; margin-bottom: 9px; font-size: 9.5px; line-height: 1.2; letter-spacing: .055em; text-transform: uppercase; color: var(--ink-3); }
.story-sources { color: var(--ink-2); font-weight: 600; }
.story-source-class::before, .story-evidence::before { content: " / "; color: var(--line-strong, #c7c4bc); padding: 0 5px; }
.story-source-class { color: var(--ink-3); }
.story-evidence { color: var(--ink-3); }
.story-title { font-size: 17px; font-weight: 750; line-height: 1.25; margin: 0 0 5px; letter-spacing: -.018em; }
.story-title a:hover { color: var(--link); }
.story-sub { font-size: 12.5px; color: var(--ink-3); line-height: 1.4; margin: 0; }
.story-read { margin: 11px 0 0; max-width: 61ch; color: var(--ink-2); font-size: 13px; line-height: 1.52; }
.story-read-label { color: var(--red); font-size: 9.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.story-analysis { margin-top: 12px; border-top: 1px solid var(--line-2); }
.story-analysis-summary { display: flex; align-items: center; gap: 7px; padding: 9px 0 1px; color: var(--ink-3); cursor: pointer; font-size: 9.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; list-style: none; }
.story-analysis-summary::-webkit-details-marker { display: none; }
.story-analysis-summary::before { content: "+"; width: 14px; height: 14px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--red); font-size: 12px; line-height: 1; }
.story-analysis[open] .story-analysis-summary { color: var(--ink-2); }
.story-analysis[open] .story-analysis-summary::before { content: "−"; border-color: var(--red); }
.story-analysis-body { padding: 10px 0 2px; max-width: 64ch; }
.story-analysis-line { margin: 0 0 9px; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.story-analysis-line.is-signal { color: var(--ink); }
.story-analysis-line.is-watch { color: var(--red-deep); }
.story-analysis-label { color: var(--red); font-size: 9.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.story-evidence-trail { display: flex; align-items: baseline; gap: 9px; margin: 2px 0 9px; }
.story-evidence-links { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.story-evidence-link { border-bottom: 1px solid var(--line-strong, #c7c4bc); color: var(--ink-2); font-family: var(--mono); font-size: 10.5px; line-height: 1.4; }
.story-evidence-link:hover { border-color: var(--red); color: var(--red); }
.story-claim-boundary { margin: 10px 0 0; color: var(--ink-3); font-size: 10.5px; font-style: italic; line-height: 1.45; }

/* ============ CARDS / GRID ============ */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 18px 14px; box-shadow: var(--shadow); transition: box-shadow .18s; }
.card:hover { box-shadow: var(--shadow-hi); }
.card-head { display: flex; align-items: center; gap: 8px; padding: 13px 0 11px; margin-bottom: 4px; border-bottom: 1px solid var(--ink); }
.card-title { font-size: 15px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.card-sub { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }

/* per-card history bar */
.histbar { display: flex; align-items: center; gap: 5px; margin-left: auto; }
.histbar button { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); width: 20px; height: 20px;
  border-radius: 5px; cursor: pointer; font-size: 12px; line-height: 1; transition: all .12s; padding: 0; }
.histbar button:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.histbar button:disabled { opacity: .35; cursor: default; }
.histbar .hb-ts { font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); min-width: 58px; text-align: center; }
.histbar .hb-ts.past { color: var(--red); }

.dlist { list-style: none; margin: 0; padding: 0; }
.dlist li { padding: 9px 0; border-bottom: 1px solid var(--line-2); display: flex; gap: 9px; align-items: baseline; }
.dlist li:last-child { border-bottom: 0; }
.dlist .rk { font-family: var(--mono); font-size: 11px; color: var(--ink-3); min-width: 15px; font-weight: 500; }
.dlist .nm { flex: 1; line-height: 1.35; min-width: 0; }
.dlist .nm-title { font-size: 13.5px; font-weight: 600; }
.dlist .nm-title a:hover { color: var(--link); }
.dlist .nm-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; line-height: 1.35; }
.dlist .val { font-family: var(--mono); font-weight: 600; white-space: nowrap; display: flex; align-items: center; gap: 7px; }
.dlist .heat { font-family: var(--mono); font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.up { color: var(--up); } .down { color: var(--down); }
.delta { font-family: var(--mono); font-size: 11px; }
.spark { display: inline-block; vertical-align: middle; }

/* Press cards */
.news-card .nitem { padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.news-card .nitem:last-child { border-bottom: 0; }
.nitem-cat { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.nitem-title { font-size: 14px; font-weight: 700; line-height: 1.35; margin: 2px 0; letter-spacing: -.01em; }
.nitem-title a:hover { color: var(--link); }
.nitem-sub { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.nitem-meta { font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); margin-top: 3px; }

/* LadyMax filmstrip */
.filmrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.film { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: box-shadow .18s, transform .18s; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.film:hover { box-shadow: var(--shadow-hi); transform: translateY(-3px); }
.film-img { aspect-ratio: 4/3; width: 100%; object-fit: cover; background: var(--paper-2); display: block; border-bottom: 1px solid var(--line); }
.film-body { padding: 11px 13px 13px; }
.film-cat { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; color: var(--red); }
.film-title { font-size: 13.5px; font-weight: 700; line-height: 1.3; margin: 3px 0 0; letter-spacing: -.01em; }
.film-title a:hover { color: var(--link); }
.film-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.35; }

/* ============ VIEWFINDER (editions) ============ */
.viewfinder { margin: 22px 0 0; padding: 9px 14px; display: flex; align-items: flex-end; gap: 10px; background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--r); }
.vf-label { font-size: 9.5px; letter-spacing: .14em; color: var(--ink-3); flex-shrink: 0; padding-bottom: 6px; }
.vf-arrow { border: 1px solid var(--line); background: var(--card); color: var(--ink-2); width: 26px; height: 26px; border-radius: 6px; cursor: pointer; font-size: 15px; line-height: 1; flex-shrink: 0; transition: all .15s; }
.vf-arrow:hover { border-color: var(--ink); color: var(--ink); }
.vf-strip { flex: 1; display: flex; gap: 14px; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.vf-strip::-webkit-scrollbar { height: 4px; }
.vf-strip::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
.vf-daygrp { display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; }
.vf-daylabel { font-family: var(--mono); font-size: 9px; color: var(--ink-3); letter-spacing: .03em; padding-left: 1px; }
.vf-slots { display: flex; gap: 3px; }
.vf-slot { border: 1px solid var(--line); background: var(--card); cursor: pointer; border-radius: 4px; padding: 4px 9px; font-family: var(--mono); font-size: 10px; color: var(--ink-2); white-space: nowrap; transition: all .12s; }
.vf-slot:hover { border-color: var(--ink-3); }
.vf-slot.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.vf-now { flex-shrink: 0; border: 1px solid var(--red); color: var(--red); background: var(--red-soft); border-radius: 6px; padding: 6px 11px; font-size: 10px; font-weight: 600; cursor: pointer; letter-spacing: .06em; transition: all .15s; }
.vf-now:hover { background: var(--red); color: #fff; }
.vf-now.dim { opacity: .45; }

/* ============ OPERATIONS STRIP ============ */
.ops-strip { margin: 22px 0 0; display: grid; grid-template-columns: 1.1fr 1fr 1fr auto; gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ops-cell { background: var(--card); padding: 10px 13px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ops-label { font-size: 9.5px; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; }
.ops-cell strong { font-size: 18px; line-height: 1.05; letter-spacing: -.02em; }
.ops-cell span:not(.ops-label) { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ops-strip.is-stale .ops-cell:first-child strong { color: var(--red); }
.ops-links { justify-content: center; min-width: 150px; }
.ops-links a { font-family: var(--mono); font-size: 10.5px; color: var(--link); }
.ops-links a:hover { text-decoration: underline; }

/* ============ LIVE SYNTHESIS CUE ============ */
.synthesis-cue-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.45fr); gap: 18px; align-items: stretch; }
.synthesis-cue-copy { border: 1px solid var(--ink); border-radius: var(--r); background: var(--card); padding: 18px; box-shadow: var(--shadow); }
.synthesis-cue-copy p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.58; }
.synthesis-cue-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 18px; }
.synthesis-cue-stat { background: var(--paper); padding: 12px; }
.synthesis-cue-stat strong { display: block; font-size: 20px; line-height: 1.05; }
.synthesis-cue-stat span { display: block; margin-top: 4px; font-family: var(--mono); font-size: 9.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.synthesis-cue-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.synthesis-topic { background: var(--card); padding: 15px 17px; min-height: 132px; display: flex; flex-direction: column; gap: 7px; text-decoration: none; color: inherit; }
.synthesis-topic:hover { background: var(--paper-2); }
.synthesis-topic-meta { color: var(--ink-3); font-size: 10px; }
.synthesis-topic strong { font-size: 15px; line-height: 1.3; }
.synthesis-topic span:last-child { color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }

/* ============ PRIMARY SOURCES ============ */
.pillar-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.ptab { border: 1px solid var(--line); background: var(--card); cursor: pointer; border-radius: 999px; padding: 5px 13px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; transition: all .15s; }
.ptab:hover { border-color: var(--ink-3); }
.ptab.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ptab .dot { width: 7px; height: 7px; border-radius: 50%; }
.ptab .n { font-size: 10px; opacity: .65; }
.src-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.src-list .src:last-child:nth-child(odd) { grid-column: 1 / -1; }
.src { background: var(--card); padding: 14px 17px; transition: background .15s; }
.src:hover { background: var(--paper-2); }
.src-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.src-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.src-agency { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--ink-2); letter-spacing: .03em; }
.src-pillar { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-left: auto; }
.src-title { font-size: 14.5px; font-weight: 700; line-height: 1.35; margin: 0 0 3px; letter-spacing: -.01em; }
.src-title a:hover { color: var(--link); }
.src-sub { font-size: 12px; color: var(--ink-3); line-height: 1.45; }

/* ============ FOOTER ============ */
.footer { margin-top: 72px; padding-top: 28px; border-top: 1.5px solid var(--ink); }
.footer-about { max-width: 62ch; }
.footer-about p { color: var(--ink-2); font-size: 14.5px; line-height: 1.6; }
.footer-about a { color: var(--link); font-weight: 600; }
.footer-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 10px; }
.footer-stat { color: var(--ink-3); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.footer-fine { color: var(--ink-3); font-size: 11px; margin-top: 18px; font-family: var(--mono); }

/* ============ TO TOP ============ */
.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 80; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--ink); background: var(--card); color: var(--ink); font-size: 17px; cursor: pointer; box-shadow: var(--shadow-hi); transition: all .2s; }
.to-top:hover { background: var(--ink); color: var(--paper); }

/* ============ COMMAND PALETTE ============ */
.palette-scrim { position: fixed; inset: 0; z-index: 200; background: rgba(20,20,25,.34); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding-top: 12vh; animation: fade .12s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.palette { width: min(640px, 92vw); background: var(--card); border-radius: var(--r-lg); box-shadow: 0 28px 64px rgba(0,0,0,.3); overflow: hidden; border: 1px solid var(--ink); }
.palette-input { display: flex; align-items: center; gap: 11px; padding: 16px 18px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.palette-input input { flex: 1; min-width: 0; border: 0; font-family: var(--sans); font-size: 16px; color: var(--ink); background: transparent; }
.palette-input input:focus-visible { outline: 0; box-shadow: 0 2px 0 var(--ink); }
.palette-modes { display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--paper-2); }
.palette-modes button { border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ink-2); cursor: pointer; display: flex; align-items: baseline; gap: 8px; padding: 6px 9px; font: 600 11px var(--mono); letter-spacing: .03em; }
.palette-modes button small { color: var(--ink-3); font: 10px var(--sans); letter-spacing: 0; }
.palette-modes button:hover { color: var(--ink); }
.palette-modes button.is-active { border-color: var(--line); background: var(--card); color: var(--red-deep); box-shadow: 0 1px 2px rgba(20,20,25,.05); }
.ask-answer { margin: 6px; padding: 14px 14px 12px; border-left: 3px solid var(--red); background: var(--red-soft); color: var(--ink); font-size: 13px; line-height: 1.6; }
.ask-note { margin: 0; font: 10px var(--mono); letter-spacing: .08em; color: var(--red-deep); text-transform: uppercase; }
.ask-copy { margin: 7px 0 0; white-space: normal; }
.palette-close { width: 36px; height: 36px; flex-basis: 36px; }
.palette-results { max-height: 52vh; overflow-y: auto; padding: 6px; }
.pr-group { font-family: var(--mono); font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding: 11px 12px 5px; }
.pr-item { width: 100%; border: 0; background: transparent; color: inherit; text-align: left; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; font-family: inherit; }
.pr-item.is-sel, .pr-item:hover { background: var(--paper-2); }
.pr-icon { width: 24px; height: 24px; border-radius: 5px; background: var(--paper-2); display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; color: var(--red); }
.pr-main { flex: 1; min-width: 0; }
.pr-title { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-sub { font-family: var(--mono); font-size: 11px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette-empty { padding: 30px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
.palette-foot { display: flex; gap: 18px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 10.5px; color: var(--ink-3); }
.palette-foot kbd { margin-right: 3px; }

/* Mobile contents sheet */
.section-menu-scrim { position: fixed; inset: 0; z-index: 220; display: flex; align-items: flex-end; justify-content: center; padding: 16px 12px calc(12px + env(safe-area-inset-bottom)); background: rgba(20,20,25,.38); backdrop-filter: blur(3px); }
.section-menu-sheet { width: min(520px, 100%); max-height: min(82vh, 720px); overflow-y: auto; border: 1px solid var(--ink); border-radius: 18px; background: var(--paper); padding: 8px 16px 16px; box-shadow: 0 28px 70px rgba(20,20,25,.28); animation: sheet-up .18s ease; }
.sheet-handle { width: 38px; height: 4px; border-radius: 99px; background: var(--line); margin: 2px auto 10px; }
.section-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0 12px; border-bottom: 1px solid var(--line); }
.section-menu-head h2 { margin: 2px 0 0; font-size: 21px; letter-spacing: -.02em; }
.section-menu-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 12px; }
.section-menu-links a { min-height: 76px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.section-menu-links a:hover,.section-menu-links a.is-active { border-color: var(--ink); background: var(--paper-2); }
.section-menu-links span { font-size: 14px; font-weight: 700; }
.section-menu-links small { color: var(--ink-3); font: 10px/1.35 var(--mono); }
@keyframes sheet-up { from { opacity: 0; transform: translateY(16px); } }

/* ============ RESPONSIVE ============ */
@media (max-width: 920px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .ops-strip { grid-template-columns: repeat(2, 1fr); }
  .synthesis-cue-grid { grid-template-columns: 1fr; }
  .filmrow { grid-template-columns: repeat(3, 1fr); }
  /* Keep the destinations visible on touch screens. The masthead becomes a
     two-row app bar, with a direct-access rail instead of hiding navigation. */
  .ticker-wrapper { position: relative; }
  .masthead { top: 0; }
  .masthead-inner {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
    column-gap: 16px; row-gap: 8px; padding-bottom: 0;
  }
  .brand { grid-column: 1; }
  .masthead-tools { grid-column: 3; justify-self: end; }
  .navrail {
    grid-column: 1 / -1; grid-row: 2; display: flex; width: 100%; margin: 0;
    overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: none;
    scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
    border-top: 1px solid var(--line-2);
  }
  .navrail::-webkit-scrollbar { display: none; }
  .navrail a {
    flex: 0 0 auto; min-height: 44px; padding: 13px 13px 11px;
    display: inline-flex; align-items: center; scroll-snap-align: center;
  }
  .navrail a:first-child { padding-left: 2px; }
  .navrail a.is-active::after { left: 13px; right: 13px; }
  .navrail a:first-child.is-active::after { left: 2px; }
  .global-nav { justify-content: flex-start; }
  .section-nav { padding: 0 14px; min-height: 48px; border-top: 1px solid var(--line); }
  .section-nav-label,.section-nav-links { display: none; }
  .section-nav-trigger { width: 100%; min-height: 44px; border: 0; background: transparent; color: var(--ink); display: flex; align-items: center; justify-content: space-between; padding: 4px 2px; cursor: pointer; }
  .section-nav-trigger-copy { display: flex; align-items: baseline; gap: 10px; }
  .section-nav-trigger small { color: var(--ink-3); font: 9px var(--mono); text-transform: uppercase; letter-spacing: .08em; }
  .section-nav-trigger strong { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .04em; }
  .story-grid, .src-list { grid-template-columns: 1fr; }
  .story:nth-child(-n + 2) { border-top-color: var(--line); }
  .story:first-child { border-top-color: var(--ink); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .ops-strip, .synthesis-cue-stats, .synthesis-cue-topics { grid-template-columns: 1fr; }
  .filmrow { grid-template-columns: repeat(2, 1fr); }
  .search-trigger span { display: none; }
  .brief-headline { font-size: 27px; }
  .brief-frame { padding: 20px 18px; }
  .masthead-inner { column-gap: 10px; row-gap: 6px; padding: 10px 14px 0; }
  .masthead-tools { gap: 8px; }
  .brand-logo { height: 40px; }
  .ticker-wrapper { height: 44px; }
  .ticker-pause { width: 44px; flex-basis: 44px; }
  .livestat-text { display: none; }   /* keep the pulse dot; drop the text that pushed width */
  .kpitape { max-height: 42px; transition: max-height .18s ease, opacity .18s ease, border-color .18s ease; }
  .masthead.is-compact .kpitape { max-height: 0; opacity: 0; border-top-color: transparent; }
  .masthead.is-compact .masthead-inner { padding-top: 0; }
  .masthead.is-compact .brand,.masthead.is-compact .masthead-tools { display: none; }
  .masthead.is-compact .global-nav { grid-row: 1; }
  .search-trigger,.lang-toggle button,.navrail a,.ghost,.chip,.brief-toggle,.histbar button,.vf-arrow,.vf-slot,.vf-now,.ptab,.to-top { min-height: 44px; }
  .histbar button { width: 44px; }
  .vf-arrow { width: 44px; }
  .to-top { width: 46px; height: 46px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .section-menu-links { grid-template-columns: 1fr; }
  .palette-scrim { padding: 0; align-items: flex-end; }
  .palette { width: 100%; max-height: 88vh; border-radius: 18px 18px 0 0; border-width: 1px 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .palette-results { max-height: 58vh; }
  .tagview { padding: 8vh 10px calc(10px + env(safe-area-inset-bottom)); }
  .page { padding: 0 16px 60px; }
}

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ticker-track { overflow-x: auto; }
  .ticker-track::before,.ticker-track::after { display: none; }
  .ticker-content { animation: none; transform: none; }
}
