:root {
  color-scheme: dark;

  /* Design tokens */
  --bg: #0e1726;
  --bg-alt: #101c30;
  --surface: #16233a;
  --surface-border: #26364f;
  --text: #f4f7fb;
  --muted: #a9b6cb;
  --accent: #ffc233;
  --accent-ink: #0e1726;

  /* Supporting chart hues (podium 2nd/3rd place; not part of the core set) */
  --podium-2nd: #8fa6c9;
  --podium-3rd: #d9a441;

  /* Legacy aliases so the rest of this file didn't need a full rewrite */
  --text-secondary: var(--muted);
  --label: var(--accent);
  --card-bg: var(--surface);
  --card-text: var(--text);
  --card-text-muted: var(--muted);
  --card-link: var(--accent);
  --coral: var(--accent);
  --lavender: var(--surface-border);
  --peach: var(--accent);
  --navy: var(--surface);
  --navy-border: var(--surface-border);
  --amber: var(--accent);
  --rail-color: var(--accent);
  --border: var(--surface-border);

  /* Adaptive layout system: --content-w is the single source of truth
     for how wide the readable column is at any viewport, used by
     .container AND by the rail's position formula below, so the two
     can never drift apart the way they did before (bug (c)). */
  --gutter: clamp(16px, 4vw, 48px);
  --content-w: clamp(320px, calc(100% - 2 * var(--gutter)), 1120px);
}

/* From 900px the rail becomes `position: absolute` and needs its own
   32px + its own width of clearance *inside* the gutter - the general
   gutter above can shrink to ~36px right at 900px, which isn't enough
   room and would clip the rail off-screen. A slightly taller floor here
   keeps rail+gap safely inside the gutter across the whole 900-1199px
   range the task specifically called out. */
@media (min-width: 900px) {
  :root {
    --gutter: clamp(44px, 4vw, 56px);
  }
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(16px, 15px + 0.25vw, 18px);
  color: var(--text-secondary);
  line-height: 1.6;
  background: var(--bg);
}

/* position:relative + z-index:1 here (and on header.hero below) is the
   actual fix for the track passing over text: .track-wrap's z-index:0
   alone does NOT put it behind plain unpositioned flow content - a
   positioned element with z-index:0 still paints above the default
   "auto" stacking layer in-flow siblings live in, so <main> itself
   needs a z-index too (and specifically a HIGHER one) for its entire
   contents to paint above the track as a block, regardless of whether
   any individual element inside <main> has its own position/z-index. */
main {
  position: relative;
  z-index: 1;
  padding-bottom: 64px;
}

/* The readable column everywhere on the site - width-based (not
   padding-based), so "the container's edge" and "the text's edge" are
   always the same point. Used once per section (not once for the whole
   page) so each section can independently have a full-bleed background
   behind it; see .band below. Never paints its own background - a
   section providing one must stay visible through here (bug (b)). */
.container {
  width: var(--content-w);
  max-width: 100%;
  margin: 0 auto;
  background: transparent;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 800;
}

h2 {
  font-size: clamp(22px, 1.4rem + 1vw, 28px);
}

.station h2 {
  font-size: clamp(28px, 3.4vw, 44px);
}

p {
  font-size: 1em;
  margin: 0 0 12px;
  max-width: 65ch;
}

section {
  margin-top: clamp(56px, 8vw, 112px);
}

.station {
  scroll-margin-top: 24px;
}

.station-label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--label);
  font-weight: 600;
  font-size: 13px;
  margin: 0 0 10px;
}

/* Mobile (<900px) winding track (2026-11-29) - replaces the old
   position:fixed "rail" gauge entirely (a viewport-pinned progress bar
   that stayed on screen while content scrolled underneath it - the
   opposite of what a journey/track metaphor implies, and the repeated
   source of progress-range bugs documented earlier in this file's own
   history, see docs/SYSTEM_MAP.md). This is a small-scale sibling of the
   >=900px winding track below: a `position:absolute` (NOT fixed) SVG
   overlay that scrolls WITH the page like any other in-flow content,
   its own nodes/path entirely DOM-measured by `home.js` (never
   hardcoded) from each station's own label line, never a cached
   ScrollTrigger range. Separate element IDs/classes throughout (`
   .mobile-track-*`/`#mobileTrack*`) from the >=900px track below -
   the two are fully independent blocks in `home.js`, neither touches
   the other's state, exactly like the old rail/track split did. Hidden
   by default (`display:none`) until `home.js` has measured and built a
   path, so a no-JS visitor never sees an unpositioned overlay - station
   content itself is always fully readable either way (decorative only,
   `aria-hidden`). Actual CSS lives inside this file's `@media
   (max-width: 899px)` block (see below) - only the `>=900px` defensive
   hide rule needs to live here, unconditional, so this can never show
   at desktop widths regardless of any JS timing edge case.
   `z-index: 2` - ABOVE `main`'s own `z-index: 1` - is deliberately the
   opposite of the >=900px track's `z-index: 0` (below `main`): that
   track's path zigzags THROUGH the same horizontal space station text
   occupies, so it has to duck behind content (and `.band` sections get
   `background:transparent` at >=900px specifically so it stays visible
   there too - see that rule's own comment). Mobile's track lane never
   leaves the ~6-22px strip at the very left edge - content starts at
   40px (below) - so there is no text it could ever paint over; sitting
   above `main` instead means it stays visible through every `.band`
   section's own opaque background too (unchanged, still opaque at
   <900px - no reason to touch it for a track that never needs to show
   through it), confirmed empirically after the first build attempt
   rendered the marker invisible behind Station 4/Final's `.band`
   backgrounds with the desktop-style `z-index: 0` (docs/SYSTEM_MAP.md). */
