:root {
  color-scheme: dark;
  --bg: #141917;
  --surface: #1c2320;
  --deep: #101512;
  --line: #39443e;
  --text: #f1f3ea;
  --muted: #bdc8be;
  --mint: #b6e0a3;
  --gold: #ffd283;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  font: 17px/1.58 system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
body, h1, h2, p, figure, dl, dd, pre { margin: 0; }
a { color: inherit; }
a:hover { text-decoration: underline; }
button, summary, label { cursor: pointer; }
button { font: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible, pre:focus-visible,
input:focus-visible + label { outline: 3px solid var(--gold); outline-offset: 3px; }
.wrap { width: min(1260px, 90%); margin-inline: auto; }
.skip { position: absolute; z-index: 2; top: -5rem; padding: .5rem 1rem; background: var(--gold); color: var(--deep); }
.skip:focus { top: 0; }
.mast, .hero, .band { border-bottom: 1px solid var(--line); }
.bar, nav, .actions, .frame-head, figcaption, .file-head { display: flex; align-items: center; }
.bar { min-height: 72px; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 730; letter-spacing: -.055em; text-decoration: none; }
.mark { display: inline-block; width: 19px; height: 20px; background: var(--mint); clip-path: polygon(0 35%, 32% 35%, 32% 0, 67% 0, 67% 35%, 100% 35%, 100% 100%, 67% 100%, 67% 70%, 32% 70%, 32% 100%, 0 100%); }
nav { gap: 28px; font-size: 14px; }
nav a { text-decoration: none; color: var(--muted); }
.nav-buy { color: var(--text); border: 1px solid #626f65; padding: 7px 13px; border-radius: 4px; }
.hero { background: radial-gradient(ellipse at 80% 60%, #243229 0%, transparent 57%), var(--bg); }
.hero-grid { padding-block: clamp(52px, 6.3vw, 94px); display: grid; grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr); grid-template-areas: 'lead clip' 'pitch clip'; column-gap: 5%; align-items: center; }
.lead { grid-area: lead; }
.pitch { grid-area: pitch; }
.kicker, .file-head, .frame-head, figcaption, code { font-family: var(--mono); }
.kicker { color: var(--mint); text-transform: uppercase; letter-spacing: .11em; font-size: 12px; font-weight: 650; }
.kicker span, .divider { color: #829a83; margin-inline: 3px; }
h1, h2 { text-wrap: balance; letter-spacing: -.055em; }
h1 { margin: 17px 0 20px; max-width: 12ch; font-size: clamp(55px, 5.3vw, 81px); line-height: 1.02; }
h1 em { display: block; color: var(--mint); font-weight: inherit; font-style: normal; }
h2 { font-size: clamp(34px, 3.45vw, 52px); line-height: 1.08; margin-block: 13px 20px; }
p { color: var(--muted); }
p + p { margin-top: .85em; }
.intro { max-width: 54ch; font-size: 18px; }
.actions { flex-wrap: wrap; gap: 12px 20px; margin: 24px 0 12px; }
.cta { display: inline-flex; justify-content: space-between; align-items: center; gap: 20px; color: #211c13; background: var(--gold); border-radius: 4px; text-decoration: none; font-weight: 700; font-size: 16px; padding: 13px 18px; }
.cta:hover { background: #ffe1a6; text-decoration: none; }
.secondary { font-size: 15px; font-weight: 600; text-underline-offset: .22em; }
.fine { font-size: 13px; line-height: 1.5; }
.viewport { grid-area: clip; min-width: 0; overflow: hidden; border: 1px solid #526158; background: var(--deep); border-radius: 7px; box-shadow: 0 18px 44px #060a0742; }
.frame-head, figcaption, .file-head { gap: 10px; padding: 10px 15px; color: var(--muted); font-size: 12px; }
.frame-head { color: var(--text); font-weight: 650; }
.signal { width: 7px; height: 7px; background: var(--mint); }
.frame-label { margin-left: auto; color: var(--muted); font-weight: 400; }
.viewport video { display: block; width: 100%; height: auto; }
figcaption, .file-head { justify-content: space-between; }
figcaption button { border-radius: 3px; font-size: 13px; font-weight: 600; background: var(--surface); color: var(--text); border: 1px solid #58645c; padding: 5px 10px; white-space: nowrap; }
.band { padding-block: clamp(48px, 6vw, 88px); }
.split, .inside-head { display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); gap: 9%; align-items: center; }
.split > div, .sample > div { min-width: 0; }
.muted-band { background: var(--surface); }
.bench, .depth-card { background: var(--deep); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.bench fieldset, .capture, .depth-example { margin: 0; padding: 0; border: 0; min-width: 0; }
.bench legend, .visually-hidden, .selectors input { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.selectors { display: flex; border-bottom: 1px solid var(--line); background: #202722; }
.selectors label { color: var(--muted); padding: 12px 20px; font: 600 14px/1.45 var(--mono); border-bottom: 2px solid transparent; }
.selectors input:checked + label { color: var(--mint); border-color: var(--mint); background: var(--deep); }
.selectors input:focus-visible + label { outline-offset: -4px; }
.pane { padding: 17px 20px 20px; }
.file-head { padding: 0 0 10px; }
.file-head code { color: var(--text); }
pre { font: 13px/1.65 var(--mono); overflow-x: auto; tab-size: 2; padding: 6px 0 10px; }
pre code { font: inherit; }
pre:focus-visible { outline-offset: -2px; }
.keyword { color: #ccaaf7; }
.method { color: #9bd6ed; }
.number { color: #ffd68f; }
.comment { color: #a4b5ab; }
.code-note { font-size: 14px; border-top: 1px solid var(--line); margin-top: 9px; padding-top: 12px; }
fieldset:has(#timing:checked) .collision, fieldset:has(#collision:checked) .timing { display: none; }
.demo { overflow: hidden; }
.demo img { display: block; width: 200%; height: auto; }
.inside-head { display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); gap: 9%; align-items: center; }
.split > div, .sample > div { min-width: 0; }
.muted-band { background: var(--surface); }
.bench, .depth-card { background: var(--deep); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.bench fieldset, .capture, .depth-example { margin: 0; padding: 0; border: 0; min-width: 0; }
.bench legend, .visually-hidden, .selectors input { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); }
.selectors { display: flex; border-bottom: 1px solid var(--line); background: #202722; }
.selectors label { color: var(--muted); padding: 12px 20px; font: 600 14px/1.45 var(--mono); border-bottom: 2px solid transparent; }
.selectors input:checked + label { color: var(--mint); border-color: var(--mint); background: var(--deep); }
.selectors input:focus-visible + label { outline-offset: -4px; }
.pane { padding: 17px 20px 20px; }
.file-head { padding: 0 0 10px; }
.file-head code { color: var(--text); }
pre { font: 13px/1.65 var(--mono); overflow-x: auto; tab-size: 2; padding: 6px 0 10px; }
pre code { font: inherit; }
pre:focus-visible { outline-offset: -2px; }
.keyword { color: #ccaaf7; }
.method { color: #9bd6ed; }
.number { color: #ffd68f; }
.comment { color: #a4b5ab; }
.code-note { font-size: 14px; border-top: 1px solid var(--line); margin-top: 9px; padding-top: 12px; }
fieldset:has(#timing:checked) .collision, fieldset:has(#collision:checked) .timing { display: none; }
.demo { overflow: hidden; }
.demo img { display: block; width: 200%; height: auto; }
.front img { transform: translateX(-50%); }
.demo-body { padding: 14px 18px; }
.switch { display: flex; gap: 6px; }
.switch button { padding: 8px 12px; }
.switch button[aria-pressed="true"] { color: var(--deep); background: var(--mint); border-color: var(--mint); }
#caption { margin-top: 9px; }
.inside-head { align-items: end; }
.inside-head > p { max-width: 50ch; margin-bottom: 20px; }
.files { margin-top: 14px; }
.files > div { display: grid; grid-template-columns: .8fr 1fr 1.2fr; gap: 4%; align-items: start; padding: 22px 0; border-top: 1px solid var(--line); }
.files dt { font-size: 20px; font-weight: 650; letter-spacing: -.035em; }
.files dd { font-size: 15px; color: var(--muted); }
.files code { display: block; font-size: 13px; color: var(--mint); overflow-wrap: anywhere; }
.sample { display: flex; align-items: center; justify-content: center; gap: clamp(35px, 7vw, 100px); }
/* The cover and the sample page link to the actual PDF spread. */
.sample-spread { position: relative; width: min(35%, 330px); aspect-ratio: 1.18; display: block; flex: none; }
.sample-spread img { position: absolute; height: auto; box-shadow: 0 4px 16px #10161293; }
.sample-cover { left: 0; top: 2%; width: 53%; transform: rotate(-6deg); }
.sample-page { right: 2%; bottom: 0; width: 62%; transform: rotate(3deg); }
.film { width: 100%; overflow: hidden; }
.film video { display: block; width: 200%; max-width: none; height: auto; }
.capture:has(#engine-view:checked) video, .depth-example:has(#sorted:checked) img { transform: translateX(-50%); }
.viewport:has(#player-view:checked) .engine-caption, .viewport:has(#engine-view:checked) .player-caption,
.depth-example:has(#reversed:checked) .sort-right, .depth-example:has(#sorted:checked) .sort-wrong { display: none; }
.capture .selectors label, .depth-example .selectors label { flex: 1; text-align: center; }
.depth-example { border: 1px solid var(--line); }
.demo-body { padding: 14px 18px; min-height: 98px; }
.lesson-offer { display: inline-block; margin-top: 12px; }
.demo-body code { display: block; color: var(--mint); margin-bottom: 4px; font-size: 14px; }
.demo-body p { margin: 0; font-size: 15px; }
@media (max-width: 575px) {
  .sample-spread { width: 220px; align-self: center; }
  .demo-body { min-height: 88px; }
}
.sample > div { max-width: 570px; }
.faq { align-items: start; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { padding: 15px 0; font-weight: 600; }
summary::marker { color: var(--mint); }
details p { padding: 0 16px 18px; font-size: 16px; }
.offer { background: var(--deep); }
.price-card { max-width: 585px; margin: auto; border: 1px solid #586e59; border-top: 3px solid var(--mint); padding: clamp(24px, 4vw, 49px); background: var(--surface); border-radius: 5px; }
.price-card h2 { font-size: clamp(32px, 3vw, 43px); }
.price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; color: var(--text); font-size: 57px; line-height: 1.12; font-weight: 680; letter-spacing: -.06em; }
.price span { font: 13px/1.4 var(--mono); color: var(--muted); letter-spacing: 0; }
.downloads { margin: 20px 0; }
.downloads > div { padding: 14px 0; border-top: 1px solid var(--line); }
.downloads > div:last-child { border-bottom: 1px solid var(--line); }
.downloads dt { font-weight: 700; }
.downloads code { font-size: 13px; color: var(--mint); }
.downloads p { font-size: 15px; margin-top: 4px; }
.price-card .cta { width: 100%; }
.price-card .fine { margin-top: 10px; }
#checkout { padding: 0; border: 1px solid var(--line); border-radius: 6px; width: min(740px, 96vw); max-width: 96vw; max-height: 95dvh; color: var(--text); background: var(--surface); }
#checkout::backdrop { background: #0b110fe0; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 15px 20px; }
.dialog-head h2 { font-size: 25px; margin: 0; }
.dialog-head p, .outside { font-size: 14px; }
.dialog-head button { padding: 5px 12px; }
.outside { padding: 8px 20px 12px; }
#payment-frame iframe { display: block; width: 100%; height: clamp(180px, 66dvh, 670px); border: 0; background: white; color-scheme: light; }
body:has(#checkout[open]) { overflow: hidden; }
@media (max-width: 850px) {
  .hero-grid { grid-template-columns: 1fr; grid-template-areas: 'lead' 'pitch' 'clip'; gap: 20px; }
  h1 { max-width: 16ch; margin-bottom: 0; }
  h1 em { display: inline; }
  .viewport { width: min(100%, 620px); }
  .split, .inside-head { grid-template-columns: 1fr; gap: 22px; }
  .inside-head > p { margin: 0; }
  .files > div { grid-template-columns: 1fr 1.3fr; gap: 5px 20px; }
  .files dd:last-child { grid-column: 2; }
}
@media (max-width: 575px) {
  .bar { min-height: 58px; }
  nav > a:not(.nav-buy) { display: none; }
  .hero-grid { padding-block: 36px; }
  h1 { font-size: clamp(46px, 10vw, 56px); }
  .wrap { width: 91%; }
  .pitch .intro { font-size: 16px; }
  .pane { padding: 12px; }
  .frame-head, figcaption { font-size: 11px; padding: 8px 10px; }
  .files > div { grid-template-columns: 1fr; gap: 8px; }
  .files dd:last-child { grid-column: auto; }
  .sample { flex-direction: column; align-items: start; gap: 25px; }

  .actions { gap: 12px 16px; }
}

/* Playable samples share the site's existing editorial design. */
#games{scroll-margin-top:24px}.game-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;margin-top:32px}.game-card{border:1px solid var(--line);border-radius:8px;overflow:hidden;background:var(--surface)}.game-image{display:block;background:#dbe6da;overflow:hidden}.game-image img{display:block;width:100%;height:240px;object-fit:cover;object-position:center 56%}.game-card-copy{padding:23px}.game-card h3{font-size:29px;letter-spacing:-.04em;margin:10px 0 12px}.game-card .fine{min-height:40px;margin-top:13px}.game-card .cta{margin:20px 0 12px}.game-controls{font-size:12px}.demo-followup{margin-top:28px;font-size:15px}.demo-followup a{color:var(--mint)}@media(max-width:1000px){.game-card-grid{grid-template-columns:1fr}.game-image img{height:240px}.game-card-copy{padding:22px}.mast nav{gap:12px;flex-wrap:wrap}.mast .bar{align-items:flex-start;padding-block:15px;flex-direction:column}}
