/* Trekoro stylesheet. Design: docs/design/2026-09-30-redesign-spec.md (Board, Stage and Receipt).
   One file, in this order: Foundation; Chrome; Shared components; Trek comparison page; Home and finder; Trek against trek, operators, places, lists, saved, planned trek; Guides, updates, accuracy, prose pages, 404. */

/* ==========================================================================
   Foundation: tokens, globals, type
   ========================================================================== */
/* ==========================================================================
   Trekoro 2026, part 00: foundation
   Tokens, global rules, base typography, section head, generic hero text, motion.
   Parts are concatenated in name order into style.css. Colours live only in the
   two :root blocks below; every rule after them uses the tokens.
   ========================================================================== */

:root {
  /* surfaces */
  --ground: #FFFFFF;          /* page */
  --surface: #FFFFFF;         /* lists, fields, popovers, header */
  --surface-2: #F3F5F7;       /* tiles, hover, open row + detail, planner panel, footer */
  --surface-3: #E8EBEF;       /* hover on a tile, included chip, image placeholder, tracks */
  --paper: #FFFFFF;           /* the receipt; always sits on --surface-2 */
  /* text */
  --ink: #0F141A;             /* 18.5:1 on ground */
  --ink-2: #3E4853;           /* 9.3:1 */
  --ink-3: #5A6571;           /* 5.9:1 on ground, 5.4:1 on surface-2, 5.0:1 on surface-3 */
  --muted: var(--ink-3);      /* legacy alias */
  /* lines */
  --line: #DDE2E8;            /* hairlines, decorative only */
  --line-strong: #B3BCC7;     /* chip and option-card borders, decorative (text carries the control) */
  --field-line: #76818D;      /* inputs, selects, ghost buttons: 4.0:1 on ground, 3.6:1 on surface-2 */
  /* go */
  --accent: #1A4FD6;          /* 6.7:1 on ground, 6.1:1 on surface-2, 5.7:1 on accent-soft */
  --accent-hover: #143FB0;
  --accent-ink: #FFFFFF;      /* 6.7:1 on accent */
  --accent-soft: #E6EDFC;
  /* lowest price only */
  --ok: #0B6E37;              /* 6.4:1 on ground, 5.8:1 on surface-2, 5.6:1 on ok-soft */
  --ok-soft: #E2F4E8;
  /* left out, not stated, stale */
  --warn: #8F4A00;            /* 6.7:1 on ground, 6.1:1 on surface-2, 5.9:1 on warn-soft */
  --warn-soft: #FCEFD8;
  /* chosen */
  --inverse: #0F141A;
  --inverse-ink: #FFFFFF;
  --inverse-ink-2: #B4BCC6;   /* 9.6:1 on inverse */
  --heart: #C42B4B;           /* 5.5:1; replaces hard-coded #C2415B */
  /* data series (fills only; text uses --ink-2 / --warn) */
  --d-pkg: #3A4856;           /* package, included */
  --d-out: #D9541A;           /* left out, you pay: 4.0:1 on surface, 3.7:1 on surface-2 */
  --d-unk: #B7C0C9;           /* hatch lines for not stated */
  /* photos */
  --hero: #0F141A;            /* backdrop while a photo loads */
  --hero-ink: #FFFFFF;
  --hero-ink-2: #D5DCE4;
  --scrim: rgb(8 10 14 / .74);        /* white text stays above 8:1 even on a white photo */
  --tag-bg: rgb(255 255 255 / .94);
  --tag-ink: #0F141A;
  /* elevation */
  --shadow-1: 0 1px 2px rgb(15 20 26 / .06), 0 1px 3px rgb(15 20 26 / .10);
  --shadow-2: 0 4px 8px -2px rgb(15 20 26 / .08), 0 16px 36px -8px rgb(15 20 26 / .18);
  --shadow-up: 0 -6px 16px rgb(15 20 26 / .08);
  --shadow-paper: drop-shadow(0 1px 1px rgb(15 20 26 / .10)) drop-shadow(0 10px 16px rgb(15 20 26 / .10));
  /* type */
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --sans: var(--body);        /* legacy alias */
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  /* radius */
  --r-tag: 6px; --r-field: 10px; --r-list: 12px; --r-card: 16px; --r-tile: 20px; --r-stage: 28px; --r-pill: 999px;
  /* spacing, 4px base */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 104px;
  /* widths */
  --wrap: 1200px; --col: 880px; --prose: 68ch; --gutter: 16px;
  --pad: max(var(--gutter), calc((100% - var(--wrap)) / 2));   /* padding-inline of every full-width block */
  /* icons (used as mask-image, coloured by currentColor) */
  --i-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E");
  --i-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --i-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14m-6-6 6 6-6 6'/%3E%3C/svg%3E");
  --i-ext: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 5h5v5M19 5l-8 8M11 7H6v11h11v-5'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --i-x: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
  --i-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.5v.5'/%3E%3C/svg%3E");
  --i-clock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  /* select caret is a background image, so the colour is baked in per theme */
  --caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E4853' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  color-scheme: light dark;
}
@media (min-width: 640px)  { :root { --gutter: 24px; } }
@media (min-width: 1100px) { :root { --gutter: 32px; } }

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0D1116; --surface: #151A21; --surface-2: #1C232C; --surface-3: #262F3A; --paper: #232B36;
    --ink: #ECF0F4;            /* 16.5:1 on ground, 15.3:1 on surface */
    --ink-2: #B5BEC9;          /* 10.1:1 */
    --ink-3: #8F9AA7;          /* 6.6 ground, 6.1 surface, 5.5 surface-2, 5.0 paper, 4.7 surface-3 */
    --line: #2A323D; --line-strong: #465160; --field-line: #7A8794;   /* 4.8:1 on surface */
    --accent: #8DB2FF;         /* 9.0 ground, 8.3 surface, 7.5 surface-2, 6.9 accent-soft */
    --accent-hover: #ABC6FF; --accent-ink: #0A1730;   /* 8.4:1 on accent */
    --accent-soft: #18284A;
    --ok: #62D292;             /* 10.1 ground, 8.4 surface-2, 7.6 ok-soft and paper */
    --ok-soft: #12301F;
    --warn: #F0B071;           /* 10.1 ground, 7.7 warn-soft */
    --warn-soft: #38260F;
    --inverse: #ECF0F4; --inverse-ink: #0F141A; --inverse-ink-2: #3E4853;   /* 8.1:1 */
    --heart: #F58AA3;
    --d-pkg: #C5CFD9; --d-out: #FF8548; --d-unk: #55616E;
    --hero: #000000;
    --tag-bg: rgb(21 26 33 / .92); --tag-ink: #ECF0F4;
    --shadow-1: 0 0 0 1px #465160;
    --shadow-2: 0 0 0 1px #465160, 0 16px 40px rgb(0 0 0 / .55);
    --shadow-up: 0 -1px 0 #465160;
    --shadow-paper: none;
    --caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B5BEC9' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  }
}

/* ---------- global ---------- */
[hidden] { display: none !important; }          /* rows and list items become grids; the scripts hide with the hidden attribute */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (max-width: 639px) { html { scroll-padding-top: 60px; } }
@media (max-width: 899px) { html { scroll-padding-bottom: 88px; } }   /* the planner's total bar never hides a focused field */
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 1rem/1.55 var(--body); font-style: normal; overflow-wrap: break-word; }
/* the page is a column at least one screen tall and main takes the slack, so the footer band ends a short page
   (404, an empty Saved) at the bottom of the screen instead of floating above a white strip */
body { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body > main { flex: 1 0 auto; }
img { max-width: 100%; }

/* every full-width block is padded to the same 1200px column: gutter on small screens, centred on wide ones */
.top, .chapters, .crumbs, .paused, .hero, main > section, .feedback, footer { padding-inline: var(--pad); max-width: none; margin-inline: 0; }

/* section rhythm: sections are separated by space, not by boxes. :where() keeps these at the weight of one element or
   one class, so a page part can set its own section padding with a single class or id */
main { display: block; min-width: 0; }
:where(main) > section { padding-top: clamp(40px, 6vw, 72px); padding-bottom: 0; }
:where(main > section.head) + section { padding-top: clamp(24px, 4vw, 40px); }   /* the first block sits closer to its page head */
:where(main) > section.head, :where(main) > .hero { padding-top: 28px; }
@media (max-width: 639px) { :where(main) > section.head, :where(main) > .hero { padding-top: 20px; } }

/* focus: one ring everywhere; fields, photos and inverse surfaces adjust it where they are defined */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- base typography ---------- */
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); text-wrap: balance; }
h1 { font-weight: 700; font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 12px; }
h2 { font-weight: 700; font-size: clamp(1.375rem, 1.1rem + 1.2vw, 2rem); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 12px; }
h3 { font-weight: 700; font-size: 1.125rem; line-height: 1.25; letter-spacing: -0.005em; margin: 0 0 8px; }
h4 { font-weight: 600; font-size: 1rem; line-height: 1.3; margin: 0 0 6px; }
b, strong { font-weight: 600; }
em, i, cite, address { font-style: normal; }
small { font-size: 0.875rem; }

/* links: accent; underlined inside prose, quiet in lists and UI until hover */
a { color: var(--accent); text-decoration: none; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration: underline; text-decoration-thickness: 1px; }
:where(.method, .explain, .note, .honest, .lead, .answer, .held-note, .insight, .callout, .unk) a { text-decoration: underline; text-decoration-thickness: 1px; }
:where(.method, .explain, .note, .honest, .lead, .answer, .held-note, .insight, .callout, .unk) a:hover { color: var(--accent-hover); }

/* text roles */
.lead { font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem); line-height: 1.45; color: var(--ink-2); max-width: 56ch; margin: 0 0 12px; text-wrap: pretty; }
.explain { color: var(--ink-2); max-width: 72ch; margin: 0 0 20px; text-wrap: pretty; }
.explain.small, p.small { font-size: 0.875rem; line-height: 1.45; }
.note { font-size: 0.875rem; line-height: 1.45; color: var(--ink-3); max-width: 72ch; }
.sub { font-size: 0.8125rem; line-height: 1.4; font-weight: 400; color: var(--ink-3); }
.muted { color: var(--ink-3); }
/* label: the machine's voice for every small heading (eyebrows, column heads, keys) */
.eyebrow { font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
/* ledger: read dates, sources, amounts in a column */
/* Figures are lining everywhere and tabular nowhere by feature: Schibsted Grotesk's tabular set widens the comma to a
   full digit ("$3 ,209"), and the setting would be inherited by any grotesk figure inside a .mono cell. Columns that
   must align digit for digit use .mono, whose digits are one width by design. Do not add tabular-nums to grotesk text. */
.mono { font-family: var(--mono); font-variant-numeric: lining-nums; }
.money, .n, .cnt, .rank { font-variant-numeric: lining-nums; }
.r { text-align: right; }
.nw { white-space: nowrap; }        /* one fact that must not break in two: "9–11 days", "5,895 m" */
/* the small "from" before a headline price */
.from { font: 500 0.75rem/1.3 var(--body); letter-spacing: 0; text-transform: lowercase; color: var(--ink-3); margin-right: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* prose (terms, privacy, for operators, how we count, how we check prices) */
.method p, .method li { font-size: 1rem; line-height: 1.65; color: var(--ink-2); }
.method p { max-width: var(--prose); margin: 0 0 14px; }
.method ul, .method ol { max-width: var(--prose); margin: 0 0 14px; padding-left: 22px; }
.method li { margin-bottom: 8px; }
.method strong, .method b { color: var(--ink); }
.method h2 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; margin: 32px 0 8px; }
.method > h2:first-child { margin-top: 0; }
.method h3 { margin: 24px 0 6px; }
code { font: 400 0.875rem/1.4 var(--mono); background: var(--surface-2); border-radius: 4px; padding: 1px 5px; }

/* ---------- section head: eyebrow, display-m h1, lead ---------- */
.head .eyebrow { margin: 0 0 10px; }
.head h1 { max-width: 22ch; margin: 0 0 12px; }
.head .lead { margin: 0; }

/* ---------- hero text roles (page grids come from the page parts) ---------- */
.hero { background: var(--ground); color: var(--ink); }
.hero .eyebrow { margin: 0 0 10px; max-width: 88ch; }
.hero h1 { font-weight: 800; font-size: clamp(2rem, 1.2rem + 3.6vw, 3.75rem); line-height: 1.04; letter-spacing: -0.025em; max-width: 18ch; margin: 0 0 16px; }
.hero.home h1 { font-size: clamp(2.5rem, 1.3rem + 5.6vw, 5rem); line-height: 1; letter-spacing: -0.03em; max-width: 12ch; }
.hero .lead { margin: 0 0 12px; }
.hero .answer { font-size: 0.9375rem; line-height: 1.55; color: var(--ink-2); max-width: 64ch; margin: 0 0 12px; }
.hero .answer b { color: var(--ink); }

/* ---------- motion: all of it lives here, and only for people who have not asked for less ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  a, button, input, select, textarea, summary, label.chk, .sel, .cbox, .cbox::after, .cb-name::after, .tile,
  .tl li, .oplist li, .pc-list, .gear-item, #cmp tr.row {
    transition: background-color .12s ease-out, border-color .12s ease-out, color .12s ease-out;
  }
  summary::after, .expand::before { transition: transform .16s ease-out; }
  .pc-img img { transition: transform .24s ease-out; }
  .pc:hover .pc-img img { transform: scale(1.03); }
  .btn:active { transform: translateY(1px); }
  .save svg { transition: transform .15s ease-out; }
  .save.pulse svg { transform: scale(1.2); }
}

/* ==========================================================================
   Chrome: header, search, crumbs, footer, feedback
   ========================================================================== */
/* ==========================================================================
   Trekoro 2026, part 10: chrome
   Header and search, search dropdown, crumbs, paused banner, feedback box, footer.
   ========================================================================== */

/* ---------- header ---------- */
.top {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
  min-height: 64px; padding-block: 9px;
  background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) {
  .top { position: sticky; top: 0; z-index: 30; }
  body[data-trek]:has(.chapters) .top { position: static; }   /* the chapter strip is the one bar that sticks on a trek page */
}
.wordmark {
  display: inline-flex; align-items: center; min-height: 44px; flex: none;
  font: 800 1.3125rem/1 var(--display); letter-spacing: -0.02em; color: var(--ink); text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.wordmark span { color: var(--accent); }

/* search pill */
.hsearch { position: relative; flex: 1 1 200px; max-width: 480px; min-width: 0; }
.hsearch.hide-wide { display: none; }
.hsearch::before {
  content: ""; position: absolute; left: 16px; top: 22px; width: 18px; height: 18px; margin-top: -9px; z-index: 1; pointer-events: none;
  background: var(--ink-3); -webkit-mask: var(--i-search) center / contain no-repeat; mask: var(--i-search) center / contain no-repeat;
}
.hsearch input {
  display: block; width: 100%; height: 44px; min-height: 0; padding: 0 16px 0 44px;
  border: 1px solid transparent; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink);
  font: 400 0.9375rem/1.2 var(--body); -webkit-appearance: none; appearance: none;
}
.hsearch input::placeholder { color: var(--ink-3); opacity: 1; }
.hsearch input::-webkit-search-decoration { -webkit-appearance: none; }
.hsearch input:hover { border-color: var(--line-strong); }
.hsearch input:focus { background: var(--surface); border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }

/* navigation */
.topnav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.topnav a {
  position: relative; display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: var(--r-pill);
  font: 600 0.9375rem/1 var(--body); color: var(--ink-2); text-decoration: none; white-space: nowrap;
}
.topnav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.topnav a[aria-current="page"] { color: var(--ink); }
.topnav a[aria-current="page"]::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 3px; height: 2px; border-radius: 1px; background: var(--ink); }
.topnav .nav-wide { display: none; }
@media (min-width: 900px) { .topnav .nav-wide { display: inline-flex; } }
.saved-link .cnt {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 6px;
  border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font: 500 0.75rem/1 var(--mono);
}

