/* ============================================================
   MoatPillar — research-note design system
   Layout: one reading column. The long-term reading leads as the
   page's single statement piece; context, the AI short-term read,
   and the source tables follow in order of how slowly they change.
   ============================================================ */

:root {
  /* Light: porcelain paper, ink text, brass accent */
  --bg: #F2F3F5;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;
  --rule: #E1E4E9;
  --rule-strong: #C9CFD8;
  --text: #121826;
  --muted: #5B6474;
  --accent: #8A6A2E;
  --accent-soft: rgba(138, 106, 46, 0.10);
  --pos: #1E7A4C;
  --neg: #B3382F;
  --band-1: #2E8B57;
  --band-2: #74A657;
  --band-3: #C9A227;
  --band-4: #D2782D;
  --band-5: #C0392B;
  --shadow: 0 1px 2px rgba(18, 24, 38, 0.04), 0 8px 24px rgba(18, 24, 38, 0.05);

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;

  --fs-micro: 11px;
  --fs-sm: 13px;
  --fs-md: 15px;
  --fs-lg: 19px;
  --fs-xl: 26px;
  --fs-display: clamp(40px, 8vw, 64px);

  --container: 880px;
  --radius: 10px;
  --radius-sm: 6px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D1015;
    --surface: #141922;
    --surface-2: #1A2029;
    --rule: #252C37;
    --rule-strong: #343D4B;
    --text: #ECE9E2;
    --muted: #98A1AF;
    --accent: #CFA75A;
    --accent-soft: rgba(207, 167, 90, 0.12);
    --pos: #4FB07B;
    --neg: #E06A5F;
    --band-1: #3FA36B;
    --band-2: #8CBF6A;
    --band-3: #D9B640;
    --band-4: #E08A45;
    --band-5: #E05A4C;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D1015;
  --surface: #141922;
  --surface-2: #1A2029;
  --rule: #252C37;
  --rule-strong: #343D4B;
  --text: #ECE9E2;
  --muted: #98A1AF;
  --accent: #CFA75A;
  --accent-soft: rgba(207, 167, 90, 0.12);
  --pos: #4FB07B;
  --neg: #E06A5F;
  --band-1: #3FA36B;
  --band-2: #8CBF6A;
  --band-3: #D9B640;
  --band-4: #E08A45;
  --band-5: #E05A4C;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: 16px;
  padding-block: 0 72px;
}

