/* 10 Million Cells — tenmillioncells.thenextbeacon.com
 *
 * Generated pages and the legal pages share this one file. The palette is the
 * game's tile palette; everything is square-cornered because every mark in the
 * game is a square. Pixel art is never smoothed. No web fonts, no framework.
 */
:root {
  --bg: #141822;
  --bg2: #1b2030;
  --panel: #222839;
  --slate: #373e53;
  --bone: #ece7d5;
  --dim: #a3a8b8;
  --ochre: #e5af6f;
  --terracotta: #d17366;
  --moss: #8fc27a;
  --gold: #f2c94c;
  --measure: 68ch;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--bone);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Hiragino Sans", "Noto Sans CJK JP", "Noto Sans", sans-serif;
  overflow-wrap: break-word;
}
img[src$=".png"], img[src$=".svg"], canvas { image-rendering: pixelated; }
a { color: var(--ochre); }
a:hover { color: var(--gold); }
a:focus-visible, button:focus-visible, summary:focus-visible, video:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 3px;
}
.wrap { width: min(100% - 2.5rem, 1140px); margin-inline: auto; }
.prose { max-width: 76ch; }
.wrap.prose { width: min(100% - 2.5rem, 76ch); }
p, li, dd { max-width: var(--measure); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); margin: 0 0 .8rem; }
h2 { font-size: clamp(1.35rem, 3vw, 1.8rem); margin: 2rem 0 .8rem; }
.lede { font-size: 1.15rem; color: var(--dim); max-width: 62ch; }
.muted { color: var(--dim); }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---- header ---- */
header.top {
  position: sticky; top: 0; z-index: 10;
  background: rgba(20, 24, 34, .92); backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--slate);
}
.bar { display: flex; align-items: center; gap: .6rem 1.4rem; flex-wrap: wrap; padding: .7rem 0; }
.brand {
  display: inline-flex; align-items: center; gap: .55rem; color: var(--bone); text-decoration: none;
  font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .98rem;
}
.main-nav { display: flex; gap: .2rem 1.1rem; flex-wrap: wrap; margin-left: auto; }
.main-nav a { color: var(--dim); text-decoration: none; font-size: .95rem; padding: .2rem 0; border-bottom: 3px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--bone); border-bottom-color: var(--ochre); }
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; font-size: .88rem; color: var(--bone);
  border: 2px solid var(--slate); padding: .2rem .65rem; background: var(--panel);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::before { content: "◆ "; color: var(--ochre); }
.lang ul {
  position: absolute; right: 0; top: calc(100% + 6px); margin: 0; padding: .4rem 0; list-style: none;
  background: var(--panel); border: 2px solid var(--slate); min-width: 12rem; box-shadow: 0 12px 30px rgba(0,0,0,.5);
}
.lang li a { display: block; padding: .3rem .9rem; color: var(--bone); text-decoration: none; }
.lang li a:hover, .lang li a[aria-current] { background: var(--slate); }
@media (max-width: 720px) {
  .main-nav { order: 3; width: 100%; margin: 0; overflow-x: auto; flex-wrap: nowrap; padding-bottom: .2rem; }
  .main-nav a { white-space: nowrap; }
  .lang { margin-left: auto; }
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 1rem auto 0; font-size: .85rem; color: var(--dim); }
.crumbs li + li::before { content: "▸"; margin-right: .3rem; color: var(--slate); }
.crumbs a { color: var(--dim); }

/* ---- bands ---- */
.band { padding: clamp(2rem, 5vw, 4rem) 0; }
.band.dark {
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 8px, transparent 8px 16px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.018) 0 8px, transparent 8px 16px),
    var(--bg2);
  border-block: 3px solid var(--slate);
}
.band > .wrap > h2:first-child, .band .split h2:first-child { margin-top: 0; }
.more { font-weight: 700; text-decoration: none; }
.more::after { content: " →"; }