/* currency: the word is for screen readers, the pill is the control */
.cur { display: inline-flex; align-items: center; flex: none; }
.cur > span { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.cur select {
  height: 40px; min-height: 0; padding: 0 30px 0 14px; border: 0; border-radius: var(--r-pill);
  background: var(--caret) right 10px center / 14px no-repeat var(--surface-2); color: var(--ink);
  font: 500 0.8125rem/1 var(--mono); cursor: pointer; -webkit-appearance: none; appearance: none;
}
.cur select:hover { background-color: var(--surface-3); }

/* tablet: everything still fits on one row, with tighter gaps */
@media (min-width: 640px) and (max-width: 899px) {
  .top { column-gap: 12px; }
  .top .hsearch { flex-basis: 160px; }
  .top .topnav a { padding: 0 12px; }
  .top .topnav a[aria-current="page"]::after { left: 12px; right: 12px; }
}
/* phone: two rows. Row 1 wordmark, nav, currency; row 2 the search pill */
@media (max-width: 639px) {
  .top { gap: 6px 8px; padding-block: 6px 10px; min-height: 0; }
  .top .wordmark { order: 1; font-size: 1.25rem; }
  .top .topnav { order: 2; gap: 0; }
  .top .topnav a { padding: 0 8px; }
  .top .topnav a[aria-current="page"]::after { left: 8px; right: 8px; }
  .top .cur { order: 3; }
  .top .cur select { padding: 0 26px 0 12px; background-position: right 8px center; }
  .top .hsearch { order: 4; flex-basis: 100%; max-width: none; }
  .top .hsearch input { font-size: 1rem; }
  .saved-link .cnt { margin-left: 4px; }
}
@media (max-width: 359px) {
  /* the narrowest phones: the currency pill moves down beside the search pill */
  .top .hsearch { flex: 1 1 160px; }
  .top .cur { order: 5; margin-left: auto; }
}

/* ---------- search dropdown (header and home) ---------- */
.sresults {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 35;
  padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-2);
  text-align: left;
}
/* under a narrow header field the list keeps a readable width and grows to the right */
.hsearch .sresults { right: auto; width: 100%; min-width: min(420px, calc(100vw - 2 * var(--gutter))); }
.sr { display: grid; grid-template-columns: 84px minmax(0, 1fr); column-gap: 8px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.sr:hover, .sr:focus-visible, .sr.first { background: var(--surface-2); text-decoration: none; }
.sr:focus-visible { outline-offset: -2px; }
.sr-t { grid-row: 1 / span 2; align-self: center; font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.sr-n { font-size: 0.9375rem; font-weight: 600; line-height: 1.3; }
.sr-s { font-size: 0.8125rem; line-height: 1.4; color: var(--ink-2); }
.sr-s:empty { display: none; }
.sr-empty { padding: 12px; font-size: 0.875rem; line-height: 1.45; color: var(--ink-2); }
.sr-empty a { text-decoration: underline; }
@media (max-width: 639px) { .sr { grid-template-columns: 72px minmax(0, 1fr); padding-inline: 10px; } }

/* ---------- crumbs ---------- */
.crumbs { padding-top: 16px; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); }
.crumbs .sep { margin: 0 8px; color: var(--ink-3); }
.crumbs .here { color: var(--ink); font-weight: 500; }
@media (max-width: 639px) {
  /* one back link: the parent of this page */
  .crumbs { padding-top: 4px; }
  .crumbs a:not(:last-of-type), .crumbs a:not(:last-of-type) + .sep, .crumbs a:last-of-type + .sep, .crumbs .here { display: none; }
  .crumbs a:last-of-type { display: inline-flex; align-items: center; min-height: 44px; font-weight: 500; }
  .crumbs a:last-of-type::before { content: "\2039\00a0"; font-size: 1.125rem; line-height: 1; }
  :where(.crumbs + main) > section.head, :where(.crumbs + main) > .hero { padding-top: 4px; }   /* the back link already gives the air */
}

/* ---------- banner shown only while automatic updates are paused ---------- */
.paused { padding-block: 10px; background: var(--warn-soft); color: var(--ink); font-size: 0.9375rem; line-height: 1.45; text-align: left; }
.paused a { color: var(--ink); text-decoration: underline; font-weight: 600; }
.crumbs + .paused { margin-top: 12px; }   /* the banner follows the crumbs in the page; keep the two apart */

/* ---------- feedback box above the footer ---------- */
.feedback { margin-top: 72px; }
.feedback > summary { color: var(--ink-2); font-size: 0.9375rem; font-weight: 400; }
.feedback > summary span { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.feedback[open] > summary { color: var(--ink); margin-bottom: 8px; }
.feedback form { position: relative; display: grid; gap: 12px; max-width: 560px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.feedback .fb-row { display: grid; gap: 6px; }
.feedback .fb-row label { font-size: 0.875rem; font-weight: 600; color: var(--ink); }
.feedback .fb-opt { font-size: 0.8125rem; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
.feedback select, .feedback input[type="email"], .feedback textarea { width: 100%; background-color: var(--surface); }
.feedback .fb-send { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.feedback .fb-fine { font-size: 0.75rem; line-height: 1.3; color: var(--ink-3); }
.feedback .fb-fine a { color: inherit; text-decoration: underline; }
.feedback .fb-status { margin: 0; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.feedback .fb-status:empty { display: none; }
.feedback form.failed .fb-status { color: var(--warn); }
.feedback form.sent .fb-row, .feedback form.sent textarea, .feedback form.sent .fb-send { display: none; }
.feedback .fb-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 639px) { .feedback .fb-send .btn { width: 100%; } }

/* ---------- footer ---------- */
footer { margin-top: 104px; padding-block: 48px 56px; background: var(--surface-2); border-top: 1px solid var(--line); color: var(--ink-2); }
.feedback + footer { margin-top: 32px; }
footer .honest { max-width: 64ch; margin: 0; font-size: 1.0625rem; line-height: 1.5; color: var(--ink); text-wrap: pretty; }
.foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; margin-top: 32px; }
@media (min-width: 640px) { .foot-links { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; } }
.fl-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.fl-h { margin: 0 0 6px; font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.fl-col a { display: inline-flex; align-items: center; min-height: 36px; font-size: 0.9375rem; line-height: 1.3; color: var(--ink-2); }
.fl-col a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 639px) { .fl-col a { min-height: 40px; } }
.fl-col > span { display: block; padding: 5px 0; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }
.fl-col .fl-name { font: 800 1.125rem/1.3 var(--display); letter-spacing: -0.02em; color: var(--ink); }
.fl-col .fl-built { font: 400 0.8125rem/1.4 var(--mono); color: var(--ink-3); }
.foot-fine { display: grid; gap: 4px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 0.8125rem; line-height: 1.5; color: var(--ink-3); max-width: none; }
.foot-fine a { color: var(--ink-2); text-decoration: underline; }

/* ==========================================================================
   Shared components
   ========================================================================== */
/* ==========================================================================
   Trekoro 2026, part 20: shared components
   Everything used by more than one page group. Page layouts (the operator board,
   planner, chapter strip, search card, hero grids) live in the parts after this one.

   Shape carries meaning: pills are controls, 6px tags are statuses, hairline lists
   are things you compare, borderless photo cards are things you browse, filled grey
   tiles are statements. Only the receipt, the search card and popovers cast a shadow.

   Icon pattern used throughout (coloured by currentColor):
     .x::before { content: ""; width: 1em; height: 1em; background: currentColor;
                  -webkit-mask: var(--i-ext) center / contain no-repeat; mask: var(--i-ext) center / contain no-repeat; }
   ========================================================================== */

/* ---------- buttons and pill links ---------- */
.btn, .lp-new button, .detail-actions a.visit, a.visit.c-visit {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font: 600 0.9375rem/1 var(--body); text-decoration: none; white-space: nowrap; cursor: pointer;
  -webkit-appearance: none; appearance: none;
}
.btn:hover, .btn:active, .lp-new button:hover, .detail-actions a.visit:hover, a.visit.c-visit:hover {
  background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); text-decoration: none;
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; }
.btn:disabled:hover, .btn[aria-disabled="true"]:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: var(--field-line); color: var(--ink); }
.btn.ghost:hover, .btn.ghost:active { background: var(--surface-2); border-color: var(--ink); color: var(--ink); }
.btn.ghost:disabled:hover, .btn.ghost[aria-disabled="true"]:hover { background: transparent; border-color: var(--field-line); }
.btn.small, .lp-new button { height: 36px; padding: 0 14px; font-size: 0.8125rem; }
@media (max-width: 639px) { .btn.small { height: 40px; } }

/* the link out to an operator: a text link with an external mark; the solid pill above inside a row detail and the planner */
.visit { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.visit::after {
  content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: var(--i-ext) center / contain no-repeat; mask: var(--i-ext) center / contain no-repeat;
}
.detail-actions a.visit, a.visit.c-visit { gap: 8px; }
/* small text links that stand alone get a 40px touch area without changing the layout */
.visit, a.more, .oplist a.op-name { position: relative; }
.visit::before, a.more::after, .oplist a.op-name::after { content: ""; position: absolute; inset: -11px -6px; }
.detail-actions a.visit::before, a.visit.c-visit::before { content: none; }

.linklike { display: inline; padding: 0; border: 0; background: none; font: inherit; color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.linklike:hover { color: var(--accent-hover); }
a.more { font-size: 0.875rem; font-weight: 600; color: var(--accent); white-space: nowrap; }   /* a.more only: details.more is the expandable explanation */
.pill-links { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }

/* .pill: a price block when live, a quiet line when the trek is still in the queue (no filled pills for status) */
.pill { display: inline-block; font-size: 0.8125rem; line-height: 1.4; text-decoration: none; white-space: nowrap; }
.pill.live { padding: 0; background: none; border-radius: 0; color: var(--ink-3); text-align: right; line-height: 1.25; }
.pill.live .pl-from { font-size: 0.75rem; font-weight: 500; margin-right: 2px; }
.pill.live .pl-v, .pill.live > .money { font: 700 1.25rem/1.15 var(--body); color: var(--ink); font-variant-numeric: lining-nums; }
.pill.live .pl-k { display: block; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }
.pill.live:hover { text-decoration: none; }
.pill.live:hover .pl-v, .pill.live:hover > .money { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pill.queue { padding: 0; border: 0; color: var(--ink-3); }

/* ---------- forms and inputs (zero specificity, so any component can restyle its own field) ---------- */
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), select, textarea) {
  min-height: 44px; max-width: 100%; margin: 0; padding: 0 12px;
  border: 1px solid var(--field-line); border-radius: var(--r-field); background-color: var(--surface); color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.3; text-overflow: ellipsis;
}
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea)::placeholder { color: var(--ink-3); opacity: 1; }
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea):hover { border-color: var(--ink-2); }
:where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea):focus-visible { border-color: var(--accent); outline-offset: 0; }
:where(input, select, textarea, button):disabled { opacity: .55; cursor: default; }
:where(select) {
  -webkit-appearance: none; appearance: none; padding-right: 36px; cursor: pointer;
  background: var(--caret) right 12px center / 14px no-repeat var(--surface);
}
:where(textarea) { display: block; width: 100%; min-height: 112px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
:where(input[type="search"]) { -webkit-appearance: none; appearance: none; }
:where(input[type="checkbox"], input[type="radio"]) { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--ink); }
/* the checkbox is drawn, so an empty box has the same visible edge in both themes (the native dark one nearly vanishes) */
:where(input[type="checkbox"]) {
  -webkit-appearance: none; appearance: none; display: inline-grid; place-content: center; vertical-align: -3px;
  border: 1.5px solid var(--field-line); border-radius: 5px; background: var(--surface); cursor: pointer;
}
:where(input[type="checkbox"])::before {
  content: ""; width: 12px; height: 12px; background: var(--inverse-ink); opacity: 0;
  -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat;
}
:where(input[type="checkbox"]:hover) { border-color: var(--ink-2); }
:where(input[type="checkbox"]:checked) { background: var(--inverse); border-color: var(--inverse); }
:where(input[type="checkbox"]:checked)::before { opacity: 1; }
:where(input[type="checkbox"]:disabled) { cursor: default; }
@media (forced-colors: active) {
  :where(input[type="checkbox"]) { -webkit-appearance: auto; appearance: auto; }
  :where(input[type="checkbox"])::before { content: none; }
}
:where(input[type="range"]) { accent-color: var(--ink); }
:where(button) { font-family: inherit; }

/* pill fields: one text field beside one pill button */
.newlist input, .signin input, .signup-row input, .lp-new input, .opfilter input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 18px; border-radius: var(--r-pill);
}
.lp-new input { min-height: 40px; height: 40px; padding: 0 14px; font-size: 0.875rem; }

/* ---------- controls: chips, toggle chips, dropdown chip, segmented control ---------- */
.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.controls #solo-note, .solo-note { flex-basis: 100%; order: 9; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-2); }

.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--surface-2); border: 0; }
.seg button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px;
  border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink-2);
  font: 500 0.875rem/1 var(--body); white-space: nowrap; cursor: pointer;
}
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }
.seg button:disabled { opacity: .5; }
.seg button:disabled:hover { color: var(--ink-2); }
@media (max-width: 639px) { .seg button { height: 40px; } }

/* the country filter: the same buttons as separate chips */
.seg.flagbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; background: none; border-radius: 0; }
.seg.flagbar button {
  height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); box-shadow: none; font-weight: 500;
}
.seg.flagbar button:hover { border-color: var(--ink-2); }
.seg.flagbar .n { font: 400 0.75rem/1 var(--mono); color: var(--ink-3); }
.seg.flagbar button.on { background: var(--inverse); border-color: var(--inverse); color: var(--inverse-ink); font-weight: 500; }
.seg.flagbar button.on .n { color: var(--inverse-ink-2); }
.seg.flagbar button:disabled:hover { border-color: var(--line-strong); }

/* toggle chip: a label around a checkbox */
label.chk {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2);
  font: 500 0.875rem/1 var(--body); white-space: nowrap; cursor: pointer; -webkit-user-select: none; user-select: none;
}
label.chk:hover { border-color: var(--ink-2); }
label.chk input { width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }
@supports selector(:has(*)) {
  label.chk { padding: 0 14px; }
  label.chk input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
  label.chk:has(input:checked) { background: var(--inverse); border-color: var(--inverse); color: var(--inverse-ink); }
  label.chk:has(input:checked)::before {
    content: ""; flex: none; width: 12px; height: 12px; background: currentColor;
    -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat;
  }
  label.chk:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
  label.chk:has(input:disabled) { opacity: .5; cursor: default; }
  label.chk:has(input:disabled):hover { border-color: var(--line-strong); }
}

/* dropdown chip: a quiet label and the chosen value */
.sel {
  display: inline-flex; align-items: center; height: 40px; padding: 0 4px 0 14px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface);
  font-size: 0.875rem; line-height: 1; color: var(--ink-3); white-space: nowrap;
}
.sel select {
  height: 38px; min-height: 0; max-width: 60vw; padding: 0 28px 0 6px; border: 0; border-radius: var(--r-pill);
  background: var(--caret) right 8px center / 14px no-repeat transparent; color: var(--ink);
  font: 600 0.875rem/1 var(--body); text-overflow: ellipsis;
}
.sel:hover { border-color: var(--ink-2); }
.sel:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.sel select:focus-visible { outline: none; }
@media (min-width: 900px) { .sel { margin-left: auto; } }
@media (max-width: 639px) {
  /* the flag chips become one scrolling line that bleeds to the screen edge */
  .controls .seg.flagbar {
    flex-wrap: nowrap; flex: none; width: calc(100% + 2 * var(--gutter)); max-width: none; overflow-x: auto; scrollbar-width: none;
    margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter); margin-block: -4px; scroll-padding-inline: var(--gutter);
  }
  .controls .seg.flagbar::-webkit-scrollbar { display: none; }
  .controls .seg.flagbar button { flex: none; }
}

/* ---------- details / summary ---------- */
summary {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; list-style: none;
  font: 600 0.875rem/1.3 var(--body); color: var(--accent); cursor: pointer;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; flex: none; width: 14px; height: 14px; background: currentColor;
  -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat;
}
details[open] > summary::after { transform: rotate(180deg); }
summary:hover { color: var(--accent-hover); }
details.more > .explain:last-child, details.more > p:last-child { margin-bottom: 0; padding-bottom: 8px; }
.audit-rows { margin: 0 0 12px; }
.audit-rows ul { margin: 0 0 12px; padding-left: 18px; font: 400 0.8125rem/1.5 var(--mono); color: var(--ink-2); }

/* ---------- small tags: statuses are 6px tags, never pills ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; margin: 0 4px 4px 0;
  border: 1px solid transparent; border-radius: var(--r-tag); font: 500 0.75rem/1 var(--body); white-space: nowrap; vertical-align: top;
}
.chip.y::before, .chip.n::before { content: ""; flex: none; width: 10px; height: 10px; background: currentColor; }
.chip.y { background: var(--surface-3); color: var(--ink-2); }
.chip.y::before { -webkit-mask: var(--i-check) center / contain no-repeat; mask: var(--i-check) center / contain no-repeat; }
.chip.n { background: var(--warn-soft); color: var(--warn); text-decoration: none; }
.chip.n::before { -webkit-mask: var(--i-x) center / contain no-repeat; mask: var(--i-x) center / contain no-repeat; }
.chip.u { background: transparent; border: 1px dashed var(--field-line); color: var(--ink-3); }
.chip.u::after { content: "?"; margin-left: 1px; }
td.chips, .chips { line-height: normal; min-width: 0; white-space: normal; }

.badge { display: inline-block; padding: 1px 6px; border-radius: var(--r-tag); background: var(--surface-2); color: var(--ink-2); font: 400 0.75rem/1.4 var(--mono); white-space: nowrap; }
.badge.up { background: var(--surface-2); color: var(--ink-2); }
.badge.down { background: var(--surface-2); color: var(--ink-3); }
.kpap { display: inline-block; padding: 1px 5px; margin-left: 4px; border: 1px solid var(--line-strong); border-radius: var(--r-tag); background: transparent; color: var(--ink-2); font: 400 0.75rem/1.3 var(--mono); letter-spacing: 0.04em; vertical-align: 1px; }
img.flag { width: 20px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); vertical-align: -2px; object-fit: cover; }   /* img only: .read.flag is a state line */
.flag-txt { padding: 1px 4px; border: 1px solid var(--line-strong); border-radius: 4px; font: 400 0.75rem/1.3 var(--mono); letter-spacing: 0.04em; color: var(--ink-2); text-decoration: none; }

/* the one green tag of a list: "Lowest all-in", "Lowest package price", "Lower all-in". Never "Best". */
.tag-best { display: block; width: fit-content; margin: 0 0 4px auto; padding: 2px 7px; border-radius: var(--r-tag); background: var(--ok-soft); color: var(--ok); font: 600 0.75rem/1.3 var(--body); white-space: nowrap; }

/* ---------- read labels and state lines (the wording comes from the build and is never changed here) ---------- */
.op .read { max-width: 36ch; margin-top: 4px; font: 400 0.75rem/1.35 var(--mono); color: var(--ink-3); }
.op .read + .read { margin-top: 2px; }
.op .read .d { color: var(--ink-2); white-space: nowrap; }
.op .meta + .read::before, .op .read.ok::before {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 5px; vertical-align: -2px; background: currentColor;
  -webkit-mask: var(--i-clock) center / contain no-repeat; mask: var(--i-clock) center / contain no-repeat;
}
.op .read.ok { color: var(--ink-2); }
.op .read.ok::before { -webkit-mask-image: var(--i-check); mask-image: var(--i-check); }
.op .read.stale { color: var(--warn); }
.op .read.stale .d { color: inherit; }
.op .read.flag { width: fit-content; padding: 2px 6px; border-radius: var(--r-tag); background: var(--warn-soft); color: var(--warn); }
/* source and date under any table, chart or figure */
.srcline { margin: 8px 0 0; font: 400 0.75rem/1.4 var(--mono); color: var(--ink-3); }
.srcline a { color: inherit; text-decoration: underline dotted; text-underline-offset: 3px; }
.srcline a:hover { color: var(--accent); }
a.src { margin-left: 2px; font: 400 0.75rem/1.3 var(--mono); color: var(--ink-3); text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 3px; white-space: nowrap; }
a.src:hover { color: var(--accent); }

/* ---------- insight banner, callout, quiet notes ---------- */
.insight, .explain.rule {
  position: relative; max-width: 78ch; margin: 0 0 20px; padding: 12px 16px 12px 48px;
  border: 0; border-radius: var(--r-list); background: var(--surface-2); color: var(--ink-2); font-size: 0.9375rem; line-height: 1.5;
}
.insight::before, .explain.rule::before {
  content: ""; position: absolute; left: 16px; top: 13px; width: 20px; height: 20px; background: var(--ink-3);
  -webkit-mask: var(--i-info) center / contain no-repeat; mask: var(--i-info) center / contain no-repeat;
}
.insight strong, .insight b, .explain.rule strong { color: var(--ink); }
.insight.warn { background: var(--warn-soft); color: var(--ink); }
.insight.warn::before { background: var(--warn); }
.insight > :first-child { margin-top: 0; }
.insight > :last-child { margin-bottom: 0; }
.callout { padding: 20px; border-radius: var(--r-tile); background: var(--surface-2); }
.callout p { max-width: 60ch; margin: 6px 0 0; color: var(--ink-2); }
.callout p strong { color: var(--ink); }
.callout > :first-child { margin-top: 0; }
.held-note { max-width: 64ch; margin: 8px 0 0; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }

/* ---------- heart and list popover ---------- */
.save {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink-3); cursor: pointer;
}
.save svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.save:hover { border-color: var(--ink-2); color: var(--ink); }
.save.on { border-color: var(--heart); color: var(--heart); }
.save.on svg { fill: currentColor; }
.listpop {
  position: absolute; z-index: 40; width: 288px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-2);
}
.lp-title { margin-bottom: 4px; font-size: 0.875rem; font-weight: 600; line-height: 1.35; }
.lp-row { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 0.875rem; cursor: pointer; }
.lp-n { margin-left: auto; font: 400 0.8125rem/1 var(--mono); color: var(--ink-3); }
.lp-new { display: flex; gap: 8px; margin-top: 8px; }
.lp-new button { height: 40px; flex: none; }
.lp-link { display: inline-flex; align-items: center; min-height: 40px; margin-top: 4px; font-size: 0.8125rem; font-weight: 600; }
@media (max-width: 639px) {
  /* a bottom sheet on a phone, wherever the heart was */
  .listpop { position: fixed; left: 8px !important; right: 8px; top: auto !important; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; padding: 16px; }
}

/* ---------- photo tile, credit chip, empty picture ---------- */
.hero-pic { position: relative; margin: 0; border-radius: var(--r-stage); overflow: hidden; background: var(--hero); aspect-ratio: 16 / 10; max-height: 440px; }
.hero-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-pic + .hero-in { margin-top: 20px; }   /* only while the photo still precedes the text; page grids place both */
.credit {
  position: relative; display: inline-block; max-width: calc(100% - 20px); padding: 5px 8px; border-radius: var(--r-tag);
  background: var(--scrim); color: var(--hero-ink); font-size: 0.75rem; line-height: 1.3; text-decoration: none;
}
.credit::after { content: ""; position: absolute; inset: -8px -6px; }   /* a 40px touch area around the small chip */
.credit:hover { color: var(--hero-ink); text-decoration: underline; }
.credit:focus-visible { outline-color: var(--hero-ink); box-shadow: 0 0 0 4px var(--scrim); }
.hero-pic .credit { position: absolute; right: 10px; bottom: 10px; z-index: 1; }
.noimg { width: 100%; height: 100%; background: var(--surface-3); }
@media (max-width: 639px) { .hero-pic { border-radius: var(--r-tile); } }

