/* =========================================================
   fayazmemon.com — Site-wide Design System
   Matches legacy brand (OldWebsite): white navbar, teal links,
   blue-gradient hero, red/blue/green action colors, rounded cards.
   Rewritten as plain custom CSS (no Bootstrap dependency).
   ========================================================= */

:root {
  /* Brand colors (from legacy site) */
  --color-teal: #0F7699;
  --color-teal-dark: #0a5a7a;
  --color-navy: #2c3e50;
  --color-navy-light: #34495e;
  --color-blue: #3498db;
  --color-blue-dark: #2980b9;
  --color-red: #e74c3c;
  --color-red-dark: #c0392b;
  --color-green: #27ae60;
  --color-green-dark: #229954;

  --color-bg: #f8f9fa;
  --color-surface: #FFFFFF;
  --color-border: #e9ecef;
  --color-header-scrolled: rgba(255, 255, 255, 0.95);

  --color-text: #333333;
  --color-text-secondary: #666666;
  --color-text-muted: #7f8c8d;
  --color-text-on-dark: #ecf0f1;

  /* Heading text color — distinct from --color-navy, which is also used as
     a background (footer, hero/CTA gradients) and needs to darken further
     in dark mode rather than lighten. --color-heading only ever colors
     text, so it flips direction in dark mode instead. */
  --color-heading: var(--color-navy);

  /* Type */
  --font-heading: "Jost", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-body: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", "SFMono-Regular", Menlo, monospace;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Layout */
  --container-max: 1200px;
  --radius-sm: 5px;
  --radius-md: 10px;
  --radius-lg: 15px;
  --radius-pill: 20px;

  --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.1);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.15);

  --border-width: 1px;
  --nav-height: 72px;
}

/* ---------- Dark mode ----------
   Toggled by adding data-theme="dark" to <html> (assets/js/main.js,
   initThemeToggle). Every shared component below already reads colors
   through var(--color-*), so redefining the tokens here is enough to
   re-theme the header, footer, nav, buttons, cards and page backgrounds
   on every page without per-page CSS changes. */
:root[data-theme="dark"] {
  --color-bg: #14191d;
  --color-surface: #1e252b;
  --color-border: #323b42;
  --color-header-scrolled: rgba(30, 37, 43, 0.95);

  --color-text: #e6e9ec;
  --color-text-secondary: #b0b8be;
  --color-text-muted: #899499;
  --color-text-on-dark: #ecf0f1;

  --color-navy: #1b2733;
  --color-navy-light: #24333f;
  --color-heading: #f0f3f5;

  --shadow-sm: 0 2px 4px rgba(0,0,0,0.35);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 50px rgba(0,0,0,0.5);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text);
  cursor: pointer;
  padding: 0;
  margin: 0;
  flex-shrink: 0;
  transition: background-color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
  border-color: var(--color-teal);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-toggle .theme-toggle__sun { display: none; }
.theme-toggle .theme-toggle__moon { display: block; }

:root[data-theme="dark"] .theme-toggle .theme-toggle__sun { display: block; }
:root[data-theme="dark"] .theme-toggle .theme-toggle__moon { display: none; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--color-teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-heading);
  line-height: 1.25;
  margin: 0 0 var(--space-3);
  font-weight: 700;
}
p { margin: 0 0 var(--space-4); }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ---------- Layout helpers ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}
.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: var(--space-3);
  color: var(--color-heading);
}
.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-7);
  font-weight: 400;
}

/* ---------- Buttons ---------- */
.btn {
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-block;
  min-width: 180px;
  text-align: center;
}
.btn:hover { text-decoration: none; }

.btn--primary {
  background: var(--color-blue);
  color: #fff;
}
.btn--primary:hover {
  background: var(--color-blue-dark);
  transform: translateY(-2px);
}

.btn--blue {
  background: var(--color-blue);
  color: #fff;
}
.btn--blue:hover {
  background: var(--color-blue-dark);
  transform: translateY(-2px);
}

.btn--secondary {
  background: transparent;
  color: #fff;
  border: 2px solid #fff;
}
.btn--secondary:hover { background: #fff; color: var(--color-navy); }

.btn--green {
  background: var(--color-green);
  color: #fff;
}
.btn--green:hover { background: var(--color-green-dark); }

.btn--sm {
  padding: 0.3rem 0.6rem;
  min-width: 0;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-teal);
  color: var(--color-teal);
  background: transparent;
  font-weight: 500;
}
.btn--sm:hover {
  background: var(--color-teal);
  border-color: var(--color-teal);
  color: #fff !important;
}

