
/* Layout concept: the Transpantaneira as the page's spine. Tours are plotted by how far down
   the 147 km road they reach, from Poconé to the jaguar rivers at Porto Jofre. */
:root {
  --ground: #edefe6;      /* sedge-tinted page */
  --paper: #f8f9f3;       /* raised surfaces */
  --ink: #17201a;         /* swamp-water ink */
  --muted: #58624f;
  --line: #c9cfbd;
  --ochre: #9a5a00;       /* logo orange, darkened for text */
  --ochre-fill: #fda101;  /* logo orange, for buttons */
  --on-ochre: #1b1206;
  --deep: #0b3a1f;        /* logo green, deepened */
  --brand: #005023;       /* logo green */
  --on-deep: #e8ebe0;
  --on-deep-muted: #aab4a2;
  --macaw: #2c409c;       /* hyacinth macaw, used once or twice */
  --on-photo: #f6f3ea;
  --flood: #6d8fa8;
  --dry: #c9a86a;

  --f-display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --f-body: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --s-xs: .9375rem; --s-sm: 1.0625rem; --s-md: 1.1875rem; --s-lg: 1.5rem;
  --s-xl: clamp(2rem, 1.4rem + 2.4vw, 2.875rem);
  --s-hero: clamp(2.375rem, 1.4rem + 4.4vw, 4.5rem);
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  --radius: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #101511; --paper: #171e18; --ink: #e6e9de; --muted: #a2ab97; --line: #2d372d;
    --ochre: #fdb02e; --ochre-fill: #fda101; --on-ochre: #160e03; --deep: #06170c; --brand: #8fd3a8;
    --on-deep: #e6e9de; --on-deep-muted: #9aa491; --macaw: #9aabf2; --flood: #7fa3bd; --dry: #c9a86a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #101511; --paper: #171e18; --ink: #e6e9de; --muted: #a2ab97; --line: #2d372d;
  --ochre: #fdb02e; --ochre-fill: #fda101; --on-ochre: #160e03; --deep: #06170c; --brand: #8fd3a8;
  --on-deep: #e6e9de; --on-deep-muted: #9aa491; --macaw: #9aabf2; --flood: #7fa3bd; --dry: #c9a86a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body {
  background: var(--ground); color: var(--ink);
  font-family: var(--f-body); font-size: var(--s-md); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ochre); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 500; line-height: 1.08; text-wrap: balance; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.label { font-family: var(--f-mono); font-size: var(--s-xs); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.latin { font-family: var(--f-display); font-style: italic; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }


/* Header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--ground) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; min-height: 84px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: clamp(10px, 1.5vw, 16px); min-width: 0; text-decoration: none; margin-right: auto; }
.brand img { width: clamp(96px, 8vw + 44px, 164px); height: auto; flex: none; }
.brand b { color: var(--ochre-fill); }
.brand b { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.625rem, 1rem + 2.6vw, 2.875rem); line-height: 1.05; white-space: nowrap; letter-spacing: -.015em; }
.brand small { display: block; font-family: var(--f-mono); font-weight: 400; font-size: .875rem; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.nav { display: flex; gap: 22px; font-size: var(--s-sm); font-weight: 500; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.util { background: var(--deep); color: var(--on-deep); font-size: var(--s-sm); }
.util .wrap { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-height: 44px; }
.util-wa { color: var(--on-deep-muted); }
.util-wa a { color: var(--on-deep); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.langs { display: flex; gap: 6px; align-items: center; }
.langs a { display: inline-flex; padding: 5px; border-radius: 5px; line-height: 0; opacity: .6; transition: opacity .15s, background .15s; }
.langs a:hover { opacity: 1; }
.langs a[aria-current="true"] { opacity: 1; background: color-mix(in srgb, var(--on-deep) 18%, transparent); box-shadow: inset 0 0 0 1.5px var(--ochre-fill); }
.langs svg { width: 34px; height: 22px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--f-body); font-weight: 600; font-size: var(--s-md); padding: 14px 22px; border-radius: var(--radius); text-decoration: none; border: 1px solid transparent; cursor: pointer; line-height: 1.2; }
.btn-primary { background: var(--ochre-fill); color: var(--on-ochre); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { border-color: currentColor; color: var(--on-photo); background: transparent; }
.btn-line { border-color: var(--line); color: var(--ink); background: var(--paper); }
@media (max-width: 1060px) { .nav { display: none; } }
@media (min-width: 380px) and (max-width: 700px) { .brand b { font-size: 1.75rem; } }
@media (max-width: 700px) { .brand b { white-space: normal; } .brand { gap: 12px; } }
@media (max-width: 440px) { .util-label { display: none; } }
@media (max-width: 560px) { .brand small { display: none; } }

/* Hero */
.hero { position: relative; color: var(--on-photo); background: #0d120e; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 48%; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,12,9,.82) 0%, rgba(8,12,9,.55) 45%, rgba(8,12,9,.05) 80%), linear-gradient(0deg, rgba(8,12,9,.7) 0%, rgba(8,12,9,0) 40%); }
.hero .wrap { position: relative; z-index: 1; padding-block: clamp(40px, 5vw, 72px) clamp(28px, 3.5vw, 44px); display: grid; gap: 20px; }
.hero .label { color: rgba(246,243,234,.78); }
.hero h1 { font-size: var(--s-hero); max-width: 17ch; line-height: 1.12; margin-top: .15em; font-weight: 500; }
.hero h1 em { font-style: italic; color: #fda101; }
.hero p.lede { font-weight: 600; font-size: clamp(1.375rem, 1.15rem + .8vw, 1.75rem); line-height: 1.5; max-width: 40ch; color: rgba(246,243,234,.94); text-shadow: 0 1px 3px rgba(0,0,0,.75), 0 0 12px rgba(0,0,0,.45); }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 18px; margin-top: 4px; border-top: 1px solid rgba(246,243,234,.22); font-size: var(--s-sm); color: rgba(246,243,234,.88); }
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust strong { color: var(--on-photo); font-weight: 600; }
.stars { color: #fda101; letter-spacing: 1px; }
.hero .credit { position: absolute; right: var(--gutter); bottom: 14px; z-index: 1; font-family: var(--f-mono); font-size: .875rem; color: rgba(246,243,234,.6); }
@media (max-width: 700px) { .hero .credit { display: none; } }

/* Proof */
.proof { padding-block: clamp(56px, 8vw, 96px); }
.proof .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 72px); align-items: end; }
.big { font-family: var(--f-display); font-size: clamp(5rem, 3rem + 9vw, 10rem); line-height: .85; font-weight: 400; letter-spacing: -.03em; color: var(--ochre); }
.big small { font-size: .35em; letter-spacing: 0; vertical-align: top; margin-left: 4px; }
.proof h2 { font-size: var(--s-xl); margin-bottom: 16px; }
.proof p { color: var(--muted); max-width: 52ch; }
.proof .fine { font-size: var(--s-sm); margin-top: 14px; font-style: italic; }
@media (max-width: 760px) { .proof .wrap { grid-template-columns: 1fr; align-items: start; } }

/* Section head */
.sec { padding-block: clamp(56px, 8vw, 104px); }
.sec-head { display: grid; gap: 12px; margin-bottom: clamp(28px, 4vw, 48px); max-width: 60ch; }
.sec-head h2 { font-size: var(--s-xl); }
.sec-head p { color: var(--muted); }

/* Road diagram */
.road { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px clamp(16px, 3vw, 28px) 18px; margin-bottom: 28px; }
.road-track { position: relative; height: 52px; margin: 6px 8px 0; }
.road-track .line { position: absolute; left: 0; right: 0; top: 22px; height: 6px; border-radius: 3px; background: repeating-linear-gradient(90deg, var(--dry) 0 18px, color-mix(in srgb, var(--dry) 55%, var(--paper)) 18px 22px); }
.road-track .zone { position: absolute; top: 14px; height: 22px; right: 0; width: 14%; border-radius: 4px; background: color-mix(in srgb, var(--flood) 35%, transparent); border: 1px dashed var(--flood); }
.pin { position: absolute; top: 0; transform: translateX(-50%); display: grid; justify-items: center; gap: 2px; }
.pin i { width: 12px; height: 12px; border-radius: 50%; background: var(--ink); border: 2px solid var(--paper); margin-top: 17px; box-shadow: 0 0 0 1px var(--ink); }
.road-labels { display: flex; justify-content: space-between; gap: 12px; font-size: var(--s-sm); margin-top: 4px; }
.road-labels div { display: grid; }
.road-labels div:last-child { text-align: right; }
.road-labels b { font-weight: 600; }
.road-labels span { font-family: var(--f-mono); font-size: .9375rem; color: var(--muted); }
.road-note { margin-top: 12px; font-size: var(--s-sm); color: var(--muted); }

/* Tours */
.tours { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1060px) { .tours { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tours { grid-template-columns: 1fr; } }
.tour { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.tour.feature { border-color: var(--ochre); box-shadow: 0 0 0 1px var(--ochre); }
.tour figure { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; background: var(--line); }
.tour figure img { width: 100%; height: 100%; object-fit: cover; }
.tour .body { display: flex; flex-direction: column; gap: 12px; padding: 18px 18px 20px; flex: 1; }
.tour .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tour .days { font-family: var(--f-mono); font-size: 1rem; color: var(--ochre); font-weight: 500; }
.tour .tag { font-family: var(--f-mono); font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; background: var(--ochre-fill); color: var(--on-ochre); padding: 2px 7px; border-radius: 3px; }
.tour h3 { font-size: 1.75rem; }
.tour p { font-size: var(--s-sm); color: var(--muted); }
.tour ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: var(--s-sm); }
.tour li { display: grid; grid-template-columns: 14px 1fr; gap: 8px; }
.tour li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ochre); margin-top: .55em; justify-self: center; }
.reach { display: grid; gap: 6px; padding-top: 4px; }
.reach .bar { height: 4px; border-radius: 2px; background: var(--line); position: relative; }
.reach .bar b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--dry); }
.reach span { font-family: var(--f-mono); font-size: .875rem; color: var(--muted); letter-spacing: .03em; }
.tour .foot { margin-top: auto; display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.price { display: flex; align-items: baseline; gap: 6px; font-size: var(--s-sm); color: var(--muted); }
.ph { font-family: var(--f-mono); font-size: 1rem; color: var(--ink); background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--ochre-fill) 22%, transparent) 0 6px, transparent 6px 12px); border: 1px dashed var(--ochre); border-radius: 3px; padding: 1px 6px; }
.tour .btn { width: 100%; }

