/* ==========================================================================
   page.css : the one stylesheet for agent-built pages (David reads on iPhone + Mac)
   Light theme, Apple Newsroom structure, system type, one accent.
   No JavaScript but _style/reply.js (section 17) and _map/map.js (section 19). Reference for class names: ~/.claude/skills/page/references/components.md.
   Rule of thumb: the page is a column of .section blocks inside a .container;
   everything else (cards, prose, stats, tables, charts) sits inside a section.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens. Change --accent to retheme a page; nothing else needs touching.
   -------------------------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --surface: #f5f5f7;        /* plain cards, stat tiles, table header */
  --surface-2: #e8e8ed;      /* image placeholders, chart muted bars */
  --line: #d2d2d7;           /* borders, grid lines */
  --text: #1d1d1f;
  --text-2: #6e6e73;         /* secondary text: deks, captions, labels (4.6:1 on white) */
  --accent: #0071e3;         /* one accent (Apple blue, David 2026-11-15): links, CTAs, bars, active things */
  --accent-hover: #0062c4;
  --accent-tint: #e8f1fc;    /* callout and pill backgrounds */
  --warn-tint: #fff3df;
  --warn-text: #7a4a00;
  --neg: #b3261e;            /* a falling delta; the only non-accent colour */

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Segoe UI", Roboto, sans-serif;
  --fs-caption: 14px;
  --fs-small: 15px;
  --fs-body: 17px;
  --fs-lead: 21px;
  --fs-h3: 21px;
  --fs-h2: clamp(24px, 1.2rem + 1.2vw, 32px);
  --fs-h1: clamp(32px, 1.4rem + 2vw, 44px);
  --fs-display: clamp(36px, 1.6rem + 3vw, 56px);
  --lh-tight: 1.1;
  --lh-body: 1.47;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gutter: var(--s5);        /* side padding on phone */
  --container: 1120px;
  --narrow: 720px;            /* reading width for prose */
  --r-sm: 12px;
  --r-lg: 18px;
  --shadow: 0 4px 14px rgba(0, 0, 0, .08), 0 1px 3px rgba(0, 0, 0, .06);
  --z-topbar: 10;
}
@media (min-width: 768px) { :root { --gutter: var(--s7); } }

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 var(--fs-body) / var(--lh-body) var(--font);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: var(--lh-tight); text-wrap: balance; }
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); line-height: 1.25; }
h4 { font-size: var(--fs-body); line-height: 1.3; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
ul, ol { margin: 0; padding-left: 1.3em; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s7) 0; }
strong { font-weight: 600; }
small, .small { font-size: var(--fs-small); }
.muted { color: var(--text-2); }
.num, .tabular { font-variant-numeric: tabular-nums; }
.icon { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; fill: none;
  stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; flex: none; }

/* --------------------------------------------------------------------------
   3. Layout. .container centres content; .container--narrow is reading width.
      .section is one vertical block; .section__head puts a title and an
      optional link on one line.
   -------------------------------------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(var(--narrow) + 2 * var(--gutter)); }
.section { padding-block: var(--s7); }
.section + .section { padding-top: 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4);
  flex-wrap: wrap; margin-bottom: var(--s5); }
.section__head p { color: var(--text-2); margin-top: var(--s2); flex-basis: 100%; }
.stack > * + * { margin-top: var(--s5); }      /* generic vertical rhythm */
@media (min-width: 768px) { .section { padding-block: var(--s8); } }

/* --------------------------------------------------------------------------
   4. Top bar: back link on the left, page family on the right. Optional.
      <nav class="topbar"><a class="topbar__back" href="../">...</a><span>Trip plan</span></nav>
   -------------------------------------------------------------------------- */
.topbar { position: sticky; top: 0; z-index: var(--z-topbar); background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line); font-size: var(--fs-small); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 48px;
  padding-top: env(safe-area-inset-top); }
.topbar__back { display: inline-flex; align-items: center; gap: var(--s1); font-weight: 600; text-decoration: none; }
.topbar__crumb { color: var(--text-2); }

