/* OMG Brain website (omgbrain.com).
 * Big rounded cards and pastel tiles per skill, in the warm, calm palette of the
 * "What you train" section after brainimpulse.me (AISD-729), now site-wide. The
 * brand colour is the app icon's blue on its navy field (AISD-746), the same
 * values as the app's buttons (lightPrimary / darkPrimary in
 * lib/app/theme/tokens.dart). Copy and legal structure come from the AISD-707 draft.
 */
:root {
	--ink: #3d4652;
	--muted: #6b6560;
	--line: #ebe3d8;
	--bg: #fffdf9;
	--bg-soft: #fbf7f2;
	--surface: #ffffff;
	--brand: #1f66f0;
	--brand-strong: #1650c4;
	--brand-ink: #ffffff;
	--brand-soft: #e8efff;
	--brand-navy: #11204a;
	--hero-from: #dbe6ff;
	--hero-to: #fbf7f2;
	--sun: #ddaa4c;
	--focus-ring: #1f66f0;
	--shadow: 0 18px 40px -22px rgba(61, 70, 82, 0.22);

	/* Legacy per-skill tokens now follow the calm "What you train" palette:
	 * the ink tones are used for text and icons, --dot (on .t-*) for decorative fills. */
	--memory: var(--care-memory-ink);
	--memory-soft: var(--care-memory-soft);
	--focus: var(--care-attention-ink);
	--focus-soft: var(--care-attention-soft);
	--speed: var(--care-relax-ink);
	--speed-soft: var(--care-relax-soft);
	--flex: var(--care-mind-ink);
	--flex-soft: var(--care-mind-soft);
	--logic: var(--care-solve-ink);
	--logic-soft: var(--care-solve-soft);
	--logic-ink: var(--care-solve-ink);

	/* "What you train" (AISD-729): warm, calm palette; the site tokens above derive from it. */
	--care-bg: #fbf7f2;
	--care-text: #3d4652;
	--care-muted: #6b6560;
	--care-accent: #b4501c;
	--care-relax: #7fa38a;
	--care-relax-ink: #3f6b4c;
	--care-relax-soft: #eef4ec;
	--care-attention: #e39a6f;
	--care-attention-ink: #9c4a24;
	--care-attention-soft: #fceee4;
	--care-memory: #a48bc4;
	--care-memory-ink: #664a86;
	--care-memory-soft: #f3eef8;
	--care-mind: #de8f9b;
	--care-mind-ink: #9a3f55;
	--care-mind-soft: #fbecef;
	--care-focus: #6fa8a0;
	--care-focus-ink: #2f6b63;
	--care-focus-soft: #e8f3f1;
	--care-solve: #ddaa4c;
	--care-solve-ink: #82580e;
	--care-solve-soft: #fbf2df;

	--display: 'Nunito', ui-rounded, system-ui, sans-serif;
	--body: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--radius-lg: 32px;
	--radius: 24px;
	--radius-sm: 18px;
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme='light']) {
		--ink: #efe9e2;
		--muted: #b5ada4;
		--line: #33393b;
		--bg: #15191b;
		--bg-soft: #1b2022;
		--surface: #212729;
		--brand: #8ab8ff;
		--brand-strong: #b3d0ff;
		--brand-ink: #0b1a3d;
		--brand-soft: #182a52;
		--hero-from: #142449;
		--hero-to: #15191b;
		--focus-ring: #8ab8ff;
		--shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.6);
		--care-bg: var(--bg);
		--care-text: var(--ink);
		--care-muted: var(--muted);
		--care-accent: #f3a66f;
		--care-relax-ink: var(--care-relax);
		--care-relax-soft: #1e2a22;
		--care-attention-ink: var(--care-attention);
		--care-attention-soft: #33231a;
		--care-memory-ink: var(--care-memory);
		--care-memory-soft: #28213a;
		--care-mind-ink: var(--care-mind);
		--care-mind-soft: #34202a;
		--care-focus-ink: var(--care-focus);
		--care-focus-soft: #1a2b29;
		--care-solve-ink: var(--care-solve);
		--care-solve-soft: #322815;
		color-scheme: dark;
	}
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--body);
	font-size: 17px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--display); font-weight: 900; line-height: 1.12; margin: 0; text-wrap: balance; }