/* Day on the river */
.band { background: var(--deep); color: var(--on-deep); }
.band .label { color: var(--on-deep-muted); }
.band .sec-head p { color: var(--on-deep-muted); }
.river { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .river { grid-template-columns: 1fr; } }
.river figure { margin: 0; border-radius: var(--radius); overflow: hidden; }
.river figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.river figcaption { font-family: var(--f-mono); font-size: .9375rem; color: var(--on-deep-muted); padding-top: 10px; }
.day { list-style: none; margin: 0; padding: 0; display: grid; }
.day li { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 18px; padding: 16px 0; border-top: 1px solid color-mix(in srgb, var(--on-deep) 16%, transparent); }
.day li:last-child { border-bottom: 1px solid color-mix(in srgb, var(--on-deep) 16%, transparent); }
@media (max-width: 560px) { .day li { grid-template-columns: 1fr; gap: 4px; } }
.day time { font-family: var(--f-mono); font-size: var(--s-sm); color: #fdb02e; font-variant-numeric: tabular-nums; padding-top: 2px; }
.day b { font-family: var(--f-display); font-weight: 500; font-size: 1.4375rem; display: block; margin-bottom: 2px; }
.day p { color: var(--on-deep-muted); font-size: var(--s-sm); }
.rivers { margin-top: 18px; font-size: var(--s-sm); color: var(--on-deep-muted); }
.rivers strong { color: var(--on-deep); font-weight: 600; }

/* Seasons */
.months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 3px; margin-bottom: 18px; }
.m { display: grid; gap: 6px; text-align: center; min-width: 0; }
.m i { display: block; height: 40px; border-radius: 3px; }
.m.flood i { background: var(--flood); }
.m.dry i { background: var(--dry); }
.m.high i { box-shadow: inset 0 -6px 0 var(--ochre-fill); }
.m span { font-family: var(--f-mono); font-size: .875rem; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--s-sm); color: var(--muted); margin-bottom: 28px; }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.seasons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 700px) { .seasons { grid-template-columns: 1fr; } .m span { font-size: .875rem; } }
.season { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 8px; }
.season h3 { font-size: 1.625rem; }
.season p { font-size: var(--s-sm); color: var(--muted); }