/* ---------- trek card: a thing you browse (no border, no box) ---------- */
.pc { display: flex; flex-direction: column; min-width: 0; color: var(--ink); text-decoration: none; }
.pc:hover { text-decoration: none; }
.pc:focus-visible { outline-offset: 4px; border-radius: var(--r-list); }
.pc-img { position: relative; aspect-ratio: 4 / 3; border-radius: var(--r-list); overflow: hidden; background: var(--surface-3); }
.pc-img img, .pc-img .noimg { display: block; width: 100%; height: 100%; object-fit: cover; }
.pc.planned .pc-img img { filter: saturate(.6); }
.pc-tag { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: var(--r-tag); background: var(--tag-bg); color: var(--tag-ink); font-size: 0.75rem; font-weight: 600; line-height: 1.3; }
.pc-tag.soon { background: var(--scrim); color: var(--hero-ink); }
.pc-body { display: grid; gap: 2px; padding: 10px 2px 0; }
.pc-name { font: 600 1rem/1.25 var(--body); letter-spacing: 0; text-wrap: balance; }
.pc-trek:hover .pc-name, .pc-list:hover .pc-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.pc-meta { font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }
.pc-price { margin-top: 2px; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }
.pc-price b, .pc-price .money { font: 700 1.25rem/1.15 var(--body); color: var(--ink); font-variant-numeric: lining-nums; }
.pc-price.muted { color: var(--ink-3); }
/* in a row of cards the prices share one baseline, whether a name or a meta line takes one line or two */
.pc-trek .pc-body { flex: 1 1 auto; grid-template-rows: auto auto 1fr; }
.pc-trek .pc-price { align-self: end; }

/* place card: the photo fills the tile, the name sits on a scrim */
.pc-continent, .pc-country { position: relative; aspect-ratio: 4 / 5; border-radius: var(--r-tile); overflow: hidden; background: var(--hero); }
.pc-country { aspect-ratio: 1 / 1; }
.pc-continent .pc-img, .pc-country .pc-img { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 0; background: var(--hero); }
.pc-continent .pc-body, .pc-country .pc-body {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 16px 16px;
  background: linear-gradient(180deg, transparent, var(--scrim) 28px);
}
.pc-continent .pc-name, .pc-country .pc-name { font-size: 1.25rem; font-weight: 700; line-height: 1.15; color: var(--hero-ink); }
.pc-continent .pc-meta, .pc-country .pc-meta { color: var(--hero-ink-2); }
/* focus on a photo: a white ring inside the tile, drawn above the picture, with a scrim band on each side of it */
.pc-continent:focus-visible, .pc-country:focus-visible { outline: none; border-radius: var(--r-tile); }
.pc-continent:focus-visible::after, .pc-country:focus-visible::after {
  content: ""; position: absolute; inset: 5px; z-index: 2; pointer-events: none; border: 2px solid var(--hero-ink); border-radius: calc(var(--r-tile) - 5px);
  box-shadow: 0 0 0 2px var(--scrim), inset 0 0 0 2px var(--scrim);
}

/* list card: the one boxed variant */
.pc-list { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--r-list); background: var(--surface); }
.pc-list:hover { border-color: var(--ink-2); }
.pc-list:focus-visible { outline-offset: 2px; }
.pc-list .pc-img { width: 72px; height: 72px; aspect-ratio: 1 / 1; border-radius: 10px; }
.pc-list .pc-body { padding: 0; }
.pc-list .pc-name { font-size: 0.9375rem; line-height: 1.3; }

/* a titled row of cards */
.prow-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.prow-head h2 { margin: 0; }
.prow-sub { max-width: 70ch; margin: -6px 0 14px; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }
.prow-track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 64vw; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: -6px calc(-1 * var(--gutter)); padding: 6px var(--gutter); scroll-padding-inline: var(--gutter);
}
.prow-track::-webkit-scrollbar { display: none; }
.prow-track > * { scroll-snap-align: start; }
@media (min-width: 640px) { .prow-track { grid-auto-columns: 38vw; gap: 20px; } }
@media (min-width: 900px) { .prow-track { grid-auto-columns: 29vw; } }
@media (min-width: 1100px) {
  .prow-track { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 24px; overflow: visible; margin: 0; padding: 0; }
}
@supports selector(:has(*)) {
  /* place tiles are narrower in the track; list cards never scroll sideways */
  @media (max-width: 639px) { .prow-track:has(> .pc-continent), .prow-track:has(> .pc-country) { grid-auto-columns: 56vw; } }
  @media (min-width: 640px) and (max-width: 899px) { .prow-track:has(> .pc-continent), .prow-track:has(> .pc-country) { grid-auto-columns: 30vw; } }
  @media (min-width: 900px) and (max-width: 1099px) { .prow-track:has(> .pc-continent), .prow-track:has(> .pc-country) { grid-auto-columns: 23vw; } }
  .prow-track:has(> .pc-list) { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: minmax(0, 1fr); gap: 12px; overflow: visible; margin: 0; padding: 0; }
  @media (min-width: 640px) { .prow-track:has(> .pc-list) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } }
  @media (min-width: 1100px) { .prow-track:has(> .pc-list) { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
}
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 32px 24px; }
@media (max-width: 639px) {
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .pgrid .pc-name { font-size: 0.9375rem; }
  .pgrid .pc-price b, .pgrid .pc-price .money { font-size: 1.125rem; }
}

/* ---------- statement tile ---------- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; counter-reset: tile; }
.cbox {
  position: relative; display: flex; flex-direction: column; min-height: 168px; padding: 20px 20px 52px;
  border-radius: var(--r-tile); background: var(--surface-2); color: var(--ink); text-decoration: none;
}
.cb-name { max-width: 18ch; font: 700 1.25rem/1.15 var(--display); letter-spacing: -0.01em; text-wrap: balance; }
.cb-blurb, .cb-desc { margin-top: 8px; font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); }
.cb-meta { margin-top: auto; margin-bottom: -30px; padding: 14px 44px 0 0; font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); text-wrap: balance; }
.cb-meta b { font-weight: 500; color: var(--ink); }
a.cbox::after { content: ""; position: absolute; right: 16px; bottom: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); }
a.cbox .cb-name::after {
  content: ""; position: absolute; right: 24px; bottom: 24px; z-index: 1; width: 16px; height: 16px; background: var(--ink);
  -webkit-mask: var(--i-arrow) center / contain no-repeat; mask: var(--i-arrow) center / contain no-repeat;
}
a.cbox:hover { background: var(--surface-3); text-decoration: none; }
a.cbox:hover::after { background: var(--accent); }
a.cbox:hover .cb-name::after { background: var(--accent-ink); }
a.cbox:focus-visible { outline-offset: 2px; }
.cbox.off { background: transparent; border: 1px dashed var(--line-strong); color: var(--ink-3); }
.cbox.off .cb-blurb, .cbox.off .cb-desc { color: var(--ink-3); }
.cgrid.numbered .cbox::before { counter-increment: tile; content: counter(tile, decimal-leading-zero); margin-bottom: 10px; font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; color: var(--ink-3); }
/* the one ink tile: the first tool on the home page */
.cbox.inv, a.cbox.inv:hover { background: var(--inverse); color: var(--inverse-ink); }
.cbox.inv .cb-blurb, .cbox.inv .cb-desc, .cbox.inv .cb-meta, .cgrid.numbered .cbox.inv::before { color: var(--inverse-ink-2); }
.cbox.inv .cb-meta b { color: var(--inverse-ink); }
/* compact: a short row of links to sibling lists */
.cgrid.compact .cbox { min-height: 0; padding: 14px 56px 14px 16px; border-radius: var(--r-card); }
.cgrid.compact .cb-name { max-width: none; font: 600 1rem/1.3 var(--body); letter-spacing: 0; }
.cgrid.compact .cb-meta { margin: 4px 0 0; padding: 0; }
.cgrid.compact a.cbox::after { right: 12px; top: 50%; bottom: auto; margin-top: -16px; }
.cgrid.compact a.cbox .cb-name::after { right: 20px; top: 50%; bottom: auto; margin-top: -8px; }
@media (max-width: 639px) { .cgrid { grid-template-columns: minmax(0, 1fr); gap: 12px; } .cbox { min-height: 0; } }

/* ---------- trek result rows: a hairline list with the price at the right ----------
   Markup (macro treklist; the finder has no .rank and no .tl-pop):
     ol.tl > li.live|planned > span.rank, div.tl-main (a.tl-name + div.tl-meta), span.tl-pic, div.tl-pop, div.tl-status (a.pill.live | span.pill.queue, button.save)
   Phone:    pic | name + meta | price, with the heart under the price; the readership line runs under all three.
   640-899:  rank | pic | name + meta + readership line | price + heart.
   From 900: rank | pic | name + meta | readership | price + heart, the columns shared by every row. */
.tl { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-list); background: var(--surface); overflow: hidden; }
.tl li {
  position: relative; display: grid; align-items: start; column-gap: 12px; row-gap: 2px;
  grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto; grid-template-areas: "pic main price" "pic main save" "pop pop pop";
  padding: 12px; margin-top: -1px; border-top: 1px solid var(--line);
}
.tl li:hover { background: var(--surface-2); }
.tl .rank { grid-area: main; justify-self: start; font-size: 0.8125rem; line-height: 1.5rem; color: var(--ink-3); }
.tl-main { grid-area: main; min-width: 0; text-indent: 24px; }       /* the indent makes room for the rank before the name */
.tl-main > * { text-indent: 0; }
.tl.finder-list .tl-main { text-indent: 0; }
.tl-pic { grid-area: pic; display: block; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.tl-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tl-name { font-size: 1rem; font-weight: 600; line-height: 1.5rem; color: var(--ink); text-decoration: none; text-indent: 0; }
.tl-name::after { content: ""; position: absolute; inset: 0; }                 /* the whole row is the link */
.tl li:hover .tl-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.tl-name:focus-visible { outline: none; }
.tl-name:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }
.tl li:first-child .tl-name:focus-visible::after { border-radius: 11px 11px 0 0; }
.tl li:last-child .tl-name:focus-visible::after { border-radius: 0 0 11px 11px; }
.tl li:only-child .tl-name:focus-visible::after { border-radius: 11px; }
.tl-meta, .tl-sub { font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }
.tl-sub { font-size: 0.75rem; line-height: 1.3; }
.tl-pop { grid-area: pop; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; margin-top: 6px; font-size: 0.875rem; line-height: 1.4; }
.tl-pop .mono { font-family: var(--body); font-variant-numeric: lining-nums; font-weight: 600; color: var(--ink-2); }
.tl-pop .tl-sub { order: 1; }                                                 /* figure, trend tag, then the label: the label is what wraps */
.tl-status { display: contents; }
.tl .pill { grid-area: price; justify-self: end; }
.tl .save { grid-area: save; justify-self: end; }
.tl .save, .tl .pill.live { position: relative; z-index: 1; }                  /* above the row link */
.tl li.planned .tl-name { color: var(--ink-2); }
.tl li.planned .tl-pic img { filter: saturate(.6); }
@media (max-width: 639px) {
  .tl .save { width: 40px; height: 40px; margin: 0 -11px -8px 0; border: 0; background: transparent; }
  .tl .pill.live .pl-v, .tl .pill.live > .money { font-size: 1.125rem; }
  .tl .pill.live .pl-k { font-size: 0.75rem; }
  .tl .pill.live { max-width: 44vw; white-space: normal; }
}
@media (min-width: 640px) {
  .tl li {
    align-items: center; column-gap: 16px; row-gap: 0; padding: 12px 16px;
    grid-template-columns: 28px 56px minmax(0, 1fr) auto; grid-template-rows: auto auto; grid-template-areas: "rank pic main status" "rank pic pop status";
  }
  .tl .rank { grid-area: rank; line-height: 1.4; }
  .tl-main { align-self: end; text-indent: 0; }
  .tl-pop { align-self: start; margin-top: 2px; }
  .tl-status { grid-area: status; display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
  /* the finder has no rank and no readership line */
  .tl.finder-list li { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-rows: auto; grid-template-areas: "pic main status"; }
  .tl.finder-list .tl-main { align-self: center; }
}
@media (min-width: 900px) {
  .tl li { grid-template-columns: 28px 56px minmax(0, 1.4fr) minmax(0, 1fr) auto; grid-template-rows: auto; grid-template-areas: "rank pic main pop status"; }
  .tl-main, .tl-pop { align-self: center; margin-top: 0; }
  /* readership as two lines: the figure with its trend tag, the label under them */
  .tl-pop { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 8px; justify-items: start; }
  .tl-pop .tl-sub { grid-column: 1 / -1; grid-row: 2; }
  .tl-pop .badge { grid-column: 2; grid-row: 1; }
  /* one set of columns for the whole list, so the readership and price columns line up from row to row whatever the
     width of each price. The list owns the tracks and every row borrows them; a row's side padding sits inside the
     first and last track, which is why the first track is 16px wider than the rank. */
  @supports (grid-template-columns: subgrid) {
    .tl:not(.finder-list) { display: grid; grid-template-columns: 44px 56px minmax(0, 1.4fr) minmax(0, 1fr) auto; column-gap: 16px; }
    .tl:not(.finder-list) > li { grid-column: 1 / -1; grid-template-columns: subgrid; }
  }
}

/* ---------- operator list rows ---------- */
.oplist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-list); background: var(--surface); overflow: hidden; }
.oplist li { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 8px 24px; align-items: start; padding: 14px 16px; margin-top: -1px; border-top: 1px solid var(--line); }
@media (max-width: 699px) { .oplist li { grid-template-columns: minmax(0, 1fr); } }
.op-who { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; min-height: 32px; }
.op-who .flag, .op-who .flag-txt { flex: none; }
.op-name, .oplist a.op-name { font-size: 1rem; font-weight: 600; line-height: 1.3; color: var(--ink); text-decoration: none; }
.oplist a.op-name:hover { text-decoration: underline; }
.op-where { font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }
.op-treks { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.op-treks a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 32px; max-width: 100%; padding: 2px 10px;
  border: 1px solid var(--line); border-radius: var(--r-tag); background: var(--surface); color: var(--ink); font-size: 0.8125rem; line-height: 1.3; text-decoration: none;
}
.op-treks a:hover { border-color: var(--ink-2); text-decoration: none; }
.op-trek { color: var(--ink); }
.op-price { display: inline-flex; align-items: baseline; gap: 4px; color: var(--ink); white-space: nowrap; }
.op-price .money { font-family: var(--body); font-variant-numeric: lining-nums; font-weight: 600; color: var(--ink); }
.op-price .from { margin-right: 0; }
@media (max-width: 639px) { .op-treks a { min-height: 40px; } }
/* the filter above the list is the header's search pill */
.opfilter { position: relative; display: block; max-width: 360px; margin: 0 0 16px; font-size: 0; }
.opfilter::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; pointer-events: none;
  background: var(--ink-3); -webkit-mask: var(--i-search) center / contain no-repeat; mask: var(--i-search) center / contain no-repeat;
}
.opfilter input { display: block; width: 100%; height: 44px; min-height: 0; padding: 0 16px 0 44px; border-color: transparent; background: var(--surface-2); font-size: 0.9375rem; }
.opfilter input:hover { border-color: var(--line-strong); }
.opfilter input:focus { background: var(--surface); border-color: var(--accent); }

/* ---------- plain tables: rules, not boxes ---------- */
.tablewrap { border: 0; border-radius: 0; background: none; }
@media (min-width: 640px) and (max-width: 899px) { .tablewrap:not(.board) { overflow-x: auto; } }
table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; }
.optable th, .fees th, .credits th {
  padding: 8px 12px 8px 0; border-bottom: 1.5px solid var(--ink); background: none; text-align: left; vertical-align: bottom;
  font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
}
.optable td, .fees td, .credits td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--ink-2); }
.optable th:last-child, .optable td:last-child, .fees th:last-child, .fees td:last-child, .credits th:last-child, .credits td:last-child { padding-right: 0; }
.optable th.r, .fees th.r, .optable td.r, .fees td.r { text-align: right; }
@media (min-width: 640px) {
  /* a text column right after a column of right-aligned figures needs more than the 12px cell gap */
  :where(.optable, .fees) :where(th, td).r + :where(th, td):not(.r) { padding-left: 16px; }
}
.optable td.r, .fees td.r, .optable td.mono, .fees td.mono { font: 400 0.875rem/1.4 var(--mono); font-variant-numeric: lining-nums; white-space: nowrap; }
.optable td:first-child, .fees td:first-child, .credits td:first-child { color: var(--ink); font-weight: 500; }
.optable td:first-child a, .fees td:first-child a { color: var(--ink); font-weight: 600; }
.optable th a { color: var(--ink); }
.optable td .sub, .fees td .sub { font-family: var(--body); white-space: normal; }
.credits td { overflow-wrap: anywhere; }
@media (max-width: 639px) {
  /* no table scrolls sideways on a phone: each row becomes a block, each cell says what it is (data-label) */
  .optable, .fees, .credits, .optable tbody, .fees tbody, .credits tbody, .optable tr, .fees tr, .credits tr { display: block; }
  .optable thead, .fees thead, .credits thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .optable tbody tr, .fees tbody tr, .credits tbody tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .optable tbody tr:first-child, .fees tbody tr:first-child, .credits tbody tr:first-child { border-top: 1.5px solid var(--ink); }
  .optable td, .fees td, .credits td { display: flow-root; padding: 3px 0; border: 0; white-space: normal; }
  .optable td.r, .fees td.r, .optable td.mono, .fees td.mono { white-space: normal; text-align: right; }
  .optable td:first-child, .fees td:first-child, .credits td:first-child { padding-top: 0; font-size: 1rem; font-weight: 600; line-height: 1.35; text-align: left; }
  .optable td:empty, .fees td:empty { display: none; }
  .optable td[data-label]::before, .fees td[data-label]::before {
    content: attr(data-label); display: block; font: 400 0.8125rem/1.5 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink-3); text-align: left;
  }
  .optable td.r[data-label]::before, .fees td.r[data-label]::before, .optable td.mono[data-label]::before, .fees td.mono[data-label]::before { float: left; margin-right: 16px; }
  .credits td:nth-child(3)::before { content: "By "; color: var(--ink-3); }
  .credits td:nth-child(4)::before { content: "Licence: "; color: var(--ink-3); }
}

