/* charleyboorman.com design system.
   The only place tokens, type, layout primitives, header, footer, buttons, panels and forms are
   defined. Page CSS (public/css/pages/<page>.css) adds to this and never redefines it.
   Themes: html.theme-map (antique map ground) and html.theme-night (deep blue-black, globe pages). */

/* ------------------------------------------------------------------ fonts */
@font-face { font-family: 'Rokkitt'; src: url('/fonts/rokkitt-vf.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Hanken Grotesk'; src: url('/fonts/hanken-grotesk-vf.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

/* ------------------------------------------------------------------ tokens */
:root {
  /* palette, from the current site */
  --gold: #d7c07c;          /* the map's parchment */
  --gold-deep: #a88f4f;
  --brown: #291e0c;         /* bars */
  --ink: #1f1407;           /* footer, text on light */
  --brown-2: #3a2a12;       /* hover on brown */
  --tag: #352815;           /* the logo tag */
  --teal: #8ab9bb;          /* links and active states on dark */
  --teal-2: #99cccc;
  --teal-ink: #235b5e;      /* teal for links on light grounds (6.5:1 on cream) */
  --cream: #f3ecd6;         /* flat panels behind longer text */
  --white: #ffffff;
  --amber: #ffad4d;         /* the route line on night pages, and nothing else */
  --night: #0a0d13;
  --night-2: #121722;
  --night-3: #1b2230;
  --bone: #ece6d6;

  /* type */
  --display: 'Rokkitt', 'Rockwell', 'Roboto Slab', Georgia, serif;
  --sans: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --step--1: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-0: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);      /* 16 to 17px */
  --step-1: clamp(1.1875rem, 1.1rem + 0.35vw, 1.3125rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.6vw, 1.75rem);
  --step-3: clamp(1.75rem, 1.45rem + 1.25vw, 2.5rem);
  --step-4: clamp(2.35rem, 1.7rem + 2.7vw, 4.1rem);
  --measure: 66ch;

  /* space */
  --s-1: 0.5rem; --s0: 1rem; --s1: 1.5rem; --s2: 2.25rem; --s3: 3.5rem; --s4: 5.5rem;
  --gutter: clamp(20px, 4.5vw, 56px);
  --page-max: 1240px;

  /* chrome */
  --bar-h: 56px;
  --tag-w: 204px;
  --radius: 6px;
  --radius-lg: 16px;
  --radius-sm: 3px;
  --radius-media: 4px;
  --radius-card: 10px;
  --radius-pill: 999px;
  --media-bg: #1d1409;
  --media-pin-shadow: 0 14px 24px -18px rgba(31, 20, 7, .85);
  --panel-hover: #fffaf0;
  --map-land: #eedcaa;
  --map-coast: #4a3417;
  --map-grid: #2f5f61;
  --map-waterline: #5d8f96;
  --signature-warm: #e2b563;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --ease-in: cubic-bezier(.5, 0, .75, 0);

  /* theme roles (map theme by default) */
  --bg: var(--gold);
  --text: var(--ink);
  --text-soft: #34270f;
  --heading: var(--ink);
  --link: #102f31;
  --link-hover: var(--ink);
  --panel: var(--cream);
  --panel-text: var(--ink);
  --rule: rgba(31, 20, 7, .16);
  --focus: #0f4c50;
  --bar: var(--brown);
  --bar-text: var(--cream);
  --bar-edge: transparent;
}

.theme-night {
  --bg: var(--night);
  --text: var(--bone);
  --text-soft: #c9c2b2;
  --heading: var(--white);
  --link: var(--teal-2);
  --link-hover: var(--white);
  --panel: var(--night-2);
  --panel-text: var(--bone);
  --rule: rgba(236, 230, 214, .14);
  --focus: var(--teal-2);
  --bar: #161c27;
  --bar-text: var(--bone);
  --bar-edge: rgba(236, 230, 214, .10);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); color: var(--text);
  scrollbar-color: #6e5a33 #c6ae6a; hanging-punctuation: first last;
  overflow-x: clip; } /* with the body rule: nothing that runs past the edge can widen a phone page */
.theme-night { scrollbar-color: #2c3546 var(--night); }
body { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; font: 400 var(--step-0)/1.6 var(--sans);
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: clip; }
main { flex: 1 0 auto; outline: none; }
img, picture, video, canvas, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
p, h1, h2, h3, h4, h5, h6, li, figcaption, blockquote { overflow-wrap: break-word; }
h1, h2, h3, h4 { text-wrap: balance; }
p, li { text-wrap: pretty; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
:target { scroll-margin-top: calc(var(--bar-h) + 56px); }

::selection { background: var(--teal-2); color: var(--ink); }
.theme-night ::selection { background: var(--teal); color: var(--night); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: var(--radius-sm); }
:focus:not(:focus-visible) { outline: none; }

/* Decorative engraved map: native-size detail, subtle softening and upright lettering. */
.ground { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #eee2bd; pointer-events: none; }
.ground-tiles { position: absolute; left: 50%; top: 0; width: max(100vw, 1000px, calc(110vh * 1.777));
  transform: translate3d(-50%, var(--ground-y, 0px), 0); }
.ground-tiles i { position: relative; display: block; aspect-ratio: 1672 / 941; margin-top: -1px; filter: blur(.65px);
  background: url('/media/site/adventure-map-notes.svg') center / 100% 100% no-repeat,
    url('/media/site/adventure-map-v2.webp') center / 100% 100% no-repeat; }
@media (max-width: 600px) { .ground-tiles i { background-image: url('/media/site/adventure-map-v2.webp'); } }
.ground::after { content: ''; position: absolute; inset: 0; background: rgba(238,226,189,.70); }

/* ------------------------------------------------------------------ type */
h1, h2, h3, h4 { font-family: var(--display); color: var(--heading); font-weight: 700; letter-spacing: -.008em; }
h1 { font-size: var(--step-4); line-height: 1.04; max-width: 20ch; font-weight: 750; }
h2 { font-size: var(--step-3); line-height: 1.12; font-weight: 700; }
h3 { font-size: var(--step-2); line-height: 1.2; font-weight: 650; }
h4 { font-size: var(--step-1); line-height: 1.3; }
.lede { font-size: var(--step-1); line-height: 1.5; max-width: 58ch; color: var(--text-soft); }
small, .small { font-size: var(--step--1); }
strong, b { font-weight: 650; }
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .88em; background: var(--rule); padding: .08em .3em; border-radius: 3px; }
hr { border: 0; border-top: 1px solid var(--rule); margin-block: var(--s2); }

a { color: var(--link); text-decoration-line: underline; text-decoration-thickness: 1px; text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
  transition: color .2s var(--ease), text-decoration-color .2s var(--ease); }@media (hover: hover) and (pointer: fine) {
a:hover { color: var(--link-hover); text-decoration-color: currentColor; } }
a:active { opacity: .8; }
/* Taps act at once: no double-tap-to-zoom wait on anything you press (scrolling and pinch-zoom are unchanged). */
a, button, summary, label, select, [role="button"] { touch-action: manipulation; }

.icon { width: 1em; height: 1em; flex: none; }
.icon-out { width: .78em; height: .78em; margin-left: .3em; display: inline-block; vertical-align: -.02em; opacity: .75; }

/* ------------------------------------------------------------------ layout primitives */
.container { width: 100%; max-width: calc(var(--page-max) + var(--gutter) * 2); margin-inline: auto; padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right)); }
.measure { max-width: var(--measure); }
.stack > * + * { margin-top: var(--stack, var(--s0)); }
.stack-tight > * + * { margin-top: .35em; }
.stack-loose > * + * { margin-top: var(--s2); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--cluster, .75rem); align-items: center; }
.grid { display: grid; gap: var(--grid-gap, var(--s1)); grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 16rem), 100%), 1fr)); }
.section { padding-block: var(--s2); }
.page-head { padding-top: calc(var(--bar-h) + clamp(72px, 8vw, 110px)); padding-bottom: var(--s1); }
.page-head > * + * { margin-top: var(--s0); }
.page-head h1 + .lede { margin-top: 1.1rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* flat cream panel behind longer text: no shadow, no texture */
.panel { background: var(--panel); color: var(--panel-text); border-radius: var(--radius); padding: clamp(20px, 3.4vw, 44px); }
.panel h2, .panel h3 { color: var(--panel-text); }
.theme-night .panel { border: 1px solid var(--rule); }

.link-list > li { padding-block: .7rem; border-bottom: 1px solid var(--rule); }
.link-list > li:first-child { padding-top: 0; }
.link-list > li:last-child { border-bottom: 0; }
.link-list time { display: block; margin-top: .1rem; color: var(--text-soft); font-size: var(--step--1); }
.panel .link-list time { color: color-mix(in srgb, var(--panel-text) 72%, transparent); }

.sample-note { font-size: var(--step--1); color: color-mix(in srgb, var(--panel-text) 70%, transparent); border-top: 1px dashed var(--rule); padding-top: .8rem; }

/* reading text (news posts, biography) */
.prose { font-size: var(--step-0); line-height: 1.68; }
.prose > * + * { margin-top: 1.05em; }
.prose > :first-child { margin-top: 0; }
.prose > * { max-width: var(--measure); }
.prose h2 { font-size: var(--step-2); margin-top: 1.8em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose li::marker { color: var(--gold-deep); }
.prose blockquote { border-left: 3px solid var(--teal); padding: .2em 0 .2em 1.1em; font-family: var(--display); font-size: var(--step-1); line-height: 1.45; }
.prose figure { margin-block: 1.6em; max-width: min(100%, 900px); }
.prose figure img { border-radius: 3px; }
.prose figcaption { font-size: var(--step--1); color: color-mix(in srgb, var(--panel-text) 72%, transparent); margin-top: .5em; }
.prose img { max-width: min(100%, 900px); max-height: min(78vh, 760px); width: auto; }
/* YouTube facades (views/markdown.mjs youtubeFacade, activated by /js/yt.js): a poster and a play
   button that is a plain link to YouTube until pressed. Pages may add sizing; these are the basics. */
.yt { position: relative; margin: 0; aspect-ratio: 16 / 9; max-width: 560px; border-radius: 4px; overflow: hidden; background: var(--ink); }
.prose > .yt { margin-block: 1.6em; }
.yt-link { position: absolute; inset: 0; display: block; color: var(--cream); text-decoration: none; }
.yt-link img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; object-fit: cover; border-radius: 0;
  filter: saturate(.9) brightness(.82); transition: filter .3s var(--ease), transform .6s var(--ease); }@media (hover: hover) and (pointer: fine) {
.yt-link:hover { color: var(--cream); } }@media (hover: hover) and (pointer: fine) {
.yt-link:hover img { filter: saturate(1) brightness(.92); transform: scale(1.015); } }
.yt-play { position: absolute; left: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: 0 16px 0 12px;
  border-radius: 999px; background: rgba(31, 20, 7, .86); font: 600 15px/1 var(--sans); transition: background-color .2s var(--ease), transform .15s var(--ease); }
.yt-play svg { width: 22px; height: 22px; color: var(--teal-2); }@media (hover: hover) and (pointer: fine) {
.yt-link:hover .yt-play { background: var(--ink); } }
.yt-link:active .yt-play { transform: scale(.97); }
.yt-link:focus-visible { outline-offset: -4px; outline-color: var(--teal-2); }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-note { position: absolute; left: 0; right: 0; top: 0; z-index: 1; padding: .55rem .8rem; background: rgba(31, 20, 7, .9); color: var(--cream);
  font-size: var(--step--1); line-height: 1.4; pointer-events: none; }

/* ------------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 46px; padding: .55em 1.25em;
  border-radius: var(--radius); background: var(--brown); color: var(--cream); border: 1.5px solid var(--brown);
  font: 600 var(--step--1)/1.2 var(--sans); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease); }@media (hover: hover) and (pointer: fine) {
.btn:hover { background: var(--brown-2); border-color: var(--brown-2); color: var(--white); } }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-quiet { background: transparent; color: var(--ink); border-color: color-mix(in srgb, var(--ink) 55%, transparent); }@media (hover: hover) and (pointer: fine) {
.btn-quiet:hover { background: rgba(31, 20, 7, .08); color: var(--ink); border-color: var(--ink); } }
.btn-on-dark, .theme-night .btn { background: var(--teal); border-color: var(--teal); color: var(--ink); }@media (hover: hover) and (pointer: fine) {
.btn-on-dark:hover, .theme-night .btn:hover { background: var(--teal-2); border-color: var(--teal-2); color: var(--ink); } }
.theme-night .btn-quiet { background: transparent; color: var(--bone); border-color: rgba(236, 230, 214, .4); }@media (hover: hover) and (pointer: fine) {
.theme-night .btn-quiet:hover { background: rgba(236, 230, 214, .08); border-color: var(--bone); color: var(--white); } }

/* ------------------------------------------------------------------ forms */
label { display: block; font-weight: 600; font-size: var(--step--1); margin-bottom: .35rem; }
input:not([type="checkbox"], [type="radio"], [type="submit"], [type="button"]), textarea, select {
  display: block; width: 100%; min-height: 46px; padding: .6em .8em; background: var(--white); color: var(--ink);
  border: 1.5px solid color-mix(in srgb, var(--ink) 35%, transparent); border-radius: var(--radius);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
textarea { min-height: 8rem; resize: vertical; line-height: 1.5; }@media (hover: hover) and (pointer: fine) {
input:hover, textarea:hover, select:hover { border-color: color-mix(in srgb, var(--ink) 60%, transparent); } }
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--ink); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--teal-ink); width: 1.1em; height: 1.1em; }
::placeholder { color: #7a6a4c; opacity: 1; }
.theme-night input:not([type="checkbox"], [type="radio"]), .theme-night textarea, .theme-night select {
  background: var(--night-3); color: var(--bone); border-color: rgba(236, 230, 214, .25); }
.theme-night ::placeholder { color: #8f8a7e; }

/* ------------------------------------------------------------------ skip link */
.skip-link { position: fixed; left: 12px; top: 10px; z-index: 100; padding: .7em 1.1em; border-radius: var(--radius);
  background: var(--cream); color: var(--ink); font-weight: 650; text-decoration: none; transform: translateY(-160%);
  transition: transform .25s var(--ease); }
.skip-link:focus { transform: none; }

/* ------------------------------------------------------------------ header
   A dark brown bar hanging from the top of the window with the tag logo hanging from its centre,
   nav either side. Slims after scroll (site.js adds .is-slim). Phones: tag at the left, Menu at the right. */
.site-header { position: fixed; inset: 0 0 auto 0; z-index: 40; pointer-events: none; }
.bar { position: relative; pointer-events: auto; height: var(--bar-h); width: min(100% - 2 * clamp(12px, 2.4vw, 32px), var(--page-max) + 40px);
  margin-inline: auto; background: var(--bar); color: var(--bar-text); border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: inset 0 -1px 0 var(--bar-edge), 0 10px 24px -16px rgba(20, 12, 4, calc(.55 * var(--header-fade, 1)));
  transition: transform .45s var(--ease); }
.site-header::before { opacity: var(--header-fade, 1); }
.site-header.is-slim .bar { transform: translateY(-8px); }

.tag { position: absolute; top: 0; left: 50%; z-index: 2; width: var(--tag-w); transform: translateX(-50%); transform-origin: 50% 0;
  transition: transform .45s var(--ease); border-radius: 0 0 8px 8px; }
.tag img { width: 100%; height: auto; filter: drop-shadow(0 6px 7px rgba(20, 12, 4, .38)); }
.site-header.is-slim .tag { transform: translateX(-50%) translateY(8px) scale(.5); }@media (hover: hover) and (pointer: fine) {
.tag:hover img { filter: drop-shadow(0 8px 9px rgba(20, 12, 4, .45)); } }
.tag:active { transform: translateX(-50%) translateY(1px); }
.site-header.is-slim .tag:active { transform: translateX(-50%) translateY(9px) scale(.5); }
.tag:focus-visible { outline-color: var(--teal-2); outline-offset: 4px; }

.nav { display: grid; grid-template-columns: 1fr calc(var(--tag-w) + 20px) 1fr; height: 100%; }
.nav-list { display: flex; align-items: stretch; justify-content: space-evenly; margin: 0; padding: 0 clamp(4px, 1vw, 16px); }
.nav-left { grid-column: 1; }
.nav-right { grid-column: 3; }
.nav-list li { display: flex; }
.nav-link { position: relative; display: flex; align-items: center; padding: 0 clamp(6px, .9vw, 14px); color: var(--bar-text);
  font: 600 15px/1 var(--sans); letter-spacing: .012em; text-decoration: none; white-space: nowrap; border-radius: 4px; }
.nav-link::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 22px; height: 4px; margin-left: -11px; border-radius: 3px 3px 0 0;
  background: var(--teal); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .3s var(--ease); }@media (hover: hover) and (pointer: fine) {
.nav-link:hover { color: var(--teal-2); } }@media (hover: hover) and (pointer: fine) {
.nav-link:hover::after { transform: scaleY(.5); } }
.nav-link[aria-current="page"] { color: var(--teal-2); }
.nav-link[aria-current="page"]::after { transform: none; }
.nav-link:active { transform: translateY(1px); }
.nav-link:focus-visible { outline: 2px solid var(--teal-2); outline-offset: -8px; }
.nav-link .icon-out { margin-left: .35em; }
/* The Menu button: shown in the compact header only. Without JS it is a link to the footer's site links. */
.menu-btn { position: absolute; right: 8px; top: 50%; display: none; align-items: center; gap: .55rem; height: 44px; padding: 0 14px 0 16px;
  margin-top: -22px; border-radius: 999px; color: var(--bar-text); border: 1px solid rgba(243, 236, 214, .28); text-decoration: none;
  font: 600 15px/1 var(--sans); letter-spacing: .01em; transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .15s var(--ease); }
.menu-btn .icon { width: 22px; height: 22px; }
.menu-btn:hover { color: var(--bar-text); background: rgba(243, 236, 214, .08); border-color: rgba(243, 236, 214, .5); }
.menu-btn:active { transform: scale(.96); }
.menu-btn:focus-visible { outline-color: var(--teal-2); }

@media (max-width: 1080px) {
  .nav-link { font-size: 14px; padding: 0 7px; }
  :root { --tag-w: 172px; }
}

/* The compact header: phones (by width, so it works before any script runs) and any width where the
   labels would not fit beside the tag (site.js measures and adds .is-compact). Keep the two blocks identical. */
@media (max-width: 940px) {
  .site-header { --tag-w: 112px; }
  .site-header .bar { width: calc(100% - 16px); border-radius: 0 0 14px 14px; }
  .site-header .nav { display: none; }
  .site-header .menu-btn { display: inline-flex; }
  .site-header .tag { left: 14px; transform: none; }
  .site-header.is-slim .tag { transform: translateY(8px) scale(.82); transform-origin: 0 0; }
  .site-header .tag:active { transform: translateY(1px); }
  .site-header.is-slim .tag:active { transform: translateY(9px) scale(.82); }
  .site-header.is-slim .menu-btn { transform: translateY(4px); }
  .site-header.is-slim .menu-btn:active { transform: translateY(4px) scale(.96); }
}
.site-header.is-compact { --tag-w: 112px; }
.site-header.is-compact .bar { width: calc(100% - 16px); border-radius: 0 0 14px 14px; }
.site-header.is-compact .nav { display: none; }
.site-header.is-compact .menu-btn { display: inline-flex; }
.site-header.is-compact .tag { left: 14px; transform: none; }
.site-header.is-compact.is-slim .tag { transform: translateY(8px) scale(.82); transform-origin: 0 0; }
.site-header.is-compact .tag:active { transform: translateY(1px); }
.site-header.is-compact.is-slim .tag:active { transform: translateY(9px) scale(.82); }
.site-header.is-compact.is-slim .menu-btn { transform: translateY(4px); }
.site-header.is-compact.is-slim .menu-btn:active { transform: translateY(4px) scale(.96); }

/* ------------------------------------------------------------------ phone menu sheet (a modal <dialog>) */
/* The moving edge and inset reveal share a reversible compositor timeline in menu.js. */
.sheet { position: fixed; inset: 0; width: 100%; max-width: none; height: 100%; height: 100dvh; max-height: none; margin: 0; padding: 0;
  border: 0; background: var(--gold); color: var(--ink); overflow-y: auto; overscroll-behavior: contain;
  background-image: linear-gradient(rgba(243,236,214,.88), rgba(215,192,124,.92)), url('/media/site/adventure-map-v2.webp');
  background-size: cover, auto max(1100px, 180vh); background-position: center; }
.theme-night .sheet { background-color: var(--night); color: var(--bone);
  background-image: linear-gradient(rgba(15,19,27,.94), rgba(15,19,27,.96)), url('/media/site/adventure-map-v2.webp'); }
.sheet::backdrop { background: rgba(20,12,4,.28); }
.sheet[open] { display: block; }
.sheet-in { display: flex; flex-direction: column; min-height: 100%; padding: 0 20px max(24px, env(safe-area-inset-bottom)); }
.sheet-top { position: relative; height: var(--bar-h); flex: none; }
.sheet-tag { position: absolute; left: 2px; top: 0; width: 112px; }
.sheet-tag img { width: 100%; height: auto; }
.sheet-close { position: absolute; right: -4px; top: 6px; display: inline-flex; align-items: center; gap: .55rem; height: 44px; padding: 0 14px 0 16px;
  border-radius: 999px; border: 1px solid var(--rule); color: inherit; font: 600 15px/1 var(--sans); }
.sheet-close .icon { width: 22px; height: 22px; }
.sheet-close:hover { background: var(--rule); }
.sheet-close:active { transform: scale(.96); }
.sheet-close:focus-visible, .sheet a:focus-visible { outline-color: var(--focus); }
.sheet-nav { margin-top: clamp(28px, 6vh, 64px); }
.sheet-nav ul { margin: 0; }
.sheet-nav li { border-bottom: 1px solid var(--rule); }
.sheet-link { position: relative; display: flex; align-items: center; min-height: 56px; padding: 6px 0 6px 18px; color: inherit;
  font: 650 clamp(26px, 7.4vw, 34px)/1.1 var(--display); text-decoration: none; letter-spacing: -.005em; }
.sheet-link::before { content: ''; position: absolute; left: 0; top: 50%; width: 4px; height: 26px; margin-top: -13px; border-radius: 2px;
  background: currentColor; transform: scaleY(0); }
.sheet-link[aria-current="page"], .sheet-link:hover, .sheet-link.is-chosen { color: var(--link); }
.sheet-link[aria-current="page"]::before, .sheet-link.is-chosen::before { transform: none; }
.sheet.has-choice .sheet-link[aria-current="page"]:not(.is-chosen) { color: inherit; }
.sheet.has-choice .sheet-link[aria-current="page"]:not(.is-chosen)::before { transform: scaleY(0); }
.sheet-link.is-chosen { background: var(--rule); transition: none; }
.sheet-link:active { opacity: .7; }
.sheet-link .icon-out { width: .55em; height: .55em; margin-left: .35em; }
.sheet-foot { margin-top: auto; padding-top: var(--s2); font-size: var(--step--1); line-height: 1.6; color: var(--text-soft); }
.sheet-foot-h { font: 650 17px/1.3 var(--display); color: inherit; margin-bottom: .3rem; }
.sheet-foot a { color: var(--link); }
.sheet-roll { position: fixed; z-index: 3; pointer-events: none; left: 0; right: 0; top: -48px; height: 48px;
  background: linear-gradient(180deg, #9b814b00, #b59a5f 12%, #e9dbab 35%, #f4ebca 48%, #d8c38b 70%, #897044 95%, #695231);
  box-shadow: 0 9px 15px -6px rgba(31,20,7,.35); }
.theme-night .sheet-roll { background: linear-gradient(180deg, #10141b00, #1a202a 15%, #333b46 43%, #252d37 65%, #0a0e15 100%); }
.menu-btn.is-pressed { background: rgba(243,236,214,.16); border-color: var(--cream); }
.menu-btn:active, button:active, summary:active { transition-duration: 0s; }
button:active, summary:active { opacity: .8; }
input, textarea { touch-action: manipulation; }
html.menu-open, html.menu-open body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .sheet-roll { display: none; } }

/* ------------------------------------------------------------------ footer */
.site-footer { position: relative; margin-top: clamp(64px, 9vw, 128px); background: var(--ink); color: rgba(243, 236, 214, .82);
  font-size: var(--step--1); line-height: 1.6; padding-top: clamp(64px, 7vw, 88px); }
.theme-night .site-footer { background: #07090d; border-top: 1px solid var(--rule); }
.site-footer a { color: var(--cream); text-decoration-color: rgba(243, 236, 214, .35); }@media (hover: hover) and (pointer: fine) {
.site-footer a:hover { color: var(--teal-2); text-decoration-color: currentColor; } }
.site-footer :focus-visible { outline-color: var(--teal-2); }

/* the quiet nod to the trail: a stretch of tyre track along the top edge, with the bike parked at its end */
.footer-trail { position: absolute; top: 0; right: max(var(--gutter), calc((100% - var(--page-max)) / 2)); width: min(520px, 62%); height: 64px; pointer-events: none; }
.footer-track { position: absolute; left: 0; top: 0; width: calc(100% - 52px); height: 100%; overflow: visible; }
.footer-track path { fill: none; stroke-linecap: round; }
.track-bed { stroke: url(#trail-fade-bed); stroke-width: 12; }
.track-tread { stroke: url(#trail-fade); stroke-width: 1.6; stroke-dasharray: 1.4 4.6; }
.footer-bike { position: absolute; right: 0; top: -8px; width: 38px; height: auto; transform: rotate(64deg); transform-origin: 50% 50%;
  filter: drop-shadow(3px 5px 3px rgba(0, 0, 0, .55)); }

.footer-main { display: grid; gap: var(--s2) clamp(24px, 4vw, 56px); grid-template-columns: minmax(0, 1.25fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.1fr);
  padding-bottom: var(--s2); }
.footer-brand { max-width: 34ch; }
.footer-mark { display: inline-block; color: var(--cream); border-radius: 4px; }@media (hover: hover) and (pointer: fine) {
.footer-mark:hover { color: var(--white); } }
.wordmark { width: 150px; height: auto; }
.footer-blurb { margin-top: 1.1rem; }
.footer-h { font: 650 18px/1.3 var(--display); color: var(--cream); letter-spacing: 0; margin-bottom: .55rem; }
.footer-col p + .footer-lines { margin-top: .5rem; }
.footer-lines li + li { margin-top: .2rem; }
.footer-lines a { white-space: nowrap; }
.footer-mail { margin-top: 1.1rem; min-height: 42px; }
.site-footer .footer-mail { color: var(--ink); text-decoration: none; }
.footer-nav-list { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: .2rem 1.6rem; }
.footer-nav-list a { text-decoration: none; }
.footer-nav-list a[aria-current="page"] { color: var(--teal-2); }@media (hover: hover) and (pointer: fine) {
.footer-nav-list a:hover { text-decoration: underline; } }

.footer-partners { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1.4rem; padding-block: 1.1rem; }
.footer-partners::before, .footer-base::before { content: ''; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); border-top: 1px solid rgba(243, 236, 214, .12); }
.footer-h-inline { margin: 0; font-size: 16px; }
.footer-h-inline a { text-decoration: none; }@media (hover: hover) and (pointer: fine) {
.footer-h-inline a:hover { text-decoration: underline; } }
.partner-row { display: flex; flex-wrap: wrap; gap: .2rem 1.5rem; margin: 0; }
.partner-row li { font: 600 15px/1.5 var(--display); letter-spacing: .02em; color: rgba(243, 236, 214, .7); }
.partner-row a { color: rgba(243, 236, 214, .82); text-decoration: none; }@media (hover: hover) and (pointer: fine) {
.partner-row a:hover { color: var(--teal-2); text-decoration: underline; } }
.partner-row .partner-more { font: 600 13.5px/1.5 var(--sans); letter-spacing: 0; }
.partner-row .partner-more a { color: var(--teal-2); text-decoration: underline; text-decoration-color: rgba(153, 204, 204, .4); }


.footer-base { position: relative; display: grid; justify-items: center; text-align: center; gap: .5rem; padding-block: 1.1rem max(1.4rem, env(safe-area-inset-bottom));
  color: rgba(243, 236, 214, .78); font-size: var(--step--1); }
.footer-base a { color: rgba(243, 236, 214, .78); }

@media (max-width: 1080px) {
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .footer-main { grid-template-columns: minmax(0, 1fr); gap: var(--s1); }
  .footer-trail { width: 78%; }
}

/* ------------------------------------------------------------------ scroll reveal (site.js adds .is-pending only to items below the fold) */
[data-reveal].is-pending { opacity: 0; transform: translateY(18px); }
[data-reveal].is-revealed { transition: opacity .9s var(--ease), transform 1.1s var(--ease); transition-delay: var(--reveal-delay, 0ms); }

/* ------------------------------------------------------------------ reduced motion: everything shown, still */
.scene-motion { position: fixed; z-index: 45; right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom)); min-height: 44px; max-width: calc(100% - 32px);
  padding: .65rem 1rem; border: 1px solid var(--cream); border-radius: var(--radius-pill);
  background: #291e0c; color: #f3ecd6; font: 600 .9375rem/1.3 var(--sans); }
.scene-motion[hidden] { display: none; }
html.menu-open .scene-motion { visibility: hidden; }
html.motion-paused .trail .river-flow,
html.motion-paused .trail .cue-arrow i,
html.motion-paused .latitude .cue svg { animation-play-state: paused; }
@media print { .scene-motion { display: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-header, .site-header .bar, .site-header .tag, .skip-link,
  .footer-bike, [data-reveal].is-revealed { transition: none; }
  .nav-link::before, .nav-link::after, .tag img { transition: none; }
  .btn, .yt-link, .yt-play { transform: none; transition-property: color, background-color, border-color, filter; }
  .btn:active, .yt-link:active .yt-play, .yt-link:hover img { transform: none; }
  .yt-link img { transition-property: filter; }
  [data-reveal].is-pending { opacity: 1; transform: none; }
  .ground-tiles { transform: translate3d(-50%, 0, 0); }
}

/* ------------------------------------------------------------------ print */
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .ground, .site-header, .sheet, .footer-trail, .skip-link, .footer-nav, .footer-mail { display: none !important; }
  .page-head { padding-top: 0; }
  .panel { background: none; padding: 0; }
  .site-footer { background: none; color: #000; padding-top: 1rem; border-top: 1px solid #999; }
  .site-footer a, .footer-h, .partner-row li { color: #000; }
  a { color: #000; }
  .prose a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: .85em; }
  h1, h2, h3 { break-after: avoid; }
  img, figure { break-inside: avoid; }
}

/* Touch still moves focus into the dialog, without a keyboard-only focus outline. */
.sheet.pointer-open .sheet-link:focus-visible { outline: none; }

/* Phone reading sizes and separate, thumb-sized footer destinations. */
@media (max-width: 760px) {
  :root { --step--1: 1rem; }
  .footer-lines a, .footer-nav-list a, .partner-row a, .footer-base a {
    display: inline-flex; align-items: center; min-height: 44px;
  }
  .footer-mail { min-height: 44px; }
  .footer-lines a { white-space: normal; overflow-wrap: anywhere; }
}

/* Authored scene palettes, centralised without changing their scope or values. */
.trail {
  --ink: #2a1e0b;
  --ink-2: #4a3519;
  --ink-3: #6b4d26;
  --bar: #2a1e0b;
  --teal: #8ab9bb;
  --teal-2: #99cccc;
  --teal-dk: #2f6b6d;
  --gold-lt: #e3cf8f;
  --cream: #f6efdc;
  --rule: rgba(74, 53, 25, .22);
  --spring: cubic-bezier(.34, 1.45, .55, 1);
}
.bearing {
  --b-night: #070b14;
  --b-bone: #ede7db;
  --bone-2: rgba(237, 231, 219, .74);
  --bone-3: rgba(237, 231, 219, .5);
  --b-rule: rgba(237, 231, 219, .16);
  --amber: #ffad4d;
  --b-text: 'Hanken Grotesk', system-ui, sans-serif;
}
.latitude {
  --ivory: #f2ebdc;
  --ivory-2: rgba(242, 235, 220, .74);
  --ivory-3: rgba(242, 235, 220, .45);
  --sig: #e8336d;
  --sig-label: #d72960;
  --l-ink: #0d1216;
}

.st { --st-bg: var(--media-bg); --st-line: var(--teal-2); }

/* The studio signature uses the existing Good Thinking bulb and Switch reveal. */
.site-footer .footer-credit { display: inline-flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px 22px; color: var(--cream); text-decoration: none; border-radius: var(--radius-card); }
.footer-credit__mark { position: relative; display: block; height: 32px; aspect-ratio: 616 / 1052; }
.footer-credit__bulb { position: relative; display: block; width: 100%; height: 100%; background: currentColor; mask: url('/media/site/good-thinking-bulb.svg') center / contain no-repeat; -webkit-mask: url('/media/site/good-thinking-bulb.svg') center / contain no-repeat; }
.footer-credit__glow { position: absolute; left: 50%; top: 36%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--signature-warm) 85%, transparent), color-mix(in srgb, var(--signature-warm) 33%, transparent) 55%, transparent); opacity: .62; pointer-events: none; }
.footer-credit__words { font: 500 1rem/1.5 var(--sans); letter-spacing: .08em; }
.footer-credit__words > span, .footer-credit__switch { display: inline-block; }
.footer-credit__switch { transform-origin: 50% 0; }
.footer-credit[data-armed] [data-credit-word], .footer-credit[data-armed] .footer-credit__bulb, .footer-credit[data-armed] .footer-credit__glow { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .footer-credit[data-armed] [data-credit-word], .footer-credit[data-armed] .footer-credit__bulb { opacity: 1; }
  .footer-credit[data-armed] .footer-credit__glow { opacity: .62; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .bar { background: var(--bar); backdrop-filter: none; }
  .ground { opacity: 0; }
  .site-header::before { display: none; }
  .footer-credit__glow { display: none; }
}
@media (prefers-contrast: more) {
  :root { --text-soft: var(--text); --rule: currentColor; }
  a { text-decoration-thickness: 2px; }
}

time { font-variant-numeric: tabular-nums; }