/* Access-all CTA (gradient pill) */
.btn--cta {
  background: linear-gradient(135deg, var(--color-red) 0%, var(--color-red-dark) 100%);
  color: #fff;
  font-size: 1.2rem;
  padding: 1.2rem 2.5rem;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}
.btn--cta:hover {
  background: linear-gradient(135deg, var(--color-red-dark) 0%, #a93226 100%);
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

/* ---------- Header ---------- */
.site-header {
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  padding: 0.5rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.3s ease;
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  gap: var(--space-5);
}
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.site-logo img { height: 50px; }
.site-logo__text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-heading);
}
.site-logo:hover { text-decoration: none; }

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex: 1;
  justify-content: flex-end;
}
.site-nav__links {
  display: flex;
  gap: 0.5rem;
}
.site-nav__links a {
  color: var(--color-teal);
  font-weight: 500;
  padding: 0.5rem 1rem;
  font-size: 1rem;
}
.site-nav__links a:hover {
  color: var(--color-teal-dark);
  text-decoration: none;
}
.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.social-icon {
  color: var(--color-teal);
  font-size: 1.4rem;
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
}
.social-icon svg { width: 20px; height: 20px; }
.social-icon:hover { color: var(--color-teal-dark); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-teal);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.6rem;
  color: var(--color-teal);
}

.site-header.is-scrolled {
  background: var(--color-header-scrolled);
  backdrop-filter: blur(10px);
}

/* ---------- Video modal ---------- */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.video-modal.is-open { display: flex; }
.video-modal__content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}
.video-modal__close {
  position: absolute;
  top: -40px;
  right: 0;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}
.video-modal__iframe {
  width: 800px;
  height: 450px;
  max-width: 90vw;
  max-height: 50vh;
  border: none;
}
@media (max-width: 768px) {
  .video-modal__iframe { width: 95vw; height: 53vw; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-blue) 100%);
  color: #fff;
  padding: 160px 0 80px;
  text-align: center;
}
.hero h1 {
  color: #fff;
  font-size: 3.2rem;
  margin-bottom: var(--space-3);
  font-weight: 700;
}
.hero__subtitle {
  font-size: 1.4rem;
  margin-bottom: var(--space-5);
  color: var(--color-text-on-dark);
  font-weight: 300;
}
.hero p.hero__desc {
  font-size: 1.2rem;
  margin-bottom: var(--space-6);
  opacity: 0.9;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero-search {
  max-width: 560px;
  margin: 0 auto var(--space-6);
  position: relative;
}
.hero-search__bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface);
  padding: var(--space-2);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}
.hero-search__bar svg {
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  margin-left: var(--space-2);
  flex-shrink: 0;
}
.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.7rem var(--space-2);
  font-size: 0.9375rem;
  color: var(--color-text);
  background: transparent;
}
.hero-search input::placeholder { color: var(--color-text-muted); }

.hero-search__results {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  z-index: 20;
  text-align: left;
}
.hero-search__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
}
.hero-search__item:last-child { border-bottom: none; }
.hero-search__item:hover { background: var(--color-bg); text-decoration: none; }
.hero-search__item-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
}
.hero-search__item-cat {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.hero-search__empty {
  padding: var(--space-4);
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
}
.hero-chips__label {
  font-size: 0.875rem;
  color: var(--color-text-on-dark);
  margin-right: var(--space-1);
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  color: #fff;
  font-weight: 500;
  background: rgba(255,255,255,0.08);
}
.chip:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.18);
  text-decoration: none;
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-5);
}

.hero__stats {
  display: flex;
  gap: var(--space-7);
  margin-top: var(--space-7);
  justify-content: center;
  flex-wrap: wrap;
}
.hero__stat-value {
  font-family: var(--font-heading);
  font-size: 1.9rem;
  font-weight: 700;
  color: #fff;
  display: block;
}
.hero__stat-label {
  font-size: 0.85rem;
  color: var(--color-text-on-dark);
}

/* ---------- Sections ---------- */
.section {
  padding: 80px 0;
}
.section--white { background: var(--color-surface); }
.section--gray { background: var(--color-bg); }

