/* ============================================================
   SEVEN LOCAL — Queens real estate along the IRT Flushing Line
   Palette: diner-cream / co-op brick / Flushing purple / tree green
   Type: Fraunces (storytelling serif) + Familjen Grotesk (wayfinding)
   ============================================================ */

:root {
  --cream: #F7EFDF;
  --paper: #FDF7E9;
  --ink: #2B1A10;
  --ink-soft: #5C4636;
  --brick: #A0402A;
  --brick-deep: #6E2618;
  --purple: #B933AD;
  --purple-deep: #8A2181;
  --green: #47713F;
  --hairline: #E3D5BB;
  --platform: #D9A62E;

  --serif: "Fraunces", Georgia, serif;
  --grotesk: "Familjen Grotesk", "Helvetica Neue", Arial, sans-serif;

  --rail-w: 208px;
  --maxw: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--grotesk);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.55;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

::selection { background: var(--purple); color: var(--paper); }

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute; left: -999px; top: 8px; z-index: 200;
  background: var(--ink); color: var(--paper);
  padding: 0.5rem 1rem; border-radius: 999px; text-decoration: none;
}
.skip-link:focus { left: 8px; }

/* ---------- 7 bullet ---------- */
.bullet {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.9em; height: 1.9em; border-radius: 50%;
  background: var(--purple); color: #fff;
  font-family: var(--grotesk); font-weight: 700;
  font-size: 0.9em; line-height: 1; letter-spacing: 0;
  flex: none;
}
.bullet.diamond {
  border-radius: 4px;
  transform: rotate(45deg);
}
.bullet.diamond > span { transform: rotate(-45deg); }

/* ---------- top bar ---------- */
.topbar {
  position: absolute; top: 0; left: var(--rail-w); right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.4rem 3rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  text-decoration: none; font-weight: 700; font-size: 1.1rem;
  letter-spacing: -0.01em;
}
.brand .bullet { font-size: 1.05rem; }
.topbar-cta {
  font-weight: 600; font-size: 0.92rem; text-decoration: none;
  border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 0.5rem 1.15rem; background: var(--paper);
  transition: background 0.2s, color 0.2s;
}
.topbar-cta:hover { background: var(--ink); color: var(--paper); }

/* ---------- route rail (signature) ---------- */
.rail {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--rail-w);
  z-index: 50; display: flex; align-items: stretch;
  background: var(--paper);
  border-right: 1px solid var(--hairline);
}
.rail-inner {
  position: relative; flex: 1;
  margin: 4.5rem 0 2.5rem;
}
.rail-line {
  position: absolute; left: 31px; top: 0; bottom: 0; width: 6px;
  background: var(--purple); border-radius: 3px;
  transform-origin: top center;
}
.rail-stops {
  list-style: none; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
}
.rail-stop { position: relative; }
.rail-stop a {
  display: flex; align-items: center; gap: 0.9rem;
  text-decoration: none; padding: 0.15rem 0.5rem 0.15rem 22px;
}
.stop-dot {
  width: 18px; height: 18px; flex: none;
  border: 4px solid var(--purple); border-radius: 50%;
  background: var(--paper);
  transition: background 0.25s, transform 0.25s;
}
.rail-stop.express .stop-dot { border-radius: 4px; transform: rotate(45deg); }
.stop-meta { min-width: 0; }
.stop-station {
  display: block; font-size: 0.66rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft);
  white-space: nowrap;
}
.stop-name {
  display: block; font-size: 0.92rem; font-weight: 700;
  letter-spacing: -0.01em; white-space: nowrap;
  color: var(--ink);
}
.rail-stop a:hover .stop-dot { background: var(--purple); }
.rail-stop.is-active .stop-dot { background: var(--purple); }
.rail-stop.is-active .stop-name { color: var(--purple-deep); }

.train {
  position: absolute; left: 34px; top: 0; z-index: 5;
  width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; background: var(--purple); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1.05rem;
  box-shadow: 0 2px 10px rgba(138, 33, 129, 0.45), 0 0 0 4px var(--paper);
  will-change: transform;
  pointer-events: none;
  transition: border-radius 0.35s;
}
.train > span:first-child { transition: transform 0.35s; }
.train.express { border-radius: 9px; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .train.arrive::after {
    content: ""; position: absolute; inset: -4px; border-radius: inherit;
    border: 2px solid var(--purple);
    animation: arrive-ring 0.7s ease-out both;
  }
  @keyframes arrive-ring {
    from { transform: scale(1); opacity: 0.9; }
    to { transform: scale(1.9); opacity: 0; }
  }
}
.train-label { display: none; }

