/* Cypher Store website — one visual system (see CYPHER-STORE-DESIGN-SYSTEM.md).
 * Built by site/build.js into public/assets/store.css. No framework, no themes. */

@font-face {
  font-family: "Onest";
  src: url("fonts/onest-latin-wght-normal.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;
}
@font-face {
  font-family: "Onest";
  src: url("fonts/onest-latin-ext-wght-normal.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: "Newsreader";
  src: url("fonts/newsreader-latin-opsz-wght-normal.woff2") format("woff2");
  font-weight: 400 600; font-style: normal; font-display: swap;
}

:root {
  /* Colour: the shop in the artwork. Paper and shelf for surfaces, night ink
     for text, one green for every action, lamp amber only for "new". */
  --paper: #ffffff;
  --shelf: #f5f3ef;
  --shelf-2: #ece8e1;
  --line: #e2ded6;
  --line-strong: #c9c3b8;
  --ink: #151a24;
  --ink-2: #485062;
  --ink-3: #636a7a;
  --green: #1c6b46;
  --green-hover: #155537;
  --green-tint: #e7f1eb;
  --lamp: #9a5d06;
  --lamp-tint: #fbf0dc;
  --night: #18213a;
  --night-ink: #e9ecf4;
  --night-ink-2: #b4bccd;
  --danger: #a3261c;
  --on-green: #ffffff;
  --on-green-2: #d6e9de;
  --header-bg: rgba(255, 255, 255, .94);
  --card: #ffffff;
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23485062' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --veil: rgba(247, 245, 240, .74);
  --art-opacity: .9;
  --glass: rgba(255, 255, 255, .56);
  --glass-strong: rgba(255, 255, 255, .86);
  --glass-inner: rgba(255, 255, 255, .55);
  --glass-border: rgba(255, 255, 255, .78);
  --glass-rim: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 1px rgba(21, 26, 36, .04);
  --glass-shadow: 0 10px 24px -14px rgba(21, 26, 36, .28);
  color-scheme: light;

  --font-ui: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;

  /* Type scale: 12 meta, 14 secondary, 16 body, then display steps. */
  --t-meta: 0.75rem;
  --t-small: 0.875rem;
  --t-body: 1rem;
  --t-lead: 1.125rem;
  --t-h3: 1.25rem;
  --t-h2: clamp(1.625rem, 1.3rem + 1.1vw, 2.125rem);
  --t-h1: clamp(2.125rem, 1.55rem + 2.4vw, 3.375rem);

  /* Space: a 4 px base. */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1200px;

  /* Corners carry hierarchy: small on controls, a little more on media. */
  --r-control: 8px;
  --r-media: 12px;
  --r-icon: 22%;

  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0; background: var(--paper); color: var(--ink); isolation: isolate; min-height: 100vh;
  font: 400 var(--t-body)/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green-hover); }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
button, input, select { font: inherit; color: inherit; }
code { font: 0.9em ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; background: var(--shelf); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s4); top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: var(--s2) var(--s4); border-radius: var(--r-control); }
.skip:focus { top: var(--s3); color: var(--paper); }

.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.01em; }
.h1 { font: 500 var(--t-h1)/1.08 var(--font-display); letter-spacing: -0.015em; }
.h2 { font: 500 var(--t-h2)/1.15 var(--font-display); letter-spacing: -0.01em; }
.h3 { font: 600 var(--t-h3)/1.3 var(--font-ui); }
.lead { font-size: var(--t-lead); line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--ink-2); }
.meta { font-size: var(--t-small); color: var(--ink-3); }
/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 10px 18px; border-radius: var(--r-control);
  font-weight: 600; font-size: var(--t-small); line-height: 1.2; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--green); color: var(--on-green); }
.btn-primary:hover { background: var(--green-hover); color: var(--on-green); }
.btn-quiet { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn-quiet:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--green); font-weight: 600; font-size: var(--t-small); cursor: pointer; }
.btn-link:hover { text-decoration: underline; }
.arrow-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: var(--t-small); text-decoration: none; min-height: 44px; }
.arrow-link svg { width: 16px; height: 16px; transition: transform .15s var(--ease); }
.arrow-link:hover svg { transform: translateX(3px); }

/* ── Header ──────────────────────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.2); }
.header-row { display: flex; align-items: center; gap: var(--s5); height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.brand span { font: 600 1.25rem/1 var(--font-display); letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 12px; border-radius: var(--r-control);
  color: var(--ink-2); text-decoration: none; font-weight: 500; font-size: 0.9375rem; background: none; border: 0; cursor: pointer;
}
.nav a:hover { color: var(--ink); background: var(--shelf); }
.nav a svg { width: 16px; height: 16px; flex: none; }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--green); border-radius: 0; }
@media (max-width: 480px) {
  .header-row { gap: var(--s2); }
  .brand span { display: none; }
  .nav a { padding: 0 10px; }
}

/* ── Live status ─────────────────────────────────────────────────────── */
.live-status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: var(--t-small); color: var(--ink-3); min-height: 44px; }
.live-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.live-status[data-state="fresh"] .dot { background: var(--green); }
.live-status[data-state="updating"] .dot { background: var(--lamp); animation: pulse 1.2s ease-in-out infinite; }
.live-status[data-state="offline"] .dot, .live-status[data-state="failed"] .dot { background: var(--danger); }
.live-status[data-state="stale"] .dot { background: var(--lamp); }
@keyframes pulse { 50% { opacity: .35; } }

.plats { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: var(--s2); font-size: var(--t-small); color: var(--ink-3); }
.plat { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.plat svg { width: 15px; height: 15px; flex: none; }

/* ── Directory (the home page) ───────────────────────────────────────── */
.intro { background: var(--shelf); border-bottom: 1px solid var(--line); }
.intro-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding-block: clamp(32px, 5vw, 64px); }
.intro .h1 { max-width: 16ch; margin-bottom: var(--s4); }
.intro .lead { margin-bottom: var(--s5); }
.intro-art { margin: 0; }
.intro-art img { width: 100%; aspect-ratio: 1200 / 655; object-fit: cover; border-radius: var(--r-media); box-shadow: 0 1px 0 var(--line); }
.facts-row { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.facts-row li { display: grid; grid-template-columns: 36px 1fr; gap: var(--s3); align-items: start; font-size: var(--t-small); color: var(--ink-2); }
.facts-row svg { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: var(--green-tint); color: var(--green); }
.facts-row strong { display: block; color: var(--ink); font-weight: 600; font-size: 0.9375rem; }

.toolbar { position: sticky; top: 68px; z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); padding-block: var(--s3); box-shadow: 0 6px 10px -10px rgba(0, 0, 0, .25); }
.toolbar-row { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: end; }
.field { display: grid; gap: 4px; }
.field label { font-size: var(--t-meta); font-weight: 600; color: var(--ink-2); }
.field-search { flex: 1 1 280px; position: relative; }
.search-input {
  width: 100%; min-height: 44px; padding: 10px 14px 10px 40px; border: 1px solid var(--line-strong); border-radius: var(--r-control);
  background: var(--shelf); color: var(--ink); font-size: var(--t-body);
}
.search-input::placeholder { color: var(--ink-3); }
.search-input:focus { outline: 2px solid var(--green); outline-offset: 0; border-color: var(--green); background: var(--paper); }
.field-search svg { position: absolute; left: 12px; bottom: 13px; width: 18px; height: 18px; color: var(--ink-3); pointer-events: none; }
.select {
  min-height: 44px; padding: 0 36px 0 12px; border: 1px solid var(--line-strong); border-radius: var(--r-control);
  background: var(--shelf) var(--select-arrow) no-repeat right 12px center; color: var(--ink);
  appearance: none; -webkit-appearance: none; cursor: pointer; font-size: 0.9375rem;
}
.toolbar-status { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); margin-top: var(--s2); font-size: var(--t-small); color: var(--ink-2); min-height: 32px; }
.toolbar-status .spacer { flex: 1; }

