/* ==========================================================================
   NOAHAI — "The Signal Index"
   Art direction: intelligence publication meets curated discovery engine.
   Warm near-black ground · editorial serif display · mono metadata ·
   single signature accent · rules and numbering instead of uniform cards.
   ========================================================================== */

/* ---------- 01 · Tokens ---------- */
:root {
  /* Ground — warm near-black, never pure #000 */
  --ink-900: #0D0C0B;
  --ink-850: #121110;
  --ink-800: #171614;
  --ink-750: #1D1B19;
  --ink-700: #262320;

  /* Rules */
  --rule:        #2A2724;
  --rule-strong: #3D3833;

  /* Type — warm bone, high contrast (AA+) */
  --paper:     #F1EDE6;
  --paper-mid: #B6AFA4;
  --paper-dim: #8A8279;

  /* Signature accent — signal vermillion */
  --signal:      #FF4D2E;
  --signal-deep: #D93A1E;
  --signal-wash: rgba(255,77,46,0.10);

  /* Restrained secondary — brass */
  --brass:      #C9A227;
  --brass-wash: rgba(201,162,39,0.10);

  /* Type families */
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans:  'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Editorial scale — larger, more confident */
  --fs-mega: clamp(3.2rem, 8.2vw, 7.5rem);
  --fs-h1:   clamp(2.5rem, 5.4vw, 4.25rem);
  --fs-h2:   clamp(1.9rem, 3.4vw, 2.9rem);
  --fs-h3:   clamp(1.22rem, 1.7vw, 1.5rem);
  --fs-lead: clamp(1.1rem, 1.5vw, 1.32rem);
  --fs-body: clamp(1.02rem, 1.1vw, 1.09rem);
  --fs-meta: 0.78rem;

  --wrap: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Restrained radii — mostly square */
  --r-xs: 2px;
  --r-sm: 4px;
  --r-md: 6px;

  --ease: cubic-bezier(.2,.6,.35,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* ---------- 02 · Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--ink-900);
  color: var(--paper);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  font-feature-settings: "kern" 1, "liga" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Paper grain — texture, not glow */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: 400;
  pointer-events: none; opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
p { margin: 0; text-wrap: pretty; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  line-height: 1.02;
  letter-spacing: -0.028em;
  text-wrap: balance;
}

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: var(--r-xs); }
::selection { background: var(--signal); color: #12100F; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--signal); color: #12100F;
  padding: .75rem 1.15rem; font-weight: 700;
}
.skip-link:focus { left: 0; }

.wrap { width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto; }
.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;
}

/* ---------- 03 · Editorial primitives ---------- */

/* Mono metadata label — the publication voice */
.label {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: var(--fs-meta); font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase; color: var(--paper-dim);
}
.label--signal { color: var(--signal); }
.label--brass  { color: var(--brass); }

/* Section rule with a running number */
.rule-head {
  display: flex; align-items: baseline; gap: 1.25rem;
  padding-bottom: .9rem; margin-bottom: 2.25rem;
  border-bottom: 1px solid var(--rule-strong);
}
.rule-head .idx {
  font-family: var(--mono); font-size: var(--fs-meta); font-weight: 700;
  color: var(--signal); letter-spacing: .1em; flex: none;
}
.rule-head h2 { font-size: var(--fs-h2); flex: 1; }
.rule-head .aside { margin-left: auto; }

.hr { height: 1px; background: var(--rule); border: 0; margin: 0; }

/* Live status dot */
.status { display: inline-flex; align-items: center; gap: .5rem; }
.status .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--signal);
  animation: blip 2.6s ease-in-out infinite;
}
@keyframes blip { 0%,100% { opacity: 1 } 50% { opacity: .28 } }

/* Reveal — fast, never blocks reading */
.r { opacity: 0; animation: fade .55s var(--ease-out) forwards; }
.d1{animation-delay:.03s}.d2{animation-delay:.08s}.d3{animation-delay:.13s}
.d4{animation-delay:.18s}.d5{animation-delay:.23s}.d6{animation-delay:.28s}
@keyframes fade { from { opacity:0; transform: translateY(10px) } to { opacity:1; transform:none } }

