/* Routeville site, built on the game's brand kit (Chapter 10, §10.18; Tools/ConceptArt/brand.py).
   Layout: a sticky header with the logo, a brand-blue hero, then one centred column of sections;
   legal pages add a route-line contents rail on the left (stacked on phones). */
:root {
  --blue-light: #7CC4FF;   /* brand Light */
  --blue: #3B8BE6;         /* brand Mid */
  --blue-deep: #2160B8;    /* brand Deep */
  --navy: #1E3A6E;         /* logo outline */
  --ville: #FFC93C;        /* "ville" yellow */
  --plate: #FF8A2B;        /* switch plate orange */
  --rail: #EF4B4B;         /* Railway */
  --city: #3B82F6;         /* City Streets */
  --harbor: #2BB2CF;       /* Harbor */
  --primary: #1F64C4;      /* UI primary, darkened for text contrast (5:1 on the page) */
  --rail-ink: #D93A3A; --city-ink: #2563D9; --harbor-ink: #0E7C96; --plate-ink: #C2570C;  /* text shades, ≥ 4.5:1 on white */
  --success: #1BAF7A;      /* UI success */
  --bg: #F5F2EC;           /* UI menu background */
  --card: #ffffff;
  --ink: #1F2937;          /* UI ink */
  --muted: #5B6575;
  --line: #E4DED3;
  --soft: #EDE8DF;
  --on-blue: #ffffff;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 22px;
  --shadow: 0 12px 30px rgba(30, 58, 110, .12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1d33; --card: #16284a; --ink: #EAF1FB; --muted: #A8B8D0; --line: #24395e; --soft: #1a2e52;
    --primary: #6FB0FF; --success: #3fd39a; --shadow: 0 12px 30px rgba(0, 0, 0, .35);
    --rail-ink: #FF7A7A; --city-ink: #7FA8FF; --harbor-ink: #4FD0EA; --plate-ink: #FFA45C;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 600 17px/1.65 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--plate); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-inline: 20px; }

/* Header: the logo on brand blue */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: linear-gradient(90deg, #1B4F9E, var(--blue-deep)); box-shadow: 0 4px 18px rgba(30, 58, 110, .25); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding-block: 10px; flex-wrap: wrap; }
.brand { display: block; line-height: 0; }
.brand img { height: 44px; width: auto; }
.nav { display: flex; gap: 4px 18px; flex-wrap: wrap; font: 600 16px/1 var(--display); }
.nav a { color: rgba(255, 255, 255, .9); text-decoration: none; padding: 8px 2px; border-bottom: 3px solid transparent; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--ville); }
@media (max-width: 560px) { .brand img { height: 36px; } .nav { gap: 2px 14px; font-size: 15px; } }

/* The logo's three route lines, used as a divider */
.routes { display: grid; gap: 4px; width: min(260px, 60%); }
.routes i { height: 5px; border-radius: 3px; }
.routes i:nth-child(1) { background: var(--rail); } .routes i:nth-child(2) { background: var(--city); } .routes i:nth-child(3) { background: var(--harbor); }
.head .routes { margin: 6px auto 0; width: 120px; }

/* Hero: the brand gradient */
.hero { color: var(--on-blue); overflow: hidden;
  background: radial-gradient(420px 420px at 78% 42%, rgba(143, 208, 255, .75), transparent 70%),
    linear-gradient(110deg, #1B4F9E 0%, var(--blue-deep) 50%, #2E77D4 100%); }
@media (max-width: 860px) { .hero { background: radial-gradient(380px 380px at 50% 88%, rgba(143, 208, 255, .7), transparent 70%),
    linear-gradient(180deg, #1B4F9E 0%, var(--blue-deep) 60%, #2E77D4 100%); } }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 40px; align-items: center; padding-block: 56px 72px; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-block: 40px 56px; } }
.hero .logo { width: min(520px, 100%); filter: drop-shadow(0 10px 18px rgba(19, 42, 82, .35)); }
h1 { font: 700 clamp(30px, 4.6vw, 46px)/1.1 var(--display); margin: 22px 0 0; text-wrap: balance; }
.hero h1 { color: #fff; text-shadow: 0 2px 0 rgba(19, 42, 82, .35); }
.lede { font-size: 19px; margin: 14px 0 0; max-width: 34em; }
.hero .lede { color: rgba(255, 255, 255, .92); }
.chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .95); color: var(--navy); border-radius: 999px;
  padding: 6px 14px; font: 600 15px/1.2 var(--display); }
.chip::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--success); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn { display: inline-flex; align-items: center; gap: 10px; border-radius: 16px; padding: 12px 20px; font: 600 17px/1.15 var(--display); text-decoration: none; border: 3px solid transparent; }
.btn.play { background: var(--navy); color: #fff; cursor: default; }
.btn.play small { display: block; font: 800 11px/1.2 var(--body); opacity: .8; letter-spacing: .06em; }
.btn.light { background: #fff; color: var(--navy); }
.btn.light:hover { border-color: var(--ville); }
.stops { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 26px; font: 600 16px/1.2 var(--display); }
.stops span { display: inline-flex; align-items: center; gap: 7px; }
.stops > i { width: 30px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .55); }
.dot { width: 13px; height: 13px; border-radius: 50%; display: inline-block; border: 2px solid #fff; }
.dot.rail { background: var(--rail); } .dot.city { background: var(--city); } .dot.harbor { background: var(--harbor); }
.phone { width: min(290px, 76%); margin: 0 auto; aspect-ratio: 9 / 20; border-radius: 40px; padding: 10px; background: var(--navy);
  box-shadow: 0 30px 60px rgba(19, 42, 82, .45); transform: rotate(2deg); }
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; }

/* Sections */
section.band { padding-block: 72px; }
section.band.alt { background: var(--soft); }
.head { max-width: 640px; margin: 0 auto 40px; text-align: center; display: grid; gap: 10px; justify-items: center; }
h2 { font: 700 clamp(28px, 4.2vw, 40px)/1.12 var(--display); margin: 0; color: var(--ink); text-wrap: balance; }
.head p { margin: 0; color: var(--muted); }

.games { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 900px) { .games { grid-template-columns: minmax(0, 1fr); max-width: 520px; margin: 0 auto; } }
.game { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.game figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--soft); }
.game figure img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.game .body { padding: 18px 22px 24px; display: grid; gap: 8px; border-top: 6px solid var(--c); }
.game.rail { --c: var(--rail); --t: var(--rail-ink); } .game.city { --c: var(--city); --t: var(--city-ink); } .game.harbor { --c: var(--harbor); --t: var(--harbor-ink); }
.game h3 { font: 700 25px/1.2 var(--display); margin: 0; color: var(--t); }
.game p { margin: 0; color: var(--muted); font-size: 16px; }
.game .how { color: var(--ink); font-weight: 800; font-size: 15px; }

.numbers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; text-align: center; }
@media (max-width: 760px) { .numbers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.numbers div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 12px; box-shadow: var(--shadow); }
.numbers b { display: block; font: 700 46px/1 var(--display); font-variant-numeric: tabular-nums; }
.numbers div:nth-child(1) b { color: var(--rail-ink); } .numbers div:nth-child(2) b { color: var(--city-ink); }
.numbers div:nth-child(3) b { color: var(--harbor-ink); } .numbers div:nth-child(4) b { color: var(--plate-ink); }
.numbers span { display: block; margin-top: 8px; color: var(--muted); font-weight: 800; font-size: 15px; }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .features { grid-template-columns: minmax(0, 1fr); } }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 22px; display: grid; gap: 6px; align-content: start; }
.feature h3 { font: 700 21px/1.25 var(--display); margin: 0; display: flex; align-items: center; gap: 10px; }
.feature h3::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--plate); border: 3px solid var(--navy); flex: none; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 20px; font: 600 18px/1.35 var(--display); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--plate-ink); font: 700 26px/1 var(--display); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 20px 18px; color: var(--muted); }

