/* Shared stylesheet — every destination in the portfolio.
   Style reference: visitaritalia.com (light, warm-cream, editorial, one deep accent).
   The accent tokens below are the Tatra defaults; a destination overrides them via
   `site.theme` in its approved JSON (base.html emits a small :root override), so
   nothing else in this file should hard-code an accent colour. */

:root {
  --bg: #f4efe6;
  --bg-alt: #ffffff;
  --text: #2b2a26;
  --text-dim: #6b6a63;
  --accent: #2f4d3a; /* deep pine green, matches Tatra forest + visitaritalia CTA green */
  --accent-light: #e8f0ea;
  --border: #e3ddd0;
  --link: #2f4d3a;
  --accent-deep: #1c2e22; /* dark end of the no-photo hero gradient */
  --star-empty: #d6d2c6;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* Keep keyboard-focused elements clear of the fixed mobile booking bar
     (WCAG 2.2 Focus Not Obscured). Harmless on desktop. */
  scroll-padding-bottom: 5rem;
  -webkit-text-size-adjust: 100%;
}

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

/* Skip link: first focusable element, off-screen until focused. */
.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: var(--text);
  color: var(--bg-alt);
  border-radius: 6px;
  font-weight: 600;
}
.skip-link:focus { top: 0.5rem; }
main:focus { outline: none; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* height:auto is load-bearing — the width/height attributes on <img> (there to
   reserve space and stop layout shift) otherwise resolve both dimensions, which
   makes the browser ignore any aspect-ratio set in CSS. */
img { max-width: 100%; height: auto; }

header.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg);
}

.site-header .logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-header nav {
  flex: 1;
  text-align: right;
}

.site-header nav a {
  color: var(--text-dim);
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.site-header nav a:hover { color: var(--text); }

/* Editorial guide pages (History) get a highlighted pill in the header so they
   stand out from the tour links. Gold is deliberately not one of the
   .card-tag colours — those each mean one activity type. */
.site-header nav a.nav-guide {
  position: relative;
  background: var(--highlight, #e3a93b);
  color: #2b2a26;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}
.site-header nav a.nav-guide:hover,
.site-header nav a.nav-guide[aria-current="page"] { background: #d4952a; color: #2b2a26; }

.breadcrumb {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.5rem 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); }

.hero {
  position: relative;
  padding: 6.5rem 1.5rem 4rem;
  margin-top: 0.75rem;
  color: #fff;
  background-size: cover;
  background-position: center;
  background-color: var(--accent-deep); /* fallback tone when no hero image is set */
}

.hero.has-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20,25,20,0.15) 0%, rgba(15,18,15,0.75) 100%);
}

.hero:not(.has-image) {
  background-image: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
}

