/* Layout and components. Mobile-first; media queries widen the layout.
   Colors, type, and spacing come from tokens.css. */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* 2026-10-05: keep anything the browser scrolls to — a focused form field,
     a field flagged invalid on submit, an anchor — below the sticky header
     (67px on a phone, 132px desktop). Without it a field landed under the
     header. The per-target scroll-margins below add on top of this. */
  scroll-padding-top: 5rem;
}
@media (min-width: 768px) {
  html { scroll-padding-top: 9rem; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  color: var(--color-text);
  background: var(--color-bg);
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-brand);
}

h1,
h2,
h3 {
  line-height: var(--leading-tight);
  margin: 0 0 var(--space-4);
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  font-size: var(--text-2xl);
}

h2 {
  font-size: var(--text-xl);
}

h3 {
  font-size: var(--text-lg);
}

p {
  margin: 0 0 var(--space-4);
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* ---------------------------------------------------------------- Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 248, 0.92);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--hairline);
  box-shadow: 0 1px 0 rgba(46, 58, 55, 0.04), 0 8px 24px rgba(46, 58, 55, 0.05);
  transition: box-shadow var(--dur) var(--ease-out);
}

/* Brass ribbon along the very top of the masthead */
.site-header::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--color-coral-deep) 0%, #d9a05f 28%, #ecd9b8 50%, #d9a05f 72%, var(--color-coral-deep) 100%);
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 rgba(46, 58, 55, 0.05), 0 12px 32px rgba(46, 58, 55, 0.1);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
  position: relative;
  transition: padding var(--dur) var(--ease-out);
}

/* Brand lockup: emblem | hairline | wordmark (+ tagline on wide screens) */
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--color-text);
  text-decoration: none;
  min-width: 0;
}

.brand-emblem {
  display: block;
  flex: none;
  width: 40px;
  height: 40px;
  transition: width var(--dur) var(--ease-out), height var(--dur) var(--ease-out);
}

.brand-lockup {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--hairline);
  padding-left: var(--space-3);
}

.brand-word {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
}

.brand-word em {
  font-style: italic;
  font-weight: 500;
  font-size: 0.9em;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--color-amber);
  margin: 0 0.08em;
}

.brand-tag {
  display: none;
}

/* Mobile menu (CSS-only). The checkbox is invisible but stays in the tab
   order with its own name ("Menu"), so a keyboard or screen-reader user can
   reach it and Space opens the menu. Until 2026-10-05 it carried
   aria-hidden + tabindex=-1, which left the phone menu unreachable without a
   pointer. Its focus ring is drawn on the visible label. */
.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 2px solid var(--color-amber);
  outline-offset: 2px;
}

.nav-toggle-label {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 40px;
  padding: 0 10px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid var(--hairline);
}

.nav-toggle-label span,
.nav-toggle-label::before,
.nav-toggle-label::after {
  content: "";
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}

.nav-toggle:checked ~ .nav-toggle-label::before {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle:checked ~ .nav-toggle-label span {
  opacity: 0;
}

.nav-toggle:checked ~ .nav-toggle-label::after {
  transform: translateY(-7px) rotate(-45deg);
}

.site-nav {
  display: none;
  flex-basis: 100%;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) 0 var(--space-3);
  font-size: var(--text-base);
}

.nav-toggle:checked ~ .site-nav {
  display: flex;
}

.site-nav > a,
.site-nav .nav-dd > a {
  position: relative;
  color: var(--color-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-3);
  border-top: 1px solid var(--hairline);
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}

.site-nav > a:hover,
.site-nav .nav-dd > a:hover {
  color: var(--color-brand-dark);
  background: var(--color-sky-soft);
  text-decoration: none;
}

.site-nav > a[aria-current="page"] {
  color: var(--color-text);
}

/* Recent-destinations dropdown. The panel and its toggle stay [hidden]
   until motion.js populates them from /data/destinations.json, so with
   JS off "Destinations" is a plain working link. */
.nav-dd {
  position: relative;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.nav-dd-toggle {
  appearance: none;
  background: none;
  border: 0;
  width: 2rem;
  height: 2rem;
  margin-left: -0.25rem;
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--color-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}

.nav-dd-toggle[hidden] {
  display: none;
}

.nav-dd-toggle:hover,
.nav-dd-toggle:focus-visible {
  color: var(--color-brand);
  background: var(--color-sky-soft);
}

.nav-dd-toggle::before {
  content: "";
  display: block;
  width: 0.42em;
  height: 0.42em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform var(--dur) var(--ease-out);
}

.nav-dd.open > .nav-dd-toggle::before {
  transform: rotate(225deg) translate(-1px, -1px);
}

.nav-dd-panel {
  list-style: none;
  margin: 0;
  padding: var(--space-1) var(--space-2);
  display: none;
  flex-basis: 100%;
}

.nav-dd-panel[hidden] {
  display: none;
}

.nav-dd.open > .nav-dd-panel:not([hidden]) {
  display: block;
}

.nav-dd-panel a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--text-sm);
  transition: color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}

.nav-dd-panel a:hover {
  color: var(--color-brand);
  background: var(--color-sky-soft);
}

.nav-dd-tag {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-coral-deep);
  background: rgba(217, 160, 95, 0.16);
  border: 1px solid rgba(122, 90, 58, 0.3);
  border-radius: var(--radius-pill);
  padding: 0 var(--space-2);
  white-space: nowrap;
}

.nav-dd-all a {
  color: var(--color-brand);
  border-top: 1px solid var(--color-border);
  border-radius: 0 0 var(--radius) var(--radius);
  margin-top: var(--space-1);
}

/* -------------------------------------------------------------- Sections */
main {
  padding: 0 0 var(--space-9);
}

main > .wrap {
  padding-top: var(--space-7);
}

.section {
  margin-bottom: var(--space-8);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}

.section-head h2 {
  margin: 0;
  font-size: var(--text-2xl);
  letter-spacing: var(--track-display);
}

.section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}

/* ------------------------------------------------------------- Home hero */
/* Full-bleed photo hero. The photo (.scene-far, kept for the motion.js
   parallax hook) is oversized ~12% so the slow parallax never exposes an
   edge; a light top/bottom scrim keeps the headline and panel readable
   while the midday water stays bright. */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-dusk);
  color: var(--color-on-dark);
  padding: 0;
  margin: 0;
  border-radius: 0;
}

