:root {
  /* Brand Identity Palette */
  --brand-forest-green: #14532D;
  --brand-forest-green-hover: #0F3D22;
  --brand-forest-green-subtle: #F5F6F3;
  --brand-forest-green-border: #C8F135;
  --brand-charcoal: #171A18;
  --brand-light-gray: #F5F6F3;
  --white: #ffffff;

  /* Theme Contrast Aliases */
  --black: #171A18;
  --text: #1F2937;
  --text-body: #374151;
  --muted: #6B7280;
  --meta: #6B7280;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  --soft: #F5F6F3;
  --max: 1180px;
  --article-max: 820px;
  --radius: 6px;

  /* Consistent Site-Wide Typography Scale */
  --font-base: 18px;
  --font-base-mobile: 16.5px;
  --line-height-base: 1.65;
  --line-height-article: 1.72;
  --line-height-heading: 1.25;

  --font-h1: clamp(34px, 4.4vw, 46px);
  --font-h1-page: clamp(30px, 3.8vw, 40px);
  --font-h2: clamp(24px, 2.5vw, 29px);
  --font-h3: clamp(20px, 2vw, 22.5px);
  --font-h4: 18px;
  --font-h5: 16px;
  --font-h6: 14px;
  --font-small: 14px;
  --font-caption: 12.5px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  font-size: var(--font-base);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Explicit Heading Hierarchy */
h1, h2, h3, h4, h5, h6 {
  color: var(--brand-charcoal);
  font-weight: 700;
  line-height: var(--line-height-heading);
  letter-spacing: -0.02em;
}

h1 { font-size: var(--font-h1); letter-spacing: -0.03em; }
h2 { font-size: var(--font-h2); letter-spacing: -0.02em; }
h3 { font-size: var(--font-h3); letter-spacing: -0.015em; }
h4 { font-size: var(--font-h4); }
h5 { font-size: var(--font-h5); }
h6 { font-size: var(--font-h6); }

/* Tabular Numerals for Financial Data & Comparisons */
.tabular,
.offer-value,
.offer-deal,
.compare-table td,
.stat-val,
.telemetry-val,
.incentive-number,
.calc-verdict-amount {
  font-variant-numeric: tabular-nums;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--brand-forest-green);
  outline-offset: 2px;
}

button, select, input {
  font: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: min(var(--max), calc(100% - 48px));
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
header {
  border-bottom: 1px solid var(--border);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--black);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  padding: 6px 0;
  line-height: 1;
}

/* ==========================================================================
   Brand Lockup System (Header & Footer)
   ========================================================================== */
.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

.brand-lockup .brand-logo {
  width: 224px;
  max-width: calc(100vw - 160px);
  max-height: 36px;
  height: auto;
  display: block;
  flex-shrink: 1;
  object-fit: contain;
}

.logo.brand-lockup {
  padding: 4px 0;
}

.logo.brand-lockup:hover,
.brand-lockup:hover {
  opacity: 0.92;
}

@media (max-width: 640px) {
  .brand-lockup .brand-logo {
    width: 190px;
    max-width: calc(100vw - 150px);
    max-height: 32px;
  }
}

@media (max-width: 360px) {
  .brand-lockup .brand-logo {
    width: 160px;
    max-width: calc(100vw - 140px);
    max-height: 26px;
  }
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
}

.navlinks a {
  color: var(--muted);
  font-weight: 500;
  padding: 6px 2px;
  transition: color 0.15s ease;
}

.navlinks a:hover {
  color: var(--brand-forest-green);
}

.country-select {
  border: 1px solid var(--border);
  background: var(--white);
  color: var(--text);
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  min-height: 38px;
  transition: border-color 0.15s ease;
}

.country-select:hover,
.country-select:focus {
  border-color: var(--brand-forest-green);
  outline: none;
}

.menu-btn {
  display: none;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  color: var(--black);
  line-height: 0;
  align-items: center;
  justify-content: center;
}

