/* ==========================================================================
   Unbroken Review — design system
   An Apple News–inspired reading experience: iOS grouped surfaces, rounded
   story tiles, red section heads, translucent chrome, San Francisco + New York
   on Apple devices with Inter + Newsreader everywhere else.
   ========================================================================== */

/* ---------- fonts (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: 'Newsreader Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/assets/fonts/newsreader-opsz.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url('/assets/fonts/newsreader-opsz-ext.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Newsreader Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url('/assets/fonts/newsreader-opsz-italic.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/inter-opsz.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/assets/fonts/inter-opsz-ext.woff2') format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ---------- */
:root {
  --bg: #f2f2f7;
  --card: #ffffff;
  --card-raised: #ffffff;
  --fill: rgba(118, 118, 128, 0.12);
  --fill-2: rgba(118, 118, 128, 0.08);
  --ink: #1d1d1f;
  --ink-2: #424245;
  --ink-3: #6e6e73;
  --ink-4: #8e8e93;
  --sep: rgba(60, 60, 67, 0.16);
  --sep-strong: rgba(60, 60, 67, 0.29);
  --red: #e5243b;
  --red-text: #c8102e;
  --red-soft: rgba(229, 36, 59, 0.1);
  --bar-bg: rgba(242, 242, 247, 0.78);
  --graphic-bg: #faf8f4;
  --shadow: 0 0.5px 1px rgba(0, 0, 0, 0.04), 0 2px 10px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 1px 2px rgba(0, 0, 0, 0.05), 0 10px 30px rgba(0, 0, 0, 0.1);
  --signal-bg: #1c1c1e;

  --sans: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter Variable', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter Variable', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --serif: ui-serif, 'Newsreader Variable', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --brand-serif: 'Newsreader Variable', ui-serif, Georgia, serif;

  --r-xl: 22px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 8px;
  --gutter: 20px;
  --max: 1120px;
  --measure: 680px;
  --bar-h: 52px;
  --tab-h: 0px;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #000000;
    --card: #1c1c1e;
    --card-raised: #2c2c2e;
    --fill: rgba(118, 118, 128, 0.24);
    --fill-2: rgba(118, 118, 128, 0.16);
    --ink: #f5f5f7;
    --ink-2: #d1d1d6;
    --ink-3: #a1a1a6;
    --ink-4: #8e8e93;
    --sep: rgba(84, 84, 88, 0.45);
    --sep-strong: rgba(84, 84, 88, 0.65);
    --red: #ff453a;
    --red-text: #ff6961;
    --red-soft: rgba(255, 69, 58, 0.16);
    --bar-bg: rgba(0, 0, 0, 0.72);
    --shadow: none;
    --shadow-hover: none;
    --signal-bg: #1c1c1e;
  }
}
:root[data-theme='dark'] {
  --bg: #000000; --card: #1c1c1e; --card-raised: #2c2c2e; --fill: rgba(118,118,128,.24); --fill-2: rgba(118,118,128,.16);
  --ink: #f5f5f7; --ink-2: #d1d1d6; --ink-3: #a1a1a6; --ink-4: #8e8e93; --sep: rgba(84,84,88,.45); --sep-strong: rgba(84,84,88,.65);
  --red: #ff453a; --red-text: #ff6961; --red-soft: rgba(255,69,58,.16); --bar-bg: rgba(0,0,0,.72); --shadow: none; --shadow-hover: none;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--bar-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern';
  padding-bottom: var(--tab-h);
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--red) 70%, transparent); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--red) 25%, transparent); }

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--card); padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 10px; }
.icon { flex: none; }

/* ---------- wordmark ---------- */
.wordmark {
  font-family: var(--brand-serif);
  font-weight: 700;
  font-variation-settings: 'opsz' 72;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--ink);
}
.wordmark-sm { font-size: 15px; letter-spacing: -0.01em; }
.wordmark-xl { font-size: clamp(42px, 7vw, 68px); line-height: 1; letter-spacing: -0.03em; }
.mark { display: block; flex: none; width: 1.35em; height: 1.35em; }
.mark-xl { width: 0.92em; height: 0.92em; }