/* ---------- the receipt: package + each left-out line = all-in ---------- */
.receipt-wrap { max-width: 440px; filter: var(--shadow-paper); }
.receipt {
  padding: 16px 20px 26px; background: var(--paper);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat,
                conic-gradient(from -45deg at 50% 100%, #000 90deg, #0000 0) bottom / 16px 8px repeat-x;
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - 8px) no-repeat,
                conic-gradient(from -45deg at 50% 100%, #000 90deg, #0000 0) bottom / 16px 8px repeat-x;
}
.pax-note { padding-bottom: 10px; border-bottom: 1px dashed var(--line-strong); }
table.bd { width: 100%; margin: 0; border-collapse: collapse; font-size: 0.875rem; line-height: 1.4; }
table.bd td { padding: 8px 0; border: 0; border-bottom: 1px dashed var(--line); vertical-align: top; color: var(--ink); }
table.bd td:last-child { padding-left: 12px; text-align: right; font: 400 0.875rem/1.4 var(--mono); font-variant-numeric: lining-nums; white-space: nowrap; }
table.bd tr.bd-pkg td:first-child { font-weight: 600; }
table.bd tr.sum td { padding-top: 10px; border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 600; }
table.bd tr.sum td:last-child { font: 700 1.25rem/1.15 var(--body); font-variant-numeric: lining-nums; }
table.bd tr.bd-unk td { color: var(--ink-2); font-style: normal; }
table.bd tr.bd-unk td:last-child { color: var(--warn); }
table.bd tr.bd-high td { border-top: 1px dashed var(--field-line); }
table.bd tr.bd-high td:last-child { font-size: 1.0625rem; }
.pair-note:empty { display: none; }
.pair-note { display: block; font-size: 0.75rem; font-weight: 400; color: var(--warn); }
.unk { max-width: 440px; margin: 16px 0 0; padding: 10px 12px; border: 0; border-radius: var(--r-field); background: var(--warn-soft); color: var(--ink); font-size: 0.8125rem; line-height: 1.4; }

/* ---------- stat row: one ink tile plus unboxed figures ---------- */
.tiles { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-top: 32px; }
.tile { min-width: 0; padding: 20px 24px; background: none; border: 0; }
.tile .k { font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.tile .v { margin-top: 6px; font: 700 1.75rem/1.1 var(--display); letter-spacing: -0.02em; font-variant-numeric: lining-nums; color: var(--ink); overflow-wrap: anywhere; }
.tile .sub { margin-top: 4px; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }
.tile:not(.hi) { border-left: 1px solid var(--line); }
.tile:first-child:not(.hi) { padding-left: 0; border-left: 0; }
.tile.hi + .tile { border-left: 0; }
.tile.hi { border-radius: var(--r-tile); background: var(--inverse); color: var(--inverse-ink); }
.tile.hi .v { font-weight: 800; font-size: clamp(2.25rem, 1.6rem + 3vw, 3.5rem); line-height: 1; letter-spacing: -0.03em; color: var(--inverse-ink); }
.tile.hi .k, .tile.hi .sub, .tile.hi .from { color: var(--inverse-ink-2); }
.tile.hi a { color: var(--inverse-ink); text-decoration: underline; }
.tile.hi :focus-visible { outline-color: var(--inverse-ink); }
@supports selector(:has(*)) {
  @media (min-width: 900px) { .tiles:has(> .tile.hi:first-child) { grid-template-columns: minmax(280px, 1.5fr); } }
  @media (min-width: 640px) and (max-width: 899px) {
    .tiles:has(> .tile.hi) { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 4px; }
    .tiles:has(> .tile.hi) > .tile.hi { grid-column: 1 / -1; }
  }
}
@media (max-width: 639px) {
  .tiles { display: block; margin-top: 24px; }
  .tile.hi { padding: 20px; }
  .tile:not(.hi) { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "k v" "sub v"; column-gap: 16px; align-items: center; padding: 12px 0; border-left: 0; border-top: 1px solid var(--line); }
  .tile:not(.hi) .k { grid-area: k; align-self: end; }
  .tile:not(.hi) .sub { grid-area: sub; align-self: start; margin-top: 2px; }
  .tile:not(.hi) .v { grid-area: v; margin: 0; font-size: 1.25rem; text-align: right; }
  .tile.hi + .tile, .tile:first-child:not(.hi) { border-top: 0; }
}

/* ---------- reference items: a spec sheet, not cards ---------- */
.items { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 24px; }
@media (min-width: 520px) { .items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 760px) { .items { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .items { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.item { padding: 12px 0 20px; border: 0; border-top: 1px solid var(--ink); border-radius: 0; background: none; }
.item .k { font-size: 0.875rem; font-weight: 600; line-height: 1.35; }
.item .v { margin: 4px 0 6px; font: 700 1.25rem/1.15 var(--body); font-variant-numeric: lining-nums; color: var(--ink); }
.item .per { font: 500 0.75rem/1.3 var(--mono); color: var(--ink-3); }
.item .d { font-size: 0.8125rem; line-height: 1.4; color: var(--ink-2); }

/* ---------- three numbered steps ---------- */
.steps3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; counter-reset: step; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 759px) { .steps3 { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.steps3 > div { padding-top: 12px; border-top: 1px solid var(--ink); }
.steps3 > div::before { counter-increment: step; content: counter(step, decimal-leading-zero); display: block; margin-bottom: 8px; font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; color: var(--ink-3); }
.steps3 b { display: block; margin-bottom: 4px; font: 700 1.125rem/1.25 var(--display); letter-spacing: -0.005em; color: var(--ink); }

/* ---------- fact box: a short strip of key, value, source ---------- */
.factbox { padding: 0; border: 0; border-radius: 0; background: none; }
.factbox dl { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); margin: 0; border-bottom: 1px solid var(--line); }
.factbox dt, .factbox dd { margin: 0; padding: 12px 0; border-top: 1px solid var(--line); }
.factbox dt { padding-right: 24px; font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); padding-top: 15px; }
.factbox dd { font-size: 1rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.factbox dd a.src { font-weight: 400; }
@media (min-width: 640px) {
  .factbox dl { grid-template-columns: none; grid-template-rows: auto auto; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: 32px; border-bottom: 0; }
  .factbox dt { padding: 12px 0 0; border-top: 1px solid var(--ink); }
  .factbox dd { padding: 6px 0 0; border-top: 0; font-size: 1.125rem; }
  .factbox dd a.src { display: block; width: fit-content; margin: 4px 0 0; }
}

/* ---------- legends: three 10px swatches in the data colours ---------- */
.legend { margin: 0 0 12px; font-size: 0.8125rem; line-height: 1.6; color: var(--ink-2); }
.legend span:empty, .legend .sw { display: inline-block; width: 10px; height: 10px; margin: 0 6px 0 0; border-radius: 2px; vertical-align: -1px; }
.legend span:empty:not(:first-child), .legend .sw:not(:first-child) { margin-left: 14px; }
.legend .sw-pkg, .legend .lo-in { background: var(--d-pkg); }
.legend .sw-out, .legend .lo-out { background: var(--d-out); }
.legend .sw-unk, .legend .lo-unk { background: repeating-linear-gradient(135deg, var(--d-unk) 0 2px, transparent 2px 5px); outline: 1px dashed var(--ink-3); outline-offset: -1px; }

/* ---------- email signup tile ---------- */
.signup-form { display: grid; gap: 12px; max-width: none; padding: 28px 32px; border-radius: var(--r-tile); background: var(--surface-2); }
.signup-text h2 { margin: 0 0 6px; font-size: 1.375rem; line-height: 1.2; }
.signup-text p { max-width: 52ch; margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }
.signup-row { display: flex; flex-wrap: wrap; gap: 8px; }
.signup-row input[type="email"] { flex: 1 1 200px; }
.signup-row .btn { height: 48px; flex: none; }
.signup-fine { margin: 0; font-size: 0.75rem; line-height: 1.4; color: var(--ink-3); }
.signup-fine a { color: inherit; text-decoration: underline; }
.signup-form .signup-done { display: none; margin: 0; font-size: 0.9375rem; font-weight: 600; color: var(--ink); }
.signup-form.sent .signup-row, .signup-form.sent .signup-fine { display: none; }
.signup-form.sent .signup-done, .signup-form.failed .signup-done { display: block; }
.signup-form.failed .signup-done { color: var(--warn); }
@media (min-width: 800px) {
  .signup-form { grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); column-gap: 32px; row-gap: 8px; align-items: center; }
  .signup-text { grid-column: 1; grid-row: 1 / span 3; }
  .signup-row, .signup-fine, .signup-done { grid-column: 2; }
  .signup-row { align-self: end; }
  .signup-fine { align-self: start; }
}
@media (max-width: 639px) {
  .signup-form { padding: 20px; }
  .signup-row { flex-direction: column; }
  .signup-row input[type="email"] { flex: none; width: 100%; }
  .signup-row .btn { width: 100%; }
}

/* ---------- saved lists (markup rendered by site.js) ---------- */
.saved-tools { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 24px; margin-bottom: 24px; }
.newlist, .signin { display: flex; gap: 8px; flex: 1 1 320px; max-width: 520px; min-width: 0; }
.newlist .btn, .signin .btn { height: 48px; flex: none; }
.account { flex: 1 1 320px; max-width: 520px; min-width: 0; }
.account .note { margin-top: 6px; }
.slist { margin: 0 0 16px; padding: 0; border: 1px solid var(--line); border-radius: var(--r-list); background: var(--surface); overflow: hidden; }
.slist-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 14px 16px; }
.slist-head h2 { margin: 0; font-size: 1.125rem; line-height: 1.25; letter-spacing: -0.005em; }
.slist-head h2[contenteditable="true"] { border-radius: 4px; }
.slist-head h2[contenteditable="true"]:hover { outline: 1px dashed var(--line-strong); outline-offset: 4px; cursor: text; }
.slist-head .tl-sub { font-size: 0.8125rem; }
.slist-head .btn { margin-left: auto; }
.slist > .note { margin: 0; padding: 0 16px 14px; font-size: 0.8125rem; color: var(--ink-3); }
.stl { list-style: none; margin: 0; padding: 0; }
.stl li { display: flex; align-items: center; gap: 4px 12px; min-height: 56px; padding: 6px 8px 6px 16px; border-top: 1px solid var(--line); }
.stl a { font-size: 1rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.stl a:hover { text-decoration: underline; }
.stl .watch { font-size: 0.8125rem; line-height: 1.4; color: var(--ink-2); font-variant-numeric: lining-nums; }
.stl .watch .muted, .stl .watch.muted { color: var(--ink-3); }
.stl .watch .down { color: var(--ok); font-weight: 600; }
.stl .watch .up { color: var(--warn); font-weight: 600; }
.stl .x { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; margin-left: auto; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.stl .x:hover { color: var(--heart); background: var(--surface-2); }
@media (max-width: 639px) {
  .newlist, .signin { flex-basis: 100%; max-width: none; }
  .stl li { flex-wrap: wrap; padding-block: 10px; }
  .stl a { flex: 1 1 60%; min-width: 0; }
  .stl .watch { flex-basis: 100%; order: 3; }
  .stl .x { order: 2; margin: -8px 0; }
}

/* ==========================================================================
   Trek comparison page: stage, board, receipt, planner
   ========================================================================== */
/* ==========================================================================
   Trekoro 2026, part 30: the trek comparison page (trek.html, compare.js)
   The Stage (hero, photo tile, stat row), the chapter strip, the Board (sort tabs,
   operator rows, cost bar), the Receipt inside each row, and the budget planner.
   Builds on parts 00 to 20. Everything here is scoped to classes and ids that only
   a compared trek page carries (.trek-hero, .chapters, #compare, #cmp, #calculator,
   #included, #fees, #versus, #method).
   ========================================================================== */

/* ---------- the Stage: text left, one photo tile right, the stat row under both ---------- */
.trek-hero .titlerow { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 16px; }
.trek-hero .titlerow h1 { min-width: 0; margin: 0; }
.trek-hero .titlerow .save { margin-top: 10px; }
.trek-hero.has-pic .titlerow .save { margin-left: auto; }       /* the heart closes the title row at the edge of its column */
.trek-hero .hero-pic { aspect-ratio: 21 / 9; max-height: none; margin: 0 0 16px; }
.trek-hero .tiles { margin-top: 28px; }
.trek-hero .tile .from { font-size: 0.875rem; font-weight: 500; letter-spacing: 0; margin-right: 2px; }
.trek-hero .tile .v .money { white-space: nowrap; }
/* the ink figure follows the width of its own tile, so a wider currency (NOK 29,924) still fits; a very long one
   (IDR, KRW: the script sets body.long-cur) steps down once more. The stat row is the query container (a tile that
   shares its rows with the others cannot be one): the ink tile is the whole row under 900 and a third of it from 900,
   less its own padding. 16 percent of the tile's inner width, 10.5 percent for a long currency. */
.trek-hero .tiles { container-type: inline-size; }
.trek-hero .tile.hi .v { font-size: min(clamp(2.25rem, 1.6rem + 3vw, 3.5rem), calc(16cqi - 7.7px)); }
.long-cur .trek-hero .tile.hi .v { font-size: min(2.25rem, calc(10.5cqi - 5px)); letter-spacing: -0.02em; }
.long-cur .trek-hero .tile:not(.hi) .v { font-size: 1.25rem; }
.trek-hero .tile.hi .sub { max-width: 40ch; margin-top: 8px; }
@media (max-width: 899px) { .trek-hero .titlerow .save { margin-left: auto; } }
@media (max-width: 639px) {
  .trek-hero .titlerow { gap: 8px; margin-bottom: 12px; }
  .trek-hero .titlerow .save { margin: -4px -4px 0 auto; }
  .trek-hero .hero-pic { margin-bottom: 14px; }
  .trek-hero .answer { font-size: 0.875rem; }
  .trek-hero .tiles { margin-top: 20px; }
  .trek-hero .tile:not(.hi) .from { font-size: 0.75rem; }
}
@media (min-width: 900px) {
  .trek-hero.has-pic {
    display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 48px;
    grid-template-rows: auto auto auto auto auto 1fr auto;          /* the 1fr row takes the slack when the photo is taller than the text */
    grid-template-areas: "eyebrow eyebrow" "title pic" "lead pic" "answer pic" "held pic" ". pic" "tiles tiles";
  }
  .trek-hero.has-pic > .eyebrow { grid-area: eyebrow; }
  .trek-hero.has-pic > .titlerow { grid-area: title; }
  .trek-hero.has-pic > .lead { grid-area: lead; }
  .trek-hero.has-pic > .answer { grid-area: answer; }
  .trek-hero.has-pic > .held-note { grid-area: held; }
  .trek-hero.has-pic > .tiles { grid-area: tiles; }
  .trek-hero.has-pic > .hero-pic { grid-area: pic; align-self: start; aspect-ratio: 4 / 3; margin: 4px 0 0; }
  .trek-hero .tiles { margin-top: 36px; }
  /* the four labels share one line: the plain tiles start where the ink tile's padding ends, and their dividers stop 14px short */
  .trek-hero .tile:not(.hi) { margin-block: 14px; padding-block: 6px 0; }
  .trek-hero .tile.hi .v { font-size: min(clamp(2.25rem, 1.6rem + 3vw, 3.5rem), calc(5.333cqi - 7.7px)); }
  .long-cur .trek-hero .tile.hi .v { font-size: min(2.25rem, calc(3.5cqi - 5px)); }
}
@supports (grid-template-rows: subgrid) and selector(:has(*)) {       /* :has because the foundation places the tiles with it */
  /* label, figure and note of every tile sit in three rows the tiles share: the labels start on one line, the figures
     stand on one baseline and the notes start on one line, also when one label needs two lines */
  @media (min-width: 640px) {
    .trek-hero .tile:not(.hi) { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
  }
  @media (min-width: 900px) {
    .trek-hero .tiles { grid-template-rows: auto auto auto; }
    .trek-hero .tile.hi { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; }
    .trek-hero .tile .v { align-self: baseline; align-self: last baseline; }
  }
}

/* ---------- chapter strip: the one bar that sticks on this page ---------- */
.chapters {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: stretch; justify-content: space-between; gap: 24px;
  height: 48px; margin-top: clamp(24px, 4vw, 40px);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.ch-track { position: relative; display: flex; min-width: 0; margin-left: -12px; overflow-x: auto; scrollbar-width: none; }
.ch-track::-webkit-scrollbar { display: none; }
.ch-track a {
  flex: none; padding: 0 12px; font: 600 0.875rem/48px var(--body); color: var(--ink-2); text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 -2px 0 transparent;
}
.ch-track a:hover { color: var(--ink); text-decoration: none; }
.ch-track a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.ch-track a:focus-visible { outline-offset: -3px; border-radius: 8px; }
.ch-from { display: none; flex: none; align-self: center; font-size: 0.875rem; line-height: 1.3; color: var(--ink-2); white-space: nowrap; }
.ch-from b { font-weight: 700; color: var(--ink); }
@media (min-width: 900px) { .ch-from { display: block; } }
@media (max-width: 899px) {
  /* one scrolling line that runs to the screen edge, fading where more follows */
  .chapters { padding-right: 0; }
  .ch-track { padding-right: 24px; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent); }
}
@media (max-width: 639px) {
  .chapters { height: 44px; }
  .ch-track a { line-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) { .ch-track a { transition: color .12s ease-out, box-shadow .12s ease-out; } }

/* ---------- #compare: section head, the short explanation, the legend ---------- */
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 24px; margin: 0 0 12px; }
.sec-head h2 { margin: 0; }
.plan-jump { margin: 0; font-size: 0.875rem; font-weight: 600; line-height: 1.4; }
.plan-jump a { display: inline-flex; align-items: center; min-height: 40px; }
@media (max-width: 899px) { .sec-head { display: block; } .sec-head h2 { margin-bottom: 2px; } }
#compare > .explain { margin-bottom: 0; }
#compare > details.more { margin: 0 0 12px; }
#compare > details.more > .explain { margin: 0; padding-bottom: 8px; }
#compare > .explain.rule { margin: 0 0 20px; }
#compare .home-hint { margin: -6px 0 8px; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-2); }
#compare .home-hint .linklike { display: inline-flex; align-items: center; min-height: 40px; font-weight: 600; text-decoration: none; }
#compare .home-hint:not(:has(.linklike)) { margin: 0 0 14px; }
#compare .home-hint .linklike:hover { text-decoration: underline; }
#compare .home-hint a { text-decoration: underline; text-decoration-thickness: 1px; }
.bar-legend { margin: 0 0 12px; color: var(--ink-3); }
.bar-legend .bl-k { margin-right: 2px; }
.bar-legend .sw, .bar-legend .sw:not(:first-child) { width: 16px; height: 4px; margin: 0 6px 0 10px; border-radius: 2px; vertical-align: 3px; }
@media (max-width: 639px) { .bar-legend .bl-k { display: none; } .bar-legend .bl-k + .sw:not(:first-child) { margin-left: 0; } }
#compare #empty { max-width: none; margin: 0; padding: 24px 20px; font-size: 0.875rem; line-height: 1.45; color: var(--ink-2); text-align: left; }
@media (max-width: 639px) { #compare #empty { padding-inline: 0; } }
@supports selector(:has(*)) {
  /* when no row is left, the line takes the place of the rows inside the board */
  .board:has(+ #empty:not([hidden])) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  #compare .board + #empty { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--r-list) var(--r-list); background: var(--surface); }
  @media (max-width: 639px) { #compare .board + #empty { margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); border-inline: 0; border-radius: 0; } }
}

@media (max-width: 639px) {
  /* one kind of control per line: the flags, the two-way switch, the two "included" chips, the sorting */
  #compare .controls [data-filter="pax"] { display: flex; flex: 1 1 100%; }
  #compare .controls [data-filter="pax"] button { flex: 1 1 0; }
  #compare .controls label.chk { flex: 1 1 auto; justify-content: center; }
  #compare .controls .sel { flex: 1 1 100%; min-width: 0; }
  #compare .controls .sel select { flex: 1 1 auto; min-width: 0; max-width: none; }
}
@media (max-width: 359px) { #compare .controls label.chk { padding-inline: 10px; } }

/* the two-way switches (Two people / Solo, Rent / Buy) keep their 34px look and get a 40px touch area */
#compare .controls .seg:not(.flagbar) button, .calc-form .gear-mode button { position: relative; }
#compare .controls .seg:not(.flagbar) button::after, .calc-form .gear-mode button::after { content: ""; position: absolute; inset: -3px 0; }

/* ---------- sort tabs: two halves that sit on the board ---------- */
.seg.sorttabs {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 0; overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--line); border-bottom: 0; border-radius: var(--r-list) var(--r-list) 0 0;
}
.seg.sorttabs button {
  display: grid; gap: 2px; align-content: center; justify-content: stretch; justify-items: start; height: auto; min-height: 60px; padding: 10px 20px;
  border-radius: 0; background: transparent; text-align: left; white-space: normal; box-shadow: inset 0 -3px 0 transparent;
}
.seg.sorttabs button + button { border-left: 1px solid var(--line); }
.sorttabs .st-k { font: 600 0.9375rem/1.25 var(--body); color: var(--ink-2); }
.sorttabs .st-v { font: 400 0.8125rem/1.3 var(--body); color: var(--ink-3); }
.sorttabs .st-v .money { font-weight: 600; color: var(--ink); }
.sorttabs.none .st-v { visibility: hidden; }        /* an empty list has no lowest price */
.seg.sorttabs button:hover { background: var(--surface-3); }
.seg.sorttabs button.on, .seg.sorttabs button.on:hover { background: var(--surface); box-shadow: inset 0 -3px 0 var(--ink); }
.seg.sorttabs button.on .st-k { font-weight: 700; color: var(--ink); }
.seg.sorttabs button:focus-visible { outline-offset: -3px; }
.seg.sorttabs button:first-child:focus-visible { border-top-left-radius: var(--r-list); }
.seg.sorttabs button:last-child:focus-visible { border-top-right-radius: var(--r-list); }
@media (max-width: 639px) {
  .seg.sorttabs { margin-inline: calc(-1 * var(--gutter)); border-radius: 0; border-inline: 0; }
  .seg.sorttabs button { padding: 10px var(--gutter); }
  .sorttabs .st-k { font-size: 0.875rem; }
  .seg.sorttabs button:first-child:focus-visible, .seg.sorttabs button:last-child:focus-visible { border-radius: 0; }
}

/* ---------- the Board: the operator table laid out as grid rows ----------
   Phone (under 760): name and read lines left, the price block right, then chips and chevron, then the cost bar.
   Tablet (760 to 1099): operator | days | package | all-in | chevron, the bar under the figures, the chips on a line below.
   Desktop (from 1100): operator | included | days | package | left out | all-in | chevron, the bar under package and left out.
   The flexible rows above and below the figures take the slack of a tall operator cell, so figures and bar stay one block. */
.board { border: 1px solid var(--line); border-radius: 0 0 var(--r-list) var(--r-list); background: var(--surface); overflow: hidden; overflow: clip; }
#cmp, #cmp > thead, #cmp > tbody, #cmp > tbody > tr.detail, #cmp > tbody > tr.detail > td { display: block; }
#cmp { width: 100%; font-size: 1rem; }
#cmp > thead > tr > th, #cmp > tbody > tr > td { padding: 0; border: 0; background: none; text-align: left; vertical-align: baseline; font-weight: inherit; }
#cmp > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
#cmp > tbody { margin-top: -1px; }                 /* the first row's hairline falls on the board's own edge */
#cmp .op, #cmp .h-op { grid-area: op; }
#cmp .c-days, #cmp .h-days { grid-area: days; }
#cmp .c-pkg, #cmp .h-pkg { grid-area: pkg; }
#cmp td.hidden, #cmp .h-hid { grid-area: hid; }
#cmp td.true, #cmp .h-true { grid-area: true; }
#cmp .bar-c { grid-area: bar; }
#cmp td.chips, #cmp .h-chips { grid-area: chips; }
#cmp td.x, #cmp .h-x { grid-area: x; }

#cmp tr.row {
  display: grid; align-items: start; border-top: 1px solid var(--line); cursor: pointer;
  grid-template-columns: minmax(0, 1fr) minmax(0, auto); grid-template-rows: auto 1fr auto auto;
  grid-template-areas: "op true" "op pkg" "chips chips" "bar bar"; column-gap: 12px; row-gap: 6px; padding: 14px var(--gutter);
}
#cmp .c-days, #cmp td.hidden, #cmp .bar-h { display: none; }
#cmp td.true, #cmp .c-pkg { max-width: 46vw; text-align: right; }
#cmp td.chips { align-self: center; margin-bottom: -4px; padding-right: 40px; }      /* the chevron sits in the same line, at the right */
#cmp td.x { grid-area: 3 / 1 / 4 / -1; justify-self: end; align-self: center; margin: -4px -8px -4px 0; }
#cmp .bar-c { width: auto; padding: 0; }

/* cell content */
#cmp .op { min-width: 0; }
#cmp .op .name { font: 600 1rem/1.3 var(--body); color: var(--ink); overflow-wrap: anywhere; }
#cmp .op .meta { margin-top: 3px; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }
#cmp .op .read { overflow-wrap: anywhere; }
#cmp .c-days, #cmp .c-pkg, #cmp td.hidden { font: 400 0.875rem/1.4 var(--mono); font-variant-numeric: lining-nums; color: var(--ink-2); text-align: right; white-space: nowrap; }
#cmp td.hidden { color: var(--warn); }
#cmp td.hidden .upto { display: block; font-size: 0.75rem; line-height: 1.4; }
#cmp .c-pkg { white-space: normal; }
#cmp .c-pkg .pkg, #cmp .orig { white-space: nowrap; }
#cmp .c-pkg .cl { font-size: 0.75rem; color: var(--ink-3); }
#cmp .orig { font: 400 0.75rem/1.4 var(--mono); color: var(--ink-3); }
#cmp .row.nosolo .c-pkg::after { content: "pair price"; display: block; font: 400 0.75rem/1.3 var(--body); color: var(--warn); }

/* the all-in figure: the one the list is ranked by is the large one */
#cmp td.true { min-width: 0; font-family: var(--body); color: var(--ink-2); overflow-wrap: anywhere; }
#cmp td.true .tc { font: 700 1.25rem/1.1 var(--body); letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
#cmp td.true .upto { display: block; font-size: 0.8125rem; line-height: 1.4; font-weight: 500; color: var(--ink-2); }
#cmp td.true .th { white-space: nowrap; }
#cmp[data-big="high"] td.true.ranged .from { font-size: 0.8125rem; line-height: 1.4; color: var(--ink-2); margin-right: 0; }
#cmp[data-big="high"] td.true.ranged .tc { font: 500 0.8125rem/1.4 var(--body); letter-spacing: 0; color: var(--ink-2); }
#cmp[data-big="high"] td.true.ranged .upto { display: inline; }
#cmp[data-big="high"] td.true.ranged .th { display: block; font: 700 1.25rem/1.1 var(--body); letter-spacing: -0.01em; color: var(--ink); }
#cmp[data-big="low"] td.true .th { font-weight: 600; color: var(--ink); }
#cmp td.true .unstated { margin-top: 3px; font: 500 0.75rem/1.3 var(--body); color: var(--warn); }

/* exactly one green figure per list: the first visible row, in the figure the list is ranked by */
#cmp[data-rank="allin"][data-big="high"] .row.best td.true.ranged .th,
#cmp[data-rank="allin"][data-big="low"] .row.best td.true .tc,
#cmp[data-rank="allin"] .row.best td.true:not(.ranged) .tc,
#cmp[data-rank="pkg"] .row.best .pkg { color: var(--ok); }
#cmp[data-rank="pkg"] .c-pkg .pkg { color: var(--ink); }
#cmp[data-rank="pkg"] .row.best .c-pkg .pkg { color: var(--ok); font-weight: 500; }
#cmp .tag-best { margin-bottom: 5px; }

/* the cost bar: package, left out, not stated */
#cmp .bar { display: flex; gap: 2px; height: 4px; min-width: 12px; max-width: 100%; background: none; border-radius: 0; overflow: visible; }
#cmp .bar > span { display: block; height: 100%; min-width: 2px; border-radius: 2px; }
#cmp .bar .b1 { background: var(--d-pkg); }
#cmp .bar .b2 { background: var(--d-out); }
/* not stated: at 4px a diagonal hatch is a smudge, so the same idea is drawn as a broken line */
#cmp .bar .b3, .bar-legend .sw.sw-unk { background: repeating-linear-gradient(90deg, var(--ink-3) 0 3px, transparent 3px 5px); border-radius: 0; outline: 0; }
#cmp .bar .b3 { flex: 1 1 0; min-width: 8px; }
#cmp td.true:not(.ranged) ~ .bar-c .b3 { display: none; }

/* the chevron: the whole row opens, this is its keyboard handle */
#cmp .expand {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); font-size: 0; line-height: 0; cursor: pointer;
}
#cmp .expand::before {
  content: ""; width: 16px; height: 16px; background: currentColor;
  -webkit-mask: var(--i-chev) center / contain no-repeat; mask: var(--i-chev) center / contain no-repeat;
}
#cmp .expand[aria-expanded="true"]::before { transform: rotate(180deg); }
#cmp .expand:hover { background: var(--surface-3); color: var(--ink); }

/* states */
@media (hover: hover) { #cmp tr.row:hover { background: var(--surface-2); } }
#cmp tr.row.open { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--ink); }
#cmp tr.row:target { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
#cmp tr.row:target + tr.detail > td { box-shadow: inset 3px 0 0 var(--accent); }

@media (max-width: 639px) {
  .board { margin-inline: calc(-1 * var(--gutter)); border-inline: 0; border-radius: 0; }
}
@media (max-width: 389px) {
  /* the narrowest phones: "Read by our system <date>" keeps one line beside a four-figure price */
  #cmp tr.row { column-gap: 8px; }
  #cmp .op .meta + .read::before { content: none; }
}
@media (min-width: 640px) and (max-width: 759px) { #cmp tr.row { padding-inline: 20px; } #cmp td.true, #cmp .c-pkg { max-width: 40vw; } }

/* tablet, 760 to 1099 */
@media (min-width: 760px) {
  #cmp > thead { position: static; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none; }
  #cmp > tbody { margin-top: 0; }
  #cmp > thead > tr, #cmp tr.row { display: grid; grid-template-columns: minmax(0, 1fr) 56px 104px 156px 44px; column-gap: 16px; }
  #cmp > thead > tr { grid-template-areas: "op days pkg true x"; align-items: end; padding: 9px 20px 8px; background: var(--surface-2); }
  #cmp > thead th { font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
  #cmp > thead th.r { text-align: right; }
  #cmp tr.row {
    grid-template-rows: 1fr auto auto 1fr auto; row-gap: 0; padding: 16px 20px;
    grid-template-areas: "op . . . x" "op days pkg true x" "op . bar bar x" "op . . . x" "chips chips chips chips x";
  }
  #cmp .op, #cmp td.chips, #cmp td.x { align-self: center; }
  #cmp .c-days, #cmp .c-pkg, #cmp td.true { align-self: baseline; max-width: none; }
  #cmp .c-days { display: block; }
  #cmp .h-hid, #cmp .bar-h, #cmp .h-chips, #cmp .m-days, #cmp .cl { display: none; }
  #cmp td.chips { margin: 12px 0 -4px; }
  #cmp .bar-c { align-self: start; margin-top: 10px; }
  #cmp td.x { grid-area: x; justify-self: center; margin: 0; }
  #cmp td.chips { padding-right: 0; }
  #cmp td.true .tc, #cmp[data-big="high"] td.true.ranged .th { font-size: 1.375rem; }
  #cmp[data-big="high"] td.true.ranged .tc { font-size: 0.8125rem; }
  #cmp td.true .upto { white-space: nowrap; }
  #cmp .row.nosolo .c-pkg::after { content: none; }
  #cmp .row.nosolo .pkg::after { content: "pair price"; display: block; font: 400 0.75rem/1.3 var(--body); color: var(--warn); }
  /* the tag floats above the figure it marks, so the figures of a row keep one baseline */
  #cmp[data-rank="allin"] .row.best td.true, #cmp[data-rank="pkg"] .row.best .c-pkg { position: relative; padding-top: 26px; }
  #cmp .tag-best { position: absolute; top: 0; right: 0; margin: 0; }
  /* a middling currency (NOK 30,792, JPY 495,413: the script sets .midfig) gets a wider all-in column, so "from" and
     the figure stay on one line in every row */
  #cmp.midfig > thead > tr, #cmp.midfig tr.row { grid-template-columns: minmax(0, 1fr) 56px 104px 176px 44px; }
  /* a long currency (IDR, KRW: the script sets .longfig) gets wider money columns and a smaller figure */
  #cmp.longfig > thead > tr, #cmp.longfig tr.row { grid-template-columns: minmax(0, 1fr) 40px 128px 172px 44px; }
  #cmp.longfig td.true .tc, #cmp.longfig[data-big="high"] td.true.ranged .th { font-size: 1.125rem; }
  #cmp.longfig[data-big="high"] td.true.ranged .tc { font-size: 0.8125rem; }
  #cmp.longfig td.true:not(.ranged) .from { display: block; margin: 0 0 1px; }
}
/* desktop, from 1100 */
@media (min-width: 1100px) {
  #cmp > thead > tr, #cmp tr.row { grid-template-columns: minmax(200px, 1fr) minmax(160px, 1.1fr) 56px 104px 104px 156px 44px; }
  #cmp > thead > tr { grid-template-areas: "op chips days pkg hid true x"; }
  #cmp tr.row {
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas: "op chips . . . . x" "op chips days pkg hid true x" "op chips . bar bar true x" "op chips . . . . x";
  }
  #cmp td.hidden, #cmp .h-hid, #cmp .h-chips { display: block; }
  #cmp td.hidden { align-self: baseline; }
  #cmp td.chips { margin: 0 0 -4px; }
  #cmp.midfig > thead > tr, #cmp.midfig tr.row { grid-template-columns: minmax(200px, 1fr) minmax(160px, 1.1fr) 56px 104px 112px 176px 44px; }
  #cmp.longfig > thead > tr, #cmp.longfig tr.row { grid-template-columns: minmax(200px, 1fr) minmax(150px, 1.1fr) 40px 128px 136px 172px 44px; column-gap: 14px; }
}

/* ---------- the opened row: receipt left, notes and facts right ---------- */
#cmp table.bd a.src, #included .item a.src, #fees a.src { position: relative; }      /* a 40px touch area around the small source links */
#cmp table.bd a.src::after, #included .item a.src::after, #fees a.src::after { content: ""; position: absolute; inset: -13px -6px; }
#cmp > tbody > tr.detail > td { padding: 8px var(--gutter) 24px; background: var(--surface-2); box-shadow: inset 3px 0 0 var(--ink); cursor: default; }
@media (min-width: 640px) { #cmp > tbody > tr.detail > td { padding: 8px 20px 28px; } }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.detail-sum { min-width: 0; }
.facts { min-width: 0; }
.facts > p { max-width: 60ch; margin: 0 0 14px; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-2); }
.facts dl { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 16px; margin: 0 0 18px; }
.facts dt { padding-top: 2px; font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin: 0; font-size: 0.875rem; line-height: 1.45; color: var(--ink); }
.facts a.src-op { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.detail-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.detail-actions .op-page { display: inline-flex; align-items: center; min-height: 40px; margin-right: 8px; font-size: 0.875rem; font-weight: 500; }
@media (min-width: 900px) {
  .detail-grid { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 40px; }
  .facts { padding-top: 8px; }
}
@media (max-width: 899px) {
  /* the two buttons follow the receipt; notes, facts and the small links come after */
  .facts { display: flex; flex-direction: column; }
  .detail-actions { order: -1; margin-bottom: 18px; }
  .facts dl { margin-bottom: 0; }
  .detail-actions .op-page { order: 3; }
}
@media (max-width: 639px) {
  .detail-sum .receipt-wrap, .detail-sum .unk { max-width: none; }
  .detail-actions a.visit, .detail-actions .plan-btn { width: 100%; }
}
@media (max-width: 519px) {
  .facts dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .facts dd { margin-bottom: 10px; }
  .facts dd:last-child { margin-bottom: 0; }
}

/* ---------- the budget planner: choices left, the running total always in view ---------- */
.calc { display: block; }
.calc-form { display: grid; gap: 24px; align-content: start; min-width: 0; }
.calc-form label { display: grid; gap: 6px; min-width: 0; font-size: 0.875rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.calc-form .cf-k { display: block; }
.calc-form select, .calc-form input[type="number"] { width: 100%; min-height: 48px; font-weight: 400; }
.calc-form #c-op { min-height: 56px; padding-left: 14px; border: 1.5px solid var(--ink); font-weight: 600; }
.calc-form .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: end; }
@media (max-width: 519px) { .calc-form .two-col { gap: 12px; } }
@media (max-width: 519px), (min-width: 900px) and (max-width: 1099px) {
  .calc-form .two-col:not(.nums) { grid-template-columns: minmax(0, 1fr); gap: 16px; }     /* the select needs the full width to say what it says */
}
.calc-form .hint { display: block; font-size: 0.8125rem; font-weight: 400; line-height: 1.4; color: var(--ink-3); }
.calc-form .slider { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; column-gap: 12px; }
.calc-form .slider #c-spend-out { font: 700 1.125rem/1.2 var(--body); font-variant-numeric: lining-nums; color: var(--ink); text-align: right; }
.calc-form .slider input[type="range"] { grid-column: 1 / -1; width: 100%; height: 28px; margin: 0; accent-color: var(--ink); cursor: pointer; }
.calc-form .slider .hint { grid-column: 1 / -1; }

/* option cards: gear, unstated items, own room */
.calc-form fieldset.gear { min-width: 0; margin: 0; padding: 0; border: 0; }
.calc-form .gear legend { padding: 0; margin: 0 0 6px; font-size: 0.875rem; font-weight: 600; line-height: 1.35; color: var(--ink); }
.calc-form .gear-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 16px; margin: 0 0 4px; }
.calc-form .gear-head .hint { max-width: 52ch; }
.calc-form .gear-mode { flex: none; }
.calc-form .gear > .hint { margin-top: 10px; }
.calc-form .gear-item, .calc-form .chk-inline {
  display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; row-gap: 1px;
  min-height: 48px; margin-top: 8px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-field); background: var(--surface);
  font-size: 0.9375rem; font-weight: 500; line-height: 1.35; color: var(--ink); cursor: pointer;
}
.calc-form .chk-inline { margin-top: 0; }
.calc-form .gear-item:hover, .calc-form .chk-inline:hover { border-color: var(--ink-2); }
.calc-form .gear-item input, .calc-form .chk-inline input { grid-column: 1; grid-row: 1 / span 2; }
.calc-form .gear-item > span { grid-column: 2; min-width: 0; }
.calc-form .gear-item .gi-state { grid-row: 2; font-size: 0.8125rem; font-weight: 400; line-height: 1.4; color: var(--ink-3); }
.calc-form .gear-item .gi-state:empty { display: none; }
.calc-form .gear-item .gi-price, .calc-form .gear-item > .money { grid-column: 3; grid-row: 1 / span 2; justify-self: end; font: 400 0.875rem/1.4 var(--mono); font-variant-numeric: lining-nums; color: var(--ink-2); white-space: nowrap; }
.calc-form .chk-inline .ci-t { grid-column: 2 / -1; min-width: 0; }
.calc-form .chk-inline .tl-sub { display: block; font-size: 0.8125rem; font-weight: 400; line-height: 1.4; color: var(--ink-3); }
.calc-form .chk-inline .tl-sub:empty { display: none; }
@supports selector(:has(*)) {
  .calc-form .gear-item:not(.in-pkg):has(input:checked), .calc-form .chk-inline:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 0.5px var(--ink); }   /* an item the package provides is not a choice */
  .calc-form .gear-item:has(input:focus-visible), .calc-form .chk-inline:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
  .calc-form .gear-item:has(input:focus-visible) input, .calc-form .chk-inline:has(input:focus-visible) input { outline: none; }
  .calc-form .chk-inline:has(input:disabled) { border-style: dashed; color: var(--ink-3); cursor: default; }
  .calc-form .chk-inline:has(input:disabled):hover { border-color: var(--line-strong); }
}
.calc-form .gear-item.in-pkg, .calc-form .gear-item.in-pkg:hover { border: 1px dashed var(--line-strong); box-shadow: none; color: var(--ink-3); cursor: default; }
.calc-form .gear-item.in-pkg .gi-price { display: none; }
.calc-form .gear-sum { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-strong); font-size: 0.875rem; line-height: 1.45; color: var(--ink-2); }
.calc-form .gear-sum .money { font-weight: 500; color: var(--ink); }
@media (max-width: 519px) {
  /* rent and buy prices move under the name, so a long name keeps the width */
  .calc-form .gear-item .gi-price { grid-column: 2; grid-row: 3; justify-self: start; font-size: 0.8125rem; white-space: normal; }
  .calc-form .gear-item input { grid-row: 1 / span 3; }
  .calc-form .gear-head { flex-wrap: wrap; }
}

/* the summary */
.calc-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; }
.calc-bar .cb-sum { display: contents; }
.calc-bar .eyebrow { grid-column: 1; grid-row: 1; }
.calc-bar .total { grid-column: 1 / -1; grid-row: 2; margin: 8px 0 6px; font: 800 clamp(2.25rem, 1.6rem + 3vw, 3.5rem)/1 var(--display); letter-spacing: -0.03em; font-variant-numeric: lining-nums; color: var(--ink); white-space: nowrap; }
.calc-bar .total.long { font-size: 2.25rem; letter-spacing: -0.02em; }
.calc-bar .perday { grid-column: 1 / -1; grid-row: 3; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-2); }
.calc-bar .perday .mono { font-family: var(--body); font-weight: 600; color: var(--ink); }
.calc-bar #c-copy { grid-column: 2; grid-row: 1; }
.calc-out .receipt-wrap { max-width: none; margin-top: 20px; }
.calc-out .unk { max-width: none; }
.calc-out a.visit.c-visit { display: flex; width: 100%; margin-top: 20px; white-space: normal; text-align: center; height: auto; min-height: 44px; padding-block: 8px; line-height: 1.25; }
.calc-out .export { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.calc-out .export .btn { flex: 1 1 0; padding: 0 12px; font-size: 0.875rem; }
.calc-out .export-note { margin: 10px 0 0; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }
.calc-out .export-note:empty { display: none; }

@media (min-width: 900px) {
  .calc { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: start; }
  .calc-form { max-width: 640px; }
  .calc-out {
    position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow: auto; scrollbar-width: thin;
    padding: 24px; border-radius: var(--r-tile); background: var(--surface-2);
  }
  /* one solid button per view: the operator link; copying is a quiet pill beside the label */
  .calc-bar #c-copy { height: 40px; padding: 0 16px; font-size: 0.8125rem; background: transparent; border-color: var(--field-line); color: var(--ink); }
  .calc-bar #c-copy:hover { background: var(--surface-3); border-color: var(--ink); }
}
@media (max-width: 899px) {
  /* the total bar: fixed to the bottom of the screen while the choices scroll, then it settles above the receipt */
  .calc-out { display: contents; }
  .calc-bar {
    position: sticky; bottom: 0; z-index: 15; margin: 24px calc(-1 * var(--gutter)) 0;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: var(--shadow-up);
  }
  .calc-bar .total, .calc-bar .total.long { margin: 2px 0 0; font-size: 1.5rem; letter-spacing: -0.02em; grid-column: 1; }
  .calc-bar .eyebrow { letter-spacing: 0.02em; }
  .calc-bar .perday { display: none; }
  .calc-bar #c-copy { grid-row: 1 / span 2; padding: 0 18px; }
}
@media (min-width: 640px) and (max-width: 899px) {
  .calc-out .receipt-wrap, .calc-out .unk { max-width: 520px; }
  .calc-out a.visit.c-visit { display: inline-flex; width: auto; }
  .calc-out .export .btn { flex: none; }
  .calc-out a.visit.c-visit + .export { margin-top: 12px; }
}

/* ---------- what is in a price, official fees, compare with, how we count ---------- */
#included .srcline, #fees .srcline { margin-top: 4px; }
#fees .tablewrap, #fees .srcline { max-width: var(--col); }
#fees td a.src:first-child { margin-left: 0; }
@media (min-width: 640px) { #fees .fees th:first-child { width: 46%; } }
#fees .srcline { margin-top: 10px; }
#versus .pill-links { margin-bottom: 10px; }
#versus .pill-links .btn { height: 40px; }
#versus .explain { margin: 0; color: var(--ink-3); }

/* ==========================================================================
   Home and finder
   ========================================================================== */
/* ==========================================================================
   Trekoro 2026, part 40: home and finder
   The search card (home: a search row over three fields and one button; finder: the
   form itself), the home stage and its sections, the finder column.
   Builds on parts 00 to 20; every colour is a token.
   ========================================================================== */

/* ---------- search card: one white card, a few fields, one button ---------- */
.searchcard, .finder-form {
  position: relative; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
}
.searchcard { box-shadow: var(--shadow-2); }
.finder-form { box-shadow: var(--shadow-1); }
/* in the dark theme the shadow is a 1px ring; the card's own line steps aside so the edge is one line, not two */
@media (prefers-color-scheme: dark) { .searchcard, .finder-form { border-color: transparent; } }

/* a field: a small label over the chosen value. The select fills the whole field, so a press anywhere opens it,
   and its own focus ring is the field's ring. */
.sc-field, .finder-form > label { position: relative; display: block; min-width: 0; border-radius: var(--r-field); }
.sc-k {
  position: absolute; left: 14px; right: 12px; top: 10px; z-index: 1; pointer-events: none;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 0.75rem/1.3 var(--body); color: var(--ink-3);
}
.sc-field select, .finder-form > label select {
  display: block; width: 100%; height: 60px; min-height: 0; padding: 24px 30px 6px 14px;
  border: 0; border-radius: var(--r-field); background: var(--caret) right 10px bottom 14px / 14px no-repeat transparent;
  color: var(--ink); font: 600 1rem/1.3 var(--body); text-overflow: ellipsis; cursor: pointer;
}
.sc-field select:hover, .finder-form > label select:hover { background-color: var(--surface-2); }
.sc-field select:focus-visible, .finder-form > label select:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
@supports selector(:has(*)) {
  /* a field with a chosen value carries a small ink dot after its label (the sort always has a value, so it has none) */
  .sc-field:has(option:checked:not([value=""])) .sc-k::after,
  .finder-form > label:not(.sc-sort):has(option:checked:not([value=""])) .sc-k::after {
    content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--ink); vertical-align: 1px;
  }
}
/* hairlines between fields live in the gaps of the grid (9px across, 5px down): a short vertical before a field,
   a horizontal above a field in a later row. Each layout below switches them on with content. */
.sc-field::before, .finder-form > label::before {
  position: absolute; left: -5px; top: 12px; bottom: 12px; width: 1px; background: var(--line); pointer-events: none;
}
.sc-field::after, .finder-form > label::after {
  position: absolute; left: 0; right: 0; top: -3px; height: 1px; background: var(--line); pointer-events: none;
}

/* ---------- home: the search card ---------- */
.bigsearch { position: static; }                       /* the suggestions hang from the card, not from the field */
.searchcard::before {
  content: ""; position: absolute; left: 19px; top: 26px; z-index: 1; width: 20px; height: 20px; pointer-events: none;   /* the glass starts on the labels' left edge */
  background: var(--ink-3); -webkit-mask: var(--i-search) center / contain no-repeat; mask: var(--i-search) center / contain no-repeat;
}
.bigsearch input {
  display: block; width: 100%; height: 56px; min-height: 0; padding: 0 6px 0 42px;
  border: 0; border-radius: var(--r-field); background: transparent; box-shadow: none; color: var(--ink);
  font: 400 1.0625rem/1.2 var(--body); -webkit-appearance: none; appearance: none;
}
.bigsearch input::placeholder { color: var(--ink-3); opacity: 1; }
.bigsearch input::-webkit-search-decoration { -webkit-appearance: none; }
.bigsearch input::-webkit-search-cancel-button, .hsearch input::-webkit-search-cancel-button, .opfilter input::-webkit-search-cancel-button {
  -webkit-appearance: none; appearance: none; width: 28px; height: 40px; margin: 0 0 0 4px; cursor: pointer;   /* the browser's blue cross, redrawn in ink */
  background: var(--ink-3); -webkit-mask: var(--i-x) center / 14px no-repeat; mask: var(--i-x) center / 14px no-repeat;
}
.bigsearch input::-webkit-search-cancel-button:hover, .hsearch input::-webkit-search-cancel-button:hover, .opfilter input::-webkit-search-cancel-button:hover { background: var(--ink); }
.bigsearch input:hover { background: var(--surface-2); }
.bigsearch input:focus { background: var(--surface); outline: 2px solid var(--accent); outline-offset: 0; }
.searchcard .sresults { left: -1px; right: -1px; }     /* as wide as the card, border to border */

/* The three fields and the button. The widest layout is four in a row; the card then steps down by its own width
   (the text column is the container), so no value is cut off in any column or currency that fits the wide one:
   from 672px  Where | Budget | Days | button
   544 to 671  Where | Budget | Days, the button on its own row
   404 to 543  Where, then Budget | Days, then the button
   under 404   one field per row, then the button */
.sc-form {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) minmax(0, 1.04fr) auto; gap: 8px 9px; align-items: center;
  margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line);
}
.sc-form .sc-field:nth-child(n+2)::before { content: ""; }
.sc-go { height: 48px; padding: 0 20px; margin-left: 3px; }
@media (max-width: 639px) {
  /* a phone in a browser without container queries: one field per row */
  .sc-form { grid-template-columns: minmax(0, 1fr); row-gap: 5px; }
  .sc-form .sc-field:nth-child(n)::before { content: none; }
  .sc-form .sc-field:nth-child(n+2)::after { content: ""; }
  .sc-go { grid-column: 1 / -1; width: 100%; margin: 3px 0 0; }
}
@container stage (max-width: 671px) {
  .sc-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1.18fr) minmax(0, 1.04fr); row-gap: 8px; }
  .sc-form .sc-field:nth-child(n+2)::before { content: ""; }
  .sc-form .sc-field:nth-child(n)::after { content: none; }
  .sc-go { grid-column: 1 / -1; width: 100%; margin: 0; }
}
@container stage (max-width: 543px) {
  .sc-form { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 5px; }
  .sc-form .sc-field:first-child { grid-column: 1 / -1; }
  .sc-form .sc-field:nth-child(2)::before { content: none; }
  .sc-form .sc-field:nth-child(n+2)::after { content: ""; }
  .sc-form .sc-field:nth-child(2)::after { right: -5px; }
  .sc-form .sc-field:nth-child(3)::after { left: -5px; }
  .sc-go { margin-top: 3px; }
}
@container stage (max-width: 403px) {
  .sc-form { grid-template-columns: minmax(0, 1fr); }
  .sc-form .sc-field:nth-child(n)::before { content: none; }
  .sc-form .sc-field:nth-child(n+2)::after { left: 0; right: 0; }
}
@media (max-width: 639px) {
  .searchcard::before { top: 24px; }
  .bigsearch input { height: 52px; }
  .searchcard .sresults { top: 68px; }                 /* right under the search row, where the keyboard leaves room */
}