.hero-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-scene .scene-far {
  position: absolute;
  left: 0;
  right: 0;
  top: -6%;
  width: 100%;
  height: 112%;
  object-fit: cover;
  object-position: center 38%;
  max-width: none;
  will-change: transform;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding-top: clamp(2.25rem, 6vw, 4rem);
  padding-bottom: clamp(8.25rem, 25vw, 15.5rem);
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(1.7rem, 3.5vw + 0.4rem, 2.8rem);
  font-weight: 720;
  letter-spacing: var(--track-display);
  line-height: 1.04;
  margin-bottom: var(--space-5);
  color: #111;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.35);
}

/* Hero brand lockup — mirrors the header's wordmark + hairline tagline. */
.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-brand-tag {
  display: inline-block;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--hairline);
  font-size: clamp(0.62rem, 0.9vw + 0.3rem, 0.82rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #111;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9), 0 0 14px rgba(255, 255, 255, 0.8);
}

.hero-brand-word {
  font-size: clamp(1.1rem, 4.6vw + 0.2rem, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1.15;
  white-space: nowrap;
}

.hero-brand-word em {
  font-style: italic;
  font-weight: 500;
  font-size: 0.9em;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--color-amber);
  margin: 0 0.08em;
}

.hero-panel {
  max-width: 34rem;
}

.hero-panel p {
  color: #111;
  font-weight: 600;
  margin-bottom: var(--space-5);
  font-size: var(--text-lg);
  line-height: 1.55;
  text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9), 0 0 14px rgba(255, 255, 255, 0.8), 0 0 28px rgba(255, 255, 255, 0.55);
}

.hero-panel p:last-child {
  margin-bottom: 0;
}

.hero p {
  max-width: 40rem;
}

/* ----------------------------------------------- Interior page hero band */
/* Each page supplies its own photo as <img class="page-hero-photo"> (real
   width/height attributes, srcset 800/1600). No scrim — the photo shows as
   shot; dark text with a white halo keeps the title and lede readable.
   The teal gradient remains underneath as the no-photo fallback. */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-ocean);
  color: #111;
}

.page-hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  max-width: none;
}

.page-hero::after {
  content: none;
}

.page-hero .wrap {
  position: relative;
  z-index: 2;
  /* Match the home hero's height profile: text high, photo running deep below. */
  padding-top: clamp(2.25rem, 6vw, 4rem);
  padding-bottom: clamp(8.25rem, 25vw, 15.5rem);
}

.page-hero h1 {
  /* Matches the home hero's brand-lockup type: letterspaced caps over a hairline. */
  font-size: clamp(1.7rem, 3.5vw + 0.4rem, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 1.15;
  width: fit-content;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--space-3);
  color: #111;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 10px rgba(255, 255, 255, 0.9),
    0 0 26px rgba(255, 255, 255, 0.85), 0 0 44px rgba(255, 255, 255, 0.6);
}

.page-hero .meta,
.page-hero p {
  color: #111;
  font-weight: 600;
  max-width: 46rem;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.95), 0 0 10px rgba(255, 255, 255, 0.9),
    0 0 24px rgba(255, 255, 255, 0.8);
}

.page-hero p:last-child {
  margin-bottom: 0;
}

/* ----------------------------------------------------------------- Cards */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.card figure,
.card .card-thumb {
  margin: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out);
}

.card:hover img {
  transform: scale(1.045);
}

.card .card-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(46, 58, 55, 0) 65%, rgba(46, 58, 55, 0.18));
  pointer-events: none;
}

.card-body {
  padding: var(--space-5);
  position: relative;
}

.card-body h3 {
  margin-bottom: var(--space-2);
  font-size: var(--text-card-title);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.card-body h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.card-body h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.card-body h3 a:hover {
  color: var(--color-brand);
}

.card-body p {
  color: var(--color-muted);
  font-size: var(--text-card-body);
  line-height: var(--leading-card-body);
  margin-bottom: var(--space-3);
}

.card-body p:last-child {
  margin-bottom: 0;
}

/* --------------------------------------------------------------- Buttons */
.button {
  display: inline-block;
  background: var(--color-cta);
  color: #ffffff; /* literal: text on CTA fill (not a surface — --color-surface is semantic card white) */
  text-decoration: none;
  border: 0;
  border-radius: var(--radius-pill);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: 650;
  letter-spacing: 0.02em;
  font-family: inherit;
  cursor: pointer;
  box-shadow: var(--shadow-coral);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out);
}

.button:hover {
  transform: translateY(-1px);
  background: var(--color-cta-hover);
  box-shadow: 0 3px 10px rgba(101, 74, 47, 0.28), 0 10px 24px rgba(101, 74, 47, 0.16);
}

.button:active {
  transform: translateY(0);
}

/* Keyboard focus: explicit ring on the button family (matches the teal
   focus treatment on form fields; UA default rings vary too much). */
.button:focus-visible,
.button-secondary:focus-visible,
.toggle-math:focus-visible {
  outline: 2px solid var(--color-ocean);
  outline-offset: 2px;
}

.coming-soon {
  display: inline-block;
  background: linear-gradient(115deg, rgba(217, 160, 95, 0.14), rgba(236, 217, 184, 0.2));
  color: var(--color-coral-deep);
  border: 1px solid rgba(122, 90, 58, 0.3);
  border-radius: var(--radius);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
}

.meta {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

/* ------------------------------------------------------------- Tool form */
.tool-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.tool-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-ocean);
  opacity: 0.85;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.field label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-muted);
  margin-bottom: var(--space-1);
}

.field input,
.field select {
  width: 100%;
  padding: var(--space-3);
  font-size: var(--text-base);
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--color-ocean);
  box-shadow: 0 0 0 3px rgba(78, 127, 122, 0.25);
  background: var(--color-surface);
}

.field-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.field-checkbox input {
  width: auto;
  accent-color: var(--color-coral-deep);
  transform: scale(1.15);
}

.field-checkbox label {
  display: inline;
  margin: 0;
  text-transform: none;
  letter-spacing: normal;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

/* ---------------------------------------------------------------- Tables */
.table-scroll {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 75vh;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  font-size: var(--text-sm);
}

th,
td {
  text-align: left;
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--color-ink);
  color: var(--color-on-dark);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 2px solid var(--color-coral);
}

