/*
 * DentalCalc Pro — Shared Stylesheet
 * ============================================================
 * Covers: design tokens, reset, typography, layout, header,
 * footer, breadcrumb, ad slots, tool panel, form elements,
 * results panel, sidebar, FAQ accordion, prose, related grid,
 * animations, dark mode, and full responsive breakpoints.
 *
 * Each tool page links this file and only adds its own
 * tool-specific styles in a small <style> block.
 * ============================================================
 */

/* ============================================================
   1. DESIGN TOKENS — LIGHT THEME
============================================================ */
:root {
  /* Backgrounds */
  --bg:             #f5f3ef;
  --bg-card:        #ffffff;
  --bg-alt:         #eceae4;

  /* Text */
  --text:           #1a1a18;
  --text-muted:     #6b6b62;
  --text-light:     #9b9b8f;

  /* Brand accent (green) */
  --accent:         #1a6b4a;
  --accent-light:   #e8f4ef;
  --accent-hover:   #145a3d;

  /* Semantic colours */
  --teal:           #0d9488;
  --amber:          #d97706;
  --amber-light:    #fef3c7;
  --red:            #dc2626;
  --red-light:      #fee2e2;
  --blue:           #3b82f6;
  --blue-light:     #eff6ff;
  --purple:         #8b5cf6;
  --purple-light:   #f5f3ff;
  --green:          #10b981;

  /* Borders & shadows */
  --border:         #dedad2;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.07);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.09);
  --shadow-lg:      0 12px 40px rgba(0,0,0,0.13);

  /* Shape */
  --radius:         12px;
  --radius-lg:      20px;
  --radius-xl:      28px;

  /* Typography */
  --font-display:   'DM Serif Display', Georgia, serif;
  --font-body:      'DM Sans', system-ui, -apple-system, sans-serif;

  /* Motion */
  --transition:     0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow:0.45s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --header-h:       68px;
  --max-w:          1280px;
  --col-gap:        2rem;
  --page-px:        1.5rem;
}

/* ============================================================
   2. DARK THEME
============================================================ */
[data-theme="dark"] {
  --bg:             #111210;
  --bg-card:        #1c1e1b;
  --bg-alt:         #161814;
  --text:           #f0ede7;
  --text-muted:     #a8a89a;
  --text-light:     #6b6b5e;
  --accent:         #2ecc8a;
  --accent-light:   #142b20;
  --accent-hover:   #26b578;
  --teal:           #14b8a6;
  --amber:          #f59e0b;
  --amber-light:    rgba(245,158,11,0.15);
  --red-light:      rgba(220,38,38,0.15);
  --blue-light:     rgba(59,130,246,0.12);
  --purple-light:   rgba(139,92,246,0.12);
  --border:         #2a2d28;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.30);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.40);
  --shadow-lg:      0 12px 40px rgba(0,0,0,0.55);
}

/* ============================================================
   3. 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 {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
}

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

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

button, select, input, textarea {
  font-family: inherit;
  font-size: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ============================================================
   4. ACCESSIBILITY
============================================================ */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%; left: 1rem;
  z-index: 9999;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: top 0.2s;
}
.skip-link:focus { top: 0.75rem; }

/* Focus ring */
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   5. TYPOGRAPHY SCALE
============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--text);
}

h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-family: var(--font-body); font-weight: 700; letter-spacing: -0.01em; }

p { line-height: 1.75; color: var(--text-muted); }

strong { font-weight: 700; color: var(--text); }

/* ============================================================
   6. HEADER
============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), border-color var(--transition);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--page-px);
  gap: 1rem;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-shrink: 0;
  text-decoration: none;
}

.logo-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition);
}

.logo-icon svg { width: 22px; height: 22px; fill: #fff; }

.logo-text {
  font-family: var(--font-display);
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}

.logo-text span { color: var(--accent); }

/* Primary nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  overflow: hidden;
}

.main-nav a {
  font-size: 0.855rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  background: var(--accent-light);
}

/* Header controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

/* Language selector */
.lang-select {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  height: 36px;
  -webkit-appearance: none;
  appearance: none;
}

