/* ============================================================
   Solar ROI Check — Main Stylesheet
   ============================================================
   TABLE OF CONTENTS
   1.  CSS Custom Properties (Design Tokens)
   2.  CSS Reset & Base
   3.  Typography
   4.  Layout & Grid
   5.  Header & Navigation
   6.  Hero / Page Banner
   7.  Calculator Component
   8.  Results Component
   9.  Article Cards
   10. FAQ Accordion
   11. Ad Slots (AdSense Stubs)
   12. Forms
   13. Buttons
   14. Footer
   15. Utility Classes
   16. Responsive / Media Queries
   ============================================================ */


/* ============================================================
   1. CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */

:root {
  /* Brand Colors */
  --color-navy:        #2D334A;   /* Primary — header, nav, footers, dark backgrounds */
  --color-blue:        #4E89AE;   /* Secondary — links, accents, borders, info states */
  --color-orange:      #E67E22;   /* Action — CTAs, buttons, highlights, calculator accent */
  --color-green:       #81B214;   /* Environmental/positive — CO2 results, badges */
  --color-cream:       #F4F1EA;   /* Background — page background, card fills */
  --color-white:       #FFFFFF;
  --color-text:        #2D334A;   /* Body text — reuse navy for cohesion */
  --color-text-muted:  #6B7280;   /* Muted/secondary text */
  --color-border:      #D1D5DB;

  /* Derived / Semantic Colors */
  --color-orange-dark:   #C96B10;
  --color-orange-light:  #FBE9D4;
  --color-green-light:   #EBF3CC;
  --color-blue-light:    #E8F2F8;
  --color-navy-light:    #3D4560;
  --color-error:         #DC2626;
  --color-error-light:   #FEE2E2;

  /* Header Background — change this one value to switch header color:
     --header-bg: var(--color-navy);    #2D334A — dark navy (default)
     --header-bg: var(--color-white);   #FFFFFF — clean white
     --header-bg: var(--color-cream);   #F4F1EA — warm off-white
     --header-bg: var(--color-blue);    #4E89AE — medium blue
  */
  --header-bg: var(--color-white);
  /* Tip: For dark header backgrounds (navy, blue), use var(--color-white) here.
     For light backgrounds (white, cream), use var(--color-navy). */
  --header-text: var(--color-navy);

  /* Typography */
  --font-display: 'Raleway', sans-serif;
  --font-body:    'Source Sans 3', sans-serif;

  --text-xs:   0.75rem;    /* 12px */
  --text-sm:   0.875rem;   /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg:   1.125rem;   /* 18px */
  --text-xl:   1.25rem;    /* 20px */
  --text-2xl:  1.5rem;     /* 24px */
  --text-3xl:  1.875rem;   /* 30px */
  --text-4xl:  2.25rem;    /* 36px */
  --text-5xl:  3rem;       /* 48px */

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Borders & Radii */
  --radius-sm:  0.25rem;
  --radius-md:  0.5rem;
  --radius-lg:  0.75rem;
  --radius-xl:  1rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(45, 51, 74, 0.08), 0 1px 2px rgba(45, 51, 74, 0.06);
  --shadow-md:  0 4px 12px rgba(45, 51, 74, 0.10), 0 2px 6px rgba(45, 51, 74, 0.08);
  --shadow-lg:  0 10px 30px rgba(45, 51, 74, 0.12), 0 4px 12px rgba(45, 51, 74, 0.08);
  --shadow-xl:  0 20px 50px rgba(45, 51, 74, 0.15), 0 8px 20px rgba(45, 51, 74, 0.10);

  /* Transitions */
  --transition-fast:   150ms ease;
  --transition-base:   250ms ease;
  --transition-slow:   400ms ease;

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


/* ============================================================
   2. CSS RESET & BASE
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-cream);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-blue);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color var(--transition-fast), text-decoration-color var(--transition-fast);
}

a:hover {
  color: var(--color-orange);
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

ul, ol {
  list-style: none;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  background: var(--color-orange);
  color: var(--color-white);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  z-index: 9999;
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
  outline: 3px solid var(--color-navy);
  outline-offset: 2px;
}


/* ============================================================
   3. TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-text);
  margin-top: var(--space-8);
  margin-bottom: var(--space-4);
}

h1, h2, h3, h4, h5, h6 {
  /* Remove top margin when heading is the first element in a container */
}