td:first-child {
  font-weight: 650;
}

td.num,
th.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

tbody tr.data-row {
  transition: background-color var(--dur) var(--ease-out);
}

tbody tr.data-row:nth-of-type(4n + 3) td {
  background: rgba(239, 231, 211, 0.5);
}

tbody tr.data-row:hover td {
  background: var(--color-brand-soft);
}

tbody tr.rank-1 td {
  background: linear-gradient(90deg, rgba(217, 160, 95, 0.12), rgba(236, 217, 184, 0.16));
}

tbody tr.rank-1 td:first-child {
  box-shadow: inset 3px 0 0 var(--color-coral);
}

tr.math-row td {
  white-space: normal;
  background: var(--color-sand);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.7;
  color: var(--color-ocean-deep);
  box-shadow: inset 3px 0 0 var(--color-amber);
  padding: var(--space-4) var(--space-5);
}

.toggle-math {
  background: none;
  border: 1px solid rgba(63, 111, 105, 0.45);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: var(--color-brand);
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}

.toggle-math:hover {
  background: var(--color-brand);
  border-color: var(--color-brand);
  color: #ffffff; /* literal: text on brand fill, same rationale as .button */
}

.disclaimer {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-top: var(--space-4);
  padding: var(--space-2) var(--space-4);
  border-left: 3px solid var(--color-amber);
  background: rgba(160, 131, 99, 0.1);
  border-radius: 0 var(--radius) var(--radius) 0;
}

/* ----------------------------------------------------------- Prose pages */
.prose {
  max-width: var(--measure);
}

.prose h2 {
  margin-top: var(--space-7);
  padding-top: var(--space-4);
}

.prose > h2:first-child {
  margin-top: 0;
  padding-top: 0;
}

.prose h2::before {
  content: "";
  display: block;
  width: 2.75rem;
  height: 2px;
  background: var(--color-cta);
  opacity: 0.6;
  margin-bottom: var(--space-3);
}

.prose figure {
  margin: var(--space-5) 0;
}

.prose figure img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: block;
}

.prose figcaption {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-top: var(--space-2);
}

.prose ol li,
.prose ul li {
  margin-bottom: var(--space-2);
}

.prose ol {
  counter-reset: steps;
  list-style: none;
  padding-left: 0;
}

.prose ol li {
  counter-increment: steps;
  position: relative;
  padding-left: 3rem;
  margin-bottom: var(--space-4);
}

.prose ol li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--color-cta);
  color: #ffffff; /* literal: numeral on CTA fill, same rationale as .button */
  font-weight: 700;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------------------------------------------------------------- Footer */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: var(--space-8) 0 var(--space-7);
  font-size: var(--text-sm);
  position: relative;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(47, 59, 55, 0.14);
}

.site-footer a {
  color: var(--color-coral-deep);
}

.site-footer p {
  margin-bottom: var(--space-3);
  max-width: 52rem;
  line-height: 1.7;
}

.site-footer p:last-child {
  margin-bottom: 0;
}

/* ---------------------------------------------------------- Scroll reveal */
.reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out);
  }

  .js .reveal.in {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------- Wider screens */
@media (min-width: 640px) {
  h1 {
    font-size: var(--text-3xl);
  }

  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .nav-toggle-label {
    display: none;
  }

  /* Two-tier masthead: brand lockup centered on its own row, nav row
     centered beneath — the classic hotel-brand arrangement. */
  .header-inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding-top: var(--space-5);
    padding-bottom: var(--space-3);
  }

  .site-header.is-scrolled .header-inner {
    padding-top: var(--space-2);
    padding-bottom: var(--space-2);
    gap: var(--space-1);
  }

  .brand-emblem {
    width: 48px;
    height: 48px;
  }

  .site-header.is-scrolled .brand-emblem {
    width: 40px;
    height: 40px;
  }

  .brand-word {
    font-size: 1.18rem;
  }

  .site-nav {
    display: flex;
    flex-basis: auto;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-1);
    padding: 0;
  }

  .site-nav > a,
  .site-nav .nav-dd > a {
    padding: var(--space-2) var(--space-3);
    border-top: 0;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
  }

  /* Hover / active: thin gold underline grows from center */
  .site-nav > a::after {
    content: "";
    position: absolute;
    left: var(--space-3);
    right: var(--space-3);
    bottom: 0.3em;
    height: 1px;
    background: var(--color-coral);
    transform: scaleX(0);
    transform-origin: 50% 50%;
    transition: transform var(--dur) var(--ease-out);
  }

  .site-nav > a:hover,
  .site-nav .nav-dd > a:hover {
    color: var(--color-text);
    background: transparent;
  }

  .site-nav > a:hover::after,
  .site-nav > a:focus-visible::after,
  .site-nav > a[aria-current="page"]::after {
    transform: scaleX(1);
  }

  /* Dropdown becomes a floating panel on desktop */
  .nav-dd {
    flex-wrap: nowrap;
  }

  .nav-dd-panel {
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    min-width: 17.5rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    z-index: 60;
  }
}

@media (min-width: 1100px) {
  .brand-tag {
    display: block;
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--hairline);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-muted);
    white-space: nowrap;
    overflow: hidden;
    max-height: 2rem;
    opacity: 1;
    transition: max-height var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out),
      margin-top var(--dur) var(--ease-out), padding-top var(--dur) var(--ease-out),
      border-top-width var(--dur) var(--ease-out);
  }

  /* Condensed sticky state folds the tagline away */
  .site-header.is-scrolled .brand-tag {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    padding-top: 0;
    border-top-width: 0;
  }

  .card-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
  }

  .card-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  .form-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-content {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

/* Credit-card picker: expanded detail rows (card note + benefits detail) */
tr.math-row .card-note {
  margin: var(--space-3) 0 0;
  font-size: var(--text-xs);
  font-weight: 700;
  line-height: 1.6;
  color: var(--color-ocean-deep);
}

tr.math-row .detail-label {
  margin: var(--space-3) 0 0;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-brand);
}

tr.math-row .benefit-detail {
  margin: var(--space-1) 0 0;
  padding-left: var(--space-4);
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--color-ocean-deep);
}

tr.math-row .benefit-detail li {
  margin-bottom: var(--space-1);
}

