/* aong.dev hub. Pixel fonts and rounded glass panels floating over the three.js valley (js/world.js).
   Two themes: html[data-theme="light"] (daytime: pale paper panels) and "dark" (night: deep glass).
   html[data-mode] says what picks the theme: clock, light, dark or system (see js/hub.js).
   The page is long on purpose: scrolling it moves the camera from the sky down to the ground, and the
   projects sit along a trail on the way down, with smaller projects branching off to the side. */

/* Registered so the theme colours fade instead of snapping when the theme changes. */
@property --ink { syntax: "<color>"; inherits: true; initial-value: #1d2433; }
@property --ink-dim { syntax: "<color>"; inherits: true; initial-value: #586174; }
@property --panel { syntax: "<color>"; inherits: true; initial-value: rgba(250, 247, 239, .88); }
@property --panel-solid { syntax: "<color>"; inherits: true; initial-value: #f6f2e8; }
@property --panel-sub { syntax: "<color>"; inherits: true; initial-value: rgba(29, 36, 51, .06); }
@property --line { syntax: "<color>"; inherits: true; initial-value: rgba(29, 36, 51, .2); }
@property --rope { syntax: "<color>"; inherits: true; initial-value: rgba(250, 247, 239, .9); }
@property --rope-shadow { syntax: "<color>"; inherits: true; initial-value: rgba(29, 36, 51, .35); }

:root {
  --menu-bg: rgba(250, 247, 239, .95);
  --f-head: 'Pixelify Sans', ui-monospace, monospace;
  --f-body: 'Pixelify Sans', system-ui, sans-serif;
  --f-label: 'Silkscreen', ui-monospace, monospace;

  --leaf: #5bbf73; --leaf-deep: #2f7a48;
  --sky: #58a6e8; --sky-deep: #2c6aa6;
  --sun: #f4b942; --sun-deep: #a8740f;
  --berry: #e0708e; --berry-deep: #9c3a58;
  --night: #0d1322;
  --r: 16px;
  --bar: 72px;

  --ink: #1d2433;
  --ink-dim: #586174;
  --panel: rgba(250, 247, 239, .88);
  --glass: rgba(250, 247, 239, .58);
  --glass-edge: rgba(255, 255, 255, .45);
  --panel-solid: #f6f2e8;
  --panel-sub: rgba(29, 36, 51, .06);
  --line: rgba(29, 36, 51, .2);
  --rope: rgba(250, 247, 239, .9);
  --rope-shadow: rgba(29, 36, 51, .35);
  --focus: #2c6aa6;
  color-scheme: light;
  transition: --ink .8s ease, --ink-dim .8s ease, --panel .8s ease, --panel-solid .8s ease, --panel-sub .8s ease,
    --line .8s ease, --rope .8s ease, --rope-shadow .8s ease;
}
html[data-theme="dark"] {
  --ink: #eef1f7;
  --ink-dim: #a9b2c4;
  --panel: rgba(13, 18, 32, .8);
  --glass: rgba(13, 18, 32, .5);
  --glass-edge: rgba(255, 255, 255, .14);
  --menu-bg: rgba(13, 18, 32, .94);
  --panel-solid: #121a2c;
  --panel-sub: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .16);
  --rope: rgba(255, 236, 190, .75);
  --rope-shadow: rgba(0, 0, 0, .5);
  --focus: #f4b942;
  color-scheme: dark;
}
@media (prefers-reduced-motion: reduce) { :root { transition: none; } }

/* the page scrollbar: the browser's own is hidden, and hub.js draws a thin frosted-glass one that
   floats over the page (.scrollbar), so there's no strip down the side. Boxes that scroll inside the
   page keep a slim themed scrollbar. */
html { scrollbar-width: none; }
html::-webkit-scrollbar { display: none; }
html { --sb-thumb: rgba(255, 255, 255, .55); --sb-hover: var(--sun); }
html[data-theme="dark"] { --sb-thumb: rgba(255, 236, 190, .45); }
.scrollbar {
  position: fixed; z-index: 25; top: calc(var(--bar) + 10px); bottom: 12px; right: 5px; width: 10px;
  border-radius: 999px; background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(10px) saturate(160%); backdrop-filter: blur(10px) saturate(160%);
  opacity: .45; transition: opacity .3s, width .2s;
}
.scrollbar.is-active, .scrollbar:hover, .scrollbar.is-dragging { opacity: 1; width: 12px; }
.scrollbar[hidden] { display: none; }
.scrollbar-thumb {
  position: absolute; left: 2px; right: 2px; top: 0; min-height: 36px; border-radius: 999px; cursor: grab;
  background: var(--sb-thumb);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 8px rgba(0, 0, 0, .25);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background-color .2s;
}
.scrollbar-thumb:hover, .is-dragging .scrollbar-thumb { background: var(--sb-hover); }
.is-dragging .scrollbar-thumb { cursor: grabbing; }
@media (pointer: coarse) { .scrollbar { display: none; } }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background-color: var(--line); background-clip: padding-box; border: 2px solid transparent; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background-color: var(--sb-hover); }
}