/* ---- hero ---- */
.hero {
  position: relative; overflow: hidden; padding: clamp(1.5rem, 4vw, 3.5rem) 0 2rem;
  background:
    radial-gradient(ellipse at 75% 40%, rgba(229,175,111,.16), transparent 55%),
    linear-gradient(180deg, #1b2030 0%, var(--bg) 100%);
}
/* Strata: the four bands a ball digs through, sliding very slowly behind the hero. */
.hero::before {
  content: ""; position: absolute; inset: auto 0 0 0; height: 14px;
  background: linear-gradient(90deg, #b8b0a1 0 25%, #948c85 25% 50%, #737582 50% 75%, #4a4d5c 75% 100%);
  background-size: 400px 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .hero::before { animation: strata 30s linear infinite; }
  @keyframes strata { to { background-position: 400px 0; } }
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 4vw, 4rem); align-items: center; }
.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5.4rem); line-height: .95; margin: 0 0 1rem; text-transform: uppercase;
  letter-spacing: -.02em;
  text-shadow: 3px 3px 0 var(--terracotta), 6px 6px 0 var(--slate);
}
.tagline { font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 700; color: var(--ochre); margin: 0 0 .6rem; }
.hero .sub { font-size: 1.12rem; color: var(--dim); max-width: 46ch; }
.free { font-size: .9rem; color: var(--dim); margin-top: .8rem; }
.stats {
  list-style: none; padding: 0; margin: 2.5rem auto 0; display: grid;
  grid-template-columns: repeat(5, 1fr); gap: 0; border: 3px solid var(--slate); background: var(--panel);
}
.stats li { padding: 1rem .8rem; text-align: center; max-width: none; }
.stats li + li { border-left: 3px solid var(--slate); }
.stats b { display: block; font: 800 clamp(1.3rem, 3.4vw, 2.2rem)/1.1 var(--mono); color: var(--gold); }
.stats span { font-size: .85rem; color: var(--dim); }
@media (max-width: 800px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero .phone { max-width: 300px; margin-inline: auto; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li:first-child { grid-column: 1 / -1; }
  .stats li + li { border-left: 0; border-top: 3px solid var(--slate); }
  .stats li:nth-child(odd):not(:first-child) { border-left: 3px solid var(--slate); }
}

/* ---- phone-framed footage ---- */
.phone { margin: 0; }
.phone video {
  display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; background: #0b0d13;
  border: 10px solid #0b0d13; outline: 3px solid var(--slate); border-radius: 26px;
  box-shadow: 0 30px 60px rgba(0,0,0,.55), 0 0 0 6px rgba(229,175,111,.08);
}
.phone figcaption { font-size: .8rem; color: var(--dim); text-align: center; margin-top: .7rem; }
.feature { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.feature-copy h1 { margin-top: .5rem; }
@media (max-width: 720px) {
  .feature { grid-template-columns: 1fr; }
  .feature .phone { max-width: 280px; margin-inline: auto; order: 2; }
}
.quote { font-size: 1.25rem; font-style: italic; color: var(--bone); border-left: 4px solid var(--ochre); padding-left: 1rem; }
.price { font-weight: 600; color: var(--moss); }
.pip {
  display: inline-block; width: .7em; height: .7em; margin-right: .5rem; vertical-align: .05em;
  background: var(--pip, var(--ochre)); border: 2px solid rgba(0,0,0,.45);
}

/* ---- cards ---- */
.cards { list-style: none; padding: 0; margin: 1.4rem 0; display: grid; gap: 1rem; }
.worlds-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.balls-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.cards li { max-width: none; }
.card {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--bone);
  background: var(--panel); border: 3px solid var(--slate); overflow: hidden;
  transition: transform .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--ochre); color: var(--bone); }
.card img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; display: block; border-bottom: 3px solid var(--slate); }
.worlds-grid .card img { aspect-ratio: 3 / 4; }
.card-body { padding: .7rem .8rem .9rem; display: flex; flex-direction: column; gap: .25rem; }
.card-body b { font-size: 1.05rem; }
.card-body span { font-size: .86rem; color: var(--dim); line-height: 1.45; }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }

/* ---- rows (worlds and balls indexes) ---- */
.rows { display: grid; gap: 1.6rem; margin: 2rem 0; }
.row { display: grid; grid-template-columns: 150px 1fr; gap: 1.4rem; align-items: start; padding-bottom: 1.6rem; border-bottom: 3px solid var(--slate); }
.row h2 { margin: 0 0 .5rem; }
.row h2 a { color: var(--bone); text-decoration: none; }
.row h2 a:hover { color: var(--ochre); }
.row-media img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border: 3px solid var(--slate); display: block; }
@media (max-width: 560px) { .row { grid-template-columns: 96px 1fr; gap: .9rem; } }