.directory { padding-block: var(--s5) var(--s8); }
.entries { list-style: none; display: grid; gap: var(--s4); }
.entry {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s5); padding: var(--s4);
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.entry:hover { border-color: var(--line-strong); box-shadow: 0 8px 12px -12px rgba(0, 0, 0, .35); }
.entry[hidden] { display: none; }
.entry-media { display: block; border-radius: 10px; overflow: hidden; background: var(--shelf-2); aspect-ratio: 16 / 10; align-self: start; }
.entry-media img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .35s var(--ease); }
.entry:hover .entry-media img { transform: scale(1.03); }
.entry-art { display: grid; place-items: center; width: 100%; height: 100%; background: var(--shelf-2); background: color-mix(in srgb, var(--tint) 22%, var(--shelf)); }
.entry-media .entry-art-logo { width: 88px; height: 88px; object-fit: cover; border-radius: 22%; box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .45); }
.entry:hover .entry-media .entry-art-logo { transform: none; }
.entry-media .entry-art-logo.glyph { display: grid; place-items: center; background: var(--card); color: var(--ink); border-radius: 22px; }
.entry-art-logo.glyph svg { width: 40px; height: 40px; }
.entry-body { display: grid; gap: var(--s3); align-content: start; min-width: 0; }
.entry-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s4); align-items: start; }
.entry-main { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s3); align-items: center; text-decoration: none; color: inherit; min-width: 0; }
.entry-main:hover .entry-name { color: var(--green); }
.entry-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-weight: 600; font-size: 1.125rem; color: var(--ink); }
.entry-type { font-size: var(--t-meta); font-weight: 600; color: var(--ink-3); border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 6px; white-space: nowrap; }
.entry-desc { display: block; color: var(--ink-2); font-size: 0.9375rem; margin-top: 2px; }
.entry-caps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.entry-caps li { padding: 3px 10px; border-radius: 6px; background: var(--green-tint); color: var(--green); font-size: var(--t-meta); font-weight: 600; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s5); padding-top: var(--s3); border-top: 1px solid var(--line); }
.entry-meta .plats { margin-top: 0; }
.entry-version { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-small); color: var(--ink); }
.entry-version svg { width: 15px; height: 15px; color: var(--ink-3); }
.entry-version .meta { font-size: var(--t-small); }
.entry-action { display: flex; justify-content: flex-end; }
.entry-action a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; min-width: 150px;
  padding: 6px 16px; border-radius: var(--r-control); text-decoration: none; font-weight: 600; font-size: var(--t-small); line-height: 1.2;
}
.entry-action a svg { width: 18px; height: 18px; flex: none; }
.entry-action a > span { display: grid; text-align: left; }
.entry-action .details { border: 1px solid var(--line-strong); color: var(--ink); background: var(--paper); }
.entry-action .details:hover { border-color: var(--ink-3); color: var(--ink); }
.entry-action .details svg * { fill: currentColor; }
.entry-action .details svg[stroke] *, .entry-action .details svg[stroke] { fill: none; }
.entry-action .get { display: none; background: var(--green); color: var(--on-green); }
.entry-action .get:hover { background: var(--green-hover); color: var(--on-green); }
.entry-action .get small { font-weight: 500; font-size: var(--t-meta); color: var(--on-green-2); }
/* This device's download replaces Details; any other device sees Details. */
html[data-os="windows"] .get[data-for-os="windows"],
html[data-os="linux"] .get[data-for-os="linux"],
html[data-os="android"] .get[data-for-os="android"] { display: inline-flex; }
html[data-os="windows"] .entry-action[data-oses~="windows"] .details,
html[data-os="linux"] .entry-action[data-oses~="linux"] .details,
html[data-os="android"] .entry-action[data-oses~="android"] .details { display: none; }
.no-results { padding: var(--s8) 0; text-align: center; }
.no-results p { color: var(--ink-2); margin-block: var(--s2) var(--s4); }

