/* =============================================================================
   BuyCarAustralia.com — Design System
   Palette: Navy/Teal/White | Typography: Inter
   Competitors: RACV, NRMA, Canstar
   ============================================================================= */

/* ---------------------------------------------------------------------------
   1. CSS Custom Properties (Design Tokens)
   --------------------------------------------------------------------------- */
:root {
  /* Colors */
  --primary:       #1e3a5f;   /* Navy blue */
  --secondary:     #0891b2;   /* Teal — CTAs, accents */
  --bg:            #ffffff;   /* Page background */
  --bg-alt:        #f8fafc;   /* Alternating section background */
  --text:          #1e293b;   /* Body text */
  --text-muted:    #64748b;   /* Secondary / caption text */
  --success:       #16a34a;   /* Green — recommended / best value */
  --warning:       #d97706;   /* Amber — caution / note */
  --border:        #e2e8f0;   /* Subtle borders */
  --shadow:        0 1px 3px rgba(0, 0, 0, 0.10);
  --shadow-md:     0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg:     0 8px 24px rgba(0, 0, 0, 0.10);

  /* Secondary tint for key-points boxes */
  --secondary-tint: #e0f2fe;  /* Light blue-teal tint */
  --primary-tint:   #e8f0f9;  /* Light navy tint */
  --success-tint:   #dcfce7;  /* Light green tint */
  --warning-tint:   #fef3c7;  /* Light amber tint */

  /* Typography */
  --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base: 16px;
  --font-size-sm:   14px;
  --font-size-xs:   12px;      /* Absolute minimum */
  --line-height:    1.6;
  --line-height-tight: 1.3;

  /* Spacing scale */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Border radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-pill: 999px;

  /* Nav */
  --nav-height:     64px;
  --nav-bg:         #ffffff;
  --nav-border:     #e2e8f0;

  /* Footer */
  --footer-bg:      #1e293b;
  --footer-text:    #cbd5e1;
  --footer-link:    #94a3b8;

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-normal: 250ms ease;
}

/* ---------------------------------------------------------------------------
   2. Base / Reset
   --------------------------------------------------------------------------- */

/* Brand stripe at top of page */
body::before {
  content: '';
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base);
  -webkit-text-size-adjust: 100%;
}

/* Custom scrollbar — subtle, Webkit only */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-alt);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--text);
  background-color: var(--bg);
  margin: 0;
  padding: 0;
  /* Offset fixed nav */
  padding-top: var(--nav-height);
}

/* Skip navigation link — hidden until focused */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 0 0 6px 0;
  text-decoration: none;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Smooth anchor offset for fixed nav */
[id] {
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

/* ---------------------------------------------------------------------------
   3. Typography
   --------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--primary);
  margin-top: 0;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.9rem; }

p {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--text);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--text-muted);
}

small, .text-sm {
  font-size: var(--font-size-sm);
}

.text-xs {
  font-size: var(--font-size-xs);
}

/* ---------------------------------------------------------------------------
   4. Navigation
   --------------------------------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  height: var(--nav-height);
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.site-nav .navbar {
  height: var(--nav-height);
  padding-top: 0;
  padding-bottom: 0;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.nav-logo:hover {
  color: var(--secondary);
  text-decoration: none;
}

.nav-logo .logo-icon {
  flex-shrink: 0;
}

/* Nav links */
.site-nav .nav-link {
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
  /* 44px touch target on mobile */
  min-height: 44px;
  display: flex;
  align-items: center;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus {
  color: var(--secondary);
  background-color: var(--secondary-tint);
  text-decoration: none;
}

.site-nav .nav-link.active {
  color: var(--secondary) !important;
  font-weight: 600;
  position: relative;
}
.site-nav .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--space-3);
  right: var(--space-3);
  height: 2px;
  background: var(--secondary);
  border-radius: 1px;
}

/* Hamburger toggler */
.navbar-toggler {
  border: none;
  padding: var(--space-2);
  color: var(--primary);
  min-width: 44px;
  min-height: 44px;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.25);
}

/* Mobile nav dropdown */
@media (max-width: 767.98px) {
  .site-nav .navbar-collapse {
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    padding: var(--space-3) var(--space-4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  }

  .site-nav .nav-link {
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    padding: var(--space-3) var(--space-2);
  }

  .site-nav .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
  }
}

