/* EverythingTech -- one template for every edition.
   Night shift (dark) and day shift (light) share every rule; only the
   tokens below change. config/site.json theme.dark / theme.light can
   override any of these variables without touching this file. */

:root {
  --font-display: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 3px;
  --gap: 28px;
  --page: 1480px;

  /* night shift: soft graphite, warm paper-white ink, neon a notch below full blast */
  --bg: #16181f;
  --bg-2: #1a1d25;
  --surface: #1e222b;
  --surface-2: #252a35;
  --line: #323847;
  --line-strong: #454d61;
  --ink: #ebe7de;
  --ink-2: #c6c2b8;
  --muted: #9097a6;
  --faint: #656c7c;
  --shadow: #0a0b0f;
  --grain: 0.035;

  --cyan: #5eead4;
  --pink: #ff6ec7;
  --lime: #bef264;
  --amber: #fbbf24;
  --violet: #a78bfa;
  --blue: #7aa2ff;
  --coral: #ff8a65;
  --mint: #6ee7b7;

  --accent: var(--cyan);
  --hot: var(--pink);
  --on-accent: #0d0f14;
  color-scheme: dark;
}

:root[data-theme="light"] {
  /* day shift: warm newsprint, ink-black rules, inks deep enough for AA on paper */
  --bg: #f2eee4;
  --bg-2: #ebe5d8;
  --surface: #faf7f0;
  --surface-2: #f4efe4;
  --line: #d8cfbd;
  --line-strong: #1c1e26;
  --ink: #1a1c23;
  --ink-2: #3a3d47;
  --muted: #62656f;
  --faint: #8f8f97;
  --shadow: #1c1e26;
  --grain: 0.05;

  --cyan: #0e8f83;
  --pink: #c8237f;
  --lime: #4f7d00;
  --amber: #a55f00;
  --violet: #6645cf;
  --blue: #2856c4;
  --coral: #c24620;
  --mint: #12815f;
  --on-accent: #faf7f0;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f2eee4; --bg-2: #ebe5d8; --surface: #faf7f0; --surface-2: #f4efe4;
    --line: #d8cfbd; --line-strong: #1c1e26; --ink: #1a1c23; --ink-2: #3a3d47;
    --muted: #62656f; --faint: #8f8f97; --shadow: #1c1e26; --grain: 0.05;
    --cyan: #0e8f83; --pink: #c8237f; --lime: #4f7d00; --amber: #a55f00;
    --violet: #6645cf; --blue: #2856c4; --coral: #c24620; --mint: #12815f;
    --on-accent: #faf7f0; color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
/* paper grain -- barely there, gives the flat colours some tooth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--accent); color: var(--on-accent); }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.mono { font-family: var(--font-mono); }
.wrap { max-width: var(--page); margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .wrap { padding: 0 16px; } body { font-size: 17px; } }

/* ---------- boot / errors ---------- */
.boot, .noscript { font-family: var(--font-mono); color: var(--muted); font-size: 14px; padding: 80px 32px; text-align: center; }
.boot-cursor { color: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- reading progress ---------- */
#progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--violet), var(--pink));
  z-index: 60; transition: width .08s linear;
}

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap { display: flex; align-items: center; gap: 14px; height: 52px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.tb-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 1px solid transparent; border-radius: var(--radius);
  padding: 5px 8px; cursor: pointer; color: var(--muted); text-decoration: none;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase;
}
.tb-btn:hover { color: var(--ink); border-color: var(--line); background: var(--surface); }
.tb-btn[disabled] { opacity: .3; pointer-events: none; }
.tb-btn svg { width: 15px; height: 15px; }
.tb-date { color: var(--ink); white-space: nowrap; }
.tb-top { display: none; }
.scrolled .tb-top { display: inline-flex; }
.tb-top svg { width: 15px; height: 15px; }

.tb-count { color: var(--muted); white-space: nowrap; }

@media (max-width: 720px) {
  .tb-count, .tb-label, .tb-how { display: none; }
  .masthead { padding-top: 26px; }
  .masthead-meta { justify-content: center; }
  .masthead-meta { gap: 6px 14px; }
  .lead, .story { padding-left: 18px; padding-right: 18px; }
  .box { box-shadow: 4px 4px 0 var(--shadow); }
  .topbar .wrap { gap: 6px; }
}

/* ---------- ticker ---------- */
.ticker {
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  overflow: hidden; white-space: nowrap;
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-2);
  height: 30px; display: flex; align-items: center;
}
.ticker-label {
  flex: none; height: 100%; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 16px;
  background: var(--hot); color: var(--on-accent); font-weight: 700; letter-spacing: .1em; z-index: 1;
}
.ticker-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.ticker-track { display: inline-flex; gap: 40px; padding-left: 40px; animation: tick var(--tick-duration, 120s) linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: inherit; }
.ticker-item:hover { color: var(--ink); }
.ticker-item i { width: 6px; height: 6px; background: var(--c, var(--accent)); display: inline-block; }
@keyframes tick { to { transform: translateX(-50%); } }