.mobile-track-wrap {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 2;
  pointer-events: none;
}

@media (min-width: 900px) {
  .mobile-track-wrap {
    display: none !important;
  }
}

/* --- Winding track (Option B), >=900px only --------------------------
   Hidden by default (shown only once home.js has successfully measured
   and built the path - see its own comment) so a no-JS visitor never
   sees an unpositioned/broken overlay; the station content itself is
   fully readable either way, this is purely decorative (aria-hidden).
   Node/path coordinates are never hardcoded - see home.js. */
.track-wrap {
  display: none;
  position: absolute;
  left: 0;
  top: 0;
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 899px) {
  .track-wrap {
    display: none !important;
  }
}

.track-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.track-base {
  fill: none;
  stroke: var(--surface-border);
  stroke-width: 18;
  stroke-linecap: round;
}

.track-sleepers {
  fill: none;
  stroke: var(--bg);
  stroke-width: 18;
  stroke-dasharray: 3 11;
  stroke-linecap: butt;
}

.track-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
}

.track-node-dot {
  fill: var(--bg);
  stroke: var(--accent);
  stroke-width: 5;
  animation: trackNodePulse 2.4s ease-in-out infinite;
}

.track-marker {
  fill: var(--text);
  stroke: var(--accent);
  stroke-width: 2.5;
}

@keyframes trackNodePulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(255, 194, 51, 0));
  }
  50% {
    filter: drop-shadow(0 0 6px rgba(255, 194, 51, 0.8));
  }
}

@media (prefers-reduced-motion: reduce) {
  .track-node-dot {
    animation: none;
  }
}

/* Each station's content sits in whichever half its node ISN'T in -
   .container's own `width: var(--content-w)` (home.css, top of file)
   is overridden here to half that. The margin math anchors the half-
   width box's outer edge to --content-w's own edge (not the section's
   raw/viewport edge, which `margin:0`/`auto` alone would do - a
   section has no width constraint of its own) - same `50% -
   content-w/2` gutter term the rail used to use. Not touching the
   default rule itself, so #about-onroute and every non-track section
   stay full-width/centered as before. */