/* ---------- 04 · Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 200;
  background: rgba(13,12,11,.86);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.nav { display: flex; align-items: center; gap: 1.5rem; min-height: 60px; }

.wordmark {
  display: inline-flex; align-items: baseline; gap: .5rem;
  font-family: var(--serif); font-weight: 900; font-size: 1.28rem;
  letter-spacing: -0.04em; flex: none;
}
.wordmark .dot-mark {
  width: 7px; height: 7px; background: var(--signal); border-radius: 50%;
  align-self: center;
}

.links { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.links a {
  position: relative; padding: .45rem .7rem;
  font-size: .9rem; font-weight: 500; color: var(--paper-mid);
  transition: color .18s var(--ease);
}
.links a:hover { color: var(--paper); }
.links a[aria-current="page"] { color: var(--paper); }
.links a[aria-current="page"]::after {
  content: ''; position: absolute; left: .7rem; right: .7rem; bottom: 0;
  height: 2px; background: var(--signal);
}

.nav-search {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .42rem .6rem .42rem .75rem; margin-left: .5rem;
  background: var(--ink-800); border: 1px solid var(--rule);
  border-radius: var(--r-sm); color: var(--paper-dim);
  font-size: .84rem; cursor: pointer;
  transition: border-color .18s var(--ease), color .18s var(--ease);
}
.nav-search:hover { border-color: var(--rule-strong); color: var(--paper-mid); }
.nav-search svg { width: 15px; height: 15px; }
.nav-search kbd {
  font-family: var(--mono); font-size: .7rem; padding: .1rem .32rem;
  background: var(--ink-700); border-radius: var(--r-xs); color: var(--paper-dim);
}

.btn-sub {
  padding: .48rem 1rem; background: var(--signal); color: #12100F;
  font-size: .87rem; font-weight: 700; border: 0; border-radius: var(--r-sm);
  cursor: pointer; white-space: nowrap;
  transition: background .18s var(--ease);
}
.btn-sub:hover { background: var(--signal-deep); }

.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--rule); color: var(--paper);
  width: 40px; height: 40px; border-radius: var(--r-sm); cursor: pointer;
  place-items: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 940px) {
  .nav-toggle { display: grid; }
  .nav-search { display: none; }
  .links {
    position: absolute; inset: 60px 0 auto; margin: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.25rem;
    background: var(--ink-850); border-bottom: 1px solid var(--rule);
    display: none;
  }
  .links.open { display: flex; }
  .links a { padding: .95rem .2rem; font-size: 1.05rem; border-bottom: 1px solid var(--rule); }
  .links a[aria-current="page"]::after { display: none; }
  .links .btn-sub { margin-top: 1rem; padding: .8rem; text-align: center; }
}

/* ---------- 05 · Hero — asymmetric editorial ---------- */
.hero { padding-block: clamp(2.75rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem); }
.hero-grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: 1fr; }
@media (min-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); align-items: start; }
}

.hero-meta {
  display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center;
  padding-bottom: 1.1rem; margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--rule);
}

.hero h1 {
  font-size: var(--fs-mega);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: .93;
}
.hero h1 em {
  font-style: italic; font-weight: 700;
  font-variation-settings: "SOFT" 30, "WONK" 1;
  color: var(--signal);
}
.hero .lede {
  margin-top: 1.6rem; max-width: 46ch;
  font-size: var(--fs-lead); color: var(--paper-mid); line-height: 1.55;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-top: 2rem; }

.btn-primary {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: .85rem 1.5rem; background: var(--signal); color: #12100F;
  font-weight: 700; font-size: .95rem; border: 0; border-radius: var(--r-sm);
  cursor: pointer; transition: background .18s var(--ease), transform .18s var(--ease);
}
.btn-primary:hover { background: var(--signal-deep); transform: translateX(2px); }
.btn-text {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .95rem; color: var(--paper-mid);
  border-bottom: 1px solid var(--rule-strong); padding-bottom: .15rem;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.btn-text:hover { color: var(--paper); border-color: var(--signal); }

/* The Index — live intelligence device, right column of hero */
.index-panel { border-top: 2px solid var(--signal); padding-top: .9rem; }
.index-panel .index-cap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: .35rem;
}
.index-list { display: flex; flex-direction: column; }
.index-item {
  display: grid; grid-template-columns: 2.1rem 1fr; gap: .85rem;
  padding: .85rem 0; border-bottom: 1px solid var(--rule);
  transition: background .18s var(--ease);
}
.index-item:hover { background: var(--ink-850); }
.index-item .n {
  font-family: var(--mono); font-size: .72rem; font-weight: 700;
  color: var(--signal); padding-top: .2rem;
}
.index-item h3 {
  font-family: var(--sans); font-size: .95rem; font-weight: 600;
  line-height: 1.35; letter-spacing: -0.005em;
}
.index-item:hover h3 { color: var(--signal); }
.index-item .src {
  display: block; margin-top: .3rem;
  font-family: var(--mono); font-size: .7rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--paper-dim);
}

/* ---------- 06 · Discovery bar ---------- */
.discovery { padding-block: 0 clamp(2rem, 4vw, 3rem); }
.search-shell {
  display: flex; align-items: center; gap: .9rem;
  padding: 1.15rem 1.35rem;
  background: var(--ink-850);
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-md);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.search-shell:focus-within { border-color: var(--signal); background: var(--ink-800); }
.search-shell > svg { width: 21px; height: 21px; color: var(--paper-dim); flex: none; }
.search-shell input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  font-size: clamp(1.02rem, 1.4vw, 1.15rem); color: var(--paper);
}
.search-shell input::placeholder { color: var(--paper-dim); }
.search-shell kbd {
  font-family: var(--mono); font-size: .72rem; padding: .22rem .45rem;
  background: var(--ink-700); border: 1px solid var(--rule);
  border-radius: var(--r-xs); color: var(--paper-dim); flex: none;
}
@media (max-width: 560px) { .search-shell kbd { display: none; } }

