/* "Life on the Samaná peninsula" (src/pages/area.js). Tokens only, no typed colours. The highlight
   tiles (.glance) and their pencil marks (.area-icon) are shared with the home page, so they live in
   parts.css; this file styles the rest of the page and its hand-drawn charts (src/area-charts.js: every
   mark carries a class "ac-…", painted here). */

/* ---------- the head: words beside a photograph */
.area-hero { padding-block: clamp(2.2rem, 6vw, 4rem) clamp(1.2rem, 3vw, 2rem); }
.area-hero__in { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(1.4rem, 4vw, 3rem); align-items: center; }
.area-hero__title { max-width: 16ch; }
.area-hero__cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }
.area-hero__photo { margin: 0; padding: 0.5rem 0.5rem 0.6rem; background: var(--card); border: 2px solid var(--ink); border-radius: 10px 4px 12px 6px; box-shadow: 6px 7px 0 var(--gold); transform: rotate(0.6deg); }
.area-hero__photo img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; }
@media (max-width: 62rem) {
  .area-hero__in { grid-template-columns: minmax(0, 1fr); }
  .area-hero__photo { order: -1; transform: none; }
}
.area-photo__credit { margin-top: 0.4rem; font-size: 0.78rem; color: var(--ink-soft); }
.area-photo__credit a { color: inherit; }

/* ---------- the charts' hint under the at-a-glance tiles */
.area-hint { margin-top: 1.4rem; max-width: 46rem; font-size: 0.95rem; color: var(--ink-soft); }
.area-hint[hidden] { display: none; }

/* ---------- words */
.area-sec p + p { margin-top: 0.8rem; }
.area-sub { font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin: 2.4rem 0 0.9rem; }
.area-gap, .area-note { font-size: 0.95rem; color: var(--ink-soft); }
.area-gap { padding-left: 0.9rem; border-left: 3px dashed var(--rule); margin-top: 1rem; }
.area-more { margin-top: 1.6rem; font-weight: 650; }
.area-drivers { margin-top: 1.4rem; max-width: 46rem; font-size: 1.08rem; }
.area-list { display: grid; gap: 0.7rem; padding-left: 1.3rem; max-width: 52rem; }
.area-list li::marker { color: var(--gold-deep); }

/* ---------- cards */
.area-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1.2rem; }
.area-card { padding: 1.2rem 1.2rem 1.3rem; background: var(--card); border: 2px solid var(--ink); border-radius: var(--wobble); box-shadow: 4px 5px 0 var(--rule); min-width: 0; }
.area-card:nth-child(3n + 1) { box-shadow: 4px 5px 0 var(--sea); }
.area-card:nth-child(3n + 2) { box-shadow: 4px 5px 0 var(--gold); }
.area-card__title { font-size: 1.25rem; margin-bottom: 0.5rem; }
.area-card__text { color: var(--ink-soft); }
.area-card--law { box-shadow: 4px 5px 0 var(--palm) !important; }
.area-protect { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.2rem; }

/* ---------- the photographs */
.area-gallery { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 1.1rem; }
@media (min-width: 62rem) { .area-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.area-gallery figure { margin: 0; padding: 0.4rem 0.4rem 0.5rem; background: var(--card); border: 2px solid var(--ink); border-radius: 6px 3px 7px 4px; box-shadow: 4px 5px 0 var(--rule); }
.area-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 2px; }
.area-gallery li:nth-child(odd) figure { transform: rotate(-0.5deg); }
.area-gallery li:nth-child(even) figure { transform: rotate(0.5deg); }

