:root {
  color-scheme: light;
  --canvas: #f5f2ec;
  --paper: #fffdf9;
  --paper-muted: #eeeae3;
  --graphite: #252724;
  --graphite-soft: #555a55;
  --muted: #737972;
  --line: #d8d5ce;
  --line-strong: #b9b7b0;
  --coral: #c85f3d;
  --coral-dark: #9d432a;
  --coral-soft: #f4ded5;
  --teal: #1f756b;
  --teal-dark: #15574f;
  --teal-soft: #dcebe7;
  --caution: #e0b84e;
  --caution-soft: #f8edc8;
  --danger: #aa3f36;
  --danger-soft: #f4d9d5;
  --white: #ffffff;
  --hero-ink: #fbfaf6;
  --radius: 8px;
  --radius-small: 4px;
  --header-height: 68px;
  --rail-width: 240px;
  --content-max: 1680px;
  --focus-ring: 0 0 0 3px rgba(224, 184, 78, 0.48);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 0;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  background: var(--canvas);
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: clip;
  background: var(--canvas);
  color: var(--graphite);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  letter-spacing: 0;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
label,
summary,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  cursor: pointer;
}

button:disabled,
input:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--paper-muted);
}

svg {
  display: block;
  flex: 0 0 auto;
  width: 1.1em;
  height: 1.1em;
  stroke-width: 1.8;
}

h1,
h2,
h3,
p,
figure,
blockquote,
dl,
dd {
  margin-top: 0;
}

h1,
h2,
h3,
strong,
b {
  text-wrap: balance;
}

p,
small,
span,
td,
th,
li,
blockquote {
  overflow-wrap: anywhere;
}

table {
  border-spacing: 0;
}

caption {
  text-align: left;
}

[hidden],
.is-hidden {
  display: none !important;
}

section[id],
main[id] {
  scroll-margin-top: calc(var(--header-height) + 16px);
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus {
  outline: 0;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--caution);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

::selection {
  background: var(--caution-soft);
  color: var(--graphite);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 1000;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--graphite);
  border-radius: var(--radius-small);
  background: var(--paper);
  color: var(--graphite);
  font-weight: 750;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

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

.skip-link:focus {
  transform: translateY(0);
}

.product-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  min-height: var(--header-height);
  padding: 8px clamp(16px, 2vw, 32px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 249, 0.97);
}

.product-brand {
  display: inline-grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: max-content;
  min-width: 0;
}

.product-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: transparent;
}

.product-brand span {
  min-width: 0;
}

.product-brand strong,
.product-brand small {
  display: block;
}

.product-brand strong {
  font-size: 16px;
  line-height: 1.25;
}

.product-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.product-nav {
  display: flex;
  align-items: stretch;
  justify-content: center;
  min-width: 0;
  min-height: 52px;
}

.product-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 17px;
  color: var(--graphite-soft);
  font-size: 14px;
  font-weight: 680;
  white-space: nowrap;
}

.product-nav a::after {
  position: absolute;
  right: 17px;
  bottom: 4px;
  left: 17px;
  height: 2px;
  background: transparent;
  content: "";
}

.product-nav a:hover,
.product-nav a:focus-visible {
  color: var(--coral-dark);
}

.product-nav a:hover::after,
.product-nav a:focus-visible::after {
  background: var(--coral);
}

.freshness-chip {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 8px;
  min-height: 36px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.freshness-short,
.rail-mobile-controls {
  display: none;
}

.cinema-workspace {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, 1fr);
  gap: 0;
  width: min(100%, var(--content-max));
  min-width: 0;
  margin: 0 auto;
  background: var(--paper);
}

.route-rail {
  position: sticky;
  top: var(--header-height);
  align-self: start;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--header-height));
  min-width: 0;
  padding: 18px 12px 14px;
  overflow: hidden;
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.rail-heading {
  flex: 0 0 auto;
  padding: 0 6px 12px;
}

.rail-heading p,
.band-heading p,
.filmstrip-heading > span {
  margin-bottom: 4px;
  color: var(--coral-dark);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.3;
  text-transform: uppercase;
}

.rail-heading h2 {
  margin-bottom: 4px;
  font-size: 17px;
  line-height: 1.3;
}