/* Taxonomy — horizontally scrollable strip, not a wall of pills */
.taxonomy-wrap { position: relative; margin-top: 1.1rem; }
/* Fade the right edge so the strip reads as scrollable, not clipped */
.taxonomy-wrap::after {
  content: ''; position: absolute; right: 0; top: 0; bottom: 1px; width: 4rem;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--ink-900) 82%);
}
.taxonomy {
  display: flex; gap: 0;
  overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--rule);
}
.taxonomy::-webkit-scrollbar { display: none; }
.taxonomy button {
  position: relative; flex: none;
  padding: .7rem 1.05rem; background: none; border: 0;
  font-family: var(--mono); font-size: .76rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--paper-dim); cursor: pointer; white-space: nowrap;
  transition: color .18s var(--ease);
}
.taxonomy button:hover { color: var(--paper); }
.taxonomy button.active { color: var(--paper); }
.taxonomy button.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--signal);
}
.taxonomy button .cnt { color: var(--paper-dim); margin-left: .4rem; font-size: .7rem; }

.result-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; padding-top: .9rem;
}

/* ---------- 07 · Featured composition ---------- */
.featured { display: grid; gap: 0; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) {
  .featured { grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); gap: 0 clamp(2rem,3.5vw,3.5rem); }
  .featured .support { border-left: 1px solid var(--rule); padding-left: clamp(2rem,3.5vw,3.5rem); }
}
/* Keep the lead column visually anchored when its copy is short */
.lead-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 2rem; border-top: 1px solid var(--rule); }
.lead-stats div { flex: 1 1 7rem; padding: .9rem 1rem .9rem 0; border-right: 1px solid var(--rule); }
.lead-stats div:last-child { border-right: 0; }
.lead-stats strong {
  display: block; font-family: var(--serif); font-size: 1.5rem;
  font-weight: 700; letter-spacing: -0.025em;
}
.lead-stats span { display: block; margin-top: .15rem; }

.lead-item { display: block; padding-bottom: 1.5rem; }
.lead-item .lead-top {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding-bottom: .8rem; margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule-strong);
}
.lead-item h3 {
  font-size: clamp(1.9rem, 3.4vw, 3rem); font-weight: 900;
  letter-spacing: -0.036em; line-height: 1.02;
}
.lead-item:hover h3 { color: var(--signal); }
.lead-item h3 { transition: color .2s var(--ease); }
.lead-item .lead-sum {
  margin-top: 1.1rem; max-width: 52ch;
  font-size: var(--fs-lead); color: var(--paper-mid); line-height: 1.55;
}
.lead-item .lead-cta {
  display: inline-flex; align-items: center; gap: .5rem; margin-top: 1.35rem;
  font-family: var(--mono); font-size: .78rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--signal);
}
.lead-item:hover .lead-cta { gap: .85rem; }
.lead-item .lead-cta { transition: gap .2s var(--ease); }

.support { display: flex; flex-direction: column; }
.support-item {
  display: grid; grid-template-columns: 2.4rem 1fr; gap: 1rem;
  padding: 1.15rem 0; border-bottom: 1px solid var(--rule);
  transition: padding-left .2s var(--ease);
}
.support-item:first-child { padding-top: 0; }
.support-item:hover { padding-left: .4rem; }
.support-item .n {
  font-family: var(--mono); font-size: .74rem; font-weight: 700;
  color: var(--paper-dim); padding-top: .2rem;
}
.support-item:hover .n { color: var(--signal); }
.support-item h4 {
  font-family: var(--sans); font-size: 1.02rem; font-weight: 600;
  line-height: 1.38; letter-spacing: -0.008em;
}
.support-item .meta { display: block; margin-top: .35rem; }

/* ---------- 08 · Tool index — comparison rows, not identical boxes ---------- */
.tool-index { border-top: 1px solid var(--rule-strong); }

.tool-row {
  display: grid; align-items: start; gap: .35rem 1.5rem;
  grid-template-columns: 2.6rem 1fr;
  padding: 1.4rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
  transition: background .2s var(--ease), padding-left .2s var(--ease);
}
.tool-row:hover { background: var(--ink-850); padding-left: .5rem; }

@media (min-width: 860px) {
  .tool-row {
    grid-template-columns: 3.2rem minmax(0,13rem) minmax(0,1fr) 7.5rem 6.5rem;
    align-items: center; gap: 1.75rem;
  }
}

