/* ==========================================================================
   AI Builder Series — Showcase design system  ·  HelloPM
   Warm, editorial, minimal. Inspired by indie-creator layouts.
   Light-first with a warm dark theme via prefers-color-scheme.
   One shared stylesheet for every page.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700&family=Instrument+Sans:wght@400;500;600&display=swap');

:root {
  /* Warm paper light theme */
  --paper: #f1eee6;
  --panel: #f8f5ee;
  --card: #ffffff;
  --ink: #1a1714;
  --ink-soft: #6e665b;
  --ink-faint: #a89e8e;
  --line: rgba(26, 23, 20, 0.13);
  --line-soft: rgba(26, 23, 20, 0.07);
  --accent: #1a1714;
  --accent-ink: #1a1714;
  --accent-soft: rgba(26, 23, 20, 0.06);
  --btn-bg: #1a1714;
  --btn-ink: #f4f1ea;
  --shadow: 0 20px 48px -28px rgba(26, 23, 20, 0.4);
  --shadow-lift: 0 26px 60px -30px rgba(26, 23, 20, 0.5);

  --radius: 22px;
  --radius-sm: 14px;
  --radius-media: 16px;

  --display: 'Bricolage Grotesque', 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #17140f;
    --panel: #1d1913;
    --card: #221d16;
    --ink: #f3efe7;
    --ink-soft: #ada493;
    --ink-faint: #7a7264;
    --line: rgba(243, 239, 231, 0.15);
    --line-soft: rgba(243, 239, 231, 0.08);
    --accent: #f3efe7;
    --accent-ink: #f3efe7;
    --accent-soft: rgba(243, 239, 231, 0.08);
    --btn-bg: #f3efe7;
    --btn-ink: #1a1714;
    --shadow: 0 24px 56px -30px rgba(0, 0, 0, 0.7);
    --shadow-lift: 0 30px 70px -32px rgba(0, 0, 0, 0.8);
  }
}
:root[data-theme="light"] {
  --paper: #f1eee6; --panel: #f8f5ee; --card: #ffffff; --ink: #1a1714;
  --ink-soft: #6e665b; --ink-faint: #a89e8e; --line: rgba(26,23,20,0.13);
  --line-soft: rgba(26,23,20,0.07); --accent: #1a1714; --accent-ink: #1a1714; --accent-soft: rgba(26,23,20,0.06); --btn-bg: #1a1714; --btn-ink: #f4f1ea;
}
:root[data-theme="dark"] {
  --paper: #17140f; --panel: #1d1913; --card: #221d16; --ink: #f3efe7;
  --ink-soft: #ada493; --ink-faint: #7a7264; --line: rgba(243,239,231,0.15);
  --line-soft: rgba(243,239,231,0.08); --accent: #f3efe7; --accent-ink: #f3efe7; --accent-soft: rgba(243,239,231,0.08); --btn-bg: #f3efe7; --btn-ink: #1a1714;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.62;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  font-size: 17px;
}

/* Barely-there warm paper grain */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.028; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { body::after { mix-blend-mode: screen; opacity: 0.035; } }

/* ---- Layout ------------------------------------------------------------- */
.container { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 30px 32px 120px; }
.container.narrow { max-width: 760px; }

a { color: var(--ink); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--accent); }