.rail-heading > span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.route-rail-list {
  display: grid;
  flex: 1 1 auto;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 4px;
  min-height: 0;
  padding: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.route-rail-list > button,
.route-rail-item,
.route-select {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 62px;
  padding: 7px;
  border: 1px solid transparent;
  border-radius: var(--radius-small);
  background: transparent;
  text-align: left;
}

.route-rail-list > button:hover,
.route-rail-item:hover,
.route-select:hover {
  border-color: var(--line);
  background: var(--canvas);
}

.route-rail-list > button[aria-pressed="true"],
.route-rail-item[aria-pressed="true"],
.route-select[aria-pressed="true"] {
  border-color: var(--coral);
  background: var(--coral-soft);
  color: var(--coral-dark);
}

.route-rail-list button img,
.route-rail-item img,
.route-select img,
.route-thumb {
  width: 60px;
  height: 44px;
  aspect-ratio: 15 / 11;
  border-radius: 3px;
  object-fit: cover;
}

.route-rail-list button > span,
.route-rail-item > span,
.route-select > span {
  display: block;
  min-width: 0;
}

.route-rail-list strong,
.route-rail-list small,
.route-rail-list span,
.route-rail-item strong,
.route-rail-item small,
.route-select strong,
.route-select small {
  display: block;
}

.route-rail-list strong,
.route-rail-item strong,
.route-select strong {
  margin-bottom: 2px;
  font-size: 13px;
  line-height: 1.25;
}

.route-rail-list small,
.route-rail-item small,
.route-select small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.rail-budget {
  flex: 0 0 auto;
  margin-top: 10px;
  padding: 12px 8px 2px;
  border-top: 1px solid var(--line);
}

.rail-budget span,
.rail-budget strong,
.rail-budget small {
  display: block;
}

.rail-budget span,
.rail-budget small {
  color: var(--muted);
  font-size: 10px;
}

.rail-budget strong {
  margin: 2px 0;
  color: var(--teal-dark);
  font-size: 22px;
  line-height: 1.2;
}

.cinema-main {
  width: 100%;
  min-width: 0;
  background: var(--canvas);
}

.constraint-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  min-width: 0;
  padding: 0 clamp(14px, 1.5vw, 24px);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.constraint-strip > div {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 8px;
  align-content: center;
  min-width: 0;
  min-height: 68px;
  padding: 10px 14px;
  border-right: 1px solid var(--line);
}

.constraint-strip > div:first-child {
  padding-left: 0;
}

.constraint-strip > div:last-child {
  border-right: 0;
}

.constraint-strip svg {
  grid-row: 1 / 3;
  align-self: center;
  color: var(--graphite-soft);
  font-size: 18px;
}

.constraint-strip span {
  min-width: 0;
  font-size: 12px;
  font-weight: 760;
  line-height: 1.3;
}

.constraint-strip small {
  min-width: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.cinema-chapter,
.section-band,
.decision-band {
  min-width: 0;
  margin: 0 clamp(14px, 1.5vw, 24px);
}

.cinema-chapter {
  padding-top: 14px;
}

.route-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 440px;
  min-height: 400px;
  margin: 0;
  overflow: hidden;
  border: 1px solid #525854;
  border-radius: var(--radius);
  background: #55615d;
}

.route-hero > img {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-position: center;
}

.hero-scrim {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: -2;
  width: min(72%, 860px);
  background: rgba(18, 29, 28, 0.68);
  pointer-events: none;
}

.hero-copy {
  position: absolute;
  bottom: 0;
  left: 0;
  width: min(72%, 860px);
  padding: 38px 42px 34px;
  color: var(--hero-ink);
}

.hero-eyebrow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.hero-eyebrow > span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius-small);
  background: rgba(24, 32, 31, 0.74);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.hero-eyebrow > span:first-child {
  border-color: var(--coral-soft);
  background: var(--coral-soft);
  color: var(--coral-dark);
}

.state-badge[data-state="green"],
[data-state="feasible"] {
  border-color: var(--teal-soft);
  background: var(--teal);
  color: var(--white);
}

.state-badge[data-state="yellow"],
.state-badge[data-state="conditional"],
[data-state="conditional"] {
  border-color: var(--caution-soft);
  background: var(--caution);
  color: var(--graphite);
}

.state-badge[data-state="red"],
.state-badge[data-state="over"],
[data-state="over"] {
  border-color: var(--danger-soft);
  background: var(--danger);
  color: var(--white);
}

.hero-copy h1 {
  max-width: 820px;
  margin-bottom: 10px;
  font-size: 42px;
  font-weight: 800;
  line-height: 1.12;
}

.hero-summary {
  max-width: 700px;
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  font-weight: 620;
  line-height: 1.6;
}

.hero-copy blockquote {
  max-width: 720px;
  margin-bottom: 16px;
  padding-left: 12px;
  border-left: 3px solid var(--coral);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.55;
}

.hero-tripline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, 0.32);
}

.hero-tripline > span {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0 7px;
  min-width: 0;
  padding: 12px 14px 0 0;
}

.hero-tripline > span + span {
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.26);
}

.hero-tripline svg {
  grid-row: 1 / 3;
  margin-top: 2px;
}

.hero-tripline b {
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
  opacity: 0.72;
}

.hero-tripline em {
  min-width: 0;
  font-size: 11px;
  font-style: normal;
  line-height: 1.35;
}

.hero-source {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  max-width: 34%;
  padding: 5px 8px;
  border-radius: var(--radius-small);
  background: rgba(31, 35, 33, 0.76);
  color: rgba(255, 255, 255, 0.9);
  font-size: 9px;
  line-height: 1.35;
  text-align: right;
}

.hero-source a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-start;
  margin-top: 16px;
}

.hero-actions button,
.hero-actions a {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 13px;
  border: 1px solid rgba(255, 255, 255, 0.44);
  border-radius: var(--radius-small);
  background: rgba(24, 32, 31, 0.76);
  color: var(--white);
  font-size: 12px;
  font-weight: 780;
}

.hero-actions button:hover,
.hero-actions button[aria-pressed="true"],
.hero-actions a:hover {
  border-color: var(--teal-soft);
  background: var(--teal);
}

.hero-actions a[hidden] {
  display: none;
}

.quick-compare-tray {
  margin: -1px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-top-color: var(--coral);
  background: var(--paper);
}

.quick-compare-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
  color: var(--coral-dark);
  font-size: 11px;
  font-weight: 850;
}

.quick-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quick-compare-grid > article {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 9px 46px 9px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--canvas);
}

.quick-compare-grid > article > img {
  width: 112px;
  height: 86px;
  border-radius: 3px;
}

.quick-compare-grid > article > div > span {
  color: var(--coral-dark);
  font-size: 10px;
  font-weight: 850;
}

.quick-compare-grid h3 {
  margin: 1px 0 6px;
  font-size: 15px;
  line-height: 1.3;
}

.quick-compare-grid dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 12px;
  margin: 0;
}

.quick-compare-grid dl > div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 5px;
}

.quick-compare-grid dt,
.quick-compare-grid dd {
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
}

.quick-compare-grid dt {
  color: var(--muted);
}

.quick-compare-grid dd {
  color: var(--graphite-soft);
}

.quick-compare-grid .table-state {
  white-space: nowrap;
}

.quick-compare-grid .icon-button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  min-height: 30px;
}

.day-filmstrip-shell {
  position: relative;
  z-index: 3;
  margin: -1px 0 0;
  padding: 13px 10px 12px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: var(--paper);
}

.filmstrip-heading,
.band-heading,
.risk-gate-head,
.combo-result-head,
.day-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.filmstrip-heading {
  align-items: baseline;
  padding: 0 5px 8px;
}