.tool-row .t-n {
  font-family: var(--mono); font-size: .76rem; font-weight: 700;
  color: var(--paper-dim); letter-spacing: .06em;
}
.tool-row:hover .t-n { color: var(--signal); }

.tool-row .t-name {
  font-family: var(--serif); font-size: 1.32rem; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.15;
}
.tool-row:hover .t-name { color: var(--signal); }
.tool-row .t-name { transition: color .2s var(--ease); }
.tool-row .t-cat {
  display: block; margin-top: .25rem;
  font-family: var(--mono); font-size: .69rem; letter-spacing: .11em;
  text-transform: uppercase; color: var(--paper-dim);
}

.tool-row .t-desc { font-size: .97rem; color: var(--paper-mid); line-height: 1.5; }

.tool-row .t-access {
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase;
}
.t-access.free { color: var(--brass); }
.t-access.paid { color: var(--paper-dim); }

.tool-row .t-go {
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--mono); font-size: .73rem; font-weight: 700;
  letter-spacing: .11em; text-transform: uppercase; color: var(--paper-mid);
  justify-self: start;
}
@media (min-width: 860px) { .tool-row .t-go { justify-self: end; } }
.tool-row:hover .t-go { color: var(--signal); gap: .75rem; }
.tool-row .t-go { transition: color .2s var(--ease), gap .2s var(--ease); }

/* Mobile: keep the row readable */
@media (max-width: 859px) {
  .tool-row .t-desc, .tool-row .t-access, .tool-row .t-go { grid-column: 2; }
  .tool-row .t-access { margin-top: .5rem; }
}

/* ---------- 09 · Story cards (news) ---------- */
.story-grid { display: grid; gap: clamp(1.75rem, 3vw, 2.5rem); grid-template-columns: 1fr; }
@media (min-width: 720px) { .story-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .story-grid { grid-template-columns: repeat(3, 1fr); } }

.story { display: flex; flex-direction: column; }
.story-media {
  position: relative; aspect-ratio: 3 / 2; overflow: hidden;
  background: var(--ink-800); margin-bottom: 1rem;
  border-radius: var(--r-xs);
}
.story-media img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0;
  filter: saturate(.92) contrast(1.03);
  transition: opacity .25s var(--ease), transform .6s var(--ease-out), filter .3s var(--ease);
}
.story-media img.is-ready { opacity: 1; }
.story:hover .story-media img { transform: scale(1.04); filter: saturate(1) contrast(1.05); }

/* Generated fallback — a typographic plate, not a grey box.
   Carries the source masthead so a story without a photo still says something. */