/* --------------------------------------------------------------------------
   5. Hero. Eyebrow, display title, dek, optional media below.
      .hero--center centres the text (good for hubs).
   -------------------------------------------------------------------------- */
.hero { padding-block: var(--s7) var(--s6); }
.hero + .section { padding-top: var(--s4); }
.hero--center { text-align: center; }
.hero--center .hero__dek { margin-inline: auto; }
.hero__eyebrow, .card__eyebrow, .eyebrow { display: block; font-size: var(--fs-small); font-weight: 600;
  color: var(--accent); margin-bottom: var(--s3); }
.hero__title { font-size: var(--fs-display); }
.hero__dek { font-size: var(--fs-lead); line-height: 1.35; color: var(--text-2); max-width: 36em; margin-top: var(--s4); }
.hero__meta { margin-top: var(--s4); color: var(--text-2); font-size: var(--fs-small); }
.hero__media { margin-top: var(--s6); }

/* --------------------------------------------------------------------------
   6. Media box. Reserves space so images never jump. Default 3:2.
      <div class="media media--wide"><img src="images/x.jpg" alt=""></div>
   -------------------------------------------------------------------------- */
.media { aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r-lg); background: var(--surface-2); }
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--wide { aspect-ratio: 21 / 9; }
.media--4x3 { aspect-ratio: 4 / 3; }
.media--square { aspect-ratio: 1; }
.media--tall { aspect-ratio: 4 / 5; }
@media (max-width: 639px) { .media--wide { aspect-ratio: 3 / 2; } }

/* --------------------------------------------------------------------------
   7. Grids. .grid auto-fits ~280px columns (3 on desktop, 2 tablet, 1 phone).
      .grid--2 is a strict two-up, .grid--4 fits ~200px columns.
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
@media (max-width: 639px) { .grid--2 { grid-template-columns: minmax(0, 1fr); } }

/* --------------------------------------------------------------------------
   8. Cards.
      Plain card (no link):  <div class="card"> ... </div>       grey, no hover
      Link card:   <a class="card card--link" href="lodging.html"> ... </a>
        white, bordered, hover shadow, and a .card__cta line ("Details" + chevron)
        that is the visible promise of a sub-page. Never put .card__cta on a plain card.
      Feature card: add .card--feature; media left, body right on desktop.
      Inside: .media, then .card__body with .card__eyebrow / .card__title / .card__text / .card__meta.
   -------------------------------------------------------------------------- */
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg);
  overflow: hidden; color: inherit; }
.card > .media { border-radius: 0; flex: none; }
.card__body { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s2); flex: 1; }
.card__title { font-size: var(--fs-h3); }
.card__text { color: var(--text-2); font-size: var(--fs-small); }
.card__meta { color: var(--text-2); font-size: var(--fs-caption); margin-top: auto; padding-top: var(--s2); }
.card__eyebrow { margin-bottom: 0; }
.card__body > .pill { align-self: flex-start; }
.card--link { background: var(--bg); border: 1px solid var(--line); text-decoration: none; cursor: pointer;
  transition: box-shadow .2s ease-out, border-color .2s ease-out; }
.card--link:hover { box-shadow: var(--shadow); border-color: transparent; color: inherit; }
.card--link:hover .card__title { color: var(--accent); }
.card__cta { display: inline-flex; align-items: center; gap: var(--s1); color: var(--accent); font-weight: 600;
  font-size: var(--fs-small); margin-top: auto; padding-top: var(--s3); }
.card--link:hover .card__cta { color: var(--accent-hover); }
.card--feature .media { aspect-ratio: 16 / 10; }
.card--feature .card__title { font-size: var(--fs-h2); }
.card--feature .card__text { font-size: var(--fs-body); }
@media (min-width: 768px) {
  .card--feature { display: grid; grid-template-columns: 1.25fr 1fr; }
  .card--feature .media { aspect-ratio: auto; height: 100%; min-height: 380px; }
  .card--feature .card__body { padding: var(--s7) var(--s6); justify-content: center; gap: var(--s3); }
  .card--feature .card__cta { margin-top: var(--s3); }
}

