/* rasp.bat. raspberry outside, terminal inside. */

@font-face {
  font-family: "Anybody";
  src: url("/assets/fonts/anybody-latin-standard-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
}
@font-face {
  font-family: "Cascadia Code";
  src: url("/assets/fonts/cascadia-code-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Cascadia Code";
  src: url("/assets/fonts/cascadia-code-latin-600-normal.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --rasp: #b5123e;
  --rasp-deep: #7d0c2b;
  --rasp-glow: #f0426c;
  --rasp-soft: #f3dbe0;
  --pith: #f7eeef;
  --ink: #2a2b30;
  --ink-soft: #62636b;
  --console: #222327;
  --console-deep: #141518;
  --chrome: #b7b9bf;
  --chrome-hi: #dcdee2;
  --leaf: #4c7d1f;
  --leaf-glow: #a3d468;
  --amber: #9a5f0a;
  --rule: rgba(42, 43, 48, 0.14);

  --font: "Anybody", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Code", Consolas, ui-monospace, monospace;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.45, .64, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --max: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--pith);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 800; line-height: 1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2.5px solid var(--rasp); outline-offset: 3px; border-radius: 4px; }
.hero :focus-visible, .foot :focus-visible, .top[data-over="rasp"] :focus-visible, .install :focus-visible { outline-color: var(--pith); }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--console); color: var(--pith); padding: 10px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* ---- buttons */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px;
  border: 0; border-radius: 8px;
  background: var(--console); color: var(--pith);
  font-weight: 650; font-stretch: 106%; text-decoration: none; letter-spacing: .005em;
  cursor: pointer;
  transition: background-color .2s, transform .18s var(--ease-out);
}
.btn:hover { background: #393a41; }
.btn:active { transform: scale(.97); }
.btn-wide { width: 100%; height: 52px; font-size: 1.0625rem; }

.link { font-weight: 600; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
.link:hover { text-decoration-thickness: 3px; }

/* ---- header */

.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  height: 68px; padding: 0 var(--gutter);
  background: var(--rasp); color: var(--pith);
  transition: background-color .35s, color .35s, box-shadow .35s;
}
.top[data-over="pith"] { background: rgba(247, 238, 239, .92); color: var(--ink); box-shadow: 0 1px 0 var(--rule); backdrop-filter: blur(10px); }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 750; font-stretch: 116%; font-size: 1.25rem; letter-spacing: -.01em; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }

.nav { display: flex; gap: 26px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 550; position: relative; padding: 4px 0; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease-out);
}
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.cart-btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 8px 0 16px;
  border: 1.5px solid currentColor; border-radius: 10px; background: transparent;
  font-weight: 650; cursor: pointer;
  transition: background-color .2s;
}
.cart-btn:hover { background: rgba(255, 255, 255, .12); }
.top[data-over="pith"] .cart-btn:hover { background: rgba(42, 43, 48, .06); }
.cart-count {
  position: relative; display: grid; overflow: hidden;
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 6px;
  background: currentColor; font-variant-numeric: tabular-nums; font-size: .9375rem;
}
.cart-count span { grid-area: 1 / 1; display: grid; place-items: center; color: var(--rasp); }
.top[data-over="pith"] .cart-count span { color: var(--pith); }

/* ---- hero */

.hero {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 80px); align-items: center;
  padding: clamp(28px, 5vw, 72px) var(--gutter) clamp(56px, 7vw, 104px);
  background: var(--rasp); color: var(--pith);
  position: relative; isolation: isolate;
}
/* bit of grain so the red reads like a surface and not a css color */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .18; mix-blend-mode: multiply; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 0 0 0 0 0 .05 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero h1 {
  font-size: clamp(2.6rem, 4.6vw, 4.6rem);
  font-weight: 850; font-stretch: 112%; letter-spacing: -.025em; line-height: .93;
}
.hero-copy p { margin-top: 26px; max-width: 40ch; font-size: clamp(1.0625rem, 1.25vw, 1.1875rem); line-height: 1.5; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 26px; margin-top: 34px; }