/* Credit-card picker: ≤639px card-stack fallback. app.js stamps each
   result cell with data-label="<column header>", so every selector here
   keys on that attribute (via :has() for ancestors) and no other table
   on the site — budget, packing — is affected. Each ranked row becomes
   a stacked card: name as heading, then label/value lines; the rank-1
   highlight and the expandable math row carry over. */
@media (max-width: 639px) {
  #results .table-scroll:has(td[data-label]) {
    overflow: visible;
    max-height: none;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  #results table:has(td[data-label]),
  #results table:has(td[data-label]) tbody {
    display: block;
    width: 100%;
  }

  #results table:has(td[data-label]) thead {
    display: none; /* headers are replicated per cell via data-label */
  }

  #results tbody tr.data-row:has(td[data-label]) {
    display: block;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
  }

  #results tbody tr.rank-1:has(td[data-label]) {
    background: linear-gradient(90deg, rgba(217, 160, 95, 0.12), rgba(236, 217, 184, 0.16)),
      var(--color-surface);
    box-shadow: inset 3px 0 0 var(--color-coral), var(--shadow-sm);
  }

  #results tr.data-row td[data-label] {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-3);
    white-space: normal;
    border-bottom: 0;
    padding: var(--space-1) 0;
    background: none; /* overrides zebra / hover / rank-1 per-cell fills */
    font-size: var(--text-sm);
  }

  #results tr.data-row td[data-label]::before {
    content: attr(data-label);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-muted);
  }

  /* Card name is the card's heading, not a label/value line */
  #results tr.data-row td[data-label]:first-child {
    display: block;
    font-size: var(--text-card-title);
    font-weight: 700;
    padding: 0 0 var(--space-2);
    margin-bottom: var(--space-2);
    border-bottom: 1px solid var(--color-border);
  }

  #results tr.data-row td[data-label]:first-child::before,
  #results tr.data-row td[data-label="Math"]::before {
    content: none;
  }

  #results tr.data-row td[data-label="Math"] {
    display: block;
    padding: var(--space-2) 0 0;
  }

  /* Expanded math row nestles under its card as an attached panel;
     :not([hidden]) keeps the collapsed state working (display:block
     would otherwise override the hidden attribute). */
  #results table:has(td[data-label]) tr.math-row:not([hidden]) {
    display: block;
    margin: calc(-1 * var(--space-3)) 0 var(--space-4);
  }

  #results table:has(td[data-label]) tr.math-row td {
    display: block;
    white-space: normal;
    border-bottom: 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
}

/* ================================================================
   Traveler tools (appended section): trip budget planner and
   packing checklist — /tools/trip-budget/ and /tools/packing-list/
   — plus the shared print stylesheet for both tools.
   ================================================================ */

/* Shared: action row under a tool's output */
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.button-secondary {
  background: none;
  color: var(--color-brand);
  border: 1px solid rgba(63, 111, 105, 0.45);
  box-shadow: none;
}

.button-secondary:hover {
  filter: none;
  background: var(--color-brand);
  color: #ffffff; /* literal: text on brand fill, same rationale as .button */
  border-color: var(--color-brand);
  box-shadow: var(--shadow-sm);
}

/* Trip budget planner: itemized table */
.budget-table td.formula {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-ocean-deep);
}

.budget-table tr.row-subtotal td,
.budget-table tr.row-total td {
  font-weight: 750;
  background: rgba(239, 231, 211, 0.6);
}

.budget-table tr.row-total td {
  background: linear-gradient(90deg, rgba(217, 160, 95, 0.14), rgba(236, 217, 184, 0.16));
  border-top: 2px solid var(--color-coral);
  font-size: var(--text-base);
}

.budget-table tr.row-per td {
  color: var(--color-muted);
}

.estimate-note {
  font-size: var(--text-sm);
  color: var(--color-muted);
  margin-top: var(--space-4);
}

/* Packing checklist */
.checklist-cap-note {
  font-size: var(--text-sm);
  color: var(--color-muted);
  padding: var(--space-2) var(--space-4);
  border-left: 3px solid var(--color-amber);
  background: rgba(160, 131, 99, 0.1);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.checklist-category {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
}

.checklist-category h3 {
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-border);
}

.checklist-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist-items li {
  margin-bottom: var(--space-1);
}

.checklist-item {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color var(--dur) var(--ease-out);
}

.checklist-item:hover {
  background: var(--color-brand-soft);
}

.checklist-item input {
  accent-color: var(--color-coral-deep);
  transform: scale(1.15);
  flex-shrink: 0;
}

.checklist-item input:checked + span {
  text-decoration: line-through;
  color: var(--color-muted);
}

@media (min-width: 640px) {
  .checklist-items {
    columns: 2;
    column-gap: var(--space-5);
  }

  .checklist-items li {
    break-inside: avoid;
  }
}

/* Print stylesheet: both tools print their generated output clean.
   All colors in this block are intentionally literal — ink-on-paper
   black/white/gray for print, not the on-screen Quiet Shore palette. */
@media print {
  .site-header,
  .site-footer,
  .tool-form,
  .tool-actions {
    display: none !important;
  }

  body {
    background: #ffffff;
    color: #000000;
  }

  .page-hero {
    background: none;
    color: #000000;
  }

  .page-hero::after,
  .page-hero-photo,
  .hero-scene {
    display: none !important;
  }

  .page-hero h1 {
    color: #000000;
    text-shadow: none;
  }

  .page-hero .meta,
  .page-hero p {
    color: #333333;
  }

  .table-scroll {
    max-height: none;
    overflow: visible;
    border: 1px solid #999999;
    box-shadow: none;
  }

  table th {
    position: static;
    background: #ffffff;
    color: #000000;
    border-bottom: 2px solid #000000;
  }

  th,
  td {
    border-color: #cccccc;
  }

  tbody tr.data-row:nth-of-type(4n + 3) td,
  tbody tr.data-row:hover td {
    background: none;
  }

  .budget-table tr.row-subtotal td,
  .budget-table tr.row-total td {
    background: none;
  }

  .budget-table tr.row-total td {
    border-top: 2px solid #000000;
  }

  .budget-table td.formula {
    color: #333333;
  }

  .checklist-category {
    box-shadow: none;
    border-color: #999999;
    break-inside: avoid;
  }

  .checklist-item:hover {
    background: none;
  }

  .checklist-cap-note,
  .estimate-note {
    color: #333333;
    background: none;
    border-color: #999999;
  }
}

