/* ─────────────────────────────────────────────────────────────
   arungdev — design system
   Shared by the home page and every product page.
   Per-product colour arrives as --accent, set inline per page.
   ───────────────────────────────────────────────────────────── */

:root {
  /* Neutrals carry a slight violet bias so they sit with the accent
     rather than reading as generic grey. */
  --ground:      #FCFCFE;
  --ground-2:    #F4F3F9;
  --surface:     #FFFFFF;
  --ink:         #100F1E;
  --ink-2:       #3A3752;
  --muted:       #6E6A88;
  --line:        #E7E5F0;
  --line-strong: #D6D3E4;

  --accent:      #5B54F0;
  --accent-2:    #8B7CFF;
  --accent-ink:  #FFFFFF;
  --accent-wash: #F0EEFE;

  --navy:        #17143A;
  --navy-2:      #241F5C;
  --navy-deep:   #0A0820;
  --on-navy:     #F4F2FF;
  --on-navy-dim: #B9B3DE;
  --on-navy-acc: #A79CFF;

  --ok:          #0E8A6B;
  --ok-wash:     #E6F5F0;

  --r-xs: 6px;
  --r-sm: 10px;
  --r:    14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --shadow-xs: 0 1px 2px rgba(16,15,30,.05);
  --shadow-sm: 0 1px 2px rgba(16,15,30,.04), 0 4px 12px -4px rgba(16,15,30,.10);
  --shadow:    0 1px 2px rgba(16,15,30,.04), 0 12px 28px -10px rgba(16,15,30,.16);
  --shadow-lg: 0 1px 2px rgba(16,15,30,.04), 0 28px 60px -20px rgba(16,15,30,.26);
  --glow:      0 12px 32px -10px color-mix(in srgb, var(--accent) 55%, transparent);

  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --body:    "Instrument Sans", ui-sans-serif, system-ui, "Segoe UI", Roboto, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --measure: 60ch;
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --wrap: 1200px;
  --wrap-narrow: 900px;
  /* Screenshots carry the detail, so the tour gets a wider column than prose. */
  --wrap-wide: 1720px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:      #08070F;
    --ground-2:    #0E0D1B;
    --surface:     #131226;
    --ink:         #F1EFFA;
    --ink-2:       #C9C5DD;
    --muted:       #918DAE;
    --line:        #241F3E;
    --line-strong: #322C52;

    --accent:      #8B84F7;
    --accent-2:    #A99CFF;
    --accent-ink:  #0B0918;
    --accent-wash: #1A1637;

    --navy:        #0F0D26;
    --navy-2:      #191441;
    --navy-deep:   #06050F;

    --ok:          #35BC94;
    --ok-wash:     #10241F;

    --shadow-xs: 0 1px 2px rgba(0,0,0,.5);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.5), 0 6px 16px -6px rgba(0,0,0,.6);
    --shadow:    0 1px 2px rgba(0,0,0,.5), 0 16px 36px -14px rgba(0,0,0,.75);
    --shadow-lg: 0 1px 2px rgba(0,0,0,.5), 0 34px 70px -24px rgba(0,0,0,.85);
  }
}

/* Manual theme choice. These mirror the palettes above so the toggle can
   override the system preference in either direction. */
:root[data-theme="dark"] {
  --ground:      #08070F;
  --ground-2:    #0E0D1B;
  --surface:     #131226;
  --ink:         #F1EFFA;
  --ink-2:       #C9C5DD;
  --muted:       #918DAE;
  --line:        #241F3E;
  --line-strong: #322C52;

  --accent:      #8B84F7;
  --accent-2:    #A99CFF;
  --accent-ink:  #0B0918;
  --accent-wash: #1A1637;

  --navy:        #0F0D26;
  --navy-2:      #191441;
  --navy-deep:   #06050F;

  --ok:          #35BC94;
  --ok-wash:     #10241F;

  --shadow-xs: 0 1px 2px rgba(0,0,0,.5);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.5), 0 6px 16px -6px rgba(0,0,0,.6);
  --shadow:    0 1px 2px rgba(0,0,0,.5), 0 16px 36px -14px rgba(0,0,0,.75);
  --shadow-lg: 0 1px 2px rgba(0,0,0,.5), 0 34px 70px -24px rgba(0,0,0,.85);
}

