/* join.dev: the "AI System Design" videos' look on the web. Dark navy canvas with a faint blue grid, neon glows,
   Inter type. Colour meaning matches the videos: cyan = look here / good flow, red = the villain, green = the fix,
   lime = the join.dev brand accent. Tones (.tone-*) set --tone / --tone-dim for cards, chips and badges. */

@font-face { font-family: Inter; src: url(/fonts/Inter-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter-600.woff2) format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Inter; src: url(/fonts/Inter-800.woff2) format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url(/fonts/JetBrainsMono-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --bg: #050b1f;
  --bg-2: #0a1a3f;
  --panel: rgba(11, 23, 57, 0.82);
  --panel-2: rgba(19, 38, 88, 0.6);
  --line: rgba(148, 163, 184, 0.18);
  --line-2: rgba(56, 189, 248, 0.35);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --white: #fff;
  --cyan: #38bdf8;
  --teal: #5eead4;
  --red: #f43f5e;
  --green: #22c55e;
  --lime: #c3ef1d;
  --purple: #a78bfa;
  --yellow: #facc15;
  --radius: 16px;
  --font: Inter, 'Segoe UI', system-ui, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'DejaVu Sans Mono', monospace;
  --tone: #38bdf8;
  --tone-dim: rgba(56, 189, 248, 0.14);
  --max: 1180px;
  color-scheme: dark;
}

.tone-blue { --tone: #60a5fa; --tone-dim: rgba(96, 165, 250, 0.14); }
.tone-cyan { --tone: #22d3ee; --tone-dim: rgba(34, 211, 238, 0.13); }
.tone-red { --tone: #fb7185; --tone-dim: rgba(244, 63, 94, 0.15); }
.tone-purple { --tone: #c4b5fd; --tone-dim: rgba(167, 139, 250, 0.16); }
.tone-yellow { --tone: #facc15; --tone-dim: rgba(250, 204, 21, 0.13); }
.tone-green { --tone: #4ade80; --tone-dim: rgba(34, 197, 94, 0.14); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(1200px 700px at 80% -10%, #13306b 0%, transparent 60%), linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 55%, #06102a 100%) fixed;
  background-color: var(--bg);
  overflow-x: hidden;
}
.grid-bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(59, 130, 246, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(59, 130, 246, 0.07) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--teal); }
h1, h2, h3 { color: var(--white); line-height: 1.15; margin: 0 0 0.45em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
mark { background: none; color: var(--cyan); text-shadow: 0 0 24px rgba(56, 189, 248, 0.55); }
mark.bad { color: var(--red); text-shadow: 0 0 24px rgba(244, 63, 94, 0.5); }
code { font-family: var(--mono); font-size: 0.88em; background: rgba(56, 189, 248, 0.1); border: 1px solid var(--line); padding: 0.05em 0.35em; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.icon { flex: none; vertical-align: -0.15em; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--lime); color: #000; padding: 8px 14px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 20px;
  padding: 10px max(16px, calc((100vw - var(--max)) / 2));
  background: rgba(5, 11, 31, 0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--white); flex: none; }
.logo img { border-radius: 50%; box-shadow: 0 0 18px rgba(56, 189, 248, 0.45); }
.logo-text { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; }
.logo-text b { color: var(--lime); font-weight: 800; }
.site-header nav { flex: 1; min-width: 0; }
.site-header nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: none; }
.site-header nav a { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; white-space: nowrap; }
.site-header nav a:hover { color: var(--white); background: var(--panel-2); }
.site-header nav a.active { color: var(--white); background: rgba(56, 189, 248, 0.14); box-shadow: inset 0 0 0 1px var(--line-2); }
.header-sub { flex: none; }

main { max-width: var(--max); margin: 0 auto; padding: 0 16px 40px; }

/* Buttons, badges, chips */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 20px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--white); font: 700 1rem var(--font);
  text-decoration: none; cursor: pointer; transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { color: var(--white); transform: translateY(-1px); box-shadow: 0 0 24px rgba(56, 189, 248, 0.3); }
.btn-primary { background: linear-gradient(180deg, #22d3ee, #0891b2); border-color: #67e8f9; color: #03131f; }
.btn-primary:hover { color: #03131f; box-shadow: 0 0 30px rgba(34, 211, 238, 0.55); }
.btn-ghost { background: transparent; }
.btn-youtube { background: #e11d2a; border-color: #ff4d5a; }
.btn-youtube:hover { box-shadow: 0 0 24px rgba(255, 60, 70, 0.5); }
.btn-small { padding: 7px 13px; font-size: 0.88rem; border-radius: 10px; }
.btn-done.on { background: rgba(34, 197, 94, 0.18); border-color: var(--green); color: #bbf7d0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cta-row.center { justify-content: center; }
.badge, .chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; line-height: 1.5; white-space: nowrap; text-decoration: none;
}
.badge { color: var(--tone); background: var(--tone-dim); border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent); }
.chip { color: var(--muted); background: rgba(148, 163, 184, 0.1); border: 1px solid var(--line); }
.chip[class*='tone-'] { color: var(--tone); }
a.chip:hover { border-color: var(--tone); }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--teal); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 12px; }
.kicker a { color: inherit; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: #cbd5e1; max-width: 62ch; }

/* Sections and panels */
.section { margin: 56px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 18px; }
.section-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.section-head h2 small { font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.section-head p { margin: 0; color: var(--muted); }
.link-more { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); margin: 22px 0; }
.section-title { display: flex; align-items: center; gap: 10px; }
.section-title .icon { color: var(--tone, var(--cyan)); }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr 1.1fr; gap: 36px; align-items: center; padding-top: 48px; }
.hero-block .hero { margin-bottom: 44px; }
.hero .featured { grid-template-columns: 1fr; }
.hero .featured-art { min-height: 0; aspect-ratio: 16 / 9; }
.hero .featured-text h2 { font-size: 1.35rem; margin: 10px 0 6px; }
.hero-img { border-radius: 20px; border: 1px solid var(--line-2); box-shadow: 0 0 60px rgba(56, 189, 248, 0.2); }
.page-hero { padding: 48px 0 8px; }
.page-hero.with-art { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; }
.page-hero-art { border-radius: 18px; border: 1px solid var(--line-2); box-shadow: 0 0 50px rgba(56, 189, 248, 0.16); }
.page-hero-art.square { max-width: 340px; justify-self: end; }
.track-hero { border-left: 3px solid var(--tone); padding-left: 22px; margin-top: 18px; }
.track-hero h1 { color: var(--tone); }
.outcome { display: flex; gap: 8px; align-items: baseline; color: #cbd5e1; }
.outcome .icon { color: var(--tone); }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.card:hover { color: var(--text); transform: translateY(-3px); border-color: var(--tone); box-shadow: 0 0 34px var(--tone-dim); }
.card-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0b1739; }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-art img { transform: scale(1.04); }
.card-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: rgba(5, 11, 31, 0.6); border: 1px solid rgba(255, 255, 255, 0.35); color: #fff; opacity: 0; transition: opacity 0.2s; }
.card:hover .card-play, .featured:hover .card-play { opacity: 1; }
.card-length, .card-step, .card-done { position: absolute; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: rgba(5, 11, 31, 0.78); border: 1px solid var(--line); }
.card-length { right: 10px; bottom: 10px; }
.card-step { left: 10px; top: 10px; color: var(--tone); border-color: var(--tone); }
.card-done { right: 10px; top: 10px; color: #bbf7d0; border-color: var(--green); display: none; }
.is-done .card-done { display: inline-flex; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: 6px; }
.card-body p { margin: 0 0 8px; color: #cbd5e1; font-size: 0.95rem; }
.card-body .card-meta { margin-top: auto; color: var(--muted); font-size: 0.8rem; }

.featured { display: grid; grid-template-columns: 1.25fr 1fr; gap: 0; text-decoration: none; color: var(--text); background: var(--panel); border: 1px solid var(--line-2); border-radius: 20px; overflow: hidden; box-shadow: 0 0 50px var(--tone-dim); }
.featured:hover { color: var(--text); border-color: var(--tone); }
.featured-art { position: relative; min-height: 260px; }
.featured-art img { width: 100%; height: 100%; object-fit: cover; }
.featured-text { padding: clamp(20px, 3vw, 34px); display: flex; flex-direction: column; justify-content: center; }
.featured-text .btn { align-self: flex-start; }

.series-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.series-card { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--tone); color: var(--text); text-decoration: none; transition: box-shadow 0.18s; }
.series-card:hover { color: var(--text); box-shadow: 0 0 30px var(--tone-dim); }
.series-card p { color: var(--muted); font-size: 0.93rem; margin-bottom: 10px; }
.series-icon { color: var(--tone); margin-bottom: 6px; }
.series-meta { margin-top: auto; color: var(--tone); font-weight: 700; font-size: 0.88rem; display: inline-flex; align-items: center; gap: 4px; }

/* Roadmap (learning path overview) */
.roadmap { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; counter-reset: stop; position: relative; }
.stop a { position: relative; display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color 0.18s, box-shadow 0.18s; }
.stop a:hover { color: var(--text); border-color: var(--tone); box-shadow: 0 0 30px var(--tone-dim); }
.stop-num { position: absolute; top: 14px; right: 16px; font-weight: 800; font-size: 1.6rem; color: var(--tone); opacity: 0.35; }
.stop-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--tone-dim); color: var(--tone); margin-bottom: 6px; box-shadow: 0 0 20px var(--tone-dim); }
.stop-level { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tone); }
.stop-name { font-weight: 800; color: var(--white); font-size: 1.08rem; }
.stop-blurb { font-size: 0.88rem; color: var(--muted); flex: 1; }
.stop-meta, .progress-label { font-size: 0.8rem; color: var(--muted); }
.progress { display: block; height: 6px; border-radius: 99px; background: rgba(148, 163, 184, 0.15); overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--tone), var(--lime)); border-radius: inherit; transition: width 0.4s; }
.is-complete .progress-label, .is-complete [data-progress-label] { color: var(--lime); font-weight: 700; }
.track-progress { display: flex; align-items: center; gap: 12px; max-width: 420px; color: var(--muted); font-size: 0.9rem; }
.track-progress .progress { flex: 1; margin: 0; }

/* Track steps */
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; position: relative; }
.steps-list::before { content: ''; position: absolute; left: 21px; top: 20px; bottom: 20px; width: 2px; background: linear-gradient(var(--tone, var(--cyan)), transparent); opacity: 0.4; }
.step-card { position: relative; display: grid; grid-template-columns: 44px 170px 1fr 32px; gap: 16px; align-items: center; padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
a.step-card:hover { color: var(--text); border-color: var(--cyan); box-shadow: 0 0 26px rgba(56, 189, 248, 0.15); }
.step-num { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); color: var(--cyan); font-weight: 800; z-index: 1; }
.step-art img { border-radius: 10px; aspect-ratio: 16 / 9; object-fit: cover; }
.step-text { display: flex; flex-direction: column; gap: 3px; }
.step-text .card-tags { margin: 0; }
.step-text b { color: var(--white); font-size: 1.05rem; }
.step-text > span:last-child { color: var(--muted); font-size: 0.92rem; }
.step-check { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); color: transparent; }
.step.is-done .step-check { border-color: var(--green); background: rgba(34, 197, 94, 0.2); color: #bbf7d0; }
.step.is-done .step-num { border-color: var(--green); color: var(--green); }
.step.locked .step-card { grid-template-columns: 44px 1fr; opacity: 0.6; border-style: dashed; }
.step.locked .step-num { border-style: dashed; color: var(--muted); border-color: var(--muted); }
.next-track { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 26px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--tone); background: var(--tone-dim); color: var(--white); text-decoration: none; }
.next-track small { color: var(--muted); margin-right: auto; }
.next-track b { display: inline-flex; gap: 8px; align-items: center; color: var(--tone); }
.howto { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }

/* Episode page */
.crumbs { padding-top: 26px; display: flex; gap: 8px; align-items: center; font-size: 0.92rem; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; }
.ep-head { padding: 18px 0 8px; }
.ep-head .subtitle { color: var(--muted); font-size: 1.05rem; }
.ep-top { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; align-items: start; margin-top: 12px; }
.ep-aside { margin: 0; }
.ep-aside h2 { display: flex; gap: 8px; align-items: center; font-size: 1.15rem; color: var(--tone); }
.video { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-2); aspect-ratio: 16 / 9; background: #000; }
.video > img, .video iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-vertical { aspect-ratio: 16 / 9; }
.video-vertical iframe { object-fit: contain; }
.video-play { position: absolute; inset: 0; margin: auto; width: max-content; height: max-content; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 26px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, 0.35); background: rgba(5, 11, 31, 0.6); color: #fff; font: 700 1rem var(--font); cursor: pointer; backdrop-filter: blur(6px); }
.video-play:hover { background: rgba(8, 145, 178, 0.6); }
.video-overlay { position: absolute; inset: auto 0 0 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 14px; background: linear-gradient(transparent, rgba(5, 11, 31, 0.92)); }
.video-overlay .badge { white-space: normal; }
.callouts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0; }
.callout { padding: 20px 22px; border-radius: var(--radius); border: 1px solid; }
.callout h2 { display: flex; gap: 8px; align-items: center; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.04em; }
.callout p { margin: 0; font-size: 1.05rem; }
.callout.bad { border-color: rgba(244, 63, 94, 0.5); background: rgba(244, 63, 94, 0.08); }
.callout.bad h2 { color: var(--red); }
.callout.ok { border-color: rgba(34, 197, 94, 0.5); background: rgba(34, 197, 94, 0.08); }
.callout.ok h2 { color: var(--green); }
.callout mark { color: var(--white); }
.chapters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: ch; }
.chapters li { counter-increment: ch; padding: 6px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; font-size: 0.92rem; }
.chapters li::before { content: counter(ch) '. '; color: var(--tone); }
.ep-body { display: grid; grid-template-columns: 220px 1fr; gap: 32px; align-items: start; margin-top: 30px; }
.toc { position: sticky; top: 84px; font-size: 0.9rem; }
.toc h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 1px solid var(--line); display: grid; gap: 6px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--cyan); }
.prose-col { min-width: 0; }
.prose { margin: 0 0 34px; max-width: 76ch; }
.prose h2 { padding-top: 6px; border-top: 1px solid var(--line); padding-top: 22px; }
.prose h3, .prose h4 { margin-top: 1.2em; color: var(--teal); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 0.35em 0; }
.prose li p { margin: 0; display: inline; }
.prose strong { color: var(--white); }
.prose em { color: #e0e7ff; }
.table-wrap { overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: 0.93rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--teal); background: rgba(56, 189, 248, 0.06); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td:first-child { color: var(--white); font-weight: 600; }

.code-window { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: #040a1c; }
.code-window figcaption { display: flex; align-items: center; gap: 10px; padding: 9px 14px; background: #0b1739; color: var(--muted); font: 500 0.85rem var(--mono); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #f43f5e; }
.dots i:nth-child(2) { background: #facc15; }
.dots i:nth-child(3) { background: #22c55e; }
.copy { margin-left: auto; display: inline-flex; gap: 4px; align-items: center; background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 3px 9px; font: 600 0.78rem var(--font); cursor: pointer; }
.copy:hover { color: var(--white); border-color: var(--cyan); }
.code-window pre { margin: 0; padding: 16px 18px; overflow-x: auto; font: 500 0.9rem/1.65 var(--mono); color: #e2e8f0; }
.code-window code { background: none; border: 0; padding: 0; font-size: inherit; }
.tk-k { color: #c4b5fd; }
.tk-s { color: #86efac; }
.tk-n { color: #fbbf24; }
.tk-c { color: #64748b; font-style: italic; }
.tk-b { color: #67e8f9; }

.mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.mini-card { padding: 18px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); border-left: 3px solid var(--tone); }
.mini-card h3 { margin-bottom: 4px; }
.mini-card p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.mini-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--tone-dim); color: var(--tone); margin-bottom: 8px; }
.cmp { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: stretch; }
.cmp-side { padding: 18px; border-radius: 14px; border: 1px solid; }
.cmp-side ul { margin: 0; padding-left: 1.1em; }
.cmp-side li { margin: 0.3em 0; }
.cmp-side.bad { border-color: rgba(244, 63, 94, 0.45); background: rgba(244, 63, 94, 0.07); }
.cmp-side.bad h3 { color: var(--red); display: flex; gap: 8px; }
.cmp-side.ok { border-color: rgba(34, 197, 94, 0.45); background: rgba(34, 197, 94, 0.07); }
.cmp-side.ok h3 { color: var(--green); display: flex; gap: 8px; }
.vs { align-self: center; font-weight: 800; color: var(--muted); text-transform: uppercase; }
.verdict { margin: 18px 0 0; text-align: center; font-size: 1.25rem; font-weight: 700; color: var(--white); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 36px 0 10px; }
.pager-link { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--white); text-decoration: none; font-weight: 700; }
.pager-link:hover { color: var(--white); border-color: var(--cyan); }
.pager-link small { display: block; color: var(--muted); font-weight: 600; font-size: 0.8rem; }
.pager-link.next { justify-content: flex-end; text-align: right; }
.coming-next { display: flex; gap: 8px; align-items: center; justify-content: center; color: var(--muted); }

/* Filters */
.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: 600 0.88rem var(--font); cursor: pointer; }
.pill:hover { color: var(--white); border-color: var(--tone, var(--cyan)); }
.pill.active { color: var(--white); background: rgba(56, 189, 248, 0.16); border-color: var(--tone, var(--cyan)); box-shadow: 0 0 16px var(--tone-dim); }
.pill[class*='tone-'] .icon { color: var(--tone); }
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); max-width: 520px; color: var(--muted); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--white); font: 500 1rem var(--font); padding: 12px 0; }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* News */
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.news-item { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 18px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); }
.news-item time { color: var(--muted); font-size: 0.85rem; font-weight: 600; padding-top: 3px; }
.news-item .card-tags { margin-bottom: 4px; }
.news-item h3 { margin: 0 0 4px; font-size: 1.05rem; }
.news-item h3 a { color: var(--white); text-decoration: none; }
.news-item h3 a:hover { color: var(--cyan); }
.news-item p { margin: 0; color: var(--muted); font-size: 0.93rem; }
.news-list.compact .news-item { grid-template-columns: 1fr; gap: 2px; padding: 12px 16px; }
.story { scroll-margin-top: 90px; }
.story:target { border-color: var(--tone); box-shadow: 0 0 34px var(--tone-dim); }
.story .card-body h2 { font-size: 1.15rem; margin: 0 0 6px; }
.story-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.story-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; color: var(--tone); }
.slider { margin-top: 28px; }
.slider-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.slider-head .kicker { margin: 0; white-space: nowrap; }
.slider-head { flex-wrap: wrap; }
.slider-controls .link-more { white-space: nowrap; }
.slider-controls { display: flex; align-items: center; gap: 8px; }
.slider-controls .link-more { margin-left: 6px; }
.slider-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); color: var(--white); cursor: pointer; }
.slider-btn:hover, .slider-btn:focus-visible { border-color: var(--cyan); color: var(--cyan); }
.slider-pause { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.slider-btn[aria-pressed='true'] .slider-pause { width: 0; height: 0; border: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.slider-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border-radius: 20px; border: 1px solid var(--line-2); background: var(--panel); box-shadow: 0 0 60px rgba(96, 165, 250, 0.16); }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.slide { flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; }
.slide-art { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0b1739; }
.slide-art img { width: 100%; height: 100%; object-fit: cover; }
.slide-text { padding: clamp(18px, 3vw, 36px); }
.slide-text h2 { font-size: clamp(1.25rem, 2.2vw, 1.8rem); margin: 0 0 10px; line-height: 1.2; }
.slide-text h2 a { color: var(--white); text-decoration: none; }
.slide-text h2 a:hover { color: var(--cyan); }
.slide-text p { color: #cbd5e1; margin: 0 0 14px; }
.slide-text .story-link { --tone: #60a5fa; }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.slider-dots button { width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; background: var(--line-2); cursor: pointer; transition: width 0.2s, background 0.2s; }
.slider-dots button[aria-current='true'] { width: 26px; background: var(--cyan); }
.playlist-links { margin-top: 28px; }
.video-card h3 { font-size: 1rem; }
.post { max-width: 780px; }
.post-body { font-size: 1.05rem; }
.link-list { padding-left: 1.2em; margin: 0; display: grid; gap: 6px; }

/* Home extras */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.progress-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 0 0 22px; }
.progress-panel .muted { margin: 0; }
.big-num { font-size: 1.2rem; color: var(--white); margin-bottom: 6px; }
.big-num b { font-size: 2.4rem; color: var(--lime); text-shadow: 0 0 20px rgba(195, 239, 29, 0.4); margin-right: 4px; }
.channel-banner { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; margin: 56px 0; padding: 26px; border-radius: 20px; background: linear-gradient(120deg, rgba(225, 29, 42, 0.16), rgba(56, 189, 248, 0.1)); border: 1px solid rgba(255, 77, 90, 0.35); }
.channel-icon { color: #ff4d5a; filter: drop-shadow(0 0 16px rgba(255, 77, 90, 0.5)); }
.channel-text h2 { margin-bottom: 4px; }
.channel-text p { margin: 0; color: #cbd5e1; }
.sister { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 26px; border-radius: 20px; border: 1px dashed rgba(195, 239, 29, 0.45); }
.sister h2 { display: flex; gap: 8px; align-items: center; color: var(--lime); font-size: 1.2rem; }
.sister p { margin: 0; color: #cbd5e1; }
.series-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.series-list li { display: flex; gap: 14px; align-items: flex-start; }
.series-list p { margin: 2px 0 0; color: var(--muted); }
.lost { text-align: center; }
.lost .lead { margin: 0 auto 20px; }
.lost-art { width: 240px; margin: 0 auto 20px; border-radius: 50%; border: 1px solid var(--line-2); box-shadow: 0 0 60px rgba(56, 189, 248, 0.25); }
.art-missing { display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--panel-2); color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: rgba(5, 11, 31, 0.7); padding: 36px 16px 20px; margin-top: 40px; }
.footer-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 28px; align-items: start; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand img { border-radius: 50%; }
.footer-brand p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.footer-brand b { color: var(--white); }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 0.93rem; }
.footer-links a { color: var(--muted); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.footer-links a:hover { color: var(--cyan); }
.footer-sister { display: grid; gap: 4px; font-size: 0.92rem; color: var(--muted); }
.footer-sister a { color: var(--lime); font-weight: 700; }
.footer-small { max-width: var(--max); margin: 26px auto 0; font-size: 0.8rem; color: #64748b; text-align: center; }

/* Responsive */
@media (max-width: 960px) {
  .hero, .page-hero.with-art, .featured, .ep-top, .split { grid-template-columns: 1fr; }
  .hero { padding-top: 28px; }
  .page-hero-art.square { justify-self: start; max-width: 260px; }
  .ep-body { grid-template-columns: 1fr; }
  .toc { position: static; }
  .footer-inner { grid-template-columns: 1fr; }
  .channel-banner { grid-template-columns: 1fr; text-align: left; }
  .slide { grid-template-columns: 1fr; align-self: start; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .site-header { flex-wrap: wrap; gap: 6px 12px; padding-top: 8px; padding-bottom: 6px; }
  .site-header nav { order: 3; flex-basis: 100%; }
  .site-header nav a { padding: 6px 10px; font-size: 0.88rem; }
  .header-sub { margin-left: auto; }
  .callouts, .pager, .cmp { grid-template-columns: 1fr; }
  .vs { justify-self: center; }
  .step-card { grid-template-columns: 44px 1fr 30px; }
  .step-art { display: none; }
  .news-item { grid-template-columns: 1fr; gap: 4px; }
  .section { margin: 40px 0; }
  .card-grid { grid-template-columns: 1fr; }
  /* Phones swipe the slider and have the dots, so drop the arrows and keep the header on one line. */
  .slider { margin-top: 16px; }
  .slider-head { margin-bottom: 10px; }
  .slider-head .kicker { font-size: 0.75rem; }
  .slider-year { display: none; }
  .slider-btn[data-slider-prev], .slider-btn[data-slider-next] { display: none; }
  .slider-btn { width: 32px; height: 32px; }
  .slider-controls { gap: 4px; }
  .slider-controls .link-more { font-size: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