/* =====================================================================
   The Luxe Zone (/luxe-zone/) — page-scoped styles.
   Map + side-panel planning tool; every rule here is namespaced lz-.
   Marker/legend colors are Quiet Shore tokens: ocean teal = shopping,
   boardwalk wood = dining, golden-hour amber = events.
   ===================================================================== */
.lz-group-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--color-muted);
  margin-bottom: var(--space-1);
}

.lz-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.lz-pill {
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-muted);
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}

.lz-pill:hover {
  border-color: var(--color-ocean);
  color: var(--color-ocean-deep);
}

.lz-pill[aria-pressed="true"] {
  background: var(--color-ocean);
  border-color: var(--color-ocean);
  color: var(--color-on-dark);
}

.lz-pill:focus-visible {
  outline: 2px solid var(--color-ocean-deep);
  outline-offset: 2px;
}

.lz-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  align-items: start;
}

#lz-map {
  height: 340px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  z-index: 0; /* keep Leaflet panes under the sticky header/nav */
}

.lz-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.lz-legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.lz-swatch {
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  border: 1px solid rgba(46, 58, 55, 0.35);
}

.lz-swatch-hotel { background: #4e6cb0; }        /* Leaflet default marker blue */
.lz-swatch-shopping { background: var(--color-ocean); }
.lz-swatch-dining { background: var(--color-coral-deep); }
.lz-swatch-events { background: var(--color-coral); }

/* Category markers: CSS-colored divIcons (no external marker art). */
.lz-marker {
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(46, 58, 55, 0.5);
}

.lz-marker-shopping { background: var(--color-ocean); }
.lz-marker-dining { background: var(--color-coral-deep); }
.lz-marker-events { background: var(--color-coral); }

/* Leaflet popups pick up the site serif. */
.leaflet-popup-content {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* Side panel */
.lz-tabs {
  display: flex;
  gap: var(--space-1);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: var(--space-4);
}

.lz-tabs [role="tab"] {
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--color-muted);
  cursor: pointer;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}

.lz-tabs [role="tab"]:hover {
  color: var(--color-ocean-deep);
}

.lz-tabs [role="tab"][aria-selected="true"] {
  color: var(--color-ocean-deep);
  border-bottom-color: var(--color-ocean);
}

.lz-tabs [role="tab"]:focus-visible {
  outline: 2px solid var(--color-ocean-deep);
  outline-offset: -2px;
}

.lz-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.lz-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-sm);
}

.lz-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}

.lz-card-name {
  font-weight: 700;
}

.lz-card-distance {
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.lz-card-note {
  margin: var(--space-1) 0 var(--space-2);
  font-size: var(--text-card-body);
  line-height: var(--leading-card-body);
  color: var(--color-muted);
}

.lz-tag {
  display: inline-block;
  font-size: var(--text-card-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: var(--track-wide);
  padding: 0.15rem var(--space-2);
  border-radius: var(--radius-pill);
}

.lz-tag-shopping { background: var(--color-sky-soft); color: var(--color-ocean-deep); }
.lz-tag-dining { background: var(--color-sand); color: var(--color-coral-deep); }
.lz-tag-events { background: var(--color-gold); color: var(--color-coral-deep); }

.lz-empty {
  font-size: var(--text-sm);
  color: var(--color-muted);
  background: var(--color-sky-soft);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}

/* Airports (list only — never mapped) */
.lz-airports {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
}

.lz-airports h2 {
  font-size: var(--text-lg);
  margin: 0 0 var(--space-3);
}

.lz-airports ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}

.lz-airport {
  display: grid;
  gap: var(--space-1);
}

.lz-airport-head {
  font-size: var(--text-sm);
}

.lz-airport-carriers {
  font-size: var(--text-xs);
  color: var(--color-muted);
}

.lz-airports-note {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* Per-airport lounges line (data from lounges.json; absent = no line) */
.lz-airport-lounges {
  font-size: var(--text-xs);
  overflow-wrap: break-word;
}

.lz-airport-lounges.lz-lounge-note {
  color: var(--color-muted);
}

.lz-lounge-sourced {
  color: var(--color-muted);
  white-space: nowrap;
}

/* Desktop: map beside the panel; map is the wider column. */
@media (min-width: 768px) {
  .lz-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(19rem, 1fr);
  }

  #lz-map {
    height: 460px;
  }
}

/* ------------------------------------------------------------------
   Where We've Been (now part of /destinations/) — trip map with photo pins and
   the "Awaiting coordinates" strip.
   ------------------------------------------------------------------ */
#wwb-map {
  height: 360px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  z-index: 0; /* keep Leaflet panes under the sticky header/nav */
}

@media (min-width: 768px) {
  #wwb-map {
    height: 520px;
  }
}

/* Pin: circular photo thumbnail with a wood-brown ring. The divIcon
   wrapper is neutralized; the inner span carries the photo. */
.wwb-pin-wrap {
  background: none;
  border: 0;
}

.wwb-pin {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 3px solid var(--color-coral-deep);
  box-shadow: 0 2px 8px rgba(46, 58, 55, 0.45);
}

/* Popup: photo + title + caption. */
.wwb-popup img {
  display: block;
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: var(--space-2);
}

.wwb-popup-title {
  font-weight: 700;
}

.wwb-popup p {
  margin: var(--space-1) 0 0;
}

.wwb-popup-note {
  font-size: var(--text-xs);
  color: var(--color-muted);
  font-style: italic;
}

/* Awaiting-coordinates strip. */
.wwb-awaiting h2 {
  margin: 0 0 var(--space-2);
}

.wwb-awaiting-note {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-muted);
}

.wwb-tray {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: var(--space-4);
}

.wwb-tray-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.wwb-tray-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.wwb-tray-body {
  padding: var(--space-2) var(--space-3) var(--space-3);
}

.wwb-tray-name {
  display: block;
  font-weight: 700;
  font-size: var(--text-sm);
}

.wwb-tray-ask {
  margin: var(--space-1) 0 0;
  font-size: var(--text-xs);
  color: var(--color-muted);
}

