/* Layout: a boarding-pass header, three 29-night strips that compare the routes at a glance, then a timetable-style night-by-night list per option. */
:root {
  --paper: #ECF1ED;  --sheet: #F8FAF7;  --ink: #15262B;  --ink-2: #4C5F5B;  --rule: #C6D2CB;
  --accent: #0D5868; --accent-ink: #F8FAF7;
  --th: #C27F14; --th-t: #F3DDB0; --vn: #BC3A28; --vn-t: #F1CEC6; --kh: #4447A3; --kh-t: #D8D9F2;
  --la: #217D5C; --la-t: #CAE6D8; --ph: #0E8294; --ph-t: #C4E6EB;
  --ok: #217D4A; --warn: #8F5B00; --bad: #B3261E;
  --f-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", sans-serif;
  --f-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --s-1: .8125rem; --s0: 1.0625rem; --s1: 1.25rem; --s2: 1.6rem; --s3: 2.1rem; --s4: clamp(2.5rem, 7vw, 4rem);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0E1614; --sheet: #15201D; --ink: #E1EAE5; --ink-2: #9AADA6; --rule: #2A3833;
    --accent: #7FCADA; --accent-ink: #0E1614;
    --th: #E6A53D; --th-t: #46330F; --vn: #E36551; --vn-t: #4A1E17; --kh: #8F93EF; --kh-t: #25274E;
    --la: #4FBC8F; --la-t: #16392C; --ph: #3BB9CB; --ph-t: #0E3940;
    --ok: #62C78C; --warn: #E3AC4F; --bad: #F2796D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0E1614; --sheet: #15201D; --ink: #E1EAE5; --ink-2: #9AADA6; --rule: #2A3833;
  --accent: #7FCADA; --accent-ink: #0E1614;
  --th: #E6A53D; --th-t: #46330F; --vn: #E36551; --vn-t: #4A1E17; --kh: #8F93EF; --kh-t: #25274E;
  --la: #4FBC8F; --la-t: #16392C; --ph: #3BB9CB; --ph-t: #0E3940;
  --ok: #62C78C; --warn: #E3AC4F; --bad: #F2796D;
  color-scheme: dark;
}
body { background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: var(--s0); line-height: 1.55; }
.wrap { max-width: 70rem; margin: 0 auto; padding-inline: clamp(16px, 4vw, 40px); padding-block: 2rem 4rem; display: grid; gap: 3.5rem; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.1; text-wrap: balance; margin: 0; }
h2 { font-size: var(--s3); text-transform: uppercase; letter-spacing: .03em; }
h3 { font-size: var(--s2); }
p { margin: 0; }
a { color: var(--accent); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.num, .mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.eyebrow { font-family: var(--f-mono); font-size: var(--s-1); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.sec { display: grid; gap: 1.25rem; min-width: 0; }
.sec > .intro { max-width: 62ch; color: var(--ink-2); }
.sub { font-size: var(--s1); text-transform: uppercase; letter-spacing: .04em; margin-top: .5rem; }

/* header */
.top { display: grid; gap: 1.25rem; }
.top h1 { font-size: var(--s4); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; }
.lede { font-size: var(--s1); max-width: 58ch; }
.pass { background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; display: grid; grid-template-columns: 1fr; }
.leg { display: grid; grid-template-columns: 5.5rem 1fr; gap: .25rem 1rem; padding: .9rem 1.1rem; align-items: baseline; }
.leg + .leg { border-top: 2px dashed var(--rule); }
.leg .k { font-family: var(--f-mono); font-size: var(--s-1); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.leg .r { font-family: var(--f-display); font-size: var(--s2); font-weight: 600; letter-spacing: .02em; }
.leg .r .via { color: var(--ink-2); font-weight: 500; }
.leg .t { grid-column: 2; font-family: var(--f-mono); font-size: var(--s-1); color: var(--ink-2); }
.facts { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-family: var(--f-mono); font-size: var(--s-1); color: var(--ink-2); }
.facts b { color: var(--ink); font-weight: 500; }

/* core list */
.core { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1.5rem 2rem; }
.core li { display: grid; gap: .4rem; align-content: start; padding-top: .8rem; border-top: 2px solid var(--ink); min-width: 0; }
.core-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .25rem 1rem; }
.core-h h4 { font-size: var(--s1); }
.core-g { font-family: var(--f-mono); font-size: var(--s-1); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 2rem 0 .9rem; }
.core-g:first-of-type { margin-top: 0; }
.core-n { font-family: var(--f-mono); font-size: var(--s-1); color: var(--accent); }
.core p { font-size: .96rem; color: var(--ink-2); }

/* strips */
.board { display: grid; gap: .6rem; min-width: 0; }
.srow, .ruler-row { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr); gap: .75rem; align-items: stretch; }
.slabel { font-family: var(--f-display); font-size: var(--s2); font-weight: 700; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); text-align: left; }
.slabel:hover { color: var(--accent); }
.strip, .ruler, .marks { display: grid; grid-template-columns: repeat(29, minmax(0, 1fr)); gap: 2px; min-width: 0; }
.seg { display: flex; flex-direction: column; justify-content: space-between; gap: .15rem; min-width: 0; min-height: 3.4rem; padding: .3rem .35rem .25rem; border-top: 5px solid; border-radius: 0 0 3px 3px; color: var(--ink); overflow: hidden; }
.seg b { font-family: var(--f-display); font-weight: 600; font-size: .95rem; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seg i { font-style: normal; font-family: var(--f-mono); font-size: .72rem; color: var(--ink-2); }
.seg.w1 b { font-size: .72rem; text-overflow: clip; }
.c-th { --c: var(--th); --t: var(--th-t); } .c-vn { --c: var(--vn); --t: var(--vn-t); } .c-kh { --c: var(--kh); --t: var(--kh-t); }
.c-la { --c: var(--la); --t: var(--la-t); } .c-ph { --c: var(--ph); --t: var(--ph-t); }
.seg { background: var(--t); border-top-color: var(--c); }
.ruler span { font-family: var(--f-mono); font-size: .72rem; color: var(--ink-2); white-space: nowrap; border-left: 1px solid var(--rule); padding-left: .25rem; }
.ruler .end { grid-column: 29 / span 1; border-left: 0; justify-self: end; padding-left: 0; }
.marks span { font-family: var(--f-mono); font-size: .72rem; color: var(--ink-2); white-space: nowrap; display: flex; align-items: center; gap: .3rem; }
.moon { width: .7rem; height: .7rem; border-radius: 50%; background: var(--th); flex: none; }
.tet { width: .65rem; height: .65rem; background: var(--vn); transform: rotate(45deg); flex: none; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; font-family: var(--f-mono); font-size: var(--s-1); color: var(--ink-2); padding-left: 3.25rem; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.sw { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; background: var(--c); flex: none; }

/* option cards */
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 1.25rem; }
.opt { display: grid; gap: .8rem; align-content: start; padding: 1.1rem 1.1rem 1.2rem; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; min-width: 0; }
.opt.is-rec { border: 2px solid var(--ink); }
.opt-h { display: grid; grid-template-columns: auto 1fr; gap: .8rem; align-items: start; }
.opt-letter { font-family: var(--f-display); font-weight: 700; font-size: 2.6rem; line-height: .85; }
.opt-h h3 { font-size: var(--s2); }
.rec-pill { display: inline-block; font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; background: var(--ink); color: var(--paper); padding: .15rem .45rem; border-radius: 3px; margin-bottom: .35rem; }
.opt-for { font-size: .97rem; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chip { font-family: var(--f-mono); font-size: .72rem; padding: .12rem .45rem; border-radius: 3px; background: var(--t); border-left: 3px solid var(--c); }
.stats { font-family: var(--f-mono); font-size: var(--s-1); color: var(--ink-2); }
.route { list-style: none; margin: 0; padding: .7rem 0 0; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-family: var(--f-display); font-size: 1.05rem; font-weight: 500; }
.route li { display: inline-flex; align-items: center; gap: .35rem; }
.route .num { font-size: .8rem; color: var(--ink-2); }
.open-btn { justify-self: start; background: none; border: 1px solid var(--ink); border-radius: 4px; padding: .4rem .8rem; cursor: pointer; font-family: var(--f-mono); font-size: var(--s-1); }
.open-btn:hover { background: var(--ink); color: var(--paper); }

/* recommendation */
.rec { font-size: var(--s1); line-height: 1.5; max-width: 65ch; padding-left: 1.1rem; border-left: 4px solid var(--ink); }

/* tabs + panels */
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; border-bottom: 2px solid var(--ink); }
.tabs [role="tab"] { background: none; border: 0; border-bottom: 4px solid transparent; margin-bottom: -2px; padding: .5rem .8rem .55rem; cursor: pointer; font-family: var(--f-display); font-size: 1.15rem; font-weight: 500; color: var(--ink-2); text-align: left; }
.tabs [role="tab"] span { font-weight: 700; margin-right: .2rem; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.panel { display: grid; gap: 1.25rem; padding-top: 1.25rem; min-width: 0; }
.pitch { font-size: var(--s1); max-width: 65ch; }
.ret { font-family: var(--f-mono); font-size: var(--s-1); color: var(--ink-2); }
.ret span, .n-move span, .n-sleep span { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-right: .35rem; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1rem 2.5rem; }
.two > div { min-width: 0; }
.list { margin: .5rem 0 0; padding-left: 1.1rem; display: grid; gap: .45rem; }
.list.tight { margin: 0; gap: .3rem; }
.list li { padding-left: .2rem; max-width: 70ch; }
.list li::marker { color: var(--ink-2); }

/* night-by-night */
.days { display: grid; gap: 1.5rem; }
.grp { display: grid; gap: 0; }
.grp-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; padding-bottom: .4rem; border-bottom: 2px solid var(--c); }
.grp-h h4 { font-size: var(--s2); text-transform: uppercase; letter-spacing: .02em; }
.grp-meta { font-family: var(--f-mono); font-size: var(--s-1); color: var(--ink-2); }
.night { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .3rem 1.25rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 1rem; }
.n-date { display: grid; gap: .1rem; align-content: start; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.n-num { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.n-day { font-size: .95rem; font-weight: 500; }
.n-body { display: grid; gap: .45rem; min-width: 0; }
.n-sleep { font-family: var(--f-display); font-size: 1.2rem; font-weight: 600; line-height: 1.2; }
.n-sleep small { font-family: var(--f-body); font-size: .9rem; font-weight: 400; color: var(--ink-2); }
.n-plan { max-width: 70ch; }
.n-move { font-family: var(--f-mono); font-size: .8rem; line-height: 1.5; color: var(--ink-2); max-width: 80ch; }

/* tables, legs */
.tbl { overflow-x: auto; border: 1px solid var(--rule); border-radius: 6px; background: var(--sheet); }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: .6rem .8rem; border-bottom: 1px solid var(--rule); }
th { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
.legs { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; gap: .45rem; }
.legs li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .8rem; font-size: .93rem; align-items: baseline; }
.st { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; padding: .1rem .4rem; border-radius: 3px; border: 1px solid; justify-self: start; }
.st-ok { color: var(--ok); } .st-warn { color: var(--warn); } .st-bad { color: var(--bad); }

/* before you go */
.tl { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.tl > li { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: .4rem 1.5rem; padding: 1rem 0; border-top: 1px solid var(--rule); }
.tl-when { font-family: var(--f-display); font-size: var(--s1); font-weight: 600; }
.pgroups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1.25rem 2.5rem; }
.pgroup { min-width: 0; }
.howto { margin: 0; padding-left: 1.3rem; display: grid; gap: .5rem; max-width: 68ch; }
.howto li::marker { font-family: var(--f-mono); color: var(--ink-2); }
.note { background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; padding: 1rem 1.1rem; max-width: 70ch; }
details { border-top: 1px solid var(--rule); padding-top: .8rem; }
summary { cursor: pointer; font-family: var(--f-display); font-size: var(--s1); font-weight: 600; }
details .list { margin-top: .8rem; }
.foot { font-family: var(--f-mono); font-size: var(--s-1); color: var(--ink-2); border-top: 2px solid var(--ink); padding-top: 1rem; display: grid; gap: .4rem; max-width: 80ch; }

@media (max-width: 640px) {
  .srow, .ruler-row { grid-template-columns: 1.6rem minmax(0, 1fr); gap: .4rem; }
  .slabel { font-size: 1.25rem; }
  .legend { padding-left: 0; }
  .seg { min-height: 2.6rem; padding: .2rem .15rem; }
  .seg b { font-size: .72rem; }
  .seg.w1 b, .seg.w2 b { display: none; }
  .seg i { font-size: .62rem; }
  .ruler span, .marks span { font-size: .62rem; }
  .marks .lbl { display: none; }
  .night { grid-template-columns: 1fr; }
  .n-date { grid-auto-flow: column; justify-content: start; gap: .6rem; align-items: baseline; }
  .tl > li { grid-template-columns: 1fr; }
  .legs li { grid-template-columns: 1fr; gap: .2rem; }
  .leg { grid-template-columns: 1fr; }
  .leg .t { grid-column: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .open-btn, .slabel, .tabs [role="tab"] { transition: color .15s, background-color .15s, border-color .15s; }
}

/* ---- standalone site additions: page shell, photo hero, stops, lightbox ---- */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { display: block; max-width: 100%; }
.wrap-main { display: contents; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem .8rem; z-index: 10; }
.skip:focus { left: 1rem; }
.nav { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; font-family: var(--f-mono); font-size: var(--s-1); padding: .7rem 0 0; border-top: 1px solid var(--rule); }
.nav a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.hero { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.hero li { min-width: 0; }
.hero a { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: var(--rule); color: #fff; text-decoration: none; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.hero span { position: absolute; inset: auto 0 0 0; padding: 2.2rem .7rem .55rem; font-family: var(--f-display); font-size: 1.15rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; background: linear-gradient(to top, rgba(8, 14, 12, .82), rgba(8, 14, 12, 0)); }
.hero small { display: block; font-family: var(--f-mono); font-size: .68rem; font-weight: 400; letter-spacing: .04em; text-transform: none; opacity: .9; }

.seg { text-decoration: none; }
a.seg:hover b { text-decoration: underline; }
.core-h h4 a { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule); }
.core-h h4 a:hover { border-bottom-color: var(--accent); }

.stop-filter { display: flex; flex-wrap: wrap; gap: .4rem; }
.stop-filter button { font-family: var(--f-mono); font-size: var(--s-1); padding: .35rem .8rem; border: 1px solid var(--ink); border-radius: 999px; background: none; cursor: pointer; }
.stop-filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.stop-filter button:hover { border-color: var(--accent); }
.stops { display: grid; gap: 2.75rem; }
.stop { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.25rem 2.25rem; align-items: start; padding-top: 1.1rem; border-top: 3px solid var(--c); scroll-margin-top: 1rem; }
.stop[hidden] { display: none; }
.stop-media { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; min-width: 0; }
.ph { margin: 0; min-width: 0; position: relative; }
.ph-main { grid-column: 1 / -1; }
.ph button { display: block; width: 100%; padding: 0; border: 0; background: var(--rule); cursor: zoom-in; border-radius: 4px; overflow: hidden; aspect-ratio: 3 / 2; }
.ph-wide button { aspect-ratio: 5 / 2; }
.n2 .ph:not(.ph-main) { grid-column: 1 / -1; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph figcaption { font-family: var(--f-mono); font-size: .72rem; color: var(--ink-2); padding-top: .3rem; line-height: 1.35; }
.stop-body { display: grid; gap: .65rem; align-content: start; min-width: 0; }
.stop-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; font-family: var(--f-mono); font-size: .75rem; color: var(--ink-2); }
.stop-num { font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.stop-num:empty { display: none; }
.stop h3 { font-size: var(--s3); text-transform: uppercase; letter-spacing: .01em; }
.stop-when { font-family: var(--f-mono); font-size: var(--s-1); color: var(--ink-2); line-height: 1.45; }
.stop-why { font-size: 1.12rem; line-height: 1.55; max-width: 46ch; }
.stop-credit { font-family: var(--f-mono); font-size: .7rem; line-height: 1.5; color: var(--ink-2); }
.stop-credit a { color: var(--ink-2); }
.opt-chips { display: inline-flex; gap: .25rem; }
.opt-chips b { font-family: var(--f-display); font-size: .9rem; font-weight: 700; border: 1px solid var(--ink-2); border-radius: 3px; padding: 0 .35rem; color: var(--ink); }

.grp-h .thumb { width: 3.2rem; height: 2.4rem; border-radius: 3px; overflow: hidden; align-self: center; flex: none; }
.grp-h .thumb img { width: 100%; height: 100%; object-fit: cover; }
.grp-h a.go { font-family: var(--f-mono); font-size: .72rem; }

.credits { margin: .8rem 0 0; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .85rem; color: var(--ink-2); }
.credits a { color: var(--ink-2); }

.lb { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; margin: 0; }
.lb::backdrop { background: rgba(6, 10, 9, .92); }
.lb-in { width: 100%; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: .6rem; padding: 3.2rem clamp(8px, 3vw, 32px) 1rem; box-sizing: border-box; }
.lb img { width: 100%; height: 100%; object-fit: contain; }
.lb p { margin: 0; color: #E1EAE5; font-family: var(--f-mono); font-size: .8rem; text-align: center; line-height: 1.5; }
.lb p a { color: #9ED8E4; }
.lb-btn { position: absolute; top: .6rem; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 4px; width: 2.6rem; height: 2.6rem; font-size: 1.3rem; cursor: pointer; }
.lb-close { right: .6rem; }
.lb-prev { left: .6rem; }
.lb-next { left: 3.6rem; }

@media (max-width: 860px) {
  .stop { grid-template-columns: 1fr; }
  .stop-why { max-width: none; }
}
@media (max-width: 640px) {
  .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero a { aspect-ratio: 1 / 1; }
  .stop h3 { font-size: var(--s2); }
  .grp-h .thumb { display: none; }
}