/* ---- Top bar (sticky, blurred) ----------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 13px 32px;
  display: flex; align-items: center; gap: 18px;
}
.brand {
  display: inline-flex; align-items: center; gap: 11px; margin-right: auto;
  font-family: var(--display); font-weight: 700; font-size: 1.02rem; color: var(--ink); letter-spacing: -0.3px;
}
.brand:hover { color: var(--ink); }
.brand:hover .brand-mark { transform: rotate(90deg); }
.brand-mark {
  width: 27px; height: 27px; border-radius: 8px; background: var(--ink);
  display: grid; place-items: center; color: var(--paper); font-size: 0.86rem; flex-shrink: 0;
  transition: transform 0.4s var(--ease);
}
.brand-mark::before { content: "✳"; }
.brand-sub { color: var(--ink-faint); font-weight: 500; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  font-family: var(--display); font-size: 0.86rem; font-weight: 600; color: var(--ink-soft);
  padding: 7px 12px; border-radius: 100px; position: relative;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-link:hover { color: var(--ink); background: var(--accent-soft); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 7px; margin-left: 6px;
  font-family: var(--display); font-size: 0.86rem; font-weight: 600;
  color: var(--btn-ink); background: var(--btn-bg); border: 1px solid var(--btn-bg);
  padding: 9px 17px; border-radius: 100px;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.nav-cta:hover { color: var(--btn-ink); transform: translateY(-2px); box-shadow: var(--shadow); }
.topbar-tag {
  font-family: var(--display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--ink-soft);
  padding: 6px 13px; border: 1px solid var(--line); border-radius: 100px;
}
@media (max-width: 680px) {
  .nav { display: none; }
  .topbar-inner { padding: 11px 20px; }
}

/* ---- Breadcrumb --------------------------------------------------------- */
.breadcrumb {
  font-family: var(--display); font-size: 0.78rem; font-weight: 500; letter-spacing: 0.2px;
  color: var(--ink-faint); margin-bottom: 30px;
}
.breadcrumb a { color: var(--ink-faint); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: 0.5; margin: 0 7px; }

/* ---- Eyebrow / kicker --------------------------------------------------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--display); font-size: 0.76rem; font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 22px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); flex-shrink: 0; }

/* ---- Headings ----------------------------------------------------------- */
.gradient-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 3.6rem); letter-spacing: -1.4px; line-height: 1.02;
  margin: 0 0 18px; color: var(--ink); text-wrap: balance;
}
.page-title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 3.8vw, 2.9rem); letter-spacing: -1px; line-height: 1.06;
  margin: 0 0 12px; color: var(--ink); text-wrap: balance;
}
.subtitle { font-size: 1.12rem; color: var(--ink-soft); max-width: 60ch; margin: 0 0 22px; }

/* Numbered/editorial section head */
.section-head {
  display: flex; align-items: baseline; gap: 16px; margin: 0 0 26px;
}
.section-head .idx {
  font-family: var(--display); font-weight: 600; font-size: 0.82rem; color: var(--accent);
  letter-spacing: 0.5px; flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.section-head .label {
  font-family: var(--display); font-size: 0.82rem; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--ink); flex-shrink: 0;
}
.section-head .line { flex: 1; height: 1px; background: var(--line); align-self: center; }
.section-head .meta { font-size: 0.78rem; color: var(--ink-faint); flex-shrink: 0; letter-spacing: 0.3px; }

.section-heading {
  font-family: var(--display); font-size: 0.82rem; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--ink); margin: 0 0 22px;
  display: flex; align-items: center; gap: 14px;
}
.section-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- Hero (bold editorial) --------------------------------------------- */
.hero { position: relative; padding: 60px 0 24px; }
.hero-inner { position: relative; z-index: 1; max-width: 940px; }
.hero .eyebrow { margin-bottom: 26px; }
.hero .gradient-title {
  font-size: clamp(2.9rem, 7.2vw, 5.6rem); font-weight: 700;
  letter-spacing: -2px; line-height: 1.0; max-width: 18ch; margin: 0 0 26px;
}
.hero .accent-word {
  white-space: nowrap;
  text-decoration: underline; text-decoration-thickness: 0.06em;
  text-underline-offset: 0.1em; text-decoration-color: var(--ink);
}
.hero .subtitle { font-size: clamp(1.14rem, 1.7vw, 1.34rem); max-width: 52ch; margin: 0 0 6px; color: var(--ink-soft); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-actions .cta-button, .hero-actions .cta-ghost { padding: 14px 26px; font-size: 0.94rem; }

/* Staggered load-in for above-the-fold hero */
.hero-inner > * { animation: heroRise 0.8s var(--ease) both; }
.hero-inner > *:nth-child(1) { animation-delay: 0.02s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.10s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.20s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.30s; }
@keyframes heroRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.hero-blurb { max-width: 62ch; font-size: 1.06rem; color: var(--ink-soft); margin: 34px 0 8px; }
.hero-blurb strong { color: var(--ink); font-weight: 600; }

/* Sub-hero for leaderboards */
.lead { padding: 14px 0 12px; }
.lead .gradient-title { max-width: 22ch; }
.lead .subtitle { max-width: 56ch; }

/* ---- Marquee band ------------------------------------------------------- */
.marquee {
  margin: 48px 0; padding: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; white-space: nowrap;
}
.marquee-track {
  display: inline-flex; align-items: center; gap: 0;
  padding: 16px 0; animation: marquee 34s linear infinite; will-change: transform;
}
.marquee-track span {
  font-family: var(--display); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.2px;
  color: var(--ink); padding: 0 22px; display: inline-flex; align-items: center; gap: 22px;
}
.marquee-track span::after { content: "✳"; color: var(--accent); font-size: 0.7rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ---- Buttons ------------------------------------------------------------ */
.cta-button {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; font-family: var(--display); font-size: 0.9rem; font-weight: 600;
  color: var(--btn-ink); background: var(--btn-bg); border: 1px solid var(--btn-bg);
  border-radius: 100px; cursor: pointer; white-space: nowrap;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s ease;
}
.cta-button:hover { color: var(--btn-ink); transform: translateY(-2px); box-shadow: var(--shadow); opacity: 0.94; }
.cta-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; font-family: var(--display); font-size: 0.9rem; font-weight: 600;
  color: var(--ink); background: transparent; border: 1px solid var(--line);
  border-radius: 100px; transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.cta-ghost:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-2px); }