/* ---------- top bar (translucent, like iOS) ---------- */
.bar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bar-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid transparent;
  transition: border-color 0.2s;
}
.bar.is-scrolled { border-bottom-color: var(--sep); }
.bar-inner { max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); height: var(--bar-h); display: flex; align-items: center; gap: 20px; }
.bar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar-logo { text-decoration: none; font-size: 20px; display: inline-flex; align-items: center; gap: 8px; }
.bar-back { display: none; align-items: center; gap: 2px; color: var(--red); text-decoration: none; font-weight: 500; font-size: 17px; margin-left: -6px; }
.bar-nav { display: flex; gap: 2px; margin-inline: auto; }
.bar-nav a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 6px 10px; border-radius: 999px; transition: background 0.15s, color 0.15s; }
.bar-nav a:hover { background: var(--fill-2); color: var(--ink); }
.bar-nav a.is-active { color: var(--red-text); background: var(--red-soft); }
.bar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.bar-nav + .bar-right { margin-left: 0; }
.bar-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 999px; color: var(--ink-2); }
.bar-icon:hover { background: var(--fill-2); color: var(--ink); }
.bar-cta { text-decoration: none; background: var(--red); color: #fff; font-size: 14px; font-weight: 600; padding: 7px 14px; border-radius: 999px; white-space: nowrap; }
.bar-cta:hover { filter: brightness(1.06); }

/* ---------- bottom tab bar (phones) ---------- */
.tabbar { display: none; }

/* ---------- Today header ---------- */
.today-head { padding-top: 28px; padding-bottom: 4px; }
.today-date { margin: 0 0 2px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-4); }
.today-title { margin: 0; font-weight: 400; display: flex; align-items: center; gap: 0.22em; font-size: clamp(31px, 9.6vw, 68px); }
.today-title .wordmark-xl { font-size: 1em; }
.today-tag { margin: 6px 0 0; font-size: 15px; color: var(--ink-3); letter-spacing: 0.01em; }
.preview-note { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 14px 0 0; padding: 8px 12px; border-radius: var(--r-md); background: var(--card); box-shadow: var(--shadow); font-size: 13px; color: var(--ink-3); }
.section-title { margin: 0; font-family: var(--display); font-weight: 800; font-size: clamp(34px, 5vw, 46px); letter-spacing: -0.025em; line-height: 1.05; }
.section-desc { margin: 10px 0 0; max-width: 640px; font-size: 18px; color: var(--ink-3); line-height: 1.45; }