.lang-select:hover { border-color: var(--accent); color: var(--accent); }

/* Theme toggle */
.theme-toggle {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.theme-toggle svg {
  width: 17px; height: 17px;
  fill: var(--text-muted);
  transition: fill var(--transition);
  flex-shrink: 0;
}

.theme-toggle:hover svg { fill: var(--accent); }

/* Hamburger */
.nav-toggle {
  display: none;
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  align-items: center; justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 17px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================================
   7. MOBILE NAV OVERLAY
============================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 800;
  background: var(--bg-card);
  padding: 1.5rem;
  flex-direction: column;
  gap: 0.4rem;
  overflow-y: auto;
  border-right: 1px solid var(--border);
}

.mobile-nav.open { display: flex; }

.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.mobile-nav-close {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
}

.mobile-nav-close:hover { background: var(--red-light); border-color: var(--red); color: var(--red); }

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  font-size: 0.935rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}

.mobile-nav a:hover { color: var(--accent); background: var(--accent-light); }
.mobile-nav a.active { color: var(--accent); background: var(--accent-light); font-weight: 600; }

/* ============================================================
   8. HEADER AD STRIP
============================================================ */
.ad-header-wrap {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 0.5rem var(--page-px);
  text-align: center;
}

/* ============================================================
   9. AD SLOTS (shared visual style)
============================================================ */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-light);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color var(--transition);
}

/* Standard sizes */
.ad-leaderboard {
  width: 100%; max-width: 728px;
  min-height: 90px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}

.ad-rectangle {
  width: 300px;
  min-height: 250px;
  padding: 0.5rem;
}

.ad-halfpage {
  width: 300px;
  min-height: 600px;
  padding: 0.5rem;
}

/* Placement wrappers */
.ad-wrap { padding: 1rem var(--page-px); text-align: center; }
.ad-wrap-alt { padding: 1rem var(--page-px); text-align: center; background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.ad-wrap-pre-btn { padding: 1.1rem 0; text-align: center; }
.ad-wrap-post-btn { padding: 1.1rem 0; text-align: center; }
.ad-wrap-content { padding: 1.5rem 0; text-align: center; }
.ad-wrap-prefooter { padding: 1.5rem var(--page-px); text-align: center; border-top: 1px solid var(--border); }

/* ============================================================
   10. BREADCRUMB
============================================================ */
.breadcrumb-wrap {
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.breadcrumb {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.8rem var(--page-px);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 0.78rem;
  color: var(--text-light);
}

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

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

.breadcrumb .bc-sep {
  color: var(--border);
  font-size: 0.9rem;
  user-select: none;
}

.breadcrumb .bc-current {
  color: var(--accent);
  font-weight: 600;
}

/* ============================================================
   11. PAGE HERO (category & tool pages)
============================================================ */
.page-hero {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 2.8rem var(--page-px) 2.4rem;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 90% 15%, rgba(26,107,74,0.06) 0%, transparent 55%),
    radial-gradient(circle at 5% 85%,  rgba(13,148,136,0.04) 0%, transparent 50%);
  pointer-events: none;
}

.page-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.page-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(26,107,74,0.2);
  border-radius: 100px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.9rem;
  margin-bottom: 0.9rem;
  transition: background var(--transition);
}

.page-hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.page-hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 620px;
  margin-bottom: 1.1rem;
}

/* Hero pills */
.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.hero-pill {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.22rem 0.7rem;
  white-space: nowrap;
}

/* ============================================================
   12. PAGE LAYOUT (main + sidebar grid)
============================================================ */
.page-layout {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem var(--page-px);
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--col-gap);
  align-items: start;
}

.page-layout-full {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem var(--page-px);
}

/* ============================================================
   13. TOOL PANEL
============================================================ */
.tool-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.tool-panel-header {
  padding: 1.2rem 1.6rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tool-panel-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
  line-height: 1.2;
}

.tool-panel-subtitle {
  font-size: 0.76rem;
  color: var(--text-light);
  margin-top: 0.15rem;
  font-weight: 500;
}

.tool-panel-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
}