.story-media .ph {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.15rem 1.25rem 1.25rem;
  background:
    repeating-linear-gradient(135deg, transparent 0 11px, rgba(255,255,255,.022) 11px 22px),
    radial-gradient(120% 90% at 50% 120%, color-mix(in srgb, var(--ph-accent, #FF4D2E) 16%, transparent), transparent 70%),
    var(--ink-800);
  border: 1px solid var(--rule);
  overflow: hidden;
}
.story-media .ph::before {
  content: ''; position: absolute; left: 0; top: 0; width: 100%; height: 3px;
  background: var(--ph-accent, var(--signal));
}
.story-media .ph .ph-cat {
  font-family: var(--mono); font-size: .7rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  padding-bottom: .35rem;
}
.story-media .ph .ph-src {
  font-family: var(--serif); font-weight: 900;
  font-size: clamp(1.35rem, 2.4vw, 2.1rem);
  line-height: 1.02; letter-spacing: -0.03em;
  color: var(--paper); opacity: .92; text-wrap: balance;
}
.story-media .ph .ph-mark {
  position: absolute; top: 1.1rem; right: 1.15rem; opacity: .5;
}
.story-media .ph .ph-mark svg { width: 24px; height: 24px; }
.story.is-lead .story-media .ph .ph-src { font-size: clamp(1.8rem, 3vw, 2.9rem); }

.story-top {
  display: flex; align-items: center; gap: .7rem; flex-wrap: wrap;
  padding-bottom: .55rem; margin-bottom: .7rem;
  border-bottom: 1px solid var(--rule);
}
.story h3 {
  font-size: var(--fs-h3); font-weight: 700; line-height: 1.22;
  letter-spacing: -0.022em;
  transition: color .2s var(--ease);
}
.story:hover h3 { color: var(--signal); }
.story p {
  margin-top: .6rem; font-size: .96rem; color: var(--paper-mid); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.story .story-cta {
  margin-top: auto; padding-top: .9rem;
  font-family: var(--mono); font-size: .72rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--paper-dim);
}
.story:hover .story-cta { color: var(--signal); }

/* Lead story — spans wide, horizontal on desktop */
.story.is-lead { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .story.is-lead { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: clamp(1.75rem,3vw,3rem); align-items: center; }
  .story.is-lead .story-media { aspect-ratio: 16/10; margin-bottom: 0; }
  .story.is-lead h3 { font-size: clamp(1.7rem, 2.9vw, 2.5rem); line-height: 1.05; letter-spacing: -0.034em; }
  .story.is-lead p { font-size: var(--fs-lead); -webkit-line-clamp: 4; }
}

/* ---------- 10 · Editorial guide blocks ---------- */
.guide-list { border-top: 1px solid var(--rule-strong); }
.guide {
  display: grid; gap: .6rem 2rem; grid-template-columns: 1fr;
  padding: 1.9rem 0; border-bottom: 1px solid var(--rule);
}
@media (min-width: 820px) { .guide { grid-template-columns: 3.5rem minmax(0,17rem) minmax(0,1fr); align-items: start; } }
.guide .g-n {
  font-family: var(--mono); font-size: .76rem; font-weight: 700; color: var(--signal);
  letter-spacing: .08em;
}
.guide h3 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: -0.02em; }
.guide p { color: var(--paper-mid); font-size: .99rem; }

/* ---------- 11 · Newsletter ---------- */
.newsletter {
  border-top: 2px solid var(--signal);
  padding-block: clamp(2.75rem, 5vw, 4rem);
}
.nl-grid { display: grid; gap: 2.25rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { .nl-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 4rem; align-items: start; } }
.nl-grid h2 { font-size: var(--fs-h2); max-width: 16ch; }
.nl-points { list-style: none; margin: 0; padding: 0; }
.nl-points li {
  display: grid; grid-template-columns: 1.6rem 1fr; gap: .75rem;
  padding: .7rem 0; border-bottom: 1px solid var(--rule);
  font-size: .97rem; color: var(--paper-mid);
}
.nl-points li span:first-child {
  font-family: var(--mono); font-size: .72rem; font-weight: 700; color: var(--signal); padding-top: .2rem;
}

.subscribe { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.5rem; }
.subscribe input {
  flex: 1 1 15rem; min-width: 0;
  padding: .9rem 1.1rem;
  background: var(--ink-850); border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm); color: var(--paper); outline: none;
  transition: border-color .2s var(--ease);
}
.subscribe input::placeholder { color: var(--paper-dim); }
.subscribe input:focus { border-color: var(--signal); }
.subscribe button {
  padding: .9rem 1.6rem; background: var(--signal); color: #12100F;
  font-weight: 700; border: 0; border-radius: var(--r-sm); cursor: pointer;
  transition: background .18s var(--ease);
}
.subscribe button:hover { background: var(--signal-deep); }
.subscribe button:disabled { opacity: .6; cursor: progress; }

.form-status { display: none; margin-top: .8rem; font-size: .9rem; font-weight: 600; }
.form-status.success { color: var(--brass); }
.form-status.error   { color: var(--signal); }
.nl-fine { margin-top: .9rem; font-size: .82rem; color: var(--paper-dim); }

/* ---------- 12 · Empty state ---------- */
.empty-state {
  grid-column: 1 / -1;
  padding: 3.5rem 0; border-bottom: 1px solid var(--rule);
}
.empty-state strong {
  display: block; font-family: var(--serif); font-size: 1.6rem;
  font-weight: 700; letter-spacing: -0.025em; margin-bottom: .6rem;
}
.empty-state p { color: var(--paper-mid); max-width: 44ch; }

/* ---------- 13 · Footer ---------- */
footer.site { border-top: 1px solid var(--rule); margin-top: clamp(3rem,6vw,5rem); }
.foot { display: grid; gap: 2.5rem; padding-block: 3rem 2rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .foot { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; } }
.foot .wordmark { margin-bottom: 1rem; }
.foot-about { font-size: .9rem; color: var(--paper-mid); max-width: 38ch; }
.foot-fine { margin-top: 1rem; font-size: .8rem; color: var(--paper-dim); max-width: 38ch; }
.foot-col { display: flex; flex-direction: column; gap: .1rem; }
.foot-col .label { margin-bottom: .7rem; }
.foot-col a {
  padding: .4rem 0; font-size: .92rem; color: var(--paper-mid);
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease);
}
.foot-col a:hover { color: var(--signal); }
.foot-base {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  padding-block: 1.25rem; border-top: 1px solid var(--rule);
}

