/* Maniac Lab — site styles.
   Light and dark follow the visitor's system setting (prefers-color-scheme).
   Sections come in three tones — paper, mist and night — and every component reads the
   tone's variables, so a component looks right in any section without extra rules. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter Display"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/InterDisplay-Bold.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  /* a neutral, monochrome palette with one accent: blue, for links and filled buttons */
  --paper: #ffffff;
  --mist: #f5f5f7;
  --ink: #1d1d1f;
  --ink2: #6e6e73;               /* 4.6:1 on mist, 5.1:1 on paper */
  --line: rgba(0, 0, 0, .11);
  --accent: #0a68d0;             /* links + focus: 5.3:1 on paper */
  --btn: #0a68d0;                /* white text on it: 5.3:1 */
  --btn-hover: #0858b5;
  --btn-text: #ffffff;
  --chip: rgba(0, 0, 0, .06);
  --chip-text: #1d1d1f;
  --glass: rgba(255, 255, 255, .78);
  --shot-line: rgba(0, 0, 0, .08);
  --shadow: none;
  --warn-bg: #fff4d6;
  --warn-text: #5e4500;
  --night: #000000;              /* the black sections, the same in light and dark */
  --mark-bg: #1d1d1f;
  --mark-fg: #ffffff;
  /* type + layout */
  --font: "Inter", system-ui, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  --display: "Inter Display", "Inter", system-ui, sans-serif;
  --wrap: 1200px;
  --gutter: 22px;
  --radius: 28px;
  --head-h: 48px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #000000;
    --mist: #1d1d1f;
    --ink: #f5f5f7;
    --ink2: #86868b;             /* 4.6:1 on mist, 5.9:1 on paper */
    --line: rgba(255, 255, 255, .14);
    --accent: #4ba1ff;
    --btn: #0f6ad6;
    --btn-hover: #1b76e2;
    --chip: rgba(255, 255, 255, .1);
    --chip-text: #f5f5f7;
    --glass: rgba(22, 22, 23, .8);
    --shot-line: rgba(255, 255, 255, .1);
    --warn-bg: #3a2f0d;
    --warn-text: #ffe2a0;
    --mark-bg: #f5f5f7;
    --mark-fg: #000000;
  }
}