/* ── Product page ────────────────────────────────────────────────────── */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: var(--t-small); color: var(--ink-3); padding-top: var(--s5); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--green); text-decoration: underline; }
.crumbs span[aria-hidden] { color: var(--line-strong); }
.product-hero { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--s6); padding-block: var(--s5) var(--s7); align-items: start; }
.product-hero .app-icon { width: 112px; height: 112px; border-radius: var(--r-icon); }
.product-hero .app-icon.glyph { display: grid; place-items: center; background: var(--shelf-2); color: var(--ink-2); border-radius: 24px; }
.product-hero .app-icon.glyph svg { width: 48px; height: 48px; }
.product-hero h1 { margin-bottom: var(--s2); }
.product-hero .lead { color: var(--ink); }
.product-hero .downloads { grid-column: 1 / -1; margin-top: 0; max-width: none; }
/* The download buttons share one row height, whatever their labels wrap to. */
.dl-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); align-items: stretch; }
.dl-list li { display: flex; }
.dl-list .dl { width: 100%; height: 100%; align-content: center; }
.product-meta { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); margin-top: var(--s4); font-size: var(--t-small); color: var(--ink-2); }
.product-meta a { color: var(--ink-2); }
.product-meta .plats { margin-top: 0; }
.downloads { margin-top: var(--s6); display: grid; gap: var(--s3); max-width: 720px; }
.dl-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: var(--s3); }
.dl {
  display: grid; grid-template-columns: 28px 1fr; gap: 2px var(--s3); align-items: center; padding: 12px 16px; min-height: 64px;
  border: 1px solid var(--line-strong); border-radius: var(--r-control); text-decoration: none; color: var(--ink); background: var(--paper);
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.dl svg { width: 26px; height: 26px; grid-row: span 2; }
.dl strong { font-size: 0.9375rem; font-weight: 600; }
.dl small { font-size: var(--t-meta); color: var(--ink-3); grid-column: 2; }
.dl:hover { border-color: var(--ink-3); color: var(--ink); }
.dl.for-you { background: var(--green); border-color: var(--green); color: var(--on-green); }
.dl.for-you small { color: var(--on-green-2); }
.dl.for-you:hover { background: var(--green-hover); }
.dl-note { font-size: var(--t-small); color: var(--ink-2); }
details.help { font-size: 0.9375rem; }
details.help summary { cursor: pointer; font-weight: 600; color: var(--green); min-height: 44px; display: inline-flex; align-items: center; }
details.help ul { margin: var(--s2) 0 0 var(--s5); color: var(--ink-2); display: grid; gap: var(--s2); }

.product-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(32px, 5vw, 64px); align-items: start; padding-bottom: var(--s8); }
.product-body > aside { position: sticky; top: 92px; display: grid; gap: var(--s4); }
.prose-block { padding-top: var(--s7); }
.prose-block:first-child { padding-top: var(--s5); }
.prose-block h2 { margin-bottom: var(--s4); }
.prose-block > p { max-width: 68ch; color: var(--ink-2); font-size: 1.0625rem; line-height: 1.7; }
.gallery { list-style: none; display: grid; gap: var(--s4); }
.gallery.wide { grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.gallery.tall { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.gallery button { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: var(--r-media); overflow: hidden; background: var(--shelf); cursor: zoom-in; }
.gallery button:hover { border-color: var(--ink-3); }
.gallery figcaption { margin-top: var(--s2); font-size: var(--t-small); color: var(--ink-3); }
.feature-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: var(--s5) var(--s6); }
.feature-grid h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 4px; }
.feature-grid p { color: var(--ink-2); font-size: 0.9375rem; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--s5) var(--s6); }
.steps h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: var(--s2); }
.steps ol { padding-left: 1.3em; color: var(--ink-2); display: grid; gap: 6px; font-size: 0.9375rem; }
.notes-list { list-style: none; display: grid; gap: var(--s3); max-width: 68ch; }
.notes-list li { padding-left: var(--s5); position: relative; color: var(--ink-2); overflow-wrap: anywhere; }
.notes-list li::before { content: ""; position: absolute; left: 4px; top: .7em; width: 7px; height: 7px; border-radius: 2px; background: var(--green); }
.release-notes { max-width: 68ch; color: var(--ink-2); }
.release-notes h3 { font-size: 1.0625rem; color: var(--ink); margin: var(--s4) 0 var(--s2); }
.release-notes ul { padding-left: 1.2em; display: grid; gap: 6px; }
.release-notes p + p, .release-notes ul + p { margin-top: var(--s3); }
.tags { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; }
.tags li { padding: 4px 10px; border: 1px solid var(--line-strong); border-radius: 6px; font-size: var(--t-small); color: var(--ink-2); }
.licence-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--s5); margin-top: var(--s4); }
.licence-cols h3 { font-size: var(--t-small); font-weight: 600; margin-bottom: var(--s2); }
.licence-cols ul { padding-left: 1.1em; color: var(--ink-2); display: grid; gap: 4px; font-size: 0.9375rem; }
.facts { border-top: 2px solid var(--ink); }
.facts h2 { font: 600 var(--t-small)/1.4 var(--font-ui); padding-block: var(--s3); }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; }
.facts dt, .facts dd { margin: 0; padding-block: 10px; border-top: 1px solid var(--line); font-size: var(--t-small); }
.facts dt { color: var(--ink-3); padding-right: var(--s4); }
.facts dd { color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.related { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 0 var(--s6); }
.related li { border-top: 1px solid var(--line); }
.related a { display: grid; grid-template-columns: 44px 1fr; gap: var(--s3); align-items: center; padding-block: var(--s4); text-decoration: none; color: inherit; }
.related a:hover strong { color: var(--green); }
.related img, .related .glyph { width: 44px; height: 44px; border-radius: var(--r-icon); }
.related .glyph { display: grid; place-items: center; background: var(--shelf-2); color: var(--ink-2); border-radius: 10px; }
.related .glyph svg { width: 22px; height: 22px; }
.related strong { display: block; color: var(--ink); }
.related span { font-size: var(--t-small); color: var(--ink-3); }

.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--s7) var(--s5); background: rgba(12, 15, 22, .92); }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(1600px, 100%); max-height: calc(100vh - 140px); width: auto; border-radius: var(--r-media); }
.lightbox p { position: absolute; bottom: var(--s5); left: var(--s5); right: var(--s5); text-align: center; color: #dfe3ec; font-size: var(--t-small); }
.lightbox button { position: absolute; top: var(--s4); right: var(--s4); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: grid; place-items: center; }
.lightbox button svg { width: 22px; height: 22px; }

/* ── Simple pages ────────────────────────────────────────────────────── */
.text-page { padding-block: var(--s5) var(--s8); }
.text-page > * { max-width: 760px; }   /* the page keeps the site's edges; lines stay readable */
.text-page h2 { margin: var(--s7) 0 var(--s3); }
.text-page p { color: var(--ink-2); margin-top: var(--s3); font-size: 1.0625rem; line-height: 1.7; }
.timeline { list-style: none; display: grid; margin-top: var(--s4); }
.timeline li { padding-block: var(--s4); border-top: 1px solid var(--line); }
.timeline h3 { font-size: 1.0625rem; font-weight: 600; }
.timeline .meta { margin-bottom: var(--s2); }
.timeline ul { padding-left: 1.2em; color: var(--ink-2); display: grid; gap: 4px; font-size: 0.9375rem; }
.month { margin-top: var(--s6); }
.month h2 { font: 600 var(--t-small)/1.4 var(--font-ui); color: var(--ink-3); padding-bottom: var(--s2); border-bottom: 2px solid var(--ink); }

/* ── About ─────────────────────────────────────────────────────────── */
.profile { padding-block: clamp(32px, 6vw, 72px) var(--s8); }
.profile-head { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: clamp(24px, 5vw, 56px); align-items: center; padding-bottom: var(--s7); border-bottom: 1px solid var(--line); }
.portrait { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; }
.profile-handle { font-size: var(--t-small); font-weight: 600; color: var(--green); margin-bottom: var(--s1); }
.profile-role { font-size: var(--t-lead); color: var(--ink-2); margin-top: var(--s2); }
.catchphrase { margin: var(--s5) 0 0; padding-left: var(--s4); border-left: 3px solid var(--lamp); }
.catchphrase p { font: italic 500 1.5rem/1.3 var(--font-display); color: var(--ink); }
.profile-links { display: flex; flex-wrap: wrap; gap: 0 var(--s5); margin-top: var(--s4); }
.profile-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; font-size: var(--t-small); }
.profile-body { max-width: 820px; }
.profile-body section { padding-top: var(--s7); }
.profile-body section > p { color: var(--ink-2); font-size: 1.0625rem; line-height: 1.7; }
.profile-summary { padding-top: var(--s6) !important; }
.profile-summary p { font-size: 1.1875rem; line-height: 1.65; color: var(--ink); max-width: 66ch; }
.profile-summary p + p { margin-top: var(--s4); }
.profile-body h2 { margin-bottom: var(--s4); }
.roles { list-style: none; }
.roles > li { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: var(--s5); padding-block: var(--s5); border-top: 1px solid var(--line); }
.role-when { font-size: var(--t-small); color: var(--ink-3); padding-top: 3px; }
.roles h3 { font-size: 1.125rem; font-weight: 600; }
.role-org { color: var(--ink-2); font-size: var(--t-small); margin-top: 2px; }
.roles ul { margin-top: var(--s3); padding-left: 1.1em; display: grid; gap: 6px; color: var(--ink-2); font-size: 0.9375rem; }
.skills { margin: 0; display: grid; }
.skills > div { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: var(--s5); padding-block: var(--s3); border-top: 1px solid var(--line); }
.skills dt { font-weight: 600; font-size: 0.9375rem; }
.skills dd { margin: 0; color: var(--ink-2); font-size: 0.9375rem; }
@media (max-width: 720px) {
  .profile-head { grid-template-columns: 1fr; justify-items: start; }
  .portrait { width: 140px; height: 140px; }
  .roles > li, .skills > div { grid-template-columns: 1fr; gap: var(--s1); }
}

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer { background: var(--shelf); border-top: 1px solid var(--line); padding-block: var(--s5); font-size: var(--t-small); color: var(--ink-2); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s5); }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 var(--s5); }
.footer-links a { color: var(--ink-2); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--green); text-decoration: underline; }
.footer-base { margin-top: var(--s2); padding-top: var(--s3); border-top: 1px solid var(--line-strong); font-size: var(--t-meta); color: var(--ink-3); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .product-body { grid-template-columns: 1fr; }
  .product-body > aside { position: static; }
  .intro-grid { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 200px minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .toolbar { position: static; }
  .toolbar-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
  .field-search { grid-column: 1 / -1; }
  .select { width: 100%; padding-right: 28px; background-position: right 8px center; font-size: var(--t-small); }
  .facts-row { grid-template-columns: 1fr; gap: var(--s3); }
  .entry { grid-template-columns: 1fr; gap: var(--s3); padding: var(--s3); }
  .entry-media { aspect-ratio: 16 / 9; }
  .entry-top { grid-template-columns: 1fr; }
  .entry-action { justify-content: stretch; }
  .entry-action a { width: 100%; }
  .product-hero { grid-template-columns: 72px minmax(0, 1fr); gap: var(--s4); }
  .product-hero .app-icon { width: 72px; height: 72px; }
  .product-hero .downloads { grid-column: 1 / -1; }
}
@media (min-width: 1800px) {
  :root { --wrap: 1320px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Brand marks follow the text colour, so a logo never fights the button it sits in. */
.plat svg *, .dl svg *, .btn-primary svg * { fill: currentColor; }

/* The download for the visitor's own device comes first and is the primary
   action; the order is CSS only, so nothing moves after the page appears.
   An unknown device (macOS, iOS, anything else) gets the first build. */
html[data-os="windows"] .dl-list li[data-for-os="windows"],
html[data-os="linux"] .dl-list li[data-for-os="linux"],
html[data-os="android"] .dl-list li[data-for-os="android"] { order: -1; }
html[data-os="windows"] .dl-list li[data-for-os="windows"] .dl,
html[data-os="linux"] .dl-list li[data-for-os="linux"] .dl,
html[data-os="android"] .dl-list li[data-for-os="android"] .dl,
html:not([data-os="windows"]):not([data-os="linux"]):not([data-os="android"]) .dl-list li:first-child .dl {
  background: var(--green); border-color: var(--green); color: var(--on-green);
}
html[data-os="windows"] .dl-list li[data-for-os="windows"] .dl small,
html[data-os="linux"] .dl-list li[data-for-os="linux"] .dl small,
html[data-os="android"] .dl-list li[data-for-os="android"] .dl small,
html:not([data-os="windows"]):not([data-os="linux"]):not([data-os="android"]) .dl-list li:first-child .dl small { color: var(--on-green-2); }

/* ── Footer credits ─────────────────────────────────────────────────── */
.credits { width: 100%; font-size: var(--t-meta); color: var(--ink-3); }
.credits a { color: var(--ink-2); }

/* ── Icon-led, filled sections ──────────────────────────────────────── */
.sec-title { display: flex; align-items: center; gap: var(--s3); }
.sec-title svg { width: 40px; height: 40px; padding: 9px; border-radius: 11px; background: var(--green-tint); color: var(--green); flex: none; }
.sec-mini { display: flex; align-items: center; gap: var(--s2); }
.sec-mini svg { width: 20px; height: 20px; color: var(--green); }
.product-body > div > .prose-block {
  margin-top: var(--s5); padding: clamp(18px, 3vw, 28px); background: var(--card);
  border: 1px solid var(--line); border-radius: 14px;
}
.product-body > div > .prose-block:first-child { margin-top: 0; }
.feature-grid li { padding: var(--s4); border-radius: 12px; background: var(--shelf); }
.feat-icon { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--paper); color: var(--green); margin-bottom: var(--s2); border: 1px solid var(--line); }
.feat-icon svg { width: 20px; height: 20px; }
.step { position: relative; padding: var(--s4) var(--s4) var(--s4) 60px; border-radius: 12px; background: var(--shelf); }
.step-n { position: absolute; left: var(--s4); top: var(--s4); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: var(--on-green); font-weight: 600; font-size: var(--t-small); }
.downloads { padding: var(--s4); border-radius: 14px; background: var(--shelf); border: 1px solid var(--line); }

/* ── Rail (Rare UI rail-toc pattern) and reading progress ───────────── */
.read-progress { position: sticky; top: 68px; z-index: 40; height: 3px; }
.read-progress span { display: block; height: 100%; background: var(--green); transform: scaleX(0); transform-origin: left; }
.rail { position: relative; padding: var(--s4) var(--s4) var(--s4) var(--s6); background: var(--card); border: 1px solid var(--line); border-radius: 14px; --rail-fill: 0px; }
.rail-title { font-size: var(--t-small); font-weight: 600; margin-bottom: var(--s2); }
.rail ol { list-style: none; position: relative; }
.rail ol::before, .rail ol::after { content: ""; position: absolute; left: -15px; top: 0; width: 2px; border-radius: 2px; }
.rail ol::before { bottom: 0; background: var(--line); }
.rail ol::after { height: var(--rail-fill); background: var(--green); transition: height .45s cubic-bezier(.34, 1.3, .64, 1); }
.rail li a { display: flex; align-items: center; min-height: 36px; font-size: var(--t-small); color: var(--ink-2); text-decoration: none; }
.rail li a:hover { color: var(--green); }
.rail li a.reached { color: var(--ink); }
.rail li a[aria-current] { color: var(--green); font-weight: 600; }
.rail-marker { position: absolute; left: calc(var(--s6) - 20px); top: calc(var(--s4) + 26px); width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--green); transition: transform .45s cubic-bezier(.34, 1.3, .64, 1); }
.facts { padding: var(--s4); background: var(--card); border: 1px solid var(--line); border-radius: 14px; border-top: 1px solid var(--line); }
.facts dt { display: flex; align-items: center; gap: 6px; }
.facts dt svg { width: 15px; height: 15px; color: var(--ink-3); flex: none; }

/* ── About ──────────────────────────────────────────────────────────── */
.profile-head { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 4vw, 40px); border-bottom: 1px solid var(--line); }
.profile-links { gap: var(--s2); }
.profile-links a { gap: 8px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-control); color: var(--ink); text-decoration: none; background: var(--paper); }
.profile-links a:hover { border-color: var(--green); color: var(--green); }
.profile-links a svg { width: 18px; height: 18px; }
.profile-links a svg * { fill: currentColor; }
.profile-links a svg[stroke] *, .profile-links a svg[stroke] { fill: none; }
.roles { display: grid; gap: var(--s3); }
.roles > .role { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: var(--s4); padding: var(--s5); border: 1px solid var(--line); border-top: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.role-icon { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--green-tint); color: var(--green); }
.role-icon svg { width: 24px; height: 24px; }
.role-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px var(--s4); }
.role-when { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-small); color: var(--ink-3); padding-top: 0; }
.role-when svg { width: 14px; height: 14px; }
.store-note { margin-top: var(--s7); padding: var(--s5) !important; background: var(--shelf); border: 1px solid var(--line); border-radius: 14px; }