/* ---- Stats (editorial row) --------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 4px 0 8px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.stat { padding: 26px 24px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat-num { font-family: var(--display); font-weight: 700; font-size: 2.4rem; line-height: 1; color: var(--ink); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.78rem; color: var(--ink-faint); margin-top: 9px; letter-spacing: 0.3px; text-transform: uppercase; }

/* ---- Quest nav pills ---------------------------------------------------- */
.quest-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 42px; }
.quest-nav-link, .quest-nav-current {
  padding: 8px 15px; border-radius: 100px; font-family: var(--display); font-size: 0.8rem; font-weight: 600;
  border: 1px solid var(--line);
}
.quest-nav-link { color: var(--ink-soft); transition: border-color 0.18s, color 0.18s, background 0.18s; }
.quest-nav-link:hover { border-color: var(--accent); color: var(--accent); }
.quest-nav-current { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }

/* ---- Quest index list (editorial, numbered) ---------------------------- */
.quest-grid { display: flex; flex-direction: column; margin: 0 0 8px; border-top: 1px solid var(--line); }
.quest-card {
  display: flex; align-items: center; gap: 24px; padding: 24px 6px;
  border-bottom: 1px solid var(--line); background: transparent;
  transition: padding 0.25s var(--ease), background 0.25s var(--ease);
}
.quest-card:hover { background: var(--accent-soft); padding-left: 18px; padding-right: 18px; }
.quest-card-main { display: flex; align-items: baseline; gap: 22px; min-width: 0; flex: 1; }
.quest-card-num {
  font-family: var(--display); font-weight: 600; font-size: 0.9rem; color: var(--accent);
  flex-shrink: 0; width: 2ch; font-variant-numeric: tabular-nums; letter-spacing: 0.5px;
}
.quest-card-title { font-family: var(--display); font-weight: 600; font-size: 1.28rem; margin: 0 0 4px; color: var(--ink); letter-spacing: -0.4px; }
.quest-card-desc { font-size: 0.94rem; color: var(--ink-soft); margin: 0; max-width: 58ch; }
.quest-card .cta-ghost, .quest-card .cta-button { flex-shrink: 0; }
.quest-card-arrow { font-family: var(--display); font-size: 1.3rem; color: var(--ink-faint); flex-shrink: 0; transition: transform 0.25s var(--ease), color 0.2s ease; }
.quest-card:hover .quest-card-arrow { color: var(--accent); transform: translateX(4px); }