/* --------------------------------------------------------------------------
   9. Prose: long-form text at reading width. Put a .container--narrow around it.
      Headings, lists, figures, pull quotes and callouts all belong inside.
   -------------------------------------------------------------------------- */
.prose { font-size: var(--fs-body); }
.prose > * + * { margin-top: 1.25em; }
.prose > h2 { margin-top: 2em; }
.prose > h3 { margin-top: 1.6em; }
.prose > h2 + *, .prose > h3 + * { margin-top: .75em; }
.prose li + li { margin-top: .4em; }
.prose .lead { font-size: var(--fs-lead); line-height: 1.4; color: var(--text-2); }
.prose .figure, .prose .pullquote, .prose .callout, .prose .chart, .prose .table-wrap, .prose .stats {
  margin-block: var(--s7); }
.prose .cols-2 .figure { margin-block: 0; }
@media (min-width: 768px) { .prose { font-size: 19px; } .prose .card__text { font-size: var(--fs-small); } }

/* --------------------------------------------------------------------------
   10. Figure: image plus caption. .figure--bleed widens to the full container
       even inside a narrow column.
      <figure class="figure"><div class="media"><img ...></div><figcaption>...</figcaption></figure>
   -------------------------------------------------------------------------- */
.figure figcaption, .chart figcaption { font-size: var(--fs-caption); color: var(--text-2); margin-top: var(--s3);
  padding-inline: var(--s1); }
.figure--bleed { position: relative; left: 50%; transform: translateX(-50%);
  width: min(var(--container) - 2 * var(--gutter), 100vw - 2 * var(--gutter)); }

/* --------------------------------------------------------------------------
   11. Pull quote and callout.
      <blockquote class="pullquote"><p>...</p><cite>who</cite></blockquote>
      <aside class="callout callout--accent"><strong class="callout__title">Decision</strong><p>...</p></aside>
      Variants: (none) grey, --accent, --warn.
   -------------------------------------------------------------------------- */
.pullquote { margin: 0; padding-left: var(--s5); border-left: 3px solid var(--accent); font-size: var(--fs-h2);
  font-weight: 600; line-height: 1.25; text-wrap: balance; }
.pullquote cite { display: block; margin-top: var(--s3); font: 400 var(--fs-small) / 1.4 var(--font); color: var(--text-2); }
.callout { background: var(--surface); border-radius: var(--r-sm); padding: var(--s4) var(--s5);
  font-size: var(--fs-small); }
.callout > * + * { margin-top: var(--s2); }
.callout__title { display: block; font-weight: 600; font-size: var(--fs-body); }
.callout--accent { background: var(--accent-tint); border-left: 3px solid var(--accent); }
.callout--warn { background: var(--warn-tint); border-left: 3px solid var(--warn-text); }
.callout--warn .callout__title { color: var(--warn-text); }

/* --------------------------------------------------------------------------
   12. Stat tiles. One number each, label under it, optional delta.
      <div class="stats"><div class="stat"><span class="stat__value">312k</span>
        <span class="stat__label">vert YTD</span><span class="stat__delta is-up">+9% vs plan</span></div>...</div>
   -------------------------------------------------------------------------- */
.stats { display: grid; gap: var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { background: var(--surface); border-radius: var(--r-lg); padding: var(--s5); display: flex; flex-direction: column; gap: var(--s1); min-width: 0; }
.stat__value { font-size: clamp(30px, 1.5rem + 1.5vw, 40px); font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat__label { color: var(--text-2); font-size: var(--fs-small); }
.stat__delta { font-size: var(--fs-caption); font-weight: 600; color: var(--text-2); margin-top: var(--s1); }
.stat__delta.is-up { color: var(--accent); }
.stat__delta.is-down { color: var(--neg); }
@media (min-width: 768px) { .stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s5); } }

