/* ==========================================================================
   BAD SAD — Doing Things · site stylesheet
   Mobile-first. Dark ink background, controlled purple accents, warm accents
   borrowed from the logo's fire. No frameworks, no build step.
   ========================================================================== */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/outfit-latin.woff2") format("woff2");
  font-weight: 300 800; font-display: swap;
  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: "Outfit";
  src: url("../fonts/outfit-latin-ext.woff2") format("woff2");
  font-weight: 300 800; font-display: swap;
  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;
}

:root {
  /* Surfaces */
  --bg: #0f0e16;
  --bg-2: #13121c;
  --surface: #181724;
  --surface-2: #1f1d2e;
  --line: #2b2940;
  --line-strong: #3a3756;
  /* Text */
  --text: #eeedf6;
  --text-2: #c9c6dc;
  --muted: #9b98b3;
  /* Brand */
  --accent: #8b5cf6;
  --accent-2: #a78bfa;
  --accent-3: #c4b5fd;
  --accent-glow: rgba(139, 92, 246, .35);
  --fire: #ff8a3d;
  --fire-2: #ffc163;
  --cream: #efe3cc;      /* logo lettering */
  --red-yt: #ff2d2d;
  --twitch: #9146ff;
  /* Shape & rhythm */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --gutter: 16px;
  --max: 1320px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --font: "Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  color-scheme: dark;
}
@media (min-width: 768px) { :root { --gutter: 28px; } }
@media (min-width: 1200px) { :root { --gutter: 48px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.6 var(--font); font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-3); }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
.icon { width: 1.15em; height: 1.15em; flex: none; }
.container { width: 100%; max-width: var(--max); 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; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip-link:focus { top: 12px; }

/* ---------- Prototype ribbon + demo badge ---------- */
.proto-ribbon { background: #241a3a; color: var(--accent-3); text-align: center; font-size: .8rem; padding: 6px var(--gutter); border-bottom: 1px solid #3b2a63; }
.demo-badge {
  display: inline-block; vertical-align: middle; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #1a1206; background: var(--fire-2); border-radius: 5px; padding: 1px 6px; line-height: 1.5;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .6em; padding: .8em 1.35em; border-radius: 12px;
  border: 1.5px solid var(--line-strong); background: transparent; color: var(--text);
  font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, border-color .2s, box-shadow .2s;
  line-height: 1.2;
}
.btn:hover { color: #fff; border-color: var(--accent-2); background: rgba(139,92,246,.1); }
.btn:active { transform: translateY(1px); }
.btn-primary {
  border-color: transparent; color: #fff;
  background: linear-gradient(135deg, #7c3aed, #a855f7);
  box-shadow: 0 6px 24px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { background: linear-gradient(135deg, #8b4cf6, #b56bff); border-color: transparent; box-shadow: 0 8px 30px rgba(139,92,246,.5); }
.btn-ghost { border-color: rgba(255,255,255,.75); }
.btn-sm { padding: .5em .95em; font-size: .9rem; border-radius: 10px; }
.btn-youtube .icon { color: var(--red-yt); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .icon { width: 22px; height: 22px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(15, 14, 22, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); margin-right: auto; }
.brand-logo { width: 52px; height: 52px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.6)); transition: transform .3s; }
.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.04); }
.brand-text { display: grid; line-height: 1; }
.brand-name { font-weight: 800; font-size: 1.5rem; letter-spacing: .02em; text-shadow: 0 2px 0 #4a3a28, 0 4px 12px rgba(0,0,0,.6); }
.brand-tag { white-space: nowrap; font-size: .6rem; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--text-2); margin-top: 4px; }

.header-tools { display: flex; align-items: center; gap: 4px; }
.header-social { display: none; }
.main-nav { display: none; }
.nav-toggle .icon-close { display: none; }
.nav-open .nav-toggle .icon-open { display: none; }
.nav-open .nav-toggle .icon-close { display: block; }

/* Mobile drawer.
   backdrop-filter on the header would make position:fixed relative to the
   header instead of the viewport, so it is switched off while the menu is open.
   --drawer-top is set by site.js to the header's real bottom edge. */
.nav-open .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
.nav-open .main-nav {
  display: block; position: fixed; left: 0; right: 0; bottom: 0; top: var(--drawer-top, 68px);
  background: var(--bg-2); padding: 12px var(--gutter) 32px; overflow-y: auto; border-top: 1px solid var(--line);
}
.main-nav > ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.main-nav > ul a {
  display: flex; align-items: center; gap: 12px; padding: 14px 14px; border-radius: 12px;
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 1.1rem; border: 1.5px solid transparent;
}
.main-nav > ul a:hover { background: var(--surface); }
.main-nav > ul a.is-active { background: rgba(139,92,246,.16); border-color: rgba(167,139,250,.6); color: #fff; }
.main-nav > ul a .icon { width: 22px; height: 22px; color: var(--text-2); }
.main-nav > ul a.is-active .icon { color: var(--accent-3); }
.nav-social { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }

@media (min-width: 1100px) {
  .header-inner { min-height: 84px; gap: 20px; }
  .brand-logo { width: 72px; height: 72px; margin-block: -6px; }
  .brand-name { font-size: 1.85rem; }
  .brand-tag { font-size: .66rem; }
  .brand { margin-right: 0; }
  .nav-toggle { display: none; }
  .main-nav, .nav-open .main-nav { display: block; position: static; background: none; padding: 0; border: 0; overflow: visible; margin-inline: auto; }
  .main-nav > ul { display: flex; gap: 2px; }
  .main-nav > ul a { padding: 9px 13px; font-size: .97rem; gap: 8px; }
  .main-nav > ul a .icon { width: 19px; height: 19px; }
  .nav-social { display: none; }
  .header-social { display: block; padding-left: 14px; margin-left: 6px; border-left: 1px solid var(--line); }
}
@media (min-width: 1300px) { .main-nav > ul a { padding: 9px 16px; } }

/* Search drawer */
.site-search { border-top: 1px solid var(--line); background: var(--bg-2); padding: 14px 0; }
.site-search .container { display: flex; align-items: center; gap: 10px; }
.site-search input {
  flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font: inherit;
}
.site-search input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-glow); }

/* Social icons */
.social { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; align-items: center; }
.social-link {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--text);
  transition: background .2s, transform .2s;
}
.social-link .icon { width: 24px; height: 24px; }
a.social-link:hover { background: var(--surface-2); transform: translateY(-1px); color: #fff; }
.social-youtube .icon { color: var(--red-yt); }
.social-twitch .icon { color: var(--twitch); }
.social-link.is-unset { opacity: .45; cursor: help; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.04); }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-pos, 70% 40%); }
.hero::before { /* readable text side */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(15,14,22,.55) 0%, rgba(15,14,22,.75) 55%, var(--bg) 100%);
}
.hero-inner { padding-block: 56px 64px; max-width: 780px; }
.hero .lead { max-width: 34em; }
.eyebrow { display: flex; flex-wrap: wrap; gap: .5em 1em; list-style: none; padding: 0; margin: 0 0 18px; font-size: .74rem; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--text-2); }
.eyebrow li + li::before { content: "•"; margin-right: 1em; color: var(--accent-2); }
@media (max-width: 520px) { .eyebrow { letter-spacing: .16em; gap: .4em .7em; font-size: .7rem; } .eyebrow li + li::before { margin-right: .7em; } .section-title { font-size: 1.35rem; } }
.hero h1 { font-size: clamp(2.2rem, 6.4vw, 3.6rem); font-weight: 700; letter-spacing: -.02em; margin-bottom: .35em; text-shadow: 0 2px 20px rgba(0,0,0,.5); }
.grad { background: linear-gradient(100deg, #a78bfa 0%, #c084fc 45%, #8b5cf6 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: 1.08rem; color: var(--text-2); max-width: 34em; margin-bottom: 1.6em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .hero { min-height: 420px; display: flex; align-items: center; }
  /* "Fit the image": height follows the image shape (art is 70% of the width), within limits */
  .hero.hero-fit { min-height: clamp(420px, calc(70vw / var(--hero-ratio, 3.2)), 640px); }
  .hero::before {
    background:
      linear-gradient(90deg, var(--bg) 0%, rgba(15,14,22,.92) 28%, rgba(15,14,22,.35) 55%, rgba(15,14,22,0) 75%),
      linear-gradient(0deg, var(--bg) 0%, rgba(15,14,22,0) 30%);
  }
  .hero-art { left: 30%; }
  .hero-art img { object-position: var(--hero-pos, 50% 45%); }
  .hero-inner { padding-block: 72px 80px; }
}

/* ---------- Sections ---------- */
.section { padding-block: 44px; }
.section-tight { padding-block: 28px 44px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-title { display: flex; align-items: center; gap: 12px; font-size: 1.55rem; font-weight: 600; margin: 0; }
.section-title::before { content: ""; width: 5px; height: 1.1em; border-radius: 3px; background: linear-gradient(var(--accent-2), var(--accent)); }
.more-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--accent-2); white-space: nowrap; }
.more-link .icon { transition: transform .2s; }
.more-link:hover .icon { transform: translateX(3px); }
.page-head { padding-block: 40px 8px; }
.page-head h1 { font-size: clamp(2rem, 5vw, 2.8rem); font-weight: 700; }
.page-head p { color: var(--text-2); max-width: 46em; }

