/* Capacitate website. Colours, line weights and sprites come from the game itself:
   map paper, slate network lines, river blue, park sand, and the title screen's Play green. */

@font-face {
  font-family: Nunito;
  src: url('assets/nunito-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --paper: #faf7f0;
  --card: #fffefa;
  --ink: #102b4b;
  --text: #2b4459;
  --muted: #566c7e;
  --rule: #dbe5dc;
  --network: #6e8798;
  --river: #b1deec;
  --river-edge: #93cfe3;
  --sand: #ebdcae;
  --sand-edge: #d6c18c;
  --go: #267d49;
  --go-hover: #2c8b53;
  --go-tint: #e6f0e6;
  --power: #ffb400;
  --water: #1597ed;
  --sewage: #9448c9;
  --alert: #a3321f;
  --focus: #0b6bcb;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 24px; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: Nunito, 'Segoe UI', Arial, sans-serif;
  font-size: 17px;
  font-weight: 580;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) { overflow: hidden; }

h1, h2, h3 { color: var(--ink); }
h2 { margin: 0 0 14px; font-size: clamp(32px, 3.6vw, 44px); font-weight: 850; line-height: 1.08; letter-spacing: -.025em; }
h3 { font-weight: 850; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0 0 14px; }
a { color: inherit; }
img { max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: #cfe8d6; color: var(--ink); }

.shell { width: min(100% - 48px, 1200px); margin-inline: auto; }

.skip-link { position: absolute; left: 16px; top: -80px; z-index: 50; padding: 10px 14px; border-radius: 10px; background: var(--card); color: var(--ink); font-weight: 800; }
.skip-link:focus { top: 12px; }

/* Buttons share the game's tactile Play tile: flat green with a darker lip. */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  background: var(--go);
  box-shadow: inset 0 -3px 0 rgb(0 0 0 / .2);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.button:hover { background: var(--go-hover); }
.button:active { box-shadow: inset 0 -1px 0 rgb(0 0 0 / .2); transform: translateY(1px); }
.button--small { min-height: 42px; padding: 0 16px; border-radius: 12px; font-size: 15px; }
.button--quiet { border: 1.5px solid #cfc5ae; background: var(--card); box-shadow: inset 0 -2px 0 rgb(16 43 75 / .06); color: var(--ink); }
.button--quiet:hover { border-color: var(--go); background: var(--card); color: var(--go); }

/* Header */
.site-header { position: absolute; z-index: 10; top: 24px; left: 50%; display: flex; align-items: center; gap: 18px; width: min(100% - 64px, 1320px); padding: 12px 18px; border: 1px solid rgb(255 255 255 / .82); border-radius: 17px; background: rgb(255 254 250 / .91); box-shadow: 0 12px 35px rgb(16 43 75 / .12); backdrop-filter: blur(14px); transform: translateX(-50%); }
.site-header .button--quiet { border-color: var(--ink); background: var(--ink); box-shadow: none; color: #fff; }
.site-header .button--quiet:hover { border-color: #25486a; background: #25486a; color: #fff; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 21px; font-weight: 900; letter-spacing: -.02em; text-decoration: none; }
.wordmark img { display: block; }
.site-nav { display: flex; gap: 18px; margin-left: auto; }
.site-nav a { color: var(--ink); white-space: nowrap; font-size: 15px; font-weight: 750; text-decoration: none; text-underline-offset: 5px; text-decoration-thickness: 2px; }
.site-nav a:hover { text-decoration-line: underline; text-decoration-color: var(--go); }
.site-nav a[aria-current="page"] { text-decoration-line: underline; text-decoration-color: var(--go); }
.site-nav__signup { display: none; }

/* The illustrated valley from the original page frames the newer playable map. */
.hero-stage { overflow: hidden; background-color: #fce9c4; background-image: linear-gradient(90deg, rgb(255 248 231 / .94), rgb(255 248 231 / .66) 43%, rgb(255 248 231 / .12) 78%), url('assets/cozy-valley-title.webp'); background-position: center, center bottom; background-size: cover; }
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; min-height: 810px; padding: 148px 0 145px; }
.lockup { display: flex; align-items: center; gap: 14px; margin: 0 0 30px; font-size: clamp(50px, 5.7vw, 78px); font-weight: 900; line-height: 1; letter-spacing: -.04em; }
.lockup img { width: 1.18em; height: 1.18em; flex: none; }
.hero__lead { max-width: 30ch; margin-bottom: 16px; color: var(--ink); font-size: clamp(23px, 2.25vw, 29px); font-weight: 800; line-height: 1.3; letter-spacing: -.01em; }
.hero__text > p:not(.hero__lead) { max-width: 44ch; font-size: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 30px; }
.hero__status { margin: 0; color: var(--muted); font-size: 15px; }

/* The playable map */
.demo { margin: 0; padding: 11px 11px 15px; border: 1px solid rgb(255 255 255 / .8); border-radius: 23px; background: rgb(255 254 250 / .96); box-shadow: 0 24px 55px rgb(16 43 75 / .2); }
.demo__eyebrow { margin: 0 7px 8px; color: var(--go); font-size: 12px; font-weight: 950; letter-spacing: .13em; line-height: 1.3; text-transform: uppercase; }
.demo__frame { position: relative; overflow: hidden; border: 1px solid var(--rule); border-radius: 15px; background: var(--paper); }
.demo__frame::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 0 rgb(214 76 56 / 0); pointer-events: none; transition: box-shadow .3s; }
.demo.is-outage .demo__frame::after { box-shadow: inset 0 0 26px 6px rgb(214 76 56 / .4); animation: edge-pulse 1.6s ease-in-out infinite; }
@keyframes edge-pulse { 50% { box-shadow: inset 0 0 14px 2px rgb(214 76 56 / .2); } }
.demo__map { display: block; width: 100%; height: auto; font-family: Nunito, 'Segoe UI', Arial, sans-serif; user-select: none; -webkit-tap-highlight-color: transparent; }
.demo__river-bank, .demo__river { fill: none; stroke-linecap: round; }
.demo__river-bank { stroke: var(--river-edge); stroke-width: 64; }
.demo__river { stroke: var(--river); stroke-width: 50; }
.demo__park { fill: var(--sand); stroke: var(--sand-edge); stroke-width: 2; }
.demo__lines line { stroke: var(--network); stroke-width: 10; stroke-linecap: round; transition: stroke .35s; }
.demo.is-outage .demo__lines line { stroke: var(--power); }
.demo__lines line.is-drawing { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-line .45s ease-out forwards; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
.demo__suggest { stroke: #98a7b3; stroke-width: 4; stroke-dasharray: 10 9; stroke-linecap: round; }
.demo__ring-track { fill: var(--card); stroke: #dfe5e9; stroke-width: 6; }
.demo__ring { fill: none; stroke-width: 6; stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray .6s ease; }
.demo__ring-warn { fill: none; stroke-width: 2.5; stroke-dasharray: 5 6; opacity: 0; transition: opacity .3s; }
.demo__plant.is-high .demo__ring-warn { opacity: 1; }
[data-plant='power'] .demo__ring, [data-plant='power'] .demo__ring-warn { stroke: var(--power); }
[data-plant='water'] .demo__ring, [data-plant='water'] .demo__ring-warn { stroke: var(--water); }
[data-plant='sewage'] .demo__ring, [data-plant='sewage'] .demo__ring-warn { stroke: var(--sewage); }
.demo__warning { display: none; }
.demo.is-outage .demo__warning { display: inline; }
.demo__new-plant { opacity: 0; pointer-events: none; transition: opacity .4s; }
.demo__new-plant.is-built { opacity: 1; }
.demo__waiting { cursor: pointer; outline: none; }
.demo__waiting text { fill: var(--ink); font-size: 15px; font-weight: 850; text-anchor: middle; paint-order: stroke; stroke: var(--paper); stroke-width: 5px; stroke-linejoin: round; }
.demo__halo { fill: rgb(38 125 73 / .1); stroke: var(--go); stroke-width: 2.5; stroke-dasharray: 7 6; transform-box: fill-box; transform-origin: center; animation: halo-turn 14s linear infinite; }
.demo__waiting:hover .demo__halo { fill: rgb(38 125 73 / .2); }
.demo__waiting:focus-visible .demo__halo { fill: rgb(38 125 73 / .22); stroke: var(--focus); stroke-width: 4; stroke-dasharray: none; }
@keyframes halo-turn { to { transform: rotate(360deg); } }
.is-hidden { display: none; }
.demo__waiting.is-connected { cursor: default; pointer-events: none; }
.demo__waiting.is-connected .demo__halo, .demo__waiting.is-connected text { display: none; }

.demo__alert { position: absolute; top: 12px; left: 50%; display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 14px; border: 1.5px solid #ebb9ad; border-radius: 12px; background: var(--card); box-shadow: 0 8px 20px -8px rgb(16 43 75 / .35); color: var(--alert); font-size: 14px; font-weight: 750; white-space: nowrap; transform: translateX(-50%); }
.demo__alert[hidden] { display: none; }
.demo__alert strong { font-weight: 900; }
.demo__alert [data-demo-clock] { margin-left: 6px; font-variant-numeric: tabular-nums; }
.demo__short { margin-left: 6px; color: var(--muted); }
.demo__alert button { min-height: 34px; padding: 0 12px; border: 1.5px solid #d6a092; border-radius: 9px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 850; }
.demo__alert button:hover { border-color: var(--alert); }
.demo__alert button:disabled { cursor: default; opacity: .5; }

.demo figcaption { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; min-height: 45px; margin: 12px 7px 0; }
.demo__caption { max-width: 54ch; margin: 0; color: var(--text); font-size: 16px; font-weight: 650; }
.demo__reset { flex: none; padding: 0; border: 0; background: none; color: var(--go); font-size: 16px; font-weight: 850; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.demo__reset[hidden] { display: none; }

/* Sections */
.section-intro { max-width: 640px; }
.section-intro p { color: var(--muted); font-size: 18px; }
.section-intro--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; max-width: none; }
.section-intro--row h2 { margin: 0; }
.section-intro--row p { max-width: 46ch; margin: 0; font-size: 16px; }

/* How a game goes: the days sit on one network line, like buildings on a backbone. */
.days-section { padding: 104px 0; background: var(--card); }
.days { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin: 52px 0 0; padding: 0; list-style: none; }
.days li { position: relative; }
.days li:not(:last-child)::before { content: ''; position: absolute; top: 27px; left: 32px; width: calc(100% + 32px); height: 10px; border-radius: 5px; background: var(--network); }
.days__node { position: relative; z-index: 1; display: grid; place-items: center; width: 64px; height: 64px; border: 4px solid var(--network); border-radius: 50%; background: var(--card); }
.days li:nth-child(1) .days__node { border-color: var(--power); background: #fff8e3; }
.days li:nth-child(2) .days__node { border-color: var(--water); background: #eaf7ff; }
.days li:nth-child(3) .days__node { border-color: var(--sewage); background: #f5eafa; }
.days li:nth-child(4) .days__node { border-color: var(--go); background: #e9f5eb; }
.days__node img { display: block; width: 40px; height: 40px; }
.days h3 { margin: 18px 0 6px; font-size: 22px; }
.days p { max-width: 32ch; margin: 0; font-size: 16px; line-height: 1.55; }
.days__pressure { max-width: none; margin: 38px 0 0; padding: 18px 22px; border-left: 4px solid var(--power); border-radius: 0 12px 12px 0; background: #fff8e8; color: var(--ink); font-size: 17px; font-weight: 750; }
.days__more { max-width: 76ch; margin: 19px 0 0; color: var(--muted); font-size: 16px; }
.days__more a { color: var(--go); font-weight: 850; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.failure { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 52px; align-items: center; margin-top: 96px; padding: 32px; border: 1px solid #efd6cc; border-radius: 24px; background: #fff1e9; }
.failure__shot, .shot button { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: #efe8d8; box-shadow: 0 0 0 1px var(--rule), 0 18px 36px -24px rgb(16 43 75 / .45); cursor: zoom-in; }
.failure__shot img, .shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.failure__text h3 { margin: 0 0 14px; font-size: clamp(26px, 2.6vw, 32px); letter-spacing: -.02em; }
.failure__text p { max-width: 40ch; font-size: 18px; }
.failure__text h3::before { content: ''; display: inline-block; width: 1.05em; height: 1.05em; margin-right: 10px; vertical-align: -.15em; background: url('assets/sprites/warning.svg') center / contain no-repeat; }

/* Modes: the same tiles as the game's title screen. */
.modes-section { padding: 104px 0; background: #eaf3e9; }
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 40px; }
.mode { padding: 4px 32px 8px; border-left: 1px solid #bdd7c4; }
.mode:first-child { padding-left: 0; border-left: 0; }
.mode__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--go-tint); color: var(--go); }
.mode__icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mode--arcade .mode__icon { background: var(--power); color: #fff; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .16); }
.mode--daily .mode__icon { background: #e0f3ff; color: #197bb8; }
.mode--arcade .mode__icon svg { fill: currentColor; stroke: none; }
.mode--daily .mode__icon circle { fill: currentColor; stroke: none; }
.mode h3 { margin: 18px 0 8px; font-size: 24px; }
.mode p { max-width: 34ch; margin: 0; }

/* Screenshots */
.shots-section { padding: 104px 0; background: #f1f9fc; }
.shots { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px 28px; margin-top: 40px; }
.shot { margin: 0; }
.shot--large { grid-row: span 2; }
.shot figcaption { max-width: 60ch; margin-top: 10px; color: var(--muted); font-size: 15px; line-height: 1.45; }

/* Questions */
.leaderboard-page { min-height: 100svh; background: #faf5ea; }
.leaderboard-page__main { max-width: 860px; padding-top: 156px; padding-bottom: 80px; }
.leaderboard-page__eyebrow { margin-bottom: 8px; color: #2f7a4c; font-size: 13px; font-weight: 900; letter-spacing: .1em; }
.leaderboard-page h1 { margin-bottom: 12px; font-size: clamp(36px, 6vw, 60px); line-height: 1.05; }
.leaderboard-page__main > p { max-width: 62ch; }
.leaderboard-page__reset { margin: 24px 0; padding: 12px 16px; border-left: 4px solid #4cb96c; background: #e8f2ee; }
.leaderboard-page__reset strong { font-variant-numeric: tabular-nums; }
.leaderboard-page__empty { margin: 35px 0; padding: 30px; border: 1px solid #dce5e2; border-radius: 16px; background: white; text-align: center; }
.leaderboard-page__table { width: 100%; margin: 28px 0; border-collapse: collapse; background: white; font-variant-numeric: tabular-nums; }
.leaderboard-page__table th, .leaderboard-page__table td { padding: 14px; border-bottom: 1px solid #dce5e2; text-align: left; }
.leaderboard-page__table thead { color: #526f82; font-size: 13px; }
.leaderboard-page__table tbody tr:first-child { background: #f8efd8; }
.leaderboard-page__table tbody th { font-weight: 850; }
.leaderboard-page__fine { color: #526f82; font-size: 14px; }
@media (max-width: 520px) { .leaderboard-page__table th, .leaderboard-page__table td { padding: 10px 6px; font-size: 13px; } }

/* Unlockables use the actual 6 x 5 sprite sheets from the game. */
.unlockables-page { background: var(--paper); }
.unlock-eyebrow { margin: 0 0 12px; color: #29754b; font-size: 13px; font-weight: 950; letter-spacing: .11em; }
.unlock-hero { padding: 165px 0 88px; overflow: hidden; background: #f4eddc; }
.unlock-hero__layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); align-items: center; gap: clamp(36px, 5vw, 80px); }
.unlock-hero__copy { padding-bottom: 30px; }
.unlock-hero h1 { max-width: 10ch; margin: 0 0 22px; font-size: clamp(52px, 6.2vw, 84px); font-weight: 950; line-height: .98; letter-spacing: -.055em; text-wrap: balance; }
.unlock-hero__copy > p:not(.unlock-eyebrow) { max-width: 47ch; margin-bottom: 26px; font-size: 19px; line-height: 1.55; }
.unlock-text-link { color: var(--go); font-weight: 900; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.unlock-text-link:hover { color: #17582f; }
.unlock-hero__frame { padding: 14px 14px 4px; border: 1px solid #fffdf7; border-radius: 22px; background: #fffefa; box-shadow: 0 24px 48px -28px rgb(16 43 75 / .36); transform: rotate(1.5deg); }
.unlock-hero__frame p { margin: 7px 6px 2px; color: var(--muted); font-size: 14px; font-weight: 750; }
.theme-scene { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 13px; background: radial-gradient(circle at 85% 18%, #fbf4cf 0 7%, transparent 7.2%), linear-gradient(160deg, #dcf0de, #b9dabc); isolation: isolate; }
.theme-scene::before { position: absolute; top: 63%; left: -8%; width: 122%; height: 25%; border-top: 3px solid #c7b997; border-bottom: 3px solid #c7b997; background: #e9dfc4; content: ''; transform: rotate(-9deg); }
.theme-scene::after { position: absolute; top: -30%; right: 7%; width: 17%; height: 165%; border-inline: 3px solid #88c9db; background: #addded; content: ''; transform: rotate(13deg); }
.theme-sprite { position: absolute; z-index: 1; width: 25%; aspect-ratio: 1; background-image: var(--theme-atlas); background-repeat: no-repeat; background-size: 600% 500%; filter: drop-shadow(0 5px 2px rgb(43 69 55 / .15)); }
.theme-sprite--house { top: 19%; left: 4%; background-position: 0 0; }
.theme-sprite--apartment { top: 5%; left: 23%; background-position: 20% 0; }
.theme-sprite--hub { top: 34%; left: 39%; background-position: 40% 25%; }
.theme-sprite--power { top: 9%; left: 56%; background-position: 60% 25%; }
.theme-sprite--tree { top: 35%; left: 75%; background-position: 40% 50%; }
.unlock-section { padding-top: 104px; padding-bottom: 110px; }
.unlock-section__heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; gap: 48px; margin-bottom: 38px; }
.unlock-section__heading h2 { margin-bottom: 0; }
.unlock-section__heading > p { max-width: 53ch; margin: 0; }
.unlock-theme-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 36px; margin: 0; padding: 0; list-style: none; }
.unlock-theme { min-width: 0; padding: 18px 0 27px; border-top: 1px solid #cbdccf; }
.unlock-theme__top { margin-bottom: 13px; }
.unlock-theme__index { color: #277547; font-size: 15px; font-weight: 950; font-variant-numeric: tabular-nums; }
.unlock-theme h3 { margin: 12px 0 0; font-size: clamp(22px, 2.1vw, 29px); }
.unlock-theme:nth-child(3n + 2) .theme-scene { background: radial-gradient(circle at 85% 18%, #fff6d9 0 7%, transparent 7.2%), linear-gradient(160deg, #d9e9ef, #d0dcc4); }
.unlock-theme:nth-child(3n + 3) .theme-scene { background: radial-gradient(circle at 85% 18%, #fff6d9 0 7%, transparent 7.2%), linear-gradient(160deg, #f3e4cc, #d4e9ce); }
.unlock-prize { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: 30px; align-items: center; overflow: hidden; margin-top: 50px; padding: 26px; border-radius: 22px; background: #e5eced; }
.unlock-prize__copy { padding: clamp(12px, 2vw, 34px); }
.unlock-prize h3 { margin: 0 0 16px; font-size: clamp(32px, 3.5vw, 48px); line-height: 1.05; }
.unlock-prize p:not(.unlock-eyebrow) { max-width: 42ch; }
.theme-scene--prize { min-height: 290px; background: radial-gradient(circle at 85% 18%, #f9e4aa 0 7%, transparent 7.2%), linear-gradient(160deg, #d5e2e9, #b8d2bb); }
.unlock-lines { padding: 100px 0 110px; background: #eaf3f0; }
.unlock-line-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.unlock-line { min-width: 0; padding-top: 17px; border-top: 2px solid var(--line-colour); }
.unlock-line__illustration { position: relative; height: 158px; overflow: hidden; border-radius: 13px; background: #f8f7ec; }
.unlock-line__illustration svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.unlock-line__illustration svg path { fill: none; stroke: var(--line-colour); stroke-linecap: round; stroke-linejoin: round; stroke-width: 7; }
.unlock-line__illustration svg circle { fill: var(--line-colour); }
.unlock-line__illustration img { position: absolute; width: 18%; height: auto; }
.unlock-line__hub { top: 30%; left: 9%; }
.unlock-line__house { top: 2%; right: 13%; }
.unlock-line__plant { right: 9%; bottom: 1%; }
.unlock-line__caption { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 14px; margin-top: 13px; }
.unlock-line h3 { margin: 0; font-size: 23px; }
.unlock-run { padding-bottom: 120px; }
.unlock-concessions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.unlock-concession { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid #cbdccf; }
.unlock-concession img { flex: none; width: 72px; height: 72px; }
.unlock-concession h3 { margin: 0 0 4px; font-size: 20px; }
.unlock-concession p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.4; }

/* Questions */
.faq-section { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 48px; padding: 96px 0 112px; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq details:first-child { border-top: 1px solid var(--rule); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; color: var(--ink); font-size: 19px; font-weight: 820; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 10px; height: 10px; margin-right: 6px; border-right: 2.5px solid var(--go); border-bottom: 2.5px solid var(--go); transform: translateY(-3px) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq summary:hover { color: var(--go); }
.faq details p { max-width: 60ch; margin: -6px 0 22px; }

/* Sign-up over the title-screen valley, which follows the season like the game does. */
.notify-section { position: relative; overflow: hidden; padding: 84px 0 300px; background: #fbeacb; }
.notify-section__art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.notify-section::before { content: ''; position: absolute; inset: 0 0 auto; z-index: 1; height: 90px; background: linear-gradient(var(--paper), rgb(250 245 234 / 0)); }
.notify-section__inner { position: relative; z-index: 2; }
.notify-card { width: min(100%, 600px); padding: 36px 38px 30px; border: 1px solid rgb(255 255 255 / .8); border-radius: 22px; background: rgb(255 253 249 / .95); box-shadow: 0 24px 50px -30px rgb(16 43 75 / .45); }
.notify-card h2 { font-size: clamp(28px, 2.8vw, 34px); }
.notify-section { scroll-margin-top: 130px; }
.notify-card > p { margin-bottom: 22px; }
.notify-form { display: grid; gap: 10px; }
.notify-form[hidden] { display: none; }
.notify-card[data-tester-complete] .form-status { margin-top: 22px; padding: 18px 20px; font-size: 17px; line-height: 1.5; }
.notify-form > label:first-child { color: var(--ink); font-size: 15px; font-weight: 820; }
.notify-form__row { display: flex; gap: 10px; }
.notify-form__row input { flex: 1; min-width: 0; min-height: 50px; padding: 0 16px; border: 1.5px solid #cdc3ad; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 650; }
.notify-form__row input::placeholder { color: #7d8c97; }
.notify-form__row input:focus-visible { outline-offset: 1px; border-color: var(--focus); }
.consent { display: flex; align-items: flex-start; gap: 10px; margin-top: 6px; font-size: 15px; line-height: 1.45; cursor: pointer; }
.consent input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--go); }
.form-fine { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.form-fine a { color: var(--ink); font-weight: 800; text-underline-offset: 3px; }
.form-status { margin: 4px 0 0; padding: 11px 14px; border-radius: 10px; background: var(--go-tint); color: #1d633c; font-weight: 750; }
.form-status[data-type='error'] { background: #fbebe6; color: var(--alert); }
.form-status[hidden] { display: none; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.site-footer { padding: 26px 0; background: var(--ink); color: #d9e4ec; font-size: 15px; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.site-footer a { color: #fff; text-underline-offset: 3px; }
.site-footer__brand { display: flex; align-items: center; gap: 10px; margin: 0; }
.site-footer__brand img { padding: 3px; border-radius: 8px; background: var(--paper); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.site-footer__copy { margin: 0; color: #9db2c2; }
.site-footer :focus-visible { outline-color: #8cc8ff; }

/* Screenshot viewer */
.gallery-dialog { width: min(100% - 32px, 1100px); max-height: calc(100svh - 32px); padding: 0; border: 0; border-radius: 20px; background: var(--card); color: var(--text); box-shadow: 0 30px 80px rgb(7 26 43 / .5); }
.gallery-dialog::backdrop { background: rgb(16 43 75 / .72); }
.gallery-dialog__panel { padding: 16px 20px 20px; }
.gallery-dialog__top { display: flex; align-items: center; gap: 12px; }
.gallery-dialog__top h2 { margin: 0; font-size: 18px; letter-spacing: 0; }
.gallery-dialog__top span { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.gallery-dialog__close { display: grid; place-items: center; width: 40px; height: 40px; margin-left: auto; border: 1px solid var(--rule); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 26px; line-height: 1; }
.gallery-dialog figure { margin: 12px 0 0; }
.gallery-dialog figure img { display: block; width: 100%; max-height: calc(100svh - 230px); object-fit: contain; border-radius: 10px; background: #efe8d8; }
.gallery-dialog figcaption { margin-top: 10px; color: var(--muted); font-size: 15px; }
.gallery-dialog__controls { display: flex; justify-content: space-between; margin-top: 14px; }
.gallery-dialog__controls button { min-height: 42px; padding: 0 18px; border: 1px solid #d8ceb8; border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 15px; font-weight: 800; }
.gallery-dialog__controls button:hover { border-color: var(--network); }

/* Confirmation and unsubscribe pages (confirm.php, unsubscribe.php) */
.unsubscribe-page { display: grid; place-items: center; min-height: 100svh; padding: 148px 20px 40px; }
.unsubscribe-card { width: min(100%, 520px); padding: clamp(26px, 5vw, 44px); border: 1px solid var(--rule); border-radius: 22px; background: var(--card); box-shadow: 0 22px 44px -28px rgb(16 43 75 / .4); }
.unsubscribe-card h1 { margin: 0 0 10px; font-size: clamp(28px, 5vw, 38px); line-height: 1.1; letter-spacing: -.025em; }
.unsubscribe-card form { margin: 24px 0; }
.unsubscribe-card a { font-weight: 800; text-underline-offset: 3px; }

/* Gameplay guide: live rules, building upgrades and rare arrivals. */
.gameplay-kicker { margin: 0 0 18px; color: var(--go); font-size: 13px; font-weight: 950; letter-spacing: .14em; line-height: 1.25; text-transform: uppercase; }
.gameplay-hero { overflow: hidden; padding: 166px 0 94px; background: radial-gradient(circle at 72% 28%, #e6efe4 0 8%, transparent 8.2%), linear-gradient(135deg, #f8edd5, #edf1e6 74%); }
.gameplay-hero__layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); align-items: center; gap: clamp(38px, 5vw, 78px); }
.gameplay-hero h1 { max-width: 11ch; margin: 0 0 24px; color: var(--ink); font-size: clamp(50px, 5.6vw, 78px); font-weight: 950; line-height: .99; letter-spacing: -.055em; text-wrap: balance; }
.gameplay-hero__copy > p:not(.gameplay-kicker) { max-width: 46ch; margin-bottom: 28px; font-size: 19px; line-height: 1.55; }
.gameplay-hero__frame { margin: 0; padding: 12px 12px 13px; border: 1px solid #fff; border-radius: 22px; background: var(--card); box-shadow: 0 24px 48px -24px rgb(16 43 75 / .3); transform: rotate(1deg); }
.gameplay-hero__frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 12px; object-fit: contain; }
.gameplay-hero__frame figcaption { margin: 10px 5px 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.gameplay-section-heading { max-width: 680px; }
.gameplay-section-heading > p:last-child { max-width: 59ch; margin: 0; color: var(--muted); font-size: 18px; }
.gameplay-section-heading--wide { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: end; gap: 32px; max-width: none; }
.gameplay-section-heading--wide h2 { max-width: 14ch; }
.gameplay-loop { padding-top: 104px; padding-bottom: 108px; }
.gameplay-loop__steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 52px 0 0; padding: 0; list-style: none; }
.gameplay-loop__steps li { border-top: 2px solid var(--network); padding-top: 17px; }
.gameplay-loop__steps li > span { color: var(--go); font-size: 15px; font-weight: 950; font-variant-numeric: tabular-nums; }
.gameplay-loop__steps h3 { margin: 18px 0 10px; font-size: 25px; }
.gameplay-loop__steps p { max-width: 35ch; color: var(--muted); }
.gameplay-loop__aside { margin-top: 48px; padding: 20px 24px; border-left: 5px solid var(--go); border-radius: 0 14px 14px 0; background: var(--go-tint); }
.gameplay-loop__aside strong { color: var(--ink); }
.gameplay-services { padding: 94px 0 106px; background: #eaf3f0; }
.gameplay-service-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; margin-top: 48px; }
.gameplay-service { padding: 18px 0 15px; border-top: 3px solid var(--service); }
.gameplay-service--power { --service: var(--power); }
.gameplay-service--water { --service: var(--water); }
.gameplay-service--sewage { --service: var(--sewage); }
.gameplay-service img { display: block; margin-bottom: 14px; }
.gameplay-service h3 { margin: 0 0 6px; font-size: 23px; }
.gameplay-service p { max-width: 30ch; margin: 0; color: var(--muted); }
.gameplay-outage { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(36px, 5vw, 74px); align-items: center; margin-top: 72px; }
.gameplay-outage h3 { max-width: 12ch; margin: 0 0 20px; font-size: clamp(30px, 3vw, 42px); line-height: 1.1; }
.gameplay-outage__copy > p:not(.gameplay-kicker) { max-width: 44ch; }
.gameplay-outage figure { margin: 0; padding: 10px; border: 1px solid #fff; border-radius: 18px; background: var(--card); box-shadow: 0 18px 38px -26px rgb(16 43 75 / .24); }
.gameplay-outage img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 10px; object-fit: contain; }
.gameplay-outage figcaption { margin: 8px 5px 2px; color: var(--muted); font-size: 13px; }
.gameplay-upgrades { padding-top: 104px; padding-bottom: 106px; border-top: 1px solid var(--rule); }
.gameplay-upgrades__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 48px; }
.gameplay-upgrade { min-width: 0; padding: 24px; border: 1px solid var(--rule); border-radius: 19px; background: var(--card); }
.gameplay-upgrade__art { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.gameplay-upgrade__art img { display: block; width: 72px; height: 72px; }
.gameplay-upgrade__art span { color: var(--go); font-size: 27px; font-weight: 900; }
.gameplay-upgrade h3 { margin: 0 0 8px; font-size: 24px; }
.gameplay-upgrade p { max-width: 44ch; margin: 0; color: var(--muted); }
.gameplay-upgrades__rule { max-width: 77ch; margin: 26px 0 0; padding: 18px 22px; border-radius: 14px; background: var(--go-tint); }
.gameplay-upgrades__extra { max-width: 76ch; margin: 22px 0 0; color: var(--muted); }
.gameplay-upgrades__extra a { color: var(--go); font-weight: 850; text-underline-offset: 3px; }
.gameplay-rare { padding-top: 104px; padding-bottom: 110px; }
.gameplay-rare__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 48px; }
.gameplay-rare__card { min-width: 0; padding: 22px; border: 1px solid var(--rule); border-radius: 19px; background: var(--card); }
.gameplay-rare__sprite { display: block; flex: none; width: 128px; height: 128px; margin: 0 auto 17px; background: url('assets/rare-buildings/classic.webp') no-repeat 0 0 / 1152px 128px; }
.gameplay-rare__sprite--aquarium { background-position: -128px 0; }
.gameplay-rare__sprite--tower { background-position: -256px 0; }
.gameplay-rare__sprite--church { background-position: -384px 0; }
.gameplay-rare__sprite--data { background-position: -512px 0; }
.gameplay-rare__sprite--warehouse { background-position: -640px 0; }
.gameplay-rare__sprite--stadium { background-position: -768px 0; }
.gameplay-rare__sprite--cabin { background-position: -896px 0; }
.gameplay-rare__sprite--airport { background-position: -1024px 0; }
.gameplay-rare__tag { margin: 0 0 10px; color: var(--go); font-size: 12px; font-weight: 950; letter-spacing: .12em; }
.gameplay-rare__card h3 { margin: 0 0 10px; font-size: 24px; }
.gameplay-rare__card p:last-child { margin: 0; color: var(--muted); }
.gameplay-rare__note { max-width: 66ch; margin: 24px 0 0; color: var(--muted); font-size: 15px; }
.gameplay-looks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 72px; padding: 28px; border-radius: 21px; background: #f1f0e4; }
.gameplay-looks h3 { margin: 0 0 8px; font-size: 27px; }
.gameplay-looks p { max-width: 27ch; margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.gameplay-looks a, .gameplay-closing__actions > a:last-child { color: var(--go); font-weight: 850; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.gameplay-looks figure { min-width: 0; margin: 0; padding: 10px; border: 1px solid #dce2d9; border-radius: 13px; background: var(--card); }
.gameplay-looks img { display: block; width: 100%; height: auto; aspect-ratio: 9 / 1; object-fit: contain; }
.gameplay-looks figcaption { margin-top: 6px; color: var(--muted); font-size: 13px; font-weight: 800; text-align: center; }
.gameplay-closing { padding: 75px 0 85px; background: #e9f0e7; }
.gameplay-closing__inner { display: flex; align-items: end; justify-content: space-between; gap: 35px; }
.gameplay-closing h2 { max-width: 14ch; }
.gameplay-closing__inner p:not(.gameplay-kicker) { max-width: 57ch; margin: 0; }
.gameplay-closing__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; flex: none; }

@media (max-width: 1080px) {
  .site-header { flex-wrap: wrap; gap: 10px 18px; }
  .site-nav { order: 3; width: 100%; margin-left: 0; gap: 22px; overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-header .button { margin-left: auto; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 40px; }
  .leaderboard-page__main { padding-top: 178px; }
  .unlock-hero { padding-top: 178px; }
  .gameplay-hero { padding-top: 190px; }
  .mode { padding-inline: 22px; }
}

@media (max-width: 900px) {
  .hero-stage { background-image: linear-gradient(180deg, #fff6df 0%, #fff5dd 61%, rgb(255 245 221 / 0) 92%), url('assets/cozy-valley-title.webp'); background-position: center, center bottom; background-size: 100% 100%, 100% auto; background-repeat: no-repeat; }
  .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 170px; padding-bottom: 190px; }
  .leaderboard-page__main { padding-top: 170px; }
  .gameplay-hero__layout, .gameplay-outage { grid-template-columns: 1fr; }
  .gameplay-hero__copy { max-width: 710px; }
  .gameplay-hero__frame { max-width: 780px; transform: none; }
  .hero__text { max-width: 640px; }
  .days { grid-template-columns: 1fr; gap: 30px; }
  .days li:not(:last-child)::before { top: 32px; left: 27px; width: 10px; height: calc(100% + 30px); }
  .days li { min-height: 64px; padding-left: 88px; }
  .days__node { position: absolute; left: 0; top: 0; }
  .days h3 { margin-top: 4px; }
  .days p { max-width: 52ch; }
  .failure { grid-template-columns: 1fr; gap: 28px; margin-top: 72px; }
  .faq-section { grid-template-columns: 1fr; gap: 20px; }
  .shots { grid-template-columns: 1fr 1fr; }
  .shot--large { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .shell { width: min(100% - 36px, 1200px); }
  .site-header { top: 12px; width: calc(100% - 24px); padding: 9px 12px; }
  .site-header > .button { display: none; }
  .site-nav { flex-wrap: wrap; gap: 2px 14px; overflow: visible; }
  .site-nav a { font-size: 14px; }
  .site-nav__signup { display: inline; }
  .hero { min-height: 0; padding-top: 154px; padding-bottom: 200px; }
  .unlock-hero { padding: 158px 0 65px; }
  .gameplay-hero { padding: 184px 0 68px; }
  .gameplay-hero h1 { font-size: clamp(48px, 10vw, 68px); }
  .gameplay-section-heading--wide, .gameplay-loop__steps, .gameplay-service-list, .gameplay-upgrades__grid, .gameplay-rare__list { grid-template-columns: 1fr; }
  .gameplay-loop, .gameplay-upgrades, .gameplay-rare { padding-top: 75px; padding-bottom: 80px; }
  .gameplay-services { padding: 75px 0 84px; }
  .gameplay-loop__steps { gap: 18px; margin-top: 38px; }
  .gameplay-loop__steps h3 { margin-top: 8px; }
  .gameplay-service-list { gap: 13px; }
  .gameplay-service { display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; }
  .gameplay-service img { grid-row: span 2; margin: 0; }
  .gameplay-service h3 { margin: 0 0 3px; }
  .gameplay-service p { max-width: none; }
  .gameplay-rare__card { display: flex; align-items: center; gap: 18px; }
  .gameplay-rare__sprite { margin: 0; }
  .gameplay-looks { margin-top: 54px; }
  .gameplay-closing__inner { display: block; }
  .gameplay-closing__actions { margin-top: 28px; }
  .unlock-hero__layout, .unlock-section__heading, .unlock-prize { grid-template-columns: 1fr; }
  .unlock-hero__copy { padding: 0; }
  .unlock-hero__frame { max-width: 660px; transform: none; }
  .unlock-section { padding-top: 72px; padding-bottom: 80px; }
  .unlock-section__heading { gap: 12px; margin-bottom: 30px; }
  .unlock-prize { gap: 14px; }
  .theme-scene--prize { min-height: 0; }
  .unlock-lines { padding: 72px 0 80px; }
  .unlock-line-list, .unlock-concessions { grid-template-columns: 1fr; }
  .unlock-line__illustration { max-width: 500px; }
  .lockup { margin-bottom: 22px; }
  .hero__text > p:not(.hero__lead) { font-size: 17px; }
  .demo__frame { border-radius: 18px; }
  .days-section, .modes-section, .shots-section { padding: 72px 0; }
  .faq-section { padding: 72px 0 84px; }
  .modes { grid-template-columns: 1fr; gap: 0; margin-top: 28px; }
  .mode, .mode:first-child { display: grid; grid-template-columns: 52px 1fr; column-gap: 18px; padding: 22px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .mode__icon { grid-row: span 2; }
  .mode h3 { margin: 2px 0 4px; font-size: 21px; }
  .section-intro--row { display: block; }
  .section-intro--row h2 { margin-bottom: 12px; }
  .shots { grid-template-columns: 1fr; gap: 28px; margin-top: 28px; }
  .notify-section { padding: 56px 0 0; background: var(--paper); }
  .notify-section::before { display: none; }
  .notify-section__art { position: static; display: block; order: 2; width: 100%; height: auto; margin-top: -20px; object-fit: contain; }
  .notify-section { display: flex; flex-direction: column; }
  .notify-card { padding: 26px 22px 22px; }
  .notify-form__row { flex-direction: column; }
  .notify-form__row .button { width: 100%; }
  .site-footer__links { margin-left: 0; }
}

@media (max-width: 520px) {
  .hero { padding-top: 180px; }
  .leaderboard-page__main { padding-top: 180px; }
  .unlock-hero { padding-top: 180px; }
  .gameplay-hero { padding-top: 197px; }
  .gameplay-hero h1 { font-size: clamp(46px, 12vw, 58px); }
  .gameplay-hero__copy > p:not(.gameplay-kicker) { font-size: 17px; }
  .gameplay-rare__card { display: block; }
  .gameplay-rare__sprite { margin: 0 auto 12px; }
  .gameplay-looks { grid-template-columns: 1fr; padding: 18px; }
  .gameplay-looks > div { grid-column: auto; }
  .gameplay-looks figure { width: 100%; }
  .unlock-hero h1 { font-size: clamp(48px, 13vw, 62px); }
  .unlock-theme-list { grid-template-columns: 1fr; }
  .unlock-prize { margin-top: 28px; padding: 16px; }
  .unlock-prize__copy { padding: 14px 10px; }
  .demo__alert { top: auto; bottom: 10px; }
}

@media (max-width: 420px) {
  .wordmark { font-size: 19px; }
  .wordmark img { width: 32px; height: 32px; }
  .site-header .button { padding: 0 12px; font-size: 14px; }
  .demo__alert { gap: 8px; padding-left: 10px; font-size: 12.5px; }
  .demo__alert button { min-height: 30px; padding: 0 8px; font-size: 12.5px; }
  .demo__short { display: none; }
  .demo figcaption { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .demo__lines line.is-drawing { stroke-dasharray: none; stroke-dashoffset: 0; }
}