/* ---------- layout shell ---------- */
.shell { margin-left: var(--rail-w); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 3rem; }

/* ---------- hero ---------- */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  position: relative;
  padding-top: 6.5rem;
}
.hero-grid {
  display: grid; grid-template-columns: 5fr 6fr; gap: 3rem;
  align-items: end;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brick);
  margin-bottom: 1.4rem;
}
.eyebrow::before {
  content: ""; width: 2.2rem; height: 2px; background: var(--brick);
}
h1 {
  font-family: var(--serif);
  font-size: clamp(2.9rem, 5.4vw, 4.6rem);
  font-weight: 560;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
h1 em {
  font-style: italic; font-weight: 500; color: var(--purple-deep);
}
.hero-dek {
  font-size: 1.12rem; color: var(--ink-soft);
  max-width: 34em; margin-top: 1.5rem;
}
.hero-ctas { display: flex; gap: 0.9rem; margin-top: 2.1rem; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-weight: 600; font-size: 0.98rem; text-decoration: none;
  padding: 0.8rem 1.5rem; border-radius: 999px;
  transition: transform 0.2s, background 0.2s, color 0.2s;
}
.btn-primary { background: var(--purple); color: #fff; }
.btn-primary:hover { background: var(--purple-deep); transform: translateY(-2px); }
.btn-ghost { border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); }

.hero-photo { position: relative; }
.hero-photo img {
  width: 100%; height: 62vh; min-height: 420px; object-fit: cover;
  border-radius: 18px 18px 0 0;
}
.photo-caption {
  position: absolute; left: 1rem; bottom: 1rem;
  background: rgba(43, 26, 16, 0.78); color: var(--cream);
  font-size: 0.74rem; letter-spacing: 0.05em;
  padding: 0.4rem 0.85rem; border-radius: 999px;
  backdrop-filter: blur(3px);
}

/* ---------- strip map band ---------- */
.stripmap {
  background: var(--ink); color: var(--cream);
  padding: 2.2rem 0 2.8rem;
}
.stripmap-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin-bottom: 2.4rem;
}
.stripmap-title {
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: #CDB894;
}
.next-train {
  font-size: 0.8rem; letter-spacing: 0.06em; color: #CDB894;
  display: inline-flex; align-items: center; gap: 0.5rem;
  white-space: nowrap;
}
.next-train .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #E9B949;
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

