:root {
  --train-green: #1a4334;
  --deep-rail: #071411;
  --void-rail: #081411;
  --footer-rail: #06110f;
  --panel: #10291f;
  --panel-soft: #173d31;
  --warning: #ff7f00;
  --signal: #ff0055;
  --warning-soft: rgba(255, 127, 0, 0.3);
  --signal-soft: rgba(255, 0, 85, 0.22);
  --screen-line: rgba(255, 127, 0, 0.18);
  --paper: #f7ffe9;
  --muted: #b8c9bf;
  --line: rgba(255, 127, 0, 0.28);
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --header-h: 72px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--paper);
  background:
    repeating-linear-gradient(90deg, rgba(255, 127, 0, 0.045) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(0deg, rgba(255, 127, 0, 0.028) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, var(--deep-rail) 0%, var(--train-green) 46%, var(--void-rail) 100%);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  line-height: 1.72;
  letter-spacing: 0;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 46%, rgba(255, 0, 85, 0.07) 46% 46.4%, transparent 46.4%),
    repeating-linear-gradient(0deg, transparent 0 16px, rgba(255, 127, 0, 0.07) 16px 17px);
  opacity: 0.78;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button,
input,
textarea {
  font: inherit;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 1000;
  padding: 10px 14px;
  color: var(--deep-rail);
  background: var(--warning);
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-h);
  background: rgba(26, 67, 52, 0.88);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -3px 0 rgba(255, 0, 85, 0.22), 0 12px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  min-height: var(--header-h);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--paper);
  white-space: nowrap;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: block;
  flex: 0 0 42px;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 0 0 2px rgba(255, 127, 0, 0.18), 0 0 18px rgba(255, 0, 85, 0.26);
}

.brand-text {
  display: grid;
  gap: 1px;
}

.brand-name {
  font-size: 1rem;
}

.brand-sub {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--paper);
  background: rgba(26, 67, 52, 0.62);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  width: 20px;
  height: 2px;
  display: block;
  background: currentColor;
  content: "";
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.nav-toggle span::before {
  transform: translateY(-7px);
}

.nav-toggle span::after {
  transform: translateY(5px);
}

.nav-toggle[aria-expanded="true"] span {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span::before {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span::after {
  transform: translateY(-2px) rotate(-90deg);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a,
.site-nav button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 8px 8px;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active,
.site-nav button:hover,
.site-nav button:focus-visible {
  color: var(--paper);
  border-color: var(--line);
  background: rgba(255, 127, 0, 0.12);
  outline: none;
}

.nav-action {
  color: var(--deep-rail) !important;
  background: var(--warning) !important;
  border-color: var(--signal) !important;
  box-shadow: 0 0 0 1px rgba(255, 0, 85, 0.28), 0 0 16px rgba(255, 127, 0, 0.25);
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - var(--header-h)));
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
  background: url("../img/1.webp") center 45% / cover no-repeat;
}

.hero-media,
.hero-media picture,
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-media img {
  object-fit: cover;
  object-position: center 45%;
  filter: saturate(1.08) contrast(1.08) brightness(0.86);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 20, 17, 0.08) 0%, rgba(7, 20, 17, 0.42) 72%, rgba(7, 20, 17, 0.8) 100%),
    repeating-linear-gradient(0deg, rgba(255, 127, 0, 0.06) 0 1px, transparent 1px 7px),
    linear-gradient(90deg, rgba(255, 0, 85, 0.14), transparent 16% 84%, rgba(255, 0, 85, 0.12));
  mix-blend-mode: soft-light;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 78% 44%, rgba(255, 127, 0, 0.08), transparent 24%),
    linear-gradient(90deg, rgba(7, 20, 17, 0.88) 0%, rgba(7, 20, 17, 0.72) 34%, rgba(26, 67, 52, 0.26) 62%, rgba(7, 20, 17, 0.78) 100%),
    linear-gradient(180deg, rgba(7, 20, 17, 0.1) 0%, rgba(7, 20, 17, 0.34) 64%, rgba(7, 20, 17, 0.92) 100%);
}