/* windows. greys borrowed straight off the logo */
.win {
  border-radius: 9px; overflow: hidden; background: var(--console);
  box-shadow: 0 0 0 1px rgba(20, 0, 8, .28), 0 2px 4px rgba(70, 0, 20, .22), 0 26px 50px -18px rgba(60, 0, 18, .6);
}
.win-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 34px; padding: 0 12px 0 10px;
  background: linear-gradient(var(--chrome-hi), var(--chrome));
  color: var(--ink); font-size: .8125rem; font-weight: 550;
}
.win-tab { display: flex; align-items: center; gap: 8px; }
.win-tab img { width: 14px; height: 14px; border-radius: 3px; }
.win-ctl { display: flex; gap: 18px; }
.win-ctl svg { width: 11px; height: 11px; fill: none; stroke: #45464d; stroke-width: 1.2; }

.stage { position: relative; }
.term { width: 76%; position: relative; z-index: 1; }
.term-out {
  margin: 0; padding: 14px 16px 34px; min-height: calc(1.65em * 8 + 48px);
  font: 400 clamp(.6875rem, .95vw, .8125rem)/1.65 var(--mono); color: #d9d2d4;
  white-space: pre; overflow: hidden;
}
.term-out .pr { font-style: normal; color: #8f9097; }
.term-out .ok { font-weight: 600; color: var(--leaf-glow); }
.term-out .cur {
  display: inline-block; width: .6em; height: 1.1em; margin-left: 4px; vertical-align: -.2em;
  background: #d9d2d4; animation: blink 1.05s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.game {
  position: relative; z-index: 2;
  width: 86%; margin: -22px 0 0 auto;
  background: #0d0d0f;
  opacity: 0; transform: translateY(16px) scale(.96); transform-origin: 30% 0;
  transition: opacity .3s ease, transform .55s var(--ease-spring);
}
.game.open { opacity: 1; transform: none; }
.game canvas { width: 100%; aspect-ratio: 16 / 9.5; }

.stage-note {
  margin-top: 16px; margin-left: 16%; font-size: .9375rem; color: rgba(247, 238, 239, .86);
  opacity: 0; transform: translateY(6px); transition: opacity .5s, transform .5s var(--ease-out);
}
.stage-note.show { opacity: 1; transform: none; }
.replay {
  background: none; border: 0; padding: 0; margin-left: 6px; cursor: pointer;
  font-weight: 650; text-decoration: underline; text-underline-offset: 3px; color: var(--pith);
}

/* ---- sections */

.mods, .install, .faq { padding: clamp(64px, 9vw, 128px) var(--gutter); }
.mods > *, .faq { max-width: var(--max); margin-left: auto; margin-right: auto; }
.faq { max-width: calc(var(--max) + var(--gutter) * 2); }

h2 { font-size: clamp(2.4rem, 5vw, 4rem); font-stretch: 114%; letter-spacing: -.02em; }

.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 24px 48px; align-items: end; margin-bottom: clamp(32px, 4vw, 52px); }
.sec-head p { max-width: 52ch; color: var(--ink-soft); }

/* ---- mod list */

.mod-list { border-top: 2.5px solid var(--ink); }
.loading, .load-fail { padding: 40px 0; color: var(--ink-soft); }

.mod {
  --cover: clamp(150px, 22vw, 280px);
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  border-bottom: 1px solid var(--rule);
}
.mod-head {
  display: grid; grid-template-columns: var(--cover) minmax(0, 1fr); gap: clamp(18px, 2.4vw, 32px); align-items: center;
  padding: clamp(18px, 2vw, 26px) 0; border: 0; background: none; text-align: left; cursor: pointer;
}
.mod-cover {
  width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--console);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out);
}
.mod-head:hover .mod-cover { transform: translateY(-3px); box-shadow: 0 14px 26px -14px rgba(125, 12, 43, .55); }

