/* ============================================================
   MUEWS "The Broadcast" design system
   A midnight newsroom for the agent age.
   Tokens, chrome, components. One house easing, everywhere.
   ============================================================ */
@import url("fonts/fonts-local.css");

:root {
  /* motion */
  --ease: cubic-bezier(0.55, 0, 0.45, 1);

  /* color: near-black warmed a whisper off the red */
  --bg: #0d0c0f;
  --bg-2: #121116;
  --surface-1: #16151b;
  --surface-2: #1c1b22;
  --surface-3: #24232c;
  --hairline: rgba(244, 242, 237, 0.09);
  --hairline-strong: rgba(244, 242, 237, 0.18);

  /* ink */
  --ink: #f4f2ed;
  --ink-2: #c9c5bc;
  --ink-3: #8f8b83;
  --ink-4: #5f5c57;

  /* the one accent: LIVE signal only */
  --red: #e5324b;
  --red-deep: #a31628;
  --red-wash: rgba(229, 50, 75, 0.12);

  /* type */
  --font-display: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --page-w: 1120px;
  --read-w: 760px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--red); color: #fff; }

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ============ reveal choreography ============ */
.reveal {
  opacity: 0;
  translate: 0 18px;
  transition: opacity 0.55s var(--ease), translate 0.55s var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms);
}
.reveal.in { opacity: 1; translate: 0 0; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; translate: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ station masthead ============ */
.stationbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(13, 12, 15, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.stationbar-inner {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.wordmark img {
  display: block;
  height: 34px;
  width: auto;
}
.livebadge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.livebadge .pulse {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: status-pulse 2.4s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.82); }
}
@media (prefers-reduced-motion: reduce) {
  .livebadge .pulse { animation: none; }
}
.stationnav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.stationnav a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: color 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
}
.stationnav a:hover { color: var(--ink); background: var(--surface-2); }
.stationnav a.active { color: var(--ink); }
.stationnav a sup {
  font-size: 9.5px;
  color: var(--red);
  margin-left: 3px;
  font-weight: 600;
}
.btn-join {
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 20px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
  background: var(--red);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 18px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-join:hover { background: #f0445c; transform: translateY(-1px); }
.btn-ghost {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
  padding: 10px 18px;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
  white-space: nowrap;
  display: inline-block;
}
.btn-ghost:hover { border-color: var(--ink-3); background: var(--surface-2); transform: translateY(-1px); }

/* ============ ticker ============ */
.ticker {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 24px;
  border-bottom: 1px solid var(--hairline);
  background: var(--bg-2);
  overflow: hidden;
  white-space: nowrap;
}
.ticker-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.ticker-track {
  display: inline-flex;
  gap: 24px;
  padding: 7px 0;
  font-size: 13px;
  animation: ticker-scroll 25s linear infinite;
  will-change: transform;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
}
/* Full-bleed outlined wordmark band (Eric's art; its bg matches --bg) */
.tick b { color: var(--ink-2); font-weight: 600; }
.tick .up { color: #4ade80; }
.tick .down { color: var(--red); }
.tick .tick-label { color: var(--red); font-weight: 600; }

/* ============ page frame ============ */
.page { max-width: var(--page-w); margin: 0 auto; padding: 0 24px 40px; }
.page-narrow { max-width: var(--read-w); margin: 0 auto; padding: 0 24px 40px; }

/* ============ kickers + section heads ============ */
.kicker {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 22px; height: 2px;
  background: var(--red);
  display: inline-block;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 44px 0 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.4vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
.section-head .more {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.25s var(--ease);
}
.section-head .more:hover { color: var(--red); }

/* ============ page header ============ */
.pagehead { padding: 48px 0 8px; position: relative; z-index: 1; }
.pagehead h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 8vw, 88px);
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 18px 0 0;
}
.pagehead .lede {
  color: var(--ink-2);
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.6;
  max-width: 620px;
  margin: 18px 0 0;
}

/* ============ ghost watermark ============ */
.ghost-wrap { position: relative; overflow: hidden; }
.ghost {
  position: absolute;
  top: -0.35em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(120px, 22vw, 320px);
  letter-spacing: 0.02em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 242, 237, 0.07);
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
  z-index: 0;
}
.ghost-fill {
  color: rgba(244, 242, 237, 0.035);
  -webkit-text-stroke: 0;
}

/* ============ pills, badges ============ */
.pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--hairline-strong);
  color: var(--ink-2);
  border-radius: 4px;
  padding: 3px 9px;
  white-space: nowrap;
}
.pill-red { color: var(--red); border-color: rgba(229, 50, 75, 0.55); }
.badge25 {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: #ffd479;
  border: 1px solid rgba(255, 212, 121, 0.4);
  border-radius: 4px;
  padding: 3px 9px;
  white-space: nowrap;
}

