/* Site-wide design system (from the prototype): Playfair Display + Plus Jakarta Sans, navy #0B132B + champagne gold #C5A059,
   Warm Alabaster (light) / Obsidian Navy (dark). Loaded AFTER each page's own CSS, so it re-themes by overriding the shared tokens. */
:root {
  --navy: #0b132b; --navy-700: #111c3d; --navy-600: #1a2750; --navy-500: #2a3a6b;
  --gold: #c5a059; --gold-2: #86672a; --gold-soft: #efe3c6; --gold-bright: #d4b273;
  --ink: #0b132b; --body: #374158; --muted: #5b6478; --line: #e2e8f0; --line-2: #ece8de;
  --bg: #fafaf8; --bg-2: #f2f0ea; --white: #ffffff; --card: #ffffff;
  --serif: "Playfair Display", "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(11,19,43,.06), 0 2px 6px rgba(11,19,43,.07);
  --shadow: 0 10px 30px rgba(11,19,43,.10), 0 2px 8px rgba(11,19,43,.06);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --navy-500: #d4b273; --gold-2: #d4b273; --gold-soft: #e9d9b0;
  --ink: #f3f1ea; --body: #cbd1e0; --muted: #9aa5bd; --line: #1e293b; --line-2: #17213a;
  --bg: #080e1e; --bg-2: #0d1529; --white: #111a33; --card: #111a33;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 10px 30px rgba(0,0,0,.45);
  color-scheme: dark;
}
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--body); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3, .serif { font-family: var(--serif); letter-spacing: -.02em; }
::selection { background: var(--gold); color: var(--navy); }

