/* ============ VARIABLES & RESET ============ */
:root {
  --font-head: 'Outfit', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Light theme */
  --bg: #f6f9fc;
  --bg-soft: #eef3f8;
  --card: #ffffff;
  --card-2: #fafcff;
  --text: #0f172a;
  --text-soft: #475569;
  --muted: #64748b;
  --border: #e2e8f0;
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-light: #dcfce7;
  --accent: #0ea5e9;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --header-h: 68px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0a0f1a;
  --bg-soft: #0e1524;
  --card: #131c2e;
  --card-2: #18233a;
  --text: #e8eef7;
  --text-soft: #b4c2d6;
  --muted: #8896aa;
  --border: #1f2c44;
  --primary: #22c55e;
  --primary-dark: #16a34a;
  --primary-light: #0e2b1c;
  --accent: #38bdf8;
  --danger: #f87171;
  --danger-light: #2a1414;
  --warning: #fbbf24;
  --warning-light: #2a1f0a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1, h2, h3, h4, h5 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--text); }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary); }
ul { list-style: none; }
img, svg { max-width: 100%; display: block; }

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select { font-family: inherit; font-size: 1rem; }

::selection { background: var(--primary); color: #fff; }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 9999;
  background: var(--primary); color: #fff; padding: 10px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; font-weight: 600; font-size: 0.95rem;
  border-radius: var(--radius-sm); border: 1.5px solid transparent;
  transition: all var(--transition); white-space: nowrap; cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(22, 163, 74, 0.35); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none !important; }

.btn-spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff; border-radius: 50%; display: none;
  animation: spin 0.7s linear infinite;
}
.btn.loading .btn-spinner { display: inline-block; }
.btn.loading .btn-label { opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--card); border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 16px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: var(--text); }
.logo-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.logo-text { letter-spacing: -0.02em; }

.main-nav { display: flex; align-items: center; gap: 8px; }
.nav-list { display: flex; align-items: center; gap: 4px; }
.nav-list > li > a, .nav-list .dropdown-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 9px 14px; border-radius: 10px; font-weight: 500; font-size: 0.95rem;
  color: var(--text-soft); background: transparent; transition: all var(--transition);
}
.nav-list > li > a:hover, .nav-list .dropdown-trigger:hover { color: var(--primary); background: var(--primary-light); }
.nav-list .chevron { transition: transform var(--transition); }
.has-dropdown.open .chevron { transform: rotate(180deg); }
.nav-cta { background: var(--primary); color: #fff !important; }
.nav-cta:hover { background: var(--primary-dark); color: #fff !important; }

.dropdown-menu {
  position: absolute; top: 100%; left: 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 18px; min-width: 460px; opacity: 0; visibility: hidden;
  transform: translateY(8px); transition: all var(--transition); z-index: 110;
}
.has-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu.mega { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dropdown-col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 10px; font-family: var(--font-body); font-weight: 700; }
.dropdown-col ul { display: flex; flex-direction: column; gap: 2px; }
.dropdown-col a { display: block; padding: 8px 10px; border-radius: 8px; font-size: 0.92rem; color: var(--text-soft); }
.dropdown-col a:hover { background: var(--primary-light); color: var(--primary); }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card-2); color: var(--text); display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.nav-toggle { display: none; width: 40px; height: 40px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-2); }
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ============ BREADCRUMB ============ */
.breadcrumb { background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; padding: 12px 0; font-size: 0.86rem; color: var(--muted); }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb a { color: var(--text-soft); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 8px; color: var(--muted); }
.breadcrumb li[aria-current="page"] { color: var(--primary); font-weight: 500; }

/* ============ HERO ============ */
.hero { padding: 56px 0 64px; background:
  radial-gradient(circle at 20% 20%, rgba(34, 197, 94, 0.12), transparent 50%),
  radial-gradient(circle at 80% 30%, rgba(14, 165, 233, 0.1), transparent 50%);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.badge { display: inline-block; padding: 6px 14px; background: var(--primary-light); color: var(--primary-dark); border-radius: 999px; font-size: 0.8rem; font-weight: 600; margin-bottom: 18px; }
[data-theme="dark"] .badge { color: var(--primary); }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); letter-spacing: -0.02em; margin-bottom: 18px; }
.hero h1 .accent { background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.1rem; color: var(--text-soft); margin-bottom: 26px; max-width: 560px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stats > div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-head); font-size: 1.6rem; color: var(--primary); }
.hero-stats span { font-size: 0.82rem; color: var(--muted); }
.hero-visual { display: flex; justify-content: center; }
.hero-visual svg { width: 100%; max-width: 420px; color: var(--text); }

/* ============ SECTION HEAD ============ */
.section-head { text-align: center; max-width: 680px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 10px; letter-spacing: -0.02em; }
.section-head p { color: var(--text-soft); font-size: 1.05rem; }

