/* =============================================================
   MoneyWise Tools — styles.css
   1. Tokens  2. Reset  3. Utilities  4. Typography  5. Components
   6. Sections  7. Effects  8. Responsive  9. Reduced-motion  10. Print
   ============================================================= */

/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --border: #dde2e8;
  --text: #171b21;
  --text-muted: #5b6472;
  --text-faint: #8993a3;

  --accent: #0f6e5c;
  --accent-strong: #0a4f42;
  --accent-soft: #e3f3ee;
  --accent-contrast: #ffffff;

  --money: #0f6e5c;
  --shopping: #a8590e;
  --everyday: #2456a8;
  --work: #7a3ca8;
  --travel: #0f7fa8;

  --good: #16794f;
  --bad: #b6402a;
  --warn: #a8760e;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(18, 24, 33, 0.06);
  --shadow: 0 4px 16px rgba(18, 24, 33, 0.08);
  --shadow-lg: 0 12px 40px rgba(18, 24, 33, 0.12);

  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Manrope", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --header-h: 64px;
  --container: 1180px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --surface: #171b21;
    --surface-2: #1e232b;
    --border: #2a303a;
    --text: #edf0f4;
    --text-muted: #a7b0bd;
    --text-faint: #707a89;
    --accent: #35c9a5;
    --accent-strong: #2ea88a;
    --accent-soft: #16332c;
    --accent-contrast: #06120f;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.45);
  }
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
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; letter-spacing: -0.01em; font-family: var(--display); font-weight: 800; }
ul, ol { padding-left: 1.2em; }
::selection { background: var(--accent); color: var(--accent-contrast); }

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

/* =============================================================
   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;
}
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--accent); color: var(--accent-contrast);
  border-radius: 8px; font-weight: 600; transition: top .2s var(--ease-out);
}
.skip-link:focus { top: 1rem; }
.section { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.section-head { max-width: 62ch; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin-bottom: .5rem; }
.section-head p { color: var(--text-muted); font-size: 1.05rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .6rem;
}
.badge {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 600; padding: .3rem .65rem;
  border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong);
}
.text-muted { color: var(--text-muted); }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }
.gap-sm { gap: .5rem; } .gap { gap: 1rem; } .gap-lg { gap: 1.75rem; }

/* =============================================================
   4. Typography
   ============================================================= */
.h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.08; }
.lede { font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: var(--text-muted); max-width: 60ch; }
.prose { max-width: 72ch; color: var(--text); }
.prose h2 { font-size: 1.4rem; margin: 2rem 0 .75rem; }
.prose h3 { font-size: 1.15rem; margin: 1.5rem 0 .6rem; }
.prose p { margin-bottom: 1rem; color: var(--text-muted); }
.prose ul, .prose ol { margin-bottom: 1rem; color: var(--text-muted); }
.prose li { margin-bottom: .35rem; }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

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

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 500;
  height: var(--header-h);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
@supports not (backdrop-filter: blur(1px)) { .site-header { background: var(--surface); } }
.site-header .container { height: 100%; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-family: var(--display); font-weight: 800; font-size: 1.1rem; white-space: nowrap; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(145deg, var(--accent), var(--accent-strong)); color: #fff; font-size: .95rem; font-weight: 800;
}
.header-nav { display: none; align-items: center; gap: 1.25rem; margin-left: .5rem; font-weight: 600; font-size: .92rem; }
.header-nav a { color: var(--text-muted); padding: .3rem 0; border-bottom: 2px solid transparent; }
.header-nav a:hover, .header-nav a.is-active { color: var(--text); border-color: var(--accent); }
.header-search { flex: 1; max-width: 380px; margin-left: auto; position: relative; }
.header-search input {
  width: 100%; padding: .55rem .9rem .55rem 2.2rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface-2); font-size: .9rem;
}
.header-search input:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: var(--surface); }
.header-search svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-faint); pointer-events: none; }
.header-search-results {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-height: 60vh; overflow: auto; display: none; z-index: 600;
}
.header-search-results.is-open { display: block; }
.header-search-results a {
  display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; font-size: .9rem; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.header-search-results a:last-child { border-bottom: 0; }
.header-search-results a:hover, .header-search-results a.is-focused { background: var(--surface-2); }
.header-search-results .cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.header-search-empty { padding: .9rem; font-size: .85rem; color: var(--text-muted); }
.menu-toggle { display: inline-flex; margin-left: .25rem; }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.4rem; border-radius: var(--radius-sm); font-weight: 700; font-size: .95rem;
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out), background .15s var(--ease-out);
}
.btn-primary { background: var(--accent); color: var(--accent-contrast); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-strong); box-shadow: var(--shadow); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: scale(.98); }
.btn-block { width: 100%; }
.btn-sm { padding: .45rem .9rem; font-size: .82rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-weight: 700; font-size: .85rem; color: var(--text-muted);
  transition: all .15s var(--ease-out);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }

/* --- Cards --- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), border-color .18s var(--ease-out);
}
.calc-card {
  display: flex; flex-direction: column; gap: .6rem; padding: 1.15rem 1.25rem;
}
.calc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.calc-card .cat-tag { display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.calc-card .cat-dot { width: 7px; height: 7px; border-radius: 50%; }
.calc-card h3 { font-size: 1.02rem; font-weight: 700; font-family: var(--sans); letter-spacing: normal; }
.calc-card p { font-size: .85rem; color: var(--text-muted); }
.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }

.cat-card {
  padding: 1.5rem; display: flex; flex-direction: column; gap: .5rem;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat-card .cat-icon {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; margin-bottom: .35rem;
}
.cat-card h3 { font-size: 1.1rem; }
.cat-card p { font-size: .85rem; color: var(--text-muted); }
.cat-card .cat-count { font-size: .78rem; color: var(--text-faint); font-weight: 600; margin-top: .25rem; }

/* --- Tool card (calculator) --- */
.tool-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); padding: clamp(1.1rem, 3vw, 1.75rem);
}
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 720px) { .tool-grid.has-results { grid-template-columns: 1.05fr 1fr; align-items: start; } }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field label { font-size: .85rem; font-weight: 700; color: var(--text); }
.field .hint { font-size: .78rem; color: var(--text-faint); font-weight: 400; }
.field input[type="text"], .field input[type="number"], .field input[type="date"],
.field select, .field textarea {
  width: 100%; padding: .75rem .9rem; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--surface-2); font-size: 1rem; transition: border-color .15s, background .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); background: var(--surface); outline: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.input-prefix, .input-suffix { position: relative; }
.input-prefix input { padding-left: 1.9rem; }
.input-prefix::before {
  content: attr(data-prefix); position: absolute; left: .85rem; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); font-weight: 600; pointer-events: none;
}
.input-suffix input { padding-right: 2.2rem; }
.input-suffix::after {
  content: attr(data-suffix); position: absolute; right: .85rem; top: 50%; transform: translateY(-50%);
  color: var(--text-faint); font-weight: 600; pointer-events: none; font-size: .85rem;
}
.field-error { font-size: .78rem; color: var(--bad); font-weight: 600; min-height: 1em; }
.repeat-list { display: flex; flex-direction: column; gap: .6rem; margin-bottom: .75rem; }
.repeat-row { display: grid; grid-template-columns: 1fr 110px auto; gap: .5rem; align-items: center; }
.repeat-row input { padding: .6rem .75rem; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); color: var(--text-muted);
}
.icon-btn:hover { border-color: var(--bad); color: var(--bad); }