/* Legal pages */
.page-head { color: #fff; background: radial-gradient(360px 260px at 92% 0%, rgba(143, 208, 255, .55), transparent 70%),
  linear-gradient(110deg, #1B4F9E 0%, var(--blue-deep) 60%, #2E77D4 100%); }
.page-head .wrap { padding-block: 44px 40px; display: grid; gap: 12px; }
.page-head h1 { font-size: clamp(36px, 6vw, 54px); margin: 0; color: #fff; text-shadow: 0 2px 0 rgba(19, 42, 82, .35); }
.page-head p { margin: 0; font-size: 18px; max-width: 40em; color: rgba(255, 255, 255, .92); }
.updated { justify-self: start; background: #fff; color: var(--navy); font: 600 15px/1.2 var(--display); border-radius: 999px; padding: 6px 14px; }
.legal-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 52px; align-items: start; padding-block: 44px 72px; }
@media (max-width: 860px) { .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.toc { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); }
@media (max-width: 860px) { .toc { position: static; } }
.toc p { margin: 0 0 12px; font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 22px; position: relative; display: grid; gap: 2px; }
.toc ol::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 3px; border-radius: 2px;
  background: linear-gradient(to bottom, var(--rail), var(--city), var(--harbor)); opacity: .7; }
.toc li { position: relative; }
.toc li::before { content: ""; position: absolute; left: -21px; top: 9px; width: 11px; height: 11px; border-radius: 50%; background: var(--card); border: 3px solid var(--navy); }
.toc a { display: block; padding: 3px 0; color: var(--ink); text-decoration: none; font-size: 15px; line-height: 1.45; }
.toc a:hover { color: var(--primary); }
@media (max-width: 860px) { .toc ol { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); column-gap: 20px; } .toc ol::before { display: none; } }
.legal { min-width: 0; display: grid; gap: 14px; }
.legal h2 { font-size: 26px; margin-top: 26px; scroll-margin-top: 90px; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font: 800 17px/1.4 var(--body); margin: 8px 0 0; }
.legal p, .legal ul { margin: 0; max-width: 68ch; }
.legal p, .legal li { font-weight: 600; }
.legal ul { padding-left: 1.2em; display: grid; gap: 6px; }
.legal li::marker { color: var(--plate); }
.legal code { background: var(--soft); padding: 1px 6px; border-radius: 6px; font-size: .9em; overflow-wrap: anywhere; }
.legal .path, .legal em { font-style: normal; font-weight: 800; color: var(--ink); }
.table { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.table table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.table th { background: var(--soft); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.table td:first-child { font-weight: 800; min-width: 150px; }

/* Delete page */
.ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .ways { grid-template-columns: minmax(0, 1fr); } }
.way { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 24px; display: grid; gap: 14px; align-content: start; min-width: 0; box-shadow: var(--shadow); }
.way .tag { font-weight: 800; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--primary); }
.way h3 { font: 700 23px/1.2 var(--display); margin: 0; }
ol.steps { list-style: none; margin: 0; padding: 0 0 0 32px; position: relative; display: grid; gap: 12px; counter-reset: s; }
ol.steps::before { content: ""; position: absolute; left: 11px; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--line); }
ol.steps li { position: relative; counter-increment: s; color: var(--muted); }
ol.steps li b { color: var(--ink); }
ol.steps li::before { content: counter(s); position: absolute; left: -32px; top: 1px; width: 25px; height: 25px; border-radius: 50%;
  background: var(--plate); color: #fff; border: 2px solid var(--navy); font: 700 13px/21px var(--display); text-align: center; }
.mail { background: var(--soft); border: 1px dashed var(--line); border-radius: 12px; padding: 12px 16px; font-size: 15px; display: grid; gap: 4px; }
.mail div { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.mail span { color: var(--muted); font-weight: 700; min-width: 64px; }
.mail b { overflow-wrap: anywhere; }
.btn.go { background: var(--navy); color: #fff; justify-self: start; }
.note { margin: 0; background: color-mix(in srgb, var(--blue-light) 22%, transparent); border-left: 5px solid var(--blue); border-radius: 0 12px 12px 0; padding: 14px 18px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .split { grid-template-columns: minmax(0, 1fr); } }
.split > div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 10px; align-content: start; }
.split h3 { font: 700 22px/1.2 var(--display); margin: 0; display: flex; align-items: center; gap: 10px; }
.lamp { width: 14px; height: 14px; border-radius: 50%; flex: none; border: 2px solid var(--navy); }
.lamp.red { background: var(--rail); } .lamp.amber { background: var(--ville); }
.split ul { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; color: var(--muted); }

/* Footer */
.foot { background: var(--navy); color: rgba(255, 255, 255, .8); }
.foot .wrap { padding-block: 26px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; font-size: 14px; }
.foot .who { display: flex; align-items: center; gap: 12px; }
.foot .who img { width: 36px; height: 36px; border-radius: 9px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: rgba(255, 255, 255, .85); text-decoration: none; font-weight: 800; }
.foot a:hover { color: var(--ville); }

@media (max-width: 480px) { .stops > i { display: none; } .stops { gap: 8px 16px; } }
/* Skip link for keyboard users */
.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: #fff; color: var(--navy); padding: 10px 14px; border-radius: 10px; font-weight: 800; }
.skip:focus { top: 12px; }
/* 404 */
.lost { padding-block: 80px; text-align: center; display: grid; gap: 14px; justify-items: center; }

/* Game spotlights: a big phone beside the details, alternating sides */
.spot { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: center; padding-block: 34px; }
.spot + .spot { border-top: 1px solid var(--line); }
.spot.city .spot-phone { order: 2; }
@media (max-width: 860px) { .spot { grid-template-columns: minmax(0, 1fr); gap: 26px; } .spot.city .spot-phone { order: 0; } }
.spot-phone { position: relative; justify-self: center; width: min(300px, 78vw); aspect-ratio: 9 / 20; padding: 10px; border: 0; border-radius: 40px;
  background: var(--navy); box-shadow: 0 26px 50px rgba(19, 42, 82, .32); cursor: zoom-in; transition: transform .25s ease, box-shadow .25s ease; }
.spot-phone:hover { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 34px 60px rgba(19, 42, 82, .38); }
.spot-phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 30px; }
.spot-phone:focus-visible, .shot:focus-visible, .vbtn:focus-visible, .feature summary:focus-visible, .btn:focus-visible { outline: 3px solid var(--plate); outline-offset: 4px; }
.enlarge { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); background: rgba(30, 58, 110, .88); color: #fff;
  font: 600 13px/1 var(--display); padding: 8px 12px; border-radius: 999px; white-space: nowrap; }