.mod-info { display: block; min-width: 0; }
.mod-name { display: flex; align-items: center; gap: 10px; font-size: clamp(1.35rem, 2vw, 1.75rem); font-weight: 750; font-stretch: 110%; line-height: 1.1; letter-spacing: -.01em; }
.chev { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .45s var(--ease-out); }
.mod.open .chev { transform: rotate(180deg); }
.mod-game { display: block; color: var(--ink-soft); font-size: .9375rem; margin-top: 2px; }
.mod-tag { display: block; margin-top: 10px; max-width: 50ch; }
.mod-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 12px; font-size: .875rem; color: var(--ink-soft); }
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 650; color: var(--ink); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.status[data-s="beta"]::before { background: var(--amber); }
.status[data-s="early"]::before { background: var(--rasp); }
.save { font-weight: 650; color: var(--rasp); }

.mod-buy { display: flex; align-items: center; gap: clamp(16px, 2vw, 28px); padding-left: 24px; }
.mod-price { font-size: 1.5rem; font-weight: 750; font-stretch: 108%; font-variant-numeric: tabular-nums; }

.add {
  display: inline-grid; place-items: center; min-width: 148px; height: 46px; padding: 0 18px;
  border: 0; border-radius: 8px; background: var(--console); color: var(--pith);
  font-weight: 650; font-stretch: 106%; cursor: pointer;
  transition: background-color .25s, color .25s, box-shadow .25s, transform .18s var(--ease-out);
}
.add:hover { background: #393a41; }
.add:active { transform: scale(.96); }
.add[data-state="in"] { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.add[data-state="in"]:hover { background: rgba(42, 43, 48, .06); }
.add[data-state="in"] .add-label::before { content: ""; display: inline-block; width: 12px; height: 7px; margin-right: 9px; border: solid currentColor; border-width: 0 0 2px 2px; transform: translateY(-3px) rotate(-45deg); }
.add[data-state="bundled"] { background: transparent; color: var(--ink-soft); box-shadow: inset 0 0 0 1.5px var(--rule); cursor: default; }
.add .add-label { animation: label-in .3s var(--ease-out); }
@keyframes label-in { from { opacity: 0; transform: translateY(5px); } }

/* details drawer inside each row. 0fr -> 1fr is the trick that lets height: auto animate */
.mod-more { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease-out); }
.mod.open .mod-more { grid-template-rows: 1fr; }
.mod-more-in { overflow: hidden; min-height: 0; }
.more-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 40px;
  padding: 4px 0 30px calc(var(--cover) + clamp(18px, 2.4vw, 32px));
  opacity: 0; transform: translateY(-8px); transition: opacity .3s, transform .45s var(--ease-out);
}
.mod.open .more-grid { opacity: 1; transform: none; transition-delay: .12s; }
.more-grid h3 { font-size: 1rem; font-weight: 700; font-stretch: 108%; margin-bottom: 10px; }
.more-grid ul { margin: 0; padding: 0; list-style: none; }
.more-grid li { position: relative; padding-left: 18px; margin-bottom: 6px; font-size: .96875rem; }
.more-grid li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 7px; height: 2px; background: var(--rasp); }
.more-grid p { font-size: .96875rem; color: var(--ink-soft); }
.more-grid .heads { margin-top: 12px; }
.was { color: var(--ink-soft); text-decoration: line-through; margin-left: 4px; }

/* ---- install */

.install {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(40px, 6vw, 96px); align-items: center;
  background: var(--console); color: var(--pith);
}
.install > * { min-width: 0; }
.install-copy { max-width: 560px; justify-self: end; width: 100%; }
.steps { list-style: none; margin: 36px 0 0; padding: 0; counter-reset: s; }
.steps li {
  counter-increment: s; position: relative;
  padding: 18px 0 18px 56px; border-top: 1px solid rgba(247, 238, 239, .14); color: #cfc8ca;
}
.steps li::before { content: counter(s); position: absolute; left: 0; top: 14px; font-size: 2rem; font-weight: 800; font-stretch: 120%; line-height: 1; color: var(--rasp-glow); }
.steps strong { color: var(--pith); font-weight: 650; }

