/* Ritual site, shared by every page. Tokens copied from the apps' Theme.xaml. */
:root {
  --bg: #101010;
  --surface: #171717;
  --surface-2: #1C1C1C;
  --surface-3: #252525;
  --input: #141414;
  --line: #2A2A2A;
  --line-strong: #3A3A3A;
  --grid-line: #1D1D1D;
  --grid-star: #9A9A9A;

  --text: #F5F5F5;
  --text-muted: #999999;
  --text-faint: #6B6B6B;
  --text-disabled: #555555;

  --accent: #168BFF;
  --accent-hover: #3D9EFF;
  --accent-pressed: #0B74DB;
  --accent-soft: #0E1D2E;
  --accent-selected: #132B47;
  --accent-text: #5CB0FF;

  --warning: #E8A33D; --warning-soft: #24190A;
  --danger: #E5484D;  --danger-soft: #271112;
  --ok: #3CCB7F;

  --radius: 2px;
  --font-display: "Bahnschrift", "Barlow Semi Condensed", "Barlow", system-ui, sans-serif;
  --font-ui: "Segoe UI Variable Text", "Segoe UI", "Barlow", system-ui, sans-serif;
  --font-mono: "Cascadia Mono", "JetBrains Mono", Consolas, monospace;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --topbar-h: 52px;

  --grid-tile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cpath d='M0 .5H96M0 48.5H96M.5 0V96M48.5 0V96' stroke='%231D1D1D' fill='none'/%3E%3Cpath d='M48.5 43Q49 48 54 48.5Q49 49 48.5 54Q48 49 43 48.5Q48 48 48.5 43Z' fill='%239A9A9A' fill-opacity='.55'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { color: var(--accent-hover); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-selected); color: var(--text); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; margin: 0; line-height: 1.08; }
h2 { font-size: clamp(28px, 4vw, 44px); }
h3 { font-size: 22px; }
p { margin: 0 0 12px; }
code, kbd, .mono { font-family: var(--font-mono); font-size: .92em; }
code { color: var(--accent-text); background: var(--accent-soft); padding: 0 4px; border-radius: var(--radius); white-space: nowrap; }
kbd { display: inline-block; min-width: 22px; padding: 0 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--radius); background: var(--surface-3); color: var(--text); font-size: 12px; text-align: center; line-height: 20px; margin: 0 1px; }
em { font-style: normal; color: var(--text); }
.caption { font: 600 11px/1.3 var(--font-display); letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin: 0; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: 13px; }
.todo { color: var(--warning); font-family: var(--font-mono); font-size: 12px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 100; background: var(--accent); color: #fff; padding: 6px 10px; }

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.wrap-wide { width: min(1440px, 100% - 32px); margin-inline: auto; }

/* ── the technical grid, fixed behind everything ── */
.page-grid {
  position: fixed; inset: -96px 0 -96px 0; z-index: -1;
  background: var(--grid-tile) 0 0 / 96px 96px;
  opacity: .7;
  will-change: transform;
  pointer-events: none;
}

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--radius);
  font: 500 14px/1 var(--font-ui); white-space: nowrap; cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), transform .12s var(--ease);
  user-select: none;
}
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; }
.btn-primary:active { background: var(--accent-pressed); }
.btn-secondary { background: var(--surface-3); border-color: var(--line-strong); color: var(--text); }
.btn-secondary:hover { background: #2E2E2E; color: var(--text); }
.btn-secondary.is-on { background: var(--accent-selected); border-color: var(--accent); }
.btn-lg { height: 42px; padding: 0 18px; font-size: 15px; }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── top bar ── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 24px;
  padding: 0 16px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.1);
}
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font: 700 16px/1 var(--font-display); letter-spacing: .04em; white-space: nowrap; }
.wordmark:hover { color: var(--text); }
.wordmark small { font: 600 10px/1 var(--font-display); letter-spacing: .14em; color: var(--text-faint); }
.wordmark .star { width: 16px; height: 16px; fill: var(--text); transition: transform .5s var(--ease-out); }
.wordmark:hover .star { transform: rotate(90deg); }
.topnav { display: flex; gap: 2px; margin-left: 8px; }
.topnav a { color: var(--text-muted); font-size: 14px; padding: 6px 10px; border-radius: var(--radius); position: relative; transition: color .15s; }
.topnav a:hover { color: var(--text); background: var(--surface-3); }
.topnav a.is-active { color: var(--text); }
.topnav a.is-active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -9px; height: 2px; background: var(--accent); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.readout { display: grid; line-height: 1.15; padding: 0 12px; border-left: 1px solid var(--line); }
.readout .caption { font-size: 9.5px; }
.readout .mono { font-size: 12.5px; }
.scroll-progress { position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }

/* ── hero ── */
.hero { position: relative; padding: clamp(56px, 9vw, 112px) 0 72px; overflow: hidden; background: var(--bg); isolation: isolate; }
.hero-grid { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(transparent, var(--bg)); z-index: -1; pointer-events: none; }
.cursor-readout { position: absolute; top: 16px; right: 16px; display: grid; gap: 2px; font-size: 11px; color: var(--text-faint); text-align: right; opacity: 0; transition: opacity .3s; }
.hero:hover .cursor-readout { opacity: 1; }
.hero-caption { margin-bottom: 18px; }
.hero-title { font-size: clamp(38px, 7vw, 80px); line-height: 1; letter-spacing: -.02em; margin-bottom: 22px; text-wrap: balance; }
.hero-title .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .06em; }
.hero-title .w > span { display: inline-block; transform: translateY(105%); animation: rise .8s var(--ease-out) forwards; animation-delay: calc(var(--i) * 55ms + 150ms); }
.hero-title .w.hl > span { color: var(--accent); }
@keyframes rise { to { transform: none; } }
.hero-sub { color: var(--text-muted); font-size: clamp(15px, 1.6vw, 18px); max-width: 680px; margin: 0 auto 28px; text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 18px; }
.spec { color: var(--text-faint); font-size: 12px; margin: 0 0 48px; }

