/* ============================================================
   EXPAT COMPASS — Design System
   Teal + amber palette (original), restructured with cues from
   modern financial sites (Monzo / Wise):
     - Flat colour + generous white space (no scattered tints)
     - One primary (teal) + one accent (amber), neutral greys
     - Pill buttons, neutral 1px-border cards, gentle rounding
     - Clean sans (Inter) — no serif display font
   NOTICES ARE PLAIN: simple neutral left-rule, NO coloured fills
   (coloured tint boxes were the "AI" tell — removed).
   Light mode only. Mobile-first.
   ============================================================ */

:root {
  /* Primary — deep teal */
  --teal-900: #0f3d3e;
  --teal-700: #155e5f;
  --teal-600: #1a7374;
  --teal-500: #2a9091;
  --teal-50:  #e9f3f3;

  /* Accent — warm amber */
  --amber-600: #c2691b;
  --amber-500: #e08b30;
  --amber-50:  #fdf2e3;

  /* Text + neutrals */
  --ink:       #14201d;
  --ink-soft:  #44514d;
  --ink-faint: #6c7773;
  --line:      #e3e7e5;
  --line-soft: #eceeed;
  --paper:     #ffffff;
  --paper-2:   #f6f8f7;   /* page background */
  --paper-3:   #eef1f0;

  /* Status colours kept ONLY for text/inline use, never as fills */
  --green-600: #2f7d4f;
  --red-600:   #b4452f;

  --radius:    16px;
  --radius-sm: 12px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15,40,38,.04);
  --shadow-md: 0 6px 24px rgba(15,40,38,.06);

  --maxw: 1080px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper-2);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.02em; font-weight: 700; color: var(--ink); }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: 1.18rem; font-weight: 700; }
p  { margin: 0 0 1rem; color: var(--ink-soft); }
a  { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,248,247,.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
/* Required so the absolutely-positioned .nav-links dropdown anchors
   to the header, not the viewport */
.site-header .nav { position: relative; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.12rem; letter-spacing: -0.02em; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 32px; height: 32px; flex: none; display: grid; place-items: center; color: var(--teal-700); }
.brand .mark svg { width: 32px; height: 32px; }
.brand .name b { color: var(--teal-700); }

.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: .96rem; }
.nav-links a:hover { color: var(--teal-700); text-decoration: none; }
.nav-links a.btn-primary { color: #fff; }
.nav-links a.btn-primary:hover { color: #fff; }

/* Buttons — pill, flat, one accent */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: .98rem;
  padding: 12px 22px; border-radius: var(--radius-pill); border: 1.5px solid transparent;
  cursor: pointer; transition: background .15s ease, transform .08s ease, border-color .15s ease;
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal-600); color: #fff !important; }
.btn-primary:hover { background: var(--teal-700); color: #fff !important; }
.btn-ghost { background: transparent; color: var(--teal-700); border-color: var(--line); }
.btn-ghost:hover { background: #fff; border-color: var(--teal-500); }
.btn-amber { background: var(--amber-500); color: #fff; }
.btn-amber:hover { background: var(--amber-600); color:#fff; }
.btn-block { width: 100%; justify-content: center; }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; }

.icon { width: 18px; height: 18px; stroke-width: 2; flex: none; }

/* ---------- Hero ---------- */
.hero { padding: 60px 0 28px; }
.hero-grid { display: grid; gap: 36px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px){ .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 48px; } }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--teal-700); font-weight: 600; font-size: .85rem; letter-spacing: .01em;
  margin-bottom: 18px;
}
.hero .eyebrow .icon { width: 16px; height: 16px; }
.hero h1 { max-width: 15ch; }
.hero .lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 14px 26px; margin-top: 32px; color: var(--ink-faint); font-size: .9rem; }
.trust-row span { display: inline-flex; align-items: center; gap: 8px; }
.trust-row .icon { color: var(--teal-600); width: 17px; height: 17px; }

/* Hero image — real photo, gently rounded, no tint */
.hero-media { position: relative; }
.hero-media img { width: 100%; height: auto; display: block; border-radius: var(--radius-lg); object-fit: cover; }
.hero-media .photo-credit { font-size: .72rem; color: var(--ink-faint); margin-top: 8px; }

/* Generic media figure */
.media { margin: 0; }
.media img { width: 100%; height: auto; display: block; border-radius: var(--radius); }
.media figcaption { font-size: .8rem; color: var(--ink-faint); margin-top: 8px; }

/* ---------- Sections ---------- */
.section { padding: 44px 0; }
.section-head { margin-bottom: 28px; }
.section-head .kicker { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal-600); margin-bottom: 8px; }
.section-head p { max-width: 60ch; }

/* ---------- Calculator grid ---------- */
.grid { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 880px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.calc-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
  color: inherit; height: 100%;
}
a.calc-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--teal-500); }
.calc-card .ci { width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center; background: var(--teal-50); color: var(--teal-700); margin-bottom: 16px; }
.calc-card .ci svg { width: 23px; height: 23px; }
.calc-card h3 { margin-bottom: 6px; }
.calc-card p { font-size: .95rem; margin-bottom: 16px; }
.calc-card .go { margin-top: auto; font-weight: 600; color: var(--teal-700); font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; }

/* Tags — outline pills, NO filled tint background */
.tag {
  position: absolute; top: 18px; right: 18px;
  font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--radius-pill); border: 1.5px solid var(--line);
  background: transparent; color: var(--ink-faint);
}
.tag-free { color: var(--ink-faint); border-color: var(--line); }
.tag-prem { color: var(--teal-700); border-color: var(--line); }
.calc-card.is-prem .ci { background: var(--amber-50); color: var(--amber-600); }
.calc-card.is-locked { background: var(--paper); }

/* ---------- Calculator page ---------- */
.calc-page { padding: 28px 0 80px; }
.breadcrumb { font-size: .9rem; color: var(--ink-faint); margin-bottom: 18px; }
.breadcrumb a { color: var(--ink-faint); }
.calc-header { margin-bottom: 28px; }
.calc-header .badge { margin-bottom: 14px; }
.calc-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 12px; }
.calc-header .lede { color: var(--ink-soft); max-width: 60ch; font-size: 1.1rem; }

/* Badges — outline pills, no fill */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--radius-pill); border: 1.5px solid var(--line);
  background: transparent; color: var(--ink-faint); margin-right: 6px;
}
.badge-free { color: var(--ink-faint); border-color: var(--line); }
.badge-prem { color: var(--teal-700); border-color: var(--line); }
.badge-year { color: var(--ink-soft); }