h1:first-child, h2:first-child, h3:first-child,
h4:first-child, h5:first-child, h6:first-child {
  margin-top: 0;
}

h1 { font-size: var(--text-3xl); font-weight: 800; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-base); }
h6 { font-size: var(--text-sm); }

p {
  margin-bottom: var(--space-4);
  max-width: 70ch;
}

p:last-child {
  margin-bottom: 0;
}

strong { font-weight: 600; }
em { font-style: italic; }

code, pre {
  font-family: 'Courier New', Courier, monospace;
  background: var(--color-blue-light);
  color: var(--color-navy);
  border-radius: var(--radius-sm);
}

code {
  font-size: 0.9em;
  padding: 0.1em 0.4em;
}

pre {
  padding: var(--space-4);
  overflow-x: auto;
  font-size: var(--text-sm);
  line-height: 1.5;
}

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

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.breadcrumb__item:not(:last-child)::after {
  content: '›';
  color: var(--color-border);
}

.breadcrumb__link {
  color: var(--color-blue);
  text-decoration: none;
}

.breadcrumb__link:hover {
  text-decoration: underline;
}

.breadcrumb__current {
  color: var(--color-text-muted);
}


/* ============================================================
   4. LAYOUT & GRID
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

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

.section {
  padding-block: var(--space-16);
}

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

.section--lg {
  padding-block: var(--space-24);
}

.section__header {
  margin-bottom: var(--space-10);
}

.section__header--center {
  text-align: center;
}

.section__label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-orange);
  margin-bottom: var(--space-2);
}

.section__title {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-navy);
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 60ch;
}

.section__header--center .section__subtitle,
.section__header--center p {
  margin-inline: auto;
  text-align: center;
}

.grid {
  display: grid;
  gap: var(--space-6);
}

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

/* Two-column layout with sidebar */
.layout--sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-8);
  align-items: start;
}

.layout--sidebar .layout__main {
  min-width: 0;
}


/* ============================================================
   5. HEADER & NAVIGATION
   ============================================================ */

.site-header {
  background-color: var(--header-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

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

.site-header__logo {
  height: 52px;
  width: auto;
}

.site-header__site-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-xl);
  color: var(--header-text);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav__item {
  position: relative;
}

.nav__link {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  color: var(--header-text);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), color var(--transition-fast);
  letter-spacing: 0.02em;
}

.nav__link:hover {
  background-color: var(--color-cream);
  color: var(--color-navy);
}

.nav__link--active {
  background-color: var(--color-navy);
  color: var(--color-white);
}

.nav__link--active:hover {
  background-color: var(--color-navy-light);
  color: var(--color-white);
}

.nav__item--has-dropdown .nav__link::after {
  content: '▾';
  font-size: 0.75em;
  margin-left: var(--space-1);
  opacity: 0.7;
}

.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  /* Extra padding-top creates an invisible hover bridge so the mouse
     doesn't lose hover when traveling from the nav link into the dropdown */
  padding: var(--space-4) var(--space-2) var(--space-2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  border: 1px solid var(--color-border);
}

.nav__item--has-dropdown:hover .nav__dropdown,
.nav__item--has-dropdown:focus-within .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav__dropdown-link {
  display: block;
  padding: var(--space-2) var(--space-4);
  color: var(--color-text);
  font-size: var(--text-sm);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav__dropdown-link:hover,
.nav__dropdown-link--active,
.nav__dropdown-link.nav__link--active {
  background-color: var(--color-cream);
  color: var(--color-navy);
  font-weight: 600;
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
  border-radius: var(--radius-md);
  color: var(--color-navy);
}

.nav__toggle-icon {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-navy);
  position: relative;
  transition: background var(--transition-fast);
}