.menu-btn:hover {
  background: var(--soft);
}

.menu-btn svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   Hero Section (Homepage)
   ========================================================================== */
.hero {
  padding: 76px 0 64px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  background: var(--white);
}

.hero h1 {
  font-size: var(--font-h1);
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--brand-charcoal);
  font-weight: 700;
  max-width: 840px;
  margin: 0 auto;
}

.hero p,
.hero-sub {
  max-width: 680px;
  margin: 20px auto 0;
  color: var(--muted);
  font-size: 18.5px;
  line-height: 1.6;
}

.finder {
  width: min(520px, 100%);
  margin: 32px auto 0;
  display: flex;
  gap: 10px;
}

.finder select {
  flex: 1;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.finder select:hover,
.finder select:focus {
  border-color: var(--brand-forest-green);
  outline: none;
}

.finder select:focus {
  box-shadow: 0 0 0 2px var(--brand-forest-green-subtle);
}

.button,
.finder button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid var(--brand-forest-green);
  border-radius: var(--radius);
  background: var(--brand-forest-green);
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.button:hover,
.finder button:hover {
  background: var(--brand-forest-green-hover);
  border-color: var(--brand-forest-green-hover);
}

.button.secondary {
  background: var(--white);
  color: var(--brand-charcoal);
  border-color: var(--border);
}

.button.secondary:hover {
  border-color: var(--brand-forest-green);
  color: var(--brand-forest-green);
  background: var(--brand-forest-green-subtle);
}

.hero-note {
  margin-top: 20px;
  font-size: 14px;
  color: var(--meta);
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

.noscript-countries {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.noscript-countries a {
  color: var(--black);
  text-decoration: underline;
  margin: 0 4px;
}

/* ==========================================================================
   Main Content & Section Layouts
   ========================================================================== */
main {
  padding: 56px 0;
}

.section {
  margin-bottom: 56px;
}

.section:last-child {
  margin-bottom: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.section-head h2 {
  font-size: var(--font-h2);
  letter-spacing: -0.015em;
  color: var(--black);
  font-weight: 700;
}

.section-head a {
  font-size: 14.5px;
  color: var(--brand-forest-green);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: color 0.15s ease;
}

.section-head a:hover {
  text-decoration: underline;
  color: var(--brand-forest-green-hover);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hub-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hub-search-input {
  width: 100%;
  max-width: 360px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  font-size: 14.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.hub-search-input:focus {
  outline: none;
  border-color: var(--brand-forest-green);
  box-shadow: 0 0 0 2px var(--brand-forest-green-subtle);
}

.hub-filter-count {
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
}

/* ==========================================================================
   Offers List (Automotive Listings View)
   ========================================================================== */
.offers {
  border-top: 1px solid var(--border);
}

.offer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 28px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.offer-primary {
  min-width: 0;
}

.offer-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
}

.offer-meta {
  font-size: 14px;
  color: var(--muted);
  margin-top: 4px;
}

.offer-deal {
  text-align: right;
  min-width: 120px;
}

.offer-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.01em;
}

.offer-type {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.offer-cta {
  display: flex;
  align-items: center;
}

.offer-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  min-height: 42px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-charcoal);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.offer-action:hover {
  border-color: var(--brand-forest-green);
  color: var(--brand-forest-green);
  background: var(--brand-forest-green-subtle);
}

.notice {
  margin-top: 20px;
  padding: 14px 18px;
  background: var(--brand-light-gray);
  font-size: 14.5px;
  color: var(--muted);
  border-radius: var(--radius);
  border-left: 3px solid var(--brand-forest-green);
  line-height: 1.55;
}

/* ==========================================================================
   Empty States
   ========================================================================== */
.empty {
  padding: 40px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--black);
  margin-bottom: 6px;
}

.empty-sub {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.search-note {
  font-size: 14px;
  color: var(--muted);
  margin-top: 12px;
}

/* ==========================================================================
   Enhanced Offer Cards (Finder Directory)
   ========================================================================== */
.offer.offer-enhanced {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.offer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.offer-header .offer-primary {
  min-width: 0;
  flex: 1;
}

.offer-header .offer-name {
  font-size: 18.5px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
}

.offer-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.offer-tag {
  display: inline-block;
  padding: 3px 8px;
  background: var(--brand-light-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.offer-header .offer-deal {
  text-align: right;
  flex-shrink: 0;
}

.offer-header .offer-value {
  font-size: 21px;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.01em;
}

.offer-header .offer-type {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.offer-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.offer-eligibility {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}

.offer-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--meta);
}

.offer-date-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.offer-label {
  font-weight: 600;
  color: var(--text);
}

.offer-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.offer-compare-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}

.offer-compare-input {
  width: 17px;
  height: 17px;
  accent-color: var(--brand-forest-green);
  cursor: pointer;
}

/* ==========================================================================
   Finder Toolbar (Search, Filter, Sort, Status)
   ========================================================================== */
.finder-toolbar {
  border: 1px solid var(--border);
  background: var(--brand-light-gray);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 28px;
}

.finder-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 14px;
  align-items: flex-end;
}

.finder-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.finder-label {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--meta);
}

.search-input-box {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.finder-input,
.finder-select {
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.finder-input:focus,
.finder-select:focus {
  border-color: var(--brand-forest-green);
  outline: none;
  box-shadow: 0 0 0 2px var(--brand-forest-green-subtle);
}

.finder-input {
  padding-right: 36px;
}

.finder-clear-btn {
  position: absolute;
  right: 6px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
}

.finder-clear-btn:hover {
  color: var(--black);
  background: var(--border-light);
}

.finder-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.finder-count {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--black);
}

.finder-reset-btn {
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-forest-green);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  padding: 4px 6px;
}

.finder-reset-btn:hover {
  color: var(--brand-forest-green-hover);
}

.finder-notice {
  margin-top: 12px;
  padding: 10px 14px;
  background: #fff8e6;
  border: 1px solid #ffd591;
  border-radius: var(--radius);
  font-size: 14px;
  color: #873800;
  line-height: 1.45;
}

/* ==========================================================================
   Comparison Dock & Modal
   ========================================================================== */
.compare-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 2px solid var(--brand-forest-green);
  box-shadow: 0 -4px 16px rgba(17, 24, 39, 0.08);
  z-index: 900;
  padding: 14px 0;
}

.compare-dock-inner {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.compare-dock-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.compare-dock-badge {
  background: var(--brand-forest-green);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  white-space: nowrap;
}

.compare-dock-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compare-dock-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.compare-dock-actions .button {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}

.compare-dock-actions .button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.compare-dock[hidden] {
  display: none !important;
}

.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

.modal-backdrop.is-open {
  display: flex;
}

.modal-backdrop[hidden],
.modal-backdrop.is-open[hidden] {
  display: none !important;
}

.modal-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: min(1040px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.16);
}

.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-title {
  font-size: 21px;
  font-weight: 700;
  color: var(--black);
}

.modal-sub {
  font-size: 14.5px;
  color: var(--muted);
  margin-top: 4px;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius);
}

.modal-close-btn:hover {
  color: var(--black);
  background: var(--soft);
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.compare-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.5;
}

.compare-table th,
.compare-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-row-header {
  font-weight: 700;
  color: var(--black);
  background: var(--brand-light-gray);
  white-space: nowrap;
  width: 150px;
}

.compare-col-header {
  background: var(--brand-light-gray);
}

.compare-col-vehicle {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--black);
}