/* Species */
.species { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1000px) { .species { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .species { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sp { margin: 0; min-width: 0; }
.sp img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.sp figcaption { padding-top: 10px; display: grid; gap: 1px; }
.sp b { font-weight: 600; font-size: var(--s-sm); }
.sp .latin { font-size: var(--s-sm); }

/* Guides */
.guides { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (max-width: 860px) { .guides { grid-template-columns: 1fr; } }
.guides figure { margin: 0; }
.guides figure img { border-radius: var(--radius); width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 50% 30%; }
.guides h2 { font-size: var(--s-xl); margin: 10px 0 16px; }
.guides .copy p + p { margin-top: 14px; }
.guides .copy > p { color: var(--muted); max-width: 58ch; }
.guides h2 { font-style: italic; }
.guides .copy > p.sign { font-family: var(--f-display); font-style: italic; font-size: 1.25rem; color: var(--ink); margin-top: 18px; }
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 24px; }
@media (max-width: 520px) { .people { grid-template-columns: 1fr; } }
.person { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; gap: 4px; }
.person b { font-family: var(--f-display); font-weight: 500; font-size: 1.4375rem; }
.person span { font-size: var(--s-sm); color: var(--muted); }
.person a { font-family: var(--f-mono); font-size: 1rem; color: var(--ochre); text-decoration: none; font-variant-numeric: tabular-nums; }
.creds { margin-top: 18px; font-family: var(--f-mono); font-size: .9375rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 20px; }

/* Reviews */
.reviews-top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 32px; }
.score { display: flex; align-items: center; gap: 16px; }
.score b { font-family: var(--f-display); font-size: 3.5rem; line-height: 1; font-weight: 400; }
.score div { font-size: var(--s-sm); color: var(--muted); }
.score .stars { color: var(--ochre); font-size: 1.125rem; }
.quotes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }
.q { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.q blockquote { margin: 0; font-family: var(--f-display); font-size: 1.4375rem; line-height: 1.35; }
.q figcaption { margin-top: auto; font-size: var(--s-sm); color: var(--muted); }
.q figcaption b { color: var(--ink); font-weight: 600; }

/* Plan form */
.plan { background: var(--paper); border-top: 1px solid var(--line); }
.plan-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 72px); }
@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-side { display: grid; gap: 18px; align-content: start; }
.plan-side h2 { font-size: var(--s-xl); }
.plan-side > p { color: var(--muted); }
.wa { display: grid; gap: 10px; }
.wa-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; border: 1px solid var(--line); background: var(--ground); border-radius: var(--radius); padding: 12px 14px; }
.wa-row div { display: grid; min-width: 0; }
.wa-row b { font-weight: 600; font-size: var(--s-sm); }
.wa-row span { font-size: 1rem; color: var(--muted); }
.wa-row code { font-family: var(--f-mono); font-size: 1.0625rem; user-select: all; font-variant-numeric: tabular-nums; }
.wa-row a { flex: none; font-size: 1rem; font-weight: 600; color: var(--ochre); text-decoration: none; }
.terms { font-size: var(--s-sm); color: var(--muted); border-left: 2px solid var(--line); padding-left: 14px; }
form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
@media (max-width: 560px) { form { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
label, legend { font-size: var(--s-sm); font-weight: 600; }
label .opt { font-weight: 400; color: var(--muted); }
input, select, textarea { font: inherit; font-size: var(--s-md); color: var(--ink); background: var(--ground); border: 1px solid var(--line); border-radius: var(--radius); padding: 11px 12px; width: 100%; min-width: 0; }
textarea { min-height: 110px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ochre); outline-offset: 0; border-color: transparent; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: var(--s-sm); cursor: pointer; background: var(--ground); }
.chip input:checked + span { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--ochre); outline-offset: 2px; }
.err { font-size: 1rem; color: #b3261e; }
:root[data-theme="dark"] .err { color: #f2998f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .err { color: #f2998f; } }
.form-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.form-foot p { font-size: 1rem; color: var(--muted); }
.done { grid-column: 1 / -1; border: 1px solid var(--ochre); background: color-mix(in srgb, var(--ochre-fill) 12%, var(--paper)); border-radius: var(--radius); padding: 16px 18px; font-size: var(--s-sm); }

/* Footer */
footer { background: var(--deep); color: var(--on-deep-muted); font-size: var(--s-sm); }
footer .wrap { padding-block: 44px 36px; display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 800px) { footer .wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); } footer .f-brand { grid-column: 1 / -1; } }
footer b { color: var(--on-deep); font-weight: 600; display: block; margin-bottom: 8px; }
footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--on-deep); }
footer .f-brand p { max-width: 38ch; }
footer .legal { grid-column: 1 / -1; border-top: 1px solid color-mix(in srgb, var(--on-deep) 14%, transparent); padding-top: 18px; font-family: var(--f-mono); font-size: .9375rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* Mobile action bar */
.mbar { display: none; }
@media (max-width: 700px) {
  .mbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px); border-top: 1px solid var(--line); }
  .mbar .btn { width: 100%; }
  footer { padding-bottom: 72px; }
}
.i18n-note { font-family: var(--f-mono); font-size: .9375rem; color: rgba(246,243,234,.75); }