/* ---------- masthead ---------- */
.masthead { text-align: center; padding-top: 44px; }
.masthead-meta {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 22px;
}
.brand { display: inline-flex; align-items: center; gap: clamp(12px, 2vw, 22px); text-decoration: none; }
.chip { width: clamp(38px, 5vw, 60px); height: auto; flex: none; animation: chip 3s ease-in-out infinite; }
@keyframes chip { 50% { filter: drop-shadow(0 0 10px color-mix(in srgb, var(--hot) 60%, transparent)); } }
.chip .pin { fill: var(--pink); } .chip .body { fill: var(--cyan); } .chip .core { fill: var(--lime); animation: blink 1.6s steps(2) infinite; }
.brand-name {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; line-height: .9;
  font-size: clamp(34px, 10.5vw, 124px); font-variation-settings: "opsz" 96;
  color: var(--ink);
}
.brand-name .cursor { color: var(--hot); animation: blink 1.1s steps(1) infinite; font-weight: 400; }
.tagline { font-family: var(--font-body); font-style: italic; font-size: clamp(17px, 1.7vw, 22px); color: var(--ink-2); margin: 14px 0 0; letter-spacing: -0.005em; }

.coffee-wrap { display: inline-flex; vertical-align: -6px; margin-left: 6px; }
.coffee { width: 26px; height: 26px; color: var(--amber); }
.coffee .steam { opacity: 0; transform-origin: center bottom; }
.coffee .steam.s1 { animation: steam 2.4s ease-in-out infinite; }
.coffee .steam.s2 { animation: steam 2.4s ease-in-out infinite; animation-delay: .3s; }
.coffee .steam.s3 { animation: steam 2.4s ease-in-out infinite; animation-delay: .6s; }
@keyframes steam { 0% { opacity: 0; transform: translateY(2px) scaleY(.6); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(-4px) scaleY(1.2); } }
@media (prefers-reduced-motion: reduce) { .coffee .steam { opacity: .6; animation: none; } }

.tag-neon { color: var(--accent); font-weight: 500; text-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent); }
:root[data-theme="light"] .tag-neon { text-shadow: none; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .tag-neon { text-shadow: none; } }
.tag-body { color: var(--ink-2); }
.curator-line { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin: 12px 0 0; }
.curator-name { color: var(--ink); text-decoration: none; border-bottom: 1px dashed var(--line-strong); padding-bottom: 1px; font-weight: 700; }
.curator-name:hover { color: var(--accent); border-color: var(--accent); }
.rule { height: 7px; margin: 26px 0 0; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--ink); }
.edition-line {
  display: flex; justify-content: center; gap: 10px 22px; flex-wrap: wrap; padding: 10px 0;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
  border-bottom: 1px solid var(--ink);
}
.edition-line span + span::before { content: "✦"; color: var(--hot); margin-right: 22px; }
.legacy-note { font-family: var(--font-mono); font-size: 12px; color: var(--amber); text-align: center; margin-top: 12px; }

/* ---------- section headings ---------- */
.sec-head { display: flex; align-items: baseline; gap: 14px; margin: 54px 0 22px; }
.sec-head h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.sec-head .line { flex: 1; height: 1px; background: var(--line); align-self: center; }
.sec-head .note { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

/* ---------- boxes (the neubrutalist signature) ---------- */
.box {
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--shadow);
}

/* ---------- front page: lead + brief ---------- */
.front { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr); gap: var(--gap); margin-top: 34px; }
@media (max-width: 1080px) { .front { grid-template-columns: 1fr; } }
.side { display: flex; flex-direction: column; gap: var(--gap); }