/* ---- facts, steps, ticks, pills ---- */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1.2rem; margin: 1.2rem 0; }
.facts dt { font-weight: 700; color: var(--ochre); }
.facts dd { margin: 0; color: var(--dim); }
.facts.wide { border: 3px solid var(--slate); background: var(--panel); padding: 1rem 1.2rem; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } .facts dd { margin-bottom: .5rem; } }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: .2rem 0 .9rem 3rem; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 2.1rem; height: 2.1rem;
  display: grid; place-items: center; font: 800 1.05rem var(--mono); background: var(--ochre); color: #1a1408;
}
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 1.5rem; margin-bottom: .7rem; }
.ticks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; background: var(--moss); border: 2px solid rgba(0,0,0,.4); }
.pills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pills li { border: 2px solid var(--slate); background: var(--panel); padding: .25rem .8rem; font-size: .9rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }

/* ---- tips list ---- */
.tips { counter-reset: t; list-style: none; padding: 0; }
.tips li { counter-increment: t; position: relative; padding: 0 0 .4rem 3.6rem; border-bottom: 2px solid var(--slate); margin-bottom: 1.2rem; }
.tips li::before { content: counter(t, decimal-leading-zero); position: absolute; left: 0; top: .1rem; font: 800 1.6rem var(--mono); color: var(--terracotta); }
.tips h2 { font-size: 1.2rem; margin: 0 0 .3rem; }

/* ---- guide ---- */
.guide-grid { display: grid; grid-template-columns: 1fr 280px; gap: 3rem; align-items: start; }
.sticky { position: sticky; top: 5rem; }
.toc { border: 3px solid var(--slate); background: var(--panel); padding: .6rem 1.2rem; margin: 1.2rem 0; }
.toc ol { margin: .3rem 0; padding-left: 1.2rem; }
@media (max-width: 900px) { .guide-grid { grid-template-columns: 1fr; } .sticky { display: none; } }

