/* 2048 website — monochrome ink-and-paper design system */
:root {
  color-scheme: light;
  --bg: #f1f1f1;
  --paper: #fafafa;
  --surface: #ffffff;
  --soft: #f8f8f8;
  --ink: #171717;
  --secondary: #626262;
  --muted: #858585;
  --line: #dedede;
  --line-strong: #cfcfcf;
  --button-ink: #111111;
  --button-text: #ffffff;
  --focus: #111111;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --page: 1120px;
  --board-frame: #111111;
  --board-bg: #141414;
  --board-grid: #292929;
  font-family: var(--sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101010;
  --paper: #202020;
  --surface: #1b1b1b;
  --soft: #242424;
  --ink: #f4f4f4;
  --secondary: #b7b7b7;
  --muted: #909090;
  --line: #363636;
  --line-strong: #505050;
  --button-ink: #f3f3f3;
  --button-text: #111111;
  --focus: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --bg: #101010;
    --paper: #202020;
    --surface: #1b1b1b;
    --soft: #242424;
    --ink: #f4f4f4;
    --secondary: #b7b7b7;
    --muted: #909090;
    --line: #363636;
    --line-strong: #505050;
    --button-ink: #f3f3f3;
    --button-text: #111111;
    --focus: #ffffff;
  }
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 999px; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { overflow-x: clip; margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 15px; line-height: 1.6; transition: background-color .2s ease, color .2s ease; }
main, section, header, footer { min-width: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
::selection { background: var(--ink); color: var(--bg); }
.page-width { width: min(calc(100% - 64px), var(--page)); margin-inline: auto; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 60; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header { min-height: 70px; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 30; backdrop-filter: blur(12px); }
.header-inner { min-height: 70px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.brand { display: inline-flex; width: fit-content; align-items: center; gap: 9px; color: var(--ink); font-size: 17px; font-weight: 760; letter-spacing: -.045em; }
.brand-mark { display: grid; width: 29px; height: 29px; place-items: center; overflow: hidden; border-radius: 8px; background: #111; }
.brand-mark img { width: 25px; height: 25px; object-fit: contain; }
.brand-suffix { margin-left: 2px; color: var(--muted); font: 7px var(--mono); letter-spacing: .13em; }
.nav-links { display: flex; align-items: center; gap: 23px; color: var(--muted); font-size: 11px; font-weight: 580; }
.nav-links a, .header-link, .back-top, .text-link { transition: color .16s ease, border-color .16s ease; }
.nav-links a:hover, .header-link:hover, .back-top:hover, .text-link:hover { color: var(--ink); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 11px; }
.theme-toggle { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--surface); cursor: pointer; }
.theme-toggle svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.moon-icon { display: none; }
:root[data-theme="dark"] .sun-icon { display: none; }
:root[data-theme="dark"] .moon-icon { display: block; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] .sun-icon { display: none; }
  :root[data-theme="system"] .moon-icon { display: block; }
}
.header-link { display: inline-flex; align-items: center; gap: 13px; padding: 9px 14px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 11px; font-weight: 650; }
.menu-toggle { display: none; width: 40px; height: 38px; padding: 9px; background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; cursor: pointer; }
.menu-toggle span { display: block; width: 100%; height: 1px; margin: 5px 0; background: currentColor; transition: transform .18s ease; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

.eyebrow, .section-label, .visual-heading, .hero-meta, .fact-item strong, .feature-number, .feature-tag, .step-number, .control-index, .control-note, .install-panel-top, .install-status, .footer-bottom { font-family: var(--mono); }
.hero { min-height: 660px; display: grid; grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); gap: clamp(28px, 4.5vw, 56px); align-items: center; padding-top: 76px; padding-bottom: 86px; }
.hero-copy { max-width: 500px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 25px; }
.eyebrow-rule, .section-line { width: 25px; height: 1px; background: var(--muted); flex: 0 0 auto; }
h1 { text-wrap: balance; max-width: 580px; margin: 0 0 23px; font-size: clamp(48px, 5.6vw, 76px); line-height: .98; letter-spacing: -.072em; font-weight: 560; }
h1 span, .section-intro h2 span { color: var(--muted); }
.hero-lede { max-width: 430px; color: var(--muted); font-size: 15px; line-height: 1.75; margin-bottom: 27px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }
.button { min-height: 45px; display: inline-flex; justify-content: center; align-items: center; gap: 18px; padding: 0 18px; border: 1px solid var(--button-ink); border-radius: 999px; font-size: 11px; font-weight: 660; transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease; }
.button:active { transform: translateY(1px); }
.button-primary { background: var(--button-ink); border-color: var(--button-ink); color: var(--button-text); }
.button-primary:hover { opacity: .86; }
.text-link { display: inline-flex; align-items: center; gap: 9px; font-size: 11px; font-weight: 670; color: var(--muted); }
.hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--muted); font-size: 8px; margin-top: 31px; letter-spacing: .02em; }
.hero-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); }
.hero-visual { min-width: 0; width: 100%; }
.visual-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; color: var(--muted); font-size: 8px; letter-spacing: .05em; }
.visual-heading-line { flex: 1; height: 1px; background: var(--line); }
.browser-preview { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 286px; grid-template-rows: 34px minmax(400px, auto); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.075); }
.browser-topbar { grid-column: 1 / -1; height: 34px; display: flex; align-items: center; gap: 12px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--soft); }
.window-controls { display: flex; gap: 4px; }
.window-controls i { width: 6px; height: 6px; display: block; border-radius: 50%; background: var(--line-strong); }
.browser-tab { height: 24px; min-width: 105px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: 7px 7px 0 0; background: var(--surface); color: var(--secondary); font-size: 9px; }
.mini-mark { width: 15px; height: 15px; display: inline-grid; place-items: center; overflow: hidden; border-radius: 4px; background: #111; }
.browser-menu { margin-left: auto; color: var(--muted); letter-spacing: 2px; }
.browser-content-preview { grid-column: 1; grid-row: 2; min-width: 0; padding: 18px 17px; background: var(--paper); }
.mock-address { width: 72%; height: 17px; margin-bottom: 38px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.mock-content-tag { margin-bottom: 11px; color: var(--muted); font: 7px var(--mono); letter-spacing: .11em; }
.mock-content-title { margin-bottom: 14px; color: var(--secondary); font-size: clamp(17px, 2vw, 25px); font-weight: 560; letter-spacing: -.055em; line-height: 1.12; }
.mock-lines { display: grid; gap: 6px; margin-bottom: 24px; }
.mock-lines i { height: 4px; border-radius: 8px; background: var(--line); }
.mock-lines i:nth-child(1) { width: 92%; }
.mock-lines i:nth-child(2) { width: 78%; }
.mock-lines i:nth-child(3) { width: 57%; }
.mock-content-card { display: grid; gap: 6px; padding: 13px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.mock-content-card span { display: block; height: 4px; border-radius: 8px; background: var(--line); }
.mock-content-card span:nth-child(1) { width: 46%; }
.mock-content-card span:nth-child(2) { width: 86%; }
.mock-content-card span:nth-child(3) { width: 65%; }
.mock-content-card.short { width: 73%; }
.mock-side-panel { grid-column: 2; grid-row: 2; min-width: 0; padding: 12px 13px 13px; border-left: 1px solid var(--line); background: var(--bg); }
.mock-panel-topline { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.mock-brand { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.mock-brand img { background: #111; border-radius: 4px; }
.mock-theme { color: var(--secondary); font-size: 14px; }
.mock-game-intro { padding: 11px 0 10px; }
.mock-game-intro small { display: block; margin-bottom: 4px; color: var(--muted); font: 7px var(--mono); letter-spacing: .08em; }
.mock-game-intro strong { display: block; font-size: 23px; line-height: 1; letter-spacing: -.065em; }
.mock-game-intro > span { display: block; margin-top: 4px; color: var(--secondary); font-size: 8px; }
.mock-score-row { width: 100%; max-width: 210px; display: flex; align-items: end; justify-content: space-between; margin: 0 auto 6px; }
.mock-score-row > span { display: grid; gap: 1px; }
.mock-score-row > span:last-child { text-align: right; }
.mock-score-row small, .mock-stats small { color: var(--muted); font: 7px var(--mono); letter-spacing: .08em; }
.mock-score-row b, .mock-stats b { color: var(--ink); font: 700 10px var(--mono); font-variant-numeric: tabular-nums; }
.mock-board { width: 100%; max-width: 218px; aspect-ratio: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0 auto; padding: 6px; border: 1px solid #303030; border-radius: 11px; background: #111; }
.mock-tile { min-width: 0; min-height: 0; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(17,17,17,.38); border-radius: 3px; background: #202020; color: #111; font: 760 clamp(10px, 1.25vw, 16px)/1 var(--mono); letter-spacing: -.08em; font-variant-numeric: tabular-nums; }
.mock-tile[data-value="2"] { background: #e8e8e4; color: #171717; }
.mock-tile[data-value="4"] { background: #d8d8d4; color: #171717; }
.mock-tile[data-value="8"] { background: #c8c8c4; color: #171717; }
.mock-tile[data-value="16"] { background: #b8b8b4; color: #171717; }
.mock-tile[data-value="32"] { background: #a8a8a4; color: #171717; }
.mock-tile[data-value="64"] { background: #969692; color: #111; }
.mock-tile[data-value="128"] { background: #82827e; color: #fff; font-size: 11px; }
.mock-tile[data-value="256"] { background: #70706c; color: #fff; font-size: 11px; }
.mock-tile[data-value="512"] { background: #5c5c58; color: #fff; font-size: 10px; }
.mock-tile[data-value="1024"] { background: #454541; color: #fff; font-size: 9px; }
.mock-tile[data-value="2048"], .mock-tile[data-value="4096"], .mock-tile[data-value="8192"] { background: #f4f4f0; color: #111; font-size: 9px; }
.mock-board-caption { max-width: 218px; display: flex; justify-content: space-between; margin: 5px auto 7px; color: var(--muted); font: 6px var(--mono); letter-spacing: .04em; }
.mock-stats { max-width: 218px; display: flex; justify-content: space-between; margin: 0 auto 7px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.mock-stats > span { display: grid; gap: 2px; }
.mock-stats > span:last-child { text-align: right; }
.mock-controls { max-width: 218px; margin: 0 auto; padding: 7px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.mock-controls > small { display: block; margin-bottom: 5px; color: var(--muted); font: 6px var(--mono); letter-spacing: .08em; }
.mock-controls > div { display: flex; gap: 4px; }
.mock-controls i { flex: 1; display: grid; min-height: 21px; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: var(--soft); color: var(--secondary); font: normal 9px var(--mono); }
.mock-controls > span { display: block; margin-top: 5px; color: var(--muted); font: 6px var(--mono); }
.demo-examples { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.demo-examples > span { margin-right: 5px; color: var(--muted); font: 7px var(--mono); letter-spacing: .08em; }
.demo-chip { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--muted); font-size: 8px; cursor: pointer; }
.demo-chip.active { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.visual-note { margin: 9px 0 0; color: var(--muted); font-size: 8px; }
.visual-note span { margin-right: 4px; }

.fact-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.fact-strip-inner { display: grid; grid-template-columns: repeat(4,1fr); }
.fact-item { min-height: 115px; display: flex; flex-direction: column; justify-content: center; padding: 18px 24px; border-right: 1px solid var(--line); }
.fact-item:first-child { padding-left: 0; }
.fact-item:last-child { border-right: 0; }
.fact-item strong { margin-bottom: 5px; color: var(--ink); font-size: 23px; font-weight: 550; letter-spacing: -.07em; }
.fact-item > span { font-size: 10px; font-weight: 700; }
.fact-item p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }

.section { padding-top: 96px; padding-bottom: 101px; }
.section-label { display: flex; align-items: center; gap: 10px; margin-bottom: 23px; color: var(--muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.section-intro { display: grid; grid-template-columns: 1fr .8fr; gap: 50px; align-items: end; margin-bottom: 34px; }
.section-intro h2 { margin: 0; font-size: clamp(35px, 4.4vw, 52px); line-height: 1.01; letter-spacing: -.067em; font-weight: 550; }
.section-intro > p { max-width: 450px; margin: 0 0 4px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.feature-card { position: relative; min-height: 255px; padding: 21px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.feature-number { position: absolute; top: 21px; right: 20px; color: var(--muted); font-size: 8px; }
.feature-icon { width: 37px; height: 37px; display: grid; place-items: center; margin-bottom: 20px; border: 1px solid var(--line); border-radius: 10px; color: var(--secondary); font: 17px var(--mono); }
.feature-card h3 { margin: 0 0 8px; font-size: 14px; font-weight: 670; letter-spacing: -.02em; }
.feature-card p { min-height: 73px; margin: 0 0 12px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.feature-card code { display: block; overflow-wrap: anywhere; margin-bottom: 13px; padding: 7px 8px; border-radius: 6px; background: var(--soft); color: var(--secondary); font: 8px/1.5 var(--mono); }
.feature-tag { display: inline-block; color: var(--muted); font-size: 7px; letter-spacing: .08em; }

.section-rule { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); }
.play-section { padding: 92px 0 96px; }
.play-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 65px; align-items: center; }
.rule-board-card { padding: 23px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.rule-board-heading { display: flex; justify-content: space-between; color: var(--muted); font: 8px var(--mono); letter-spacing: .08em; }
.merge-demo { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin: 35px 0 29px; color: var(--muted); font: 17px var(--mono); }
.merge-tile { width: clamp(48px, 5.6vw, 67px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(17,17,17,.2); border-radius: 8px; background: #e8e8e4; color: #171717; font: 760 23px var(--mono); }
.result-tile { background: #d8d8d4; }
.merge-arrow { font-size: 23px; }
.rule-board-card > p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.75; }
.steps-list { border-top: 1px solid var(--line); }
.step-row { display: grid; grid-template-columns: 38px 1fr 42px; gap: 15px; align-items: center; min-height: 112px; border-bottom: 1px solid var(--line); }
.step-number { color: var(--muted); font-size: 10px; }
.step-copy h3 { margin: 0 0 4px; font-size: 14px; font-weight: 650; }
.step-copy p { max-width: 470px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.step-icon { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; color: var(--secondary); font: 12px var(--mono); }

.controls-section { padding-top: 93px; padding-bottom: 98px; }
.examples-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 29px; }
.examples-heading h2 { margin: 0; font-size: clamp(30px, 3.6vw, 43px); line-height: 1.08; letter-spacing: -.06em; font-weight: 550; }
.examples-heading p { max-width: 370px; margin: 0 0 3px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.control-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.control-card { min-height: 270px; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.control-index { color: var(--muted); font-size: 8px; letter-spacing: .08em; }
.control-card h3 { margin: 10px 0 17px; font-size: 15px; font-weight: 650; }
.control-card p { max-width: 290px; min-height: 52px; margin: 14px 0 14px; color: var(--muted); font-size: 10px; line-height: 1.7; }
kbd { min-width: 25px; display: inline-grid; place-items: center; padding: 4px 6px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--soft); color: var(--secondary); font: 9px var(--mono); box-shadow: 0 1px 0 var(--line); }
.key-cluster { width: 100px; display: grid; justify-items: center; gap: 4px; }
.key-cluster > div { display: flex; gap: 4px; }
.key-cluster kbd { width: 28px; height: 26px; }
.key-list { display: flex; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font: 8px var(--mono); }
.key-list span { display: flex; align-items: center; gap: 5px; }
.key-list kbd { min-width: 20px; padding: 2px 4px; font-size: 8px; }
.button-cluster { display: flex; gap: 5px; }
.button-cluster i { width: 34px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--soft); color: var(--secondary); font: normal 13px var(--mono); }
.control-note { color: var(--muted); font-size: 7px; letter-spacing: .08em; }
.swipe-graphic { display: flex; align-items: center; gap: 14px; height: 31px; color: var(--secondary); font: 25px var(--mono); }
.state-strip { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.state-strip > div { min-height: 98px; display: flex; flex-direction: column; justify-content: center; gap: 5px; padding: 13px 18px; border-right: 1px solid var(--line); }
.state-strip > div:last-child { border-right: 0; }
.state-strip span { color: var(--muted); font: 7px var(--mono); letter-spacing: .08em; }
.state-strip strong { display: flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; }
.state-strip small { color: var(--muted); font-size: 8px; }

.privacy-section { display: grid; grid-template-columns: .88fr 1.12fr; gap: 75px; align-items: center; padding-top: 100px; padding-bottom: 105px; }
.privacy-visual { min-height: 360px; position: relative; display: grid; place-items: center; overflow: hidden; }
.local-diagram { width: min(100%, 360px); aspect-ratio: 1; position: relative; display: grid; place-items: center; }
.local-orbit { position: absolute; border: 1px solid var(--line-strong); border-radius: 50%; }
.orbit-one { inset: 11%; }
.orbit-two { inset: 24%; border-style: dashed; opacity: .75; }
.local-core { width: 132px; height: 132px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; border: 1px solid var(--line-strong); border-radius: 24px; background: var(--surface); box-shadow: 0 14px 45px rgba(0,0,0,.06); }
.local-core img { width: 48px; height: 48px; }
.local-core strong { font-size: 15px; letter-spacing: -.05em; }
.local-core span { color: var(--muted); font: 7px var(--mono); letter-spacing: .12em; }
.local-node { position: absolute; min-width: 100px; display: grid; gap: 3px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 5px 20px rgba(0,0,0,.035); }
.local-node span { color: var(--muted); font: 7px var(--mono); }
.local-node b { color: var(--secondary); font-size: 9px; font-weight: 650; }
.node-game { top: 7%; left: 8%; }
.node-score { top: 24%; right: 1%; }
.node-theme { bottom: 8%; left: 14%; }
.privacy-copy h2 { margin: 0 0 19px; font-size: clamp(37px, 4.2vw, 53px); line-height: 1.02; letter-spacing: -.065em; font-weight: 550; }
.privacy-copy > p { max-width: 520px; color: var(--muted); font-size: 12px; line-height: 1.75; }
.privacy-copy code { color: var(--secondary); font: 10px var(--mono); }
.privacy-caveat { display: flex; align-items: flex-start; gap: 10px; margin: 22px 0 19px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font-size: 9px !important; }
.privacy-caveat > span:first-child { width: 17px; height: 17px; display: grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--secondary); font: 10px var(--mono); }

.install-section { padding: 82px 0 87px; background: #111; color: #f5f5f5; }
.install-inner { display: grid; grid-template-columns: 1fr .95fr; gap: 70px; align-items: center; }
.light-label { color: #a7a7a7; }
.light-label .section-line { background: #777; }
.install-copy h2 { margin: 0 0 18px; font-size: clamp(42px, 5.1vw, 61px); line-height: .99; letter-spacing: -.067em; font-weight: 540; }
.install-copy h2 em { color: #989898; font-weight: 450; }
.install-copy > p { max-width: 430px; margin: 0 0 26px; color: #b7b7b7; font-size: 12px; line-height: 1.75; }
.install-points { display: grid; gap: 9px; color: #b7b7b7; font-size: 10px; }
.install-points span { display: flex; gap: 12px; align-items: center; }
.install-points b { color: #777; font: 9px var(--mono); }
.install-panel { padding: 17px; border: 1px solid #424242; border-radius: 12px; background: #191919; }
.install-panel-top { display: flex; justify-content: space-between; color: #8a8a8a; font-size: 8px; letter-spacing: .09em; }
.command-line { display: flex; align-items: center; gap: 10px; margin: 14px 0 18px; padding: 12px 10px; border: 1px solid #3c3c3c; border-radius: 7px; background: #101010; }
.command-line > span { color: #8c8c8c; font: 11px var(--mono); }
.command-line code { flex: 1; min-width: 0; overflow-wrap: anywhere; color: #f4f4f4; font: 10px var(--mono); }
.command-line button { width: 29px; height: 29px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #444; border-radius: 6px; background: #242424; color: #ddd; cursor: pointer; }
.command-line button svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.install-next { padding-top: 14px; border-top: 1px solid #3a3a3a; }
.install-next p { margin: 0 0 8px; color: #eee; font-size: 10px; }
.install-next ol { margin: 0; padding-left: 19px; color: #b7b7b7; font-size: 9px; line-height: 1.9; }
.install-next code { color: #f4f4f4; font: 9px var(--mono); }
.install-status { min-height: 18px; margin-top: 12px; color: #838383; font-size: 7px; }
.repo-link { display: inline-flex; gap: 7px; align-items: center; color: #d5d5d5; font-size: 9px; }
.repo-link:hover { color: #fff; }

.project-section { padding: 85px 0; background: var(--soft); color: var(--ink); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-inner { display: grid; grid-template-columns: .9fr 1.1fr; gap: 75px; align-items: start; }
.project-section .section-label { color: var(--muted); }
.project-section .section-line { background: var(--muted); }
.project-heading h2 { margin: 0; color: var(--ink); font-size: clamp(38px, 4.4vw, 54px); line-height: .99; letter-spacing: -.065em; font-weight: 540; }
.project-copy > p { max-width: 530px; color: var(--secondary); font-size: 12px; line-height: 1.75; }
.project-links { display: grid; grid-template-columns: repeat(2,1fr); gap: 0 20px; margin: 20px 0; border-top: 1px solid var(--line); }
.project-links a { display: flex; justify-content: space-between; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 10px; }
.project-links a:hover { color: var(--muted); }
.license-note { max-width: 550px; margin: 18px 0 0 !important; color: var(--muted) !important; font-size: 8px !important; line-height: 1.6 !important; }

.faq-section { padding-top: 98px; padding-bottom: 100px; }
.faq-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: 70px; align-items: start; }
.faq-layout h2 { margin: 0; font-size: clamp(37px, 4vw, 49px); line-height: 1.02; letter-spacing: -.065em; font-weight: 550; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { position: relative; padding: 17px 30px 17px 0; list-style: none; cursor: pointer; font-size: 12px; font-weight: 630; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 0; top: 14px; color: var(--muted); font: 17px var(--mono); }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { max-width: 570px; margin: -2px 0 18px; color: var(--muted); font-size: 10px; line-height: 1.75; }
.closing-section { padding-top: 0; padding-bottom: 75px; }
.closing-panel { padding: 48px 50px 53px; border-radius: 14px; background: #111; color: #f4f4f4; }
.closing-panel h2 { margin: 0 0 13px; font-size: clamp(38px, 4.8vw, 58px); line-height: .98; letter-spacing: -.065em; font-weight: 540; }
.closing-panel h2 em { color: #999; font-weight: 450; }
.closing-panel > p { max-width: 450px; margin: 0 0 22px; color: #b8b8b8; font-size: 11px; }
.button-inverted { background: #f2f2f2; border-color: #f2f2f2; color: #111; }
.button-inverted:hover { background: #ddd; border-color: #ddd; }
.site-footer { border-top: 1px solid var(--line); }
.footer-top { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { font-size: 15px; }
.footer-top > p { margin: 0; color: var(--muted); font-size: 10px; }
.back-top { color: var(--muted); font-size: 10px; }
.footer-bottom { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 8px; }
.footer-attribution a { text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto auto; }
  .nav-links { gap: 14px; }
  .hero { grid-template-columns: 1fr; gap: 42px; padding-top: 63px; }
  .hero-copy { max-width: 680px; }
  .hero-visual { max-width: 740px; margin-inline: auto; }
  .feature-grid { grid-template-columns: repeat(2,1fr); }
  .play-layout { gap: 32px; }
  .privacy-section { gap: 40px; }
  .install-inner { gap: 35px; }
}
@media (max-width: 760px) {
  .page-width { width: min(calc(100% - 38px), var(--page)); }
  .site-header, .header-inner { min-height: 64px; }
  .header-inner { grid-template-columns: 1fr auto auto; gap: 8px; }
  .menu-toggle { display: block; order: 2; }
  .header-actions { order: 3; gap: 7px; }
  .header-link { display: none; }
  .nav-links { display: none; position: absolute; top: 63px; left: 0; right: 0; padding: 13px 20px 17px; border-bottom: 1px solid var(--line); background: var(--bg); box-shadow: 0 16px 25px rgba(0,0,0,.05); }
  .nav-links.is-open { display: grid; gap: 0; }
  .nav-links a { padding: 11px 0; border-bottom: 1px solid var(--line); }
  .nav-links a:last-child { border-bottom: 0; }
  .hero { min-height: 0; padding-top: 58px; padding-bottom: 65px; }
  h1 { font-size: clamp(45px, 11vw, 65px); }
  .fact-strip-inner { grid-template-columns: repeat(2,1fr); }
  .fact-item { min-height: 90px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
  .fact-item:first-child { padding-left: 18px; }
  .fact-item:nth-child(2) { border-right: 0; }
  .fact-item:nth-child(3), .fact-item:nth-child(4) { border-bottom: 0; }
  .section, .play-section, .controls-section { padding-top: 72px; padding-bottom: 76px; }
  .section-intro { grid-template-columns: 1fr; gap: 15px; }
  .section-intro > p { margin: 0; }
  .feature-grid { gap: 8px; }
  .feature-card { min-height: 260px; padding: 16px; }
  .feature-card p { min-height: 95px; }
  .play-layout { grid-template-columns: 1fr; gap: 27px; }
  .rule-board-card { max-width: 510px; }
  .control-grid { grid-template-columns: 1fr; }
  .control-card { min-height: 0; }
  .control-card p { min-height: 0; }
  .state-strip { grid-template-columns: 1fr; }
  .state-strip > div { min-height: 75px; border-right: 0; border-bottom: 1px solid var(--line); }
  .state-strip > div:last-child { border-bottom: 0; }
  .privacy-section, .install-inner, .project-inner, .faq-layout { grid-template-columns: 1fr; gap: 30px; }
  .privacy-section { padding-top: 70px; padding-bottom: 75px; }
  .privacy-visual { min-height: 260px; order: 2; }
  .install-section { padding: 68px 0; }
  .project-section { padding: 70px 0; }
  .faq-section { padding-top: 72px; padding-bottom: 76px; }
  .examples-heading { display: block; }
  .examples-heading p { margin-top: 13px; }
  .closing-panel { padding: 34px 25px 38px; }
}
@media (max-width: 560px) {
  .browser-preview { grid-template-columns: minmax(0,1fr) 265px; }
  .browser-content-preview { padding: 15px 12px; }
  .mock-side-panel { padding: 11px 10px; }
}
@media (max-width: 480px) {
  .page-width { width: min(calc(100% - 30px), var(--page)); }
  .brand { font-size: 15px; }
  .brand-mark { width: 27px; height: 27px; }
  .brand-suffix { font-size: 6px; }
  .theme-toggle { width: 35px; height: 35px; }
  .hero { padding-top: 45px; }
  .hero-actions { gap: 13px; }
  .button { min-height: 42px; padding-inline: 14px; }
  .hero-meta { gap: 7px; font-size: 7px; }
  .browser-preview { grid-template-columns: 1fr; grid-template-rows: 34px auto auto; }
  .browser-content-preview { display: none; }
  .mock-side-panel { grid-column: 1; grid-row: 2; width: 100%; max-width: 330px; justify-self: center; border-left: 0; }
  .mock-game-intro strong { font-size: 27px; }
  .mock-board { max-width: 250px; gap: 5px; padding: 7px; }
  .mock-board-caption, .mock-stats, .mock-controls { max-width: 250px; }
  .mock-tile { font-size: 17px; }
  .mock-tile[data-value="128"], .mock-tile[data-value="256"] { font-size: 13px; }
  .mock-tile[data-value="512"], .mock-tile[data-value="1024"], .mock-tile[data-value="2048"], .mock-tile[data-value="4096"], .mock-tile[data-value="8192"] { font-size: 11px; }
  .fact-item { padding-inline: 12px; }
  .fact-item:first-child { padding-left: 12px; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card { min-height: 0; }
  .feature-card p { min-height: 0; }
  .feature-card code { margin-bottom: 8px; }
  .merge-demo { gap: 6px; margin-block: 28px; }
  .merge-tile { width: 56px; font-size: 20px; }
  .step-row { grid-template-columns: 25px 1fr 34px; gap: 9px; }
  .step-icon { width: 31px; height: 31px; }
  .install-panel { padding: 13px; }
  .project-links { grid-template-columns: 1fr; }
  .footer-top { flex-wrap: wrap; padding-block: 13px; }
  .footer-top > p { order: 3; flex-basis: 100%; }
  .footer-bottom { align-items: flex-start; flex-direction: column; justify-content: center; padding-block: 12px; }
  .local-diagram { width: min(100%, 310px); }
  .local-node { min-width: 87px; padding: 8px 9px; }
  .node-game { left: 2%; }
  .node-score { right: 0; }
  .node-theme { left: 7%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