/* ---------- Multi-page additions ---------- */

/* Header: title row scrolls away, the nav row below it stays */
.top { position: static; }
.navbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.navbar .wrap { display: flex; flex-wrap: wrap; gap: 4px 30px; min-height: 54px; align-items: center; }
.navbar a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: var(--s-md); padding-block: 14px; border-bottom: 3px solid transparent; }
.navbar a:hover { color: var(--ink); }
.navbar a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ochre-fill); }
@media (max-width: 700px) { .navbar { display: none; } }

.i18n-bar { background: var(--paper); border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: .9375rem; color: var(--muted); text-align: center; padding: 8px 16px; }

/* Page hero for inner pages */
.phero { position: relative; color: var(--on-photo); background: #0d120e; overflow: hidden; }
.phero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,12,9,.85) 0%, rgba(8,12,9,.6) 50%, rgba(8,12,9,.2) 100%); }
.phero .wrap { position: relative; z-index: 1; padding-block: clamp(56px, 8vw, 104px) clamp(36px, 5vw, 56px); display: grid; gap: 18px; }
.phero .label { color: rgba(246,243,234,.8); }
.phero h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.75rem); max-width: 18ch; }
.phero p.lede { font-size: clamp(1.1875rem, 1.1rem + .4vw, 1.375rem); max-width: 52ch; color: rgba(246,243,234,.92); }
.crumbs { font-size: var(--s-sm); color: rgba(246,243,234,.8); }
.crumbs a { color: var(--on-photo); }
.facts { display: flex; flex-wrap: wrap; gap: 14px 36px; padding-top: 18px; margin-top: 4px; border-top: 1px solid rgba(246,243,234,.22); }
.facts div { display: grid; }
.facts dt { font-family: var(--f-mono); font-size: .875rem; letter-spacing: .06em; text-transform: uppercase; color: rgba(246,243,234,.7); }
.facts dd { margin: 0; font-weight: 600; font-size: var(--s-md); }
.phero .ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* Plain page header (no photo) */
.phead { padding-block: clamp(48px, 7vw, 88px) 8px; }
.phead h1 { font-size: clamp(2.25rem, 1.4rem + 3.4vw, 3.5rem); margin: 10px 0 16px; }
.phead p { color: var(--muted); max-width: 60ch; }