.calc-layout { display: grid; gap: 22px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .calc-layout { grid-template-columns: 1fr 1fr; align-items: start; } }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.panel h2 { font-size: 1.25rem; margin-bottom: 4px; }
.panel .panel-sub { font-size: .92rem; color: var(--ink-faint); margin-bottom: 22px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 20px; }
.field > label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 8px; color: var(--ink); }
.field .hint { font-size: .85rem; color: var(--ink-faint); margin: 6px 0 0; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .prefix, .input-wrap .suffix { position: absolute; color: var(--ink-faint); font-weight: 600; pointer-events: none; font-size: 1rem; }
.input-wrap .prefix { left: 16px; }
.input-wrap .suffix { right: 16px; }
.input-wrap.has-prefix input { padding-left: 32px; }
.input-wrap.has-suffix input { padding-right: 40px; }

input[type="text"], input[type="number"], select {
  width: 100%; font-family: var(--font); font-size: 1rem; color: var(--ink);
  padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); transition: border-color .15s ease, box-shadow .15s ease;
  -webkit-appearance: none; appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236c7773' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 42px;
}
input:focus, select:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px var(--teal-50); }

input[type="range"] { width: 100%; accent-color: var(--teal-600); }
.range-row { display: flex; justify-content: space-between; font-size: .82rem; color: var(--ink-faint); margin-top: 4px; }
.range-val { font-weight: 700; color: var(--teal-700); }

/* Choice buttons — outline, fill only when active (teal) */
.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choice {
  flex: 1 1 auto; min-width: 90px; text-align: center; cursor: pointer;
  padding: 13px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); font-weight: 600; font-size: .95rem; color: var(--ink-soft);
  transition: all .12s ease; user-select: none;
}
.choice:hover { border-color: var(--teal-500); }
.choice.active { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }

.qrow { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.qrow:last-child { border-bottom: none; }
.qrow .q { font-weight: 600; font-size: .98rem; margin-bottom: 10px; }

/* ---------- Result panel — solid teal field (flat, not a tint) ---------- */
/* padding/radius so bare `.result-panel` (used without `.panel`) never has its
   content touching the edge */
.result-panel { background: var(--teal-900); color: #fff; border: none; border-radius: var(--radius-lg); padding: 26px; }
/* MINIMAL SAFE remap: only the neutral text/surface tokens become light here, so
   inline author colours like color:var(--ink-soft) stay legible on the dark field.
   Accent tokens are deliberately NOT touched (ambiguous: used as both value text
   and fills). Pages whose result content is genuinely light-designed are switched
   to a light panel per-page instead (decided empirically by a contrast measure). */
.result-panel {
  --ink:       #ffffff;
  --ink-soft:  rgba(255,255,255,.82);
  --ink-faint: rgba(255,255,255,.62);
  --line:      rgba(255,255,255,.22);
  --line-soft: rgba(255,255,255,.14);
  /* paper tokens become subtle translucent DARK surfaces on the teal field, so
     var(--paper-2) boxes (e.g. .callout) stay dark and keep their light text */
  --paper:     rgba(255,255,255,.08);
  --paper-2:   rgba(255,255,255,.10);
  --paper-3:   rgba(255,255,255,.14);
}
.result-panel h2, .result-panel h3, .result-panel h4 { color: #fff; }
.result-panel .panel-sub { color: rgba(255,255,255,.72); }
.result-panel a { color: #fff; }

/* Elements with an explicit near-white INLINE background still need dark text.
   Token-matched so JS-injected styles (re-serialised with spaces) are caught.
   Only inline backgrounds — class-based "cards" are ambiguous (some transparent)
   so they're handled by the per-page light-panel switch, not here. */
.result-panel .mobile-cta,
.result-panel [style*="#ffffff"],
.result-panel [style*="background:#fff"],
.result-panel [style*="background: #fff"],
.result-panel [style*="rgba(255,255,255,.9"],
.result-panel [style*="rgba(255, 255, 255, 0.9"],
.result-panel [style*="#f0fdf4"],
.result-panel [style*="#dcfce7"],
.result-panel [style*="#d1fae5"],
.result-panel [style*="#fef2f2"],
.result-panel [style*="#fee2e2"],
.result-panel [style*="#fffbeb"],
.result-panel [style*="#fef3c7"],
.result-panel [style*="#fff7ed"] {
  --ink:       #14201d;
  --ink-soft:  #44514d;
  --ink-faint: #6c7773;
  --line:      #e3e7e5;
  --line-soft: #eceeed;
  color: var(--ink-soft);
}
.result-panel .mobile-cta h2, .result-panel .mobile-cta h3, .result-panel .mobile-cta h4 { color: var(--ink); }
.result-big { font-size: clamp(2.3rem, 8vw, 3.4rem); line-height: 1.05; margin: 6px 0; font-weight: 800; letter-spacing: -0.03em; }
.result-label { color: rgba(255,255,255,.75); font-size: .92rem; font-weight: 500; }
.result-split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.result-stat { background: rgba(255,255,255,.10); border-radius: var(--radius-sm); padding: 16px; }
.result-stat .n { font-weight: 700; font-size: 1.35rem; }
.result-stat .l { font-size: .82rem; color: rgba(255,255,255,.72); }
.result-note { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.18); font-size: .92rem; color: rgba(255,255,255,.9); }
.result-empty { color: var(--ink-faint); text-align: center; padding: 40px 10px; }

.breakdown { margin-top: 4px; }
.breakdown .row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.14); font-size: .95rem; }
.breakdown .row:last-child { border-bottom: none; }
.breakdown .row.total { font-weight: 700; font-size: 1.08rem; padding-top: 14px; }
.breakdown .row .v { font-variant-numeric: tabular-nums; }

.lbreak .row { display:flex; justify-content:space-between; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size:.95rem; }
.lbreak .row:last-child { border-bottom: none; }
.lbreak .row.total { font-weight: 700; color: var(--ink); }
.lbreak .v { font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- Notices: neutral rounded box, NO colour-coding ----------
   Rounded corners are fine; we only remove coloured accents/tints.
   Single neutral style for all notice types. */
.callout { border: 1px solid var(--line); background: var(--paper-2); border-radius: var(--radius-sm); padding: 14px 16px; margin: 20px 0; font-size: .95rem; }
.callout .icon { display: none; }
.callout p { margin: 0; color: var(--ink-soft); }
.callout-info, .callout-warn, .callout-good { border-color: var(--line); background: var(--paper-2); }

/* Warning text — small bold cue, neutral (no red box) */
.warning { display: flex; gap: 12px; align-items: flex-start; margin: 22px 0; }
.warning .ex {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: #fff; font-weight: 800; font-size: 1.2rem;
  display: grid; place-items: center; line-height: 1;
}
.warning p { margin: 0; font-weight: 700; color: var(--ink); font-size: 1.02rem; }

.meter { height: 12px; border-radius: var(--radius-pill); background: var(--paper-3); overflow: hidden; margin: 12px 0 6px; }
.meter > i { display: block; height: 100%; border-radius: var(--radius-pill); transition: width .4s ease; }

/* ---------- Premium nudge — neutral card, no tint ---------- */
.lock-banner { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-top: 28px; }
.lock-banner .icon { display: none; }
.lock-banner h3 { color: var(--ink); margin-bottom: 6px; }
.lock-banner p { color: var(--ink-soft); font-size: .95rem; margin-bottom: 14px; }

/* ---------- Save / resume ---------- */
.save-bar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top: 16px; }
.code-pill { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.05rem; font-weight: 700; background: var(--paper-3); border: 1.5px dashed var(--line); border-radius: 10px; padding: 9px 14px; color: var(--ink); letter-spacing: .05em; }

/* ---------- Disclaimer — neutral rounded box, no coloured accent ---------- */
.disclaimer { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; font-size: .9rem; color: var(--ink-faint); margin: 32px 0; }
.disclaimer b { color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: var(--teal-900); color: rgba(255,255,255,.78); margin-top: 60px; padding: 52px 0 36px; }
.site-footer a { color: rgba(255,255,255,.82); }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 10px; font-size: .94rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); margin-top: 38px; padding-top: 24px; font-size: .84rem; color: rgba(255,255,255,.6); }
.footer-brand { display:flex; align-items:center; gap:10px; color:#fff; font-weight:800; margin-bottom:12px; font-size: 1.1rem; }
.footer-brand svg { width: 28px; height: 28px; }

/* ---------- Resource links ---------- */
.res-links { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 6px; }
@media (min-width:560px){ .res-links { grid-template-columns: 1fr 1fr; } }
.res-link { display:flex; align-items:center; gap:10px; padding:14px 16px; border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--paper); font-size:.92rem; font-weight:600; color:var(--ink); }
.res-link:hover { border-color: var(--teal-500); text-decoration:none; }
.res-link .icon { color: var(--teal-600); }

