/* ============================================================
   AutoShoppers Design System v2
   Clean, editorial automotive design. Data-forward, no images needed.
   ============================================================ */

/* --- Kasumi Display Font --- */
@font-face {
  font-family: 'Kasumi';
  src: url('/fonts/kasumi-regular.woff2') format('woff2'),
       url('/fonts/kasumi-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colour palette */
  --color-primary: #e8772e;
  --color-primary-light: #fef4ed;
  --color-primary-dark: #c95f1a;
  --color-heading: #111827;
  --color-text: #4b5563;
  --color-text-muted: #9ca3af;
  --color-border: #e5e7eb;
  --color-border-light: #f3f4f6;
  --color-bg: #ffffff;
  --color-bg-subtle: #f9fafb;
  --color-bg-warm: #fef7f1;
  --color-success: #059669;
  --color-success-bg: #ecfdf5;
  --color-warning: #d97706;
  --color-warning-bg: #fffbeb;
  --color-info: #2563eb;
  --color-info-bg: #eff6ff;

  /* Typography */
  --font-display: 'DM Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;

  /* Spacing scale (4px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 28px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;

  /* Radius */
  --radius-sm: 2px;
  --radius-md: 3px;
  --radius-lg: 4px;
  --radius-xl: 6px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;

  /* Layout */
  --container-max: 1200px;
  --container-narrow: 800px;
  --header-height: 72px;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-heading);
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: 0.01em;
}

h1 { font-size: var(--text-4xl); line-height: 1.25; letter-spacing: -0.01em; }
h2 { font-size: var(--text-2xl); line-height: 1.3; }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-narrow {
  max-width: var(--container-narrow);
}

/* --- Grid System --- */
.grid {
  display: grid;
  gap: var(--space-5);
}

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

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Main + Sidebar layout */
.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-8);
  align-items: start;
}

.sidebar-sticky {
  position: sticky;
  top: calc(var(--header-height) + var(--space-6));
}

@media (max-width: 1024px) {
  .layout-sidebar {
    grid-template-columns: 1fr;
  }
  .sidebar-sticky { position: static; }
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-4) 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-8);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.logo-icon,
.logo-img {
  flex-shrink: 0;
  height: 36px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.site-logo .accent { color: var(--color-primary); }
.site-logo .domain { font-size: 0.7rem; color: var(--color-text-muted); font-weight: 400; margin-left: 1px; }

.nav-main {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-main a {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  padding: var(--space-1) var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color var(--duration-fast);
}

.nav-main a:hover {
  color: var(--color-primary);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  background: none;
  border: none;
}
.nav-toggle span {
  width: 20px;
  height: 2px;
  background: var(--color-heading);
  border-radius: 1px;
  transition: transform var(--duration-normal);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-main {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
  }
  .nav-main.is-open { display: flex; }
  .nav-main a { padding: var(--space-3) var(--space-4); width: 100%; }
  .header-search { display: none; }
}

/* --- Footer --- */
.site-footer {
  background: var(--color-heading);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-16) 0 var(--space-8);
  margin-top: var(--space-20);
}

.footer-top-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  padding-bottom: var(--space-10);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--space-8);
}

.footer-section {
  padding: var(--space-8) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-section-title {
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-4);
}

.footer-makes,
.footer-regions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
}

.footer-makes a,
.footer-regions a {
  font-size: var(--text-xs);
  padding: var(--space-1) 0;
  color: rgba(255, 255, 255, 0.5);
  transition: color 150ms;
}

.footer-makes a:hover,
.footer-regions a:hover {
  color: #fff;
}

.footer-col h5 {
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-4);
}

.footer-col a {
  display: block;
  font-size: var(--text-sm);
  padding: var(--space-1) 0;
  transition: color var(--duration-fast);
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  margin-top: var(--space-12);
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .footer-top-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-6);
  }
}

/* --- Section Spacing --- */
.section {
  padding: var(--space-16) 0;
}

.section-sm {
  padding: var(--space-10) 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-8);
  gap: var(--space-4);
}

.section-header h2 {
  font-size: var(--text-2xl);
}

.section-header .subtitle {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
}

/* --- Card System --- */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--duration-normal) var(--ease-out),
              transform var(--duration-normal) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

a.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-body {
  padding: var(--space-6);
}

.card-compact .card-body {
  padding: var(--space-4) var(--space-5);
}

/* --- Stat Cards (horizontal layout) --- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
}

@media (max-width: 480px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  position: relative;
  z-index: 0;
  padding: var(--space-5) var(--space-5);
  text-align: center;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  transform: skewX(-6deg);
  border-radius: 4px;
  z-index: -1;
}

.stat-value {
  display: block;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-heading);
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}

/* --- Model Card (for make pages) --- */
.model-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-5);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
  color: inherit;
  min-height: 150px;
}