/* Running text */
.prose { max-width: 68ch; display: grid; gap: 16px; }
.prose p { color: var(--muted); }
.prose h2 { font-size: var(--s-xl); color: var(--ink); margin-top: 18px; }
.prose h3 { font-size: 1.625rem; color: var(--ink); margin-top: 10px; }
.prose ul { margin: 0; padding-left: 1.2em; color: var(--muted); display: grid; gap: 6px; }
.prose strong { color: var(--ink); }

/* Tour detail layout */
.tlayout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(28px, 4vw, 56px); align-items: start; }
@media (max-width: 960px) { .tlayout { grid-template-columns: 1fr; } }
.aside { position: sticky; top: 76px; display: grid; gap: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
@media (max-width: 960px) { .aside { position: static; } }
.aside h2 { font-size: 1.5rem; }
.aside .price { font-size: var(--s-md); }
.aside .btn { width: 100%; }
.inc { display: grid; gap: 8px; }
.inc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--s-sm); }
.inc li { display: grid; grid-template-columns: 22px 1fr; gap: 6px; }
.inc li::before { content: "✓"; color: var(--brand); font-weight: 700; }
.inc.no li::before { content: "–"; color: var(--muted); }
.aside .wa-note { font-size: var(--s-sm); color: var(--muted); }
.aside .wa-note a { color: var(--ochre); font-weight: 600; text-decoration: none; white-space: nowrap; }

.variants { display: inline-flex; flex-wrap: wrap; gap: 6px; padding: 5px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; margin-bottom: 26px; }
.variants button { font: inherit; font-weight: 600; font-size: var(--s-sm); border: 0; background: transparent; color: var(--muted); padding: 10px 18px; border-radius: 999px; cursor: pointer; }
.variants button[aria-pressed="true"] { background: var(--ink); color: var(--ground); }

.itin { list-style: none; margin: 0; padding: 0; display: grid; }
.itin > li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 20px; padding: 22px 0; border-top: 1px solid var(--line); }
.itin > li:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .itin > li { grid-template-columns: 1fr; gap: 6px; } }
.itin .dn { font-family: var(--f-mono); color: var(--ochre); font-size: var(--s-sm); padding-top: 4px; }
.itin h3 { font-size: 1.5rem; margin-bottom: 8px; }
.itin p { color: var(--muted); }
.meals { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.meals span { font-family: var(--f-mono); font-size: .875rem; padding: 2px 8px; border-radius: 3px; background: var(--ground); border: 1px solid var(--line); color: var(--muted); }
.note { font-size: var(--s-sm); color: var(--muted); font-style: italic; margin-top: 18px; }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 34px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gallery img:nth-child(3) { display: none; } }