@media (min-width: 900px) {
  .track-node .container {
    max-width: calc(var(--content-w) * 0.46);
  }
  .track-node-right .container {
    margin-left: auto;
    margin-right: calc(50% - var(--content-w) / 2);
  }
  .track-node-left .container {
    margin-left: calc(50% - var(--content-w) / 2);
    margin-right: auto;
  }
  .track-node-final .container {
    max-width: var(--content-w);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .track-node-final .about-buttons {
    justify-content: center;
  }
  /* .stat-cards/.steps/.more-grid/.join-chips/.timeline-cards all go
     multi-column once the VIEWPORT hits 700px (or, for .timeline-cards,
     ARE multi-column by default - see their own rules) - but every
     track-node's .container is now a <=46%-of-content-w half column
     (515px at most, since --content-w itself caps at 1120px - no
     viewport, however wide, ever makes this column wider), so forcing 3
     or 4 flexible (1fr) grid columns into it would hit CSS Grid's
     default `min-width: auto` floor (a grid item won't shrink below its
     own content's intrinsic minimum) and burst out of the column,
     invading the track's empty half - confirmed at 1900px wide
     (docs/SYSTEM_MAP.md). Forced to 1 column here, permanently, for
     every width this media query covers - there is no "wide enough
     again" breakpoint to re-enable multi-column at, because the column
     literally never gets wider than 515px. */
  .track-node .stat-cards,
  .track-node .steps,
  .track-node .more-grid,
  .track-node .join-chips,
  .track-node .timeline-cards {
    grid-template-columns: 1fr;
  }
}

/* Privacy card + Station 1, sharing one row flanking the track (left/
   right of it) - the only pair of sections on the page that overlap in
   document flow instead of fully stacking. <main> becomes a (trivially
   single-column) grid from 900px purely so #hero-privacy-section and
   #station-why can both claim `grid-row: 1` explicitly; every other
   section is left unplaced and auto-flows into its own next row, full
   width, exactly as plain block stacking already rendered it - this
   changes nothing for them (margin-bottom is 0 everywhere in this file,
   so losing block flow's margin COLLAPSING by switching to grid is a
   no-op numerically, since one side of every section-to-section gap was
   already 0). Station 1 gets a fixed 64px margin-top (replacing the
   generic clamp(56px,8vw,112px) `section` rule just for it) and the
   privacy card gets 0 - without this override the generic clamp is
   >64px at every tested width (900-1920px), which would put the card's
   top BELOW Station 1's, the opposite of what's wanted. z-index makes
   the card's own surface/text paint above Station 1's full-width
   `.band` background in the overlap (sections paint as one box,
   background included, in DOM order by default - without this the
   band would paint over the card, not behind it). */
@media (min-width: 900px) {
  main {
    display: grid;
    grid-template-columns: 1fr;
  }
  /* grid-column:1 is explicit on BOTH, not left to auto - grid
     auto-placement actively avoids putting an auto-column item on top of
     one already placed, so with only grid-row set it was creating a 2nd
     IMPLICIT column instead of overlapping (confirmed via
     getComputedStyle().gridTemplateColumns - it was rendering two
     columns on a 1-column explicit template). Explicit row AND column on
     both is what actually makes them share one cell, which only then CSS
     Grid intentionally allows. */
  #hero-privacy-section {
    grid-row: 1;
    grid-column: 1;
    margin-top: 0;
    z-index: 2;
  }
  #station-why {
    grid-row: 1;
    grid-column: 1;
    margin-top: 64px;
  }
  /* Narrower than the generic 46%-of-content-w .track-node-left column -
     the card's own design width (340-360px), not the full left-lane
     column every other left-side station text block uses. Left-aligned
     margin is still the generic .track-node-left .container rule above,
     unaffected - this only overrides max-width. */
  #hero-privacy-section .container {
    max-width: 340px;
  }
}

/* Privacy/hide-yourself card - same card design as when it lived in the
   hero (2026-11-27d), now inside #hero-privacy-section instead. No top
   margin of its own - previously 28px to clear the About block above it
   in the hero, not needed now that it's the only thing in its own
   .container. */
.hero-privacy-card {
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-left: 4px solid var(--accent);
  border-radius: 20px;
}

.hero-privacy-icon {
  display: block;
  color: var(--accent);
  margin: 0 0 10px;
}

.hero-privacy-heading {
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(18px, 1.4vw + 14px, 20px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
  margin: 0 0 8px;
}

.hero-privacy-body {
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
}

/* Kept at the site's 14px floor (see docs/SYSTEM_MAP.md's 2026-11-26c
   "nothing below 14px" rule) - reads smaller/muted via the divider +
   reduced opacity instead of a smaller font-size. */
.hero-privacy-disclaimer {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  opacity: 0.8;
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--surface-border);
}

/* Opaque backdrop for the specific loose (not-already-in-a-card) text
   blocks the winding track's path can run near: #more's own heading
   and its trailing "Joining as a volunteer..." paragraph, and the
   final station's heading/subtitle/buttons group. z-index already
   guarantees this text is never actually hidden (main/.hero are both
   above .track-wrap - see their own rules) - this is purely so the
   amber line visually ducks behind a solid shape instead of running
   straight across open text. Always `--bg` - every section the track
   runs behind is transparent now (see `.band` below), so `--bg` (the
   body's own background) is what's actually behind these pads
   everywhere, `#station-join` included - no longer `--bg-alt` there. */
@media (min-width: 900px) {
  .track-text-pad {
    position: relative;
    z-index: 1;
    background: var(--bg);
    padding: 4px 0;
  }
  .track-text-pad-final {
    padding: 16px 24px;
    border-radius: 20px;
  }
}

/* Hero */

.hero {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 48px 0 40px;
  text-align: center;
}

/* min-height trimmed from 72vh (2026-11-27d, tuned against the hero
   height while it still hosted the privacy card) now that the card has
   moved out to its own track-node beside Station 1 - keeps the hero
   from leaving a big empty gap below its (now shorter) content before
   Station 1 appears. */
@media (min-width: 900px) {
  .hero {
    min-height: 58vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
  }
}

/* Two-column hero from 900px: left = wordmark/tagline/h1/buttons/join
   line, right = the train illustration alone, vertically centered - the
   privacy card used to live here (2026-11-27d) but has moved out of the
   hero entirely, to its own track-node beside Station 1 (see
   docs/SYSTEM_MAP.md and the .hero-privacy-card rules, now scoped under
   #hero-privacy-section below) - this reverts the grid to its pre-card,
   4-row shape. DOM order is unchanged (wordmark, subline, intro, train,
   reveal) - only the grid-area assignments reorder it visually. */