.nav__toggle-icon::before,
.nav__toggle-icon::after {
  content: '';
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-navy);
  position: absolute;
  transition: transform var(--transition-base);
}

.nav__toggle-icon::before { top: -7px; }
.nav__toggle-icon::after  { top: 7px; }

.nav__toggle[aria-expanded="true"] .nav__toggle-icon {
  background: transparent;
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon::before {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-icon::after {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* ============================================================
   6. HERO / PAGE BANNER
   ============================================================ */

.hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 60%, #1a5276 100%);
  color: var(--color-white);
  padding-block: var(--space-10) var(--space-12);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(78,137,174,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--color-cream);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin-inline: auto;
}

.hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-orange);
  background: rgba(230, 126, 34, 0.15);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-5);
  border: 1px solid rgba(230, 126, 34, 0.3);
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-4xl);
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: var(--space-5);
  letter-spacing: -0.02em;
}

.hero__title span {
  color: var(--color-orange);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.8);
  max-width: 56ch;
  margin-inline: auto;
  margin-bottom: var(--space-8);
  line-height: 1.6;
}

.hero__cta-group {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
}

/* Page banner (interior pages) */
.page-banner {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  color: var(--color-white);
  padding-block: var(--space-6) var(--space-8);
}

.page-banner__inner {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

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

/* Override global heading margins inside the banner */
.page-banner__title {
  margin-top: 0;
}

.page-banner__breadcrumb .breadcrumb {
  color: var(--color-cream); /* Current page: cream #F4F1EA = 11.06:1 contrast ✅ */
}

.page-banner__breadcrumb .breadcrumb__link {
  color: var(--color-white); /* Linked items: pure white = 12.47:1 contrast ✅ */
}

.page-banner__breadcrumb .breadcrumb__item:not(:last-child)::after {
  color: rgba(255,255,255,0.45); /* Separator › — decorative, not conveying info */
}

.page-banner__title {
  font-size: var(--text-3xl);
  font-weight: 800;
  color: var(--color-white);
  margin-bottom: var(--space-3);
}

.page-banner__subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.75);
  max-width: 60ch;
}


/* ============================================================
   7. CALCULATOR COMPONENT
   ============================================================ */

.calculator {
  background: var(--color-white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.calculator__header {
  background: linear-gradient(135deg, var(--color-navy), var(--color-navy-light));
  padding: var(--space-6) var(--space-8);
  color: var(--color-white);
}

.calculator__header-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-1);
}

.calculator__header-subtitle {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.7);
}

.calculator__body {
  padding: var(--space-8);
}

.calculator__fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.calculator__field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.calculator__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.calculator__label-value {
  color: var(--color-orange);
  font-weight: 700;
  font-size: var(--text-base);
}

.calculator__input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  -moz-appearance: textfield;
}

.calculator__input::-webkit-inner-spin-button,
.calculator__input::-webkit-outer-spin-button {
  opacity: 1;
}

.calculator__input:hover {
  border-color: var(--color-blue);
}

.calculator__input:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}

.calculator__input--disabled,
.calculator__input[disabled] {
  background: var(--color-cream);
  color: var(--color-text-muted);
  cursor: not-allowed;
  border-color: var(--color-border);
}

.calculator__range {
  width: 100%;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.calculator__range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-orange);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  border: 3px solid var(--color-white);
}

.calculator__range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-orange);
  cursor: pointer;
  border: 3px solid var(--color-white);
  box-shadow: var(--shadow-sm);
}

.calculator__range:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 4px;
}

.calculator__error {
  font-size: var(--text-sm);
  color: var(--color-error);
  display: none;
}