.tool-panel-badge.new    { background: var(--green); }
.tool-panel-badge.pro    { background: var(--purple); }
.tool-panel-badge.hot    { background: var(--red); }

.tool-body {
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ============================================================
   14. FORM ELEMENTS
============================================================ */

/* Section label */
.form-section { display: flex; flex-direction: column; gap: 0.9rem; }

.form-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section-tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 4px;
  padding: 0.1rem 0.4rem;
  text-transform: none;
}

/* Grid rows */
.form-row         { display: grid; grid-template-columns: 1fr 1fr;       gap: 1rem; }
.form-row-3       { display: grid; grid-template-columns: 1fr 1fr 1fr;   gap: 1rem; }
.form-row-single  { display: grid; grid-template-columns: 1fr;           gap: 1rem; }

/* Group */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }

.form-label {
  font-size: 0.81rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  line-height: 1.3;
}

.form-label .lbl-opt {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-light);
}

.form-hint {
  font-size: 0.74rem;
  color: var(--text-light);
  line-height: 1.45;
}

/* Inputs & Selects */
.form-input,
.form-select {
  width: 100%;
  height: 44px;
  padding: 0 0.9rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.form-input:focus,
.form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,107,74,0.12);
}

.form-input.error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(220,38,38,0.1); }
.form-select.error { border-color: var(--red); }

.form-input::placeholder { color: var(--text-light); }

.form-error {
  font-size: 0.74rem;
  color: var(--red);
  display: none;
}

.form-error.show { display: block; }

/* Prefix / suffix wrappers */
.input-pw { position: relative; }
.input-pw .i-prefix {
  position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
  font-size: 0.85rem; color: var(--text-muted); pointer-events: none;
}
.input-pw .form-input { padding-left: 1.7rem; }

.input-sw { position: relative; }
.input-sw .i-suffix {
  position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%);
  font-size: 0.78rem; color: var(--text-muted); pointer-events: none; white-space: nowrap;
}
.input-sw .form-input { padding-right: 3.5rem; }

/* Textarea */
.form-textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem 0.9rem;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  resize: vertical;
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.55;
}
.form-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(26,107,74,0.12); }

/* Checkboxes */
.check-group { display: flex; flex-direction: column; gap: 0.55rem; }

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
}

.check-item input[type="checkbox"],
.check-item input[type="radio"] {
  width: 18px; height: 18px; min-width: 18px;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  background: var(--bg);
  cursor: pointer;
  accent-color: var(--accent);
  margin-top: 0.1rem;
}

.check-item-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.check-item-sub {
  font-size: 0.74rem;
  color: var(--text-light);
  line-height: 1.3;
}

/* Range slider */
.range-wrap { display: flex; flex-direction: column; gap: 0.35rem; }

.range-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.range-val {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 100%; height: 5px;
  border-radius: 3px;
  background: var(--border);
  outline: none;
  cursor: pointer;
  transition: background var(--transition);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2.5px solid var(--bg-card);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: transform var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type="range"]::-moz-range-thumb {
  width: 19px; height: 19px;
  border-radius: 50%;
  background: var(--accent);
  border: 2.5px solid var(--bg-card);
  cursor: pointer;
}

/* ============================================================
   15. BUTTONS
============================================================ */

/* Primary CTA */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  height: 52px;
  padding: 0 1.75rem;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 14px rgba(26,107,74,0.28);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,107,74,0.35);
}

.btn-primary:active { transform: translateY(0); }
.btn-primary svg { width: 19px; height: 19px; fill: currentColor; flex-shrink: 0; }

/* Full-width variant (calculate button) */
.btn-calc {
  width: 100%;
  height: 54px;
  border-radius: 13px;
}

/* Secondary */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 44px;
  padding: 0 1.25rem;
  border-radius: 10px;
  background: var(--bg-alt);
  color: var(--text);
  border: 1.5px solid var(--border);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* Reset */
.btn-reset {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.35rem 0.8rem;
  height: 34px;
  display: flex; align-items: center; gap: 0.35rem;
  transition: var(--transition);
}

.btn-reset:hover { border-color: var(--red); color: var(--red); }