.hero-copy {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 86px;
  position: relative;
  z-index: 2;
}

.hero-copy > * {
  max-width: 680px;
}

.hero-copy::before {
  content: "TRAIN45 / CABIN DISPLAY";
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  margin-bottom: 16px;
  padding: 3px 9px;
  color: var(--warning);
  border: 1px solid var(--warning-soft);
  background: rgba(26, 67, 52, 0.58);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 900;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--warning);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 36px;
  height: 2px;
  background: var(--warning);
  box-shadow: 0 0 14px rgba(255, 127, 0, 0.6);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 900px;
  margin-bottom: 18px;
  font-size: 4rem;
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: 2px 0 0 rgba(255, 0, 85, 0.58), 0 0 28px rgba(255, 127, 0, 0.18);
}

h2 {
  margin-bottom: 18px;
  font-size: 2rem;
  line-height: 1.22;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.14rem;
  line-height: 1.35;
}

.hero-lead {
  color: var(--paper);
  font-size: 1.12rem;
  text-shadow: 0 2px 18px rgba(7, 20, 17, 0.75);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
}

.button,
.ghost-button,
.text-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  font-weight: 800;
  cursor: pointer;
}

.button {
  padding: 12px 20px;
  color: var(--deep-rail);
  background:
    linear-gradient(90deg, transparent 0 10px, rgba(7, 20, 17, 0.2) 10px 12px, transparent 12px),
    var(--warning);
  border: 1px solid var(--signal);
  box-shadow: 0 0 0 0 rgba(255, 0, 85, 0.42), 0 16px 38px rgba(255, 127, 0, 0.24), inset 0 -3px 0 rgba(7, 20, 17, 0.2);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  filter: saturate(1.08);
  color: var(--paper);
  background:
    linear-gradient(90deg, transparent 0 10px, rgba(255, 127, 0, 0.25) 10px 12px, transparent 12px),
    var(--signal);
  box-shadow: 0 0 0 5px rgba(255, 0, 85, 0.18), 0 16px 38px rgba(255, 0, 85, 0.25);
  outline: none;
}

.ghost-button {
  padding: 11px 16px;
  color: var(--paper);
  border: 1px solid var(--line);
  background: rgba(26, 67, 52, 0.5);
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: rgba(255, 127, 0, 0.7);
  background: rgba(255, 127, 0, 0.1);
  outline: none;
}

.text-link {
  color: var(--warning);
  min-height: auto;
  justify-content: flex-start;
}

.text-link:hover,
.text-link:focus-visible {
  color: var(--signal);
  outline: none;
}

.station-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  width: min(1180px, calc(100% - 32px));
  margin: -34px auto 0;
  position: relative;
  z-index: 3;
  overflow: hidden;
  background: rgba(255, 127, 0, 0.42);
  border: 1px solid rgba(255, 127, 0, 0.42);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.station-strip span {
  min-height: 58px;
  display: grid;
  place-items: center;
  padding: 10px 14px;
  color: var(--warning);
  background:
    repeating-linear-gradient(90deg, rgba(255, 127, 0, 0.08) 0 1px, transparent 1px 10px),
    rgba(7, 20, 17, 0.86);
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.section {
  padding: 86px 0;
  border-top: 1px solid rgba(255, 127, 0, 0.16);
  scroll-margin-top: calc(var(--header-h) + 22px);
}

.section.alt {
  background:
    repeating-linear-gradient(90deg, rgba(255, 0, 85, 0.025) 0 1px, transparent 1px 18px),
    rgba(8, 29, 24, 0.7);
}

.section-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section-head {
  max-width: 760px;
  margin-bottom: 30px;
  position: relative;
  padding-top: 14px;
}

.section-head::before {
  content: "CABIN DATA";
  position: absolute;
  left: 0;
  top: -16px;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  color: var(--deep-rail);
  background: var(--warning);
  border: 1px solid var(--signal);
  border-radius: var(--radius);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
}

.section-head p,
.muted {
  color: var(--muted);
}

.intro-layout {
  display: grid;
  gap: 28px;
}

.intro-head {
  max-width: 880px;
  margin-bottom: 0;
}

.intro-file-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 18px;
  align-items: stretch;
}