.calculator__error--visible {
  display: block;
}

/* Coming soon overlay */
.calculator--disabled {
  position: relative;
}

.calculator__coming-soon-overlay {
  position: absolute;
  inset: 0;
  background: rgba(244, 241, 234, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-2xl);
  gap: var(--space-4);
  backdrop-filter: blur(2px);
  z-index: 10;
}

.calculator__coming-soon-badge {
  background: var(--color-blue);
  color: var(--color-white);
  font-weight: 700;
  font-size: var(--text-xl);
  padding: var(--space-3) var(--space-8);
  border-radius: var(--radius-full);
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-md);
}


/* ============================================================
   8. RESULTS COMPONENT
   ============================================================ */

.results {
  border-top: 2px solid var(--color-border);
  padding-top: var(--space-8);
  margin-top: var(--space-8);
  display: none;
}

.results--visible {
  display: block;
}

.results__headline {
  text-align: center;
  margin-bottom: var(--space-8);
}

.results__headline-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.results__payback {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-5xl);
  color: var(--color-orange);
  line-height: 1;
}

.results__payback-unit {
  font-size: var(--text-2xl);
  font-weight: 700;
}

.results__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.results__card {
  background: var(--color-cream);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: center;
}

.results__card-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-2);
  display: block;
}

.results__card-value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-navy);
  font-family: var(--font-display);
}

.results__eco {
  background: var(--color-green-light);
  border: 1px solid rgba(129, 178, 20, 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
}

.results__eco-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #4a6e08;
  margin-bottom: var(--space-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.results__eco-co2 {
  font-size: var(--text-xl);
  color: #3d5a07;
  margin-bottom: var(--space-1);
}

.results__eco-co2 strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-2xl);
}

.results__eco-trees {
  font-size: var(--text-sm);
  color: #5a7a0a;
  font-style: italic;
}

.results__eco-trees strong {
  font-weight: 700;
}

.results__eco-source {
  font-size: var(--text-xs);
  color: #7a9e14;
  margin-top: var(--space-2);
  display: block;
}

.results__share {
  margin-top: var(--space-6);
}


/* ============================================================
   9. ARTICLE CARDS
   ============================================================ */

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

.article-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
  display: flex;
  flex-direction: column;
  position: relative;
}

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

/* Block link pattern — entire card is clickable */
.article-card__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-orange);
  text-decoration: none;
  margin-top: auto;
  transition: gap var(--transition-fast);
  position: static;
}

/* Stretch the link to cover the entire card */
.article-card__link::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-xl);
}

.article-card__link:hover {
  gap: var(--space-2);
  color: var(--color-orange-dark);
}

/* Show focus ring on the card when link is focused */
.article-card:focus-within {
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

/* Preview cards (coming soon) — no hover effect, not clickable */
.article-card--preview {
  cursor: default;
  opacity: 0.75;
}

.article-card--preview:hover {
  box-shadow: var(--shadow-sm);
  transform: none;
}

.article-card__thumbnail {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--color-blue-light), var(--color-cream));
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.article-card__thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0.4;
}

.article-card__body {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card__meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.article-card__date::before {
  content: '📅 ';
}

.article-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-3);
  line-height: 1.3;
}

.article-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
  margin-bottom: var(--space-4);
  max-width: none;
}


/* ============================================================
   SOCIAL SHARE BUTTONS
   ============================================================ */
.share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3);
  padding-block: var(--space-6);
  border-top: 2px solid var(--color-border);
  margin-block: var(--space-8);
}

.share-bar__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: var(--space-1);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  white-space: nowrap;
}

.share-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.share-btn--pinterest {
  background: #E60023;
  color: #fff;
}

.share-btn--facebook {
  background: #1877F2;
  color: #fff;
}

.share-btn--twitter {
  background: #000;
  color: #fff;
}