.spot-text { display: grid; gap: 14px; align-content: start; min-width: 0; }
.kicker { font: 800 12px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.spot h3 { font: 700 clamp(30px, 4.4vw, 42px)/1.05 var(--display); margin: 0; }
.spot.rail h3 { color: var(--rail-ink); } .spot.city h3 { color: var(--city-ink); } .spot.harbor h3 { color: var(--harbor-ink); }
.spot-lede { margin: 0; font-size: 19px; color: var(--ink); max-width: 36em; }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.how li { position: relative; padding-left: 30px; color: var(--muted); }
.how li::before { content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%; border: 3px solid var(--navy); background: var(--c, var(--plate)); }
.spot.rail { --c: var(--rail); } .spot.city { --c: var(--city); } .spot.harbor { --c: var(--harbor); }
.how b { color: var(--ink); }
details.more { background: var(--card); border: 1px solid var(--line); border-radius: 16px; max-width: 40em; }
details.more summary { cursor: pointer; list-style: none; padding: 14px 18px; font: 600 17px/1.3 var(--display); display: flex; justify-content: space-between; gap: 12px; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary::after { content: "+"; color: var(--plate-ink); font: 700 24px/1 var(--display); transition: transform .2s; }
details.more[open] summary::after { transform: rotate(45deg); }
details.more p { margin: 0; padding: 0 18px 16px; color: var(--muted); }
.btn.outline { justify-self: start; background: transparent; color: var(--navy); border-color: var(--navy); cursor: pointer; }
.btn.outline:hover { background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .btn.outline { color: #fff; border-color: #fff; } .btn.outline:hover { background: #fff; color: var(--navy); } }

/* Screenshot strip: swipe sideways, tap to open */
.shots { display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 4px 18px; scrollbar-width: thin; }
.shot { flex: 0 0 auto; width: 200px; aspect-ratio: 9 / 16; padding: 0; border: 0; border-radius: 22px; overflow: hidden; scroll-snap-align: start;
  background: var(--soft); box-shadow: var(--shadow); cursor: zoom-in; transition: transform .2s ease; }
.shot:hover { transform: translateY(-5px); }
.shot img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 560px) { .shot { width: 62vw; } }

/* Full-size viewer */
dialog.viewer { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
dialog.viewer::backdrop { background: rgba(10, 18, 34, .9); }
.viewer-inner { position: relative; width: 100%; height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 16px; }
.viewer figure { margin: 0; display: grid; justify-items: center; gap: 10px; min-width: 0; }
.viewer img { max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; border-radius: 22px; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.viewer figcaption { color: #fff; font: 600 16px/1.3 var(--display); text-align: center; }
.vbtn { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font: 600 28px/1 var(--display); cursor: pointer; }
.vbtn:hover { background: rgba(255, 255, 255, .26); }
.vbtn.close { position: absolute; top: 16px; right: 16px; font-size: 20px; z-index: 2; }
dialog.viewer.single .prev, dialog.viewer.single .next { visibility: hidden; }
@media (max-width: 560px) { .viewer-inner { grid-template-columns: minmax(0, 1fr); } .vbtn.prev, .vbtn.next { position: absolute; bottom: 20px; } .vbtn.prev { left: 24px; } .vbtn.next { right: 24px; } .viewer img { max-height: calc(100vh - 150px); } }

/* Feature cards that open on tap */
details.feature { padding: 0; }
details.feature summary { cursor: pointer; list-style: none; padding: 20px 20px 18px; display: grid; gap: 6px; }
details.feature summary::-webkit-details-marker { display: none; }
details.feature summary p { margin: 0; color: var(--muted); font-size: 16px; }
details.feature summary h3::after { content: "+"; margin-left: auto; color: var(--plate-ink); font: 700 24px/1 var(--display); transition: transform .2s; }
details.feature[open] summary h3::after { transform: rotate(45deg); }
details.feature[open] { border-color: var(--blue); box-shadow: var(--shadow); }
details.feature .extra { padding: 0 20px 20px; color: var(--ink); font-size: 16px; border-top: 1px dashed var(--line); margin: 0 20px; padding-inline: 0; padding-top: 14px; }

/* Spotlights line up with the page edges like every other section: the phone sits on the outer edge, not centred in its column */
@media (min-width: 861px) {
  .spot .spot-phone { justify-self: start; }
  .spot.city .spot-phone { justify-self: end; }
}
@media (min-width: 861px) { .hero .phone { margin: 0 0 0 auto; } }
@media (max-width: 860px) { .spot .spot-phone { width: 100%; justify-self: stretch; } }

/* Three game worlds: full-width bands tinted in each game's colour, joined by two slowly drifting wave layers (CSS masks,
   moved with transforms only). As a world scrolls into view its colour glow comes up and its vehicle drives in. */
:root { --tint-rail: color-mix(in srgb, var(--rail) 13%, var(--bg)); --tint-city: color-mix(in srgb, var(--city) 13%, var(--bg));
  --tint-harbor: color-mix(in srgb, var(--harbor) 20%, var(--bg)); --ww: 1200px; --wh: 72px; }
@media (max-width: 560px) { :root { --ww: 640px; --wh: 44px; } }
.games-head { padding-bottom: 36px; }
.games-head .head { margin-bottom: 0; }
.world { position: relative; padding-block: 40px 84px; background: var(--tint); overflow-x: clip; }
.world.rail { --tint: var(--tint-rail); --c: var(--rail); } .world.city { --tint: var(--tint-city); --c: var(--city); } .world.harbor { --tint: var(--tint-harbor); --c: var(--harbor); }
.world .spot { padding-block: 24px; }
.world::after { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1s ease;
  background: radial-gradient(55% 65% at var(--gx, 24%) 55%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); }
.world.city::after { --gx: 76%; }
@media (max-width: 860px) { .world::after, .world.city::after { --gx: 50%; } }
.world.in::after { opacity: 1; }
.world > .wrap { position: relative; z-index: 1; }
.wave { position: absolute; left: 0; right: 0; top: calc(1px - var(--wh)); height: var(--wh); overflow: hidden; pointer-events: none; z-index: 1; }
.wave::before, .wave::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + var(--ww)); background: var(--tint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0 40C150 12 450 68 600 40S1050 12 1200 40V80H0Z'/%3E%3C/svg%3E") 0 0 / var(--ww) 100% repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0 40C150 12 450 68 600 40S1050 12 1200 40V80H0Z'/%3E%3C/svg%3E") 0 0 / var(--ww) 100% repeat-x;
  animation: wave-x 22s linear infinite; }
.wave::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0 30C150 58 450 2 600 30S1050 58 1200 30V80H0Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80' preserveAspectRatio='none'%3E%3Cpath d='M0 30C150 58 450 2 600 30S1050 58 1200 30V80H0Z'/%3E%3C/svg%3E"); opacity: .5; animation-duration: 34s; animation-direction: reverse; }
@keyframes wave-x { to { transform: translateX(calc(-1 * var(--ww))); } }
.waved { position: relative; }
#screens.waved { --tint: var(--soft); }
/* phone glow */
.spot-phone::before { content: ""; position: absolute; inset: -40px; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--c) 32%, transparent), transparent 72%); opacity: .45; transition: opacity .8s ease; }
.world.in .spot-phone::before { opacity: 1; }
/* the world's vehicle, rendered from the game's own models: it sits on the phone's lower corner and drives in on arrival */
.spot-phone img.cut { position: absolute; z-index: 2; width: 90%; height: auto; object-fit: contain; border-radius: 0; bottom: -7%; right: -52%; pointer-events: none;
  filter: drop-shadow(0 14px 18px rgba(19, 42, 82, .18)); transition: transform 1.1s cubic-bezier(.2,.75,.25,1), opacity .6s ease; }
.spot.city .cut { right: auto; left: -52%; scale: -1 1; }   /* the bus drives out towards the text (mirrored: its pre-slide flips with it) */
.spot .spot-phone .enlarge { left: 22px; transform: none; } .spot.city .spot-phone .enlarge { left: auto; right: 22px; }
.spot.harbor .cut { width: 72%; right: -44%; bottom: -6%; }
.world.pre .cut { transform: translateX(-90px); opacity: 0; }
.spot-phone:hover .cut { transform: translateX(6px); }
@media (max-width: 860px) {
  .spot-phone img.cut { width: 58%; right: -2%; bottom: -6%; }
  .spot.city .cut { left: auto; right: -3%; scale: none; }
  .spot.harbor .cut { width: 46%; right: -1%; bottom: -5%; }
  .spot.city .spot-phone .enlarge { right: auto; left: 22px; }
}
.world .spot-phone, .world .spot-text { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.world.pre .spot-phone { transform: translateY(28px) scale(.985); }
.world.pre .spot-text { transform: translateY(18px); }
.world details.more { background: color-mix(in srgb, var(--card) 85%, transparent); }
@media (prefers-reduced-motion: reduce) { .wave::before, .wave::after { animation: none; }
  .world.pre .spot-phone, .world.pre .spot-text, .world.pre .cut { transform: none; opacity: 1; } }

/* Audit fixes (13 Oct): phone header scrolls away, equal hero buttons, tighter worlds on phones, stacked legal tables,
   screenshot arrows for mouse users, a visible phone edge in dark mode. */
button { font: inherit; }
@media (max-width: 560px) {
  .top { position: static; }
  .toc { top: 12px; }
  .hero .actions .btn { flex: 1 1 100%; justify-content: center; }
  .table { overflow: visible; }
  .table thead { display: none; }
  .table table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 16px; border-bottom: 1px solid var(--line); }
  .table tr:last-child { border-bottom: 0; }
  .table td { padding: 2px 0; border: 0; }
  .table td:first-child { min-width: 0; }
}
@media (max-width: 860px) {
  .world { padding-block: 22px 56px; }
  .world::after, .world.city::after { --gx: 50%; background: radial-gradient(70% 40% at 50% 26%, color-mix(in srgb, var(--c) 22%, transparent), transparent 70%); }
}
.shots-wrap { position: relative; }
.snav { display: none; }
@media (hover: hover) and (min-width: 861px) {
  .snav { display: grid; place-items: center; position: absolute; top: calc(50% - 6px); transform: translateY(-50%); z-index: 2; width: 50px; height: 50px;
    border: 0; border-radius: 50%; background: var(--card); color: var(--ink); box-shadow: 0 10px 26px rgba(19, 42, 82, .25); cursor: pointer; transition: opacity .2s ease, transform .2s ease; }
  .snav:hover { transform: translateY(-50%) scale(1.06); }
  .snav.prev { left: -22px; } .snav.next { right: -22px; }
  .snav[disabled] { opacity: 0; pointer-events: none; }
  .snav:focus-visible { outline: 3px solid var(--plate); outline-offset: 3px; }
}
@media (prefers-color-scheme: dark) { .spot-phone, .hero .phone { outline: 1px solid rgba(255, 255, 255, .14); outline-offset: -1px; } }

/* Trailer in the hero phone (16 Oct): the title screen with a play button; YouTube loads on press */
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: 30px; overflow: hidden; background: #000; }
.phone .screen iframe { display: block; width: 100%; height: 100%; border: 0; }
.vplay { position: absolute; inset: 0; width: 100%; display: grid; place-content: center; justify-items: center; gap: 4px; /* the whole screen plays */
  padding: 0; border: 0; background: none; color: #fff; cursor: pointer; font: 600 15px/1 var(--display); text-shadow: 0 2px 6px rgba(19, 42, 82, .7); }
.vplay svg { box-sizing: content-box; padding: 18px 16px 18px 20px; border-radius: 50%; border: 4px solid #fff; background: rgba(19, 42, 82, .72);
  box-shadow: 0 10px 30px rgba(19, 42, 82, .45); transition: transform .2s, background .2s; }
.vplay:hover svg { transform: scale(1.08); background: var(--navy); }
.vplay:focus-visible { outline: 3px solid var(--plate); outline-offset: -6px; border-radius: 30px; }
button.btn.light { cursor: pointer; }
@media (prefers-reduced-motion: no-preference) { .vplay svg { animation: vpulse 2.4s ease-in-out infinite; } }
@keyframes vpulse { 0%, 100% { box-shadow: 0 10px 30px rgba(19, 42, 82, .45), 0 0 0 0 rgba(255, 255, 255, .5); } 60% { box-shadow: 0 10px 30px rgba(19, 42, 82, .45), 0 0 0 14px rgba(255, 255, 255, 0); } }