.intro-facts {
  position: relative;
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255, 127, 0, 0.035) 0 1px, transparent 1px 18px),
    linear-gradient(180deg, rgba(26, 67, 52, 0.86), rgba(8, 20, 17, 0.94));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 0, 85, 0.06);
}

.intro-facts::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--warning);
}

.intro-fact {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 66px;
  padding: 14px 24px;
  border-bottom: 1px dashed rgba(255, 127, 0, 0.22);
}

.intro-fact:last-child {
  border-bottom: 0;
}

.intro-visual {
  min-height: 100%;
}

.intro-visual img {
  height: 100%;
  min-height: 420px;
  aspect-ratio: auto;
  object-position: center;
}

.two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 34px;
  align-items: center;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.four-col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.card,
.info-panel,
.route-card,
.faq-item,
.timeline-item,
.link-card,
.stat-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 127, 0, 0.12) 0 3px, transparent 3px),
    linear-gradient(180deg, rgba(26, 67, 52, 0.9), rgba(12, 31, 26, 0.94));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 0, 85, 0.06);
  position: relative;
}

.card::before,
.info-panel::before,
.route-card::before,
.faq-item::before,
.timeline-item::before,
.link-card::before,
.stat-item::before {
  content: "";
  position: absolute;
  right: 10px;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--signal);
  box-shadow: 0 0 12px rgba(255, 0, 85, 0.7);
}

.card::after,
.info-panel::after,
.route-card::after,
.faq-item::after,
.timeline-item::after,
.link-card::after,
.stat-item::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 127, 0, 0.36), transparent);
}

.card,
.route-card,
.link-card,
.stat-item {
  padding: 20px;
}

.info-panel {
  padding: 24px;
}

.image-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--void-rail);
  box-shadow: var(--shadow);
}

.image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(255, 127, 0, 0.07) 0 1px, transparent 1px 6px),
    linear-gradient(180deg, transparent, rgba(7, 20, 17, 0.36));
}

.image-frame img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.caption {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  color: var(--paper);
  font-size: 0.9rem;
  font-weight: 700;
}

.rail-board {
  display: grid;
  gap: 12px;
}

.rail-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px dashed rgba(255, 127, 0, 0.24);
}

.rail-row:last-child {
  border-bottom: 0;
}

.rail-label {
  color: var(--warning);
  font-weight: 800;
}

.rail-value {
  color: var(--paper);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 20px 0 0;
  list-style: none;
}

.tag-list li {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  color: var(--warning);
  background: rgba(255, 127, 0, 0.1);
  border: 1px solid rgba(255, 127, 0, 0.34);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 700;
}

.card-list {
  display: grid;
  gap: 14px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.card-list li {
  padding-left: 18px;
  position: relative;
  color: var(--muted);
}

.card-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 7px;
  height: 7px;
  background: var(--warning);
  border-radius: 2px;
}

.feature-grid,
.guide-grid,
.gallery-grid,
.resource-grid {
  display: grid;
  gap: 18px;
}

.feature-grid {
  grid-template-columns: repeat(3, 1fr);
}

.guide-grid {
  grid-template-columns: repeat(2, 1fr);
}

.gallery-grid {
  grid-template-columns: repeat(3, 1fr);
}

.feature-media-grid {
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
}

.feature-media-grid .caption {
  min-height: 2.4em;
  display: flex;
  align-items: flex-end;
  text-wrap: balance;
}

.feature-note-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.feature-note {
  position: relative;
  min-height: 154px;
  padding: 18px 18px 20px;
  border: 1px solid rgba(255, 127, 0, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 127, 0, 0.16) 0 3px, transparent 3px),
    linear-gradient(180deg, rgba(26, 67, 52, 0.78), rgba(12, 31, 26, 0.9));
  box-shadow: inset 0 0 0 1px rgba(255, 0, 85, 0.05);
}