.brief { padding: 22px 24px 20px; }
.brief-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 2px solid var(--ink); padding-bottom: 10px; margin-bottom: 6px; }
.brief-head h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; }
.brief-head span { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.brief ol { list-style: none; margin: 0; padding: 0; counter-reset: b; }
.brief li { counter-increment: b; display: grid; grid-template-columns: 34px 1fr; gap: 4px; padding: 13px 0; border-bottom: 1px dashed var(--line); font-size: 16.5px; line-height: 1.5; }
.brief li:last-child { border-bottom: 0; }
.brief li::before { content: counter(b, decimal-leading-zero); font-family: var(--font-mono); font-size: 12px; font-weight: 700; color: var(--hot); padding-top: 4px; }

.machine { padding: 18px 22px; font-family: var(--font-mono); font-size: 12px; color: var(--ink-2); }
.machine h3 { margin: 0 0 12px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.machine h3 em { font-style: normal; color: var(--lime); }
.funnel { display: grid; gap: 7px; }
.funnel-row { display: grid; grid-template-columns: 110px 1fr 48px; gap: 10px; align-items: center; }
.funnel-bar { height: 8px; background: var(--surface-2); border: 1px solid var(--line); position: relative; overflow: hidden; }
.funnel-bar i { position: absolute; inset: 0 auto 0 0; background: var(--c, var(--accent)); width: 0; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.funnel-row b { text-align: right; color: var(--ink); font-weight: 500; }
.machine p { margin: 12px 0 0; color: var(--muted); line-height: 1.55; font-size: 11.5px; }
.machine p strong { color: var(--ink); font-weight: 500; }

/* ---------- filters ---------- */
.filters {
  position: sticky; top: 52px; z-index: 30;
  display: flex; gap: 10px 18px; align-items: center; flex-wrap: wrap;
  padding: 10px 0; margin-top: 46px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line);
}
.filters .group { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.filters .label { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; margin-right: 2px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none;
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .02em;
  padding: 4px 8px; cursor: pointer; border-radius: var(--radius);
  background: var(--surface); color: var(--ink-2); border: 1px solid var(--line);
  transition: transform .1s ease, box-shadow .1s ease, border-color .1s;
}
.pill i { width: 7px; height: 7px; background: var(--c, var(--muted)); display: inline-block; }
.pill small { color: var(--faint); font-size: 11px; }
.pill:hover { border-color: var(--ink-2); color: var(--ink); }
.pill[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); box-shadow: 3px 3px 0 var(--c, var(--accent)); transform: translate(-1px, -1px); }
.pill[aria-pressed="true"] small { color: inherit; opacity: .6; }
.filters .spacer { flex: 1; }
.filter-status { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
@media (max-width: 720px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .filters .group { flex-wrap: nowrap; }
  .filters .spacer, .filter-status { display: none; }
}

/* ---------- stories ---------- */
.story {
  --c: var(--accent);
  position: relative;
  display: flex; flex-direction: column;
  padding: 22px 24px 20px;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.story:hover, .story.is-current { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--c), 8px 8px 0 var(--shadow); border-color: var(--ink-2); }
.story.is-current { outline: 2px solid var(--c); outline-offset: 4px; }
.story[hidden] { display: none; }

.kicker { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; }
.rank { font-weight: 700; color: var(--faint); }
.topic { display: inline-flex; align-items: center; gap: 6px; color: var(--c); font-weight: 700; }
.topic::before { content: ""; width: 8px; height: 8px; background: var(--c); }
.stamp {
  font-weight: 700; color: var(--hot); border: 2px solid var(--hot); padding: 2px 7px 1px;
  transform: rotate(-3deg); letter-spacing: .12em; font-size: 10.5px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hot) 35%, transparent);
}
.signal-recommended .kicker .sig { color: var(--ink-2); }
.sig { color: var(--muted); }

.story h3 {
  margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
  font-size: 23px; line-height: 1.16; font-variation-settings: "opsz" 40;
  text-wrap: balance;
}
.story h3 a { text-decoration: none; background: linear-gradient(var(--c), var(--c)) 0 100% / 0 2px no-repeat; transition: background-size .2s ease; }
.story h3 a:hover { background-size: 100% 2px; }
.dek { margin: 10px 0 0; font-style: italic; color: var(--ink-2); font-size: 1.02em; line-height: 1.5; text-wrap: pretty; }

.byline { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 14px 0 0; padding: 10px 0 0; border-top: 1px dashed var(--line); font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .04em; color: var(--muted); }
.byline a { text-decoration: none; color: var(--ink-2); }
.byline a:hover { color: var(--c); text-decoration: underline; text-underline-offset: 3px; }
.byline .hn { color: var(--amber); }
.byline .warn { color: var(--amber); }

.body { margin-top: 14px; }
.body p { margin: 0 0 .85em; text-wrap: pretty; hyphens: auto; }
.body p:last-child { margin-bottom: 0; }
.more { display: none; }
.story.open .more { display: block; }

.takeaways { margin: 16px 0 0; padding: 14px 16px 12px; background: var(--surface-2); border-left: 3px solid var(--c); }
.takeaways h4 { margin: 0 0 8px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c); }
.takeaways ul { margin: 0; padding: 0; list-style: none; }
.takeaways li { position: relative; padding-left: 20px; margin: 0 0 7px; font-size: .92em; line-height: 1.5; }
.takeaways li::before { content: "▸"; position: absolute; left: 2px; color: var(--c); }

