/* DiskSuds — home page.
   Palette, type and materials come from the app itself (Sources/DiskMacApp/Design.swift).
   Subpages keep styles.css; this file is only for the home page and its 3D stage. */

@font-face { font-family: "Manrope"; src: url("assets/fonts/Manrope.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("assets/fonts/DMSans.ttf") format("truetype"); font-weight: 100 1000; font-display: swap; }

:root {
  --night: #070d1a; --bg: #0d1528; --surface: #17223a; --raised: #243752;
  --line: rgba(255, 255, 255, 0.08); --line-2: rgba(255, 255, 255, 0.15);
  --ink: #f0f6ff; --muted: #a7b7d0; --faint: #7386a3;
  --accent: #5fa9f6; --sky: #b2deff; --mint: #8ae2c6; --peach: #e8b686; --rose: #e394bc; --gold: #ffdd8d; --danger: #ffacaf;
  --display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --text: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: max(24px, calc((100vw - 1240px) / 2));
  --nav: 60px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--night); color: var(--ink); font: 400 17px/1.55 var(--text); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--night); padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 8px; }

h1, h2 { font-family: var(--display); font-weight: 760; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 5vw, 4.6rem); line-height: 1.0; letter-spacing: -0.045em; }
h2 { font-size: clamp(2.1rem, 3.5vw, 3.2rem); line-height: 1.03; letter-spacing: -0.04em; }
h3 { font: 700 1.16rem/1.25 var(--display); letter-spacing: -0.02em; }
h1 em { display: block; }
h1 em, h2 em { font-style: normal; background: linear-gradient(100deg, var(--sky) 10%, var(--mint) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { color: var(--muted); font-size: 1.06rem; line-height: 1.58; text-wrap: pretty; }
.sub { color: var(--faint); font-size: 0.82rem; line-height: 1.45; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: var(--sky); font: 650 0.8rem/1 var(--display); letter-spacing: 0.13em; text-transform: uppercase; }
.eyebrow img { width: 26px; height: 26px; }
.center { text-align: center; justify-content: center; margin-left: auto; margin-right: auto; }
.wrap { width: min(1180px, 100% - 48px); margin: 0 auto; }
.wrap.narrow { width: min(820px, 100% - 48px); }

/* ---------- buttons: feedback on the press, not on release ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border: 1px solid transparent; border-radius: 15px; font: 700 0.98rem/1 var(--display); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap; cursor: pointer; transition: transform 0.18s var(--ease), background-color 0.2s, border-color 0.2s, box-shadow 0.2s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(0.97); transition-duration: 0.08s; }
.btn-primary { background: linear-gradient(180deg, #d9f0ff, #a5d3fb); color: #06203f; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 14px 36px -14px rgba(95, 169, 246, 0.85); }
.btn-primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 44px -12px rgba(95, 169, 246, 1); }
.btn-quiet { background: rgba(255, 255, 255, 0.06); border-color: var(--line-2); color: var(--ink); }
.btn-quiet:hover { background: rgba(255, 255, 255, 0.11); }
.btn-small { min-height: 38px; padding: 0 15px; border-radius: 11px; font-size: 0.86rem; }
.btn:disabled { opacity: 0.5; cursor: default; transform: none; }
.arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn:hover .arrow.down { transform: translateY(3px); }

/* ---------- navigation: a translucent layer the page scrolls under ---------- */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 20; height: var(--nav); transition: background-color 0.3s, backdrop-filter 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.nav.is-solid { background: rgba(7, 13, 26, 0.72); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); border-color: var(--line); }
.nav-inner { height: 100%; display: flex; align-items: center; gap: 28px; padding: 0 var(--gutter); }
.brand { display: flex; align-items: center; gap: 10px; font: 780 1.06rem/1 var(--display); letter-spacing: -0.03em; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.nav-links { display: flex; gap: 26px; margin-left: 14px; font-size: 0.92rem; }
.nav-links a { color: var(--muted); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { margin-left: auto; display: flex; gap: 10px; }

/* ---------- the stage: sticky scene, chapters scroll over it ---------- */
.xp { --vh: max(100svh, 700px); position: relative; }
.xp-stage, .xp-hud { position: sticky; top: 0; height: var(--vh); }
.xp-stage { overflow: hidden; background: var(--night); }
.xp-poster { position: absolute; inset: 0; background:
    radial-gradient(60% 55% at 68% 52%, rgba(45, 112, 189, 0.42), transparent 70%),
    radial-gradient(40% 40% at 30% 80%, rgba(138, 226, 198, 0.08), transparent 70%), var(--night); }
.xp-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.4s ease; touch-action: pan-y; }
.staged .xp-canvas { opacity: 1; }
/* The copy sits on the left: keep that side dark so it reads over anything behind it. */
.xp-stage::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(7, 13, 26, 0.9) 0%, rgba(7, 13, 26, 0.55) 26%, transparent 46%), linear-gradient(0deg, var(--night) 0%, transparent 16%); }
.xp-hud { margin-top: calc(-1 * var(--vh)); z-index: 3; pointer-events: none; }
.xp-chapters { position: relative; z-index: 2; margin-top: calc(-1 * var(--vh)); pointer-events: none; }
.chapter { min-height: calc(var(--vh) * 1.12); display: flex; align-items: center; padding: 96px var(--gutter) 72px; }
.chapter-hero { min-height: var(--vh); }
.col { width: min(440px, 100%); display: grid; gap: 18px; pointer-events: auto; }
.chapter-hero .col { width: min(560px, 100%); gap: 22px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.cta.center { justify-content: center; }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--faint); font-size: 0.86rem; }
.meta span + span::before { content: "·"; margin-right: 18px; color: var(--line-2); }