.feature-note::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 8px;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 127, 0, 0.45), transparent);
}

.feature-note span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  margin-bottom: 12px;
  padding: 3px 8px;
  color: var(--deep-rail);
  background: var(--warning);
  border: 1px solid var(--signal);
  border-radius: calc(var(--radius) - 2px);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 900;
}

.feature-note h3 {
  margin-bottom: 8px;
}

.feature-note p {
  margin: 0;
  color: var(--muted);
}

.screenshot-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.screenshot-wall .shot-large {
  grid-column: 1 / -1;
}

.screenshot-wall .shot-large img {
  aspect-ratio: 21 / 9;
  object-position: center 42%;
}

.screenshot-wall .caption {
  min-height: 2.2em;
  display: flex;
  align-items: flex-end;
  text-wrap: balance;
}

.resource-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.route-card strong,
.card strong,
.faq-item strong {
  color: var(--paper);
}

.route-code {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 5px 9px;
  margin: 8px 0 10px;
  color: var(--deep-rail);
  background: var(--warning);
  border: 1px solid var(--signal);
  border-radius: var(--radius);
  font-weight: 900;
  word-break: break-word;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
}

.timeline-date {
  color: var(--warning);
  font-weight: 900;
}

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-item {
  padding: 20px;
}

.faq-item summary {
  color: var(--warning);
  font-weight: 900;
  cursor: pointer;
}

.faq-item p {
  margin: 12px 0 0;
  color: var(--muted);
}

.page-hero {
  padding: 92px 0 54px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 127, 0, 0.08) 0 1px, transparent 1px 7px),
    linear-gradient(90deg, rgba(255, 0, 85, 0.2), transparent 18% 82%, rgba(255, 0, 85, 0.16)),
    linear-gradient(180deg, rgba(7, 20, 17, 0.35), rgba(7, 20, 17, 0.98)),
    url("../img/3%20(3).webp") center / cover no-repeat;
  border-bottom: 1px solid var(--line);
}

.page-hero .section-inner {
  display: grid;
  gap: 18px;
}

.page-hero h1 {
  margin-bottom: 0;
  font-size: 3rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--warning);
}

.updated {
  color: var(--warning);
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  background: rgba(7, 20, 17, 0.52);
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 127, 0, 0.16);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--warning);
  background: rgba(255, 127, 0, 0.08);
}

td {
  color: var(--muted);
}

.friend-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.friend-links a {
  padding: 8px 10px;
  color: var(--muted);
  border: 1px solid rgba(255, 127, 0, 0.22);
  border-radius: var(--radius);
  background: rgba(26, 67, 52, 0.38);
}

.friend-links a:hover,
.friend-links a:focus-visible {
  color: var(--paper);
  border-color: rgba(255, 127, 0, 0.55);
  outline: none;
}

.site-footer {
  padding: 46px 0;
  color: var(--muted);
  background: var(--footer-rail);
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 30px;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: flex-end;
}

.footer-nav a {
  color: var(--muted);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--warning);
  outline: none;
}

.glitch-title {
  position: relative;
}

.glitch-title::before {
  content: attr(data-text);
  position: absolute;
  left: 2px;
  top: 0;
  width: 100%;
  color: rgba(255, 0, 85, 0.62);
  clip-path: inset(0 0 58% 0);
  opacity: 0;
}

body.glitching .glitch-title::before {
  animation: textGlitch 0.42s steps(2, end);
}

body.glitching {
  animation: bodyFlash 0.42s ease;
}