/* ============ CALCULATOR ============ */
.calculator-section { padding: 64px 0; }
.calculator-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 36px; box-shadow: var(--shadow);
  max-width: 920px; margin: 0 auto;
}
#calcForm { display: flex; flex-direction: column; gap: 22px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-group legend, .form-group label { font-weight: 600; font-size: 0.92rem; color: var(--text); }
.req { color: var(--danger); }
.hint { font-size: 0.8rem; color: var(--muted); }
.error-text { color: var(--danger); font-size: 0.82rem; min-height: 1em; font-weight: 500; }

input[type="number"], input[type="text"], select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); background: var(--card-2); color: var(--text);
  font-size: 1rem; transition: all var(--transition);
}
input:focus, select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
input.invalid, select.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-light); }

.select-wrap { position: relative; }
.select-wrap select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.select-chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--muted); }

.input-with-toggle { display: flex; gap: 8px; align-items: stretch; }
.input-with-toggle input { flex: 1; min-width: 0; }
.unit-toggle { display: inline-flex; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--card-2); }
.unit-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.unit-toggle label { padding: 10px 12px; font-size: 0.85rem; font-weight: 600; color: var(--muted); cursor: pointer; transition: all var(--transition); white-space: nowrap; }
.unit-toggle input:checked + label { background: var(--primary); color: #fff; }

.segmented { display: inline-flex; background: var(--card-2); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 4px; gap: 4px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { padding: 8px 18px; font-size: 0.9rem; font-weight: 600; color: var(--muted); border-radius: 8px; cursor: pointer; transition: all var(--transition); }
.segmented input:checked + label { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }

.form-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding-top: 8px; border-top: 1px solid var(--border); }
.form-note { font-size: 0.85rem; color: var(--muted); }

/* ============ RESULT ============ */
.result-section { padding: 56px 0 64px; background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); animation: fadeUp 0.5s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.result-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 16px; margin-bottom: 28px;
}
.result-hero-card {
  grid-row: span 2; background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff; border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center; box-shadow: var(--shadow);
}
.rating-badge {
  width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,0.2);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.8rem; margin-bottom: 14px;
  border: 2px solid rgba(255,255,255,0.4);
}
.rating-badge.r-bad { background: rgba(220, 38, 38, 0.4); border-color: rgba(255,255,255,0.6); }
.rating-badge.r-ok { background: rgba(217, 119, 6, 0.4); border-color: rgba(255,255,255,0.6); }
.result-hero-num { display: flex; flex-direction: column; align-items: center; }
.result-hero-num span { font-family: var(--font-head); font-weight: 800; font-size: 3.2rem; line-height: 1; }
.result-hero-num small { font-size: 0.92rem; opacity: 0.9; margin-top: 6px; }
#resultSubtext { opacity: 0.9; font-size: 0.9rem; margin-top: 12px; }

.result-stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-sm);
}
.stat-label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.stat-value { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; color: var(--text); }

.result-visuals { display: grid; grid-template-columns: 1.3fr 1fr; gap: 20px; margin-bottom: 28px; }
.chart-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow-sm); }
.chart-card h3 { font-size: 1.15rem; margin-bottom: 6px; }
.chart-card .muted { color: var(--muted); font-size: 0.88rem; margin-bottom: 16px; }
.chart-wrap { position: relative; height: 320px; }

.tips-list { display: flex; flex-direction: column; gap: 12px; }
.tips-list li {
  display: flex; gap: 12px; padding: 12px 14px; background: var(--card-2);
  border-radius: var(--radius-sm); border: 1px solid var(--border); font-size: 0.92rem;
}
.tips-list li::before { content: "→"; color: var(--primary); font-weight: 700; flex-shrink: 0; }

.result-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; padding: 20px; background: var(--card); border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }

/* ============ OTHER CALCS ============ */
.other-calcs { padding: 64px 0; background: var(--bg); }
.calc-links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.calc-links-grid a {
  display: block; padding: 14px 16px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 0.9rem; color: var(--text-soft); transition: all var(--transition);
}
.calc-links-grid a:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-sm); }

/* ============ FEATURES ============ */
.features { padding: 64px 0; background: var(--bg-soft); }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm); transition: all var(--transition);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px; background: var(--primary-light);
  color: var(--primary); display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { color: var(--text-soft); font-size: 0.95rem; }

/* ============ HOW IT WORKS ============ */
.how-it-works { padding: 64px 0; }
.steps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; counter-reset: step; }
.steps-grid li { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; position: relative; box-shadow: var(--shadow-sm); }
.step-num {
  width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; margin-bottom: 14px;
}
.steps-grid h3 { font-size: 1.1rem; margin-bottom: 8px; }
.steps-grid p { color: var(--text-soft); font-size: 0.95rem; }