/* --------------------------------------------------------------------------
   13. Table. Wrap it so it scrolls sideways on a phone instead of collapsing.
      <div class="table-wrap"><table class="table"><thead>...</thead><tbody>...</tbody></table></div>
      Add class="num" to numeric cells. .table-wrap p is an optional scroll hint.
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--bg); }
.table { width: 100%; min-width: 720px; border-collapse: collapse; font-size: var(--fs-small);
  font-variant-numeric: tabular-nums; }
.table th, .table td { padding: var(--s3) var(--s4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th { background: var(--surface); font-weight: 600; font-size: var(--fs-caption); color: var(--text-2);
  position: sticky; left: auto; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table th:first-child, .table td:first-child { min-width: 180px; }
.table--wide { min-width: 900px; }      /* six or more text columns */
.table .is-pick td { background: var(--accent-tint); }
.table-hint { font-size: var(--fs-caption); color: var(--text-2); margin-top: var(--s2); }
@media (min-width: 768px) { .table-hint { display: none; } }

/* --------------------------------------------------------------------------
   14. Chart: an inline SVG with a viewBox, scaled by CSS. Use these classes on
       SVG elements so colour stays in the tokens. Keep text out of the series
       colour. Example skeleton in the page skill's components.md.
      <figure class="chart"><svg viewBox="0 0 640 300" role="img" aria-label="...">...</svg>
        <figcaption>...</figcaption></figure>
   -------------------------------------------------------------------------- */
.chart { overflow-x: auto; -webkit-overflow-scrolling: touch; }   /* phone: swipe instead of shrinking the text */
.chart svg { width: 100%; min-width: 520px; height: auto; display: block; font-family: var(--font); font-size: 13px; }
.chart__bar { fill: var(--accent); }
.chart__bar--muted { fill: var(--surface-2); }
.chart__line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart__ref { fill: none; stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart__grid { stroke: var(--line); stroke-width: 1; }
.chart__axis { fill: var(--text-2); font-variant-numeric: tabular-nums; }
.chart__label { fill: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.chart__dot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.legend { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); font-size: var(--fs-caption); color: var(--text-2);
  margin-top: var(--s3); padding-inline: var(--s1); }
.legend__item { display: inline-flex; align-items: center; gap: var(--s2); }
.legend__swatch { width: 12px; height: 12px; border-radius: 3px; background: var(--accent); }
.legend__swatch--muted { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.legend__swatch--ref { height: 0; border-top: 2px dashed var(--text-2); background: none; }

/* --------------------------------------------------------------------------
   15. Key-value list and timeline.
      <dl class="kv"><dt>Dates</dt><dd>Nov 20-22</dd>...</dl>
      <ol class="timeline"><li><span class="timeline__time">Fri 4pm</span><div>Leave Denver</div></li>...</ol>
   -------------------------------------------------------------------------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: var(--s2) var(--s5); margin: 0; font-size: var(--fs-small); }
.kv dt { color: var(--text-2); }
.kv dd { margin: 0; font-weight: 600; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 var(--s5) var(--s5); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.timeline__time { display: block; font-size: var(--fs-caption); font-weight: 600; color: var(--accent); margin-bottom: var(--s1); }
.timeline li > div { color: var(--text); }
.timeline li .muted { font-size: var(--fs-small); }

/* --------------------------------------------------------------------------
   16. Small bits: pills, buttons, back link, footer meta line.
      <span class="pill pill--accent">Recommended</span>
      <a class="btn" href="...">Book</a>   <a class="btn btn--ghost" href="...">Map</a>
      <a class="backlink" href="index.html"><svg class="icon">...</svg>Back to the plan</a>
      Footer: <footer class="footer container"><p class="meta-line"><span>Prepared by Coder</span>
        <span>Oct 27</span><span>expires Dec 31</span></p></footer>
   -------------------------------------------------------------------------- */
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--surface-2);
  font-size: var(--fs-caption); font-weight: 600; line-height: 1.5; color: var(--text); }