.share-btn--copy {
  background: transparent;
  color: var(--color-navy);
  border-color: var(--color-border);
}

.share-btn--copy:hover {
  border-color: var(--color-navy);
}

.share-btn__icon {
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  flex-shrink: 0;
}
   ============================================================ */

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base);
}

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

.faq-item--open {
  border-color: var(--color-orange);
  box-shadow: 0 0 0 1px var(--color-orange), var(--shadow-md);
}

.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--color-navy);
  transition: color var(--transition-fast);
}

.faq__question:hover {
  color: var(--color-orange);
}

.faq__question-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--color-cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  font-weight: 400;
  color: var(--color-orange);
  transition: transform var(--transition-base), background-color var(--transition-fast);
  line-height: 1;
}

.faq-item--open .faq__question-icon {
  transform: rotate(45deg);
  background: var(--color-orange);
  color: var(--color-white);
}

.faq__answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height var(--transition-slow);
}

.faq__answer-inner {
  padding: 0 var(--space-6) var(--space-5);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-4);
}


/* ============================================================
   11. AD SLOTS (ADSENSE STUBS)
   ============================================================ */

.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    -45deg,
    rgba(209, 213, 219, 0.2),
    rgba(209, 213, 219, 0.2) 5px,
    transparent 5px,
    transparent 25px
  );
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.ad-slot__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: var(--space-3);
}

.ad-slot__label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.6;
}

/* Leaderboard — 728×90 */
.ad-slot--leaderboard {
  width: 100%;
  max-width: 728px;
  height: 90px;
  margin-inline: auto;
  margin-block: var(--space-4);
}

/* Rectangle — 300×250 */
.ad-slot--rectangle {
  width: 300px;
  height: 250px;
}

/* Responsive display */
.ad-slot--responsive {
  width: 100%;
  min-height: 90px;
  margin-block: var(--space-6);
}

.ad-slot-wrapper {
  padding-block: var(--space-4);
  display: flex;
  justify-content: center;
}

.ad-slot-wrapper--full {
  background: rgba(209, 213, 219, 0.1);
  border-block: 1px solid var(--color-border);
}


/* ============================================================
   12. FORMS
   ============================================================ */

.form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.form__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
}

.form__required {
  color: var(--color-orange);
  margin-left: var(--space-1);
  aria-hidden: true;
}

.form__input,
.form__textarea {
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-white);
  width: 100%;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form__input:hover,
.form__textarea:hover {
  border-color: var(--color-blue);
}

.form__input:focus,
.form__textarea:focus {
  outline: none;
  border-color: var(--color-orange);
  box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.15);
}

.form__textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

.form__hint {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.form__error {
  font-size: var(--text-sm);
  color: var(--color-error);
  display: none;
}

.form__error--visible {
  display: block;
}

.form__alert {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  display: none;
}

.form__alert--success {
  background: var(--color-green-light);
  border: 1px solid rgba(129,178,20,0.3);
  color: #4a6e08;
}

.form__alert--error {
  background: var(--color-error-light);
  border: 1px solid rgba(220,38,38,0.3);
  color: var(--color-error);
}

.form__alert--visible {
  display: block;
}


/* ============================================================
   13. BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast),
              border-color var(--transition-fast), box-shadow var(--transition-fast),
              transform var(--transition-fast);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 3px;
}

.btn:active {
  transform: scale(0.98);
}

/* Primary — orange */
.btn--primary {
  background-color: var(--color-orange);
  color: var(--color-white);
  border-color: var(--color-orange);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  background-color: var(--color-orange-dark);
  border-color: var(--color-orange-dark);
  box-shadow: var(--shadow-lg);
  color: var(--color-white);
}

/* Secondary — outlined */
.btn--secondary {
  background-color: transparent;
  color: var(--color-white);
  border-color: rgba(255,255,255,0.5);
}

.btn--secondary:hover {
  background-color: rgba(255,255,255,0.1);
  border-color: var(--color-white);
  color: var(--color-white);
}

/* Outline — navy */
.btn--outline {
  background-color: transparent;
  color: var(--color-navy);
  border-color: var(--color-border);
}

.btn--outline:hover {
  border-color: var(--color-navy);
  background-color: var(--color-cream);
  color: var(--color-navy);
}

/* Ghost */
.btn--ghost {
  background-color: transparent;
  color: var(--color-text-muted);
  border-color: var(--color-border);
}

.btn--ghost:hover {
  background-color: var(--color-cream);
  color: var(--color-text);
}

/* Sizes */
.btn--sm {
  font-size: var(--text-sm);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
}

.btn--lg {
  font-size: var(--text-lg);
  padding: var(--space-4) var(--space-8);
}

.btn--full {
  width: 100%;
}


/* ============================================================
   14. FOOTER
   ============================================================ */

.site-footer {
  background: var(--color-navy);
  color: rgba(255,255,255,0.8);
  padding-block: var(--space-12) var(--space-8);
  margin-top: auto;
}

.site-footer__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.site-footer__logo-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-footer__logo {
  height: 44px;
  width: auto;
}

.site-footer__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--text-lg);
  color: var(--color-white);
}