:root[data-theme="light"] {
  --ground: #FCFCFE;
  --ground-2: #F4F3F9;
  --surface: #FFFFFF;
  --ink: #100F1E;
  --ink-2: #3A3752;
  --muted: #6E6A88;
  --line: #E7E5F0;
  --line-strong: #D6D3E4;
  --accent: #5B54F0;
  --accent-2: #8B7CFF;
  --accent-ink: #FFFFFF;
  --accent-wash: #F0EEFE;
  --navy: #17143A;
  --navy-2: #241F5C;
  --navy-deep: #0A0820;
  --ok: #0E8A6B;
  --ok-wash: #E6F5F0;
  --shadow-xs: 0 1px 2px rgba(16,15,30,.05);
  --shadow-sm: 0 1px 2px rgba(16,15,30,.04), 0 4px 12px -4px rgba(16,15,30,.10);
  --shadow: 0 1px 2px rgba(16,15,30,.04), 0 12px 28px -10px rgba(16,15,30,.16);
  --shadow-lg: 0 1px 2px rgba(16,15,30,.04), 0 28px 60px -20px rgba(16,15,30,.26);
}


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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.62;
  letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* height:auto is load-bearing — the width/height attributes on the screenshots
   otherwise pin the used height and stretch them vertically. */
img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-underline-offset: .18em; }

::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }

.wrap        { max-width: var(--wrap);        margin-inline: auto; padding-inline: var(--pad); }
.wrap-narrow { max-width: var(--wrap-narrow); margin-inline: auto; padding-inline: var(--pad); }
/* Wide column for screenshots; text inside stays at a readable measure. */
.wrap-wide   { max-width: var(--wrap-wide);   margin-inline: auto; padding-inline: clamp(1.25rem, 2.5vw, 2.5rem); }

/* ── Type ─────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.06;
  text-wrap: balance;
  margin: 0;
}

.display-1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); font-weight: 800; letter-spacing: -.042em; }
.display-2 { font-size: clamp(1.75rem, 3.8vw, 2.85rem); letter-spacing: -.034em; }

.grad {
  background: linear-gradient(100deg, var(--accent-2) 8%, #6EE7F0 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  color: var(--muted);
  max-width: var(--measure);
  margin: 0;
  font-size: 1.05rem;
  text-wrap: pretty;
}

.eyebrow {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .85rem;
}

/* Pill eyebrow used in heroes. */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: .42rem .85rem .42rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(167,156,255,.28);
  background: rgba(167,156,255,.08);
  color: var(--on-navy-acc);
  backdrop-filter: blur(6px);
}
.pill .spark {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(167,156,255,.22);
}

/* ── Header ───────────────────────────────────────────────── */
.site-head {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.site-head.stuck { border-bottom-color: var(--line); }
.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--mono);
  font-size: .84rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--ink);
  text-decoration: none;
}
.brand .dot {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(140deg, var(--accent) 0%, var(--accent-2) 100%);
  box-shadow: var(--glow);
  flex: none;
}
.site-nav { display: flex; align-items: center; gap: .35rem; }
.site-nav a {
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: .5rem .75rem;
  border-radius: var(--r-xs);
  transition: color .18s var(--ease), background .18s var(--ease);
}
.site-nav a:hover { color: var(--ink); background: var(--ground-2); }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  font-family: var(--body);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: -.01em;
  text-decoration: none;
  padding: .82rem 1.35rem;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease),
              background .18s var(--ease), border-color .18s var(--ease);
}
.btn svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .sub {
  display: block;
  font-family: var(--mono);
  font-weight: 400;
  font-size: .72rem;
  letter-spacing: .06em;
  opacity: .68;
  margin-top: .12rem;
}
.btn-lg { padding: 1.02rem 1.7rem; font-size: 1.02rem; border-radius: var(--r); }

