/* =============================================================
   HomeCalc — styles.css
   1. Tokens
   2. Reset & base
   3. Utilities
   4. Typography
   5. Components (buttons, cards, forms, nav, search)
   6. Sections (header, hero, categories, tool-card, ad-slots, faq, footer)
   7. Effects
   8. Responsive
   9. Reduced-motion
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #eef1f7;
  --text: #171b26;
  --text-muted: #5b6472;
  --border: #e2e5ec;
  --border-strong: #cbd1dd;
  --accent: #2451e0;
  --accent-hover: #1c3fb8;
  --accent-soft: #e8edfd;
  --accent-2: #e08a2c;
  --accent-2-soft: #fbeee0;
  --success: #1e8e5a;
  --success-soft: #e4f5ec;
  --danger: #d64545;
  --danger-soft: #fbe9e9;
  --focus: #2451e0;

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(23, 27, 38, 0.06);
  --shadow: 0 4px 16px rgba(23, 27, 38, 0.08);
  --shadow-lg: 0 12px 40px rgba(23, 27, 38, 0.14);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Sora", var(--sans);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --container: 1180px;
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10131c;
    --surface: #171b27;
    --surface-2: #1e2330;
    --text: #edeff5;
    --text-muted: #9aa2b3;
    --border: #2a2f3d;
    --border-strong: #3a4054;
    --accent: #5b82ff;
    --accent-hover: #7998ff;
    --accent-soft: #1c2646;
    --accent-2: #f0a94a;
    --accent-2-soft: #3a2c17;
    --success: #3ecb85;
    --success-soft: #123326;
    --danger: #f0685f;
    --danger-soft: #3a1c1c;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
  }
}
:root[data-theme="dark"] {
  --bg: #10131c;
  --surface: #171b27;
  --surface-2: #1e2330;
  --text: #edeff5;
  --text-muted: #9aa2b3;
  --border: #2a2f3d;
  --border-strong: #3a4054;
  --accent: #5b82ff;
  --accent-hover: #7998ff;
  --accent-soft: #1c2646;
  --accent-2: #f0a94a;
  --accent-2-soft: #3a2c17;
  --success: #3ecb85;
  --success-soft: #123326;
  --danger: #f0685f;
  --danger-soft: #3a1c1c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; color: inherit; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; font-family: var(--display); font-weight: 700; }
ul, ol { padding-left: 1.2em; }
::selection { background: var(--accent-soft); color: var(--accent); }

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--accent); color: #fff;
  z-index: 9999; border-radius: 8px; font-weight: 600;
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1.25rem; }
.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;
}
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-tight { padding-block: clamp(1.5rem, 3vw, 2.5rem); }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent);
}

/* =============================================================
   4. Typography
   ============================================================= */
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); letter-spacing: -0.01em; margin-bottom: .5rem; }
h3 { font-size: 1.15rem; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-muted); max-width: 62ch; }
.prose { max-width: 72ch; }
.prose p { margin-bottom: 1rem; color: var(--text-muted); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text); }

/* =============================================================
   5. Components
   ============================================================= */

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .95rem;
  transition: transform .15s var(--ease-out), background .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--accent); }
.btn-block { width: 100%; }
.btn-lg { padding: 1rem 1.6rem; font-size: 1.05rem; }
.btn:active { transform: scale(0.98); }

/* Card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Badge / pill */
.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .3rem .7rem; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
}
.pill-accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pill-soon { background: var(--surface-2); color: var(--text-muted); }

/* Forms */
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--text); }
.field .hint { font-size: .78rem; color: var(--text-muted); }
.field input[type="text"],
.field input[type="number"],
.field select {
  width: 100%;
  padding: .7rem .85rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  transition: border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input.is-invalid { border-color: var(--danger); }
.field .error-msg { display: none; font-size: .8rem; color: var(--danger); }
.field.has-error .error-msg { display: block; }
.field input::-webkit-outer-spin-button,
.field input::-webkit-inner-spin-button { opacity: 1; }
.checkbox-field { display: flex; align-items: center; gap: .6rem; }
.checkbox-field input { width: 18px; height: 18px; accent-color: var(--accent); }
.checkbox-field label { font-size: .92rem; font-weight: 500; }

.input-with-unit { position: relative; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Segmented control (unit selector, shape selector, mode toggle) */
.segmented {
  display: inline-flex; padding: .25rem; background: var(--surface-2);
  border-radius: var(--radius-sm); border: 1px solid var(--border); gap: .2rem; flex-wrap: wrap;
}
.segmented button {
  padding: .5rem 1rem; border-radius: 6px; font-size: .88rem; font-weight: 600;
  color: var(--text-muted); transition: background .15s var(--ease-out), color .15s var(--ease-out);
}
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

/* Nav */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 800; font-size: 1.2rem; color: var(--text); }
.logo svg { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav a { font-size: .92rem; font-weight: 600; color: var(--text-muted); }
.main-nav a:hover { color: var(--accent); }
.nav-toggle { display: none; }

/* Search */
.search-wrap { position: relative; flex: 1; max-width: 420px; }
.search-input {
  width: 100%; padding: .7rem 1rem .7rem 2.6rem; border-radius: 999px;
  border: 1.5px solid var(--border-strong); background: var(--surface); font-size: .95rem;
}
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.search-results {
  position: absolute; top: calc(100% + .5rem); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-height: 340px; overflow-y: auto; z-index: 50; display: none; padding: .4rem;
}
.search-results.is-open { display: block; }
.search-results a {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .65rem .8rem; border-radius: var(--radius-sm); font-size: .92rem; font-weight: 600;
}
.search-results a:hover, .search-results a.is-active { background: var(--accent-soft); color: var(--accent); }
.search-results .cat-tag { font-size: .75rem; font-weight: 600; color: var(--text-muted); }
.search-empty { padding: 1rem; font-size: .88rem; color: var(--text-muted); text-align: center; }

/* =============================================================
   6. Sections
   ============================================================= */

/* Hero */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem); text-align: center; }
.hero .eyebrow { justify-content: center; width: 100%; }
.hero h1 { margin-block: .75rem 1rem; max-width: 18ch; margin-inline: auto; }
.hero .lede { margin-inline: auto; margin-bottom: 2rem; }
.hero-search { max-width: 560px; margin-inline: auto; }
.hero-search .search-wrap { max-width: none; }
.hero-search .search-input { padding-block: 1rem; font-size: 1.05rem; }
.popular-tags { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1.25rem; }
.popular-tags a { font-size: .82rem; padding: .35rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); }
.popular-tags a:hover { color: var(--accent); border-color: var(--accent); }