.notepad { margin: 0; max-width: 600px; }
.notepad .win { background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 30px 60px -24px rgba(0, 0, 0, .7); }
.np-menu { display: flex; gap: 18px; padding: 6px 12px; background: #f3f3f3; border-bottom: 1px solid #e2e2e2; color: #333; font-size: .8125rem; }
.np-body { margin: 0; padding: 16px 18px; overflow-x: auto; color: #1f1f1f; font: 400 clamp(.75rem, 1vw, .875rem)/1.62 var(--mono); tab-size: 2; }
.np-status { display: flex; gap: 22px; justify-content: flex-end; padding: 5px 14px; background: #f3f3f3; border-top: 1px solid #e2e2e2; color: #555; font-size: .75rem; }
.notepad figcaption { margin-top: 14px; font-size: .9375rem; color: #a9a3a5; }

/* ---- faq */

.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px clamp(40px, 6vw, 96px); }
.faq-side p { margin-top: 20px; max-width: 30ch; color: var(--ink-soft); }
.faq-list { border-top: 2.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); overflow: hidden; }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 20px 0; list-style: none; cursor: pointer;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem); font-weight: 650; font-stretch: 104%;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  transition: transform .4s var(--ease-out);
}
.faq details[open]:not(.shut) summary::after { transform: rotate(135deg); }
.faq details p { padding: 0 0 24px; max-width: 60ch; }
.faq a { text-underline-offset: 3px; }
.faq code { font-family: var(--mono); font-size: .875em; background: var(--rasp-soft); padding: 1px 5px; border-radius: 4px; }

/* ---- footer */

.foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px 40px; align-items: center;
  padding: 48px var(--gutter) 40px; background: var(--rasp); color: var(--pith);
}
.foot-brand { display: flex; align-items: center; gap: 16px; }
.foot-brand img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.foot-brand p { max-width: 46ch; }
.foot-brand strong { font-weight: 750; font-stretch: 114%; margin-right: 6px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 26px; font-weight: 600; }
.foot-links a { text-underline-offset: 4px; }
.fine { grid-column: 1 / -1; padding-top: 22px; border-top: 1px solid rgba(247, 238, 239, .24); font-size: .8125rem; color: rgba(247, 238, 239, .78); }

/* ---- cart drawer */