/* ---------------------------------------------------------------------------
   5. Hero Section
   --------------------------------------------------------------------------- */
.site-hero {
  position: relative;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  background-size: 24px 24px, 100% 100%;
  min-height: 380px;
  display: flex;
  align-items: center;
  color: #ffffff;
  overflow: hidden;
}

.site-hero--short {
  min-height: 260px;
}

.site-hero__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: var(--space-16) 0;
}

.site-hero h1 {
  color: #ffffff;
  font-size: clamp(1.85rem, 5vw, 3rem);
  margin-bottom: var(--space-4);
}

.site-hero .lead {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.15rem;
  max-width: 640px;
}

.site-hero .hero-meta {
  font-size: var(--font-size-sm);
  color: rgba(255, 255, 255, 0.7);
  margin-top: var(--space-4);
}

/* Decorative bottom wave */
.site-hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--bg);
  clip-path: ellipse(55% 100% at 50% 100%);
}

/* ---------------------------------------------------------------------------
   6. Card Component
   --------------------------------------------------------------------------- */
.card-bca {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: var(--space-6);
  transition: box-shadow var(--transition-normal), transform var(--transition-normal);
}

.card-bca:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-bca--flat {
  box-shadow: none;
  border: 1px solid var(--border);
}

.card-bca--large {
  padding: var(--space-8);
}

.card-bca__title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-3);
}

.card-bca__icon {
  width: 48px;
  height: 48px;
  background: var(--secondary-tint);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--secondary);
}

/* ---------------------------------------------------------------------------
   7. Key Points Summary Box
   --------------------------------------------------------------------------- */
.key-points {
  background: var(--secondary-tint);
  border-left: 4px solid var(--secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-6);
  margin: var(--space-8) 0;
}

.key-points__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.key-points ul {
  margin: 0;
  padding-left: var(--space-5);
}

.key-points ul li {
  color: var(--text);
  margin-bottom: var(--space-2);
  font-size: 0.975rem;
}

.key-points ul li:last-child {
  margin-bottom: 0;
}

/* Variants */
.key-points--warning {
  background: var(--warning-tint);
  border-left-color: var(--warning);
}

.key-points--success {
  background: var(--success-tint);
  border-left-color: var(--success);
}

.key-points--primary {
  background: var(--primary-tint);
  border-left-color: var(--primary);
}

/* ---------------------------------------------------------------------------
   8. Breadcrumb
   --------------------------------------------------------------------------- */
.breadcrumb-strip {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) 0;
}

.breadcrumb-strip .breadcrumb {
  margin: 0;
  padding: 0;
  font-size: var(--font-size-sm);
}

.breadcrumb-strip .breadcrumb-item {
  color: var(--text-muted);
}

.breadcrumb-strip .breadcrumb-item a {
  color: var(--secondary);
}

.breadcrumb-strip .breadcrumb-item.active {
  color: var(--text);
  font-weight: 500;
}

.breadcrumb-strip .breadcrumb-item + .breadcrumb-item::before {
  color: var(--text-muted);
}

/* ---------------------------------------------------------------------------
   9. Sticky Sidebar Table of Contents
   --------------------------------------------------------------------------- */
.toc-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 16px);
  max-height: calc(100vh - var(--nav-height) - 32px);
  overflow-y: auto;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
}

.toc-sidebar__title {
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border);
}

.toc-sidebar__nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-sidebar__nav li {
  margin-bottom: var(--space-1);
}

.toc-sidebar__nav a {
  display: block;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  padding: var(--space-1) var(--space-3);
  border-left: 2px solid transparent;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: color var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast);
  line-height: 1.4;
}

.toc-sidebar__nav a:hover,
.toc-sidebar__nav a:focus {
  color: var(--secondary);
  border-left-color: var(--secondary);
  background: var(--secondary-tint);
  text-decoration: none;
}

.toc-sidebar__nav a.active {
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
  background: var(--primary-tint);
}

/* Sub-items */
.toc-sidebar__nav .toc-sub {
  padding-left: var(--space-4);
}