/* ============ SEO CONTENT ============ */
.seo-content { padding: 64px 0; background: var(--bg-soft); }
.seo-content h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 18px; }
.seo-content p { color: var(--text-soft); margin-bottom: 16px; font-size: 1rem; }
.seo-content strong { color: var(--text); font-weight: 600; }

/* ============ FAQ ============ */
.faq { padding: 64px 0; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.faq-item summary {
  padding: 18px 22px; font-family: var(--font-head); font-weight: 600; font-size: 1.05rem;
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); font-weight: 400; transition: transform var(--transition); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item[open] summary { color: var(--primary); }
.faq-answer { padding: 0 22px 20px; color: var(--text-soft); }

/* ============ CTA ============ */
.cta-section { padding: 56px 0; }
.cta-card {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-lg); padding: 48px 36px; text-align: center; color: #fff;
  box-shadow: var(--shadow-lg);
}
.cta-card h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 10px; }
.cta-card p { opacity: 0.95; margin-bottom: 24px; font-size: 1.05rem; }
.cta-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta-card .btn-primary { background: #fff; color: var(--primary); }
.cta-card .btn-primary:hover { background: #f1f5f9; }
.cta-card .btn-ghost { border-color: rgba(255,255,255,0.6); color: #fff; }
.cta-card .btn-ghost:hover { background: rgba(255,255,255,0.15); color: #fff; border-color: #fff; }

/* ============ FOOTER ============ */
.site-footer { background: var(--card); border-top: 1px solid var(--border); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin-bottom: 14px; }
.disclaimer { font-size: 0.78rem !important; color: var(--muted); border-left: 3px solid var(--border); padding-left: 12px; line-height: 1.5; }
.footer-col h4 { font-size: 0.95rem; margin-bottom: 14px; color: var(--text); }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col a { color: var(--muted); font-size: 0.88rem; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 0.85rem; }

/* ============ COOKIE BANNER ============ */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 18px 22px; max-width: 560px; margin: 0 auto;
  animation: fadeUp 0.4s ease;
}
.cookie-content { display: flex; flex-direction: column; gap: 14px; }
.cookie-content p { font-size: 0.88rem; color: var(--text-soft); }
.cookie-content a { color: var(--primary); text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ============ FAB ============ */
.feedback-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 150;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff; padding: 12px 18px; border-radius: 999px;
  font-weight: 600; font-size: 0.9rem; box-shadow: var(--shadow-lg);
  transition: all var(--transition);
}
.feedback-fab:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px) scale(1.03); }

/* ============ TOAST ============ */
.toast-container { position: fixed; top: 84px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast {
  background: var(--card); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm); padding: 14px 18px; box-shadow: var(--shadow);
  font-size: 0.9rem; animation: slideIn 0.3s ease;
}
.toast.error { border-left-color: var(--danger); }
.toast.success { border-left-color: var(--primary); }
.toast.fade-out { animation: slideOut 0.3s ease forwards; }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOut { to { opacity: 0; transform: translateX(20px); } }

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto; }
  .result-grid { grid-template-columns: 1fr 1fr; }
  .result-hero-card { grid-column: span 2; grid-row: auto; }
  .result-visuals { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .nav-list {
    position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--card); padding: 16px; overflow-y: auto;
    transform: translateX(100%); transition: transform var(--transition);
    border-top: 1px solid var(--border); z-index: 99;
  }
  .nav-list.open { transform: translateX(0); }
  .nav-list > li { width: 100%; }
  .nav-list > li > a, .nav-list .dropdown-trigger { width: 100%; justify-content: space-between; padding: 14px; }
  .dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding: 8px 0 8px 16px; min-width: 0;
    background: transparent; display: none;
  }
  .has-dropdown.open .dropdown-menu { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .dropdown-col a { padding: 10px 12px; }
  .grid-2 { grid-template-columns: 1fr; }
  .calculator-card { padding: 22px; }
  .result-grid { grid-template-columns: 1fr; }
  .result-hero-card { grid-column: span 1; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-brand { grid-column: span 1; }
  .hero-stats { gap: 18px; }
  .feedback-fab span { display: none; }
  .feedback-fab { padding: 12px; }
  .toast-container { left: 16px; right: 16px; max-width: none; }
  .cookie-banner { left: 8px; right: 8px; bottom: 8px; }
}

@media (max-width: 480px) {
  .hero { padding: 36px 0; }
  .hero h1 { font-size: 1.9rem; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-stats { gap: 14px; }
  .hero-stats strong { font-size: 1.3rem; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .btn { width: 100%; }
  .result-actions { flex-direction: column; }
  .result-actions .btn { width: 100%; }
  .calculator-card, .chart-card { padding: 18px; }
  .cta-card { padding: 32px 20px; }
  .cta-buttons { flex-direction: column; }
  .cta-buttons .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}