/* Results panel */
.results-panel {
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  border-radius: var(--radius); padding: 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .9rem;
}
.result-hero { text-align: center; padding-block: .35rem .5rem; }
.result-hero .value { font-family: var(--display); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--accent-strong); line-height: 1.1; }
.result-hero .label { font-size: .85rem; color: var(--text-muted); font-weight: 600; margin-top: .25rem; }
.result-rows { display: flex; flex-direction: column; gap: 0; border-top: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border)); }
.result-row {
  display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 15%, var(--border)); font-size: .92rem;
}
.result-row:last-child { border-bottom: 0; }
.result-row .k { color: var(--text-muted); }
.result-row .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.result-row.is-total .v { color: var(--accent-strong); font-size: 1.05rem; }
.result-row.is-positive .v { color: var(--good); }
.result-row.is-negative .v { color: var(--bad); }
.result-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.copy-feedback { font-size: .78rem; color: var(--good); font-weight: 700; }

.compare-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .compare-grid { grid-template-columns: 1fr 1fr; } }
.compare-col { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; background: var(--surface); }
.compare-col h4 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); margin-bottom: .6rem; }
.compare-col.is-winner { border-color: var(--accent); background: var(--accent-soft); }

.bar-chart { display: flex; flex-direction: column; gap: .5rem; }
.bar-row { display: flex; align-items: center; gap: .6rem; font-size: .82rem; }
.bar-row .bar-label { width: 92px; flex-shrink: 0; color: var(--text-muted); font-weight: 600; }
.bar-track { flex: 1; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--accent); transition: width .5s var(--ease-out); }
.bar-row .bar-value { width: 70px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }

.mini-chart-wrap { width: 100%; overflow-x: auto; }
.mini-chart-wrap canvas { display: block; width: 100%; max-width: 100%; }

.state-msg { display: none; padding: .9rem 1rem; border-radius: var(--radius-sm); font-size: .88rem; font-weight: 600; }
.state-msg.is-visible { display: block; }
.state-msg.error { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); }

/* Assumption / disclaimer note */
.note {
  display: flex; gap: .6rem; padding: .85rem 1rem; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warn) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--border));
  font-size: .82rem; color: var(--text); line-height: 1.5;
}
.note svg { flex-shrink: 0; width: 18px; height: 18px; color: var(--warn); margin-top: .1rem; }
.note.privacy { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, var(--border)); }
.note.privacy svg { color: var(--accent); }

/* --- FAQ --- */
.faq-list { display: flex; flex-direction: column; gap: .6rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.faq-item summary {
  padding: .95rem 1.1rem; font-weight: 700; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: .95rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--accent); font-weight: 400; flex-shrink: 0; transition: transform .2s var(--ease-out); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 1.1rem 1.1rem; color: var(--text-muted); font-size: .92rem; line-height: 1.6; }

/* --- Ad slots --- */
.ad-slot {
  display: flex; align-items: center; justify-content: center; text-align: center;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text-faint); font-size: .78rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; margin-inline: auto;
}
.ad-slot--banner { min-height: 90px; width: 100%; max-width: 728px; }
.ad-slot--incontent { min-height: 100px; width: 100%; }
.ad-slot--sidebar { min-height: 250px; width: 100%; max-width: 300px; position: sticky; top: calc(var(--header-h) + 16px); }
.ad-sidebar-col { display: none; }
@media (min-width: 1024px) { .ad-sidebar-col { display: block; width: 300px; flex-shrink: 0; } }
.ad-corner {
  position: fixed; right: 12px; bottom: 12px; z-index: 400;
  width: 160px; min-height: 60px; box-shadow: var(--shadow); background: var(--surface);
  border-radius: var(--radius-sm); padding-right: 1.6rem;
}
.ad-corner-close {
  position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--surface-2); font-size: .75rem; display: grid; place-items: center; color: var(--text-muted);
}
.ad-corner.is-hidden { display: none; }