/* =====================================================================
   The Photo Wall (/gallery/) — appended 2026-08-03.
   Masonry via CSS columns (no JS layout): tiles keep their real
   width/height attributes so the column flow reserves space (no CLS).
   Lightbox: fixed ink-scrim dialog built by /gallery/gallery.js. */

.wall-wrap {
  padding-top: var(--space-6);
  padding-bottom: var(--space-8);
}

/* Trip filter pills */
.wall-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.wall-pill {
  font: inherit;
  font-size: var(--text-sm);
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: var(--space-1) var(--space-4);
  cursor: pointer;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out);
}

.wall-pill:hover {
  border-color: var(--color-brand);
  color: var(--color-brand);
}

.wall-pill[aria-pressed="true"] {
  background: var(--color-brand-dark);
  border-color: var(--color-brand-dark);
  color: var(--color-on-dark);
}

/* The wall itself */
.wall {
  columns: 2;
  column-gap: var(--space-4);
}

@media (min-width: 900px) {
  .wall { columns: 3; }
}

@media (min-width: 1200px) {
  .wall { columns: 4; }
}

.wall-tile {
  display: block;
  width: 100%;
  margin: 0 0 var(--space-4);
  padding: 0;
  border: 0;
  background: var(--color-sand);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}

/* display:block above beats the UA [hidden] rule, so the filter pills'
   tile.hidden had no visual effect — restate it (same fix as .lb[hidden]). */
.wall-tile[hidden] {
  display: none;
}

.wall-tile:hover,
.wall-tile:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.wall-tile:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
}

.wall-tile img {
  display: block;
  width: 100%;
  height: auto;
}

.wall-noscript {
  color: var(--color-muted);
}

/* Lightbox */
body.lb-open {
  overflow: hidden;
}

.lb[hidden] {
  display: none;
}

.lb {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(46, 58, 55, 0.95); /* ink scrim */
  display: flex;
  align-items: center;
  justify-content: center;
}

.lb-figure {
  margin: 0;
  max-width: min(92vw, 74rem);
  text-align: center;
}

.lb-img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lb-caption {
  margin-top: var(--space-3);
  color: var(--color-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  padding: 0 var(--space-7);
}

.lb-subject {
  font-size: var(--text-base);
}

.lb-tag {
  font-size: var(--text-xs);
  letter-spacing: var(--track-wide);
  text-transform: uppercase;
  color: var(--color-on-dark);
  border: 1px solid var(--hairline-on-dark);
  border-radius: var(--radius-pill);
  padding: 2px var(--space-3);
}

.lb-count {
  font-size: var(--text-sm);
  color: var(--color-on-dark-muted);
}

/* Edge zones = prev/next; close pinned top-right. All three sit above
   the figure and are the only tabbable controls (focus is trapped). */
.lb-prev,
.lb-next,
.lb-close {
  position: absolute;
  border: 0;
  background: transparent;
  color: var(--color-on-dark);
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--dur) var(--ease-out);
}

.lb-prev,
.lb-next {
  top: 0;
  bottom: 0;
  width: clamp(56px, 12vw, 150px);
  font-size: 3rem;
}

.lb-prev { left: 0; }
.lb-next { right: 0; }

.lb-prev:hover,
.lb-next:hover {
  background: rgba(255, 255, 255, 0.06);
}

.lb-close {
  top: var(--space-3);
  right: var(--space-3);
  width: 48px;
  height: 48px;
  font-size: 2rem;
  border-radius: var(--radius-pill);
}

.lb-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.lb-prev:focus-visible,
.lb-next:focus-visible,
.lb-close:focus-visible {
  outline: 3px solid var(--color-sea);
  outline-offset: -3px;
}

@media (max-width: 639px) {
  .lb-caption {
    padding: 0 var(--space-8);
  }
}

/* --- home booking-benefits band ---
   Full-bleed flat dark panel (driftwood ink family), matching the
   reference literally: a tone-on-tone world-map silhouette behind the
   content, a letterspaced all-caps heading TOP-LEFT, and four airy,
   left-aligned columns — hand-drawn-style cream line icon, small caps
   heading sitting directly above its text (no hairlines, no boxes),
   soft gray-cream list lines. Fine print stays inside the panel,
   full grid width, above the bottom edge. */
.benefits-band {
  /* Panel palette — every color below is a variable, so the panel swaps
     light/dark in one block. Live: pale hero-sky blue, desaturated a
     touch off #e6eefc so it sits with the warm cream page.
     Dark alternatives, if we go back:
       slate blue — bg #384c5c / bg-2 #324452 / map #4a5d6c
       driftwood ink — bg #2e3a37 / bg-2 #293431 / map #404b48
       (with --band-head #f5f6f2, --band-text rgba(240,240,234,.72),
        --band-icon #efe9d8) */
  --band-bg: var(--color-sky-soft);
  --band-bg-2: var(--color-sea);
  --band-map: var(--color-amber);
  --band-head: var(--color-ink);
  --band-text: rgba(47, 59, 55, 0.82);
  --band-icon: var(--color-coral-deep);
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--band-bg) 0%, var(--band-bg-2) 100%);
  color: var(--band-text);
  padding: var(--space-8) 0;
  margin-bottom: var(--space-8);
}

/* World map silhouette: fills the panel, continents in a slightly
   lighter shade of the panel's own dark color (tone-on-tone). */
.band-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.band-map g {
  fill: var(--band-map);
  /* The silhouette is a backdrop, not a graphic: at full strength the
     landmasses ran straight under the lede and the benefit lists and fought
     them for the page. Held at a wash so the map still reads as continents
     but the copy sits cleanly on top. */
  opacity: 0.24;
}

.benefits-inner {
  position: relative;
}

.benefits-heading {
  text-align: left;
  /* Matches the site's section headings (.section-head h2, e.g. "On this
     site"), so both home-page sections carry the same weight. */
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--band-head);
  margin-bottom: var(--space-5);
}

.benefits-lede {
  max-width: var(--measure);
  margin: 0 0 var(--space-7);
  text-align: left;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--band-text);
}

.benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-7);
}

.benefit-col {
  min-width: 0;
}

/* Hand-drawn-style line icons draw in cream via currentColor. */
.benefit-icon {
  display: block;
  width: 54px;
  height: 54px;
  margin: 0 0 var(--space-4);
  color: var(--band-icon);
}

/* Bottom-aligned with a two-line min-height so headings and list tops
   line up across columns even when a heading wraps. No rule beneath —
   the heading just sits above its text, as in the reference. */