/* Labels pinned to blocks in the scene. */
.xp-labels { position: absolute; inset: 0; pointer-events: none; }
.label { position: absolute; left: 0; top: 0; display: grid; justify-items: center; gap: 1px; padding: 5px 10px 6px; border-radius: 10px; background: rgba(9, 16, 31, 0.74); border: 1px solid var(--line-2); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); font-size: 0.72rem; line-height: 1.2; white-space: nowrap; opacity: 0; transition: opacity 0.26s ease; will-change: transform; margin-top: -12px; }
.label.on { opacity: 1; }
.label::after { content: ""; position: absolute; left: 50%; top: 100%; width: 1px; height: 12px; background: linear-gradient(var(--line-2), transparent); }
.label b { font: 650 0.74rem/1.2 var(--display); }
.label span { color: var(--muted); }
.label.locked b::before { content: ""; display: inline-block; width: 8px; height: 7px; margin-right: 5px; border-radius: 2px; background: var(--sky); box-shadow: 0 -4px 0 -1.5px var(--night), 0 -4px 0 0 var(--sky); }
.label.group { padding: 3px 9px 4px; background: rgba(7, 13, 26, 0.46); border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; text-shadow: 0 1px 10px rgba(7, 13, 26, 0.95); }
.label.group::after { display: none; }
.label.group b { font-size: 0.86rem; }