.btn-primary {
  background: linear-gradient(180deg, var(--accent-2) -20%, var(--accent) 100%);
  color: var(--accent-ink);
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn-primary:hover { box-shadow: var(--glow), inset 0 1px 0 rgba(255,255,255,.28); }

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.btn-light { background: var(--on-navy); color: #17143A; box-shadow: 0 10px 30px -12px rgba(0,0,0,.7); }
.btn-light:hover { box-shadow: 0 16px 40px -14px rgba(0,0,0,.8); }

.btn-outline-light {
  background: rgba(255,255,255,.04);
  color: var(--on-navy);
  border-color: rgba(167,156,255,.34);
  backdrop-filter: blur(6px);
}
.btn-outline-light:hover { background: rgba(255,255,255,.1); border-color: rgba(167,156,255,.6); }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
  position: relative;
  isolation: isolate;
  background:
    radial-gradient(90% 70% at 78% -8%, rgba(110,231,240,.16) 0%, transparent 60%),
    radial-gradient(80% 80% at 8% 0%, rgba(139,124,255,.28) 0%, transparent 58%),
    linear-gradient(168deg, var(--navy-2) 0%, var(--navy) 46%, var(--navy-deep) 100%);
  color: var(--on-navy);
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
/* Faint engineering grid — depth without decoration. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(80% 60% at 50% 0%, #000 0%, transparent 78%);
}
.hero h1 { margin: 1.4rem 0 1.15rem; max-width: 17ch; }
.hero .lede { color: var(--on-navy-dim); font-size: clamp(1.03rem, 1.7vw, 1.22rem); margin-bottom: 2.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 1080px) {
  .hero-split { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
  /* Beside the product shot the headline has half the width, so it steps down
     a size — the full display-1 scale would run to six lines. */
  .hero-split .hero-copy h1 { max-width: none; font-size: clamp(2.2rem, 3.3vw, 3.4rem); }
}

/* Browser frame around the hero product shot. */
.frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #100E28;
  border: 1px solid rgba(167,156,255,.24);
  box-shadow:
    0 30px 90px -25px rgba(0,0,0,.85),
    0 0 70px -20px color-mix(in srgb, var(--accent) 45%, transparent),
    inset 0 1px 0 rgba(255,255,255,.15);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.frame:hover {
  transform: translateY(-4px);
  box-shadow:
    0 40px 110px -25px rgba(0,0,0,.9),
    0 0 90px -15px color-mix(in srgb, var(--accent) 55%, transparent),
    inset 0 1px 0 rgba(255,255,255,.2);
}
.frame-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem 1rem;
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(167,156,255,.14);
}
.frame-dots {
  display: flex;
  align-items: center;
  gap: .45rem;
}
.frame-dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: block;
}
.frame-dots i:nth-child(1) { background: #FF5F56; }
.frame-dots i:nth-child(2) { background: #FFBD2E; }
.frame-dots i:nth-child(3) { background: #27C93F; }

.frame-url-wrap {
  display: flex;
  align-items: center;
  gap: .45rem;
  background: rgba(0,0,0,.32);
  padding: .25rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
}
.frame-url {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  color: rgba(185,179,222,.9);
}
.frame-status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--mono);
  font-size: .68rem;
  color: #35BC94;
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ── Sections ─────────────────────────────────────────────── */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); scroll-margin-top: 5rem; }
.section-alt { background: var(--ground-2); border-block: 1px solid var(--line); }
.section-head { margin-bottom: clamp(2.25rem, 4vw, 3.25rem); }
.section-head .display-2 { margin-bottom: .9rem; }

/* ── Bento grids ──────────────────────────────────────────── */
.bento {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1.1rem;
}
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.7rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,.6);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
:root[data-theme="dark"] .tile {
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,.06);
}
.tile:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow-sm), 0 0 20px -8px color-mix(in srgb, var(--accent) 25%, transparent);
}
.tile h3 { font-size: 1.1rem; letter-spacing: -.02em; }
.tile p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.58; }
.tile .idx {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: .3rem;
}