@media (min-width: 900px) {
  .hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    grid-template-areas:
      "wordmark train"
      "subline  train"
      "intro    train"
      "reveal   train";
    align-items: center;
    column-gap: 48px;
    text-align: left;
  }
  .hero-grid .wordmark {
    grid-area: wordmark;
    justify-content: flex-start;
  }
  .hero-grid .wordmark-subline {
    grid-area: subline;
  }
  .hero-grid .hero-about-intro {
    grid-area: intro;
  }
  .hero-grid .train-scene {
    grid-area: train;
    max-width: none;
    height: 220px;
  }
  .hero-grid .hero-reveal {
    grid-area: reveal;
  }
  /* The two button labels ("Count for your college · Android"/"...
     iPhone") wrap mid-word when split side-by-side across the narrower
     left column here - give each the full column width instead. */
  .hero-grid .buttons {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Hero app screenshot (optional, see home.js's HERO_APP_SHOT). Only
   ever exists in the DOM when that config is set - inserted right
   after `.buttons` so a no-JS/mobile reader sees it directly below the
   CTAs. At >=900px it's pulled out of flow into the right column
   (approximately where `.train-scene`'s grid-area sits, which is
   hidden whenever this frame exists) via absolute positioning, since a
   JS-inserted node outside `.hero-grid`'s own direct children can't
   take a named `grid-area`. */
.hero-phone-frame {
  display: block;
  margin: 24px auto 0;
  width: clamp(220px, 24vw, 300px);
  max-height: 70vh;
  border-radius: 40px;
  border: 8px solid var(--surface-border);
  background: var(--surface);
  overflow: hidden;
}

.hero-phone-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: cover;
}

@media (min-width: 900px) {
  .hero-grid {
    position: relative;
  }
  .hero-phone-frame {
    position: absolute;
    top: 50%;
    right: 0;
    margin: 0;
    transform: translateY(-50%);
  }
}

@keyframes heroPhoneFloatMobile {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes heroPhoneFloatDesktop {
  0%,
  100% {
    transform: translateY(-50%);
  }
  50% {
    transform: translateY(calc(-50% - 8px));
  }
}

.hero-phone-float {
  animation: heroPhoneFloatMobile 4s ease-in-out infinite;
}

@media (min-width: 900px) {
  .hero-phone-float {
    animation-name: heroPhoneFloatDesktop;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-phone-float {
    animation: none;
  }
}

.hero h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--text);
}

.hero .tagline {
  font-style: italic;
  font-size: 16px;
  font-weight: 500;
  color: #e6e9ff;
  margin: 0 0 22px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hero-reveal {
  opacity: 1;
  transform: none;
}

/* Hero staggered entrance: hidden only once JS confirms it can animate it
   back in (html.js, added by home.js) - a no-JS visitor always sees the
   hero fully visible, and a JS-but-no-GSAP visitor gets `.is-visible`
   added immediately as a fallback (see home.js). */
html.js .hero-stagger {
  opacity: 0;
  transform: translateY(18px);
}

html.js .hero-stagger.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js .hero-stagger {
    opacity: 1;
    transform: none;
  }
}

/* Wordmark */

.wordmark {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
  gap: 0.2em;
  font-size: clamp(30px, 7vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wm-on {
  /* The wordmark's own brand color, not the UI accent - see
     docs/SYSTEM_MAP.md "Logo vs accent" note for why these stay distinct. */
  color: #ff3b47;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.wm-route {
  color: var(--text);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.wm-india-pill {
  display: inline-flex;
  align-items: center;
  background: #ffffff;
  border-radius: 999px;
  padding: 0.08em 0.32em;
}

.wm-india {
  /* Original brand color (blue on the pill's own white background) -
     unrelated to the page's dark/accent tokens. */
  color: #1e5aa8;
}

.wordmark-subline {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

@media (min-width: 700px) {
  .wordmark-subline {
    font-size: 18px;
  }
}

/* Compact "About OnRoute India" intro, moved into the hero (used to be
   the About OnRoute section's own heading + first sentence - see
   index.html and docs/SYSTEM_MAP.md). Deliberately smaller than the
   hero's own h1 below it. */
.hero-about-intro {
  margin: 0 0 20px;
}

.hero-about-heading {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--label);
  margin: 0 0 4px;
}

.hero-about-text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0;
  max-width: 46ch;
}

/* Train scene (pure CSS illustration) */

.train-scene {
  position: relative;
  width: 100%;
  max-width: 640px;
  height: 140px;
  margin: 28px auto 8px;
  overflow: hidden;
}

.platform-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 28px;
  height: 3px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

.figures {
  position: absolute;
  left: 6%;
  bottom: 28px;
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.figure {
  display: block;
  width: 18px;
  height: 42px;
  border-radius: 9px;
  position: relative;
}

.figure::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 1px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: inherit;
}

.figure-a {
  background: #e3e8ff;
}

.figure-b {
  background: var(--coral);
}

.train {
  position: absolute;
  right: 4%;
  bottom: 18px;
  width: 62%;
  max-width: 380px;
  height: 92px;
  background: #ffffff;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transform: translateX(130%);
  animation:
    trainIn 2.4s cubic-bezier(0.16, 0.84, 0.3, 1.24) 0.15s forwards,
    trainIdle 4s ease-in-out 2.55s infinite alternate;
}

.train-wheel {
  position: absolute;
  bottom: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(27, 36, 48, 0.3);
}

.train-wheel-a {
  left: 22%;
}

.train-wheel-b {
  right: 22%;
}

.train-window {
  flex: 1;
  max-width: 52px;
  height: 68%;
  border-radius: 8px;
  background: var(--lavender);
}

.train-window-peach {
  background: var(--peach);
}

@keyframes trainIn {
  from {
    transform: translateX(130%);
  }
  to {
    transform: translateX(0);
  }
}

/* Picks up where trainIn's `forwards` leaves the train parked (translateX(0))
   so it keeps a gentle, perpetual idle rock instead of freezing in place for
   the rest of the page's life once the entrance finishes. */
@keyframes trainIdle {
  from {
    transform: translateX(-6px);
  }
  to {
    transform: translateX(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .train {
    animation: trainFadeIn 0.4s ease-out forwards;
    transform: translateX(0);
    opacity: 0;
  }

  @keyframes trainFadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }
}

/* Buttons */

.buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

@media (min-width: 420px) {
  .buttons {
    flex-direction: row;
    justify-content: center;
  }
}

.btn {
  display: inline-block;
  min-height: 44px;
  text-align: center;
  padding: 14px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 24px rgba(255, 194, 51, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 2px solid var(--text);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 2px solid rgba(244, 247, 251, 0.5);
}

.btn-line {
  display: block;
}

.btn-sub {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-top: 2px;
}

.hero-subtext {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 16px 0 0;
}

.hero-about-link {
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0.9;
  margin: 10px 0 0;
}

.hero-about-link a {
  color: var(--text);
}

/* Generic white cards */

.stat-card,
.step,
.mini-card,
.timeline-card {
  background: var(--card-bg);
  color: var(--card-text);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  padding: 28px 32px;
}

.stat-card a,
.step a,
.mini-card a,
.timeline-card a {
  color: var(--card-link);
}

/* Why Aarohan */

.stat-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .stat-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.stat-number {
  font-size: clamp(36px, 2rem + 2vw, 56px);
  font-weight: 800;
  margin: 0;
  line-height: 1;
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--accent);
}

.stat-desc {
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--card-text-muted);
}

.station-closing {
  color: var(--text-secondary);
  margin-top: 16px;
}

/* Including everyone, carefully */

.calm-note {
  font-size: 1em;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 65ch;
}

.calm-emphasis {
  color: var(--text);
  font-weight: 600;
}

/* Soft, readable amber-tint highlight - not a full alert/warning treatment. */
.calm-note-soft {
  background: rgba(255, 194, 51, 0.08);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 8px;
}

.calm-note-followup {
  margin-top: 16px;
}

.station-subheading {
  margin-top: 36px;
}

/* How Aarohan works */

.steps {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  text-align: center;
}

.step-icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  display: block;
}

.step p {
  margin: 0;
  color: var(--card-text);
  font-size: 14.5px;
}

.safety-card {
  background: var(--navy);
  border: 1px solid var(--navy-border);
  border-radius: 20px;
  padding: 20px;
  margin-top: 24px;
}

.safety-heading {
  color: var(--peach);
  font-weight: 800;
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0 0 6px;
  font-size: 16px;
}

.safety-card p:last-child {
  color: var(--text-secondary);
  margin: 0;
  font-size: 14px;
}

/* Intercollege competition */

.departure-board {
  background: var(--navy);
  border: 2px solid var(--accent);
  border-radius: 20px;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.departure-label {
  font-family: ui-monospace, "SFMono-Regular", "Courier New", monospace;
  color: var(--amber);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  margin: 0;
}

.countdown-board {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
}

.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-value {
  font-family: ui-monospace, "SFMono-Regular", "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  color: var(--amber);
  font-size: clamp(24px, 1.2rem + 1.5vw, 34px);
  font-weight: 700;
  line-height: 1;
  min-width: 3ch;
  text-align: center;
}

.countdown-caption {
  font-family: ui-monospace, "SFMono-Regular", "Courier New", monospace;
  color: var(--amber);
  font-size: clamp(14px, 13px + 0.3vw, 15px);
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  opacity: 0.75;
  margin-top: 2px;
}

@media (min-width: 700px) {
  .countdown-board {
    gap: 14px;
  }
}

/* 2026-11-28c: split into two labelled 3-chip groups (1st place / 2nd &
   3rd place) - was one 4-chip row with a combined "1/8/10 Apr" date on
   the 4th chip. `.timeline-groups` wraps the two `.timeline-group`s
   (each one `.timeline-group-label` + its own `.timeline-cards`);
   `.timeline-cards` itself keeps its name/base styling (same "chip" look
   as before) but now always holds exactly 3 children, so its column
   count drops from 4 to 3 - the old <700px 2-column override is gone
   too (see docs/SYSTEM_MAP.md), superseded by the <900px list layout
   below. `margin` moves to `.timeline-groups` (was on `.timeline-cards`
   itself, now nested a level deeper). */
.timeline-groups {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 18px 0;
}

.timeline-group-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 8px;
}

.timeline-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
}

/* >=900px: `.track-node .timeline-cards { grid-template-columns: 1fr }`
   (above) forces every track-node's grid-based child layout to a single
   column, since a track-node's own `.container` is a narrow (<=46%-of-
   `--content-w`) half-column - correct for 4-column grids that would
   otherwise burst out of it, but this one only ever needs 3 narrow date/
   label chips side by side, which fits. The ID beats `.track-node
   .timeline-cards`'s two-class specificity regardless of source order,
   so this wins without `!important`. */
@media (min-width: 900px) {
  #station-competition .timeline-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.timeline-card {
  text-align: center;
}

.timeline-date {
  font-weight: 800;
  color: var(--accent);
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0 0 4px;
  font-size: 15px;
}

.timeline-card p:last-child {
  margin: 0;
  color: var(--card-text);
  font-size: 14px;
}

.fine-print {
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0.85;
  margin-top: 14px;
  max-width: 65ch;
}

/* Rewards / podium */

.podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 16px;
  height: 260px;
  margin: 28px 0 8px;
}

