/* VibeLab design tokens: the single source of truth for colour, type, space, shape and motion.
   Rules for using them are in docs/DESIGN.md. Contrast ratios are measured, not estimated. */

/* Familjen Grotesk (Familjen STHLM, Stockholm; weights 400–700) and Albert Sans (weights 100–900),
   both SIL OFL 1.1, from @fontsource-variable 5.3.0, licences beside the files in site/assets/fonts/.
   Latin and latin-ext subsets (Lithuanian needs latin-ext). The build serves this file from assets/,
   so font URLs are relative to it. */
@font-face {
  font-family: "Familjen Grotesk";
  src: url("fonts/familjen-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  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;
}
@font-face {
  font-family: "Familjen Grotesk";
  src: url("fonts/familjen-grotesk-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  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: "Albert Sans";
  src: url("fonts/albert-sans-latin-ext.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  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;
}
@font-face {
  font-family: "Albert Sans";
  src: url("fonts/albert-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  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;
}

:root {
  color-scheme: light dark;

  /* Colour, light: birch and snow, cool and slightly green, never cream. */
  --paper: #F4F5F2;        /* page */
  --surface: #FFFFFF;      /* tiles, sheets */
  --sunk: #ECEEEA;         /* wells, code, inactive chips */
  --line: #DDE1DC;         /* the one hairline */
  --ink: #18201E;          /* 15.2:1 on paper */
  --ink-2: #47524E;        /* 7.4:1 on paper: secondary text */
  --muted: #66716D;        /* 4.6:1 on paper: captions, dates */
  --fjord: #2450B8;        /* VibeLab's own colour: links, focus, primary button. 6.6:1 on paper, white on it 7.2:1 */
  --fjord-soft: #E3EAF8;   /* fjord tint for selected chips */
  --on-fjord: #FFFFFF;

  /* Per app, set inline on the app's scope by the build:
       style="--accent:#A78BFA; --accent-deep-light:#6D4FD6; --accent-deep-dark:#B9A3FB; --on-accent:#18201E"
     --accent-deep-* reach 4.5:1 on --surface in their theme (docs/DESIGN.md, Accent rules); [data-app]
     below picks the one for the current theme. --on-accent is #18201E or #FFFFFF in both themes. */
  --accent: var(--fjord);
  --accent-deep: var(--fjord);
  --on-accent: var(--on-fjord);

  /* Type */
  --font-display: "Familjen Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Albert Sans", ui-sans-serif, system-ui, sans-serif;
  --text-xs: 0.8125rem;                          /* 13px: meta */
  --text-sm: 0.9375rem;                          /* 15px: captions, chips */
  --text-md: 1.0625rem;                          /* 17px: body */
  --text-lg: 1.25rem;                            /* 20px: lead */
  --text-xl: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);      /* tile and section titles */
  --text-2xl: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);    /* page titles */
  --text-hero: clamp(3.5rem, 1.8rem + 8vw, 8rem);      /* the home headline only */
  --leading-tight: 1.05;
  --leading-snug: 1.25;
  --leading-body: 1.55;
  --tracking-display: -0.025em;
  --measure: 62ch;

  /* Space: 4px base */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 128px;
  --page-max: 1200px;
  --gutter: clamp(16px, 4vw, 32px);

  /* Shape */
  --r-sm: 10px;             /* chips, buttons */
  --r-md: 20px;             /* tiles, images */
  --r-lg: 32px;             /* hero bands */
  --r-pill: 999px;
  --r-icon: 22.37%;         /* iOS app icon corner, on any size */
  --shadow-lift: 0 1px 2px rgb(24 32 30 / 0.06), 0 12px 32px -12px rgb(24 32 30 / 0.18);

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 160ms;
  --t-base: 240ms;
  --t-slow: 420ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Colour, dark: a winter night by the water, not near-black with one acid accent. */
    --paper: #101513;
    --surface: #171D1B;
    --sunk: #0B0F0E;
    --line: #27302D;
    --ink: #EEF1EE;        /* 16.2:1 on paper */
    --ink-2: #B8C1BD;      /* 10.0:1 */
    --muted: #8C9692;      /* 6.1:1 */
    --fjord: #8FB0FF;      /* 8.6:1 on paper; paper on it 8.6:1 */
    --fjord-soft: #1C2742;
    --on-fjord: #101513;
    --shadow-lift: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.6);
  }
}

