/*
 * Sponsored Abroad: "departure hall".
 * Graphite and signal yellow, with rose and iris as second colours and four soft tints for cards.
 * Headings Space Grotesk, body Inter (both self-hosted). Design tokens first; do not drift.
 * Approved mockup: "Sponsored Abroad design direction" canvas, 30 Nov 2026.
 */
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/fonts/inter-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

:root {
  --ink: #16181d;          /* graphite: text, the side menu, dark panels */
  --ink-2: #2a2e37;
  --muted: #4a5160;        /* secondary text, 7:1 on --ground */
  --ground: #f3f4f6;       /* the work area */
  --panel: #ffffff;
  --line: #dde0e6;
  --line-strong: #c5cad3;
  --sun: #ffc61a;          /* signal yellow: main buttons and "Live" only, always with graphite text */
  --sun-soft: #f6d878;     /* the softer yellow of the top panel (Philip, 30 Nov 2026: "shade it a little") */
  --sun-tint: #ffe27a;
  --rose: #f0447a;
  --rose-tint: #ffd0dd;
  --iris: #6c5ce7;
  --iris-tint: #d9d4ff;
  --peach-tint: #ffd9b8;
  --rail-text: #d5d9e0;
  --rail-mute: #a9b0bd;
  --rail-on: #2a2e37;
  --on-tint: #16181d;      /* text on the tints and on yellow */
  --head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 16px;
  --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  --globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1040 1040' fill='none'%3E%3Cg stroke='%2316181d' stroke-opacity='.085' stroke-width='1.6'%3E%3Ccircle cx='520' cy='520' r='500'/%3E%3Cellipse cx='520' cy='520' rx='130' ry='500'/%3E%3Cellipse cx='520' cy='520' rx='270' ry='500'/%3E%3Cellipse cx='520' cy='520' rx='400' ry='500'/%3E%3Cellipse cx='520' cy='520' rx='500' ry='110'/%3E%3Cellipse cx='520' cy='520' rx='500' ry='250'/%3E%3Cellipse cx='520' cy='520' rx='500' ry='390'/%3E%3Cpath d='M20 520H1020M520 20V1020'/%3E%3C/g%3E%3Cg stroke-opacity='.2' stroke-width='3.2' stroke-linecap='round' stroke-dasharray='1 11'%3E%3Cpath d='M70 640C260 260 660 150 985 420' stroke='%23f0447a'/%3E%3Cpath d='M120 330C380 560 720 700 960 760' stroke='%236c5ce7'/%3E%3C/g%3E%3C/svg%3E");
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f2f4; --ink-2: #dfe2e7; --muted: #b4bac6; --ground: #101216; --panel: #1a1d23;
    --line: #2e333d; --line-strong: #444a56;
    --globe: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1040 1040' fill='none'%3E%3Cg stroke='%23ffffff' stroke-opacity='.07' stroke-width='1.6'%3E%3Ccircle cx='520' cy='520' r='500'/%3E%3Cellipse cx='520' cy='520' rx='130' ry='500'/%3E%3Cellipse cx='520' cy='520' rx='270' ry='500'/%3E%3Cellipse cx='520' cy='520' rx='400' ry='500'/%3E%3Cellipse cx='520' cy='520' rx='500' ry='110'/%3E%3Cellipse cx='520' cy='520' rx='500' ry='250'/%3E%3Cellipse cx='520' cy='520' rx='500' ry='390'/%3E%3Cpath d='M20 520H1020M520 20V1020'/%3E%3C/g%3E%3Cg stroke-opacity='.2' stroke-width='3.2' stroke-linecap='round' stroke-dasharray='1 11'%3E%3Cpath d='M70 640C260 260 660 150 985 420' stroke='%23f0447a'/%3E%3Cpath d='M120 330C380 560 720 700 960 760' stroke='%238f83f0'/%3E%3C/g%3E%3C/svg%3E");
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 17px/1.6 var(--body); color: var(--ink); background: var(--ground); }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; letter-spacing: -.015em; margin: 0; }
h1 { font-weight: 700; font-size: clamp(2rem, 4.4vw, 3.1rem); }
h2 { font-weight: 700; font-size: clamp(1.4rem, 2.4vw, 1.7rem); }
h3 { font-weight: 600; font-size: 1.15rem; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--iris); outline-offset: 2px; border-radius: 4px; }
ul { margin: 0; padding: 0; list-style: none; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--sun); color: #16181d; padding: 10px 14px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