.pill--accent { background: var(--accent-tint); color: var(--accent); }
.pill--warn { background: var(--warn-tint); color: var(--warn-text); }
.btn { display: inline-flex; align-items: center; gap: var(--s2); padding: 10px 20px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 600; font-size: var(--fs-small); text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--accent-hover); color: #fff; }
.btn--ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn--ghost:hover { background: var(--accent-tint); color: var(--accent-hover); }
.backlink { display: inline-flex; align-items: center; gap: var(--s1); font-weight: 600; text-decoration: none; font-size: var(--fs-small); }
.footer { border-top: 1px solid var(--line); margin-top: var(--s7); padding-block: var(--s6) calc(var(--s7) + env(safe-area-inset-bottom)); }
.meta-line { font-size: var(--fs-caption); color: var(--text-2); }
.meta-line > span + span::before { content: " · "; }
.footer p + p { margin-top: var(--s2); }
.cols-2 { display: grid; gap: var(--s5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }

@media (prefers-reduced-motion: reduce) { .card--link { transition: none; } }

/* --------------------------------------------------------------------------
   17. Reply form. Needs <script src="../_style/reply.js" defer></script>; markup in
      ~/.claude/skills/page/references/components.md, "Reply form".
      <form class="reply container container--narrow" data-task="w-1234" data-to="coder">
        <fieldset><legend>Which layout?</legend>
          <label class="reply__choice"><input type="radio" name="q1" value="A: cards"> A: cards</label> ...
        </fieldset>
        <button class="btn" type="submit">Submit</button><p class="reply__status" role="status"></p>
      </form>
   -------------------------------------------------------------------------- */
.reply { display: grid; gap: var(--s5); padding-block: var(--s6); }
.reply fieldset { border: 1px solid var(--line); border-radius: var(--r-sm); padding: var(--s4) var(--s5) var(--s5);
  display: grid; gap: var(--s2); min-width: 0; }
.reply legend { font-weight: 600; padding-inline: var(--s1); }
.reply__choice { display: flex; align-items: center; gap: var(--s3); min-height: 44px; padding: var(--s2) var(--s3);
  border-radius: var(--r-sm); background: var(--surface); cursor: pointer; }
.reply__choice:has(input:checked) { background: var(--accent-tint); box-shadow: inset 0 0 0 1.5px var(--accent); }
.reply__choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); flex: none; }
.reply textarea, .reply input[type=text] { width: 100%; font: inherit; font-size: max(16px, var(--fs-body));
  padding: var(--s2) var(--s3); border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--text); }
.reply textarea { resize: vertical; margin-top: var(--s1); }
.reply :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.reply button.btn { justify-self: start; border: 0; font-size: max(16px, var(--fs-small)); min-height: 44px; }
.reply button.btn:disabled { opacity: .5; cursor: default; }
.reply__status { font-size: var(--fs-small); min-height: 1.5em; }
.reply__status.is-error { color: var(--neg); }
.reply.is-sent fieldset { opacity: .7; }

/* --------------------------------------------------------------------------
   18. Trip stages (trip-planner skill). No script: expand is <details>, filters are
       radio chips read by :has(). Markup for each in components.md, "Trip stages".
      Fold (the Brief, collapsed):   <details class="fold"><summary>...</summary><div class="fold__body">
      Options (stage 2 bases):       <div class="options"><details class="option"><summary>card</summary>detail</details>
      Filtered table (stage 3):      <div class="filtered"><div class="chips chips--type">...</div><table>
      Day strip (stage 4):           <div class="days"><section class="days__group">...<ol class="days__list">
      Checklist (stage 5):           <ol class="checklist"><li class="check">...</li></ol>
   -------------------------------------------------------------------------- */
