/* ==========================================================================
   Expats Pension Review — Site Stylesheet
   Modern, accessible, mobile-first. Designed for a 45+ audience:
   generous type, high contrast, large tap targets, adjustable text size.
   ========================================================================== */

/* Fraunces + Inter are loaded via <link> tags in the page <head> (see
   generate_site.py PAGE_HEAD), not @import here -- @import forces the
   browser to fetch this stylesheet, parse it, then discover and fetch the
   Google Fonts stylesheet as a second serial round trip before any text can
   render. Loading them as sibling <link> tags lets the browser fetch both
   in parallel, which is a meaningful First Contentful Paint win. */

:root {
  /* Brand palette — deep navy neutral + vibrant blue accent (Trello-style),
     with a warm orange (blue's complement on the colour wheel) reserved
     for primary calls to action. */
  --navy-950: #0d222c;
  --navy-900: #12303f;
  --navy-800: #17394a;
  --navy-700: #1f4959;
  --blue-700: #045a8d;
  --blue-600: #0079bf;
  --blue-500: #2c9cdb;
  --sky-100: #eaf2fc;
  --sky-200: #d2e4fa;
  --sky-300: #a9cbf5;
  --sand-100: #faf7f1;
  --gold-500: #b8863f;
  --cta-600: #ff6a00;
  --cta-700: #e65e00;

  --ink-900: #16232a;
  --ink-700: #3b4a52;
  --ink-500: #5b6b73;
  --line-200: #dde6e9;
  --line-100: #eef3f5;
  --white: #ffffff;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  /* Base type scale — generous by default for 45+ readability */
  --step-font: 1;
  --fs-base: calc(1.0625rem * var(--step-font));   /* ~17px root nudge, see html below */
  --fs-sm: calc(0.95rem * var(--step-font));
  --fs-md: calc(1.15rem * var(--step-font));
  --fs-lg: calc(1.4rem * var(--step-font));
  --fs-xl: calc(1.9rem * var(--step-font));
  --fs-2xl: calc(2.5rem * var(--step-font));
  --fs-3xl: calc(3.1rem * var(--step-font));

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(13, 34, 44, 0.07);
  --shadow-md: 0 12px 32px rgba(13, 34, 44, 0.12);
  --shadow-lg: 0 24px 60px rgba(13, 34, 44, 0.16);

  --maxw: 1180px;
  --header-h: 88px;
}

/* Text-size control: two steps (normal / large), applied by JS to <html data-text-size> */
html[data-text-size="large"] { --step-font: 1.18; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--ink-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy-950);
  line-height: 1.18;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
  /* Balance line lengths so headings never leave a single word stranded
     on the last line — supported browsers reflow to ~even lines, others
     just ignore the property and wrap normally. */
  text-wrap: balance;
}
h1 { font-size: var(--fs-3xl); font-weight: 600; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); font-family: var(--font-body); font-weight: 700; }

p { margin: 0 0 1.1em; color: var(--ink-700); }
p.lead { font-size: var(--fs-md); color: var(--ink-700); text-wrap: pretty; }
strong { color: var(--ink-900); }
a { color: var(--blue-600); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--navy-800); }
img, svg { max-width: 100%; display: block; }
ul, ol { padding-left: 1.3em; color: var(--ink-700); }
li { margin-bottom: 0.5em; }

/* Focus visibility — never removed, always upgraded */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy-950);
  color: #fff;
  padding: 14px 22px;
  border-radius: 0 0 10px 0;
  z-index: 200;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--fs-sm);
  padding: 0.95em 1.7em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  line-height: 1.2;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease, color 0.12s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--blue-700); color: #fff; box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: var(--navy-900); color: var(--navy-900); }
.btn-outline:hover { background: var(--navy-900); color: #fff; }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.65); color: #fff; }
.btn-outline-light:hover { background: #fff; color: var(--navy-950); }
.btn-block { width: 100%; }
.btn-lg { padding: 1.05em 2.1em; font-size: var(--fs-md); }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--line-200);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}
/* Full logo lockup (EPR monogram + wordmark baked into one image) */
.brand-logo { display: block; height: 40px; width: auto; flex-shrink: 0; }
/* White card behind the logo where it sits on the dark footer, since the
   source image has a plain white background rather than a transparent one */