/* ---------- Project cards ---------- */
.card-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }

.project-card {
  position: relative; display: block; border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  transition: transform .25s, border-color .25s, box-shadow .25s;
}
.project-card:hover { transform: translateY(-3px); border-color: var(--accent-2); box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(167,139,250,.25); color: var(--text); }
.card-art { position: relative; aspect-ratio: 760 / 274; background: var(--surface-2); overflow: hidden; }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.project-card:hover .card-art img { transform: scale(1.04); }
.card-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,9,16,.45) 0%, transparent 35%); pointer-events: none; }
/* Art-less projects: typographic card */
.card-art.generated { display: grid; place-items: center; }
.card-art.generated .gen-title { position: relative; z-index: 1; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; letter-spacing: .01em; text-shadow: 0 2px 16px rgba(0,0,0,.5); padding-inline: 16px; text-align: center; margin-top: -18px; }
.card-art.generated .gen-icon { position: absolute; right: -10px; top: -14px; width: 120px; height: 120px; opacity: .14; }
.accent-violet { background: radial-gradient(120% 140% at 0% 0%, #4c2a8a 0%, #241640 45%, #14111f 100%); }
.accent-amber  { background: radial-gradient(120% 140% at 0% 0%, #7a4a12 0%, #3a2312 45%, #15110f 100%); }
.accent-teal   { background: radial-gradient(120% 140% at 0% 0%, #0f5d63 0%, #10303a 45%, #0f1418 100%); }
.accent-rose   { background: radial-gradient(120% 140% at 0% 0%, #7a2152 0%, #33162d 45%, #15101a 100%); }
/* Tag strip sits BELOW the art so it never covers titles painted into it */
.card-tags {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px;
  padding: 10px 10px; font-size: .82rem; font-weight: 500; color: var(--text);
  background: linear-gradient(180deg, #13121c, #181724); border-top: 1px solid rgba(255,255,255,.05);
}
.card-tags span { display: inline-flex; align-items: center; gap: 6px; }
.card-tags .icon { width: 16px; height: 16px; color: var(--text-2); }
.card-flags { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; gap: 6px; }
.card-body { padding: 14px 16px 16px; }
.card-body h3 { font-size: 1.12rem; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.card-body p { margin: 0; color: var(--muted); font-size: .92rem; }
.card-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--line); }
.chip-type { color: var(--accent-3); border-color: rgba(167,139,250,.35); background: rgba(139,92,246,.1); }

/* ---------- Panels (home bottom row) ---------- */
.panel-grid { display: grid; gap: 16px; }
@media (min-width: 1000px) { .panel-grid { grid-template-columns: 1.08fr 1fr .95fr; align-items: stretch; } }
.panel { background: linear-gradient(180deg, var(--surface) 0%, var(--bg-2) 100%); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; min-width: 0; }
.panel-title { display: flex; align-items: center; gap: 12px; font-size: 1.35rem; font-weight: 600; margin: 0 0 16px; }
.panel-title .icon { width: 26px; height: 26px; color: var(--accent-2); }
.panel-body { display: flex; gap: 16px; flex-direction: column; flex: 1; }
/* Media + text side by side only when the PANEL itself is wide enough */
.panel { container-type: inline-size; }
@container (min-width: 470px) {
  .panel-body.split { flex-direction: row; align-items: flex-start; }
  .panel-body.split > .media { flex: 0 0 54%; }
}
.media { position: relative; border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16 / 9; border: 1px solid rgba(255,255,255,.08); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media-info h3 { font-size: 1.15rem; margin-bottom: 8px; }
.media-info .muted { font-size: .92rem; }

/* Click-to-load YouTube player */
.yt-lite { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; }
.yt-lite img { width: 100%; height: 100%; object-fit: cover; transition: filter .2s; }
.yt-lite:hover img { filter: brightness(1.1); }
.play-badge { position: absolute; inset: 0; display: grid; place-items: center; }
.play-badge span { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: rgba(15,14,22,.72); border: 2px solid rgba(255,255,255,.85); backdrop-filter: blur(4px); transition: transform .2s, background .2s; }
.play-badge .icon { width: 24px; height: 24px; margin-left: 4px; fill: #fff; stroke: #fff; }
.yt-lite:hover .play-badge span { transform: scale(1.08); background: rgba(139,92,246,.85); }
.yt-lite iframe, .media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media-note { position: absolute; left: 10px; bottom: 10px; font-size: .74rem; background: rgba(0,0,0,.7); padding: 3px 8px; border-radius: 6px; color: var(--text-2); }

/* Stream schedule */
.schedule { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.schedule li { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.schedule .when { grid-row: span 2; display: grid; place-items: center; text-align: center; min-width: 58px; padding: 6px 8px; border-radius: 10px; background: rgba(145,70,255,.14); color: #d5c2ff; font-weight: 700; font-size: .78rem; line-height: 1.2; text-transform: uppercase; letter-spacing: .04em; }
.schedule .when b { font-size: 1.05rem; letter-spacing: 0; }
.schedule .what { font-weight: 600; }
.schedule .tz { font-size: .8rem; color: var(--muted); }
.btn-twitch { background: var(--twitch); border-color: transparent; color: #fff; box-shadow: 0 6px 20px rgba(145,70,255,.35); }
.btn-twitch:hover { background: #a366ff; border-color: transparent; }

/* Post lists */
.post-list { list-style: none; margin: 0; padding: 0; display: grid; }
.post-list li + li { border-top: 1px solid var(--line); }
.post-row { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; padding: 10px 0; text-decoration: none; color: var(--text); }
.post-row:hover h3 { color: var(--accent-3); }
.post-thumb { aspect-ratio: 2 / 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); border: 1px solid rgba(255,255,255,.07); display: grid; place-items: center; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-thumb .icon { width: 28px; height: 28px; color: var(--muted); }
.post-row h3 { font-size: 1rem; font-weight: 500; margin: 0 0 4px; line-height: 1.3; transition: color .2s; }
.post-row time { font-size: .84rem; color: var(--muted); }

/* ---------- Projects page ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin: 20px 0 24px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
.tabs a { padding: 8px 14px; border-radius: 9px; text-decoration: none; color: var(--text-2); font-weight: 600; font-size: .92rem; white-space: nowrap; }
.tabs a:hover { color: #fff; background: var(--surface-2); }
.tabs a[aria-current="page"] { background: var(--accent); color: #fff; }
.filter-form { display: flex; gap: 8px; flex: 1 1 260px; max-width: 420px; }
.filter-form input { flex: 1; min-width: 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: inherit; }
.filter-form input:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-glow); }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.active-filter { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: .9rem; color: var(--text-2); }

/* ---------- Project detail ---------- */
.detail-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface); margin-top: 24px; }
.detail-hero .card-art { aspect-ratio: 760 / 274; max-height: 420px; width: 100%; }
.detail-hero .card-art.generated { aspect-ratio: auto; height: clamp(160px, 22vw, 240px); }
.detail-hero .card-art::after { background: linear-gradient(0deg, rgba(10,9,16,.6), transparent 50%); }
.detail-grid { display: grid; gap: 28px; margin-top: 28px; }
@media (min-width: 960px) { .detail-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.facts { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 14px; align-content: start; }
.facts dl { margin: 0; display: grid; gap: 12px; }
.facts dt { font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin-bottom: 3px; }
.facts dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.status-dot { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.status-dot::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--fire); box-shadow: 0 0 10px var(--fire); }
.link-list { display: grid; gap: 8px; }
.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: .9rem; margin-top: 28px; }
.breadcrumb a { text-decoration: none; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.breadcrumb a:hover { color: var(--text); }
.note { padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--line-strong); color: var(--muted); font-size: .92rem; }

/* ---------- Article ---------- */
.prose { max-width: 70ch; font-size: 1.07rem; line-height: 1.75; color: var(--text-2); }
.prose h2 { font-size: 1.6rem; color: var(--text); margin: 1.8em 0 .6em; }
.prose h3 { font-size: 1.25rem; color: var(--text); margin: 1.6em 0 .5em; }
.prose a { color: var(--accent-2); }
.prose code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px; color: #e9ddff; }
.prose pre { background: #0b0a11; border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; overflow-x: auto; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; font-size: .9rem; color: #dcd7f0; }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); color: var(--text); font-size: 1.15rem; }
.prose blockquote cite { display: block; font-size: .9rem; color: var(--muted); font-style: normal; margin-top: 4px; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.prose th { color: var(--text); font-weight: 600; background: var(--surface); }
.prose img { border-radius: 12px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.article-head { max-width: 70ch; padding-top: 28px; }
/* Blog post: centred reading column */
.article { max-width: 74ch; margin-inline: auto; }
.article .article-head, .article .prose, .article .article-cover { max-width: none; }
.article-wrap .breadcrumb { max-width: 74ch; margin-inline: auto; }
.article-head h1 { font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 700; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--muted); font-size: .92rem; margin-bottom: 24px; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-cover { max-width: 70ch; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); margin-bottom: 28px; aspect-ratio: 2 / 1; background: var(--surface-2); }
.article-cover img { width: 100%; height: 100%; object-fit: cover; image-rendering: auto; }

/* Blog index cards */
.post-card { display: flex; flex-direction: column; text-decoration: none; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.post-card:hover { transform: translateY(-3px); border-color: var(--accent-2); color: var(--text); }
.post-card .post-thumb { border-radius: 0; border: 0; aspect-ratio: 2 / 1; }
.post-card .body { padding: 16px; display: grid; gap: 8px; }
.post-card h2 { font-size: 1.2rem; margin: 0; }
.post-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.post-card .meta { display: flex; gap: 10px; align-items: center; font-size: .84rem; color: var(--muted); }

.pagination { display: flex; justify-content: center; gap: 6px; margin-top: 32px; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--text-2); padding: 0 10px; }
.pagination [aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Video gallery */
.video-card { display: grid; gap: 10px; }
.video-card h2 { font-size: 1.05rem; margin: 0; }

/* About */
.about-grid { display: grid; gap: 32px; align-items: start; margin-top: 12px; }
@media (min-width: 900px) { .about-grid { grid-template-columns: 300px minmax(0, 1fr); } }
.about-logo { width: min(300px, 70vw); filter: drop-shadow(0 12px 30px rgba(0,0,0,.6)); margin-inline: auto; }
.social-big { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.social-big a, .social-big span { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); font-weight: 600; }
.social-big a:hover { border-color: var(--accent-2); }
.social-big .icon { width: 24px; height: 24px; }
.social-big .is-unset { opacity: .5; }

/* 404 */
.lost { text-align: center; padding-block: 72px 96px; }
.lost img { width: 180px; margin: 0 auto 24px; filter: grayscale(.4) drop-shadow(0 10px 30px rgba(0,0,0,.6)); transform: rotate(-8deg); }
.lost h1 { font-size: clamp(2rem, 6vw, 3rem); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 56px; border-top: 1px solid var(--line); background: var(--bg-2); }
.footer-grid { display: grid; gap: 24px; padding-block: 36px 24px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.2fr 1fr auto; align-items: center; } }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand p { margin: 0; }
.footer-name { font-weight: 800; letter-spacing: .03em; color: var(--cream); font-size: 1.15rem; }
.footer-name span { font-weight: 500; letter-spacing: .2em; font-size: .7rem; text-transform: uppercase; color: var(--text-2); margin-left: 6px; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links a { color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-block: 16px 28px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.footer-bottom p { margin: 0; }

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

/* ---------- Phase C additions ---------- */
.lead-text { font-size: 1.12rem; color: var(--text-2); max-width: 60ch; }
.gallery { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.gallery a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.gallery img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.03); }
.gallery .caption { display: block; font-size: .86rem; color: var(--muted); margin-top: 6px; }
.prose .table-wrap { overflow-x: auto; margin: 1.4em 0; }
.prose .table-wrap table { display: table; margin: 0; }
.prose .media.embed { margin: 1.6em 0; }
.yt-poster { position: absolute; inset: 0; display: grid; place-items: end start; padding: 12px 14px; color: var(--text-2); font-size: .9rem;
  background: radial-gradient(120% 120% at 30% 20%, #3a1d1d 0%, #1a1020 60%, #0d0c12 100%); }
.cat-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.cat-filter a { text-decoration: none; }
.cat-filter a[aria-current="page"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.footer-links .icon { width: 18px; height: 18px; }

/* Strip shown on public pages to a signed-in admin */
.admin-strip { background: #1d1530; color: var(--accent-3); font-size: .84rem; padding: 6px var(--gutter); text-align: center; }
.admin-strip a { color: #fff; }

/* Custom pages / dense menu (more than 7 menu items) */
.breadcrumb span { display: inline-flex; align-items: center; }
@media (min-width: 1100px) {
  .main-nav.is-dense > ul a { padding: 9px 9px; font-size: .92rem; gap: 6px; }
  .main-nav.is-dense > ul a .icon { width: 17px; height: 17px; }
}
@media (min-width: 1100px) and (max-width: 1360px) { .main-nav.is-dense > ul a .icon { display: none; } }

/* ---------- Header logo styles (Admin → Settings → Header logo) ---------- */
.brand-logo-wrap { position: relative; display: inline-block; flex: none; line-height: 0; }
/* Large: badge like the mockup, overlapping the header edge on desktop */
/* Size and overlap live on the wrapper; the image(s) fill it, so the hover halves line up exactly */
.logo-large .brand-logo-wrap, .logo-hover .brand-logo-wrap { width: 60px; height: 60px; }
.logo-large .brand-logo, .logo-hover .brand-logo { width: 100%; height: 100%; }
.brand-name { white-space: nowrap; }
@media (min-width: 1100px) {
  .logo-large .brand-logo-wrap, .logo-hover .brand-logo-wrap { width: 112px; height: 112px; margin-block: -10px -34px; position: relative; z-index: 2; }
  .logo-large .brand-name, .logo-hover .brand-name { font-size: 2rem; }
}
/* Hover: the angry half flares up, the sad half sinks and loses its colour */
.brand-logo-sad { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); pointer-events: none; transition: filter .35s, transform .35s; }
.logo-hover .brand:hover .brand-logo:not(.brand-logo-sad) { transform: none; filter: brightness(1.15) saturate(1.6) drop-shadow(0 0 14px rgba(255, 120, 40, .8)); }
.logo-hover .brand:hover .brand-logo-sad { transform: translateY(4px) rotate(3deg); filter: grayscale(1) brightness(.7) drop-shadow(0 4px 10px rgba(0,0,0,.6)); }
.logo-hover .brand .brand-logo { transition: filter .35s, transform .35s; }
@media (prefers-reduced-motion: reduce) { .logo-hover .brand:hover .brand-logo-sad { transform: none; } }

/* ---------- Live status (verified via the YouTube API only) ---------- */
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: #e5203a; border-radius: 6px; padding: 3px 8px; vertical-align: middle; animation: live-pulse 2s ease-in-out infinite; }
.live-dot { width: 12px; height: 12px; border-radius: 50%; background: #ff3550; box-shadow: 0 0 0 0 rgba(255,53,80,.7); animation: live-ring 1.6s infinite; flex: none; }
.live-panel { border-color: #7a2a35; background: linear-gradient(180deg, #2a1218, var(--bg-2)); margin-top: 24px; }
@keyframes live-pulse { 50% { opacity: .75; } }
@keyframes live-ring { 70% { box-shadow: 0 0 0 10px rgba(255,53,80,0); } 100% { box-shadow: 0 0 0 0 rgba(255,53,80,0); } }
@media (prefers-reduced-motion: reduce) { .live-badge, .live-dot { animation: none; } }
.link-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.schedule a.what { color: var(--text); text-decoration: none; }
.schedule a.what:hover { color: var(--accent-3); }
.live-media { display: grid; place-items: center; gap: 8px; background: radial-gradient(circle at 50% 40%, #3a1218, #120c14 70%); text-decoration: none; color: #fff; }
.live-media img { width: 96px; height: 96px; filter: drop-shadow(0 0 18px rgba(229,32,58,.6)); }
.on-air { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .9rem; }

/* ---- /now page ---- */
.now-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--accent-3); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; }
.now-kicker .icon { width: 16px; height: 16px; }
.now-updated { color: var(--text-2); margin: 6px 0 0; }
.now-updated strong { color: var(--accent-3); font-weight: 600; }
.now-stale { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin: 18px 0; border-radius: var(--radius-sm); background: var(--surface); border: 1px solid var(--line-strong); color: var(--text-2); }
.now-stale .icon { flex: none; margin-top: 3px; color: var(--fire-2); }
.now-lately { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.now-lately a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none; height: 100%; transition: border-color .15s, transform .15s; }
.now-lately a:hover, .now-lately a:focus-visible { border-color: var(--accent); transform: translateY(-1px); }
.now-lately .is-live a { border-color: #ff3550; }
.now-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); color: var(--accent-2); }
.now-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.now-label { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.now-label .live-dot { width: 9px; height: 9px; }
.now-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.now-when { flex: none; white-space: nowrap; }
.now-credit { margin-top: 18px; }
@media (max-width: 520px) { .now-when { display: none; } }
.now-wrap .article-head { margin-bottom: 22px; }
.now-txt .demo-badge { justify-self: start; }