/* ---------- home: the stage ---------- */
.hero.home { padding-bottom: 0; }
/* the text column is the container the search card and the shortcuts measure themselves against;
   z-index keeps the suggestions above the photo tile and the cards that follow */
.hero.home .hero-in { position: relative; z-index: 1; min-width: 0; container: stage / inline-size; }
.hero.home:not(.has-pic) .hero-in { max-width: 760px; }   /* no photo: the card keeps its width instead of spanning the page */
/* the facts line: a dot is drawn before every fact, and the first 22px of each line are clipped away,
   so a wrapped line neither starts nor ends with a dot */
.hero.home .hero-facts { display: flex; flex-wrap: wrap; margin: 0 0 14px -22px; clip-path: inset(0 0 0 22px); }
.hero-facts span { position: relative; padding-left: 22px; white-space: nowrap; }
.hero-facts span::before { content: "\00b7"; position: absolute; left: 0; width: 22px; text-align: center; letter-spacing: 0; }
.hero.home .lead { margin: 0; }
.hero.home .searchcard { margin-top: 24px; }

/* continent shortcuts: chips with a round photo */
.hero-conts { display: flex; flex-wrap: wrap; gap: 8px 6px; margin-top: 16px; }
.hero-conts a {
  position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; height: 44px; padding: 0 12px 0 5px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--surface); color: var(--ink);
  font: 600 0.875rem/1 var(--body); text-decoration: none; white-space: nowrap;
}
.hero-conts a:hover { border-color: var(--ink-2); text-decoration: none; }
.hc-pic { flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: var(--surface-3); }
.hc-pic img, .hc-pic .noimg { display: block; width: 100%; height: 100%; object-fit: cover; }
.hero-conts b { margin-left: -2px; font: 400 0.8125rem/1 var(--mono); font-variant-numeric: lining-nums; color: var(--ink-3); }
/* five chips fit one line in a full-width text column; in a narrower one they break three and two, never four and one */
@container stage (max-width: 671px) { .hero-conts { max-width: 440px; } }