/* screenshot frames */
.shot { position: relative; margin: 0; border: 1px solid var(--line); background: var(--input); overflow: hidden; border-radius: var(--radius); }
.shot img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1)); transform-origin: var(--o, 50% 50%); }
.shot-sm { aspect-ratio: 16 / 10; }
.shot-md { aspect-ratio: 16 / 9; }
.shot-sm img, .shot-md img { transition: transform .8s var(--ease-out); }
.shot-sm:hover img, .shot-md:hover img { transform: scale(calc(var(--z, 1) * 1.04)); }
.corner { position: absolute; width: 13px; height: 13px; pointer-events: none; z-index: 2; }
.corner::before { content: ""; position: absolute; inset: 0; background: var(--text); clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); }
.corner.tl { left: -7px; top: -7px; } .corner.tr { right: -7px; top: -7px; }
.corner.bl { left: -7px; bottom: -7px; } .corner.br { right: -7px; bottom: -7px; }

.hero-shot { overflow: visible; background: var(--surface); }
.hero-shot .corner { transform: scale(0) rotate(-90deg); transition: transform .6s var(--ease-out) 1s; }
.hero-shot.is-in .corner { transform: none; }
.shot-chrome { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 38px; padding: 0 10px; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--text-muted); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--input); padding: 1px; }
.seg button { background: none; border: 0; height: 24px; padding: 0 10px; font-size: 12.5px; color: var(--text-muted); cursor: pointer; border-radius: 1px; position: relative; transition: color .15s, background-color .15s; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { color: var(--text); background: var(--surface-3); }
.seg button[aria-selected="true"]::after { content: ""; position: absolute; left: 6px; right: 6px; bottom: 1px; height: 2px; background: var(--accent); }
.shot-img { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0b0b0b; }
.shot-img::before { content: ""; position: absolute; inset: 0; z-index: 1; background: var(--surface); transform-origin: 50% 100%; transition: transform 1.1s var(--ease-out) .35s; pointer-events: none; }
.hero-shot.is-in .shot-img::before { transform: scaleY(0); }
.shot-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s var(--ease); }
.shot-img img.is-swapping { opacity: 0; }
.shot-img::after { /* scan line that sweeps once as the shot "renders" */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); opacity: 0;
}
.hero-shot.is-in .shot-img::after { animation: scan 1.1s var(--ease-out) .35s; }
@keyframes scan { 0% { top: 0; opacity: 1; } 90% { opacity: 1; } 100% { top: 100%; opacity: 0; } }
.statusbar { display: flex; justify-content: space-between; gap: 16px; height: 26px; align-items: center; padding: 0 10px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--text-muted); }
.statusbar [data-type]::after { content: "▍"; color: var(--accent); margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0; border: 1px solid var(--line); border-top: 0; background: var(--surface); }
.stats div { padding: 14px 16px; border-left: 1px solid var(--line); }
.stats div:first-child { border-left: 0; }
.stats dd { margin: 4px 0 0; font-size: 20px; color: var(--text); }
.stats dd:not([data-count]) { font-size: 13px; padding-top: 5px; color: var(--text-muted); }

/* ── sections ── */
.section { position: relative; padding: clamp(72px, 10vw, 128px) 0; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 78%, transparent); }
.section-tight { padding: 56px 0; }
.section-head { margin-bottom: 44px; max-width: 760px; }
.section-head .caption { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.section-head .caption::before { content: ""; width: 9px; height: 9px; background: var(--accent); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }
.section-head h2 { margin-bottom: 14px; text-wrap: balance; }
.lede { color: var(--text-muted); font-size: 17px; max-width: 640px; }

/* reveal on scroll */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .6s var(--ease-out); transition-delay: calc(var(--d, 0) * 90ms); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ticks list */
.ticks { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 22px; color: var(--text-muted); }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 9px; height: 9px; background: var(--text-faint); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); transition: background-color .2s; }
.ticks li:hover::before { background: var(--accent); }
.honest { font-size: 13px; color: var(--text-faint); border-left: 2px solid var(--line-strong); padding-left: 12px; margin-top: 18px; }

/* ── loop ── */
.loops { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch; }
.loop-card { border: 1px solid var(--line); background: var(--surface); padding: 20px; border-radius: var(--radius); }
.loop-new { border-color: var(--accent-selected); }
.loop-head { display: flex; justify-content: space-between; margin-bottom: 14px; font-size: 12px; }
.loop-list { list-style: none; margin: 0; padding: 0; counter-reset: s; font-size: 13.5px; }
.loop-list li { counter-increment: s; display: flex; gap: 12px; align-items: center; padding: 7px 10px; border: 1px solid transparent; color: var(--text-faint); transition: color .2s, background-color .2s, border-color .2s; }
.loop-list li::before { content: counter(s, decimal-leading-zero); color: var(--text-disabled); font-size: 11px; }
.loop-list li.is-on { color: var(--text); background: var(--surface-3); border-color: var(--line-strong); }
.loop-list li.bad.is-on { background: var(--danger-soft); border-color: #5a2224; color: #ffb3b5; }
.loop-list li.good.is-on { background: var(--accent-selected); border-color: var(--accent); }
.loop-note { color: var(--text-muted); font-size: 14px; margin: 16px 0 0; }
.loop-arrow { align-self: center; color: var(--text-faint); }
.loop-arrow svg { width: 40px; fill: none; stroke: currentColor; stroke-width: 1.2; }

/* ── workflow ── */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.steps-line { position: absolute; left: 6px; right: 6px; top: 6px; height: 1px; background: var(--line); }
.steps-line span { position: absolute; inset: 0; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.step { position: relative; padding-top: 30px; }
.step .node { position: absolute; top: 0; left: 0; width: 13px; height: 13px; background: var(--text); clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%); transition: transform .6s var(--ease-out), background-color .3s; transform: scale(.4) rotate(-45deg); }
.step.is-lit .node { transform: scale(1.4); background: var(--accent); }
.step-n { display: block; font-size: 44px; line-height: 1; color: var(--text-disabled); margin-bottom: 10px; transition: color .4s; }
.step.is-lit .step-n { color: var(--text); }
.step .caption { color: var(--text-muted); margin-bottom: 8px; }
.step > p { color: var(--text-muted); font-size: 14px; }
.step > p code { white-space: normal; overflow-wrap: anywhere; }  /* long project paths wrap on phones */
.step-media { margin-top: 14px; }
.tree { white-space: normal; margin: 14px 0 0; padding: 12px 14px; border: 1px solid var(--line); background: var(--input); font-size: 12px; line-height: 1.6; color: var(--text-muted); aspect-ratio: 16 / 10; overflow: hidden; }
.tree span { display: block; white-space: pre; opacity: 0; transform: translateX(-6px); transition: opacity .3s, transform .3s var(--ease-out); }
.tree.is-in span { opacity: 1; transform: none; }
.tree span:first-child { color: var(--text); }
.note { margin-top: 40px; display: grid; grid-template-columns: 130px 1fr; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); background: var(--surface); }
.note p { margin: 0; color: var(--text-muted); font-size: 14px; }
.note-line { margin-top: 28px; color: var(--text-muted); font-size: 14px; max-width: 820px; }