/* ---- pictures ---- */
.wall { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1rem; margin: 1.4rem 0; padding: 1.2rem; background: #0e1119; border: 3px solid var(--slate); }
.pic { image-rendering: pixelated; max-width: 30%; height: auto; }
.chapters { list-style: none; padding: 0; margin: 0; }
.ch-head, .chapters li { display: grid; grid-template-columns: 6rem 1fr 1fr; gap: .3rem 1rem; align-items: baseline; }
.ch-head { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: .6rem .8rem; border-bottom: 3px solid var(--slate); margin-top: 1.5rem; }
.chapters li { padding: .7rem .8rem; border-bottom: 1px solid var(--slate); max-width: none; }
.chapters li:nth-child(odd) { background: rgba(55,62,83,.18); }
.chapters li:target { outline: 3px solid var(--ochre); }
.ch-n { font: 700 1rem var(--mono); color: var(--ochre); }
.ch-name { font-weight: 600; }
.ch-ground { color: var(--dim); font-size: .92rem; }
.ch-pics { grid-column: 1 / -1; display: flex; gap: 4px; margin-top: .35rem; }
.ch-pics i { width: 14px; height: 14px; background: #4a4f5e; box-shadow: inset -2px -2px 0 #33374a, inset 2px 2px 0 #6a7084; }

/* ---- field demo (dig.js) ---- */
.field-wrap { margin: 1rem auto 0; border: 3px solid var(--slate); background: #0e1119; position: relative; overflow: hidden; max-width: 560px; }
canvas#field { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; cursor: crosshair; touch-action: manipulation; }
.field-hint { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: .45rem .7rem; font-size: .82rem; color: var(--bone); background: rgba(20,24,34,.8); border-top: 2px solid var(--slate); max-width: none; }
@media (max-width: 759px) { canvas#field { aspect-ratio: 132 / 150; } .field-wrap { max-width: none; } }
@media (prefers-reduced-motion: reduce) { canvas#field { cursor: default; } }

/* ---- faq ---- */
.faq details { border: 3px solid var(--slate); background: var(--panel); padding: .7rem 1rem; margin-bottom: .6rem; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq summary::marker { color: var(--ochre); }
.faq p { margin: .6rem 0 0; color: var(--dim); }

/* ---- press ---- */
.press-media { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: .8rem; }
.press-media a { display: block; text-decoration: none; font: .72rem var(--mono); color: var(--dim); }
.press-media img { width: 100%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border: 3px solid var(--slate); display: block; margin-bottom: .3rem; }

/* ---- store buttons; the QR pops up on hover (desktop only) ---- */
.stores { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.2rem 0 0; }
.store {
  position: relative; display: inline-flex; flex-direction: column; align-items: flex-start;
  padding: .55rem 1.2rem; line-height: 1.15; font-weight: 800; font-size: 1.08rem; text-decoration: none;
  border: 3px solid transparent;
}
.store-small { font-weight: 500; font-size: .72rem; letter-spacing: .02em; }
.store.play { background: var(--ochre); color: #1a1408; box-shadow: 4px 4px 0 var(--terracotta); }
.store.play:hover { background: var(--gold); color: #1a1408; }
.store.soon { border-color: var(--slate); background: var(--panel); color: var(--dim); }
.qr {
  position: absolute; left: 50%; bottom: calc(100% + 12px); z-index: 5; display: none; flex-direction: column;
  align-items: center; gap: .45rem; transform: translateX(-50%); padding: .7rem .7rem .55rem;
  background: var(--bone); color: #1a1f20; font-size: .78rem; font-weight: 600; white-space: nowrap;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.qr::before { content: ""; position: absolute; bottom: -7px; left: 50%; margin-left: -7px; border: 7px solid transparent; border-bottom: 0; border-top-color: var(--bone); }
.qr img { display: block; width: 164px; height: 164px; }
@media (hover: hover) and (pointer: fine) { .store:hover .qr, .store:focus-visible .qr { display: flex; } }

/* ---- call to action ---- */
.cta { padding: 3.5rem 0; text-align: center; background: linear-gradient(180deg, var(--bg), #241d1a); border-top: 3px solid var(--slate); }
.cta h2 { margin-top: 0; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.cta p { margin-inline: auto; color: var(--dim); }
.cta .stores { justify-content: center; }

/* ---- footer ---- */
.foot { border-top: 3px solid var(--slate); padding: 2.5rem 0 3rem; color: var(--dim); font-size: .92rem; }
.foot .wrap { display: grid; gap: 1.4rem; }
.foot-brand { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; }
.foot-brand b { color: var(--bone); letter-spacing: .08em; text-transform: uppercase; }
.foot-brand .stores { margin: 0 0 0 auto; }
.foot-nav, .foot-langs { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.foot-langs { list-style: none; padding: 0; margin: 0; font-size: .85rem; }
.foot a { color: var(--dim); }
.foot a:hover { color: var(--bone); }
.copy { margin: 0; }

/* ---- legal pages (privacy, terms, support) ---- */
main.wrap.prose { padding: 2rem 0 4rem; }
.page-crest { display: flex; align-items: center; gap: 1.1rem; margin: 0 0 .8rem; }
.page-crest img { width: 96px; height: 96px; flex: 0 0 96px; border: 3px solid var(--slate); background: #0e1119; }
.page-crest h1 { margin: 0; }
.standfirst { margin: .35rem 0 0; color: var(--dim); max-width: 46ch; }
.strata { height: 10px; margin: 0 0 1.6rem; border: 2px solid var(--slate);
  background: linear-gradient(90deg, #b8b0a1 0 25%, #948c85 25% 50%, #737582 50% 75%, #4a4d5c 75% 100%); }
.meta, .updated { color: var(--dim); font-size: .92rem; }
.prose h2 { position: relative; padding-left: 1.45rem; }
.prose h2::before { content: ""; position: absolute; left: 0; top: .32em; width: 10px; height: 10px; background: var(--ochre); border: 2px solid rgba(0,0,0,.45); }
.tips h2 { padding-left: 0; }
.tips h2::before { display: none; }
table { border-collapse: collapse; width: 100%; margin: 1rem 0; font-size: .96rem; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--slate); vertical-align: top; }
td { color: var(--dim); }
code { font-family: var(--mono); font-size: .92em; background: var(--panel); padding: .1em .35em; }
.note { border-left: 3px solid var(--ochre); background: var(--panel); padding: .85rem 1rem; margin: 1.4rem 0; }
.note p { margin: 0; }
@media (max-width: 559px) { .page-crest img { width: 64px; height: 64px; flex-basis: 64px; } }