.drawer {
  position: fixed; inset: 0 0 0 auto; margin: 0;
  width: min(440px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh;
  padding: 0; border: 0; border-radius: 16px 0 0 16px;
  background: var(--pith); color: var(--ink);
  box-shadow: -30px 0 60px -30px rgba(60, 0, 18, .5);
}
.drawer[open] { display: flex; flex-direction: column; animation: drawer-in .55s var(--ease-out); }
.drawer::backdrop { background: rgba(48, 6, 20, .42); }
.drawer[open]::backdrop { animation: fade-in .4s ease; }
.drawer.closing { animation: drawer-out .3s cubic-bezier(.5, 0, .75, 0) forwards; }
.drawer.closing::backdrop { animation: fade-out .3s ease forwards; }
@keyframes drawer-in { from { transform: translateX(100%); } }
@keyframes drawer-out { to { transform: translateX(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 18px; border-bottom: 2.5px solid var(--ink); margin: 0 0 4px; }
.drawer-head h2 { font-size: 2rem; }
.drawer-close { background: none; border: 0; padding: 6px 0; cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.drawer-note { margin: 14px 24px 0; padding: 10px 14px; border-radius: 8px; background: var(--rasp-soft); font-size: .9375rem; }
.drawer-note:empty { display: none; }

.cart-items { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.cart-items li {
  display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 4px 14px; align-items: start;
  padding: 16px 24px; border-bottom: 1px solid var(--rule); overflow: hidden;
}
.drawer[open] .cart-items li { animation: item-in .5s var(--ease-out) both; animation-delay: calc(var(--i) * 45ms + 140ms); }
@keyframes item-in { from { opacity: 0; transform: translateX(28px); } }
.cart-items img { grid-row: 1 / 3; width: 92px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; }
.ci-name { font-weight: 650; line-height: 1.25; }
.ci-name small { display: block; font-weight: 400; color: var(--ink-soft); font-size: .875rem; }
.ci-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.ci-remove { grid-column: 2; justify-self: start; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink-soft); font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }
.ci-remove:hover { color: var(--rasp); }

.cart-empty { padding: 36px 24px; }
.cart-empty p { margin-bottom: 20px; color: var(--ink-soft); max-width: 30ch; }
.drawer-foot { margin-top: auto; padding: 20px 24px 24px; border-top: 2.5px solid var(--ink); }
.drawer-foot p { margin-top: 12px; font-size: .875rem; color: var(--ink-soft); text-align: center; }
.subtotal { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 16px; font-size: 1.125rem; }
.subtotal strong { font-size: 1.5rem; font-stretch: 108%; font-variant-numeric: tabular-nums; }

/* the cover that flies into the cart */
.ghost { position: fixed; z-index: 100; margin: 0; object-fit: cover; pointer-events: none; transform-origin: center; box-shadow: 0 12px 30px -10px rgba(60, 0, 18, .5); }

/* ---- checkout + thanks */

.top.slim .back { margin-left: auto; font-weight: 600; text-underline-offset: 4px; }

.checkout {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 88px); align-items: start;
  max-width: calc(1180px + var(--gutter) * 2); margin: 0 auto; padding: clamp(36px, 6vw, 80px) var(--gutter) 96px;
}
.checkout h1 { font-size: clamp(2.4rem, 5vw, 3.75rem); font-stretch: 114%; letter-spacing: -.02em; margin-bottom: 28px; }
.order { list-style: none; margin: 0; padding: 0; border-top: 2.5px solid var(--ink); }
.order li { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.order img { width: 112px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; }
.order .n { font-weight: 650; line-height: 1.25; }
.order .n small { display: block; color: var(--ink-soft); font-weight: 400; font-size: .875rem; }
.order .p { font-weight: 700; font-variant-numeric: tabular-nums; }
.order-total { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 6px; font-size: 1.125rem; }
.order-total strong { font-size: 1.75rem; font-stretch: 110%; font-variant-numeric: tabular-nums; }
.order-fine { font-size: .875rem; color: var(--ink-soft); }
.order-edit { display: inline-block; margin-top: 18px; font-weight: 600; text-underline-offset: 3px; }

.pay-col { position: sticky; top: 96px; }
.step { border-top: 2.5px solid var(--ink); padding: 22px 0 26px; }
.step h2 { font-size: 1.375rem; font-stretch: 108%; letter-spacing: -.005em; display: flex; gap: 12px; align-items: baseline; }
.step h2 span { color: var(--rasp); }
.step > p { margin-top: 10px; color: var(--ink-soft); max-width: 50ch; }

.own { display: flex; gap: 14px; align-items: flex-start; margin-top: 18px; padding: 16px; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--rule); cursor: pointer; transition: box-shadow .2s; }
.own:hover { box-shadow: inset 0 0 0 1.5px var(--ink-soft); }
.own input { appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border: 2px solid var(--ink); border-radius: 5px; display: grid; place-items: center; cursor: pointer; transition: background-color .15s; }
.own input::after { content: ""; width: 10px; height: 5px; border: solid var(--pith); border-width: 0 0 2.5px 2.5px; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform .25s var(--ease-spring); }
.own input:checked { background: var(--ink); }
.own input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.own span small { display: block; color: var(--ink-soft); font-size: .875rem; margin-top: 2px; }
.step .btn { margin-top: 18px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; transform: none; }

.step.done .own, .step.done .btn-continue { display: none; }
.step-done { display: none; margin-top: 8px; color: var(--ink-soft); }
.step.done .step-done { display: block; }
.step-done button { background: none; border: 0; padding: 0; margin-left: 6px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.pay-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease-out); }
.pay-wrap.open { grid-template-rows: 1fr; }
.pay-wrap > div { overflow: hidden; min-height: 0; }
.step.pay { opacity: .45; transition: opacity .3s; }
.step.pay.live { opacity: 1; }
#pay { margin-top: 18px; min-height: 120px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--rule); padding: 6px; }
.pay-msg { padding: 22px; }
.pay-msg p + p, .pay-msg p + .btn { margin-top: 12px; }
.pay-msg code { font-family: var(--mono); font-size: .875em; background: var(--rasp-soft); padding: 1px 5px; border-radius: 4px; }
.pay-err { margin-top: 14px; padding: 12px 14px; border-radius: 8px; background: var(--rasp-soft); color: var(--rasp-deep); font-weight: 550; }
.pay-err:empty { display: none; }
.pay-loading { display: flex; align-items: center; gap: 12px; padding: 22px; color: var(--ink-soft); }
.pay-loading::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--rule); border-top-color: var(--rasp); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.secure { margin-top: 14px; font-size: .875rem; color: var(--ink-soft); }

/* manual checkout: the account field + the payment-method picker */
.field { display: block; margin-top: 18px; }
.field-label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: 7px; }
.field input {
  width: 100%; font: inherit; padding: 12px 14px; border-radius: 9px;
  border: 1.5px solid var(--rule); background: #fff; color: var(--ink); transition: border-color .15s;
}
.field input:focus { outline: none; border-color: var(--ink); }