/* --- Cookie consent banner --- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 800;
  background: var(--surface); border-top: 1px solid var(--border); box-shadow: var(--shadow-lg);
  padding: 1.25rem;
}
.cookie-banner.is-hidden { display: none; }
.cookie-banner-inner {
  max-width: var(--container); margin-inline: auto;
  display: flex; flex-direction: column; gap: 1rem;
}
.cookie-banner-text { font-size: .95rem; line-height: 1.6; color: var(--text); max-width: 70ch; }
.cookie-banner-text strong { display: block; font-size: 1.05rem; margin-bottom: .3rem; }
.cookie-banner-text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.cookie-banner-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.cookie-banner-actions .btn { flex: 1 1 160px; min-width: 140px; }
@media (min-width: 720px) {
  .cookie-banner-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .cookie-banner-actions { flex-wrap: nowrap; flex-shrink: 0; }
  .cookie-banner-actions .btn { flex: none; min-width: 130px; }
}

/* --- Popup dialog --- */
dialog.result-dialog {
  border: none; border-radius: var(--radius-lg); padding: 0; box-shadow: var(--shadow-lg);
  width: min(420px, 92vw); background: var(--surface); color: var(--text);
}
dialog.result-dialog::backdrop { background: rgba(10, 14, 20, .55); backdrop-filter: blur(2px); }
.dialog-inner { padding: 1.5rem; }
.dialog-close { position: absolute; top: .75rem; right: .75rem; width: 32px; height: 32px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 1rem; }
.dialog-inner h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.dialog-inner p { color: var(--text-muted); font-size: .9rem; margin-bottom: 1rem; }

/* --- Related tools --- */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .85rem; }

/* --- Breadcrumb --- */
.breadcrumb { font-size: .82rem; color: var(--text-faint); margin-bottom: 1rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); font-weight: 600; }
.breadcrumb a:hover { color: var(--accent); }

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

/* =============================================================
   6. Sections — homepage
   ============================================================= */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3rem); text-align: center; }
.hero-inner { max-width: 780px; margin-inline: auto; display: flex; flex-direction: column; align-items: center; gap: 1.1rem; }
.hero .h1 { max-width: 20ch; }
.search-hero { width: 100%; max-width: 520px; position: relative; margin-top: .5rem; }
.search-hero input {
  width: 100%; padding: 1rem 1.2rem 1rem 3rem; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--surface); font-size: 1.02rem; box-shadow: var(--shadow-sm);
}
.search-hero input:focus { border-color: var(--accent); outline: none; box-shadow: var(--shadow); }
.search-hero svg { position: absolute; left: 1.15rem; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-faint); }
.search-hero-results {
  position: absolute; top: calc(100% + 10px); left: 0; right: 0; text-align: left;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); max-height: 50vh; overflow: auto; display: none; z-index: 50;
}
.search-hero-results.is-open { display: block; }
.hero-stats { display: flex; gap: 1.75rem; flex-wrap: wrap; justify-content: center; margin-top: .5rem; }
.hero-stat { text-align: center; }
.hero-stat .n { font-family: var(--display); font-weight: 800; font-size: 1.4rem; color: var(--accent); }
.hero-stat .l { font-size: .78rem; color: var(--text-muted); }

.steps-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.step-card { padding: 1.4rem; text-align: left; }
.step-num {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-strong);
  display: grid; place-items: center; font-weight: 800; margin-bottom: .75rem;
}
.why-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
.why-card { padding: 1.3rem; }
.why-card svg { width: 26px; height: 26px; color: var(--accent); margin-bottom: .6rem; }
.why-card h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.why-card p { font-size: .88rem; color: var(--text-muted); }

.category-nav { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .5rem; margin-bottom: 1.5rem; scrollbar-width: thin; }
.category-nav .chip { flex-shrink: 0; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 720px) {
  .header-nav { display: flex; }
  .footer-grid { grid-template-columns: 1.3fr repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .why-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 719px) {
  .field-row { grid-template-columns: 1fr; }
  .menu-toggle { display: none; }
}

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

/* =============================================================
   10. Print
   ============================================================= */
@media print {
  .site-header, .site-footer, .ad-slot, .ad-corner, .cookie-banner, .header-search, .result-actions,
  .breadcrumb, dialog { display: none !important; }
  body { background: #fff; color: #000; }
}