.filmstrip-heading > span {
  flex: 0 0 auto;
  margin: 0;
}

.filmstrip-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-align: right;
}

.day-filmstrip {
  display: grid;
  grid-auto-columns: minmax(176px, 1fr);
  grid-auto-flow: column;
  gap: 7px;
  min-width: 0;
  padding: 2px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x proximity;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.day-filmstrip > button,
.day-reel-card,
.day-card {
  display: grid;
  grid-template-rows: auto 92px auto auto auto;
  align-content: start;
  width: 100%;
  min-width: 0;
  min-height: 196px;
  padding: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--paper);
  text-align: left;
  scroll-snap-align: start;
}

.day-filmstrip > button:hover,
.day-reel-card:hover,
.day-card:hover {
  border-color: var(--line-strong);
  background: var(--canvas);
}

.day-filmstrip > button[aria-pressed="true"],
.day-reel-card[aria-pressed="true"],
.day-card[aria-pressed="true"] {
  border-color: var(--coral);
  box-shadow: inset 0 3px 0 var(--coral);
}

.day-filmstrip button img,
.day-reel-card img,
.day-card img,
.day-thumb {
  width: 100%;
  height: 92px;
  margin: 7px 0 6px;
  aspect-ratio: 16 / 9;
  border-radius: 3px;
  object-fit: cover;
}

.day-filmstrip button strong,
.day-reel-card strong,
.day-card strong {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.day-filmstrip button span,
.day-filmstrip button small,
.day-reel-card span,
.day-reel-card small,
.day-card span,
.day-card small {
  display: block;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.day-filmstrip .day-card-factors {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.day-filmstrip .day-card-factors em {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 5px;
  color: var(--graphite-soft);
  font-size: 10px;
  font-style: normal;
  line-height: 1.4;
}

.day-filmstrip .day-card-factors svg {
  width: 13px;
  height: 13px;
  color: var(--teal);
}

.day-stage {
  padding: 24px 0 8px;
}

.day-scene {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1.18fr);
  min-width: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.day-image-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  min-height: 280px;
  margin-bottom: 0;
  overflow: hidden;
  background: var(--paper-muted);
}

.day-image-frame img {
  position: absolute;
  inset: 0;
}

.day-image-frame figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  padding: 5px 7px;
  border-radius: var(--radius-small);
  background: rgba(31, 35, 33, 0.78);
  color: var(--white);
  font-size: 9px;
  line-height: 1.35;
}

.day-narrative {
  min-width: 0;
  padding: 24px clamp(20px, 2.5vw, 38px);
}

.day-title-row {
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.day-title-row p {
  margin-bottom: 3px;
  color: var(--coral-dark);
  font-size: 11px;
  font-weight: 800;
}

.day-title-row h2 {
  margin-bottom: 0;
  font-size: 25px;
  line-height: 1.25;
}

.intensity-meter {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid var(--caution);
  border-radius: var(--radius-small);
  background: var(--caution-soft);
  color: #6e5411;
  font-size: 10px;
  font-weight: 800;
}

.scene-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
  padding-top: 18px;
}

.scene-timeline article {
  min-width: 0;
  padding: 0 16px;
  border-left: 1px solid var(--line);
}

.scene-timeline article:first-child {
  padding-left: 0;
  border-left: 0;
}

.scene-timeline span {
  display: block;
  margin-bottom: 6px;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 850;
}

.scene-timeline p {
  margin-bottom: 0;
  color: var(--graphite-soft);
  font-size: 12px;
  line-height: 1.65;
}

.travel-factors {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.travel-factors article {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 0 8px;
  min-width: 0;
  min-height: 94px;
  padding: 15px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
}

.travel-factors article:nth-child(4n) {
  border-right: 0;
}

.travel-factors svg {
  grid-row: 1 / 3;
  margin-top: 2px;
  color: var(--teal);
  font-size: 17px;
}

.travel-factors span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.travel-factors p {
  min-width: 0;
  margin-bottom: 0;
  color: var(--graphite);
  font-size: 11px;
  line-height: 1.5;
}

.section-band,
.decision-band {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.section-band {
  background: transparent;
}

.band-heading {
  align-items: flex-end;
  margin-bottom: 16px;
}

.band-heading p {
  margin-bottom: 4px;
}

.band-heading h2 {
  margin-bottom: 0;
  font-size: 24px;
  line-height: 1.25;
}

.band-heading > span {
  max-width: 48%;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-align: right;
}

.band-heading.compact {
  margin-bottom: 12px;
}

.media-disclosure {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--caution);
  background: var(--caution-soft);
  color: #624f1f;
}

.media-disclosure svg {
  margin-top: 2px;
}

.media-disclosure p {
  margin-bottom: 0;
  font-size: 10px;
  line-height: 1.55;
}

#routeMedia,
.route-media-section .route-media {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.media-card,
[data-media-card] {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.media-card:hover,
[data-media-card]:hover {
  border-color: var(--line-strong);
}

.media-player,
.media-preview,
.media-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #252c2a;
}

.media-player img,
.media-preview img,
.media-thumb img,
.media-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-player iframe {
  background: #111312;
}

.media-play,
.media-player > button,
[data-media-play] {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(31, 35, 33, 0.84);
  color: var(--white);
  transform: translate(-50%, -50%);
}

.media-play:hover,
.media-player > button:hover,
[data-media-play]:hover {
  background: var(--coral);
}

.media-card-body,
.media-copy {
  min-width: 0;
  padding: 14px;
}

.media-meta,
.media-platform {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 7px;
  color: var(--coral-dark);
  font-size: 9px;
  font-weight: 800;
}

.media-card h3,
[data-media-card] h3 {
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.4;
}

.media-card p,
[data-media-card] p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.media-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
}

.media-actions a,
.media-actions button,
.external-media-link {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--paper);
  color: var(--graphite);
  font-size: 10px;
  font-weight: 760;
}

.decision-band {
  padding: 22px 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.decision-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr 1.1fr;
  min-width: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.route-budget,
.decision-radar,
.risk-gate {
  min-width: 0;
  padding: 18px;
}

.decision-radar,
.risk-gate {
  border-left: 1px solid var(--line);
}

.route-budget h3,
.decision-radar h3,
.risk-gate h3 {
  margin-bottom: 12px;
  font-size: 14px;
  line-height: 1.35;
}

.budget-summary,
.budget-total,
.budget-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.budget-summary strong,
.budget-total strong,
.budget-head strong {
  color: var(--teal-dark);
  font-size: 20px;
}

.budget-row {
  display: grid;
  grid-template-columns: minmax(66px, 0.7fr) minmax(92px, 1.4fr) minmax(72px, auto);
  gap: 9px;
  align-items: center;
  min-width: 0;
  min-height: 30px;
}

.budget-label,
.budget-value {
  font-size: 9px;
  line-height: 1.35;
}

.budget-label {
  color: var(--muted);
}

.budget-value {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.budget-track,
.radar-track {
  position: relative;
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-muted);
}

.budget-fill,
.radar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
}

.radar-row,
.decision-radar-row {
  display: grid;
  grid-template-columns: minmax(72px, 1fr) minmax(90px, 1.4fr) 34px;
  gap: 9px;
  align-items: center;
  min-height: 30px;
  font-size: 9px;
}

.radar-row strong,
.decision-radar-row strong {
  color: var(--coral-dark);
  text-align: right;
}

.risk-gate-head {
  align-items: center;
  margin-bottom: 10px;
}

.risk-gate-head h3 {
  margin-bottom: 0;
}

.icon-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--paper);
}