.compare-col-remove {
  margin-top: 8px;
}

.compare-remove-btn {
  font-size: 13px;
  color: #b00020;
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: underline;
}

.compare-remove-btn:hover {
  color: #790014;
}

/* ==========================================================================
   Country Navigation Grid
   ========================================================================== */
.countries {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}

.country {
  padding: 18px 24px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 16px;
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  transition: background 0.15s;
}

.country:hover {
  background: var(--brand-light-gray);
  color: var(--brand-forest-green);
}

.country::after {
  content: "→";
  color: var(--muted);
  font-size: 15px;
  font-weight: 400;
  transition: transform 0.15s, color 0.15s;
}

.country:hover::after {
  color: var(--brand-forest-green);
  transform: translateX(4px);
}

/* ==========================================================================
   How It Works (Homepage Steps)
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.step-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-forest-green);
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.step h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--brand-charcoal);
  margin-bottom: 8px;
}

.step p {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.6;
}

/* ==========================================================================
   Guides List
   ========================================================================== */
.guides {
  border-top: 1px solid var(--border);
}

.guide-item {
  display: block;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.guide-item:hover {
  background: var(--brand-light-gray);
}

.guide-item h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--brand-charcoal);
  margin-bottom: 6px;
}

.guide-item p {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.55;
}

