.itinerary-page {
  --case-white: rgba(255, 255, 255, .9);
  --case-rule: rgba(255, 255, 255, .55);
  color: var(--case-white);
  overflow-x: clip;
}
html { scroll-behavior: smooth; }
.itinerary-page main a:hover, .case-nav a:hover, .skip-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: .2em; }
.itinerary-page a:focus-visible, .itinerary-page summary:focus-visible { outline: 1px solid currentColor; outline-offset: 7px; }
.skip-link { position: fixed; top: 12px; left: 15px; padding: 12px; background: #217aff; z-index: 20; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.reading-progress { position: fixed; inset: 0 auto auto 0; height: 2px; width: 100%; background: currentColor; transform: scaleX(0); transform-origin: left; z-index: 12; }
.ambient-field { position: fixed; inset: -30vh -20vw; background: radial-gradient(ellipse at 75% 35%, rgba(192, 223, 255, .09), transparent 55%); pointer-events: none; z-index: 0; }
.case-header, #main-content { position: relative; z-index: 1; }
.case-header { padding: 14px 15px; }
.header-detail { display: flex; align-items: center; gap: 30px; }
.hero { min-height: calc(100svh - 49px); padding: 44px 15px 104px; display: flex; flex-direction: column; justify-content: space-between; gap: 36px; }
.eyebrow { font-size: 21px; line-height: 1.3; margin: 0; }
.hero h1 { font-size: clamp(76px, 7.8vw, 142px); line-height: 1.04; font-weight: 300; letter-spacing: -.025em; margin: 0; }
/* Reserve the longest watermark's width so its right edge matches the header dot. */
.hero-heading { display: grid; grid-template-columns: minmax(0, 1fr) 375.233px; gap: 20px; align-items: center; }
.hero-bottom { display: block; }
.hero-intro { font-size: clamp(26px, 2.6vw, 42px); line-height: 1.3; margin: 0; }
.hero-brand { display: block; width: 220px; max-width: 100%; height: auto; flex-shrink: 0; justify-self: start; }
.application-case { border-top: 1px solid var(--case-rule); padding-top: 20px; }
.application-case h3 { font-size: 28px; line-height: 1.35; font-weight: 300; margin: 0; }
.application-case p { margin-top: 20px; }
.scroll-invitation { display: flex; gap: 40px; width: fit-content; font-size: 21px; }
.scroll-invitation span { display: inline-block; transform: translateY(0); transition: transform .6s ease; }
.scroll-invitation:hover span { transform: translateY(5px); }
.chapter { display: grid; grid-template-columns: 1fr 1fr; column-gap: 8vw; padding: 30px 15px 140px; border-top: 1px solid var(--case-rule); min-height: 90vh; scroll-margin-top: 20px; }
.chapter-heading { align-self: start; position: sticky; top: 42px; padding-bottom: 40px; }
.chapter h2 { font-weight: 300; font-size: clamp(44px, 4.8vw, 84px); line-height: 1.12; letter-spacing: -.015em; margin: 28px 0 0; }
.chapter-content { min-width: 0; }
.chapter-content > * + * { margin-top: 42px; }
.chapter-content p { font-size: 24px; line-height: 1.45; margin-bottom: 0; }
.chapter-content > p:first-child { margin-top: 0; }
.chapter-content .lead { font-size: clamp(28px, 2.3vw, 40px); line-height: 1.3; margin-top: 0; }
figure { margin-left: 0; margin-right: 0; }
figcaption { font-size: 21px; line-height: 1.4; }
.itinerary-route { display: block; width: 100%; overflow: visible; }
.route-guide, .route-flow { fill: none; stroke: currentColor; stroke-width: 1.5; }
.route-guide { opacity: .25; }
.route-flow { opacity: .8; }
.route-node circle { fill: #217aff; stroke: currentColor; stroke-width: 1.5; }
.route-node text { fill: currentColor; text-anchor: middle; font-size: 30px; }
.route-node.unknown circle { stroke-dasharray: 3 4; }
.route-label { fill: currentColor; text-anchor: middle; font-size: 24px; }
#flow-marker { fill: currentColor; display: none; }
[data-motion="on"] #flow-marker { display: block; }
.itinerary-figure figcaption { margin-top: 24px; }
.dataset-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.dataset-numbers div, .result-numbers div { border-top: 1px solid var(--case-rule); padding-top: 12px; min-width: 0; }
dt { font-size: 21px; line-height: 1.4; }
dd { font-size: clamp(28px, 3.5vw, 55px); letter-spacing: -.015em; margin: 10px 0 0; }
details { border-top: 1px solid var(--case-rule); }
summary { cursor: pointer; list-style: none; font-size: 24px; line-height: 1.35; padding: 16px 36px 16px 0; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; top: 16px; right: 0; }
details[open] > summary::after { content: '−'; }
details p { padding: 8px 0 24px; margin-top: 0; }
.experts summary { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.experts summary span:last-child { font-size: 21px; }
.model-steps { list-style: none; counter-reset: model; padding: 0; }
.model-steps li { counter-increment: model; border-top: 1px solid var(--case-rule); padding: 16px 0 28px 48px; position: relative; }
.model-steps li::before { content: counter(model, decimal-leading-zero); position: absolute; left: 0; top: 17px; font-size: 21px; }
.model-steps li > span { font-size: 28px; line-height: 1.3; }
.model-steps p { margin-top: 14px; }
.mixture { border-top: 1px solid var(--case-rule); padding-top: 24px; }
.chapter-content .mixture-equation { font-size: clamp(28px, 2.7vw, 44px); margin-top: 0; }
.weight-row { display: grid; grid-template-columns: 1fr auto; row-gap: 12px; margin-top: 24px; font-size: 24px; }
.weight-track { grid-column: 1 / -1; height: 6px; background: rgba(255, 255, 255, .13); }
.weight-track span { display: block; width: var(--weight); height: 100%; background: currentColor; }
.weight-lag { --weight: 50%; }
.weight-gru { --weight: 48.36%; }
.weight-other { --weight: 1.64%; }
.weight-figure > p { margin-top: 28px; }
.fold-grid { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; font-size: 21px; margin-top: 22px; }
.fold-grid span { padding: 16px 6px; border-bottom: 1px solid var(--case-rule); text-align: center; }
.fold-grid span:nth-child(4n + 1) { text-align: left; }
.results-table { width: 100%; border-collapse: collapse; font-size: 24px; line-height: 1.3; }
.results-table caption { text-align: left; font-size: 21px; line-height: 1.4; margin-bottom: 20px; }
.results-table th { font-weight: 300; text-align: left; }
.results-table td, .results-table th { border-bottom: 1px solid var(--case-rule); padding: 18px 12px 18px 0; vertical-align: top; }
.results-table thead th { font-size: 21px; }
.results-table th span { display: block; margin-top: 6px; font-size: 21px; }
.results-table td { white-space: nowrap; }
.chapter-content .gain-value { font-size: clamp(28px, 2.5vw, 44px); line-height: 1.25; margin: 20px 0 0; }
.gain-plot { position: relative; height: 100px; margin-top: 30px; }
.gain-axis { height: 1px; width: 100%; position: absolute; top: 30px; background: rgba(255, 255, 255, .4); }
.gain-interval { position: absolute; top: 29px; left: 51.3642770848%; width: 18.6332452957%; height: 3px; background: currentColor; }
.gain-interval::before, .gain-interval::after { content: ''; width: 1px; height: 20px; position: absolute; top: -9px; background: currentColor; }
.gain-interval::before { left: 0; }
.gain-interval::after { right: 0; }
.gain-point { position: absolute; left: 60.4285188645%; top: 25px; width: 11px; height: 11px; border-radius: 50%; background: currentColor; transform: translateX(-50%); }
.gain-ticks { display: flex; justify-content: space-between; position: absolute; top: 60px; width: 100%; font-size: 21px; }
.source-links { list-style: none; padding: 0; font-size: 24px; line-height: 1.4; }
.source-links li { padding: 14px 0; border-top: 1px solid var(--case-rule); }
.references { border-top: 1px solid var(--case-rule); padding-top: 16px; }
.references p { margin-top: 20px; }
.references p:first-child { margin-top: 0; }
.chapter-content .closing { font-size: clamp(28px, 2.8vw, 46px); line-height: 1.3; margin-top: 70px; }
.case-nav { position: fixed; bottom: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 20px 15px 12px; font-size: 21px; background: linear-gradient(transparent, #217aff 35%); z-index: 10; }
.chapter-links { display: flex; gap: clamp(16px, 2vw, 34px); }
.case-nav a { transition: opacity .4s ease; opacity: .6; }
.case-nav a[aria-current="location"] { opacity: 1; text-decoration: underline; text-underline-offset: .25em; }
.chapter-position { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mobile-summary { display: none; }
[data-motion="on"] .reveal { opacity: 0; transform: translateY(24px); transition: opacity 1.15s ease, transform 1.15s cubic-bezier(.2, .7, .2, 1); }
[data-motion="on"] .reveal.is-visible { opacity: 1; transform: translateY(0); }
[data-motion="on"] .chapter-heading { transform: none; }

@media (min-width: 701px) and (max-width: 1000px) {
  .chapter { column-gap: 4vw; grid-template-columns: .9fr 1.1fr; }
  .chapter h2 { font-size: 46px; }
  .chapter-content .lead { font-size: 30px; }
  .chapter-content p { font-size: 24px; }
  .experts summary { grid-template-columns: 1fr; gap: 6px; }
  .fold-grid, .results-table, .results-table thead th, .results-table th span { font-size: 18px; }
  .chapter-links { gap: 16px; }
  .case-nav { font-size: 18px; }
  .chapter-position { display: none; }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .hero-heading { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .hero-heading h1 { grid-column: 1; grid-row: 2; }
  .hero-brand { grid-column: 1; grid-row: 1; }
}
@media (max-width: 700px) {
  html { scroll-behavior: auto; }
  .desktop-story, .case-nav, .reading-progress, .ambient-field { display: none; }
  .case-header { padding: 13px 12px; }
  .header-detail > span:first-child { display: none; }
  .mobile-summary { display: block; padding: 35px 12px 35px; }
  .mobile-summary h1 { font-size: clamp(55px, 15vw, 96px); font-weight: 300; line-height: 1.06; letter-spacing: -.025em; margin: 28px 0 0; }
  .mobile-summary p { font-size: 24px; line-height: 1.4; margin: 16px 0 0; }
  .mobile-summary .eyebrow { font-size: 20px; margin: 0; }
  .mobile-summary .mobile-intro { font-size: 28px; }
  .desktop-note { border-top: 1px solid var(--case-rule); padding: 26px 0 0; margin: 42px 0 0; }
  .mobile-summary .desktop-note p { font-size: 18px; margin: 0; }
  .mobile-summary section { margin-top: 42px; }
  .mobile-summary h2 { font-size: 21px; line-height: 1.3; font-weight: 300; text-transform: uppercase; margin: 0; padding-top: 10px; border-top: 1px solid var(--case-rule); }
  .mobile-summary details { margin-top: 16px; }
  .mobile-summary details p { padding: 0; }
  .mobile-summary details summary + p { margin-top: 0; }
  .mobile-summary .source-links li { padding: 16px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .itinerary-page *, .itinerary-page *::before, .itinerary-page *::after { transition: none !important; animation: none !important; }
  .itinerary-page .reveal { opacity: 1; transform: none; }
  #flow-marker { display: none; }
}