/* Mobile ToC (Bootstrap collapse) */
.toc-mobile {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-6);
  overflow: hidden;
}

.toc-mobile__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-4) var(--space-5);
  background: none;
  border: none;
  font-size: 0.925rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  min-height: 44px;
}

.toc-mobile__toggle .toggle-icon {
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

.toc-mobile__toggle[aria-expanded="true"] .toggle-icon {
  transform: rotate(180deg);
}

.toc-mobile__nav {
  padding: 0 var(--space-5) var(--space-4);
  list-style: none;
  margin: 0;
  border-top: 1px solid var(--border);
}

.toc-mobile__nav li {
  margin-top: var(--space-2);
}

.toc-mobile__nav a {
  font-size: var(--font-size-sm);
  color: var(--text);
  padding: var(--space-1) 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Show sidebar on desktop, collapse on mobile */
@media (max-width: 991.98px) {
  .toc-sidebar {
    display: none;
  }
}

@media (min-width: 992px) {
  .toc-mobile {
    display: none;
  }
}

/* ---------------------------------------------------------------------------
   10. Tables
   --------------------------------------------------------------------------- */
.table-bca {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.table-bca thead th {
  background-color: var(--primary);
  color: #ffffff;
  font-weight: 600;
  padding: var(--space-3) var(--space-4);
  text-align: left;
  border: none;
  white-space: nowrap;
}

.table-bca thead th:first-child {
  border-radius: var(--radius-sm) 0 0 0;
}
.table-bca thead th:last-child {
  border-radius: 0 var(--radius-sm) 0 0;
}

.table-bca tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition-fast);
}

.table-bca tbody tr:hover {
  background-color: var(--primary-tint);
}

.table-bca tbody tr:nth-child(even) {
  background-color: #f0f6fa;
}

.table-bca tbody tr:nth-child(even):hover {
  background-color: var(--primary-tint);
}

.table-bca tbody td {
  padding: var(--space-3) var(--space-4);
  color: var(--text);
  vertical-align: middle;
}

/* Highlighted "best value" row */
.table-bca tbody tr.row-best {
  background-color: var(--success-tint) !important;
  border-left: 3px solid var(--success);
  font-weight: 500;
}

/* Highlighted "best value" cell */
.table-bca td.cell-best {
  background-color: var(--success-tint);
  color: var(--success);
  font-weight: 600;
}

/* Caution row */
.table-bca tbody tr.row-caution {
  background-color: var(--warning-tint) !important;
}

/* Comparison table with highlighted column */
.table-bca .col-highlight {
  background-color: var(--secondary-tint);
  font-weight: 500;
  border-left: 1px solid var(--secondary);
  border-right: 1px solid var(--secondary);
}

.table-bca thead .col-highlight {
  background-color: var(--secondary) !important;
}

/* Responsive wrapper — set on parent div */
.table-responsive-bca {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 1px 8px rgba(30, 58, 95, 0.10);
  margin: var(--space-6) 0;
}

.table-responsive-bca .table-bca {
  margin-bottom: 0;
  margin: 0;
  border-radius: 0;
}

/* Override Bootstrap table inside responsive wrapper */
.table-responsive > .table-bca,
.table-responsive-bca > .table-bca {
  border: none;
}

/* ---------------------------------------------------------------------------
   11. Accordion (FAQ / Expandable Sections)
   --------------------------------------------------------------------------- */
.accordion-bca {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.accordion-bca .accordion-item {
  border: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.accordion-bca .accordion-item:last-child {
  border-bottom: none;
}

.accordion-bca .accordion-button {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--bg);
  padding: var(--space-5) var(--space-6);
  box-shadow: none;
  min-height: 56px;
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}

.accordion-bca .accordion-button:not(.collapsed) {
  background-color: rgba(8, 145, 178, 0.06);
  color: var(--secondary);
  font-weight: 600;
  border-left-color: var(--secondary);
}

.accordion-bca .accordion-button::after {
  /* Bootstrap uses filter for custom color — override */
  filter: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-size: 16px;
}

.accordion-bca .accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230891b2' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.accordion-bca .accordion-button:hover {
  background: var(--bg-alt);
}

.accordion-bca .accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.25);
}