.model-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.model-card-name {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: var(--space-1);
}

.model-card-years {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.model-card-meta {
  display: flex;
  gap: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
}

.model-card-meta strong {
  font-weight: 600;
  color: var(--color-heading);
}

.model-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border-light);
}

.model-card-arrow {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  transition: all var(--duration-fast);
}

.model-card:hover .model-card-arrow {
  background: var(--color-primary);
  color: #fff;
}

/* --- Ranked List Row --- */
.ranked-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border-light);
  text-decoration: none;
  color: inherit;
  transition: background var(--duration-fast);
}

.ranked-row:last-child { border-bottom: none; }
.ranked-row:hover { background: var(--color-bg-subtle); }

.rank-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.ranked-row:first-child .rank-badge,
.ranked-row:nth-child(2) .rank-badge,
.ranked-row:nth-child(3) .rank-badge {
  background: var(--color-primary);
  color: #fff;
}

.ranked-info { flex: 1; min-width: 0; }

.ranked-name {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-heading);
}

.ranked-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.ranked-tags {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .ranked-tags { display: none; }
}

/* --- Tags / Badges (parallelogram — speed aesthetic) --- */
.tag {
  display: inline-block;
  height: 26px;
  line-height: 26px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  position: relative;
  z-index: 0;
  border-radius: 0;
}

/* The parallelogram shape is on a pseudo-element so text stays straight */
.tag::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: skewX(-10deg);
  border-radius: 3px;
  z-index: -1;
}

.tag-primary { color: #fff; }
.tag-primary::before { background: var(--color-heading); }

.tag-neutral { color: var(--color-text); }
.tag-neutral::before { background: var(--color-bg-subtle); border: 1px solid var(--color-border); }

.tag-success { color: #fff; }
.tag-success::before { background: var(--color-success); }

.tag-outline { color: var(--color-text); }
.tag-outline::before { background: transparent; border: 1px solid var(--color-border); }

.tag-accent { color: #fff; }
.tag-accent::before { background: var(--color-primary); }

/* Clickable tags */
a.tag {
  text-decoration: none;
  cursor: pointer;
  transition: opacity 150ms;
}

a.tag:hover { opacity: 0.8; }
a.tag-primary:hover::before { background: var(--color-primary); }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 40px;
  padding: 0 var(--space-5);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: none;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  z-index: 0;
  transition: color var(--duration-fast);
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: skewX(-6deg);
  border-radius: 4px;
  z-index: -1;
  transition: background var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.btn-primary { color: #fff; }
.btn-primary::before { background: var(--color-primary); }
.btn-primary:hover::before { background: var(--color-primary-dark); box-shadow: var(--shadow-md); }

.btn-outline { color: var(--color-heading); }
.btn-outline::before { border: 1px solid var(--color-border); }
.btn-outline:hover::before { border-color: var(--color-heading); background: var(--color-bg-subtle); }

.btn-sm {
  height: 32px;
  padding: 0 var(--space-3);
  font-size: var(--text-xs);
}

.btn-lg {
  height: 48px;
  padding: 0 var(--space-8);
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-6) 0 var(--space-5);
}

.breadcrumb a {
  color: var(--color-text-muted);
  transition: color var(--duration-fast);
}

.breadcrumb a:hover { color: var(--color-primary); }

.breadcrumb .sep {
  font-size: 0.7em;
  opacity: 0.5;
}

.breadcrumb .current {
  color: var(--color-heading);
  font-weight: 500;
}

/* --- Page Hero --- */
.page-hero {
  padding: var(--space-10) 0 var(--space-8);
}

.page-hero h1 {
  margin-bottom: var(--space-3);
}

.page-hero .lead {
  font-size: var(--text-lg);
  color: var(--color-text);
  max-width: 640px;
  line-height: 1.65;
}

/* Homepage hero (dark) */
.hero-dark {
  background: var(--color-heading);
  color: #fff;
  padding: var(--space-20) 0;
  text-align: center;
}

.hero-dark h1 {
  color: #fff;
  font-size: var(--text-5xl);
  margin-bottom: var(--space-4);
}

.hero-dark .lead {
  color: rgba(255, 255, 255, 0.65);
  max-width: 560px;
  margin: 0 auto var(--space-8);
}

.hero-dark .lead strong { color: #fff; }

.hero-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

.hero-actions .btn-outline {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.hero-actions .btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 640px) {
  .hero-dark { padding: var(--space-12) 0; }
  .hero-dark h1 { font-size: var(--text-3xl); }
  .hero-actions { flex-direction: column; align-items: center; }
}

/* --- Distribution Bar --- */
.dist-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.dist-label {
  width: 120px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-heading);
  flex-shrink: 0;
}

.dist-track {
  flex: 1;
  height: 6px;
  background: var(--color-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.dist-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-out);
}

.dist-value {
  width: 60px;
  text-align: right;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  flex-shrink: 0;
}

/* --- Widget Box (sidebar cards) --- */
.widget {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
}

.widget h4 {
  font-size: var(--text-base);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border-light);
}

/* --- Comparison Table --- */
.comparison-grid {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.comparison-header {
  display: contents;
}

.comparison-header > div {
  background: var(--color-heading);
  color: #fff;
  padding: var(--space-4);
}

.comparison-header > div:first-child {
  display: flex;
  align-items: flex-end;
}

.comparison-row {
  display: contents;
}

.comparison-row > div {
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
}

.comparison-row > div:first-child {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-heading);
}

.comparison-row > div:not(:first-child) {
  justify-content: center;
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.comparison-row:nth-child(odd) > div {
  background: var(--color-bg-subtle);
}

.is-winner {
  background: var(--color-success-bg) !important;
  font-weight: 600;
  color: var(--color-heading);
}

@media (max-width: 640px) {
  .comparison-grid { grid-template-columns: 80px 1fr 1fr; font-size: var(--text-sm); }
}

/* --- Article Styles --- */
.article {
  max-width: var(--container-narrow);
}

.article-header {
  margin-bottom: var(--space-8);
}

.article-header h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
}

.article-meta {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.article-body p {
  font-size: var(--text-base);
  line-height: 1.8;
  margin-bottom: var(--space-5);
}

.article-body h2 {
  font-size: var(--text-xl);
  margin: var(--space-10) 0 var(--space-4);
}

.article-body a {
  color: var(--color-primary);
  font-weight: 500;
}

.article-body a:hover {
  text-decoration: underline;
}

/* --- FAQ --- */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
  transition: box-shadow var(--duration-normal);
}

.faq-item[open] {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  padding: var(--space-4) var(--space-5);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-heading);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::-webkit-details-marker { display: none; }

.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--color-primary);
  flex-shrink: 0;
  margin-left: var(--space-4);
}