.fold { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); }
.fold > summary, .option > summary { list-style: none; cursor: pointer; }
.fold > summary::-webkit-details-marker, .option > summary::-webkit-details-marker { display: none; }
.fold > summary { display: flex; align-items: center; gap: var(--s3); min-height: 48px; padding: var(--s3) var(--s4); }
.fold__title { font-weight: 600; flex: none; }
.fold__line { flex: 1; min-width: 0; color: var(--text-2); font-size: var(--fs-small);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold__chev { color: var(--text-2); transition: transform .15s ease-out; }
.fold[open] > summary .fold__chev { transform: rotate(90deg); }
.fold[open] .fold__line { display: none; }
.fold__body { padding: 0 var(--s4) var(--s4); }
.fold > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* Options: one inset card per choice (stage 2 bases, any pick-one list). Picked by
   David 2026-11-15 ("Inset"). Summary on the card, the rest one tap away. */
.options { display: grid; gap: var(--s3); }
@media (min-width: 768px) { .options { grid-template-columns: 1fr 1fr; align-items: start; gap: var(--s4); } }
.option { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; }
.option[open] { box-shadow: var(--shadow); }
.option > summary { display: block; padding: var(--s4) var(--s4) 0; }
/* Optional photo on top of the card, when seeing the place helps the choice. */
.option__media { margin: calc(var(--s4) * -1) calc(var(--s4) * -1) var(--s4); aspect-ratio: 16 / 9; background: var(--surface-2); }
.option__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.option__head { display: flex; align-items: flex-start; gap: var(--s3); }
.option__head > div { flex: 1; min-width: 0; }
.option__num { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--accent); color: #fff; font-weight: 700; font-variant-numeric: tabular-nums; }
.option__name { font-size: 19px; line-height: 1.25; }
.option__tag { margin: 2px 0 0; font-size: var(--fs-small); color: var(--text-2); }
.option__lean { flex: none; padding: 2px var(--s2); border-radius: 6px; background: var(--accent-tint); color: var(--accent);
  font-size: 12px; font-weight: 600; }
.option__sum { margin: var(--s3) 0 0; font-size: var(--fs-small); line-height: 1.45; text-wrap: pretty; }
.option__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: var(--s3) 0 0; padding: var(--s3) 0;
  border-block: 1px solid var(--line); }
.option__stats > div + div { border-left: 1px solid var(--line); padding-left: var(--s3); }
.option__stats dt { font-size: 12px; color: var(--text-2); }
.option__stats dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.option__catch { display: flex; gap: var(--s2); align-items: center; margin: 0; padding: var(--s3) 0;
  border-bottom: 1px solid var(--line); font-size: var(--fs-caption); color: var(--warn-text); }