.brand-logo-chip {
  display: inline-flex;
  align-items: center;
  background: #fff;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-md);
}
.brand-logo-chip .brand-logo { height: 32px; }

/* Primary nav — desktop */
.primary-nav { display: none; }
@media (min-width: 980px) {
  .primary-nav {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .primary-nav li { position: relative; }
  .primary-nav a.nav-link,
  .primary-nav button.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.98rem;
    color: var(--navy-900);
    text-decoration: none;
    padding: 0.7em 0.9em;
    border-radius: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
  }
  .primary-nav a.nav-link:hover,
  .primary-nav button.nav-link:hover,
  .primary-nav .has-dropdown:hover > .nav-link,
  .primary-nav a.nav-link[aria-current="page"],
  .primary-nav button.nav-link[aria-current="page"] {
    background: var(--sky-100);
    color: var(--navy-950);
  }
  .primary-nav .caret { width: 9px; height: 9px; margin-top: -2px; }

  /* No gap between the trigger and the panel (top: 100% flush, plus a
     transparent padding "bridge") — a gap here breaks CSS :hover the moment
     the pointer crosses it, which is what made the menu look unclickable. */
  .dropdown-panel {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    padding-top: 10px;
    min-width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(4px);
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
  }
  .dropdown-panel-card {
    background: #fff;
    border: 1px solid var(--line-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.6rem;
  }
  .has-dropdown:hover .dropdown-panel,
  .has-dropdown:focus-within .dropdown-panel,
  .has-dropdown.is-open .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .dropdown-panel a {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.75em 0.9em;
    border-radius: 10px;
    text-decoration: none;
    color: var(--navy-950);
  }
  .dropdown-panel a:hover { background: var(--sky-100); }
  .dropdown-panel a .dd-title { font-weight: 700; font-size: 0.97rem; }
  .dropdown-panel a .dd-desc { font-weight: 400; font-size: 0.85rem; color: var(--ink-500); }
  .dropdown-panel hr { border: none; border-top: 1px solid var(--line-100); margin: 0.4rem 0.2rem; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* The header keeps the text-size control desktop-only; phones get it inside
   the slide-out menu instead, so the sticky header never has to squeeze
   logo + text-size buttons + hamburger into a narrow viewport. */
.header-actions .text-size-control-desktop { display: none; }
@media (min-width: 980px) {
  .header-actions .text-size-control-desktop { display: inline-flex; }
}

.mobile-text-size {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  background: var(--sky-100);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.1rem;
}
.mobile-text-size-label { font-weight: 700; color: var(--navy-950); font-size: 0.95rem; }

/* Text-size control — compact two-step (normal / large) toggle */
.text-size-control {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line-200);
  border-radius: 999px;
  padding: 2px;
  background: var(--sand-100);
}
.text-size-control button {
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--navy-900);
  padding: 0.3em 0.5em;
  min-width: 32px;
  min-height: 32px;
  line-height: 1;
}
.text-size-control button[aria-pressed="true"] {
  background: var(--navy-900);
  color: #fff;
}
.text-size-control button:first-child { font-size: 0.72rem; }
.text-size-control button:last-child { font-size: 0.95rem; }

.header-cta { display: none; }
@media (min-width: 1180px) { .header-cta { display: inline-flex; } }

/* Mobile menu toggle */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid var(--line-200);
  background: #fff;
  cursor: pointer;
}
@media (min-width: 980px) { .menu-toggle { display: none; } }
.menu-toggle svg { width: 22px; height: 22px; }

/* Mobile nav panel */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(13, 34, 44, 0.5);
}
.mobile-nav.is-open { display: block; }
.mobile-nav-panel {
  position: absolute;
  top: 0; right: 0;
  height: 100%;
  width: min(92vw, 420px);
  background: #fff;
  padding: 1.25rem;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}