/* the photo tile: after the text on small screens, beside it from 900px */
.hero.home .hero-pic { margin-top: 24px; }
@media (max-width: 639px) {
  /* shortcuts in one scrolling line that bleeds to the screen edge */
  .hero-conts {
    flex-wrap: nowrap; max-width: none; overflow-x: auto; scrollbar-width: none; margin: 12px calc(-1 * var(--gutter)) -4px;
    padding: 4px var(--gutter); scroll-padding-inline: var(--gutter);
  }
  .hero-conts::-webkit-scrollbar { display: none; }
}
@media (min-width: 640px) and (max-width: 899px) {
  .hero.home .hero-pic { margin-top: 32px; aspect-ratio: 2 / 1; }
}
@media (min-width: 900px) {
  .hero.home { padding-top: 40px; }
  .hero.home.has-pic { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 48px; align-items: stretch; }
  /* the tile is as tall as the text column, so the two end on one line */
  .hero.home .hero-pic { margin-top: 0; aspect-ratio: auto; max-height: none; min-height: 440px; }
  .hero.home .hero-pic img { position: absolute; inset: 0; }
}

/* ---------- home: sections ---------- */
/* "Compared operator by operator": every card is in the page. From 1100px site.js folds the grid to two rows and
   shows the button; under 1100px it is the snap track, and without JavaScript nothing is folded. */
.prow-all { display: none; margin: 24px 0 0; }
@media (min-width: 1100px) {
  .prow-fold.folded .prow-track > :nth-child(n+9) { display: none; }
  .prow-fold.folded .prow-all { display: block; }
}

/* "Plan with the numbers": four statement tiles, the first in ink */
.tools-grid { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) {
  .tools-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .tools-grid .cbox { min-height: 208px; }
}

/* "By continent": a snap track on phones, three across from 640px, all six in one row from 1100px */
.prow-places .prow-track { grid-auto-columns: 56vw; }
@media (min-width: 640px) {
  .prow-places .prow-track {
    grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px;
    overflow: visible; margin: 0; padding: 0;
  }
  .prow-places .pc-continent { aspect-ratio: 4 / 3; }
}
@media (min-width: 1100px) {
  .prow-places .prow-track { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .prow-places .pc-continent { aspect-ratio: 4 / 5; }
  .prow-places .pc-body { padding: 36px 14px 14px; }
}

.how h2 { margin-bottom: 20px; }

/* ---------- finder ---------- */
.finder > * { max-width: 960px; }                      /* the card, the count and the list share one column */
/* The form is the card. Its grid follows the width so that no chosen value is cut off:
   under 480px  one field per row
   480 to 639   Budget across, then Days | Highest point, Region | Sort
   640 to 1099  Budget | Days | Highest point, then Region | Sort
   from 1100px  all five in a row, each column as wide as its longest value needs */
.finder-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px 9px; margin: 0; }
.finder-form > label:nth-of-type(n+2)::after { content: ""; }
.finder-checks { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3px; padding: 12px 6px 4px; border-top: 1px solid var(--line); }
@media (min-width: 480px) {
  .finder-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .finder-form > label:first-of-type { grid-column: 1 / -1; }
  .finder-form > label:nth-of-type(2n+3)::before { content: ""; }
  .finder-form > label:nth-of-type(2n+2)::after { right: -5px; }
  .finder-form > label:nth-of-type(2n+3)::after { left: -5px; }
}
@media (min-width: 640px) {
  .finder-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .finder-form > label:first-of-type { grid-column: auto; }
  .finder-form > label:nth-of-type(5) { grid-column: span 2; }
  .finder-form > label:nth-of-type(n)::before { content: ""; }
  .finder-form > label:nth-of-type(3n+1)::before { content: none; }
  .finder-form > label:nth-of-type(n)::after { content: none; left: 0; right: 0; }
  .finder-form > label:nth-of-type(n+4)::after { content: ""; }
  .finder-form > label:nth-of-type(4)::after { right: -5px; }
  .finder-form > label:nth-of-type(5)::after { left: -5px; }
}
@media (min-width: 1100px) {
  .finder-form { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1.04fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1.24fr); }
  .finder-form > label:nth-of-type(5) { grid-column: auto; }
  .finder-form > label:nth-of-type(n)::before { content: ""; }
  .finder-form > label:nth-of-type(1)::before { content: none; }
  .finder-form > label:nth-of-type(n)::after { content: none; }
}
/* the facts under a name: a dot before each fact, the first 10px of every line clipped away, so on a phone the
   wrapped line neither starts nor ends with a dot. Clicks fall through to the row link underneath. */
.finder-list .tl-meta { display: flex; flex-wrap: wrap; margin-left: -10px; clip-path: inset(0 0 0 10px); pointer-events: none; }
.finder-list .tl-meta .nw { padding-left: 10px; }
.finder-list .tl-meta .nw::before { content: "\00b7"; display: inline-block; width: 10px; margin-left: -10px; text-align: center; }
/* on a phone the heart sits against the list's clipped edge: its focus ring is drawn inside the 40px target */
@media (max-width: 639px) { .tl .save:focus-visible { outline-offset: -3px; } }
.finder-count { margin: 20px 0 8px; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--ink); }
.finder .insight { margin: 0; text-wrap: pretty; }
@supports selector(:has(*)) {
  .finder-list:not(:has(> li:not([hidden]))) { display: none; }   /* no empty frame above "Nothing matches" */
}

/* ==========================================================================
   Trek against trek, operators, places, lists, saved, planned trek
   ========================================================================== */
/* ==========================================================================
   Trekoro 2026, part 50: comparison and browse pages
   Trek against trek and its index, the operator page and the operator list,
   country and continent, lists, saved, the planned trek.
   Builds on parts 00 to 20; every colour is a token from part 00.
   ========================================================================== */

/* ---------- trek against trek (versus.html) ----------
   Two photo cards, then the same attributes in the same order for both treks. The body sits in the 880px column. */
.vs-col > * { max-width: var(--col); }