/* Export buttons */
.export-btns {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.btn-export {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-card);
  transition: var(--transition);
  display: flex; align-items: center; gap: 0.35rem;
}

.btn-export:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}

/* Icon button (small square) */
.btn-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  font-size: 1rem;
  transition: var(--transition);
}

.btn-icon:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* Toggle pills (filter/mode) */
.toggle-group {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.toggle-pill {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.toggle-pill:hover { border-color: var(--accent); color: var(--accent); }
.toggle-pill.active { border-color: var(--accent); color: #fff; background: var(--accent); }

/* Duration buttons */
.dur-btn {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.32rem 0.8rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-card);
  cursor: pointer;
  transition: var(--transition);
}

.dur-btn:hover { border-color: var(--accent); color: var(--accent); }
.dur-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }

/* ============================================================
   16. RESULTS PANEL
============================================================ */
.results-panel {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
}

.results-panel.visible {
  display: flex;
  animation: rp-appear 0.42s ease;
}

@keyframes rp-appear {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.results-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
}

/* Summary cards (3-up) */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
}

.summary-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
  text-align: center;
}

.summary-card.hl { background: var(--accent-light); border-color: rgba(26,107,74,0.22); }
.summary-card.hl .sc-val { color: var(--accent); }

.sc-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

.sc-val {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text);
  line-height: 1.05;
}

.sc-sub {
  font-size: 0.7rem;
  color: var(--text-light);
  margin-top: 0.2rem;
  line-height: 1.3;
}

/* Alert bands */
.alert-band {
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.alert-band.ab-safe    { background: var(--accent-light); border: 1.5px solid rgba(26,107,74,0.22); }
.alert-band.ab-warn    { background: var(--amber-light);  border: 1.5px solid rgba(217,119,6,0.3); }
.alert-band.ab-danger  { background: var(--red-light);    border: 1.5px solid rgba(220,38,38,0.3); }
.alert-band.ab-info    { background: var(--blue-light);   border: 1.5px solid rgba(59,130,246,0.3); }

.ab-icon { font-size: 1.35rem; flex-shrink: 0; line-height: 1.2; }
.ab-title { font-weight: 700; font-size: 0.9rem; color: var(--text); margin-bottom: 0.2rem; }
.ab-text  { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; }

/* Progress bars */
.prog-wrap { display: flex; flex-direction: column; gap: 0.45rem; }
.prog-header { display: flex; align-items: center; justify-content: space-between; font-size: 0.79rem; }
.prog-header span:first-child { color: var(--text-muted); font-weight: 500; }
.prog-header span:last-child  { font-weight: 700; }

.prog-track {
  height: 10px;
  background: var(--bg-alt);
  border-radius: 100px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.prog-fill {
  height: 100%;
  border-radius: 100px;
  background: var(--accent);
  transition: width var(--transition-slow);
  width: 0;
}

.prog-fill.amber  { background: var(--amber); }
.prog-fill.red    { background: var(--red); }
.prog-fill.blue   { background: var(--blue); }
.prog-fill.purple { background: var(--purple); }

/* Generic breakdown table */
.breakdown-table { width: 100%; border-collapse: collapse; font-size: 0.845rem; }
.breakdown-table thead th {
  text-align: left;
  padding: 0.5rem 0.7rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-light);
  border-bottom: 2px solid var(--border);
  background: var(--bg-alt);
  white-space: nowrap;
}
.breakdown-table tbody td {
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  line-height: 1.45;
}
.breakdown-table tbody tr:last-child td { border-bottom: none; }
.breakdown-table tbody tr:hover td { background: var(--bg-alt); }
.breakdown-table tfoot td {
  padding: 0.7rem;
  font-weight: 700;
  font-size: 0.9rem;
  border-top: 2px solid var(--border);
}

.td-green  { color: var(--accent); font-weight: 600; }
.td-amber  { color: var(--amber); font-weight: 600; }
.td-red    { color: var(--red); font-weight: 600; }
.td-muted  { color: var(--text-muted); }
.td-light  { color: var(--text-light); font-style: italic; }
.td-bold   { font-weight: 700; color: var(--text); }

/* Chart wrapper */
.chart-wrap {
  position: relative;
  height: 260px;
}

/* Result disclaimer */
.result-disclaimer {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.65;
  padding: 0.9rem 1rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border-left: 3px solid var(--border);
}

.result-disclaimer strong { color: var(--text); }

/* ============================================================
   17. SIDEBAR
============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 1.2rem; }

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
}

.sidebar-widget-title {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.9rem;
}

/* Sidebar nav links */
.sidebar-links { display: flex; flex-direction: column; gap: 0.28rem; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.6rem;
  border-radius: 8px;
  font-size: 0.835rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.sidebar-link:hover { background: var(--accent-light); color: var(--accent); }
.sidebar-link.active { background: var(--accent-light); color: var(--accent); font-weight: 600; }

/* Cost / reference mini-table */
.ref-table { width: 100%; border-collapse: collapse; font-size: 0.79rem; }
.ref-table th {
  text-align: left; padding: 0.35rem 0.5rem;
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--text-light); border-bottom: 1px solid var(--border);
}
.ref-table td {
  padding: 0.44rem 0.5rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  line-height: 1.35;
}
.ref-table tr:last-child td { border-bottom: none; }
.ref-table .td-val { color: var(--accent); font-weight: 700; white-space: nowrap; }
.ref-table .td-none { color: var(--text-light); font-style: italic; }

/* Tip box */
.tip-box {
  background: var(--accent-light);
  border: 1px solid rgba(26,107,74,0.18);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.tip-box-head {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.tip-box p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   18. CATEGORY CARD GRID (index pages)
============================================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(272px, 1fr));
  gap: 1.2rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}

.category-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-color, var(--accent));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.category-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--cat-color, var(--accent));
  transform: translateY(-3px);
}

