:root {
  --bg: #090708;
  --panel: #130e0f;
  --panel-2: #1b1314;
  --line: rgba(255, 255, 255, 0.09);
  --cream: #fff3de;
  --gold: #ffb060;
  --ember: #ff9632;
  --hot: #e0420d;
  --muted: #b9ab9b;
  --radius: 14px;
  --wrap: 1120px;
  --font: "Avenir Next", Avenir, "Helvetica Neue", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--cream);
  font: 17px/1.65 var(--font); -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--cream); }
:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ember); color: #1a0b03; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: rgba(9, 7, 8, 0.85); backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--cream); text-decoration: none; font-weight: 600; font-size: 20px; letter-spacing: 0.2px; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.site-header nav { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 500; }
.site-header nav a:hover, .site-header nav a[aria-current] { color: var(--cream); background: var(--panel-2); }
.site-header nav a.btn, .site-header nav a.btn:hover { color: #1a0b03; background: var(--ember); padding: 8px 16px; }
.site-header nav a.btn:hover { background: var(--gold); }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ember); color: #1a0b03; font-weight: 600; text-decoration: none; padding: 10px 18px; border-radius: 10px; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--gold); color: #1a0b03; }
.btn.quiet { background: transparent; color: var(--cream); box-shadow: inset 0 0 0 1.5px rgba(255, 150, 50, 0.6); }
.btn.quiet:hover { background: rgba(255, 150, 50, 0.16); color: var(--cream); }

/* type */
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(34px, 6vw, 60px); }
h2 { font-size: clamp(24px, 3.4vw, 32px); margin-top: 1.6em; }
h3 { font-size: 20px; }
p { margin: 0 0 1em; }
.eyebrow { color: var(--gold); font-weight: 600; letter-spacing: 0.14em; font-size: 13px; text-transform: uppercase; margin-bottom: 10px; }
.muted { color: var(--muted); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--panel-2); padding: 0.12em 0.4em; border-radius: 6px; color: var(--gold); }

/* home hero */
.hero { position: relative; isolation: isolate; border-bottom: 1px solid var(--line); overflow: hidden; }
.hero video, .hero .hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(9,7,8,0.92) 0%, rgba(9,7,8,0.55) 45%, rgba(9,7,8,0.05) 100%), linear-gradient(0deg, rgba(9,7,8,0.9) 0%, rgba(9,7,8,0) 40%); }
.hero .wrap { position: relative; z-index: 2; padding-block: clamp(72px, 14vw, 170px) clamp(48px, 8vw, 96px); }
.hero h1 { max-width: 14ch; }
.hero .lede { font-size: clamp(18px, 2.2vw, 22px); max-width: 34em; color: #ffe9cc; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* cards */
.section { padding-block: 56px; }
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .18s ease, border-color .18s ease; }
a.card:hover { transform: translateY(-3px); border-color: rgba(255, 150, 50, 0.6); color: inherit; }
.card img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--panel-2); }
.card .body { padding: 16px 18px 20px; }
.card .num { color: var(--gold); font-weight: 600; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.card h3 { margin: 4px 0 6px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; line-height: 1.5; }
.card.soon { border-style: dashed; background: transparent; }
.card.soon .ph { aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--muted); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; background: repeating-linear-gradient(135deg, var(--panel) 0 14px, #150f10 14px 28px); }
.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 18px; }
.steps div { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.steps b { color: var(--gold); display: block; margin-bottom: 4px; }

/* episode page */
.ep-head { padding-block: 40px 28px; }
.ep-head .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { font-size: 14px; background: var(--panel-2); border: 1px solid var(--line); color: var(--cream); padding: 4px 12px; border-radius: 999px; }
.frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #000; }
.frame video, .frame img, .frame iframe { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border: 0; }
.embed { position: relative; }
.embed .soon { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; background: rgba(9,7,8,.62); padding: 24px; }
.embed .soon b { font-size: clamp(20px, 3vw, 28px); }
.prose { max-width: 720px; }
.prose ul { padding-left: 1.2em; } .prose li { margin-bottom: .4em; }
.stage { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; margin-block: 20px 8px; }
.stage .text { max-width: 60ch; }
@media (max-width: 820px) { .stage { grid-template-columns: 1fr; } }
details.code { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-block: 14px 26px; overflow: hidden; }
details.code summary { cursor: pointer; padding: 12px 16px; font-family: var(--mono); font-size: 14px; color: var(--gold); display: flex; align-items: center; gap: 10px; list-style: none; }
details.code summary::-webkit-details-marker { display: none; }
details.code summary::before { content: "▸"; transition: transform .15s; } details.code[open] summary::before { transform: rotate(90deg); }
details.code .bar { margin-left: auto; }
pre { margin: 0; overflow-x: auto; padding: 16px 18px 20px; font: 14px/1.6 var(--mono); tab-size: 4; background: #0d0909; border-top: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
pre code { background: none; padding: 0; color: #f3e4cf; font-size: inherit; }
.tok-c { color: #8f8070; font-style: italic; } .tok-k { color: #ff9632; } .tok-t { color: #ffc98a; }
.tok-n { color: #ffe08a; } .tok-f { color: #ffb060; } .tok-p { color: #e6795a; } .tok-a { color: #ffd166; font-weight: 600; font-style: normal; }
.copy { font: inherit; font-size: 13px; color: var(--cream); background: var(--panel-2); border: 1px solid var(--line); padding: 5px 12px; border-radius: 8px; cursor: pointer; }
.copy:hover { border-color: var(--ember); }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--gold); font-weight: 600; background: var(--panel); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
tr:last-child td { border-bottom: 0; }
td:nth-child(2), td:nth-child(3) { white-space: nowrap; }
.downloads { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0 26px; }
.pager { display: flex; justify-content: space-between; gap: 16px; padding-block: 40px; border-top: 1px solid var(--line); margin-top: 48px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding-block: 36px; color: var(--muted); font-size: 15px; margin-top: 48px; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.site-footer a { color: var(--muted); }
.site-footer .r { margin-left: auto; }

@media (max-width: 520px) {
  .site-header .wrap { gap: 12px; }
  .brand { font-size: 18px; white-space: nowrap; gap: 10px; }
  .brand img { width: 30px; height: 30px; }
  .site-header nav { gap: 2px; }
  .site-header nav a { padding: 6px 8px; font-size: 15px; }
  .site-header nav a.btn, .site-header nav a.btn:hover { padding: 6px 12px; }
}
@media (max-width: 380px) { .site-header nav a:not(.btn):first-child { display: none; } }

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