/* Mallorca travel guide: editorial guidebook layout (web only; the PDFs are separate files). */

:root {
  --navy: #22344F; --ink: #2E3B52; --muted: #646E7F; /* 4.8:1 on cream, 5:1 on cards */
  --cream: #FBF6EC; --sand: #F3E7D1; --sand2: #E4CFA8; --paper: #FFFDF8;
  --teal: #2E8A87; --terra: #C4613F; --coral: #D2735A; --saffron: #C98A1E;
  --accent: #2E8A87;
  --rule: #E8DCC6;
  --card-shadow: 0 1px 0 #EADFCB;
  /* darker shades of the accents for text, so it reads at 4.5:1 on cream */
  --terra-ink: color-mix(in srgb, var(--terra) 75%, black);
  --teal-ink: color-mix(in srgb, var(--teal) 75%, black);
  --accent-ink: color-mix(in srgb, var(--accent) 70%, black);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: Jost, system-ui, -apple-system, "Segoe UI", sans-serif;
  --script: "Pinyon Script", "Snell Roundhand", cursive;
  --hand: Kalam, "Segoe Print", "Bradley Hand", cursive; /* polaroid captions */

  --main: 760px;
  --bar-h: 52px;
  --secnav-h: 45px; /* 44px links + 1px rule */
  --gutter: max(16px, env(safe-area-inset-left));
  --gutter-r: max(16px, env(safe-area-inset-right));

  /* motion: one pair of curves and a few durations, used everywhere */
  --ease-out: cubic-bezier(.22, .61, .36, 1);   /* entrances and fades */
  --ease-std: cubic-bezier(.4, 0, .2, 1);       /* things moving between two states */
  --t-fast: 150ms; --t-std: 200ms; --t-acc: 220ms;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  font-family: var(--sans); font-weight: 400; font-size: 17px; line-height: 1.65; color: var(--ink);
  background: var(--cream); scroll-behavior: smooth; scroll-padding-top: calc(var(--bar-h) + 14px);
  -webkit-text-size-adjust: 100%; overflow-anchor: none;
}
body { margin: 0; background: var(--cream); overflow-x: clip; }
/* faint paper grain */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .16 0 0 0 0 .1 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
img, svg { max-width: 100%; }
p { margin: 0 0 1em; }
strong { font-weight: 600; color: var(--navy); }
a { color: inherit; text-decoration: none; }
a.il { color: var(--accent-ink); font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a.il:hover { opacity: .8; }
a[href^="tel:"] { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* keyboard focus */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; border-radius: 3px; }

/* language visibility */
html[data-lang="en"] .lang-es, html[data-lang="es"] .lang-en,
html[data-lang="en"] .t-es, html[data-lang="es"] .t-en { display: none !important; }

/* ---------- top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  height: var(--bar-h); padding: 0 var(--gutter-r) 0 var(--gutter);
  background: rgba(251, 246, 236, .92); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
html.scrolled .bar { border-bottom-color: var(--rule); }
.bar-brand { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--serif); font-weight: 600; font-size: 24px; color: var(--navy); letter-spacing: .01em; }
.bar-right { display: flex; align-items: center; gap: 4px; font-family: var(--sans); font-size: 13px; letter-spacing: .08em; color: var(--navy); }
.bar-right button {
  font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; cursor: pointer;
  min-height: 44px; padding: 0 8px; text-underline-offset: 5px; text-decoration-thickness: 1px;
}
.menu-btn { font-weight: 500 !important; }
.menu-btn:hover, .lang-switch button:hover { color: var(--terra); }
.menu-btn[aria-expanded="true"] { text-decoration: underline; }
.bar-sep { color: var(--sand2); }
.lang-switch { display: inline-flex; align-items: center; }
.lang-switch button { min-width: 44px; padding: 0 6px; color: var(--muted); }
.lang-switch button[aria-pressed="true"] { color: var(--navy); font-weight: 600; }
/* flags: the current language is full colour and underlined, the other one faded */
.lang-switch .flag { display: block; width: 24px; height: 16px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(34, 52, 79, .15); transition: opacity var(--t-fast) var(--ease-std); }
.lang-switch button { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 44px; }
.lang-switch button::after { content: ""; width: 24px; height: 2px; border-radius: 1px; background: transparent; }
.lang-switch button[aria-pressed="true"]::after { background: var(--navy); }
.lang-switch button[aria-pressed="false"] .flag { opacity: .45; }
.lang-switch button[aria-pressed="false"]:hover .flag { opacity: .8; }

/* ---------- contents menu ---------- */
.menu {
  position: fixed; top: var(--bar-h); left: 0; right: 0; z-index: 29; background: var(--cream);
  border-bottom: 1px solid var(--rule); padding: 8px var(--gutter-r) 24px var(--gutter);
  max-height: calc(100vh - var(--bar-h)); overflow-y: auto;
}
.menu[hidden] { display: none; }
.menu-list { list-style: none; margin: 0 auto; padding: 0; max-width: var(--main); counter-reset: m; }
.menu-list li { counter-increment: m; border-bottom: 1px solid var(--rule); }
.menu-list a {
  display: flex; align-items: baseline; gap: 16px; padding: 12px 2px; min-height: 44px;
  font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--navy);
}
.menu-list a::before { content: counter(m, decimal-leading-zero); font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--terra-ink); width: 26px; flex: none; }
.menu-list a:hover { color: var(--terra); }
.menu-pdf, .pdf-btn {
  display: block; max-width: var(--main); margin: 18px auto 0; font-family: var(--serif); font-style: italic;
  font-size: 19px; color: var(--teal-ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px;
}

/* ---------- cover map (unchanged look) ---------- */
.hero { background: #9FD0C9; }
.hero-in {
  position: relative; width: 100%; max-width: min(640px, calc((100svh - var(--bar-h)) * 210 / 297)); min-width: 300px;
  margin: 0 auto; aspect-ratio: 210 / 297; container-type: inline-size;
}
.hero-map svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-top { position: absolute; top: 7.1%; left: 0; right: 0; text-align: center; }
.cover-eyebrow { font-family: var(--sans); font-weight: 500; font-size: max(9.5px, 1.43cqw); letter-spacing: .3em; text-transform: uppercase; color: var(--navy); padding: 0 12px; }
.cover-title { font-family: var(--serif); font-weight: 600; font-size: 12.4cqw; line-height: 1; color: var(--navy); margin: 1.7cqw 0 0; letter-spacing: .01em; }
.cover-sub { font-family: var(--sans); font-weight: 500; font-size: max(10px, 1.6cqw); letter-spacing: .5em; text-transform: uppercase; color: var(--terra); margin-top: 1.4cqw; }
.cover-sub span { display: inline-block; width: 6.7cqw; height: 0; border-top: 1px solid var(--terra); vertical-align: middle; margin: 0 1.9cqw 0 1.4cqw; }
.cover-bottom {
  position: absolute; bottom: 5%; left: 0; right: 0; text-align: center; font-family: var(--sans); font-weight: 500;
  font-size: max(9.5px, 1.43cqw); letter-spacing: .34em; text-transform: uppercase; color: var(--navy);
}
.cover-bottom i { font-style: normal; color: var(--terra); padding: 0 8px; }

/* ---------- content column ---------- */
.wrap { max-width: calc(var(--main) + var(--gutter) + var(--gutter-r)); margin: 0 auto; padding: 0 var(--gutter-r) 0 var(--gutter); }

/* ---------- welcome + contents ---------- */
.welcome { padding: 56px 0 8px; text-align: center; }
.script { font-family: var(--script); font-size: clamp(46px, 12vw, 66px); line-height: 1.1; color: var(--terra); }
.w-rule { width: 64px; margin: 18px auto 28px; border-top: 1px solid var(--sand2); }
.welcome p { font-size: 1.06rem; line-height: 1.8; max-width: 34em; margin: 0 auto 1em; }
.welcome-art, .closing-art { display: block; width: 100%; max-width: 480px; height: auto; margin: 36px auto 40px; }
.toc { text-align: left; max-width: var(--main); margin: 0 auto; }
.toc-h { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 26px; color: var(--navy); text-align: center; margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.toc li { border-bottom: 1px solid var(--rule); }
.toc a { display: grid; grid-template-columns: 44px 1fr; column-gap: 8px; padding: 14px 2px; min-height: 44px; }
.toc a:hover .tt { color: var(--terra); }
.toc .tn { font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.2; color: var(--terra-ink); }
.toc .tt { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--navy); }

/* ---------- chapters ---------- */
.chapter { clear: both; padding-top: 8px; --accent-ink: color-mix(in srgb, var(--accent) 70%, black); }
.journal { --ic-ink: color-mix(in srgb, var(--ic, var(--accent)) 70%, black); }
.chapter + .chapter, .chapter + .closing { margin-top: 112px; }
.welcome + .chapter { margin-top: 72px; }
/* header as in the PDF: roundel icon, small number eyebrow, title */
.ch-open { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
.ch-art { width: 64px; height: 64px; flex: none; }
.ch-num { font-family: var(--sans); font-weight: 600; font-size: 12px; line-height: 1; letter-spacing: .32em; color: var(--accent-ink); margin-top: 4px; }
.chapter h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(32px, 7.4vw, 44px); line-height: 1.1; color: var(--navy); margin: 8px 0 0; letter-spacing: .005em; }
.tagline { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 22px; line-height: 1.35; color: var(--accent-ink); margin: 10px 0 0; max-width: 30em; }
.chapter h2 { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 28px; line-height: 1.2; color: var(--navy); margin: 44px 0 14px; }
.chapter h3 { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 24px; line-height: 1.25; color: var(--accent-ink); margin: 32px 0 10px; }
.chapter h4 { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.25; color: var(--navy); margin: 0 0 8px; }
.aside { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 20px; line-height: 1.4; color: var(--muted); margin: -4px 0 18px; }
.lede { font-family: var(--serif); font-weight: 500; font-size: 22px; line-height: 1.45; color: var(--navy); }

/* ---------- content blocks (no cards) ---------- */
.ch-body > p, .ch-body li { max-width: 40em; }
.footnote { font-size: 15px; line-height: 1.55; color: var(--muted); font-style: italic; margin-top: 18px; }

/* bullet lists */
ul.terms { list-style: none; padding: 0; margin: 0 0 1em; }
ul.terms li { position: relative; padding-left: 26px; margin-bottom: .7em; }
ul.terms li::before { content: "–"; position: absolute; left: 2px; top: 0; color: var(--accent-ink); font-weight: 600; }

/* neighbourhoods */
.areas-list { list-style: none; padding: 0; margin: 8px 0 24px; display: grid; gap: 14px; }
.areas-list li { background: var(--paper); border-radius: 7px; box-shadow: var(--card-shadow); padding: 14px 16px; border-top: 3px solid var(--accent); }
.area-n { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--navy); }
.areas-list p { margin: 2px 0 0; color: var(--muted); }

.link-row { font-family: var(--serif); font-size: 21px; }
.link-row a.il { display: inline-flex; align-items: center; min-height: 44px; }
.link-row a.il::after { content: " →"; text-decoration: none; display: inline-block; margin-left: 2px; }
.link-row .sep { color: var(--sand2); }

/* heads-up notes */
.heads-up { margin: 22px 0; padding: 14px 16px; background: var(--sand); border-radius: 7px; }
.note-label { font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--terra-ink); margin-bottom: 4px; }
.heads-up p { font-size: 15.5px; line-height: 1.6; margin: 0; }