/* ---------- the three places and the sketch map */
.area-places { display: grid; gap: 1.6rem; }
.area-map { margin: 0; padding: 0.9rem; background: var(--card); border: 2px solid var(--ink); border-radius: 10px 4px 12px 6px; box-shadow: 4px 5px 0 var(--sea); min-width: 0; }
.area-map__narrow { display: none; }
@media (max-width: 40rem) {
  .area-map__wide { display: none; }
  .area-map__narrow { display: block; }
}
/* the three places, one line each, under the map */
.area-towns { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: 0.8rem 1rem; }
.area-town { padding: 0.7rem 1rem; border-left: 5px solid var(--gold); background: var(--card); border-radius: 0 6px 6px 0; }
.area-town--el-limon { border-left-color: var(--palm); }
.area-town--las-galeras { border-left-color: var(--sea); }
.area-town__title { font-family: var(--font-display); font-size: 1.2rem; font-weight: 650; }
.area-town dd { margin: 0.15rem 0 0; font-size: 0.98rem; color: var(--ink-soft); }
.area-gallery--two { margin: 1.6rem 0 0; }
@media (min-width: 62rem) { .area-gallery--two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- getting there */
.area-airports { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 1.2rem 1.6rem; margin: 1.2rem 0; align-items: start; }
@media (max-width: 48rem) { .area-airports { grid-template-columns: minmax(0, 1fr); } }
.area-airport { padding: 1rem 1.2rem; background: var(--card); border: 2px solid var(--ink); border-radius: 8px 4px 10px 5px; box-shadow: 4px 5px 0 var(--gold); min-width: 0; }
.area-airport__title { font-size: 1.25rem; margin-bottom: 0.6rem; }
.area-cities { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); gap: 0.25rem 1rem; }
.area-cities li { padding: 0.2rem 0; border-bottom: 1px dashed var(--rule); font-weight: 600; }
.area-cities__code { font-size: 0.8rem; font-weight: 500; color: var(--ink-soft); letter-spacing: 0.04em; }
.area-cities__tag { font-size: 0.75rem; font-weight: 600; color: var(--sea-deep); }
.area-drive td { white-space: normal; min-width: 9rem; }
/* the direct answer that opens "Getting there" */
.area-answer { display: block; font-weight: 600; color: var(--ink); max-width: 52rem; }
/* the drive table on a phone: one card per airport, each place's drive under its name; the caption wraps */
@media (max-width: 40rem) {
  .area-stack .table-wrap__hint { display: none; }
  .area-stack .table-wrap__scroll { overflow: visible; max-height: none; border: 0; box-shadow: none; background: none; }
  .area-stack table, .area-stack tbody, .area-stack tr, .area-stack th, .area-stack td, .area-stack caption { display: block; width: auto; }
  .area-stack caption { padding: 0 0 0.6rem; white-space: normal; }
  .area-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .area-stack tr { margin-bottom: 0.9rem; padding: 0.6rem 0.9rem; background: var(--card); border: 1.5px solid var(--ink); border-radius: 6px 3px 7px 4px; }
  .area-stack tbody th { padding: 0 0 0.3rem; border: 0; font-size: 1.05rem; }
  .area-stack td { min-width: 0; padding: 0.35rem 0; border-bottom: 1px dashed var(--rule); }
  .area-stack tr > td:last-child { border-bottom: 0; }
  .area-stack td::before { content: attr(data-label); display: block; font-size: 0.82rem; font-weight: 650; color: var(--ink-soft); }
}
/* the country in numbers: four headline facts, the tiles' look without icons or links */
.area-facts { margin-bottom: 1.6rem; }
@media (min-width: 62rem) { .area-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* the cities flown every month: short chips that wrap */
.area-chips { list-style: none; margin: 0.8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.area-chips li { padding: 0.25rem 0.7rem; background: var(--card); border: 1.5px solid var(--ink); border-radius: 999px; font-weight: 600; font-size: 0.95rem; }
#travel .area-method { margin-bottom: 1.6rem; }

/* ---------- words beside a chart */
.area-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 1.4rem 2.4rem; align-items: start; margin-top: 1.6rem; }
.area-split:first-child { margin-top: 0; }
@media (max-width: 62rem) { .area-split { grid-template-columns: minmax(0, 1fr); } }
.area-method { margin-top: 1.2rem; }
.area-method summary { cursor: pointer; font-weight: 650; min-height: 2.75rem; padding-block: 0.5rem; } /* a 44 px target */
.area-method p { margin-top: 0.6rem; font-size: 0.95rem; color: var(--ink-soft); }

/* ---------- the hand-drawn charts */
.area-chart { margin: 0; padding: 0.9rem 1rem 1rem; background: var(--card); border: 2px solid var(--ink); border-radius: 8px 4px 10px 5px; box-shadow: 4px 5px 0 var(--rule); min-width: 0; }
.area-chart__title { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.25; margin-bottom: 0.5rem; }
.area-chart__note { font-size: 0.88rem; color: var(--ink-soft); margin-top: 0.5rem; }
.ac { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font-body); }
.ac:not(.ac--map) { max-width: 34rem; margin-inline: auto; }
.ac text { fill: var(--ink); }
.ac path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ac .ac-label { font-size: 11.5px; font-weight: 650; fill: var(--ink-soft); }
.ac .ac-tick { font-size: 11px; fill: var(--ink-soft); }
.ac .ac-val { font-size: 12px; }
.ac .ac-val--strong { font-weight: 700; }
.ac .ac-row { font-size: 13px; }
.ac .ac-row--strong { font-weight: 700; }
.ac .ac-legend { font-size: 11px; }
.ac .ac-grid { stroke: var(--rule); stroke-width: 0.8; stroke-dasharray: 2 3; }
.ac .ac-grid--zero { stroke: var(--ink-soft); stroke-dasharray: none; }
.ac [class*="ac-axis"] { stroke: var(--ink); stroke-width: 1.4; }
.ac .ac-none { stroke: var(--ink-soft); stroke-width: 1.4; }
/* bars */
.ac .ac-bar-line { stroke: var(--ink); stroke-width: 1.2; }
.ac .ac-bar-fill { stroke: var(--sea); stroke-width: 1.4; }
.ac [class*="ac-bar--now-line"] { stroke: var(--ink); stroke-width: 1.4; }
.ac [class*="ac-bar--now-fill"] { stroke: var(--coral); stroke-width: 1.6; }
/* nested bars: the whole hatched, the part solid */
.ac .ac-all-line, .ac [class*="ac-all--strong-line"] { stroke: var(--ink); stroke-width: 1.1; }
.ac .ac-all-fill { stroke: var(--ink-soft); stroke-width: 1; opacity: 0.55; }
.ac [class*="ac-all--strong-fill"] { stroke: var(--sea); stroke-width: 1.3; opacity: 0.9; }
.ac .ac-part-solid, .ac [class*="ac-part--strong-solid"] { fill: var(--coral); stroke: none; }
.ac .ac-part-line, .ac [class*="ac-part--strong-line"] { stroke: var(--ink); stroke-width: 1; }
/* twin bars: one year against another */
.ac .ac-old-line { stroke: var(--ink-soft); stroke-width: 1; }
.ac .ac-old-fill { stroke: var(--ink-soft); stroke-width: 1; opacity: 0.6; }
.ac .ac-new-solid { fill: var(--sea); stroke: none; }
.ac .ac-new-line { stroke: var(--ink); stroke-width: 1.1; }
/* lines */
.ac .ac-line1-line { stroke: var(--sea-deep); stroke-width: 2.4; }
.ac .ac-line2-line { stroke: var(--gold-deep); stroke-width: 2.2; }
.ac .ac-dash-line { stroke-dasharray: 5 4; }
.ac .ac-line1.ac-dash-line, .ac .ac-line1 { stroke: var(--sea-deep); }
.ac .ac-line2.ac-dash-line { stroke: var(--gold-deep); stroke-width: 2.2; }
.ac .ac-line1-dot { fill: var(--sea-deep); }
.ac .ac-line2-dot { fill: var(--gold-deep); }
.ac .ac-line1-word { fill: var(--sea-deep); font-weight: 700; }
.ac .ac-line2-word { fill: var(--gold-deep); font-weight: 700; }
/* the year: warmth over rain */
.ac .ac-warm-line { stroke: var(--coral-deep); stroke-width: 2.4; }
.ac .ac-warm-dot { fill: var(--coral-deep); }
.ac [class*="ac-rain"][class$="-line"] { stroke: var(--sea-deep); stroke-width: 1; }
.ac [class*="ac-rain"][class$="-fill"] { stroke: var(--sea); stroke-width: 1.2; }
.ac [class*="ac-rain--wet"][class$="-fill"] { stroke: var(--sea-deep); stroke-width: 1.6; }
/* the sketch map */
.ac--map { max-width: none; overflow: hidden; }
.area-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ac .ac-wave-line { stroke: var(--sea); stroke-width: 1.2; opacity: 0.7; }
.ac .ac-land-line { stroke: var(--ink); stroke-width: 1.3; }
.ac .ac-land-fill { stroke: var(--palm); stroke-width: 0.9; opacity: 0.55; }
.ac .ac-word { font-family: var(--font-hand); fill: var(--ink); }
.ac .ac-place { font-weight: 700; }
.ac .ac-water { fill: var(--sea-deep); font-style: italic; }
.ac .ac-park { fill: var(--palm); }
.ac .ac-pin { fill: var(--gold); stroke: var(--ink); stroke-width: 1.4; }
.ac .ac-plane { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.ac .ac-spot { fill: var(--card); stroke: var(--ink); stroke-width: 1.3; }
.ac .ac-spot--waterfall { fill: var(--sea); }
.ac .ac-spot--islet { fill: var(--palm); }

@media print {
  .area-hint { display: none !important; }
  .area-hero__photo, .area-gallery figure { transform: none; box-shadow: none; }
}
.area-photo__caption { display: block; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
/* on a phone a chart is drawn about 0.9 times its size: its words a little larger, so they stay near 12 px */
@media (max-width: 40rem) {
  .ac .ac-row { font-size: 14px; }
  .ac .ac-val, .ac .ac-tick, .ac .ac-label { font-size: 12.5px; }
  .ac .ac-legend { font-size: 12px; }
}

/* ---------- the charts' marks: a tooltip on pointing, tapping or the arrow keys (chart-tips.js, from
   pages/area.js; the tooltip itself is styled in parts.css) */
.area-chart { position: relative; }
.ac[tabindex]:focus-visible { outline: 3px solid var(--sea); outline-offset: 4px; border-radius: 4px; }
.ac .is-on { stroke-width: 2.6; }
.ac g.is-on path[class$="-line"] { stroke: var(--coral-deep); stroke-width: 2.2; }
.ac circle.is-on { stroke: var(--coral-deep); stroke-width: 2; }