/* ---- Media gallery ------------------------------------------------------ */
.screenshot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px 22px; margin-bottom: 24px; }
.screenshot-card { display: flex; flex-direction: column; background: transparent; }
.screenshot-card-media {
  overflow: hidden; border-radius: var(--radius-media); border: 1px solid var(--line);
  background: var(--panel); box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.screenshot-card:hover .screenshot-card-media { transform: translateY(-5px); box-shadow: var(--shadow-lift); }
.screenshot-card-image { width: 100%; aspect-ratio: 16/10; object-fit: cover; object-position: top; display: block; transition: transform 0.6s var(--ease); }
.screenshot-card:hover .screenshot-card-image { transform: scale(1.04); }
.screenshot-card-fallback {
  width: 100%; aspect-ratio: 16/10; display: grid; place-items: center;
  color: var(--ink-faint); font-family: var(--display); font-size: 0.9rem; letter-spacing: 0.4px;
  background: repeating-linear-gradient(135deg, var(--panel), var(--panel) 12px, transparent 12px, transparent 24px);
}
.screenshot-card-body { padding: 16px 2px 4px; display: flex; flex-direction: column; flex: 1; }
.screenshot-card-name { font-family: var(--display); font-weight: 600; font-size: 1.12rem; color: var(--ink); margin: 0 0 14px; letter-spacing: -0.3px; }
.screenshot-card-name a { color: inherit; }
.screenshot-card-name a:hover { color: var(--accent); }
.screenshot-card-cohort { font-family: var(--display); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.6px; color: var(--ink-faint); margin: 0 0 14px; text-transform: uppercase; }
.screenshot-card .cta-ghost, .screenshot-card .cta-button { align-self: flex-start; margin-top: auto; }
.rank-chip {
  display: inline-flex; align-items: center; justify-content: center; margin: 0 0 12px;
  font-family: var(--display); font-weight: 600; font-size: 0.74rem; letter-spacing: 0.5px;
  color: var(--ink-soft); padding: 3px 10px; border: 1px solid var(--line); border-radius: 100px;
  align-self: flex-start;
}
.screenshot-card.is-top .rank-chip { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---- Case study --------------------------------------------------------- */
.case-hero { margin-bottom: 30px; }
.byline {
  display: inline-flex; align-items: center; gap: 11px; margin: 4px 0 0;
  padding: 6px 16px 6px 6px; border: 1px solid var(--line); border-radius: 100px; background: var(--card);
}
.byline-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-ink);
  display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 0.8rem; flex-shrink: 0;
}
.byline-name { font-family: var(--display); font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.byline-cohort { font-size: 0.78rem; color: var(--ink-faint); padding-left: 10px; border-left: 1px solid var(--line); }

.case-image { width: 100%; border-radius: var(--radius-media); border: 1px solid var(--line); display: block; margin: 0; box-shadow: var(--shadow); }
.case-figure { margin: 0 0 34px; }
.case-caption { font-family: var(--display); font-size: 0.78rem; color: var(--ink-faint); margin-top: 14px; letter-spacing: 0.2px; }

/* Assignment pull-quote */
.assignment { margin: 0 0 34px; padding: 0 0 0 26px; border-left: 3px solid var(--accent); }
.assignment-label { font-family: var(--display); font-size: 0.72rem; font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent-ink); margin: 0 0 12px; }
.assignment-text { font-family: var(--display); font-size: clamp(1.4rem, 2.6vw, 1.85rem); font-weight: 600; color: var(--ink); line-height: 1.28; margin: 0; letter-spacing: -0.6px; text-wrap: balance; }

/* Content blocks */
.case-block { margin: 0 0 34px; }
.case-block h2 {
  font-family: var(--display); font-size: 1.02rem; font-weight: 600; color: var(--ink);
  margin: 0 0 16px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; letter-spacing: -0.2px;
}
.case-block h2 .dot { color: var(--accent); font-weight: 600; }
.case-about { font-size: 1.1rem; color: var(--ink-soft); margin: 0; max-width: 64ch; }
.lesson { font-size: 1.12rem; color: var(--ink); margin: 0; max-width: 64ch; line-height: 1.5; }
.lesson strong { color: var(--ink); font-weight: 600; box-shadow: inset 0 -0.5em 0 var(--accent-soft); }