.vs-head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, auto); gap: 0 12px; margin: 0 0 24px; }
.vs-card { display: flex; flex-direction: column; min-width: 0; color: var(--ink); text-decoration: none; }
@supports (grid-template-rows: subgrid) {
  /* photo, name, facts and price sit on shared rows, so the two cards line up when one name wraps */
  .vs-card { display: grid; grid-row: span 4; grid-template-rows: subgrid; }
}
.vs-card:hover { text-decoration: none; }
.vs-card:focus-visible { outline-offset: 6px; border-radius: var(--r-tile); }
.vs-pic { aspect-ratio: 4 / 3; border-radius: var(--r-tile); overflow: hidden; background: var(--surface-3); }
.vs-pic img, .vs-pic .noimg { display: block; width: 100%; height: 100%; object-fit: cover; }
.vs-name { margin-top: 12px; font: 700 1.125rem/1.25 var(--display); letter-spacing: -0.005em; text-wrap: balance; }
.vs-card:hover .vs-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.vs-meta { margin-top: 2px; font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }
.vs-price { display: flex; flex-wrap: wrap; align-items: center; align-content: start; gap: 6px 12px; margin-top: 8px; }
.vs-fig { font-size: 0.8125rem; line-height: 1.4; color: var(--ink-3); }
.vs-fig .money { font: 700 1.375rem/1.1 var(--display); letter-spacing: -0.02em; font-variant-numeric: lining-nums; color: var(--ink); white-space: nowrap; }
.vs-card.win .vs-fig .money { color: var(--ok); }
.vs-price .tag-best { margin: 0; }
@media (min-width: 640px) {
  .vs-head { column-gap: 24px; margin-bottom: 32px; }
  .vs-name { margin-top: 14px; }
  .vs-fig { white-space: nowrap; }
  .vs-fig .money { font-size: 1.75rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .vs-pic img { transition: transform .24s ease-out; }
  .vs-card:hover .vs-pic img { transform: scale(1.03); }
}

/* the compare rows: label, value, value. A real table from 640px with fixed columns, so the second table
   ("operators that run both") lines up with the first; its head sticks under the site header */
.tablewrap.vs-wrap { overflow: visible; }     /* a scrolling wrapper would stop the head from sticking */
.optable.vs thead th {
  padding: 14px 0 12px 16px; border-bottom: 0; background: var(--ground); box-shadow: inset 0 -1px 0 var(--line);
  font: 700 1rem/1.25 var(--body); letter-spacing: -0.005em; text-transform: none; color: var(--ink);
}
.optable.vs thead th:first-child { padding-left: 0; }
.optable.vs thead th a { position: relative; color: var(--ink); }
.optable.vs thead th a::after { content: ""; position: absolute; inset: -14px 0 -12px; }      /* the whole head cell is the target */
.optable.vs td { padding: 14px 0 14px 16px; vertical-align: baseline; }
.optable.vs td:first-child { padding-left: 0; font-size: 0.9375rem; font-weight: 400; color: var(--ink-2); }
.optable.vs td.r { font: 600 1.0625rem/1.3 var(--body); font-variant-numeric: lining-nums; color: var(--ink); white-space: normal; }
.optable.vs td .sub { font-weight: 400; }
.optable.vs td a { position: relative; color: var(--ink); }
.optable.vs td a::after { content: ""; position: absolute; inset: -13px -8px; }               /* a 48px target in a 50px row */
.optable.vs td.win, .optable.vs td.win a { color: var(--ok); }
/* group label: each group reads as its own small rule table */
.optable.vs .vs-group th { padding: 28px 0 8px; border-bottom: 1px solid var(--ink); }
/* operators that run both: the same columns, the operator as the row label */
.optable.vs-both thead th:first-child { font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); vertical-align: bottom; }
.optable.vs-both td:first-child { color: var(--ink); }
@media (min-width: 640px) {
  .optable.vs { table-layout: fixed; }
  .optable.vs thead th:first-child { width: 37.5%; }
  .optable.vs thead th { position: sticky; top: 64px; z-index: 5; }
}
@media (max-width: 639px) {
  /* each row is a block: the label on its own line, the two values side by side under the two names that stay in view */
  .optable.vs thead {
    position: sticky; top: 0; z-index: 5; display: block; width: auto; height: auto; overflow: visible; clip: auto; clip-path: none;
    background: var(--ground); box-shadow: inset 0 -1px 0 var(--line);
  }
  .optable.vs tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  .optable.vs thead th { padding: 11px 0; background: none; box-shadow: none; font-size: 0.875rem; text-align: left; }
  .optable.vs thead th:first-child { display: none; }
  .optable.vs thead th a::after { inset: -12px 0; }
  .optable.vs tbody tr { padding: 10px 0 11px; border-bottom: 1px solid var(--line); }
  .optable.vs tbody tr:first-child { border-top: 0; }
  .optable.vs td, .optable.vs td.r { display: block; padding: 0; text-align: left; }
  .optable.vs td:first-child { grid-column: 1 / -1; padding: 0 0 2px; font-size: 0.8125rem; font-weight: 400; line-height: 1.4; color: var(--ink-3); }
  .optable.vs td.r[data-label]::before { content: none; }
  .optable.vs tbody tr.vs-group { padding: 22px 0 6px; border-bottom: 1px solid var(--ink); }
  .optable.vs .vs-group th { display: block; grid-column: 1 / -1; padding: 0; border: 0; }
  /* operators that run both: the operator's name, then its two prices; every link keeps a 40px target of its own */
  .optable.vs-both tbody tr { padding: 12px 0; row-gap: 20px; }
  .optable.vs-both td:first-child { padding: 0; font-size: 0.9375rem; font-weight: 600; line-height: 1.4; color: var(--ink); }
  .optable.vs td a::after { inset: -10px -8px; }
  .optable.vs-both td:first-child a::after { inset: -11px 0; }
}
main > section.vs-more { padding-top: 32px; }        /* a closing note: it belongs to the tables above, not a new chapter */
.vs-more .note { margin: 0 0 12px; }
.vs-more .btn.small { height: 40px; }
@media (max-width: 639px) {
  /* a long trek name may wrap inside its pill instead of pushing the page sideways */
  .vs-more .btn.small { max-width: 100%; height: auto; min-height: 40px; padding-block: 8px; line-height: 1.25; white-space: normal; text-align: center; }
}

/* the index of pairs: wide tiles, each trek on its own line, the word between them stepping back */
.vs-index .cb-name { max-width: none; }
.vs-index .cb-a, .vs-index .cb-b { display: block; }
.vs-index .cb-vs { font-weight: 400; color: var(--ink-3); }
@media (min-width: 640px) { .cgrid.vs-index { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .cgrid.vs-index { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- operator page (operator.html) ---------- */
.op-head .eyebrow img.flag { margin-right: 2px; vertical-align: -3px; }
.op-site { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 0 0 12px; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2); }
.op-site > a { font-weight: 600; }
.op-mem { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--ink-3); }
.op-mem .kpap { margin-left: 0; vertical-align: 0; }
.tiles.op-spec { max-width: var(--col); margin-top: 28px; }
.op-spec .v-of { font-size: 1rem; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }

/* the rule table: trek, days, package, all-in, where it ranks, read */
.optable.ot td { vertical-align: baseline; }
.op-rows .tablewrap + .note { margin-top: 20px; }
.optable.ot .ot-trek { text-wrap: balance; }      /* a wrapped name or trip line never leaves one word alone */
.optable.ot .ot-trek a { position: relative; }
.optable.ot .ot-trek a::after { content: ""; position: absolute; inset: -11px 0; }      /* a 40px target around the name */
.optable.ot .ot-trek .sub { margin-top: 2px; font-weight: 400; }
.optable.ot .ot-pkg, .optable.ot .ot-days { color: var(--ink-2); }
.optable td.ot-all { font-family: var(--body); color: var(--ink-3); }
.optable.ot .ot-all > .money { font: 700 1.125rem/1.2 var(--body); font-variant-numeric: lining-nums; color: var(--ink); }
.optable.ot .ot-all .sub { margin-top: 2px; }
.optable.ot .ot-rank { font-size: 0.875rem; line-height: 1.4; color: var(--ink-2); white-space: nowrap; }
.optable.ot .ot-rank b { font-weight: 600; color: var(--ok); }
/* where this operator stands among the others on that trek: a dot on a short track, the lowest price at the left */
.rank-meter { position: relative; display: block; width: 72px; height: 4px; margin-top: 8px; border-radius: 2px; background: var(--surface-3); }
.rank-meter::before {
  content: ""; position: absolute; top: -2px; left: calc((var(--pos) - 1) / max(var(--of) - 1, 1) * (100% - 8px));
  width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); box-shadow: 0 0 0 2px var(--ground);
}
.optable.ot tr.first .rank-meter::before { background: var(--ok); }
.optable.ot td.ot-read { font: 400 0.75rem/1.4 var(--mono); color: var(--ink-3); white-space: nowrap; }
.optable.ot .ot-read .visit { margin-top: 4px; font: 500 0.8125rem/1.4 var(--body); }
.optable.ot .ot-d, .optable.ot .cl { display: none; }
@media (min-width: 760px) {
  .optable.ot .ot-all .sub { max-width: 22ch; margin-left: auto; white-space: normal; text-wrap: balance; }
}
@media (min-width: 760px) and (max-width: 899px) {
  /* six columns do not fit a tablet without squeezing the trek name: the days move into the trip line, as on a phone */
  .optable.ot .ot-days, .optable.ot .ot-hd { display: none; }
  .optable.ot .ot-d { display: inline; }
}
@media (min-width: 1100px) {
  .optable.ot .ot-all .sub { max-width: none; white-space: nowrap; }
}
@media (max-width: 759px) {
  /* each trek is a block: name and trip at the left, the all-in price at the right with the package price under it,
     then the rank, then the read date and the link out */
  .optable.ot, .optable.ot tbody { display: block; }
  .optable.ot thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .optable.ot tbody tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto 1fr auto auto;
    grid-template-areas: "trek all" "trek pkg" "rank rank" "read read"; column-gap: 16px;
    padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .optable.ot tbody tr:first-child { border-top: 1.5px solid var(--ink); }
  .optable.ot td, .optable.ot td.r { display: block; padding: 0; border: 0; }
  .optable.ot td[data-label]::before, .optable.ot td.r[data-label]::before, .optable.ot td.mono[data-label]::before { content: none; }
  .optable.ot .ot-trek { grid-area: trek; font-size: 1rem; font-weight: 600; line-height: 1.35; }
  .optable.ot .ot-d { display: inline; }
  .optable.ot td.ot-days { display: none; }
  .optable.ot .ot-all { grid-area: all; max-width: 46vw; text-align: right; white-space: normal; }
  .optable.ot .ot-all > .money { font-size: 1.25rem; white-space: nowrap; }
  .optable.ot .ot-pkg { grid-area: pkg; align-self: start; margin-top: 2px; font-size: 0.8125rem; text-align: right; white-space: nowrap; }
  .optable.ot .cl { display: inline; font-family: var(--body); color: var(--ink-3); }
  .optable.ot .ot-rank { grid-area: rank; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; white-space: normal; }
  .optable.ot .rank-meter { flex: none; margin-top: 0; }
  .optable.ot td.ot-read { grid-area: read; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; margin-top: 10px; white-space: normal; }
  .optable.ot .ot-read .visit { margin-top: 0; }
}
@media (max-width: 639px) {
  /* the range line takes two short lines, so the price column stays narrow and the trek name keeps its width */
  .optable.ot .ot-all .sub { max-width: 19ch; margin-left: auto; text-wrap: balance; }
}

/* ---------- operator list (operators.html, and the operators of a country) ---------- */
.ops .op-none { margin-top: 0; }
/* the flag, then the name with its city: a city that does not fit beside a long name wraps under the name, not under
   the flag. The name's line stays centred on the first row of 32px trek tags. */