.pay-in { padding-top: 4px; }
.pay-lead { color: var(--ink-soft); margin: 0 0 16px; max-width: 52ch; }

.methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(92px, 1fr)); gap: 8px; }
.method {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 13px 8px;
  border-radius: 10px; border: 1.5px solid var(--rule); background: #fff; color: var(--ink);
  font: inherit; font-weight: 600; font-size: .875rem; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.method:hover { border-color: var(--ink-soft); }
.method.sel { border-color: var(--rasp); box-shadow: inset 0 0 0 1px var(--rasp); }
.method b { font-size: 1.3rem; line-height: 1; font-weight: 800; }

.pay-how { margin-top: 20px; }
.pay-how:empty { display: none; }
.pay-how h3 { font-size: 1.0625rem; font-stretch: 106%; margin: 0 0 10px; }
.pay-how ol { margin: 0; padding-left: 20px; color: var(--ink-soft); }
.pay-how ol li { margin-bottom: 6px; }
.pay-how ol li strong { color: var(--ink); }
.pay-how code { font-family: var(--mono); font-size: .9em; background: var(--rasp-soft); color: var(--rasp-deep); padding: 2px 7px; border-radius: 5px; font-weight: 600; }
.pay-how .btn { margin-top: 18px; }

/* ---- account + admin */
.account, .admin { max-width: calc(960px + var(--gutter) * 2); margin: 0 auto; padding: clamp(40px, 7vw, 88px) var(--gutter) 96px; }
.acc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.account h1, .admin h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-stretch: 112%; letter-spacing: -.02em; margin: 0; }
.acc-sub { color: var(--ink-soft); margin: 8px 0 0; }
.acc-sub strong { color: var(--ink); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--rasp); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.auth { max-width: 420px; }
.auth h1 { margin-bottom: 6px; }
.auth-form { margin-top: 20px; }
.auth-form .btn { margin-top: 20px; }
.auth-err { margin: 12px 0 0; color: var(--rasp-deep); font-weight: 550; }
.auth-err:empty { display: none; }
.auth-switch { margin-top: 18px; color: var(--ink-soft); }