body.glitching::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 0, 85, 0.18), transparent 35% 65%, rgba(255, 127, 0, 0.12)),
    repeating-linear-gradient(0deg, transparent 0 6px, rgba(255, 0, 85, 0.22) 6px 8px);
  animation: dangerBlink 0.42s steps(2, end);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.48s ease, transform 0.48s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@keyframes textGlitch {
  0% { opacity: 0; transform: translateX(0); }
  30% { opacity: 1; transform: translateX(-5px); }
  60% { opacity: 1; transform: translateX(4px); }
  100% { opacity: 0; transform: translateX(0); }
}

@keyframes bodyFlash {
  0%, 100% { filter: none; }
  45% { filter: saturate(1.45) contrast(1.12); }
}

@keyframes dangerBlink {
  0%, 100% { opacity: 0; transform: translateX(0); }
  35% { opacity: 1; transform: translateX(-6px); }
  65% { opacity: 0.65; transform: translateX(4px); }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1060px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(var(--header-h) - 4px);
    display: none;
    padding: 12px;
    background: rgba(26, 67, 52, 0.96);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .site-nav a {
    justify-content: center;
  }

  .two-col,
  .intro-file-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .intro-visual img {
    min-height: auto;
    aspect-ratio: 16 / 9;
  }

  .feature-grid,
  .gallery-grid,
  .feature-note-grid,
  .screenshot-wall,
  .resource-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .four-col {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 66px;
  }

  .hero-media img {
    object-position: 57% center;
    filter: saturate(1.08) contrast(1.1) brightness(0.78);
  }

  .hero {
    min-height: 78vh;
    background-position: 57% center;
  }

  .hero::after {
    background:
      linear-gradient(90deg, rgba(7, 20, 17, 0.88), rgba(7, 20, 17, 0.58) 64%, rgba(7, 20, 17, 0.78)),
      linear-gradient(180deg, rgba(7, 20, 17, 0.1), rgba(7, 20, 17, 0.94));
  }

  h1 {
    font-size: 2.55rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  .brand-sub {
    display: none;
  }

  .hero-copy {
    padding: 96px 0 72px;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .section {
    padding: 58px 0;
  }

  .station-strip,
  .feature-grid,
  .guide-grid,
  .gallery-grid,
  .feature-note-grid,
  .screenshot-wall,
  .resource-grid,
  .three-col,
  .four-col {
    grid-template-columns: 1fr;
  }

  .timeline-item,
  .intro-fact,
  .rail-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .page-hero h1 {
    font-size: 2.15rem;
  }
}

@media (max-width: 460px) {
  .nav-wrap,
  .section-inner,
  .hero-copy,
  .footer-inner {
    width: min(100% - 24px, 1180px);
  }

  h1 {
    font-size: 2.15rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .ghost-button {
    width: 100%;
  }

  .site-nav.is-open {
    grid-template-columns: 1fr;
  }
}




/* Whitehat data slots: site-native news and download confirmation styles. */

:where(.wh-news-home, .wh-news-page) { --wh-bg: var(--deep-rail); --wh-text: var(--paper); --wh-accent: var(--warning); --wh-panel: var(--panel); --wh-line: var(--line); color: var(--wh-text); }
.wh-news-home { position: relative; }
.wh-news-home .wh-news-grid { align-items: stretch; }
.wh-news-home .wh-news-nav, .wh-news-home .section-actions { margin-top: 24px; }
.wh-news-page { min-width: 0; min-height: 100vh; color: var(--wh-text); }
.wh-news-page .wh-news-shell { position: relative; z-index: 1; width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 76px; }
.wh-news-page .wh-news-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 0 0 28px; }
.wh-news-page .wh-news-back { color: var(--wh-accent); }
.wh-news-page-heading { margin-bottom: 28px; padding-bottom: 22px; }
.wh-news-page .wh-news-title { margin: 8px 0 0; color: var(--wh-text); font-size: 2rem; line-height: 1.3; letter-spacing: 0; text-shadow: none; overflow-wrap: anywhere; }
.wh-news-page .wh-news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.wh-news-card { min-width: 0; overflow-wrap: anywhere; }
.wh-news-date { display: block; margin: 0 0 10px; color: var(--muted); font-size: .86rem; }
.wh-news-summary { margin: 0 0 18px; color: var(--muted); line-height: 1.75; }
.wh-news-link { width: fit-content; }
.wh-news-empty { grid-column: 1 / -1; margin: 0; padding: 14px 18px; border-left: 3px solid var(--wh-accent); background: var(--wh-panel); color: var(--muted); }
.wh-news-page .wh-news-article { margin: 24px 0; overflow-wrap: anywhere; }
.wh-news-page .wh-news-meta { margin: 0 0 14px; color: var(--muted); font-size: .9rem; }
.wh-news-page .wh-news-article .wh-news-title { margin: 8px 0 18px; }
.wh-news-page .wh-news-summary { padding-bottom: 20px; border-bottom: 1px solid var(--wh-line); }
.wh-news-page .wh-news-content { margin: 20px 0 0; color: var(--wh-text); font-size: 1.02rem; line-height: 1.9; overflow-wrap: anywhere; }
.wh-news-page--train .wh-news-page-heading { border-bottom: 2px dashed var(--wh-line); }
.wh-news-page--train .wh-news-title { font-family: var(--mono); }
.wh-news-page--train .wh-news-article { border: 2px solid var(--coal); border-radius: 4px; box-shadow: 6px 6px 0 rgba(55, 65, 81, .18); }
.wh-news-page--train .wh-news-empty { border: 2px dashed var(--wh-line); box-shadow: 4px 4px 0 rgba(55, 65, 81, .12); }
.wh-news-page--rail .wh-news-page-heading { border-bottom: 1px solid var(--warning); box-shadow: inset 0 -3px 0 rgba(255, 0, 85, .16); }
.wh-news-page--rail .wh-news-article { border-left: 3px solid var(--warning); }
.wh-news-page--rail .wh-news-empty { border-left-width: 4px; background: linear-gradient(90deg, rgba(255, 127, 0, .08), transparent 60%), var(--panel); }
.wh-news-page--neon .wh-news-page-heading { border-bottom: 1px solid var(--line); box-shadow: 0 8px 22px -18px var(--mint); }
.wh-news-page--neon .wh-news-article { box-shadow: var(--shadow), 0 0 26px rgba(157, 78, 221, .12); }
.wh-news-page--neon .wh-news-empty { background: linear-gradient(110deg, rgba(157, 78, 221, .12), rgba(255, 0, 127, .06), transparent), var(--panel); }
.wh-news-page--rose .wh-news-page-heading { border-bottom: 1px solid var(--line-gold); box-shadow: 0 8px 24px -20px var(--pink); }
.wh-news-page--rose .wh-news-article { border-color: var(--line-gold); box-shadow: var(--shadow), 0 0 24px rgba(255, 20, 147, .12); }
.wh-news-page--rose .wh-news-empty { background: linear-gradient(100deg, rgba(255, 20, 147, .12), transparent 70%), var(--panel); }
.download-confirm-backdrop { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .7); }
.download-confirm-panel { width: min(440px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--deep-rail); color: var(--paper); box-shadow: 0 16px 56px rgba(0, 0, 0, .3); }
.download-confirm-panel h2 { margin: 0 0 16px; color: var(--paper); font-size: 1.4rem; line-height: 1.5; text-shadow: none; }
.download-confirm-panel p { margin: 0 0 24px; line-height: 1.8; }
.download-confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 12px; }
.download-confirm-actions button { padding: 10px 20px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; font: inherit; }
.download-confirm-cancel { background: transparent; color: var(--paper); }
.download-confirm-continue { background: var(--warning); color: var(--deep-rail); }
.download-confirm-actions button:focus-visible, :where(.wh-news-home, .wh-news-page) a:focus-visible { outline: 2px solid var(--warning); outline-offset: 4px; }
@media (max-width: 760px) { .wh-news-page .wh-news-grid { grid-template-columns: 1fr; } .wh-news-page .wh-news-title { font-size: 1.65rem; } .wh-news-page .wh-news-shell { padding-top: 24px; } }