/* Anything scoped to one app carries data-app="<id>" and its inline --accent. The wash is declared here,
   not on :root, so it is computed from that element's own --accent. */
[data-app] {
  --accent-deep: var(--accent-deep-light, var(--fjord));
  --accent-wash: color-mix(in oklab, var(--accent) 12%, var(--surface));
}
@media (prefers-color-scheme: dark) {
  [data-app] { --accent-deep: var(--accent-deep-dark, var(--fjord)); }
}

@media (prefers-reduced-motion: reduce) {
  :root { --t-fast: 0ms; --t-base: 0ms; --t-slow: 0ms; }
}

/* VibeLab site styles. Values come from tokens.css; rules for their use are in docs/DESIGN.md. */

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: var(--leading-body);
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: var(--tracking-display); line-height: var(--leading-snug); }
p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
a:hover { color: var(--fjord); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--fjord); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  background: var(--fjord); color: var(--on-fjord); padding: var(--s-2) var(--s-4); border-radius: var(--r-sm);
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: var(--s-3); }
.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap > * { min-width: 0; }
time, .num { font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */

.bar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 85%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease);
}
.bar.scrolled { border-bottom-color: var(--line); }
.bar-in {
  max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter);
  height: 64px; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
}
.brand { display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand .mark { flex: none; }
.wordmark { font-family: var(--font-display); font-weight: 600; font-size: 1.1875rem; letter-spacing: -0.02em; }
.nav { display: flex; gap: var(--s-1); }
.nav a {
  text-decoration: none; color: var(--ink-2); font-size: var(--text-sm); font-weight: 500;
  padding: var(--s-2) var(--s-3); border-radius: var(--r-pill);
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav a:hover { color: var(--ink); background: var(--sunk); }
.nav a[aria-current="page"] { color: var(--ink); background: var(--sunk); }
@media (max-width: 560px) {
  .brand .mark { display: none; }
  .nav a { padding: var(--s-2) var(--s-2); font-size: var(--text-xs); }
}

/* ---------- buttons, chips ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-5); border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: var(--text-sm); text-decoration: none; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.btn:hover { border-color: var(--ink-2); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--fjord); border-color: var(--fjord); color: var(--on-fjord); }
.btn-primary:hover { background: color-mix(in oklab, var(--fjord) 88%, var(--ink)); border-color: transparent; color: var(--on-fjord); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
html:not(.js) .chips { display: none; }
.chip {
  min-height: 36px; padding: 0 var(--s-4); border-radius: var(--r-pill);
  border: 1px solid var(--line); background: transparent; color: var(--ink-2);
  font-size: var(--text-sm); font-weight: 500; cursor: pointer;
  transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--fjord-soft); border-color: transparent; color: var(--fjord); }

.platform {
  display: inline-block; padding: 2px var(--s-3); border-radius: var(--r-pill);
  background: var(--sunk); color: var(--ink-2); font-size: var(--text-xs); font-weight: 500; white-space: nowrap;
}

/* ---------- icons ---------- */

.icon, .rel-icon, .monogram { border-radius: var(--r-icon); flex: none; }
.icon { box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent); }
.monogram {
  display: inline-grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  font-family: var(--font-display); font-weight: 600; line-height: 1;
}

/* ---------- hero ---------- */

.hero { padding: clamp(var(--s-6), 7vw, var(--s-9)) 0 clamp(var(--s-5), 5vw, var(--s-8)); }
.hero-title {
  font-size: var(--text-hero); line-height: var(--leading-tight); letter-spacing: -0.035em;
  font-weight: 600; max-width: 12ch;
}
.hero-lead { margin-top: var(--s-5); max-width: 38ch; font-size: clamp(var(--text-md), 1rem + 0.6vw, 1.5rem); line-height: 1.4; color: var(--ink-2); }
.hero-stats { margin-top: var(--s-4); color: var(--muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }

/* The index: every app's real icon and name, each a jump to its card. One row; it scrolls sideways on phones. */
.index {
  margin-top: clamp(var(--s-5), 4vw, var(--s-7));
  display: flex; gap: var(--s-2);
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  margin-inline: calc(-1 * var(--gutter)); padding: var(--s-2) var(--gutter);
}
.index::-webkit-scrollbar { display: none; }
.index li { flex: none; scroll-snap-align: start; }
.index a {
  display: flex; flex-direction: column; align-items: center; gap: var(--s-2);
  width: 88px; padding: var(--s-2) 0; border-radius: var(--r-sm);
  text-decoration: none; color: var(--ink-2);
}
.index a:hover { color: var(--ink); }
.index-icon { width: 56px; height: 56px; border-radius: var(--r-icon); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent); transition: transform var(--t-fast) var(--ease-spring), box-shadow var(--t-fast) var(--ease); }
.index-icon.monogram { font-size: 28px; }
.index a:hover .index-icon, .index a:focus-visible .index-icon { transform: translateY(-4px); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 8%, transparent), var(--shadow-lift); }
.index-name { font-size: var(--text-xs); font-weight: 500; line-height: 1.25; text-align: center; max-width: 100%; text-wrap: balance; }
@media (min-width: 1000px) {
  .index { overflow: visible; flex-wrap: wrap; margin-inline: calc(-1 * var(--s-2)); padding: var(--s-2) 0; }
  .index a { width: 92px; }
}