/* ── Product cards ────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 1.4rem;
}
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.product-card .thumb {
  display: block;
  background: var(--navy);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.product-card .thumb img { transition: transform .5s var(--ease); }
.product-card:hover .thumb img { transform: scale(1.025); }
.product-card .body { padding: 1.6rem; display: flex; flex-direction: column; gap: .9rem; flex: 1; }
.product-card h3 { font-size: 1.4rem; }
.product-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.product-card .card-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; padding-top: .6rem; }

.product-card-soon {
  border-style: dashed;
  box-shadow: none;
  background: transparent;
  min-height: 260px;
}
.product-card-soon:hover { transform: none; box-shadow: none; }
.product-card-soon .body { justify-content: center; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .3rem .6rem;
  border-radius: 999px;
  background: var(--ok-wash);
  color: var(--ok);
  border: 1px solid color-mix(in srgb, var(--ok) 26%, transparent);
}
.badge-neutral { background: var(--ground-2); color: var(--muted); border-color: var(--line); }
.meta-row { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }

/* ── Download ─────────────────────────────────────────────── */
.dl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.4rem; }
.dl-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
:root[data-theme="dark"] .dl-card {
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.06);
}
.dl-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow), 0 0 30px -10px color-mix(in srgb, var(--accent) 25%, transparent);
}
.dl-card.dl-featured {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: linear-gradient(175deg, var(--surface) 0%, color-mix(in srgb, var(--accent-wash) 30%, var(--surface)) 100%);
}
.dl-featured-badge {
  position: absolute;
  top: -11px;
  right: 1.5rem;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  color: var(--accent-ink);
  padding: .25rem .75rem;
  border-radius: 999px;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 40%, transparent);
}
.dl-card p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.58; }
.dl-card .btn { align-self: flex-start; }

table.req { border-collapse: collapse; width: 100%; font-size: .95rem; }
table.req th, table.req td {
  text-align: left;
  padding: .8rem 1.25rem .8rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.req th {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
table.req tr:last-child th, table.req tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; }

/* ── Screenshot plates ────────────────────────────────────── */
.plate { margin: 0 0 clamp(2.75rem, 5vw, 4.5rem); }
.plate-head { display: flex; gap: 1.1rem; align-items: baseline; margin-bottom: 1.15rem; }
.plate-no {
  font-family: var(--mono);
  font-size: .76rem;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  padding-top: .2rem;
}
.plate-text { max-width: var(--measure); }
.plate-text h3 { font-size: 1.15rem; letter-spacing: -.02em; margin-bottom: .35rem; }
.plate-text p { color: var(--muted); margin: 0; font-size: .95rem; }

.shot {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease);
}
.shot::after {
  content: "🔍 Click to zoom";
  position: absolute;
  bottom: 1.25rem;
  right: 1.25rem;
  font-family: var(--mono);
  font-size: .74rem;
  letter-spacing: .06em;
  font-weight: 500;
  background: rgba(16,15,30,.82);
  color: #fff;
  padding: .4rem .85rem;
  border-radius: 999px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .22s var(--ease), transform .22s var(--ease);
  pointer-events: none;
}
.shot:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.shot:hover::after { opacity: 1; transform: translateY(0); }

.tour-bar {
  position: sticky;
  top: 68px;
  z-index: 20;
  background: color-mix(in srgb, var(--ground) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  padding-block: .85rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2rem;
}
.tour-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 0; }
.tour-nav a {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  padding: .45rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  transition: all .2s var(--ease);
}
.tour-nav a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }
.tour-nav a[aria-current="true"] {
  color: var(--accent-ink);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--glow);
}

/* ── Chips ────────────────────────────────────────────────── */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; padding: 0; margin: 0; }
.chips li {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
  padding: .4rem .75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface);
}
.chips-light li { border-color: rgba(167,156,255,.26); color: var(--on-navy-dim); background: rgba(255,255,255,.03); }

/* ── Reveal ───────────────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6,5,15,.94);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--r);
  box-shadow: 0 40px 100px -20px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.1);
}
.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background .2s var(--ease), transform .2s var(--ease);
  z-index: 102;
}
.lightbox-close:hover {
  background: rgba(255,255,255,.25);
  transform: scale(1.08);
}
.lightbox-hint {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  background: rgba(0,0,0,.45);
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.1);
}

/* ── Notes & footer ───────────────────────────────────────── */
.note {
  font-family: var(--mono);
  font-size: .72rem;
  line-height: 1.75;
  color: var(--muted);
  border-left: 2px solid var(--line-strong);
  padding-left: 1.1rem;
  max-width: var(--measure);
}

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  background: var(--ground-2);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .product-card:hover .thumb img { transform: none; }
}