/* ---------- 14 · Command palette (search overlay) ---------- */
.cmdk {
  position: fixed; inset: 0; z-index: 500;
  display: none; padding: clamp(3rem, 12vh, 8rem) var(--gutter) 2rem;
  background: rgba(8,7,6,.72); backdrop-filter: blur(6px);
}
.cmdk.open { display: block; }
.cmdk-panel {
  width: min(100%, 42rem); margin-inline: auto;
  background: var(--ink-850); border: 1px solid var(--rule-strong);
  border-radius: var(--r-md); overflow: hidden;
  box-shadow: 0 30px 90px rgba(0,0,0,.6);
}
.cmdk-input { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.15rem; border-bottom: 1px solid var(--rule); }
.cmdk-input svg { width: 19px; height: 19px; color: var(--paper-dim); flex: none; }
.cmdk-input input { flex: 1; background: none; border: 0; outline: none; font-size: 1.05rem; color: var(--paper); }
.cmdk-results { max-height: 22rem; overflow-y: auto; }
.cmdk-results a {
  display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center;
  padding: .8rem 1.15rem; border-bottom: 1px solid var(--rule);
}
.cmdk-results a:hover, .cmdk-results a.sel { background: var(--ink-750); }
.cmdk-results strong { font-weight: 600; font-size: .96rem; }
.cmdk-results .k {
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--paper-dim);
}
.cmdk-empty { padding: 1.6rem 1.15rem; color: var(--paper-dim); font-size: .93rem; }
.cmdk-foot {
  display: flex; gap: 1.25rem; padding: .7rem 1.15rem;
  border-top: 1px solid var(--rule); background: var(--ink-800);
}
.cmdk-foot span { font-family: var(--mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--paper-dim); }

/* ---------- 15 · Sponsor ---------- */
.sponsor-shell {
  display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
  padding: 1.1rem 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.sponsor-label {
  font-family: var(--mono); font-size: .68rem; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: var(--brass);
}
.sponsor-copy strong { display: block; font-family: var(--serif); font-size: 1.1rem; }
.sponsor-copy p { font-size: .9rem; color: var(--paper-mid); }
.sponsor-link { margin-left: auto; font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--signal); }

/* ---------- 16 · Section spacing ---------- */
.sec { padding-block: clamp(2.75rem, 5.5vw, 4.5rem); }
.sec-tight { padding-block: clamp(1.75rem, 3vw, 2.5rem); }

/* ---------- 17 · Story byline (provenance, small print) ---------- */
.story-byline {
  display: block;
  margin-top: .7rem; padding-top: .7rem;
  border-top: 1px solid var(--rule);
  font-family: var(--mono); font-size: .68rem; font-weight: 500;
  line-height: 1.5; letter-spacing: .045em;
  color: var(--paper-dim);
}
.story:hover .story-byline { color: var(--paper-mid); }
.story-byline { transition: color .2s var(--ease); }
.story.is-lead .story-byline { font-size: .72rem; }

/* ---------- 18 · Editorial / policy pages ---------- */
.prose { max-width: 68ch; }
.prose h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 2.75rem 0 .9rem;
  padding-top: 1.6rem; border-top: 1px solid var(--rule);
}
.prose h2:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.prose h3 { font-size: 1.15rem; margin: 1.8rem 0 .5rem; }
.prose p { margin-bottom: 1rem; color: var(--paper-mid); }
.prose strong { color: var(--paper); font-weight: 600; }
.prose a { color: var(--signal); border-bottom: 1px solid rgba(255,77,46,.35); }
.prose a:hover { border-bottom-color: var(--signal); }
.prose ul { margin: 0 0 1.2rem; padding-left: 0; list-style: none; }
.prose li {
  position: relative;
  display: block;
  padding: .5rem 0 .5rem 2.1rem;
  color: var(--paper-mid);
  border-bottom: 1px solid var(--rule);
}
.prose li::before {
  content: '—';
  position: absolute;
  left: 0;
  top: .65rem;
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--signal);
}