.icon-button:hover {
  border-color: var(--coral);
  color: var(--coral-dark);
}

.risk-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.risk-controls button,
[data-risk-toggle] {
  min-height: 36px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--paper);
  color: var(--graphite-soft);
  font-size: 9px;
  font-weight: 720;
  line-height: 1.25;
}

.risk-controls button:hover,
[data-risk-toggle]:hover {
  border-color: var(--caution);
}

.risk-controls button[aria-pressed="true"],
.risk-controls button.is-active,
[data-risk-toggle][aria-pressed="true"] {
  border-color: var(--caution);
  background: var(--caution-soft);
  color: #604a12;
}

#riskAdvice {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.route-window-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  min-width: 0;
}

.route-window-strip > article,
.window-card {
  min-width: 0;
  padding: 14px 16px 0;
  border-right: 1px solid var(--line);
}

.route-window-strip > article:last-child,
.window-card:last-child {
  border-right: 0;
}

.route-window-strip strong,
.window-card strong {
  display: block;
  margin-bottom: 3px;
  color: var(--teal-dark);
  font-size: 11px;
}

.route-window-strip p,
.window-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.compare-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.compare-table {
  width: 100%;
  min-width: 790px;
  border-collapse: collapse;
  font-size: 11px;
}

.compare-table caption {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

.compare-table th,
.compare-table td {
  padding: 12px 13px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.compare-table th:last-child,
.compare-table td:last-child {
  border-right: 0;
}

.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

.compare-table th {
  background: var(--paper-muted);
  color: var(--graphite-soft);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.compare-table tbody tr:hover td {
  background: #faf7f2;
}

.compare-table strong,
.compare-table small {
  display: block;
}

.compare-table strong {
  font-size: 11px;
}

.compare-table small {
  color: var(--muted);
  font-size: 9px;
}

.status-pill,
.source-type,
.evidence-label,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--canvas);
  color: var(--graphite-soft);
  font-size: 9px;
  font-weight: 760;
  line-height: 1.2;
}

.status-pill.green {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.status-pill.yellow {
  border-color: var(--caution);
  background: var(--caution-soft);
  color: #6e5411;
}

.status-pill.red {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.focus-comparisons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  min-width: 0;
}

.focus-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.focus-card h3 {
  margin-bottom: 14px;
  font-size: 16px;
}

.axis-table {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.axis-row {
  display: grid;
  grid-template-columns: minmax(66px, 0.5fr) repeat(2, minmax(0, 1fr));
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

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

.axis-row > * {
  min-width: 0;
  margin-bottom: 0;
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.5;
}

.axis-row > *:last-child {
  border-right: 0;
}

.axis-row > strong:first-child {
  color: var(--coral-dark);
}

.axis-row:first-child {
  background: var(--paper-muted);
}

.decision-rule {
  margin-top: 14px;
  padding: 11px 12px;
  border-left: 3px solid var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 680;
  line-height: 1.55;
}

.combo-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 18px;
  min-width: 0;
  align-items: start;
}

.combo-lab {
  background: transparent;
}

.combo-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
  min-width: 0;
  margin: 0;
  padding: 10px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.combo-picker legend {
  padding: 0 8px 0 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.combo-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  min-height: 62px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.combo-option:hover {
  color: var(--coral-dark);
}

.combo-option > span,
.combo-option strong,
.combo-option small {
  display: block;
  min-width: 0;
}

.combo-option strong {
  font-size: 11px;
  line-height: 1.35;
}

.combo-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.combo-option input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--teal);
}

.combo-result {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.combo-result-head {
  align-items: center;
  margin-bottom: 14px;
}

.combo-result-head > span {
  color: var(--muted);
  font-size: 10px;
}

.combo-result-head strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: var(--radius-small);
  font-size: 10px;
}

#comboSummary h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

#comboSummary p,
#comboTotalCost,
#comboNewCash,
.combo-advice p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.combo-budget-line {
  width: 100%;
  height: 9px;
  margin: 16px 0;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-muted);
}

.combo-budget-line > span,
#comboBar {
  display: block;
  width: 0;
  max-width: 100%;
  height: 100%;
  background: var(--coral);
  transition: width 180ms ease;
}