.ops .op-who, #operators .op-who { flex-wrap: nowrap; align-items: flex-start; min-height: 0; padding-top: 6px; }
.ops .op-who img.flag, #operators .op-who img.flag { margin-top: 3px; }
.ops .op-who .flag-txt, #operators .op-who .flag-txt { margin-top: 1px; }
.op-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; min-width: 0; }
/* the name column stops growing at 300px, so three trek tags fit on a line at full width */
@media (min-width: 700px) { .ops .oplist li, #operators .oplist li { grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); } }
@media (min-width: 640px) {
  /* a 32px tag with a 40px touch area: the 8px between two tags is shared, so no two areas overlap */
  .ops .op-treks, #operators .op-treks { gap: 8px; }
  .ops .op-treks a, #operators .op-treks a { position: relative; }
  .ops .op-treks a::after, #operators .op-treks a::after { content: ""; position: absolute; inset: -4px 0; }
}
@media (max-width: 639px) {
  /* on a phone each trek is one full-width line, the name at the left and the price at the right, so the prices line up */
  .ops .op-treks a, #operators .op-treks a { width: 100%; justify-content: space-between; gap: 12px; }
  .ops .op-treks .op-trek, #operators .op-treks .op-trek { min-width: 0; }
}

/* ---------- country and continent: the split stage ----------
   Text at the left, one photo tile at the right; no text on the photo. */
.hero.place { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.hero.place .hero-in { min-width: 0; }
.hero.place .lead { margin-bottom: 0; }
.hero.place .hero-pic { aspect-ratio: 16 / 10; max-height: none; }
@media (min-width: 640px) { .hero.place .hero-pic { aspect-ratio: 21 / 9; } }
@media (min-width: 900px) {
  .hero.place { padding-top: 40px; }
  .hero.place.has-pic { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 48px; align-items: center; }
  .hero.place .hero-pic { aspect-ratio: 3 / 2; }
}
@supports selector(:has(*)) {
  @media (min-width: 1100px) {
    /* a row of country tiles never leaves one tile alone on a second line: five or six share one row */
    .hero.place ~ .prow .prow-track:has(> .pc-country:nth-child(5):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
    .hero.place ~ .prow .prow-track:has(> .pc-country:nth-child(6):last-child) { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
    .hero.place ~ .prow .prow-track:has(> .pc-country:nth-child(9):last-child),
    .hero.place ~ .prow .prow-track:has(> .pc-country:nth-child(10):last-child) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  }
}
.place-empty .insight, .prow > .insight { margin-bottom: 24px; }
.place-empty .insight:last-child { margin-bottom: 0; }

/* ---------- lists (lists_index.html, list.html) ---------- */
@media (min-width: 640px) { .cgrid.lists-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .cgrid.lists-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lists-grid .cb-name { max-width: 24ch; }
/* "Other lists": five short tiles sit three and two, never four and one */
@media (min-width: 640px) { .other-lists .cgrid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .other-lists .cgrid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.other-lists .cgrid.compact .cbox { justify-content: center; }
.own-lists .explain { margin-bottom: 14px; }
.own-lists .pill-links { margin-bottom: 0; }

/* ---------- planned trek (trek_planned.html) ----------
   One stage: the text and the "not compared yet" tile at the left, the muted photo at the right, the facts across.
   On a phone the order is the page's own: text, photo, facts, tile. */
.head.stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.head.stage .stage-in { min-width: 0; }
.head.stage .hero-pic { aspect-ratio: 16 / 10; max-height: none; }
.head.stage .hero-pic img { filter: saturate(.6); }
.facts-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; margin-top: 12px; }
.planned .callout { padding: 20px 24px 22px; }
@media (min-width: 900px) { .planned .callout { max-width: 720px; } }
.planned .callout .eyebrow { margin: 0 0 8px; }
.planned .callout p { font-size: 0.9375rem; line-height: 1.5; }
.planned .factbox a.src { position: relative; }
.planned .factbox a.src::after { content: ""; position: absolute; inset: -13px -8px; }   /* a 40px target around "source" */
@media (min-width: 640px) { .head.stage .hero-pic { aspect-ratio: 21 / 9; } }
@media (min-width: 900px) {
  .head.stage.has-pic {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr auto; column-gap: 48px; row-gap: 0;
    grid-template-areas: "text pic" "call pic" "facts facts";
  }
  .head.stage.has-pic .stage-in { grid-area: text; }
  .head.stage.has-pic .hero-pic { grid-area: pic; aspect-ratio: 4 / 3; align-self: start; }
  .head.stage.has-pic .facts-grid { display: contents; }
  .head.stage.has-pic .callout { grid-area: call; align-self: end; max-width: none; margin-top: 24px; }
  .head.stage.has-pic .factbox { grid-area: facts; margin-top: 40px; }
}

/* ---------- saved (saved.html; the lists are rendered by site.js) ----------
   Part 20 draws the list boxes. Here the rows become a small board: trek, country, today's price and how it has moved,
   the remove button, on columns shared by every row of every list. */
.saved .stl .watch > .money { font-weight: 600; color: var(--ink); }
.saved .slist-head h2 { min-width: 0; overflow-wrap: anywhere; }
.saved .slist-head h2:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.saved .slist-head .btn.small { height: 40px; }
.saved .stl li > a { position: relative; }
.saved .stl li > a::after { content: ""; position: absolute; inset: -10px 0; }      /* a 40px target around the trek name */
@media (min-width: 900px) {
  .saved .stl li { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 2fr) minmax(0, 6fr) 44px; column-gap: 16px; align-items: center; }
  .saved .stl li > a { grid-column: 1; justify-self: start; }
  .saved .stl li > .tl-sub { grid-column: 2; font-size: 0.8125rem; }
  .saved .stl li > .watch { grid-column: 3; }
  .saved .stl li > .x { grid-column: 4; margin-left: 0; }
}
@media (max-width: 899px) {
  /* the name with its country on one line, the price line under them, the remove button at the right; the four
     columns need 900px before the price line fits on one line in every currency */
  .saved .stl li { display: grid; grid-template-columns: minmax(0, auto) max-content minmax(0, 1fr) 44px; column-gap: 10px; row-gap: 2px; align-items: baseline; padding: 10px 4px 10px 16px; }
  .saved .stl li > a { grid-column: 1; grid-row: 1; }
  .saved .stl li > .tl-sub { grid-column: 2; grid-row: 1; font-size: 0.8125rem; white-space: nowrap; }
  .saved .stl li > .watch { grid-column: 1 / 4; grid-row: 2; }
  .saved .stl li > .x { grid-column: 4; grid-row: 1 / span 2; align-self: center; margin: -6px 0; }
  .saved .slist-head { row-gap: 8px; }
}

/* ==========================================================================
   Guides, updates, accuracy, prose pages, 404
   ========================================================================== */
/* ==========================================================================
   Trekoro 2026, part 60: editorial and text pages
   Guides index, the four guides, What's new, How we check prices, the prose
   pages (terms, privacy, for operators), photo credits and 404.
   Builds on parts 00 to 20; every colour is a token from part 00.
   ========================================================================== */

/* ---------- guides index: large numbered statement tiles ---------- */
.guides-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.guides-grid .cbox { padding: 20px 20px 68px; }
.guides-grid.numbered .cbox::before { margin-bottom: 14px; }
.guides-grid .cb-name { max-width: 17ch; font-size: clamp(1.5rem, 1.05rem + 1.7vw, 2.125rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
.guides-grid .cb-desc { max-width: 46ch; margin-top: 12px; font-size: 1rem; line-height: 1.5; }
/* the arrow grows with the tile */
.guides-grid a.cbox::after { right: 20px; bottom: 20px; width: 40px; height: 40px; }
.guides-grid a.cbox .cb-name::after { right: 31px; bottom: 31px; width: 18px; height: 18px; }
@media (min-width: 760px) {
  .guides-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .guides-grid .cbox { min-height: 288px; padding: 28px 28px 84px; }
  .guides-grid.numbered .cbox::before { margin-bottom: 20px; }
  .guides-grid a.cbox::after { right: 28px; bottom: 28px; width: 44px; height: 44px; }
  .guides-grid a.cbox .cb-name::after { right: 41px; bottom: 41px; }
  /* an odd tile at the end runs the full width as a band: title left, sentence right */
  .guides-grid .cbox:last-child:nth-child(odd) { grid-column: 1 / -1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 48px; align-items: end; padding-right: 112px; padding-bottom: 28px; }
  .guides-grid .cbox:last-child:nth-child(odd)::before { grid-column: 1 / -1; }
  .guides-grid .cbox:last-child:nth-child(odd) .cb-name { max-width: none; }
  .guides-grid .cbox:last-child:nth-child(odd) .cb-desc { margin-top: 0; }
}

/* ---------- guide: what packages leave out (bars in the data colours) ---------- */
.leftout > * { max-width: 960px; }
/* the key stays in view down the whole chart: its order is also the order of the three counts on each row */
.leftout .legend {
  position: sticky; top: 0; z-index: 5; margin: 0; padding: 12px 0;
  background: var(--ground); border-bottom: 1px solid var(--line);
}
@media (min-width: 640px) { .leftout .legend { top: 64px; } }
.lo-trek { padding: 20px 0; border-top: 1px solid var(--line); }
.leftout .legend + .lo-trek { border-top: 0; }
.lo-trek h2 { margin: 0 0 8px; font-size: 1.125rem; line-height: 1.25; letter-spacing: -0.005em; text-wrap: balance; }
.lo-trek h2 a { color: var(--ink); }
.lo-trek h2 .sub { margin-left: 4px; font: 400 0.75rem/1.3 var(--mono); letter-spacing: 0; color: var(--ink-3); white-space: nowrap; }
.lo-grid { display: grid; min-width: 0; }
.lo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; align-items: center; padding: 8px 0; font-size: 0.9375rem; line-height: 1.35; }
.lo-label { grid-column: 1 / -1; min-width: 0; color: var(--ink); }
.lo-label .sub { white-space: nowrap; }
.lo-bar { display: flex; gap: 2px; height: 8px; min-width: 0; }
.lo-bar span { display: block; height: 100%; min-width: 3px; border-radius: 2px; }
.lo-in { background: var(--d-pkg); }
.lo-out { background: var(--d-out); }
.lo-unk { background: repeating-linear-gradient(135deg, var(--d-unk) 0 2px, transparent 2px 5px); outline: 1px dashed var(--ink-3); outline-offset: -1px; }
.lo-n { min-width: 12ch; font-size: 0.8125rem; line-height: 1.3; color: var(--ink-2); text-align: right; white-space: nowrap; }
.lo-grid .srcline { margin: 6px 0 0; }
@media (min-width: 640px) {
  .lo-row { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr) auto; column-gap: 20px; padding: 6px 0; }
  .lo-label { grid-column: auto; }
}
@media (min-width: 900px) {
  /* a ledger: the trek in the margin, its rows beside it */
  .lo-trek { display: grid; grid-template-columns: 184px minmax(0, 1fr); column-gap: 28px; align-items: start; }
  .lo-trek h2 { position: sticky; top: 124px; margin: 6px 0 0; }   /* the name stays beside its rows, under the header and the key */
  .lo-trek h2 a, .lo-trek h2 .sub { display: block; }
  .lo-trek h2 .sub { margin: 4px 0 0; }
}

/* ---------- table guides (permits, tipping, gear): rule tables with the figure in the reader's voice ---------- */
.gtable .note { margin: 16px 0 0; }
.gtable-narrow .tablewrap { max-width: var(--col); }
.gt td.gt-trek a { font-size: 1rem; line-height: 1.4rem; }
.gt td.gt-what > div:first-child, .gt td.gt-inc, .gt td.gt-src, .gt-gear td.gt-what, .gt td.gt-nofee { line-height: 1.4rem; }
.gt td.gt-fig .money { font: 600 1rem/1.4 var(--body); font-variant-numeric: lining-nums; color: var(--ink); }
.gt td.gt-fig .sub { display: block; }
.gt td.gt-what { color: var(--ink-2); }
.gt td.gt-what > div:first-child, .gt-gear td.gt-what { color: var(--ink); font-weight: 500; }
.gt td.gt-what > .sub { max-width: 54ch; margin-top: 2px; font-weight: 400; }
.gt td.gt-inc { color: var(--ink-2); }
.gt td.gt-noinc .sub, .gt td.gt-nofee { font: 400 0.8125rem/1.4rem var(--body); color: var(--ink-3); white-space: normal; }
.gt td.gt-basis, .gt td.gt-why { font-size: 0.875rem; line-height: 1.45; color: var(--ink-2); }
.gt td.gt-why { color: var(--ink-3); }
.gt td.gt-why > span { display: block; max-width: 72ch; }
.gt td.gt-src { font: 400 0.75rem/1.4rem var(--mono); color: var(--ink-3); }
.gt td.gt-src a { color: inherit; text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.gt td.gt-src a:hover { color: var(--accent); }
.gt td.gt-what a.src { font-weight: 400; color: var(--ink-3); }
.gt td.gt-what a.src:hover { color: var(--accent); }
/* a 40px touch area for the links that stand alone in a row */
.gt td.gt-trek a, .gt td.gt-src a, .gt td.gt-what a.src, .lo-trek h2 a, .feed-link { position: relative; }
.gt td.gt-trek a::after, .gt td.gt-src a::after, .lo-trek h2 a::after, .feed-link::after { content: ""; position: absolute; inset: -10px 0; }
.gt td.gt-src a::after, .feed-link::after { inset: -14px -8px; }
/* a link reached with the keyboard is not left under the sticky column heads or the sticky key */
.gt a, .lo-trek h2 a { scroll-margin-top: 124px; }
/* how many operators include it, as a small share bar in the "included" data colour */
.inc-meter {
  display: block; width: 56px; height: 4px; margin: 6px 0 0 auto; border-radius: 2px;
  background: linear-gradient(90deg, var(--d-pkg) calc(var(--v) / var(--of) * 100%), var(--surface-3) 0);
}
/* Gear is a short table and is one from 640px. Permits and tipping carry a sentence in every row: they are a table
   from 900px and one block per trek below that (the foundation stacks under 640px; the rules below carry the same
   stack up to 899px, so neither table is ever squeezed or scrolled sideways). */
@media (min-width: 640px) {
  .gt-gear td { padding-block: 14px; }
  .gt-gear th { white-space: nowrap; }
  .gt-gear th:first-child { width: 31%; }
  /* several items inside one trek: no rule between them */
  .gt-gear tr:not(.gt-last) > td:not(.gt-span) { border-bottom: 0; padding-bottom: 9px; }   /* item lines 40px apart: each source link is its own target */
  .gt-gear tr.gt-more > td { padding-top: 9px; }
  .gt-gear td.gt-inc .inc-meter { display: inline-block; margin: 0 0 0 10px; vertical-align: middle; }
  .gt-gear td.gt-what a.src::after { content: ""; position: absolute; inset: -12px -8px; }
}
@media (min-width: 900px) {
  :is(.gt-permits, .gt-tips) td { padding-block: 14px; }
  :is(.gt-permits, .gt-tips) th { white-space: nowrap; }
  :is(.gt-permits, .gt-tips) th:first-child { width: 19%; }
  .gt td.gt-src { white-space: nowrap; }
  .gt-tips td.gt-fig .sub { white-space: nowrap; }
  .gt-tips th:nth-child(2) { width: 150px; }
  .gt-tips th:nth-child(3) { width: 176px; }
  .gt-tips th:nth-child(5), .gt-permits th:nth-child(5) { width: 1%; }
  /* several permits inside one trek: a dashed rule between them */
  .gt-permits tr:not(.gt-last) > td:not(.gt-span) { border-bottom-style: dashed; }
  .gt-permits tr.gt-more > td.gt-what { padding-left: 16px; }   /* the cell it sits under follows a right-aligned figure */
  /* the column heads follow down a long table */
  .gt thead th { position: sticky; top: 64px; z-index: 2; background: var(--ground); border-bottom-color: transparent; box-shadow: inset 0 -1.5px 0 var(--ink); }
}
@media (min-width: 900px) and (max-width: 1099px) {
  /* the source folds onto two lines, so the basis keeps a readable measure */
  .gt-tips td.gt-src { white-space: normal; }
  .gt-tips th:nth-child(5) { width: 100px; }
}
@media (min-width: 640px) and (max-width: 899px) {
  /* the foundation's stack, carried up to 899px for permits and tipping, in one readable column */
  :is(.gt-permits, .gt-tips) { max-width: 600px; }
  :is(.gt-permits, .gt-tips), :is(.gt-permits, .gt-tips) tbody, :is(.gt-permits, .gt-tips) tr { display: block; }
  :is(.gt-permits, .gt-tips) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  :is(.gt-permits, .gt-tips) tbody tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  :is(.gt-permits, .gt-tips) tbody tr:first-child { border-top: 1.5px solid var(--ink); }
  :is(.gt-permits, .gt-tips) td { display: flow-root; padding: 3px 0; border: 0; white-space: normal; }
  :is(.gt-permits, .gt-tips) td.r { text-align: right; white-space: normal; }
  :is(.gt-permits, .gt-tips) td.r + td { padding-left: 0; }   /* the foundation indents a text cell after a figure cell from 640px */
  :is(.gt-permits, .gt-tips) td:first-child { padding-top: 0; font-size: 1rem; font-weight: 600; line-height: 1.35; text-align: left; }
  :is(.gt-permits, .gt-tips) td[data-label]::before { content: attr(data-label); display: block; font: 400 0.8125rem/1.5 var(--body); letter-spacing: 0; text-transform: none; color: var(--ink-3); text-align: left; }
  :is(.gt-permits, .gt-tips) td.r[data-label]::before { float: left; margin-right: 16px; }
}
@media (max-width: 899px) {
  /* one block per trek: each label sits on the line of its value */
  :is(.gt-permits, .gt-tips) td[data-label]::before { line-height: 1.4rem; }
  :is(.gt-permits, .gt-tips) td.gt-src { text-align: right; }
  :is(.gt-permits, .gt-tips) td.gt-src[data-label]::before { float: left; margin-right: 16px; }
  :is(.gt-permits, .gt-tips) td.gt-inc .inc-meter { display: inline-block; margin: 0 0 0 10px; vertical-align: middle; }
  .gt-tips td.gt-basis { padding-bottom: 5px; }
  /* permits: the trek and its fee share the first line, the fee at the right as in every list on the site */
  .gt-permits tbody tr.gt-first { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
  .gt-permits tr.gt-first > td { grid-column: 1 / -1; }
  .gt-permits tr.gt-first > td.gt-trek { grid-column: 1; grid-row: 1; }
  .gt-permits tr.gt-first > td.gt-fig, .gt-permits tr.gt-first > td.gt-nofee { grid-column: 2; grid-row: 1; padding-top: 0; }
  .gt-permits td.gt-fig[data-label]::before, .gt-permits td.gt-nofee[data-label]::before { content: none; }
  .gt-permits td.gt-what[data-label]::before { content: none; }   /* the line names itself */
  .gt-permits td.gt-what { padding-block: 8px 4px; }
  .gt-permits tr.gt-more > td:first-child { padding-top: 3px; font-size: 0.9375rem; font-weight: 400; line-height: 1.55; }
  .gt-permits tbody tr:not(.gt-last) { border-bottom-style: dashed; }
  .gt-permits td.gt-why { padding-top: 6px; }
}
@media (max-width: 639px) {
  /* gear: the trek, then one line per item with its rental at the right and who includes it underneath */
  .gt-gear tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 0; border-bottom: 0; }
  .gt-gear tbody tr.gt-first { padding-top: 12px; }
  .gt-gear tbody tr.gt-last { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .gt-gear td.gt-trek { grid-column: 1 / -1; padding-bottom: 4px; }
  .gt-gear td.gt-what, .gt-gear tr.gt-more > td.gt-what { grid-column: 1; padding: 8px 0 0; font-size: 0.9375rem; font-weight: 500; line-height: 1.4; }
  .gt-gear td.gt-fig { grid-column: 2; padding: 8px 0 0; }
  .gt-gear td.gt-inc { grid-column: 1 / -1; padding: 0; text-align: left; font: 400 0.8125rem/1.5 var(--body); color: var(--ink-3); }
  .gt-gear td.gt-inc .inc-meter { display: inline-block; margin: 0 0 0 10px; vertical-align: middle; }
  .gt-gear td[data-label]::before { content: none; }
  .gt-gear td.gt-inc[data-label]::before { content: "Included by "; display: inline; float: none; margin: 0; font: inherit; color: inherit; }
  .gt-gear td.gt-what a.src::after { content: ""; position: absolute; inset: -13px -8px; }   /* 40px: the items are 48px apart here */
}

/* ---------- what's new: a dated log ---------- */
.updates .upd { max-width: var(--col); padding: 20px 0; border-top: 1px solid var(--line); }
.updates .upd:last-child { border-bottom: 1px solid var(--line); }
.upd-date { margin: 0 0 12px; font: 500 0.875rem/1.5 var(--mono); letter-spacing: 0; color: var(--ink-2); }
.upd:target .upd-date { color: var(--accent); }
.upd-body { min-width: 0; }
/* group heads are status tags: neutral for what was added or changed, amber for our own mistakes */
.upd-body h3 {
  width: fit-content; margin: 20px 0 4px; padding: 3px 8px; border-radius: var(--r-tag);
  background: var(--surface-2); color: var(--ink-2);
  font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
}
.upd-body h3:first-child { margin-top: 0; }
.upd-body h3.u-add, .upd-body h3.u-chg { background: var(--surface-2); color: var(--ink-2); }
.upd-body h3.u-cor { background: var(--warn-soft); color: var(--warn); }
.updates ul { list-style: none; margin: 0; padding: 0; }
.updates li { padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 0.9375rem; line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.updates li:last-child { border-bottom: 0; padding-bottom: 0; }
.updates li a { position: relative; color: var(--ink); font-weight: 600; }
.updates li a::after { content: ""; position: absolute; inset: -10px 0; }   /* a 40px touch area; the rows are 40px apart */
.updates li .mono { font-size: 0.875rem; color: var(--ink); white-space: nowrap; }
.u-added li { display: flex; flex-wrap: wrap; align-items: baseline; }
.u-added li .sub { flex-basis: 100%; }
@media (min-width: 640px) {
  .updates .upd { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: start; }
  .upd-date { position: sticky; top: 80px; margin: 0; padding-top: 1px; }
  .u-added li .sub { flex-basis: auto; margin-left: auto; padding-left: 16px; text-align: right; }
}

/* ---------- how we check prices ---------- */
.accuracy h2 { margin-top: 48px; }
.acc-strip { max-width: var(--col); margin: 12px 0 20px; }
.acc-strip .tile { padding-block: 6px 10px; }
@media (max-width: 639px) { .acc-strip { margin-top: 8px; border-block: 1px solid var(--line); } }
@media (min-width: 640px) {
  /* the three figures share one line even when a label above one of them runs to two lines */
  @supports (grid-template-rows: subgrid) {
    .acc-strip { grid-template-rows: auto auto auto; }
    .acc-strip .tile { display: grid; grid-row: 1 / span 3; grid-template-rows: subgrid; align-content: start; }
  }
}
/* the gates: numbered rows, two columns on a wide screen */
.method ol.gates {
  display: grid; grid-template-columns: minmax(0, 1fr); list-style: none; counter-reset: gate;
  max-width: var(--prose); margin: 16px 0 24px; padding: 0; border-bottom: 1px solid var(--line);
}
.method ol.gates li { position: relative; margin: 0; padding: 14px 0 14px 40px; border-top: 1px solid var(--line); font-size: 0.9375rem; line-height: 1.55; color: var(--ink-2); counter-increment: gate; text-wrap: pretty; }
.method ol.gates li::before { content: counter(gate, decimal-leading-zero); position: absolute; left: 0; top: 18px; font: 500 0.75rem/1.3 var(--mono); letter-spacing: 0.06em; color: var(--ink-3); }
.method ol.gates b { display: block; margin-bottom: 2px; font-size: 1rem; font-weight: 600; line-height: 1.4; color: var(--ink); }
@media (min-width: 1100px) { .method ol.gates { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; max-width: 1100px; } }
.method p.insight { max-width: calc(var(--prose) * 16 / 15); margin: 4px 0 16px; font-size: 0.9375rem; line-height: 1.55; }   /* as wide as the prose column beside it */
/* the published draw: seed and rows in the machine's voice */
.method .audit-rows p.mono { margin: 0 0 8px; font-size: 0.8125rem; line-height: 1.5; color: var(--ink-2); }
.method .audit-rows ul { max-width: var(--col); margin: 0 0 12px; padding: 0; list-style: none; }
.method .audit-rows li { margin: 0; padding: 2px 0; font-size: 0.8125rem; line-height: 1.5; overflow-wrap: anywhere; }
/* corrections log: the date in the machine's voice, then what was wrong */
.method ul.corr { list-style: none; max-width: var(--col); margin: 12px 0 24px; padding: 0; border-bottom: 1px solid var(--line); }
.method ul.corr li { position: relative; margin: 0; padding: 10px 0 10px 104px; border-top: 1px solid var(--line); font-size: 0.9375rem; line-height: 1.5; text-wrap: pretty; }
.corr .corr-d { position: absolute; left: 0; top: 12px; font-size: 0.8125rem; line-height: 1.5; color: var(--ink-3); }
.corr a { position: relative; color: var(--ink); font-weight: 600; text-decoration: none; }
.corr a::after { content: ""; position: absolute; inset: -10px 0; }
.corr a:hover { color: var(--ink); text-decoration: underline; }
.corr li .mono:not(.corr-d) { font-size: 0.875rem; color: var(--ink); white-space: nowrap; }
@media (max-width: 639px) {
  .method ul.corr li { padding-left: 0; }
  .corr .corr-d { position: static; display: block; margin-bottom: 2px; }
}

/* ---------- terms, privacy, for operators: one prose column ---------- */
.prose p.insight { margin: 0 0 20px; }
.method .insight code { background: var(--surface-3); }
.method p.prose-changed { margin-top: 28px; font: 400 0.75rem/1.5 var(--mono); color: var(--ink-3); }

/* ---------- photo credits: a rule table ---------- */
.credits-sec .tablewrap { max-width: 1040px; }
.credits td { font-size: 0.875rem; line-height: 1.45; }
.credits .cr-file a { position: relative; }
.credits .cr-file a::after { content: ""; position: absolute; inset: -12px 0; }   /* a 40px touch area */
.credits .cr-lic { font: 400 0.75rem/1.6 var(--mono); color: var(--ink-3); }
@media (min-width: 640px) {
  /* fixed columns: one long photographer line must not squeeze the file names */
  .credits { table-layout: fixed; }
  .credits th:first-child { width: 22%; }
  .credits th:nth-child(3) { width: 30%; }
  .credits th:nth-child(4) { width: 128px; }
  .credits .cr-lic { white-space: nowrap; }
}

/* ---------- 404 ---------- */
.head.nf { padding-top: clamp(32px, 9vh, 96px); }
.head.nf h1 { max-width: 18ch; margin-bottom: 16px; font-weight: 800; font-size: clamp(2rem, 1.2rem + 3.6vw, 3.75rem); line-height: 1.04; letter-spacing: -0.025em; }
.nf-links { padding-top: 24px; padding-bottom: clamp(24px, 8vh, 72px); }
.nf-links .pill-links { margin: 0; }
@supports selector(:has(*)) { main:has(> .head.nf) { min-height: 50vh; } }