.stripmap-scroll { overflow-x: auto; padding-bottom: 0.5rem; }
.stripmap-scroll::-webkit-scrollbar { height: 6px; }
.stripmap-scroll::-webkit-scrollbar-thumb { background: #54402E; border-radius: 3px; }
.stripline {
  position: relative; min-width: 1280px;
  height: 130px;
  padding: 0 120px 0 6px;
}
.stripline::before {
  content: ""; position: absolute; left: 0; right: 0; top: 14px;
  height: 5px; background: var(--purple); border-radius: 3px;
}
.stripline ol {
  list-style: none; display: flex; justify-content: space-between;
  position: relative; height: 100%;
}
.stripline li {
  position: relative; flex: 1; min-width: 0;
}
.strip-dot {
  position: absolute; top: 10px; left: 0;
  width: 13px; height: 13px; border-radius: 50%;
  background: var(--ink); border: 3px solid var(--cream);
}
.stripline li.express .strip-dot { border-radius: 3px; transform: rotate(45deg); }
.stripline li.ours .strip-dot { background: var(--purple); border-color: #fff; }
.strip-name {
  position: absolute; top: 34px; left: 6px;
  font-size: 0.68rem; letter-spacing: 0.03em; color: #B9A583;
  transform: rotate(38deg); transform-origin: top left;
  white-space: nowrap;
  transition: color 0.2s;
}
.stripline li:hover .strip-name { color: var(--cream); }
.stripline li.ours .strip-name { color: var(--cream); font-weight: 700; }
.stripmap-note {
  margin-top: 0.6rem; font-size: 0.76rem; color: #8F7B5D;
}
.stripmap-note .diamond-key {
  display: inline-block; width: 9px; height: 9px; background: #B9A583;
  border-radius: 2px; transform: rotate(45deg); margin: 0 0.3rem;
}

/* ---------- manifesto ---------- */
.manifesto { padding: 6.5rem 0 5.5rem; }
.manifesto-grid { display: grid; grid-template-columns: 7fr 4fr; gap: 4rem; }
.manifesto h2 {
  font-family: var(--serif); font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 540; line-height: 1.15; letter-spacing: -0.015em;
}
.manifesto h2 em { font-style: italic; color: var(--brick); }
.manifesto p { margin-top: 1.3rem; color: var(--ink-soft); font-size: 1.05rem; max-width: 36em; }
.fare-card {
  background: var(--paper); border: 1px solid var(--hairline);
  border-radius: 14px; padding: 1.6rem 1.7rem;
  align-self: start;
}
.fare-card h3 {
  font-size: 0.76rem; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 1.1rem;
}
.fare-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.55rem 0; border-top: 1px dashed var(--hairline);
  font-size: 0.95rem;
}
.fare-row strong { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.fare-row .up { color: var(--green); }
.fare-foot { margin-top: 0.9rem; font-size: 0.74rem; color: var(--ink-soft); }

/* ---------- chapters ---------- */
.chapter { padding: 5.5rem 0 4.5rem; border-top: 1px solid var(--hairline); }
.chapter-head { display: flex; align-items: flex-start; gap: 1.6rem; margin-bottom: 1.4rem; }
.chapter-head .bullet { font-size: 1.5rem; margin-top: 0.4rem; }
.station-line {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--ink-soft);
  display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap;
}
.badge {
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.1em;
  padding: 0.18rem 0.6rem; border-radius: 999px;
  border: 1.5px solid currentColor;
}
.badge.express { color: var(--purple-deep); }
.badge.local { color: var(--green); }
.chapter h2 {
  font-family: var(--serif); font-size: clamp(2.2rem, 4vw, 3.3rem);
  font-weight: 560; letter-spacing: -0.02em; line-height: 1.05;
  margin-top: 0.35rem;
}
.chapter-body {
  display: grid; grid-template-columns: 6fr 5fr; gap: 3.5rem;
  margin-top: 1.8rem;
}
.chapter-story {
  font-family: var(--serif); font-size: 1.16rem; line-height: 1.65;
  color: var(--ink); max-width: 36em;
}
.chapter-story + .chapter-story { margin-top: 1.1rem; }
.chapter-figure img {
  width: 100%; height: 100%; min-height: 300px; max-height: 430px;
  object-fit: cover; border-radius: 14px;
}
.chapter-figure figcaption {
  margin-top: 0.6rem; font-size: 0.76rem; color: var(--ink-soft);
  letter-spacing: 0.04em;
}
.chapter-stats {
  display: flex; gap: 2.4rem; flex-wrap: wrap;
  margin-top: 2rem; padding-top: 1.4rem; border-top: 1px dashed var(--hairline);
}
.stat .stat-num {
  font-family: var(--serif); font-size: 1.7rem; font-weight: 600;
  letter-spacing: -0.01em;
}
.stat .stat-label {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-soft);
}

/* ---------- listings ---------- */
.listings {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.6rem;
  margin-top: 2.6rem;
}
.listing {
  background: var(--paper); border: 1px solid var(--hairline);
  border-radius: 14px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
  position: relative;
}
.listing:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(43, 26, 16, 0.12);
}
.listing::before {
  content: ""; display: block; height: 7px;
  background: repeating-linear-gradient(
    -45deg, var(--platform) 0 9px, var(--paper) 9px 15px);
  opacity: 0.85;
}
@media (prefers-reduced-motion: no-preference) {
  .listing:hover::before {
    animation: platform-slide 0.8s linear infinite;
  }
  @keyframes platform-slide {
    to { background-position: 21.213px 0; }
  }
}
.listing-photo img { width: 100%; height: 230px; object-fit: cover; }
.listing-body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.listing-walk {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--purple-deep);
  display: inline-flex; align-items: center; gap: 0.45rem;
  margin-bottom: 0.7rem;
}
.listing-walk .bullet { font-size: 0.72rem; }
.listing h3 {
  font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em;
  line-height: 1.3;
}
.listing-price {
  font-family: var(--serif); font-size: 1.9rem; font-weight: 600;
  letter-spacing: -0.015em; margin-top: 0.5rem;
}
.listing-price span { font-size: 0.85rem; font-family: var(--grotesk); font-weight: 500; color: var(--ink-soft); letter-spacing: 0; }
.listing-specs {
  display: flex; gap: 1rem; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--ink-soft);
  margin-top: 0.5rem; padding-top: 0.6rem; border-top: 1px dashed var(--hairline);
}
.listing-blurb { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.75rem; flex: 1; }
.listing-status {
  margin-top: 1rem; align-self: flex-start;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem; border-radius: 999px;
}
.status-open { background: rgba(71, 113, 63, 0.14); color: var(--green); }
.status-new { background: rgba(185, 51, 173, 0.12); color: var(--purple-deep); }
.status-contract { background: rgba(160, 64, 42, 0.13); color: var(--brick-deep); }