/* ---------- Mobile bottom CTA ---------- */
.mobile-cta { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: none; }
@media (max-width: 899px) { .mobile-cta.show { display: block; } body.has-cta { padding-bottom: 92px; } }

/* ---------- Mobile nav — animated expand/collapse ---------- */
.nav-toggle {
  display: none; background: none; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); cursor: pointer;
  padding: 7px 9px; color: var(--ink);
  transition: border-color .15s, background .15s;
}
.nav-toggle:hover { border-color: var(--teal-500); background: var(--teal-50); }
.nav-toggle svg { width: 22px; height: 22px; display: block; }
.nav-toggle .icon-close { display: none; }

@media (max-width: 760px) {
  /* The menu panel: hidden by default via max-height + overflow clip */
  .nav-links {
    position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 0 20px; box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden;
    display: flex;                       /* keep flex so transitions work */
    transition: max-height .32s cubic-bezier(.4,0,.2,1),
                padding .32s cubic-bezier(.4,0,.2,1),
                opacity .25s ease;
    opacity: 0; pointer-events: none;
  }
  .nav-links.open {
    max-height: 600px; padding: 8px 20px 18px;
    opacity: 1; pointer-events: auto;
  }
  .nav-links a {
    padding: 14px 0; border-bottom: 1px solid var(--line-soft);
    font-size: 1.05rem;
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links .btn { margin-top: 10px; text-align: center; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
}

/* site-nav variant (used on calc pages) */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,248,247,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px; max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  position: relative; /* needed so abs-positioned .nav-links dropdown anchors here */
}
.nav-logo {
  font-weight: 800; font-size: 1.08rem; color: var(--ink);
  letter-spacing: -0.02em; text-decoration: none;
}
.nav-logo:hover { text-decoration: none; color: var(--teal-700); }
.nav-inner .nav-links { display: flex; align-items: center; gap: 22px; }
.nav-inner .nav-links a { color: var(--ink-soft); font-weight: 500; font-size: .93rem; }
.nav-inner .nav-links a:hover { color: var(--teal-700); text-decoration: none; }
.nav-inner .nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-inner .nav-links {
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 0 20px; box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden;
    display: flex;
    transition: max-height .32s cubic-bezier(.4,0,.2,1),
                padding .32s cubic-bezier(.4,0,.2,1),
                opacity .25s ease;
    opacity: 0; pointer-events: none;
  }
  .nav-inner .nav-links.open {
    max-height: 500px; padding: 8px 20px 16px;
    opacity: 1; pointer-events: auto;
  }
  .nav-inner .nav-links a {
    padding: 13px 0; border-bottom: 1px solid var(--line-soft);
    font-size: 1rem;
  }
  .nav-inner .nav-links a:last-child { border-bottom: none; }
  .nav-inner .nav-links .btn { margin-top: 10px; }
  .nav-inner .nav-toggle { display: flex; align-items: center; justify-content: center; }
}

/* ---------- Utility ---------- */
.muted { color: var(--ink-faint); }
.center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack > * + * { margin-top: 14px; }
.divider { height:1px; background: var(--line); border:none; margin: 24px 0; }
.pill-row { display:flex; gap:8px; flex-wrap:wrap; }
.fadein { animation: fadein .35s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity:1; transform:none; } }

/* ---------- Cost of Living & Country Guide components ---------- */

/* City selector chips */
.city-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.city-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-pill);
  background: var(--paper); cursor: pointer; font-size: .9rem; font-weight: 600;
  color: var(--ink-soft); transition: all .12s ease; user-select: none;
}
.city-chip:hover { border-color: var(--teal-500); }
.city-chip.active { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }
.city-chip .flag { font-size: 1.1rem; }

/* Region heading inside chip lists */
.chip-region { font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--ink-faint); margin: 14px 0 6px; width: 100%; }