/* Live activity strip — approved headlines only */
.live-strip { position: relative; z-index: 120; overflow: hidden; border-bottom: 1px solid var(--rule); background: var(--ink-850); }
.live-strip-inner {
  width: min(100% - (var(--gutter) * 2), var(--wrap)); margin-inline: auto;
  min-height: 38px; display: grid; grid-template-columns: auto minmax(0,1fr) auto;
  align-items: center; gap: 1rem; font-family: var(--mono); font-size: .7rem;
  letter-spacing: .07em; text-transform: uppercase;
}
.live-now { display: inline-flex; align-items: center; gap: .45rem; color: var(--paper); font-weight: 700; }
.live-now i { width: 7px; height: 7px; border-radius: 50%; background: #45d483; box-shadow: 0 0 0 4px rgba(69,212,131,.1); animation: blip 2.6s ease-in-out infinite; }
.live-track { overflow: hidden; white-space: nowrap; color: var(--paper-mid); }
.live-track-content { display: inline-flex; min-width: max-content; align-items: center; gap: 1.4rem; animation: headline-scroll 34s linear infinite; }
.live-track-content:hover { animation-play-state: paused; }
.live-track a { transition: color .18s var(--ease); }
.live-track a:hover { color: var(--paper); }
.live-track-content > span[aria-hidden] { color: var(--signal); }
.live-fresh { color: var(--paper-dim); }
@keyframes headline-scroll { from { transform: translateX(0); } to { transform: translateX(-35%); } }
.new-today {
  display: inline-flex; align-items: center; margin-left: .55rem; padding: .2rem .42rem;
  border: 1px solid rgba(69,212,131,.36); border-radius: 999px;
  background: rgba(69,212,131,.08); color: #78e5a7; font-family: var(--mono);
  font-size: .62rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; vertical-align: middle;
}
@media (max-width: 720px) {
  .live-strip-inner { min-height: 36px; grid-template-columns: auto minmax(0,1fr); gap: .75rem; }
  .live-fresh { display: none; }
  .live-track-content { animation-duration: 28s; }
}

/* ---------- 19 · Live AI Now ---------- */
.live-ai[hidden] { display: none; }
.live-ai {
  padding-block: clamp(2rem, 4.5vw, 3.75rem);
  border-bottom: 1px solid var(--rule-strong);
}
.live-ai-head {
  display: flex; align-items: end; justify-content: space-between; gap: 2rem;
  padding-bottom: 1.15rem; margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule-strong);
}
.live-ai-head h2 { margin-top: .6rem; font-size: clamp(1.75rem, 3.2vw, 3rem); }
.live-ai-head-meta { display: flex; flex-wrap: wrap; justify-content: end; gap: 1rem; }
.live-ai-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #45d483;
  box-shadow: 0 0 0 4px rgba(69,212,131,.1); animation: blip 2.6s ease-in-out infinite;
}
.live-ai-layout { display: grid; gap: clamp(1.5rem, 3vw, 2.4rem); }
@media (min-width: 1000px) {
  .live-ai-layout { grid-template-columns: minmax(0,1.7fr) minmax(18rem,.75fr); align-items: start; }
}
.live-ai-feature { min-width: 0; }
.live-ai-player-shell {
  overflow: hidden; background: var(--ink-850); border: 1px solid var(--rule-strong);
  border-radius: var(--r-md); box-shadow: 0 18px 55px rgba(0,0,0,.22);
}
.live-ai-player {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  background: #050505;
}
.live-ai-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-ai-poster {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 0;
  overflow: hidden; border: 0; background: #050505; cursor: pointer;
}
.live-ai-poster::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.62));
}
.live-ai-poster img { width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: transform .4s var(--ease-out), opacity .2s var(--ease); }
.live-ai-poster:hover img { transform: scale(1.02); opacity: 1; }
.live-ai-poster.is-preview { cursor: default; background: radial-gradient(circle at 75% 20%, rgba(255,89,65,.3), transparent 34%), linear-gradient(135deg,#171513,#080807); }
.live-ai-preview-art {
  position: absolute; inset: 0; display: grid; place-content: center; gap: .4rem; text-align: center;
  font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase;
}
.live-ai-preview-art span { color: var(--signal); font-size: .72rem; }
.live-ai-preview-art strong { color: var(--paper); font-size: clamp(2.3rem,8vw,6rem); line-height: 1; }
.live-ai-preview-art small { color: var(--paper-dim); font-size: clamp(.55rem,1.2vw,.76rem); }
.live-ai-play {
  position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%,-50%);
  display: inline-flex; align-items: center; gap: .65rem; padding: .8rem 1.15rem;
  border-radius: 999px; background: var(--signal); color: #12100f;
  font-weight: 800; box-shadow: 0 12px 35px rgba(0,0,0,.45);
}
.live-ai-copy { padding-top: 1.15rem; }
.live-ai-source { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .7rem; }
.live-ai-copy h3 { font-size: clamp(1.35rem, 2vw, 2rem); line-height: 1.14; }
.live-ai-copy p { margin-top: .75rem; max-width: 72ch; color: var(--paper-mid); }
.live-ai-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1.25rem; margin-top: 1.15rem; }
.live-ai-actions [hidden] { display: none; }
.live-ai-queue { min-width: 0; border-top: 2px solid var(--signal); }
.live-ai-queue-head { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-bottom: 1px solid var(--rule); }
.live-ai-cards { display: flex; flex-direction: column; }
.live-ai-card {
  display: grid; grid-template-columns: 6.5rem minmax(0,1fr); gap: .85rem; align-items: center;
  width: 100%; padding: .85rem 0; text-align: left; color: inherit;
  background: transparent; border: 0; border-bottom: 1px solid var(--rule); cursor: pointer;
}
.live-ai-card:hover, .live-ai-card.is-active { background: var(--ink-850); }
.live-ai-card.is-active { box-shadow: inset 3px 0 0 var(--signal); padding-left: .65rem; }
.live-ai-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--ink-800); }
.live-ai-thumb img { width: 100%; height: 100%; object-fit: cover; }
.live-ai-thumb--preview { display: grid; place-items: center; background: linear-gradient(135deg,var(--ink-800),#301714); }
.live-ai-thumb--preview b { color: var(--signal); font-family: var(--display); font-size: 1.5rem; }
.live-ai-thumb > span {
  position: absolute; left: .35rem; bottom: .35rem; padding: .13rem .35rem;
  background: #d71920; color: white; border-radius: 2px;
  font-family: var(--mono); font-size: .58rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
}
.live-ai-card-copy { min-width: 0; }
.live-ai-card-copy strong {
  display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  font-size: .88rem; line-height: 1.35;
}
.live-ai-card-copy small { display: block; margin-top: .3rem; color: var(--paper-dim); font-family: var(--mono); font-size: .66rem; }
.live-ai-note { margin-top: 1rem; color: var(--paper-dim); font-size: .78rem; }

@media (max-width: 999px) {
  .live-ai-cards { flex-direction: row; gap: .75rem; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .4rem; }
  .live-ai-card { flex: 0 0 min(82vw, 21rem); scroll-snap-align: start; border: 1px solid var(--rule); padding: .65rem; }
  .live-ai-card.is-active { padding-left: .65rem; border-color: var(--signal); box-shadow: none; }
}
@media (max-width: 640px) {
  .live-ai-head { align-items: start; flex-direction: column; gap: .8rem; }
  .live-ai-head-meta { justify-content: start; }
  .live-ai-actions { align-items: stretch; flex-direction: column; }
  .live-ai-actions .btn-primary, .live-ai-actions .btn-text { justify-content: center; text-align: center; }
  .live-ai-card { grid-template-columns: 5.5rem minmax(0,1fr); }
}

/* Compact approved livestream shown on inner pages. The homepage uses the
   larger editorial player above. */
.live-ai-dock {
  position: fixed; z-index: 80; right: 1rem; bottom: 1rem;
  width: min(25rem, calc(100vw - 2rem)); overflow: hidden;
  min-width: 12rem; max-width: min(36rem, calc(100vw - 1.25rem));
  border: 1px solid rgba(255,255,255,.2); border-radius: .85rem;
  background: rgba(13,12,11,.96); color: var(--paper);
  box-shadow: 0 1rem 3.5rem rgba(0,0,0,.48);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.live-ai-dock-bar {
  min-height: 2.65rem; display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding: .45rem .55rem .45rem .75rem; border-bottom: 1px solid var(--rule);
  cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none;
}
.live-ai-dock-bar.is-dragging { cursor: grabbing; }
.live-ai-dock-bar > a {
  min-width: 0; display: flex; align-items: center; gap: .48rem;
  color: inherit; font-family: var(--mono); font-size: .66rem;
  letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
}
.live-ai-dock-bar strong {
  min-width: 0; overflow: hidden; color: var(--paper-dim); font-weight: 500;
  text-overflow: ellipsis; white-space: nowrap;
}
.live-ai-dock-dot {
  width: .48rem; height: .48rem; flex: 0 0 auto; border-radius: 50%; background: #35c979;
  box-shadow: 0 0 0 .22rem rgba(53,201,121,.12);
}
.live-ai-dock-controls { display: flex; gap: .2rem; flex: 0 0 auto; }
.live-ai-dock-controls button {
  width: 2rem; height: 2rem; display: grid; place-items: center; border: 0; border-radius: .35rem;
  background: transparent; color: var(--paper); cursor: pointer; font: inherit; font-size: .9rem;
}
.live-ai-dock-controls [data-live-resize] { cursor: ew-resize; touch-action: none; }
.live-ai-dock-controls button:hover, .live-ai-dock-controls button:focus-visible { background: rgba(255,255,255,.1); }
.live-ai-dock-video { position: relative; aspect-ratio: 16 / 9; background: #000; }
.live-ai-dock-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-ai-dock-touch { position: absolute; inset: 0; z-index: 2; display: none; touch-action: none; }
.live-ai-dock-title {
  display: block; overflow: hidden; padding: .7rem .8rem .78rem; color: var(--paper);
  font-size: .82rem; font-weight: 700; line-height: 1.35; text-decoration: none;
  text-overflow: ellipsis; white-space: nowrap;
}
.live-ai-dock-title:hover { color: var(--signal); }
@media (max-width: 640px) {
  .live-ai-dock { right: .65rem; bottom: .65rem; width: min(16rem, calc(100vw - 1.3rem)); }
  .live-ai-dock-title { font-size: .78rem; }
  .live-ai-dock-bar { gap: .35rem; padding-left: .6rem; }
  .live-ai-dock-bar > a strong { display: none; }
}
@media (pointer: coarse) {
  .live-ai-dock-touch { display: block; cursor: move; }
}
@media (prefers-reduced-motion: reduce) {
  .live-ai-dock-video iframe { visibility: visible; }
}