/* ── Brand mark ───────────────────────────────────────────── */
.brand .mark { width: 26px; height: 26px; border-radius: 8px; flex: none; display: block; }
.brand .mark-glyph { fill: none; stroke: #fff; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-weight: 600; letter-spacing: .01em; }

/* ── Documentation layout ─────────────────────────────────── */
.doc-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); }
@media (min-width: 1000px) {
  .doc-layout { grid-template-columns: 232px minmax(0, 1fr); align-items: start; }
  .doc-toc { position: sticky; top: 92px; }
}
.doc-toc nav { display: flex; flex-direction: column; gap: .1rem; }
.doc-toc .toc-label {
  font-family: var(--mono); font-size: .72rem; font-weight: 500; letter-spacing: .16em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 .9rem;
}
.doc-toc a {
  font-size: .92rem;
  color: var(--muted);
  text-decoration: none;
  padding: .4rem .7rem;
  border-radius: var(--r-xs);
  border-left: 2px solid transparent;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.doc-toc a:hover { color: var(--ink); background: var(--ground-2); }
.doc-toc a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-wash); font-weight: 500; }

/* ── Prose ────────────────────────────────────────────────── */
.prose > section { padding-bottom: clamp(2.25rem, 4vw, 3.25rem); scroll-margin-top: 96px; }
.prose > section + section { border-top: 1px solid var(--line); padding-top: clamp(2.25rem, 4vw, 3.25rem); }
.prose h2 { font-size: clamp(1.4rem, 2.5vw, 1.85rem); letter-spacing: -.028em; margin-bottom: 1.1rem; }
.prose h3 { font-size: 1.08rem; letter-spacing: -.018em; margin: 2rem 0 .75rem; }
.prose p { margin: 0 0 1.05rem; max-width: var(--measure); color: var(--ink-2); }
.prose ul, .prose ol { margin: 0 0 1.15rem; padding-left: 1.35rem; max-width: var(--measure); color: var(--ink-2); }
.prose li { margin-bottom: .5rem; }
.prose li::marker { color: var(--accent); }
.prose code {
  font-family: var(--mono); font-size: .86em;
  background: var(--ground-2); border: 1px solid var(--line);
  padding: .1em .38em; border-radius: var(--r-xs);
}

/* Numbered install steps read as a sequence, so they keep their numbers. */
ol.steps { list-style: none; padding: 0; counter-reset: step; max-width: var(--measure); }
ol.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
  margin-bottom: .85rem;
  color: var(--ink-2);
}
ol.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: -.05em;
  width: 1.75rem; height: 1.75rem;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: .74rem; font-weight: 500;
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 50%;
}

.callout {
  display: flex; flex-direction: column; gap: .3rem;
  background: var(--ground-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 1.05rem 1.25rem;
  margin: 0 0 1.25rem;
  max-width: var(--measure);
}
.callout strong { font-size: .93rem; letter-spacing: -.01em; }
.callout p { margin: 0; font-size: .93rem; color: var(--muted); }

/* ── Changelog ────────────────────────────────────────────── */
.release { position: relative; padding-left: 0; }
.release + .release { margin-top: 3rem; border-top: 1px solid var(--line); padding-top: 3rem; }
.release-head { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-bottom: .9rem; }
.release-ver {
  font-family: var(--mono); font-size: 1.02rem; font-weight: 500;
  color: var(--accent);
  background: var(--accent-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  padding: .28rem .7rem; border-radius: 999px;
}
.release h2 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }
.release-group { margin-top: 1.75rem; }
.release-group h3 {
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .75rem;
}

@media (max-width: 760px) {
  .site-head .wrap { gap: .5rem; }
  .site-nav { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { padding: .5rem .5rem; }
}

/* ── Footer ───────────────────────────────────────────────── */
.foot-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 2rem;
  align-items: start;
}
@media (min-width: 860px) {
  .foot-cols { grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); }
}
.foot-brand .brand { font-size: .84rem; }
.foot-col { display: flex; flex-direction: column; gap: .55rem; }
.foot-label {
  font-family: var(--mono); font-size: .72rem; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .35rem;
}
.foot-col a {
  font-size: .93rem;
  color: var(--ink-2);
  text-decoration: none;
  width: fit-content;
  transition: color .18s var(--ease);
}
.foot-col a:hover { color: var(--accent); }