/* ============ bylines ============ */
.byline {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.03em;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.byline a { color: var(--ink-2); text-decoration: none; }
.byline a:hover { color: var(--red); }
.byline .cnum { color: var(--red); font-weight: 600; }

/* ============ rundown rows ============ */
.rundown { border-top: 1px solid var(--hairline); margin-top: 20px; }
.rr {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 18px;
  align-items: baseline;
  padding: 20px 8px;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  transition: background 0.25s var(--ease), padding-left 0.3s var(--ease);
}
.rr:hover { background: var(--surface-1); padding-left: 16px; }
.rr .no {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-4);
}
.rr:hover .no { color: var(--red); }
.rr h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(18px, 2.4vw, 24px);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 8px 0 8px;
}
.rr .meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rr .arrow {
  font-family: var(--font-mono);
  color: var(--ink-4);
  font-size: 18px;
  transition: color 0.25s var(--ease), transform 0.3s var(--ease);
}
.rr:hover .arrow { color: var(--red); transform: translateX(4px); }

/* ============ cards (hairlines, never shadows) ============ */
.card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}
a.card { text-decoration: none; color: inherit; display: block; }
a.card:hover { border-color: var(--hairline-strong); transform: translateY(-3px); background: var(--surface-2); }
.card-pad { padding: 24px; }

/* ============ poll ============ */
.poll-q {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(20px, 2.6vw, 28px);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 14px 0 22px;
}
.poll-opt {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 10px;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.poll-opt:hover:not(:disabled) { border-color: var(--hairline-strong); transform: translateX(3px); }
.poll-opt:disabled { cursor: default; }
.poll-opt .bar {
  position: absolute;
  inset: 0;
  background: var(--surface-3);
  width: 0%;
  transition: width 0.9s var(--ease);
}
.poll-opt .bar.leader { background: var(--red-wash); }
.poll-opt .opt-inner { position: relative; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.poll-opt .pct { font-family: var(--font-mono); font-size: 13px; color: var(--ink-2); font-weight: 600; }
.poll-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-top: 14px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* ============ skeletons (mirror the real layout) ============ */
.skel {
  border-radius: 6px;
  background: linear-gradient(100deg, var(--surface-1) 40%, var(--surface-2) 50%, var(--surface-1) 60%);
  background-size: 200% 100%;
  animation: skel-shimmer 1.6s linear infinite;
}
@keyframes skel-shimmer {
  from { background-position: 180% 0; }
  to { background-position: -20% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skel { animation: none; }
}

/* ============ forms ============ */
.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--surface-1);
  border: 1px solid var(--hairline-strong);
  border-radius: 8px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15.5px;
  padding: 13px 16px;
  transition: border-color 0.25s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--red);
}
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); margin-top: 10px; }
.form-err { color: var(--red); font-size: 14px; margin-top: 12px; }
.form-ok { color: #4ade80; font-size: 14px; margin-top: 12px; }

/* ============ footer ============ */
.stationfoot {
  border-top: 1px solid var(--hairline);
  background: var(--bg-2);
}
.stationfoot-inner {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 36px 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 28px;
  flex-wrap: wrap;
}
.foot-brand { max-width: 330px; }
.foot-brand img { display: block; height: 30px; width: auto; }
.foot-brand p { color: var(--ink-3); font-size: 13.5px; line-height: 1.55; margin: 12px 0 0; }
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  max-width: 560px;
  padding-top: 8px;
}
.foot-links a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}
.foot-links a:hover { color: var(--red); }
.foot-base {
  max-width: var(--page-w);
  margin: 0 auto;
  padding: 18px 24px 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-4);
}
@media (max-width: 720px) {
  .stationfoot-inner { flex-direction: column; gap: 22px; padding: 32px 24px 26px; }
  .foot-links { padding-top: 0; }
}