.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(1.9rem, 7vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.6rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.hero .tagline {
  font-size: 1.05rem;
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.hero .tagline::before {
  content: "";
  display: inline-block;
  flex-shrink: 0;
  width: 1.75rem;
  height: 2px;
  margin-top: 0.8em; /* aligns the rule with the first line, not the block's centre */
  background: #d7c98a;
}

.byline {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: 1rem auto 0;
  max-width: var(--max-width);
  padding: 0 1.5rem;
}

.quickfacts {
  max-width: var(--max-width);
  margin: -2.5rem auto 0;
  padding: 0 1.5rem;
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.quickfacts div {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.quickfacts div strong {
  display: block;
  color: var(--text-dim);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 3rem;
}

section { margin-top: 2.5rem; }

section h2 {
  font-size: 1.35rem;
  margin: 0 0 1rem;
  padding-bottom: 0.6rem;
  position: relative;
}

section h2::after {
  content: "";
  display: block;
  width: 2.25rem;
  height: 3px;
  background: var(--accent);
  margin-top: 0.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--border);
}

th { color: var(--text-dim); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; background: var(--accent-light); }

tr:last-child td { border-bottom: none; }

ul.plain { padding-left: 1.2rem; }
ul.plain li { margin-bottom: 0.5rem; }

.mistake-list li::marker { color: var(--accent); }
.mistake-list a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* Featured-activity cards: horizontal rows (image / content / CTA side by
   side) rather than a grid of vertical tiles — reads more like a curated
   shortlist than a catalogue, and gives the copy more room per card. */
.card-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Side-by-side comparison grid from tablet width up. A single stacked
   column (visitaritalia's own layout) made sense when this was one or two
   cards, but at 4 cards it's a long scroll before a desktop visitor sees
   every option — a 2-up grid lets them compare price/rating across tours
   without scrolling, which is the layout CTR research favours for
   comparison-shopping pages. Mobile stays a stacked list (existing
   below-480px rule already gives it the vertical card layout this needs). */
@media (min-width: 640px) {
  .card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  .card { flex-direction: column; align-items: stretch; }
  .card .card-image-wrap { width: 100%; height: auto; aspect-ratio: 16 / 10; align-self: auto; }
  .card-body { align-items: stretch; }
  .card .cta-block { align-self: stretch; text-align: center; margin-top: auto; }
  .card .cta { display: block; }
}

.card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  display: flex;
  align-items: stretch;
}

.card .card-image-wrap {
  /* Fills the card's full height rather than a fixed small box — matches
     visitaritalia.com's recommended-tour widget, where the photo reads as
     a real photo rather than a thumbnail squeezed beside the text. */
  position: relative;
  width: 300px;
  flex-shrink: 0;
  align-self: stretch;
}

.card .card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: var(--accent-light);
}

/* Category badge — visitaritalia.com marks each tour card with a small
   colored tag (activity type) so the list scans as distinct trips, not a
   wall of identical photo+text rows. Color coded by tag_kind so the same
   activity type reads consistently across every card on the page. */
.card-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.6rem;
  border-radius: 4px;
  line-height: 1;
  color: #fff;
  background: var(--text-dim);
}

.card-tag.on-image {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
}

.card-tag.tag-hike { background: #3f6b4a; }
.card-tag.tag-cable-car { background: #3d6b8a; }
.card-tag.tag-thermal-baths { background: #b5722f; }
.card-tag.tag-private { background: #7a5c9e; }
/* Coastal set, added for Menorca (site #2). Kept distinct from the four above so a
   colour keeps meaning one activity type across the whole portfolio. */
.card-tag.tag-boat { background: #1f5f8b; }
.card-tag.tag-snorkel { background: #16857a; }
.card-tag.tag-off-road { background: #8a5a2b; }
.card-tag.tag-heritage { background: #9a4a3c; }
/* Winter set, added for the Tatra 2026/27 season (snowmobiles, sleighs). */
.card-tag.tag-snow { background: #4a5d7a; }

.details .card-tag { margin-bottom: 0.4rem; }

.card-body {
  padding: 1rem 1.25rem;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.card h3 { margin: 0 0 0.3rem; font-size: 1.05rem; }
.card .meta { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 0.4rem; }
.card p { margin: 0 0 0.9rem; }

.rating-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
  font-size: 0.88rem;
}

/* Star bar that fills to the actual score, set per-instance as --fill by the
   template. Five solid stars next to the text "4.8" overstates the rating —
   small, but it's the kind of inaccuracy that quietly erodes a review score's
   value as a trust signal. Forced LTR: the bar fills left-to-right even on
   the RTL pages, matching how ratings are conventionally read (and how the
   Western numerals beside them already behave). */
.stars {
  position: relative;
  display: inline-block;
  direction: ltr;
  color: var(--star-empty);
  letter-spacing: 1px;
  font-size: 0.85rem;
}

.stars::before {
  content: "★★★★★";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--fill, 100%);
  overflow: hidden;
  white-space: nowrap;
  color: var(--accent);
}

.rating-score { font-weight: 700; }
.review-count { color: var(--text-dim); font-size: 0.82rem; }

.price-from {
  font-weight: 700;
  color: var(--accent);
  margin-inline-start: 0.3rem;
  padding-inline-start: 0.6rem;
  border-inline-start: 1px solid var(--border);
}

.booking-widget.featured .rating-price { margin-top: 0.4rem; margin-bottom: 0; }

/* Viator's own "booked N days in advance" figure — real social proof that
   argues for booking ahead without inventing scarcity. */
.booked-ahead {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: var(--text-dim);
  max-width: 46em;
}

/* Time-limited warning (e.g. a venue closure). Rendered only while current —
   generate.py drops it after its `until` date. Amber so it reads as a caution,
   not as a card tag or a CTA. */
.notice {
  margin: 0.6rem 0 0;
  padding: 0.6rem 0.8rem;
  border-left: 3px solid #d4952a;
  background: #fbf1dc;
  font-size: 0.88rem;
  color: var(--text);
  border-radius: 4px;
  max-width: 46em;
}
[dir="rtl"] .notice { border-left: 0; border-right: 3px solid #d4952a; }

.itinerary { padding-left: 1.3rem; }
.itinerary li { margin-bottom: 0.55rem; }
.itinerary-time { font-size: 0.8rem; color: var(--text-dim); white-space: nowrap; }
[dir="rtl"] .itinerary { padding-left: 0; padding-right: 1.3rem; }

.card-more { margin: 0.2rem 0 0.8rem; font-size: 0.9rem; }
.card-more a { color: var(--link); font-weight: 600; }
.back-link { margin-top: 2rem; }

/* In-prose recommendation link, deliberately not styled as a button — it
   should read as part of the sentence. */
.intro-cta {
  margin-top: 1.1rem;
  font-size: 0.98rem;
}

.intro-cta a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  font-size: 0.88rem;
  text-align: center;
}

/* Sticky mobile booking bar — phone screens only; desktop already has the
   featured CTA in the first viewport. */
.sticky-book {
  display: none;
}

@media (max-width: 640px) {
  .sticky-book {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 0.6rem 0.9rem;
    padding-bottom: max(0.6rem, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
  }

  .sticky-book-label {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sticky-book .cta {
    flex-shrink: 0;
    padding: 0.55rem 1rem;
  }

  /* Room at the foot of the page so the sticky bar never covers the last
     bit of content (FAQ answers, footer links) on a short scroll. */
  body:has(.sticky-book) { padding-bottom: 3.75rem; }
}

.cta:hover { opacity: 0.9; }

.booking-widget {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.booking-widget .details strong { display: block; font-size: 1rem; }
.booking-widget .details span { color: var(--text-dim); font-size: 0.85rem; }
/* Higher specificity than the plain "span" rule above, which was winning
   over .card-tag's own white text and rendering the featured widget's
   category badge as near-invisible gray-on-green. */
.booking-widget .details span.card-tag { color: #fff; font-size: 0.68rem; }
/* Same specificity trap as .card-tag above: the generic "span" rule would
   otherwise paint the UNFILLED stars in --text-dim, making them read as
   filled. Invisible while the featured tour sits at 5.0; wrong the moment
   a destination features anything lower. */
.booking-widget .details span.stars { color: var(--star-empty); }
.booking-widget .price { color: var(--accent); font-weight: 700; }

.booking-widget.featured {
  border-color: var(--accent);
  background: var(--accent-light);
}

.booking-widget.featured .details strong { font-size: 1.1rem; }

/* This is the page's single highest-value tour — the one earning primacy
   in copy and placement — but it was sitting behind a 150x150 thumbnail,
   smaller than several body-copy photos on the page. Bigger and a real
   photo aspect ratio (not a square icon) gives it the visual weight that
   matches its actual priority. */
.featured-image-wrap {
  position: relative;
  width: 220px;
  aspect-ratio: 4 / 3;
  height: auto;
  flex-shrink: 0;
}

.featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.featured-image-wrap .card-tag.on-image {
  top: 0.4rem;
  left: 0.4rem;
  font-size: 0.6rem;
  padding: 0.22rem 0.45rem;
}

.card .cta-block { margin-top: auto; }

/* CTA + the honest trust badges underneath it (free cancellation / pay
   later) — only rendered when the product's actual Viator page confirmed
   them, see destination.schema.json. Kept small and secondary so they
   read as reassurance, not as another competing call to action. */
.trust-microcopy {
  margin: 0.4rem 0 0;
  font-size: 0.74rem;
  color: var(--text-dim);
}

@media (max-width: 480px) {
  /* Horizontal rows get too cramped below this — revert to a vertical
     stack: image on top, then content and a full-width CTA below. */
  .card { flex-direction: column; align-items: stretch; }
  .card .card-image-wrap { width: 100%; height: auto; aspect-ratio: 4 / 3; align-self: auto; }
  .card-body { align-items: stretch; }
  .card .cta-block { align-self: stretch; text-align: center; }
  .card .cta { display: block; }
}

.disclosure-inline {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: -0.5rem;
  margin-bottom: 1rem;
}

/* Fine print directly under a table (price/timing estimate note). Sitting
   flush against the table border read as clutter, not a caption — give it
   breathing room and a left rule so it reads as a distinct footnote. */
table + .fineprint {
  margin-top: 0.6rem;
  padding-left: 0.7rem;
  border-left: 2px solid var(--border);
}

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.98rem;
}

.faq p { margin: 0.6rem 0 0; color: var(--text-dim); }

footer.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding: 2rem 1.5rem;
  background: var(--bg-alt);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-a11y { font-size: 0.85rem; margin: 0.75rem 0 0; }
.footer-disclosure {
  font-size: 0.75rem;
  color: #8a887f;
  max-width: 680px;
  margin: 1.25rem 0 0;
  line-height: 1.55;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  font-size: 0.82rem;
}

.footer-links a { color: var(--text-dim); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }

.footer-copyright {
  margin-top: 1.25rem;
  font-size: 0.78rem;
  color: #928f85;
}

.footer-contact {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 0.5rem;
}

.footer-contact a { color: var(--accent); }

/* Publish-gate state: a CTA that still points at a placeholder Viator URL.
   Deliberately looks broken so it can never accidentally ship unnoticed. */
.cta-blocked {
  background: #f0dcdc !important;
  color: #a13d3d !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* Language switcher — real links once 2+ locales are built; hidden entirely
   (see base.html) while only one locale exists. Styled as a pill-shaped
   two-state toggle (à la an iOS segmented control) rather than plain text
   links, so it reads unambiguously as "click to switch" not just a label. */
.lang-switch {
  margin-left: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.15rem;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem;
  flex-shrink: 0;
}

.lang-option {
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-dim);
  text-decoration: none;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  line-height: 1;
}

.lang-option:hover { color: var(--accent); }

.lang-option.is-current {
  color: #fff;
  background: var(--accent);
  font-weight: 700;
  pointer-events: none;
}

/* Opening paragraph — slightly larger, sets up the page. */
.lede {
  font-size: 1.08rem;
  color: var(--text);
}

/* Disclosure text that should be present and legible but not compete with
   the content or the CTAs. */
.fineprint {
  font-size: 0.8rem;
  line-height: 1.5;
  color: #8a887f;
}

/* ---- Legal / disclosure pages ----
   Narrower measure than the hub: these are read as prose, not scanned. */
.legal {
  max-width: 680px;
  margin-top: 1rem;
}

.legal h1 {
  font-size: 1.9rem;
  line-height: 1.15;
  margin: 0 0 0.35rem;
}

.legal h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
}

.legal p { margin: 0 0 1rem; }
.legal ul.plain li { margin-bottom: 0.7rem; }
.legal a { color: var(--accent); }

.legal code {
  background: var(--accent-light);
  padding: 0.08em 0.35em;
  border-radius: 3px;
  font-size: 0.9em;
}

.legal-byline {
  margin: 0 0 1.5rem;
  padding: 0;
  max-width: none;
}

.legal-footnote {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ---- Small screens ----
   The header is the main casualty at phone width: activity names are long,
   and inline-wrapping them collides with the logo and pushes the hero off
   screen. Below 768px the nav becomes a single swipeable row instead. */
@media (max-width: 768px) {
  /* Two rows: logo + language on the first, the scrolling nav on the second. */
  header.site-header {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.6rem 0;
    padding: 0.9rem 1rem;
  }

  .site-header .logo { order: 1; }
  .lang-switch { order: 2; margin-left: auto; }

  .site-header nav {
    order: 3;
    flex: none;
    width: 100%;
    text-align: left;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .site-header nav::-webkit-scrollbar { display: none; }

  .site-header nav a {
    margin-left: 0;
    margin-right: 1.1rem;
  }

  .breadcrumb { padding: 0.75rem 1rem 0; }

  .hero { padding: 3rem 1rem 2.25rem; }

  /* Two short facts per row reads better than four tall full-width cards. */
  .quickfacts {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
    padding: 0 1rem;
    margin-top: -1.75rem;
  }

  .quickfacts div { padding: 0.7rem 0.8rem; font-size: 0.82rem; }
  .quickfacts div strong { font-size: 0.65rem; }

  main { padding: 2rem 1rem 2rem; }
  section { margin-top: 2rem; }
  section h2 { font-size: 1.2rem; }

  /* Stack the widget instead of squeezing image + text + button onto a row. */
  .booking-widget {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .booking-widget .cta { width: 100%; }
  .booking-widget .cta-block { width: 100%; text-align: center; }

  /* Full-width banner photo when the widget stacks, instead of a small
     square marooned above the text. */
  .featured-image-wrap { width: 100%; aspect-ratio: 16 / 9; }

  table { font-size: 0.85rem; }
  th, td { padding: 0.5rem 0.55rem; }

  footer.site-footer { padding: 1.75rem 1rem; }

  /* ---- Touch target sizes ----
     WCAG 2.5.5 / 2.5.8 and the Gulf brief both want ~44x44 CSS px of tappable
     area on touch screens. Measured on a 375px viewport, these were all under:
     CTAs at 42px tall, nav links at 15px, language options at 21px, FAQ
     toggles at 25px. Padding (not min-height alone) is what actually grows the
     hit area for an inline element, so each gets vertical padding to clear 44px
     without changing how the page looks — the text size and layout are
     unchanged, only the invisible tappable box around them grows. */
  .cta { padding-top: 0.75rem; padding-bottom: 0.75rem; }

  .site-header nav a {
    display: inline-block;
    padding: 0.85rem 0;
  }

  /* The History pill keeps its compact look; an invisible overlay extends
     its tap area to 44px tall instead of fattening the pill. */
  .site-header nav a.nav-guide { padding: 0.45rem 0.85rem; }
  .site-header nav a.nav-guide::after {
    content: "";
    position: absolute;
    inset: -0.5rem 0;
  }

  .site-header .logo {
    display: inline-block;
    padding: 0.55rem 0;
  }

  /* min-height rather than yet more padding — the option sits inside the
     .lang-switch pill, so padding alone would inflate the pill's own box. */
  .lang-option {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .faq summary { padding: 0.6rem 0; }

  .breadcrumb a {
    display: inline-block;
    padding: 0.75rem 0;
  }

  .footer-links a {
    display: inline-block;
    padding: 0.78rem 0;
  }

  /* The sticky bar sets its own tighter padding to stay slim; it still needs
     to clear 44px, so give it back the height via min-height + centring
     rather than padding, which would make the bar itself taller. */
  .sticky-book .cta {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Inline links inside running prose (card titles, the intro
     recommendation, the auto-linked mistakes bullets) are deliberately NOT
     padded to 44px — WCAG 2.5.8 exempts links inline in a sentence, and
     forcing the target size there would wreck line spacing and overlap
     adjacent lines. The exemption is for inline text links only; every
     standalone control above is sized properly. */
}

@media (max-width: 340px) {
  /* Single column only on the smallest phones — two fact cards get too
     cramped to read below this, but they're fine at 360-375px. */
  .quickfacts { grid-template-columns: 1fr; }
}

/* ---- RTL (Arabic and any future RTL locale) ----
   Explicit overrides rather than relying on flex-direction's implicit
   inline-axis reversal, which is inconsistent enough across engines on a
   <p> with a ::before pseudo-element that it's not worth trusting blind. */
[dir="rtl"] .hero .tagline { flex-direction: row-reverse; }
[dir="rtl"] .site-header nav a { margin-left: 0; margin-right: 1rem; }
[dir="rtl"] .site-header nav a:first-child { margin-right: 0; }
[dir="rtl"] .lang-switch { margin-left: 0; margin-right: 1.25rem; }
[dir="rtl"] ul.plain { padding-left: 0; padding-right: 1.2rem; }
/* Arabic typography. The default stack resolves to Arial/Helvetica for Arabic
   glyphs, which renders but reads poorly at body sizes. This prefers the
   system's actual Arabic faces (SF Arabic on modern iOS/macOS, Geeza Pro on
   older, Segoe UI/Tahoma on Windows, Noto Naskh on Android) before falling
   back. Deliberately system fonts rather than a webfont like Cairo or Tajawal:
   those would mean either a Google Fonts request — a third-party connection
   this site otherwise doesn't make, and a privacy question given its stance —
   or self-hosting ~40-80KB per weight. Worth revisiting if Arabic becomes the
   primary traffic source; not worth it for the readability delta today. */
[dir="rtl"] body {
  font-family: "SF Arabic", "Geeza Pro", "Segoe UI", "Noto Naskh Arabic",
               "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

[dir="rtl"] .card-body { align-items: flex-end; }
[dir="rtl"] .card-body > * { text-align: right; }
[dir="rtl"] .cta-block { text-align: right; }
[dir="rtl"] .card-tag.on-image { left: auto; right: 0.6rem; }

@media (max-width: 768px) {
  [dir="rtl"] .site-header nav a { margin-right: 0; margin-left: 1.1rem; }
}

/* Optional photo inside a guide-page section (guide.html). Capped height so a
   portrait photo doesn't push the text a full screen down on desktop. */
.guide-figure { margin: 0.5rem 0 1.25rem; }
.guide-figure img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border-radius: 8px;
}
.guide-figure figcaption {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: 0.4rem;
}