/* ── app pane (rail + inspector) ── */
.app-pane { display: grid; grid-template-columns: 200px 1fr; border: 1px solid var(--line); background: var(--surface); min-height: 560px; }
.rail { border-right: 1px solid var(--line); padding: 14px 0; display: flex; flex-direction: column; gap: 1px; }
.rail-caption { padding: 0 16px 8px; }
.rail button { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 16px; background: none; border: 0; text-align: left; font-size: 14px; color: var(--text-muted); cursor: pointer; position: relative; transition: color .15s, background-color .15s; }
.rail button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.3; flex: none; }
.rail button:hover { color: var(--text); background: var(--surface-3); }
.rail button[aria-selected="true"] { color: var(--text); background: var(--surface-3); }
.rail button[aria-selected="true"] svg { color: var(--accent); }
.rail button::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: scaleY(0); transition: transform .25s var(--ease-out); }
.rail button[aria-selected="true"]::before { transform: scaleY(1); }
.inspector { padding: 20px; background: var(--bg); min-width: 0; }
.tab-panel { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.tab-panel[hidden] { display: none; }
.tab-panel.is-entering .shot { animation: wipe .7s var(--ease-out); }
.tab-panel.is-entering .panel-copy > * { animation: fadeUp .5s var(--ease-out) backwards; }
.tab-panel.is-entering .panel-copy li { animation: fadeUp .5s var(--ease-out) backwards; }
.tab-panel.is-entering .panel-copy li:nth-child(1) { animation-delay: .08s; }
.tab-panel.is-entering .panel-copy li:nth-child(2) { animation-delay: .16s; }
.tab-panel.is-entering .panel-copy li:nth-child(3) { animation-delay: .24s; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
.panel-copy h3 { margin-bottom: 14px; }
.report { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 24px; }
.report-intro { color: var(--text-muted); grid-column: 1 / -1; margin: 0; }
.checks { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); }
.checks li { display: block; padding: 9px 12px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-muted); }
.checks li:first-child { border-top: 0; }
.tab-panel.is-entering .checks li { animation: fadeUp .45s var(--ease-out) backwards; }
.chip { display: inline-block; margin-right: 10px; vertical-align: 1px; font: 600 10px/1 var(--font-mono); letter-spacing: .06em; padding: 4px 6px; border-radius: var(--radius); }
.chip-warn { background: var(--warning-soft); color: var(--warning); border: 1px solid #4a3412; }
.chip-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid #4f1d1f; }
.report-shot { aspect-ratio: 4 / 5; max-height: 460px; }

/* ── test drive ── */
.drive { overflow: hidden; }
.floor { position: absolute; inset: 0; perspective: 600px; perspective-origin: 50% 0%; pointer-events: none; z-index: -1; overflow: hidden; }
.floor-plane {
  position: absolute; left: -50%; right: -50%; top: 40%; height: 200%;
  background: var(--grid-tile) 0 0 / 96px 96px;
  transform: rotateX(72deg); transform-origin: 50% 0;
  opacity: .9;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 60%, transparent);
          mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 60%, transparent);
}
.drive-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.drive-copy h2 { margin: 12px 0 18px; }
.drive-copy > p { color: var(--text-muted); }