.guide-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--brand-forest-green);
  margin-top: 8px;
  transition: color 0.15s ease;
}

.guide-link:hover {
  color: var(--brand-forest-green-hover);
  text-decoration: underline;
}

/* ==========================================================================
   Blog Grid (Guide Index)
   ========================================================================== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 28px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}

.blog-card {
  padding: 0 0 20px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}

.blog-card h3 {
  font-size: 18px;
  line-height: 1.35;
  color: var(--brand-charcoal);
  margin-bottom: 8px;
  font-weight: 700;
  transition: color 0.15s ease;
}

.blog-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.58;
  margin: 0;
}

.blog-card:hover h3 {
  color: var(--brand-forest-green);
  text-decoration: underline;
}

/* ==========================================================================
   Page Hero (Subpages)
   ========================================================================== */
.page-hero {
  padding: 48px 0 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.page-hero h1 {
  font-size: var(--font-h1-page);
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--brand-charcoal);
  font-weight: 700;
}

.page-hero p {
  color: var(--muted);
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.6;
  max-width: 820px;
}

.breadcrumb {
  font-size: 14px;
  color: var(--meta);
  margin-bottom: 16px;
}

.breadcrumb a {
  text-decoration: underline;
  transition: color 0.15s ease;
}

.breadcrumb a:hover {
  color: var(--brand-forest-green);
}

.meta {
  font-size: 14px;
  color: var(--meta);
  margin-top: 10px;
}

/* ==========================================================================
   Content Pages (Articles / Legal / Informational)
   ========================================================================== */

/* Standalone Document & Article Layouts (Articles, Legal, About) */
.container:has(> article.content) .page-hero,
.container:has(> .section.content:only-of-type) .page-hero {
  max-width: var(--article-max, 820px);
  margin-left: auto;
  margin-right: auto;
}

article.content,
.container > article.content,
.container:has(> .section.content:only-of-type) .section.content {
  max-width: var(--article-max, 820px);
  margin-left: auto;
  margin-right: auto;
}

.content {
  max-width: var(--article-max, 820px);
  margin-left: auto;
  margin-right: auto;
}

