/* ==========================================================================
   Kip. — a field guide to sleeping in the United Kingdom
   Day edition = paper & ink. Night edition = sleeper-train navy.
   ========================================================================== */

:root {
  --paper: #f1ebdd;
  --paper-2: #e6ddca;
  --card: #fbf8f1;
  --ink: #1a1712;
  --ink-2: #554d40;
  --ink-3: #8b8170;
  --rule-soft: #d3c8b2;
  --red: #c4361f;
  --green: #2c5a43;
  --mustard: #c08a12;
  --land: #e3d9c3;
  --land-2: #ebe4d4;
  --grat: #c9bea7;
  --shadow: rgba(46, 33, 12, .45);
  --board: #15120e;

  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace;
  --line-w: 1.5px;
  --tb-h: 118px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #10141f;
    --paper-2: #181e2d;
    --card: #1a2131;
    --ink: #eee5d1;
    --ink-2: #bdb39e;
    --ink-3: #847d70;
    --rule-soft: #2c3447;
    --red: #ff6b4f;
    --green: #74c39b;
    --mustard: #f0b93a;
    --land: #222a3d;
    --land-2: #191f2e;
    --grat: #2a3246;
    --shadow: rgba(0, 0, 0, .6);
    --board: #070a10;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #10141f;
  --paper-2: #181e2d;
  --card: #1a2131;
  --ink: #eee5d1;
  --ink-2: #bdb39e;
  --ink-3: #847d70;
  --rule-soft: #2c3447;
  --red: #ff6b4f;
  --green: #74c39b;
  --mustard: #f0b93a;
  --land: #222a3d;
  --land-2: #191f2e;
  --grat: #2a3246;
  --shadow: rgba(0, 0, 0, .6);
  --board: #070a10;
  color-scheme: dark;
}

/* cover colours (--ed) are dark inks: on the night edition, small text set in them is lifted towards the paper colour */
:root[data-theme="dark"] .cv-title small, :root[data-theme="dark"] .mc-title,
:root[data-theme="dark"] .cover:hover .cv-go { color: color-mix(in srgb, var(--ed) 55%, var(--ink)); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cv-title small, :root:not([data-theme="light"]) .mc-title,
  :root:not([data-theme="light"]) .cover:hover .cv-go { color: color-mix(in srgb, var(--ed) 55%, var(--ink)); }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--mast-h, 0px) + var(--tb-h) + 16px); }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before { /* paper grain */
  content: "";
  position: fixed; inset: 0; z-index: 100; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.28 0 0 0 0 0.16 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::before { opacity: .25; mix-blend-mode: screen; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { opacity: .25; mix-blend-mode: screen; } }

img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2.5px solid var(--red); outline-offset: 2px; }
.mono { font-family: var(--mono); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: clamp(16px, 3vw, 40px); }
.ic { width: 18px; height: 18px; flex: none; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; z-index: 200; }
.skip:focus { top: 12px; }

/* ---------- masthead (sticks to the top; only the thin strip scrolls away) ---------- */
.mast { position: sticky; top: calc(var(--strip-h, 31px) * -1); z-index: 60; background: var(--paper); }
.mast-strip {
  display: flex; align-items: center; gap: 28px;
  padding: 7px clamp(16px, 3vw, 40px);
  border-bottom: 1px solid var(--ink);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2);
}
.theme-toggle {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink);
}
.theme-toggle .ic { width: 15px; height: 15px; }
.theme-toggle .ic-sun, :root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .ic-moon { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .ic-sun { display: block; }
}
.mast-main {
  /* the middle track takes the pills' full width when it fits, otherwise whatever is left (and the pills scroll) */
  display: grid; grid-template-columns: 1fr minmax(0, max-content) 1fr; align-items: center; gap: 10px clamp(12px, 1.7vw, 24px);
  padding-block: 10px; border-bottom: var(--line-w) solid var(--ink); background: var(--paper);
}
.mast-end { justify-self: end; }
.mast-main.wrap { max-width: none; }
.logo {
  font: 900 44px/1 var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  letter-spacing: -.045em; text-decoration: none;
}
.logo span, .foot-mark span { color: var(--red); }
/* Editions: the Atlas pill, then the flag pills filed by region (tiny timetable-style labels above each group).
   One row; when it is wider than the room it has, the pills scroll sideways behind soft edge fades. */
.editions-nav {
  width: max-content; max-width: 100%; min-width: 0;
  display: flex; align-items: center; gap: 2px;
  padding: 4px 4px 4px 4px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card);
  box-shadow: 4px 4px 0 var(--ink);
}
.editions-nav a {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; flex: none;
  font-size: 12px; font-weight: 600; letter-spacing: .05em; text-decoration: none; transition: background .15s, color .15s, transform .15s;
}
.editions-nav a:active { transform: scale(.96); }
.editions-nav a:hover { background: var(--paper-2); }
.editions-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.ed-atlas { height: 38px; padding: 0 12px 0 9px; border-right: 1.5px solid var(--rule-soft); }
.ed-atlas[aria-current="page"] { border-color: transparent; }
.editions-nav .flag {
  width: 20px; height: 15px; border-radius: 2.5px; object-fit: cover; flex: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ink) 25%, transparent);
}
.editions-nav a[aria-current="page"] .flag { box-shadow: 0 0 0 1.5px var(--paper); }
.editions-nav .ed-globe { width: 20px; height: 20px; color: var(--red); }
.editions-nav a[aria-current="page"] .ed-globe { color: var(--paper); }
.ed-track { position: relative; flex: 1 1 auto; min-width: 0; }
.ed-scroll {
  --fade-l: 0px; --fade-r: 0px;
  position: relative; display: flex; align-items: flex-end; justify-content: safe center;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-padding-inline: 40px;
  padding-right: 10px;
  -webkit-mask: linear-gradient(90deg, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
          mask: linear-gradient(90deg, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent);
}
.ed-scroll::-webkit-scrollbar { display: none; }
.ed-track.more-start .ed-scroll { --fade-l: 44px; }
.ed-track.more-end .ed-scroll { --fade-r: 44px; }
.ed-group { flex: none; display: grid; gap: 1px; padding: 0 3px 0 5px; }
.ed-group + .ed-group { border-left: 1.5px solid var(--rule-soft); }
.ed-region {
  display: flex; align-items: center; gap: 6px; padding-left: 7px; height: 11px;
  font-size: 8.5px; font-weight: 500; line-height: 1; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap;
}
.ed-region::after { content: ""; flex: 1; min-width: 12px; border-top: 1px dotted var(--ink-3); opacity: .7; }
.ed-pills { display: flex; gap: 1px; }
.ed-pills a { height: 26px; padding: 0 7px 0 4px; }
/* arrows over the fades, for mouse users (touch scrolls the row directly) */
.ed-nudge {
  position: absolute; bottom: 1px; z-index: 1; width: 26px; height: 26px; border-radius: 50%;
  display: none; place-items: center; background: var(--card); border: 1.5px solid var(--ink); color: var(--ink);
  transition: background .15s, color .15s;
}
.ed-nudge .ic { width: 14px; height: 14px; }
.ed-nudge--prev { left: 2px; } .ed-nudge--prev .ic { transform: scaleX(-1); }
.ed-nudge--next { right: 2px; }
.ed-nudge:hover { background: var(--ink); color: var(--paper); }
@media (hover: hover) and (pointer: fine) {
  .ed-track.more-start .ed-nudge--prev, .ed-track.more-end .ed-nudge--next { display: grid; }
}
.mast-nav { display: flex; gap: 4px; }
.mast-nav a {
  font: 600 14px var(--sans); font-variation-settings: "wdth" 90;
  text-decoration: none; padding: 6px 10px; text-transform: uppercase; letter-spacing: .06em;
}
.mast-nav a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.shortlist-btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 8px 0 14px; border: var(--line-w) solid var(--ink); border-radius: 999px;
  font-weight: 600; font-size: 14px;
}
.shortlist-btn b {
  min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center;
  background: var(--ink); color: var(--paper); font: 600 12px var(--mono);
}
.shortlist-btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.shortlist-btn[aria-pressed="true"] b { background: var(--red); color: #fff; }
.shortlist-btn.bump b { animation: bump .4s; }
@keyframes bump { 50% { transform: scale(1.35); } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px;
  font: 600 16px var(--sans); border: var(--line-w) solid var(--ink); border-radius: 2px;
  text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--red); }