/* ---------- Software / calculator cards (image-top style) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: var(--space-6);
}

.showcase-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}
.showcase-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.showcase-card__image {
  height: 200px;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.showcase-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.showcase-card__body {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.showcase-card h3 {
  font-size: 1.4rem;
  margin-bottom: var(--space-3);
  color: var(--color-heading);
}
.showcase-card p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-5);
  line-height: 1.6;
  flex: 1;
  font-size: 0.95rem;
}
.showcase-card__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  align-items: center;
}

.showcase-card__price {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-blue);
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}
.showcase-card__price span {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.badge--free {
  background: #E7F3EB;
  color: var(--color-green-dark);
}
.badge--pro {
  background: #fdecea;
  color: var(--color-red-dark);
}
:root[data-theme="dark"] .badge--free {
  background: rgba(39, 174, 96, 0.18);
  color: #6fd39a;
}
:root[data-theme="dark"] .badge--pro {
  background: rgba(231, 76, 60, 0.18);
  color: #f29a90;
}

/* ---------- Category cards (structured, colored header) ---------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: var(--space-6);
}
.category-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
}
.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(52, 152, 219, 0.15);
  border-color: var(--color-blue);
}
.category-card__header {
  background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-dark) 100%);
  color: #fff;
  padding: var(--space-5) var(--space-4);
  text-align: center;
}
.category-card__header h3 {
  color: #fff;
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.category-card__count {
  font-size: 0.85rem;
  opacity: 0.9;
}
.category-card__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
  justify-content: center;
}
.category-card__icon {
  width: 40px;
  height: 40px;
  color: var(--color-blue);
}

/* ---------- Article cards ---------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: var(--space-6);
}
.article-card {
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-red);
}
.article-card__image {
  height: 200px;
  background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-border) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.article-card__image img { width: 100%; height: 100%; object-fit: cover; }
.article-count {
  background: var(--color-red);
  color: #fff;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: var(--space-3);
  display: inline-block;
}
.article-card h3 {
  font-size: 1.4rem;
  margin-bottom: var(--space-3);
}
.article-card p {
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
}
.article-callout {
  margin: var(--space-4) 0;
  padding: var(--space-4);
  background: var(--color-bg);
  border-radius: 8px;
  border-left: 4px solid var(--color-red);
}
.article-callout h5 { color: var(--color-heading); margin-bottom: var(--space-2); font-size: 1rem; }
.article-callout ul { padding-left: 1.2rem; color: var(--color-text-secondary); list-style: disc; }
.article-callout li { padding: 2px 0; font-size: 0.9rem; }

.more-content-box {
  text-align: center;
  margin-top: var(--space-7);
  padding: var(--space-6);
  background: rgba(15, 118, 153, 0.05);
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-border);
}
.more-content-box h3 { color: var(--color-teal); margin-bottom: var(--space-3); }
.more-content-box p { color: var(--color-text-secondary); font-size: 1.1rem; margin-bottom: var(--space-4); }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-top: var(--space-6);
}
.pricing-card {
  background: var(--color-surface);
  border: 3px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 2rem;
  text-align: center;
  position: relative;
  transition: all 0.3s;
}
.pricing-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.pricing-card--featured {
  border-color: var(--color-red);
  transform: scale(1.05);
  background: linear-gradient(135deg, #fff8f8 0%, #fff0f0 100%);
}
:root[data-theme="dark"] .pricing-card--featured {
  background: linear-gradient(135deg, rgba(231, 76, 60, 0.1) 0%, rgba(231, 76, 60, 0.04) 100%);
}
.pricing-card--featured::before {
  content: "MOST POPULAR";
  background: var(--color-red);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: bold;
  white-space: nowrap;
}
.pricing-title { font-size: 1.6rem; margin-bottom: var(--space-3); }
.pricing-price {
  font-size: 2.75rem;
  font-weight: bold;
  color: var(--color-blue);
  margin: var(--space-3) 0;
}
.pricing-price span { font-size: 1rem; font-weight: 500; color: var(--color-text-muted); }
.pricing-period { font-size: 0.95rem; color: var(--color-text-muted); margin-bottom: var(--space-3); }
.savings-badge {
  background: var(--color-green);
  color: #fff;
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: bold;
  margin: var(--space-3) 0;
  display: inline-block;
}
.pricing-features { margin: var(--space-5) 0; text-align: left; }
.pricing-features li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.9rem;
}
.pricing-features li::before {
  content: "✓  ";
  color: var(--color-green);
  font-weight: bold;
}

.risk-free-box {
  text-align: center;
  margin-top: var(--space-6);
  padding: var(--space-6);
  background: rgba(39, 174, 96, 0.1);
  border-radius: var(--radius-md);
}
.risk-free-box h3 { color: var(--color-green); margin-bottom: var(--space-2); }
.risk-free-box p { font-size: 1.1rem; color: var(--color-heading); margin-bottom: 0; }

/* ---------- Pricing split (calculators vs. software) ---------- */
.pricing-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: var(--space-6);
}
.pricing-split .pricing-card { text-align: left; }
.pricing-split .pricing-features { margin: var(--space-4) 0; }
.pricing-split .pricing-price span { display: block; font-size: 0.85rem; }
.pricing-card__note {
  margin-top: var(--space-5);
  padding: 1.25rem;
  text-align: left;
}
.pricing-card__note h3 {
  font-size: 1.05rem;
  margin-bottom: var(--space-2);
}
.pricing-card__note p {
  font-size: 0.9rem;
  margin-bottom: 0;
}
.pricing-card .btn { margin-top: var(--space-5); }