/* tones: each section sets the variables its contents use */
.t-paper, .t-mist, .t-night, body { --bg: var(--paper); --fg: var(--ink); --fg2: var(--ink2); --ln: var(--line); --ac: var(--accent); --b: var(--btn); --bh: var(--btn-hover); --bt: var(--btn-text); --ch: var(--chip); --cht: var(--chip-text); }
.t-paper { background: var(--paper); }
.t-mist { --bg: var(--mist); background: var(--mist); }
.t-night {
  --bg: #000; --fg: #f5f5f7; --fg2: #86868b; --ln: rgba(255, 255, 255, .16); --ac: #4ba1ff;
  --b: #0f6ad6; --bh: #1b76e2; --bt: #fff; --ch: rgba(255, 255, 255, .12); --cht: #f5f5f7;
  background: #000; color: var(--fg);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.6 var(--font); letter-spacing: -.011em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: var(--ac); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--ac); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { margin: 0 0 .35em; text-wrap: balance; overflow-wrap: break-word; color: var(--fg); }
h1, h2 { font-family: var(--display); font-weight: 700; }
h1 { font-size: clamp(2.25rem, 6vw, 5rem); line-height: 1.05; letter-spacing: -.035em; }
h2 { font-size: clamp(1.85rem, 4.6vw, 3.6rem); line-height: 1.07; letter-spacing: -.032em; }
h3 { font: 600 clamp(1.15rem, 1.6vw, 1.3rem)/1.3 var(--font); letter-spacing: -.017em; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(1.06rem, 1.6vw, 1.32rem); line-height: 1.45; letter-spacing: -.018em; color: var(--fg2); max-width: 40em; text-wrap: pretty; }
.muted { color: var(--fg2); }
.small { font-size: .875rem; }
.center { text-align: center; }
.center .lead, .center .actions { margin-inline: auto; justify-content: center; }
.label { display: block; font-weight: 600; font-size: clamp(1rem, 1.5vw, 1.2rem); letter-spacing: -.015em; color: var(--fg); margin-bottom: .5rem; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.wrap.wide { max-width: calc(1360px + 2 * var(--gutter)); }
.narrow { max-width: calc(800px + 2 * var(--gutter)); }
.skip { position: absolute; left: 12px; top: -60px; background: var(--btn); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- global nav ---------- */
.site-head { position: sticky; top: 0; z-index: 60; border-bottom: 1px solid var(--line); }
/* the glass sits on a pseudo-element: a backdrop-filter on the header itself would trap the fixed phone menu inside it */
.site-head::before, .subnav::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--glass); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
body.menu-open .site-head::before { background: var(--paper); }
.has-subnav .site-head { position: relative; }
.head-in { display: flex; align-items: center; gap: 16px; height: var(--head-h); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font: 600 .95rem/1 var(--font); letter-spacing: -.015em; flex: none; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 22px; height: 22px; border-radius: 6px; background: var(--mark-bg); display: grid; place-items: center; }
.brand .mark svg { width: 15px; height: 15px; color: var(--mark-fg); }
.nav { display: flex; align-items: center; gap: 2px; margin: 0 auto; }
.nav a { color: var(--ink); opacity: .8; font-size: .8rem; padding: 6px 12px; border-radius: 999px; }
.nav a:hover { opacity: 1; text-decoration: none; }
.nav a[aria-current="page"] { opacity: 1; font-weight: 600; }
.nav .nav-dl { display: none; }
.head-tools { display: flex; align-items: center; gap: 6px; }
.lang { font-size: .7rem; font-weight: 500; color: var(--ink2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 8px; letter-spacing: .02em; }
.lang:hover { text-decoration: none; color: var(--ink); }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; padding: 0; }
.menu-btn svg { width: 20px; height: 20px; margin: auto; stroke-width: 1.5; }
@media (max-width: 920px) {
  .menu-btn { display: block; }
  .head-tools { margin-left: auto; }
  .head-tools .btn { display: none; }
  .nav { position: fixed; inset: var(--head-h) 0 0 0; flex-direction: column; align-items: stretch; gap: 0; margin: 0; padding: 14px calc(var(--gutter) + 8px) 40px; background: var(--paper); display: none; overflow-y: auto; }
  .nav a { opacity: 1; font: 600 1.6rem/1.25 var(--font); letter-spacing: -.025em; padding: 7px 0; border-radius: 0; }
  .nav .nav-dl { display: block; color: var(--accent); margin-top: 6px; }
  .js .nav.open, .no-js .nav { display: flex; }
  .no-js .nav { position: static; order: 3; width: 100%; flex-direction: row; flex-wrap: wrap; gap: 4px 18px; padding: 0 0 12px; background: none; }
  .no-js .nav a { font-size: 1rem; padding: 4px 0; }
  .no-js .menu-btn { display: none; }
  .no-js .head-in { flex-wrap: wrap; height: auto; min-height: var(--head-h); }
  body.menu-open { overflow: hidden; }
}

/* ---------- product bar: name, pill tabs for the page's sections, one action ---------- */
.subnav { position: sticky; top: 0; z-index: 55; border-bottom: 1px solid var(--line); }
.sn-in { display: flex; align-items: center; gap: 16px; height: 56px; }
.sn-title { font: 600 1.15rem/1 var(--font); letter-spacing: -.02em; color: var(--ink); white-space: nowrap; flex: none; }
.sn-title:hover { text-decoration: none; }
.sn-scroll { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; display: flex; justify-content: center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
.sn-scroll::-webkit-scrollbar { display: none; }
.sn-links { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0 14px; }
.chip { display: block; white-space: nowrap; padding: 6px 15px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-size: .82rem; font-weight: 500; line-height: 1.3; transition: background-color .2s, color .2s; }
.chip:hover { text-decoration: none; background: var(--chip); }
.chip[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.sn-cta { display: flex; align-items: center; gap: 12px; flex: none; }
.sn-price { font-size: .85rem; color: var(--ink2); }
@media (max-width: 760px) {
  .sn-in { gap: 8px; }
  .sn-title, .sn-price { display: none; }
  .sn-scroll { justify-content: flex-start; margin-left: calc(-1 * var(--gutter)); }
  .sn-links { padding-left: var(--gutter); }
  .chip { padding: 7px 15px; font-size: .88rem; }
}

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 24px; border-radius: 999px; background: var(--b); color: var(--bt); font: 500 1.02rem/1.2 var(--font); letter-spacing: -.01em; border: 0; cursor: pointer; transition: background-color .2s, transform .2s; white-space: nowrap; }
.btn:hover { background: var(--bh); text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn.outline { background: transparent; color: var(--ac); box-shadow: inset 0 0 0 1.5px var(--ac); }
.btn.outline:hover { background: var(--ch); }
.btn.soft { background: var(--ch); color: var(--cht); }
.btn.soft:hover { filter: brightness(1.06); }
@media (max-width: 640px) { .btn { min-height: 42px; padding: 9px 16px; font-size: .92rem; } .btn svg { width: 16px; height: 16px; } .hero .actions, .center .actions { gap: 12px; } }
.btn-sm { min-height: 30px; padding: 5px 14px; font-size: .82rem; }
.btn svg { width: 18px; height: 18px; flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 14px 18px; align-items: center; }
.tlink { font-weight: 500; }
.links { display: flex; flex-wrap: wrap; gap: 8px 28px; }

/* ---------- sections ---------- */
.s { padding: clamp(80px, 11vw, 150px) 0; position: relative; }
.s.tight { padding: clamp(48px, 6vw, 80px) 0; }
.s.flush-top { padding-top: 0; }
.stmt { max-width: 900px; margin: 0 auto clamp(40px, 6vw, 72px); text-align: center; }
.stmt .lead { margin-inline: auto; }
.stmt.left { margin-left: 0; text-align: left; }
.stmt.left .lead { margin-inline: 0; }

/* hero */
.hero { padding: clamp(64px, 9vw, 120px) 0 clamp(64px, 8vw, 110px); overflow: hidden; text-align: center; }
.hero .kicker { display: block; font: 600 clamp(1.05rem, 1.7vw, 1.45rem)/1.3 var(--font); letter-spacing: -.015em; color: var(--fg); margin-bottom: .6rem; }
.hero h1.giant { font-size: clamp(2.5rem, 7vw, 5.6rem); letter-spacing: -.035em; line-height: 1.06; max-width: 15em; margin: 0 auto .35em; }
.hero .sub { font: 700 clamp(1.35rem, 3vw, 2.4rem)/1.15 var(--display); letter-spacing: -.028em; color: var(--fg); max-width: 22em; margin: 0 auto .5em; text-wrap: balance; }
.hero .lead { margin: 0 auto 2rem; }
.hero .actions { justify-content: center; }
.hero-shot { margin: clamp(48px, 7vw, 88px) auto 0; max-width: 1280px; }
.hero-shot .shot { box-shadow: none; }
.js .hero-shot { animation: rise 1.2s cubic-bezier(.2, .7, .2, 1) both .1s; }
@keyframes rise { from { opacity: 0; transform: translateY(48px) scale(.97); } to { opacity: 1; transform: none; } }

/* page heads (inner pages) */
.page-head { padding: clamp(64px, 9vw, 120px) 0 clamp(40px, 5vw, 64px); }
.page-head h1 { margin-bottom: .25em; }
.page-head .lead { margin-bottom: 0; }

/* screenshots */
.shot { border-radius: var(--radius); overflow: hidden; background: #1d1d1f; box-shadow: 0 0 0 1px var(--shot-line); }
@media (max-width: 640px) { :root { --radius: 20px; } }
.shot img { width: 100%; }
.shot-xl { max-width: 1040px; margin: 0 auto; }
[data-parallax] { will-change: transform; }
.js .grow { transform: scale(var(--g, 1)); transform-origin: 50% 0; }

/* reveal on scroll — only with JS, never with reduced motion */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .hero-shot { animation: none; }
  .js .grow { transform: none; }
  [data-parallax] { transform: none !important; }
}

/* ---------- feature grids (no boxes: icon, title, text) ---------- */
.feats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 48px 36px; }
.feats.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.feat .ic { width: 40px; height: 40px; color: var(--fg); margin-bottom: 16px; }
.feat .ic svg { width: 34px; height: 34px; stroke-width: 1.5; }
.feat h3 { margin-bottom: .4em; }
.feat p { color: var(--fg2); margin: 0; font-size: .98rem; }
.feat .ticks { margin-top: .6rem; }
@media (max-width: 1000px) { .feats, .feats.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .feats, .feats.c3 { grid-template-columns: minmax(0, 1fr); gap: 36px; } }

.ticks { list-style: none; padding: 0; margin: 1.1rem 0 0; }
.ticks li { position: relative; padding-left: 28px; margin: .5rem 0; color: var(--fg2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .38em; width: 17px; height: 17px; border-radius: 50%; background: var(--ch); }
.ticks li::after { content: ""; position: absolute; left: 5.5px; top: calc(.38em + 4px); width: 6px; height: 8.5px; border: solid var(--fg); border-width: 0 1.8px 1.8px 0; transform: rotate(40deg); }
.ticks li strong { color: var(--fg); font-weight: 600; }

/* ---------- split rows ---------- */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.split.flip > .txt { order: 2; }
.split h2 { font-size: clamp(2rem, 4vw, 3.3rem); }
@media (max-width: 860px) { .split, .split.flip { grid-template-columns: minmax(0, 1fr); } .split.flip > .txt { order: 0; } }

/* chapter: headline left, text right, big screenshot below */
.chapter-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.chapter-top h2 { margin: 0; }
.chapter-top .lead { margin: 0; }
.chapter-top .ticks { margin-top: .9rem; }
@media (max-width: 860px) { .chapter-top { grid-template-columns: minmax(0, 1fr); } }

/* light + dark pair */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2.4vw, 32px); }
@media (max-width: 700px) { .pair { grid-template-columns: 1fr; } }
figure { margin: 0; }
figcaption { font-size: .9rem; color: var(--fg2); margin-top: 12px; }
.pair figcaption { text-align: center; font-weight: 500; color: var(--fg); }

/* ---------- product tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tile { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; border-radius: var(--radius); background: var(--paper); padding: clamp(36px, 4.5vw, 56px) clamp(22px, 3vw, 40px) 0; min-height: 560px; }
.t-paper .tile { background: var(--mist); }
.tile.night { --fg: #f5f5f7; --fg2: #86868b; --ac: #4ba1ff; --b: #0f6ad6; --bh: #1b76e2; --bt: #fff; --ch: rgba(255, 255, 255, .12); background: #000; color: var(--fg); }
.tile .app-icon { width: 64px; height: 64px; border-radius: 15px; margin-bottom: 18px; }
.tile h3 { font: 700 clamp(1.7rem, 3vw, 2.5rem)/1.08 var(--display); letter-spacing: -.03em; margin-bottom: .25em; }
.tile .tag { color: var(--fg2); font-size: 1.08rem; line-height: 1.4; max-width: 26em; margin: 0 0 .5rem; }
.tile .price { color: var(--fg); font-weight: 500; margin: 0 0 1.1rem; }
.tile .actions { justify-content: center; position: relative; z-index: 2; }
.tile .tile-shot { margin-top: auto; padding-top: 36px; width: 112%; max-width: none; }
.tile .tile-shot .shot { border-radius: 16px 16px 0 0; box-shadow: 0 0 0 1px var(--shot-line); }
.tile.wide { grid-column: 1 / -1; min-height: 0; }
.tile.wide .tile-shot { width: 100%; max-width: 980px; }
.card-link { color: inherit; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.card-link:hover { text-decoration: none; }
.tile:has(.card-link:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.card-link:focus-visible { outline: none; }
@media (max-width: 760px) { .tiles { grid-template-columns: minmax(0, 1fr); } .tile { min-height: 0; } }

/* small app tiles (more apps) */
.mtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mtile { position: relative; background: var(--paper); border-radius: 18px; padding: 26px 22px; display: flex; flex-direction: column; gap: 4px; }
.t-paper .mtile { background: var(--mist); }
.mtile .app-icon { width: 52px; height: 52px; border-radius: 12px; margin-bottom: 12px; }
.mtile h3 { margin: 0; }
.mtile p { color: var(--fg2); font-size: .93rem; margin: 0 0 12px; flex: 1; }
.mtile .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mtile .lemonsqueezy-button { position: relative; z-index: 2; }
.mtile:has(.card-link:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.mtile .card-link::after { border-radius: 18px; }
@media (max-width: 1000px) { .mtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .mtiles { grid-template-columns: minmax(0, 1fr); } }

/* app shelf (free / built-in apps) */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 30px 28px; }
.mini { display: flex; align-items: center; gap: 16px; }
.mini img, .mini .gi { width: 56px; height: 56px; border-radius: 13px; flex: none; }
.mini .gi { display: grid; place-items: center; background: var(--ch); color: var(--fg); }
.mini .gi svg { width: 28px; height: 28px; }
.mini strong { display: block; font-weight: 600; color: var(--fg); }
.mini span { color: var(--fg2); font-size: .92rem; line-height: 1.4; display: block; }
.mini .badge, .badge { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--ch); color: var(--cht); vertical-align: 2px; margin-left: 4px; }
.shelf-icons { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 28px 16px; text-align: center; }
.shelf-icons .mini { flex-direction: column; gap: 12px; }
.shelf-icons img { width: 72px; height: 72px; border-radius: 17px; }
@media (max-width: 900px) { .shelf-icons { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .shelf-icons { grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; gap: 22px 14px; }
  .shelf-icons .mini { flex-direction: row; gap: 12px; }
  .shelf-icons img { width: 48px; height: 48px; border-radius: 11px; }
}
.icon-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 18px; }
.tile .icon-row .app-icon { margin: 0; }
@media (max-width: 1100px) { .tile .icon-row .app-icon { width: 48px; height: 48px; border-radius: 11px; } }

.app-icon { width: 72px; height: 72px; border-radius: 17px; }

/* app hero */
.app-hero .app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 20px; }
.app-hero .kicker { color: var(--fg2); }
.app-hero h1 { font-size: clamp(2.5rem, 7vw, 5.6rem); letter-spacing: -.04em; line-height: 1.02; margin-bottom: .12em; }
.price-tag { font: 700 1.5rem/1 var(--display); letter-spacing: -.02em; color: var(--fg); }
.buy-note { font-size: .88rem; color: var(--fg2); margin: 18px auto 0; max-width: 44em; }