.related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 860px) { .related { grid-template-columns: 1fr; } }
.rel { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; text-decoration: none; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rel img { width: 120px; height: 100%; min-height: 100px; object-fit: cover; }
.rel div { padding: 12px 14px 12px 0; display: grid; gap: 2px; }
.rel b { font-family: var(--f-display); font-weight: 500; font-size: 1.375rem; }
.rel span { font-size: var(--s-sm); color: var(--muted); }

/* Comparison table */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); margin-top: 40px; }
.cmp { border-collapse: collapse; width: 100%; min-width: 760px; font-size: var(--s-sm); }
.cmp th, .cmp td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmp thead th { font-family: var(--f-display); font-weight: 500; font-size: 1.25rem; }
.cmp thead th a { text-decoration: none; }
.cmp tbody th { font-weight: 600; color: var(--muted); width: 18%; }
.cmp tr:last-child th, .cmp tr:last-child td { border-bottom: 0; }
.cmp .yes { color: var(--brand); font-weight: 600; }

/* Activity / feature grid */
.acts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 960px) { .acts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .acts { grid-template-columns: 1fr; } }
.act { display: grid; gap: 12px; align-content: start; }
.act img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.act h3 { font-size: 1.5rem; }
.act p { color: var(--muted); font-size: var(--s-sm); }