/* Assessment — written read of a single build (no scores anywhere) */
.assess-lede { font-size: 1.06rem; color: var(--ink); margin: 0 0 22px; max-width: 66ch; line-height: 1.5; }
.assess-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 34px; align-items: start; }
.assess-grid.is-single { grid-template-columns: 1fr; max-width: 68ch; }
.assess-col { min-width: 0; }
.assess-h {
  font-family: var(--display); font-size: 0.72rem; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--ink-faint); margin: 0 0 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.assess-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.assess-list li { position: relative; padding-left: 20px; font-size: 0.95rem; color: var(--ink-soft); line-height: 1.5; }
.assess-list li::before {
  content: ""; position: absolute; left: 0; top: 0.58em; width: 6px; height: 6px;
  border: 1px solid var(--ink); transform: rotate(45deg);
}
.assess-col + .assess-col .assess-list li::before { background: none; opacity: 0.42; }
.assess-list li em { color: var(--ink); font-style: normal; box-shadow: inset 0 -0.45em 0 var(--accent-soft); }
.assess-take {
  margin: 26px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line);
  font-family: var(--display); font-size: 1.02rem; font-weight: 500; color: var(--ink);
  line-height: 1.45; max-width: 66ch;
}
.assess-take em { font-style: normal; box-shadow: inset 0 -0.5em 0 var(--accent-soft); }
.assess-take-label {
  display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px;
}
.assess-note { font-size: 0.82rem; color: var(--ink-faint); margin: 18px 0 0; max-width: 62ch; line-height: 1.5; }
.bar-intro { font-size: 0.98rem; color: var(--ink-soft); margin: 0 0 18px; max-width: 64ch; }
@media (max-width: 720px) {
  .assess-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* Rubric (editorial rows) */
.rubric { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.rubric-row { display: flex; align-items: flex-start; gap: 22px; padding: 18px 4px; border-bottom: 1px solid var(--line); }
.rubric-mark { flex-shrink: 0; width: 9px; height: 9px; border: 1px solid var(--ink); transform: rotate(45deg); margin: 7px 4px 0 2px; }
.rubric-body { min-width: 0; }
.rubric-crit { font-family: var(--display); font-weight: 600; color: var(--ink); font-size: 1rem; margin: 0 0 4px; }
.rubric-desc { font-size: 0.92rem; color: var(--ink-soft); margin: 0; }
.rubric-desc em { color: var(--ink); font-style: normal; box-shadow: inset 0 -0.45em 0 var(--accent-soft); }

/* Chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.chip {
  font-family: var(--display); font-size: 0.76rem; font-weight: 600; color: var(--ink-soft);
  padding: 5px 13px; border-radius: 100px; border: 1px solid var(--line);
}
.chip.accent { color: var(--accent-ink); border-color: var(--accent); }

.case-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 4px 0 0; }
.no-link-note { font-family: var(--display); font-size: 0.86rem; color: var(--ink-faint); padding: 11px 16px; border: 1px dashed var(--line); border-radius: 100px; }

/* ---- Divider ------------------------------------------------------------ */
.rule { height: 1px; background: var(--line); margin: 44px 0; border: 0; }

/* ---- Footer ------------------------------------------------------------- */
.footer-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 46px; font-family: var(--display); font-weight: 600; font-size: 0.9rem; color: var(--ink); }
.footer-link:hover { color: var(--accent); }
.site-footer {
  margin-top: 72px; padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  font-family: var(--display); font-size: 0.82rem; color: var(--ink-faint);
}

/* ---- Scroll reveal ------------------------------------------------------ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Focus -------------------------------------------------------------- */
a:focus-visible, .cta-button:focus-visible, .cta-ghost:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---- Responsive --------------------------------------------------------- */
@media (max-width: 900px) {
  .screenshot-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .container { padding: 24px 20px 88px; }
  .screenshot-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
  .quest-card { flex-wrap: wrap; gap: 14px; }
  .quest-card .cta-ghost, .quest-card .cta-button { align-self: stretch; justify-content: center; width: 100%; }
  .quest-card-arrow { display: none; }
  .topbar-tag { display: none; }
}

/* ---- Reduced motion ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .marquee-track { animation: none; }
}
