/* Snowball — demand-slope alpine night. Self-hosted type, no shared pill buttons. */

@font-face {
  font-family: Fraunces;
  src: url("fonts/fraunces-normal-600-800.woff2") format("woff2");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Fraunces;
  src: url("fonts/fraunces-italic-600-700.woff2") format("woff2");
  font-weight: 600 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: Sora;
  src: url("fonts/sora-normal-400-800.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-normal-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("fonts/ibm-plex-mono-normal-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --night: #070e16;
  --sky0: #0a1420;
  --sky1: #12263c;
  --ridge: #16344c;
  --snow: #d7e6f2;
  --snow-bright: #f3f8fc;
  --ice: #9ec9e3;
  --gold: #e0c17a;
  --gold-deep: #b8893a;
  --wood: #7a5332;
  --wood-dark: #3d2918;
  --wood-mid: #a06d42;
  --ink: #e8f1f8;
  --muted: #9bb0c3;
  --official: #154168;
  --closed: #c17a6a;
  --open: #8ec9a8;
  --display: Fraunces, "Iowan Old Style", "Times New Roman", serif;
  --ui: Sora, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --mast: calc(3.6rem + env(safe-area-inset-top, 0px));
  --dock: calc(4.4rem + env(safe-area-inset-bottom, 0px));
  --pad: clamp(1rem, 4vw, 2.25rem);
  --max: 72rem;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--night);
}
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--ui);
  font-weight: 400;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 20% 0%, #1a3350 0%, transparent 50%),
    radial-gradient(ellipse at 90% 10%, #0c1c30 0%, transparent 40%),
    var(--sky0);
  line-height: 1.55;
  min-height: 100svh;
  overflow-x: clip;
  padding-bottom: var(--dock);
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); }
button, a { -webkit-tap-highlight-color: transparent; }
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: 0.75rem;
  top: -5rem;
  z-index: 80;
  background: var(--gold);
  color: #1a1208;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  text-decoration: none;
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + 0.5rem); }

