/* Guide pages (places, trips, where to stay): plain readable pages that link into the planner. */
body.page { height: auto; min-height: 100%; }
body.page { --page-w: 880px; --top-h: 70px; }
body.page:has(.area-page) { --page-w: 1240px; }
/* The header stays in view, so a reader deep in a long list still knows where they are and how to get on. */
.page-top { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px max(20px, calc((100% - var(--page-w)) / 2 + 20px)); border-bottom: 1px solid var(--border); background: var(--bg); }
.page-top .wordmark { font-size: 28px; text-decoration: none; }
.page-top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 14px; font-weight: 500; }
.page-top nav a:not(.btn) { color: var(--ink); text-decoration: none; }
.page-top nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 3px; }
.page-top nav a[aria-current] { font-weight: 600; text-decoration: underline 2px var(--accent-strong); text-underline-offset: 7px; }
.page-main { max-width: var(--page-w); margin: 0 auto; padding: 8px 20px 40px; font-size: 15px; line-height: 1.6; }
.page-main h1 { margin: 6px 0 4px; font: 600 36px/1.15 'Fraunces', Georgia, serif; letter-spacing: -0.02em; color: var(--ink); }
.page-main h2 { margin: 32px 0 10px; font: 600 22px/1.25 'Fraunces', Georgia, serif; color: var(--ink); }
.page-main h3 { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.page-main a { color: var(--ink); }
.page-main a.btn-primary, .page-top a.btn-primary { color: #fff; }
/* Links to a heading (/places#cafes) land it below the sticky header, not under it. */
.page-main [id] { scroll-margin-top: calc(var(--top-h) + 12px); }
.crumbs { font-size: 13px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.kind, .muted { margin: 0; color: var(--muted); font-size: 14px; }
.lead { margin: 14px 0; font-size: 17px; }
.page-main .rating { margin: 6px 0; }
.page-main .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 18px 0; }
.page-main .btn { text-decoration: none; }
.page-main .btn-secondary { display: inline-flex; align-items: center; height: 36px; text-decoration: none; }
.place-list, .stay-list, .card-list, .place-index, .stops { list-style: none; margin: 0; padding: 0; }
.place-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.place-list .reach { margin-left: auto; font-size: 13px; color: var(--muted); }
.stay-list li, .card-list li { padding: 14px 0; border-bottom: 1px solid var(--border); }
.stay-list .reach { margin: 4px 0 0; font-size: 13px; color: var(--text); }
.stay-list .links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0 0; font-size: 13px; }
.card-list h2 { margin: 0 0 4px; font-size: 20px; }
.place-index li { padding: 4px 0; }
.day { margin-top: 8px; }
.stops .stop { padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.stops .stop p { margin: 6px 0 0; }
.stops .leg { padding: 6px 0 6px 18px; margin-left: 16px; border-left: 2px dotted var(--border-strong); font-size: 13px; color: var(--muted); }
.advice { margin-top: 28px; padding: 4px 20px 16px; border: 1px solid var(--border); border-left: 3px solid var(--accent-strong); border-radius: var(--radius); background: var(--surface); }
.page-foot { max-width: var(--page-w); margin: 0 auto; padding: 0 20px 40px; color: var(--muted); font-size: 13px; }
.page-foot .guides { margin-top: 0; }
/* An area's summary, and the areas side by side on /stay. */
.glance { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 24px; margin: 18px 0 0; padding: 6px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: 14px; }
.glance div { padding: 8px 0; }
.glance dt { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
.glance dd { margin: 2px 0 0; color: var(--ink); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.compare { width: 100%; min-width: 720px; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.compare thead th { color: var(--muted); font-size: 12px; font-weight: 600; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare tbody th { font-weight: 600; white-space: nowrap; }
.compare td:nth-child(2), .compare td:nth-child(3) { white-space: nowrap; }
button.link { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }

/* Area pages: the list beside a map that stays in view (on phones, the map first, above the list). */
.area-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 0 36px; align-items: start; }
.area-text { grid-column: 1; grid-row: 1; }
.area-map-box { position: sticky; top: calc(var(--top-h) + 14px); grid-column: 2; grid-row: 1; margin-top: 18px; }
.area-map { position: relative; height: calc(100vh - var(--top-h) - 76px); min-height: 360px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: #f6f3ec; }
.area-map .tiles-note { top: 10px; right: auto; left: 10px; }
.map-key { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.map-key span { display: inline-flex; align-items: center; gap: 6px; }
.map-key i { width: 10px; height: 10px; border-radius: 50%; }
.map-key .key-stay { background: #cf3850; }
.map-key .key-place { box-sizing: border-box; border: 2px solid #5b6b7d; background: #fff; }
.stay-list li.on-map { margin: 0 -12px; padding-inline: 12px; border-radius: 8px; background: #fbeef0; }
.popup-kind { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.popup-near-title { margin: 10px 0 2px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.popup-near { margin: 0; padding: 0; list-style: none; font-size: 13px; }
.popup-near li { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.popup-near span { color: var(--muted); white-space: nowrap; }
.popup-count { margin: 8px 0 0; font-size: 13px; }
@media (max-width: 860px) {
  .area-layout { grid-template-columns: minmax(0, 1fr); }
  .area-map-box { position: static; grid-column: 1; grid-row: auto; margin-top: 4px; }
  .area-text { grid-column: 1; grid-row: auto; }
  .area-map { height: 46vh; min-height: 280px; }
}
@media (max-width: 600px) {
  body.page { --top-h: 52px; }
  /* One row, so the header takes little of a phone's screen; the pages have their own planner buttons. */
  .page-top { flex-wrap: nowrap; gap: 12px; padding-block: 10px; }
  .page-top .wordmark { font-size: 22px; }
  .page-top nav { flex-wrap: nowrap; gap: 14px; font-size: 13px; white-space: nowrap; }
  .page-top nav .btn { display: none; }
  .map-key .key-hint { flex-basis: 100%; }
  .glance { padding: 8px 14px; font-size: 13px; }
  .glance div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 4px 0; }
  .glance dt { font-size: 11px; line-height: 1.6; }
  .glance dd { margin: 0; }
  /* The comparison as one card per area: six columns don't fit a phone. */
  .table-wrap { overflow: visible; border: 0; background: none; }
  .compare { min-width: 0; }
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; }
  .compare tr { margin-bottom: 10px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
  .compare th, .compare td { padding: 3px 0; border: 0; }
  .compare tbody th { font-size: 16px; }
  .compare td { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; white-space: normal !important; font-size: 13px; }
  .compare td::before { content: attr(data-label); color: var(--muted); font-size: 12px; }
  .page-main h1 { font-size: 28px; }
}

/* Which dates the stays are priced for, and a way to change them (src/lib/stayPrices.ts). */
.price-bar { margin: 8px 0 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px; line-height: 1.45; }
.price-bar p { margin: 0; }
.price-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 10px; }
.price-form[hidden] { display: none; }
.price-form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.price-form input, .price-form select { font: inherit; font-size: 14px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); }
.maplibregl-popup .price { margin-top: 6px; }

/* Good value stays, moved to the top of the list once prices arrive (src/lib/stayPrices.ts). */
.stay-list li.value { margin: 0 -12px; padding-inline: 12px; border-left: 3px solid #4f9a68; background: #f3faf5; }