/* ── tool index ── */
.tools { display: grid; grid-template-columns: 360px 1fr; border: 1px solid var(--line); background: var(--surface); }
.tool-list { list-style: none; margin: 0; padding: 8px 0; border-right: 1px solid var(--line); counter-reset: t; }
.tool-list li { counter-increment: t; }
.tool-list button { width: 100%; display: grid; grid-template-columns: 26px 1fr; gap: 0 8px; padding: 8px 16px; background: none; border: 0; text-align: left; cursor: pointer; position: relative; transition: background-color .15s; }
.tool-list button::before { content: counter(t, decimal-leading-zero); font: 11px/22px var(--font-mono); color: var(--text-disabled); grid-row: span 2; }
.tool-list button::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--accent); transform: scaleY(0); transition: transform .25s var(--ease-out); }
.tool-list button:hover { background: var(--surface-3); }
.tool-list button[aria-selected="true"] { background: var(--accent-selected); }
.tool-list button[aria-selected="true"]::after { transform: scaleY(1); }
.tool-list b { font-weight: 500; color: var(--text); font-size: 14.5px; }
.tool-list span { font-size: 12.5px; color: var(--text-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tool-preview { padding: 18px 20px 22px; background: var(--bg); min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.tool-preview-head { display: flex; justify-content: space-between; font-size: 12px; }
.tool-stage { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--line); background: var(--input); overflow: hidden; }
.tool-stage > * { position: absolute; inset: 0; }
.tool-stage img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1)); transform-origin: var(--o, 50% 50%); }
.tool-stage .enter { animation: wipe .6s var(--ease-out); }
.tool-stage .leave { animation: fade-out .3s forwards; }
@keyframes fade-out { to { opacity: 0; } }
.mock { padding: 22px 26px; font: 13px/1.75 var(--font-mono); color: var(--text-muted); overflow: hidden; background: var(--input) var(--grid-tile) 0 0 / 96px 96px; }
.mock .k { color: var(--accent-text); } .mock .s { color: #d6b98a; } .mock .c { color: var(--text-faint); } .mock .t { color: var(--text); }
.mock-line { display: block; white-space: pre; animation: fadeUp .35s var(--ease-out) backwards; }
.mock-slider { display: grid; grid-template-columns: minmax(96px, 140px) 1fr 44px; gap: 14px; align-items: center; margin-bottom: 8px; }
.tool-desc h3 { margin-bottom: 8px; }
.tool-desc p { color: var(--text-muted); margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11.5px; }
.tags span { padding: 2px 7px; border: 1px solid var(--line-strong); color: var(--text-muted); border-radius: var(--radius); background: var(--surface); }

/* ── sirens ── */
.siren { border: 1px solid var(--line); background: var(--surface); padding: 20px; }
.lightbar { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; padding: 18px; margin-bottom: 18px; background: #0a0a0a; border: 1px solid var(--line); position: relative; overflow: hidden; }
.lightbar i { height: 22px; background: #1a1a1a; border: 1px solid #2a2a2a; transition: background-color .04s, box-shadow .04s; }
.lightbar i.on.red { background: #ff2a2a; border-color: #ff6a6a; box-shadow: 0 0 22px 4px rgba(255, 40, 40, .55); }
.lightbar i.on.blue { background: #1f5bff; border-color: #6a94ff; box-shadow: 0 0 22px 4px rgba(31, 91, 255, .6); }
.lightbar::after { content: ""; position: absolute; inset: 0; background: var(--wash, transparent); opacity: .18; pointer-events: none; transition: background .05s; }
.siren-tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.seq-wrap { overflow-x: auto; padding-bottom: 4px; }
.seq { display: grid; grid-template-columns: 54px repeat(32, minmax(14px, 1fr)); gap: 2px; min-width: 640px; user-select: none; touch-action: none; }
.seq .lab { font: 11px/18px var(--font-mono); color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.seq .lab i { width: 8px; height: 8px; }
.seq .cell { height: 18px; background: #222; cursor: pointer; transition: background-color .08s; }
.seq .cell:nth-child(8n + 2) { box-shadow: inset 1px 0 0 #3a3a3a; }
.seq .cell.on.red { background: #d92626; }
.seq .cell.on.blue { background: #1f4fe0; }
.seq .cell.head { outline: 1px solid var(--text); outline-offset: -1px; }
.seq .beat { font: 9px/14px var(--font-mono); color: var(--text-disabled); text-align: center; }
.seq .beat.head { color: var(--text); }
.siren-foot { display: grid; grid-template-columns: 340px 1fr; gap: 20px; margin-top: 16px; align-items: start; }
.slider { display: grid; grid-template-columns: auto 1fr 48px; gap: 12px; align-items: center; font-size: 13px; }
.slider output { border: 1px solid var(--line-strong); background: var(--input); padding: 2px 6px; text-align: right; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; background: none; height: 20px; }
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--line-strong); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 8px; height: 16px; margin-top: -7px; background: var(--text); border-radius: 1px; }
input[type=range]::-moz-range-track { height: 2px; background: var(--line-strong); }
input[type=range]::-moz-range-progress { height: 2px; background: var(--accent); }
input[type=range]::-moz-range-thumb { width: 8px; height: 16px; background: var(--text); border: 0; border-radius: 1px; }
.seq-xml { font-size: 11.5px; color: var(--text-faint); background: var(--input); border: 1px solid var(--line); padding: 8px 12px; max-height: 92px; overflow: auto; white-space: pre; }
.seq-xml .k { color: var(--accent-text); } .seq-xml .v { color: #d6b98a; }

/* ── light IDs ── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split h2 { margin: 12px 0 16px; }
.idtable { border-collapse: collapse; width: 100%; max-width: 420px; margin-top: 18px; font-size: 14px; }
.idtable td { padding: 8px 12px; border-top: 1px solid var(--line); color: var(--text-muted); transition: background-color .15s, color .15s; }
.idtable td:first-child { width: 90px; color: var(--text); }
.idtable tr { cursor: pointer; }
.idtable tr:hover td, .idtable tr.is-on td { background: var(--accent-selected); color: var(--text); }
/* ── game files chain ── */
.chain { position: relative; border: 1px solid var(--line); background: var(--surface); padding: 20px; }
.chain-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 22px; position: relative; }
.chain-list::before { content: ""; position: absolute; left: 13px; top: 18px; bottom: 18px; width: 1px; background: var(--line-strong); }
.chain-list li { position: relative; display: grid; gap: 2px; padding: 10px 14px 10px 40px; border: 1px solid var(--line); background: var(--input); transition: border-color .25s, background-color .25s; }
.chain-list li::before { content: ""; position: absolute; left: 9px; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; background: var(--text-faint); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); transition: background-color .25s, transform .25s; }
.chain-list li.is-on { border-color: var(--accent); background: var(--accent-soft); }
.chain-list li.is-on::before { background: var(--accent); transform: scale(1.5); }
.chain-list span { color: var(--text); font-size: 14px; }
.chain-list small { color: var(--text-faint); font-size: 12px; }
.chain-dot { display: none; }

/* ── safe ── */
.three { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: var(--surface); }
.safe-cell { padding: 26px 24px; border-left: 1px solid var(--line); }
.safe-cell:first-child { border-left: 0; }
.safe-cell h3 { font-size: 19px; margin: 18px 0 8px; }
.safe-cell p { color: var(--text-muted); font-size: 14px; margin: 0; }
.glyph { width: 32px; height: 32px; fill: none; stroke: var(--text); stroke-width: 1; stroke-dasharray: 120; stroke-dashoffset: 120; transition: stroke-dashoffset 1.4s var(--ease-out) .2s; }
.is-in .glyph { stroke-dashoffset: 0; }
.safe-cell:hover .glyph { stroke: var(--accent); }

/* ── pricing ── */
.price { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); border: 1px solid var(--line); background: var(--surface); }
.price-left { padding: 30px; }
.price-left .caption { margin-bottom: 16px; }
.price-reqs { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.price-reqs .caption { margin-bottom: 6px; }
.price-reqs p { color: var(--text-muted); margin: 0; }
.price-card { position: relative; padding: 30px; border-left: 1px solid var(--line); background: var(--bg) var(--grid-tile) 24px 24px / 96px 96px; display: flex; flex-direction: column; gap: 14px; }
.price-figure { display: flex; align-items: flex-start; gap: 4px; font-family: var(--font-display); margin: 8px 0 0; }
.price-figure .cur { font-size: 40px; line-height: 1.2; color: var(--text-muted); }
.price-figure .ccy { align-self: flex-end; margin: 0 0 14px 10px; color: var(--text-faint); font-size: 13px; }
.odo { display: inline-flex; font: 600 96px/1 var(--font-display); letter-spacing: -.03em; }
.odo .digit { display: inline-block; height: 1em; overflow: hidden; }
.odo .reel { display: flex; flex-direction: column; transition: transform 1.6s var(--ease-out); }
.odo .reel span { height: 1em; }
.odo .dot { width: .28em; text-align: center; }
.price-card .small { margin: 0; }

/* ── download ── */
.download { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.download h2 { margin: 12px 0 20px; font-family: var(--font-mono); font-weight: 500; font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.02em; }
.download .hero-cta { justify-content: flex-start; margin: 24px 0 14px; }
.dl-meta { display: flex; gap: 0; margin: 0; border: 1px solid var(--line); background: var(--surface); width: fit-content; }
.dl-meta div { padding: 10px 16px; border-left: 1px solid var(--line); }
.dl-meta div:first-child { border-left: 0; }
.dl-meta dd { margin: 3px 0 0; font-size: 15px; }
.req-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); background: var(--surface); }
.req-list li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-muted); }
.req-list li:first-child { border-top: 0; }
.req-list .caption { padding-top: 3px; }

/* ── changelog ── */
.changelog { display: grid; gap: 0; border: 1px solid var(--line); background: var(--surface); margin-bottom: 16px; }
.release { display: grid; grid-template-columns: 180px 1fr; gap: 24px; padding: 22px 24px; border-top: 1px solid var(--line); }
.release:first-child { border-top: 0; }
.release-meta { display: grid; align-content: start; gap: 4px; }
.release-meta .tag { font: 500 16px var(--font-mono); color: var(--text); }
.release-meta .tag.latest::after { content: "LATEST"; margin-left: 8px; font: 600 9px var(--font-mono); letter-spacing: .08em; padding: 2px 5px; background: var(--accent); color: #fff; vertical-align: 2px; }
.release-meta time { font: 12px var(--font-mono); color: var(--text-faint); }
.release-body h4 { font: 600 17px/1.3 var(--font-display); margin: 0 0 10px; }
.release-body h5 { font: 600 13px var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); margin: 14px 0 6px; }
.release-body p, .release-body li { color: var(--text-muted); font-size: 14px; }
.release-body ul { padding-left: 18px; margin: 0 0 8px; }
.release-body li { margin-bottom: 4px; }
.release-body li::marker { color: var(--text-disabled); }
.release-body code { white-space: normal; }
.release-body.clamped { max-height: 220px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.release-toggle { background: none; border: 0; padding: 0; margin-top: 6px; color: var(--accent-text); cursor: pointer; font-size: 13px; }

/* ── the Ritual apps ── */
.apps-feature { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center; padding: 24px; border: 1px solid var(--line); background: var(--surface); }
.apps-feature-shot { aspect-ratio: 1440 / 880; }
.apps-feature-copy h3 { font-size: clamp(22px, 2.3vw, 28px); line-height: 1.2; margin: 10px 0 12px; }
.apps-feature-copy > p.muted { margin: 0 0 18px; }
.apps-feature-copy .hero-cta { justify-content: flex-start; margin: 22px 0 0; }
.apps-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 16px; border: 1px solid var(--line); background: var(--surface); }
.app-card { display: flex; flex-direction: column; border-left: 1px solid var(--line); color: var(--text); transition: background-color .15s; }
.app-card:first-child { border-left: 0; }
.app-card:hover { background: var(--surface-3); color: var(--text); }
.app-card-shot { display: block; aspect-ratio: 16 / 9; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.app-card-shot img { transition: transform .8s var(--ease-out); }
.app-card:hover .app-card-shot img { transform: scale(calc(var(--z, 1) * 1.04)); }
.app-card-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; flex: 1; }
.app-card-name { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 600; font-size: 17px; }
.app-card-body .muted { font-size: 14px; flex: 1; }
.app-card-go { transition: transform .2s var(--ease-out), color .2s; }
.app-card:hover .app-card-go { transform: translateX(4px); color: var(--accent); }

/* ── also + footer ── */
.also { margin-top: 14px; border: 1px solid var(--line); background: var(--surface); }
.also-row { display: grid; grid-template-columns: 260px 1fr auto; gap: 16px; padding: 14px 18px; border-top: 1px solid var(--line); color: var(--text); transition: background-color .15s; }
.also-row:first-child { border-top: 0; }
.also-row:hover { background: var(--surface-3); color: var(--text); }
.also-row .mono { transition: transform .2s var(--ease-out); }
.also-row:hover .mono { transform: translateX(4px); color: var(--accent); }
.also-name { font-weight: 500; }
.also-row .muted { font-size: 14px; }
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0 44px; }
.footer-inner { display: grid; gap: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer p { margin: 0; }

/* ── responsive ── */
@media (max-width: 1080px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stats div:nth-child(4) { border-left: 0; }
  .stats div:nth-child(n+4) { border-top: 1px solid var(--line); }
  .steps { grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .steps-line { display: none; }
  .tools { grid-template-columns: 300px 1fr; }
  .tab-panel { grid-template-columns: 1fr; }
  .readout { display: none; }
}
@media (max-width: 860px) {
  .topnav { display: none; }
  .loops { grid-template-columns: 1fr; }
  .loop-arrow { transform: rotate(90deg); justify-self: center; }
  .app-pane { grid-template-columns: 1fr; min-height: 0; }
  .rail { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail-caption { display: none; }
  .rail button { flex: none; height: 44px; }
  .rail button::before { top: auto; left: 0; right: 0; width: auto; height: 2px; transform: scaleX(0); }
  .rail button[aria-selected="true"]::before { transform: scaleX(1); }
  .inspector { padding: 14px; }
  .report { grid-template-columns: 1fr; }
  .drive-grid, .split, .spot, .download, .price { grid-template-columns: 1fr; }
  .tools { grid-template-columns: 1fr; }
  .tool-list { border-right: 0; border-bottom: 1px solid var(--line); display: flex; overflow-x: auto; padding: 0; scrollbar-width: none; }
  .tool-list::-webkit-scrollbar { display: none; }
  .tool-list li { flex: none; }
  .tool-list button { display: flex; gap: 8px; padding: 12px 14px; }
  .tool-list button::before { line-height: inherit; }
  .tool-list button::after { top: auto; left: 0; right: 0; width: auto; height: 2px; transform: scaleX(0); }
  .tool-list button[aria-selected="true"]::after { transform: scaleX(1); }
  .tool-list span { display: none; }
  .three { grid-template-columns: 1fr; }
  .safe-cell { border-left: 0; border-top: 1px solid var(--line); }
  .safe-cell:first-child { border-top: 0; }
  .price-card { border-left: 0; border-top: 1px solid var(--line); }
  .siren-foot { grid-template-columns: 1fr; }
  .release { grid-template-columns: 1fr; gap: 10px; }
  .apps-feature { grid-template-columns: 1fr; gap: 24px; padding: 16px; }
  .apps-grid { grid-template-columns: 1fr; }
  .app-card { border-left: 0; border-top: 1px solid var(--line); }
  .app-card:first-child { border-top: 0; }
  .also-row { grid-template-columns: 1fr auto; }
  .also-row .muted { grid-column: 1; grid-row: 2; }
  .also-row .mono { grid-row: 1 / span 2; grid-column: 2; align-self: center; }
  .note { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 560px) {
  .mock { padding: 12px 14px; font-size: 11px; line-height: 1.55; }
  .mock-slider { margin-bottom: 3px; gap: 10px; }
  .hide-xs { display: none !important; }
  .topbar { gap: 10px; }
  /* the full name and the Buy button share a phone's width: drop the FIVEM tag and tighten the mark */
  .topbar .wordmark { font-size: 14px; gap: 7px; letter-spacing: .02em; }
  .topbar .wordmark small { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div { border-left: 1px solid var(--line) !important; border-top: 1px solid var(--line); }
  .stats div:nth-child(odd) { border-left: 0 !important; }
  .stats div:nth-child(-n+2) { border-top: 0; }
  .steps { grid-template-columns: 1fr; }
  .odo { font-size: 76px; }
  .dl-meta { width: 100%; }
  .dl-meta div { flex: 1; padding: 10px; }
  .statusbar .faint { display: none; }
  .hero-cta .btn { width: 100%; }
  .download .hero-cta .btn { width: 100%; }
}
@media (max-width: 1080px) and (min-width: 561px) { .hide-sm { display: none; } }

/* ── reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
  .hero-title .w > span { transform: none; }
  .shot-img::before { display: none; }
}

/* ── v2: hero split, demo video, CTAs, FAQ, release pace ── */
.hero { padding: clamp(40px, 6vw, 80px) 0 56px; }
.hero-layout { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 4vw, 64px); align-items: center; margin-bottom: 36px; }
.hero-copy { position: relative; }
.hero-title { font-size: clamp(38px, 5.2vw, 72px); }
.hero-sub { margin: 0 0 28px; }
.hero-cta { justify-content: flex-start; }
.spec { margin: 0 0 6px; }
.pace { margin: 0; font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.pace::before { content: ""; width: 7px; height: 7px; background: var(--ok); border-radius: 50%; box-shadow: 0 0 0 3px rgba(60, 203, 127, .15); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(60, 203, 127, 0); } }
.hero-shot .shot-img { aspect-ratio: 16 / 10; }
.hero-shot .shot-img img { transform: scale(var(--z, 1)); transform-origin: var(--o, 50% 50%); transition: opacity .35s var(--ease), transform 6s linear; }
.hero-shot .shot-img img.drift { transform: scale(calc(var(--z, 1) * 1.06)); }
.hero-shot .statusbar span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.stats { border-top: 1px solid var(--line); }

.play {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 12px;
  background: rgba(16, 16, 16, .82); border: 1px solid var(--line-strong); border-radius: var(--radius);
  color: var(--text); font: 500 13.5px var(--font-ui); cursor: pointer;
  transition: background-color .15s, border-color .15s, transform .15s var(--ease);
}
.play svg { width: 18px; height: 18px; fill: var(--text); padding: 3px; background: var(--accent); border-radius: 50%; box-sizing: content-box; transition: transform .2s var(--ease-out); }
.play:hover { background: rgba(16, 16, 16, .95); border-color: var(--accent); }
.play:hover svg { transform: scale(1.12); }
.btn svg path[d^="M5 3.5"] { fill: currentColor; stroke: none; }

.video-modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px; background: rgba(6, 6, 6, .88); opacity: 0; transition: opacity .2s var(--ease); }
.video-modal.is-open { opacity: 1; }
.video-modal[hidden] { display: none; }
.video-box { position: relative; width: min(1280px, 100%); background: var(--surface); border: 1px solid var(--line-strong); transform: scale(.97); transition: transform .25s var(--ease-out); }
.video-modal.is-open .video-box { transform: none; }
.video-head { display: flex; justify-content: space-between; align-items: center; height: 38px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line); }
.video-close { width: 30px; height: 30px; background: none; border: 1px solid transparent; border-radius: var(--radius); color: var(--text-muted); cursor: pointer; font-size: 14px; }
.video-close:hover { background: var(--surface-3); color: var(--text); }
.video-box video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }

.drive-media { position: relative; padding-bottom: 60px; }
.drive-main { aspect-ratio: 16 / 10; }
.drive-inset { position: absolute; right: -16px; bottom: 0; width: 46%; aspect-ratio: 16 / 9; border-color: var(--line-strong); }
.drive-media figcaption { position: absolute; left: 0; bottom: 0; padding: 5px 9px; background: var(--surface); border-top: 1px solid var(--line); border-right: 1px solid var(--line); color: var(--text-muted); font-size: 10px; }
.floor-plane { animation: roll 2.4s linear infinite; }
@keyframes roll { from { transform: rotateX(72deg) translate3d(0, 0, 0); } to { transform: rotateX(72deg) translate3d(0, 96px, 0); } }

.cta-band { margin-top: 48px; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 26px 28px; border: 1px solid var(--accent-selected); background: var(--accent-soft) var(--grid-tile) 0 0 / 96px 96px; position: relative; }
.cta-band::before { content: ""; position: absolute; left: -1px; top: -1px; bottom: -1px; width: 2px; background: var(--accent); }
.cta-band .caption { margin-bottom: 6px; color: var(--accent-text); }
.cta-line { margin: 0; font: 600 clamp(19px, 2.2vw, 24px)/1.25 var(--font-display); color: var(--text); max-width: 640px; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-inline { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border: 1px solid var(--line); background: var(--surface); }
.cta-inline p { margin: 0; color: var(--text-muted); font-size: 14.5px; }

.light-shot { aspect-ratio: 4 / 3; }
.light-shot figcaption { position: absolute; left: 0; bottom: 0; padding: 6px 10px; background: var(--surface); border-top: 1px solid var(--line); border-right: 1px solid var(--line); color: var(--text-muted); font-size: 10px; }
#install .three { margin-top: 64px; }

.pace-box { margin-top: 24px; padding: 14px 16px; border: 1px solid var(--line); background: var(--input); }
.pace-box .caption { margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.pace-box .caption::before { content: ""; width: 7px; height: 7px; background: var(--ok); border-radius: 50%; }
.pace-line { color: var(--text-muted); font-size: 14px; margin: 0 0 6px; }
.pace-line .mono { color: var(--text); }
.price-facts { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; color: var(--text-muted); }
.price-facts li::before { content: "✓"; color: var(--ok); margin-right: 8px; font-family: var(--font-mono); }

.faq-wrap { max-width: 860px; }
.faq { border: 1px solid var(--line); background: var(--surface); }
.faq details { border-top: 1px solid var(--line); }
.faq details:first-child { border-top: 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; font: 600 17px var(--font-display); transition: background-color .15s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 20px var(--font-mono); color: var(--text-faint); transition: transform .25s var(--ease-out), color .15s; }
.faq summary:hover { background: var(--surface-3); }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--accent); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--text-muted); font-size: 14.5px; max-width: 700px; }
.faq details[open] p { animation: fadeUp .3s var(--ease-out); }

@media (max-width: 1080px) {
  .hero-layout { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta { justify-content: center; }
  .pace { justify-content: center; }
}
@media (max-width: 860px) {
  .cta-band { grid-template-columns: 1fr; }
  .cta-inline { flex-direction: column; align-items: flex-start; }
  .drive-inset { right: 8px; }
}
@media (max-width: 560px) {
  .play span { display: none; }
  .play { padding: 0 10px; }
  .cta-actions .btn, .cta-inline .btn { width: 100%; }
  .hero-shot .seg button { padding: 0 7px; }
  [data-hero-file] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .floor-plane { animation: none; }
  .pace::before { animation: none; }
}

/* ── v3: one page per app. The app switcher above the top bar, app cards, the home page ── */
.appsbar { position: relative; z-index: 51; height: 34px; background: var(--bg); border-bottom: 1px solid var(--line); }
.appsbar-inner { display: flex; align-items: stretch; height: 100%; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
.appsbar-inner::-webkit-scrollbar { display: none; }
.appsbar a { flex: none; position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; font-size: 12.5px; color: var(--text-faint); transition: color .15s; }
.appsbar a:hover { color: var(--text); }
.appsbar a[aria-current="page"] { color: var(--text); }
.appsbar a[aria-current="page"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; background: var(--accent); }
.appsbar-home { margin-right: 6px; font: 700 12px/1 var(--font-display); letter-spacing: .12em; }
.appsbar-home::before { content: ""; position: absolute; right: -3px; top: 9px; bottom: 9px; width: 1px; background: var(--line); }
.appsbar-home .star { width: 11px; height: 11px; fill: currentColor; transition: transform .5s var(--ease-out); }
.appsbar-home:hover .star { transform: rotate(90deg); }

.app-card-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.apps-grid[data-app-cards="others"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.apps-grid[data-app-cards="all"] { margin-top: 0; }
.apps-grid[data-app-cards="all"] .app-card:nth-child(odd) { border-left: 0; }
.apps-grid[data-app-cards="all"] .app-card:nth-child(n+3) { border-top: 1px solid var(--line); }
.apps-grid[data-app-cards="all"] .app-card-name { font-size: 20px; font-family: var(--font-display); }

.stats-4 { grid-template-columns: repeat(4, 1fr); }

/* a plain screenshot beside its copy (the app pages' feature rows) */
.feature { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.feature + .feature { margin-top: clamp(56px, 8vw, 96px); }
.feature.flip > .shot { order: 2; }
.feature > .shot { aspect-ratio: 1440 / 880; }
.feature h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.15; margin: 10px 0 14px; }
.feature .lede { font-size: 16px; margin-bottom: 18px; }
.feature .tree { aspect-ratio: auto; overflow-x: auto; margin: 0; padding: 16px 18px; font-size: 12.5px; }
.feature-copy > .caption { display: flex; align-items: center; gap: 10px; }
.feature-copy > .caption::before { content: ""; width: 9px; height: 9px; background: var(--accent); clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%); }

/* the Dirt Generator page: paint under a canvas of dirt that wipes off */
.wipe { position: relative; height: 300px; border: 1px solid var(--line-strong); overflow: hidden;
  background: radial-gradient(120% 70% at 30% 0%, rgba(255, 255, 255, .22), transparent 55%), linear-gradient(170deg, #3561d6, #1d3f9e 55%, #122a66); }
.wipe::after { content: ""; position: absolute; left: 0; right: 0; top: 38%; height: 1px; background: rgba(0, 0, 0, .35); box-shadow: 0 1px 0 rgba(255, 255, 255, .12); pointer-events: none; }
.wipe canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.wipe canvas:active { cursor: grabbing; }
.wipe-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; font-size: 13px; color: var(--text-muted); }
.channels .safe-cell h3 { display: flex; align-items: center; gap: 10px; margin-top: 0; }
.channels .safe-cell h3 i { width: 14px; height: 14px; flex: none; }

/* the home page: the window every Ritual app shares */
.layout-map { display: grid; grid-template: "bar bar bar" 50px "side view insp" minmax(260px, 1fr) "status status status" 30px / 170px minmax(0, 1fr) 230px; border: 1px solid var(--line-strong); background: var(--surface); }
.layout-map > div { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; font-size: 13px; color: var(--text-muted); transition: background-color .2s, color .2s; }
.layout-map > div:hover { background: var(--accent-soft); color: var(--text); }
.layout-map > div:hover .caption { color: var(--accent-text); }
.lm-bar { grid-area: bar; flex-direction: row !important; align-items: center; gap: 12px !important; border-bottom: 1px solid var(--line); }
.lm-side { grid-area: side; border-right: 1px solid var(--line); }
.lm-view { grid-area: view; justify-content: flex-end; background: var(--input) var(--grid-tile) 0 0 / 96px 96px; }
.lm-insp { grid-area: insp; border-left: 1px solid var(--line); }
.lm-status { grid-area: status; flex-direction: row !important; align-items: center; gap: 12px !important; padding-block: 0 !important; border-top: 1px solid var(--line); font-size: 12px !important; }
.lm-insp .lm-save { margin-top: auto; padding: 8px 10px; border: 1px solid var(--line); background: var(--input); font-size: 12px; }
.lm-insp .lm-save b { color: var(--accent-text); font-weight: 500; }
.lm-side ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; font-size: 12.5px; }
.lm-side li { padding: 4px 8px; border-left: 2px solid transparent; }
.lm-side li:first-child { border-left-color: var(--accent); background: var(--surface-3); color: var(--text); }

@media (max-width: 1080px) {
  .stats-4 { grid-template-columns: repeat(2, 1fr); }
  .stats-4 div:nth-child(3) { border-left: 0; }
  .stats-4 div:nth-child(4) { border-left: 1px solid var(--line); }
  .stats-4 div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 860px) {
  .apps-grid[data-app-cards] { grid-template-columns: 1fr; }
  .apps-grid[data-app-cards] .app-card { border-left: 0; border-top: 1px solid var(--line); }
  .apps-grid[data-app-cards] .app-card:first-child { border-top: 0; }
  .feature { grid-template-columns: 1fr; }
  .feature.flip > .shot { order: 0; }
  .layout-map { grid-template: "bar" auto "side" auto "view" 160px "insp" auto "status" auto / 1fr; }
  .lm-side, .lm-insp { border: 0 !important; border-bottom: 1px solid var(--line) !important; }
  .lm-bar, .lm-status { flex-direction: column !important; align-items: flex-start !important; gap: 4px !important; padding-block: 10px !important; }
}

/* pricing: a card per plan (the home page), and the bundle under a studio's own price */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); background: var(--surface); }
.plan { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 24px 22px; border-left: 1px solid var(--line); }
.plan:first-child { border-left: 0; }
.plan p { margin: 0; }
.plan.is-bundle { background: var(--accent-soft); }
.plan.is-bundle::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 2px; background: var(--accent); }
.plan.is-bundle .caption { color: var(--accent-text); }
.plan-name { font: 600 19px/1.2 var(--font-display); }
.plan-name a { color: var(--text); }
.plan-name a:hover { color: var(--accent-text); }
.plan-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 6px 0 4px !important; }
.plan-price b { font: 600 44px/1 var(--font-display); letter-spacing: -.02em; }
.plan-price span { color: var(--text-faint); font-size: 12px; }
.plan .muted { font-size: 14px; flex: 1; }
.plan-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.plan-dl { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin: 2px 0 0 !important; color: var(--text-muted); }
.plan-dl svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.cta-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
/* the price card's buttons carry long names (the exe): let them wrap rather than widen the card on a phone */
.price-card .btn { white-space: normal; text-align: center; height: auto; min-height: 42px; padding-block: 8px; }
@media (max-width: 860px) { .price { grid-template-columns: minmax(0, 1fr); } }
.plan-soon { margin-top: 10px; display: flex; align-items: center; justify-content: center; min-height: 34px; padding: 6px 12px; border: 1px dashed var(--line-strong); color: var(--text-faint); font-size: 12px; }
.plans-free { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 16px 0 0; padding: 14px 20px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; color: var(--text-muted); }
.plans-free .caption { color: var(--ok); }
.cta-band[data-bundle] { margin-top: 16px; }
.cta-band[data-bundle] .small { margin: 6px 0 0; }
.price-figure .ccy { white-space: nowrap; }

@media (max-width: 1080px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan:nth-child(odd) { border-left: 0; }
  .plan:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .plans { grid-template-columns: 1fr; }
  .plan { border-left: 0; }
  .plan:nth-child(n+2) { border-top: 1px solid var(--line); }
  .plans-free { padding: 14px 16px; }
}