#comboTotalCost,
#comboNewCash {
  margin-bottom: 6px;
  color: var(--graphite);
  font-weight: 680;
}

.combo-advice {
  margin-top: 13px;
  padding: 11px 12px;
  border-left: 3px solid var(--caution);
  background: var(--caution-soft);
}

.combo-advice p {
  margin-bottom: 0;
  color: #604a12;
}

.agent-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
  margin-bottom: 16px;
}

.audit-card {
  min-width: 0;
  padding: 13px;
  border-top: 3px solid var(--teal);
  background: var(--paper);
}

.audit-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 11px;
}

.audit-card p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.source-ledger,
.source-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.source-card,
.source-ledger > article {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 180px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.source-card > span,
.source-ledger > article > span {
  color: var(--coral-dark);
  font-size: 9px;
  font-weight: 800;
}

.source-card h3,
.source-ledger > article h3 {
  margin: 6px 0 8px;
  font-size: 14px;
  line-height: 1.35;
}

.source-card p,
.source-card li,
.source-ledger > article p,
.source-ledger > article li {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
}

.source-card ul,
.source-ledger > article ul {
  margin: 0 0 14px;
  padding-left: 16px;
}

.source-link,
.source-card a,
.source-ledger > article a {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 36px;
  margin-top: auto;
  color: var(--teal-dark);
  font-size: 10px;
  font-weight: 780;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.image-error,
.has-image-error,
img.is-error,
img[data-error="true"],
img:not([src]),
img[src=""] {
  position: relative;
  background: var(--paper-muted);
  color: transparent;
}

.image-error,
.has-image-error {
  display: grid;
  place-items: center;
  min-height: 120px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 10px;
}

.image-error::after,
.has-image-error::after {
  content: "图片暂不可用";
}

/* Dynamic controller contracts. */
.route-rail-list > [data-route-select] {
  grid-template-columns: 60px minmax(0, 1fr) 16px;
}

.route-select em {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--graphite-soft);
  font-size: 10px;
  font-style: normal;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-select > svg {
  color: var(--line-strong);
  font-size: 13px;
}

.route-select[aria-pressed="true"] > svg {
  color: var(--coral-dark);
}

.day-select,
[data-day-select] {
  min-width: 0;
}

.day-reel-label {
  display: flex !important;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  color: var(--coral-dark) !important;
  font-weight: 850;
}

.day-reel-label em {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
}

.media-card-copy > p:first-child {
  margin-bottom: 5px;
  color: var(--coral-dark);
  font-size: 9px;
  font-weight: 850;
}

.media-card-copy > small {
  display: block;
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.media-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 12px;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 9px;
}

.media-match {
  min-height: 50px;
}

.media-text-preview {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 150px;
  color: var(--paper);
  background: #2f4541;
}

.media-text-preview svg {
  width: 28px;
  height: 28px;
}

.media-text-preview span {
  margin-top: -34px;
  font-size: 10px;
  font-weight: 750;
}

.platform-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius-small);
  background: rgba(31, 35, 33, 0.78);
  color: var(--white);
  font-size: 9px;
  font-weight: 800;
}

.media-play,
[data-play-media],
.media-external,
.media-source-link {
  position: static;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  margin-top: auto;
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-small);
  background: var(--paper);
  color: var(--graphite);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.3;
  text-align: center;
  transform: none;
}

.media-play:hover,
[data-play-media]:hover,
.media-external:hover,
.media-source-link:hover {
  border-color: var(--coral);
  background: var(--coral-soft);
  color: var(--coral-dark);
}