/* Disk meter and hover tip. */
/* The live site adds a chat button in the bottom-right corner; the meter keeps clear of it. */
.meter { position: absolute; right: max(var(--gutter), 96px); bottom: 34px; width: 290px; padding: 14px 16px 13px; border-radius: 16px; background: rgba(13, 21, 40, 0.7); border: 1px solid var(--line-2); backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -30px rgba(0, 0, 0, 0.9); font-size: 0.8rem; color: var(--muted); }
.meter-top { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font: 650 0.84rem/1 var(--display); }
.chip { font: 600 0.64rem/1 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line-2); padding: 4px 7px; border-radius: 999px; }
.meter-bar { position: relative; display: flex; height: 8px; margin: 11px 0 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.meter-bar i { display: block; height: 100%; }
#meterUsed { background: linear-gradient(90deg, #2d70bd, var(--accent)); border-radius: 999px 0 0 999px; }
#meterFreed { background: var(--mint); opacity: 0.9; }
.meter-row { display: flex; justify-content: space-between; }
.meter-row b { color: var(--ink); font: 700 0.95rem/1 var(--display); }
.tip { position: absolute; left: 0; top: 0; width: 236px; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(9, 16, 31, 0.9); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -20px #000; font-size: 0.78rem; }
.tip b { font: 650 0.86rem/1.2 var(--display); }
.tip span { color: var(--sky); }
.tip em { font-style: normal; color: var(--muted); line-height: 1.35; }

/* ---------- panels: the app's own windows, in miniature ---------- */
.win { position: relative; border-radius: 18px; background: rgba(14, 23, 43, 0.74); border: 1px solid var(--line-2); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 40px 80px -36px rgba(0, 0, 0, 0.95); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-bottom: 1px solid var(--line); }
.win-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.win-bar span { margin-left: 8px; color: var(--muted); font: 600 0.78rem/1 var(--display); }
.win-body { position: relative; display: grid; gap: 12px; padding: 15px 15px 16px; }
.big { display: block; font: 740 1.6rem/1.05 var(--display); letter-spacing: -0.03em; color: var(--ink); }
.scan-top, .foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.foot { padding-top: 12px; border-top: 1px solid var(--line); }
.bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--sky)); transition: width 0.25s linear; }
.rows { display: grid; }
.rows li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 8px 2px; border-top: 1px solid var(--line); font-size: 0.88rem; }
.rows li:first-child { border-top: 0; }
.rows li > span:first-of-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rows b { font: 650 0.84rem/1 var(--display); }
.rows .empty { display: block; color: var(--faint); }
.rows.checks li { grid-template-columns: auto minmax(0, 1fr) auto; }
.rows.checks label { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.rows.checks label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows input[type="checkbox"] { appearance: none; width: 17px; height: 17px; margin: 0; border-radius: 5px; border: 1.5px solid var(--faint); background: transparent; cursor: pointer; transition: background-color 0.12s, border-color 0.12s, transform 0.12s; }
.rows input[type="checkbox"] { position: relative; }
.rows input[type="checkbox"]:checked { border-color: var(--accent); background: var(--accent); }
/* Drawn, not an image: the page's content policy allows images only from this site. */
.rows input[type="checkbox"]:checked::after { content: ""; position: absolute; left: 4.5px; top: 1px; width: 4px; height: 8.5px; border: solid #061a33; border-width: 0 2px 2px 0; transform: rotate(42deg); }
.rows input[type="checkbox"]:active { transform: scale(0.9); }
.rows input[type="checkbox"]:disabled { opacity: 0.4; cursor: default; }
.badge { font: 650 0.64rem/1 var(--display); font-style: normal; color: var(--peach); background: rgba(232, 182, 134, 0.16); padding: 4px 7px; border-radius: 999px; white-space: nowrap; }
.rows li.go { cursor: pointer; grid-template-columns: auto minmax(0, 1fr) auto; }
.rows li.go:hover span { color: var(--sky); }
.rows li:has(.dot) { grid-template-columns: auto minmax(0, 1fr) auto; }
.dot { width: 9px; height: 9px; border-radius: 3px; }
.dot.file { width: 7px; height: 9px; border-radius: 1.5px; opacity: 0.8; }
.map-foot { align-items: center; flex-wrap: wrap; min-height: 44px; }
.map-foot .sub { margin: 0; flex: 1 1 150px; }
.map-foot .btn { flex: none; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.fill { position: absolute; left: 0; bottom: -1px; height: 2px; border-radius: 2px; opacity: 0.75; transition: width 0.5s var(--ease); }
.cats { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; margin: 0 -15px; padding: 0 15px 2px; }
.cats::-webkit-scrollbar { display: none; }
.cat { flex: none; display: grid; gap: 4px; text-align: left; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); cursor: pointer; font-size: 0.78rem; color: var(--muted); transition: background-color 0.18s, border-color 0.18s, transform 0.12s; }
.cat b { font: 650 0.84rem/1 var(--display); color: var(--ink); }
.cat:active { transform: scale(0.97); }
.cat[aria-selected="true"] { background: rgba(95, 169, 246, 0.16); border-color: rgba(95, 169, 246, 0.6); color: var(--sky); }
.more { color: var(--sky); font: 650 0.86rem/1 var(--display); text-decoration: none; }
.more:hover { text-decoration: underline; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font: 650 0.86rem/1.25 var(--display); color: var(--faint); }
.crumbs > * { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs > :first-child, .crumbs > span { flex: none; }
.crumbs button { padding: 0; border: 0; background: none; cursor: pointer; color: var(--sky); }
.crumbs button:disabled { color: var(--ink); cursor: default; }
.sheet { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 16px; background: rgba(7, 13, 26, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade 0.18s ease both; }
/* `hidden` always wins, whatever display a component sets for itself. */
[hidden] { display: none !important; }
.sheet-card { width: 100%; display: grid; gap: 12px; padding: 18px; border-radius: 16px; background: #16233d; border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px #000; animation: rise 0.28s var(--ease) both; }
.sheet-card ul { display: grid; gap: 8px; color: var(--muted); font-size: 0.86rem; line-height: 1.45; }
.sheet-card li { padding-left: 14px; position: relative; }
.sheet-card li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.sheet-row { display: flex; justify-content: flex-end; gap: 9px; }
.done { display: grid; gap: 10px; justify-items: start; animation: rise 0.4s var(--ease) both; }
.done .big { color: var(--mint); }
.traps { display: flex; flex-wrap: wrap; gap: 7px; }
.trap { padding: 8px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); cursor: pointer; font-size: 0.8rem; color: var(--muted); transition: background-color 0.18s, border-color 0.18s, color 0.18s, transform 0.12s; }
.trap:active { transform: scale(0.97); }
.trap[aria-pressed="true"] { background: rgba(255, 172, 175, 0.14); border-color: rgba(255, 172, 175, 0.55); color: var(--danger); }
.verdict { display: grid; gap: 9px; font-size: 0.88rem; line-height: 1.5; }
.verdict p:first-child { color: var(--muted); }
.status { justify-self: start; padding: 6px 10px; border-radius: 999px; background: rgba(138, 226, 198, 0.14); color: var(--mint); font: 650 0.76rem/1 var(--display); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(0.985); } }

/* ---------- below the stage ---------- */
.band { position: relative; padding: clamp(88px, 11vw, 150px) 0; background: var(--night); }
.band h2 { margin-top: 14px; }
.band .lede.center { max-width: 640px; margin-top: 18px; }
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 54px; }
.tile { grid-column: span 2; display: grid; align-content: start; gap: 10px; padding: 26px; border-radius: 26px; background: linear-gradient(180deg, rgba(36, 55, 82, 0.5), rgba(23, 34, 58, 0.55)); border: 1px solid var(--line); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); transition: transform 0.4s var(--ease), border-color 0.3s; }
.tile:hover { transform: translateY(-3px); border-color: var(--line-2); }
.tile img { width: 64px; height: 64px; margin-bottom: 6px; }
.tile p { color: var(--muted); font-size: 0.95rem; }
.tile-wide { grid-column: span 4; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.tile-wide > div:first-child { display: grid; gap: 10px; }
.tile-monitor { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.tile-monitor .monitor { grid-template-columns: 1fr; }
.tile-monitor .monitor div { grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 14px; }
.tile-monitor .monitor svg { height: 28px; order: 2; }
.tile-monitor .monitor b { order: 3; font-size: 0.95rem; min-width: 84px; text-align: right; }
.copies { display: grid; gap: 8px; }
.copy { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 2px 11px; padding: 11px 13px; border-radius: 13px; border: 1px solid var(--line); background: rgba(7, 13, 26, 0.45); text-align: left; cursor: pointer; transition: border-color 0.18s, background-color 0.18s, transform 0.12s; }
.copy:active { transform: scale(0.985); }
.copy i { grid-row: 1 / span 2; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--faint); transition: border-color 0.15s, box-shadow 0.15s; }
.copy b { font: 650 0.9rem/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy span { grid-column: 2; color: var(--faint); font-size: 0.76rem; }
.copy em { grid-row: 1 / span 2; grid-column: 3; font: 650 0.68rem/1 var(--display); font-style: normal; padding: 5px 8px; border-radius: 999px; color: var(--gold); background: rgba(255, 221, 141, 0.12); }
.copy[aria-checked="true"] { border-color: rgba(138, 226, 198, 0.55); background: rgba(138, 226, 198, 0.07); }
.copy[aria-checked="true"] i { border-color: var(--mint); box-shadow: inset 0 0 0 3.5px var(--night), inset 0 0 0 9px var(--mint); }
.copy[aria-checked="true"] em { color: var(--mint); background: rgba(138, 226, 198, 0.14); }
.copy.gone { opacity: 0.45; }
.match { display: flex; align-items: center; gap: 8px; color: var(--mint); font: 650 0.84rem/1 var(--display); }
.tick { position: relative; width: 17px; height: 17px; border-radius: 50%; background: rgba(138, 226, 198, 0.16); }
.tick::after { content: ""; position: absolute; left: 6px; top: 3.5px; width: 4px; height: 7.5px; border: solid var(--mint); border-width: 0 1.8px 1.8px 0; transform: rotate(42deg); }
/* Where you are in the tour, and a way to jump. */
.rail { position: absolute; right: 18px; top: 50%; display: grid; gap: 4px; transform: translateY(-50%); pointer-events: auto; }
.rail button { position: relative; width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.rail button::before { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: var(--line-2); transition: transform 0.25s var(--ease), background-color 0.2s; }
.rail button:hover::before { background: var(--muted); }
.rail button[aria-current="true"]::before { background: var(--sky); transform: scale(1.7); }
.rail button span { position: absolute; right: 26px; top: 50%; transform: translateY(-50%) translateX(6px); padding: 4px 8px; border-radius: 8px; background: rgba(9, 16, 31, 0.9); border: 1px solid var(--line-2); color: var(--ink); font: 600 0.72rem/1 var(--display); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s var(--ease); }
.rail button:hover span, .rail button:focus-visible span { opacity: 1; transform: translateY(-50%); }
.twins { display: grid; gap: 10px; }
.twin { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line); background: rgba(7, 13, 26, 0.5); }
.twin b { font: 650 0.9rem/1.2 var(--display); }
.twin span { grid-column: 1; color: var(--faint); font-size: 0.78rem; }
.twin i { grid-row: 1 / span 2; grid-column: 2; align-self: center; font: 650 0.7rem/1 var(--display); font-style: normal; padding: 5px 8px; border-radius: 999px; color: var(--muted); background: rgba(255, 255, 255, 0.07); }
.twin.keep { border-color: rgba(138, 226, 198, 0.5); }
.twin.keep i { color: var(--mint); background: rgba(138, 226, 198, 0.14); }
.measure { display: grid; gap: 16px; }
.measure div { display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; align-items: center; font-size: 0.82rem; color: var(--muted); }
.measure span { grid-column: 1 / -1; }
.measure i { height: 12px; border-radius: 999px; }
.measure b { font: 700 0.95rem/1 var(--display); color: var(--ink); }
.m-a { width: 100%; background: rgba(255, 255, 255, 0.16); }
.m-b { width: 59.4%; background: linear-gradient(90deg, var(--accent), var(--mint)); }
.monitor { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.monitor div { display: grid; gap: 6px; padding: 15px; border-radius: 16px; border: 1px solid var(--line); background: rgba(7, 13, 26, 0.5); font-size: 0.78rem; color: var(--faint); }
.monitor b { font: 700 1.15rem/1 var(--display); color: var(--ink); }
.monitor svg { width: 100%; height: 40px; overflow: visible; }
.monitor path { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.monitor div:nth-child(2) path { stroke: var(--mint); }
.monitor div:nth-child(3) path { stroke: var(--rose); }

.price-card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 44px; align-items: center; margin-top: 52px; padding: clamp(26px, 4vw, 48px); border-radius: 30px; background: linear-gradient(160deg, rgba(36, 55, 82, 0.7), rgba(13, 21, 40, 0.8)); border: 1px solid var(--line-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 60px 120px -60px rgba(45, 112, 189, 0.5); }
.buy { display: grid; gap: 14px; justify-items: start; }
.buy .btn { width: 100%; }
.price { font: 780 clamp(3.2rem, 6vw, 4.6rem)/0.95 var(--display); letter-spacing: -0.05em; }
.price small { margin-left: 10px; font: 600 1rem/1 var(--display); letter-spacing: 0; color: var(--muted); }
.includes { display: grid; gap: 13px; font-size: 0.98rem; }
.includes li { position: relative; padding-left: 28px; }
.includes li::before { content: ""; position: absolute; left: 0; top: 0.2em; width: 18px; height: 18px; border-radius: 50%; background: rgba(138, 226, 198, 0.16); }
.includes li::after { content: ""; position: absolute; left: 6.5px; top: calc(0.2em + 4px); width: 4px; height: 8px; border: solid var(--mint); border-width: 0 1.8px 1.8px 0; transform: rotate(42deg); }
.includes .quiet { color: var(--faint); font-size: 0.86rem; padding-left: 0; margin-top: 6px; }
.includes .quiet::before, .includes .quiet::after { display: none; }

.faq { display: grid; gap: 10px; margin-top: 44px; }
.faq details { border-radius: 18px; border: 1px solid var(--line); background: rgba(23, 34, 58, 0.45); transition: border-color 0.2s, background-color 0.2s; }
.faq details[open] { border-color: var(--line-2); background: rgba(23, 34, 58, 0.75); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 19px 22px; cursor: pointer; list-style: none; font: 650 1.02rem/1.3 var(--display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; transition: transform 0.25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { padding: 0 22px 20px; color: var(--muted); font-size: 0.98rem; }

.final { padding: clamp(96px, 13vw, 170px) 0; text-align: center; background: radial-gradient(60% 70% at 50% 100%, rgba(45, 112, 189, 0.3), transparent 70%), var(--night); }
.final .wrap { display: grid; justify-items: center; gap: 26px; }
.final img { width: 132px; height: 132px; }
.final h2 { font-size: clamp(2.3rem, 5vw, 4.2rem); }
footer { padding: 30px 0 44px; border-top: 1px solid var(--line); color: var(--faint); font-size: 0.86rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px; }
footer nav { display: flex; gap: 22px; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ---------- arriving: tied to scroll where the browser can, a one-time fade where it can't ---------- */
@supports (animation-timeline: view()) {
  [data-reveal] { animation: reveal linear both; animation-timeline: view(); animation-range: entry 4% cover 26%; }
}
@supports not (animation-timeline: view()) {
  .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
  .js [data-reveal].in { opacity: 1; transform: none; }
}
@keyframes reveal { from { opacity: 0; transform: translateY(26px) scale(0.985); } }

/* No WebGL: a still picture of the disk stands in for the scene, and the copy and panels
   still tell the whole story. */
.flat .xp-labels, .flat .xp-canvas { display: none; }
.flat .xp-poster { background: var(--night) url("assets/art/disk-wide.png") center / cover no-repeat; background-image: image-set(url("assets/art/disk-wide.avif") type("image/avif"), url("assets/art/disk-wide.png") type("image/png")); }

/* ---------- smaller screens: the scene pins to the top, the story scrolls beneath it ---------- */
@media (max-width: 1100px) {
  .nav-links { display: none; }
  .xp { --stage: 44svh; }
  .xp-stage, .xp-hud { height: var(--stage); z-index: 4; }
  .xp-stage::after { background: linear-gradient(0deg, var(--night) 0%, transparent 22%); }
  .flat .xp-poster { background-image: url("assets/art/disk-small.png"); background-image: image-set(url("assets/art/disk-small.avif") type("image/avif"), url("assets/art/disk-small.png") type("image/png")); }
  .xp-hud { margin-top: calc(-1 * var(--stage)); z-index: 5; }
  .xp-chapters { margin-top: 0; }
  .chapter, .chapter-hero { min-height: 0; padding: 30px 20px 64px; }
  .chapter-hero { padding-top: 22px; }
  .chapter { justify-content: center; }
  .col, .chapter-hero .col { width: min(640px, 100%); }
  .meter { left: 12px; right: 12px; bottom: 8px; width: auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; font-size: 0.72rem; }
  .meter-top .chip, #meterTotal { display: none; }
  .meter-top b { font-size: 0.76rem; }
  .meter-bar { margin: 0; height: 6px; }
  .meter-row b { font-size: 0.8rem; }
  .tip, .rail { display: none; }
  .label { font-size: 0.64rem; padding: 3px 7px 4px; }
  .bento { grid-template-columns: 1fr; }
  .tile, .tile-wide, .tile-monitor { grid-column: auto; grid-template-columns: 1fr; }
  .tile-monitor .monitor div { grid-template-columns: auto 1fr auto; }
  .price-card { grid-template-columns: 1fr; gap: 30px; }
}
/* Tablets have the height to give the scene more of the screen. */
@media (min-width: 700px) and (max-width: 1100px) { .xp { --stage: 50svh; } }
@media (max-width: 520px) {
  .monitor { grid-template-columns: 1fr; }
  .nav-cta .btn-quiet { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  [data-reveal] { animation: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .win, .meter, .label, .nav.is-solid, .tip { backdrop-filter: none; -webkit-backdrop-filter: none; background: #0f1a30; }
}
@media (prefers-contrast: more) {
  :root { --muted: #d3deef; --faint: #b1c0d8; --line: rgba(255, 255, 255, 0.28); --line-2: rgba(255, 255, 255, 0.45); }
  .win, .meter { background: #0b1426; }
}