.accordion-bca .accordion-body {
  padding: var(--space-5) var(--space-6);
  font-size: 0.975rem;
  color: var(--text);
  background: var(--bg);
  border-top: 1px solid var(--border);
}

/* FAQ-specific: question styling */
.faq-section .accordion-button {
  font-size: 1rem;
  font-weight: 600;
}

/* ---------------------------------------------------------------------------
   12. Sections
   --------------------------------------------------------------------------- */
.section {
  padding: var(--space-12) 0;
}

.section--alt {
  background-color: var(--bg-alt);
}

.section--primary {
  background-color: var(--primary);
  color: #ffffff;
}

.section--primary h2,
.section--primary h3,
.section--primary p {
  color: #ffffff;
}

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: var(--space-8);
  max-width: 640px;
}

.section-eyebrow {
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--secondary);
  margin-bottom: var(--space-2);
}

/* Divider line under section headings */
.section-title--underline {
  padding-bottom: var(--space-4);
  border-bottom: 3px solid var(--secondary);
  display: inline-block;
}

/* ---------------------------------------------------------------------------
   13. Footer
   --------------------------------------------------------------------------- */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: var(--space-12) 0 var(--space-8);
}

.site-footer__logo {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: var(--space-3);
  display: inline-block;
  text-decoration: none;
}

.site-footer__logo:hover {
  color: var(--secondary);
  text-decoration: none;
}

.site-footer__tagline {
  font-size: var(--font-size-sm);
  color: var(--footer-link);
  margin-bottom: var(--space-6);
}

.site-footer__nav {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6) 0;
}

.site-footer__nav li {
  margin-bottom: var(--space-2);
}

.site-footer__nav a {
  color: var(--footer-link);
  font-size: var(--font-size-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) 0;
}

.site-footer__nav a:hover {
  color: #ffffff;
  text-decoration: none;
}

.site-footer__heading {
  font-size: var(--font-size-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  margin-bottom: var(--space-4);
}

.site-footer__divider {
  border-color: rgba(255, 255, 255, 0.1);
  margin: var(--space-8) 0 var(--space-6);
}

.site-footer__bottom {
  font-size: var(--font-size-xs);
  color: var(--footer-link);
}

.site-footer__disclaimer {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: var(--space-4);
}

/* ---------------------------------------------------------------------------
   14. Buttons & CTAs
   --------------------------------------------------------------------------- */
.btn-bca {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-size: 0.975rem;
  font-weight: 600;
  padding: 10px var(--space-5);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-fast);
  min-height: 44px;   /* Touch target */
  white-space: nowrap;
}

.btn-bca--primary {
  background: var(--secondary);
  color: #ffffff;
  border-color: var(--secondary);
}

.btn-bca--primary:hover {
  background: #0e7490;
  border-color: #0e7490;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.btn-bca--outline {
  background: transparent;
  color: var(--secondary);
  border-color: var(--secondary);
}

.btn-bca--outline:hover {
  background: var(--secondary);
  color: #ffffff;
  text-decoration: none;
}

.btn-bca--ghost {
  background: transparent;
  color: var(--primary);
  border-color: transparent;
}

.btn-bca--ghost:hover {
  background: var(--primary-tint);
  text-decoration: none;
}

.btn-bca:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
}