.placeholder { aspect-ratio: 16 / 9; border-radius: 14px; border: 2px dashed var(--ln); display: grid; place-items: center; text-align: center; padding: 24px; color: var(--fg2); }
.placeholder img { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 14px; }
.placeholder strong { color: var(--fg); display: block; }

/* gallery + lightbox */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); }
.gallery .wide { grid-column: 1 / -1; }
.gallery.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 641px) {
  .gallery figure:not(.strip):not(.wide) .zoom img { aspect-ratio: 16 / 10.4; object-fit: cover; object-position: 50% 0; }
  .gallery.c3 figure.strip .zoom { aspect-ratio: 16 / 10.4; display: grid; align-items: end; padding: 0 0 6%; background: #1d1d1f; }
}
@media (max-width: 900px) { .gallery.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  /* phones: screenshots become a row you swipe through */
  .gallery, .gallery.c3 { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 84%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter)); padding: 4px var(--gutter) 16px; scroll-padding: 0 var(--gutter); scrollbar-width: none; gap: 14px; }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery > figure { scroll-snap-align: start; }
  .gallery .wide { grid-column: auto; }
  .gallery figure:not(.strip) .zoom img { aspect-ratio: 16 / 10.4; object-fit: cover; object-position: 50% 0; }
  .gallery figure.strip .zoom { aspect-ratio: 16 / 10.4; display: grid; align-items: end; padding: 0 0 6%; background: #1d1d1f; }
  .steps > li { padding-left: 48px; }
  .steps > li::before { font-size: 2rem; }
}
.zoom { display: block; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px var(--shot-line); cursor: zoom-in; background: #1d1d1f; }
.shot .zoom { box-shadow: none; border-radius: 0; }
.zoom img { width: 100%; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.zoom:hover img { transform: scale(1.012); }
dialog.lightbox { border: 0; padding: 0; background: transparent; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; color: #f0f0f6; }
dialog.lightbox::backdrop { background: rgba(6, 5, 16, .92); }
dialog.lightbox[open] { display: grid; place-items: center; }
.lb-fig { margin: 0; display: grid; justify-items: center; gap: 12px; padding: 64px 72px 24px; }
.lb-fig img { max-width: min(92vw, 1600px); max-height: calc(100vh - 150px); width: auto; border-radius: 10px; }
.lb-fig figcaption { color: #e6e5f2; text-align: center; margin: 0; max-width: 60em; }
.lb-btn { position: fixed; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.lb-btn:hover { background: rgba(255, 255, 255, .24); }
.lb-btn svg { width: 22px; height: 22px; }
.lb-btn:focus-visible { outline-color: #fff; }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: fixed; top: 26px; left: 0; right: 0; text-align: center; font-size: .85rem; color: #bdbbd6; pointer-events: none; }
@media (max-width: 640px) { .lb-fig { padding: 70px 10px 80px; } .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; } }

/* ---------- screenshot carousel ---------- */
.carousel { --slide: min(1000px, 82vw); position: relative; }
.car-track { display: flex; gap: clamp(14px, 2vw, 24px); list-style: none; margin: 0; padding: 4px calc((100% - var(--slide)) / 2) 8px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.car-track::-webkit-scrollbar { display: none; }
.car-track:focus-visible { outline-offset: -3px; }
.car-slide { flex: none; width: var(--slide); scroll-snap-align: center; }
.car-slide .zoom { border-radius: var(--radius); }
.car-slide .zoom img { aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 0; }
.car-slide.strip .zoom { aspect-ratio: 16 / 10; display: grid; align-items: center; padding: 0 6%; }
.car-slide.strip .zoom img { aspect-ratio: auto; object-fit: contain; border-radius: 12px; }
.car-slide figcaption { text-align: center; margin-top: 16px; }
.js .car-slide { transition: opacity .5s; }
.js .carousel.ready .car-slide:not(.on) { opacity: .45; }
.car-ctrl { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 28px; }
.car-dots { display: flex; align-items: center; gap: 4px; padding: 0 10px; height: 52px; border-radius: 999px; background: var(--ch); }
.car-dots button { border: 0; padding: 0; background: none; width: 22px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.car-dots button::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--fg2); transition: width .35s, background-color .35s; }
.car-dots button[aria-current="true"] { width: 44px; }
.car-dots button[aria-current="true"]::before { width: 34px; background: var(--fg); }
.car-dots button:focus-visible { outline-offset: -6px; }
.car-play { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--ch); color: var(--fg); display: grid; place-items: center; cursor: pointer; padding: 0; }
.car-play svg { width: 20px; height: 20px; }
.car-play:hover, .car-dots:hover { filter: brightness(.97); }
@media (max-width: 640px) {
  .carousel { --slide: 86vw; }
  .car-dots { height: 44px; padding: 0 8px; }
  .car-dots button { width: 16px; }
  .car-dots button[aria-current="true"] { width: 36px; }
  .car-dots button[aria-current="true"]::before { width: 26px; }
  .car-play { width: 44px; height: 44px; }
}

/* ---------- spec + compare tables ---------- */
.specs { width: 100%; border-collapse: collapse; }
.specs th, .specs td { text-align: left; vertical-align: top; padding: 22px 16px 22px 0; border-top: 1px solid var(--ln); }
.specs tbody th { width: 30%; font: 600 1.05rem/1.4 var(--font); color: var(--fg); letter-spacing: -.015em; }
.specs td { color: var(--fg2); }
.specs td strong { color: var(--fg); font-weight: 600; }
.specs thead th { border-top: 0; font-size: .85rem; font-weight: 600; color: var(--fg2); padding-top: 0; }
.specs ul { margin: 0; padding-left: 1.1em; }
.specs li + li { margin-top: .35em; }
@media (max-width: 640px) {
  .specs.stack tbody th, .specs.stack td { display: block; width: auto; padding: 0; border: 0; }
  .specs.stack tr { display: block; border-top: 1px solid var(--ln); padding: 18px 0; }
  .specs.stack tbody th { margin-bottom: 6px; }
}
.compare-scroll { overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); scrollbar-width: thin; }
.compare { width: 100%; min-width: 860px; border-collapse: collapse; table-layout: fixed; }
.compare th, .compare td { padding: 16px 14px; text-align: center; vertical-align: top; border-top: 1px solid var(--ln); color: var(--fg2); font-size: .95rem; }
.compare thead th { border-top: 0; color: var(--fg); padding-bottom: 22px; }
.compare thead .app-icon { width: 60px; height: 60px; border-radius: 14px; margin: 0 auto 12px; }
.compare thead a { color: var(--fg); font: 600 1.05rem/1.25 var(--font); }
.compare tbody th { text-align: left; color: var(--fg); font-weight: 600; width: 150px; }
.compare .price { font: 700 1.6rem/1 var(--display); color: var(--fg); letter-spacing: -.02em; }
.compare td ul { list-style: none; margin: 0; padding: 0; }
.compare td li + li { margin-top: .4em; }

/* ---------- steps, faq ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.steps > li { counter-increment: s; position: relative; padding: 28px 0 28px 72px; border-top: 1px solid var(--ln); }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 24px; font: 700 2.4rem/1 var(--display); letter-spacing: -.04em; color: var(--fg); }
.steps h3 { margin: 4px 0 6px; }
.steps p { color: var(--fg2); margin: 0 0 .5em; }
.faq details { border-top: 1px solid var(--ln); }
.faq details:last-child { border-bottom: 1px solid var(--ln); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 44px 22px 0; font-weight: 600; font-size: 1.1rem; letter-spacing: -.015em; position: relative; color: var(--fg); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 1.8px; background: var(--fg2); transition: transform .25s; }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details > div { padding: 0 0 24px; color: var(--fg2); max-width: 46em; }
.faq-group + .faq-group { margin-top: 56px; }
.faq-group h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.03em; margin-bottom: .7em; }
code, .mono { font-family: ui-monospace, "DejaVu Sans Mono", Consolas, "Liberation Mono", monospace; font-size: .88em; }
code { background: var(--ch); padding: 2px 6px; border-radius: 6px; color: var(--fg); overflow-wrap: anywhere; }
.toc { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 24px; padding: 0; list-style: none; }
.toc a { display: block; padding: 7px 16px; border-radius: 999px; background: var(--ch); color: var(--cht); font-size: .92rem; font-weight: 500; }
.toc a:hover { text-decoration: none; filter: brightness(1.05); }

/* ---------- download ---------- */
.dl-panel { max-width: 860px; margin: clamp(40px, 6vw, 64px) auto 0; text-align: left; background: #1d1d1f; border: 1px solid var(--ln); border-radius: var(--radius); padding: clamp(26px, 4vw, 44px); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; backdrop-filter: blur(6px); }
.dl-panel h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); margin-bottom: .5em; }
@media (max-width: 700px) { .dl-panel { grid-template-columns: minmax(0, 1fr); } }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 22px; margin: 0; }
.kv dt { color: var(--fg2); }
.kv dd { margin: 0; font-weight: 500; color: var(--fg); overflow-wrap: anywhere; }
.hash { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
.hash code { flex: 1 1 320px; word-break: break-all; padding: 14px 16px; font-size: .88rem; line-height: 1.5; border-radius: 12px; }
.hash .btn { min-height: 0; }
.cmds { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.cmds li { color: var(--fg2); }
.cmds strong { display: inline-block; min-width: 5.5em; color: var(--fg); }
@media (max-width: 640px) { .cmds strong { display: block; margin-bottom: 4px; } }
.notes-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.notes-cols h3 { margin-bottom: .2em; }
@media (max-width: 900px) { .notes-cols { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

/* ---------- prose (legal and text pages) ---------- */
.prose { max-width: 720px; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: clamp(1.45rem, 2.4vw, 1.8rem); letter-spacing: -.028em; margin: 2.2em 0 .6em; }
.prose h3 { margin-top: 1.8em; }
.prose p, .prose li { color: var(--fg2); }
.prose li { margin: .35em 0; }
.prose strong { color: var(--fg); }
.prose ul, .prose ol { padding-left: 1.25em; }
.draft { background: var(--warn-bg); color: var(--warn-text); border-radius: 14px; padding: 16px 20px; margin: 0 0 28px; font-size: .95rem; }
.draft strong { color: inherit; }
.fill { background: var(--warn-bg); color: var(--warn-text); border-radius: 4px; padding: 0 4px; }

/* ---------- free apps ---------- */
.free-head { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.free-head .app-icon { width: 64px; height: 64px; border-radius: 15px; }
.free-head .label { margin: 0 0 4px; font-size: .95rem; color: var(--fg2); }
.free-head h3 { font: 700 clamp(1.6rem, 3.2vw, 2.5rem)/1.08 var(--display); letter-spacing: -.035em; margin: 0; }
.free-more { margin-top: clamp(28px, 4vw, 44px); }
.chips { list-style: none; padding: 0; margin: 24px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { padding: 8px 16px; border-radius: 999px; background: var(--ch); color: var(--fg); font-weight: 500; }

/* games row */
.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 36px; text-align: left; }
@media (max-width: 900px) { .games { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .games { grid-template-columns: minmax(0, 1fr); } }

/* release notes */
.note { padding: 40px 0; border-top: 1px solid var(--ln); }
.note:first-child { border-top: 0; padding-top: 0; }
.note-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.note-head .app-icon { width: 60px; height: 60px; border-radius: 14px; flex: none; }
.note-head h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -.03em; margin: 0; }
.note-head h2 a { color: inherit; }
.note-head p { margin: 4px 0 0; }
.note > p { color: var(--fg2); }
.os-mark { display: grid; place-items: center; background: var(--mark-bg); color: var(--mark-fg); }
.os-mark svg { width: 62%; height: 62%; }

/* support cards */
.help-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.help { background: var(--mist); border-radius: var(--radius); padding: 32px 28px; }
.help .ic { color: var(--fg); margin-bottom: 16px; }
.help .ic svg { width: 32px; height: 32px; stroke-width: 1.5; }
.help p { color: var(--fg2); }
.help p:last-child { margin-bottom: 0; }
@media (max-width: 860px) { .help-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- footer: a sitemap ---------- */
.site-foot { background: var(--mist); color: var(--ink2); font-size: .8rem; line-height: 1.5; padding: 44px 0 28px; border-top: 1px solid var(--line); }
.foot-note { padding-bottom: 20px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.foot-note p { margin: 0; }
.foot-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.site-foot h2 { font: 600 .8rem/1.3 var(--font); letter-spacing: 0; color: var(--ink); margin: 0 0 10px; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 0 0 8px; }
.site-foot a { color: var(--ink2); }
.site-foot a:hover { color: var(--ink); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
.foot-brand .mark { width: 20px; height: 20px; border-radius: 5px; background: var(--mark-bg); display: grid; place-items: center; }
.foot-brand .mark svg { width: 13px; height: 13px; color: var(--mark-fg); }
@media (max-width: 760px) {
  .foot-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .foot-col { border-bottom: 1px solid var(--line); }
  .foot-col h2 { margin: 0; }
  .js .foot-col h2 button { all: unset; display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 14px 0; cursor: pointer; font: 600 .9rem/1.3 var(--font); color: var(--ink); }
  .js .foot-col h2 button:focus-visible { outline: 3px solid var(--accent); }
  .js .foot-col h2 button::after { content: "+"; font-size: 1.2rem; font-weight: 400; color: var(--ink2); }
  .js .foot-col h2 button[aria-expanded="true"]::after { content: "–"; }
  .js .foot-col ul { display: none; padding-bottom: 12px; }
  .js .foot-col.open ul { display: block; }
  .no-js .foot-col { padding: 14px 0; }
  .site-foot li { margin: 0; }
  .site-foot li a { display: block; padding: 6px 0; font-size: .9rem; }
}