/* CoL comparison bars */
.col-bars { display: grid; gap: 10px; margin-top: 8px; }
.col-bar-row { display: grid; grid-template-columns: 140px 1fr 80px; align-items: center; gap: 10px; }
@media (max-width: 520px) {
  .col-bar-row { grid-template-columns: 100px 1fr 64px; gap: 7px; }
}
.col-bar-label { font-size: .9rem; color: var(--ink-soft); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.col-bar-track { height: 10px; background: var(--paper-3); border-radius: var(--radius-pill); overflow: hidden; }
.col-bar-fill { height: 100%; border-radius: var(--radius-pill); background: var(--teal-600); transition: width .5s ease; }
.col-bar-fill.is-uk { background: var(--ink-faint); }
.col-bar-fill.is-cheaper { background: var(--teal-600); }
.col-bar-fill.is-pricier { background: var(--amber-500); }
.col-bar-val { font-size: .9rem; font-weight: 700; color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }

/* Breakdown table inside result panel (on dark teal bg) */
.col-breakdown { margin-top: 16px; }
.col-breakdown .brow {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,.13); font-size: .93rem;
}
.col-breakdown .brow:last-child { border-bottom: none; font-weight: 700; padding-top: 14px; }
.col-breakdown .bval { font-variant-numeric: tabular-nums; font-weight: 600; }
.col-breakdown .bcat { color: rgba(255,255,255,.8); }

/* Salary equivalence big display */
.equiv-display { margin-top: 20px; text-align: center; }
.equiv-display .eq-label { font-size: .9rem; color: rgba(255,255,255,.75); }
.equiv-display .eq-amount { font-size: clamp(2rem, 9vw, 3rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.equiv-display .eq-sub { font-size: .88rem; color: rgba(255,255,255,.65); margin-top: 4px; }

/* Diff pill: "42% cheaper" etc */
.diff-pill {
  display: inline-block; padding: 5px 14px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: .9rem; border: 1.5px solid var(--line);
  color: var(--ink-soft); background: var(--paper-2); margin-top: 6px;
}

/* Country guide cards */
.country-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .country-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .country-grid { grid-template-columns: 1fr 1fr 1fr; } }

.country-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper);
  padding: 22px; cursor: pointer; transition: box-shadow .15s ease, border-color .15s ease;
  text-decoration: none; color: var(--ink);
}
.country-card:hover { border-color: var(--teal-500); box-shadow: var(--shadow-md); text-decoration: none; }
.country-card .cc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.country-card .cc-flag { font-size: 2.4rem; line-height: 1; }
.country-card .cc-name { font-weight: 800; font-size: 1.2rem; }
.country-card .cc-sub { font-size: .85rem; color: var(--ink-faint); margin-top: 1px; }
.country-card p { font-size: .93rem; color: var(--ink-soft); margin: 0 0 14px; }
.country-card .cc-scores { display: flex; gap: 10px; flex-wrap: wrap; }
.score-chip { font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line); color: var(--ink-soft); }

/* Visa cards inside country detail panel */
.visa-list { display: grid; gap: 12px; margin-top: 8px; }
.visa-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: var(--paper); }
.visa-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.visa-name { font-weight: 700; font-size: 1rem; }
.visa-type { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px 10px; }
.visa-facts { display: grid; gap: 6px; margin-bottom: 10px; }
.visa-fact { display: flex; gap: 8px; font-size: .9rem; }
.visa-fact .vk { font-weight: 600; color: var(--ink-soft); min-width: 120px; flex: none; }
.visa-fact .vv { color: var(--ink-faint); }
.visa-notes { font-size: .88rem; color: var(--ink-faint); margin: 8px 0 12px; }

/* Tax summary section inside country panel */
.tax-table { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; margin-top: 10px; }
.tax-row { display: grid; grid-template-columns: 160px 1fr; border-bottom: 1px solid var(--line); }
.tax-row:last-child { border-bottom: none; }
.tax-row .tk { background: var(--paper-2); padding: 11px 14px; font-size: .88rem; font-weight: 600; color: var(--ink-soft); }
.tax-row .tv { padding: 11px 14px; font-size: .88rem; color: var(--ink-faint); }
@media (max-width: 500px) { .tax-row { grid-template-columns: 1fr; } .tax-row .tk { border-bottom: 1px solid var(--line-soft); } }