/* ── Terms ──────────────────────────────────────────────────────────── */
.panel { padding: var(--s5); background: var(--card); border: 1px solid var(--line); border-radius: 14px; }
.terms-cols { margin-block: var(--s5); }
.text-page > ul { padding-left: 1.1em; display: grid; gap: 4px; }

@media (max-width: 720px) {
  .roles > .role { grid-template-columns: 1fr; }
  .step { padding-left: var(--s4); padding-top: 56px; }
  .glass-filters { gap: var(--s2); }
}

/* ══ Glass: frost, saturation, a lit rim ═══════════════════════════════ */

.glass,
.product-body > div > .prose-block, .downloads, .rail, .facts,
.profile-head, .roles > .role, .store-note, .panel {
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-rim), var(--glass-shadow);
}
.feature-grid li, .step { background: var(--glass-inner); border: 1px solid var(--glass-border); }
.entry-media { background: var(--glass-inner); }
.entry-media .entry-art { background: color-mix(in srgb, var(--tint) 34%, transparent); }

/* Header: frosted glass over the scene. */
.site-header { background: var(--glass); -webkit-backdrop-filter: blur(22px) saturate(1.8); backdrop-filter: blur(22px) saturate(1.8); border-bottom: 1px solid var(--glass-border); }
.site-header { isolation: isolate; }