.mobile-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.mobile-nav-close {
  width: 46px; height: 46px;
  border-radius: 12px;
  border: 2px solid var(--line-200);
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mobile-nav-close svg { width: 20px; height: 20px; }

.mobile-nav-list { list-style: none; margin: 0; padding: 0; }
.mobile-nav-list a.nav-link,
.mobile-nav-list button.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--navy-950);
  text-decoration: none;
  padding: 0.95em 0.3em;
  border-bottom: 1px solid var(--line-100);
  background: none;
  border-left: none; border-right: none; border-top: none;
  cursor: pointer;
  min-height: 52px;
}
/* Submenu toggles (e.g. "For Expats", "Company") get a tinted row and a
   circular chevron badge so they read clearly as expandable, not as a
   plain link like "Home". */
.mobile-nav-list button.nav-link[data-submenu-toggle] {
  background: var(--sky-100);
  padding-left: 0.7em;
  padding-right: 0.6em;
  border-radius: 12px;
  border-bottom: none;
  margin-bottom: 0.6rem;
}
.mobile-expand-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line-200);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}
.mobile-expand-icon svg { width: 12px; height: 12px; flex-shrink: 0; }
.mobile-expand-icon.is-rot { transform: rotate(180deg); }
.mobile-submenu { list-style: none; margin: 0 0 0.6rem; padding: 0.2em 0 0.6em 0.8em; display: none; }
.mobile-submenu.is-open { display: block; }
.mobile-submenu a {
  display: block;
  padding: 0.8em 0.4em;
  color: var(--navy-800);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed var(--line-100);
}
.mobile-submenu .dd-desc { display: block; font-weight: 400; font-size: 0.85rem; color: var(--ink-500); margin-top: 2px; }
.mobile-nav-cta { margin-top: 1.25rem; display: grid; gap: 0.6rem; }

/* ---------------- Hero ---------------- */
/* Wider and shorter than a standard section so the whole hero — headline,
   lead, actions and trust strip — comfortably fits above the fold; content
   is centred within a wide inner column rather than left-aligned. */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(180deg, rgba(13,34,44,0.82), rgba(13,34,44,0.78)), var(--navy-950);
  background-size: cover;
  background-position: center;
  padding: clamp(2rem, 5vw, 3.4rem) 0 clamp(2.2rem, 5vw, 3.6rem);
}
.hero .container { max-width: 1320px; }
.hero-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sky-300);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 0.5em 1em;
  border-radius: 999px;
  margin-bottom: 1.2rem;
}
.hero h1 { color: #fff; max-width: 38ch; margin-left: auto; margin-right: auto; }
.hero p.lead { color: rgba(255,255,255,0.86); max-width: 60ch; margin-left: auto; margin-right: auto; font-size: var(--fs-md); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem; margin-top: 1.5rem; }
.hero-trust {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(255,255,255,0.18);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem 2.2rem;
  color: rgba(255,255,255,0.82);
  font-size: 0.92rem;
  font-weight: 600;
}
.hero-trust .item { display: flex; align-items: center; gap: 0.55em; }
.hero-trust svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--sky-300); }

/* ---------------- Sections ---------------- */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
/* Adjacent sections each carry their own top+bottom padding, which stacks
   into a much bigger gap than intended wherever one section follows
   another directly (up to ~11rem combined). Trim it to a single, more
   modest gap instead of doubling up — but keep some breathing room rather
   than collapsing it to zero, especially where the background changes
   (e.g. into a dark CTA band), so headings don't sit flush at the seam. */
section + section { padding-top: clamp(2rem, 4vw, 3.25rem); }
.section-alt { background: var(--sky-100); }
.section-dark { background: var(--navy-950); color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: rgba(255,255,255,0.82); }
.section-sand { background: var(--sand-100); }

.section-head { max-width: 68ch; margin-bottom: 2rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 0.7em;
}

/* Grids & cards */
.grid { display: grid; gap: 1.3rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  padding: 1.9rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
}
.card-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--sky-100);
  color: var(--blue-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }
.card h3 { margin-bottom: 0.5em; }
a.card-link { font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 0.4em; margin-top: 0.4rem; white-space: nowrap; }

.service-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-200);
  border-top: 4px solid var(--blue-600);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.service-card .thumb {
  height: 170px;
  background-size: cover;
  background-position: center;
}
.service-card .body { padding: 1.3rem 1.4rem 1.4rem; flex: 1; display: flex; flex-direction: column; }
.service-card .body h3 { margin-bottom: 0.35em; }
.service-card .body p { margin-bottom: 0.6em; }
.service-card .card-link { margin-top: 0.2rem; color: var(--blue-600); }

.step-list { display: grid; gap: 1.1rem; counter-reset: step; margin-top: 1.8rem; }
.step {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  padding: 1.4rem 1.5rem;
}
.step-num {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--navy-950);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}
.step h4 { margin-bottom: 0.3em; }
.step p { margin: 0; }

/* Testimonials */
.testimonial-card {
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  height: 100%;
  display: flex;
  flex-direction: column;
}
.testimonial-card .quote-mark { font-family: var(--font-display); font-size: 2.6rem; color: var(--blue-600); line-height: 1; margin-bottom: 0.2rem; }
.testimonial-card p.quote { color: var(--ink-900); font-size: var(--fs-md); flex: 1; }
.testimonial-card .attribution { font-weight: 700; color: var(--navy-950); }
.testimonial-card .location { font-size: 0.88rem; color: var(--ink-500); }

/* A testimonial card standing alone next to a text column (not in an
   equal-height row of cards) shouldn't stretch to match the column's
   height -- that leaves a large empty gap between the quote and the name. */
.testimonial-card.is-compact { height: auto; }
.testimonial-card.is-compact p.quote { flex: none; margin-bottom: 1.2rem; }

/* Definition cards (SIPP/QROPS/QNUPS) */
.def-card { border-top: 5px solid var(--blue-600); }
.def-card .tag {
  display: inline-block;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--blue-600);
  background: var(--sky-100);
  padding: 0.3em 0.8em;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

/* Disclaimer / notice box — used at the top of the province tax guides */
.disclaimer-box {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  background: var(--sky-100);
  border: 1px solid var(--sky-300);
  border-left: 4px solid var(--blue-600);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  margin-bottom: 2.2rem;
  font-size: 0.95rem;
  color: var(--ink-700);
}
.disclaimer-box svg { width: 22px; height: 22px; flex-shrink: 0; color: var(--blue-600); margin-top: 0.15em; }
.disclaimer-box strong { color: var(--navy-950); }
.disclaimer-box a { color: var(--blue-700); font-weight: 600; }

/* Full disclaimer footnote — a single quiet line at the bottom of the
   province tax guides, linked to from the short disclaimer-box snippet
   near the top. Toggles open in place, like a footnote reference rather
   than a boxed callout, so it isn't always taking up space on the page. */
.disclaimer-footnote {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-200);
  scroll-margin-top: 1.5rem;
}
.disclaimer-footnote .accordion-trigger {
  display: inline-flex;
  width: auto;
  min-height: 0;
  padding: 0.2rem 0;
  gap: 0.4rem;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink-500);
}
.disclaimer-footnote .accordion-trigger .plus { width: 16px; height: 16px; font-size: 0.75rem; border-color: var(--ink-500); }
.disclaimer-footnote .accordion-trigger[aria-expanded="true"] .plus { background: var(--ink-500); }
.disclaimer-footnote .accordion-trigger:hover { color: var(--blue-700); }
.disclaimer-footnote .accordion-trigger:hover .plus { border-color: var(--blue-700); }
.disclaimer-footnote .accordion-panel { padding: 0.8rem 0 0; }
.disclaimer-footnote .accordion-panel p { font-size: 0.85rem; color: var(--ink-500); margin: 0 0 0.8rem; }
.disclaimer-footnote .accordion-panel p:last-child { margin-bottom: 0; }
.disclaimer-footnote .accordion-panel strong { color: var(--ink-700); }