.site-footer__tagline {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  max-width: 32ch;
  margin-bottom: 0;
}

.site-footer__nav {
  display: flex;
  align-items: center;
}

.site-footer__nav-title {
  display: none;
}

.site-footer__links {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
  align-items: center;
}

.site-footer__links li {
  display: flex;
  align-items: center;
}

.site-footer__links li + li::before {
  content: '|';
  color: rgba(255,255,255,0.25);
  margin-inline: var(--space-3);
  font-size: var(--text-xs);
}

.site-footer__link {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.site-footer__link:hover {
  color: var(--color-orange);
}

.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.site-footer__copyright {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.4);
  margin-bottom: 0;
}


/* ============================================================
   15. UTILITY CLASSES
   ============================================================ */

/* Info / status banners */
.banner {
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  line-height: 1.5;
}

.banner__icon {
  flex-shrink: 0;
  font-size: var(--text-xl);
  margin-top: -2px;
}

.banner__content p {
  margin-bottom: var(--space-2);
}

.banner__content p:last-child {
  margin-bottom: 0;
}

.banner--info {
  background: var(--color-blue-light);
  border: 1px solid rgba(78,137,174,0.3);
  color: #1a4f6a;
}

.banner--warning {
  background: var(--color-orange-light);
  border: 1px solid rgba(230,126,34,0.3);
  color: #7a3d0a;
}

.banner--coming-soon {
  background: var(--color-blue-light);
  border: 1px solid rgba(78,137,174,0.3);
  color: #1a4f6a;
  margin-bottom: var(--space-8);
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--green {
  background: var(--color-green-light);
  color: #3d5a07;
  border: 1px solid rgba(129,178,20,0.3);
}

.badge--blue {
  background: var(--color-blue-light);
  color: #1a4f6a;
  border: 1px solid rgba(78,137,174,0.3);
}

.badge--orange {
  background: var(--color-orange-light);
  color: #7a3d0a;
  border: 1px solid rgba(230,126,34,0.3);
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-border);
}

.timeline__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding-block: var(--space-5);
  position: relative;
}

.timeline__dot {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  z-index: 1;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.timeline__dot--green { background: var(--color-green-light); border: 2px solid var(--color-green); }
.timeline__dot--blue  { background: var(--color-blue-light);  border: 2px solid var(--color-blue); }

.timeline__content {
  flex: 1;
  padding-top: var(--space-2);
}

.timeline__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  margin-bottom: var(--space-1);
}

.timeline__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-navy);
}

.timeline__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: 0;
}

/* Feature cards */
.feature-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.feature-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

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

.feature-card__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
  display: block;
}

.feature-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-2);
}

