:root {
  --ink: #10242b;
  --muted: #63747a;
  --paper: #f4f0e8;
  --panel: #fffdf8;
  --line: #d7d5ce;
  --navy: #0b2633;
  --navy-soft: #123b49;
  --cyan: #8fd7df;
  --cyan-strong: #2f9fad;
  --orange: #f06f45;
  --orange-soft: #f7b08f;
  --green: #387c68;
  --shadow: 0 18px 50px rgba(20, 40, 46, 0.08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Segoe UI", "Yu Gothic UI", system-ui, sans-serif;
  line-height: 1.5;
}
a { color: inherit; }
.page-shell { min-height: 100vh; overflow: hidden; }
.hero {
  color: #f8faf7;
  background:
    radial-gradient(circle at 78% 28%, rgba(77, 161, 172, 0.24), transparent 27%),
    linear-gradient(145deg, #091f2a 0%, #0d3140 70%, #123844 100%);
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: repeating-linear-gradient(90deg, transparent 0 89px, #fff 90px);
  pointer-events: none;
}
.topbar, .hero-grid, main, footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.topbar {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.16);
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: var(--navy);
  background: var(--cyan);
  border-radius: 50%;
  font-size: 12px;
  letter-spacing: .12em;
}
.topbar-meta { display: flex; gap: 9px; align-items: center; color: #c7d6d8; font-size: 13px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(143,215,223,.1); }
.section-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  color: #d7e4e6;
  background: rgba(9, 31, 42, .96);
  border-bottom: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(14px);
}
.section-nav-inner {
  width: min(1180px, calc(100% - 40px));
  height: 48px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 30px;
  overflow-x: auto;
  scrollbar-width: none;
}
.section-nav-inner::-webkit-scrollbar { display: none; }
.section-nav a {
  flex: 0 0 auto;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.section-nav a:hover, .section-nav a:focus-visible { color: var(--cyan); }
#overview, #operations, #routes, #finance, #quality, #methodology { scroll-margin-top: 72px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, .55fr);
  gap: 80px;
  align-items: center;
  padding: 74px 0 84px;
}
.detail-hero-content {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 62px 0 68px;
  position: relative;
  z-index: 1;
}
.detail-hero h1 { max-width: 850px; font-size: clamp(40px, 5.5vw, 68px); }
.detail-hero .hero-copy { margin-bottom: 0; }
.eyebrow {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}
.eyebrow.dark { color: var(--cyan-strong); }
h1, h2, p { margin-top: 0; }
h1 {
  margin-bottom: 24px;
  font-family: Georgia, "Yu Mincho", serif;
  font-size: clamp(42px, 6.2vw, 76px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -.045em;
}
h1 span { color: var(--cyan); }
.hero-copy { max-width: 680px; color: #c6d4d7; font-size: 18px; line-height: 1.7; }
.coverage-card {
  padding: 28px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
}
.coverage-label { margin-bottom: 4px; color: #a9bfc4; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; }
.coverage-card > strong { font-family: Georgia, serif; font-size: 38px; font-weight: 400; }
.coverage-rule { height: 1px; margin: 22px 0; background: rgba(255,255,255,.16); }
.coverage-card dl { margin: 0; display: grid; gap: 11px; }
.coverage-card dl div { display: flex; justify-content: space-between; gap: 20px; }
.coverage-card dt { color: #a9bfc4; }
.coverage-card dd { margin: 0; font-weight: 700; }
main { padding: 68px 0 82px; }
.section { margin-bottom: 74px; }
.section-heading, .panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
h2 {
  margin-bottom: 0;
  font-family: Georgia, "Yu Mincho", serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.025em;
}
.section-note, .unit { color: var(--muted); font-size: 13px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi-card {
  min-height: 168px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.kpi-card.accent { background: var(--orange); color: white; border-color: var(--orange); }
.kpi-card.validation { background: var(--navy); color: white; border-color: var(--navy); }
.kpi-card p { margin-bottom: 20px; color: inherit; opacity: .75; font-size: 13px; }
.kpi-card strong { font-family: Georgia, serif; font-size: clamp(28px, 3.4vw, 40px); font-weight: 500; line-height: 1; }
.kpi-card span { margin-top: 16px; color: inherit; opacity: .68; font-size: 12px; }
.select-control { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
select {
  min-width: 190px;
  padding: 11px 38px 11px 13px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid #c9c9c3;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0;
}
.chart-card, .panel, .routes-layout {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.chart-card { padding: 28px; }
.chart-summary { display: flex; align-items: center; gap: 42px; margin-bottom: 14px; }
.chart-summary div { display: grid; gap: 3px; }
.chart-summary span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.chart-summary strong { font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.chart-summary p { margin: 0 0 0 auto; color: var(--muted); font-size: 12px; }
.chart { min-height: 330px; }
.chart.compact { min-height: 280px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.axis-label { fill: #79898e; font-size: 10px; }
.grid-line { stroke: #e2e2dd; stroke-width: 1; }
.line-primary { fill: none; stroke: var(--orange); stroke-width: 3; }
.area-primary { fill: url(#areaGradient); }
.dot-primary { fill: var(--orange); stroke: var(--panel); stroke-width: 2; }
.annual-calendar { fill: var(--cyan-strong); }
.annual-fiscal { fill: var(--orange-soft); }
.split-section { display: grid; grid-template-columns: 1.35fr .85fr; gap: 18px; }
.panel { padding: 28px; min-width: 0; }
.panel h2 { font-size: 30px; }
.legend { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.legend i { width: 9px; height: 9px; border-radius: 2px; }
.legend i.calendar { background: var(--cyan-strong); }
.legend i.fiscal { margin-left: 8px; background: var(--orange-soft); }
.composition-chart { display: grid; gap: 26px; margin-top: 38px; }
.composition-item { display: grid; gap: 9px; }
.composition-label { display: flex; justify-content: space-between; font-size: 13px; }
.composition-label strong { font-family: Georgia, serif; font-size: 22px; font-weight: 500; }
.stack-bar { height: 18px; display: flex; overflow: hidden; background: #e7e5df; border-radius: 99px; }
.stack-bar .domestic { background: var(--cyan-strong); }
.stack-bar .international { background: var(--orange); }
.stack-legend { display: flex; gap: 18px; color: var(--muted); font-size: 11px; }
.stack-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: var(--cyan-strong); }
.stack-legend span:last-child::before { background: var(--orange); }
.panel-caption { margin: 34px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.routes-layout { display: grid; grid-template-columns: 1fr 230px; padding: 28px; }
.route-preview-card { display: none; }
body[data-page="overview"] .routes-section .route-period-controls,
body[data-page="overview"] .routes-section .route-map-panel,
body[data-page="overview"] .routes-section .routes-layout { display: none; }
body[data-page="overview"] .route-preview-card {
  padding: 28px;
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  align-items: center;
  gap: 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.route-preview-card h3 { margin: 0; font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.route-preview-card dl { margin: 0; display: grid; gap: 8px; }
.route-preview-card dl div { display: flex; justify-content: space-between; gap: 30px; }
.route-preview-card dt { color: var(--muted); font-size: 12px; }
.route-preview-card dd { margin: 0; font-weight: 700; }
.detail-link {
  padding: 12px 16px;
  color: white;
  background: var(--navy);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.detail-link:hover { background: var(--navy-soft); }
.route-map-panel {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.route-map {
  width: 100%;
  height: 500px;
  background: #dce9e9;
}
.route-map-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 70px;
  padding: 14px 28px;
}
.route-map-detail { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 14px; }
.route-map-detail strong { font-family: Georgia, serif; font-size: 20px; font-weight: 500; }
.route-map-detail span { color: var(--muted); font-size: 12px; }
.route-map-detail b { color: var(--orange); font-size: 12px; }
.route-map-legend { display: grid; grid-template-columns: auto 100px auto; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; }
.route-map-legend i { height: 5px; border-radius: 99px; background: linear-gradient(90deg, rgb(78, 163, 177), rgb(240, 111, 69)); }
.map-error { padding: 30px; color: var(--muted); }
.leaflet-container { font-family: Inter, "Segoe UI", sans-serif; }
.leaflet-control-attribution { font-size: 9px; }
.route-history { padding: 26px 28px 20px; border-top: 1px solid var(--line); }
.route-history-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.route-history-heading h3 { margin: 2px 0 0; font-family: Georgia, serif; font-size: 27px; font-weight: 500; }
.source-link { color: var(--cyan-strong); font-size: 11px; font-weight: 700; text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.route-history-stats { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 18px 0 8px; color: var(--muted); font-size: 11px; }
.route-history-stats span { display: grid; gap: 3px; }
.route-history-stats strong { color: var(--ink); font-size: 13px; }
.route-history-chart { min-height: 245px; }
.route-history-chart svg { display: block; width: 100%; height: auto; }
.route-history-line { fill: none; stroke: var(--orange); stroke-width: 2.5; }
.route-history-selection { stroke: var(--cyan-strong); stroke-width: 1.5; stroke-dasharray: 4 4; }
.route-history-dot { fill: var(--cyan-strong); stroke: var(--panel); stroke-width: 2; }
.route-period-controls {
  display: grid;
  grid-template-columns: 38px minmax(86px, auto) minmax(130px, auto) 38px;
  align-items: end;
  gap: 8px;
}
.period-step {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  font-size: 18px;
  cursor: pointer;
}
.period-step:hover:not(:disabled) { border-color: var(--cyan-strong); color: var(--cyan-strong); }
.period-step:disabled { opacity: .35; cursor: default; }
.period-position {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}
.routes-chart { display: grid; gap: 13px; padding-right: 34px; border-right: 1px solid var(--line); }
.route-row { display: grid; grid-template-columns: 76px 1fr 92px; align-items: center; gap: 14px; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.route-row:hover strong, .route-row:focus-visible strong { color: var(--orange); }
.route-row.is-active strong { color: var(--orange); }
.route-row.is-active .route-track { box-shadow: 0 0 0 2px rgba(240, 111, 69, .18); }
.route-row strong { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; }
.route-track { height: 10px; background: #e5e3dc; border-radius: 99px; overflow: hidden; }
.route-fill { height: 100%; background: var(--cyan-strong); border-radius: inherit; }
.route-row:first-child .route-fill { background: var(--orange); }
.route-row span { text-align: right; color: var(--muted); font-size: 12px; }
.route-note { padding: 10px 4px 4px 28px; display: flex; flex-direction: column; }
.route-code { margin-bottom: 0; color: var(--muted); font-size: 13px; }
.route-note > strong { font-family: Georgia, serif; font-size: 58px; font-weight: 500; line-height: 1; color: var(--orange); }
.route-note > span { margin: 10px 0 24px; font-weight: 700; }
.route-note > p:last-child { margin-top: auto; color: var(--muted); font-size: 12px; line-height: 1.6; }
.bottom-panels { grid-template-columns: 1fr 1fr; }
.methodology-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.methodology-grid article {
  padding: 26px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.methodology-grid article > span { color: var(--cyan-strong); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.methodology-grid h3 { margin: 15px 0 12px; font-family: Georgia, serif; font-size: 25px; font-weight: 500; }
.methodology-grid h3 b { color: var(--orange); font-weight: 500; }
.methodology-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.finance-list { display: grid; gap: 0; }
.finance-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-top: 1px solid var(--line); }
.finance-row span { color: var(--muted); font-size: 13px; }
.finance-row strong { font-family: Georgia, serif; font-size: 24px; font-weight: 500; }
.quality-panel { color: white; background: var(--navy); border-color: var(--navy); }
.quality-panel .eyebrow { color: var(--cyan); }
.quality-score { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 12px 0 24px; }
.quality-score strong { font-family: Georgia, serif; color: var(--cyan); font-size: 64px; font-weight: 400; }
.quality-score span { max-width: 200px; color: #bdd0d4; font-size: 13px; }
.quality-panel ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.quality-panel li { color: #d9e4e5; font-size: 13px; }
.quality-panel li span { display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; background: var(--cyan); }
footer {
  padding: 34px 0 42px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 40px;
  border-top: 1px solid #cfcfc8;
  color: var(--muted);
  font-size: 12px;
}
footer strong { color: var(--ink); }
footer p { margin: 3px 0 0; }
.footer-links { display: flex; gap: 22px; }
.footer-disclaimer { grid-column: 1 / -1; padding-top: 13px; border-top: 1px solid #dddcd5; }
.loading-state {
  position: fixed;
  inset: auto 18px 18px auto;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  color: white;
  background: var(--navy);
  border-radius: 99px;
  box-shadow: var(--shadow);
  font-size: 12px;
  transition: opacity .25s, transform .25s;
}
.loading-state span { width: 9px; height: 9px; border: 2px solid rgba(255,255,255,.35); border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }
.loading-state.done { opacity: 0; transform: translateY(8px); pointer-events: none; }
.error-box { padding: 24px; color: #8f2c20; background: #fff0e9; border: 1px solid #f0b49d; border-radius: 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .coverage-card { max-width: 420px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .split-section { grid-template-columns: 1fr; }
  .methodology-grid { grid-template-columns: 1fr; }
  body[data-page="overview"] .route-preview-card { grid-template-columns: 1fr 1fr; }
  .route-preview-card .detail-link { grid-column: 1 / -1; text-align: center; }
}
@media (max-width: 650px) {
  .topbar, .hero-grid, main, footer { width: min(100% - 24px, 1180px); }
  .topbar-meta { display: none; }
  .section-nav-inner { width: 100%; padding: 0 12px; gap: 22px; }
  .hero-grid { padding: 54px 0 64px; }
  .detail-hero-content { width: min(100% - 24px, 1180px); padding: 48px 0 54px; }
  .hero-copy { font-size: 16px; }
  main { padding-top: 44px; }
  .section { margin-bottom: 54px; }
  .section-heading, .panel-heading { align-items: flex-start; flex-direction: column; }
  .controls-heading .select-control { width: 100%; }
  .route-period-controls { width: 100%; grid-template-columns: 38px 1fr 1.4fr 38px; }
  select { width: 100%; }
  .kpi-grid { grid-template-columns: 1fr; }
  .kpi-card { min-height: 140px; }
  .chart-card, .panel, .routes-layout { padding: 20px; }
  .chart-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .chart-summary p { grid-column: 1 / -1; margin-left: 0; }
  .routes-layout { grid-template-columns: 1fr; }
  body[data-page="overview"] .route-preview-card { grid-template-columns: 1fr; padding: 20px; }
  .route-preview-card .detail-link { grid-column: auto; }
  .route-map { height: 410px; }
  .route-map-footer { align-items: flex-start; flex-direction: column; padding: 14px 20px; }
  .route-map-legend { width: 100%; grid-template-columns: auto 1fr auto; }
  .route-history { padding: 22px 20px 16px; }
  .route-history-heading { flex-direction: column; }
  .routes-chart { padding: 0 0 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .route-note { padding: 24px 0 0; }
  .route-row { grid-template-columns: 64px 1fr 76px; gap: 9px; }
  footer { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; }
  .footer-disclaimer { grid-column: 1; }
}