/* Category / calculator grid */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.1rem; }
.category-card { padding: 1.4rem; display: flex; flex-direction: column; gap: .6rem; transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out); }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.category-card .icon-wrap {
  width: 44px; height: 44px; border-radius: var(--radius-sm); background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.category-card h3 { font-size: 1.05rem; }
.category-card ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .35rem; }
.category-card ul li a { font-size: .88rem; color: var(--text-muted); display: flex; align-items: center; gap: .4rem; }
.category-card ul li a:hover { color: var(--accent); }
.category-card .soon-list { font-size: .78rem; color: var(--text-muted); opacity: .75; }

.calc-card {
  padding: 1.3rem; display: flex; flex-direction: column; gap: .5rem;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), border-color .18s var(--ease-out);
}
.calc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.calc-card .cat-label { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--accent); }
.calc-card h3 { font-size: 1.05rem; }
.calc-card p { font-size: .88rem; color: var(--text-muted); }

/* How it works */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; counter-reset: step; }
.step { text-align: left; }
.step .step-num {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-family: var(--display);
  margin-bottom: .8rem;
}
.step h3 { font-size: 1rem; margin-bottom: .3rem; }
.step p { font-size: .9rem; color: var(--text-muted); }

/* Breadcrumb */
.breadcrumb { font-size: .82rem; color: var(--text-muted); display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; padding-block: 1rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .current { color: var(--text); font-weight: 600; }

/* Tool page header */
.tool-header { padding-block: 1.5rem 1rem; text-align: left; }
.tool-header h1 { max-width: none; margin-block: .4rem .5rem; }
.tool-header .lede { max-width: 68ch; }

/* Tool card */
.tool-card { padding: clamp(1.2rem, 3vw, 2rem); }
.tool-card-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 2rem; align-items: start; }
.tool-inputs { display: flex; flex-direction: column; gap: 1.1rem; }
.tool-inputs fieldset { border: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.tool-inputs legend { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); margin-bottom: .3rem; padding: 0; }
.tool-actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: .3rem; }

.tool-results {
  background: var(--surface-2); border-radius: var(--radius); padding: 1.4rem;
  position: sticky; top: calc(var(--header-h) + 1rem);
  display: flex; flex-direction: column; gap: .9rem;
}
.tool-results h2 { font-size: 1.05rem; }
.result-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding-block: .5rem; border-bottom: 1px dashed var(--border); }
.result-row:last-of-type { border-bottom: none; }
.result-row .label { font-size: .88rem; color: var(--text-muted); }
.result-row .value { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.result-hero { text-align: center; padding: 1rem 0 .5rem; }
.result-hero .value {
  display: block; font-family: var(--display); font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums;
}
.result-hero .label { font-size: .85rem; color: var(--text-muted); }
.result-note { font-size: .8rem; color: var(--text-muted); }
.result-error { display: none; background: var(--danger-soft); color: var(--danger); border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .88rem; }
.result-error.is-visible { display: block; }
.result-compare { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.result-compare .compare-col { background: var(--surface); border-radius: var(--radius-sm); padding: .9rem; border: 1px solid var(--border); }
.result-compare .compare-col h3 { font-size: .85rem; margin-bottom: .5rem; }

.privacy-badge { display: flex; align-items: flex-start; gap: .6rem; font-size: .84rem; color: var(--text-muted); margin-top: 1rem; }
.privacy-badge svg { flex-shrink: 0; color: var(--success); margin-top: .1rem; }

.no-js-note { display: none; background: var(--accent-2-soft); color: var(--accent-2); border-radius: var(--radius-sm); padding: 1rem; font-size: .9rem; }
.no-js .no-js-note { display: block; }
.no-js .tool-card-grid { display: none; }

/* Disclaimer box */
.disclaimer-box {
  display: flex; gap: .75rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm);
  background: var(--accent-2-soft); border: 1px solid color-mix(in srgb, var(--accent-2) 35%, transparent);
  font-size: .86rem; color: var(--text); margin-block: 1.5rem;
}
.disclaimer-box svg { flex-shrink: 0; color: var(--accent-2); margin-top: .15rem; }
.disclaimer-box strong { display: block; margin-bottom: .2rem; }

/* Ad slots */
.ad-slot {
  display: flex; align-items: center; justify-content: center;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: .8rem; font-weight: 600; letter-spacing: .03em;
  background: var(--surface-2); text-transform: uppercase;
}
.ad-leaderboard { min-height: 90px; margin-block: 1.5rem; }
.ad-in-content { min-height: 250px; margin-block: 2rem; }
.ad-sidebar { min-height: 250px; margin-top: 1rem; }
.ad-sticky-corner {
  position: fixed; bottom: 1rem; right: 1rem; width: 160px; height: 60px; z-index: 30;
  box-shadow: var(--shadow); background: var(--surface);
}
.ad-sticky-corner .ad-close {
  position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--text); color: var(--bg); display: flex; align-items: center; justify-content: center; font-size: .7rem;
}