.podium-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.bar {
  width: clamp(64px, 22vw, 110px);
  height: 0;
  border-radius: 12px 12px 4px 4px;
  overflow: hidden;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12px;
  transition: height 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.podium-col[data-rank="2"] .bar {
  background: var(--podium-2nd);
}

.podium-col[data-rank="1"] .bar {
  background: var(--accent);
}

.podium-col[data-rank="3"] .bar {
  background: var(--podium-3rd);
}

.podium.in-view .bar {
  height: var(--h);
}

@media (prefers-reduced-motion: reduce) {
  .bar {
    height: var(--h);
    transition: none;
  }
}

.bar-count {
  color: #ffffff;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
}

.bar-college {
  margin: 0 0 6px;
  min-height: 0;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: var(--text-secondary);
}

.bar-college:empty {
  margin: 0;
}

.bar-college .bar-college-name {
  display: block;
  color: var(--text);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0 auto;
}

.bar-label {
  margin: 10px 0 0;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  color: var(--text);
}

#leaderboardStatus {
  color: var(--text-secondary);
  text-align: center;
}

.reward-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}

.reward-chip {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--surface-border);
  border-left: 3px dashed var(--accent);
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.2s ease;
}

.reward-chip:hover {
  transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
  .reward-chip {
    transition: none;
  }
  .reward-chip:hover {
    transform: none;
  }
}