/* rental tips */
.tips-list { list-style: none; padding: 0; margin: 12px 0 28px; display: grid; gap: 14px; }
.tips-list li { position: relative; padding: 16px 16px 14px 68px; background: var(--paper); border-radius: 7px; box-shadow: var(--card-shadow); }
.tip-n { position: absolute; left: 16px; top: 12px; font-family: var(--serif); font-weight: 600; font-size: 38px; line-height: 1; color: var(--accent-ink); }
.tip-t { font-weight: 600; color: var(--navy); }
.tips-list p { margin: 2px 0 0; }

/* directory: restaurants, bars, shops, routes, links */
.dir { margin: 12px 0 24px; }
.dir-group { margin-bottom: 14px; background: var(--paper); border-radius: 7px; box-shadow: var(--card-shadow); padding: 14px 16px 6px; border-top: 3px solid var(--accent); }
.chapter .dir-group h4 { font-style: italic; color: var(--accent-ink); font-size: 23px; margin-bottom: 2px; }
.dir-group ul, .dir-list { list-style: none; padding: 0; margin: 0; }
.dir-item { padding: 9px 0; border-bottom: 1px solid var(--rule); }
.dir-item:last-child { border-bottom: 0; }
.dir-name { display: block; font-weight: 600; color: var(--navy); line-height: 1.35; }
.dir-desc { display: block; color: var(--muted); font-size: 15.5px; line-height: 1.5; margin-top: 1px; }
.dir-url { display: block; font-size: 12.5px; letter-spacing: .02em; color: var(--muted); overflow-wrap: anywhere; }
.links-group .dir-name { display: flex; align-items: center; min-height: 44px; font-family: var(--serif); font-size: 21px; color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.links-group .dir-desc { color: var(--ink); margin-top: 3px; }

/* hiking levels */
.levels { margin: 8px 0 24px; }
.level { margin-bottom: 14px; background: var(--paper); border-radius: 7px; box-shadow: var(--card-shadow); padding: 14px 16px 6px; }
.level-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 6px; border-bottom: 1px solid var(--sand2); }
.tier-name { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 23px; line-height: 1.25; color: var(--accent-ink); }
.dots { flex: none; white-space: nowrap; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--accent); margin-left: 4px; }
.dot.on { background: var(--accent); }
.route-head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
.route p { margin: 2px 0 0; font-size: 15.5px; }