.benefit-col h3 {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 2.6rem;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--band-head);
  margin-bottom: 0.9rem;
}

.benefit-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.benefit-list li {
  padding: 0.32rem 0;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--band-text);
}

/* Fine print stays inside the panel, spanning the same width as the
   grid, above the panel's closing edge. */
.benefits-note {
  margin: var(--space-7) 0 0;
  text-align: left;
  font-size: 0.83rem;
  line-height: 1.65;
  color: var(--band-text);
  opacity: 0.85;
}

.benefits-note a {
  color: var(--band-icon);
}

@media (min-width: 640px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-7) var(--space-7);
  }
}

@media (min-width: 1024px) {
  .benefits-band {
    padding: var(--space-9) 0 var(--space-8);
  }

  .benefits-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-7) var(--space-6);
  }
}

/* --- affiliation lockup -------------------------------------------------
   Co-brand strip: the Latitude of Luxe emblem paired with the host agency
   mark it books through. Editorial, not a badge wall — an eyebrow, two
   marks on either side of a brass hairline, and the credential line under
   them. Used on /book/ where the affiliation is claimed and where the
   visitor leaves for Harvell's portal.

   THE HARVELL MARK IS REAL ARTWORK: site/assets/brand/harvell-travel.jpg,
   the agency's own square logo, dark tile with the gold H and script
   wordmark. The mark sits beside the agency name set in the site's own
   Playfair caps — the same mark-plus-name shape as the Latitude side, so
   the two read as a pair. Remove the <img> and the name alone carries the
   attribution; the name is attribution in type, NOT a stand-in for their
   logo.
   -------------------------------------------------------------------- */
.affiliation {
  max-width: var(--measure);
  margin: 0 auto var(--space-8);
  padding: var(--space-6) var(--space-5);
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(101, 74, 47, 0.05);
}

.affiliation-eyebrow {
  margin: 0 0 var(--space-5);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.affiliation-marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-4) var(--space-5);
}

/* Left side: the site's own emblem + wordmark, at masthead proportions. */
.affiliation-self {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
}

.affiliation-emblem {
  width: 42px;
  height: 42px;
  flex: none;
}

.affiliation-word {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--color-ink);
  white-space: nowrap;
}

.affiliation-word em {
  font-style: italic;
  text-transform: lowercase;
  letter-spacing: 0.02em;
  color: var(--color-amber);
}

/* The brass hairline that joins them — the pairing, drawn. */
.affiliation-rule {
  width: 1px;
  align-self: stretch;
  min-height: 2.6rem;
  background: linear-gradient(180deg,
      rgba(201, 162, 94, 0) 0,
      rgba(201, 162, 94, 0.7) 50%,
      rgba(138, 106, 66, 0) 100%);
}

/* Right side: the host agency mark. */
.affiliation-partner {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);   /* same mark-to-name gap as .affiliation-self */
  min-height: 42px;
}

.affiliation-partner img {
  display: block;
  width: auto;
  height: 52px;          /* square mark set beside the name, so it reads at
                            emblem scale rather than carrying the name alone */
  max-width: 15rem;
  flex: none;
  border-radius: 8px;
  border: 1px solid rgba(201, 162, 94, 0.32);
  box-shadow: 0 1px 3px rgba(101, 74, 47, 0.14);
}

.affiliation-partner-word {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--color-ink);
  white-space: nowrap;
}

.affiliation-note {
  margin: var(--space-5) 0 0;
  font-size: 0.83rem;
  line-height: 1.65;
  color: var(--color-muted);
}

@media (max-width: 420px) {
  /* Stack the pairing; the vertical rule becomes a horizontal one. */
  .affiliation-rule {
    width: 3rem;
    min-height: 0;
    height: 1px;
    align-self: center;
    background: linear-gradient(90deg,
        rgba(201, 162, 94, 0) 0,
        rgba(201, 162, 94, 0.7) 50%,
        rgba(138, 106, 66, 0) 100%);
  }
}

/* ================================================================
   Option A hero — scrim under the type, photograph stays behind it.
   Appended at END of file deliberately: these override .page-hero rules
   at identical specificity and must win on source order. At line 510 the
   same CSS measures 1.11:1 because the existing rules win instead.
   The fade is anchored to --hero-pt (the distance to the first line of
   type), so its zero-alpha edge always lands above the headline.
   ================================================================ */

.page-hero,
.hero {
  --hero-pt: clamp(8rem, 24vw, 15rem);
  --hero-pb: clamp(2rem, 4vw, 3rem);
  --hero-fade: 5.5rem;
  --hero-scrim: linear-gradient(to bottom,
      rgba(46, 58, 55, 0) 0,
      rgba(46, 58, 55, 0.86) var(--hero-fade),
      rgba(46, 58, 55, 0.92) 100%);
}

.page-hero::after,
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  top: calc(var(--hero-pt) - var(--hero-fade));
  z-index: 1;
  pointer-events: none;
  background: var(--hero-scrim);
}

.page-hero .wrap,
.hero-content {
  position: relative;
  z-index: 2;
  padding-top: var(--hero-pt);
  padding-bottom: var(--hero-pb);
}

.page-hero h1,
.hero h1,
.hero-brand,
.hero-brand-word {
  color: var(--color-on-dark);
  text-shadow: none;
  border-bottom-color: var(--hairline-on-dark);
}

.hero-brand-tag {
  color: var(--color-on-dark);
  text-shadow: none;
  border-top-color: var(--hairline-on-dark);
  font-size: max(0.7rem, 0.62rem);
}

.page-hero .meta,
.page-hero p,
.hero-panel p {
  color: var(--color-on-dark);
  text-shadow: none;
  font-weight: 400;
}

/* 2026-09-18: "Book this trip with Jeannie" under the meta line of every trip
   report hero. The .button family carries its own colour; only spacing here. */
.page-hero .hero-book { margin: var(--space-5) 0 0; max-width: none; }
/* 2026-10-06: the hotel-portal button beside the booking button. Outline style on a
   solid light fill so it reads over the hero photo; wraps under on a phone. */
.page-hero .hero-book { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.page-hero .hero-book .button-secondary { background: rgba(255, 255, 255, 0.92); }
.page-hero .hero-book .button-secondary:hover { background: var(--color-brand); }
.page-hero .hero-photos { margin: var(--space-3) 0 0; }
.page-hero .hero-photos a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; }