.cat-icon {
  width: 50px; height: 50px;
  border-radius: 14px;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  transition: transform var(--transition);
}

.category-card:hover .cat-icon { transform: scale(1.08); }

.cat-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text);
}

.cat-desc {
  font-size: 0.855rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
}

.cat-count {
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cat-count::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cat-color, var(--accent));
}

.cat-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--cat-color, var(--accent));
  transition: gap var(--transition);
}

.category-card:hover .cat-link { gap: 0.65rem; }

/* ============================================================
   19. TOOL CARDS (grid on category pages & homepage)
============================================================ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  cursor: pointer;
}

.tool-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

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

.tool-card:hover::after { transform: scaleX(1); }

.tc-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.6rem; }

.tc-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--accent-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  transition: transform var(--transition);
}

.tool-card:hover .tc-icon { transform: scale(1.08); }

.tc-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  padding: 0.15rem 0.42rem;
  flex-shrink: 0;
  align-self: flex-start;
}

.tc-badge.new    { background: var(--green); }
.tc-badge.pro    { background: var(--purple); }
.tc-badge.unique { background: var(--teal); }

.tc-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--text);
  line-height: 1.25;
}

.tc-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.tc-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  transition: gap var(--transition);
  margin-top: 0.2rem;
}

.tool-card:hover .tc-cta { gap: 0.6rem; }

/* ============================================================
   20. WHY / FEATURE CARDS
============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: box-shadow var(--transition);
}

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

.fc-icon { font-size: 1.6rem; }
.fc-title { font-weight: 700; font-size: 0.92rem; color: var(--text); }
.fc-desc  { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   21. TRUST STRIP
============================================================ */
.trust-strip {
  background: var(--accent);
  color: #fff;
  padding: 2.75rem var(--page-px);
  text-align: center;
}

.trust-strip h2 {
  color: #fff;
  margin-bottom: 0.7rem;
}

.trust-strip p {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.trust-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.trust-pill {
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.22);
  color: #fff;
  border-radius: 100px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
}

/* ============================================================
   22. FAQ ACCORDION
============================================================ */
.faq-list { display: flex; flex-direction: column; gap: 0.55rem; }

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1.15rem;
  font-size: 0.895rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  gap: 0.75rem;
  transition: color var(--transition), background var(--transition);
  border: none;
  background: none;
  line-height: 1.4;
}