/* ---------- terminal / CTA ---------- */
.terminal {
  background: var(--ink); color: var(--cream);
  padding: 6rem 0 4rem; margin-top: 5rem;
}
.terminal .eyebrow { color: var(--platform); }
.terminal .eyebrow::before { background: var(--platform); }
.terminal h2 {
  font-family: var(--serif); font-size: clamp(2.4rem, 4.4vw, 3.8rem);
  font-weight: 540; line-height: 1.05; letter-spacing: -0.02em;
  max-width: 14em;
}
.terminal h2 em { font-style: italic; color: #E48ADB; }
.terminal-grid {
  display: grid; grid-template-columns: 3fr 2fr; gap: 4rem;
  align-items: end; margin-top: 1rem;
}
.terminal p { color: #CDB894; margin-top: 1.4rem; max-width: 30em; }
.terminal .btn-primary { margin-top: 2rem; }
.office-card { font-size: 0.95rem; color: #CDB894; line-height: 1.8; }
.office-card strong { color: var(--cream); display: block; font-size: 1.05rem; }
.office-card a { color: var(--cream); text-underline-offset: 3px; }

.footer {
  border-top: 1px solid #4A3826; margin-top: 4.5rem; padding-top: 1.8rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: 0.78rem; color: #8F7B5D;
}
.footer a { color: #CDB894; text-underline-offset: 3px; }

/* ---------- guide page ---------- */
.guide-main { padding: 6rem 0 5rem; }
.guide-main .eyebrow { color: var(--purple-deep); }
.guide-main .eyebrow::before { background: var(--purple-deep); }
.guide-section { margin-top: 3.8rem; }
.guide-section h2 {
  font-family: var(--serif); font-size: 1.9rem; font-weight: 560;
  letter-spacing: -0.015em; margin-bottom: 1.1rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.guide-section h2 .bullet { font-size: 0.95rem; }
.guide-section p { color: var(--ink-soft); max-width: 44em; margin-top: 0.8rem; }
.guide-section p strong { color: var(--ink); }
.swatches { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; }
.swatch { width: 130px; }
.swatch-chip {
  height: 74px; border-radius: 10px; border: 1px solid var(--hairline);
}
.swatch p { font-size: 0.78rem; margin-top: 0.5rem; color: var(--ink); }
.swatch p span { display: block; color: var(--ink-soft); font-size: 0.72rem; }
.type-specimen {
  background: var(--paper); border: 1px solid var(--hairline);
  border-radius: 14px; padding: 1.8rem 2rem; margin-top: 1.4rem;
}
.type-specimen .spec-serif {
  font-family: var(--serif); font-size: 2rem; font-weight: 560;
  letter-spacing: -0.02em; line-height: 1.15;
}
.type-specimen .spec-grotesk {
  font-weight: 600; margin-top: 1rem; letter-spacing: 0.02em;
}
.type-specimen small { display: block; color: var(--ink-soft); font-size: 0.76rem; margin-top: 0.4rem; }
pre {
  background: var(--ink); color: #EFDFC0; border-radius: 12px;
  padding: 1.4rem 1.6rem; overflow-x: auto;
  font-size: 0.82rem; line-height: 1.6; margin-top: 1.2rem;
}
pre code { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.pass-list { list-style: none; margin-top: 1.2rem; }
.pass-list li {
  border-top: 1px dashed var(--hairline); padding: 1rem 0;
  display: grid; grid-template-columns: 110px 1fr; gap: 1.2rem;
}
.pass-list .pass-tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--purple-deep); padding-top: 0.2rem;
}
.recipe { margin-top: 1.2rem; counter-reset: step; list-style: none; }
.recipe li {
  counter-increment: step; position: relative;
  padding: 0.7rem 0 0.7rem 3rem; border-top: 1px dashed var(--hairline);
  color: var(--ink-soft); max-width: 44em;
}
.recipe li strong { color: var(--ink); }
.recipe li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.75rem;
  width: 1.9rem; height: 1.9rem; border-radius: 50%;
  background: var(--purple); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
.guide-footer {
  margin-top: 4.5rem; padding-top: 1.6rem; border-top: 1px solid var(--hairline);
  font-size: 0.8rem; color: var(--ink-soft);
}

/* ---------- load animation ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rail-line { animation: growline 0.9s cubic-bezier(0.6, 0, 0.2, 1) both; }
  @keyframes growline { from { transform: scaleY(0); } }
  .rail-stop { animation: fadein 0.5s both; }
  .rail-stop:nth-child(1) { animation-delay: 0.15s; }
  .rail-stop:nth-child(2) { animation-delay: 0.27s; }
  .rail-stop:nth-child(3) { animation-delay: 0.39s; }
  .rail-stop:nth-child(4) { animation-delay: 0.51s; }
  .rail-stop:nth-child(5) { animation-delay: 0.63s; }
  .rail-stop:nth-child(6) { animation-delay: 0.75s; }
  .rail-stop:nth-child(7) { animation-delay: 0.87s; }
  .hero .eyebrow, .hero h1, .hero-dek, .hero-ctas { animation: riseup 0.7s cubic-bezier(0.2, 0.6, 0.2, 1) both; }
  .hero h1 { animation-delay: 0.1s; }
  .hero-dek { animation-delay: 0.22s; }
  .hero-ctas { animation-delay: 0.34s; }
  .hero-photo { animation: fadein 0.9s 0.25s both; }
  @keyframes riseup { from { opacity: 0; transform: translateY(22px); } }
  @keyframes fadein { from { opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  .next-train .pulse { animation: none; }
  .train { transition: none; }
  .listing:hover { transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1180px) {
  :root { --rail-w: 74px; }
  .stop-meta { position: absolute; left: 58px; top: 50%; transform: translateY(-50%);
    background: var(--ink); color: var(--cream); padding: 0.45rem 0.8rem;
    border-radius: 8px; opacity: 0; pointer-events: none;
    transition: opacity 0.2s; white-space: nowrap; z-index: 10; }
  .stop-meta .stop-station { color: #CDB894; }
  .stop-meta .stop-name { color: var(--cream); font-size: 0.85rem; }
  .rail-stop a:hover .stop-meta, .rail-stop a:focus-visible .stop-meta { opacity: 1; }
  .topbar { padding: 1.2rem 1.8rem; }
  .wrap { padding: 0 2rem; }
}

@media (max-width: 900px) {
  .hero-grid, .manifesto-grid, .chapter-body, .terminal-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 6rem; }
  .hero-photo img { height: 46vh; min-height: 300px; border-radius: 14px; }
  .hero-grid { gap: 2.2rem; }
  .chapter-figure { order: -1; }
  .chapter-figure img { min-height: 0; height: 260px; }
  .listings { grid-template-columns: 1fr; }
  .manifesto { padding: 4.5rem 0 4rem; }
  .manifesto-grid { gap: 2.2rem; }
}

@media (max-width: 767px) {
  :root { --rail-w: 0px; }
  body { padding-bottom: 64px; }
  .shell { margin-left: 0; }
  .topbar { left: 0; }

  /* rail becomes bottom strip map */
  .rail {
    top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 64px;
    border-right: 0; border-top: 1px solid var(--hairline);
    box-shadow: 0 -6px 18px rgba(43, 26, 16, 0.08);
  }
  .rail-inner { margin: 0 1.4rem; }
  .rail-line {
    left: 0; right: 0; top: 50%; bottom: auto; width: auto; height: 5px;
    margin-top: -2.5px; border-radius: 3px;
  }
  .rail-stops { flex-direction: row; align-items: center; height: 100%; }
  .rail-stop a { padding: 0.8rem 0.35rem; }
  .stop-dot { width: 14px; height: 14px; border-width: 3px; }
  .stop-meta { display: none; }
  .train {
    left: 0; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px;
    font-size: 0.95rem;
  }
  .train-label {
    display: block; position: absolute; top: -30px; left: 0;
    background: var(--ink); color: var(--cream);
    font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em;
    padding: 0.28rem 0.65rem; border-radius: 999px; white-space: nowrap;
    will-change: transform; z-index: 6;
  }
  @media (prefers-reduced-motion: no-preference) {
    .rail-line { animation-name: growline-x; transform-origin: left center; }
    @keyframes growline-x { from { transform: scaleX(0); } }
  }

  .wrap { padding: 0 1.25rem; }
  .topbar { padding: 1rem 1.25rem; }
  .topbar-cta { display: none; }
  .hero { padding-top: 5.2rem; }
  .hero-dek { font-size: 1.02rem; }
  .chapter { padding: 3.8rem 0 3.2rem; }
  .chapter-head { gap: 1rem; }
  .chapter-head .bullet { font-size: 1.15rem; }
  .chapter-stats { gap: 1.6rem; }
  .stripmap { padding: 1.8rem 0 2.2rem; }
  .stripmap-head { flex-direction: column; gap: 0.5rem; }
  .terminal { padding: 4.5rem 0 3rem; margin-top: 3.5rem; }
  .terminal-grid { gap: 2.4rem; }
  .pass-list li { grid-template-columns: 1fr; gap: 0.3rem; }
  .guide-main { padding: 5rem 0 4rem; }
}