/* page changes: a cross-fade where the browser can (cross-document view transitions), otherwise
   a fade in and out (html.fade-pages, set by the boot script; hub.js fades out) */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; }
.topbar-wrap { view-transition-name: topbar; }
.fade-pages main, .fade-pages .footer { animation: page-in .4s ease both; }
.fade-pages.leaving main, .fade-pages.leaving .footer { opacity: 0; transition: opacity .2s ease; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .fade-pages main, .fade-pages .footer { animation: none; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--bar) + 12px); }
body {
  margin: 0; min-height: 100vh;
  background: var(--night); color: var(--ink);
  font: 400 1.08rem/1.55 var(--f-body);
  -webkit-font-smoothing: none;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--sky-deep); }
html[data-theme="dark"] a:hover { color: var(--sun); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--f-head); font-weight: 600; line-height: 1.05; margin: 0; letter-spacing: .01em; }
p { margin: 0; }

/* the 3D world sits behind everything */
#scene {
  position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: -2;
  image-rendering: pixelated;
  /* shown until three.js draws, and when WebGL isn't available */
  background: linear-gradient(180deg, #2f7fd6 0%, #b7e2f6 60%, #4f9a52 61%, #2f6b3f 100%);
}
html[data-theme="dark"] #scene { background: linear-gradient(180deg, #060a20 0%, #26356a 60%, #1c2e2a 61%, #0f1a18 100%); }
#scene.is-live { background: var(--night); }

/* ---------- panels ---------- */
/* liquid glass: a see-through panel that blurs and brightens what's behind it, with a bright rim
   along the top edge, a soft sheen across it and a faint shade along the bottom. */