.faq-q:hover,
.faq-q[aria-expanded="true"] {
  color: var(--accent);
  background: var(--accent-light);
}

.faq-chevron {
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  flex-shrink: 0;
  transition: transform var(--transition);
}

.faq-q[aria-expanded="true"] .faq-chevron { transform: rotate(180deg); }

.faq-a {
  display: none;
  padding: 0 1.15rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.faq-a.open { display: block; }

/* ============================================================
   23. PROSE / DOCUMENTATION SECTION
============================================================ */
.content-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--page-px) 3.5rem;
}

.prose { max-width: 840px; }

.prose h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  margin: 2.5rem 0 0.85rem;
  letter-spacing: -0.02em;
}

.prose h3 {
  font-size: 1.02rem;
  font-weight: 700;
  margin: 1.65rem 0 0.5rem;
  font-family: var(--font-body);
  letter-spacing: -0.01em;
}

.prose p {
  font-size: 0.945rem;
  line-height: 1.82;
  margin-bottom: 0.9rem;
  color: var(--text-muted);
}

.prose ul, .prose ol {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.75rem 0 1.1rem;
}

.prose li {
  font-size: 0.93rem;
  color: var(--text-muted);
  padding-left: 1.3rem;
  position: relative;
  line-height: 1.6;
}

.prose ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
}

.prose ol { counter-reset: prose-ol; }
.prose ol li { counter-increment: prose-ol; }
.prose ol li::before {
  content: counter(prose-ol) '.';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
}

.prose a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover { color: var(--accent-hover); }

/* ============================================================
   24. RELATED TOOLS GRID
============================================================ */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.related-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  transition: var(--transition);
  text-decoration: none;
}

.related-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.related-card strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.related-card span {
  font-size: 0.72rem;
  color: var(--text-light);
}

/* ============================================================
   25. SECTION WRAPPER UTILITIES
============================================================ */
.section {
  padding: 4rem var(--page-px);
}

.section-alt {
  background: var(--bg-alt);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.55rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 3.5vw, 2.5rem);
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

/* ============================================================
   26. EEAT / ABOUT SECTION
============================================================ */
.eeat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.eeat-text h2 { margin-bottom: 1rem; }
.eeat-text p  { margin-bottom: 0.75rem; }

