/* ==========================================================================
   SWITCHYARD OPERATIONS CO. — timetable ephemera / classification yard
   cream #EDE8DA · signal green #1F4D36 · iron #23292B · rust #B45A28 · steam #AEB4B0
   ========================================================================== */

:root {
  --cream: #EDE8DA;
  --paper: #F5F1E4;
  --green: #1F4D36;
  --green-deep: #16382828;
  --iron: #23292B;
  --iron-2: #2A3133;
  --rust: #B45A28;
  --grey: #AEB4B0;
  --ink: #23292B;
  --ink-soft: #4C5450;
  --hair: #23292B33;
  --hair-strong: #23292B;
  --ok: #8CC2A4;
  --disp: "Besley", "Georgia", serif;
  --body: "PT Sans", "Helvetica Neue", sans-serif;
  --mono: "Oxygen Mono", "Courier New", monospace;
  --max: 1160px;
}

* { 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(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  /* faint paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0.14 0 0 0 0 0.15 0 0 0 0 0.13 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--rust); color: var(--cream); }

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

h1, h2, h3 { font-family: var(--disp); }

a { color: inherit; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1.5px solid var(--iron);
  padding: 0.72em 1.5em;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s cubic-bezier(.3,1.4,.4,1), box-shadow .18s ease;
}
.btn-solid { background: var(--green); border-color: var(--green); color: var(--cream); box-shadow: 0 2px 0 0 #142f22; }
.btn-solid:hover { background: #256044; transform: translateY(-1px); box-shadow: 0 3px 0 0 #142f22; }
.btn-solid:active { transform: translateY(1px); box-shadow: 0 0 0 0 #142f22; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: #23292b12; }
.btn-head { font-size: 0.85rem; padding: 0.55em 1.1em; background: var(--green); border-color: var(--green); color: var(--cream); white-space: nowrap; }
.btn-head:hover { background: #256044; }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--hair-strong);
  box-shadow: 0 1px 0 var(--cream), 0 4px 0 -3px var(--hair-strong); /* double timetable rule */
}
.head-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; gap: 1.6rem;
  padding: 0.7rem 1.5rem;
}
.wordmark { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.mark { width: 30px; height: 30px; flex: none; }
.wordmark-text { font-family: var(--disp); font-weight: 800; font-size: 1.06rem; letter-spacing: 0.01em; white-space: nowrap; }
.wordmark-text em { font-style: italic; font-weight: 500; }
.head-nav { display: flex; gap: 1.25rem; margin-left: auto; }
.head-nav a {
  font-size: 0.85rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  text-decoration: none; color: var(--ink-soft); padding: 0.2em 0;
  border-bottom: 2px solid transparent;
}
.head-nav a:hover { color: var(--ink); border-bottom-color: var(--rust); }

/* ---------- eyebrow / section scaffolding ---------- */
.eyebrow {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--rust); margin-bottom: 0.9rem;
}
.eyebrow-light { color: #d9925f; }

.section { padding: 5.5rem 1.5rem; }
.section > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.section-head { margin-bottom: 2.8rem; }
.section-head h2 {
  font-size: clamp(2rem, 4.2vw, 3rem); font-weight: 800; letter-spacing: -0.01em; line-height: 1.08;
  margin-bottom: 0.9rem;
}
.section-lede { max-width: 46em; color: var(--ink-soft); font-size: 1.1rem; }

.section-dark { background: var(--iron); color: var(--cream); border-top: 4px solid var(--green); border-bottom: 4px solid var(--green); }
.section-dark .section-lede { color: var(--grey); }
.section-dark :focus-visible { outline-color: #d9925f; }

/* ---------- hero ---------- */
.hero { padding: 4.2rem 1.5rem 4.6rem; }
.hero > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.hero-inner { text-align: center; max-width: 980px; }
.hero-eyebrow { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--ink-soft); }
.hero-eyebrow .rule-l, .hero-eyebrow .rule-r { flex: 1; max-width: 130px; height: 5px; border-top: 1px solid var(--hair-strong); border-bottom: 1px solid var(--hair-strong); }
.hero-title {
  font-size: clamp(2.1rem, 5vw, 3.7rem); font-weight: 900; line-height: 1.07; letter-spacing: -0.015em;
  margin: 1.1rem auto 1.3rem; text-wrap: balance;
}
.hero-title-accent { color: var(--green); }
.hero-sub { max-width: 44em; margin: 0 auto 1.8rem; font-size: 1.14rem; color: var(--ink-soft); }
.hero-ctas { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3.2rem; }

/* page-load choreography (hero only) */
.hero-eyebrow, .hero-title, .hero-sub, .hero-ctas, .yard-panel, .hero-strip { animation: rise 0.7s cubic-bezier(.2,.7,.2,1) both; }
.hero-title { animation-delay: 0.08s; }
.hero-sub { animation-delay: 0.16s; }
.hero-ctas { animation-delay: 0.24s; }
.yard-panel { animation-delay: 0.34s; }
.hero-strip { animation-delay: 0.46s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- yard panel (signature) ---------- */
.yard-panel {
  background: var(--iron);
  border: 1.5px solid var(--iron);
  border-radius: 6px;
  box-shadow: 0 1px 0 4px var(--cream), 0 1px 0 5px var(--hair-strong), 0 18px 40px -18px #23292b66;
  overflow: hidden;
}
.yard-plate {
  display: flex; align-items: baseline; gap: 1.2rem; flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  background: var(--green);
  color: var(--cream);
  border-bottom: 1.5px solid #16382866;
}
.plate-fig { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: #cfe3d6; }
.plate-title { font-family: var(--disp); font-weight: 700; font-size: 1.02rem; letter-spacing: 0.02em; }
.plate-note { font-family: var(--mono); font-size: 0.72rem; color: #b9d2c2; margin-left: auto; }

.yard-stage { position: relative; }
#yard-svg { display: block; width: 100%; height: auto; }

/* SVG yard styling */
.hump-ground { fill: var(--iron-2); }
.ties path { fill: none; stroke: #333b3d; stroke-width: 9; stroke-dasharray: 2 10; }
.rails path { fill: none; stroke: #79817d; stroke-width: 2.2; transition: stroke 0.5s ease; }
.rails path.route-lit { stroke: #d8dcd4; }
.retarder line { stroke: var(--rust); stroke-width: 3; }
.y-label { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em; fill: var(--grey); }
.y-label-dim { fill: #5d6663; font-size: 9px; }
.y-label-rust { fill: #d9925f; }
.hut-sign { fill: #d9925f; font-size: 8.5px; }

.sem-post { stroke: var(--grey); stroke-width: 2.5; }
.sem-arm rect { fill: var(--rust); }
.sem-arm .sem-band { fill: var(--cream); }
.sem-arm { transition: transform 0.45s cubic-bezier(.35,1.5,.4,1); }
.sem-lamp { fill: #465050; }
.sem-lamp.lit { fill: var(--rust); }

.hut-body { fill: #2E3538; stroke: #4a5356; stroke-width: 1; }
.hut-roof { fill: #1b2022; }
.hut-window { fill: var(--cream); opacity: 0.85; }
.hut-door { fill: #1b2022; }
.buffer-brace { stroke: var(--grey); stroke-width: 2.4; stroke-linecap: round; }
.buffer-beam { stroke: var(--rust); stroke-width: 3.4; stroke-linecap: round; }

.point-blade { stroke: var(--cream); stroke-width: 2.6; stroke-linecap: round; }
.point-lamp { fill: #465050; }
.point-lamp.diverge { fill: var(--rust); }

/* wagons */
.wagon .w-body { stroke: #12161788; stroke-width: 0.8; }
.wagon .w-wheel { fill: #14181a; stroke: #5d6663; stroke-width: 1; }
.wagon .w-label { font-family: var(--mono); font-size: 8px; letter-spacing: 0.06em; fill: var(--cream); }
.t-inv .w-body { fill: var(--rust); } .t-inv .w-stripe { fill: #8a431c; }
.t-tkt .w-body { fill: var(--green); } .t-tkt .w-stripe { fill: #163828; }
.t-po  .w-body { fill: var(--grey); } .t-po .w-stripe { fill: #838b87; } .t-po .w-label { fill: var(--iron); }
.t-eml .w-body { fill: var(--cream); } .t-eml .w-stripe { fill: #cfc7ae; } .t-eml .w-label { fill: var(--iron); }
.t-exc .w-body { fill: #14181a; stroke: var(--rust); stroke-width: 1.2; } .t-exc .w-stripe { fill: var(--rust); } .t-exc .w-label { fill: #d9925f; }

.loco .l-body { fill: var(--green); stroke: #12161788; }
.loco .l-cab { fill: #163828; }
.loco .l-stripe { fill: var(--rust); }
.loco .l-wheel { fill: #14181a; stroke: #5d6663; stroke-width: 1; }

.crew-figure line { stroke: var(--cream); stroke-width: 1.8; stroke-linecap: round; }
.crew-figure .crew-head { fill: var(--cream); }
.crew-figure .crew-lamp { fill: var(--rust); }
.cleared-stamp { font-family: var(--mono); font-size: 9px; fill: var(--ok); letter-spacing: 0.08em; }

/* HUD + legend overlays */
.yard-hud {
  position: absolute; top: 0.8rem; right: 1.1rem;
  display: flex; gap: 1.4rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--grey);
}
.yard-hud b { color: var(--cream); font-weight: 400; }
.yard-legend {
  position: absolute; bottom: 0.7rem; left: 1.1rem;
  display: flex; gap: 1.1rem; flex-wrap: wrap;
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.05em; color: var(--grey);
}
.chip { display: inline-block; width: 0.85em; height: 0.62em; margin-right: 0.45em; border-radius: 1px; transform: translateY(0.02em); }
.chip-inv { background: var(--rust); }
.chip-tkt { background: var(--green); box-shadow: inset 0 0 0 1px #4a5356; }
.chip-po { background: var(--grey); }
.chip-eml { background: var(--cream); }
.chip-exc { background: #14181a; box-shadow: inset 0 0 0 1px var(--rust); }

/* hero figures strip */
.hero-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem;
  margin-top: 2.4rem;
  border-top: 1px solid var(--hair-strong);
  border-bottom: 1px solid var(--hair-strong);
  padding: 1.1rem 0.5rem;
}
.hero-strip p { font-size: 0.95rem; color: var(--ink-soft); text-align: center; line-height: 1.45; }
.hero-strip b { display: block; font-family: var(--disp); font-weight: 800; font-size: 1.7rem; color: var(--ink); letter-spacing: -0.01em; }

/* ---------- principles ---------- */
.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.principle {
  border: 1.5px solid var(--hair-strong); border-radius: 4px;
  background: var(--paper);
  padding: 1.6rem 1.5rem 1.7rem;
  box-shadow: 3px 3px 0 0 #23292b1c;
}
.principle-no { font-family: var(--mono); font-size: 0.78rem; color: var(--rust); margin-bottom: 0.8rem; letter-spacing: 0.1em; }
.principle h3 { font-size: 1.35rem; font-weight: 800; margin-bottom: 0.6rem; }
.principle p { font-size: 0.98rem; color: var(--ink-soft); }
.principle em { font-style: italic; }

/* ---------- lever frame / services ---------- */
.frame-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 2.6rem; align-items: start; }
.frame-col { min-width: 0; }
#route-diagram { display: block; width: 100%; height: auto; margin-bottom: 0.4rem; }
#rd-lead { stroke: var(--grey); stroke-width: 2.4; fill: none; }
.rd-route { stroke: #4a5356; stroke-width: 2.4; fill: none; transition: stroke 0.3s ease; }
.rd-route.lit { stroke: var(--rust); stroke-dasharray: 7 5; animation: route-flow 0.9s linear infinite; }
@keyframes route-flow { to { stroke-dashoffset: -12; } }
.rd-num { font-family: var(--mono); font-size: 11px; fill: #6d7673; transition: fill 0.3s ease; }
.rd-num.lit { fill: var(--cream); }

#lever-frame { display: block; width: 100%; height: auto; }
.lf-beam { fill: #2E3538; stroke: #4a5356; stroke-width: 1; }
.lf-beam-face { fill: #262d2f; }
.lf-slot { fill: #14181a; }
.lever { cursor: pointer; }
.lever-body { stroke: #12161766; stroke-width: 1; transition: transform 0.55s cubic-bezier(.3,1.45,.35,1); transform-box: fill-box; transform-origin: 50% 100%; }
.lb-catch { stroke: #79817d; stroke-width: 1.6; }
.lb-catch-nub { fill: #79817d; }
.lever[data-color="black"] .lb-shaft { fill: #454f52; } .lever[data-color="black"] .lb-handle { fill: var(--grey); }
.lever[data-color="green"] .lb-shaft { fill: #2b6448; } .lever[data-color="green"] .lb-handle { fill: var(--grey); }
.lever[data-color="rust"] .lb-shaft { fill: var(--rust); } .lever[data-color="rust"] .lb-handle { fill: var(--cream); }
.lever.pulled .lever-body { transform: rotate(-19deg); }
.lever:hover .lb-shaft { filter: brightness(1.18); }
.lf-plate circle { fill: var(--cream); stroke: #12161766; }
.lf-plate text { font-family: var(--disp); font-weight: 800; font-size: 13px; fill: var(--iron); }

.lever-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1.2rem; }
.lever-tab {
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.05em;
  background: transparent; color: var(--grey);
  border: 1px solid #4a5356; border-radius: 3px;
  padding: 0.5em 0.85em; cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.lever-tab:hover { color: var(--cream); border-color: var(--grey); }
.lever-tab[aria-selected="true"] { background: var(--rust); border-color: var(--rust); color: var(--cream); }

.frame-panel {
  border: 1px solid #4a5356; border-radius: 4px;
  background: var(--iron-2);
  padding: 1.8rem 1.8rem 1.7rem;
  position: relative;
}
.frame-panel::before {
  content: ""; position: absolute; inset: 6px;
  border: 1px solid #3a4245; border-radius: 2px; pointer-events: none;
}
.svc-no { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: #d9925f; margin-bottom: 0.7rem; }
.svc-title { font-size: 1.7rem; font-weight: 800; margin-bottom: 0.7rem; color: var(--cream); }
.svc-copy { color: var(--grey); font-size: 0.99rem; margin-bottom: 1.2rem; }
.svc-traffic { list-style: none; display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.2rem; }
.svc-traffic li {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.05em;
  border: 1px solid #4a5356; border-radius: 2px; padding: 0.32em 0.6em; color: var(--grey);
}
.svc-stat { font-family: var(--mono); font-size: 0.78rem; color: var(--ok); border-top: 1px solid #3a4245; padding-top: 0.9rem; }
.svc-fade { animation: svc-in 0.35s ease both; }
@keyframes svc-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- departures board ---------- */
.board {
  background: var(--iron);
  border-radius: 6px;
  border: 1.5px solid var(--iron);
  box-shadow: 0 1px 0 4px var(--cream), 0 1px 0 5px var(--hair-strong);
  padding: 1rem 0;
  overflow-x: auto;
}
.board-row {
  display: grid; grid-template-columns: 2.2fr 1fr 1fr 0.9fr; gap: 1rem; align-items: baseline;
  padding: 0.72rem 1.6rem;
  font-family: var(--mono); font-size: clamp(0.72rem, 1.4vw, 0.95rem); letter-spacing: 0.09em;
  color: #E9E2CB;
  min-width: 620px;
}
.board-row + .board-row { border-top: 1px solid #333b3d; }
.board-head { color: #6d7673; font-size: 0.7rem; letter-spacing: 0.18em; padding-bottom: 0.4rem; }
.board-clock {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 0.35rem 1.6rem 0.75rem; border-bottom: 2px solid #333b3d;
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.18em; color: #6d7673;
}
.board-clock b { color: #E9E2CB; font-weight: 400; font-size: 0.95rem; letter-spacing: 0.14em; }
.board-status { text-align: right; }
.st-ok { color: var(--ok); }
.st-watch { color: #d9925f; }
.board-foot { max-width: var(--max); margin: 1rem auto 0; font-size: 0.88rem; color: var(--ink-soft); font-style: italic; }

/* ---------- working timetables ---------- */
.wtt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; align-items: start; }
.wtt {
  background: var(--paper);
  border: 1.5px solid var(--hair-strong); border-radius: 4px;
  box-shadow: 3px 3px 0 0 #23292b1c;
  overflow: hidden;
}
.wtt-head { padding: 1.3rem 1.5rem 1.1rem; border-bottom: 2px solid var(--hair-strong); }
.wtt-no { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rust); margin-bottom: 0.45rem; }
.wtt-head h3 { font-size: 1.45rem; font-weight: 800; line-height: 1.15; }
.wtt-meta { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); margin-top: 0.35rem; }
.wtt table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.wtt th {
  text-align: left; font-family: var(--mono); font-weight: 400; font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-soft); padding: 0.7rem 1rem 0.5rem; border-bottom: 1px solid var(--hair-strong);
}
.wtt th:first-child, .wtt td:first-child { padding-left: 1.5rem; }
.wtt th:last-child, .wtt td:last-child { padding-right: 1.5rem; }
.wtt td { padding: 0.62rem 1rem; border-bottom: 1px solid var(--hair); vertical-align: top; }
.wtt td:nth-child(2) { color: var(--ink-soft); }
.wtt td:nth-child(3) { font-weight: 700; color: var(--green); }
.wtt-sum { padding: 1rem 1.5rem 1.25rem; font-size: 0.9rem; color: var(--ink-soft); }
.wtt-sum b { color: var(--ink); font-family: var(--disp); }

/* ---------- junction diagram ---------- */
.junction-wrap { overflow-x: auto; }
#junction-svg { display: block; width: 100%; min-width: 760px; height: auto; }
.jx-main line { stroke: var(--cream); stroke-width: 2.6; }
.jx-branch { stroke: #79817d; stroke-width: 2; fill: none; transition: stroke 0.25s ease; }
.jx-node:hover .jx-branch, .jx-node:focus-within .jx-branch { stroke: var(--rust); }
.jx-diamond { fill: var(--iron); stroke: var(--cream); stroke-width: 1.6; }
.jx-board rect { fill: var(--cream); stroke: #12161766; }
.jx-board text { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; fill: var(--iron); }
.jx-dest { font-family: var(--mono); font-size: 12px; letter-spacing: 0.14em; fill: var(--grey); }
.junction-foot { max-width: var(--max); margin: 1.4rem auto 0; font-family: var(--mono); font-size: 0.78rem; color: var(--grey); }

/* ---------- tariff tickets ---------- */
.tariff-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; align-items: stretch; }
.ticket {
  position: relative;
  background: var(--paper);
  border: 1.5px solid var(--hair-strong); border-radius: 4px;
  box-shadow: 3px 3px 0 0 #23292b1c;
  padding: 0 1.5rem 1.5rem;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(.3,1.4,.4,1), box-shadow 0.25s ease;
}
.ticket:hover { transform: translateY(-4px); box-shadow: 5px 7px 0 0 #23292b26; }
.ticket::after { /* punch hole */
  content: ""; position: absolute; top: 50%; right: -7px; width: 14px; height: 14px;
  background: var(--cream); border: 1.5px solid var(--hair-strong); border-radius: 50%;
}
.ticket-band {
  margin: 0 -1.5rem 1.3rem;
  padding: 0.5rem 1.5rem;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cream);
}
.ticket-a .ticket-band { background: var(--grey); color: var(--iron); }
.ticket-b .ticket-band { background: var(--green); }
.ticket-c .ticket-band { background: var(--iron); }
.ticket-serial {
  position: absolute; top: 3.4rem; right: 0.55rem;
  writing-mode: vertical-rl;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.28em; color: #23292b59;
}
.ticket h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 0.55rem; }
.ticket-desc { font-size: 0.94rem; color: var(--ink-soft); margin-bottom: 1.2rem; min-height: 4.2em; }
.ticket-price { border-top: 2px solid var(--hair-strong); padding-top: 1rem; }
.tp-amt { font-family: var(--disp); font-weight: 800; font-size: 1.9rem; letter-spacing: -0.01em; }
.tp-unit { font-family: var(--mono); font-size: 0.75rem; color: var(--ink-soft); letter-spacing: 0.1em; text-transform: uppercase; }
.ticket-run { font-family: var(--mono); font-size: 0.74rem; color: var(--rust); margin: 0.3rem 0 1.1rem; }
.ticket-list { list-style: none; }
.ticket-list li { font-size: 0.92rem; padding: 0.42rem 0 0.42rem 1.4rem; position: relative; border-top: 1px dashed var(--hair); }
.ticket-list li::before { content: "—"; position: absolute; left: 0; color: var(--rust); }
.tariff-foot { max-width: var(--max); margin: 1.6rem auto 0; font-size: 0.88rem; color: var(--ink-soft); font-style: italic; }

/* ---------- dispatch slip ---------- */
.slip {
  position: relative;
  max-width: 720px !important;
  background: var(--paper);
  border: 1.5px solid var(--hair-strong); border-radius: 4px;
  box-shadow: 3px 3px 0 0 #23292b1c;
  padding: 2rem 2.2rem 2.2rem;
  background-image: repeating-linear-gradient(to bottom, transparent 0 30px, #23292b0a 30px 31px);
}
.slip::before { /* perforated tear-off edge */
  content: ""; position: absolute; top: 0; bottom: 0; left: 0.65rem; width: 0;
  border-left: 1.5px dashed #23292b3d;
}
.slip-head { text-align: center; border-bottom: 2px solid var(--hair-strong); padding-bottom: 1.1rem; margin-bottom: 1.6rem; }
.slip-co { font-family: var(--disp); font-weight: 800; font-size: 1.15rem; letter-spacing: 0.04em; text-transform: uppercase; }
.slip-title { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.2rem; }
.slip-no { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--rust); margin-top: 0.45rem; text-transform: uppercase; }
.slip-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem 1.8rem; }
.slip-field { display: flex; flex-direction: column; gap: 0.3rem; }
.slip-field-wide { grid-column: 1 / -1; }
.slip-field label, .slip-class legend {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft);
}
.slip-field input, .slip-field textarea {
  font-family: var(--mono); font-size: 0.95rem; color: var(--ink);
  background: transparent; border: none; border-bottom: 1.5px solid var(--hair-strong);
  padding: 0.4em 0.1em; border-radius: 0; resize: vertical;
}
.slip-field input:focus-visible, .slip-field textarea:focus-visible { outline: none; border-bottom-color: var(--rust); box-shadow: 0 1.5px 0 var(--rust); }
.slip-class { grid-column: 1 / -1; border: none; padding-top: 0.2rem; }
.slip-class legend { margin-bottom: 0.6rem; }
.slip-class label { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0 1.6rem 0.4rem 0; font-size: 0.93rem; cursor: pointer; }
.slip-class input { accent-color: var(--green); width: 1rem; height: 1rem; }
.slip-foot { display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; margin-top: 1.8rem; border-top: 1px dashed var(--hair); padding-top: 1.5rem; }
.slip-note { font-size: 0.84rem; color: var(--ink-soft); font-style: italic; max-width: 26em; }
.slip-stamp {
  position: absolute; top: 1.4rem; right: 1.6rem;
  transform: rotate(-8deg);
  border: 3px double var(--rust); border-radius: 6px; color: var(--rust);
  font-family: var(--mono); font-size: 0.9rem; letter-spacing: 0.18em; text-align: center;
  padding: 0.5em 0.9em; text-transform: uppercase;
  animation: stamp-in 0.35s cubic-bezier(.2,1.6,.4,1) both;
}
@keyframes stamp-in { from { opacity: 0; transform: rotate(-8deg) scale(1.7); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }
.slip.sent .slip-fields, .slip.sent .slip-foot { opacity: 0.45; pointer-events: none; }

/* ---------- footer ---------- */
.site-foot { background: var(--green); color: var(--cream); padding: 3.4rem 1.5rem 2.4rem; }
.foot-inner { max-width: var(--max); margin: 0 auto; }
.foot-brand { display: flex; align-items: baseline; gap: 2rem; flex-wrap: wrap; margin-bottom: 1.6rem; }
.foot-mark { font-family: var(--disp); font-weight: 800; font-size: 1.3rem; }
.foot-mark em { font-style: italic; font-weight: 500; }
.foot-line { color: #b9d2c2; font-size: 0.92rem; max-width: 42em; }
.foot-nav { display: flex; gap: 1.4rem; flex-wrap: wrap; padding: 1.1rem 0; border-top: 1px solid #ede8da2e; border-bottom: 1px solid #ede8da2e; }
.foot-nav a { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: #cfe3d6; text-decoration: none; }
.foot-nav a:hover { color: var(--cream); text-decoration: underline; }
.foot-fine { margin-top: 1.2rem; font-size: 0.8rem; color: #9dbfaa; }
.foot-credit { margin-top: 0.5rem; font-size: 0.8rem; color: #9dbfaa; }
.foot-credit a { color: #cfe3d6; }
.site-foot :focus-visible { outline-color: var(--cream); }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .hero-eyebrow, .hero-title, .hero-sub, .hero-ctas, .yard-panel, .hero-strip { animation: none; }
  .rd-route.lit { animation: none; stroke-dasharray: none; }
  .lever-body, .ticket, .sem-arm, .btn { transition: none; }
  .ticket:hover { transform: none; }
  .slip-stamp { animation: none; }
  .svc-fade { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .frame-grid { grid-template-columns: 1fr; gap: 2rem; }
  .wtt-grid { grid-template-columns: 1fr; }
  .tariff-grid { grid-template-columns: 1fr 1fr; }
  .ticket-c { grid-column: 1 / -1; }
  .ticket-desc { min-height: 0; }
  .head-nav { display: none; }
}

@media (max-width: 640px) {
  .section { padding: 3.8rem 1.1rem; }
  .hero { padding: 2.6rem 1.1rem 3.4rem; }
  .hero-sub { font-size: 1.02rem; }
  .head-inner { padding: 0.65rem 1rem; gap: 0.8rem; }
  .wordmark-text em { display: none; }
  .principles-grid { grid-template-columns: 1fr; }
  .tariff-grid { grid-template-columns: 1fr; }
  .ticket-c { grid-column: auto; }
  .hero-strip { grid-template-columns: 1fr; gap: 1.1rem; padding: 1.3rem 0.5rem; }
  .hero-strip b { display: inline; font-size: 1.25rem; margin-right: 0.4em; }
  .slip { padding: 1.6rem 1.2rem 1.8rem; }
  .slip-fields { grid-template-columns: 1fr; }
  .yard-hud { position: static; padding: 0.6rem 1.1rem 0; justify-content: flex-start; flex-wrap: wrap; gap: 0.9rem; }
  .yard-legend { position: static; padding: 0.4rem 1.1rem 0.8rem; }
  .plate-note { display: none; }
  .eb-ext { display: none; }
  .hero-eyebrow .rule-l, .hero-eyebrow .rule-r { max-width: 40px; }
  .yard-stage { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  #yard-svg { min-width: 780px; }
  .board-row { padding: 0.72rem 1.1rem; }
  .foot-brand { gap: 0.6rem; }
}