/* travel times */
.travel-time { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--accent-ink); }

/* experiences */
.exp-list { list-style: none; padding: 0; margin: 12px 0 24px; display: grid; gap: 14px; }
.exp-list li { display: flex; gap: 16px; align-items: flex-start; padding: 16px; background: var(--paper); border-radius: 7px; box-shadow: var(--card-shadow); max-width: none; }
.exp-art { flex: none; width: 52px; height: 52px; }
.exp-t { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.2; color: var(--navy); margin-bottom: 4px; }
.exp-body p { margin: 0; }

/* practical notes */
.notes-cols { margin: 4px 0 14px; display: grid; gap: 14px; }
.note-col { background: var(--paper); border-radius: 7px; box-shadow: var(--card-shadow); padding: 16px 18px 6px; border-top: 3px solid var(--accent); }
.note-col p { margin-bottom: .7em; }
.sos { font-weight: 500; color: var(--ink); }
.sos a.il { font-family: var(--serif); font-weight: 600; font-size: 44px; line-height: 1; color: var(--terra); text-decoration: none; vertical-align: -6px; margin: 0 4px; }

/* itineraries as a journal */
.journal { margin: 24px 0 0; background: var(--paper); border-radius: 7px; box-shadow: var(--card-shadow); padding: 18px 18px 8px; }
.chapter .journal h3 { color: var(--navy); font-style: normal; font-size: 26px; margin: 0; }
.itin-sub { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ic-ink); margin: 2px 0 10px; }
.journal-day { padding: 10px 0; border-top: 1px solid var(--rule); }
.journal-day.wed { background: #FBEDE6; border-top: 0; border-radius: 5px; padding: 10px 12px; margin: 4px -12px 0; }
.day-k { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 19px; color: var(--ic-ink); }
.journal-day.wed .day-k::after { content: "\00a0♥"; color: var(--terra); }
.journal-day.wed .day-t { color: var(--navy); font-weight: 500; }

/* places: lead photos, polaroids, plain entries */
.place-list { margin: 8px 0 28px; display: grid; gap: 14px; }
.place { display: flow-root; padding: 16px; background: var(--paper); border-radius: 7px; box-shadow: var(--card-shadow); }
.place-head { display: flex; flex-direction: column; align-items: flex-start; row-gap: 2px; margin-bottom: 6px; }
.place-name { font-family: var(--serif); font-weight: 600; font-size: 24px; line-height: 1.2; color: var(--navy); }
.place p { margin: 0; }
.place figure { margin: 0; }
.lead-photo { margin: -16px -16px 16px !important; }
.lead-photo .photo { display: block; width: 100%; border-radius: 7px 7px 0 0; aspect-ratio: 3 / 2; height: auto; object-fit: cover; background: var(--sand); }
.polaroid {
  width: min(260px, 78%); margin: 4px auto 18px !important; padding: 10px 10px 0; background: #FFFEFA;
  box-shadow: 0 6px 18px rgba(34, 52, 79, .14), 0 1px 2px rgba(34, 52, 79, .08);
}
.polaroid.pol-left { transform: rotate(-1deg); }
.polaroid.pol-right { transform: rotate(1deg); }
.polaroid .photo { display: block; width: 100%; aspect-ratio: 1 / 1; height: auto; object-fit: cover; background: var(--sand); }
.pol-cap { font-family: var(--hand); font-size: 19px; line-height: 1; color: var(--navy); text-align: center; padding: 12px 4px 14px; }

/* phones: Towns & Villages, Beaches and Calas as rows of photo cards you swipe through */
@media (max-width: 767px) {
  .place-list.swipe {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin: 8px calc(-1 * var(--gutter-r)) 28px calc(-1 * var(--gutter)); padding: 4px var(--gutter-r) 14px var(--gutter);
    scroll-padding-inline: var(--gutter); scrollbar-width: none;
  }
  .place-list.swipe::-webkit-scrollbar { display: none; }
  .place-list.swipe > .place {
    flex: 0 0 82%; scroll-snap-align: start; display: grid; grid-template-rows: auto 1fr auto;
    padding: 0; overflow: hidden; border-radius: 10px;
  }
  .place-list.swipe figure { grid-area: 1 / 1; width: auto; margin: 0 !important; padding: 0; background: none; box-shadow: none; transform: none; }
  .place-list.swipe .photo { aspect-ratio: 4 / 3; border-radius: 0; }
  .place-list.swipe .pol-cap { display: none; }
  .place-list.swipe .place-head { grid-area: 1 / 1; margin: 0; padding: 16px 16px 12px; }
  .place-list.swipe > .place > p { padding: 12px 16px 16px; font-size: 15.5px; line-height: 1.55; }
  .place-list.swipe > .place > p.place-acts { padding: 0 16px 6px; margin: 0 !important; }
  /* name and travel time over the photo */
  .place-list.swipe .place--lead .place-head, .place-list.swipe .place--polaroid .place-head {
    align-self: end; padding-top: 48px; z-index: 1;
    background: linear-gradient(to top, rgba(20, 26, 38, .78), rgba(20, 26, 38, 0));
  }
  .place-list.swipe .place--lead .place-name, .place-list.swipe .place--polaroid .place-name,
  .place-list.swipe .place--lead .travel-time, .place-list.swipe .place--polaroid .travel-time {
    color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  }
  .place-list.swipe .place-head { flex-direction: column; align-items: flex-start; row-gap: 2px; }
  /* places without a photo get a sea-coloured panel of the same size, so every card matches */
  .place-list.swipe > .place:not(.place--lead):not(.place--polaroid) > .place-head {
    aspect-ratio: 4 / 3; justify-content: flex-end; flex-wrap: nowrap;
    background: linear-gradient(160deg, #E6F2EF 0%, #C9E3DD 100%);
  }
}

/* recommendation rows: where it is, then Map / Website links (kept secondary to name and description) */
.dir-meta {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 16px; margin: -6px 0 -9px;
  font-family: var(--sans); font-size: 13.5px; line-height: 1.4; letter-spacing: .02em; color: var(--muted);
}
.dir-acts { display: flex; flex-wrap: wrap; column-gap: 18px; margin-left: auto; }
.dir-link {
  position: relative; /* keeps its visually hidden label inside scrolling card rows */
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px;
  font-family: var(--sans); font-weight: 500; font-size: 13.5px; line-height: 1; letter-spacing: .03em; color: var(--accent-ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
}
.dir-link:hover { opacity: .8; }
.place-acts { margin: 4px 0 -10px !important; }
.route .dir-meta { margin-top: -4px; }
.closing-note { margin: 26px 0 6px; }

/* expandable categories (Eat, Drink & Party): one column, several can be open at once */
.acc-group { margin: 6px 0 24px; }
.acc-tools { display: flex; justify-content: flex-end; margin: -8px 0 2px; }
.acc-all {
  min-height: 44px; padding: 0 2px; background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-weight: 500; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink);
}
.acc-all:hover { color: var(--navy); }
.dir-group.acc { padding: 0 16px; margin-bottom: 10px; }
.chapter .acc-h { margin: 0; }
.acc-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px 0; margin: 0;
  background: none; border: 0; cursor: pointer; text-align: left; color: inherit; font: inherit;
}
.acc-title { flex: 1; font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 23px; line-height: 1.2; color: var(--accent-ink); }
.acc-count { flex: none; font-family: var(--sans); font-style: normal; font-weight: 400; font-size: 13px; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.acc-icon {
  flex: none; width: 9px; height: 9px; margin: 0 4px 0 2px; border-right: 1.5px solid var(--accent-ink); border-bottom: 1.5px solid var(--accent-ink);
  transform: translateY(-3px) rotate(45deg); transition: transform var(--t-acc) var(--ease-std);
}
.acc-btn[aria-expanded="true"] .acc-icon { transform: translateY(2px) rotate(225deg); }
.acc-btn:hover .acc-title { color: var(--navy); }
.acc-btn:focus-visible { outline-offset: -1px; }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-acc) var(--ease-std); }
.acc-panel[hidden]:not([hidden="until-found"]) { display: none; }
.acc.is-open .acc-panel { grid-template-rows: 1fr; }
.acc-inner { min-height: 0; overflow: hidden; opacity: 0; transition: opacity var(--t-acc) var(--ease-std); }
.acc.is-open .acc-inner { opacity: 1; }
.acc-inner > ul { border-top: 1px solid var(--sand2); padding-bottom: 8px !important; }