/* sticky glass header (all pages) */
header.site, header.lh {
  background: rgba(11,19,43,.82);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 rgba(197,160,89,.45);
}
header.lh { position: sticky; top: 0; z-index: 100; }
.util { background: #060c1d; }
.brand .mark { border-color: var(--gold); }
.btn-gold { background: linear-gradient(180deg, var(--gold-bright), var(--gold)); color: var(--navy); }
.btn-navy { background: var(--navy); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
footer.site { background: #060c1d; }

/* theme toggle (injected by theme.js) */
.theme-toggle {
  order: 3; flex: none; width: 38px; height: 38px; border-radius: 50%; margin-left: 10px;
  border: 1.5px solid rgba(197,160,89,.6); background: transparent; color: #f3f1ea; font-size: 1rem; line-height: 1; cursor: pointer;
  display: inline-grid; place-items: center;
}
.theme-toggle:hover { background: var(--gold); color: var(--navy); }
@media (max-width: 560px) { header.site .theme-toggle, header.lh .theme-toggle { order: 1; margin-left: auto; } }

/* dark theme: legacy hard-coded light surfaces */
:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] .block.alt { background: var(--bg-2); }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .panel, :root[data-theme="dark"] .tier, :root[data-theme="dark"] .step,
:root[data-theme="dark"] .form, :root[data-theme="dark"] .faq, :root[data-theme="dark"] .kpi, :root[data-theme="dark"] .lcard,
:root[data-theme="dark"] .wrow, :root[data-theme="dark"] .pathcard, :root[data-theme="dark"] .case, :root[data-theme="dark"] .modal,
:root[data-theme="dark"] .ls-card, :root[data-theme="dark"] .dt-calc, :root[data-theme="dark"] .dt-facts div, :root[data-theme="dark"] .sv-tbl,
:root[data-theme="dark"] .ad-tbl, :root[data-theme="dark"] .ls-empty, :root[data-theme="dark"] .ls-bar { background: var(--card); border-color: var(--line); color: var(--body); }
:root[data-theme="dark"] .field input, :root[data-theme="dark"] .field select, :root[data-theme="dark"] .field textarea,
:root[data-theme="dark"] .ls-filters input, :root[data-theme="dark"] .ls-filters select, input, :root[data-theme="dark"] select, :root[data-theme="dark"] textarea {
  background: var(--bg-2); color: var(--ink); border-color: var(--line);
}
:root[data-theme="dark"] .btn-ghost, :root[data-theme="dark"] .ls-tab, :root[data-theme="dark"] .dt-media-tabs button { background: var(--card); color: var(--ink); border-color: var(--line); }
:root[data-theme="dark"] .btn-navy, :root[data-theme="dark"] .ls-tab[aria-pressed="true"], :root[data-theme="dark"] .dt-tabs button[aria-selected="true"],
:root[data-theme="dark"] .dt-media-tabs button[aria-selected="true"], :root[data-theme="dark"] .ls-toggle button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--navy); }
:root[data-theme="dark"] .ls-toggle, :root[data-theme="dark"] .ls-toggle button { background: var(--card); color: var(--ink); border-color: var(--gold); }
:root[data-theme="dark"] .ls-price, :root[data-theme="dark"] .ls-title, :root[data-theme="dark"] .dt-price, :root[data-theme="dark"] .calc-kpi dd,
:root[data-theme="dark"] .calc-field label, :root[data-theme="dark"] .dt-facts dd, :root[data-theme="dark"] .field label, :root[data-theme="dark"] .ls-savedlink { color: var(--ink); }
:root[data-theme="dark"] .calc-kpi, :root[data-theme="dark"] .dt-tabs { background: var(--bg-2); }
:root[data-theme="dark"] .ls-main, :root[data-theme="dark"] .ls-list { background: var(--bg); }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(200deg) brightness(.8) contrast(.95) saturate(.55); }
:root[data-theme="dark"] .leaflet-popup-content-wrapper, :root[data-theme="dark"] .leaflet-popup-tip { background: var(--card); color: var(--ink); }
:root[data-theme="dark"] .ls-pin { border-color: var(--card); }
:root[data-theme="dark"] .pagehead:not(.has-img) { background: linear-gradient(135deg, #0b132b, #111c3d); }
:root[data-theme="dark"] [style*="background:#fff"], :root[data-theme="dark"] [style*="background: #fff"] { background: var(--card) !important; }
:root[data-theme="dark"] [style*="background:#fffdf5"] { background: var(--bg-2) !important; }
:root[data-theme="dark"] a { color: var(--gold-bright); }
:root[data-theme="dark"] .btn, :root[data-theme="dark"] header a, :root[data-theme="dark"] footer a, :root[data-theme="dark"] .ls-card, :root[data-theme="dark"] .brand { color: inherit; }
:root[data-theme="dark"] .btn-gold { color: var(--navy); }

/* ---------- home: search omnibox, featured, pillars ---------- */
.omni { position: relative; z-index: 5; margin-top: -34px; padding: 0 0 8px; }
.omni-box { background: var(--card); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 18px 20px; max-width: 980px; margin: 0 auto; }
.omni-tabs { display: inline-flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 999px; margin-bottom: 14px; }
.omni-tabs button { border: 0; background: transparent; color: var(--muted); font: 700 .88rem var(--sans); padding: 9px 20px; border-radius: 999px; cursor: pointer; }
.omni-tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .omni-tabs button[aria-selected="true"] { background: var(--gold); color: var(--navy); }
.omni-row { display: grid; grid-template-columns: 2fr 1.2fr 1.2fr auto; gap: 10px; align-items: end; }
.omni-row label { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.omni-row input, .omni-row select { width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 12px; font: 500 1rem var(--sans); color: var(--ink); background: var(--white); }
.omni-row .btn { height: 48px; justify-content: center; }
@media (max-width: 820px) { .omni-row { grid-template-columns: 1fr 1fr; } .omni-row .full { grid-column: 1 / -1; } .omni-row .btn { grid-column: 1 / -1; } .omni { margin-top: -20px; } }
.feat { padding: 64px 0 40px; }
.feat-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.feat-tabs { display: inline-flex; gap: 4px; background: var(--bg-2); padding: 4px; border-radius: 999px; }
.feat-tabs button { border: 0; background: transparent; color: var(--muted); font: 700 .88rem var(--sans); padding: 9px 18px; border-radius: 999px; cursor: pointer; }
.feat-tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .feat-tabs button[aria-selected="true"] { background: var(--gold); color: var(--navy); }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.feat-empty { text-align: center; border: 1px dashed var(--gold); border-radius: 20px; padding: 40px 24px; background: var(--card); }
.pg-section { padding: 56px 0 64px; }
.pg-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 26px; }
.pg-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 28px 24px; box-shadow: var(--shadow-sm); overflow: hidden; }
.pg-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--gold), #f1dfae); }
.pg-card .pg-num { width: 48px; height: 48px; border-radius: 50%; background: var(--gold); color: var(--navy); display: grid; place-items: center; font: 700 1.2rem var(--serif); margin-bottom: 14px; }
.pg-card h3 { font-size: 1.25rem; margin-bottom: .3em; color: var(--ink); }
.pg-card p { color: var(--muted); font-size: .95rem; margin-bottom: 10px; }
.pg-card a { font-weight: 700; color: var(--gold-2); }
@media (max-width: 1000px) { .pg-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pg-grid { grid-template-columns: 1fr; } }

/* credibility bar (existing .trustband, restyled) */
.trustband { background: var(--navy); border-top: 1px solid rgba(197,160,89,.4); border-bottom: 1px solid rgba(197,160,89,.4); }
.trustband .tb-item { color: #dfe5f1; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; } }

/* guard against a few px of horizontal scroll from legacy footer/CTA widths on phones */
body { overflow-x: clip; }