.panel {
  --glass-rim: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(0, 0, 0, .08), inset 0 0 0 1px var(--glass-edge);
  position: relative; isolation: isolate;
  background: var(--glass); color: var(--ink);
  border-radius: var(--r);
  box-shadow: var(--glass-rim), 0 12px 32px rgba(0, 0, 0, .2);
  -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%);
}
.panel::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: linear-gradient(140deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .06) 38%, transparent 60%, rgba(255, 255, 255, .08));
}
html[data-theme="dark"] .panel::after { background: linear-gradient(140deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .03) 38%, transparent 60%, rgba(255, 255, 255, .05)); }
.label {
  font: 400 .78rem/1.2 var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-dim);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px 3px; border-radius: 999px;
  font: 400 .72rem/1 var(--f-label); letter-spacing: .06em; text-transform: uppercase;
  background: var(--panel-sub); box-shadow: inset 0 0 0 2px var(--line); color: var(--ink);
}
.chip-open { background: var(--leaf); color: #0f1a12; box-shadow: none; }
.chip-soon { color: var(--ink-dim); }
.chip-dev { background: var(--sun); color: #1d1606; box-shadow: none; }

/* ---------- buttons ---------- */
.btn {
  --b: var(--sky); --b-deep: var(--sky-deep);
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px 9px; border: 0; border-radius: 10px; cursor: pointer;
  font: 600 1rem/1 var(--f-head); color: #0f1420; text-decoration: none;
  background: var(--b);
  box-shadow: inset 0 -4px 0 var(--b-deep), inset 0 0 0 2px rgba(0,0,0,.18);
  transition: transform .12s, filter .12s;
}
.btn:hover { color: #0f1420; filter: brightness(1.08); transform: translateY(-2px); }
.btn:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 var(--b-deep), inset 0 0 0 2px rgba(0,0,0,.18); }
.btn-leaf { --b: var(--leaf); --b-deep: var(--leaf-deep); }
.btn-sun { --b: var(--sun); --b-deep: var(--sun-deep); }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-quiet:hover { color: var(--ink); background: var(--panel-sub); }
.btn-sm { padding: 8px 12px 7px; font-size: .92rem; }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover { transform: none; } }

/* ---------- top bar: stays at the top, blurring what scrolls under it ---------- */
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 30; padding: 10px 14px; border-radius: 10px; background: var(--panel-solid); color: var(--ink); }
.skip-link:focus { top: 12px; }
.topbar-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  height: calc(var(--bar) + 26px);
  pointer-events: none;
}
.topbar-wrap::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 12, 22, .42), rgba(8, 12, 22, .14) 70%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(160%); backdrop-filter: blur(16px) saturate(160%);
  -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent);
  mask-image: linear-gradient(180deg, #000 70%, transparent);
}
.topbar {
  position: relative; pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1180px; height: var(--bar); margin: 0 auto; padding: 0 20px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.logo:hover { color: #fff; }
/* the animated leaf: 96 frames of 48px in img/leaf.png, played at 12 frames a second */
.logo-icon {
  width: 48px; height: 48px; flex: none;
  background: url(/img/leaf.png) 0 0 / 4608px 48px no-repeat;
  image-rendering: pixelated;
  animation: leaf 8s steps(96) infinite;
}
@keyframes leaf { to { background-position: -4608px 0; } }
@media (prefers-reduced-motion: reduce) { .logo-icon { animation: none !important; } }
.logo-text { font: 600 1.6rem/1 var(--f-head); text-shadow: 0 2px 0 rgba(0,0,0,.45); }
.logo-dot { color: var(--sun); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 8px 10px; border-radius: 8px; color: #fff; text-decoration: none; font: 600 1.05rem/1 var(--f-head); text-shadow: 0 2px 0 rgba(0,0,0,.5); }
.nav a:hover { color: var(--sun); }
.nav-toggle { display: none; }

/* dropdowns (Projects, theme): a button that opens a small glass list under it */
.glass {
  background: var(--glass); color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 0 0 1px var(--glass-edge), 0 14px 34px rgba(0, 0, 0, .3);
  -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
}
.menu { position: relative; }
.menu-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 0; border-radius: 8px; cursor: pointer;
  background: transparent; color: #fff; font: 600 1.05rem/1 var(--f-head); text-shadow: 0 2px 0 rgba(0,0,0,.5);
}
.menu-btn:hover, .menu-btn[aria-expanded="true"] { color: var(--sun); }
.caret { font-size: .7em; transition: transform .2s; }
.menu-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }
.menu-list {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 2; min-width: 200px;
  display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 14px;
  animation: menu-in .16s ease-out;
  /* the top bar is its own backdrop (view-transition-name), so the blur stops at its edge:
     keep the list nearly solid so it reads over anything below the bar */
  background: var(--menu-bg);
}
.menu-list[hidden] { display: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-4px); } }
.menu-list a, .menu-list button {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 9px; cursor: pointer; white-space: nowrap;
  background: transparent; color: var(--ink); text-align: left; text-decoration: none; text-shadow: none;
  font: 600 1rem/1 var(--f-head);
}
.menu-list a:hover, .menu-list button:hover { background: var(--panel-sub); color: var(--ink); }
.menu-list [aria-current="true"], .menu-list [aria-checked="true"] { background: var(--sun); color: #1d1606; }
.menu-list svg { width: 18px; height: 18px; flex: none; image-rendering: pixelated; shape-rendering: crispEdges; }
@media (prefers-reduced-motion: reduce) { .menu-list { animation: none; } .caret { transition: none; } }

/* round glass buttons in the top bar: GitHub and the theme */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; height: 38px; min-width: 38px; padding: 0 10px;
  border: 0; border-radius: 12px; cursor: pointer; color: #fff; text-decoration: none;
  background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
  transition: background-color .2s, color .2s;
}
.icon-btn:hover, .icon-btn[aria-expanded="true"] { color: #1d1606; background: var(--sun); }
.icon-btn svg { width: 18px; height: 18px; image-rendering: pixelated; shape-rendering: crispEdges; }
.theme-icon { display: grid; place-items: center; }
.theme-btn { text-shadow: none; padding: 0 8px 0 10px; }

/* ---------- hub layout ---------- */
.hub { max-width: 1180px; margin: 0 auto; padding: calc(var(--bar) + 8px) 20px 0; }

/* the hero fills the first screen: a big pixel title straight on the sky, no box */
.hero, .hero.panel {
  min-height: 100vh; min-height: 100svh; margin-top: calc(-1 * (var(--bar) + 8px)); padding: calc(var(--bar) + 24px) 0 9vh;
  display: grid; align-content: center; justify-items: center; gap: 22px; text-align: center;
  background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; isolation: auto;
}
.hero.panel::after { content: none; }
.hero .label { color: var(--sun); text-shadow: 0 2px 0 rgba(0, 0, 0, .55); letter-spacing: .3em; }
.hero h1 {
  font-size: clamp(3rem, 10vw, 8.6rem); line-height: .98; color: #fff; max-width: 14ch;
  text-shadow: none; filter: drop-shadow(0 9px 0 rgba(13, 19, 34, .9));
}
/* a band of light sweeps across the title now and then: the shine layer moves over a soft
   top-to-bottom metal fill, both clipped to the letters */
.hero h1, .hero .mark {
  background-image: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .95) 50%, transparent 60%), var(--fill);
  background-size: 300% 100%, 100% 100%; background-repeat: no-repeat;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: shine 6s ease-in-out 1s infinite;
}
.hero h1 { --fill: linear-gradient(180deg, #ffffff 30%, #d6e2f5); }
.hero .mark { display: inline; color: var(--sun); --fill: linear-gradient(180deg, #ffd978 30%, #eea12a); }
@keyframes shine { 0% { background-position: 120% 0, 0 0; } 45%, 100% { background-position: -20% 0, 0 0; } }
@media (prefers-reduced-motion: reduce) { .hero h1, .hero .mark { animation: none; background-position: 120% 0, 0 0; } }
.hero .lede { margin: 0 auto; color: #fff; font-size: 1.2rem; text-shadow: 0 2px 0 rgba(0, 0, 0, .6); }
.hero .actions { justify-content: center; }
.hero .btn-quiet { color: #fff; background: rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), inset 0 0 0 1px rgba(255, 255, 255, .2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.hero .btn-quiet:hover { color: #1d1606; background: var(--sun); }
.hero .scroll-hint { position: absolute; bottom: 4vh; left: 0; right: 0; justify-content: center; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .55); }
.hero { position: relative; }
.lede { max-width: 52ch; color: var(--ink-dim); font-size: 1.12rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.scroll-hint { display: flex; align-items: center; gap: 8px; }
.scroll-hint span { display: inline-block; animation: hint 1.6s steps(2, end) infinite; }
@keyframes hint { 50% { transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .scroll-hint span { animation: none; } }

/* ---------- the trail of projects ---------- */
.trail { position: relative; padding: 14vh 0 6vh; }
.trail-head { position: relative; z-index: 1; display: block; width: 180px; margin: 0 auto; padding: 10px 16px; text-align: center; border-radius: 999px; }
.trail-head h2 { font-size: 1.6rem; }
.trail-line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.trail-line path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.trail-line .rope-shade, .trail-line .branch-shade { stroke: var(--rope-shadow); stroke-width: 6; stroke-dasharray: 10 8; transform: translate(0, 3px); }
.trail-line .rope { stroke: var(--rope); stroke-width: 4; stroke-dasharray: 10 8; }
.trail-line .walked { stroke: var(--sun); stroke-width: 4; }
.trail-line .branch-shade { stroke-width: 5; stroke-dasharray: 4 7; }
.trail-line .branch-rope { stroke: var(--leaf); stroke-width: 3; stroke-dasharray: 4 7; }
.trail-line .knot { fill: var(--sun); stroke: var(--rope-shadow); stroke-width: 2; }
.trail-line .knot-branch { fill: var(--leaf); }

.stop {
  --accent: var(--leaf); --accent-deep: var(--leaf-deep);
  position: relative; z-index: 1;
  width: min(560px, 100%); margin-top: 30vh;
  display: grid; grid-template-columns: auto 1fr; gap: 18px 20px; align-items: start;
  padding: 28px 26px 24px;
  box-shadow: var(--glass-rim), inset 0 5px 0 var(--accent), 0 12px 32px rgba(0, 0, 0, .2);
}
.trail-head + .stop, .trail-head + .stop-group { margin-top: 12vh; }
.stop-left { margin-right: auto; }
.stop-right { margin-left: auto; }
.stop-tools { --accent: var(--sky); --accent-deep: var(--sky-deep); }
.stop-games { --accent: var(--berry); --accent-deep: var(--berry-deep); }
.stop-icon {
  display: grid; place-items: center; width: 84px; height: 84px; border-radius: 12px;
  background: var(--panel-sub); box-shadow: inset 0 0 0 2px var(--line);
}
.stop-icon svg { width: 64px; height: 64px; image-rendering: pixelated; shape-rendering: crispEdges; }
.stop-main { display: grid; gap: 10px; min-width: 0; }
.stop-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.stop h3 { font-size: 2.1rem; }
.stop h3 a, .branch h4 a { text-decoration: none; }
.stop-host { font: 400 .8rem/1 var(--f-label); letter-spacing: .04em; color: var(--accent-deep, var(--leaf-deep)); }
html[data-theme="dark"] .stop-host { color: var(--accent, var(--leaf)); }
.stop p:not(.stop-host) { color: var(--ink-dim); }
.stop .actions { grid-column: 1 / -1; }
.stop-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.stop-facts li { position: relative; padding-left: 16px; font-size: .95rem; color: var(--ink-dim); }
.stop-facts li::before { content: ""; position: absolute; left: 2px; top: .5em; width: 6px; height: 6px; background: var(--accent); }

/* a smaller project branching off the one before it */
.stop-group { display: flex; align-items: flex-start; gap: clamp(40px, 8vw, 110px); margin-top: 30vh; }
.stop-group > .stop { margin: 0; flex: none; }
.branch {
  --accent: var(--leaf); --accent-deep: var(--leaf-deep);
  z-index: 1; width: 320px; flex: none; margin-top: 150px;
  display: grid; gap: 10px; padding: 18px 20px 20px; justify-items: start;
}
.branch-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.branch-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--panel-sub); box-shadow: inset 0 0 0 2px var(--line); }
.branch-icon svg { width: 32px; height: 32px; image-rendering: pixelated; shape-rendering: crispEdges; }
.branch h4 { font-size: 1.5rem; }
.branch p:not(.stop-host) { color: var(--ink-dim); font-size: .95rem; }
.branch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; justify-self: stretch; }
.branch-list li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.branch-list li span:last-child { font: 400 .7rem/1 var(--f-label); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; }

/* the games inside a project, as a list (used on mods.aong.dev) */
.sub { grid-column: 1 / -1; display: grid; gap: 10px; padding: 14px 16px; border-radius: 12px; background: var(--panel-sub); box-shadow: inset 0 0 0 2px var(--line); }
.sub ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sub li { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.sub li a { text-decoration: none; }
.sub li a:hover { text-decoration: underline; }
.sub li span:last-child { font: 400 .72rem/1 var(--f-label); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-dim); white-space: nowrap; }

/* a deck from the Balatro sprites, used as the Balatro icon on mods.aong.dev */
.deck-icon { width: 54px; height: 72px; image-rendering: pixelated; background-repeat: no-repeat; filter: drop-shadow(0 3px 0 rgba(0,0,0,.3)); }

/* ---------- footer (on the ground) ---------- */
.footer {
  max-width: 1180px; margin: 28vh auto 0; padding: 18px 20px 26px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px;
  color: rgba(255, 255, 255, .85); text-shadow: 0 2px 0 rgba(0, 0, 0, .55); font-size: .95rem;
}
.footer a { color: #fff; }
.footer a:hover { color: var(--sun); }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- plain pages (privacy, 404) ---------- */
.page { max-width: 860px; margin: 0 auto; padding: calc(var(--bar) + 8px) 20px 0; display: grid; gap: 20px; }
.back { justify-self: start; color: #fff; text-decoration: none; font: 600 1.05rem/1 var(--f-head); text-shadow: 0 2px 0 rgba(0,0,0,.5); padding: 6px 0; }
.sheet { display: grid; gap: 14px; padding: 26px 28px; }
.sheet h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.sheet h2 { font-size: 1.6rem; }
.sheet p { color: var(--ink-dim); }
.sheet .small { font-size: .92rem; }
.facts { display: grid; gap: 10px; margin: 0; }
.facts div { display: grid; grid-template-columns: 190px 1fr; gap: 14px; padding: 12px 14px; border-radius: 12px; background: var(--panel-sub); box-shadow: inset 0 0 0 2px var(--line); }
.facts dt { font: 600 1rem/1.3 var(--f-head); }
.facts dd { margin: 0; color: var(--ink-dim); }
.notfound { justify-items: start; margin-top: 18vh; }

/* ---------- smaller screens: one column, the rope runs down the left side ---------- */
@media (max-width: 980px) {
  .stop-group { flex-direction: column; gap: 0; }
  .branch { margin: 48px 0 0 56px; width: min(320px, calc(100% - 56px)); }
  .stop-left, .stop-right { margin-left: 0; margin-right: 0; }
  .trail-head { margin-left: 0; }
}
@media (max-width: 820px) {
  .stop, .stop-group { margin-top: 22vh; }
  .stop-group > .stop { margin-top: 0; }
}
@media (max-width: 720px) {
  .nav { display: none; position: absolute; top: calc(var(--bar) - 6px); right: 20px; flex-direction: column; align-items: stretch; padding: 8px; border-radius: 14px; background: var(--panel-solid); box-shadow: inset 0 0 0 2px var(--line), 0 10px 30px rgba(0,0,0,.25); }
  .nav.is-open { display: flex; }
  .nav a { color: var(--ink); text-shadow: none; padding: 12px 14px; }
  .nav .menu > .menu-btn { display: none; }
  .nav .menu-list, .nav .menu-list[hidden] { display: flex; position: static; min-width: 0; padding: 0; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; animation: none; }
  .nav .menu-list a { font-size: 1.05rem; padding: 12px 14px; }
  .nav-toggle {
    display: block; padding: 9px 12px; border: 0; border-radius: 10px; cursor: pointer;
    font: 600 1rem/1 var(--f-head); color: #fff; background: rgba(10, 14, 24, .45); box-shadow: inset 0 0 0 2px rgba(255,255,255,.14);
  }
  .logo-text { font-size: 1.35rem; }
  .topbar-right { gap: 8px; }
}
@media (max-width: 560px) {
  :root { --bar: 62px; }
  .topbar { padding: 0 16px; gap: 10px; }
  .logo-text { display: none; }
  .hub, .page { padding-left: 16px; padding-right: 16px; }
  .sheet { padding: 22px 20px; }
  .hero h1 { filter: drop-shadow(0 6px 0 rgba(13, 19, 34, .9)); }
  .stop { grid-template-columns: minmax(0, 1fr); padding: 24px 20px 22px; }
  .stop-icon { width: 64px; height: 64px; }
  .stop-icon svg { width: 48px; height: 48px; }
  .branch { margin-left: 36px; width: calc(100% - 36px); }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