/* Informational sections on multi-section pages (Country hubs & Homepage) */
.section:not(:only-of-type).content {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.section:not(:only-of-type).content h2 {
  font-size: var(--font-h2);
  margin-top: 44px;
  margin-bottom: 16px;
  color: var(--brand-charcoal);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

.section:not(:only-of-type).content h2:first-child {
  margin-top: 0;
}

.section:not(:only-of-type).content p {
  max-width: 860px;
}

.section:not(:only-of-type).content ul,
.section:not(:only-of-type).content ol {
  max-width: 860px;
}

.content h2 {
  font-size: var(--font-h2);
  letter-spacing: -0.015em;
  margin: 44px 0 16px;
  color: var(--brand-charcoal);
  font-weight: 700;
  line-height: 1.28;
}

.content h2:first-child {
  margin-top: 0;
}

.content h3 {
  font-size: var(--font-h3);
  letter-spacing: -0.01em;
  margin: 30px 0 12px;
  color: var(--brand-charcoal);
  font-weight: 700;
  line-height: 1.35;
}

.content p {
  color: var(--text-body);
  margin-bottom: 18px;
  font-size: var(--font-base);
  line-height: var(--line-height-article);
}

.content li {
  color: var(--text-body);
  margin-bottom: 10px;
  font-size: var(--font-base);
  line-height: var(--line-height-article);
}

.content ul,
.content ol {
  padding-left: 24px;
  margin-bottom: 22px;
}

.content a {
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--brand-forest-green);
  font-weight: 500;
  transition: color 0.15s ease;
}

.content a:hover {
  color: var(--brand-forest-green-hover);
  text-decoration-thickness: 2px;
}

.direct-answer {
  background: var(--brand-light-gray);
  border-left: 4px solid var(--brand-forest-green);
  padding: 22px 26px;
  margin: 28px 0 36px;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.direct-answer p {
  margin: 0;
  color: var(--brand-charcoal);
  font-size: 18px;
  line-height: 1.68;
}

.direct-answer p + p {
  margin-top: 14px;
}

.author-box {
  margin-top: 48px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.author-box strong {
  display: block;
  font-size: 16px;
  color: var(--brand-charcoal);
  margin-bottom: 6px;
}

.author-box p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.author-box p + p {
  margin-top: 10px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 28px 0 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
}

.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  line-height: 1.55;
}

.content th,
.content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.content th {
  font-weight: 700;
  color: var(--brand-charcoal);
  background: var(--brand-light-gray);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}

.content td {
  color: var(--text-body);
  font-variant-numeric: tabular-nums;
}

.content tr:hover td {
  background: rgba(244, 246, 248, 0.6);
}

/* ==========================================================================
   About Section on Homepage
   ========================================================================== */
.about {
  max-width: 100%;
}

.about h2 {
  font-size: var(--font-h2);
  letter-spacing: -0.015em;
  margin-bottom: 16px;
  color: var(--brand-charcoal);
  font-weight: 700;
}

.about p {
  color: var(--muted);
  margin-bottom: 14px;
  font-size: 17.5px;
  line-height: var(--line-height-base);
}

@media (min-width: 800px) {
  .about {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 48px;
  }
  .about h2 {
    grid-column: 1 / -1;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  background: var(--white);
}

.footer-inner {
  padding: 48px 0;
  display: flex;
  justify-content: space-between;
  gap: 40px;
}

.footer-brand {
  max-width: 380px;
}

.footer-brand .footer-brand-lockup {
  margin-bottom: 12px;
}

.footer-brand .footer-brand-lockup .brand-logo {
  width: 224px;
  max-height: 36px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 8px;
  color: var(--black);
  font-size: 17px;
  letter-spacing: -0.01em;
}

.footer-brand p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 24px;
  max-width: 580px;
}

.footer-links a {
  font-size: 14px;
  color: var(--muted);
  padding: 4px 0;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--brand-forest-green);
  text-decoration: underline;
}

.copyright {
  border-top: 1px solid var(--border-light);
  padding: 20px 0;
  font-size: 14px;
  color: var(--meta);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: var(--font-base-mobile);
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 700px) {
  .container {
    width: min(100% - 32px, var(--max));
  }

  .nav {
    min-height: 56px;
  }

  header {
    position: relative;
  }

  .navlinks {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex-direction: column;
    align-items: stretch;
    padding: 8px 16px 16px;
    gap: 0;
    z-index: 99;
  }

  .navlinks.open {
    display: flex;
  }

  .navlinks a {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
    padding: 0 4px;
  }

  .navlinks a:last-of-type {
    border-bottom: none;
  }

  .navlinks .country-select {
    margin-top: 10px;
    min-height: 44px;
    width: 100%;
    font-size: 15px;
    padding: 0 10px;
  }

  .menu-btn {
    display: inline-flex;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero p,
  .hero-sub {
    font-size: 16px;
  }

  .finder {
    flex-direction: column;
    width: 100%;
  }

  .finder select,
  .finder button {
    width: 100%;
    min-height: 48px;
  }

  main {
    padding: 40px 0;
  }

  .section {
    margin-bottom: 40px;
  }

  .section-head h2,
  .about h2 {
    font-size: 21px;
  }

  .finder-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .finder-input,
  .finder-select {
    min-height: 46px;
  }

  .offer.offer-enhanced {
    padding: 18px 0;
    gap: 12px;
  }

  .offer-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .offer-header .offer-deal {
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  .offer-dates {
    gap: 12px;
  }

  .offer-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 10px;
  }

  .compare-dock-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .compare-dock-actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    width: 100%;
  }

  .modal-backdrop {
    padding: 10px;
  }

  .modal-box {
    max-height: 94vh;
  }

  .modal-head {
    padding: 14px 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .offer {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px 0;
  }

  .offer-deal {
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 8px;
  }

  .offer-action {
    width: 100%;
    min-height: 44px;
    font-size: 14px;
  }

  .countries {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-inner {
    flex-direction: column;
    padding: 36px 0;
    gap: 28px;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 440px) {
  .container {
    width: min(100% - 24px, var(--max));
  }

  .hero h1 {
    font-size: 28px;
  }

  .countries {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Canada Verified Offer Detail Specs & Badges
   ========================================================================== */
.offer-specs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  padding-top: 4px;
}

.offer-spec-item {
  display: block;
}

.offer-tag-province {
  background: var(--brand-forest-green-subtle);
  border-color: var(--brand-forest-green);
  color: var(--brand-forest-green);
}

.offer-trim-inline {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}

.offer-source-note {
  display: inline-flex;
  align-items: center;
}

.offer-badge-note {
  font-size: 12px;
  font-weight: 600;
  color: var(--meta);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   Canada Cash vs. Finance Comparison Module
   ========================================================================== */
.ca-compare-module {
  margin: 44px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 32px 28px;
}

.ca-compare-kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-forest-green);
  margin-bottom: 6px;
}

.ca-compare-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
  letter-spacing: -0.015em;
}

.ca-compare-lead {
  font-size: 15.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

.ca-compare-status-box {
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-forest-green);
  background: var(--brand-light-gray);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin-bottom: 30px;
}

.status-badge-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.status-indicator-badge {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.status-date-badge {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--meta);
}

.status-title {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 8px;
}

.status-desc {
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 12px;
}

.status-reasons-list {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  padding-left: 20px;
  margin-bottom: 14px;
}

.status-reasons-list li {
  margin-bottom: 8px;
}

.status-editorial-callout {
  font-size: 13.5px;
  color: var(--brand-charcoal);
  background: var(--white);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius);
  line-height: 1.5;
  margin-bottom: 14px;
}

.status-source-links {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 13.5px;
  color: var(--meta);
}

.status-source-links a {
  font-weight: 600;
  color: var(--brand-forest-green);
  text-decoration: underline;
}

.ca-compare-interactive {
  border-top: 1px solid var(--border);
  padding-top: 26px;
}

.interactive-head h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 6px;
}

.interactive-head p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 20px;
}