/* Intro and search sit on glass too. */
.intro { background: transparent; border-bottom: 0; padding-top: var(--s5); }
.intro-grid { border-radius: 22px; padding: clamp(20px, 4vw, 44px) !important; }
/* The search scrolls with the page: a floating panel over the cards made
   the result count land on top of them. */
.toolbar { position: static; background: transparent; border-bottom: 0; box-shadow: none; }
.site-footer { margin-top: var(--s7); border-top: 1px solid var(--glass-border); }
/* Short pages keep the footer at the bottom of the window. */
body { display: flex; flex-direction: column; min-height: 100dvh; }
#main { flex: 1 0 auto; }

/* Filled icon tiles. */
.tile { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px;
  background: var(--green); color: var(--on-green); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 14px -8px var(--glow); }
.tile svg { width: 21px; height: 21px; padding: 0 !important; background: none !important; border-radius: 0 !important; color: inherit !important; border: 0 !important; margin: 0 !important; }
.facts-row li { grid-template-columns: 40px 1fr; }
.feat-icon.tile { width: 38px; height: 38px; margin-bottom: var(--s2); }
.role-icon.tile { width: 48px; height: 48px; border-radius: 14px; }
.role-icon.tile svg { width: 24px; height: 24px; }

/* Rare UI grid-reveal: card pictures arrive by un-blurring, once loaded. */
.js .entry-media img { opacity: 0; filter: blur(10px); transition: opacity .5s var(--ease), filter .6s var(--ease), transform .35s var(--ease); }
.js .entry-media img.is-in { opacity: 1; filter: none; }

/* Touch screens: frost without live blur, so scrolling stays smooth. */
@media (hover: none) {
  .glass, .site-header,
  .product-body > div > .prose-block, .downloads, .rail, .facts,
  .profile-head, .roles > .role, .store-note, .panel {
    -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-strong);
  }
}
@media (max-width: 480px) {
  .theme-opt span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js .entry-media img { opacity: 1; filter: none; }
}

/* ══ Alignment pass ═════════════════════════════════════════════════════ */
/* Card: picture | text | action, the action centred in its own column. */
.entry { grid-template-columns: 240px minmax(0, 1fr) 168px; align-items: center; }
.entry-top { grid-template-columns: 1fr; }
.entry > .entry-action { align-self: center; justify-content: center; }
.entry > .entry-action a { width: 100%; min-width: 0; }

/* The Cypher Store app, in the opening panel. */
.store-app-cta { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: var(--s4); align-items: center;
  margin-top: var(--s5); padding: var(--s4); border-radius: 16px; background: var(--glass-inner); border: 1px solid var(--glass-border); }
.store-app-cta img { width: 56px; height: 56px; border-radius: 14px; }
.store-app-cta strong { display: block; font-size: 1.0625rem; }
.store-app-cta span { display: block; font-size: var(--t-small); color: var(--ink-2); margin-top: 2px; }
.store-app-cta .btn svg * { fill: none; }

@media (max-width: 1024px) {
  .entry { grid-template-columns: 200px minmax(0, 1fr); }
  .entry > .entry-action { grid-column: 2; justify-content: flex-start; }
  .entry > .entry-action a { width: auto; min-width: 168px; }
}
@media (max-width: 720px) {
  .entry { grid-template-columns: 1fr; }
  .entry > .entry-action { grid-column: auto; }
  .entry > .entry-action a { width: 100%; }
  .store-app-cta { grid-template-columns: 48px minmax(0, 1fr); }
  .store-app-cta img { width: 48px; height: 48px; }
  .store-app-cta .btn { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .nav-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav a { padding: 0 12px; }
}

@media (max-width: 360px) {
  .header-row { gap: 4px; }
  .nav a { padding: 0 8px; }
  .brand img { width: 32px; height: 32px; }
}

/* ══ Tiles ══════════════════════════════════════════════════════════════
   The directory as a grid of tiles. Hovering a tile lifts and tilts it toward
   the pointer, a soft light follows the cursor, its picture zooms and its icon
   pops; tiles rise into place as they scroll in. All motion is transform and
   opacity, off for reduced motion, and tilt-free on touch screens. */
.entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: var(--s5); }
.entries .entry {
  position: relative; display: flex; flex-direction: column; gap: 0; padding: 0; overflow: hidden; border-radius: 22px;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px));
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s var(--ease), border-color .3s var(--ease);
}
.entries .entry:hover { --lift: -8px; border-color: var(--green); box-shadow: var(--glass-rim), 0 26px 40px -24px rgba(21, 26, 36, .45); }
.entries .entry::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .35s var(--ease);
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .28), transparent 42%);
}
.entries .entry:hover::after { opacity: 1; }
.entries .entry-media { border-radius: 0; aspect-ratio: 16 / 10; position: relative; }
.entries .entry-top { grid-template-columns: 1fr; }
.entries .entry-meta { margin-top: auto; }
.entries .entry > .entry-action { margin-top: 0; padding: var(--s4) var(--s5) var(--s5); align-self: stretch; justify-content: center; grid-column: auto; }
.entries .entry > .entry-action a { width: 100%; min-width: 0; justify-content: center; }
.entries .entry > .entry-action a > span { text-align: left; }

/* Scroll entrance: separate translate/opacity so it never fights the tilt. */

@media (hover: none) {
  .entries .entry:active { --lift: -3px; }
  .entries .entry::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .entries .entry, .entries .entry:hover { transform: none; }
    .entries .entry:hover .entry-media .entry-art-logo { transform: none; }
}

/* The picture fills the tile's width (an older start alignment shrank it). */
.entries .entry-media { align-self: stretch; width: 100%; }
/* The store app's only build is the APK: its button shows on every device. */
.entry-action .get.always { display: inline-flex; }

/* ══ Themes ═════════════════════════════════════════════════════════════
   Ten themes, each in light and dark: assets/themes.css (generated from
   site/themes.js) sets the colour tokens and --font-display under
   html[data-theme][data-mode]; the theme's three.js scene draws on #bg. */
#bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; opacity: .95; }
body { background: var(--paper); transition: background-color .45s var(--ease), color .45s var(--ease); }
/* Display faces come in the weights the theme was drawn with; never a fake bold. */
.h1, .h2, .display, .brand span, .sec-title, .entry-name { font-synthesis-weight: none; }
.h1, .h2, .display { font-weight: 600; }

/* Filled buttons and icon tiles take the theme's accent. */
.btn-primary, .entry-action .get, .dl.for-you, .step-n { background: var(--green); border-color: var(--green); color: var(--on-green); }
.btn-primary:hover, .entry-action .get:hover { background: var(--green-hover); color: var(--on-green); }
.entry-action .get small { color: var(--on-green-2); }
.tile { background: linear-gradient(135deg, var(--green), color-mix(in srgb, var(--green) 62%, var(--lamp))); color: var(--on-green);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 6px 14px -8px var(--glow); }
.entries .entry:hover, .entries .entry:focus-within { border-color: var(--line-strong); box-shadow: var(--glass-rim), 0 0 0 1px var(--line-strong), 0 18px 40px -22px var(--glow); }