/* Tabs (for country guide sub-sections) */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; }
.tab { padding: 10px 16px; font-size: .92rem; font-weight: 600; color: var(--ink-faint); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: color .12s, border-color .12s; white-space: nowrap; }
.tab:hover { color: var(--ink-soft); }
.tab.active { color: var(--teal-700); border-bottom-color: var(--teal-700); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* "Filter by" toggle row */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-btn {
  padding: 8px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-pill);
  background: var(--paper); font-size: .88rem; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; transition: all .12s ease;
}
.filter-btn:hover { border-color: var(--teal-500); }
.filter-btn.active { background: var(--teal-700); color: #fff; border-color: var(--teal-700); }

/* ---------- Calculator page hero band (replaces photo banners) ----------
   No images — clean teal gradient + subtle dot-grid texture + big icon.
   Looks sharp at every size, no cropping, loads instantly.
   -------------------------------------------------------------------- */
.calc-banner {
  margin: 0 0 28px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(120deg, var(--teal-900) 0%, var(--teal-700) 60%, #1a7374 100%);
  /* subtle dot-grid texture */
  background-image:
    radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(120deg, var(--teal-900) 0%, var(--teal-700) 60%, #1a7374 100%);
  background-size: 22px 22px, 100% 100%;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 32px 36px;
  min-height: 130px;
  position: relative;
}
/* Remove any stray <img> tags inside banners — images are gone */
.calc-banner img { display: none; }

.calc-banner .cb-icon {
  flex: none;
  width: 64px; height: 64px;
  background: rgba(255,255,255,.12);
  border-radius: 18px;
  display: grid; place-items: center;
  color: #fff;
}
.calc-banner .cb-icon svg { width: 32px; height: 32px; }
.calc-banner .cb-copy { color: #fff; }
.calc-banner .cb-copy h2 {
  margin: 0 0 6px;
  font-size: clamp(1.2rem, 3.5vw, 1.7rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}
.calc-banner .cb-copy p {
  margin: 0;
  font-size: .93rem;
  color: rgba(255,255,255,.78);
  max-width: 52ch;
  line-height: 1.55;
}
/* Decorative large circle accent — far right, clipped */
.calc-banner::after {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  pointer-events: none;
}
@media (max-width: 640px) {
  .calc-banner { padding: 22px 20px; gap: 16px; min-height: 110px; }
  .calc-banner .cb-icon { width: 48px; height: 48px; border-radius: 14px; }
  .calc-banner .cb-icon svg { width: 24px; height: 24px; }
  .calc-banner .cb-copy h2 { font-size: 1.15rem; }
}

/* ---------- Health Check hub ---------- */
.hc-quick { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 620px){ .hc-quick { grid-template-columns: 1fr 1fr; } }

/* Score: neutral ring, no colour-coding */
.hc-score { display: flex; align-items: center; gap: 20px; }
.hc-ring { flex: none; width: 96px; height: 96px; position: relative; }
.hc-ring svg { transform: rotate(-90deg); width: 96px; height: 96px; }
.hc-ring .track { stroke: rgba(255,255,255,.22); }
.hc-ring .fill { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.hc-ring .num { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; }
.hc-score .grade { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.hc-score .sub { font-size: .92rem; color: rgba(255,255,255,.75); }

/* Findings list — neutral rounded cards, priority shown as a text label only */
.findings { display: grid; gap: 14px; margin-top: 8px; }
.finding { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--paper); }
.finding-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.finding h3 { font-size: 1.08rem; margin: 0; }
.finding .flag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 4px 11px; white-space: nowrap; }
.finding p { color: var(--ink-soft); font-size: .95rem; margin: 10px 0 0; }
.finding .amt { margin-top: 14px; }
.finding .amt .n { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.finding .amt .l { font-size: .85rem; color: var(--ink-faint); }
.finding .finding-cta { margin-top: 16px; }
.finding.is-ok { background: var(--paper-2); }

.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-faint); }
.empty-state .icon { width: 40px; height: 40px; color: var(--teal-600); margin-bottom: 12px; }

/* ---------- Feature row (image + text, for empathy sections) ---------- */
.feature { display: grid; gap: 28px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 820px){ .feature { grid-template-columns: 1fr 1fr; gap: 44px; } .feature.reverse .feature-media { order: 2; } }
.feature-media img { width: 100%; height: auto; display: block; border-radius: var(--radius-lg); }

/* ============================================================
   AD SLOTS — Google AdSense
   ============================================================
   Ad units are injected by js/ads.js via data-ad="..." anchors.
   In dev mode (ADS_ENABLED=false) placeholders are shown.
   In production placeholders are invisible; real ads fill slots.
   ============================================================ */

/* Wrapper for every ad unit */
.ad-slot {
  width: 100%;
  overflow: hidden;
  clear: both;
}

/* Leaderboard — top of content, full width */
.ad-slot--leaderboard {
  max-width: 728px;
  margin: 0 auto 24px;
  min-height: 90px;
  text-align: center;
}

/* In-content rectangle — between sections */
.ad-slot--inContent {
  max-width: 336px;
  margin: 0 auto 24px;
  min-height: 280px;
  text-align: center;
}

/* Sidebar — 300×250 in result column */
.ad-slot--sidebar {
  max-width: 300px;
  margin: 0 0 20px;
  min-height: 250px;
}

/* Footer banner — above site footer */
.ad-slot--footer {
  max-width: 728px;
  margin: 0 auto 0;
  min-height: 90px;
  text-align: center;
}

/* Dev placeholder — visible only when ADS_ENABLED=false */
.ad-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: repeating-linear-gradient(
    45deg,
    var(--paper-2),
    var(--paper-2) 6px,
    var(--paper-3) 6px,
    var(--paper-3) 12px
  );
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-sm);
  padding: 12px;
}
.ad-placeholder-label {
  font-size: .75rem;
  font-weight: 700;
  color: var(--ink-faint);
  font-family: ui-monospace, monospace;
  text-align: center;
}
.ad-placeholder-note {
  font-size: .7rem;
  color: var(--ink-faint);
  text-align: center;
}

/* Ad label (Google policy: label ads clearly) */
.ad-slot::before {
  content: 'Advertisement';
  display: block;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-faint);
  text-align: center;
  margin-bottom: 4px;
}

/* Audience badge colours — UK / US / AU */
.badge-uk  { background: rgba(0,82,204,.1);  color: #003d99; border-color: rgba(0,82,204,.2); }
.badge-us  { background: rgba(178,34,34,.1); color: #8b0000; border-color: rgba(178,34,34,.2); }
.badge-au  { background: rgba(255,165,0,.12); color: #7d4f00; border-color: rgba(255,165,0,.3); }

/* Audience switcher strip */
.audience-strip {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 0;
}
.audience-tabs {
  display: flex;
  gap: 0;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.audience-tabs::-webkit-scrollbar { display: none; }
.audience-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: color .12s, border-color .12s;
}
.audience-tab:hover { color: var(--ink); text-decoration: none; }
.audience-tab.active { color: var(--teal-700); border-bottom-color: var(--teal-700); }
.audience-tab .flag { font-size: 1.05rem; }

/* Expat hub cards (for audience landing pages) */
.hub-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) { .hub-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .hub-grid { grid-template-columns: 1fr 1fr 1fr; } }

.hub-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  padding: 22px 20px;
  text-decoration: none;
  color: var(--ink);
  transition: box-shadow .15s, border-color .15s, transform .15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hub-card:hover {
  border-color: var(--teal-500);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}
.hub-card .hc-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--teal-50);
  display: grid; place-items: center;
  color: var(--teal-600);
}
.hub-card .hc-icon svg { width: 22px; height: 22px; }
.hub-card h3 { font-size: 1.05rem; margin: 0; }
.hub-card p { font-size: .9rem; color: var(--ink-soft); margin: 0; flex: 1; }
.hub-card .hc-go { font-size: .88rem; font-weight: 700; color: var(--teal-600); margin-top: auto; }

/* Tip box — neutral */
.tip-box {
  background: var(--teal-50);
  border-left: 3px solid var(--teal-600);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  font-size: .93rem;
  color: var(--ink-soft);
  margin: 20px 0;
}
.tip-box strong { color: var(--ink); }

/* ============================================================
   TIER / LICENSE SYSTEM
   ============================================================ */

/* Lock overlay — shown over gated content */
.lock-overlay {
  position: absolute; inset: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius);
  z-index: 10;
}
.lock-inner {
  text-align: center; padding: 24px 32px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  max-width: 280px;
}

