/* Arrangely website: plain white pages in the app's Crisp indigo. No outside fonts or requests.
   Motion is CSS first (scroll-driven reveals, cross-page transitions); site.js only runs the interactive demos.
   Everything is readable without motion or scripts, and prefers-reduced-motion turns the movement off. */

:root {
  color-scheme: light;
  --brand: #4f46d8;
  --brand-hover: #4137bd;
  --brand-text: #4137bd;
  --brand-soft: #eeedff;
  --canvas: #f6f6fc;
  --surface: #ffffff;
  --ink: #171a2e;
  --muted: #535a76;
  --border: #dfe3ee;
  --night: #120f3a;
  --night-2: #1c1760;
  --on-night: #ffffff;
  --on-night-muted: #d3d1f7;
  --glow-a: #6f66ff;
  --glow-b: #19c2c9;
  --glow-c: #d24bd8;
  --shadow: 0 24px 60px -24px #1c176055;
  --radius: 14px;
  --page: min(1180px, 100% - 40px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem; line-height: 1.6;
}
img, svg { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.03em; font-weight: 700; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); letter-spacing: -.045em; }
.wrap > h2 { margin-bottom: clamp(24px, 3vw, 36px); }
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -.035em; }
h3 { font-size: 1.25rem; letter-spacing: -.015em; line-height: 1.25; }
p { margin: 0; }
a { color: var(--brand-text); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--brand-text); outline-offset: 3px; border-radius: 4px; }
.on-night :focus-visible { outline-color: #fff; }

.skip-link { position: fixed; left: 16px; top: 8px; z-index: 60; padding: 8px 14px; border-radius: 6px; background: var(--brand); color: #fff; transform: translateY(-200%); }
.skip-link:focus { transform: none; }
.wrap { width: var(--page); margin-inline: auto; }

/* ---- header ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--canvas) 82%, transparent); backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid var(--border); view-transition-name: site-header; }
.header-inner { width: var(--page); margin-inline: auto; display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.3125rem; font-weight: 700; letter-spacing: -.035em; text-decoration: none; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(140deg, var(--glow-a), var(--brand-hover)); color: #fff; font-weight: 800; }
.site-nav { margin-left: auto; }
.menu-button { display: none; }
.nav-links { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav-links a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-size: .9688rem; font-weight: 600; text-decoration: none; transition: color .2s, background-color .2s; }
.nav-links a:hover { background: var(--brand-soft); color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--brand-text); }
.nav-links .nav-cta { margin-left: 8px; background: var(--brand); color: #fff; }
.nav-links .nav-cta:hover { background: var(--brand-hover); color: #fff; }

/* ---- buttons ---- */
.button { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border: 0; border-radius: 10px; background: var(--brand); color: #fff; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; overflow-wrap: anywhere; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .2s; }
.button:hover { background: var(--brand-hover); transform: translateY(-2px); box-shadow: 0 14px 30px -12px #4f46d8aa; }
.button .arrow { transition: transform .25s var(--ease); }
.button:hover .arrow { transform: translateX(4px); }
.button-light { background: #fff; color: #231d78; }
.button-light:hover { background: #fff; color: #231d78; box-shadow: 0 14px 40px -10px #ffffff66; }
.button-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1.5px currentColor; }
.button-ghost:hover { background: #ffffff1a; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---- night hero ---- */
.on-night { background: var(--night); color: var(--on-night); }
.hero { position: relative; overflow: hidden; isolation: isolate; }
.hero-inner { padding-block: clamp(44px, 5vw, 72px) clamp(48px, 7vw, 88px); }
.status { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 26px; padding: 6px 14px; border: 1px solid #ffffff38; border-radius: 999px; background: #ffffff12; font-size: .9063rem; font-weight: 600; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #5ff0d0; box-shadow: 0 0 0 0 #5ff0d0; animation: ping 2.6s ease-out infinite; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 10px #5ff0d000; } }
.hero h1 { max-width: none; }
.hero h1 .line { display: block; overflow: clip; padding-bottom: .08em; }
.hero h1 .line > span { display: block; animation: rise-in .9s var(--ease) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; background: linear-gradient(95deg, #fff 10%, #a9a4ff 55%, #6ff0da); -webkit-background-clip: text; background-clip: text; color: transparent; }
@keyframes rise-in { from { transform: translateY(105%); } to { transform: none; } }
.lead { max-width: 56ch; margin-block: 26px 34px; color: var(--on-night-muted); font-size: clamp(1.125rem, 1.8vw, 1.3125rem); animation: fade-up .9s .25s var(--ease) both; }
.hero .button-row { animation: fade-up .9s .35s var(--ease) both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.page-hero .hero-inner { padding-block: clamp(48px, 7vw, 88px) clamp(44px, 6vw, 72px); }
.page-hero h1 { max-width: 18ch; font-size: clamp(2.5rem, 5.8vw, 4.4rem); }
.page-hero .lead { margin-bottom: 0; }

/* ---- the looping exam day demo ---- */
.demo { --t: 18s; position: relative; container-type: inline-size; aspect-ratio: 16 / 9.4; overflow: hidden; border: 1px solid #ffffff30; border-radius: 16px; background: #f3f4fb; box-shadow: 0 50px 100px -30px #000000a0, 0 0 0 8px #ffffff0d; color: #20243b; }
.scene { position: absolute; inset: 0; display: flex; opacity: 0; animation: var(--t) linear infinite both; font-size: 1.32cqw; line-height: 1.4; }
.rail { flex: 0 0 6.2%; display: flex; flex-direction: column; align-items: center; padding-top: 1.8cqw; background: #4f46d8; color: #fff; font-weight: 800; font-size: 2.8cqw; }
.rail small { font-size: .85cqw; font-weight: 600; }
.scene-main { flex: 1; display: grid; place-items: center; }
.d-card { width: 47%; padding: 2.6cqw 3cqw; border: .08cqw solid #dfe3ee; border-radius: .5cqw; background: #fff; }
.d-eyebrow { color: #4f46d8; font-size: .98cqw; font-weight: 650; }
.d-title { margin-block: .8cqw; font-size: 2.3cqw; font-weight: 650; letter-spacing: -.02em; }
.d-input { position: relative; margin-block: 1.1cqw; padding: 1cqw 1.4cqw; height: 4.4cqw; border: .16cqw solid #4f46d8; border-radius: .6cqw; font-size: 2.1cqw; letter-spacing: .06em; }
.d-typed { display: inline-block; overflow: hidden; white-space: nowrap; font-family: Consolas, "Courier New", monospace; animation: type var(--t) steps(4) infinite both; }
.d-btn { display: grid; place-items: center; height: 3.6cqw; border-radius: .6cqw; background: #4f46d8; color: #fff; font-size: 1.5cqw; font-weight: 600; }
.d-details { margin-block: 1.5cqw 2cqw; text-align: center; font-size: 2cqw; font-weight: 650; }
.d-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4cqw; }
.d-no { background: #f8d7da; color: #8a1c1c; border: .15cqw solid #b4232a; }
.d-yes { position: relative; overflow: hidden; background: #cfcdf3; }
.d-yes::after { content: ""; position: absolute; inset: 0; background: #4f46d8; transform-origin: left; animation: countdown var(--t) linear infinite both; }
.d-yes span { position: relative; z-index: 1; }
.scene-exam { flex-direction: column; background: #f3f4fb; }
.x-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1cqw; height: 5.2%; padding-inline: 1cqw; border-bottom: .08cqw solid #dfe3ee; background: #fff; font-weight: 600; font-size: 1cqw; white-space: nowrap; }
.x-bar b { font-weight: 650; }
.x-listen { display: flex; gap: .6cqw; }
.x-chip { padding: .22cqw .9cqw; border: .08cqw solid #dfe3ee; border-radius: .4cqw; background: #fff; font-size: .95cqw; }
.x-read { border: .13cqw solid #20243b; animation: read-on var(--t) step-end infinite both; }
.x-finish { justify-self: end; padding: .28cqw 1cqw; border-radius: .4cqw; background: #b42333; color: #fff; }
.x-panes { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: .5cqw; padding: .7cqw; min-height: 0; }
.x-pane { position: relative; overflow: hidden; padding: 1.6cqw 2cqw; border: .08cqw solid #dfe3ee; border-radius: .5cqw; background: #fff; font-size: 1.14cqw; }
.x-answer { animation: pane-left var(--t) var(--ease) infinite both; }
.x-paper { animation: pane-right var(--t) var(--ease) infinite both; }
.x-paper::after { content: ""; position: absolute; inset: 0; background: #90caf9; mix-blend-mode: multiply; animation: tint var(--t) linear infinite both; pointer-events: none; }
.x-h { margin-bottom: .7cqw; font-weight: 650; font-size: 1.2cqw; }
.x-type { display: block; overflow: hidden; white-space: nowrap; animation: answer var(--t) steps(40) infinite both; }
.x-hl { background: linear-gradient(#ffe36e, #ffe36e) no-repeat 0 0 / 0% 100%; animation: sweep var(--t) linear infinite both; }
.demo-caption { position: absolute; left: 50%; bottom: 3.2%; z-index: 3; width: max-content; max-width: 90%; padding: .5cqw 1.5cqw; border-radius: 99px; background: #120f3ae6; color: #fff; font-size: 1.22cqw; font-weight: 600; opacity: 0; transform: translateX(-50%); animation: var(--t) linear infinite both; }

.scene-1, .cap-1 { animation-name: show-1; }
.scene-2, .cap-2 { animation-name: show-2; }
.scene-3, .cap-3 { animation-name: show-3; }
.cap-4 { animation-name: show-4; }
@keyframes show-1 { 0%, 26% { opacity: 1; } 28%, 100% { opacity: 0; } }
@keyframes show-2 { 0%, 26% { opacity: 0; } 28%, 49% { opacity: 1; } 51%, 100% { opacity: 0; } }
@keyframes show-3 { 0%, 49% { opacity: 0; } 51%, 97% { opacity: 1; } 100% { opacity: 0; } }
@keyframes show-4 { 0%, 71% { opacity: 0; } 73%, 96% { opacity: 1; } 98%, 100% { opacity: 0; } }
.cap-3 { animation-name: show-3b; }
@keyframes show-3b { 0%, 49% { opacity: 0; } 51%, 70% { opacity: 1; } 72%, 100% { opacity: 0; } }
@keyframes type { 0%, 5% { width: 0; } 20%, 100% { width: 4ch; } }
@keyframes countdown { 0%, 28% { transform: scaleX(0); } 45%, 100% { transform: scaleX(1); } }
@keyframes pane-left { 0%, 49% { transform: translateX(-6%); opacity: 0; } 54%, 100% { transform: none; opacity: 1; } }
@keyframes pane-right { 0%, 50% { transform: translateX(6%); opacity: 0; } 56%, 100% { transform: none; opacity: 1; } }
@keyframes answer { 0%, 54% { width: 0; } 70%, 100% { width: 100%; } }
@keyframes tint { 0%, 74% { opacity: 0; } 79%, 100% { opacity: .55; } }
@keyframes sweep { 0%, 80% { background-size: 0% 100%; } 95%, 100% { background-size: 100% 100%; } }
@keyframes read-on { 0%, 79% { background: #fff; color: #20243b; } 80%, 96% { background: #4f46d8; color: #fff; } 97%, 100% { background: #fff; color: #20243b; } }

.demo-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; color: var(--on-night-muted); font-size: .9063rem; }
.pause { padding: 6px 14px; border: 1px solid #ffffff55; border-radius: 8px; background: transparent; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.pause:hover { background: #ffffff1a; }
html.motion-paused html.motion-paused .demo *, html.motion-paused .demo-caption, html.motion-paused .flow, html.motion-paused .status::before { animation-play-state: paused !important; }

/* ---- sections ---- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section + .section { padding-top: 0; }
.kicker { margin-bottom: 14px; color: var(--brand-text); font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.on-night .kicker { color: #a9a4ff; }
.section-head { max-width: 760px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p:not(.kicker) { margin-top: 16px; color: var(--muted); font-size: 1.1875rem; }
.on-night .section-head p:not(.kicker) { color: var(--on-night-muted); }

/* ---- bento with a pointer spotlight ---- */
.bento { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.tile { --x: 50%; --y: 0%; position: relative; grid-column: span 2; overflow: hidden; padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--border)); }
.tile.wide { grid-column: span 3; }
.tile.full { grid-column: span 6; }
.tile p { margin-top: 10px; color: var(--muted); }
.tile a.more { display: inline-block; margin-top: 14px; font-weight: 650; }
.tile.ink { border-color: transparent; background: linear-gradient(150deg, var(--night-2), var(--night)); color: #fff; }
.tile.ink p { color: var(--on-night-muted); }
.tile.ink a { color: #fff; }
.tile.ink:focus-within { outline: 2px solid var(--brand-text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.chips li { padding: 6px 12px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-text); font-size: .9063rem; font-weight: 600; }

/* ---- stacking screenshots ---- */
.stack { display: grid; gap: 32px; }
.stack-card { position: sticky; top: 92px; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(24px, 4vw, 56px); padding: clamp(24px, 4vw, 48px); border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.stack-card:nth-child(2) { top: 108px; }
.stack-card:nth-child(3) { top: 124px; }
.stack-card:nth-child(4) { top: 140px; }
.step-no { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 12px; background: var(--brand); color: #fff; font-weight: 800; }
.stack-card p { margin-top: 12px; color: var(--muted); }
.shot { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; }
.shot img { width: 100%; }

/* ---- playground ---- */
.play { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 20px; align-items: start; }
.controls { padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.controls h3 { margin-bottom: 14px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-block: 11px; border-top: 1px solid var(--border); font-weight: 600; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .track { flex: 0 0 auto; position: relative; width: 44px; height: 25px; border-radius: 99px; background: #8088a6; transition: background-color .25s; }
.toggle .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.toggle input:checked + .track { background: var(--brand); }
.toggle input:checked + .track::after { transform: translateX(19px); }
.toggle input:focus-visible + .track { outline: 3px solid var(--brand-text); outline-offset: 2px; }
.swatch-group { margin: 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--border); }
.swatch-group legend { padding: 12px 0 0; font-weight: 600; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.swatches label { position: relative; cursor: pointer; }
.swatches input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.swatches span { display: grid; place-items: center; min-width: 34px; height: 34px; padding-inline: 8px; border: 2px solid var(--border); border-radius: 8px; background: var(--c, transparent); color: #20243b; font-size: .8125rem; font-weight: 600; transition: transform .2s var(--ease); }
.swatches .none-swatch { color: var(--ink); }
.swatches input:checked + span { border-color: var(--brand-text); box-shadow: 0 0 0 2px var(--brand-text); transform: scale(1.06); }
.swatches input:focus-visible + span { outline: 3px solid var(--brand-text); outline-offset: 3px; }
.strength { display: block; margin-top: 14px; font-weight: 600; }
.strength input { display: block; width: 100%; margin-top: 8px; accent-color: var(--brand); }

.window { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: #f3f4fb; box-shadow: var(--shadow); color: #20243b; }
.win-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #dfe3ee; background: #fff; font-size: .875rem; font-weight: 600; }
.win-listen { display: flex; gap: 8px; }
.win-bar button { padding: 6px 14px; border: 1.5px solid #20243b; border-radius: 7px; background: #fff; color: #20243b; font: inherit; cursor: pointer; transition: background-color .2s, color .2s; }
.win-bar button[aria-pressed="true"] { background: #4f46d8; border-color: #4f46d8; color: #fff; }
.win-finish { justify-self: end; padding: 5px 12px; border-radius: 7px; background: #b42333; color: #fff; }
.win-panes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-height: 340px; padding: 8px; }
.win-pane { position: relative; overflow: hidden; padding: 20px 22px; border: 1px solid #dfe3ee; border-radius: 8px; background: #fff; font-size: .9688rem; transition: opacity .3s, transform .4s var(--ease); }
.win-pane::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--tint, transparent); opacity: var(--tint-strength, 0); mix-blend-mode: multiply; transition: opacity .35s, background-color .35s; }
.win-pane h4 { margin: 0 0 10px; font-size: 1rem; }
.win-pane p + p { margin-top: 10px; }
.win-panes.one { grid-template-columns: 1fr; }
.win-pane[hidden] { display: none; }
.pane-label { margin-bottom: 8px; color: #626985; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.squiggle { transition: text-decoration-color .3s; text-decoration: underline wavy transparent 1.5px; text-underline-offset: 3px; }
.spell-on .squiggle { text-decoration-color: #d11f2e; }
.w { border-radius: 3px; transition: background-color .12s; }
.w.on { background: #ffe36e; }

/* ---- comparison table ---- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 14px 18px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
thead th { color: var(--muted); font-size: .8125rem; letter-spacing: .05em; text-transform: uppercase; }
tbody tr:last-child > * { border-bottom: 0; }
tbody th { font-weight: 650; white-space: nowrap; }
td { color: var(--muted); }
.yes { color: var(--brand-text); font-weight: 700; }

/* ---- diagram ---- */
.diagram { padding: clamp(16px, 3vw, 36px); border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.diagram svg { width: 100%; }
.diagram text { fill: var(--ink); font-family: inherit; font-size: 15px; font-weight: 600; }
.diagram .sub { fill: var(--muted); font-size: 12.5px; font-weight: 500; }
.d-box { fill: var(--brand-soft); stroke: var(--brand-text); stroke-width: 1.5; }
.d-off { fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-dasharray: 5 5; }
.d-cross { stroke: #d11f2e; stroke-width: 3; stroke-linecap: round; }
.flow { fill: none; stroke: var(--brand-text); stroke-width: 2.5; stroke-dasharray: 7 9; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -32; } }

/* ---- reliability tabs ---- */
.tabs { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 24px; align-items: start; }
.tab-list { display: grid; gap: 6px; }
.tab-list button { padding: 14px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; text-align: left; cursor: pointer; transition: transform .25s var(--ease), background-color .2s, color .2s, border-color .2s; }
.tab-list button:hover { transform: translateX(4px); border-color: var(--brand-text); }
.tab-list button[aria-selected="true"] { border-color: var(--brand); background: var(--brand); color: #fff; }
.tab-panel { padding: clamp(24px, 4vw, 44px); border-radius: 20px; background: linear-gradient(150deg, var(--night-2), var(--night)); color: #fff; }
.tab-panel:focus-visible { outline-offset: 4px; }
.tab-panel + .tab-panel { margin-top: 16px; }
.js-tabs .tab-panel + .tab-panel { margin-top: 0; }
.tab-panel:not([hidden]) { animation: panel-in .45s var(--ease) both; }
@keyframes panel-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.tab-panel h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); letter-spacing: -.03em; }
.timeline { margin: 24px 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding: 0 0 18px 28px; color: var(--on-night-muted); }
.timeline li::before { content: ""; position: absolute; left: 3px; top: .55em; width: 11px; height: 11px; border-radius: 50%; background: #6ff0da; }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 1.3em; bottom: -.3em; width: 1.5px; background: #ffffff3a; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline strong { color: #fff; }

/* ---- pilot steps ---- */
.path { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: path; }
.path li { counter-increment: path; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.path li::before { content: counter(path); display: block; margin-bottom: 14px; background: linear-gradient(120deg, var(--glow-a), var(--glow-b)); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 2.6rem; font-weight: 800; line-height: 1; }
.path p { margin-top: 8px; color: var(--muted); }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.panel { padding: 28px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.panel ul { margin: 14px 0 0; padding-left: 1.2em; color: var(--muted); }
.panel li + li { margin-top: 8px; }
.note { margin-top: 20px; padding: 18px 22px; border-left: 4px solid var(--brand); border-radius: 0 10px 10px 0; background: var(--brand-soft); }

/* ---- faq ---- */
.faq-group { margin-top: 44px; }
.faq-group:first-child { margin-top: 0; }
.faq-group > h2 { margin-bottom: 14px; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
details.q { border-top: 1px solid var(--border); interpolate-size: allow-keywords; }
details.q:last-child { border-bottom: 1px solid var(--border); }
details.q summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-block: 18px; font-weight: 650; font-size: 1.125rem; cursor: pointer; list-style: none; }
details.q summary::-webkit-details-marker { display: none; }
details.q summary::after { content: "+"; flex: 0 0 auto; color: var(--brand-text); font-size: 1.6rem; line-height: 1; transition: transform .3s var(--ease); }
details.q[open] summary::after { transform: rotate(45deg); }
details.q::details-content { height: 0; overflow: clip; opacity: 0; transition: height .35s var(--ease), opacity .3s, content-visibility .35s allow-discrete; }
details.q[open]::details-content { height: auto; opacity: 1; }
details.q .a { padding-bottom: 20px; max-width: 72ch; color: var(--muted); }

/* ---- closing band ---- */
.band { position: relative; overflow: hidden; isolation: isolate; }
.band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; padding-block: clamp(56px, 8vw, 96px); }
.band h2 { max-width: 16ch; }
.band p { max-width: 54ch; margin-top: 14px; color: var(--on-night-muted); }

/* ---- footer and prose ---- */
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .9375rem; }
.footer-inner { width: var(--page); margin-inline: auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; padding-block: 28px 36px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0; padding: 0; list-style: none; }
.prose { width: min(720px, 100% - 40px); margin-inline: auto; padding-block: 48px 88px; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 22px; }
.prose h2 { margin-top: 38px; font-size: 1.4rem; letter-spacing: -.02em; }
.prose p { margin-top: 12px; color: var(--muted); }

/* ---- scroll-driven movement ---- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: vt-out .22s ease both; }
  ::view-transition-new(root) { animation: vt-in .38s var(--ease) both; }
  @keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(14px); } }
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0% entry 30%; }
    @keyframes reveal { from { opacity: 0; transform: translateY(36px); } to { opacity: 1; transform: none; } }
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .scene { opacity: 0; }
  .scene-3 { opacity: 1; }
  .d-typed, .x-type { width: auto; }
  .x-paper::after { opacity: .55; }
  .x-hl { background-size: 100% 100%; }
  .pause { display: none; }
  .demo-caption { display: none; }
}

/* ---- small screens ---- */
@media (max-width: 960px) {
  .header-inner { flex-wrap: wrap; padding-block: 0; }
  .site-nav { position: relative; }
  .nav-links { flex-wrap: wrap; }
  .has-menu .menu-button { display: inline-flex; align-items: center; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-weight: 650; cursor: pointer; }
  .has-menu .nav-links { display: none; position: absolute; right: 0; top: calc(100% + 10px); min-width: 240px; padding: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
  .has-menu.is-open .nav-links { display: grid; }
  .has-menu .nav-links .nav-cta { margin: 6px 0 0; text-align: center; }
  .play, .tabs { grid-template-columns: minmax(0, 1fr); }
  .path { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stack-card { position: static; grid-template-columns: minmax(0, 1fr); }
  .tile, .tile.wide { grid-column: span 6; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .path { grid-template-columns: minmax(0, 1fr); }
  .win-panes { grid-template-columns: minmax(0, 1fr); }
  .win-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .win-bar > span:first-child { display: none; }
  .demo { aspect-ratio: 16 / 10.5; }
}

/* ---- small pieces used by the pages ---- */
.c-yellow { --c: #fff176; } .c-blue { --c: #90caf9; } .c-cream { --c: #fff9c4; } .c-pink { --c: #f48fb1; } .c-green { --c: #a5d6a7; }
.note-shot { max-width: 720px; margin-top: 24px; }
.note-cta { margin-top: 24px; }
.panel-title { font-size: 1.25rem; letter-spacing: -.015em; line-height: 1.25; }
figure.tile.shot { padding: 0; }
.win-listen[hidden] { display: none; }
.nav-links .nav-cta[aria-current="page"] { color: #fff; }


/* ==== The look: plain white pages in the app's Crisp indigo. Everything below sets the look; everything above sets the layout. ==== */
:root {
  --canvas: #ffffff; --surface: #ffffff; --tint: #f6f7fb; --ink: #141a33; --muted: #525a75; --border: #e2e5ee;
  --brand: #4f46d8; --brand-hover: #4137bd; --brand-text: #4137bd; --brand-soft: #f0effc;
  --night: #ffffff; --on-night: #141a33; --on-night-muted: #525a75;
  --radius: 10px;
  --shadow: 0 18px 40px -24px #141a3340;
}
h1, h2, h3, .brand { font-family: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; font-weight: 650; }
h1, .page-hero h1, .prose h1 { font-size: clamp(2.25rem, 4.6vw, 3.5rem); line-height: 1.12; letter-spacing: -.025em; }
.page-hero h1 { max-width: 24ch; }
h2, .wrap > h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.18; letter-spacing: -.02em; }
h3, .panel-title { font-size: 1.1875rem; line-height: 1.3; letter-spacing: -.01em; }
.on-night :focus-visible { outline-color: var(--brand-text); }

/* Header. */
.brand { letter-spacing: -.02em; }
.brand-mark { width: 28px; height: 28px; border-radius: 7px; background: var(--brand); font-size: 1rem; font-weight: 700; }
.nav-links a:hover { background: var(--tint); }
.nav-links .nav-cta, .nav-links .nav-cta:hover { background: var(--brand); color: #fff; }
.nav-links .nav-cta:hover { background: var(--brand-hover); }

/* Buttons: no lift, no glow. */
.button { padding: 12px 20px; border-radius: 8px; font-weight: 600; }
.button:hover { transform: none; box-shadow: none; }
.button-light { background: var(--brand); color: #fff; }
.button-light:hover { background: var(--brand-hover); color: #fff; box-shadow: none; }
.button-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px #c9cedd; }
.button-ghost:hover { background: var(--tint); }

/* Top of the page. */
.hero-inner, .page-hero .hero-inner { padding-block: clamp(44px, 6vw, 80px) clamp(32px, 4vw, 56px); }
.status { margin-bottom: 20px; padding: 4px 12px; border: 0; border-radius: 6px; background: var(--brand-soft); color: var(--brand-text); font-size: .875rem; }
.status::before { width: 6px; height: 6px; background: var(--brand); box-shadow: none; animation: none; }
.hero h1 .line:nth-child(2) > span { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: inherit; }
.lead { margin-block: 20px 28px; font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); }
.demo-stage { margin-top: clamp(32px, 4vw, 48px); animation: fade-up .7s .3s var(--ease) both; }
.demo { border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.demo-foot { font-size: .875rem; }
.pause { border-color: #c9cedd; color: var(--ink); }
.pause:hover { background: var(--tint); }

/* Sections and boxes. */
.section { padding-block: clamp(56px, 7vw, 96px); }
.kicker, .on-night .kicker { margin-bottom: 10px; color: var(--brand-text); font-size: .8125rem; letter-spacing: .06em; }
.section-head { margin-bottom: clamp(28px, 4vw, 44px); }
.section-head p:not(.kicker) { margin-top: 12px; font-size: 1.0625rem; }
.tile, .panel, .path li, .controls { padding: 24px; box-shadow: none; }
.tile::before { display: none; }
.tile:hover { transform: none; box-shadow: none; border-color: var(--border); }
.tile.ink { border-color: var(--border); background: var(--surface); color: var(--ink); }
.tile.ink p { color: var(--muted); }
.tile.ink a { color: var(--brand-text); }
.tile a.more { font-weight: 600; }
figure.tile.shot { padding: 0; }
.chips li { padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--ink); font-size: .875rem; }
.path li::before { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--brand-text); font-size: 1.5rem; font-weight: 650; }
.diagram { border-radius: var(--radius); }
.band { border-top: 1px solid var(--border); background: var(--tint); }
.band-inner { padding-block: clamp(44px, 6vw, 72px); }
.band h2 { max-width: none; }
.band p { margin-top: 10px; }

/* The candidate's steps: plain rows, one under the other. */
.stack { gap: 0; }
.stack-card, .stack-card:nth-child(n) { position: static; padding: clamp(28px, 4vw, 44px) 0; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; box-shadow: none; animation: none; }
.step-no { width: 32px; height: 32px; margin-bottom: 12px; border-radius: 8px; background: var(--brand-soft); color: var(--brand-text); font-size: .9375rem; font-weight: 700; }
.stack-card p { margin-top: 8px; }
.shot { border-radius: 8px; box-shadow: var(--shadow); }
figure.tile.shot { box-shadow: none; }

/* Problem explorer. */
.tab-list button { padding: 12px 16px; border-radius: 8px; font-weight: 600; }
.tab-list button:hover { transform: none; }
.tab-panel { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.tab-panel h3 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); letter-spacing: -.015em; }
.timeline li { color: var(--muted); }
.timeline li::before { background: var(--brand); }
.timeline li::after { background: var(--border); }
.timeline strong { color: var(--ink); }

/* The arrangements demo: its Finish button stays on the right when the Read aloud buttons are hidden. */
.win-finish { grid-column: 3; }
@media (max-width: 620px) {
  .win-finish { grid-column: auto; }
}

/* The explainer film on the home page */
.film { margin: 0; }
.film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 1px solid var(--border); border-radius: var(--radius); background: #120f3a; box-shadow: var(--shadow); }
.film figcaption { margin-top: 12px; color: var(--muted); font-size: .9063rem; }