.lib { margin-top: 32px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.lib-card { border: 1.5px solid var(--rule); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.lib-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.lib-info { padding: 14px 16px 4px; flex: 1; }
.lib-info h3 { margin: 0; font-size: 1.125rem; font-stretch: 106%; }
.lib-info p { margin: 4px 0 0; color: var(--ink-soft); font-size: .9rem; }
.lib-card .btn { margin: 14px 16px 16px; }
.lib-empty { margin-top: 32px; padding: 40px; border: 1.5px dashed var(--rule); border-radius: 12px; text-align: center; }
.lib-empty p { margin: 0 0 20px; color: var(--ink-soft); }

.orders { margin-top: 28px; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.order-card { border: 1.5px solid var(--rule); border-radius: 12px; padding: 18px; background: #fff; }
.oc-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.125rem; margin-bottom: 12px; }
.oc-top span { font-variant-numeric: tabular-nums; font-weight: 700; }
.order-card dl { margin: 0; display: grid; gap: 8px; }
.order-card dl > div { display: grid; grid-template-columns: 68px 1fr; gap: 10px; font-size: .9rem; }
.order-card dt { color: var(--ink-soft); }
.order-card dd { margin: 0; word-break: break-word; }
.order-card .verify { margin-top: 16px; width: 100%; }

.empty-co { grid-column: 1 / -1; max-width: 520px; }
.empty-co p { margin: 0 0 24px; color: var(--ink-soft); }

body.thanks-page { background: var(--rasp); color: var(--pith); }
.thanks { max-width: calc(860px + var(--gutter) * 2); margin: 0 auto; padding: clamp(48px, 8vw, 112px) var(--gutter) 96px; }
.thanks h1 { font-size: clamp(2.8rem, 7vw, 5.4rem); font-stretch: 112%; letter-spacing: -.025em; line-height: .95; }
.thanks > p { margin-top: 24px; max-width: 46ch; font-size: 1.1875rem; }
.thanks .term { width: 100%; max-width: 620px; margin-top: 40px; }
.thanks .term-out { min-height: 0; }
.thanks .term-out .tl { display: inline-block; animation: line-in .01s both; animation-delay: calc(var(--i) * 260ms + 300ms); }
@keyframes line-in { from { visibility: hidden; } }
.thanks .btn { margin-top: 40px; }

/* ---- small screens */

@media (max-width: 980px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-copy p { max-width: 46ch; }
  .stage { max-width: 680px; }
  .install { grid-template-columns: minmax(0, 1fr); }
  .install-copy { justify-self: start; }
  .faq, .checkout { grid-template-columns: minmax(0, 1fr); }
  .pay-col { position: static; }
  .more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .nav { display: none; }
  .cart-btn { margin-left: auto; }
  .sec-head { grid-template-columns: minmax(0, 1fr); }
  .term { width: 92%; }
  .game { width: 96%; margin-top: -22px; }
  .stage-note { margin-left: 0; }
  .mod { grid-template-columns: minmax(0, 1fr); }
  .mod-head { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-bottom: 14px; }
  .mod-buy { padding: 0 0 22px; justify-content: space-between; }
  .more-grid { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
  .foot { grid-template-columns: minmax(0, 1fr); }
  .np-status span:nth-child(-n+2) { display: none; }
  .order li { grid-template-columns: 80px minmax(0, 1fr) auto; }
  .order img { width: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
}

/* ---- free mods: their own area, clearly not the paid shop ---- */
.price-free { color: var(--leaf); letter-spacing: .5px; }
.add-free { background: var(--leaf); text-decoration: none; }
.add-free:hover { background: #3c6518; }
.brand img { object-fit: contain; }
.mod-cover { object-fit: cover; }