/* ---------- groups ---------- */
.group { margin-top: 34px; }
.group-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 12px; }
.group-title { margin: 0; font-family: var(--display); font-size: 24px; font-weight: 800; letter-spacing: -0.02em; color: var(--red); line-height: 1.15; }
.group-title a { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.group-title a .icon { margin-top: 2px; }
.group-title a:hover { opacity: 0.8; }
.group-sub { margin: 0; font-size: 15px; color: var(--ink-4); }
.mt { margin-top: 16px; }

/* ---------- tiles ---------- */
.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.25s;
  min-width: 0;
}
@media (hover: hover) {
  .tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
}
.tile-link { display: block; text-decoration: none; color: inherit; flex: 1; }
.tile-link:focus-visible { outline-offset: -3px; border-radius: var(--r-lg); }
.tile-media { position: relative; overflow: hidden; background: var(--fill-2); }
.tile-media img, .tile-thumb img { width: 100%; height: 100%; object-fit: cover; }
img.is-graphic { object-fit: contain !important; background: var(--graphic-bg); }
.ratio-16x10 { aspect-ratio: 16 / 10; }
.ratio-3x2 { aspect-ratio: 3 / 2; }
.tile-body { padding: 14px 16px 4px; }
.tile-pub { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.tile-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 5px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--red-text); }
.tile-title {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.24;
  letter-spacing: -0.012em;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-wrap: pretty;
}
.tile-title-xl { font-size: clamp(24px, 2.6vw, 30px); font-weight: 750; line-height: 1.12; letter-spacing: -0.022em; -webkit-line-clamp: 5; }
.tile-title-serif { font-family: var(--serif); font-weight: 650; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; }
.tile-dek { margin: 10px 0 0; color: var(--ink-3); font-size: 16px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 8px 16px; font-size: 13px; color: var(--ink-4); }
.meta-left { display: flex; align-items: center; gap: 5px; min-width: 0; white-space: nowrap; overflow: hidden; }
.meta-section { font-weight: 600; color: var(--ink-3); }
.meta-author { font-weight: 600; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.dot { opacity: 0.6; }
.meta-more { display: grid; place-items: center; width: 32px; height: 28px; border: 0; border-radius: 999px; background: transparent; color: var(--ink-4); cursor: pointer; flex: none; }
.meta-more:hover { background: var(--fill-2); color: var(--ink); }

.tile-hero .tile-body { padding: 16px 20px 4px; }
.tile-hero .tile-meta { padding-left: 20px; }

.tile-row .tile-link { display: grid; grid-template-columns: 1fr 104px; gap: 14px; padding: 16px 16px 0; align-items: start; }
.tile-row .tile-body { padding: 0; }
.tile-thumb { width: 104px; aspect-ratio: 1; border-radius: var(--r-md); overflow: hidden; background: var(--fill-2); }
.tile-row .tile-title { font-size: 17px; }

.tile-card .tile-title { font-size: 18px; }
.tile-opinion { background: var(--card); }
.tile-opinion .tile-body { padding: 18px 18px 4px; }
.tile-byline { display: flex; align-items: center; gap: 10px; margin: 14px 0 0; font-size: 15px; font-weight: 600; color: var(--ink-2); }

/* chips */
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; line-height: 1; }
.chip-type { background: var(--red-soft); color: var(--red-text); }
.chip-opinion, .chip-letter { background: var(--ink); color: var(--card); }
.chip-draft { background: #ffd60a; color: #1d1d1f; }

/* avatar */
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; flex: none; background: linear-gradient(145deg, #ff5a5f, #c8102e); color: #fff; font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: 0.02em; }
img.avatar-photo { object-fit: cover; background: #000; padding: 0; }
.avatar-lg { width: 52px; height: 52px; font-size: 17px; }
.avatar-xl { width: 84px; height: 84px; font-size: 28px; margin-bottom: 14px; }

/* ---------- layouts ---------- */
.top-grid { display: grid; gap: 14px; }
.top-stack { display: grid; gap: 14px; }
.grid-2, .grid-3, .rail, .section-grid { display: grid; gap: 14px; }
.rail { grid-auto-flow: column; grid-auto-columns: min(80%, 320px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

@media (min-width: 760px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .top-grid { grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr); align-items: start; }
  .top-stack { gap: 12px; }
  .top-stack .tile-row .tile-link { grid-template-columns: 1fr 92px; padding-top: 14px; }
  .top-stack .tile-thumb { width: 92px; }
  .top-stack .tile-row .tile-title { font-size: 16.5px; -webkit-line-clamp: 3; }
  .rail { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; }
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .section-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- numbered list (Apple News "Trending" style) ---------- */
.panel { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 6px 18px; }
.numbered { list-style: none; margin: 0; padding: 0; display: grid; }
.numbered li + li { border-top: 0.5px solid var(--sep); }
.numbered a { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; text-decoration: none; }
.numbered .num { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; color: var(--red); min-width: 22px; letter-spacing: -0.03em; }
.numbered-text { display: grid; gap: 2px; }
.numbered .tile-kicker { margin: 0; }
.numbered-title { font-family: var(--display); font-size: 17px; font-weight: 650; line-height: 1.28; letter-spacing: -0.01em; }
.numbered a:hover .numbered-title { color: var(--red-text); }
@media (min-width: 900px) {
  .numbered { grid-template-columns: 1fr 1fr; column-gap: 36px; }
  .numbered li + li { border-top: 0; }
  .numbered li { border-bottom: 0.5px solid var(--sep); }
  .numbered li:nth-last-child(-n + 2):nth-child(odd), .numbered li:last-child { border-bottom: 0; }
}

/* ---------- launch (pre-first-edition) front page ---------- */
.launch-panel { padding: clamp(22px, 4vw, 40px); }
.launch-title { margin: 6px 0 0; max-width: 760px; font-family: var(--serif); font-variation-settings: 'opsz' 60; font-size: clamp(26px, 3.6vw, 38px); font-weight: 700; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
.launch-text { margin: 14px 0 0; max-width: 640px; font-size: 18px; line-height: 1.5; color: var(--ink-3); }
.tile-standard { text-decoration: none; color: inherit; }
.tile-standard .tile-body { display: grid; gap: 6px; padding: 18px; }
.tile-standard .tile-dek { margin: 0; font-size: 15px; }

/* ---------- newsletter card ---------- */
.signal { margin: 40px 0 8px; border-radius: var(--r-xl); background: radial-gradient(120% 140% at 100% 0%, #3a0d14 0%, var(--signal-bg) 55%); color: #f5f5f7; overflow: hidden; }
.signal-inner { padding: clamp(24px, 4vw, 44px); max-width: 720px; }
.signal-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #ff8a8f; }
.signal-title { margin: 6px 0 0; font-family: var(--brand-serif); font-variation-settings: 'opsz' 72; font-weight: 700; font-size: clamp(36px, 5vw, 52px); letter-spacing: -0.025em; line-height: 1; }
.signal-pitch { margin: 12px 0 0; font-size: 18px; line-height: 1.45; color: #d1d1d6; max-width: 560px; }
.signal-form { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.signal-form input[type='email'] { flex: 1 1 240px; min-width: 0; height: 48px; padding: 0 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.08); color: #fff; font: inherit; font-size: 17px; }
.signal-form input::placeholder { color: #8e8e93; }
.signal-form button { height: 48px; padding: 0 22px; border-radius: 12px; border: 0; background: var(--red); color: #fff; font-weight: 650; font-size: 16px; cursor: pointer; }
.signal-form button:hover { filter: brightness(1.08); }
.signal-fine { margin: 12px 0 0; font-size: 13px; color: #8e8e93; }
.signal-fine a { color: #c7c7cc; }
.signal-compact { margin-top: 28px; }
.hp { position: absolute; left: -9999px; }

/* ---------- article ---------- */
body.page-article, body.page-static { --bg: var(--card); }
@media (prefers-color-scheme: dark) { :root:not([data-theme='light']) body.page-article, :root:not([data-theme='light']) body.page-static { --bg: #000; } }
.page-article .bar-back { display: inline-flex; }
/* Reading mode: like the Apple News article view, the bar is just back · masthead · actions. */
.page-article .bar-nav { display: none; }
.page-article .bar-right { margin-left: auto; }
.page-article .bar-logo { position: absolute; left: 50%; transform: translateX(-50%); }
.page-article .bar-inner { position: relative; }

.story { padding-bottom: 12px; }
.draft-banner { display: flex; align-items: center; justify-content: center; gap: 8px; background: #ffd60a; color: #1d1d1f; font-size: 14px; font-weight: 600; padding: 8px 16px; text-align: center; }
.story-head, .story-body, .story-foot { max-width: calc(var(--measure) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.story-head { padding-top: clamp(24px, 4vw, 48px); }
.story-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--red-text); }
.story-kicker a { text-decoration: none; }
.story-type { color: var(--ink-4); padding-left: 10px; border-left: 1px solid var(--sep-strong); }
.story-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-variation-settings: 'opsz' 72;
  font-size: clamp(34px, 5.2vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.story-dek { margin: 16px 0 0; font-size: clamp(19px, 2.2vw, 22px); line-height: 1.42; color: var(--ink-3); font-weight: 400; text-wrap: pretty; }
.byline { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 0.5px solid var(--sep-strong); }
.byline .avatar { width: 40px; height: 40px; font-size: 14px; }
.byline-text { flex: 1; min-width: 0; }
.byline-name { margin: 0; font-size: 15px; font-weight: 650; }
.byline-name a { text-decoration: none; }
.byline-name a:hover { color: var(--red-text); }
.byline-meta { margin: 1px 0 0; font-size: 14px; color: var(--ink-4); }
.updated { color: var(--red-text); }
.share-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--fill-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.share-btn:hover { background: var(--fill); }

.story-hero { margin: 28px auto 0; max-width: 1040px; padding-inline: var(--gutter); }
.story-hero-media { border-radius: var(--r-lg); overflow: hidden; background: var(--fill-2); aspect-ratio: 16 / 10; }
.story-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.story-hero-graphic .story-hero-media { background: var(--graphic-bg); }
.story-hero-media a { display: block; height: 100%; cursor: zoom-in; }
.story-hero figcaption { max-width: var(--measure); margin: 10px auto 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-4); }
.story-hero .caption { color: var(--ink-3); }
.story-hero .credit a { color: inherit; text-decoration: underline; text-decoration-color: var(--sep-strong); text-underline-offset: 2px; }

.prose { font-family: var(--serif); font-size: 20px; line-height: 1.62; color: var(--ink); font-variation-settings: 'opsz' 16; }
.story-body { margin-top: 30px; }
.prose > * { margin: 0 0 1.05em; }
.prose p { text-wrap: pretty; hanging-punctuation: first; }
.prose h2, .prose h3, .prose h4 { font-family: var(--display); color: var(--ink); letter-spacing: -0.015em; line-height: 1.2; }
.prose h2 { font-size: 25px; font-weight: 750; margin: 1.7em 0 0.55em; }
.prose h3 { font-size: 20px; font-weight: 700; margin: 1.5em 0 0.45em; }
.prose a { color: inherit; text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.prose a:hover { color: var(--red-text); }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose li::marker { color: var(--red); }
.prose hr { border: 0; text-align: center; margin: 2em 0; }
.prose hr::after { content: '◆ ◆ ◆'; font-size: 11px; letter-spacing: 0.6em; color: var(--ink-4); }
.prose blockquote { margin: 1.4em 0; padding: 0 0 0 1em; border-left: 3px solid var(--red); color: var(--ink-2); font-style: italic; }
.dateline { font-family: var(--sans); font-size: 0.72em; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); }
.has-dropcap > p:first-of-type::first-letter {
  float: left;
  font-family: var(--brand-serif);
  font-variation-settings: 'opsz' 72;
  font-weight: 700;
  font-size: 4.2em;
  line-height: 0.82;
  margin: 0.07em 0.09em 0 -0.02em;
  color: var(--red);
}
.pullquote { margin: 1.6em 0 !important; padding: 18px 0 0; border-top: 3px solid var(--red); }
.pullquote p { margin: 0; font-family: var(--serif); font-variation-settings: 'opsz' 60; font-size: clamp(25px, 3.2vw, 30px); line-height: 1.22; font-weight: 600; letter-spacing: -0.012em; color: var(--ink); }
.note-box { margin: 1.6em 0 !important; padding: 18px 20px; background: var(--bg); border-radius: var(--r-md); font-family: var(--sans); font-size: 16px; line-height: 1.5; }
.page-article .note-box, .page-static .note-box { background: color-mix(in srgb, var(--ink) 4%, var(--card)); }
.note-box .note-title { margin: 0 0 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--red-text); }
.note-box p { margin: 0 0 0.6em; }
.note-box p:last-child, .note-box ul:last-child { margin-bottom: 0; }
.note-box ul { margin: 0; padding-left: 1.1em; }
.table-wrap { overflow-x: auto; margin: 1.6em 0 !important; border-radius: var(--r-md); border: 0.5px solid var(--sep-strong); }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.prose th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-3); font-weight: 700; padding: 10px 14px; background: color-mix(in srgb, var(--ink) 4%, var(--card)); }
.prose td { padding: 10px 14px; border-top: 0.5px solid var(--sep); }
.inline-figure { margin: 1.8em 0 !important; }
.inline-figure img { border-radius: var(--r-md); width: 100%; }
.inline-figure figcaption { font-family: var(--sans); font-size: 13.5px; color: var(--ink-4); margin-top: 8px; }

.story-foot { margin-top: 36px; font-size: 15.5px; }
.tags { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 5px 12px; border-radius: 999px; background: var(--fill-2); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sources, .transparency { padding: 20px 0; border-top: 0.5px solid var(--sep-strong); }
.sources h2, .transparency h2 { margin: 0 0 10px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); }
.sources ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; line-height: 1.4; }
.sources li::marker { color: var(--ink-4); font-variant-numeric: tabular-nums; }
.sources a { color: var(--ink); text-decoration-color: var(--sep-strong); text-underline-offset: 2px; }
.sources a:hover { text-decoration-color: var(--red); }
.src-pub { color: var(--ink-4); }
.transparency p { margin: 0 0 10px; color: var(--ink-3); line-height: 1.5; }
.transparency a { color: var(--ink-2); }
.author-box { display: flex; gap: 14px; padding: 20px; margin-top: 8px; border-radius: var(--r-lg); background: color-mix(in srgb, var(--ink) 4%, var(--card)); }
.author-name { margin: 0; font-weight: 700; font-size: 16px; }
.author-name a { text-decoration: none; }
.author-role { margin: 1px 0 0; font-size: 14px; color: var(--ink-4); }
.author-bio { margin: 8px 0 0; font-size: 15px; color: var(--ink-3); line-height: 1.45; }

.story-opinion .story-kicker { color: var(--ink); }
.story-opinion .story-type { color: var(--red-text); border-color: var(--red); font-weight: 800; }
.story-page .story-body { margin-top: 18px; }
.related { margin-top: 40px; }

/* ---------- sections index ---------- */
.section-card { position: relative; display: grid; gap: 6px; padding: 22px; min-height: 180px; border-radius: var(--r-lg); color: #fff; text-decoration: none; overflow: hidden; background: #1c1c1e; transition: transform 0.25s; }
.section-card:hover { transform: translateY(-2px); }
.section-card-name { font-family: var(--display); font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.section-card-desc { font-size: 15px; line-height: 1.4; opacity: 0.88; }
.section-card-latest { font-size: 13px; opacity: 0.75; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.section-card-count { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.section-card-triathlon { background: linear-gradient(140deg, #0a84ff, #0040a8); }
.section-card-running { background: linear-gradient(140deg, #ff9f0a, #d14b00); }
.section-card-trail-ultra { background: linear-gradient(140deg, #34c759, #0b6b2e); }
.section-card-cycling { background: linear-gradient(140deg, #bf5af2, #6b1fa8); }
.section-card-swimming { background: linear-gradient(140deg, #64d2ff, #0a6aa8); }
.section-card-tech { background: linear-gradient(140deg, #1c1c1e, #3a3a3c 55%, #8a7a00); }
.section-card-science { background: linear-gradient(140deg, #32ade6, #0b5f8a); }
.section-card-mind { background: linear-gradient(140deg, #5e5ce6, #2a1f8f); }
.section-card-opinion { background: linear-gradient(140deg, #3a3a3c, #000); }

/* ---------- author / search / misc pages ---------- */
.author-head { text-align: left; }
.author-contact a { color: var(--red-text); }
.search-wrap { margin-top: 18px; }
.search-form { position: relative; display: flex; align-items: center; }
.search-form .icon { position: absolute; left: 14px; color: var(--ink-4); }
.search-form input { width: 100%; height: 52px; padding: 0 16px 0 46px; border: 0; border-radius: var(--r-md); background: var(--fill); color: var(--ink); font: inherit; font-size: 19px; }
.search-form input:focus { outline: 3px solid color-mix(in srgb, var(--red) 50%, transparent); }
.search-status { color: var(--ink-4); font-size: 14px; min-height: 1.4em; margin: 12px 0; }
.empty { color: var(--ink-4); }
.thanks { text-align: center; padding-block: 80px; }
.thanks .section-desc { margin-inline: auto; }
.thanks-icon { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 999px; background: #34c759; color: #fff; margin: 0 auto 18px; }
.thanks-icon .icon { width: 30px; height: 30px; }
.button { display: inline-flex; align-items: center; height: 44px; padding: 0 20px; border-radius: 999px; background: var(--red); color: #fff; text-decoration: none; font-weight: 650; margin: 18px 4px 0; }
.button-ghost { background: var(--fill); color: var(--ink); }
.newsletter-page .signal { margin-top: 28px; }
.narrow-prose { max-width: var(--measure); margin: 32px 0; }

/* ---------- footer ---------- */
.site-footer { margin-top: 64px; padding: 40px 0 28px; background: var(--card); border-top: 0.5px solid var(--sep); font-size: 15px; }
.page-article .site-footer, .page-static .site-footer { background: color-mix(in srgb, var(--ink) 3%, var(--card)); }
.footer-grid { display: grid; gap: 28px; }
.footer-logo { text-decoration: none; font-size: 24px; display: inline-flex; align-items: center; gap: 10px; }
.footer-brand p { color: var(--ink-3); max-width: 360px; margin: 10px 0 0; line-height: 1.45; }
.footer-owner { font-size: 14px; }
.footer-owner a, .footer-legal a { color: var(--ink-2); }
.site-footer h2 { margin: 0 0 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-4); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { text-decoration: none; color: var(--ink-2); }
.site-footer ul a:hover { color: var(--red-text); }
.footer-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 32px; padding-top: 18px; border-top: 0.5px solid var(--sep); color: var(--ink-4); font-size: 13px; }
.footer-legal p { margin: 0; }
@media (min-width: 860px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--tab-h)); transform: translate(-50%, 20px); opacity: 0; z-index: 80; padding: 10px 16px; border-radius: 999px; background: rgba(30, 30, 32, 0.92); color: #fff; font-size: 14px; font-weight: 600; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: opacity 0.2s, transform 0.25s; pointer-events: none; display: flex; gap: 6px; align-items: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive: phones & small tablets ---------- */
@media (max-width: 899px) {
  :root { --tab-h: calc(56px + env(safe-area-inset-bottom)); }
  .bar-nav, .bar-cta { display: none; }
  .bar-right { margin-left: auto !important; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    height: var(--tab-h);
    padding-bottom: env(safe-area-inset-bottom);
    background: var(--bar-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-top: 0.5px solid var(--sep);
  }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--ink-4); font-size: 10.5px; font-weight: 600; letter-spacing: 0.01em; }
  .tab .icon { width: 24px; height: 24px; }
  .tab.is-active { color: var(--red); }
  .page-article .bar-logo { font-size: 18px; }
}
@media (max-width: 599px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .group { margin-top: 28px; }
  .group-title { font-size: 22px; }
  .story-hero { padding-inline: 0; }
  .story-hero-media { border-radius: 0; aspect-ratio: 4 / 3; }
  .story-hero figcaption { padding-inline: var(--gutter); }
  .prose { font-size: 19px; line-height: 1.6; }
  .tile-row .tile-link { grid-template-columns: 1fr 88px; }
  .tile-thumb { width: 88px; }
  .share-btn span { display: none; }
  .share-btn { width: 40px; padding: 0; justify-content: center; }
  .page-article .bar-back span { display: none; }
}

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

@media print {
  .bar, .tabbar, .site-footer, .signal, .related, .share-btn, .meta-more { display: none !important; }
  body { background: #fff; color: #000; }
  .prose { font-size: 12pt; }
}