/* FAQ / accordion */
.accordion-item { border-bottom: 1px solid var(--line-200); }
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1.3rem 0.2rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--navy-950);
  min-height: 48px;
}
.accordion-trigger .plus { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--navy-900); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: transform 0.15s ease; }
.accordion-trigger[aria-expanded="true"] .plus { transform: rotate(45deg); background: var(--navy-900); color: #fff; }
.accordion-panel { display: none; padding: 0 0.2rem 1.4rem; }
.accordion-panel.is-open { display: block; }

/* Regulation jurisdiction table-cards */
.reg-card { border-left: 5px solid var(--navy-900); }
.reg-card dl { margin: 0.6rem 0 0; }
.reg-card dt { font-weight: 700; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); margin-top: 0.8rem; }
.reg-card dd { margin: 0.15rem 0 0; color: var(--ink-900); }

/* Forms */
.form-field { margin-bottom: 1.2rem; }
.form-field label { display: block; font-weight: 700; margin-bottom: 0.45rem; color: var(--navy-950); }
.form-field .req { color: var(--blue-600); }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  padding: 0.85em 1em;
  border: 2px solid var(--line-200);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink-900);
  min-height: 52px;
}
.form-field textarea { min-height: 150px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { border-color: var(--blue-600); outline: none; box-shadow: 0 0 0 4px rgba(0,121,191,0.18); }
.checkbox-field { display: flex; align-items: flex-start; gap: 0.7em; margin-bottom: 1.4rem; }
.checkbox-field input { width: 22px; height: 22px; margin-top: 2px; flex-shrink: 0; }

/* Contact info cards */
.contact-info-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin: 2rem 0; }
.contact-info-card { background: #fff; border: 1px solid var(--line-200); border-radius: var(--radius-md); padding: 1.4rem; display: flex; gap: 1rem; align-items: flex-start; }
.contact-info-card .ci-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--sky-100); color: var(--blue-600); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-info-card .ci-icon svg { width: 22px; height: 22px; }
.contact-info-card > div { min-width: 0; }
.contact-info-card h4 { margin-bottom: 0.25em; }
.contact-info-card p, .contact-info-card a { margin: 0; overflow-wrap: anywhere; word-break: break-word; }

/* Province lookup */
.lookup-panel {
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-lg);
  padding: clamp(1.4rem, 4vw, 2.4rem);
  box-shadow: var(--shadow-md);
}
.lookup-search { position: relative; }
.lookup-search label { display: block; font-weight: 700; margin-bottom: 0.5rem; }
.lookup-search-input-wrap { display: flex; gap: 0.7rem; align-items: stretch; flex-wrap: wrap; }
.lookup-search input[type="search"] {
  flex: 1 1 200px;
  min-width: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  padding: 0.9em 1.1em;
  border: 2px solid var(--line-200);
  border-radius: var(--radius-sm);
  min-height: 56px;
}
.lookup-search input[type="search"]:focus { border-color: var(--blue-600); outline: none; box-shadow: 0 0 0 4px rgba(0,121,191,0.18); }
.lookup-search .btn { min-height: 56px; flex-shrink: 0; }

@media (max-width: 480px) {
  /* Stack the search field above the button on narrow phones. The base
     rule sets the input to `flex: 1 1 200px` for the desktop ROW layout,
     where flex-grow only fills leftover horizontal space; in a COLUMN
     flex container that same flex-grow instead stretches the input's
     HEIGHT to fill the panel, ballooning it to several times a normal
     input's height. Give the stacked mobile layout its own sizing so the
     field stays a normal single-line height. */
  .lookup-search-input-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .lookup-search-input-wrap input[type="search"] {
    flex: none;
    width: 100%;
    min-height: 52px;
  }
  .lookup-search-input-wrap .btn {
    flex: none;
    width: 100%;
  }
}