/* ---- mast ---- */
.mast {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: var(--mast);
  padding: calc(0.45rem + env(safe-area-inset-top, 0px)) var(--pad) 0.45rem;
  background: color-mix(in srgb, var(--sky0) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--ice) 22%, transparent);
}
.mast-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.mast-mark {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
}
.mast-names { display: flex; flex-direction: column; min-width: 0; }
.mast-title {
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.mast-meta {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mast-ticks {
  display: none;
  margin-left: auto;
  gap: 0.2rem 1rem;
}
.mast-ticks a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mast-ticks a:hover { color: var(--snow-bright); }
.motion-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: color-mix(in srgb, var(--official) 70%, #000);
  color: var(--snow);
  border: 1px solid color-mix(in srgb, var(--ice) 35%, transparent);
  padding: 0.35rem 0.6rem 0.35rem 0.45rem;
  font: 600 0.65rem/1 var(--ui);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.motion-icon {
  width: 1.05rem;
  height: 1.05rem;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  line-height: 1;
}
.motion-icon::before { content: "❄"; }
.motion-toggle[aria-pressed="false"] .motion-icon::before { content: "–"; }
.motion-toggle[aria-pressed="false"] { color: var(--muted); }
@media (min-width: 860px) {
  .mast-ticks { display: flex; }
  .motion-toggle { margin-left: 0.4rem; }
  .motion-label { display: inline; }
}
@media (max-width: 859px) {
  .motion-toggle { padding: 0.38rem 0.5rem; }
  .motion-label { font-size: 0.6rem; }
}

/* ---- falling snow canvas ---- */
.skyfall {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

/* ---- terraces ---- */
.terrace {
  position: relative;
  z-index: 4;
  padding: 2.5rem var(--pad) 3.5rem;
  max-width: none;
}
.terrace > * { position: relative; }
.terrace-label {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 1.25rem;
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}
.terrace-label span {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ice);
  font-weight: 500;
}
.terrace-label strong {
  font-family: var(--display);
  font-weight: 700;
  font-style: italic;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: -0.03em;
}

/* ---- ridge / hero ---- */
.terrace-ridge {
  min-height: calc(100svh - var(--dock) - var(--mast));
  display: flex;
  flex-direction: column;
  padding-top: 1rem;
  padding-bottom: 2rem;
  overflow: hidden;
}
.ridge-art {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.ridges {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18%;
  width: 100%;
  height: 70%;
}
.shelf {
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 28%;
  background:
    linear-gradient(180deg, transparent 0%, #cfe0ee 8%, #e8f1f8 18%, #d4e4f0 50%, #b9d0e0 100%);
  border-radius: 50% 50% 0 0 / 28% 28% 0 0;
  box-shadow: 0 -24px 60px rgba(200, 224, 240, 0.15);
}
.ridge-copy {
  text-align: center;
  z-index: 2;
  padding-top: 0.4rem;
}
.kicker {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.terrace-ridge h1 {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(3.1rem, 14vw, 7.5rem);
  line-height: 0.86;
  letter-spacing: -0.04em;
  color: var(--snow-bright);
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}
.symbol-line {
  margin: 0.7rem 0 0;
  font-size: 0.86rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.symbol-line strong { color: var(--ink); font-weight: 600; }
.lede {
  margin: 0.45rem 0 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  color: var(--ice);
}

.ridge-stage {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  margin: 0.6rem 0 0.2rem;
  flex: 1 1 auto;
  min-height: 9.5rem;
  align-items: flex-end;
}
.ball-hero {
  position: relative;
  width: min(42vw, 16.5rem);
  aspect-ratio: 1;
  filter: drop-shadow(0 18px 18px rgba(8, 18, 30, 0.45));
}
.ball-hero .ball { width: 100%; height: auto; }
.ball-roll { animation: roll 11s linear infinite; transform-origin: 50% 50%; }
@keyframes roll { to { transform: rotate(360deg); } }

.powder, .powder-2 {
  position: absolute;
  left: -12%;
  bottom: 6%;
  width: 38%;
  height: 22%;
  background: radial-gradient(ellipse, rgba(255,255,255,0.7), transparent 70%);
  filter: blur(6px);
  animation: wake 1.6s ease-in-out infinite;
  pointer-events: none;
}
.powder-2 { left: auto; right: -6%; width: 28%; animation-delay: -0.7s; opacity: 0.6; }
@keyframes wake {
  0%, 100% { opacity: 0.25; transform: scale(0.9) translateX(0); }
  50% { opacity: 0.8; transform: scale(1.15) translateX(-8%); }
}

/* ---- trail objects (each a unique silhouette) ---- */
.trail-actions {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 0.7rem;
  width: min(100%, 40rem);
  margin: 0 auto;
  padding-bottom: 0.4rem;
  align-items: start;
}
.obj {
  position: relative;
  color: inherit;
  text-decoration: none;
  display: block;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease;
}
.obj:hover { transform: translateY(-3px); filter: brightness(1.08); }
.obj-kicker {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--snow) 70%, transparent);
  font-weight: 500;
}
.obj-title {
  display: block;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1;
  margin: 0.15rem 0 0.15rem;
}
.obj-sub { display: block; font-size: 0.68rem; font-weight: 500; color: var(--snow); }

/* Buy — trail diamond (rotated square, wooden) */
.trail-actions .obj-buy {
  grid-column: 1;
  grid-row: 1 / span 1;
  justify-self: center;
  width: min(100%, 11.5rem);
  aspect-ratio: 1;
  margin-top: 0.2rem;
}
.obj-buy .obj-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18%;
  color: #f6ebcf;
  background:
    linear-gradient(135deg, #c9954c 0 2px, transparent 2px) 0 0 / 100% 100%,
    linear-gradient(160deg, #b8893a, #7a4e1e 42%, #5c3914 100%);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: inset 0 0 0 5px #e0c17a, inset 0 0 0 7px #3d2918;
  text-shadow: 0 1px 0 rgba(0,0,0,0.4);
}
.obj-buy .obj-kicker { color: #f0d9a0; }
.obj-buy .obj-title { font-size: 1.55rem; color: #fff8e6; }
.obj-buy.is-unset .obj-face {
  filter: saturate(0.7);
}

/* CA — carved vertical snow stake */
.trail-actions .obj-ca {
  grid-column: 2;
  grid-row: 1;
}
.obj-ca {
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0 2px, transparent 2px 7px),
    linear-gradient(180deg, #c4a074, #8a5d36 40%, #5c3b20);
  color: #1c120a;
  clip-path: polygon(12% 0, 88% 0, 94% 8%, 90% 92%, 50% 100%, 10% 92%, 6% 8%);
  padding: 0.85rem 0.85rem 1.4rem;
  text-align: center;
  box-shadow: inset 0 0 0 2px rgba(60, 36, 16, 0.45);
  min-height: 11rem;
}
.obj-ca .obj-kicker { color: #3d2918; }
.obj-ca .obj-title { color: #1c120a; }
.ca-value {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  word-break: break-all;
  background: rgba(28, 18, 10, 0.14);
  padding: 0.35rem 0.4rem;
  margin: 0.35rem 0 0.5rem;
  color: #1c120a;
}
.obj-copy {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: 700 0.68rem/1 var(--ui);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f6ebcf;
  background: #3d2918;
  padding: 0.45rem 0.7rem;
  /* hanging tag shape */
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 4px 50%);
}
.obj-copy:disabled,
.obj-copy[aria-disabled="true"] {
  opacity: 0.62;
}

/* Chart — folded map trapezoid */
.trail-actions .obj-chart {
  grid-column: 1;
  grid-row: 2;
}
.obj-chart .obj-face {
  display: block;
  background:
    linear-gradient(135deg, transparent 0 62%, #dce7ef 62% 100%) no-repeat 100% 0 / 1.6rem 1.6rem,
    repeating-linear-gradient(0deg, transparent 0 10px, rgba(30, 70, 100, 0.07) 10px 11px),
    repeating-linear-gradient(90deg, transparent 0 14px, rgba(30, 70, 100, 0.05) 14px 15px),
    linear-gradient(160deg, #f7fafc, #d5e3ee);
  color: #16324a;
  padding: 0.85rem 1.7rem 0.95rem 0.9rem;
  clip-path: polygon(0 0, calc(100% - 1.5rem) 0, 100% 1.5rem, 100% 100%, 0 100%);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
  border-bottom: 4px solid #8aa7bb;
}
.obj-chart .obj-kicker { color: #3d617a; }
.obj-chart .obj-title { color: #12263c; }
.obj-chart .obj-sub { color: #2a4a62; }

/* X — swallowtail wind flag */
.trail-actions .obj-x {
  grid-column: 2;
  grid-row: 2;
}
.obj-x { padding-left: 0.7rem; }
.obj-x .obj-face {
  display: block;
  position: relative;
  background: linear-gradient(180deg, #f2d48a, #c9953a);
  color: #1c120a;
  padding: 0.7rem 1.4rem 0.7rem 0.85rem;
  clip-path: polygon(0 0, calc(100% - 1.15rem) 0, 100% 50%, calc(100% - 1.15rem) 100%, 0 100%);
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
  animation: flutter 3.2s ease-in-out infinite;
  transform-origin: left center;
}
.obj-x::before {
  content: "";
  position: absolute;
  left: 0;
  top: -18%;
  bottom: -18%;
  width: 6px;
  background: linear-gradient(180deg, #d8dde2, #7c8790);
  border-radius: 2px;
}
@keyframes flutter {
  0%, 100% { transform: skewY(0) translateX(0); }
  40% { transform: skewY(-1.6deg) translateX(2px); }
  70% { transform: skewY(1.2deg) translateX(-1px); }
}
.obj-x .obj-kicker { color: #4a3214; }
.obj-x .obj-title { color: #1c120a; }
.obj-x .obj-sub { color: #3d2918; }

/* Telegram — hut bell */
.trail-actions .obj-tg {
  grid-column: 1 / -1;
  justify-self: center;
  width: min(100%, 16rem);
}
.obj-tg .obj-face {
  display: block;
  text-align: center;
  color: #f3f8fc;
  padding: 1.15rem 1.2rem 1.35rem;
  background:
    linear-gradient(180deg, #c9d3dc 0 10px, transparent 10px),
    radial-gradient(120% 90% at 50% 0%, #8ea0b0 0%, #4d5d6c 40%, #2c3946 100%);
  clip-path: polygon(18% 12%, 82% 12%, 96% 32%, 88% 78%, 70% 92%, 50% 100%, 30% 92%, 12% 78%, 4% 32%);
  box-shadow: inset 0 0 0 2px rgba(230, 236, 242, 0.25);
  animation: sway 3.8s ease-in-out infinite;
  transform-origin: 50% 0;
}
.obj-tg .obj-face::before {
  content: "";
  display: block;
  width: 42%;
  height: 8px;
  margin: -0.35rem auto 0.4rem;
  background: linear-gradient(90deg, #8a7a55, #e0c17a, #8a7a55);
  clip-path: polygon(0 50%, 12% 0, 88% 0, 100% 50%, 88% 100%, 12% 100%);
}
@keyframes sway {
  0%, 100% { transform: rotate(-1.2deg); }
  50% { transform: rotate(1.6deg); }
}

.obj.is-unset { cursor: default; }
.obj.is-unset:hover { transform: none; filter: none; }

@media (min-width: 720px) {
  .trail-actions {
    grid-template-columns: 11.5rem minmax(12rem, 1fr) 11rem 10rem;
    grid-template-areas:
      "buy ca chart x"
      "buy ca tg tg";
    width: min(100%, 56rem);
    align-items: center;
  }
  .trail-actions .obj-buy { grid-area: buy; width: 11.5rem; margin: 0; }
  .trail-actions .obj-ca { grid-area: ca; min-height: 12.5rem; }
  .trail-actions .obj-chart { grid-area: chart; }
  .trail-actions .obj-x { grid-area: x; }
  .trail-actions .obj-tg { grid-area: tg; width: 100%; justify-self: stretch; }
}

/* ---- thesis fork ---- */
.terrace-thesis {
  background:
    linear-gradient(180deg, rgba(207, 224, 238, 0.14) 0 2.2rem, transparent 7rem),
    linear-gradient(180deg, #1a3a54 0%, #12283e 100%);
}
.thesis-plaque {
  max-width: 46rem;
  margin: 0 auto 2rem;
  padding: 1.25rem 1.3rem 1.4rem;
  background:
    linear-gradient(180deg, rgba(224, 193, 122, 0.16), transparent 40%),
    linear-gradient(180deg, #1c3348, #15283a);
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent);
  box-shadow: 0 20px 50px rgba(0,0,0,0.25), inset 0 0 0 1px rgba(158, 201, 227, 0.12);
  /* chamfered plaque, not a card pill */
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
}
.thesis-plaque p {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.2rem, 2.8vw, 1.85rem);
  line-height: 1.35;
  letter-spacing: -0.02em;
  color: var(--snow-bright);
}
.fork {
  display: grid;
  gap: 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
}
@media (min-width: 800px) {
  .fork { grid-template-columns: 1fr 1.2fr; align-items: stretch; gap: 1.75rem; }
}
.path {
  padding: 1.15rem 1.15rem 1.4rem;
  position: relative;
}
.path-closed {
  background: linear-gradient(180deg, #2a2228, #1a1518);
  clip-path: polygon(0 18px, 18px 0, 100% 0, 100% 100%, 0 100%);
  opacity: 0.82;
  color: #d5c4c0;
}
.path-open {
  background: linear-gradient(180deg, #1a3d52, #123044);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--open) 35%, transparent);
}
.path-tag {
  margin: 0 0 0.4rem;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.path-closed .path-tag { color: var(--closed); }
.path-open .path-tag { color: var(--open); }
.path h2 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}
.path p { margin: 0; color: var(--muted); }
.path-closed p { color: #b9a6a2; }
.path-stage {
  position: relative;
  margin-top: 1.1rem;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  min-height: 8rem;
}
.path-closed .ball { width: 6.4rem; opacity: 0.7; filter: saturate(0.6); }
.ball-shrink { animation: shrink 5s ease-in-out infinite; }
@keyframes shrink {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.72); }
}
.melt {
  position: absolute;
  bottom: 0.4rem;
  width: 5rem;
  height: 0.7rem;
  background: radial-gradient(ellipse, rgba(193, 122, 106, 0.45), transparent 70%);
  filter: blur(3px);
}
.path-open .ball { width: 11rem; }
.ball-grow { animation: roll 13s linear infinite, growpulse 7s ease-in-out infinite; }
@keyframes growpulse {
  0%, 100% { scale: 1; }
  50% { scale: 1.1; }
}
.gather-pips, .path-open .gather-pips {
  position: absolute;
  inset: 8% 12%;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 30%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 88% 42%, #fff 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 70% 14%, var(--gold) 0 2px, transparent 3px),
    radial-gradient(circle at 24% 78%, #fff 0 2px, transparent 3px);
  animation: pipdrift 5s ease-in-out infinite;
}
@keyframes pipdrift {
  0%, 100% { opacity: 0.7; transform: translate(0, 0); }
  50% { opacity: 1; transform: translate(4px, 6px); }
}

/* ---- gather ---- */
.terrace-gather {
  background: linear-gradient(180deg, #12283e 0%, #0e2032 50%, #143044 100%);
}
.gather-layout {
  display: grid;
  gap: 1.5rem;
  max-width: var(--max);
  margin: 0 auto;
  align-items: center;
}
@media (min-width: 860px) {
  .gather-layout { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}
.gather-copy h2 {
  margin: 0 0 0.7rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.gather-copy p { margin: 0 0 0.8rem; color: var(--muted); max-width: 36em; }
.gather-note {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  color: var(--ice) !important;
  font-size: 1.15rem;
}
.gather-stage {
  position: relative;
  display: grid;
  place-items: end center;
  min-height: 18rem;
}
.gather-stage .ball {
  width: min(72%, 20rem);
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 20px 18px rgba(8, 18, 30, 0.5));
}
.gather-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}
.berm {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 0;
  height: 18%;
  background: linear-gradient(180deg, #eef5fa, #c5d8e6);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  z-index: 1;
}

/* ---- stations ---- */
.terrace-stations {
  background: linear-gradient(180deg, #143044 0%, #102436 100%);
}
.stations-title, .terrace-camp h2, .conditions h2 {
  max-width: var(--max);
  margin: 0 auto 0.6rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
}
.stations-lede, .camp-lede {
  max-width: var(--max);
  margin: 0 auto 1.6rem;
  color: var(--muted);
}
.stations {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: var(--max);
  display: grid;
  gap: 1.1rem;
}
@media (min-width: 800px) {
  .stations { grid-template-columns: 1fr 1fr; }
}
.station {
  position: relative;
  padding: 1.2rem 1.1rem 1.3rem;
  margin: 0;
}
.station-num {
  margin: 0 0 0.25rem;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--gold);
}
.station h3 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 700;
  font-size: 1.35rem;
}
.station p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.station-shape { position: relative; height: 4.2rem; margin-bottom: 0.7rem; }

/* 01 kiosk — peaked hut */
.station-kiosk {
  background: linear-gradient(180deg, #24384c, #182838);
  clip-path: polygon(50% 0, 100% 18%, 100% 100%, 0 100%, 0 18%);
  padding-top: 1.8rem;
}
.station-kiosk .roof {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 0;
  height: 2.1rem;
  background: #8a5d36;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.station-kiosk .hut {
  position: absolute;
  left: 28%;
  right: 28%;
  top: 1.7rem;
  height: 2.1rem;
  background: #c4a074;
}
.station-kiosk .hut::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0.7rem;
  height: 1.1rem;
  transform: translateX(-50%);
  background: #3d2918;
}

/* 02 lantern cache — crate + lantern */
.station-cache {
  background: linear-gradient(180deg, #2a261c, #1a1812);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}
.station-cache .crate {
  position: absolute;
  left: 16%;
  width: 46%;
  bottom: 0.15rem;
  height: 3.2rem;
  background:
    linear-gradient(#3d2918, #3d2918) 50% 30% / 100% 2px no-repeat,
    linear-gradient(#3d2918, #3d2918) 50% 70% / 100% 2px no-repeat,
    linear-gradient(90deg, #3d2918, #3d2918) 30% 50% / 2px 100% no-repeat,
    linear-gradient(90deg, #5c3b20, #b8894c, #5c3b20);
  box-shadow: inset 0 0 0 2px #3d2918, 4px 4px 0 #2a1c10;
}
.station-cache .lantern {
  position: absolute;
  right: 18%;
  bottom: 0.35rem;
  width: 1.55rem;
  height: 2.7rem;
  background: linear-gradient(180deg, #f0d9a0, #e0c17a 40%, #b8893a);
  clip-path: polygon(22% 0, 78% 0, 100% 16%, 86% 100%, 14% 100%, 0 16%);
  box-shadow: 0 0 18px rgba(224, 193, 122, 0.85);
  animation: lantern 2.8s ease-in-out infinite;
}
@keyframes lantern { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.35); } }

/* 03 junction — signpost with two arms */
.station-junction {
  background: linear-gradient(180deg, #1c3348, #142636);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 12% 100%, 0 calc(100% - 12px));
}
.station-junction .post {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0.2rem;
  width: 0.45rem;
  transform: translateX(-50%);
  background: #8a5d36;
}
.station-junction .arm {
  position: absolute;
  top: 0.7rem;
  height: 1.15rem;
  width: 38%;
  background: #e0c17a;
  color: #1c120a;
}
.station-junction .arm-l {
  right: 52%;
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 10px 100%, 0 50%);
}
.station-junction .arm-r {
  left: 52%;
  top: 2rem;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}
.station-link {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: #1c120a;
  background: var(--gold);
  padding: 0.45rem 0.85rem 0.45rem 0.7rem;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
}

/* 04 summit cairn — stacked stone circle */
.station-summit {
  background: linear-gradient(180deg, #24344c, #152032);
  clip-path: polygon(8% 0, 92% 0, 100% 50%, 92% 100%, 8% 100%, 0 50%);
  text-align: center;
}
.station-summit .cairn {
  width: 5.2rem;
  height: 3.8rem;
  margin: 0 auto;
  background:
    radial-gradient(ellipse at 50% 86%, #d5e1ea 0 1.35rem, transparent 1.4rem),
    radial-gradient(ellipse at 50% 54%, #aebdc8 0 1.1rem, transparent 1.15rem),
    radial-gradient(circle at 50% 22%, #e0c17a 0 0.62rem, transparent 0.68rem);
  filter: drop-shadow(0 2px 0 #1a2430);
}

/* ---- conditions / chart ---- */
.terrace-chart {
  background: linear-gradient(180deg, #102436 0%, #0c1c2c 100%);
}
.conditions {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.4rem 1.25rem 1.6rem;
  background:
    repeating-linear-gradient(180deg, transparent 0 26px, rgba(224, 193, 122, 0.05) 26px 27px),
    linear-gradient(180deg, #1a2c3c, #121e2a);
  border: 8px solid #2a2118;
  box-shadow: 0 0 0 2px #8a5d36, 0 24px 50px rgba(0,0,0,0.35);
  /* weather board: a framed rectangle with a peaked cap */
  position: relative;
}
.conditions::before {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  top: -18px;
  height: 18px;
  background: #3d2918;
  clip-path: polygon(0 100%, 8% 0, 92% 0, 100% 100%);
}
.conditions-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.conditions h2 { margin: 0 0 1rem; }
.conditions-list {
  margin: 0 0 1rem;
  display: grid;
  gap: 0.55rem;
}
.conditions-list div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
  border-top: 1px dashed color-mix(in srgb, var(--ice) 25%, transparent);
  padding-top: 0.45rem;
}
.conditions-list dt {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.conditions-list dd { margin: 0; font-weight: 500; }
.conditions-note { margin: 0 0 1rem; color: var(--muted); font-size: 0.92rem; }
.conditions-cta { display: block; max-width: 16rem; }
.conditions-cta .obj-face { text-align: left; }

/* ---- camp ---- */
.terrace-camp {
  background: linear-gradient(180deg, #0c1c2c 0%, #0a1622 100%);
}
.camp-actions {
  display: grid;
  gap: 1rem;
  max-width: 40rem;
  margin: 0 auto 2rem;
}
@media (min-width: 640px) {
  .camp-actions { grid-template-columns: 1fr 1fr; align-items: center; }
}
.obj-x-lg .obj-face { padding: 1.1rem 2rem 1.1rem 1.2rem; }
.obj-tg-lg { width: 100%; }
.disclaimer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.15rem 1.15rem 1.3rem;
  background: #101a24;
  border-left: 4px solid var(--gold-deep);
}
.disclaimer h3 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.15rem;
}
.disclaimer p { margin: 0 0 0.7rem; color: var(--muted); font-size: 0.9rem; }
.disclaimer p:last-child { margin-bottom: 0; }

.colophon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.2rem var(--pad) 1.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid color-mix(in srgb, var(--ice) 16%, transparent);
}
.colophon p { margin: 0; }
.colophon img { width: 28px; height: 28px; border-radius: 6px; }

/* ---- phone dock: four distinct mini-shapes ---- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  padding: 0.45rem 0.55rem calc(0.5rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--sky0) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid color-mix(in srgb, var(--ice) 22%, transparent);
}
.dock-item {
  appearance: none;
  border: 0;
  background: none;
  color: var(--snow-bright);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font: 600 0.62rem/1 var(--ui);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.15rem 0;
  min-height: 44px;
}
.dock-shape { display: block; width: 2rem; height: 1.7rem; }
.dock-buy .dock-shape {
  background: linear-gradient(160deg, #c9953a, #7a4e1e);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  box-shadow: inset 0 0 0 2px #e0c17a;
}
.dock-ca .dock-shape {
  width: 1.15rem;
  background: linear-gradient(180deg, #c4a074, #8a5d36);
  clip-path: polygon(15% 0, 85% 0, 90% 88%, 50% 100%, 10% 88%);
}
.dock-chart .dock-shape {
  background: linear-gradient(160deg, #f7fafc, #d5e3ee);
  clip-path: polygon(0 0, 70% 0, 100% 30%, 100% 100%, 0 100%);
}
.dock-x .dock-shape {
  width: 2.3rem;
  background: linear-gradient(180deg, #f2d48a, #c9953a);
  clip-path: polygon(8% 0, 75% 0, 100% 50%, 75% 100%, 8% 100%);
}

/* ---- toasts ---- */
.toasts {
  position: fixed;
  left: 50%;
  bottom: calc(var(--dock) + 0.6rem);
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: min(26rem, calc(100% - 2rem));
  pointer-events: none;
}
.toast {
  pointer-events: none;
  background: #152333;
  color: var(--snow-bright);
  border: 1px solid var(--gold);
  padding: 0.7rem 0.9rem;
  font-size: 0.88rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  animation: toast-in 0.35s ease;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---- reduced motion ---- */
html.reduce-motion .ball-roll,
html.reduce-motion .ball-grow,
html.reduce-motion .ball-shrink,
html.reduce-motion .powder,
html.reduce-motion .powder-2,
html.reduce-motion .obj-x .obj-face,
html.reduce-motion .obj-tg .obj-face,
html.reduce-motion .gather-pips,
html.reduce-motion .station-cache .lantern,
html.reduce-motion .toast {
  animation: none !important;
}
html.reduce-motion { scroll-behavior: auto; }
html.reduce-motion .skyfall,
html.reduce-motion .gather-canvas { display: none; }
html.reduce-motion .ball-shrink { transform: scale(0.78); opacity: 0.65; }
html.reduce-motion .path-open .ball { transform: scale(1.08); }

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="on"]) .ball-roll,
  html:not([data-motion="on"]) .ball-grow,
  html:not([data-motion="on"]) .ball-shrink,
  html:not([data-motion="on"]) .powder,
  html:not([data-motion="on"]) .powder-2,
  html:not([data-motion="on"]) .obj-x .obj-face,
  html:not([data-motion="on"]) .obj-tg .obj-face,
  html:not([data-motion="on"]) .gather-pips,
  html:not([data-motion="on"]) .station-cache .lantern,
  html:not([data-motion="on"]) .toast { animation: none !important; }
  html:not([data-motion="on"]) { scroll-behavior: auto; }
}

/* space for sticky header targets */
#thesis, #gather, #stations, #chart, #camp { scroll-margin-top: calc(var(--mast) + 0.4rem); }


@media (max-width: 520px) and (max-height: 920px) {
  .terrace-ridge {
    padding-top: 0.35rem;
    padding-bottom: 0.55rem;
  }
  .terrace-ridge h1 { font-size: clamp(2.55rem, 12vw, 3.3rem); }
  .symbol-line { margin-top: 0.45rem; font-size: 0.78rem; }
  .lede { font-size: 1rem; }
  .ridge-stage { min-height: 7.2rem; margin: 0.15rem 0 0; }
  .ball-hero { width: min(40vw, 9.6rem); }
  .trail-actions .obj-buy { width: min(100%, 9.5rem); }
  .trail-actions .obj-ca { min-height: 9rem; padding: 0.6rem 0.65rem 1.15rem; }
  .obj-title { font-size: 1.2rem; }
  .obj-buy .obj-title { font-size: 1.35rem; }
  .trail-actions { gap: 0.55rem 0.55rem; }
  .ca-value { font-size: 0.68rem; margin: 0.25rem 0 0.4rem; }
}

@media (min-width: 960px) {
  .ridge-copy { padding-top: 0.8rem; }
  .ball-hero { width: min(28vw, 20rem); }
  .ridge-stage { min-height: 14rem; }
}

@media (min-width: 720px) {
  .dock {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
  }
  .dock-item { width: 5.5rem; }
}