/* Icons rise into place, once per visit. */
.js .index.rise .index-icon { opacity: 0; transform: translateY(16px) scale(0.85); }
.js .index.rise.go .index-icon {
  opacity: 1; transform: none;
  transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease-spring);
  transition-delay: calc(var(--i, 0) * 40ms);
}

@media (max-width: 639px) {
  .hero { padding: var(--s-4) 0 0; }
  .hero-lead { margin-top: var(--s-3); }
  .hero-stats { margin-top: var(--s-2); }
  .index { margin-top: var(--s-3); gap: 0; }
  .index a { width: 76px; }
  .index-icon { width: 48px; height: 48px; }
  .index-icon.monogram { font-size: 24px; }
  .index-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- sections ---------- */

.section-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--s-3) var(--s-5);
  margin-bottom: var(--s-5);
}
.section-head h2 { font-size: var(--text-xl); }
.apps { padding: var(--s-4) 0 var(--s-8); }
@media (max-width: 639px) {
  /* Shelves scroll sideways on phones, so the first card stays on the first screen. */
  /* The top bar already says Apps: the heading stays for screen readers, the chips lead. */
  .apps { padding-top: var(--s-3); }
  .apps .section-head { margin-bottom: var(--s-3); }
  .apps .section-head h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .apps .chips { flex: 1 1 100%; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
  .apps .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}

/* ---------- the apps: one showcase card each ---------- */

.shows { display: grid; gap: var(--s-6); }
.shows > li[hidden] { display: none; }
.show {
  display: grid; grid-template-columns: minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
}
@media (min-width: 900px) {
  .show { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* While its film plays, the card opens to full width with the film on top. */
  .show:has(.show-art.playing) { grid-template-columns: minmax(0, 1fr); }
  .show:has(.show-art.playing) .show-art { order: -1; aspect-ratio: 16 / 9; min-height: 0; }
}
.show:target { border-color: color-mix(in oklab, var(--accent) 50%, var(--line)); box-shadow: var(--shadow-lift); }

.show-body { display: flex; flex-direction: column; gap: var(--s-2); padding: clamp(var(--s-5), 3vw, var(--s-6)); min-width: 0; }
.show-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.show-name { font-size: var(--text-xl); line-height: 1.1; }
.show-beats { font-family: var(--font-display); font-weight: 500; color: var(--accent-deep); font-size: var(--text-lg); letter-spacing: -0.01em; line-height: 1.25; }
.show-benefit { color: var(--ink-2); line-height: 1.5; max-width: 46ch; }
.show-meta { color: var(--muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; }
.show-meta a { color: inherit; text-underline-offset: 2px; }
.show-meta a:hover { color: var(--fjord); }
.show-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-3); }
.show-filmnote { color: var(--muted); font-size: var(--text-xs); line-height: 1.5; }

.news { margin: var(--s-2) 0 var(--s-1); padding: var(--s-3) var(--s-4); border-radius: var(--r-sm); background: var(--accent-wash); }
.news-label { font-size: var(--text-xs); font-weight: 600; color: var(--accent-deep); }
.news-list { margin-top: var(--s-2); display: grid; gap: var(--s-1); font-size: var(--text-sm); }
.news-list:empty { display: none; }
.news-list li { display: flex; gap: var(--s-2); align-items: baseline; }
.hl-icon { width: 1.25em; flex: none; text-align: center; }

.watch {
  display: inline-flex; align-items: center; gap: var(--s-2);
  min-height: 44px; padding: 0 var(--s-4) 0 var(--s-2);
  border-radius: var(--r-pill); border: 1px solid transparent; background: var(--accent);
  color: var(--on-accent); font-size: var(--text-sm); font-weight: 600; text-decoration: none;
  transition: filter var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.watch:hover { color: var(--on-accent); filter: brightness(1.06) saturate(1.05); }
.watch:active { transform: scale(0.98); }
.watch-len { font-weight: 500; opacity: 0.8; }
.play { width: 30px; height: 30px; border-radius: 50%; background: var(--on-accent); flex: none; position: relative; }
.play::after {
  content: ""; position: absolute; left: 12px; top: 9px;
  border-left: 9px solid var(--accent); border-top: 6px solid transparent; border-bottom: 6px solid transparent;
}
.btn-quiet { background: transparent; }

.notes { margin-top: var(--s-2); border-top: 1px solid var(--line); font-size: var(--text-sm); }
.notes summary {
  cursor: pointer; list-style: none; display: flex; align-items: center; gap: var(--s-2);
  min-height: 44px; color: var(--ink-2); font-weight: 600;
}
.notes summary::-webkit-details-marker { display: none; }
.notes summary::after { content: "+"; margin-left: auto; font-size: 1.25rem; font-weight: 400; color: var(--muted); }
.notes[open] summary::after { content: "\2212"; }
.notes summary:hover { color: var(--ink); }
.notes-count { font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.notes .history { max-height: 280px; overflow-y: auto; }

/* The art: the app's real screens from its banner, and the film when it plays, in place. */
.show-art { position: relative; min-height: 0; aspect-ratio: 16 / 9; overflow: hidden; }
@media (min-width: 900px) { .show-art { aspect-ratio: auto; min-height: 360px; } }
@media (max-width: 899px) {
  .show-art { order: -1; }
  /* The banner's right half, the app's own screens: 4:3 on tablets, square on phones. */
  .show-art:has(.fit-screens) { aspect-ratio: 4 / 3; }
  .show-art.playing { aspect-ratio: 16 / 9; }
}
@media (max-width: 639px) { .show-art:has(.fit-screens):not(.playing) { aspect-ratio: 1; } }
.show-art > img { position: absolute; inset: 0; width: 100%; height: 100%; }
/* A Scriptable banner is 2:1: headline on the left half, the app's screens on the right.
   The right half is a square: it is fitted whole inside the box, centred, and the left half is
   masked away (both edges fade into the ground), so the screens are never cut at any card size. */
.show-art:has(.fit-screens) { container-type: size; }
.show-art > .fit-screens {
  inset: auto; left: 50%; top: 50%;
  width: auto; max-width: none; height: min(100cqh, 100cqw);
  transform: translate(-75%, -50%);
  -webkit-mask-image: linear-gradient(to right, transparent 50%, #000 54%, #000 96%, transparent);
  mask-image: linear-gradient(to right, transparent 50%, #000 54%, #000 96%, transparent);
}
/* Other banners (16:9 or wider) show whole at full width, resting on the bottom edge; every art box
   is at most 16:9, so they always fit. Their top edge fades into the ground, so no seam shows above. */
.show-art > .fit-whole {
  inset: auto 0 0 0; width: 100%; height: auto;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 5%);
  mask-image: linear-gradient(to bottom, transparent, #000 5%);
}
.show-art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.art-play {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
  border: 0; padding: 0; background: transparent; cursor: pointer;
}
.art-play:focus-visible { outline-offset: -4px; }
html:not(.js) .art-play { display: none; }
.play-big {
  width: 72px; height: 72px; background: var(--accent);
  box-shadow: 0 8px 28px -6px rgb(0 0 0 / 0.5);
  transition: transform var(--t-fast) var(--ease-spring);
}
.play-big::after { left: 29px; top: 24px; border-left: 20px solid var(--on-accent); border-top: 12px solid transparent; border-bottom: 12px solid transparent; }
.art-play:hover .play-big, .art-play:focus-visible .play-big { transform: scale(1.08); }
.art-close {
  position: absolute; top: var(--s-3); right: var(--s-3); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgb(0 0 0 / 0.55); color: #fff; font-size: 24px; line-height: 1;
  display: grid; place-items: center;
}
.art-close:hover { background: rgb(0 0 0 / 0.75); }
.art-close[hidden] { display: none; }
.show-art.playing > img, .show-art.playing .art-play { visibility: hidden; }
.show-art.playing { background: #000 !important; }

/* ---------- release rows ---------- */

.releases { border-top: 1px solid var(--line); }
.rel {
  display: grid; grid-template-columns: 7.5rem minmax(0, 12rem) 4.5rem minmax(0, 1fr); align-items: center; gap: var(--s-4);
  padding: var(--s-3) 0 var(--s-3) var(--s-4); border-bottom: 1px solid var(--line);
  position: relative;
}
.rel::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: var(--accent); }
.rel time { color: var(--muted); font-size: var(--text-sm); }
.rel-app { display: inline-flex; align-items: center; gap: var(--s-2); text-decoration: none; font-weight: 600; min-width: 0; }
.rel-app span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-icon { width: 24px; height: 24px; }
.rel-icon.monogram { font-size: 12px; }
.rel-ver { color: var(--muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }
.rel-title { color: var(--ink-2); }
@media (max-width: 719px) {
  .rel { grid-template-columns: auto 1fr auto; grid-template-areas: "app app time" "title title ver"; gap: var(--s-1) var(--s-3); }
  .rel time { grid-area: time; font-size: var(--text-xs); }
  .rel-app { grid-area: app; }
  .rel-ver { grid-area: ver; font-size: var(--text-xs); }
  .rel-title { grid-area: title; font-size: var(--text-sm); }
}

/* ---------- release history (in each card) ---------- */

.history li { display: grid; grid-template-columns: 4rem 6.5rem minmax(0, 1fr); gap: var(--s-3); padding: var(--s-2) 0; border-top: 1px solid var(--line); }
.history .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.history time { color: var(--muted); }
@media (max-width: 479px) { .history li { grid-template-columns: 4rem 1fr; } .history li span:last-child { grid-column: 1 / -1; } }

/* ---------- lab log ---------- */

.lab-log { padding: var(--s-8) 0; }
.section-note { color: var(--muted); font-size: var(--text-sm); }
.full-log { margin-top: var(--s-5); }
.full-log > summary {
  cursor: pointer; list-style: none; display: inline-flex; align-items: center; min-height: 44px;
  color: var(--fjord); font-weight: 600; font-size: var(--text-sm);
}
.full-log > summary::-webkit-details-marker { display: none; }
.full-log > summary::after { content: " +"; white-space: pre; }
.full-log[open] > summary::after { content: " \2212"; }
.month { margin-top: var(--s-6); }
.month h3 { font-size: var(--text-lg); margin-bottom: var(--s-3); display: flex; gap: var(--s-3); align-items: baseline; }
.month h3 .count { font-family: var(--font-body); font-weight: 500; font-size: var(--text-sm); color: var(--muted); letter-spacing: 0; }

/* ---------- how it's made ---------- */

.how { padding: var(--s-8) 0 var(--s-9); border-top: 1px solid var(--line); }
.how > .wrap > h2 { font-size: var(--text-xl); margin-bottom: var(--s-4); }
.how .steps { margin-top: var(--s-7); }
.how-part { margin-top: var(--s-8); }
.how-part > h3 { font-size: var(--text-lg); margin-bottom: var(--s-2); }
.how-part > .lead { color: var(--ink-2); max-width: 60ch; margin-bottom: var(--s-5); }
.blocks { display: grid; grid-template-columns: 1fr; gap: var(--s-3); }
@media (min-width: 720px) { .blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-4); } }
@media (min-width: 1024px) { .blocks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.blocks > li { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); }
.blocks h4 { font-size: var(--text-lg); display: flex; justify-content: space-between; gap: var(--s-3); align-items: baseline; }
.blocks h4 .v { font-family: var(--font-body); font-size: var(--text-xs); font-weight: 500; color: var(--muted); letter-spacing: 0; }
.blocks p { margin-top: var(--s-2); color: var(--ink-2); font-size: var(--text-sm); }
.blocks details { margin-top: var(--s-3); font-size: var(--text-sm); }
.blocks summary { cursor: pointer; color: var(--fjord); font-weight: 600; }
.blocks dl { margin: var(--s-3) 0 0; display: grid; gap: var(--s-2); }
.blocks dt { font-weight: 600; font-size: var(--text-xs); color: var(--muted); }
.blocks dd { margin: 0; color: var(--ink-2); }
.blocks .uses { margin-top: var(--s-3); color: var(--muted); font-size: var(--text-xs); }

.matrix-wrap { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; font-size: var(--text-sm); }
.matrix th, .matrix td { padding: var(--s-2) var(--s-2); text-align: center; border-bottom: 1px solid var(--line); }
.matrix tbody tr:last-child th, .matrix tbody tr:last-child td { border-bottom: 0; }
.matrix thead th { vertical-align: bottom; padding-top: var(--s-4); }
.matrix thead th .rel-icon { margin: 0 auto; width: 32px; height: 32px; }
.matrix thead th .monogram.rel-icon { font-size: 15px; }
.matrix th[scope="row"] a { text-decoration: none; }
.matrix th[scope="row"] a:hover { text-decoration: underline; text-underline-offset: 3px; }
.matrix th[scope="row"] { text-align: left; font-weight: 500; position: sticky; left: 0; background: var(--surface); white-space: nowrap; padding-left: var(--s-4); }
.matrix .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.matrix .no { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--line); vertical-align: middle; }
.matrix-note { margin-top: var(--s-3); color: var(--muted); font-size: var(--text-xs); }

.pace { display: grid; grid-template-columns: 1fr; gap: var(--s-5); align-items: end; }
@media (min-width: 900px) { .pace { grid-template-columns: minmax(0, 1fr) 260px; } }
.pace svg { width: 100%; height: auto; }
.pace .bar-rect { fill: var(--fjord); }
.pace .axis { fill: var(--muted); font-family: var(--font-body); font-size: 11px; }
.pace .base { stroke: var(--line); }
.pace-text p { color: var(--ink-2); }
.pace-text .pace-big { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 600; color: var(--ink); line-height: 1; letter-spacing: -0.03em; }

.steps { display: grid; grid-template-columns: 1fr; gap: var(--s-4); counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: var(--s-4); }
.steps li::before { content: counter(step); display: block; font-family: var(--font-display); font-weight: 600; font-size: var(--text-xl); margin-bottom: var(--s-2); }
.steps h3 { font-size: var(--text-md); margin-bottom: var(--s-1); }
.steps p { color: var(--ink-2); font-size: var(--text-sm); }
.vibed { max-width: 60ch; font-size: var(--text-lg); line-height: 1.5; color: var(--ink-2); }
.vibed strong { color: var(--ink); font-weight: 600; }

/* ---------- footer ---------- */

.foot { background: var(--sunk); border-top: 1px solid var(--line); padding: var(--s-8) 0 var(--s-7); }
.foot-in { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
@media (min-width: 860px) { .foot-in { grid-template-columns: 1fr 2fr 1fr; } }
.foot-tag { color: var(--muted); }
.foot-h { font-size: var(--text-xs); color: var(--muted); font-weight: 600; margin-bottom: var(--s-3); }
.foot-apps ul { columns: 2 10rem; column-gap: var(--s-5); }
.foot-apps li { padding: 2px 0; break-inside: avoid; }
.foot a { text-decoration: none; color: var(--ink-2); font-size: var(--text-sm); }
.foot a:hover { color: var(--fjord); text-decoration: underline; text-underline-offset: 3px; }
.foot-meta { display: grid; gap: var(--s-1); color: var(--muted); font-size: var(--text-sm); align-content: start; }

/* ---------- 404 ---------- */

.lost { padding: var(--s-8) 0 var(--s-9); }

/* ---------- motion off ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .index.rise .index-icon { opacity: 1; transform: none; }
}