/* Background globe: one large, faint line drawing fixed behind the site. The site block (.shell) has a solid
   background, so the globe never runs through the page: it shows only in the empty margins on each side
   of a wide screen, as if the site sits on top of it. Laptops and phones have no margins, so they show none.
   No continents: lines of latitude and longitude and two dotted routes, our own drawing (--globe in the
   tokens, one for light and one for dark). Philip, 30 Nov 2026: first tried showing through the gaps
   between panels; he found that did not look good and asked for the sides only. Keep it faint. */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--globe) center 46% / max(1700px, 96vw) auto no-repeat; }
@media (max-width: 860px) { body::before { display: none; } }
@media print { body::before { display: none; } }

/* Shell: side menu beside the work area; on narrow screens the menu sits on top and folds away. */
/* The WHOLE site (menu and page together) is one block, at most 1520px wide, in the middle of the screen,
   so a wide screen shows the same empty space on its left and its right. The menu is a rounded panel
   that stays in view while the page scrolls. Philip, 30 Nov 2026: "the entire website itself was too
   wide on the screen". */
.shell { display: flex; min-height: 100vh; max-width: 1520px; margin-inline: auto; background: var(--ground); }
.rail { flex: 0 0 248px; background: #16181d; color: var(--rail-text); padding: 26px 20px; display: flex; flex-direction: column; gap: 26px; margin: 16px 0 16px 16px; border-radius: 22px; position: sticky; top: 16px; align-self: flex-start; height: calc(100vh - 32px); overflow-y: auto; }
.rail-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 700 1.2rem/1 var(--head); color: #fff; text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.b-box { fill: #ffc61a; } .b-arrow { fill: none; stroke: #16181d; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.menu { display: flex; flex-direction: column; gap: 22px; flex: 1; }
.menu ul { display: flex; flex-direction: column; gap: 4px; }
.menu a, .menu .soon { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 12px; border-radius: 8px; font-size: .95rem; text-decoration: none; }
.menu a:hover { background: var(--rail-on); color: #fff; }
.menu a[aria-current='page'] { background: var(--rail-on); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 #ffc61a; }
.menu .soon { color: var(--rail-mute); }
.menu small { font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; border: 1px solid #4a5160; border-radius: 999px; padding: 2px 8px; }
.menu-head { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--rail-mute); padding: 0 12px; margin-bottom: -14px; }
.rail-note { margin-top: auto; font-size: .8rem; line-height: 1.5; color: var(--rail-mute); padding: 0 12px; }
.menu-btn { display: none; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid #4a5160; background: transparent; color: #fff; font: 600 .95rem var(--body); cursor: pointer; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; }
main { flex: 1; width: 100%; padding: 16px 16px 40px clamp(16px, 3vw, 32px); display: flex; flex-direction: column; gap: 32px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: -16px; }
.foot { width: 100%; padding: 20px 16px 36px clamp(16px, 3vw, 32px); font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.foot ul { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.foot a { display: inline-block; padding: 6px 0; }
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .rail { flex: none; padding: 14px 16px; gap: 0; margin: 0; border-radius: 0; position: static; height: auto; align-self: stretch; overflow: visible; }
  main { padding-top: 20px; }
  .menu-btn { display: inline-flex; align-items: center; }
  .menu { display: none; padding-top: 16px; }
  .menu.open { display: flex; }
  .rail-note { margin-top: 0; }
}

/* Top panel */
.hero { background: var(--sun-soft); color: var(--on-tint); border-radius: 22px; padding: clamp(20px, 3.4vw, 40px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; overflow: hidden; }
.hero > div { flex: 3 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.hero .art { flex: 2 1 240px; max-width: 400px; height: auto; }
.hero.slim .art { max-width: 300px; }
.kicker { align-self: flex-start; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: #16181d; color: #fff; border-radius: 999px; padding: 6px 12px; }
.lead { font-size: 1.1rem; line-height: 1.55; color: #2a2e37; max-width: 62ch; }

/* Pictures (src/lib/art.js) */
.art .g-fill { fill: #fbebb5; } .art .g-line { fill: none; stroke: #16181d; stroke-width: 2; opacity: .3; } .art .g-ring { fill: none; stroke: #16181d; stroke-width: 3; }
.art .route { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 2 13; }
.art .route.a-rose { stroke: var(--rose); } .art .route.a-iris { stroke: var(--iris); }
.art .stop.a-rose { fill: var(--rose); } .art .stop.a-iris { fill: var(--iris); }
.art .tick { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art .pin, .art .plane, .art .card-dark, .art .card-ink { fill: #16181d; } .art .pin-dot, .art .card-sun { fill: #ffc61a; }
.art .card { fill: #fff; stroke: #16181d; stroke-width: 2.5; } .art .card-soft { fill: #c5cad3; } .art .card-light { fill: #fff; } .art .card-mute { fill: #a9b0bd; }

/* Buttons and chips */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 10px; border: 0; background: var(--sun); color: #16181d; font: 600 1rem var(--body); text-decoration: none; cursor: pointer; }
.btn:hover { background: #ffd24d; }
.btn[hidden] { display: none; }
.btn.quiet { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
/* On the yellow top panel a yellow button disappears, so buttons there are graphite with an arrow (Philip, 30 Nov 2026). */
.hero .btn { background: #16181d; color: #fff; min-height: 52px; padding: 0 24px; border-radius: 999px; gap: 10px; box-shadow: 0 2px 0 rgba(22, 24, 29, .25); }
.hero .btn::after { content: ''; width: 18px; height: 18px; flex: none; background: #ffc61a; -webkit-mask: var(--arrow) center / contain no-repeat; mask: var(--arrow) center / contain no-repeat; transition: transform .15s; }
.hero .btn:hover { background: #2a2e37; }
.hero .btn:hover::after { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) { .hero .btn::after { transition: none; } }
.chip { display: inline-block; font-size: .75rem; font-weight: 600; border-radius: 999px; padding: 4px 10px; background: rgba(255, 255, 255, .78); color: #2a2e37; white-space: nowrap; }
.chip.live { background: #16181d; color: #ffc61a; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs button { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font: 600 .9rem var(--body); cursor: pointer; }
.tabs button[aria-pressed='true'] { background: #16181d; color: #fff; border-color: #16181d; }
@media (prefers-color-scheme: dark) { .tabs button[aria-pressed='true'] { background: var(--sun); color: #16181d; border-color: var(--sun); } }

/* Sections, cards, panels */
.block { display: flex; flex-direction: column; gap: 16px; }
.block-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
/* Destination tiles: never more than four in a row, so eight make two even rows. */
.grid.dests { grid-template-columns: repeat(auto-fill, minmax(max(280px, 22%), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.dest { position: relative; overflow: hidden; border-radius: var(--r); padding: 18px; min-height: 164px; display: flex; flex-direction: column; gap: 10px; color: var(--on-tint); text-decoration: none; }
.dest[hidden] { display: none; }
a.dest:hover { box-shadow: 0 0 0 3px #16181d; }
.dest .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dest .code { font: 700 .8rem var(--head); background: #16181d; color: #fff; border-radius: 6px; padding: 5px 8px; }
.dest h3 { font-size: 1.2rem; }
.dest p { font-size: .9rem; line-height: 1.5; color: #2a2e37; position: relative; }
.dest .trail { position: absolute; right: -6px; bottom: -4px; width: 120px; height: 60px; opacity: .5; }
.dest .trail path { fill: none; stroke: #16181d; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1 9; } .dest .trail circle { fill: #16181d; }
.t-sun { background: var(--sun-tint); } .t-rose { background: var(--rose-tint); } .t-iris { background: var(--iris-tint); } .t-peach { background: var(--peach-tint); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.panel.rose { border-top: 6px solid var(--rose); } .panel.iris { border-top: 6px solid var(--iris); } .panel.sun { border-top: 6px solid var(--sun); }
.panel.note { background: #fff4cc; border-color: #e6c34a; color: #16181d; }
.panel.dark { background: #16181d; border-color: #16181d; color: #fff; }
.panel.dark p { color: var(--rail-text); }
.small { font-size: .85rem; color: var(--muted); }
.prose { display: flex; flex-direction: column; gap: 14px; max-width: 70ch; }
.prose ul { list-style: disc; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.rows { display: flex; flex-direction: column; }
.rows li { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.tag { font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; padding: 3px 9px; background: var(--ground); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.tag.on { background: var(--sun); color: #16181d; border-color: var(--sun); }

/* Move checklist */
.meter { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--iris); border-radius: 999px; transition: width .2s; }
.steps { display: flex; flex-direction: column; gap: 10px; }
.step { display: flex; gap: 14px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; }
.step input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--iris); flex: none; }
.step strong { display: block; }
.step span { font-size: .92rem; color: var(--muted); }
.step:has(input:checked) { border-color: var(--iris); }
@media (prefers-reduced-motion: reduce) { .meter span { transition: none; } }

/* Sponsor search */
.finder { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: end; }
.finder label { display: flex; flex-direction: column; gap: 6px; font-size: .88rem; font-weight: 600; min-width: 0; }
.finder input, .finder select { width: 100%; min-height: 48px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--ink); font: 400 1rem var(--body); }
.results { display: flex; flex-direction: column; gap: 10px; }
.result { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.result-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.result-head > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.result .save { min-height: 44px; padding: 0 16px; flex: none; font-size: .9rem; }
.result .save[aria-pressed='true'] { background: var(--iris); border-color: var(--iris); color: #fff; }
.licences { display: flex; flex-direction: column; gap: 6px; font-size: .92rem; }
.licences li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.licences .tag { text-transform: none; letter-spacing: 0; white-space: normal; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* National flags (public/flags/, flag-icons, MIT). Beside the country code on tiles and beside the name on a
   destination page. A thin edge keeps white stripes visible on the tints. Never crests or seals. */
.flag { display: block; flex: none; border-radius: 4px; box-shadow: 0 0 0 1px rgba(22, 24, 29, .28); }
.dest .where { display: inline-flex; align-items: center; gap: 8px; }
.with-flag { display: flex; align-items: center; gap: 14px; }
.result-name { font-weight: 600; text-decoration-color: var(--line-strong); }
.result-name::after { content: ' \2197'; font-weight: 400; color: var(--muted); }
.result-name:hover { text-decoration-color: currentColor; }

/* Route pages (src/pages/destinations/[slug]/[route].astro): one layout for every route. */
.read-on { font-size: .9rem; font-weight: 600; color: #2a2e37; }
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.glance-card { border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 6px; color: var(--on-tint); }
.glance-label { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #2a2e37; }
.glance-card strong { font: 700 1.45rem/1.15 var(--head); }
.glance-note { font-size: .88rem; line-height: 1.45; color: #2a2e37; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); font-size: .9rem; font-weight: 600; text-decoration: none; }
.jump a:hover { border-color: var(--ink); }
.block[id] { scroll-margin-top: 16px; }
.answer { font: 700 1.3rem/1.2 var(--head); }
.sources { border-top: 1px solid var(--line); padding-top: 12px; overflow-wrap: anywhere; }
.checks, .path { display: flex; flex-direction: column; gap: 12px; max-width: 76ch; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before { content: ''; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 5px; background: var(--iris); }
.path { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.path li { position: relative; padding-left: 44px; counter-increment: step; min-height: 30px; }
.path li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 999px; background: var(--sun); color: #16181d; font: 700 .9rem/30px var(--head); text-align: center; }
.facts { display: flex; flex-direction: column; }
.facts li { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, 2fr); gap: 4px 20px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts li:first-child { padding-top: 0; }
.facts li:last-child { border-bottom: 0; padding-bottom: 0; }
.fact-label { font-weight: 600; }
.fact-value { font: 700 1.1rem/1.3 var(--head); }
.fact-note { font-size: .95rem; }
.fact-src { grid-column: 3; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .facts li { grid-template-columns: 1fr; }
  .fact-src { grid-column: 1; }
}
.out::after { content: ' \2197'; color: var(--muted); }
.route-links { display: flex; flex-direction: column; gap: 2px; font-size: .92rem; }

/* Phones: rows of pills and the footer links wrapped raggedly and looked scattered (Philip, 1 Dec 2026).
   On narrow screens they sit in an even two-column grid, every pill the same width; an odd one out
   (such as "All") takes a full row. The footer puts the editor on one line and the links on the next. */
@media (max-width: 560px) {
  .tabs, .jump { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
  .tabs button, .jump a { width: 100%; justify-content: center; text-align: center; padding: 0 10px; }
  .tabs button:first-child:nth-last-child(odd), .jump a:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
  .foot ul { gap: 0 20px; }
  .foot li:first-child { flex-basis: 100%; }
}