/* Season story */
.cycle { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 900px) { .cycle { grid-template-columns: 1fr; } }
.cycle .season { align-content: start; }
.cycle .season .label { color: var(--ochre); }
.cycle .flood-c { border-top: 4px solid var(--flood); }
.cycle .ebb-c { border-top: 4px solid color-mix(in srgb, var(--flood) 50%, var(--dry)); }
.cycle .dry-c { border-top: 4px solid var(--dry); }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 860px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 54px 18px 20px; font-family: var(--f-display); font-size: 1.375rem; font-weight: 500; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-family: var(--f-body); font-size: 1.5rem; color: var(--ochre); }
.faq details[open] summary::after { content: "–"; }
.faq .ans { padding: 0 20px 20px; display: grid; gap: 12px; color: var(--muted); }
.faq .ans ul { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
.faq .ans a { color: var(--ochre); }
.faq .ans strong { color: var(--ink); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.steps li { counter-increment: step; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: grid; gap: 6px; align-content: start; }
.steps li::before { content: counter(step); font-family: var(--f-display); font-size: 2rem; line-height: 1; color: var(--ochre); }
.steps b { font-weight: 600; }
.steps span { font-size: var(--s-sm); color: var(--muted); }

/* Review wall */
.wall { columns: 3 320px; column-gap: 18px; }
.wall .q { break-inside: avoid; margin-bottom: 18px; }
.wall .q blockquote { font-size: 1.25rem; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: grid; gap: 14px; }
.card h2 { font-size: 1.5rem; }
.card p { color: var(--muted); font-size: var(--s-sm); }
.card code { font-family: var(--f-mono); font-size: 1rem; color: var(--ink); user-select: all; word-break: break-all; }

/* Mobile menu sheet and bar */
.mbar { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mbar .btn { padding-inline: 6px; font-size: var(--s-sm); white-space: nowrap; min-width: 0; }
.sheet { position: fixed; left: 0; right: 0; bottom: calc(68px + env(safe-area-inset-bottom, 0px)); z-index: 29; transform: translateY(calc(100% + 80px)); visibility: hidden; transition: transform .34s cubic-bezier(.22, .7, .2, 1), visibility 0s linear .34s; background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -12px 30px rgba(0,0,0,.18); max-height: 75vh; overflow-y: auto; }
.sheet nav { display: grid; padding: 8px 16px 12px; }
.sheet a { text-decoration: none; font-family: var(--f-display); font-size: 1.625rem; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.sheet a:last-child { border-bottom: 0; }
.sheet a[aria-current="page"] { color: var(--ochre); }
@media (min-width: 701px) { .sheet { display: none !important; } }

footer { border-top: 4px solid var(--ochre-fill); }
@media (max-width: 560px) {
  .variants { display: grid; grid-template-columns: 1fr; width: 100%; border-radius: var(--radius); }
  .variants button { border-radius: 4px; text-align: left; }
}

/* Home hero: nudge the jaguars to the right on wider screens */
@media (min-width: 701px) {
  .hero img { left: 11%; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%); mask-image: linear-gradient(90deg, transparent 0, #000 7%); }
}

/* Page change: the old content fades out, the new content floats up into place.
   The header, menu and bottom bar never reload. */
main { transition: opacity .2s ease; }
main.wpt-out { opacity: 0; }
@keyframes wpt-float-in { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
main > * { animation: wpt-float-in .7s cubic-bezier(.2, .7, .2, 1) both; }
main > :nth-child(2) { animation-delay: .09s; }
main > :nth-child(3) { animation-delay: .18s; }
main > :nth-child(n+4) { animation-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  main { transition: none; }
  main > * { animation: none; }
}

.sheet.open { transform: none; visibility: visible; transition: transform .34s cubic-bezier(.22, .7, .2, 1), visibility 0s; }
@media (prefers-reduced-motion: reduce) { .sheet, .sheet.open { transition: none; } }
@media (max-width: 350px) { .mbar { gap: 6px; padding-inline: 10px; } .mbar .btn { font-size: .9375rem; padding-inline: 4px; } }

/* Jaguar tracks: three orange paw prints appear one after another in the middle of the screen */
.wpt-tracks { position: fixed; left: 50%; top: 50%; z-index: 40; width: 260px; height: 150px; margin: -75px 0 0 -130px; pointer-events: none; }
.wpt-tracks span { position: absolute; width: 58px; height: 58px; opacity: 0; filter: drop-shadow(0 3px 6px rgba(0,0,0,.28));
  animation: wpt-paw 1.9s cubic-bezier(.3, .7, .3, 1) both; }
.wpt-tracks span svg { width: 100%; height: 100%; display: block; }
.wpt-tracks span:nth-child(1) { left: 0;     top: 86px; transform: rotate(62deg);  animation-delay: .3s; }
.wpt-tracks span:nth-child(2) { left: 100px; top: 30px; transform: rotate(58deg);  animation-delay: .6s; }
.wpt-tracks span:nth-child(3) { left: 200px; top: 74px; transform: rotate(64deg);  animation-delay: .9s; }
@keyframes wpt-paw {
  0%   { opacity: 0; scale: .55; }
  14%  { opacity: 1; scale: 1.08; }
  24%  { scale: 1; }
  70%  { opacity: 1; }
  100% { opacity: 0; scale: 1; }
}
@media (max-width: 700px) { .wpt-tracks { scale: .8; } }
@media (prefers-reduced-motion: reduce) { .wpt-tracks { display: none; } }

/* Tour preview */
.preview-band { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(20px, 4vw, 48px); align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.preview-band img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; object-position: 50% 40%; }
.preview-band > div { display: grid; gap: 12px; justify-items: start; padding: 24px clamp(16px, 3vw, 32px) 28px 0; }
.preview-band h2 { font-size: var(--s-xl); }
.preview-band p:not(.label) { color: var(--muted); }
@media (max-width: 760px) { .preview-band { grid-template-columns: 1fr; } .preview-band > div { padding: 0 18px 22px; } }
.preview-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (max-width: 860px) { .preview-grid { grid-template-columns: 1fr; } }
.video-card { gap: 16px; }
.video-card .video-icon svg { width: 64px; height: 64px; }
.video-card .file { font-size: var(--s-sm); }
.video-card .btn { justify-self: start; }
.prose .btn { margin: 6px 8px 0 0; }

.btn-wa svg, .btn-mail svg { width: 22px; height: 22px; flex: none; }
.btn-mail:disabled { opacity: .6; cursor: progress; }
.form-foot { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: max-content; max-width: 100%; justify-self: start; }
@media (max-width: 600px) { .form-foot { grid-auto-flow: row; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.done { display: grid; gap: 6px; }
.done a { color: var(--ochre); font-weight: 600; }

/* Form hints fade away as soon as the field is focused */
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .75; transition: color .15s; }
input:focus::placeholder, textarea:focus::placeholder { color: transparent; }
select:invalid { color: var(--muted); }

[hidden] { display: none !important; }

/* Mobile bottom bar: three identical buttons, orange outline and text on the page colour */
.mbar { background: var(--ground); }
.mbar .btn, .mbar .btn-primary, .mbar .btn-line { background: var(--ground); color: var(--ochre-fill); border: 2px solid var(--ochre-fill); font-weight: 700; }
.mbar .btn:hover, .mbar .btn:active { background: color-mix(in srgb, var(--ochre-fill) 12%, var(--ground)); filter: none; }

/* "Tap" on touch screens, "Click" with a mouse */
.t-click, .msg-label { display: none; }
@media (hover: hover) and (pointer: fine) { .t-tap { display: none; } .t-click { display: inline; } }
/* Long labels (e.g. Italian) wrap onto two lines instead of overflowing */
.mbar .btn { white-space: normal; line-height: 1.15; text-align: center; padding-block: 10px; min-height: 52px; overflow-wrap: anywhere; }
@media (max-width: 700px) { footer { padding-bottom: 92px; } .sheet { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }

/* One look for everyone: the dark green theme, whatever the phone or computer is set to */
:root, :root[data-theme="light"] { --ground: #101511; --paper: #171e18; --ink: #e6e9de; --muted: #a2ab97; --line: #2d372d;
  --ochre: #fdb02e; --ochre-fill: #fda101; --on-ochre: #160e03; --deep: #06170c; --brand: #8fd3a8;
  --on-deep: #e6e9de; --on-deep-muted: #9aa491; --macaw: #9aabf2; --flood: #7fa3bd; --dry: #c9a86a;
  color-scheme: dark; }
.err, :root[data-theme="light"] .err { color: #f2998f; }

/* Header: the logo (jaguar + lettering) centred on its own */
.top .wrap { justify-content: center; }
.brand { margin-right: 0; justify-content: center; }
.brand img { width: clamp(150px, 14vw + 90px, 230px); height: auto; }
@media (max-width: 700px) { .brand img { width: 150px; } }

/* Header: jaguar on top, name centred below it, in white */
.brand { flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.brand img { width: clamp(130px, 10vw + 70px, 200px); }
.brand b { color: #fff; white-space: normal; }
@media (max-width: 700px) { .brand img { width: 130px; } .brand b { font-size: 1.75rem; } }
.brand b { font-size: clamp(2.25rem, 1.2rem + 3.6vw, 4rem); line-height: 1.05; }
@media (max-width: 700px) { .brand b { font-size: 2.1rem; } }
@media (max-width: 380px) { .brand b { font-size: 1.85rem; } }
.brand b { font-size: clamp(2.5rem, 1.2rem + 4.4vw, 4.75rem); letter-spacing: -.02em; }
@media (max-width: 700px) { .brand b { font-size: 2.3rem; } }
@media (max-width: 380px) { .brand b { font-size: 2.05rem; } }
@media (max-width: 340px) { .brand b { font-size: 1.8rem; } }
.util .wrap { justify-content: center; }
@media (max-width: 700px) { .brand b { font-size: min(2.6rem, 9.2vw); white-space: nowrap; } }

/* Flags sit centred under the name */
.top .wrap { flex-direction: column; gap: 14px; padding-block: 18px 16px; }
.top .langs { justify-content: center; }

/* Standalone hosting: no browser default margin around the page */
body { margin: 0; }

/* Home: subtitle above the four tour cards */
.tours-sub { color: #fff; font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.25rem); margin: 8px 0 18px; }

/* Tours page: lodges marked along the Transpantaneira line. site.js measures the names, places them and draws the
   lines; it sets the track height and --road-y (where the road runs). Names stay hidden until they are placed. */
.road-track.stops { height: 100px; --road-y: 50px; }
.road-track.stops .line { top: calc(var(--road-y) - 3px); }
.road-track.stops .zone { top: calc(var(--road-y) - 11px); }
.road-track.stops .pin { top: calc(var(--road-y) - 23px); }
.road-track.stops .leaders { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.road-track.stops .leaders line { stroke: var(--ochre-fill); stroke-width: 2; stroke-linecap: round; }
.stop { position: absolute; left: 0; top: 0; visibility: hidden; white-space: nowrap; }
.stop.placed { visibility: visible; }
.stop b { display: block; font-size: .875rem; font-weight: 600; line-height: 1.2; }
.road-stops { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stop b { text-align: center; }
.stop br.m { display: none; }
@media (max-width: 700px) { .stop b { font-size: .8125rem; line-height: 1.1; } .stop br.m { display: inline; } }
@media (max-width: 420px) { .stop b { font-size: .75rem; } }

/* Second guide: same layout as Fisher's story, photo on the other side */
@media (min-width: 861px) { .guides.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } .guides.flip figure { order: 2; } }

/* Embratur and CNPJ: each on its own line, CNPJ right below, numbers never split */
footer .legal .ids { display: grid; justify-items: end; gap: 2px; }
@media (max-width: 860px) { footer .legal .ids { justify-items: start; } }
.creds { flex-direction: column; }
.creds span, footer .legal .ids span, code.id { white-space: nowrap; }
/* long words on narrow phones: may break rather than push the page sideways (translate.py marks the best break points) */
footer li a, .act h3, a[href^="mailto:"], .prose strong { overflow-wrap: anywhere; }
footer .f-brand .f-tag { margin-bottom: 8px; }
/* Computer screens: the header with the logo stays on top too, and shrinks once the page scrolls */
@media (min-width: 701px) and (min-height: 500px) {
  .top { position: sticky; top: 0; z-index: 21; background: var(--ground); }
  .navbar { top: var(--top-h, 0px); }
  html { scroll-padding-top: calc(var(--top-h, 0px) + var(--nav-h, 0px) + 12px); }
  .aside { top: calc(var(--top-h, 0px) + var(--nav-h, 0px) + 16px); }
  /* after scrolling: logo, name and flags on one slim line */
  .compact .top .wrap { flex-direction: row; justify-content: space-between; min-height: 0; padding-block: 6px; gap: 16px; }
  .compact .brand { flex-direction: row; gap: 12px; text-align: left; }
  .compact .brand img { width: 64px; }
  .compact .brand b { font-size: 1.5rem; white-space: nowrap; }
}