/* 2026-09-18: land #trip-request-form below the sticky header, heading showing.
   Thirteen links across twelve pages (nav CTA, home, luxe-zone, the nine report
   buttons) jump to the form; the header is sticky and the anchor put the form's
   top edge at y=0 — the "Start a trip request" heading and the first field sat
   under the header (measured: header 131px + heading 57px on desktop, 67px +
   52px on a phone). Margin = header + heading + a breath. */
/* 2026-10-05: html now carries scroll-padding-top (5rem / 9rem) for the header,
   so these margins are the remainder — same landing spot as before. */
#trip-request-form { scroll-margin-top: 3.5rem; }
@media (min-width: 768px) {
  #trip-request-form { scroll-margin-top: 4rem; }
}
/* 2026-09-20: report section headings carry ids (build_report.py) so the landing-page
   feature can deep-link "#pro-tips"; the same sticky header would otherwise cover the
   heading. Margin = header (99–131px) + a breath. */
h2[id] { scroll-margin-top: 2rem; }
@media (min-width: 768px) {
  h2[id] { scroll-margin-top: 0.5rem; }
}

/* #4 — type scale: close the h3/body flat spot, kill the 375px inversion */
.section-head h2 { font-size: clamp(1.5rem, 2.2vw + 0.95rem, 1.75rem); }
.benefits-heading { font-size: clamp(1.15rem, 1.6vw + 0.8rem, 1.6rem); }

/* #7 — measure was bound only to .prose, leaving a 149-char line */
main p, main li { max-width: var(--measure); }
main .card-grid p, main table p, main .lz-layout p { max-width: none; }

/* #9 — h1 and body text share a left edge (was 96px vs 304px) */
.page-hero .wrap, .wrap.prose { padding-left: var(--space-4); padding-right: var(--space-4); }

/* #3 — Book becomes a button. Nav trimmed 8 -> 5 items; Gallery and Shop
   moved to the footer. Benchmark set averages 6-7 top-level items and every
   advisory in it treats booking as a button, not a text link. */
.site-nav .nav-cta {
  background: var(--color-cta);
  color: var(--color-on-dark);
  padding: 0.5em 1.1em;
  border-radius: 2px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible { background: var(--color-cta-hover); color: var(--color-on-dark); }
/* 2026-10-05: on /book/ motion.js marks this link aria-current, and the
   ".site-nav > a[aria-current]" rule (more specific) turned its text dark on
   the dark button — unreadable since 5a1bf3f. Keep the button's own colour. */
.site-nav .nav-cta[aria-current="page"] { color: var(--color-on-dark); }

/* Destination pill count — the wall shows a curated edit, so the number is
   how many frames that destination actually has behind the filter. */
.wall-pill-count { font-size: 0.78em; opacity: 0.65; font-variant-numeric: tabular-nums; }

/* --- 2026-09-01: the six inline style="" attributes moved here so a
   Content-Security-Policy with style-src 'self' can hold. Values verbatim. --- */
.text-center { text-align: center; }
.social-lead { margin: 0 0 1.25rem; }
.social-row { margin: 0; display: flex; justify-content: center; gap: 1.5rem; align-items: center; }
.social-link {
  color: #8a6a42; display: inline-flex; align-items: center; gap: 0.45rem;
  text-decoration: none; font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0.12em; text-transform: uppercase;
}
.page-hero-photo--focus-40 { object-position: 50% 40%; }

/* 2026-09-19: coordinates in every trip-report hero (Steve: "always use a coordinate
   photo as the hero for each trip"). Static HTML in each report from
   data/destinations.json "coords"; brass like the LL emblem, ruled like the
   location card (skill z-luxe-location-card). Sits under the meta line. */
.page-hero .hero-coords {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3em 1.1em;
  margin: var(--space-4) 0 0; padding: var(--space-3) 0; max-width: 46rem;
  border-top: 1px solid rgba(201, 162, 94, 0.55); border-bottom: 1px solid rgba(201, 162, 94, 0.55);
  color: var(--color-on-dark); text-shadow: none;
}
.page-hero .hero-coords svg { width: 1.25em; height: 1.25em; align-self: center; flex: none; }
.page-hero .hero-coords .coord {
  font-size: clamp(1.2rem, 2.2vw + 0.5rem, 1.8rem); font-weight: 500; line-height: 1;
  color: #c9a25e; letter-spacing: 0.03em; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.page-hero .hero-coords .coord small {
  font-size: 0.55em; font-weight: 400; letter-spacing: 0.14em; color: var(--color-on-dark-muted);
  margin-left: 0.3em; vertical-align: 0.5em;
}
.page-hero .hero-coords .hero-coords-place {
  flex-basis: 100%; font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--color-on-dark-muted); margin-top: 0.15em;
}
@media print { .page-hero .hero-coords .coord { color: #7a5a3a; } .page-hero .hero-coords .hero-coords-place { color: #333333; } }

/* 2026-09-19: the Shopping section of a trip report (scripts/shopping_section.py
   from data/trips.json "shopping"). .tbc is the honest "to be confirmed" mark
   the page CSS files carry; hoisted here so every report shares it. */
.shop-list li { margin: 0 0 var(--space-2); }
.shop-where { color: var(--color-muted); font-size: var(--text-sm); }
.tbc { color: var(--color-muted); font-size: var(--text-sm); font-style: italic; }

/* ---------------------------------------------------------- Footer: Viator (2026-10-14) */
.footer-viator {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  margin: 0 0 var(--space-5);
}
.footer-viator .footer-viator-btn {
  display: inline-block;
  padding: 0.7em 1.3em;
  border: 1px solid var(--color-coral-deep);
  border-radius: 999px;
  color: var(--color-coral-deep);
  font-weight: 600;
  text-decoration: none;
  line-height: 1.3;
}
.footer-viator .footer-viator-btn:hover,
.footer-viator .footer-viator-btn:focus-visible {
  background: var(--color-coral-deep);
  color: #fff;
}
.footer-viator img {
  width: 96px;
  height: 96px;
  border-radius: 6px;
  background: #fff;
}
@media (max-width: 480px) {
  .footer-viator { flex-direction: column; align-items: flex-start; }
}