.form-row-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.form-group label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}

.form-group .req {
  color: #b91c1c;
}

.form-group input,
.form-group select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  width: 100%;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--brand-forest-green);
  outline: 2px solid var(--brand-forest-green-subtle);
}

.checkbox-group {
  justify-content: center;
  padding-top: 22px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}

.checkbox-label input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-forest-green);
  flex-shrink: 0;
}

.form-actions-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
}

.ca-compare-output {
  margin-top: 26px;
}

.compare-result-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  padding: 22px;
}

.compare-result-card h3 {
  font-size: 18.5px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 14px;
}

.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 16px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--white);
}

.compare-table th,
.compare-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.compare-table thead th {
  background: var(--brand-light-gray);
  font-weight: 700;
  color: var(--black);
}

.compare-diff-banner {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin: 18px 0;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
}

.compare-diff-cash {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.compare-diff-finance {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.compare-diff-tie {
  background: var(--brand-light-gray);
  border: 1px solid var(--border);
  color: var(--text);
}

.compare-assumptions {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin-top: 18px;
  padding: 14px 16px;
  background: var(--brand-light-gray);
  border-radius: var(--radius);
}

.compare-assumptions strong {
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

.compare-assumptions ul {
  padding-left: 20px;
  margin: 6px 0 0;
}

.compare-assumptions li {
  margin-bottom: 4px;
}

.compare-disclaimer {
  font-size: 12.5px;
  color: var(--meta);
  margin-top: 12px;
  line-height: 1.5;
}

.compare-error-box {
  padding: 14px 18px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .ca-compare-module {
    padding: 20px 16px;
    margin: 32px 0;
  }

  .form-row-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .checkbox-group {
    padding-top: 4px;
  }
}

/* ==========================================================================
   AEO & GEO Market Facts Summary & Decision Support Cards
   ========================================================================== */
.market-facts-summary {
  background: var(--brand-light-gray);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand-forest-green);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 24px 0 32px;
}

.market-facts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.market-facts-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.market-facts-date {
  font-size: 12.5px;
  color: var(--meta);
  font-weight: 500;
}

.market-facts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px 20px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-body);
}