/* Bootstrap button overrides for 44px targets on mobile */
@media (max-width: 767.98px) {
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ---------------------------------------------------------------------------
   15. Badge / Tag Components
   --------------------------------------------------------------------------- */
.badge-bca {
  display: inline-block;
  font-size: var(--font-size-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px var(--space-2);
  border-radius: var(--radius-pill);
}

.badge-bca--primary {
  background: var(--primary-tint);
  color: var(--primary);
}

.badge-bca--secondary {
  background: var(--secondary-tint);
  color: #065f6e;
}

.badge-bca--success {
  background: var(--success-tint);
  color: #15803d;
}

.badge-bca--warning {
  background: var(--warning-tint);
  color: #92400e;
}

/* ---------------------------------------------------------------------------
   16. Stats / Metric Callout
   --------------------------------------------------------------------------- */
.stat-card {
  text-align: center;
  padding: var(--space-6);
}

.stat-card__value {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat-card__label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------------------------------------------------------------------------
   17. Checklist Styles (for used-car-checklist page)
   --------------------------------------------------------------------------- */
.checklist-section {
  margin-bottom: var(--space-8);
}

.checklist-section__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  padding: var(--space-3) var(--space-4);
  background: var(--primary-tint);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: var(--space-4);
}

.checklist-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist-list__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.975rem;
}

.checklist-list__item:last-child {
  border-bottom: none;
}

.checklist-list__item .check-box {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 4px;
  margin-top: 2px;
}

.checklist-list__item--critical .check-box {
  border-color: var(--warning);
}

.checklist-list__item--critical .item-label {
  font-weight: 600;
}

/* Print-friendly checklist: real checkboxes */
@media print {
  .checklist-list__item input[type="checkbox"] {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ---------------------------------------------------------------------------
   18. Desktop-Only Ad Placement
   --------------------------------------------------------------------------- */
.desktop-only-ad {
  display: none;       /* Hidden on mobile by default */
}

@media (min-width: 768px) {
  .desktop-only-ad {
    display: block;
  }
}

/* Ad container styling */
.ad-container {
  text-align: center;
  margin: var(--space-8) 0;
  padding: var(--space-4);
  background: var(--bg-alt);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

.ad-container--sidebar {
  margin: var(--space-6) 0;
  padding: var(--space-3);
}

/* Ad label */
.ad-label {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
  display: block;
}

/* ---------------------------------------------------------------------------
   19. Author / Last-Updated Metadata
   --------------------------------------------------------------------------- */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: var(--space-6) 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}

.article-meta__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ---------------------------------------------------------------------------
   20. Step / Process Component
   --------------------------------------------------------------------------- */
.step-list {
  counter-reset: step-counter;
  list-style: none;
  padding: 0;
  margin: 0;
}

.step-list__item {
  counter-increment: step-counter;
  display: flex;
  gap: var(--space-5);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.step-list__item:last-child {
  border-bottom: none;
}

.step-list__number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--secondary);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.step-list__number::before {
  content: counter(step-counter);
}

.step-list__content {
  flex: 1;
  padding-top: var(--space-2);
}

.step-list__title {
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-2);
}

/* ---------------------------------------------------------------------------
   21. Responsive Layout Utilities
   --------------------------------------------------------------------------- */
/* Content max-width */
.content-narrow {
  max-width: 740px;
}

.content-wide {
  max-width: 1080px;
}

/* Vertical spacing helpers */
.mt-section {
  margin-top: var(--space-12);
}

.mb-section {
  margin-bottom: var(--space-12);
}

/* Image captions */
.img-caption {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-2);
}

/* Responsive image with rounded corners */
.img-rounded {
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* 44px touch targets on mobile for all interactive elements */
@media (max-width: 767.98px) {
  a, button, [role="button"], input, select, textarea {
    min-height: 44px;
  }

  /* Exception: inline text links don't need 44px */
  p a, li a, td a, .breadcrumb a {
    min-height: auto;
  }

  /* Enforce minimum font size */
  body, p, li, td, th, label, span {
    font-size: max(var(--font-size-xs), 1em);
  }
}

/* ---------------------------------------------------------------------------
   22. Print Styles
   --------------------------------------------------------------------------- */
@media print {
  /* Hide nav, footer, ads, sidebar, mobile ToC */
  .site-nav,
  .site-footer,
  .desktop-only-ad,
  .ad-container,
  .toc-sidebar,
  .toc-mobile,
  .breadcrumb-strip {
    display: none !important;
  }

  /* Remove fixed nav body padding */
  body {
    padding-top: 0 !important;
  }

  /* Print-friendly colors */
  h1, h2, h3, h4, h5, h6 {
    color: #000000 !important;
  }

  a {
    color: #000000 !important;
    text-decoration: underline;
  }

  /* Show full URLs for links in print */
  a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.75em;
    color: #666;
  }

  /* Exception: don't show URLs for nav/button links */
  .btn-bca a::after,
  a.btn::after {
    content: none;
  }

  /* Clean card borders */
  .card-bca {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  /* Checklist optimized for print */
  .checklist-section__title {
    background: none;
    border-left: 3px solid #000;
    padding: 4px 8px;
  }

  /* Page breaks */
  .checklist-section {
    page-break-inside: avoid;
  }

  h2, h3 {
    page-break-after: avoid;
  }

  /* Tables */
  .table-bca thead th {
    background: #f0f0f0 !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* Hero — avoid printing background image */
  .site-hero {
    background-image: none !important;
    background-color: #f0f0f0 !important;
    min-height: auto !important;
  }

  .site-hero h1,
  .site-hero .lead {
    color: #000000 !important;
  }
}

/* ---------------------------------------------------------------------------
   23. Bootstrap Overrides
   --------------------------------------------------------------------------- */
/* Ensure Bootstrap's table-responsive uses our styling */
.table-responsive .table {
  font-size: var(--font-size-sm);
}

/* Fix Bootstrap accordion focus ring */
.accordion-button:focus {
  box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.25) !important;
}

/* Bootstrap form controls at minimum 16px to prevent iOS zoom */
input, select, textarea {
  font-size: max(16px, 1em) !important;
}

/* Bootstrap nav pills / tabs with our colors */
.nav-pills .nav-link.active {
  background-color: var(--secondary);
}

.nav-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--secondary);
  border-bottom-width: 2px;
  font-weight: 600;
}