/* ── Header: light/dark switch and the theme picker ────────────────── */
.theme-tools { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.icon-btn, .theme-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); border-radius: var(--r-control); background: var(--glass-inner); color: var(--ink); cursor: pointer; font: inherit; }
.icon-btn { width: 44px; }
.icon-btn svg, .theme-btn svg { width: 18px; height: 18px; flex: none; }
.icon-btn:hover, .theme-btn:hover { border-color: var(--line-strong); }
html[data-mode="light"] .mode-sun, html[data-mode="dark"] .mode-moon { display: none; }
.theme-btn { padding: 0 10px; font-size: var(--t-small); font-weight: 500; }
.theme-pick { position: relative; }
.theme-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(440px, calc(100vw - 2 * var(--gutter)));
  max-height: min(70vh, 560px); overflow: auto; overscroll-behavior: contain; padding: var(--s2); border-radius: 16px;
  background: var(--card); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); }
.theme-panel[hidden] { display: none; }
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
@media (max-width: 440px) { .theme-grid { grid-template-columns: 1fr; } }
.theme-opt { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 6px 10px; border: 0; border-radius: 10px;
  background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: background-color .15s var(--ease); }
.theme-opt:hover { background: var(--shelf); }
.theme-opt[aria-checked="true"] { background: var(--green-tint); }
.theme-opt:focus-visible { outline: 2px solid var(--green); outline-offset: 1px; }
.theme-ico { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 9px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25), 0 2px 6px -2px rgba(0, 0, 0, .45); }
.theme-ico svg { width: 18px; height: 18px; }
.theme-card-name { flex: 1; font-size: var(--t-small); font-weight: 500; }
.theme-check { width: 16px; height: 16px; flex: none; color: var(--green); opacity: 0; }
.theme-opt[aria-checked="true"] .theme-check { opacity: 1; }
.theme-current { display: contents; }
.theme-btn .theme-ico { width: 24px; height: 24px; border-radius: 7px; }
.theme-btn .theme-ico svg { width: 14px; height: 14px; }
@media (max-width: 560px) {
  .theme-btn-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .theme-btn { padding: 0 8px; }
}
@media (prefers-reduced-motion: reduce) { body, .theme-opt { transition: none; } }

/* ── react-kino: each animated element carries --kp, its scroll progress
   through the viewport (0 entering, 1 gone). Only under html.kino, which
   the island sets once it is running: without it everything sits still. */
html.kino .entries .entry {
  --kin: min(1, calc(var(--kp, 1) * 2.4));
  translate: 0 calc((1 - var(--kin)) * 36px);
  scale: calc(.96 + .04 * var(--kin));
  opacity: calc(.25 + .75 * var(--kin));
}
html.kino .intro-art img { translate: 0 calc((var(--kp, .5) - .5) * -40px); }
html.kino .sec-title, html.kino .roles > .role {
  --kin: min(1, calc(var(--kp, 1) * 3));
  opacity: calc(.2 + .8 * var(--kin));
  translate: 0 calc((1 - var(--kin)) * 24px);
}

/* ══ Tiles: the app's logo, then its text, then one button ══════════════
   Every tile in a row is the same height: the platforms-and-version line
   and the button sit at the bottom, so a row lines up whatever the text. */
.entries { grid-template-columns: repeat(auto-fill, minmax(min(100%, 268px), 1fr)); gap: var(--s4); align-items: stretch; }
.entries .entry { border-radius: 18px; }
.entries .entry-media { aspect-ratio: 16 / 9; border-radius: 0; width: 100%; align-self: stretch; }
.entries .entry-art {
  background: radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--tint) 42%, transparent), transparent 68%),
              color-mix(in srgb, var(--tint) 16%, var(--card));
}
.entries .entry-media .entry-art-logo { width: 88px; height: 88px; border-radius: 22%; box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .55);
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1); }
.entries .entry:hover .entry-media .entry-art-logo { transform: scale(1.08) rotate(-4deg); }
.entries .entry-body { display: flex; flex-direction: column; flex: 1; gap: var(--s3); margin: 0; padding: var(--s4) var(--s4) 0; }
.entries .entry-top, .entries .entry-main { display: block; }
.entries .entry-name { padding: 0; font-size: 1rem; line-height: 1.3; gap: 2px 6px; align-items: center; }
.entries .entry-type { font-size: 0.75rem; padding: 0 5px; }
.entries .entry-desc { margin-top: var(--s1); font-size: 0.875rem; line-height: 1.5; min-height: 3em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.entries .entry-caps li { font-size: 0.75rem; padding: 2px 8px; }
.entries .entry-caps li:nth-child(n+3) { display: none; }
.entries .entry-meta { margin-top: auto; flex-direction: column; align-items: flex-start; gap: var(--s1); padding-top: var(--s3); }
.entries .entry-meta .plats { font-size: 0.8125rem; gap: 2px 10px; }
.entries .entry-version { font-size: 0.8125rem; }
.entries .entry > .entry-action { padding: var(--s3) var(--s4) var(--s4); justify-content: center; }
.entries .entry > .entry-action a { min-height: 44px; width: 100%; justify-content: center; font-size: 0.8125rem; }
@media (prefers-reduced-motion: reduce) { .entries .entry:hover .entry-media .entry-art-logo { transform: none; } }

/* Wider screens hold more tiles, not bigger ones. */
@media (min-width: 1600px) { :root { --wrap: 1440px; } }
@media (min-width: 2200px) { :root { --wrap: 1800px; } }
@media (min-width: 3000px) { :root { --wrap: 2200px; } html { font-size: 112.5%; } }

/* Previous and next app, at the foot of every app page. */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); margin-top: var(--s7); }
.pager a { display: flex; align-items: center; gap: var(--s3); min-height: 64px; padding: var(--s3) var(--s4); border-radius: 16px;
  background: var(--glass); border: 1px solid var(--glass-border); box-shadow: var(--glass-rim); color: var(--ink); text-decoration: none;
  -webkit-backdrop-filter: blur(22px) saturate(1.6); backdrop-filter: blur(22px) saturate(1.6); font-weight: 600; transition: box-shadow .2s var(--ease), transform .2s var(--ease); }
.pager a span { display: grid; min-width: 0; overflow-wrap: anywhere; }
.pager small { font-size: var(--t-meta); font-weight: 500; color: var(--ink-3); }
.pager-next { justify-content: flex-end; text-align: right; }
.pager a svg { width: 20px; height: 20px; flex: none; color: var(--green); }
.pager a:hover { box-shadow: var(--glass-rim), 0 0 0 1px var(--line-strong); }
.pager a:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (hover: none) { .pager a { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-strong); } }
@media (prefers-reduced-motion: reduce) { .pager a { transition: none; } }

/* ══ Hover: every theme answers the pointer in its own way ══════════════
   Shared: the tile lifts, a light in the theme's accent follows the
   pointer, and the logo pops. Per theme: one effect drawn from the
   theme's world. Only shadows, overlays, filters and the logo's transform
   move, so the scroll animation (translate/scale) and the tilt
   (transform) are never touched. No motion under reduced motion. */