.feature-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 0;
  max-width: none;
}

/* Prose content (privacy, about, etc.) */
.prose h2 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 2px solid var(--color-border);
  color: var(--color-navy);
}

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

.prose p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

.prose .prose__date {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-8);
  font-style: italic;
}

/* Section with white bg */
.section--white {
  background: var(--color-white);
}

.section--navy {
  background: var(--color-navy);
  color: var(--color-white);
}

.section--navy .section__title,
.section--navy h2,
.section--navy h3 {
  color: var(--color-white);
}

/* Text utilities */
.text-center { text-align: center; }
.text-muted   { color: var(--color-text-muted); }
.text-orange  { color: var(--color-orange); }
.text-green   { color: var(--color-green); }
.text-blue    { color: var(--color-blue); }

/* Spacing utilities */
.mt-0  { margin-top: 0; }
.mb-0  { margin-bottom: 0; }
.mb-4  { margin-bottom: var(--space-4); }
.mb-6  { margin-bottom: var(--space-6); }
.mb-8  { margin-bottom: var(--space-8); }


/* ============================================================
   16. RESPONSIVE / MEDIA QUERIES
   ============================================================ */

/* ── 1024px and below ── */
@media (max-width: 1024px) {
  .feature-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .layout--sidebar {
    grid-template-columns: 1fr;
  }
}

/* ── 768px and below ── */
@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  h1 { font-size: var(--text-2xl); }
  h2 { font-size: var(--text-xl); }

  .hero {
    padding-block: var(--space-8) var(--space-12);
  }

  .hero__cta-group {
    padding-bottom: var(--space-6);
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .hero__cta-group {
    flex-direction: column;
    align-items: center;
  }

  .nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-navy);
    padding: var(--space-4);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--transition-base), transform var(--transition-base), visibility var(--transition-base);
  }

  .nav--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
  }

  /* Override nav link color for mobile — must be visible on navy background */
  .nav__link {
    color: var(--color-white);
    justify-content: space-between;
  }

  .nav__link:hover,
  .nav__link--active {
    background-color: rgba(255,255,255,0.12);
    color: var(--color-white);
  }

  /* Hide dropdowns by default on mobile — toggled open by JS */
  .nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    margin-top: var(--space-1);
    padding: var(--space-2);
    display: none;
  }

  /* JS adds this class to expand a dropdown on mobile */
  .nav__dropdown--open {
    display: block;
  }

  .nav__dropdown-link {
    color: rgba(255,255,255,0.85);
  }

  .nav__dropdown-link:hover,
  .nav__dropdown-link--active {
    background: rgba(255,255,255,0.12);
    color: var(--color-white);
    font-weight: 600;
  }

  .nav__item--has-dropdown .nav__dropdown {
    display: none;
  }

  .nav__item--has-dropdown.nav__item--expanded .nav__dropdown {
    display: block;
  }

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

  .feature-cards {
    grid-template-columns: 1fr;
  }

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

  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .site-footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .calculator__body {
    padding: var(--space-5);
  }

  .ad-slot--leaderboard {
    height: 60px;
    max-width: 320px;
  }

  .section {
    padding-block: var(--space-12);
  }

  .page-banner {
    padding-block: var(--space-8) var(--space-6);
  }

  .page-banner__inner {
    padding-inline: var(--space-4);
  }

  .page-banner__title {
    font-size: var(--text-2xl);
    word-break: break-word;
  }
}

/* ── 640px and below ── */
@media (max-width: 640px) {
  .container {
    padding-inline: var(--space-4);
  }

  .hero__title {
    font-size: var(--text-2xl);
  }

  .hero__subtitle {
    font-size: var(--text-base);
  }

  .results__payback {
    font-size: var(--text-4xl);
  }

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

  .timeline::before {
    left: 15px;
  }

  .timeline__dot {
    width: 32px;
    height: 32px;
  }
}