@media (max-width: 900px) {
  .pricing-split { grid-template-columns: 1fr; }
}

/* ---------- Final CTA ---------- */
.final-cta {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--color-blue) 0%, var(--color-blue-dark) 100%);
  color: #fff;
  text-align: center;
}
.final-cta h2 { font-size: 2.6rem; color: #fff; margin-bottom: var(--space-3); }
.final-cta > .container > p { font-size: 1.3rem; opacity: 0.9; margin-bottom: var(--space-5); }
.final-cta-box {
  background: rgba(255,255,255,0.1);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  margin: var(--space-6) 0;
}
.final-cta-box h3 { color: #fff; margin-bottom: var(--space-3); }
.final-cta-box p { font-size: 1.1rem; margin-bottom: var(--space-3); }
.final-cta-box .small { font-size: 1rem; opacity: 0.9; margin-bottom: 0; }
.final-cta .btn--primary { background: #fff; color: var(--color-blue); font-weight: bold; font-size: 1.2rem; padding: 1.1rem 2.5rem; }
.final-cta .btn--primary:hover { background: #f1f1f1; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-navy);
  color: #fff;
  padding: 40px 0;
  text-align: center;
}
.site-footer h3 { color: #fff; margin-bottom: var(--space-3); }
.site-footer p { margin: 0; }
.site-footer p + p { margin-top: 0.5rem; }
.site-footer .muted { opacity: 0.8; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .card-grid,
  .category-grid,
  .articles-grid,
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .site-nav__links { display: none; }
  .site-nav__links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    padding: var(--space-3) var(--space-5) var(--space-4);
    gap: 0;
  }
  .site-nav__links.is-open a {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
    width: 100%;
  }
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav__actions {
    flex-wrap: wrap;
  }
  .site-header .container { position: relative; }
}

@media (max-width: 768px) {
  .hero { padding: 140px 0 60px; }
  .hero h1 { font-size: 2.5rem; }
  .hero__subtitle { font-size: 1.2rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .section-title { font-size: 2rem; }
  .card-grid,
  .category-grid,
  .articles-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
  .pricing-card--featured { transform: scale(1); }
  .showcase-card__actions { flex-direction: column; }
  .btn { min-width: 100%; }
  .hero__stats { gap: var(--space-6); }
}

@media (max-width: 480px) {
  .container { padding: 0 15px; }
  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 2rem; }
  .section-title { font-size: 1.8rem; }
  .showcase-card__body,
  .category-card__body,
  .article-card,
  .pricing-card {
    padding: 1.5rem;
  }
}

/* ---------- Dark mode: pale status-tint overrides ----------
   Per-page <style> blocks across the calculators/articles use a
   recurring set of pale success/error/info background tints
   (#eafaf1 green, #fdecea red, #eaf5fb / #f4faff blue) meant for a white
   page. Overriding by class name here re-themes them everywhere at once
   without editing every page's inline <style> block individually. */
:root[data-theme="dark"] .results,
:root[data-theme="dark"] .success,
:root[data-theme="dark"] .max-value {
  background: rgba(39, 174, 96, 0.12) !important;
}
:root[data-theme="dark"] .error,
:root[data-theme="dark"] .critical-value {
  background: rgba(231, 76, 60, 0.14) !important;
}
:root[data-theme="dark"] .section-info,
:root[data-theme="dark"] .summary-section,
:root[data-theme="dark"] .summary-table th,
:root[data-theme="dark"] .article-callout {
  background: rgba(52, 152, 219, 0.12) !important;
}
:root[data-theme="dark"] .validation-box {
  background: rgba(39, 174, 96, 0.1);
}
:root[data-theme="dark"] .given-data {
  background: var(--color-bg);
}