.lookup-listbox {
  position: absolute;
  top: calc(100% + 8px);
  left: 0; right: 0;
  background: #fff;
  border: 1px solid var(--line-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  z-index: 20;
  display: none;
  padding: 0.4rem;
}
.lookup-listbox.is-open { display: block; }
.lookup-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85em 0.9em;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  color: var(--navy-950);
}
.lookup-option .region { font-weight: 400; font-size: 0.85rem; color: var(--ink-500); }
.lookup-option:hover,
.lookup-option.is-active { background: var(--sky-100); }
.lookup-empty { padding: 1rem; color: var(--ink-500); }

.lookup-browse { margin-top: 2.2rem; }
.region-group { margin-bottom: 1.6rem; }
.region-group h4 { color: var(--navy-900); border-bottom: 2px solid var(--line-100); padding-bottom: 0.5rem; margin-bottom: 0.8rem; }
.province-chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.province-chip {
  border: 2px solid var(--line-200);
  background: #fff;
  border-radius: 999px;
  padding: 0.55em 1.1em;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  color: var(--navy-900);
  min-height: 44px;
}
.province-chip:hover { border-color: var(--blue-600); color: var(--blue-600); }

.lookup-result {
  margin-top: 2rem;
  background: var(--sky-100);
  border: 1px solid var(--sky-300);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  display: none;
}
.lookup-result.is-open { display: block; animation: fadeIn 0.25s ease; }
.lookup-result .result-eyebrow { font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: var(--blue-600); }
.lookup-result h3 { margin-top: 0.4rem; }
.lookup-result .result-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.2rem; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.mini-lookup { max-width: 620px; }

/* Breadcrumb */
.breadcrumb { font-size: 0.88rem; color: var(--ink-500); margin-bottom: 1rem; }
.breadcrumb a { color: var(--ink-500); text-decoration: none; }
.breadcrumb a:hover { color: var(--blue-600); }

/* Page header banner (non-hero pages) */
.page-banner {
  background: var(--navy-950);
  color: #fff;
  padding: clamp(2.6rem, 6vw, 4rem) 0;
}
.page-banner h1 { color: #fff; margin-bottom: 0.4rem; }
.page-banner p { color: rgba(255,255,255,0.82); max-width: 62ch; margin-bottom: 0; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, var(--navy-950), var(--navy-800));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2.2rem, 6vw, 3.4rem);
  text-align: center;
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.85); max-width: 60ch; margin-left: auto; margin-right: auto; }
.cta-band .hero-actions { justify-content: center; }

/* Footer */
.site-footer { background: var(--navy-950); color: rgba(255,255,255,0.78); }
.footer-top { padding: clamp(2.8rem, 6vw, 4rem) 0 2.4rem; display: grid; gap: 2.4rem; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-top { grid-template-columns: 1fr; } }
.footer-brand p { color: rgba(255,255,255,0.68); margin-top: 1rem; max-width: 32ch; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 1rem; }
.footer-links { list-style: none; margin: 0; padding: 0; color: rgba(255,255,255,0.75); }
.footer-links li { margin-bottom: 0.7rem; }
.footer-links a { color: rgba(255,255,255,0.75); text-decoration: none; font-weight: 500; }
.footer-links a:hover { color: #fff; }
.footer-social { display: flex; gap: 0.7rem; margin-top: 1rem; }
.footer-social a {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.3);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff;
}
.footer-social a:hover { background: var(--blue-600); border-color: var(--blue-600); }
.footer-social svg { width: 19px; height: 19px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.14);
  padding: 1.4rem 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1.6rem;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
}
.footer-bottom a { color: rgba(255,255,255,0.6); }
.footer-reg-note { font-size: 0.82rem; color: rgba(255,255,255,0.55); border-top: 1px solid rgba(255,255,255,0.1); margin-top: 1.6rem; padding-top: 1.4rem; max-width: 90ch; }

/* Utility */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.badge-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.4rem; }
.badge {
  display: inline-flex; align-items: center; gap: 0.4em;
  background: var(--sky-100); color: var(--navy-900);
  border-radius: 999px; padding: 0.5em 1em;
  font-size: 0.85rem; font-weight: 700;
}
