:root {
  color-scheme: dark;
  --background: #101b1e;
  --panel: #192823;
  --paper: #eee9db;
  --muted: #becac0;
  --foreground: #f8f1e1;
  --line: #596b5c;
  --leaf: #c8dfad;
  --amber: #f5c46d;
  --ink: #152318;
  --serif: Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--foreground); font: 1rem/1.55 system-ui, sans-serif; }
button, input { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
a { color: var(--leaf); text-underline-offset: .24em; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }
.visually-hidden, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 10; inset: .5rem auto auto .5rem; padding: .6rem; background: var(--panel); }
.page-shell { width: min(1344px, calc(100% - 2.5rem)); margin-inline: auto; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: .7rem; min-height: 64px; }
.wordmark { color: var(--foreground); font: 700 clamp(1.25rem,3.6vw,1.65rem)/1.05 var(--serif); text-decoration: none; letter-spacing: -.035em; }
nav { display: flex; align-items: center; gap: .25rem; }
nav a { border-radius: 5px; color: var(--muted); font-size: .88rem; padding: .55rem .72rem; text-decoration: none; white-space: nowrap; }
nav a[aria-current] { color: var(--foreground); box-shadow: inset 0 -2px var(--leaf); }
.topic-menu { position: relative; }
.topic-menu summary { border-radius: 5px; color: var(--muted); font-size: .88rem; padding: .55rem .72rem; }
.topic-menu[open] summary { color: var(--foreground); }
.topic-menu > div { position: absolute; inset: calc(100% + .25rem) 0 auto auto; z-index: 3; display: grid; min-width: 12.5rem; padding: .35rem; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 6px 18px #07120dcc; }
.topic-menu a { white-space: normal; }

.game { position: relative; isolation: isolate; overflow: hidden; overflow-anchor: none; min-height: clamp(560px,50vw,684px); display: grid; align-content: end; border: 1px solid #627461; border-radius: 14px; background: #12282c; }
.map { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 54% 43%,#234347,#142c31 85%); }
.map[data-scene='glen'] { background: #25373d; }
.map-world { position: absolute; width: 960px; height: 540px; transform-origin: 0 0; }
.terrain, .route-map { position: absolute; inset: 0; width: 960px; height: 540px; }
.terrain { mask-image: linear-gradient(to bottom,transparent,#000 9%,#000 83%,transparent), linear-gradient(to right,transparent,#000 7%,#000 93%,transparent); mask-composite: intersect; }
.map::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg,#101d1d94,transparent 20%,transparent 75%,#111d1ed4), linear-gradient(100deg,#1423224d,transparent 48%); }
.route-map { overflow: visible; }
.route-map path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.route-verge { stroke: #393726; stroke-width: 13; opacity: .63; }
.route-bed { stroke: #998665; stroke-width: 8; }
.route-edge { stroke: #b4a27d; stroke-width: 3.6; opacity: .85; }
.route-travelled { stroke: #f7cf7e; stroke-width: 5; }
.journey-landmark { position: absolute; width: 0; height: 0; pointer-events: none; }
.landmark-sprite { position: absolute; left: var(--foot-x); top: var(--foot-y); transform: translate(-50%,-72%); background-size: 400% 200%; background-repeat: no-repeat; filter: drop-shadow(1px 4px 3px #292b2299) saturate(.84); }
.landmark-sign { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); white-space: nowrap; color: #f8eed4; background: #493c2be8; border: 1px solid #d2bc91a8; border-radius: 3px; padding: 2px 5px; font: 650 10px/1.25 system-ui,sans-serif; letter-spacing: .015em; }
.journey-landmark.is-reached .landmark-sign { color: #241e16; background: #e5bd7e; }
.journey-landmark.is-visited .landmark-sprite { animation: landmark-visited .55s ease-out; }
@keyframes landmark-visited { 0%,100% { filter: drop-shadow(1px 4px 3px #292b2299) saturate(.84); } 45% { filter: drop-shadow(0 3px 6px #ffe1a978) brightness(1.19) saturate(.9); } }
.route-marker { --lift: 0px; --bank: 0deg; position: absolute; width: 15px; height: 13px; transform: translate(-50%,-50%); pointer-events: none; }
.map-pin { display: block; width: 100%; height: 100%; border: 2px solid #453a27; outline: 1px solid #f6dfae; border-radius: 50%; background: #f1ce89; box-shadow: 0 1px 3px #101712; }
.route-marker[data-sighting='yes'] .map-pin { border: 0; outline: 0; transform: scale(1.55,.68); background: #22291ca8; box-shadow: 0 0 7px 4px #22291c70; }
.map-wildlife, .trail-wildlife { position: absolute; width: 77px; height: 73px; left: 50%; bottom: 4px; transform: translate(-50%,calc(-1 * var(--lift))) rotate(var(--bank)); filter: drop-shadow(0 2px 3px #19231a8c); pointer-events: none; }
.map-wildlife { opacity: 0; }
.map-wildlife.is-shown { opacity: 1; }
.trail-wildlife { width: 53px; height: 51px; transform: translate(-50%,-79%); bottom: auto; opacity: .94; }
.map-status { position: absolute; z-index: 3; inset: .78rem 1rem auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: .7rem; color: #fff8e9; pointer-events: none; }
.odometer, .checkpoint { width: fit-content; color: #fff7e5; background: #172b24f2; padding: .32rem .68rem; border: 1px solid #9eae8c85; border-radius: 5px; font-variant-numeric: tabular-nums; }
.odometer strong { font: 700 1.75rem/.96 var(--serif); }
.odometer small { font-size: .78rem; }
.hud-end { justify-self: end; display: flex; align-items: center; gap: .4rem; }
.checkpoint { font-size: .86rem; white-space: nowrap; }
.sound-button { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #9eae8c8f; border-radius: 50%; background: #162820f0; color: #fcf3d8; pointer-events: auto; }
.sound-button[aria-pressed='true'] { background: #3e5340; }
.sound-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.run-ticks { display: flex; gap: .25rem; list-style: none; padding: .34rem .46rem; margin: 0; border-radius: 5px; background: #172b24ed; }
.run-ticks li { display: grid; place-items: center; width: 1.24rem; height: 1.24rem; border: 1px solid #94a487; border-radius: 4px; font-size: .71rem; color: #e1ead7; }
.run-ticks li[data-status='done'] { background: #ebcb8a; color: #272218; border-color: #ebcb8a; font-weight: 750; }
.run-ticks li[data-status='miss'] { background: #38453d; color: #dce4d2; }
.run-ticks li[aria-current='step'] { color: #fff4d2; border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.route-name { color: #dfca91; font-size: .75rem; font-weight: 730; letter-spacing: .095em; text-transform: uppercase; margin-bottom: .45rem; }

.console { position: relative; z-index: 2; width: min(470px, calc(100% - 2.7rem)); margin: 1.35rem; padding: clamp(1.1rem,2vw,1.65rem); border: 1px solid #a6b29891; border-radius: 11px; background: #182a24f5; box-shadow: 0 13px 40px #0711106c; }
h1, h2, h3 { color: var(--foreground); margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.13; text-wrap: balance; }
h1 { font-size: clamp(2.5rem,5.25vw,4.45rem); letter-spacing: -.045em; }
.console h2:focus-visible { outline: none; }
.console h2 { font-size: clamp(1.55rem,2.9vw,2.25rem); letter-spacing: -.026em; }
.console p { margin: .45rem 0 .8rem; color: var(--muted); }
.console .lede { max-width: 38ch; margin-block: .68rem 1rem; font-size: 1.06rem; }
.start-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; border-radius: 5px; padding: .55rem .87rem; font-weight: 750; }
.primary { background: var(--leaf); border: 1px solid #e7edd2; color: var(--ink); }
.primary:hover:not(:disabled) { background: #e3edc8; }
.primary:active:not(:disabled) { translate: 0 1px; }
.secondary { background: #2c3e31; color: var(--foreground); border: 1px solid #849580; }
.timing-option { min-height: 44px; display: flex; align-items: center; gap: .4rem; color: var(--paper); }
.timing-option input { accent-color: var(--leaf); width: 1.1rem; height: 1.1rem; margin: 0; }
.question-meta { display: flex; justify-content: space-between; gap: .6rem; margin-bottom: .62rem; color: var(--leaf); font-size: .75rem; font-weight: 730; letter-spacing: .075em; text-transform: uppercase; }
.question-block { margin-bottom: .63rem; }
#answer-form { display: grid; grid-template-columns: 2.85rem minmax(0,1fr) auto; gap: .46rem; align-items: center; }
#answer-form:has(.clock[hidden]) { grid-template-columns: minmax(0,1fr) auto; }
.clock { --clock-ring: var(--leaf); --clock-track: #475a4c; position: relative; display: grid; place-items: center; aspect-ratio: 1; width: 100%; border-radius: 50%; color: var(--foreground); background-color: #162920; font-variant-numeric: tabular-nums; font-weight: 700; }
.clock::before { content: ''; position: absolute; inset: 0; border: 2px solid transparent; border-radius: inherit; background: linear-gradient(#162920,#162920) padding-box, conic-gradient(var(--clock-ring) var(--elapsed,100%),var(--clock-track) 0) border-box; }
.clock > span { position: relative; }
.clock.is-urgent { --clock-ring: var(--amber); --clock-track: #645340; color: var(--amber); background-color: #162920; }
#answer { width: 100%; min-height: 46px; padding: .55rem .62rem; border: 1px solid #849580; border-radius: 5px; color: var(--foreground); background: #101d18; }
#answer:focus-visible { outline-offset: 2px; }
#answer::placeholder { color: #bdc9be; opacity: 1; }
.answer-tools { display: flex; align-items: center; justify-content: space-between; gap: .45rem; min-height: 30px; }
.answer-tools p { margin: .25rem 0; font-size: .86rem; }
.text-button { border: 0; color: var(--leaf); background: none; padding: .44rem .08rem; text-decoration: underline; text-underline-offset: .22em; }
.suggestions { display: flex; gap: .4rem; flex-wrap: wrap; }
.suggestions button { text-align: left; }
.result-row { display: flex; align-items: center; gap: .5rem; }
.result-row p { margin-bottom: 0; }
.wildlife, .map-wildlife, .trail-wildlife { background-repeat: no-repeat; background-size: 300% 200%; }
.wildlife { width: 78px; height: 69px; flex: 0 0 78px; }
.gain { margin-left: auto; color: var(--amber); white-space: nowrap; font-size: 1.16rem; }
.console .milestone { margin: .6rem 0 .35rem; padding: .48rem .65rem; color: #ffedbd; background: #503a24; border: 1px solid #ccad76; border-radius: 5px; font-weight: 700; font-size: .86rem; }
.tiers { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: .26rem; list-style: none; margin: .46rem 0 .66rem; padding: 0; }
.tiers li { display: grid; place-items: center; color: var(--muted); padding: .19rem 0; border: 1px solid transparent; font-size: .74rem; border-radius: 5px; }
.tiers .wildlife { width: 42px; height: 39px; }
.tiers li[aria-current] { border-color: var(--amber); color: #191d10; background: #f2cd80; font-weight: 750; }
#next { width: 100%; }
.console .summary-place { color: #ead3a0; font-size: .88rem; }
#summary h2 { font-size: clamp(2rem,4vw,2.85rem); }
.replay-actions, .replay-bar { display: flex; flex-wrap: wrap; gap: .5rem .7rem; align-items: center; margin-top: .55rem; font-size: .88rem; }
.replay-bar .secondary { min-width: 42px; }
.replay-bar [role='status'] { flex: 1 1 8rem; color: #f5e7bf; }
#share-status:empty { display: none; }
.run-review { width: min(900px,100%); margin: 1.3rem auto 0; padding: .9rem 1rem; background: #192924; border: 1px solid var(--line); border-radius: 8px; }
.review summary { color: var(--leaf); font-weight: 700; }
.review ol { display: grid; gap: .8rem; padding-left: 1.25rem; }
.review li p { margin: .15rem 0; color: var(--muted); }

.home-guide { width: min(1060px,100%); margin: 2rem auto 0; }
.home-guide section { padding: 1.65rem 0; border-bottom: 1px solid #41534b; }
.home-guide p, .guide-steps dd, .guide-steps p { color: var(--muted); max-width: 62ch; margin: .48rem 0 .65rem; }
.guide-intro { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1rem; align-items: start; }
.guide-intro > p { margin-top: .07rem; }
.home-guide h2 { font-size: clamp(1.45rem,3.3vw,2rem); }
.home-guide h3 { font-size: 1.2rem; }
.guide-steps, .guide-modes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .85rem; margin: 1rem 0; }
.guide-steps li, .guide-steps > div, .guide-modes > div { background: #1b2b25; border-top: 2px solid #82956c; border-radius: 4px; padding: .72rem .85rem; }
.guide-steps { list-style-position: inside; padding: 0; }
.guide-steps li::marker { color: var(--amber); font-weight: 750; }
.finish-steps dt { color: var(--paper); font-weight: 700; }
.guide-example, .guide-tiers { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin: 1rem 0; }
.guide-example > span, .guide-tiers > div { border-radius: 4px; background: #222e24; padding: .6rem .77rem; display: flex; flex-wrap: wrap; gap: .45rem; justify-content: space-between; color: var(--paper); }
.guide-tiers { grid-template-columns: repeat(3,minmax(0,1fr)); }
.guide-example strong, .guide-tiers dd { color: var(--amber); margin: 0; font-weight: 750; }
.guide-modes { grid-template-columns: repeat(2,minmax(0,1fr)); }
.all-modes > :first-child { grid-column: 1 / -1; }
.guide-faq { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .1rem 1rem; margin-top: .7rem; }
.guide-faq details { border-bottom: 1px solid #46594f; padding: .56rem .2rem; }
.guide-faq summary { color: var(--leaf); font-weight: 650; }
/* The homepage examples share the game's distance and map vocabulary. */
.home-guide .guide-copy > p:first-child { margin-top: .07rem; }
.guide-callout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem 1.15rem; margin-top: .8rem; }
.guide-callout > div { padding: .52rem .65rem; border-left: 2px solid #9aaa7f; }
.guide-callout p { margin: 0; }
.guide-callout p + p { margin-top: .32rem; }
.guide-callout strong { color: var(--paper); display: block; margin-bottom: .1rem; }
.guide-cases { display: grid; gap: .62rem; margin-top: .95rem; }
.guide-case { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.2fr); gap: .75rem; align-items: start; padding: .75rem; border: 1px solid #49594b; border-radius: 6px; background: #192a23; }
.guide-case-prompt h3 { color: #f7efd9; }
.guide-case-tip p:first-child { margin-top: 0; }
.guide-case p:last-child { margin-bottom: 0; }
.guide-case-scores { display: grid; gap: .32rem; margin: 0; }
.guide-case-scores > div { display: flex; justify-content: space-between; align-items: baseline; gap: .4rem; padding: .4rem .48rem; border-radius: 4px; background: #243429; color: var(--paper); }
.guide-case-scores dd { margin: 0; color: var(--amber); font-weight: 750; white-space: nowrap; }
.guide-ledger { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: .95rem; align-items: start; margin-top: .85rem; }
.guide-score-table { width: 100%; border-collapse: collapse; color: var(--paper); text-align: left; font-variant-numeric: tabular-nums; background: #1a2a24; }
.guide-score-table caption { caption-side: top; text-align: left; font-weight: 650; padding: .53rem .58rem; color: var(--leaf); }
.guide-score-table th, .guide-score-table td { padding: .35rem .52rem; border-top: 1px solid #496053; }
.guide-score-table thead th { color: var(--leaf); }
.guide-score-table tbody th { font-weight: 550; }
.guide-score-table th + th, .guide-score-table td { text-align: right; white-space: nowrap; }
.guide-score-table tr:last-child td:last-child { color: var(--amber); font-weight: 750; }
.guide-run-notes { display: grid; gap: .55rem; }
.guide-run-notes > div { border-left: 2px solid #a7976a; padding: .45rem .68rem; background: #1c2a23; }
.guide-run-notes p { margin-bottom: 0; }
@media (max-width: 700px) {
  .guide-case, .guide-ledger, .guide-callout { grid-template-columns: 1fr; }
  .guide-case { gap: .5rem; }
  .guide-score-table th, .guide-score-table td { padding: .34rem .38rem; }
}
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: .55rem; padding: 1.25rem 0 1.65rem; border-top: 1px solid #41534b; margin-top: 1.6rem; }
.site-footer nav { flex-wrap: wrap; }
.site-footer a:hover, nav a:hover { color: var(--foreground); text-decoration: underline; }
.trust-shell { max-width: 1050px; }
.trust-article { width: min(850px,100%); margin: clamp(.8rem,4.5vw,3.7rem) auto; }
.trust-article > header { background: #1a3028; border: 1px solid #6f8369; border-radius: 10px; padding: clamp(.9rem,3vw,1.75rem); margin-bottom: 1.35rem; }
.trust-article .lede { margin: .62rem 0 0; max-width: 58ch; color: #e4ecde; }
.trust-copy h2 { padding-top: 1.08rem; margin-top: 1.18rem; border-top: 1px solid #53655b; font-size: clamp(1.3rem,3.6vw,1.75rem); }
.trust-copy p { margin: .58rem 0 .77rem; color: #e2e7de; max-width: 64ch; }
.trust-copy table { width: 100%; border-collapse: collapse; margin: .8rem 0 1.1rem; color: #e1e9df; }
.trust-copy th, .trust-copy td { border-bottom: 1px solid #54695c; padding: .55rem .67rem; text-align: left; vertical-align: top; }
.trust-copy th { color: var(--leaf); background: #213329; }
.trust-copy details { margin: .55rem 0; padding: .58rem .75rem; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.trust-copy details summary { color: var(--leaf); font-weight: 650; }
.trust-copy li + li { margin-top: .28rem; }
.topic-guide .trust-copy { max-width: 840px; margin-inline: auto; }
.topic-guide .trust-copy h2:first-child { margin-top: 0; }
.console .lede:has(+ .play-lede) { margin-bottom: .4rem; }
.console .play-lede { margin-top: 0; }
.topic-breadcrumb { width: min(840px,100%); margin: 0 auto .9rem; flex-wrap: wrap; gap: .55rem; color: var(--muted); font-size: .88rem; }
.topic-breadcrumb a { color: var(--leaf); padding: 0; text-decoration: underline; white-space: normal; }

@media (max-width: 700px) {
  .page-shell { width: calc(100% - 1rem); }
  .masthead { min-height: 53px; padding-inline: .35rem; }
  nav a, .topic-menu summary { padding: .45rem .48rem; font-size: .78rem; }
  .game { min-height: min(666px,calc(100svh - 60px)); border-radius: 9px; }
  .map::after { background: linear-gradient(180deg,#131f1eab,transparent 28%,transparent 70%,#132320e8); }
  .map-status { inset: .5rem .52rem auto; grid-template-columns: auto auto; gap: .34rem .4rem; }
  .odometer { font-size: .76rem; align-self: center; }
  .odometer strong { font-size: 1.45rem; }
  .odometer small { display: none; }
  .hud-end { grid-column: 2; grid-row: 1; gap: .28rem; }
  .checkpoint { font-size: .7rem; padding-inline: .41rem; }
  .sound-button { width: 44px; height: 44px; }
  .run-ticks { justify-self: center; grid-column: 1 / -1; gap: .25rem; padding: .27rem .36rem; }
  .run-ticks li { width: 1.06rem; height: 1.06rem; font-size: .66rem; }
  .console { width: auto; margin: .55rem; padding: .85rem .79rem; border-radius: 7px; }
  .console .lede { margin-block: .42rem .64rem; font-size: .96rem; }
  [data-phase='play'] .game, [data-phase='reveal'] .game { align-content: stretch; }
  [data-phase='play'] .console, [data-phase='reveal'] .console { display: contents; }
  #play, #reveal { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; gap: 1.6rem; padding: 5.2rem .58rem .62rem; }
  .question-note, .reveal-note, .composer { border: 1px solid #a6b2988b; border-radius: 7px; padding: .67rem .72rem; background: #192c25f5; box-shadow: 0 6px 18px #0e1b1969; }
  .question-block { margin-bottom: 0; }
  .question-block p { margin-bottom: .12rem; }
  .question-meta { margin-bottom: .39rem; }
  .composer { padding: .52rem .55rem .22rem; }
  .answer-tools { min-height: 32px; }
  .answer-tools .text-button { min-height: 38px; }
  #answer-form { grid-template-columns: 2.66rem minmax(0,1fr) auto; }
  #answer { min-height: 46px; font-size: 16px; }
  #next { min-height: 48px; box-shadow: 0 4px 15px #0d1616ab; }
  [data-keyboard='open'][data-phase='play'] .game { min-height: max(370px,calc(var(--visible-board,460px) - 10px)); }
  [data-keyboard='open'] #play { gap: .64rem; }
  .wildlife { width: 65px; height: 59px; flex-basis: 65px; }
  .tiers { margin-bottom: .13rem; }
  .tiers .wildlife { width: 35px; height: 33px; }
  .home-guide { padding-inline: .38rem; }
  .guide-intro, .guide-steps, .guide-modes, .guide-faq { grid-template-columns: 1fr; gap: .55rem; }
  .guide-tiers { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .site-footer { flex-wrap: wrap; }
  .trust-copy th, .trust-copy td { padding: .35rem .28rem; font-size: .83rem; overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .journey-landmark.is-visited .landmark-sprite { animation: none; }
  .primary:active:not(:disabled) { translate: none; }
}