.btn-line:hover { background: var(--card); transform: translate(-3px, -3px); box-shadow: 4px 4px 0 var(--ink); }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1.5px;
}
.link-btn .ic { width: 16px; height: 16px; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.22fr) minmax(0, .9fr);
  gap: clamp(28px, 5vw, 80px); align-items: center;
  padding-block: clamp(36px, 6vw, 84px) clamp(48px, 7vw, 100px);
}
.kicker {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 22px;
}
.route-dot { width: 46px; height: 12px; background: linear-gradient(var(--red), var(--red)) center / 100% 3px no-repeat; position: relative; }
.route-dot::before, .route-dot::after {
  content: ""; position: absolute; top: 0; width: 12px; height: 12px; border-radius: 50%;
  background: var(--paper); border: 3px solid var(--red);
}
.route-dot::before { left: 0; } .route-dot::after { right: 0; }
.hero h1 {
  font: 800 clamp(46px, 7.2vw, 116px)/.9 var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1;
  letter-spacing: -.03em; text-wrap: balance;
}
.hero h1.h1--long { font-size: clamp(42px, 6vw, 96px); } /* "Two hundred and fifty places to kip…" */
.hero h1 em {
  font-style: italic; font-weight: 700; color: var(--red);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}
.hero h1 sup { font: 500 .2em var(--mono); color: var(--ink-3); vertical-align: 2.6em; margin-left: .1em; }
.lede { font-size: clamp(17px, 1.45vw, 20px); line-height: 1.55; color: var(--ink-2); max-width: 54ch; margin-top: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.footnote {
  margin-top: 28px; padding-top: 10px; border-top: 1px solid var(--ink); max-width: 46ch;
  font: 400 14px/1.45 var(--serif); font-variation-settings: "opsz" 14; color: var(--ink-2);
}
.footnote sup { font-family: var(--mono); }

.board {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--board); color: #efe6d2; border-radius: 4px; margin-top: 30px; padding: 4px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.board > div { padding: 12px 14px 13px; border-right: 1px dashed rgba(239, 230, 210, .16); min-width: 0; }
.board > div:last-child { border-right: 0; }
.board dt { font: 500 10px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: #a0977f; }
.board dd { font: 600 clamp(18px, 1.7vw, 24px)/1.1 var(--mono); color: #f6b941; margin-top: 7px; letter-spacing: -.02em; text-shadow: 0 0 12px rgba(246, 185, 65, .35); white-space: nowrap; }
/* long fares (₩1,310,261 · ₫24,343,254 · NOK 12,403): --len = characters, so the figure shrinks to fit its cell */
.board > div { container-type: inline-size; }
.board dd { font-size: min(clamp(18px, 1.7vw, 24px), 100cqi / (var(--len, 1) * .6)); }
.board dd small { white-space: normal; }
.hero--atlas .board dd small { word-spacing: .15em; line-height: 1.45; }
.board dd small { display: block; font-size: 11px; font-weight: 400; letter-spacing: .02em; color: #d8cfbb; text-shadow: none; margin-top: 3px; }

/* postcards */
.postcards { position: relative; aspect-ratio: 1 / 1.04; min-height: 380px; }
.postcard {
  position: absolute; background: var(--card); padding: 12px; border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .04), 0 26px 50px -24px var(--shadow);
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), opacity .3s;
}
.postcard--back { top: 0; right: 0; width: 80%; aspect-ratio: 3 / 2; transform: rotate(5deg); }
.postcard--front { left: 0; top: 24%; width: 88%; transform: rotate(-3.5deg); z-index: 2; }
.postcards.is-dealing .postcard--front { transform: rotate(-9deg) translate(-30px, 20px); opacity: .0; }
.postcards.is-dealing .postcard--back { transform: rotate(9deg) translate(20px, -10px); }
.pc-photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.pc-photo img { width: 100%; height: 100%; object-fit: cover; }
.pc-caption { display: grid; padding: 12px 4px 4px; }
.pc-greet { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .2em; color: var(--ink-3); }
.pc-town {
  font: 700 italic clamp(30px, 3.4vw, 48px)/1 var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1; color: var(--red); letter-spacing: -.02em;
}
.pc-name { font-size: 12px; color: var(--ink-2); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-back {
  position: relative; height: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  padding: 10px; border: 1px solid var(--rule-soft);
  background: linear-gradient(var(--rule-soft), var(--rule-soft)) 50% 18% / 1px 70% no-repeat;
}
.pc-stamp {
  position: absolute; top: 10px; right: 10px; width: 90px; height: 99px; /* multiples of the 9px perforation */
  display: grid; place-content: center; text-align: center; gap: 4px;
  background: var(--red); color: #fff7ea;
  font: 700 20px/1 var(--mono); letter-spacing: -.03em;
  box-shadow: inset 0 0 0 6px var(--red), inset 0 0 0 7.5px rgba(255, 247, 234, .55);
  /* perforated edge: a grid of holes, with the middle filled back in */
  -webkit-mask: radial-gradient(circle at 4.5px 4.5px, #0000 3px, #000 3.6px) -4.5px -4.5px / 9px 9px,
                linear-gradient(#000 0 0) center / calc(100% - 9px) calc(100% - 9px) no-repeat;
          mask: radial-gradient(circle at 4.5px 4.5px, #0000 3px, #000 3.6px) -4.5px -4.5px / 9px 9px,
                linear-gradient(#000 0 0) center / calc(100% - 9px) calc(100% - 9px) no-repeat;
}
.pc-stamp small { font: 500 9px var(--mono); text-transform: uppercase; letter-spacing: .14em; }
.pc-cur { font: 600 11px/1 var(--mono); letter-spacing: .06em; }
.pc-fare { white-space: nowrap; font-size: min(20px, 68px / (var(--len, 4) * .6)); }
.pc-postmark {
  position: absolute; top: 34px; right: 78px; width: 92px; height: 92px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ink) 55%, transparent); color: color-mix(in srgb, var(--ink) 60%, transparent);
  display: grid; place-content: center; text-align: center; transform: rotate(-14deg);
  font: 600 9px var(--mono); letter-spacing: .12em;
}
.pc-postmark b { font-size: 15px; letter-spacing: .02em; border-block: 1.5px solid currentColor; padding: 2px 0; margin: 2px 0; }
.pc-note {
  grid-column: 1; align-self: start; margin-top: 26px;
  font: 400 italic 15px/1.45 var(--serif); font-variation-settings: "opsz" 14, "SOFT" 100; color: var(--ink-2);
}
.pc-lines { grid-column: 2; align-self: end; display: grid; gap: 4px; font: 500 12px var(--mono); padding-bottom: 6px; }
.pc-lines span { border-bottom: 1px solid var(--rule-soft); padding-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-shuffle {
  position: absolute; left: 0; top: 2%; display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em; padding: 8px 12px;
  border: var(--line-w) solid var(--ink); background: var(--paper); border-radius: 999px; z-index: 3;
}
.pc-shuffle:hover { background: var(--ink); color: var(--paper); }
.pc-shuffle .ic { width: 16px; height: 16px; }

/* ---------- section heads ---------- */
.sec-head {
  display: grid; grid-template-columns: 84px minmax(0, 1fr); align-items: baseline; column-gap: 12px;
  border-top: var(--line-w) solid var(--ink); padding-top: 18px; margin-bottom: 30px;
}
.sec-num { font-size: 13px; color: var(--red); letter-spacing: .06em; }
.sec-head h2 {
  font: 800 clamp(38px, 5vw, 68px)/.95 var(--serif);
  font-variation-settings: "opsz" 144, "SOFT" 0, "WONK" 1; letter-spacing: -.03em;
}
.sec-sub { grid-column: 2; color: var(--ink-2); max-width: 62ch; margin-top: 10px; font-size: 17px; }

/* ---------- lines ---------- */
.lines { padding-bottom: clamp(48px, 7vw, 96px); }
.line-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: var(--line-w) solid var(--ink); border-left: var(--line-w) solid var(--ink);
}
.line-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 216px; padding: 20px 20px 18px;
  border-right: var(--line-w) solid var(--ink); border-bottom: var(--line-w) solid var(--ink);
  text-decoration: none; transition: background .25s, color .25s;
}
.line-route {
  display: flex; justify-content: space-between; align-items: center; height: 14px; margin-bottom: 14px;
  background: linear-gradient(var(--line), var(--line)) center / 100% 4px no-repeat;
}
.line-route i { width: 14px; height: 14px; border-radius: 50%; background: var(--paper); border: 3.5px solid var(--line); transition: inherit; }
.line-code { position: absolute; top: 44px; right: 20px; font-size: 12px; color: var(--ink-3); }
.line-name { font: 700 26px/1.05 var(--serif); font-variation-settings: "opsz" 72, "SOFT" 20; letter-spacing: -.015em; max-width: 13ch; }
.line-blurb { color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.line-stops {
  margin-top: auto; display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
}
.line-stops .ic { width: 16px; height: 16px; transition: transform .2s; }
.line-card:hover, .line-card.is-on { background: var(--line); color: #fff8ec; }
.line-card:hover .line-blurb, .line-card:hover .line-code,
.line-card.is-on .line-blurb, .line-card.is-on .line-code { color: rgba(255, 248, 236, .82); }
.line-card:hover .line-route, .line-card.is-on .line-route { background-image: linear-gradient(#fff8ec, #fff8ec); }
.line-card:hover .line-route i, .line-card.is-on .line-route i { background: var(--line); border-color: #fff8ec; }
.line-card:hover .line-stops .ic { transform: translateX(5px); }
.line-card--all { --line: var(--ink); }
.line-card--all:hover { color: var(--paper); }
.line-card--all:hover .line-route { background-image: linear-gradient(var(--paper), var(--paper)); }
.line-card--all:hover .line-route i { border-color: var(--paper); }

/* ---------- explorer toolbar ---------- */
.explore-head .sec-head { margin-bottom: 18px; }
.toolbar {
  position: sticky; top: var(--mast-h, 0px); z-index: 40;
  background: var(--paper); border-block: var(--line-w) solid var(--ink);
}
.tb-row { display: flex; align-items: center; gap: 10px; padding-top: 10px; }
.search {
  flex: 1 1 260px; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 12px;
  border: var(--line-w) solid var(--ink); background: var(--card); border-radius: 2px;
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 15px; outline: none; }
.search input::placeholder { color: var(--ink-3); }
.search kbd { font-size: 11px; color: var(--ink-3); border: 1px solid var(--ink-3); border-radius: 3px; padding: 1px 6px; }

.price-filter {
  position: relative; flex: 0 0 230px; height: 46px; padding: 5px 10px 0;
  border: var(--line-w) solid var(--ink); background: var(--card); border-radius: 2px;
}
.pf-head { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.pf-head output { color: var(--ink); font-weight: 600; font-size: 12px; letter-spacing: 0; }
.pf-hist { position: absolute; left: 10px; right: 10px; bottom: 7px; height: 16px; display: flex; align-items: flex-end; gap: 2px; }
.pf-hist i { flex: 1; background: var(--ink-3); opacity: .35; min-height: 2px; transition: background .15s, opacity .15s; }
.pf-hist i.in { background: var(--red); opacity: 1; }
.price-filter input[type="range"] {
  position: absolute; left: 4px; right: 4px; bottom: -2px; width: calc(100% - 8px); height: 22px;
  margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: ew-resize;
}
.price-filter input[type="range"]::-webkit-slider-runnable-track { height: 22px; background: transparent; }
.price-filter input[type="range"]::-moz-range-track { height: 22px; background: transparent; }
.price-filter input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 12px; height: 22px; margin-top: 0; background: var(--ink);
  border: 2px solid var(--card); border-radius: 2px;
}
.price-filter input[type="range"]::-moz-range-thumb { width: 10px; height: 20px; background: var(--ink); border: 2px solid var(--card); border-radius: 2px; }

.select select {
  height: 46px; padding: 0 36px 0 12px; border: var(--line-w) solid var(--ink); border-radius: 2px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23c4361f' stroke-width='2'/%3E%3C/svg%3E") right 12px center no-repeat;
  -webkit-appearance: none; appearance: none; font-weight: 600; font-size: 14px; cursor: pointer;
}
.seg { display: flex; border: var(--line-w) solid var(--ink); border-radius: 2px; height: 46px; }
.seg button { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; font-weight: 600; font-size: 14px; }
.seg button + button { border-left: var(--line-w) solid var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.tb-chips {
  overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; gap: 6px;
  -webkit-mask: linear-gradient(90deg, #000 92%, transparent); mask: linear-gradient(90deg, #000 92%, transparent);
  padding-right: 48px;
}
.tb-chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px;
  border: var(--line-w) solid var(--ink); border-radius: 999px; font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: background .15s, color .15s;
}
.chip .ic { width: 15px; height: 15px; }
.chip small { font: 500 11px var(--mono); color: var(--ink-3); }
.chip:hover { background: var(--card); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] small { color: inherit; opacity: .7; }
.chip-sep { flex: none; width: 1px; height: 20px; background: var(--ink-3); margin: 0 6px; }

/* ---------- explorer body ---------- */
.explore-body {
  display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: clamp(20px, 2.6vw, 40px); padding-top: 22px; padding-bottom: clamp(56px, 8vw, 110px); align-items: start;
}
.map-col { position: sticky; top: calc(var(--mast-h, 0px) + var(--tb-h) + 18px); }
.map-details > summary { display: none; }
.map-wrap { position: relative; border: var(--line-w) solid var(--ink); background: var(--card); overflow: hidden; }
.map { display: block; width: 100%; height: auto; max-height: calc(100vh - var(--mast-h, 0px) - var(--tb-h) - 92px); margin-inline: auto; }
/* The SVG is 1000 units wide; --mk (set by app.js) = units per screen px, so text and dots keep a constant on-screen size. */
.map { --mk: 2.8; }
.map path, .map line, .map rect, .dots circle { vector-effect: non-scaling-stroke; }
.land-main { fill: var(--land); stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
.land-other { fill: var(--land-2); stroke: var(--ink-3); stroke-width: .6; }
.inset-bg { fill: var(--card); }
.inset-frame { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.inset-name { font: italic 400 calc(11px * var(--mk)) var(--serif); fill: var(--ink-2); }
.grat line { stroke: var(--grat); stroke-width: .8; stroke-dasharray: 2 5; }
.grat text { font: calc(9.5px * var(--mk)) var(--mono); fill: var(--ink-3); }
.ml-city {
  font: 600 calc(11.5px * var(--mk)) var(--sans); fill: var(--ink-2); letter-spacing: .02em;
  paint-order: stroke; stroke: var(--land); stroke-width: 3px; stroke-linejoin: round; pointer-events: none;
}
.ml-sea { font: italic 400 calc(12px * var(--mk)) var(--serif); fill: var(--ink-3); letter-spacing: .2em; text-anchor: middle; text-transform: uppercase; pointer-events: none; }
.dots circle {
  r: calc(3.3px * var(--mk)); fill: var(--red); stroke: var(--card); stroke-width: 1.3; cursor: pointer;
  transition: r .2s, opacity .25s, fill .25s;
}
.dots circle.off { fill: var(--ink-3); opacity: .25; }
.dots circle:hover, .dots circle.hot { r: calc(7px * var(--mk)); fill: var(--ink); stroke: var(--red); stroke-width: 3; opacity: 1; }
.map-furniture path, .map-furniture rect { fill: var(--ink); }
.map-furniture .sb-alt { fill: var(--card); stroke: var(--ink); stroke-width: 1; }
.map-furniture text { font-size: calc(10.5px * var(--mk)); fill: var(--ink-2); }

/* landscape countries (US, CA, AU, ES...): the map becomes a wide band above the results */
.explore--wide .explore-body { grid-template-columns: minmax(0, 1fr); }
.explore--wide .map-col { position: static; }
.explore--wide .map { --mk: 1; max-height: min(62vh, 620px); }
.map-tip {
  position: absolute; z-index: 5; width: 230px; pointer-events: none;
  background: var(--card); border: var(--line-w) solid var(--ink); box-shadow: 4px 4px 0 var(--ink);
  transform: translate(-50%, calc(-100% - 16px)); font-size: 13px; line-height: 1.3;
}
.map-tip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: var(--line-w) solid var(--ink); }
.map-tip div { padding: 8px 10px 9px; }
.map-tip b { display: block; font: 600 15px/1.15 var(--serif); font-variation-settings: "opsz" 24; }
.map-tip span { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font: 500 12px var(--mono); color: var(--ink-2); }
.map-tip span em { flex: none; font-style: normal; color: var(--red); font-weight: 600; }
.map-tip span i { min-width: 0; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map-tip.flip { transform: translate(-50%, 16px); }
.map-legend { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-3); margin-top: 10px; text-transform: uppercase; letter-spacing: .08em; }
.map-legend span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.lg-on { background: var(--red); } .lg-off { background: var(--ink-3); opacity: .4; margin-left: 10px; }

.status { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin-bottom: 18px; }
.status-count { font: 400 19px var(--serif); font-variation-settings: "opsz" 24; color: var(--ink-2); }
.status-count b { font-weight: 800; color: var(--ink); font-size: 26px; }
.status-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.trip-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px;
  border: var(--line-w) solid var(--ink); border-radius: 2px; font-size: 12.5px; background: var(--card);
}
.trip-btn .ic { width: 16px; height: 16px; color: var(--red); }
.trip-btn[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
.trip {
  flex-basis: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, max-content)) 1fr; gap: 10px 14px; align-items: end;
  padding: 14px 16px; border: var(--line-w) solid var(--ink); background: var(--card);
}
.trip-title { grid-column: 1 / -1; font: 700 18px var(--serif); }
.trip label { display: grid; gap: 4px; font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.trip input, .trip select {
  height: 40px; padding: 0 10px; border: var(--line-w) solid var(--ink); border-radius: 2px; background: var(--paper);
  font: 500 14px var(--mono); color: var(--ink); text-transform: none; letter-spacing: 0;
}
.trip-note { font-size: 13px; color: var(--ink-2); max-width: 46ch; }
.riding {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 12px 14px;
  background: var(--line, var(--ink)); color: #fff8ec; border-radius: 2px;
}
.riding b { font: 700 19px var(--serif); }
.riding span { font-size: 14px; opacity: .85; }
.riding button { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font: 600 13px var(--sans); color: inherit; border: 1.5px solid currentColor; padding: 6px 10px; border-radius: 999px; }

/* ---------- tickets ---------- */
.tickets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 272px), 1fr)); gap: 24px 20px; }
.ticket {
  position: relative; display: flex; flex-direction: column; background: var(--card);
  border: var(--line-w) solid var(--ink); border-radius: 3px; transition: transform .18s, box-shadow .18s;
}
.ticket:hover { transform: translate(-3px, -3px); box-shadow: 5px 5px 0 var(--ink); }
.ticket.is-flash { animation: flash 1.8s ease-out; }
@keyframes flash { 0%, 40% { box-shadow: 0 0 0 5px var(--red); } 100% { box-shadow: 0 0 0 0 transparent; } }
.t-photo { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-bottom: var(--line-w) solid var(--ink); background: var(--paper-2); border-radius: 2px 2px 0 0; }
.t-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.ticket:hover .t-photo img { transform: scale(1.045); }
.t-no {
  position: absolute; top: 10px; left: 10px; background: var(--card); color: var(--ink);
  border: var(--line-w) solid var(--ink); padding: 3px 7px; font-size: 11px; letter-spacing: .06em; pointer-events: none;
}
.t-save {
  position: absolute; top: 8px; right: 8px; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; background: var(--card); border: var(--line-w) solid var(--ink);
  transition: transform .15s, background .15s;
}
.t-save .ic { width: 17px; height: 17px; }
.t-save:hover { transform: scale(1.08); }
.t-save[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.t-save[aria-pressed="true"] .ic { fill: currentColor; }
.t-body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 14px; }
.t-kicker {
  font: 600 11px/1.2 var(--sans); font-variation-settings: "wdth" 75; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-2);
}
.t-kicker span { color: var(--red); margin-right: 6px; }
.t-name { font: 600 21px/1.13 var(--serif); font-variation-settings: "opsz" 36, "SOFT" 30; letter-spacing: -.01em; text-wrap: balance; }
.t-name a {
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat; transition: background-size .3s;
}
.t-name a:hover { background-size: 100% 1.5px; }
.t-local { margin-top: -3px; font-size: 13px; line-height: 1.3; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-where { color: var(--ink-2); font-size: 13.5px; line-height: 1.35; }
.t-rate { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.score { min-width: 44px; padding: 6px 5px; text-align: center; font: 600 15px/1 var(--mono); border: var(--line-w) solid var(--ink); border-radius: 2px; }
.score--top { background: var(--ink); color: var(--paper); }
.score-word { display: flex; flex-direction: column; font-weight: 700; font-size: 14px; line-height: 1.15; }
.score-word small { font-weight: 400; font-size: 12px; color: var(--ink-3); }
.marks { margin-left: auto; color: var(--mustard); font-size: 13px; letter-spacing: 1px; white-space: nowrap; }
.marks--tiles { color: var(--ink-3); font-size: 10px; letter-spacing: 2.5px; }
.t-room {
  font: italic 400 14px/1.35 var(--serif); font-variation-settings: "opsz" 14, "SOFT" 100; color: var(--ink-2);
}
.t-room::before { content: "Room \2014 "; font: 500 10.5px var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.t-perks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; font-size: 12.5px; color: var(--green); font-weight: 500; }
.t-perks li { display: inline-flex; align-items: center; gap: 5px; }
.t-perks .ic { width: 15px; height: 15px; }
.t-stub {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 10px;
  padding: 13px 16px 11px; border-top: var(--line-w) dashed var(--ink);
}
.t-stub::before, .t-stub::after {
  content: ""; position: absolute; top: -10.5px; width: 19px; height: 19px; border-radius: 50%;
  background: var(--paper); border: var(--line-w) solid var(--ink);
}
.t-stub::before { left: -11px; clip-path: inset(0 0 0 50%); }
.t-stub::after { right: -11px; clip-path: inset(0 50% 0 0); }
.t-fare { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; }
.t-price { font-size: 27px; font-weight: 600; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
/* the stub is a size container: the fare gets what the "Check dates" button leaves, down to 16px for ₫24,343,254 */
.t-stub { container-type: inline-size; }
.t-price { font-size: clamp(16px, (100cqi - 136px) / (var(--len, 6) * .6), 27px); }
.t-was { font-size: 13px; color: var(--ink-3); }
.t-off { font-size: 11px; font-weight: 600; background: var(--green); color: var(--card); padding: 2px 5px; border-radius: 2px; }
.t-terms { grid-column: 1 / -1; font-size: 10.5px; letter-spacing: .02em; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-cta {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px;
  background: var(--ink); color: var(--paper); font-weight: 700; font-size: 13.5px; text-decoration: none; border-radius: 2px;
  transition: background .15s, gap .15s;
}
.t-cta .ic { width: 16px; height: 16px; }
.t-cta:hover { background: var(--red); color: #fff; gap: 10px; }

/* ---------- timetable ---------- */
.timetable-wrap { border: var(--line-w) solid var(--ink); background: var(--card); overflow-x: auto; }
.timetable { width: 100%; border-collapse: collapse; font-size: 14px; }
.timetable th {
  position: sticky; top: 0; background: var(--ink); color: var(--paper); text-align: left; white-space: nowrap;
  font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .12em; padding: 11px 12px;
}
.timetable td { padding: 10px 12px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.timetable tbody tr:nth-child(even) { background: color-mix(in srgb, var(--paper-2) 45%, transparent); }
.timetable tbody tr:hover { background: var(--paper-2); }
.tt-no { color: var(--ink-3); font-family: var(--mono); font-size: 12px; }
.tt-name a { font: 600 15.5px/1.2 var(--serif); font-variation-settings: "opsz" 24; text-decoration: none; }
.tt-name a:hover { text-decoration: underline; }
.tt-sub { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.tt-num { font-family: var(--mono); white-space: nowrap; }
.tt-r { text-align: right; }
.tt-fare { font: 600 16px var(--mono); white-space: nowrap; }
.tt-go a {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: var(--line-w) solid var(--ink); text-decoration: none;
}
.tt-go a:hover { background: var(--red); border-color: var(--red); color: #fff; }
.tt-go .ic { width: 16px; height: 16px; }

.more { display: grid; justify-items: center; gap: 10px; margin-top: 36px; }
.more-note { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.empty { padding: 56px 24px; text-align: center; border: var(--line-w) dashed var(--ink); }
.empty-title { font: 800 34px var(--serif); font-variation-settings: "opsz" 96; margin-bottom: 8px; }

/* ---------- small print ---------- */
.small-print { padding-bottom: clamp(56px, 8vw, 110px); }
.sp-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sp-cols > div { padding: 0 28px; border-left: 1px solid var(--ink); }
.sp-cols > div:first-child { padding-left: 0; border-left: 0; }
.sp-cols h3 { font: 700 22px/1.15 var(--serif); font-variation-settings: "opsz" 48; margin-bottom: 10px; }
.sp-cols p { font: 400 16px/1.6 var(--serif); font-variation-settings: "opsz" 14; color: var(--ink-2); }
.sp-cols > div:first-child p::first-letter {
  float: left; font: 800 64px/.8 var(--serif); font-variation-settings: "opsz" 144, "WONK" 1;
  color: var(--red); padding: 6px 8px 0 0;
}

/* ---------- footer ---------- */
.foot { background: var(--ink); color: var(--paper); overflow: hidden; }
.foot-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 24px 48px; padding-block: 48px 36px; }
.foot-mark {
  font: 900 clamp(120px, 22vw, 340px)/.74 var(--serif); font-variation-settings: "opsz" 144, "WONK" 1;
  letter-spacing: -.06em; margin-bottom: -.06em;
}
.foot-meta { display: grid; gap: 10px; padding-bottom: 12px; }
.foot-sleep { font: italic 400 26px/1.2 var(--serif); font-variation-settings: "opsz" 72, "SOFT" 100; }
.foot-meta .mono { font-size: 12px; letter-spacing: .04em; opacity: .75; }
.foot-legal { max-width: 60ch; }

.foot-eds { display: grid; gap: 6px; font-size: 12px; }
.foot-eds p { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); align-items: baseline; gap: 2px 8px; }
.foot-eds p span { display: flex; flex-wrap: wrap; gap: 3px 16px; }
.foot-eds b { font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; opacity: .55; }
.foot-eds a { color: inherit; opacity: .85; text-underline-offset: 3px; }
.foot-eds a:hover { opacity: 1; }

/* ---------- atlas ---------- */
.hero--atlas h1 em { font-style: italic; }
.cover-stack { position: relative; aspect-ratio: 1 / 1.05; min-height: 360px; }
.mini-cover {
  position: absolute; width: 58%; aspect-ratio: 3 / 4.2; display: grid; grid-template-rows: auto 1fr auto;
  background: var(--card); border: var(--line-w) solid var(--ink); box-shadow: 0 24px 46px -24px var(--shadow);
  top: calc(var(--i) * 9%); left: calc(var(--i) * 20%); transform: rotate(calc(-6deg + var(--i) * 6deg)); z-index: calc(3 - var(--i));
}
.mc-logo { background: var(--ed); color: #fff8ec; font: 900 30px/1 var(--serif); font-variation-settings: "opsz" 144, "WONK" 1; padding: 10px 12px 8px; letter-spacing: -.04em; }
.mini-cover img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.mc-title { font: 700 italic 24px/1.05 var(--serif); font-variation-settings: "opsz" 96, "SOFT" 100; padding: 10px 12px 12px; color: var(--ed); border-top: var(--line-w) solid var(--ink); }

.covers { padding-bottom: clamp(48px, 7vw, 96px); }
/* one shelf per region, like a newsstand rack: "Europe ———— Ten editions · 7,000 stays · £ € DKK NOK SEK" */
.shelf + .shelf { margin-top: clamp(36px, 4vw, 60px); }
.shelf-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.shelf-head h3 {
  font: 700 italic clamp(28px, 2.6vw, 40px)/1 var(--serif); font-variation-settings: "opsz" 96, "SOFT" 100, "WONK" 1;
  letter-spacing: -.02em; white-space: nowrap;
}
.shelf-rule { flex: 1; min-width: 24px; align-self: center; border-top: var(--line-w) solid var(--ink); transform: translateY(4px); }
.shelf-head p { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.shelf-cur { color: var(--ink-3); letter-spacing: .06em; white-space: pre; }
.cover-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 20px; }
.cover {
  display: grid; grid-template-rows: auto auto 1fr auto auto auto; text-decoration: none; background: var(--card);
  border: var(--line-w) solid var(--ink); transition: transform .2s, box-shadow .2s;
}
.cover:hover { transform: translate(-4px, -4px); box-shadow: 6px 6px 0 var(--ed); }
.cv-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; background: var(--ed); color: #fff8ec; padding: 12px 12px 10px; }
.cv-logo { font: 900 clamp(30px, 2.6vw, 38px)/.9 var(--serif); font-variation-settings: "opsz" 144, "WONK" 1; letter-spacing: -.05em; }
.cv-logo i { font-style: normal; opacity: .55; }
.cv-vol { display: grid; justify-items: end; gap: 5px; font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; text-align: right; line-height: 1.4; white-space: nowrap; }
.cv-flag { width: 30px; height: 22.5px; border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1.5px #fff8ec; }
.dep-flag { width: 28px; height: 21px; border-radius: 2px; object-fit: cover; box-shadow: 0 0 0 1px rgba(239, 230, 210, .35); }
.cv-photo { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-block: var(--line-w) solid var(--ink); background: var(--paper-2); }
.cv-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.cover:hover .cv-photo img { transform: scale(1.04); }
.cv-new {
  position: absolute; top: 9px; left: 9px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--card); color: var(--ink); border: var(--line-w) solid var(--ink); padding: 3px 7px;
  font-size: 9.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
}
.cv-new::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.cv-title {
  padding: 14px 12px 4px; font: 800 clamp(25px, 2.1vw, 32px)/.95 var(--serif); font-variation-settings: "opsz" 144, "WONK" 1;
  letter-spacing: -.03em; color: var(--ink); overflow-wrap: anywhere;
}
.cv-title small { font: italic 400 .52em var(--serif); font-variation-settings: "opsz" 48, "SOFT" 100; letter-spacing: 0; color: var(--ed); }
/* a four-cell fare board on every cover: stays, towns, from, median */
.cv-facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px;
  margin: 10px 12px 0; padding-top: 10px; border-top: 1px dashed var(--rule-soft);
  font-size: 12.5px; font-weight: 600; color: var(--ink); letter-spacing: -.01em;
}
.cv-facts > span { display: grid; gap: 1px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-facts small { font-size: 9px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.cv-caption { padding: 8px 12px 12px; font-size: 10.5px; color: var(--ink-3); font-style: italic; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-go {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px;
  border-top: var(--line-w) dashed var(--ink); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600;
}
.cv-go .ic { width: 16px; height: 16px; flex: none; transition: transform .2s; }
.cover:hover .cv-go { color: var(--ed); }
.cover:hover .cv-go .ic { transform: translateX(5px); }
/* the empty slot at the end of the rack: "The ______ edition", pointing up to the Booking.com search box */
.cover--blank { --ed: var(--ink-3); border-style: dashed; background: transparent; }
.cover--blank .cv-top { background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink-3); }
.cover--blank .cv-flag { display: grid; place-items: center; box-shadow: none; border: 1.5px dashed currentColor; font: 600 13px var(--mono); }
.cover--blank .cv-photo {
  display: grid; place-items: center; color: var(--ink-3); border-block-style: dashed;
  background: repeating-linear-gradient(-45deg, transparent 0 10px, color-mix(in srgb, var(--paper-2) 70%, transparent) 10px 20px);
}
.cover--blank .cv-photo .ic { width: 38px; height: 38px; }
.cv-blank { display: inline-block; width: 3.6em; height: .7em; border-bottom: 3px solid var(--ink-3); }
.cv-note { padding: 8px 12px 14px; font: italic 400 14.5px/1.4 var(--serif); font-variation-settings: "opsz" 14, "SOFT" 100; color: var(--ink-2); }
.cover--blank .cv-go { border-top-color: var(--ink-3); color: var(--ink-2); }
.cover--blank .ic-up, .cover--blank:hover .ic-up { transform: rotate(-90deg); }

.departures { padding-bottom: clamp(48px, 7vw, 96px); }
.dep-board { position: relative; background: var(--board); border-radius: 4px; padding: 6px; overflow-x: auto; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.dep-board table { width: 100%; border-collapse: collapse; font-family: var(--mono); color: #f6b941; }
.dep-board th, .dep-board td { padding: 11px 14px; text-align: left; border-bottom: 1px dashed rgba(239, 230, 210, .14); white-space: nowrap; }
.dep-board thead th { font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; color: #a0977f; }
.dep-board tbody tr:last-child > * { border-bottom: 0; }
.dep-board tbody tr:hover { background: rgba(246, 185, 65, .07); }
.dep-board tbody th a { color: #efe6d2; text-decoration: none; font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 12px; }
.dep-code { display: inline-grid; place-items: center; min-width: 34px; padding: 3px 5px; border: 1px solid rgba(246, 185, 65, .6); color: #f6b941; font-size: 11px; letter-spacing: .08em; }
.dep-board td { font-size: 15px; font-weight: 600; text-shadow: 0 0 12px rgba(246, 185, 65, .3); }
.dep-board td.dep-best { white-space: normal; color: #efe6d2; font-weight: 500; font-size: 13px; text-shadow: none; }
.dep-best small { display: block; color: #a0977f; font-size: 11px; margin-top: 2px; }
.dep-board tbody th a { min-width: max-content; }
.dep-board tbody th a .dep-name { white-space: nowrap; }
.dep-new {
  font: 600 9px/1 var(--mono); font-style: normal; letter-spacing: .14em; text-transform: uppercase;
  color: var(--board); background: #f6b941; padding: 3px 5px 2px; border-radius: 2px; margin-left: -4px;
}
/* region header rows: "EUROPE   10 editions · 7,000 stays" */
.dep-board .dep-region th {
  padding: 18px 14px 7px; font: 600 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: #efe6d2;
  border-bottom: 1px solid rgba(239, 230, 210, .32);
}
.dep-board tbody:first-of-type .dep-region th { padding-top: 8px; }
.dep-region th span { margin-left: 14px; font-weight: 400; letter-spacing: .1em; color: #a0977f; text-transform: none; }
.dep-board tbody tr.dep-region:hover { background: none; }
.dep-go { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(246, 185, 65, .6); border-radius: 50%; color: #f6b941; }
.dep-go:hover { background: #f6b941; color: var(--board); }
.dep-go .ic { width: 16px; height: 16px; }

/* ---------- adverts & the Booking.com search box ---------- */
.ad { display: grid; justify-items: center; align-content: start; gap: 8px; }
.ad-label {
  display: flex; align-items: center; gap: 10px; width: 100%; justify-content: center;
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3);
}
.ad-label::before, .ad-label::after { content: ""; flex: 1; max-width: 60px; border-top: 1px solid var(--rule-soft); }
.ad-frame {
  display: block; max-width: 100%; padding: 8px; background: var(--card); border: var(--line-w) solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink); transition: transform .15s, box-shadow .15s;
}
.ad-frame:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--red); }
.ad-frame img { display: block; max-width: 100%; height: auto; }
.ad--wide { padding: 0 16px clamp(40px, 6vw, 80px); }
.ad-pair { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 40px; margin-top: clamp(36px, 5vw, 60px); }
/* sponsored card inside the ticket grid */
.ad-ticket {
  display: grid; place-items: center; padding: 18px 12px; border: var(--line-w) dashed var(--ink); border-radius: 3px;
  background: repeating-linear-gradient(-45deg, transparent 0 10px, color-mix(in srgb, var(--paper-2) 60%, transparent) 10px 20px);
}
.ad-ticket .ad-frame { box-shadow: none; }
/* skyscraper rails in the empty gutters of very wide screens */
.explore { position: relative; }
.ad-rail { display: none; }
@media (min-width: 1760px) {
  .ad-rail { display: block; position: absolute; top: 0; bottom: 60px; width: 180px; }
  .ad-rail--left { left: calc(50% - 680px - 210px); }
  .ad-rail--right { right: calc(50% - 680px - 210px); }
  .ad-rail .ad { position: sticky; top: calc(var(--mast-h, 0px) + var(--tb-h) + 24px); }
}
/* atlas: departures board + skyscraper */
.dep-layout { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: start; }
@media (max-width: 1099px) { .dep-layout { grid-template-columns: minmax(0, 1fr); } .dep-layout .ad--tower { display: none; } }
.search-any {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px clamp(24px, 4vw, 56px); align-items: center;
  margin-bottom: clamp(48px, 7vw, 96px); padding-block: 26px; border-block: var(--line-w) solid var(--ink);
}
.search-any h2 { font: 800 clamp(32px, 4vw, 54px)/.95 var(--serif); font-variation-settings: "opsz" 144, "WONK" 1; letter-spacing: -.03em; margin-top: 6px; }
.search-any .sec-sub { grid-column: auto; }
.sa-box { min-height: 120px; padding: 10px; background: var(--card); border: var(--line-w) solid var(--ink); box-shadow: 5px 5px 0 var(--red); }
.sa-box img[width="1"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 900px) { .search-any { grid-template-columns: minmax(0, 1fr); } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90;
  background: var(--ink); color: var(--paper); padding: 11px 16px; border-radius: 2px;
  font: 500 13px var(--mono); box-shadow: 4px 4px 0 var(--red); max-width: calc(100vw - 32px);
}

/* ---------- responsive ---------- */
@media (max-width: 1239px) {
  .cover-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 979px) {
  .cover-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .line-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board > div:nth-child(3) { border-right: 0; }
  .board > div:nth-child(n + 4) { border-top: 1px dashed rgba(239, 230, 210, .16); }
}
@media (max-width: 1079px) {
  .explore-body { grid-template-columns: minmax(0, 1fr); }
  .map-col { position: static; }
  .map-details > summary {
    display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; cursor: pointer; list-style: none;
    border: var(--line-w) solid var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; background: var(--card);
  }
  .map-details > summary::-webkit-details-marker { display: none; }
  .map-details > summary::after { content: "+"; margin-left: auto; font-size: 18px; }
  .map-details[open] > summary::after { content: "\2212"; }
  .map-details[open] > summary { border-bottom: 0; }
  .map { max-height: 70vh; }
  .price-filter { flex-basis: 200px; }
}
@media (max-width: 900px) {
  .tb-row { flex-wrap: wrap; }
  .tb-row.tb-chips { flex-wrap: nowrap; }
  .search { flex-basis: 100%; }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .postcards { max-width: 560px; width: 100%; justify-self: center; }
  .sp-cols { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sp-cols > div { padding: 0; border-left: 0; }
  .cover-stack { max-width: 520px; width: 100%; justify-self: center; }
  .mast-nav { display: none; }
}
/* between 1280 and 1600 the pills share the row with the logo: the shortlist button drops its word to leave them room */
@media (min-width: 1280px) and (max-width: 1599px) {
  .shortlist-btn { padding-left: 11px; gap: 6px; }
  .shortlist-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 1279px) {
  /* minmax(0, …): the full-width pill row must not stretch the grid to the pills' natural width */
  .mast-main { grid-template-columns: minmax(0, 1fr) auto; }
  .editions-nav { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
}
@media (max-width: 720px) {
  .hide-sm { display: none !important; }
  .editions-nav { justify-self: stretch; width: auto; border-radius: 18px; box-shadow: 3px 3px 0 var(--ink); }
  .ed-atlas { height: 42px; padding: 0 10px 0 8px; }
  .ed-pills a { height: 30px; padding: 0 9px 0 6px; font-size: 12.5px; }
  .editions-nav .flag { width: 22px; height: 16.5px; }
  .mast-main { padding-block: 8px; }
  .mast-strip { gap: 14px; }
  .logo { font-size: 36px; }
  .toolbar { position: static; }
  .map-col { position: static; }
  .tb-row { flex-wrap: wrap; }
  .tb-row.tb-chips { flex-wrap: nowrap; }
  .search { flex: 1 1 calc(100% - 110px); order: 1; }
  .seg { order: 2; }
  .seg button { padding: 0 11px; }
  .price-filter { flex: 1 1 140px; order: 3; }
  .select { flex: 0 1 auto; order: 4; }
  .select select { max-width: 160px; }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .board > div { border-right: 0; border-top: 1px dashed rgba(239, 230, 210, .16); }
  .board > div:nth-child(-n + 2) { border-top: 0; }
  .board > div:nth-child(odd) { border-right: 1px dashed rgba(239, 230, 210, .16); }
  .board > div:last-child { grid-column: 1 / -1; border-right: 0; }
  .line-grid { grid-template-columns: minmax(0, 1fr); }
  /* phones: each region becomes a sideways rack of covers (the next one peeks in from the right) */
  .cover-grid {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(76vw, 290px); gap: 14px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(-1 * clamp(16px, 3vw, 40px)); padding: 6px clamp(16px, 3vw, 40px) 14px;
    scroll-padding-inline: clamp(16px, 3vw, 40px);
  }
  .cover-grid::-webkit-scrollbar { display: none; }
  .cover { scroll-snap-align: start; }
  .shelf-head { flex-wrap: wrap; margin-bottom: 8px; gap: 4px 12px; }
  .shelf-head p { flex-basis: 100%; order: 3; font-size: 10.5px; }
  .shelf-cur { display: none; }
  .dep-board tbody th a .dep-name { display: none; }
  .dep-board { padding: 4px; }
  .dep-board th, .dep-board td { padding-inline: 8px; }
  .dep-board tbody th a { gap: 8px; }
  .cover-stack { min-height: 300px; }
  .line-card { min-height: 0; }
  .sec-head { grid-template-columns: minmax(0, 1fr); }
  .sec-sub { grid-column: 1; }
  .trip { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .trip label:first-of-type { grid-column: 1 / -1; }
  .trip-note { grid-column: 1 / -1; }
  .tt-hide { display: none; }
  .foot-inner { grid-template-columns: minmax(0, 1fr); }
  .pc-note { font-size: 13px; margin-top: 14px; }
  .pc-postmark { display: none; }
}

@media (max-width: 480px) {
  .ed-atlas span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ed-atlas { padding: 0 9px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