.option__catch::before { content: ""; flex: none; width: 16px; height: 16px; background: #ff9500;
  mask: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.7 18-8-14a2 2 0 0 0-3.4 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.7-3ZM12 9v4M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.option__more { display: flex; justify-content: space-between; align-items: center; min-height: 48px; color: var(--accent); }
.option__more::before { content: "Show details"; }
.option[open] .option__more::before { content: "Hide details"; }
.option__more::after { content: ""; width: 18px; height: 18px; background: currentColor; transition: transform .2s ease-out;
  mask: 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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.option[open] .option__more::after { transform: rotate(180deg); }
.option > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.option__detail { padding: var(--s1) var(--s4) var(--s4); font-size: var(--fs-small); }
.option__detail h4 { margin: var(--s3) 0 var(--s2); font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: .02em; }
.option__detail ul { display: grid; gap: var(--s2); padding-left: 1.2em; }
.option__rows { margin: var(--s3) 0 0; }
.option__rows > div { display: grid; grid-template-columns: 6rem 1fr; gap: var(--s3); padding: var(--s3) 0; border-top: 1px solid var(--line); }
.option__rows dt { color: var(--text-2); }
.option__rows dd { margin: 0; }
.cut-line { margin-top: var(--s3); font-size: var(--fs-small); color: var(--text-2); }
/* Grouped ground: grey page so white option cards read as cards. Put it on <body>. */
.grouped { --bg: #f2f2f7; --surface: #fff; --text-2: #636366; }
.grouped .topbar { background: rgba(242, 242, 247, .92); }

/* Compact table for 15+ rows: tighter cells, narrower minimum, so What, Price and Time
   show on a phone before the sideways scroll. Put the option number in the first cell. */
.table--compact { min-width: 560px; }
.table--compact th, .table--compact td { padding: var(--s2) var(--s3); }
.table--compact th:first-child, .table--compact td:first-child { min-width: 160px; }

/* Filter chips. One .chips row per facet; a row hides when its data-* lacks the
   checked value. Facets: type (adventure chill food night) and base (1-15). */
.filtered > .chips + .chips { margin-top: var(--s2); }
.filtered > .chips:last-of-type { margin-bottom: var(--s4); }
.chips { display: flex; flex-wrap: wrap; gap: var(--s2); border: 0; margin: 0; padding: 0; }
.chip { position: relative; display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--s4);
  border-radius: 999px; background: var(--surface); font-size: var(--fs-small); font-weight: 600; cursor: pointer; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip:has(input:checked) { background: var(--accent-tint); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.filtered:has(.chips--type input[value=adventure]:checked) [data-type]:not([data-type~=adventure]),
.filtered:has(.chips--type input[value=chill]:checked) [data-type]:not([data-type~=chill]),
.filtered:has(.chips--type input[value=food]:checked) [data-type]:not([data-type~=food]),
.filtered:has(.chips--type input[value=night]:checked) [data-type]:not([data-type~=night]),
.filtered:has(.chips--base input[value="1"]:checked) [data-base]:not([data-base~="1"]),
.filtered:has(.chips--base input[value="2"]:checked) [data-base]:not([data-base~="2"]),
.filtered:has(.chips--base input[value="3"]:checked) [data-base]:not([data-base~="3"]),
.filtered:has(.chips--base input[value="4"]:checked) [data-base]:not([data-base~="4"]),
.filtered:has(.chips--base input[value="5"]:checked) [data-base]:not([data-base~="5"]),
.filtered:has(.chips--base input[value="6"]:checked) [data-base]:not([data-base~="6"]),
.filtered:has(.chips--base input[value="7"]:checked) [data-base]:not([data-base~="7"]),
.filtered:has(.chips--base input[value="8"]:checked) [data-base]:not([data-base~="8"]),
.filtered:has(.chips--base input[value="9"]:checked) [data-base]:not([data-base~="9"]),
.filtered:has(.chips--base input[value="10"]:checked) [data-base]:not([data-base~="10"]),
.filtered:has(.chips--base input[value="11"]:checked) [data-base]:not([data-base~="11"]),
.filtered:has(.chips--base input[value="12"]:checked) [data-base]:not([data-base~="12"]),
.filtered:has(.chips--base input[value="13"]:checked) [data-base]:not([data-base~="13"]),
.filtered:has(.chips--base input[value="14"]:checked) [data-base]:not([data-base~="14"]),
.filtered:has(.chips--base input[value="15"]:checked) [data-base]:not([data-base~="15"]) { display: none; }

/* Day strip: days grouped by area. Columns on desktop, rows on phone. */
.days { display: grid; gap: var(--s5); }
.days__area { display: block; font-size: var(--fs-small); font-weight: 600; color: var(--accent);
  padding-bottom: var(--s2); margin-bottom: var(--s3); border-bottom: 2px solid var(--accent); }
.days__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.day { background: var(--surface); border-radius: var(--r-sm); padding: var(--s3) var(--s4);
  display: grid; gap: var(--s1); font-size: var(--fs-small); }
.day__date { font-size: var(--fs-caption); font-weight: 600; color: var(--text-2); }
.day__anchor { font-weight: 600; font-size: var(--fs-body); line-height: 1.3; }
.day__note { color: var(--text-2); }
.day--buffer { background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); }
.day--buffer .day__anchor { font-weight: 400; color: var(--text-2); }
@media (min-width: 768px) {
  .days { display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--s2); }
  .days__group { flex: none; }
  .days__list { grid-auto-flow: column; grid-auto-columns: 150px; }
  .day { align-content: start; min-height: 132px; }
}
@media (max-width: 767px) {
  .day { grid-template-columns: 5.5rem minmax(0, 1fr); column-gap: var(--s3); }
  .day__date { grid-row: span 2; padding-top: 3px; }
}

/* Booking checklist, sorted by deadline. .is-done ticks it, .is-soon flags a close deadline. */
.checklist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.check { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: var(--s1) var(--s4);
  align-items: baseline; padding: var(--s3) var(--s4); font-size: var(--fs-small); }
.check + .check { border-top: 1px solid var(--line); }
.check__box { width: 20px; height: 20px; border-radius: 6px; box-shadow: inset 0 0 0 1.5px var(--line);
  align-self: center; display: grid; place-items: center; color: #fff; }
.check__box .icon { width: 14px; height: 14px; visibility: hidden; }
.check__title { font-weight: 600; font-size: var(--fs-body); }
.check__note { display: block; color: var(--text-2); }
.check__due { font-weight: 600; white-space: nowrap; }
.check__cost { font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; min-width: 5em; }
.check.is-soon .check__due { color: var(--warn-text); }
.check.is-done .check__box { background: var(--accent); box-shadow: none; }
.check.is-done .check__box .icon { visibility: visible; }
.check.is-done .check__title, .check.is-done .check__due { color: var(--text-2); font-weight: 400; }
@media (max-width: 767px) {
  .check { grid-template-columns: 22px minmax(0, 1fr) auto; grid-template-areas: "box main cost" "box due due"; }
  .check__box { grid-area: box; align-self: start; margin-top: 2px; } .check__main { grid-area: main; }
  .check__cost { grid-area: cost; } .check__due { grid-area: due; font-size: var(--fs-caption); }
}
@media (prefers-reduced-motion: reduce) { .fold__chev, .option__more::after { transition: none; } }

/* --------------------------------------------------------------------------
   19. Map: a real, zoomable map whose numbered pins are the page's option cards.
       Needs ../_map/maplibre-gl.css and the four _map scripts; markup in
       components.md "Map". Pin fill is one grouping, the ring a second.
   -------------------------------------------------------------------------- */
.map { margin-bottom: var(--s5); }
.map__canvas { height: min(60vh, 400px); border-radius: var(--r-lg); overflow: hidden; background: #e0e7ef; }
@media (min-width: 768px) { .map__canvas { height: 560px; } }
.map__pin { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--fill);
  color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer;
  box-shadow: 0 0 0 2px #fff, 0 1px 4px rgb(0 0 0 / .35); }
.map__pin:hover { color: #fff; }
.map__pin--ring { box-shadow: 0 0 0 2px #fff, 0 0 0 5px var(--ring), 0 1px 6px rgb(0 0 0 / .35); }
.map__pin:focus-visible { outline: 2px solid var(--text); outline-offset: 6px; }
.map__place { display: flex; align-items: center; gap: 4px; margin-left: -5px; font-size: 12px; font-weight: 700; color: var(--text);
  white-space: nowrap; text-shadow: 0 0 2px #fff, 0 0 2px #fff, 0 0 3px #fff; pointer-events: none; }
.map__place::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 2px #fff; }
.map__legend { display: grid; gap: var(--s2); margin-top: var(--s3); font-size: var(--fs-caption); color: var(--text-2); }
.map__legend-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s4); }
.map__legend-title { font-weight: 600; color: var(--text); }
.map__key { display: inline-flex; align-items: center; gap: 6px; }
.map__key::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--c); }
.map__key--ring::before { background: #fff; box-shadow: inset 0 0 0 3px var(--c); }
.option[id] { scroll-margin-top: var(--s8); }
.option.is-flash { animation: option-flash 1.2s ease-out; }
@keyframes option-flash { from { box-shadow: 0 0 0 3px var(--accent); } to { box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) { .option.is-flash { animation: none; } }