.entries .entry::before { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .35s var(--ease); }
.entries .entry::after { background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), color-mix(in srgb, var(--green) 24%, transparent), transparent 46%); }
@media (hover: hover) {
  .entries .entry:hover { --lift: -10px; }
  .entries .entry:hover::before { opacity: 1; }

  /* Windvale: the logo sways in a breeze, under a soft green glow. */
  html[data-theme="windvale"] .entries .entry:hover { box-shadow: 0 0 0 1px var(--green), 0 22px 44px -18px color-mix(in srgb, var(--green) 55%, transparent); }
  html[data-theme="windvale"] .entries .entry:hover .entry-art-logo { animation: hv-sway 1.8s ease-in-out infinite; }

  /* Redblood: embers warm the tile from below; the logo smoulders. */
  html[data-theme="redblood"] .entries .entry::before { background: radial-gradient(120% 55% at 50% 112%, rgba(255, 96, 32, .38), transparent 70%); }
  html[data-theme="redblood"] .entries .entry:hover { box-shadow: 0 0 0 1px var(--green), 0 20px 50px -14px rgba(255, 70, 20, .5); }
  html[data-theme="redblood"] .entries .entry:hover .entry-art-logo { animation: hv-ember 1.1s ease-in-out infinite alternate; }

  /* Saltmark: a swell of light rolls across; the logo bobs on the water. */
  html[data-theme="saltmark"] .entries .entry::before { background: linear-gradient(100deg, transparent 35%, color-mix(in srgb, var(--green) 28%, transparent) 50%, transparent 65%) 0 0 / 300% 100%; }
  html[data-theme="saltmark"] .entries .entry:hover::before { animation: hv-sweep 1.9s ease-in-out infinite; }
  html[data-theme="saltmark"] .entries .entry:hover .entry-art-logo { animation: hv-bob 2.2s ease-in-out infinite; }

  /* Sunstone: one gold shine sweeps the marble. */
  html[data-theme="sunstone"] .entries .entry::before { background: linear-gradient(115deg, transparent 38%, rgba(255, 228, 150, .55) 50%, transparent 62%) 0 0 / 300% 100%; }
  html[data-theme="sunstone"] .entries .entry:hover::before { animation: hv-sweep 1.1s ease-out 1 both; }
  html[data-theme="sunstone"] .entries .entry:hover { box-shadow: 0 0 0 1px #c9a24a, 0 20px 40px -22px rgba(120, 90, 20, .5); }

  /* Frostfall: frost gathers at the edges; the logo shivers. */
  html[data-theme="frostfall"] .entries .entry::before { box-shadow: inset 0 0 0 1px rgba(225, 242, 255, .75), inset 0 0 32px rgba(205, 232, 255, .35); }
  html[data-theme="frostfall"] .entries .entry:hover { --lift: -6px; }
  html[data-theme="frostfall"] .entries .entry:hover .entry-art-logo { animation: hv-shiver .5s steps(2) 2; }

  /* Dustred: low sun turns the panel sepia; the sign tips on its nail. */
  html[data-theme="dustred"] .entries .entry:hover .entry-art { filter: sepia(.45) saturate(1.3); }
  html[data-theme="dustred"] .entries .entry:hover .entry-media .entry-art-logo { transform: rotate(-9deg) scale(1.1); }
  html[data-theme="dustred"] .entries .entry:hover { box-shadow: 0 0 0 1px var(--green), 0 24px 40px -20px rgba(90, 45, 10, .6); }

  /* Neonpunk: a neon edge, and the logo glitches. */
  html[data-theme="neonpunk"] .entries .entry:hover { box-shadow: 0 0 0 1px var(--c-accent), 0 0 22px color-mix(in srgb, var(--c-accent) 55%, transparent), 0 0 64px -12px color-mix(in srgb, var(--c-accent2) 50%, transparent); }
  html[data-theme="neonpunk"] .entries .entry:hover .entry-art-logo { animation: hv-glitch .7s steps(1) 2; }
  html[data-theme="neonpunk"] .entries .entry:hover .entry-name { text-shadow: 0 0 10px color-mix(in srgb, var(--c-accent) 70%, transparent); }

  /* First of Us: the dark closes in around the panel; the logo holds the light. */
  html[data-theme="firstofus"] .entries .entry:hover .entry-art { box-shadow: inset 0 0 48px 14px rgba(0, 0, 0, .5); }
  html[data-theme="firstofus"] .entries .entry:hover .entry-media .entry-art-logo { transform: scale(1.14); filter: drop-shadow(0 0 14px color-mix(in srgb, var(--green) 65%, transparent)); transition-duration: 1.2s; }

  /* Evil Resident: the light stutters and the edge bleeds red. */
  html[data-theme="evilresident"] .entries .entry::before { box-shadow: inset 0 0 0 1px rgba(200, 30, 30, .8), inset 0 0 44px rgba(170, 0, 0, .4); }
  html[data-theme="evilresident"] .entries .entry:hover::before { animation: hv-flicker 1.6s steps(1) infinite; }

  /* Retro Classic: the tile jumps like a sprite onto a hard pixel shadow; the logo bounces like a coin. */
  html[data-theme="retroclassic"] .entries .entry { transition-timing-function: steps(3); }
  html[data-theme="retroclassic"] .entries .entry:hover { --lift: -12px; border-color: var(--green); box-shadow: 6px 6px 0 var(--green); }
  html[data-theme="retroclassic"] .entries .entry::after { display: none; }
  html[data-theme="retroclassic"] .entries .entry:hover .entry-art-logo { animation: hv-coin .45s steps(4) 2; }
}
@keyframes hv-sway { 0%, 100% { transform: rotate(-5deg) scale(1.08); } 50% { transform: rotate(5deg) scale(1.08); } }
@keyframes hv-ember { from { transform: scale(1.06); filter: drop-shadow(0 0 4px rgba(255, 110, 30, .6)); } to { transform: scale(1.1); filter: drop-shadow(0 0 16px rgba(255, 180, 70, .9)); } }
@keyframes hv-sweep { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes hv-bob { 0%, 100% { transform: translateY(0) rotate(-2deg) scale(1.06); } 50% { transform: translateY(-7px) rotate(2deg) scale(1.06); } }
@keyframes hv-shiver { 0% { transform: translateX(-2px) scale(1.06); } 100% { transform: translateX(2px) scale(1.06); } }
@keyframes hv-glitch {
  0% { transform: translate(0) scale(1.08); filter: none; }
  20% { transform: translate(-3px, 2px) scale(1.08); filter: drop-shadow(3px 0 #ff2a6d) drop-shadow(-3px 0 #05d9e8); }
  40% { transform: translate(3px, -2px) scale(1.08); filter: none; }
  60% { transform: translate(-2px, 0) scale(1.08); filter: drop-shadow(-3px 0 #ff2a6d) drop-shadow(3px 0 #05d9e8); }
  80%, 100% { transform: translate(0) scale(1.08); filter: none; }
}
@keyframes hv-flicker { 0%, 100% { opacity: 1; } 7% { opacity: .35; } 9% { opacity: 1; } 52% { opacity: .55; } 54% { opacity: 1; } }
@keyframes hv-coin { 0%, 100% { transform: translateY(0) scale(1.08); } 50% { transform: translateY(-12px) scale(1.08); } }
@media (prefers-reduced-motion: reduce) {
  .entries .entry:hover .entry-art-logo, .entries .entry:hover::before { animation: none !important; }
}

/* ══ Header hover ═══════════════════════════════════════════════════════
   The links draw an accent underline out from the centre and lift their
   icon; the brand's cat tips its head; the header buttons and the theme
   rows pick up the accent and nudge their icon. Transforms only. */
.nav a { position: relative; }
.nav a svg, .brand img, .icon-btn svg, .theme-btn .theme-ico, .theme-opt .theme-ico { transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), color .2s var(--ease); }
.nav a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 2px; border-radius: 2px; background: var(--green);
  transform: scaleX(0); transition: transform .25s var(--ease); }
.nav a[aria-current="page"]::after { display: none; }
@media (hover: hover) {
  .nav a:hover { color: var(--ink); background: var(--green-tint); }
  .nav a:hover::after { transform: scaleX(1); }
  .nav a:hover svg { transform: translateY(-2px) rotate(-8deg); color: var(--green); }
  .brand:hover img { transform: rotate(-8deg) scale(1.08); }
  .icon-btn:hover, .theme-btn:hover { background: var(--green-tint); border-color: var(--green); }
  .icon-btn:hover svg { transform: rotate(25deg) scale(1.1); }
  .theme-btn:hover .theme-ico { transform: rotate(-8deg) scale(1.1); }
  .theme-opt:hover { background: var(--green-tint); }
  .theme-opt:hover .theme-ico { transform: scale(1.14) rotate(-6deg); }
}
.nav a:focus-visible::after { transform: scaleX(1); }

/* ══ Links and buttons hover, per theme ═════════════════════════════════
   The header links and every button answer in their theme's own way too,
   alongside the tiles. Shadows, text-shadow, the underline and icon
   transforms only; nothing moves under reduced motion. */
@media (hover: hover) {
  /* Windvale: icons sway, buttons glow green. */
  html[data-theme="windvale"] .nav a:hover svg { animation: hv-sway 1.6s ease-in-out infinite; }
  html[data-theme="windvale"] :is(.btn, .entry-action a, .dl, .icon-btn, .theme-btn):hover { box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--green) 70%, transparent); }

  /* Redblood: ember-lit text and a flame-coloured underline. */
  html[data-theme="redblood"] .nav a::after { height: 3px; background: linear-gradient(90deg, #ff4b1f, var(--lamp), #ff4b1f); }
  html[data-theme="redblood"] .nav a:hover { text-shadow: 0 0 10px rgba(255, 110, 40, .55); }
  html[data-theme="redblood"] :is(.btn, .entry-action a, .dl, .icon-btn, .theme-btn):hover { box-shadow: 0 0 0 1px var(--lamp), 0 8px 26px -6px rgba(255, 70, 20, .6); }

  /* Saltmark: a wave under the text, buttons ride up on a swell. */
  html[data-theme="saltmark"] .nav a::after { display: none; }
  html[data-theme="saltmark"] .nav a:hover .nav-label { text-decoration: underline wavy var(--green); text-underline-offset: 6px; text-decoration-thickness: 2px; }
  html[data-theme="saltmark"] :is(.btn, .entry-action a, .dl):hover { translate: 0 -2px; box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--green) 60%, transparent); }

  /* Sunstone: a gold shine passes along the link and the buttons. */
  html[data-theme="sunstone"] :is(.nav a, .btn, .entry-action a, .dl):hover {
    background-image: linear-gradient(115deg, transparent 35%, rgba(255, 236, 170, .65) 50%, transparent 65%);
    background-size: 300% 100%; animation: hv-sweep .9s ease-out 1 both; }

  /* Frostfall: an icy glow; icons turn like a snowflake. */
  html[data-theme="frostfall"] .nav a:hover { text-shadow: 0 0 12px rgba(200, 235, 255, .75); }
  html[data-theme="frostfall"] :is(.nav a, .icon-btn):hover svg { transform: rotate(90deg); }
  html[data-theme="frostfall"] :is(.btn, .entry-action a, .dl, .icon-btn, .theme-btn):hover { box-shadow: 0 0 0 1px rgba(220, 240, 255, .8), 0 0 18px rgba(200, 230, 255, .45); }

  /* Dustred: a stitched underline, icons tip, buttons cast a hard sun shadow. */
  html[data-theme="dustred"] .nav a::after { height: 0; background: none; border-bottom: 2px dashed var(--green); }
  html[data-theme="dustred"] .nav a:hover svg { transform: rotate(-14deg) translateY(-1px); }
  html[data-theme="dustred"] :is(.btn, .entry-action a, .dl, .icon-btn, .theme-btn):hover { box-shadow: 3px 3px 0 color-mix(in srgb, var(--green) 55%, #2a1206); }

  /* Neonpunk: neon text, a glowing underline, icons glitch. */
  html[data-theme="neonpunk"] .nav a:hover { text-shadow: 0 0 8px var(--c-accent), 0 0 18px color-mix(in srgb, var(--c-accent) 50%, transparent); }
  html[data-theme="neonpunk"] .nav a::after { box-shadow: 0 0 8px var(--c-accent); }
  html[data-theme="neonpunk"] :is(.nav a, .icon-btn):hover svg { animation: hv-glitch .6s steps(1) 1; }
  html[data-theme="neonpunk"] :is(.btn, .entry-action a, .dl, .icon-btn, .theme-btn):hover { box-shadow: 0 0 0 1px var(--c-accent), 0 0 20px color-mix(in srgb, var(--c-accent) 60%, transparent); }

  /* First of Us: the link fills with growth from below; icons spread slowly. */
  html[data-theme="firstofus"] .nav a::after { left: 0; right: 0; bottom: 0; height: 100%; border-radius: inherit; z-index: -1;
    background: linear-gradient(to top, color-mix(in srgb, var(--green) 28%, transparent), transparent); transform: scaleY(0); transform-origin: bottom; }
  html[data-theme="firstofus"] .nav a:hover::after { transform: scaleY(1); }
  html[data-theme="firstofus"] .nav a:hover svg { transform: scale(1.25); transition-duration: .8s; }
  html[data-theme="firstofus"] :is(.btn, .entry-action a, .dl, .icon-btn, .theme-btn):hover { box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25), 0 10px 22px -12px var(--glow); }

  /* Evil Resident: the underline flickers like a failing bulb; red bleeds at the edges. */
  html[data-theme="evilresident"] .nav a:hover::after { animation: hv-flicker 1.4s steps(1) infinite; }
  html[data-theme="evilresident"] .nav a:hover { text-shadow: 0 0 10px rgba(200, 20, 20, .6); }
  html[data-theme="evilresident"] :is(.btn, .entry-action a, .dl, .icon-btn, .theme-btn):hover { box-shadow: 0 0 0 1px #c81f2a, 0 0 22px -4px rgba(200, 20, 20, .7); }

  /* Retro Classic: pixel steps; the underline jumps in, icons hop, buttons press onto a hard shadow. */
  html[data-theme="retroclassic"] .nav a::after { height: 4px; border-radius: 0; transition-timing-function: steps(4); }
  html[data-theme="retroclassic"] .nav a:hover svg { animation: hv-coin .4s steps(4) 1; }
  html[data-theme="retroclassic"] :is(.btn, .entry-action a, .dl, .icon-btn, .theme-btn) { transition-timing-function: steps(2); }
  html[data-theme="retroclassic"] :is(.btn, .entry-action a, .dl, .icon-btn, .theme-btn):hover { translate: -2px -2px; box-shadow: 4px 4px 0 var(--ink); }
}
@media (prefers-reduced-motion: reduce) {
  :is(.nav a, .nav a svg, .nav a::after, .btn, .entry-action a, .dl, .icon-btn svg) { animation: none !important; }
}

/* The home page's plain answer to "What is Cypher Store?" */
.what-is { padding-block: var(--s7) 0; }
.what-is p { max-width: 760px; margin-top: var(--s3); color: var(--ink-2); font-size: 1.0625rem; line-height: 1.7; }

/* Where else the apps are listed, under the home page's facts */
.also-on { display: flex; gap: var(--s2); align-items: flex-start; margin-top: var(--s4); font-size: var(--t-small); color: var(--ink-2); max-width: 62ch; }
.also-on svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--green); }