.foot-base {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.foot-base p { margin: 0; font-size: .84rem; color: var(--muted); }

/* On the narrowest phones the two-line download button cannot stay on one
   line without pushing the page sideways, so let it wrap there. */
@media (max-width: 420px) {
  .btn { white-space: normal; max-width: 100%; }
  .btn-lg { padding: .9rem 1.15rem; font-size: .98rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* ─────────────────────────────────────────────────────────────
   Motion
   Base styles are the resting, visible state; animations run FROM
   a hidden keyframe. That way the reduced-motion rule at the end of
   this file can switch animation off without leaving anything invisible.
   ───────────────────────────────────────────────────────────── */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes frameIn {
  from { opacity: 0; transform: translateY(28px) scale(.975); }
  to   { opacity: 1; transform: none; }
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(2.5%, 2%, 0); }
}
@keyframes shimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@keyframes sheen {
  from { transform: translateX(-120%) skewX(-18deg); }
  to   { transform: translateX(320%) skewX(-18deg); }
}

/* Hero entrance — one orchestrated sequence rather than scattered effects. */
.hero .pill,
.hero h1,
.hero .lede,
.hero-actions,
.hero .frame {
  animation: rise .75s var(--ease) both;
}
.hero .pill      { animation-delay: .04s; }
.hero h1         { animation-delay: .12s; }
.hero .lede      { animation-delay: .20s; }
.hero-actions    { animation-delay: .28s; }
.hero .frame     { animation: frameIn .9s var(--ease) .34s both; }

/* The glow behind the hero drifts slowly, so the field is never quite static. */
.hero::before { animation: drift 26s ease-in-out infinite; }

/* The gradient phrase in the headline breathes rather than sitting flat. */
.grad {
  /* background-image, not the background shorthand: the shorthand resets
     background-clip to border-box and the text renders as a solid block. */
  background-image: linear-gradient(100deg, var(--accent-2) 8%, #6EE7F0 46%, var(--accent-2) 84%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: shimmer 9s linear infinite;
}

/* Download buttons nudge their arrow down — the gesture matches the verb. */
.btn svg { transition: transform .22s var(--ease); }
.btn-primary:hover svg,
.btn-light:hover svg { transform: translateY(2px); }
.btn-ghost:hover svg,
.btn-outline-light:hover svg { transform: translateY(1px); }

/* A light sweep passes over a product card on hover. */
.product-card .thumb { position: relative; }
.product-card .thumb::after {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
  transform: translateX(-120%) skewX(-18deg);
  pointer-events: none;
}
.product-card:hover .thumb::after { animation: sheen .85s var(--ease); }

/* Tiles pick up the accent as the pointer arrives. */
.tile { position: relative; }
.tile:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.tile .rule, .tile .idx { transition: transform .22s var(--ease); }
.tile:hover .idx { transform: translateX(3px); }

/* Nav items grow an underline from the centre. */
.site-nav a { position: relative; }
.site-nav a::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%; bottom: .28rem;
  height: 1.5px;
  background: var(--accent);
  border-radius: 2px;
  transition: left .22s var(--ease), right .22s var(--ease);
}
.site-nav a:hover::after,
.site-nav a[aria-current="page"]::after { left: .75rem; right: .75rem; }

/* Screenshot plates stagger in rather than all arriving together. */
.plate.reveal { transition-delay: .04s; }

/* The lightbox scales up instead of appearing. */
.lightbox img { animation: frameIn .32s var(--ease) both; }

/* Reading progress along the top of long pages. */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 40;
  pointer-events: none;
}

/* Footer links slide slightly toward the pointer. */
.foot-col a { transition: color .18s var(--ease), transform .18s var(--ease); }
.foot-col a:hover { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .progress { display: none; }
}

/* ── Accessibility ────────────────────────────────────────── */
.skip {
  position: fixed;
  left: 0;
  top: 0;
  /* Moved off-screen vertically rather than parked at a huge negative left,
     which keeps it out of horizontal layout calculations entirely. */
  transform: translateY(-200%);
  z-index: 100;
  background: var(--accent);
  color: var(--accent-ink);
  padding: .75rem 1.15rem;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { transform: none; }

/* ── Icons ────────────────────────────────────────────────── */
.icon {
  width: 22px; height: 22px; flex: none;
  fill: none; stroke: var(--accent); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ── Theme toggle ─────────────────────────────────────────── */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  margin-left: .35rem;
  padding: 0;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  color: var(--muted);
  cursor: pointer;
  flex: none;
  transition: color .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-wash); }
.theme-toggle svg {
  grid-area: 1 / 1;
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
/* Show the icon for the theme you would switch TO. */
.theme-toggle .i-sun { display: none; }
.theme-toggle .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  .theme-toggle .i-sun { display: block; }
  .theme-toggle .i-moon { display: none; }
}
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="light"] .theme-toggle .i-sun { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }

/* ── How it works ─────────────────────────────────────────── */
.steps-flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  counter-reset: flow;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.7);
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
:root[data-theme="dark"] .step {
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255,255,255,.06);
}
.step:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  box-shadow: var(--shadow), 0 0 25px -10px color-mix(in srgb, var(--accent) 25%, transparent);
}
.step-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .4rem;
}
.step-n {
  font-family: var(--mono);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--accent);
  background: var(--accent-wash);
  padding: .2rem .6rem;
  border-radius: var(--r-xs);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
}
.step-ic {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--accent-wash) 0%, color-mix(in srgb, var(--accent) 18%, transparent) 100%);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  box-shadow: 0 4px 12px -3px color-mix(in srgb, var(--accent) 25%, transparent);
  margin-bottom: .2rem;
}
.step h3 { font-size: 1.18rem; letter-spacing: -.02em; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.6; }

/* ── Trust grid ───────────────────────────────────────────── */
.trust-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.trust-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.6rem;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,.6);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
:root[data-theme="dark"] .trust-item {
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255,255,255,.05);
}
.trust-item:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  box-shadow: var(--shadow-sm), 0 0 20px -8px color-mix(in srgb, var(--accent) 20%, transparent);
}
.trust-item .icon {
  width: 24px;
  height: 24px;
  padding: .55rem;
  box-sizing: content-box;
  border-radius: 12px;
  background: var(--accent-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  flex: none;
}
.trust-item h3 { font-size: 1.08rem; letter-spacing: -.018em; margin-bottom: .35rem; }
.trust-item p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.58; }

/* ── Download metadata ────────────────────────────────────── */
.dl-meta {
  margin: 0;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: .6rem;
  font-size: .84rem;
}
.dl-meta > div { display: flex; gap: .75rem; align-items: baseline; }
.dl-meta dt {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  flex: none;
  min-width: 5.2rem;
}
.dl-meta dd { margin: 0; color: var(--ink-2); min-width: 0; }
.dl-sum { align-items: flex-start; flex-wrap: wrap; }
.dl-sum dd { min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.dl-meta code {
  font-family: var(--mono);
  font-size: .74rem;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--ground-2);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: .2em .45em;
  overflow-wrap: anywhere;
}

/* ── Copy Button ──────────────────────────────────────────── */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  background: var(--ground);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-xs);
  padding: .25rem .6rem;
  font-family: var(--mono);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all .18s var(--ease);
}
.copy-btn:hover {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: var(--shadow-xs);
}
.copy-btn:active {
  transform: scale(0.96);
}
.copy-btn.copied {
  background: var(--ok-wash);
  color: var(--ok);
  border-color: var(--ok);
}
.copy-btn svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  flex: none;
}

/* ── Multi-version releases ───────────────────────────────── */
.version-section {
  margin-top: 3.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.version-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.version-section-head h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}