/* Bootstrap alert overrides */
.alert-info {
  background: var(--secondary-tint);
  border-color: var(--secondary);
  color: var(--text);
}

/* ---------------------------------------------------------------------------
   24. Utility Classes
   --------------------------------------------------------------------------- */
.text-primary-bca  { color: var(--primary) !important; }
.text-secondary-bca { color: var(--secondary) !important; }
.text-muted-bca    { color: var(--text-muted) !important; }
.text-success-bca  { color: var(--success) !important; }
.text-warning-bca  { color: var(--warning) !important; }

.bg-primary-bca    { background-color: var(--primary) !important; color: #fff; }
.bg-secondary-bca  { background-color: var(--secondary) !important; color: #fff; }
.bg-alt            { background-color: var(--bg-alt) !important; }
.bg-success-tint   { background-color: var(--success-tint) !important; }
.bg-warning-tint   { background-color: var(--warning-tint) !important; }

.border-primary-bca  { border-color: var(--primary) !important; }
.border-secondary-bca { border-color: var(--secondary) !important; }

.rounded-bca { border-radius: var(--radius-md) !important; }
.shadow-bca  { box-shadow: var(--shadow-md) !important; }

.font-weight-semibold { font-weight: 600 !important; }

/* Visually hidden but accessible to screen readers */
.sr-only-bca {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------------------
   25. Reduced Motion
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------------
   26. Design Enhancements
   --------------------------------------------------------------------------- */

/* Section separators between articles */
article + article,
.content-section + .content-section {
  border-top: 2px solid var(--border);
  padding-top: 2.5rem;
  margin-top: 2rem;
}

/* Mobile table last column fix */
@media (max-width: 767.98px) {
  .table-bca th:last-child,
  .table-bca td:last-child {
    min-width: 140px;
  }
}

/* Enhanced callout boxes */
.key-points,
.callout-tip,
.callout-warning,
.callout-info {
  border-radius: 0 0.5rem 0.5rem 0;
  border-top: 1px solid rgba(8, 145, 178, 0.15);
  border-right: 1px solid rgba(8, 145, 178, 0.08);
  border-bottom: 1px solid rgba(8, 145, 178, 0.08);
  box-shadow: 0 1px 4px rgba(8, 145, 178, 0.08);
}
.key-points__title,
.callout-title {
  letter-spacing: 0.08em;
}

/* Reduce hero→content gap */
.section--alt:first-of-type,
.key-points-section {
  margin-top: -20px;
  position: relative;
  z-index: 2;
}

/* Hero icon backdrop circle */
.site-hero .site-hero__inner::before {
  content: '';
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

/* Breadcrumb chevron */
.breadcrumb-strip .breadcrumb-item + .breadcrumb-item::before {
  content: '\203A';
  font-size: 1.1em;
  color: var(--text-muted);
  padding: 0 0.4rem;
}