/* itineraries: a 3 / 5 / 7-day selector, one plan shown at a time */
.itin { margin: 22px 0 0; }
.itin-q { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 21px; line-height: 1.3; color: var(--navy); margin: 0 0 10px; }
.itin-tabs { display: flex; gap: 4px; padding: 4px; background: var(--sand); border-radius: 999px; }
.itin-tab {
  flex: 1; min-height: 44px; padding: 0 8px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font-family: var(--sans); font-weight: 500; font-size: 15px; letter-spacing: .03em; color: var(--muted); white-space: nowrap;
  transition: background-color var(--t-std) var(--ease-std), color var(--t-std) var(--ease-std), box-shadow var(--t-std) var(--ease-std);
}
.itin-tab:hover { color: var(--navy); }
.itin-tab[aria-selected="true"] { background: var(--paper); color: var(--navy); font-weight: 600; box-shadow: 0 1px 3px rgba(34, 52, 79, .14); }
.itin-tab:focus-visible { outline-offset: -2px; }
.itin .journal { margin-top: 14px; }
.itin .journal[hidden] { display: none; } /* desktop lays journals out as a grid, which would override [hidden] */
.itin .journal:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }
/* the selected tab already says how many days */
.itin .itin-len { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* hiking levels inside the expandable pattern */
.level.acc { padding: 0 16px; margin-bottom: 10px; }
/* title on top; difficulty dots and count underneath; chevron on the right */
.level.acc .acc-btn { display: grid; grid-template-columns: auto auto 1fr auto; column-gap: 10px; row-gap: 4px; align-items: center; }
.level.acc .tier-name { grid-column: 1 / 4; grid-row: 1; }
.level.acc .dots { grid-column: 1; grid-row: 2; }
.level.acc .dot:first-child { margin-left: 0; }
.level.acc .acc-count { grid-column: 2; grid-row: 2; }
.level.acc .acc-icon { grid-column: 4; grid-row: 1 / 3; }

/* "Our recommendation" notes */
.rec { background: var(--paper); border-left: 4px solid var(--accent); border-radius: 0 7px 7px 0; padding: 18px 22px 8px 24px; margin: 30px 0 8px; box-shadow: 0 1px 0 #EADFCB; }
.rec-label { font-family: var(--sans); font-weight: 600; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 8px; }
.rec p { color: var(--navy); }

@media (min-width: 768px) {
  .polaroid { width: 200px; margin: 6px 0 12px !important; }
  .polaroid.pol-left { float: left; margin-right: 28px !important; transform: rotate(-1.5deg); }
  .polaroid.pol-right { float: right; margin-left: 28px !important; transform: rotate(1.5deg); }
  /* What to Explore: photo-on-top cards, two per row */
  .place-list { grid-template-columns: 1fr 1fr; gap: 18px; }
  .areas-list, .tips-list, .exp-list { grid-template-columns: 1fr 1fr; }
  /* useful links: name and address on the left, description beside them */
  .links-group .dir-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: 28px; align-items: center; }
  .links-group .dir-name, .links-group .dir-url { grid-column: 1; }
  .links-group .dir-desc { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .dir { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; align-items: start; }
  .dir .dir-desc { font-size: 15px; }
  .note-wide { grid-column: 1 / -1; }
}

/* ---------- closing ---------- */
.closing {
  clear: both; text-align: center; padding: 56px 0 28px; margin-top: 8px; background: #E3F1EE;
  box-shadow: 0 0 0 100vmax #E3F1EE; clip-path: inset(0 -100vmax);
}
.closing-art { margin-top: 0; }
.closing .script { margin-top: 28px; }
.sign { font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; line-height: 2; color: var(--navy); margin-top: 28px; }
.sign span { color: var(--terra-ink); }
.pdf-btn { display: inline-flex; align-items: center; min-height: 44px; margin-top: 18px; }
.about { max-width: 34rem; margin: 48px auto 0; padding-top: 14px; border-top: 1px solid #BFD9D4; text-align: left; }
.about-h { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 17px; color: var(--teal-ink); margin-bottom: 4px; }
.about p { font-size: 13.5px; line-height: 1.55; color: #586272; /* the muted grey is too light on the teal band */ margin: 0; }
.edition { display: flex; justify-content: space-between; gap: 12px; max-width: 34rem; margin: 14px auto 0; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #8C96A4; }
.edition a { display: inline-flex; align-items: center; min-height: 44px; color: var(--teal-ink); text-transform: none; letter-spacing: .04em; }

/* ---------- section nav (phones and tablets) ----------
   Sits in the flow right under the hero, so it doubles as a quick start, then sticks below the
   top bar. Being in the flow, it never shifts the layout when it starts sticking. */
.secnav {
  position: sticky; top: var(--bar-h); z-index: 20; height: var(--secnav-h);
  background: rgba(251, 246, 236, .96); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.secnav ol {
  display: flex; height: 100%; margin: 0; padding: 0 var(--gutter-r) 0 var(--gutter); list-style: none;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  /* fade both edges so it reads as scrollable and labels never end in a hard cut */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 28px), transparent);
}
.secnav ol::-webkit-scrollbar { display: none; }
.secnav li { flex: none; }
.secnav a {
  display: flex; align-items: center; height: 100%; min-width: 44px; padding: 0 11px; white-space: nowrap;
  font-family: var(--sans); font-weight: 500; font-size: 13.5px; letter-spacing: .03em; color: var(--muted);
}
.secnav li:first-child a { padding-left: 2px; }
.secnav li:last-child a { padding-right: 28px; }
.secnav a[aria-current="true"] { color: var(--navy); box-shadow: inset 0 -2px 0 var(--terra); }
.secnav a:focus-visible { outline-offset: -3px; }

@media (max-width: 1023px) {
  html { scroll-padding-top: calc(var(--bar-h) + var(--secnav-h) + 12px); }
  /* once the section nav is stuck it does the job of "Contents", so the bar keeps only EN / ES */
  html.nav-stuck .menu-btn, html.nav-stuck .bar-sep { display: none; }
  /* links that leave the guide get a small arrow */
  .ch-body a[href^="http"]::after, .closing a[href^="http"]::after { content: "\2009\2197"; font-size: .8em; }
  .link-row a.il::after { content: "\2009\2197"; }
}

/* phones: less scrolling before the guide starts */
@media (max-width: 640px) {
  .welcome { padding-top: 36px; }
  .welcome-art { margin: 24px auto 28px; }
  .ch-art { width: 54px; height: 54px; }
  .ch-open { gap: 16px; }
  .chapter + .chapter, .chapter + .closing { margin-top: 80px; }
  .welcome + .chapter { margin-top: 48px; }
}

/* desktop: a single centered main column */
@media (min-width: 1024px) {
  .secnav { display: none; }
  .journal { display: grid; grid-template-columns: 190px 1fr; column-gap: 28px; padding: 20px 22px 10px; }
  .journal > h3, .journal > .itin-sub { grid-column: 1 / -1; }
  .journal-day { display: contents; }
  .journal-day > .day-k, .journal-day > .day-t { padding: 10px 0; border-top: 1px solid var(--rule); }
  .journal-day.wed > .day-k, .journal-day.wed > .day-t { background: #FBEDE6; border-top: 0; margin-top: 4px; }
  .journal-day.wed > .day-k { border-radius: 5px 0 0 5px; padding-left: 12px; margin-left: -12px; padding-right: 28px; margin-right: -28px; }
  .journal-day.wed > .day-t { border-radius: 0 5px 5px 0; padding-right: 12px; margin-right: -12px; }
}

/* ---------- phones ---------- */
@media (max-width: 640px) {
  html { font-size: 16px; }
  .bar-brand { font-size: 21px; }
  .bar-right { font-size: 12.5px; letter-spacing: .05em; }
  .hero .cover-eyebrow { letter-spacing: .22em; }
}
@media (max-width: 360px) {
  .bar-brand { font-size: 19px; }
  .bar-right button { padding: 0 5px; }
}

/* ---------- motion & interaction feedback ----------
   Small and quick: the cover settles in once, state changes fade or slide over ~150–220ms,
   and taps get a brief pressed state. Only opacity and transform are animated. */

/* cover: map fades up from the sea colour, then the lettering rises into place (once; see guide.js) */
@keyframes g-fade { from { opacity: 0; } }
@keyframes g-rise { from { opacity: 0; transform: translateY(14px); } }
.hero-map { animation: g-fade 480ms var(--ease-out) both; }
.cover-eyebrow { animation: g-rise 560ms var(--ease-out) 60ms both; }
.cover-title { animation: g-rise 620ms var(--ease-out) 120ms both; }
.cover-sub { animation: g-rise 560ms var(--ease-out) 220ms both; }
.cover-bottom { animation: g-fade 560ms var(--ease-out) 320ms both; }
/* after the first run, showing the other language's cover must not replay it */
html.intro-done .hero-map, html.intro-done .hero-top > *, html.intro-done .cover-bottom { animation: none; }

/* top bar: "Contents" fades back in when the section nav lets go */
.bar-right button { transition: color var(--t-fast) var(--ease-std), opacity var(--t-fast) var(--ease-std); }
html.nav-was-stuck:not(.nav-stuck) .menu-btn, html.nav-was-stuck:not(.nav-stuck) .bar-sep { animation: g-fade var(--t-std) var(--ease-out); }

/* contents menu drops in */
@keyframes g-drop { from { opacity: 0; transform: translateY(-6px); } }
.menu:not([hidden]) { animation: g-drop var(--t-std) var(--ease-out); }

/* section nav: a soft edge once it is stuck, and one underline that slides to the current chapter */
.secnav { transition: box-shadow var(--t-std) var(--ease-std); }
html.nav-stuck .secnav { box-shadow: 0 8px 14px -12px rgba(34, 52, 79, .28); }
.secnav ol { position: relative; }
.secnav a { transition: color var(--t-fast) var(--ease-std); }
.secnav.has-ind a[aria-current="true"] { box-shadow: none; } /* the sliding underline replaces the per-link one */
.secnav.has-ind ol::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100px; height: 2px; background: var(--terra);
  transform-origin: 0 0; transform: translateX(var(--ind-x, 0)) scaleX(var(--ind-s, 0)); opacity: var(--ind-o, 0);
  transition: transform var(--t-std) var(--ease-std), opacity var(--t-fast) linear; pointer-events: none;
}
.secnav.ind-instant ol::after { transition: none; }

/* itineraries: the newly chosen plan fades in (no slide), starting at once */
@keyframes g-swap { from { opacity: 0; } }
.itin .journal.itin-in { animation: g-swap 180ms var(--ease-out); }

/* photos fade in as they arrive; the frame keeps its size and a sand placeholder meanwhile */
.photo { transition: opacity 300ms var(--ease-out); }
.photo.img-wait { opacity: 0; }
.lead-photo { background: var(--sand); border-radius: 7px 7px 0 0; }
@media (max-width: 767px) {
  .place-list.swipe > .place > figure { background: var(--sand); border-radius: 0; }
}

/* hover (devices that hover) and pressed states (everyone, including touch) */
.secnav a, .acc-btn, .acc-all, .itin-tab, .bar-right button, .toc a, .menu-list a,
a.il, .dir-link, .links-group .dir-name, .pdf-btn, .menu-pdf, .edition a { -webkit-tap-highlight-color: transparent; }
a.il, .dir-link, .links-group .dir-name, .pdf-btn, .menu-pdf, .edition a { transition: opacity var(--t-fast) var(--ease-std), color var(--t-fast) var(--ease-std); }
.toc .tt, .menu-list a, .acc-title, .acc-all { transition: color var(--t-fast) var(--ease-std), opacity var(--t-fast) var(--ease-std); }
.acc-btn { transition: opacity 120ms var(--ease-std); }
@media (hover: hover) {
  .secnav a:hover { color: var(--navy); }
  .links-group .dir-name:hover, .pdf-btn:hover, .menu-pdf:hover, .edition a:hover { opacity: .8; }
  .itin-tab:not([aria-selected="true"]):hover { background: rgba(255, 253, 248, .55); }
}
.secnav a:active, .toc a:active .tt, .menu-list a:active { color: var(--terra-ink); }
a.il:active, .dir-link:active, .links-group .dir-name:active, .pdf-btn:active, .menu-pdf:active, .edition a:active,
.bar-right button:active, .acc-all:active { opacity: .6; transition-duration: 60ms; }
.acc-btn:active { opacity: .7; transition-duration: 60ms; }
.itin-tab:not([aria-selected="true"]):active { background: rgba(255, 253, 248, .75); color: var(--navy); }
.itin-tab[aria-selected="true"]:active { box-shadow: 0 0 0 rgba(34, 52, 79, 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar { transition: none; }
  .acc-panel, .acc-icon, .acc-inner, .itin-tab { transition: none; }
  /* no entrances, fades or slides; state changes stay, just instant */
  .hero-map, .hero-top > *, .cover-bottom, .menu:not([hidden]), .itin .journal.itin-in,
  html.nav-was-stuck:not(.nav-stuck) .menu-btn, html.nav-was-stuck:not(.nav-stuck) .bar-sep { animation: none; }
  .secnav, .secnav.has-ind ol::after, .photo { transition: none; }
  .photo.img-wait { opacity: 1; }
}