/* Tier badges */
.badge-starter { background: rgba(16,185,129,.1);  color: #065f46; border-color: rgba(16,185,129,.25); }
.badge-premium { background: rgba(99,102,241,.1);  color: #3730a3; border-color: rgba(99,102,241,.25); }
.badge-bundle  { background: rgba(245,158,11,.12); color: #78350f; border-color: rgba(245,158,11,.3);  }

/* Pricing cards */
.pricing-grid {
  display: grid; grid-template-columns: repeat(4,1fr); gap: 16px;
  margin: 32px 0;
}
@media(max-width:900px) { .pricing-grid { grid-template-columns:1fr 1fr; } }
@media(max-width:540px) { .pricing-grid { grid-template-columns:1fr; } }

.pricing-card {
  border: 2px solid var(--line); border-radius: 14px;
  padding: 24px 20px; display: flex; flex-direction: column;
  position: relative; background: var(--surface);
  transition: box-shadow .15s, transform .15s;
}
.pricing-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.pricing-card.featured {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
.pricing-card .pc-popular {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--teal-600); color: #fff; font-size: .72rem; font-weight: 700;
  padding: 3px 14px; border-radius: 99px; text-transform: uppercase; letter-spacing: .05em;
  white-space: nowrap;
}
.pricing-card .pc-tier  { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); margin-bottom: 6px; }
.pricing-card .pc-price { font-size: 2.4rem; font-weight: 800; color: var(--ink); line-height: 1; margin-bottom: 2px; }
.pricing-card .pc-price sup { font-size: 1.2rem; vertical-align: super; }
.pricing-card .pc-currency { font-size: .8rem; color: var(--ink-faint); margin-bottom: 16px; }
.pricing-card .pc-tagline { font-size: .9rem; color: var(--ink-soft); margin-bottom: 20px; min-height: 2.5em; }
.pricing-card .pc-features { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pricing-card .pc-features li { font-size: .85rem; display: flex; align-items: flex-start; gap: 8px; }
.pricing-card .pc-features li::before { content: '✓'; color: var(--teal-600); font-weight: 700; flex-shrink: 0; }
.pricing-card .pc-features li.muted { color: var(--ink-faint); }
.pricing-card .pc-features li.muted::before { content: '—'; color: var(--ink-faint); }

/* Key entry widget */
.key-entry-box {
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 28px; text-align: center;
  max-width: 460px; margin: 0 auto;
}
.key-entry-box h3 { margin: 0 0 8px; }
.key-entry-box p  { font-size: .9rem; color: var(--ink-soft); margin: 0 0 20px; }
.key-input-row { display: flex; gap: 10px; }
.key-input-row input {
  flex: 1; padding: 12px 16px; border: 2px solid var(--line); border-radius: 10px;
  font-size: 1rem; font-family: monospace; letter-spacing: .08em; text-transform: uppercase;
}
.key-input-row input:focus { outline: none; border-color: var(--teal-600); }
.key-msg { margin-top: 12px; font-size: .85rem; border-radius: 8px; padding: 10px 14px; display: none; }
.key-msg.success { background: rgba(5,150,105,.08); color: #065f46; display: block; }
.key-msg.error   { background: rgba(220,38,38,.08);  color: #991b1b; display: block; }

/* Download library */
.download-grid {
  display: grid; grid-template-columns: repeat(3,1fr); gap: 14px;
}
@media(max-width:800px) { .download-grid { grid-template-columns:1fr 1fr; } }
@media(max-width:500px) { .download-grid { grid-template-columns:1fr; } }

.download-card {
  border: 1.5px solid var(--line); border-radius: 12px;
  padding: 18px 16px; background: var(--surface);
  display: flex; flex-direction: column; gap: 8px;
  position: relative; transition: all .15s;
}
.download-card:hover { border-color: var(--teal-600); box-shadow: var(--shadow-sm); }
.download-card.locked { opacity: .65; }
.dc-icon  { font-size: 1.8rem; }
.dc-title { font-weight: 700; font-size: .92rem; }
.dc-desc  { font-size: .8rem; color: var(--ink-soft); flex: 1; }
.dc-meta  { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dc-pages { font-size: .72rem; color: var(--ink-faint); }
.dc-tier  { font-size: .7rem; padding: 2px 8px; border-radius: 99px; font-weight: 700; }

/* ── Print styles for downloadable documents ── */
@media print {
  .site-header, .site-footer, .mobile-cta, .no-print,
  .breadcrumb, nav, .btn-print-hide { display: none !important; }
  body { font-size: 11pt; color: #000; background: #fff; }
  .doc-page { max-width: 100%; padding: 0; box-shadow: none; }
  .doc-header { background: #1a7374 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc-section { page-break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  .page-break { page-break-before: always; }
  @page { margin: 15mm 18mm; }
}

/* ============================================================
   Tool search, finder wizard & directory (js/tool-search.js)
   ============================================================ */
.tool-search { position: relative; max-width: 640px; text-align: left; }
.tool-search input {
  width: 100%; font: inherit; font-size: 1.05rem;
  padding: 16px 52px 16px 50px;
  border-radius: var(--radius-pill); border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink);
  box-shadow: var(--shadow-md);
  outline: none; transition: border-color .15s;
}
.tool-search input:focus { border-color: var(--teal-500); }
.tool-search .search-icon {
  position: absolute; left: 18px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--ink-faint); pointer-events: none;
}
.tool-search .kbd-hint {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  font-size: .75rem; color: var(--ink-faint);
  border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px;
  background: var(--paper-2);
}
.search-results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  max-height: 420px; overflow-y: auto;
  display: none;
}
.search-results.open { display: block; }
.search-result {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; cursor: pointer;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink); text-decoration: none;
}
.search-result:last-child { border-bottom: none; }
.search-result:hover, .search-result.sel { background: var(--teal-50); text-decoration: none; }
.search-result .sr-flag { flex: none; font-size: 1.1rem; }
.search-result .sr-main { min-width: 0; }
.search-result .sr-title { font-weight: 600; font-size: .95rem; }
.search-result .sr-title mark { background: var(--amber-50); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-result .sr-desc {
  font-size: .8rem; color: var(--ink-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sr-tag {
  margin-left: auto; flex: none;
  font-size: .7rem; font-weight: 700; letter-spacing: .03em;
  border-radius: var(--radius-pill); padding: 3px 9px;
}
.sr-tag.free { color: var(--teal-700); background: var(--teal-50); }
.sr-tag.premium { color: var(--amber-600); background: var(--amber-50); }
.search-empty { padding: 18px; font-size: .9rem; color: var(--ink-faint); }
.search-foot {
  padding: 9px 16px; font-size: .78rem; color: var(--ink-faint);
  border-top: 1px solid var(--line-soft); background: var(--paper-2);
  border-radius: 0 0 var(--radius) var(--radius);
}
.popular { margin-top: 16px; font-size: .86rem; color: var(--ink-faint); }
.popular button {
  font: inherit; font-size: .82rem; color: var(--teal-700);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 5px 13px; margin: 4px 3px 0;
  cursor: pointer; transition: border-color .15s;
}
.popular button:hover { border-color: var(--teal-500); }
.recent-row h4 { font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 8px; }
.recent-row .dir-item { display: inline-flex; margin: 0 6px 6px 0; }

/* Wizard */
.wizard {
  max-width: 760px; margin: 0 auto;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 28px;
}
.wizard-progress { display: flex; gap: 6px; margin-bottom: 22px; }
.wizard-progress span { height: 5px; flex: 1; border-radius: 3px; background: var(--line-soft); transition: background .25s; }
.wizard-progress span.done { background: var(--teal-600); }
.wizard h3 { font-size: 1.3rem; margin-bottom: 4px; }
.wizard .w-sub { font-size: .92rem; color: var(--ink-faint); margin-bottom: 18px; }
.w-options { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .w-options { grid-template-columns: 1fr 1fr; } }
.w-opt {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; background: var(--paper);
  font: inherit; text-align: left; transition: border-color .15s, background .15s;
}
.w-opt:hover { border-color: var(--teal-500); background: var(--teal-50); }
.w-opt .w-emoji { font-size: 1.4rem; flex: none; }
.w-opt b { display: block; font-size: .97rem; }
.w-opt small { color: var(--ink-faint); font-size: .82rem; }
.w-back { font: inherit; font-size: .85rem; color: var(--ink-faint); background: none; border: none; cursor: pointer; padding: 0; margin-top: 16px; }
.w-back:hover { color: var(--teal-700); }
.w-plan { display: grid; gap: 10px; }
.w-plan a {
  display: flex; align-items: center; gap: 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; color: var(--ink);
}
.w-plan a:hover { border-color: var(--teal-500); text-decoration: none; background: var(--teal-50); }
.w-plan .step-n {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal-700); color: #fff; font-weight: 700; font-size: .85rem;
  display: grid; place-items: center;
}
.w-plan b { display: block; font-size: .95rem; }
.w-plan small { color: var(--ink-faint); font-size: .8rem; }

/* Directory */
.dir-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; align-items: center; }
.chip {
  font: inherit; font-size: .87rem; font-weight: 600;
  padding: 8px 16px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--line); background: var(--paper);
  color: var(--ink-soft); cursor: pointer; transition: all .15s;
}
.chip.active { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.dir-count { margin-left: auto; font-size: .85rem; color: var(--ink-faint); }
.dir-list { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px)  { .dir-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .dir-list { grid-template-columns: 1fr 1fr 1fr; } }
.dir-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px;
  color: var(--ink); font-size: .92rem; font-weight: 600;
}
.dir-item:hover { border-color: var(--teal-500); text-decoration: none; }
.dir-item .sr-tag { margin-left: auto; }
.dir-more { text-align: center; margin-top: 18px; }

/* ============================================================
   Calculator v2 pattern — verdict, explainers, live bar
   ============================================================ */
.verdict {
  background: var(--paper); border: 1.5px solid var(--teal-600);
  border-radius: var(--radius); padding: 18px 20px; margin: 18px 0 24px;
  display: flex; gap: 14px; align-items: flex-start;
}
.verdict .v-icon {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--teal-50); color: var(--teal-700);
  display: grid; place-items: center;
}
.verdict .v-icon svg { width: 20px; height: 20px; }
.verdict p { margin: 0; font-size: 1.02rem; color: var(--ink); }
.verdict p b { font-variant-numeric: tabular-nums; }
.verdict small { color: var(--ink-faint); font-size: .82rem; }

.slider-row { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.slider-row input[type=range] { flex: 1; accent-color: var(--teal-600); height: 28px; }
.quick-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.res-line { border-bottom: 1px solid var(--line-soft); }
.res-line:last-child { border-bottom: none; }
.res-line summary {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 2px; font-size: .92rem; cursor: pointer; list-style: none;
}
.res-line summary::-webkit-details-marker { display: none; }
.res-line .rl { color: var(--ink-soft); }
.res-line .why {
  flex: none; width: 17px; height: 17px; border-radius: 50%;
  border: 1.3px solid var(--line); color: var(--ink-faint);
  font-size: .68rem; font-weight: 700; display: grid; place-items: center;
  transition: all .15s;
}
.res-line summary:hover .why { border-color: var(--teal-500); color: var(--teal-700); }
.res-line[open] .why { background: var(--teal-700); border-color: var(--teal-700); color: #fff; }
.res-line .rv { margin-left: auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.res-line .rv.neg { color: var(--red-600); }
.res-line .rv.pos { color: var(--green-600); }
.res-line .explain {
  font-size: .84rem; color: var(--ink-soft); padding: 0 2px 12px 25px;
  border-left: 2px solid var(--teal-50); margin-left: 6px;
}
.res-total { display: flex; align-items: baseline; gap: 8px; padding: 14px 2px 4px; font-weight: 700; }
.res-total .rv { margin-left: auto; font-size: 1.3rem; font-variant-numeric: tabular-nums; }

.bracket-bar { margin-top: 14px; }
.bracket-track {
  display: flex; height: 26px; border-radius: 8px; overflow: hidden;
  position: relative; border: 1px solid var(--line);
}
.bracket-seg { height: 100%; }
.bracket-seg span {
  font-size: .68rem; font-weight: 700; color: #fff;
  display: block; padding: 5px 0 0 6px; white-space: nowrap;
}
.bracket-marker {
  position: absolute; top: -7px; bottom: -7px; width: 3px;
  background: var(--ink); border-radius: 2px;
  transition: left .2s ease;
}
.bracket-marker::after {
  content: "you"; position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  font-size: .68rem; font-weight: 700; color: var(--ink);
}
.bracket-labels { display: flex; justify-content: space-between; font-size: .72rem; color: var(--ink-faint); margin-top: 6px; }
.bracket-note { font-size: .84rem; color: var(--ink-soft); margin-top: 12px; }
.bracket-note b { color: var(--ink); }

.live-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--teal-900); color: #fff;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 24px rgba(15,40,38,.18);
  transform: translateY(110%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.live-bar.show { transform: translateY(0); }
.live-bar .lb-group { line-height: 1.2; }
.live-bar .lb-label { font-size: .68rem; opacity: .75; text-transform: uppercase; letter-spacing: .04em; }
.live-bar .lb-value { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.live-bar .lb-diff { margin-left: auto; text-align: right; }
.live-bar .lb-diff .lb-value { color: #8fe3c0; font-size: .95rem; }
@media (min-width: 920px) { .live-bar { display: none; } }
@media (min-width: 920px) { .sticky-col { position: sticky; top: 86px; } }

.next-steps { margin-top: 34px; }
.next-steps h2 { font-size: 1.3rem; }
.next-grid { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 14px; }
@media (min-width: 720px) { .next-grid { grid-template-columns: 1fr 1fr 1fr; } }
.next-card {
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 16px; color: var(--ink);
  display: block;
}
.next-card:hover { border-color: var(--teal-500); text-decoration: none; }
.next-card .nc-kicker { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--teal-700); }
.next-card b { display: block; margin: 4px 0 4px; font-size: .98rem; }
.next-card small { color: var(--ink-faint); font-size: .84rem; display: block; }

.share-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.share-row .btn { font-size: .88rem; padding: 10px 18px; }
.copied-tip { font-size: .85rem; color: var(--green-600); font-weight: 600; align-self: center; display: none; }

.assumptions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 2px; }
.assumption {
  font-size: .78rem; font-weight: 600; color: var(--ink-soft);
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 5px 12px;
}
.assumption b { color: var(--teal-700); }

/* ============================================================
   Blog — listing + article (SEO content section)
   ============================================================ */
.blog-hero { padding: 52px 0 8px; }
.blog-hero h1 { max-width: 18ch; }
.blog-hero .lede { max-width: 56ch; }

/* Listing grid */
.post-grid { display: grid; gap: 22px; grid-template-columns: 1fr; margin-top: 30px; }
@media (min-width: 640px)  { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .post-grid { grid-template-columns: 1fr 1fr 1fr; } }
.post-card {
  display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s, transform .08s;
  color: var(--ink);
}
.post-card:hover { border-color: var(--teal-500); box-shadow: var(--shadow-md); text-decoration: none; }
.post-card .pc-cover { aspect-ratio: 16/9; background: var(--paper-3); object-fit: cover; width: 100%; display: block; }
.post-card .pc-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card .pc-meta { font-size: .78rem; color: var(--ink-faint); display: flex; gap: 8px; align-items: center; }
.post-card .pc-tag { color: var(--teal-700); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.post-card h2 { font-size: 1.12rem; line-height: 1.25; margin: 0; }
.post-card p { font-size: .9rem; color: var(--ink-soft); margin: 0; }
.post-card .pc-more { margin-top: auto; padding-top: 4px; color: var(--teal-700); font-weight: 600; font-size: .9rem; }

/* Article layout */
.article-wrap { max-width: 760px; margin: 0 auto; }
.article-header { padding: 36px 0 8px; }
.article-header .a-kicker { color: var(--teal-700); font-weight: 700; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; }
.article-header h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); margin: 10px 0 14px; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--ink-faint); font-size: .9rem; align-items: center; }
.article-cover { width: 100%; border-radius: var(--radius-lg); margin: 22px 0 8px; display: block; }

/* Prose typography — the imported article body lives in .prose */
.prose { font-size: 1.06rem; line-height: 1.7; color: var(--ink); }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.6rem; margin: 1.8em 0 .5em; line-height: 1.2; }
.prose h3 { font-size: 1.25rem; margin: 1.6em 0 .4em; }
.prose h4 { font-size: 1.05rem; margin: 1.4em 0 .3em; }
.prose p { margin: 0 0 1.1em; color: var(--ink-soft); }
.prose a { color: var(--teal-700); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.4em; color: var(--ink-soft); }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--teal-600); }
.prose blockquote {
  margin: 1.4em 0; padding: 4px 0 4px 20px;
  border-left: 3px solid var(--teal-500); color: var(--ink-soft); font-style: italic;
}
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1.2em 0; }
.prose code { background: var(--paper-3); padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.prose pre { background: var(--ink); color: #fff; padding: 16px; border-radius: var(--radius); overflow-x: auto; margin: 1.4em 0; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: .95rem; }
.prose th { background: var(--teal-700); color: #fff; text-align: left; padding: 10px 12px; }
.prose td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.prose tr:nth-child(even) td { background: var(--paper-2); }
.prose figure { margin: 1.4em 0; }
.prose figcaption { font-size: .85rem; color: var(--ink-faint); text-align: center; margin-top: 6px; }

/* Article footer CTA + share */
.article-cta {
  margin: 36px 0 0; padding: 24px; border-radius: var(--radius-lg);
  background: var(--teal-900); color: #fff; text-align: center;
}
.article-cta h3 { color: #fff; margin-bottom: 6px; }
.article-cta p { color: rgba(255,255,255,.8); margin-bottom: 16px; }
.article-disclaimer { margin-top: 28px; font-size: .82rem; color: var(--ink-faint); border-top: 1px solid var(--line); padding-top: 16px; }

/* ============================================================
   Premium gate / paywall (js/gate.js)
   ============================================================ */
.ec-locked-area { filter: blur(6px); opacity: .55; pointer-events: none; user-select: none; }
.paywall {
  position: absolute; inset: 0; z-index: 40;
  display: grid; place-items: start center;
  padding: 40px 18px; pointer-events: none;
}
.paywall-card {
  pointer-events: auto;
  max-width: 460px; width: 100%;
  background: var(--paper); border: 1px solid var(--line);
  border-top: 4px solid var(--amber-500);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md);
  padding: 30px 28px; text-align: center;
  position: sticky; top: 90px;
}
.paywall-lock {
  width: 52px; height: 52px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--amber-50); color: var(--amber-600);
  display: grid; place-items: center;
}
.paywall-lock svg { width: 26px; height: 26px; }
.paywall-card h2 { font-size: 1.4rem; margin-bottom: 8px; }
.paywall-card p { color: var(--ink-soft); font-size: .96rem; margin-bottom: 20px; }
.paywall-card .btn { width: 100%; justify-content: center; }
.paywall-foot { margin-top: 16px; font-size: .82rem; color: var(--ink-faint); display: flex; flex-direction: column; gap: 4px; }
.paywall-foot a { font-weight: 600; }