p { margin: 0; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--brand); color: var(--brand-ink); padding: 10px 16px; border-radius: 12px; z-index: 50; }
.skip:focus { top: 12px; }
.wrap { max-width: 1160px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)) max(16px, env(safe-area-inset-right, 0px)); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; border-radius: 999px; font-family: var(--display); font-weight: 800; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; transition: transform 0.15s ease, background 0.15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { background: var(--brand-soft); color: var(--brand); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.store { display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 20px 8px 16px; border-radius: 16px; background: #000; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 19px; line-height: 1.05; border: 1px solid rgba(255, 255, 255, 0.2); }
.store small { display: block; font-weight: 700; font-size: 11px; opacity: 0.8; }
.store-icon { width: 26px; height: 26px; flex-shrink: 0; }
.stores { display: inline-flex; flex-wrap: wrap; gap: 12px; }
[data-placeholder-link] { cursor: not-allowed; }

/* Header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.top.scrolled { border-bottom-color: var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 900; font-size: 21px; }
.logo-img { height: 36px; width: auto; display: block; }
.links { display: flex; align-items: center; gap: 4px; }
.links a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 16px; padding: 8px 14px; border-radius: 12px; opacity: 0.82; }
.links a:not(.btn):hover, .links a[aria-current='page'] { opacity: 1; background: var(--brand-soft); color: var(--brand); }
.links .btn { margin-left: 10px; }
.menu-toggle { display: none; width: 44px; height: 44px; border: 0; border-radius: 12px; background: var(--brand-soft); cursor: pointer; place-items: center; }
.burger, .burger::before, .burger::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); position: relative; }
.burger::before, .burger::after { content: ''; position: absolute; left: 0; }
.burger::before { top: -6px; }
.burger::after { top: 6px; }

/* Hero */
.hero { background: linear-gradient(180deg, var(--hero-from) 0%, var(--hero-to) 78%, var(--bg) 100%); padding-block: 48px 96px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero .lead { font-size: 20px; color: var(--muted); max-width: 36ch; margin: 20px 0 30px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.hero-proof { display: flex; gap: 28px; margin-top: 36px; flex-wrap: wrap; }
.hero-proof b { display: block; font-family: var(--display); font-size: 28px; font-weight: 900; }
.hero-proof span { color: var(--muted); font-size: 15px; }

/* Phone mockup of the app's Today screen, in the app's own light colours
 * (lib/app/theme/tokens.dart, brand_palette.dart) in both site themes. */
.phone { position: relative; width: 290px; aspect-ratio: 9 / 19; border-radius: 46px; background: #1a1440; padding: 12px; box-shadow: 0 40px 80px -30px rgba(17, 32, 74, 0.55); z-index: 1; }
.phone::before { content: ''; position: absolute; top: 22px; left: 50%; translate: -50% 0; width: 86px; height: 24px; border-radius: 999px; background: #1a1440; z-index: 2; }
.phone-stage { position: relative; display: grid; place-items: center; min-height: 560px; }
.screen { --app-blue: #1f66f0; --app-outline: #c8d0f0; --app-ink: #1a1440; --app-muted: #5b5478; height: 100%; border-radius: 36px; background: #ffffff; padding: 50px 14px 14px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; color: var(--app-ink); }
.screen-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; font-family: var(--display); font-weight: 900; font-size: 18px; }
.streak-pill { justify-self: start; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px 3px 8px; border: 1.5px solid var(--app-outline); border-radius: 999px; font-size: 12px; }
.streak-pill svg { width: 12px; height: 12px; fill: #ff7a3d; }
.gear { justify-self: end; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.screen-greeting { font-size: 11px; line-height: 1.35; color: var(--app-muted); text-align: center; }
.screen-title { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-size: 14px; font-weight: 900; margin-top: 2px; }
.screen-title small { font-size: 11px; font-weight: 700; color: var(--app-muted); }
/* Mirrors the app's Today program (lib/core/ui/program_item.dart): a timeline marker per game, done / next / later. */
.program { list-style: none; margin: 0; padding: 0; display: grid; }
.program li { position: relative; padding: 0 0 8px 26px; }
.program li:last-child { padding-bottom: 0; }
.program li::before { content: ''; position: absolute; left: 0; top: 20px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--app-outline); background: #ffffff; box-sizing: border-box; z-index: 1; }
.program li:not(:last-child)::after { content: ''; position: absolute; left: 8px; top: 38px; bottom: -20px; width: 2px; background: var(--app-outline); }
.program li.done::before { background: var(--app-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; border-color: var(--app-blue); }
.program li.done::after { background: var(--app-blue); }
.program li.next::before { border-color: var(--app-blue); }
.step-card { display: flex; align-items: center; gap: 8px; background: #fff; border: 1.5px solid var(--app-outline); border-radius: 14px; padding: 6px 6px 6px 10px; }
.program li.done .step-card, .program li.next .step-card { border-color: var(--app-blue); }
.step-card > span { flex: 1; min-width: 0; display: grid; }
.step-card b { font-family: var(--display); font-size: 13px; font-weight: 900; line-height: 1.25; }
.step-card small { font-size: 8.5px; font-weight: 700; letter-spacing: 0.06em; white-space: nowrap; text-transform: uppercase; color: var(--app-muted); }
.step-card .mock-art { width: 72px; height: 48px; border-radius: 8px; flex-shrink: 0; }
/* The app's game art (lib/core/ui/game_art.dart): the site's card art in
 * miniature on the app's category panels, which are darker than the site's
 * soft tints; fixed light colours, as on the rest of the screen. */
.mock-art { display: grid; place-items: center; background: var(--soft); }
.mock-art .art { display: grid; width: 46%; aspect-ratio: 1; gap: 2px; }
.mock-art .art-words { gap: 1px; font-size: 10px; }
.mock-art .art-grid i { border-radius: 2px; }
.mock-art .art-arrows { font-size: 10px; }
.m-attention { --dot: #e39a6f; --c: #9c4a24; --soft: #f5dccd; }
.m-memory { --dot: #a48bc4; --c: #664a86; --soft: #dfd6ea; }
.m-solve { --dot: #ddaa4c; --c: #82580e; --soft: #f3e1c0; }
/* "Game of the day" card, cut off by the pinned button as in the app. */
.screen-daily { flex: 1; min-height: 0; border: 1.5px solid var(--app-outline); border-bottom: 0; border-radius: 18px 18px 0 0; overflow: hidden; margin-bottom: -10px; }
.screen-daily .art { width: 30%; gap: 4px; }
.screen-daily .art-words { font-size: 22px; }
.screen-btn { position: relative; display: grid; place-items: center; min-height: 40px; border-radius: 14px; background: var(--app-blue); color: #fff; font-family: var(--display); font-weight: 800; font-size: 13px; }
.floater { position: absolute; border-radius: 22px; box-shadow: var(--shadow); animation: float 6s ease-in-out infinite; }
.floater.f1 { width: 92px; height: 92px; background: var(--care-attention); top: 40px; left: 6%; rotate: -10deg; }
.floater.f2 { width: 70px; height: 70px; background: var(--care-relax); border-radius: 50%; bottom: 70px; left: 2%; animation-delay: -2s; }
.floater.f3 { width: 84px; height: 84px; background: var(--care-memory); top: 90px; right: 4%; rotate: 12deg; animation-delay: -4s; }
.floater.f4 { width: 58px; height: 58px; background: var(--care-solve); border-radius: 50%; bottom: 40px; right: 10%; animation-delay: -1s; }
@keyframes float { 50% { translate: 0 -14px; } }

/* Sections */
.section { padding-block: 88px; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.eyebrow { display: inline-block; font-family: var(--display); font-weight: 900; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand); margin-bottom: 10px; }
.section h2 { font-size: clamp(32px, 4.4vw, 50px); }
.section-head p { color: var(--muted); font-size: 19px; margin-top: 16px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.split .copy-block h2 { margin-bottom: 18px; }
.split .copy-block p { color: var(--muted); font-size: 18px; margin-bottom: 14px; }
.check-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.check-list li::before { content: ''; flex-shrink: 0; width: 24px; height: 24px; border-radius: 50%; margin-top: 2px; background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3 3 7-7' fill='none' stroke='%231f66f0' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.report h3 { font-size: 20px; }
.report .sub { color: var(--muted); font-size: 14px; margin: 2px 0 22px; }
.bar-row { display: grid; grid-template-columns: 96px minmax(0, 1fr) 48px; gap: 12px; align-items: center; margin-bottom: 14px; font-weight: 700; font-size: 15px; }
.bar-row .track { height: 12px; border-radius: 99px; background: var(--bg-soft); overflow: hidden; }
.bar-row .track i { display: block; height: 100%; border-radius: inherit; width: var(--w); background: var(--dot, var(--c)); }
.bar-row output { text-align: right; font-family: var(--display); font-weight: 900; }
.report .placeholder-note { margin-top: 18px; }

/* Skills */
/* The five skill cards get a wider row than the 1160px content column, so their copy is not squeezed. */
.wrap-wide { max-width: 1400px; }
.skills { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1180px) { .skills { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.section.calm { background: var(--care-bg); color: var(--care-text); }
.calm .eyebrow { color: var(--brand); }
.calm .section-head p { color: var(--care-muted); }
.skill { border-radius: 28px; padding: 24px 22px; display: flex; flex-direction: column; gap: 14px; background: var(--soft); border: 1px solid color-mix(in srgb, var(--dot) 35%, transparent); }
.skill-head { display: flex; align-items: center; gap: 14px; }
.skill .dot { width: 44px; height: 44px; border-radius: 50%; background: var(--dot); flex-shrink: 0; }
.skill h3 { font-size: 22px; color: var(--c); }
.skill-why { color: var(--care-text); font-size: 16px; line-height: 1.55; flex: 1; }
.skill-games { font-size: 15px; font-weight: 700; color: var(--c); border-top: 1px solid color-mix(in srgb, var(--dot) 30%, transparent); padding-top: 14px; }
.skill-games span { display: block; color: var(--care-muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 2px; }
.skill-games a { color: var(--c); text-decoration: none; }
.skill-games a:hover { text-decoration: underline; }

/* Tests */
.tests { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.test { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 22px; align-items: center; }
.test-art { aspect-ratio: 1; border-radius: var(--radius-sm); background: var(--soft); display: grid; place-items: center; }
.test-art svg { width: 64px; height: 64px; color: var(--c); }
.test h3 { font-size: 22px; margin-bottom: 6px; }
.test p { color: var(--muted); font-size: 16px; }
.meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 4px 11px; border-radius: 999px; background: var(--bg-soft); color: var(--muted); }
.chip.skill-chip { background: var(--soft); color: var(--c); }
.chip.soon-chip { background: var(--brand); color: var(--brand-ink); }
.game-art .tag.tag-end { left: auto; right: 14px; }
.game-hero .soon-chip { margin-left: 8px; }

/* Games */
.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.game { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.game:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.game-art { aspect-ratio: 16 / 10; background: var(--soft); position: relative; display: grid; place-items: center; overflow: hidden; }
.game-art .art { width: 46%; aspect-ratio: 1; display: grid; gap: 8px; }
.game-art .tag { position: absolute; top: 14px; left: 14px; }
.game-body { padding: 20px 22px 24px; }
.game-body h3 { font-size: 21px; margin-bottom: 6px; }
.game-body p { color: var(--muted); font-size: 15px; }
.game[hidden] { display: none; }
.filters { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: -16px 0 32px; }
.filter { --c: var(--brand); --soft: var(--brand-soft); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 15px; padding: 8px 18px; border-radius: 999px; cursor: pointer; }
.filter:hover { border-color: var(--c); color: var(--c); }
.filter[aria-pressed='true'] { background: var(--c); border-color: var(--c); color: var(--bg); }

/* Placeholder game artwork, drawn in CSS so no image assets are needed yet. */
.art-grid { grid-template-columns: repeat(3, 1fr); }
.art-grid i { border-radius: 10px; background: color-mix(in srgb, var(--dot, var(--c)) 30%, transparent); }
.art-grid i.on { background: var(--dot, var(--c)); }
.art-words { place-items: center; font-family: var(--display); font-weight: 900; font-size: 30px; line-height: 1; text-align: center; }
.art-arrows { grid-template-columns: repeat(3, 1fr); place-items: center; font-size: 34px; font-weight: 900; color: var(--c); }
.art-arrows i { font-style: normal; opacity: 0.35; }
.art-arrows i.on { opacity: 1; }
.art-grid i.odd { opacity: 0.55; }
.art-sum { place-items: center; align-content: center; gap: 14px; width: 70% !important; aspect-ratio: auto !important; }
.art-sum b { font-family: var(--display); font-size: 34px; font-weight: 900; color: var(--c); }
.art-sum span { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.art-sum i { font-style: normal; background: var(--surface); color: var(--c); display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 22px; height: 48px; box-shadow: 0 6px 14px -8px rgba(61, 70, 82, 0.5); border-radius: 14px; }
.art-sum i.on { background: var(--c); color: #fff; }

/* App banner */
.banner { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: linear-gradient(120deg, var(--brand-navy) 0%, #183c9e 55%, #1f66f0 100%); color: #fff; padding: 56px; display: grid; grid-template-columns: minmax(0, 1.4fr) auto; gap: 40px; align-items: center; }
.banner .eyebrow { color: #cfe0ff; }
.banner h2 { font-size: clamp(34px, 4.6vw, 54px); }
.banner p { opacity: 0.88; font-size: 19px; margin: 14px 0 28px; }
.qr { width: 168px; aspect-ratio: 1; border-radius: 22px; background: #fff; padding: 14px; display: grid; place-items: center; color: #3d4652; text-align: center; font-family: var(--display); font-weight: 800; font-size: 13px; }
.qr-code { width: 100%; height: 100%; border-radius: 8px; background:
	conic-gradient(from 90deg at 3px 3px, #3d4652 25%, transparent 0) 0 0 / 14px 14px,
	#fff; opacity: 0.85; display: grid; place-items: center; }
.qr-code span { background: #fff; padding: 4px 8px; border-radius: 6px; }
.banner::after { content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%; right: -90px; bottom: -150px; background: rgba(255, 255, 255, 0.08); }

/* Benefits */
.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.benefit { text-align: left; }
.benefit .icon { width: 56px; height: 56px; border-radius: 18px; background: var(--soft); color: var(--c); display: grid; place-items: center; margin-bottom: 18px; }
.benefit .icon svg { width: 28px; height: 28px; }
.benefit h3 { font-size: 21px; margin-bottom: 8px; }
.benefit p { color: var(--muted); font-size: 16px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 64px; }
.step::before { counter-increment: step; content: counter(step); position: absolute; top: 0; left: 0; width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-family: var(--display); font-weight: 900; font-size: 20px; }
.step h3 { font-size: 21px; margin-bottom: 8px; }
.step p { color: var(--muted); }

/* FAQ */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 12px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 24px; }
details[open] { box-shadow: var(--shadow); }
summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-family: var(--display); font-weight: 800; font-size: 18px; padding: 20px 0; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 22px; font-weight: 700; transition: rotate 0.2s; }
details[open] summary::after { rotate: 45deg; }
details > p, details > div { padding-bottom: 20px; color: var(--muted); }

.disclaimer { text-align: center; color: var(--muted); font-size: 14px; max-width: 70ch; margin: 40px auto 0; }

/* Legal and support pages */
.page-hero { background: linear-gradient(180deg, var(--brand-soft) 0%, var(--bg) 100%); padding-block: 56px 24px; }
.page-hero h1 { font-size: clamp(34px, 5vw, 52px); }
.page-hero .meta { color: var(--muted); margin-top: 12px; max-width: 64ch; }
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-block: 32px 88px; align-items: start; }
.toc { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.toc a { color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 10px; font-weight: 700; }
.toc a:hover, .toc a.active { background: var(--brand-soft); color: var(--brand); }
.prose { max-width: 70ch; min-width: 0; }
.prose h2 { font-size: 24px; margin: 40px 0 10px; }
.prose h2:first-child { margin-top: 0; }
/* Terms number their sections with a counter, so a section hidden by a build flag leaves no gap. */
.prose.numbered { counter-reset: section; }
.prose.numbered h2::before { counter-increment: section; content: counter(section) '. '; }
.prose p { margin: 0 0 14px; }
.prose ul { padding-left: 22px; margin: 0 0 14px; }
.prose li { margin-bottom: 6px; }
.callout { background: var(--brand-soft); border-radius: var(--radius-sm); padding: 18px 20px; margin: 20px 0; font-size: 16px; }
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); margin: 16px 0; }
table { border-collapse: collapse; width: 100%; min-width: 520px; font-size: 15px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--display); font-weight: 800; background: var(--bg-soft); }
tr:last-child td { border-bottom: 0; }
.note { color: var(--muted); font-size: 14px; }
.copy { display: inline-flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 8px 8px 8px 16px; font-weight: 700; margin: 6px 0 10px; max-width: 100%; }
.copy span { overflow-wrap: anywhere; }
.copy button { border: 0; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font: inherit; font-size: 14px; padding: 6px 14px; cursor: pointer; }
.contact-page { padding-block: 32px 88px; }
.contacts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.contact { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.contact h2 { font-size: 24px; }
.contact p { color: var(--muted); font-size: 16px; flex: 1; }
.contact .copy { margin: 0; }
.contact-more { text-align: center; color: var(--muted); margin-top: 40px; }
.not-found { text-align: center; padding-block: 120px; }
.not-found h1 { font-size: clamp(40px, 6vw, 64px); margin-bottom: 16px; }
.not-found p { color: var(--muted); margin-bottom: 28px; }

/* Footer */
.foot-wrap { background: var(--bg-soft); border-top: 1px solid var(--line); padding-top: 48px; font-size: 15px; color: var(--muted); }
.foot { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.foot a:not(.logo) { display: block; color: var(--muted); text-decoration: none; padding: 4px 0; }
.foot a:not(.logo):hover { color: var(--brand); }
.foot b { display: block; color: var(--ink); font-family: var(--display); font-size: 16px; margin-bottom: 8px; }
.foot-note { margin-top: 12px; max-width: 40ch; }
.copyright { border-top: 1px solid var(--line); margin-top: 40px; padding-block: 20px; font-size: 14px; }

/* Responsive */
@media (max-width: 960px) {
	.hero-grid, .split, .doc, .banner, .contacts { grid-template-columns: 1fr; }
	.phone-stage { min-height: 520px; }
	.skills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.games, .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tests { grid-template-columns: 1fr; }
	.toc { position: static; flex-direction: row; flex-wrap: wrap; }
	.banner { padding: 40px 28px; }
	.qr { display: none; }
}
@media (max-width: 760px) {
	.menu-toggle { display: grid; }
	.links { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--line); }
	.links.open { display: flex; }
	.links .btn { margin: 8px 0 0; }
	.section { padding-block: 64px; }
	.games, .benefits, .steps, .foot { grid-template-columns: 1fr; }
	.test { grid-template-columns: 88px minmax(0, 1fr); gap: 16px; }
	.hero { padding-bottom: 64px; }
	.phone { width: 250px; }
	.floater.f1, .floater.f3 { width: 64px; height: 64px; }
}
@media (max-width: 480px) {
	.skill { padding: 20px 16px; gap: 12px; }
	.skill-head { flex-direction: column; align-items: flex-start; gap: 10px; }
	.skill .dot { width: 32px; height: 32px; }
	.skill h3 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Skill colour themes: set --c (accent) and --soft (tile background). */
.t-memory { --c: var(--memory); --soft: var(--memory-soft); --dot: var(--care-memory); }
.t-focus { --c: var(--focus); --soft: var(--focus-soft); --dot: var(--care-attention); }
.t-speed { --c: var(--speed); --soft: var(--speed-soft); --dot: var(--care-relax); }
.t-flex { --c: var(--flex); --soft: var(--flex-soft); --dot: var(--care-mind); }
.t-logic { --c: var(--logic); --soft: var(--logic-soft); --dot: var(--care-solve); }
.t-brand { --c: var(--brand); --soft: var(--brand-soft); }

/* "What you train" themes: --dot (decorative), --c (text ink), --soft (card). */
.c-relax { --dot: var(--care-relax); --c: var(--care-relax-ink); --soft: var(--care-relax-soft); }
.c-attention { --dot: var(--care-attention); --c: var(--care-attention-ink); --soft: var(--care-attention-soft); }
.c-memory { --dot: var(--care-memory); --c: var(--care-memory-ink); --soft: var(--care-memory-soft); }
.c-mind { --dot: var(--care-mind); --c: var(--care-mind-ink); --soft: var(--care-mind-soft); }
.c-focus { --dot: var(--care-focus); --c: var(--care-focus-ink); --soft: var(--care-focus-soft); }
.c-solve { --dot: var(--care-solve); --c: var(--care-solve-ink); --soft: var(--care-solve-soft); }
.game-art .tag { background: var(--surface); box-shadow: 0 4px 12px -6px rgba(61, 70, 82, 0.35); }
.game-art .tag.soon-chip { background: var(--brand); color: var(--brand-ink); }
.art-words { gap: 6px; }

/* Clickable game cards */
a.game { color: inherit; text-decoration: none; }
a.game:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; border-radius: var(--radius); }
a.game:hover .game-body h3 { color: var(--c); }
.game-body { display: flex; flex-direction: column; flex: 1; }
.game-body .meta-row { margin-bottom: 16px; }
.game-more { margin-top: auto; font-family: var(--display); font-weight: 800; font-size: 15px; color: var(--c); }
.game-more span { display: inline-block; transition: translate 0.15s ease; }
a.game:hover .game-more span { translate: 4px 0; }

/* Game page */
.game-hero { background: linear-gradient(180deg, var(--soft) 0%, var(--bg) 100%); padding-block: 28px 64px; }
.crumbs { display: flex; gap: 10px; align-items: center; font-size: 15px; font-weight: 700; color: var(--muted); margin-bottom: 32px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand); }
.crumbs [aria-current] { color: var(--ink); }
.game-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.game-hero .skill-chip { background: var(--surface); }
.game-hero h1 { font-size: clamp(40px, 6vw, 64px); margin: 14px 0 12px; }
.game-hero .lead { font-size: 20px; color: var(--muted); max-width: 32ch; }
.game-hero .meta-row { margin: 20px 0 28px; }
.game-hero .meta-row .chip { background: var(--surface); }
.game-art-lg { border-radius: var(--radius-lg); aspect-ratio: 4 / 3; background: var(--surface); box-shadow: var(--shadow); }
.game-art-lg .art { width: 52%; }
.game-art-lg .art-words { font-size: 52px; }
.game-art-lg .art-arrows { font-size: 56px; }
.game-art-lg .art-sum b { font-size: 56px; }
.game-art-lg .art-sum i { height: 72px; font-size: 30px; }
.game-detail { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; align-items: start; }
.game-detail .prose p { font-size: 18px; color: var(--muted); }
.howto { list-style: none; padding: 0; counter-reset: howto; display: grid; gap: 14px; }
.howto li { counter-increment: howto; display: flex; gap: 14px; align-items: flex-start; font-size: 17px; margin: 0; }
.howto li::before { content: counter(howto); flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-family: var(--display); font-weight: 900; }
.side { position: sticky; top: 96px; }
.side h3 { font-size: 19px; margin-bottom: 4px; }
.side h3 + .check-list { margin: 14px 0 28px; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 14px 0 0; font-size: 15px; }
.facts dt { color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; font-weight: 700; }
.games-more { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 1100px) {
	.games-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
	.game-hero-grid, .game-detail { grid-template-columns: 1fr; }
	.side { position: static; }
}
@media (max-width: 760px) {
	.games-more { grid-template-columns: 1fr; }
}

/* Yellow fails contrast as text on light tiles; use a darker ink for Logic labels. */
.t-logic .skill-games, .t-logic .skill-games a, .t-logic .skill-chip, .t-logic .game-more, a.game.t-logic:hover .game-body h3 { color: var(--logic-ink); }

/* Clickable test cards and test pages */
a.card.test { color: inherit; text-decoration: none; transition: transform 0.2s ease; }
a.card.test:hover { transform: translateY(-4px); }
a.card.test:hover h3 { color: var(--c); }
a.card.test:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 4px; }
a.card.test .game-more { display: inline-block; margin-top: 14px; }
.test-art-lg { display: grid; place-items: center; background: var(--soft); }
.test-art-lg svg { width: 38%; height: auto; color: var(--c); }