/* Ad popup dialog */
.ad-dialog { border: none; border-radius: var(--radius); padding: 0; max-width: 420px; width: calc(100% - 2rem); box-shadow: var(--shadow-lg); }
.ad-dialog::backdrop { background: rgba(10, 12, 20, 0.5); }
.ad-dialog-inner { padding: 1.5rem; position: relative; }
.ad-dialog-close { position: absolute; top: .7rem; right: .7rem; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.ad-dialog .ad-slot { min-height: 200px; margin-top: 1rem; }

/* Cookie consent banner — deliberately prominent, not a tiny toast */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: 0 -8px 30px rgba(10, 12, 20, 0.18);
  transform: translateY(110%);
  transition: transform .35s var(--ease-out);
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner-inner {
  max-width: var(--container); margin-inline: auto; padding: 1.25rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.cookie-banner-text { flex: 1 1 380px; min-width: 0; }
.cookie-banner-text strong { display: block; font-size: 1.05rem; margin-bottom: .35rem; }
.cookie-banner-text p { font-size: .9rem; color: var(--text-muted); margin: 0; }
.cookie-banner-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.cookie-banner-actions { display: flex; gap: .75rem; flex-wrap: wrap; flex: 0 0 auto; }
.cookie-banner-actions .btn { min-width: 168px; }
@media (max-width: 719px) {
  .cookie-banner-inner { padding: 1.1rem; }
  .cookie-banner-actions { width: 100%; }
  .cookie-banner-actions .btn { flex: 1 1 0; min-width: 0; }
}

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: .75rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.faq-item summary {
  padding: 1rem 1.2rem; font-weight: 600; cursor: pointer; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chevron { transition: transform .2s var(--ease-out); flex-shrink: 0; color: var(--text-muted); }
.faq-item[open] summary .chevron { transform: rotate(180deg); }
.faq-item .faq-answer { padding: 0 1.2rem 1.1rem; font-size: .92rem; color: var(--text-muted); }

/* Related calculators */
.related-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.related-card { padding: 1.1rem; display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.related-card:hover { border-color: var(--accent); }
.related-card span { font-weight: 600; font-size: .92rem; }
.related-card svg { color: var(--accent); flex-shrink: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 2.5rem 1.5rem; background: var(--surface); margin-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.footer-col h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; color: var(--text-muted); margin-bottom: .8rem; }
.footer-col ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.footer-col ul a { font-size: .88rem; color: var(--text-muted); }
.footer-col ul a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-muted); }
.footer-disclaimer { font-size: .78rem; color: var(--text-muted); max-width: 90ch; margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }

/* Legal pages */
.legal-page .prose h2 { margin-top: 2rem; }
.legal-page .prose ul { margin-bottom: 1rem; color: var(--text-muted); }

/* =============================================================
   7. Effects
   ============================================================= */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (max-width: 959px) {
  .tool-card-grid { grid-template-columns: 1fr; }
  .tool-results { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 719px) {
  .main-nav { position: fixed; inset: var(--header-h) 0 0 0; background: var(--bg); flex-direction: column;
    align-items: flex-start; padding: 1.5rem; gap: 1rem; transform: translateX(100%); transition: transform .25s var(--ease-out);
    overflow-y: auto; }
  .main-nav.is-open { transform: translateX(0); }
  .nav-toggle { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; }
  .search-wrap { display: none; }
  .main-nav .search-wrap { display: block; max-width: none; width: 100%; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .form-row-2 { grid-template-columns: 1fr; }
  .result-compare { grid-template-columns: 1fr; }
  .ad-sticky-corner { width: 130px; height: 50px; }
}
@media (min-width: 720px) {
  .nav-toggle { display: none; }
}

/* =============================================================
   9. Reduced-motion (only intrusive effects)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