.also { margin-top: 12px; font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); }
.also a { color: var(--muted); text-decoration: none; margin-right: 10px; }
.also a:hover { color: var(--c); }

.actions { display: flex; gap: 8px; align-items: center; margin-top: auto; padding-top: 16px; }
.act {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 10px; cursor: pointer; color: var(--ink-2); text-decoration: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.act:hover { color: var(--ink); border-color: var(--c); box-shadow: 2px 2px 0 var(--c); transform: translate(-1px, -1px); }
.act.primary { background: var(--c); color: var(--on-accent); border-color: var(--c); font-weight: 700; }
.act.ghost { background: none; }
.actions .spacer { flex: 1; }

figure.shot { margin: 0 0 18px; aspect-ratio: 16 / 9; overflow: hidden; border: 1.5px solid var(--line-strong); background: var(--surface-2); position: relative; }
figure.shot img { width: 100%; height: 100%; object-fit: cover; display: block; filter: saturate(.85) contrast(1.03); transition: filter .3s ease, transform .6s ease; }
.story:hover figure.shot img { filter: none; transform: scale(1.02); }
figure.shot.logo { background: var(--surface-2) radial-gradient(color-mix(in srgb, var(--c) 25%, transparent), transparent 70%); }
figure.shot.logo img { object-fit: contain; padding: 22px; }
.feature figure.shot { aspect-ratio: 2 / 1; }
figure.shot::after { content: attr(data-src); position: absolute; right: 8px; bottom: 8px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; background: var(--bg); color: var(--muted); padding: 2px 6px; border: 1px solid var(--line); }

/* lead story */
.lead { padding: 26px 30px 24px; }
.lead h3 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.04; letter-spacing: -0.03em; font-variation-settings: "opsz" 96; font-weight: 800; }
.lead .dek { font-size: 1.18em; }
.lead .lead-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.lead.has-image .lead-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; }
.lead.has-image figure.shot { margin: 0; }
@media (max-width: 860px) { .lead.has-image .lead-grid { grid-template-columns: 1fr; } }
.dropcap > p:first-child::first-letter {
  float: left; font-family: var(--font-display); font-weight: 800; font-size: 3.6em; line-height: .82;
  padding: 6px 10px 0 0; color: var(--c);
}
.lead .body.cols { column-count: 2; column-gap: 32px; column-rule: 1px solid var(--line); }
.lead .body p { break-inside: avoid-column; }
@media (max-width: 860px) { .lead .body.cols { column-count: 1; } }

/* must-reads */
/* must-reads: full-width hero band, then compact cards packed as masonry */
.grid-feature { display: block; }
.grid-feature .story.feature-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 26px 36px; padding: 28px 32px; margin-bottom: var(--gap); align-items: start; }
.grid-feature .story.feature-hero .kicker,
.grid-feature .story.feature-hero h3,
.grid-feature .story.feature-hero .dek,
.grid-feature .story.feature-hero .byline { grid-column: 1; }
.grid-feature .story.feature-hero figure.shot { grid-column: 2; grid-row: 1 / span 4; aspect-ratio: 16/10; margin: 0; }
.grid-feature .story.feature-hero .body,
.grid-feature .story.feature-hero .takeaways,
.grid-feature .story.feature-hero .also,
.grid-feature .story.feature-hero .actions { grid-column: 1 / -1; }
.grid-feature .story.feature-hero h3 { font-size: clamp(28px, 2.6vw, 40px); line-height: 1.06; letter-spacing: -0.025em; }
.grid-feature .story.feature-hero .dek { font-size: 1.15em; }
.grid-feature .story.feature-hero .body { column-count: 2; column-gap: 32px; column-rule: 1px solid var(--line); }
.grid-feature .story.feature-hero .body p { break-inside: avoid-column; }
@media (max-width: 960px) {
  .grid-feature .story.feature-hero { grid-template-columns: 1fr; }
  .grid-feature .story.feature-hero figure.shot { grid-column: 1; grid-row: auto; aspect-ratio: 16/9; }
  .grid-feature .story.feature-hero .body { column-count: 1; }
}