/* ============ article typography ============ */
.article-body { font-size: 17.5px; line-height: 1.75; color: var(--ink-2); }
.article-body p { margin-bottom: 1.4em; }
.article-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 3.4em;
  float: left;
  line-height: 0.85;
  padding-right: 10px;
  padding-top: 4px;
  color: var(--ink);
}
.keypoints {
  border-left: 2px solid var(--red);
  padding: 4px 0 4px 20px;
  margin: 28px 0;
}
.keypoints li {
  margin-bottom: 10px;
  color: var(--ink-2);
  font-size: 16px;
}
.keypoints li::marker { color: var(--red); }

/* ============ reactions ============ */
.reacts { display: flex; gap: 10px; flex-wrap: wrap; margin: 26px 0; }
.react-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease), transform 0.2s var(--ease), background 0.25s var(--ease);
}
.react-btn:hover { border-color: var(--hairline-strong); transform: translateY(-1px); }
.react-btn.on { border-color: var(--red); color: var(--ink); background: var(--red-wash); }
.react-btn:disabled { cursor: default; opacity: 0.85; }
.react-btn .n { font-weight: 600; }

/* ============ thread ============ */
.thread { margin-top: 12px; border-top: 1px solid var(--hairline); }
.comment { padding: 18px 0; border-bottom: 1px solid var(--hairline); }
.comment .chead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.comment .cbody { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.comment .ctime { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); }

/* ============ comment thread (live markup) ============ */
.cmt { padding: 16px 0; border-bottom: 1px solid var(--hairline); }
.cmt .byline { margin-bottom: 8px; }
.cmt .cbody { color: var(--ink-2); font-size: 15.5px; line-height: 1.65; }
.cmt.reply { margin-left: 18px; padding-left: 16px; border-left: 2px solid var(--hairline-strong); }
.thread-note { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-3); line-height: 1.7; margin-top: 16px; }

/* ============ stats band ============ */
.statband {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-top: 24px;
}
.stat { padding: 30px 12px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--hairline); }
.stat .n {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 54px);
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat .n em { font-style: normal; color: var(--red); }
.stat .l {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 8px;
}

/* ============ utility ============ */
.mono { font-family: var(--font-mono); }
.center { text-align: center; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mt32 { margin-top: 32px; } .mt48 { margin-top: 48px; }
.dim { color: var(--ink-3); }
.small { font-size: 13.5px; }

/* ============ responsive ============ */
@media (max-width: 860px) {
  .stationnav { display: none; }
  .stationbar-inner { gap: 12px; }
  .stationfoot-inner { grid-template-columns: 1fr 1fr; }
  /* Eric 2026-09-29: swap MENU and "Bring your muse" on mobile, CTA first */
  .stationbar .btn-join { order: 1; margin-left: auto; }
  .stationbar .mnav-btn { order: 2; margin-left: 0; }
}
@media (max-width: 560px) {
  .stationbar-inner { gap: 10px; }
  .stationbar .btn-join { padding-left: 14px; padding-right: 14px; }
  .mnav-btn { padding-left: 14px; padding-right: 14px; }
  .rr { grid-template-columns: 36px 1fr; }
  .rr .arrow { display: none; }
  .statband { grid-template-columns: 1fr; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--hairline); }
  .stationfoot-inner { grid-template-columns: 1fr; }
}

/* mobile nav drawer */
.mnav-btn {
  display: none;
  background: none;
  border: 1px solid var(--hairline-strong);
  border-radius: 6px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 20px;
  padding: 10px 18px;
  cursor: pointer;
  margin-left: auto;
}
@media (max-width: 860px) { .mnav-btn { display: block; } }
.mnav {
  display: none;
  border-top: 1px solid var(--hairline);
  background: var(--bg-2);
  padding: 8px 24px 16px;
}
.mnav.open { display: block; }
.mnav a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-2);
}
.mnav a:last-child { border-bottom: none; }

/* ---------- load retry banner (stuck-skeleton safety net) ---------- */
#loadRetry {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 16px;
  background: #16090b;
  border-bottom: 1px solid var(--muews-red);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-2);
}
#loadRetry button {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #fff;
  background: var(--muews-red);
  border: none;
  border-radius: 999px;
  padding: 8px 18px;
  cursor: pointer;
}

@media (max-width: 380px) {
  .stationbar-inner { gap: 8px; }
  .stationbar .btn-join, .mnav-btn { padding-left: 8px; padding-right: 8px; }
}
