:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #fff;
  --surface-raised: #fff;
  --subtle: #edf0f4;
  --line: #d9dee7;
  --line-strong: #a9b2c0;
  --ink: #12151a;
  --muted: #5c6675;
  --accent: #075fda;
  --accent-hover: #004cad;
  --accent-soft: #e8f1ff;
  --signal: #c74322;
  --on-accent: #fff;
  --player: #090c11;
  --shadow: 0 18px 50px rgb(31 42 57 / 9%);
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: #0c1016; --surface: #131923; --surface-raised: #18202c; --subtle: #1c2532;
  --line: #2a3545; --line-strong: #46546a; --ink: #f3f6fb; --muted: #9da8ba;
  --accent: #84b5ff; --accent-hover: #a8cbff; --accent-soft: #172b49; --signal: #ff8464;
  --on-accent: #08101d; --player: #05070a; --shadow: 0 20px 60px rgb(0 0 0 / 28%);
}
@media (prefers-color-scheme: dark) {
  :root[data-theme='system'] {
    color-scheme: dark;
    --bg: #0c1016; --surface: #131923; --surface-raised: #18202c; --subtle: #1c2532;
    --line: #2a3545; --line-strong: #46546a; --ink: #f3f6fb; --muted: #9da8ba;
    --accent: #84b5ff; --accent-hover: #a8cbff; --accent-soft: #172b49; --signal: #ff8464;
    --on-accent: #08101d; --player: #05070a; --shadow: 0 20px 60px rgb(0 0 0 / 28%);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; min-width: 0; overflow-x: hidden; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
#app-shell { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, iframe:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; top: -100px; left: 16px; padding: 10px 16px; background: var(--accent); color: var(--on-accent); font-weight: 750; }
.skip-link:focus { top: 12px; }
.page-shell { width: min(100% - 80px, 1240px); margin-inline: auto; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }

.site-header { position: relative; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; width: min(100% - 80px, 1240px); min-height: 76px; margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; color: var(--ink); font-size: 27px; font-weight: 850; letter-spacing: -.07em; line-height: 1; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 29px; height: 32px; color: var(--accent); }
.brand-mark path { stroke: currentColor; stroke-width: 2.45; stroke-linejoin: round; }
.brand-period { color: var(--signal); }
.tagline { padding-left: 24px; border-left: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.theme-options { display: flex; margin-left: auto; padding: 3px; background: var(--subtle); border: 1px solid var(--line); border-radius: 5px; }
.theme-options a { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 2px 10px; color: var(--muted); font-size: 10px; font-weight: 650; }
.theme-options a[aria-current='true'] { background: var(--surface-raised); color: var(--ink); border-radius: 3px; box-shadow: 0 1px 4px rgb(0 0 0 / 8%); }
.section-nav-wrap { display: flex; align-items: center; gap: 22px; width: min(100% - 80px, 1240px); margin-inline: auto; padding-bottom: 13px; }
.cadence-nav, .topic-nav { display: flex; align-items: center; gap: 4px; min-width: 0; flex-wrap: wrap; }
.topic-nav { padding-left: 22px; border-left: 1px solid var(--line); }
.cadence-nav a, .topic-nav a { display: inline-flex; align-items: center; min-height: 34px; padding: 5px 11px; border-radius: 3px; color: var(--muted); font-size: 12px; font-weight: 700; }
.cadence-nav a:hover, .topic-nav a:hover { background: var(--subtle); color: var(--ink); }
.cadence-nav a[aria-current='page'] { background: var(--ink); color: var(--bg); }
.topic-nav a { font-size: 11px; }
.topic-nav a::before { width: 6px; height: 6px; margin-right: 7px; background: var(--signal); content: ''; }
.topic-nav a[aria-current='page'] { background: var(--accent-soft); color: var(--accent); }
.topic-nav .clear-link { color: var(--signal); }
.topic-nav .clear-link::before { width: auto; height: auto; background: none; content: '×'; font-size: 14px; line-height: 1; }
.loading-line { position: absolute; inset: auto 0 -1px; height: 2px; overflow: hidden; opacity: 0; pointer-events: none; }
.loading-line span { display: block; width: 34%; height: 100%; background: var(--accent); animation: loading 1.1s ease-in-out infinite; }
.htmx-request .loading-line, .loading-line.htmx-request { opacity: 1; }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(310%); } }

.feed-main { padding-block: 0 48px; }
.feed-context { display: flex; align-items: center; gap: 14px; padding: 22px 0 18px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.feed-context-line { height: 1px; flex: 1; background: var(--line); }
.feed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 292px; align-items: start; gap: clamp(32px, 4.5vw, 58px); }
.recap-stream { min-width: 0; }
.featured-card { overflow: hidden; margin-bottom: 30px; background: var(--surface); border: 2px solid var(--ink); border-radius: 4px; box-shadow: var(--shadow); }
.featured-label { display: flex; align-items: center; gap: 10px; min-height: 41px; padding: 7px 20px; background: var(--ink); color: var(--bg); font-size: 10px; font-weight: 850; letter-spacing: .17em; }
.featured-label span { display: inline-grid; width: 20px; height: 20px; place-items: center; background: var(--signal); color: #fff; border-radius: 50%; font-size: 11px; letter-spacing: 0; }
.featured-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(270px, .9fr); }
.featured-copy { min-width: 0; padding: clamp(25px, 3.2vw, 38px); }
.recap-kicker { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 12px; }
.recap-type { display: inline-flex; align-items: center; gap: 8px; color: var(--signal); font-size: 10px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.recap-type::before { width: 8px; height: 8px; background: currentColor; content: ''; }
.recap-date { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.featured-card h2 { max-width: 680px; font-size: clamp(26px, 3vw, 38px); font-weight: 850; line-height: 1.08; letter-spacing: -.045em; text-wrap: balance; }
.featured-card h2, .recap-row h2, .detail-header h1 { overflow-wrap: anywhere; }
.featured-card h2 a:hover, .recap-row h2 a:hover { color: var(--accent); }
.recap-summary { margin-top: 15px; color: var(--muted); font-size: 14px; line-height: 1.72; }
.recap-actions { display: flex; align-items: center; gap: 13px 18px; flex-wrap: wrap; margin-top: 23px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 9px 17px; background: var(--accent); color: var(--on-accent); border-radius: 3px; font-size: 12px; font-weight: 800; }
.button:hover { background: var(--accent-hover); color: var(--on-accent); }
.button svg { width: 15px; height: 15px; }
.source { color: var(--muted); font-size: 11px; }
.thumbnail-link { position: relative; display: block; min-width: 0; overflow: hidden; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--player), #263345); }
.featured-card .thumbnail-link { align-self: center; margin: 18px; border: 1px solid var(--line); border-radius: 3px; }
.thumbnail-link img { width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.thumbnail-link::after { position: absolute; inset: 50% auto auto 50%; width: 46px; height: 32px; border-radius: 8px; background: rgb(0 0 0 / 78%); color: #fff; content: '▶'; display: grid; place-items: center; font-size: 13px; transform: translate(-50%, -50%); transition: transform 160ms ease, background 160ms ease; }
.thumbnail-link:hover::after { background: var(--signal); transform: translate(-50%, -50%) scale(1.06); }
.recap-row { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 30px; align-items: start; padding: 28px 0; border-top: 1px solid var(--line); }
.recap-row h2 { font-size: clamp(20px, 2.2vw, 25px); font-weight: 830; line-height: 1.18; letter-spacing: -.03em; text-wrap: balance; }
.recap-row .thumbnail-link { border-radius: 3px; }
.recap-row .recap-summary { margin-top: 10px; font-size: 13px; }
.text-link { display: inline-flex; align-items: center; gap: 9px; min-height: 40px; margin-top: 12px; color: var(--accent); font-size: 12px; font-weight: 800; }
.text-link:hover { color: var(--accent-hover); }
.text-link span { transition: transform 150ms ease; }
.text-link:hover span { transform: translateX(3px); }
.recap-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.topic-chip { display: inline-flex; align-items: center; min-height: 28px; padding: 3px 9px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: 10px; font-weight: 650; }
.topic-chip:hover { border-color: var(--accent); color: var(--accent); }
.brief-rail { position: sticky; top: 18px; display: grid; gap: 17px; }
.rail-panel { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; }
.rail-panel h2 { padding-bottom: 10px; border-bottom: 2px solid var(--ink); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.rail-panel p { margin-top: 13px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.rail-topics { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 14px; }
.rail-topics a { padding: 5px 9px; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); font-size: 10px; font-weight: 700; }
.rail-topics a:hover, .rail-topics a[aria-current='page'] { border-color: var(--accent); color: var(--accent); }
.latest-list { list-style: none; margin: 0; padding: 0; }
.latest-list li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.latest-list li:last-child { padding-bottom: 0; border-bottom: 0; }
.latest-list a { font-size: 12px; font-weight: 750; line-height: 1.45; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.pagination a { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); font-weight: 750; }
.empty-state { padding: clamp(44px, 8vw, 82px) 24px; background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--signal); border-radius: 4px; text-align: center; }
.empty-state h2 { margin-top: 12px; font-size: clamp(25px, 3vw, 34px); font-weight: 850; letter-spacing: -.04em; }
.empty-state p { max-width: 520px; margin: 10px auto 22px; color: var(--muted); }
.empty-state .button { margin-inline: auto; }

.detail-main { padding-block: 24px 58px; }
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: 12px; font-weight: 700; }
.detail-header { max-width: 1010px; margin: 26px 0 29px; }
.detail-header h1 { max-width: 1000px; margin-top: 14px; font-size: clamp(34px, 5vw, 60px); font-weight: 860; line-height: 1.02; letter-spacing: -.055em; text-wrap: balance; }
.detail-meta { display: flex; align-items: center; gap: 10px 15px; flex-wrap: wrap; }
.detail-meta .source { margin-left: 2px; }
.player-shell { overflow: hidden; background: var(--player); border: 1px solid var(--line-strong); border-radius: 5px; box-shadow: var(--shadow); }
.video-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #080b10, #1f2c3d); }
.video-player iframe { display: block; width: 100%; height: 100%; border: 0; }
.player-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 54px; padding: 7px 16px; background: var(--surface); color: var(--muted); font-size: 10px; }
.player-caption a { display: inline-flex; align-items: center; min-height: 40px; color: var(--accent); font-size: 11px; font-weight: 800; white-space: nowrap; }
.detail-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, .7fr); gap: clamp(34px, 6vw, 78px); margin: 42px 0; }
.detail-copy-single { grid-template-columns: minmax(0, 760px); }
.detail-copy h2 { margin: 8px 0 12px; font-size: 27px; font-weight: 850; letter-spacing: -.035em; }
.detail-copy p { color: var(--muted); line-height: 1.8; }
.key-points { list-style: none; margin: 11px 0 0; padding: 0; }
.key-points li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.key-points li span { color: var(--signal); font-size: 10px; font-weight: 850; }
.related-section { margin-top: 46px; padding-top: 28px; border-top: 2px solid var(--ink); }
.related-section > h2 { margin-bottom: 18px; font-size: 14px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.related-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.related-grid .recap-row { display: block; padding: 0; border: 0; }
.related-grid .thumbnail-link { margin-bottom: 14px; }
.error-main { min-height: 62vh; padding-block: clamp(70px, 12vw, 140px); }
.error-main h1 { max-width: 720px; margin: 14px 0 12px; font-size: clamp(38px, 6vw, 66px); font-weight: 860; line-height: 1.02; letter-spacing: -.055em; }
.error-main p { max-width: 620px; margin-bottom: 24px; color: var(--muted); font-size: 15px; }
.navigation-error { position: fixed; z-index: 30; right: 18px; bottom: 18px; display: flex; align-items: center; gap: 14px; max-width: min(430px, calc(100vw - 36px)); padding: 12px 14px; background: var(--ink); color: var(--bg); border-radius: 4px; box-shadow: var(--shadow); font-size: 12px; }
.navigation-error[hidden] { display: none; }
.navigation-error a { color: var(--accent); font-weight: 800; }
.site-footer { display: flex; align-items: center; gap: 24px; width: min(100% - 80px, 1240px); min-height: 88px; margin-inline: auto; border-top: 1px solid var(--line); color: var(--muted); }
.site-footer .brand { font-size: 19px; }
.site-footer .brand-mark { width: 23px; height: 25px; }
.site-footer p { font-size: 10px; }
.footer-note { margin-left: auto; font-size: 9px; font-weight: 750; letter-spacing: .14em; white-space: nowrap; }

@media (max-width: 1080px) {
  .feed-grid { grid-template-columns: minmax(0, 1fr); }
  .brief-rail { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .featured-body { grid-template-columns: minmax(0, 1fr) minmax(280px, .8fr); }
}
@media (max-width: 760px) {
  .page-shell, .header-inner, .section-nav-wrap, .site-footer { width: min(100% - 40px, 1240px); }
  .header-inner { min-height: 70px; }
  .tagline { display: none; }
  .section-nav-wrap { display: block; padding-bottom: 11px; }
  .topic-nav { margin-top: 7px; padding: 7px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .featured-body { display: flex; flex-direction: column; }
  .featured-card .thumbnail-link { order: -1; min-height: 0; margin: 12px 12px 0; }
  .featured-card .thumbnail-link img { height: auto; }
  .featured-copy { padding: 24px; }
  .recap-row { grid-template-columns: minmax(0, 1fr) 180px; gap: 22px; }
  .detail-copy { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .page-shell, .header-inner, .section-nav-wrap, .site-footer { width: min(100% - 32px, 1240px); }
  .header-inner { flex-wrap: wrap; gap: 11px; padding-block: 13px 8px; }
  .brand { font-size: 23px; }
  .brand-mark { width: 25px; height: 28px; }
  .theme-options { margin-left: auto; }
  .theme-options a { min-height: 34px; padding-inline: 7px; font-size: 9px; }
  .cadence-nav a, .topic-nav a { padding-inline: 9px; }
  .feed-context { gap: 9px; padding-block: 17px 14px; font-size: 9px; }
  .feed-context-date { display: none; }
  .featured-label { padding-inline: 15px; }
  .featured-copy { padding: 22px 19px 24px; }
  .featured-card h2 { font-size: 27px; }
  .recap-row { display: flex; flex-direction: column; gap: 15px; }
  .recap-row .thumbnail-link { order: -1; width: 100%; }
  .recap-row .thumbnail-link img { height: auto; }
  .brief-rail { grid-template-columns: 1fr; }
  .player-caption { align-items: flex-start; flex-direction: column; gap: 0; padding-block: 10px; }
  .detail-header h1 { font-size: 34px; }
  .related-grid { grid-template-columns: 1fr; }
  .site-footer { flex-wrap: wrap; gap: 8px 16px; padding-block: 20px; }
  .site-footer p { order: 3; flex-basis: 100%; }
  .navigation-error { align-items: flex-start; flex-direction: column; gap: 5px; }
}
@media (max-width: 350px) {
  .page-shell, .header-inner, .section-nav-wrap, .site-footer { width: min(100% - 24px, 1240px); }
  .brand { font-size: 21px; }
  .theme-options a { padding-inline: 6px; }
  .featured-copy { padding-inline: 16px; }
  .featured-card h2 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