/* More on OnRoute */

.more-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

@media (min-width: 700px) {
  .more-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mini-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--card-text);
}

.mini-card p {
  margin: 0;
  font-size: 14px;
  color: var(--card-text-muted);
}

/* About OnRoute (directly on the page gradient) */

.about-heading {
  font-size: 20px;
}

/* About OnRoute collapses into a <details> for density. Default HTML
   has `open` (so a no-JS visitor always sees it expanded); home.js
   closes it once on load specifically below 900px. */
.about-summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 6px;
}

.about-summary::-webkit-details-marker {
  display: none;
}

.about-summary .about-tagline {
  margin: 0;
}

.about-summary::after {
  content: "";
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

details[open] > .about-summary::after {
  transform: rotate(-135deg);
}

.about-summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.about-details-body {
  margin-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
  .about-summary::after {
    transition: none;
  }
}

.about-tagline {
  font-size: 14px;
  font-weight: 700;
  color: var(--label);
  margin: 0 0 10px;
  font-family: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.about-onroute .container > p {
  color: var(--text-secondary);
}

.about-items {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.about-items li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 14.5px;
  color: var(--text-secondary);
}

.about-items li::before {
  content: "\2022";
  position: absolute;
  left: 0;
  color: var(--coral);
}

.about-items li strong {
  color: var(--text);
}

.trust-strip {
  font-size: 14px;
  color: var(--text-secondary);
}

.trust-strip a {
  margin-right: 4px;
}

/* Final station - join */

.station-subtitle {
  color: var(--label);
  font-weight: 600;
  font-size: 15px;
  margin: -4px 0 16px;
}

.join-chips {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}

@media (min-width: 700px) {
  .join-chips {
    grid-template-columns: repeat(3, 1fr);
  }
}

.join-chip {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 20px;
  padding: 28px 32px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 500;
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Travelling highlight across the 3 join-step cards - see home.js
   (IntersectionObserver-gated interval, skipped entirely under
   prefers-reduced-motion, in which case this class is never added). */
.join-chip.travel-highlight {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 20px rgba(255, 194, 51, 0.35);
}

.about-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

@media (min-width: 420px) {
  .about-buttons {
    flex-direction: row;
  }
}

/* Footer */

footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
}

footer a {
  margin-right: 14px;
}

footer p {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--text-secondary);
}

footer p strong {
  color: var(--text);
}

/* Alternate bands: a plain background on the (now genuinely full-width,
   since `main` carries no max-width of its own) section element itself.
   The previous box-shadow+clip-path full-bleed trick is gone - with
   `.container` moved to be a per-section inner wrapper that never paints
   its own background (see `.container` above), there's no longer a
   narrower painted box that could show through as a seam (bug (b)).
   `.container` still provides the max-width/centering for this band's
   own content. */
.band {
  margin-top: 0;
  padding: clamp(56px, 8vw, 112px) 0;
  background: var(--bg-alt);
}

/* >=900px: every `.band` section on this page (#station-why,
   #station-competition, #about-onroute, #station-join) falls somewhere
   within the winding track's own vertical span (the track's first/last
   node ARE #station-why/#station-join, and #about-onroute sits between
   two other nodes) - a full-bleed opaque band paints across the ENTIRE
   viewport width, including wherever the track's curve is at that
   height, hiding it outright for that section's whole height, not just
   near text. Making every band transparent here (cards/text-pads inside
   them keep their own opaque backgrounds - untouched, see those rules)
   is what actually lets the track stay visible behind them; <900px
   (the straight-rail layout, no winding track to protect) is
   intentionally untouched. */
@media (min-width: 900px) {
  .band {
    background: transparent;
  }
}

/* Scroll-reveal fallback (JS running, but the vendored GSAP files failed
   to load) - home.js toggles inline opacity/transform on these; GSAP's
   own tweening never adds this class, so there's no double-animation. */

.reveal-fallback {
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* --- Mobile declutter + compact pass (2026-11-28, <900px only) ---------
   Every rule below is scoped to `max-width: 899px` on purpose, even
   where the base rule it overrides (`.container`, `section`, `.band`,
   card padding, `.hero h1`) is itself already unconditional -
   the override lives here, in its own media query, rather than editing
   those rules in place, so the diff is provably desktop-safe (same
   selector + equal specificity, this block just comes later in the
   cascade) without touching a single desktop pixel. See docs/
   SYSTEM_MAP.md for the before/after measurements this was built from. */
@media (max-width: 899px) {
  /* 1. Winding track (2026-11-29) - replaces the old position:fixed
     "rail" gauge entirely (that markup/CSS/JS is gone, not just hidden -
     see docs/SYSTEM_MAP.md). An in-flow (`position:absolute`, scrolls
     with the page) SVG overlay, the same mechanism the >=900px track
     below uses, scaled down: a 2px base line (`var(--surface-border)`)
     with a 2px amber fill painted on top (unchanged `stroke-dasharray`/
     `stroke-dashoffset` mechanics, see home.js), small nodes (10px navy
     circle + 3px amber ring, a scaled-down version of the desktop
     track's own node styling) and a 12px marker (white fill + amber
     ring). `.mobile-track-wrap`'s own `position:absolute;left:0;top:0`/
     `z-index:2`/`pointer-events:none` are unconditional (this file,
     above the `.container` rule, not duplicated here) so a brief pre-JS/
     no-JS render never shows an unstyled, unpositioned box pushing
     content down at ANY width (the `@media (min-width: 900px)` guard
     alongside that base rule is what actually keeps this out of
     desktop's way - everything below here only matters once that guard
     has already let it through). That rule's own comment explains why
     `z-index:2` (above `main`) rather than the >=900px track's `z-index:
     0` (below it) - the short version: this track's lane never overlaps
     any text horizontally, so it never needs to duck behind content the
     way the zigzagging desktop track does, and sitting above `main`
     keeps it visible through every `.band` section's still-opaque
     background too. Track x stays within 22px (centre 14px +/- 8px lane
     alternation) - comfortably inside the new 40px content gutter
     below, confirmed via Playwright (docs/SYSTEM_MAP.md). */
  .mobile-track-svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
  }
  .mobile-track-base {
    fill: none;
    stroke: var(--surface-border);
    stroke-width: 2;
    stroke-linecap: round;
  }
  .mobile-track-fill {
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linecap: round;
  }
  .mobile-track-node {
    fill: var(--bg);
    stroke: var(--accent);
    stroke-width: 3;
    animation: mobileTrackNodePulse 2.2s ease-in-out infinite;
  }
  @keyframes mobileTrackNodePulse {
    0%,
    100% {
      filter: drop-shadow(0 0 0 rgba(255, 194, 51, 0));
    }
    50% {
      filter: drop-shadow(0 0 4px rgba(255, 194, 51, 0.7));
    }
  }
  .mobile-track-marker {
    fill: var(--text);
    stroke: var(--accent);
    stroke-width: 2;
  }
  @media (prefers-reduced-motion: reduce) {
    .mobile-track-node {
      animation: none;
    }
  }

  /* 2. Content gutter - every `.container` (every section's readable
     column) gets an asymmetric 40px/16px gutter instead of the shared
     symmetric `--gutter` (16px both sides at this width), so no text or
     card edge ever sits within reach of the track (whose widest element
     tops out at ~22px from the left edge, both lanes plus the node/
     marker's own radius - confirmed via Playwright, docs/SYSTEM_MAP.md)
     - the track and the readable column simply no longer share any
     horizontal space, by construction, not by relying on z-index/
     pointer-events alone (both still apply too). Widened from the prior
     pass's 28px (2026-11-28b, a straight fixed rail whose widest element
     only reached ~17px) now that the winding track's lane alternation
     needs more like 22px. Switches from the desktop-shared width+auto-
     margin centering model to a plain full-width+padding box -
     `--content-w` stays untouched (still read by the >=900px-only rules
     that use it) since nothing here changes the variable itself, only
     how `.container` uses it below 900px. */
  .container {
    width: 100%;
    margin: 0;
    padding: 0 16px 0 40px;
  }

  /* 3. Privacy card, compacted - padding/radius halved, the amber
     left-strip identity (`border-left: 4px solid var(--accent)`, base
     rule above) dropped back to a plain 1px border matching the other
     3 sides (no accent color below 900px), and the icon shrunk + moved
     inline with the heading via plain CSS display changes (both are
     already adjacent siblings in index.html - no markup change needed,
     a block-level next sibling, `.hero-privacy-body`, still wraps to
     its own line regardless of the heading's own display). Text itself
     (body/disclaimer font sizes, the divider) is untouched - still
     fully visible, nothing collapsed/hidden. */
  .hero-privacy-card {
    padding: 16px;
    border-radius: 16px;
    border-left: 1px solid var(--surface-border);
  }
  .hero-privacy-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin: 0 8px 0 0;
    vertical-align: middle;
  }
  .hero-privacy-heading {
    display: inline-block;
    vertical-align: middle;
    font-size: 18px;
    margin: 0 0 8px;
  }

  /* 4. Typography scale-down + tighter vertical rhythm. `.station h2`/
     the generic `h2`/`.station-label`/body text/`.stat-number`/
     `.stat-desc` are all already at or inside their target ranges at
     this width via their existing `clamp()`s (confirmed via Playwright
     before writing this block - see docs/SYSTEM_MAP.md) and are
     deliberately left alone here; only the pieces that measured outside
     target are overridden. `section`'s own floor (56px, from its
     `clamp(56px, 8vw, 112px)`) is brought down to 48px; `.band`'s own
     padding-bottom is dropped to 0 (was matching its 56px-floor
     padding-top) since a band's EXIT gap was double-counting - a
     band's own bottom padding stacked with the next (non-band)
     section's margin-top, producing up to 112px of content-to-content
     whitespace there, double every other, single-padded transition.
     The ENTRY gap (padding-top, into a band) still carries the full
     48px alone - symmetric with every other section's own margin-top -
     since no earlier sibling contributes a margin-bottom here (every
     section's margin-bottom is 0 by design, pre-dating this pass). */
  .hero h1 {
    font-size: 32px;
  }
  .hero {
    padding-bottom: 20px;
  }
  section {
    margin-top: 48px;
  }
  .band {
    padding: 48px 0 0;
  }
  .stat-card,
  .step,
  .mini-card {
    padding: 18px;
  }

  /* 5. Campus Challenge timeline, compact list rows (2026-11-28c) - was
     a padded "chip" grid (the generic `.stat-card`/`.step`/`.mini-card`/
     `.timeline-card` card look above); below 900px `.timeline-card` is
     pulled out of that shared card styling entirely (no background/
     border/radius/padding-box) and reflows as a plain list row instead:
     date (amber, bold) on the left, label text to its right, wrapping
     onto a 2nd line if it doesn't fit rather than ever truncating.
     `.timeline-cards` drops from a grid to a column flexbox so 3 rows
     stack instead of 3 side-by-side chips. */
  .timeline-cards {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .timeline-card {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 12px;
    text-align: left;
    padding: 10px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid var(--surface-border);
  }
  .timeline-card:last-child {
    border-bottom: none;
  }
  .timeline-date {
    flex: 0 0 auto;
    min-width: 56px;
  }
  .timeline-card p:last-child {
    text-align: left;
  }
}