/* remaining must-reads: masonry columns capped at 3 for breathing room -- must-reads deserve it */
.grid-feature .feature-rest { column-count: 3; column-gap: 32px; column-fill: balance; }
@media (max-width: 1180px) { .grid-feature .feature-rest { column-count: 2; } }
@media (max-width: 720px) { .grid-feature .feature-rest { column-count: 1; column-gap: var(--gap); } }
.grid-feature .feature-rest .story { display: block; break-inside: avoid; -webkit-column-break-inside: avoid; width: 100%; margin: 0 0 32px; padding: 26px 28px 22px; }
.grid-feature .feature-rest .story h3 { font-size: 23px; line-height: 1.18; }
.grid-feature .feature-rest .story .dek { font-size: 1.05em; }
.grid-feature .feature-rest .story figure.shot { aspect-ratio: 16/9; margin-bottom: 16px; }

/* the wire */
/* wire: rows composed in app.js from each story's length, on a 6-track grid
   (never more than 3 across). Boxes in a row share a height, like a page. */
.grid-wire { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 32px; align-items: stretch; }
.grid-wire .story { font-size: 16.5px; }
.grid-wire .story h3 { font-size: 21px; }
.grid-wire .w-third { grid-column: span 2; }
.grid-wire .w-half { grid-column: span 3; }
.grid-wire .w-half h3 { font-size: 24px; }
.grid-wire .w-wide { grid-column: span 4; }
.grid-wire .w-full { grid-column: span 6; }
.grid-wire .w-wide h3, .grid-wire .w-full h3 { font-size: clamp(24px, 2vw, 30px); line-height: 1.12; }
.grid-wire .w-wide .dek, .grid-wire .w-full .dek { font-size: 1.08em; }
.wide-top.has-fig { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; align-items: start; }
.wide-top.has-fig figure.shot { margin: 0; aspect-ratio: 4 / 3; }
.body.cols2 { column-count: 2; column-gap: 30px; column-rule: 1px solid var(--line); }
.body.cols2 p { break-inside: avoid-column; }
.grid-wire .deferred { display: none; }
.grid-wire.filtering { align-items: start; grid-auto-flow: dense; }
.grid-wire.filtering .story { grid-column: span 2; }
.grid-wire.filtering .deferred:not([hidden]) { display: flex; }
.grid-wire.filtering ~ .more-wrap { display: none; }
.more-wrap { display: flex; justify-content: center; margin-top: 34px; }
.more-btn { font-size: 12.5px; padding: 11px 22px; }
.more-btn b { color: var(--accent); margin-left: 6px; }
@media (max-width: 1180px) {
  .grid-wire { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-flow: dense; gap: var(--gap); }
  .grid-wire .w-third, .grid-wire .w-half, .grid-wire.filtering .story { grid-column: span 1; }
  .grid-wire .w-wide, .grid-wire .w-full { grid-column: span 2; }
}
@media (max-width: 720px) {
  .grid-wire { grid-template-columns: 1fr; }
  .grid-wire .story, .grid-wire.filtering .story { grid-column: auto; }
  .wide-top.has-fig { grid-template-columns: 1fr; }
  .wide-top.has-fig figure.shot { aspect-ratio: 16 / 9; }
  .body.cols2 { column-count: 1; }
  .grid-wire figure.shot { display: none; }
}

/* in brief: notables as a compact, ruled column list -- a change of pace after the boxes */
.briefs { column-count: 3; column-gap: 44px; column-rule: 1px solid var(--line); }
@media (max-width: 1180px) { .briefs { column-count: 2; } }
@media (max-width: 720px) { .briefs { column-count: 1; } }
.briefs .story.brief-item { display: block; break-inside: avoid; padding: 0 0 20px; margin: 0 0 20px; border-bottom: 1px dashed var(--line); background: none; box-shadow: none; border-radius: 0; font-size: 16px; }
.briefs .story.brief-item:hover, .briefs .story.brief-item.is-current { transform: none; box-shadow: none; }
.story.brief-item.is-current { outline-offset: 8px; }
.brief-item h3 { font-size: 19px; }
.brief-item .kicker { margin-bottom: 8px; }
.brief-item .dek { font-style: normal; color: var(--ink-2); font-size: .98em; }
.brief-item .byline { border-top: 0; padding-top: 0; margin-top: 8px; }
.brief-item .actions { padding-top: 10px; }
.brief-item .act { padding: 4px 8px; font-size: 11px; }
.story.notable { background: var(--bg-2); box-shadow: 3px 3px 0 var(--shadow); }
.story.notable h3 { font-size: 19px; }


