/* Country-page implementation of docs/design-principles.md.
   Tokens follow index.css / solo.css; country content never overrides the palette. */
@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --bg: #fffdf8;
  --panel: #ffffff;
  --line: #29303d;
  --soft: #e6e0d6;
  --text: #29303d;
  --muted: #6b6459;
  --accent: #f2705f;
  --accent-soft: #fff0ec;
  --accent2: #2ec4b6;
  --teal-soft: #e9f9f6;
  --sun: #ffc233;
  --sun-soft: #fff1cf;
  --good: #3ec98c;
  --bad: #e04c3f;
  --map-bg: #eef2e6;
  --map-land: #d6e1ce;
  --radius-card: 16px 7px 16px 7px;
  --radius-control: 12px 5px 12px 5px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(640px 480px at 10% 0, rgba(242,112,95,.19), transparent 65%),
    radial-gradient(560px 440px at 100% 0, rgba(46,196,182,.16), transparent 65%),
    var(--bg);
  color: var(--text);
  font: 600 16px/1.75 'Nunito', system-ui, sans-serif;
}
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; }
[hidden] { display: none !important; }
.wrap { width: min(1240px, calc(100% - 64px)); margin: auto; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 26px 'Baloo 2', cursive; text-decoration: none; }
.brand img { width: 38px; height: 38px; flex: 0 0 auto; }
.brand-name { white-space: nowrap; }
.brand-name > span { color: var(--accent); -webkit-text-stroke: .5px var(--line); paint-order: stroke fill; }
nav { display: flex; gap: 24px; align-items: center; }
.nav nav > a { text-decoration: none; font-weight: 800; }
.button {
  display: inline-flex; justify-content: center; align-items: center;
  padding: 13px 22px; border: 2px solid var(--line); border-radius: var(--radius-control);
  background: var(--panel); color: var(--text); box-shadow: 4px 4px 0 var(--line);
  text-decoration: none; cursor: pointer; font-weight: 800; line-height: 1.5;
  transition: transform .12s, box-shadow .12s;
}
.button.primary { background: var(--accent); color: var(--text); }
.button:hover { color: var(--text); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--line); }
.button:active { transform: translate(4px, 4px); box-shadow: none; }
h1, h2, h3 { font-family: 'Baloo 2', cursive; font-weight: 800; letter-spacing: -.02em; line-height: 1.14; }
h1 { font-size: clamp(40px, 4.2vw, 64px); margin: 15px 0 24px; }
h1 > span { color: var(--accent); -webkit-text-stroke: 1px var(--line); paint-order: stroke fill; }
h2 { font-size: clamp(30px, 3vw, 42px); margin: 12px 0 24px; }
h3 { font-size: 26px; margin: 12px 0; }
.eyebrow { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 900; color: var(--text); }
.hero .eyebrow::before, .orientation .eyebrow::before {
  content: ''; display: inline-block; width: 12px; height: 12px; margin-right: 9px;
  border: 2px solid var(--line); border-radius: 50%; background: var(--accent2); vertical-align: -1px;
}
.lead { font-size: 20px; line-height: 1.65; color: var(--muted); max-width: 700px; }
.fine, figcaption { font-size: 13px; color: var(--muted); }
.hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: 44px; align-items: center; padding: 64px 0 90px; }
.actions { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin: 28px 0; }
figure { margin: 0; min-width: 0; }
.game-shot {
  display: block; width: 100%; height: auto; background: var(--panel);
  border: 2px solid var(--line); border-radius: var(--radius-card); box-shadow: 5px 5px 0 #ffe3ad;
}
figcaption { padding: 14px 5px; }
.band { background: var(--accent-soft); border-top: 2px solid var(--line); border-bottom: 2px solid var(--line); }
.route-band { background: var(--sun-soft); }
.comparison-band { background: var(--teal-soft); }
.orientation { padding: 35px 0; }
.orientation h2 { max-width: 900px; }
.orientation p:last-child { margin-bottom: 0; }
.section { padding: 80px 0; }
.quiz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.quiz-panel {
  padding: 25px; background: var(--panel); border: 2px solid var(--line);
  border-radius: var(--radius-card); box-shadow: 5px 5px 0 #ffe3ad;
}
.quiz-panel [data-count] { display: inline-block; margin-top: 0; padding: 5px 12px; background: var(--sun); border: 2px solid var(--line); border-radius: 999px; }
.quiz-panel h3 { font-size: 29px; }
.sample-map { position: relative; width: 100%; aspect-ratio: 500/470; background: var(--map-bg); border: 2px solid var(--line); border-radius: var(--radius-control); }
.sample-map svg { width: 100%; height: 100%; }
.sample-map path { fill: var(--map-land); stroke: var(--bg); stroke-width: 1; }
.sample-map line { stroke: var(--line); }
.sample-map circle, .sample-map text { fill: var(--text); }
.sample-dot {
  position: absolute; transform: translate(-50%, -50%); width: 44px; height: 44px;
  border-radius: 50%; background: var(--sun); border: 2px solid var(--line); color: var(--text);
  cursor: pointer; font-size: 20px; font-weight: 900; box-shadow: 2px 2px 0 var(--line);
}
.sample-dot:hover:not(:disabled) { background: var(--accent2); }
.sample-dot.correct { background: var(--good); }
.sample-dot.wrong { background: var(--bad); }
.sample-dot:disabled { opacity: 1; cursor: default; }
.quiz-panel [data-feedback] { min-height: 64px; }
.quiz-panel [data-full] { display: block; margin-top: 16px; }
.chapters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 42px; }
.chapters h2 { font-size: 30px; }
.number {
  display: inline-flex; align-items: center; justify-content: center; width: 66px; height: 62px;
  font: 800 36px 'Baloo 2', cursive; background: var(--sun); color: var(--text);
  border: 2px solid var(--line); border-radius: var(--radius-control); box-shadow: 3px 3px 0 var(--line);
}
.chapters p, .place-card p { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.place-card { min-width: 0; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius-card); padding: 24px; box-shadow: 4px 4px 0 #ffe3ad; }
.place-card .eyebrow { color: var(--text); }
.coordinates { font: 13px monospace; }
.subheading { margin-top: 60px; }
details { border-top: 2px solid var(--soft); padding: 16px 0; }
summary { cursor: pointer; font-weight: 800; }
details p { overflow-wrap: anywhere; }
details a { font-size: 14px; }
.learning { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.guide-links { display: grid; gap: 10px; margin: 24px 0; }
.guide-links a { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; border: 2px solid var(--line); background: var(--panel); border-radius: var(--radius-control); text-decoration: none; box-shadow: 2px 2px 0 var(--soft); }
.guide-links a:hover { background: var(--sun-soft); }
.guide-links span { color: var(--muted); }
.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; max-width: 1040px; }
.end-cta { margin-top: 70px; padding: 40px; background: var(--sun-soft); border: 2px solid var(--line); border-radius: var(--radius-card); box-shadow: 5px 5px 0 #ffe3ad; display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.end-cta h2 { width: 100%; }
footer { padding: 40px 0; border-top: 2px solid var(--line); }
footer .fine { max-width: 800px; }
.directory-intro { max-width: 1100px; }
.directory-intro label { display: block; font-weight: 800; margin-top: 40px; }
input { width: 100%; max-width: 550px; padding: 14px; border: 2px solid var(--line); border-radius: var(--radius-control); background: var(--panel); color: var(--text); }
.country-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.country-list a { display: block; border: 2px solid var(--line); padding: 18px; text-decoration: none; border-radius: var(--radius-card); background: var(--panel); box-shadow: 3px 3px 0 #ffe3ad; }
.country-list a:hover { background: var(--sun-soft); }
.country-list strong, .country-list span { display: block; }
.country-list span { font-size: 13px; color: var(--muted); }
.skip { position: absolute; left: 12px; top: -100px; background: var(--panel); padding: 12px; z-index: 5; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--line); outline-offset: 4px; }
a:hover { color: var(--text); text-decoration: underline; }
.brand:hover, .button:hover { text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .button { transition: none; } }
@media (max-width: 900px) {
  .hero, .quiz-grid, .learning { grid-template-columns: 1fr; gap: 35px; }
  .hero { padding-top: 35px; }
  .hero figure { max-width: 750px; }
  .chapters, .cards { grid-template-columns: 1fr; gap: 24px; }
  .comparison { gap: 30px; }
  .country-list { grid-template-columns: 1fr 1fr; }
  .section { padding: 55px 0; }
  .chapters article { max-width: 700px; }
}
@media (max-width: 540px) {
  .wrap { width: calc(100% - 36px); }
  .nav { align-items: flex-start; gap: 16px; }
  .nav nav { gap: 12px; flex-wrap: wrap; justify-content: flex-end; font-size: 13px; }
  .nav .button { padding: 7px 10px; }
  .brand { font-size: 20px; gap: 5px; }
  .brand img { width: 28px; height: 28px; }
  .hero { padding-bottom: 45px; }
  .quiz-panel { padding: 18px; }
  .comparison, .country-list { grid-template-columns: 1fr; }
  .guide-links a { gap: 12px; font-size: 14px; }
  .end-cta { padding: 25px; }
  footer nav { flex-wrap: wrap; }
}

/* Shared comparison and playable-demo treatment. */
.fusion-intro { max-width: 900px; margin-bottom: 32px; }
.fusion-intro > p:last-child { max-width: 800px; font-size: 18px; }
.feature-table-scroll { max-width: 100%; overflow-x: auto; border: 2px solid var(--line); border-radius: var(--radius-card); background: var(--panel); box-shadow: 5px 5px 0 #ffe3ad; overscroll-behavior-x: contain; }
.feature-table { width: 100%; min-width: 680px; border-collapse: collapse; text-align: left; }
.feature-table caption { padding: 16px 20px; text-align: left; font-weight: 900; background: var(--sun); border-bottom: 2px solid var(--line); }
.feature-table th, .feature-table td { padding: 18px 20px; border-bottom: 1px solid var(--soft); }
.feature-table thead th { font: 800 22px/1.2 'Baloo 2', cursive; border-bottom: 2px solid var(--line); }
.feature-table th span { display: block; font: 700 12px/1.5 'Nunito', sans-serif; margin-top: 7px; }
.feature-table th:first-child { width: 34%; }
.feature-table tbody th { font-size: 15px; font-weight: 800; }
.feature-table tr > :nth-child(2) { background: var(--sun-soft); }
.feature-table .our-product { background: var(--accent-soft); }
.feature-table tbody tr:last-child > * { border-bottom: 0; }
.feature-state { white-space: nowrap; font-size: 14px; font-weight: 800; }
.feature-state > span { display: inline-grid; place-items: center; width: 27px; height: 27px; border: 2px solid var(--line); border-radius: 50%; margin-right: 6px; color: var(--text); }
.feature-state.has > span { background: var(--good); }
.feature-state.has-not > span { background: var(--panel); }
.table-scroll-hint { display: none; font-size: 13px; color: var(--muted); }
.fusion-summary { max-width: 900px; padding: 24px; margin-top: 28px; border: 2px solid var(--line); border-radius: var(--radius-card); background: var(--panel); }
.fusion-summary strong { font: 800 27px/1.2 'Baloo 2', cursive; }
.fusion-summary p { margin-bottom: 0; }
.comparison-sources { max-width: 900px; margin: 20px 0; }
.demo-hud { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.demo-hud [data-count] { margin-bottom: 0; }
.demo-score { margin: 0; padding: 5px 10px; border: 2px solid var(--line); border-radius: 999px; background: var(--teal-soft); font-size: 12px; font-weight: 900; white-space: nowrap; }
.demo-result { padding: 20px; margin-top: 20px; border: 2px solid var(--line); border-radius: var(--radius-control); background: var(--sun-soft); }
.demo-result h4 { font: 800 26px/1.2 'Baloo 2', cursive; margin: 0 0 12px; }
.demo-result p { margin-bottom: 18px; }
.demo-result .button { margin: 8px 12px 8px 0; }
.quiz-panel .demo-result [data-full] { display: inline-flex; }
@media (max-width: 700px) { .table-scroll-hint { display: block; } .feature-table th, .feature-table td { padding: 14px; } }
.real-demo { min-width: 0; padding: 20px; background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius-card); box-shadow: 5px 5px 0 #ffe3ad; }
.real-demo-heading { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.real-demo-heading strong { font: 800 24px/1.2 'Baloo 2', cursive; }
.real-demo-heading > span { font-size: 12px; font-weight: 800; background: var(--sun); padding: 5px 10px; border: 2px solid var(--line); border-radius: 999px; }
.game-demo-frame { display: block; width: 100%; height: 600px; border: 2px solid var(--line); border-radius: var(--radius-control); background: var(--map-bg); }
@media(max-width:540px){.real-demo{padding:12px}.game-demo-frame{height:620px}}

.fusion-icons { display:flex; gap:18px; margin-bottom:16px; }
.fusion-icons img { object-fit:contain; }
.feature-state > span { margin-right:0; }
.feature-state.has > span { background:var(--good); }
.feature-table .access-row td { font-size:13px; line-height:1.6; vertical-align:top; }

.locale-controls { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.locale-controls select { max-width:180px; min-height:44px; padding:8px 28px 8px 10px; border:2px solid var(--line); border-radius:var(--radius-control); background:var(--panel); color:var(--text); font:700 14px 'Nunito',sans-serif; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.nav nav { flex-wrap:wrap; }
@media(max-width:700px){.locale-controls select{max-width:150px}.nav{flex-wrap:wrap;gap:14px}.nav-actions{flex-wrap:wrap}.nav nav{gap:12px}}

h1,h2,h3,p,figcaption,summary { overflow-wrap:anywhere; hyphens:auto; }
@media(max-width:700px){
 .nav > nav { width:100%; }
 .locale-controls { width:100%; justify-content:flex-end; }
 .locale-controls select { max-width:min(150px,calc((100vw - 48px)/2)); }
}

/* Prominent entry to the real game, separate from the short demo. */
.hero .button[data-play-game] { font-size:22px; padding:20px 32px; min-height:76px; }
.nav { flex-wrap:wrap; }
.nav .button[data-play-game] { font-size:18px; padding:14px 24px; min-height:58px; white-space:nowrap; }
@media(max-width:700px){
 .hero .button[data-play-game] { width:100%; }
 .nav .button[data-play-game] { font-size:17px; padding:12px 20px; }
}

.learn-grid{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:64px}.learn-grid .lead{font-size:20px}.learn-shot{max-width:480px;margin:0 auto}.learn-grid figure{max-width:480px;width:100%;justify-self:center}.learn-grid figcaption{text-align:center}
@media(max-width:700px){.learn-grid{grid-template-columns:1fr;gap:28px}}