.market-facts-item strong {
  color: var(--black);
  display: block;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.market-facts-item a {
  color: var(--brand-forest-green);
  text-decoration: underline;
}

.market-decision-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  margin: 28px 0;
}

.market-decision-card h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--black);
}

.calc-formula-box {
  background: var(--brand-light-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13.5px;
  color: var(--black);
  margin: 14px 0;
  line-height: 1.5;
  overflow-x: auto;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0;
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  text-align: left;
}

.table-responsive th,
.table-responsive td {
  padding: 10px 14px;
  border: 1px solid var(--border);
}

.table-responsive th {
  background: var(--brand-light-gray);
  color: var(--black);
  font-weight: 700;
}

.finder-country-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 24px;
  padding: 14px 18px;
  background: var(--brand-light-gray);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.finder-nav-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.finder-country-pill {
  display: inline-block;
  padding: 6px 12px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.finder-country-pill:hover {
  border-color: var(--brand-forest-green);
  color: var(--brand-forest-green);
}


/* Author profile */
.author-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  grid-template-areas: "copy photo";
  align-items: start;
  gap: clamp(24px, 4vw, 48px);
}
.author-profile-copy {
  grid-area: copy;
  min-width: 0;
  max-width: 740px;
}
.author-profile-copy h2 {
  margin: 24px 0 12px;
}
.author-profile-copy h2:first-child {
  margin-top: 0;
}
.author-profile-copy p {
  margin: 0 0 16px;
}
.author-profile-copy a {
  color: var(--brand-forest-green);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.author-profile-role {
  color: var(--muted);
  font-size: 1.08rem;
  font-weight: 600;
}
.author-profile-portrait {
  grid-area: photo;
  justify-self: end;
  width: 100%;
  max-width: 128px;
  margin: 0;
}
.author-profile-portrait img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.author-profile-portrait figcaption {
  margin-top: 10px;
  color: var(--meta);
  font-size: var(--font-small);
}
.author-contact-list {
  margin: 0 0 20px;
  padding-left: 22px;
}
@media (max-width: 720px) {
  .author-profile-layout {
    grid-template-columns: 1fr;
    grid-template-areas: "photo" "copy";
    gap: 24px;
  }
  .author-profile-portrait {
    justify-self: start;
  }
}