.media-source-link {
  min-height: 32px;
  margin-top: 7px;
  border-color: transparent;
  background: transparent;
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.media-player {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
}

.budget-heading,
.radar-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.budget-heading > span,
.radar-heading > span {
  font-size: 14px;
  font-weight: 800;
}

.budget-heading small,
.radar-heading small {
  color: var(--muted);
  font-size: 9px;
}

.budget-total > div {
  min-width: 0;
}

.budget-total span,
.budget-total strong {
  display: block;
}

.budget-total span {
  color: var(--muted);
  font-size: 9px;
}

.budget-total strong {
  font-size: 16px;
  white-space: nowrap;
}

.budget-bars,
.decision-radar > ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.budget-bars li {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(80px, 0.8fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 30px;
}

.budget-bars li > div {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
}

.budget-bars li span,
.budget-bars li b {
  font-size: 9px;
  line-height: 1.3;
}

.budget-bars li span {
  color: var(--muted);
}

.budget-bars li b {
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.budget-bars li > i,
.decision-radar li > i {
  position: relative;
  display: block;
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-muted);
}

.budget-bars li > i::after {
  display: block;
  width: var(--budget-width, 0%);
  height: 100%;
  background: var(--teal);
  content: "";
}

.budget-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.decision-radar li {
  display: grid;
  grid-template-columns: minmax(66px, 0.7fr) minmax(86px, 1.4fr) 30px;
  gap: 8px;
  align-items: center;
  min-height: 30px;
  font-size: 9px;
}

.decision-radar li > i b {
  display: block;
  width: var(--score, 0%);
  height: 100%;
  background: var(--coral);
}

.decision-radar li > strong {
  color: var(--coral-dark);
  text-align: right;
}

.route-fit {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.route-fit p {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.route-fit b {
  color: var(--graphite);
}

.route-window-strip {
  grid-template-columns: 104px repeat(3, minmax(0, 1fr)) minmax(174px, 0.9fr);
  align-items: stretch;
}

.route-window-strip > span,
.route-window-strip > article,
.route-window-strip > p {
  min-width: 0;
  margin: 0;
  padding: 13px 14px;
  border-right: 1px solid var(--line);
}

.window-label {
  display: grid;
  align-content: start;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.window-label small {
  display: block;
  color: var(--muted-light);
  font-size: 8px;
  font-weight: 650;
}

.price-window-card {
  display: grid;
  align-content: start;
  gap: 8px;
  background: var(--paper);
}

.price-window-head {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.price-window-head b {
  color: var(--teal-dark);
  font-size: 11px;
}

.price-window-head span {
  max-width: 52%;
  color: var(--coral-dark);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.35;
  text-align: right;
}

.price-window-card p {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 6px;
  margin: 0;
  color: var(--graphite-soft);
  font-size: 9px;
  line-height: 1.48;
}

.price-window-card p svg {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  color: var(--teal);
}

.price-window-card > small,
.window-note {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.price-window-card > small {
  padding-top: 7px;
  border-top: 1px solid var(--line-soft);
}

.price-term-lines {
  display: grid;
  gap: 5px;
  margin: 0;
}

.price-term-lines > div {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 6px;
}

.price-term-lines dt,
.price-term-lines dd {
  margin: 0;
  font-size: 8px;
  line-height: 1.45;
}

.price-term-lines dt {
  color: var(--coral-dark);
  font-weight: 850;
}

.price-term-lines dd {
  color: var(--muted);
}

.price-window-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.price-window-links a {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  color: var(--teal-dark);
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
}

.price-window-links a:hover {
  color: var(--coral-dark);
}

.price-window-links svg {
  width: 10px;
  height: 10px;
}

.price-window-card > em {
  color: var(--muted-light);
  font-size: 7px;
  font-style: normal;
  line-height: 1.35;
}

.window-note {
  border-right: 0;
}

.compare-table tbody tr.is-current td,
.compare-table tbody tr.is-current th {
  background: var(--coral-soft);
}

.compare-table th button {
  display: grid;
  gap: 2px;
  width: 100%;
  min-width: 110px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.compare-table th button span {
  color: var(--coral-dark);
  font-size: 9px;
}

.table-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  font-size: 9px;
  font-weight: 760;
}

.table-state[data-state="green"] {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.table-state[data-state="yellow"] {
  border-color: var(--caution);
  background: var(--caution-soft);
  color: #6e5411;
}

.table-state[data-state="red"] {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.focus-comparison {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.focus-title {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.focus-title p {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 9px;
}

.focus-title p span {
  color: var(--coral-dark);
  font-weight: 850;
}

.focus-title h3 {
  margin-bottom: 0;
  font-size: 16px;
}

.comparison-axes {
  min-width: 0;
}

.comparison-axis {
  display: grid;
  grid-template-columns: minmax(64px, 0.45fr) repeat(2, minmax(0, 1fr));
  min-width: 0;
  border-bottom: 1px solid var(--line);
}

.comparison-axis > * {
  min-width: 0;
  margin: 0;
  padding: 9px 10px;
  border-right: 1px solid var(--line);
  font-size: 9px;
  line-height: 1.5;
}

.comparison-axis > *:last-child {
  border-right: 0;
}

.comparison-axis > strong {
  color: var(--coral-dark);
}

.comparison-axis p span {
  display: block;
  margin-bottom: 3px;
  color: var(--teal-dark);
  font-size: 8px;
  font-weight: 800;
}

.comparison-verdict {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 14px 18px;
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.comparison-verdict p {
  margin-bottom: 0;
  font-size: 10px;
  line-height: 1.55;
}

.comparison-verdict b {
  display: block;
  margin-bottom: 3px;
}

.combo-picker > label {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  min-height: 62px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.combo-picker > label input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--teal);
}

[data-combo-route] {
  flex: 0 0 auto;
}

.combo-picker > label span,
.combo-picker > label b,
.combo-picker > label small {
  display: block;
  min-width: 0;
}

.combo-picker > label b {
  font-size: 11px;
}

.combo-picker > label small {
  color: var(--muted);
  font-size: 9px;
}

.agent-summary > article {
  min-width: 0;
  padding: 13px;
  border-top: 3px solid var(--teal);
  background: var(--paper);
}

.agent-summary > article > span {
  color: var(--coral-dark);
  font-size: 9px;
  font-weight: 850;
}

.agent-summary > article h3 {
  margin: 5px 0;
  font-size: 11px;
}

.agent-summary > article p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.fatal-error {
  width: min(620px, calc(100% - 32px));
  margin: 80px auto;
  padding: 24px;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--danger);
}

.fatal-error h1 {
  margin-bottom: 8px;
  font-size: 24px;
}

.fatal-error p {
  margin-bottom: 0;
}

/* Compatibility for route/media markup while the controller is being upgraded. */
.status-row,
.route-title,
.route-footer,
.story-meta,
.image-source,
.source-link {
  display: flex;
  align-items: center;
}

.route-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.route-card.is-hidden {
  display: none;
}

.route-body {
  min-width: 0;
  padding: 18px;
}

.route-title,
.route-footer {
  justify-content: space-between;
  gap: 16px;
}

.status-row {
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.route-note {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.story-list,
.planner-board,
.transport-timeline,
.atmosphere-grid {
  border-top: 1px solid var(--line);
}

.story-item,
.planner-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.story-day {
  color: var(--coral-dark);
  font-size: 10px;
  font-weight: 850;
}

.story-item p,
.planner-row p,
.atmosphere-panel p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 10px;
}

.transport-timeline,
.atmosphere-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.transport-timeline > *,
.atmosphere-panel {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.transport-timeline > *:last-child,
.atmosphere-panel:nth-child(4n) {
  border-right: 0;
}

.atmosphere-panel.wide {
  grid-column: span 2;
}

.image-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-muted);
}

.image-source {
  position: absolute;
  right: 6px;
  bottom: 6px;
  left: 6px;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 7px;
  border-radius: var(--radius-small);
  background: rgba(31, 35, 33, 0.8);
  color: var(--white);
  font-size: 8px;
}

@media (max-width: 1180px) {
  :root {
    --header-height: 104px;
  }

  .product-header {
    grid-template-columns: minmax(230px, 1fr) auto;
  }

  .product-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    min-height: 42px;
    overflow-x: auto;
    border-top: 1px solid var(--line);
    scrollbar-width: none;
  }

  .product-nav::-webkit-scrollbar {
    display: none;
  }

  .product-nav a {
    min-height: 42px;
    padding-inline: 14px;
  }

  .freshness-chip {
    grid-column: 2;
    grid-row: 1;
  }

  .cinema-workspace {
    display: block;
  }

  .route-rail {
    position: static;
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 150px;
    gap: 12px;
    align-items: center;
    width: 100%;
    height: auto;
    padding: 10px 14px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-heading {
    padding: 0;
  }

  .rail-heading h2 {
    font-size: 14px;
  }

  .rail-heading > span {
    display: none;
  }

  .route-rail-list {
    display: grid;
    grid-auto-columns: 154px;
    grid-auto-flow: column;
    gap: 6px;
    min-height: 68px;
    padding: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .route-rail-list > button,
  .route-rail-item,
  .route-select {
    grid-template-columns: 54px minmax(0, 1fr) 16px;
    min-height: 64px;
    scroll-snap-align: start;
  }

  .route-rail-list button img,
  .route-rail-item img,
  .route-select img,
  .route-thumb {
    width: 54px;
    height: 40px;
  }

  .rail-budget {
    margin: 0;
    padding: 0 0 0 12px;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .rail-budget strong {
    font-size: 18px;
  }

  .quick-compare-grid {
    grid-template-columns: 1fr;
  }

  .route-hero {
    height: 410px;
    min-height: 380px;
  }

  .hero-copy {
    padding: 30px;
  }

  .hero-copy h1 {
    font-size: 36px;
  }

  .travel-factors {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .travel-factors article:nth-child(4n) {
    border-right: 1px solid var(--line);
  }

  .travel-factors article:nth-child(2n) {
    border-right: 0;
  }

  .agent-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .constraint-strip {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .constraint-strip > div {
    flex: 0 0 178px;
    scroll-snap-align: start;
  }

  .constraint-strip > div:first-child {
    padding-left: 14px;
  }

  .hero-scrim,
  .hero-copy {
    width: 78%;
  }

  .hero-tripline {
    grid-template-columns: 1fr;
  }

  .hero-tripline > span,
  .hero-tripline > span + span {
    padding: 8px 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  .hero-tripline > span:first-child {
    border-top: 0;
  }

  .day-scene,
  .decision-layout,
  .combo-layout {
    grid-template-columns: 1fr;
  }

  .day-image-frame {
    aspect-ratio: 16 / 8;
    min-height: 0;
  }

  .decision-radar,
  .risk-gate {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  #routeMedia,
  .route-media-section .route-media,
  .source-ledger,
  .source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .focus-comparisons {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  :root {
    --header-height: 96px;
  }

  body {
    font-size: 14px;
  }

  .product-header {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 58px;
    padding: 7px 12px;
  }

  .product-brand {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
  }

  .product-brand img {
    width: 38px;
    height: 38px;
  }

  .product-brand strong {
    font-size: 14px;
  }

  .product-brand small {
    font-size: 9px;
  }

  .freshness-chip span {
    display: none;
  }

  .freshness-chip {
    width: 38px;
    justify-content: center;
  }

  .product-nav {
    margin-inline: -12px;
    padding-inline: 12px;
  }

  .product-nav a {
    font-size: 12px;
  }

  .route-rail {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 12px;
  }

  .rail-heading,
  .rail-budget {
    display: none;
  }

  .route-rail-list {
    grid-auto-columns: 190px;
  }

  .route-rail-list > button,
  .route-select {
    grid-template-columns: 54px minmax(76px, 1fr) 14px;
  }

  .route-select strong,
  .route-select em,
  .route-select small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .constraint-strip,
  .cinema-chapter,
  .section-band,
  .decision-band {
    margin-inline: 0;
  }

  .constraint-strip {
    padding-inline: 12px;
  }

  .constraint-strip > div {
    flex-basis: 162px;
    min-height: 60px;
  }

  .cinema-chapter {
    padding: 12px 12px 0;
  }

  .route-hero {
    height: 500px;
    min-height: 500px;
  }

  .hero-scrim,
  .hero-copy {
    width: 100%;
  }

  .hero-scrim {
    background: rgba(18, 29, 28, 0.6);
  }

  .hero-copy {
    padding: 24px 20px;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .hero-summary {
    font-size: 14px;
  }

  .hero-source {
    max-width: calc(100% - 24px);
  }

  .filmstrip-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .filmstrip-heading p {
    text-align: left;
  }

  .day-filmstrip {
    grid-auto-columns: minmax(194px, 76vw);
  }

  .day-stage {
    padding-top: 18px;
  }

  .day-image-frame {
    aspect-ratio: 16 / 10;
  }

  .day-narrative {
    padding: 20px 16px;
  }

  .day-title-row {
    align-items: flex-start;
  }

  .day-title-row h2 {
    font-size: 21px;
  }

  .scene-timeline {
    grid-template-columns: 1fr;
  }

  .scene-timeline article,
  .scene-timeline article:first-child {
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .scene-timeline article:first-child {
    border-top: 0;
  }

  .travel-factors {
    grid-template-columns: 1fr;
  }

  .travel-factors article,
  .travel-factors article:nth-child(2n),
  .travel-factors article:nth-child(4n) {
    min-height: 78px;
    border-right: 0;
  }

  .section-band,
  .decision-band {
    padding: 24px 12px;
  }

  .band-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .band-heading > span {
    max-width: none;
    text-align: left;
  }

  .band-heading h2 {
    font-size: 21px;
  }

  #routeMedia,
  .route-media-section .route-media,
  .source-ledger,
  .source-grid {
    grid-template-columns: 1fr;
  }

  .media-card,
  [data-media-card] {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .media-player,
  .media-preview,
  .media-thumb {
    grid-row: auto;
    grid-column: auto;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .media-actions {
    grid-column: auto;
  }

  .media-player {
    grid-row: auto;
    grid-column: auto;
  }

  .route-budget,
  .decision-radar,
  .risk-gate {
    padding: 16px 0;
  }

  .route-window-strip {
    display: grid;
    grid-template-columns: none;
    grid-auto-columns: 84%;
    grid-auto-flow: column;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .route-window-strip .window-label {
    display: none;
  }

  .route-window-strip > article,
  .window-card {
    padding: 14px 12px;
    scroll-snap-align: start;
  }

  .route-window-strip > .window-note {
    padding: 14px 12px;
    scroll-snap-align: start;
  }

  .combo-picker {
    grid-template-columns: 1fr;
  }

  .combo-result {
    order: -1;
  }

  .agent-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .axis-row {
    grid-template-columns: 58px repeat(2, minmax(0, 1fr));
  }

  .axis-row > * {
    padding: 8px 6px;
    font-size: 9px;
  }

  .route-footer,
  .route-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .transport-timeline,
  .atmosphere-grid {
    grid-template-columns: 1fr;
  }

  .transport-timeline > *,
  .atmosphere-panel,
  .atmosphere-panel.wide {
    grid-column: auto;
    border-right: 0;
  }
}

@media (max-width: 390px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
  }

  .product-brand small {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .product-nav a {
    padding-inline: 12px;
  }

  .route-rail-list {
    grid-auto-columns: 190px;
    max-width: 100%;
  }

  .cinema-main,
  .cinema-chapter,
  .day-stage,
  .section-band,
  .decision-band,
  .route-media,
  .focus-comparisons,
  .combo-layout,
  .source-ledger,
  .agent-summary {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .route-hero {
    height: 520px;
    min-height: 520px;
  }

  .hero-copy {
    padding: 22px 16px 18px;
  }

  .hero-copy h1 {
    font-size: 27px;
  }

  .hero-copy blockquote {
    font-size: 11px;
  }

  .hero-eyebrow {
    gap: 5px;
  }

  .hero-eyebrow > span {
    padding-inline: 7px;
    font-size: 9px;
  }

  .day-filmstrip {
    max-width: 100%;
    grid-auto-columns: 78vw;
  }

  .media-card,
  [data-media-card] {
    grid-template-columns: 1fr;
  }

  .media-player,
  .media-preview,
  .media-thumb {
    min-height: 0;
  }

  .media-card-body,
  .media-copy,
  .media-card-copy {
    padding: 11px;
  }

  .media-actions {
    padding: 7px 10px;
  }

  .budget-row {
    grid-template-columns: 64px minmax(70px, 1fr) 70px;
    gap: 6px;
  }

  .radar-row,
  .decision-radar-row {
    grid-template-columns: 68px minmax(70px, 1fr) 30px;
    gap: 6px;
  }

  .route-window-strip {
    max-width: 100%;
    grid-auto-columns: 84%;
  }

  .focus-card,
  .combo-result,
  .source-card,
  .source-ledger > article {
    padding: 14px;
  }

  .axis-row {
    grid-template-columns: 48px repeat(2, minmax(0, 1fr));
  }

  .axis-row > * {
    padding: 7px 5px;
    font-size: 8px;
    line-height: 1.45;
  }

  .agent-summary {
    grid-template-columns: 1fr;
  }
}

.hero-scrim {
  width: 100%;
  background: rgba(18, 29, 28, 0.52);
}

@media (min-width: 761px) {
  .route-select em,
  .route-select small,
  .constraint-strip small,
  .day-reel-label em,
  .day-select small,
  .budget-bars li,
  .decision-radar li,
  .risk-controls button,
  #riskAdvice,
  .route-fit p,
  .media-card-copy > small,
  .media-byline {
    font-size: 11px;
  }

  .price-window-head b {
    font-size: 13px;
  }

  .price-window-head span,
  .price-window-card > small,
  .window-note,
  .price-window-links a,
  .price-term-lines dt,
  .price-term-lines dd {
    font-size: 10px;
  }

  .price-window-card p {
    font-size: 11px;
  }

  .price-window-card > em {
    font-size: 9px;
  }
}

@media (max-width: 760px) {
  .freshness-chip .freshness-full {
    display: none;
  }

  .freshness-chip .freshness-short {
    display: inline;
    font-size: 10px;
    font-weight: 750;
  }

  .freshness-chip {
    width: auto;
    min-width: 70px;
    padding-inline: 6px;
  }

  .rail-mobile-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
  }

  .rail-mobile-controls span {
    min-width: 42px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
  }

  .rail-mobile-controls .icon-button {
    width: 36px;
    min-height: 36px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 12px;
  }

  .hero-actions button {
    width: 100%;
    padding-inline: 8px;
    font-size: 11px;
  }

  .quick-compare-grid {
    grid-template-columns: 1fr;
  }

  .quick-compare-grid > article {
    grid-template-columns: 92px minmax(0, 1fr);
    padding-right: 40px;
  }

  .quick-compare-grid > article > img {
    width: 92px;
    height: 82px;
  }

  .quick-compare-grid .table-state {
    grid-column: 2;
    justify-self: start;
  }

  .quick-compare-grid dl {
    grid-template-columns: 1fr;
  }

  .route-window-strip {
    grid-auto-columns: 90%;
  }

  .price-window-head b {
    font-size: 14px;
  }

  .price-window-head span,
  .price-window-card > small,
  .window-note,
  .price-window-links a,
  .price-term-lines dt,
  .price-term-lines dd {
    font-size: 11px;
  }

  .price-window-card p {
    font-size: 12px;
  }

  .price-window-card > em {
    font-size: 10px;
  }

  .route-select em,
  .route-select small,
  .day-reel-label em,
  .day-select small,
  .budget-bars li,
  .decision-radar li,
  .risk-controls button,
  #riskAdvice,
  .route-fit p,
  .media-card-copy > small,
  .media-byline {
    font-size: 12px;
  }
}

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

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