.faq-item[open] .faq-question::after { content: "\2212"; }

.faq-answer {
  padding: 0 var(--space-5) var(--space-5);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
}

/* --- Insight / Alert Cards --- */
.insight-card {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
  border: 1px solid;
}

.insight-card.good { background: var(--color-success-bg); border-color: #bbf7d0; }
.insight-card.warning { background: var(--color-warning-bg); border-color: #fde68a; }
.insight-card.info { background: var(--color-info-bg); border-color: #bfdbfe; }

.insight-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.insight-card.good .insight-icon { background: var(--color-success); }
.insight-card.warning .insight-icon { background: var(--color-warning); }
.insight-card.info .insight-icon { background: var(--color-info); }

/* --- Data Source Note --- */
.data-source {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-heading { color: var(--color-heading); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.mt-4 { margin-top: var(--space-4); }
.mt-8 { margin-top: var(--space-8); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-8 { margin-bottom: var(--space-8); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.shrink-0 { flex-shrink: 0; }

/* --- Year buttons (sidebar) --- */
.year-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.year-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  position: relative;
  z-index: 0;
  transition: color var(--duration-fast);
}

.year-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--color-border);
  transform: skewX(-6deg);
  border-radius: 3px;
  z-index: -1;
  transition: background var(--duration-fast), border-color var(--duration-fast);
}

.year-btn:hover { color: var(--color-primary); }
.year-btn:hover::before { border-color: var(--color-primary); }

.year-btn.active { color: #fff; }
.year-btn.active::before {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

/* --- Spec Grid (year pages) --- */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-3);
}

.spec-item {
  position: relative;
  z-index: 0;
  padding: var(--space-4) var(--space-5);
}

.spec-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  transform: skewX(-6deg);
  border-radius: 4px;
  z-index: -1;
}

.spec-item .spec-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
  margin-bottom: var(--space-1);
}

.spec-item .spec-value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-heading);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

/* --- Running Cost Calculator refinement --- */
.calc-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.calc-card {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  text-align: center;
}

.calc-card.primary {
  background: var(--color-primary);
  color: #fff;
}

.calc-card.secondary {
  background: var(--color-bg-warm);
}

@media (max-width: 640px) {
  .calc-results { grid-template-columns: 1fr; }
}

/* --- Intro text blocks --- */
.intro-text p {
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

/* --- Print --- */
@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  .section { padding: 1rem 0; }
}
