/* LOCAL INDEX v6 · single source of truth for semantic light/dark tokens.
   Light: ivory, forest green, vermilion, lime. Dark: ink, petrol, sage, lime.
   Card imagery and travel ephemera intentionally keep their original pigments. */
:root {
  color-scheme: light;
  --paper:#f7f6ee; --ink:#19362f; --deep:#123029; --mute:#4e685a;
  --line:#dce5dc; --surface:#ffffff; --surface-soft:#e7efdf;
  --surface-neutral:#e8eee4; --surface-chip:#eaf0e7;
  --surface-covered:#e9fac3; --surface-product:#dde8da;
  --text-secondary:#526b5e; --hero-bg:#123029;
  --hero-foreground:#f7f6ee; --hero-muted:#cad8ce;
  --hero-micro:#a9c1b3; --footer-bg:#123029;
  --label-subtle:#638071; --label-faint:#8d9c91;
  --control-border:#cbd6cc; --shadow:#18362819;
}
@media(prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    color-scheme:dark;
    --paper:#10191b; --ink:#edf2ee; --deep:#173a33; --mute:#bdcfc7;
    --line:#3b514a; --surface:#1b292a; --surface-soft:#213b36;
    --surface-neutral:#1d3431; --surface-chip:#29423b;
    --surface-covered:#274d3c; --surface-product:#2a413e;
    --text-secondary:#c2d2c9; --hero-bg:#081316;
    --hero-foreground:#f2f5ea; --hero-muted:#bfd0c7;
    --hero-micro:#b0c9bb; --footer-bg:#081316;
    --label-subtle:#c0cec5; --label-faint:#afc1b4;
    --control-border:#446158; --shadow:#0007;
  }
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --paper:#10191b; --ink:#edf2ee; --deep:#173a33; --mute:#bdcfc7;
  --line:#3b514a; --surface:#1b292a; --surface-soft:#213b36;
  --surface-neutral:#1d3431; --surface-chip:#29423b;
  --surface-covered:#274d3c; --surface-product:#2a413e;
  --text-secondary:#c2d2c9; --hero-bg:#081316;
  --hero-foreground:#f2f5ea; --hero-muted:#bfd0c7;
  --hero-micro:#b0c9bb; --footer-bg:#081316;
  --label-subtle:#c0cec5; --label-faint:#afc1b4;
  --control-border:#446158; --shadow:#0007;
}
/* Explicit user choice overrides operating-system preference. */
:root[data-theme="light"]{color-scheme:light}
:root[data-theme="dark"] .discovery-section,
:root[data-theme="dark"] .country-top,
:root[data-theme="dark"] .destination-art{color:#183529}
@media(prefers-color-scheme:dark){
  :root:not([data-theme="light"]) .discovery-section,
  :root:not([data-theme="light"]) .country-top,
  :root:not([data-theme="light"]) .destination-art{color:#183529}
}
/* Components are semantically skinned using tokens, not page-specific overlays. */
.nav-tools select,.nav-tools button{background:var(--surface);border-color:var(--control-border);color:var(--ink)}
.search{background:var(--surface)}.search input{color:var(--ink)}.search input::placeholder{color:var(--mute)}
.card-actions button{color:var(--ink)}
.brand-card,.destination,.product-tile,.count-verified,.world-list li,.compare-unit{background:var(--surface);border-color:var(--line)}
.brand-card,.destination{box-shadow:0 5px 22px var(--shadow)}
.product-tease span{background:var(--surface-chip);color:var(--ink)}
.brand-meta{color:var(--mute)}
.brand-text h3 span{color:var(--mute)}
.chip{color:var(--ink);background:transparent;border-color:var(--line)}
.chip.active{background:var(--deep);color:#f6f8ef}
.intro-strip{background:var(--surface-neutral);color:var(--mute);border-color:var(--line)}
.world-list li small,.destination-label small{color:var(--mute)}
.world-list li.active-country{background:var(--surface-covered);border-color:var(--line)}
.aside-note,.source-callout{background:var(--surface-soft);border-color:var(--line)}
.aside-note p,.aside-note small,.source-callout p,.notebook p,.detail-section>p{color:var(--text-secondary)}
.notebook{border-color:var(--line)}
.detail-head strong,.photo-credit,.breadcrumbs,.back{color:var(--mute)}
dialog{background:var(--surface);color:var(--ink)}
.dialog-head button,.font-buttons button{background:var(--surface-chip);color:var(--ink);border-color:var(--line)}
.font-buttons button.active{background:var(--lime);color:#123029}
.compare-unit{color:var(--ink)}
/* Tone-consistent hero and footer on both modes */
.hero{background:var(--hero-bg);color:var(--hero-foreground)}
.footer{background:var(--footer-bg)}
.hero-claim{color:var(--lime)}
.hero-description{color:var(--hero-muted)}
.microtext{color:var(--hero-micro)}
/* Theme selector without distraction or hidden preferences. */
.theme-options{margin-top:22px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.theme-option{border:2px solid var(--line);background:var(--surface);color:var(--ink);border-radius:15px;padding:13px 8px;display:flex;align-items:center;flex-direction:column;gap:9px;min-height:104px;font-weight:800}
.theme-option.active{border-color:#82af43;box-shadow:0 0 0 2px #95bc5055}
.theme-swatch{width:48px;height:38px;border:1px solid #6d7d75;border-radius:9px;display:grid;place-items:center;font-size:19px}
.theme-swatch.system{background:linear-gradient(110deg,#faf8ed 50%,#17282a 50%);color:#74a950}
.theme-swatch.light{background:#faf8ed;color:#17362e}
.theme-swatch.dark{background:#17282a;color:#d7f07f}
.theme-caption{margin-top:15px;color:var(--mute);font-size:.75rem}
@media(max-width:760px){.nav-tools{gap:4px}.nav-tools #themeControl{min-width:34px;padding:0 5px}.identity-name{max-width:105px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
/* Hero secondary action must remain legible in either palette. */
.hero .cta-secondary{color:var(--hero-foreground);border-color:#83968d}
/* Dark-mode focus rings remain highly visible on all controls. */
:root[data-theme="dark"] :focus-visible{outline-color:#d8fc78}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) :focus-visible{outline-color:#d8fc78}}

/* Fallback art stays readable against its own pastel panel in both theme modes. */
.photo-fallback{color:#173c33}
.photo-fallback strong{color:#173c33}
.photo-fallback small{color:#294d43}