.grid-feature.is-filtered { grid-template-columns: repeat(auto-fill, minmax(420px, 560px)); justify-content: start; }
.grid-feature.is-filtered .story { grid-column: auto !important; grid-row: auto !important; }

.empty-filter { display: none; text-align: center; font-family: var(--font-mono); color: var(--muted); padding: 60px 0; }
.empty-filter.on { display: block; }

/* ---------- empty edition ---------- */
.awaiting { margin: 50px auto 0; max-width: 640px; padding: 34px; text-align: center; }
.awaiting h2 { font-family: var(--font-display); font-size: 28px; margin: 0 0 8px; }
.awaiting p { color: var(--ink-2); margin: 0; }

/* ---------- archive drawer & shortcuts dialog ---------- */
.scrim { position: fixed; inset: 0; background: color-mix(in srgb, var(--shadow) 55%, transparent); z-index: 70; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80; width: min(460px, 94vw);
  background: var(--bg); border-left: 1.5px solid var(--line-strong); box-shadow: -8px 0 0 var(--shadow);
  transform: translateX(105%); transition: transform .25s cubic-bezier(.2,.8,.2,1);
  display: flex; flex-direction: column;
}
.drawer.on { transform: none; }
.drawer header { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 2px solid var(--ink); }
.drawer header h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 24px; }
.drawer .list { overflow-y: auto; padding: 16px 22px 30px; display: flex; flex-direction: column; gap: 14px; }
.ed-card { display: block; padding: 14px 16px; text-decoration: none; }
.ed-card:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--accent), 7px 7px 0 var(--shadow); }
.ed-card.current { border-color: var(--accent); }
.ed-card .top { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.ed-card .top b { color: var(--hot); font-weight: 700; }
.ed-card .lead-line { margin: 8px 0 0; font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.25; }
.drawer .foot { margin-top: auto; padding: 14px 22px; border-top: 1px solid var(--line); font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }

.dialog { position: fixed; z-index: 80; left: 50%; top: 50%; transform: translate(-50%, -46%); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; width: min(520px, 92vw); padding: 24px 26px; }
.dialog.on { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%); }
.dialog h2 { margin: 0 0 14px; font-family: var(--font-display); font-size: 22px; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 9px 18px; font-size: 15px; }
kbd { font-family: var(--font-mono); font-size: 12px; padding: 2px 7px; border: 1px solid var(--line-strong); border-bottom-width: 3px; border-radius: var(--radius); background: var(--surface-2); color: var(--ink); white-space: nowrap; }

/* ---------- footer ---------- */
.site-foot { margin-top: 80px; border-top: 3px solid var(--ink); padding: 34px 0 60px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px; }
@media (max-width: 860px) { .foot-grid { grid-template-columns: 1fr; } }
.site-foot h4 { margin: 0 0 10px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.site-foot p, .site-foot li { margin: 0 0 6px; font-size: 15.5px; color: var(--ink-2); }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot a { color: var(--ink); text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.site-foot a:hover { color: var(--accent); }
.signoff { font-family: var(--font-mono); font-size: 15px; color: var(--ink); }
.signoff .p { color: var(--hot); font-weight: 700; }
.signoff .me { color: var(--accent); font-weight: 700; }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.social { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; }
.social svg { width: 18px; height: 18px; fill: currentColor; }
.social:hover { color: var(--accent); transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--accent), 6px 6px 0 var(--shadow); }
.colophon { margin-top: 30px; font-family: var(--font-mono); font-size: 11.5px; color: var(--faint); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- toast ---------- */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); z-index: 90; opacity: 0; pointer-events: none; transition: all .2s; font-family: var(--font-mono); font-size: 13px; padding: 10px 16px; background: var(--ink); color: var(--bg); box-shadow: 4px 4px 0 var(--accent); border-radius: var(--radius); }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* no visible page scrollbar; the reading progress bar shows position */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
