/* Sparrows cohesion pass · restored figures, tighter narrative scale */
:root {
  --content: 1280px;
  --pad: clamp(28px, 4.5vw, 72px);
  --chapter-gap: clamp(72px, 8vw, 124px);
  --soft-line: rgba(25, 39, 75, .12);
  --soft-shadow: 0 28px 80px rgba(25, 39, 75, .11), 0 4px 16px rgba(25, 39, 75, .05);
}

body { background: #fff; }
main { position: relative; background: #fff; }
.display { font-family: var(--font-display); font-weight: 700; line-height: .93; letter-spacing: -.05em; text-wrap: balance; }
.kicker { font-size: 12px; letter-spacing: .12em; }
.caption { font-size: 10.5px; color: rgba(16,16,20,.48); }

/* One persistent frame ties every chapter together. */
.hero-nav {
  position: fixed;
  top: 16px;
  width: min(calc(100% - 32px), 1180px);
  min-height: 56px;
  color: var(--ink);
  background: rgba(255,255,255,.88);
  box-shadow: 0 18px 52px rgba(20,31,61,.11), inset 0 0 0 1px rgba(25,39,75,.08);
  text-shadow: none;
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  backdrop-filter: blur(18px) saturate(1.15);
}
.hero-nav-center { color: rgba(16,16,20,.62); }
.hero-nav-center a:hover { color: var(--ink); }
.hero-nav .lang-switch {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(15, 19, 31, .12);
  border-radius: 999px;
  background: rgba(255,255,255,.58);
  text-shadow: none;
}
.hero-nav .lang-switch button {
  min-width: 30px;
  height: 27px;
  padding: 0 6px;
  border: 0;
  border-radius: 999px;
  color: rgba(15,19,31,.58);
  background: transparent;
  font: 700 10px/1 Inter, sans-serif;
  letter-spacing: .04em;
  cursor: pointer;
}
.hero-nav .lang-switch button.is-active { color: #fff; background: #11131a; }
html[lang="mn"] .display { letter-spacing: -.035em; }
html[lang="mn"] .hero-title { max-width: 15ch; font-size: clamp(47px, 6vw, 90px); }
html[lang="mn"] .dealy-stage > h2 { font-size: clamp(52px, 7.2vw, 110px); }
.hero-talk { background: var(--ink); color: #fff; }
.hero-shell { min-height: 92svh; padding: 14px; }
.hero-frame { height: 88svh; min-height: 650px; border-radius: 30px; box-shadow: var(--soft-shadow); }
.hero-copy { left: clamp(34px, 5vw, 76px); bottom: clamp(78px, 8vh, 112px); }
.hero-title { max-width: 11ch; font-size: clamp(60px, 6.5vw, 108px); line-height: .92; letter-spacing: -.055em; }
.hero-copy > p { font-size: 15px; }
.hero-stats { top: 104px; right: clamp(28px, 4vw, 58px); }
.hero-stats b { font-size: 31px; }
.field-cutout { width: 262px; min-height: 106px; padding-left: 44px; }

/* Shared inset stage. Rounded edges make chapter changes continuous. */
.bridge-stage,
.engine-stage,
.dealy-stage,
.bestshot-stage,
.finale-stage {
  top: 82px;
  width: calc(100% - 28px);
  height: calc(100svh - 96px);
  margin-inline: auto;
  border-radius: 28px;
  box-shadow: var(--soft-shadow);
}
.bridge-scene,
.engine-scene,
.dealy-pin,
.bestshot-pin,
.finale-scene { background: #fff; }
.seam { height: 120px; opacity: .8; }

/* Shared feature figure language. */
.figure-card {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(25,39,75,.09) !important;
  border-radius: 28px !important;
  background-color: #fff;
  background-clip: padding-box;
  box-shadow: 0 22px 64px rgba(25,39,75,.075), 0 4px 14px rgba(25,39,75,.035) !important;
  overflow: hidden;
  isolation: isolate;
  transform-origin: 50% 62%;
  will-change: transform, opacity;
}
.figure-card::before {
  position: absolute;
  z-index: 5;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at var(--shine-x,50%) var(--shine-y,50%), rgba(255,255,255,.34), transparent 32%);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.figure-card:hover::before { opacity: .62; }
.figure-card::after { content: none; }
body[data-page="home"] .figure-card { border-color: rgba(25,39,75,.09) !important; }
body[data-page="home"] .records-figure,
body[data-page="home"] .vida-card,
body[data-page="home"] .missing-edge-card,
body[data-page="home"] .dealy-flow-card,
body[data-page="home"] .evening-card,
body[data-page="home"] .operations-card,
body[data-page="home"] .occupancy-feature { padding: clamp(20px, 2.2vw, 30px) !important; border-radius: 24px !important; }
.figure-card > *,
.feature-card-head > *,
body[data-page="home"] .infographic-host { min-width: 0; max-width: 100%; box-sizing: border-box; }
body[data-page="home"] .infographic-host { padding: 0 clamp(2px,.55vw,8px) 6px; overflow: clip !important; }
body[data-page="home"] .viz-svg { max-width: 100%; overflow: hidden !important; }
.feature-card-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.feature-card-head > div:first-child { min-width: 0; }
.feature-card-head h3 { margin: 8px 0 0; font-family: var(--sans); font-size: clamp(20px, 2vw, 29px); font-weight: 680; line-height: 1.05; letter-spacing: -.035em; }
.ui-eyebrow { color: rgba(16,16,20,.48); font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }
.figure-metric { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; }
.figure-metric b { color: var(--cobalt); font-family: var(--serif); font-size: 29px; font-weight: 500; }
.figure-metric span,
.live-pill { color: rgba(16,16,20,.52); font-family: var(--mono); font-size: 9px; letter-spacing: .06em; }
.live-pill { align-self: center; border: 1px solid rgba(35,55,236,.17); border-radius: 999px; padding: 8px 11px; background: rgba(255,255,255,.7); }
.figure-legend { display: flex; gap: 6px; }
.figure-legend span { border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: 7px 10px; color: rgba(255,255,255,.66); font: 500 9px/1 var(--sans); }
.figure-legend span:last-child { border-style: dashed; }
.figure-card figcaption { margin-top: 12px; }
body[data-page="home"] .viz-svg { font-family: var(--sans); }
body[data-page="home"] .vida-name,
body[data-page="home"] .pred-score,
body[data-page="home"] .return-value,
body[data-page="home"] .outcome-value,
body[data-page="home"] .camp-peak .peak-value { font-family: var(--serif); }
body[data-page="home"] .ops-source .ops-main,
body[data-page="home"] .ops-hub .ops-main,
body[data-page="home"] .decay-event .event-main,
body[data-page="home"] .decay-start .event-main { font-family: var(--sans); }

/* Bridge: one steppe field and one statement. */
#bridgeCanvas { z-index: 0; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.bridge-overlay {
  top: 12%;
  left: 5%;
  width: min(44%, 620px);
  max-width: 18ch;
  padding: 22px 24px;
  border: 0;
  border-radius: 20px;
  background: rgba(255,255,255,.68);
  box-shadow: 0 24px 70px rgba(25,39,75,.065);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: clamp(34px, 3.8vw, 54px);
  line-height: .98;
}
.bridge-caption { left: 5%; bottom: 26px; }

/* Thesis: header and figure now form one chapter instead of two slides. */
.thesis-statement { min-height: 0; align-items: end; padding-top: var(--chapter-gap); padding-bottom: 48px; }
.thesis-statement .kicker { grid-column: 1 / 13; }
.thesis-statement h2 { grid-column: 1 / 7; margin-top: 22px; font-size: clamp(50px, 5.2vw, 74px); }
.thesis-reveal { grid-column: 8 / 13; align-self: end; margin: 0 0 8px; font-size: clamp(20px, 1.9vw, 28px); line-height: 1.18; letter-spacing: -.03em; }
.thesis-figure-scene { height: auto; }
.thesis-figure-stage { position: relative; top: auto; height: auto; justify-content: center; padding: 0 var(--pad) var(--chapter-gap); overflow: visible; }
.thesis-figure-stage::before { position: absolute; inset: 4% 8% 14%; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse, rgba(83,108,232,.095), transparent 68%); filter: blur(42px); content: ""; }
.thesis-figure { width: min(100%, 1120px); max-width: 1120px; }

/* Engine: typography and card share the same viewport without collision. */
.engine-content > .kicker { top: 7%; left: 5%; }
.engine-content > h2 { top: 11%; left: 5%; max-width: 8.4ch; font-size: clamp(50px, 4.7vw, 70px); }
.engine-figure { position: absolute; z-index: 4; top: 10%; right: 4%; left: auto; width: min(64vw, 900px); height: auto; margin: 0; color: #fff; transform: none; }
body[data-page="home"] .engine-figure { box-shadow: 0 34px 96px rgba(7,17,92,.16), 0 0 76px rgba(133,150,255,.12) !important; }
.engine-figure .feature-card-head h3,
.engine-figure .ui-eyebrow { color: #fff; }
.engine-support { bottom: 8%; left: 5%; width: min(360px, 30vw); padding: 17px 19px; font-size: 14px; }
.engine-caption { left: 5%; bottom: 24px; color: rgba(255,255,255,.7); }

/* Dealy and Best-shot use the same left-story/right-product composition. */
.dealy-section,
.bestshot-section { position: relative; background: #fff; }
.dealy-stage,
.bestshot-stage { align-content: start; padding-top: 0; background-color: #fff; }
.dealy-stage::after,
.bestshot-stage::after { position: absolute; z-index: 0; top: 7%; right: 1%; bottom: 8%; width: 68%; border-radius: 44%; filter: blur(52px); content: ""; pointer-events: none; }
.dealy-stage::after { background: radial-gradient(ellipse, rgba(9,13,27,.2), rgba(64,83,190,.07) 42%, transparent 72%); }
.bestshot-stage::after { background: radial-gradient(ellipse, rgba(219,106,23,.11), transparent 70%); }
.dealy-stage > .kicker,
.bestshot-stage > .kicker { position: absolute; z-index: 2; top: 7%; left: 5%; }
.dealy-stage > h2,
.bestshot-stage > h2 { position: absolute; z-index: 2; top: 12%; left: 5%; width: 27%; margin: 0; font-size: clamp(48px, 4.5vw, 68px); }
.dealy-figure,
.bestshot-figure { position: absolute; z-index: 2; top: 9%; right: 4%; bottom: auto; width: min(63vw, 900px); margin: 0; filter: none; }
body[data-page="home"] .missing-edge-card { border-color: rgba(119,144,255,.2) !important; box-shadow: 0 30px 88px rgba(4,7,16,.18), 0 0 58px rgba(77,98,221,.065) !important; }
body[data-page="home"] .evening-card { border-color: rgba(219,106,23,.13) !important; box-shadow: 0 28px 82px rgba(115,66,30,.08), 0 0 56px rgba(219,106,23,.055) !important; }
.figure-stamp { position: relative; top: auto; left: auto; display: inline-flex; max-width: 100%; margin: 0 0 14px; padding: 7px 10px; border: 1px solid rgba(119,144,255,.24); background: rgba(255,255,255,.07); box-shadow: none; color: #b9c6ff; transform: none; }
.dealy-figure figcaption { margin: 12px 0 0; color: rgba(255,255,255,.54); }
.dealy-after,
.bestshot-after { min-height: 0; padding-top: 72px; padding-bottom: 96px; row-gap: 28px; }
.learn-strip { grid-column: 1 / 8; }
.dealy-support { grid-column: 9 / 13; align-self: center; font-size: clamp(28px, 3vw, 42px); }
.bestshot-support { grid-column: 1 / 6; align-self: center; font-size: clamp(28px, 3vw, 42px); }
.night-runner { grid-column: 6 / 13; min-height: 145px; }
.bestshot-after > .caption { grid-column: 6 / 13; }
.mode-switch { display: flex; align-items: center; gap: 4px; border: 1px solid rgba(219,106,23,.18); border-radius: 999px; padding: 3px; background: rgba(255,255,255,.72); }
.mode-switch button { border: 0; border-radius: 999px; padding: 8px 11px; color: #8a6c54; background: transparent; font-size: 10px; cursor: pointer; }
.mode-switch button.is-active { background: var(--ember); color: #fff; }

/* Operations chapters sit on a shared grid at a deliberate, compact height. */
.system-scene { position: relative; min-height: 780px; padding-top: var(--chapter-gap); padding-bottom: var(--chapter-gap); }
.system-scene::before { position: absolute; inset: 9% 6%; z-index: 0; border-radius: 48%; background: radial-gradient(ellipse, rgba(65,91,224,.075), transparent 68%); filter: blur(48px); content: ""; pointer-events: none; }
.system-copy,
.system-figure { position: relative; z-index: 1; }
.system-copy > h2 { margin-bottom: 38px; font-size: clamp(48px, 4.8vw, 64px); }
.system-copy > h3,
.system-camp .system-copy > h3 { font-size: clamp(36px, 3.6vw, 48px); }
.system-copy > p { margin-top: 20px; font-size: 15px; }
.system-sale .system-copy { grid-column: 1 / 5; }
.system-sale .system-figure { grid-column: 5 / 13; }
.system-camp .camp-figure { grid-column: 1 / 9; }
.system-camp .system-copy { grid-column: 10 / 13; }

/* Finale regains the denser Mongolia plate without losing the night film. */
.finale-map-plate { position: absolute; z-index: 1; top: 48%; left: 50%; width: min(76vw, 1120px); max-width: none; transform: translate(calc(-50% + var(--map-x,0px)), calc(-50% + var(--map-y,0px))) scale(var(--map-scale,.96)); opacity: var(--map-opacity,.07); filter: invert(1) contrast(24) grayscale(1) brightness(var(--map-light,1.48)); mix-blend-mode: screen; transition: transform .6s cubic-bezier(.2,.75,.2,1), filter .6s ease; will-change: transform, opacity, filter; }
.finale-content h2 { margin-top: 5vh; max-width: 16ch; font-size: clamp(44px, 5.1vw, 74px); }
.finale-close { left: 5%; bottom: 12%; width: min(43ch, 40vw); text-align: left; font-size: 15px; }
.finale-actions { right: 5%; bottom: 13%; }

@media (max-width: 900px) {
  :root { --pad: 24px; }
  .hero-frame { min-height: 640px; }
  .hero-title { font-size: clamp(54px, 10vw, 76px); }
  .bridge-stage,
  .engine-stage,
  .dealy-stage,
  .bestshot-stage,
  .finale-stage { top: 72px; width: calc(100% - 16px); height: calc(100svh - 80px); border-radius: 22px; }
  .engine-content > h2,
  .dealy-stage > h2,
  .bestshot-stage > h2 { font-size: 52px; }
  .engine-figure,
  .dealy-figure,
  .bestshot-figure { right: 24px; width: min(67vw, calc(100% - 48px)); }
}

@media (max-width: 760px) {
  .hero-nav { top: 10px; width: calc(100% - 24px); min-height: 50px; }
  .hero-nav-right { gap: 8px; }
  .hero-nav .lang-switch { padding: 2px; }
  .hero-nav .lang-switch button { min-width: 27px; height: 25px; padding-inline: 5px; font-size: 9px; }
  html[lang="mn"] .hero-title { font-size: clamp(42px, 12.7vw, 62px); }
  .hero-shell { min-height: 90svh; padding: 8px; }
  .hero-frame { height: 88svh; min-height: 650px; border-radius: 24px; }
  .hero-copy { left: 24px; right: 24px; bottom: 188px; }
  .hero-title { max-width: 8ch; font-size: clamp(50px, 14vw, 62px); }
  .hero-copy > p { max-width: 25ch; font-size: 13px; }
  .hero-actions { flex-wrap: nowrap; }
  .hero-actions .button { padding-inline: 15px; white-space: nowrap; }
  .hero-stats { top: 78px; }
  .field-cutout { width: 190px; min-height: 94px; padding-left: 34px; }

  .bridge-scene { --pin: 128vh !important; }
  #bridgeCanvas { inset: 0; height: 100%; }
  .bridge-overlay { top: 9%; left: 18px; width: calc(100% - 36px); max-width: none; padding: 18px; font-size: 31px; }

  .thesis-statement { display: block; padding-top: 80px; padding-bottom: 36px; }
  .thesis-statement h2 { margin-top: 18px; font-size: 50px; }
  .thesis-reveal { margin-top: 34px; font-size: 20px; }
  .thesis-figure-stage { padding: 0 12px 80px; }
  body[data-page="home"] .records-figure,
  body[data-page="home"] .vida-card,
  body[data-page="home"] .missing-edge-card,
  body[data-page="home"] .dealy-flow-card,
  body[data-page="home"] .evening-card,
  body[data-page="home"] .operations-card,
  body[data-page="home"] .occupancy-feature { padding: 17px 14px !important; border-radius: 20px !important; }
  .feature-card-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: flex-start; gap: 12px; }
  .feature-card-head h3 { font-size: 20px; }
  .figure-metric b { font-size: 24px; }
  body[data-page="home"] .infographic-host { padding-inline: 2px; }
  body[data-page="home"] .viz-svg { width: 100%; max-width: 100%; }

  .engine-scene { --pin: 150vh !important; }
  .engine-content > .kicker { top: 4%; left: 18px; }
  .engine-content > h2 { top: 7%; left: 18px; right: 18px; max-width: 10ch; font-size: 42px; }
  .engine-support { top: 24.2%; bottom: auto; left: 18px; width: calc(100% - 36px); padding: 0; color: rgba(255,255,255,.78); background: transparent; box-shadow: none; font-size: 11.5px; line-height: 1.35; }
  .engine-support::before { display: none; }
  .engine-figure { top: 30%; right: 16px; left: 16px; width: auto; max-width: none; }
  .engine-caption { right: 18px; left: 18px; bottom: 12px; }
  body[data-page="home"] .vida-card .viz-mobile-svg { height: min(42vh, 350px); }

  .dealy-pin,
  .bestshot-pin { --pin: 148vh !important; }
  .dealy-stage > .kicker,
  .bestshot-stage > .kicker { top: 4%; left: 18px; }
  .dealy-stage > h2,
  .bestshot-stage > h2 { top: 8%; left: 18px; width: calc(100% - 36px); font-size: 44px; }
  .dealy-figure,
  .bestshot-figure { top: 27%; right: 16px; left: 16px; width: auto; max-width: none; }
  body[data-page="home"] .dealy-figure .viz-mobile-svg { height: min(42vh, 350px); }
  body[data-page="home"] .bestshot-figure .viz-mobile-svg { height: min(38vh, 320px); }
  .figure-stamp { margin-bottom: 11px; padding: 6px 8px; font-size: 8px; white-space: normal; }
  .figure-legend { display: none; }
  .mode-switch { max-width: 150px; }
  .mode-switch button { padding: 6px 8px; font-size: 8px; }
  .dealy-after,
  .bestshot-after { display: block; padding-top: 58px; padding-bottom: 72px; }
  .dealy-support,
  .bestshot-support { margin-top: 42px; font-size: 32px; }
  .night-runner { margin-top: 36px; }
  .bestshot-after > .caption { margin-top: 18px; }

  .system-scene { display: flex; flex-direction: column; align-items: stretch; min-height: 0; padding-top: 72px; padding-bottom: 72px; }
  .system-copy,
  .system-figure { width: 100%; max-width: none; }
  .system-copy > h2 { margin-bottom: 28px; font-size: 48px; }
  .system-copy > h3,
  .system-camp .system-copy > h3 { font-size: 38px; }
  .system-figure { margin-top: 36px; }
  .system-camp .camp-figure { order: 2; }
  .system-camp .system-copy { order: 1; }
  body[data-page="home"] .system-figure .viz-mobile-svg { height: min(50vh, 420px); }

  .finale-scene { --pin: 185vh !important; }
  .finale-map-plate { top: 42%; width: 115vw; opacity: var(--map-opacity,.08); }
  .finale-content h2 { margin-top: 7vh; width: calc(100% - 28px); font-size: 43px; }
  .finale-close { right: 20px; bottom: 23%; left: 20px; width: auto; text-align: center; font-size: 14px; }
  .finale-actions { right: 18px; bottom: 8%; left: 18px; display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  .figure-card { transform: none !important; opacity: 1 !important; }
}

/* Final restraint pass: interaction stays inside the visual objects. */
.bridge-stage { background: linear-gradient(180deg, #fff 0%, #fbfcff 44%, #f6f8ff 100%); }
.bridge-stage::before { content: none; }
#bridgeCanvas { cursor: default; touch-action: pan-y; }

/* The Muybridge sequence is a moving subject, not an asset browser. */
.horse-strip {
  position: relative;
  display: block;
  width: 100%;
  height: 340px;
  min-height: 340px;
  padding: 0;
  overflow: hidden;
  background: #fff;
}
.horse-color-filter { position: absolute; width: 0; height: 0; overflow: hidden; }
.horse-runway { position: absolute; inset: 0; overflow: hidden; }
.horse-runway-line {
  position: absolute;
  right: 0;
  bottom: 63px;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(35,55,236,.18) 7%, rgba(35,55,236,.18) 93%, transparent 100%);
}
.horse-runner {
  position: absolute;
  bottom: 32px;
  left: 0;
  width: min(34vw, 460px);
  will-change: transform;
}
.horse-frame {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  opacity: 0;
  filter: url(#horse-ink-filter);
  mix-blend-mode: multiply;
  transform: none;
  transition: opacity .24s ease;
}
.horse-runway.is-ready .horse-frame { opacity: .96; }
.horse-runway.is-ready.is-running .horse-runner { animation: horseTraverse 7s linear infinite; }
.horse-runway.is-static .horse-runner { left: 50%; animation: none; transform: translateX(-50%); }
@keyframes horseTraverse {
  from { transform: translateX(-62%); }
  to { transform: translateX(100vw); }
}

/* Keep only the labels that explain the data itself. */
.ui-eyebrow,
.figure-metric,
.live-pill,
.figure-legend,
.figure-stamp,
.figure-card figcaption,
.viz-meta-row { display: none !important; }
.feature-card-head { display: block; }
.feature-card-head h3 { margin-top: 0; }

/* Best-shot is evidence first: one state map followed by a fixed backtest result. */
.bestshot-figure {
  top: 10%;
  right: 5%;
  width: min(58vw, 820px);
  pointer-events: none;
}
.evening-card .infographic-host { padding-bottom: 22px; }
.bestshot-after {
  min-height: 430px;
  align-items: center;
  padding-top: 84px;
  padding-bottom: 96px;
  row-gap: 24px;
}
.bestshot-proof-copy { grid-column: 1 / 7; }
.bestshot-proof-copy h3 {
  max-width: 18ch;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 3.2vw, 46px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.025em;
}
.bestshot-proof-copy p {
  max-width: 46ch;
  margin: 22px 0 0;
  color: rgba(16,16,20,.72);
  font-size: 16px;
  line-height: 1.5;
}
.bestshot-proof-copy small {
  display: block;
  margin-top: 14px;
  color: rgba(16,16,20,.46);
  font-size: 11px;
  line-height: 1.45;
}
.bestshot-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, 320px);
  margin-top: 26px;
  padding: 15px 18px;
  border: 1px solid rgba(16,16,20,.13);
  border-radius: 999px;
  color: var(--ink);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.bestshot-page-link:hover { border-color: rgba(219,106,23,.36); box-shadow: 0 12px 32px rgba(115,66,30,.09); transform: translateY(-2px); }
.bestshot-page-link span { color: var(--ember); font-size: 17px; }
.bestshot-results {
  grid-column: 8 / 13;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px;
}
.bestshot-result {
  min-width: 0;
  padding: 24px;
  border: 1px solid rgba(25,39,75,.09);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(25,39,75,.065);
}
.bestshot-result.is-best {
  border-color: rgba(219,106,23,.2);
  background: linear-gradient(145deg,#fff 0%,#fff8f2 100%);
  box-shadow: 0 20px 54px rgba(153,78,25,.1);
}
.bestshot-result span,
.bestshot-result small { display: block; color: rgba(16,16,20,.5); font-size: 11px; line-height: 1.35; }
.bestshot-result b {
  display: block;
  margin: 24px 0 5px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(38px, 3.6vw, 54px);
  font-weight: 400;
  line-height: .9;
  letter-spacing: -.04em;
}
.bestshot-result.is-best b { color: var(--ember); }

/* The finale ends as a scene; the footer starts as a separate white surface. */
body[data-page="home"] .site-footer {
  position: relative;
  z-index: 10;
  margin-top: 0;
  padding-top: 112px;
  background: #fff;
  color: rgba(16,16,20,.58);
}
body[data-page="home"] .site-footer .brand,
body[data-page="home"] .site-footer .foot-col h5 { color: var(--ink); }
body[data-page="home"] .site-footer .foot-col a,
body[data-page="home"] .site-footer .foot-brand p,
body[data-page="home"] .site-footer .foot-bottom { color: rgba(16,16,20,.56); }
body[data-page="home"] .site-footer .foot-bottom { border-top-color: rgba(25,39,75,.1); }
body[data-page="home"] .site-footer .foot-brand .mn { color: var(--cobalt); }

@media (max-width: 900px) {
  .bestshot-figure { right: 24px; width: min(64vw, calc(100% - 48px)); }
}

@media (max-width: 760px) {
  .bridge-caption { display: none; }

  .horse-strip { height: 238px; min-height: 238px; padding: 0; }
  .horse-runway-line { bottom: 47px; }
  .horse-runner { bottom: 26px; width: 74vw; }
  .horse-runway.is-ready.is-running .horse-runner { animation-duration: 5.8s; }

  .bestshot-figure { top: 24%; right: 16px; left: 16px; width: auto; }
  body[data-page="home"] .bestshot-figure .viz-mobile-svg { height: auto; }
  .evening-card .infographic-host { padding-bottom: 14px; }
  .bestshot-after { display: block; min-height: 0; padding: 72px 18px 80px; }
  .bestshot-proof-copy h3 { max-width: 16ch; font-size: 36px; }
  .bestshot-proof-copy p { margin-top: 18px; font-size: 15px; }
  .bestshot-results { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 34px; }
  .bestshot-result { padding: 18px 14px; border-radius: 16px; }
  .bestshot-result b { margin-top: 20px; font-size: 42px; }
  .bestshot-page-link { width: 100%; margin-top: 24px; }

  body[data-page="home"] .site-footer { padding-top: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  .horse-runner { left: 50%; animation: none; transform: translateX(-50%); }
}

/* Dealy handbook integration: one continuous system, never a detached graph. */
body[data-page="home"] .dealy-stage::after {
  background:
    radial-gradient(ellipse at 35% 45%, rgba(32,184,166,.12), transparent 48%),
    radial-gradient(ellipse at 72% 55%, rgba(125,137,255,.10), transparent 54%);
}
body[data-page="home"] .dealy-stage > h2 { width: 30%; font-size: clamp(46px, 4.25vw, 64px); }
body[data-page="home"] .dealy-figure { width: min(64vw, 920px); }
body[data-page="home"] .dealy-flow-card { border-color: #142b40 !important; box-shadow: 0 32px 92px rgba(6,17,31,.22) !important; }
body[data-page="home"] .dealy-after { min-height: 0; padding-top: 78px; padding-bottom: 104px; row-gap: 0; align-items: stretch; }
body[data-page="home"] .dealy-loop-strip { grid-column: 1 / 9; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); overflow: hidden; border: 1px solid rgba(16,16,20,.10); border-radius: 22px; background: #fff; box-shadow: 0 20px 60px rgba(24,43,84,.065); }
body[data-page="home"] .dealy-loop-strip article { min-height: 210px; padding: 25px 22px; border-left: 1px solid rgba(16,16,20,.09); }
body[data-page="home"] .dealy-loop-strip article:first-child { border-left: 0; }
body[data-page="home"] .dealy-loop-strip span { color: #20a795; font: 500 10px/1 var(--mono); letter-spacing: .12em; }
body[data-page="home"] .dealy-loop-strip b { display: block; margin-top: 54px; color: var(--ink); font-size: 21px; font-weight: 600; letter-spacing: -.03em; }
body[data-page="home"] .dealy-loop-strip p { max-width: 19ch; margin: 12px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
body[data-page="home"] .dealy-loop-strip article:nth-child(3) span { color: #6775e8; }
body[data-page="home"] .dealy-loop-strip article:nth-child(4) span { color: #2a9c69; }
body[data-page="home"] .dealy-after-copy { grid-column: 10 / 13; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 6px 0; }
body[data-page="home"] .dealy-after-copy .dealy-support { margin: 0; font-family: var(--serif); font-size: clamp(30px,3vw,43px); line-height: 1.02; letter-spacing: -.035em; }
body[data-page="home"] .dealy-page-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; padding: 16px 18px; border: 1px solid rgba(16,16,20,.13); border-radius: 999px; color: var(--ink); background: #fff; font-size: 13px; font-weight: 600; transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease; }
body[data-page="home"] .dealy-page-link:hover { border-color: rgba(82,101,239,.38); box-shadow: 0 12px 32px rgba(24,43,84,.09); transform: translateY(-2px); }
body[data-page="home"] .dealy-page-link span { color: #5265ef; font-size: 17px; }

/* ERP pair: directional Barilga, cyclical GerOS, one shared identity below. */
.erp-pair-intro { min-height: 390px; align-items: end; padding-top: 90px; padding-bottom: 72px; }
.erp-pair-intro > .kicker { grid-column: 1 / 13; align-self: end; }
.erp-pair-intro > h2 { grid-column: 1 / 8; max-width: 12ch; margin: 24px 0 0; font-size: clamp(52px, 5vw, 72px); }
.erp-pair-intro > p:last-child { grid-column: 9 / 13; align-self: end; max-width: 40ch; margin: 0 0 8px; color: var(--ink-soft); font-size: 16px; line-height: 1.55; }
.system-label { margin: 0 0 28px; color: var(--cobalt); font: 600 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.system-copy .system-feature-line { margin-top: 30px; color: rgba(16,16,20,.48); font: 500 10px/1.55 var(--mono); letter-spacing: .025em; }
.system-product-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; width: min(100%, 280px); margin-top: 30px; padding: 15px 18px; border: 1px solid rgba(16,16,20,.13); border-radius: 999px; color: var(--ink); background: #fff; font-size: 13px; font-weight: 600; transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.system-product-link:hover { border-color: rgba(35,55,236,.34); box-shadow: 0 12px 32px rgba(24,43,84,.09); transform: translateY(-2px); }
.system-product-link span { color: var(--cobalt); font-size: 17px; }
.system-sale { border-top: 1px solid rgba(25,39,75,.08); }
.system-camp { border-top: 1px solid rgba(25,39,75,.08); }
.erp-shared-home { align-items: center; margin-bottom: var(--chapter-gap); padding-top: 74px; padding-bottom: 74px; border: 1px solid rgba(118,139,240,.18); border-radius: 30px; color: #fff; background: radial-gradient(circle at 76% 26%, rgba(59,83,230,.24), transparent 32%), #08102a; box-shadow: 0 28px 82px rgba(7,15,40,.17); }
.erp-shared-copy { grid-column: 1 / 6; }
.erp-shared-copy .kicker { color: #aab6ff; }
.erp-shared-copy h3 { max-width: 11ch; margin: 22px 0 0; color: #fff; font-size: clamp(38px,3.7vw,53px); }
.erp-shared-copy > p:last-child { max-width: 40ch; margin: 22px 0 0; color: rgba(226,232,255,.62); font-size: 14px; line-height: 1.55; }
.erp-shared-map { grid-column: 7 / 13; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: stretch; }
.erp-shared-map > div { min-height: 112px; padding: 21px; border: 1px solid rgba(151,167,244,.19); border-radius: 18px; background: rgba(255,255,255,.055); }
.erp-shared-map > div:first-child { grid-column: 1 / -1; min-height: 94px; text-align: center; }
.erp-shared-map > i { display: none; }
.erp-shared-map span { display: block; color: rgba(220,228,255,.46); font: 500 8px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.erp-shared-map b { display: block; margin-top: 14px; color: #fff; font-size: 15px; font-weight: 600; }

@media (max-width: 760px) {
  body[data-page="home"] .dealy-stage > h2 { width: calc(100% - 36px); font-size: 42px; }
  body[data-page="home"] .dealy-figure { top: 29%; }
  body[data-page="home"] .dealy-after { display: block; padding: 58px 18px 76px; }
  body[data-page="home"] .dealy-loop-strip { grid-template-columns: 1fr 1fr; }
  body[data-page="home"] .dealy-loop-strip article { min-height: 152px; padding: 20px; border-top: 1px solid rgba(16,16,20,.09); }
  body[data-page="home"] .dealy-loop-strip article:nth-child(odd) { border-left: 0; }
  body[data-page="home"] .dealy-loop-strip article:nth-child(-n+2) { border-top: 0; }
  body[data-page="home"] .dealy-loop-strip b { margin-top: 30px; font-size: 18px; }
  body[data-page="home"] .dealy-after-copy { margin-top: 40px; padding: 0; }
  body[data-page="home"] .dealy-after-copy .dealy-support { font-size: 32px; }
  body[data-page="home"] .dealy-page-link { margin-top: 24px; }
  .erp-pair-intro { display: block; min-height: 0; padding: 84px 18px 64px; }
  .erp-pair-intro > h2 { margin-top: 20px; font-size: 46px; }
  .erp-pair-intro > p:last-child { margin-top: 30px; font-size: 15px; }
  .system-label { margin-bottom: 22px; }
  .system-copy .system-feature-line { margin-top: 24px; }
  .system-product-link { width: 100%; margin-top: 24px; }
  .erp-shared-home { display: block; margin: 0 12px 76px; padding: 42px 24px; border-radius: 24px; }
  .erp-shared-copy h3 { font-size: 39px; }
  .erp-shared-map { grid-template-columns: 1fr; margin-top: 38px; }
  .erp-shared-map > div:first-child { grid-column: auto; }
}