.version-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.version-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.version-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.version-card-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.version-tag {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}
.version-date {
  font-size: .82rem;
  color: var(--muted);
}
.version-summary {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}
.version-downloads {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: .85rem;
}
.version-dl-item {
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.version-dl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.version-dl-info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.version-dl-name {
  font-weight: 600;
  font-size: .88rem;
  color: var(--ink);
}
.version-dl-size {
  font-size: .78rem;
  color: var(--muted);
  font-family: var(--mono);
}
.version-dl-item .btn {
  align-self: center;
  padding: .45rem .85rem;
  font-size: .85rem;
}
.version-checksum {
  margin: 0;
  font-size: .8rem;
}
.version-checksum summary {
  cursor: pointer;
  color: var(--muted);
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .05em;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.version-checksum summary:hover {
  color: var(--accent);
}
.version-checksum code {
  display: block;
  margin-top: .4rem;
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  padding: .35rem .5rem;
  overflow-wrap: anywhere;
}

/* ── Breadcrumbs ──────────────────────────────────────────── */
.crumbs {
  border-bottom: 1px solid var(--line);
  background: var(--ground-2);
}
.crumbs .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding-block: .7rem;
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .04em;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current="page"] { color: var(--ink); }
.crumbs .sep { color: var(--line-strong); }

/* ── Sticky tour navigation ───────────────────────────────── */
.tour-bar {
  position: sticky;
  top: 68px;
  z-index: 15;
  background: color-mix(in srgb, var(--ground) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-block: 1px solid var(--line);
  padding-block: .7rem;
}
.tour-bar .tour-nav { margin-bottom: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tour-bar .tour-nav::-webkit-scrollbar { display: none; }
.tour-bar .tour-nav a { white-space: nowrap; }
.tour-bar .tour-nav a[aria-current="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-wash);
}
/* The plate sections must clear both sticky bars when jumped to. */
.tour-wrap .section { scroll-margin-top: 124px; }

/* ── Documentation & Prose ────────────────────────────────── */
.doc-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  align-items: flex-start;
}
@media (min-width: 900px) {
  .doc-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 4rem;
  }
}
.doc-toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.toc-label {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.doc-toc nav {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.doc-toc a {
  font-size: .88rem;
  color: var(--muted);
  text-decoration: none;
  padding: .35rem .65rem;
  border-radius: var(--r-xs);
  border-left: 2px solid transparent;
  transition: color .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
.doc-toc a:hover {
  color: var(--ink);
  background: var(--ground-2);
}
.doc-toc a.active {
  color: var(--accent);
  font-weight: 600;
  border-left-color: var(--accent);
  background: var(--accent-wash);
}

.prose > section {
  margin-bottom: clamp(3rem, 6vw, 4.5rem);
  scroll-margin-top: 100px;
}
.prose h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 1.25rem;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--line);
}
.prose h3 {
  font-size: 1.22rem;
  margin-top: 1.8rem;
  margin-bottom: .8rem;
  color: var(--ink);
}
.prose p {
  color: var(--ink-2);
  line-height: 1.68;
  margin: 0 0 1.15rem;
}
.prose ul {
  margin: 0 0 1.5rem;
  padding-left: 1.3rem;
}
.prose ul li {
  margin-bottom: .5rem;
  color: var(--ink-2);
  line-height: 1.6;
}
.prose ol.steps {
  list-style: none;
  counter-reset: doc-step;
  margin: 1.2rem 0 1.6rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.prose ol.steps li {
  counter-increment: doc-step;
  position: relative;
  padding-left: 2.5rem;
  color: var(--ink-2);
  line-height: 1.6;
}
.prose ol.steps li::before {
  content: counter(doc-step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-wash);
  color: var(--accent);
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.callout {
  margin: 1.5rem 0;
  padding: 1.2rem 1.4rem;
  background: var(--accent-wash);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-left: 4px solid var(--accent);
  border-radius: var(--r);
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.callout strong {
  font-size: .92rem;
  color: var(--ink);
}
.callout p {
  margin: 0;
  font-size: .92rem;
  color: var(--ink-2);
  line-height: 1.55;
}

/* ── Changelog & Releases Timeline ────────────────────────── */
.release {
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: 3.5rem;
}
.release::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 10px;
  bottom: -3.5rem;
  width: 2px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--line) 85%, transparent 100%);
}
.release:last-child::before {
  display: none;
}
.release::after {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
  box-shadow: 0 0 0 4px var(--accent-wash);
}
.release-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .6rem;
}
.release-ver {
  font-family: var(--mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}
.release-group {
  margin-top: 1.4rem;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-xs);
}
.release-group h3 {
  font-size: .85rem;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}
.release-group ul {
  margin: 0;
  padding-left: 1.2rem;
}
.release-group li {
  margin-bottom: .45rem;
  color: var(--ink-2);
  font-size: .94rem;
  line-height: 1.58;
}
.release-group li:last-child {
  margin-bottom: 0;
}