.eeat-text ul {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.eeat-text li {
  font-size: 0.9rem;
  color: var(--text-muted);
  padding-left: 1.25rem;
  position: relative;
  line-height: 1.55;
}

.eeat-text li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.eeat-aside {
  background: var(--accent-light);
  border: 1px solid rgba(26,107,74,0.15);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.eeat-aside blockquote {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 1rem;
}

.eeat-aside cite {
  font-size: 0.83rem;
  color: var(--text-muted);
  font-style: normal;
}

/* ============================================================
   27. FOOTER
============================================================ */
.site-footer {
  background: var(--text);
  color: #d0cdc5;
  padding: 3.5rem var(--page-px) 1.5rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand { display: flex; flex-direction: column; gap: 0.75rem; }

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.footer-logo-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
}

.footer-logo-icon svg { width: 18px; height: 18px; fill: #fff; }
.footer-logo-text { font-family: var(--font-display); font-size: 1.1rem; color: #fff; }

.footer-tagline {
  font-size: 0.83rem;
  line-height: 1.65;
  opacity: 0.65;
  color: inherit;
}

.footer-col-title {
  font-weight: 700;
  font-size: 0.76rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.9rem;
}

.footer-links { display: flex; flex-direction: column; gap: 0.48rem; }

.footer-links a {
  font-size: 0.835rem;
  opacity: 0.65;
  transition: opacity var(--transition), color var(--transition);
  color: inherit;
}

.footer-links a:hover { opacity: 1; color: var(--accent); }

.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom-left {
  font-size: 0.77rem;
  opacity: 0.55;
  color: inherit;
  line-height: 1.5;
}

.footer-bottom-right {
  display: flex;
  gap: 1.25rem;
}

.footer-bottom-right a {
  font-size: 0.77rem;
  opacity: 0.55;
  transition: opacity var(--transition);
  color: inherit;
}

.footer-bottom-right a:hover { opacity: 1; }

/* ============================================================
   28. HOWTO STEPS (documentation)
============================================================ */
.howto-steps {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin: 1.2rem 0;
}

.howto-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  transition: box-shadow var(--transition);
}

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

.step-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-family: var(--font-body);
}

.step-body strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.step-body span {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ============================================================
   29. ANIMATIONS & KEYFRAMES
============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.82); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Reveal helper (applied by shared.js IntersectionObserver) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delay helpers */
.reveal:nth-child(2) { transition-delay: 0.07s; }
.reveal:nth-child(3) { transition-delay: 0.14s; }
.reveal:nth-child(4) { transition-delay: 0.21s; }
.reveal:nth-child(5) { transition-delay: 0.28s; }
.reveal:nth-child(6) { transition-delay: 0.35s; }
.reveal:nth-child(7) { transition-delay: 0.42s; }

/* ============================================================
   30. UTILITY CLASSES
============================================================ */
.text-accent  { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-light   { color: var(--text-light); }
.text-center  { text-align: center; }
.font-display { font-family: var(--font-display); }
.fw-700       { font-weight: 700; }
.italic       { font-style: italic; }

.d-flex       { display: flex; }
.ai-center    { align-items: center; }
.jc-between   { justify-content: space-between; }
.gap-sm       { gap: 0.5rem; }
.gap-md       { gap: 1rem; }
.gap-lg       { gap: 1.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

.rounded    { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }

.border-top    { border-top: 1px solid var(--border); }
.border-bottom { border-bottom: 1px solid var(--border); }

.bg-alt  { background: var(--bg-alt); }
.bg-card { background: var(--bg-card); }

/* ============================================================
   31. RESPONSIVE BREAKPOINTS
============================================================ */

/* ── 1024px — collapse sidebar, 2-col footer ── */
@media (max-width: 1024px) {
  .page-layout      { grid-template-columns: 1fr; }
  .sidebar          { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
  .eeat-grid        { grid-template-columns: 1fr; }
  .footer-inner     { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .categories-grid  { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ── 768px — mobile header, single-col sidebar ── */
@media (max-width: 768px) {
  :root { --page-px: 1rem; }

  .main-nav   { display: none; }
  .lang-select { display: none; }
  .nav-toggle { display: flex; }

  .sidebar         { grid-template-columns: 1fr; }
  .summary-cards   { grid-template-columns: 1fr 1fr; }
  .tools-grid      { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .features-grid   { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .related-grid    { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
  .form-row        { grid-template-columns: 1fr; }
  .form-row-3      { grid-template-columns: 1fr 1fr; }
  .section         { padding: 3rem var(--page-px); }
  .footer-inner    { grid-template-columns: 1fr 1fr; }
}

/* ── 480px — single column everything ── */
@media (max-width: 480px) {
  .summary-cards   { grid-template-columns: 1fr; }
  .form-row-3      { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr; }
  .tools-grid      { grid-template-columns: 1fr; }
  .related-grid    { grid-template-columns: 1fr 1fr; }
  .footer-inner    { grid-template-columns: 1fr; }
  .footer-bottom   { flex-direction: column; align-items: flex-start; }
  .export-btns     { flex-wrap: wrap; }
  .eeat-aside      { display: none; }
}

/* ── Print ── */
@media print {
  .site-header,
  .ad-header-wrap,
  .ad-wrap,
  .ad-wrap-alt,
  .ad-wrap-pre-btn,
  .ad-wrap-post-btn,
  .ad-wrap-content,
  .ad-wrap-prefooter,
  .sidebar,
  .site-footer,
  .btn-primary,
  .btn-reset,
  .btn-calc,
  .export-btns,
  .mobile-nav,
  .breadcrumb-wrap,
  .nav-toggle,
  .theme-toggle,
  .lang-select {
    display: none !important;
  }

  .page-layout    { grid-template-columns: 1fr; padding: 0; }
  .results-panel  { display: flex !important; }
  body            { background: #fff; color: #000; }
  .tool-panel     { box-shadow: none; border: none; }
}