a { color: var(--accent); text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.icon {
  width: 18px; height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Top bar ---------- */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px 18px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--rule);
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
/* The MoatPillar seal (a pillar standing in its moat) beside the name in the display serif.
   "Pillar" takes the accent, so the name follows the light and dark themes on its own. */
.brand-mark { display: block; flex: 0 0 auto; width: 40px; height: 40px; }
.brand-name {
  font: 600 27px/1 var(--display);
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}
.brand-name span { color: var(--accent); }
/* Shown while the record is in its beta phase (W25). */
.beta-tag {
  flex: 0 0 auto;
  margin-left: 10px;
  padding: 3px 8px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font: 600 var(--fs-micro)/1.2 var(--sans);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.edition-toggle {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.edition-toggle button {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: 0;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.edition-toggle button[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* ---------- Masthead ---------- */

.masthead { margin-bottom: 22px; }
.eyebrow, .micro {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.asof {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  font-size: var(--fs-sm);
  color: var(--text);
}
.asof .icon { color: var(--accent); width: 16px; height: 16px; }
.asof.is-flagged { color: var(--neg); font-weight: 500; }
.asof.is-flagged .icon { color: var(--neg); }
.publication-time { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- Cards ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.card-title .icon { color: var(--accent); }
section.card > .card-title { margin-bottom: 12px; }
.rules-chip {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 3px 10px;
}

/* ---------- Long-term reading: the statement piece ---------- */

.reading-card { box-shadow: var(--shadow); padding: 24px; }
.reading-body { display: grid; gap: 22px; }
.verdict-word {
  font-family: var(--display);
  font-size: var(--fs-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 6px 0 8px;
  text-wrap: balance;
}
.verdict-word[data-level="1"] { color: var(--band-1); }
.verdict-word[data-level="2"] { color: var(--band-2); }
.verdict-word[data-level="3"] { color: var(--band-3); }
.verdict-word[data-level="4"] { color: var(--band-4); }
.verdict-word[data-level="5"] { color: var(--band-5); }
.verdict-status { margin: 0; font-size: var(--fs-sm); color: var(--muted); }

.band-meter { padding-bottom: 4px; }
.band-rows { display: grid; gap: 12px; }
.band-row { padding-top: 24px; border-radius: 4px; transition: background 0.3s ease; }
.band-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  height: 10px;
}
.band-seg { border-radius: 3px; opacity: 0.32; }
.band-seg.is-current { opacity: 1; }
.band-seg[data-level="1"] { background: var(--band-1); }
.band-seg[data-level="2"] { background: var(--band-2); }
.band-seg[data-level="3"] { background: var(--band-3); }
.band-seg[data-level="4"] { background: var(--band-4); }
.band-seg[data-level="5"] { background: var(--band-5); }
.band-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--text);
}
.band-marker .tag {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
}
/* Near either end, the tag hangs inward so it never leaves the card. */
.band-marker .tag.is-left { left: auto; right: -7px; transform: none; }
.band-marker .tag.is-right { left: -7px; transform: none; }
.band-labels {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
}
.band-labels span { text-align: center; line-height: 1.25; }
.band-labels span.is-current { color: var(--text); font-weight: 600; }

.reading-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.reading-facts > div { background: var(--surface-2); padding: 12px 14px; min-width: 0; transition: background 0.3s ease; }
.reading-facts dt { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.reading-facts dd { margin: 0; font-family: var(--mono); font-size: var(--fs-lg); font-variant-numeric: tabular-nums; }
.reading-facts dd .sub { display: block; font-family: var(--sans); font-size: 12px; color: var(--muted); margin-top: 3px; }
.chip {
  display: inline-block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.chip.tone-1 { color: var(--band-1); }
.chip.tone-2 { color: var(--band-3); }
.chip.tone-3 { color: var(--band-4); }
.chip.tone-4 { color: var(--band-5); }

.changes .micro { margin-bottom: 8px; }
.change-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.change-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  font-size: 14px;
  line-height: 1.45;
}
.change-list .arrow { font-family: var(--mono); color: var(--accent); text-align: center; }
.change-list code { font-family: var(--mono); font-size: 13px; background: var(--accent-soft); padding: 0 5px; border-radius: 4px; }
.change-list .distance { color: var(--muted); }
.reading-note { margin: 16px 0 0; font-size: var(--fs-sm); color: var(--muted); }

/* ---------- Context strip ---------- */

.context-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px;
  min-width: 0;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.tile-title { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.tile-title .icon { width: 16px; height: 16px; color: var(--accent); }
.tile-value { margin: 0; font-family: var(--mono); font-size: var(--fs-xl); font-variant-numeric: tabular-nums; line-height: 1.1; }
.tile-unit { font-size: 13px; color: var(--muted); margin-left: 2px; }
.tile-label { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.tile-value.is-up { color: var(--pos); }
.tile-value.is-down { color: var(--neg); }
.gauge-track {
  position: relative;
  height: 4px;
  margin-top: 14px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--band-5), var(--band-3) 50%, var(--band-1));
}
.gauge-dot {
  position: absolute;
  top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--text);
  transform: translate(-50%, -50%);
}

/* ---------- Short-term read ---------- */

.read-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 4px; }
.read-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.read-dot.bullish { background: var(--pos); }
.read-dot.bearish { background: var(--neg); }
.sentiment-word {
  font-family: var(--display);
  font-size: var(--fs-xl);
  font-weight: 600;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 6px;
}
.sentiment-word:hover { text-decoration-color: var(--accent); }
.confidence { font-size: var(--fs-sm); color: var(--muted); }
.hint { margin: 2px 0 10px; font-size: 12px; color: var(--muted); }
.analysis-notice { font-size: var(--fs-sm); color: var(--muted); }

.claim {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 10px;
  margin-inline: -10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.claim + .claim { border-top: 1px solid var(--rule); }
.claim:hover, .claim.is-active { background: var(--accent-soft); }
.claim .dir { font-family: var(--mono); font-size: 13px; line-height: 1.6; text-align: center; color: var(--muted); }
.claim .dir.supports_bullish { color: var(--pos); }
.claim .dir.supports_bearish { color: var(--neg); }
.claim .text { font-size: 15px; }
.claim .evidence-tag { margin-top: 4px; font-family: var(--mono); font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.claim.is-active .evidence-tag { color: var(--accent); }
.interpretation { margin: 16px 0; font-size: 15px; line-height: 1.7; color: var(--text); max-width: 68ch; }
.wisdom {
  margin: 0 0 16px;
  padding-left: 16px;
  border-left: 2px solid var(--accent);
  font-family: var(--display);
  font-style: italic;
  font-size: var(--fs-lg);
  line-height: 1.45;
}
.verified-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--pos);
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.verified-strip[data-status="approved"]::before { content: "\2713"; font-weight: 700; }
.verified-strip[data-status="withheld"] { color: var(--neg); }
.verified-strip[data-status="unavailable"], .verified-strip[data-status="historical"] { color: var(--muted); }

/* ---------- Tables ---------- */

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-2 > .card { margin-bottom: 18px; }
.ledger { border-top: 1px solid var(--rule); }
.ledger-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: baseline;
  gap: 14px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--rule);
  transition: background 0.3s ease;
}
.ledger-row .label { font-size: 14px; color: var(--text); min-width: 0; }
.ledger-row .label .period { color: var(--muted); font-size: 12px; margin-left: 4px; }
.ledger-row .value, .ledger-row .change { font-family: var(--mono); font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ledger-row .change { min-width: 8ch; }
.ledger-row .change.up { color: var(--pos); }
.ledger-row .change.down { color: var(--neg); }
.ledger-row.two-col { grid-template-columns: minmax(0, 1fr) auto; }
.is-cited { background: var(--accent-soft) !important; border-color: var(--accent) !important; }
.evidence-unavailable .value { color: var(--neg); }
.extra-evidence-ledger .value { overflow-wrap: anywhere; white-space: normal; }
.watchlist-block { font-family: var(--mono); font-size: 13px; line-height: 1.7; white-space: pre-wrap; margin: 0; }

/* ---------- Track record ---------- */

.accuracy { font-family: var(--mono); font-size: var(--fs-lg); color: var(--text); }
.record-note, .phase-note, .last { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.baseline {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  font-size: 14px;
  color: var(--text);
}
.history-strip { display: flex; align-items: flex-end; gap: 4px; padding: 14px 2px 12px; overflow-x: auto; }
.history-cell { flex: 0 0 auto; width: 14px; height: 32px; border-radius: 3px; background: var(--rule-strong); cursor: pointer; position: relative; }
.history-cell.bullish { background: var(--pos); }
.history-cell.bearish { background: var(--neg); }
.history-cell.neutral { background: var(--muted); opacity: 0.6; }
.history-cell:hover, .history-cell.is-active { outline: 2px solid var(--accent); outline-offset: 2px; }
.history-cell .history-dot { position: absolute; left: 50%; bottom: -10px; width: 6px; height: 6px; border-radius: 50%; transform: translateX(-50%); border: 1px solid var(--rule-strong); }
.history-cell .history-dot.hit { background: var(--pos); border-color: var(--pos); }
.history-cell .history-dot.miss { background: var(--neg); border-color: var(--neg); }
.history-cell .history-dot.flat { background: var(--muted); border-color: var(--muted); opacity: 0.5; }
.history-detail { display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; margin-top: 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; }
.history-detail-date { font-family: var(--mono); color: var(--accent); font-size: 12px; }
.history-detail-result { color: var(--muted); font-size: 12px; }
.history-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.history-legend span { display: inline-flex; align-items: center; gap: 5px; }
.history-legend .swatch { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.history-legend .swatch.bullish { background: var(--pos); }
.history-legend .swatch.bearish { background: var(--neg); }
.history-legend .swatch.neutral { background: var(--muted); opacity: 0.6; }
.history-legend .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.history-legend .dot.hit { background: var(--pos); }
.history-legend .dot.miss { background: var(--neg); }
.history-legend .dot.flat { background: var(--muted); opacity: 0.5; }

/* ---------- Headlines ---------- */

.news-list { margin: 0; padding-left: 1.4em; }
.news-item { font-size: 14px; margin: 8px 0; line-height: 1.5; }
.news-item a { color: var(--text); text-decoration-color: var(--rule-strong); }
.news-item a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.source-link-unavailable { color: var(--muted); font-size: 12px; }

/* ---------- Banners, footer, states ---------- */

.flag-banner {
  font-size: 13px;
  padding: 12px 14px;
  border: 1px solid var(--neg);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 16px;
}
.flag-banner b { color: var(--neg); }
/* ---------- Join, share and feedback ---------- */

.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.icon-btn:hover { border-color: var(--rule-strong); }
.icon-btn .icon { width: 16px; height: 16px; color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn .icon { width: 16px; height: 16px; color: var(--accent); }
.btn-primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-primary:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }

.connect-grid.is-single { grid-template-columns: minmax(0, 1fr); }
.connect-text { margin: 0 0 14px; font-size: 14px; color: var(--muted); max-width: 60ch; }
.connect-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.share-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.share-dialog::backdrop { background: rgba(13, 16, 21, 0.55); }
.share-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.share-head .icon-btn { padding: 6px; }
.share-pitch { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.share-copy { display: flex; gap: 8px; margin-bottom: 14px; }
.share-url {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
}
.share-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.share-grid a {
  padding: 10px 8px;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
}
.share-grid a:hover { border-color: var(--accent); }

.footer { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); }
.footer p { margin: 0 0 6px; }
.state-msg { font-family: var(--mono); font-size: 13px; color: var(--muted); padding: 36px 0; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 680px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .context-strip { grid-template-columns: minmax(0, 1fr); }
  .card, .reading-card { padding: 16px; }
  .band-labels { font-size: 10.5px; }
  .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand { gap: 9px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 23px; }
}

/* Scheduled releases (W31) */
.calendar-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.calendar-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 4px 14px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.calendar-item .when { font-family: var(--mono); font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.calendar-item .name { color: var(--text); min-width: 0; }
.calendar-item .name .region { color: var(--muted); font-size: 12px; margin-left: 6px; }
.calendar-item .flag { font-family: var(--mono); font-size: var(--fs-micro); color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.calendar-item.is-done .flag { color: var(--muted); background: var(--surface-2); }
.calendar-item.is-done .name { color: var(--muted); }
.calendar-item .src { font-size: 12px; color: var(--muted); }
.calendar-sources { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 560px) {
  .calendar-item { grid-template-columns: minmax(0, 1fr) auto auto; }
  .calendar-item .when { grid-column: 1 / -1; }
}

/* China's context strip has two tiles: no Fear & Greed gauge exists for it (W32). */
.context-strip.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 680px) { .context-strip.is-two { grid-template-columns: minmax(0, 1fr); } }
