*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --brand: #3C3FDE; --brand-dark: #2a2db8; --brand-darker: #1e2090;
  --brand-mid: #6366ef; --brand-50: #f0f0fe; --brand-100: #d4d5fb; --brand-200: #a9abf7;
  --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0;
  --slate-300: #cbd5e1; --slate-400: #94a3b8; --slate-500: #64748b;
  --slate-600: #475569; --slate-700: #334155; --slate-800: #1e293b; --slate-900: #0f172a;
  --white: #fff;
  --orange: #ea580c; --orange-bg: #fff7ed; --orange-light: #fed7aa;
  --green: #16a34a; --green-bg: #f0fdf4; --green-light: #bbf7d0;
  --purple: #7c3aed; --purple-bg: #faf5ff; --purple-light: #ddd6fe;
  --red: #e11d48; --red-bg: #fff1f2; --red-light: #fecdd3;
  --sky: #0284c7; --sky-bg: #f0f9ff; --sky-light: #bae6fd;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px;
}
html { scroll-behavior: smooth; }
body { font-family: 'Poppins', sans-serif; background: var(--slate-50); color: var(--slate-800); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4 { font-family: 'Space Grotesk', sans-serif; }

/* NAV */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--slate-200);
  padding: 0 2.5rem; height: 66px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo img { height: 36px; width: auto; }
.nav-logo { text-decoration: none; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a { font-size: .875rem; font-weight: 500; color: var(--slate-600); text-decoration: none; transition: color .2s; }
.nav-links a:hover { color: var(--brand); }
.nav-cta { background: var(--brand) !important; color: #fff !important; padding: 9px 22px; border-radius: var(--radius-sm); font-weight: 600 !important; }
.nav-cta:hover { background: var(--brand-dark) !important; }

/* HERO */
.tool-hero {
  background: linear-gradient(135deg, var(--brand-darker) 0%, var(--brand) 55%, var(--brand-mid) 100%);
  padding: 52px 2rem 48px; text-align: center; position: relative; overflow: hidden;
}
.tool-hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.04) 1px,transparent 1px), linear-gradient(90deg,rgba(255,255,255,0.04) 1px,transparent 1px);
  background-size: 40px 40px; pointer-events: none;
}
.tool-hero-inner { position: relative; }
.breadcrumb { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 18px; }
.breadcrumb a { font-size: .75rem; color: rgba(255,255,255,.6); text-decoration: none; }
.breadcrumb a:hover { color: rgba(255,255,255,.9); }
.breadcrumb span { font-size: .75rem; color: rgba(255,255,255,.4); }
.tool-hero h1 { font-size: clamp(1.7rem,4vw,2.5rem); font-weight: 700; color: #fff; letter-spacing: -.03em; line-height: 1.12; margin-bottom: 12px; }
.tool-hero h1 em { font-style: normal; color: #a5b4fc; }
.tool-hero p { font-size: .95rem; color: rgba(255,255,255,.7); max-width: 480px; margin: 0 auto 24px; line-height: 1.7; }
.hero-badges { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.85); font-size: .72rem; font-weight: 500; padding: 5px 12px; border-radius: 100px; }
.hero-badge svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* MAIN LAYOUT */
.calculator-wrap {
  max-width: 1200px; margin: 0 auto; padding: 48px 2.5rem;
  display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start;
}

/* STEP CARD */
.step-card {
  background: var(--white); border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg); margin-bottom: 20px; overflow: hidden;
}
.step-header {
  display: flex; align-items: center; gap: 14px; padding: 20px 24px;
  cursor: pointer; transition: background .2s; user-select: none;
}
.step-header:hover { background: var(--slate-50); }
.step-num {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand-50); border: 2px solid var(--brand-200);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  font-family: 'Space Grotesk', sans-serif; font-size: .8rem; font-weight: 700; color: var(--brand);
}
.step-num.done { background: var(--brand); border-color: var(--brand); color: #fff; }
.step-num.done::after { content: '✓'; }
.step-num.done .num-text { display: none; }
.step-title-wrap { flex: 1; }
.step-title { font-size: .95rem; font-weight: 600; color: var(--slate-900); letter-spacing: -.01em; }
.step-sub { font-size: .78rem; color: var(--slate-400); margin-top: 1px; }
.step-chevron { width: 18px; height: 18px; stroke: var(--slate-400); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; flex-shrink: 0; }
.step-chevron.open { transform: rotate(180deg); }
.step-body { padding: 0 24px 24px; border-top: 1px solid var(--slate-100); display: none; }
.step-body.open { display: block; padding-top: 20px; }

/* SERVICE ICON */
.service-icon-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.service-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--slate-200); background: var(--white);
  cursor: pointer; transition: all .2s; font-family: 'Poppins', sans-serif;
  font-size: .8rem; font-weight: 500; color: var(--slate-600);
}
.service-toggle:hover { border-color: var(--brand-200); color: var(--brand); }
.service-toggle.active { background: var(--brand-50); border-color: var(--brand); color: var(--brand); font-weight: 600; }
.service-toggle svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* FORM ELEMENTS */
.field-group { margin-bottom: 18px; }
.field-label { font-size: .8rem; font-weight: 600; color: var(--slate-700); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.field-label .tip { font-size: .72rem; font-weight: 400; color: var(--slate-400); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
input[type="number"], select {
  font-family: 'Poppins', sans-serif; font-size: .875rem;
  width: 100%; padding: 10px 12px;
  background: var(--slate-50); border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm); color: var(--slate-800); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
input[type="number"]:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(60,63,222,.08); background: var(--white); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; cursor: pointer; }
.input-prefix-wrap { position: relative; }
.input-prefix { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: .8rem; color: var(--slate-400); pointer-events: none; }
.input-prefix-wrap input { padding-left: 26px; }

/* SECTION DIVIDER */
.service-section { margin-top: 24px; padding-top: 20px; border-top: 1px dashed var(--slate-200); display: none; }
.service-section.visible { display: block; }
.service-section-title { display: flex; align-items: center; gap: 8px; font-family: 'Space Grotesk', sans-serif; font-size: .85rem; font-weight: 600; color: var(--slate-700); margin-bottom: 16px; }
.service-section-title .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* SLIDER */
.slider-wrap { margin-top: 6px; }
input[type="range"] { width: 100%; height: 6px; appearance: none; background: var(--slate-200); border-radius: 3px; outline: none; cursor: pointer; }
input[type="range"]::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(60,63,222,.3); cursor: pointer; }
.slider-labels { display: flex; justify-content: space-between; font-size: .72rem; color: var(--slate-400); margin-top: 4px; }

/* CALC BUTTON */
.calc-btn {
  width: 100%; padding: 14px;
  background: var(--brand); color: #fff;
  font-family: 'Space Grotesk', sans-serif; font-size: .95rem; font-weight: 700;
  border: none; border-radius: var(--radius-md); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .2s, transform .15s, box-shadow .15s;
  letter-spacing: -.01em; margin-top: 8px;
}
.calc-btn:hover { background: var(--brand-dark); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(60,63,222,.3); }
.calc-btn svg { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.reset-btn {
  width: 100%; padding: 10px; margin-top: 10px;
  background: transparent; color: var(--slate-500);
  font-family: 'Poppins', sans-serif; font-size: .82rem; font-weight: 500;
  border: 1.5px solid var(--slate-200); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.reset-btn:hover { border-color: var(--slate-300); color: var(--slate-700); }

/* RESULTS PANEL */
.results-panel { position: sticky; top: 82px; }

.results-card {
  background: var(--white); border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg); overflow: hidden;
}

.results-header {
  background: linear-gradient(135deg, var(--brand-darker), var(--brand));
  padding: 24px;
}
.results-header-label { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.65); margin-bottom: 8px; }
.results-total { font-family: 'Space Grotesk', sans-serif; font-size: 2.6rem; font-weight: 700; color: #fff; line-height: 1; }
.results-total span { font-size: 2.6rem; font-weight: 400; color: #ffffff; }
.results-subtext { font-size: .78rem; color: rgba(255,255,255,.6); margin-top: 6px; }

.results-body { padding: 20px 24px; }

.result-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--slate-100);
}
.result-row:last-child { border-bottom: none; }
.result-row-left { display: flex; align-items: center; gap: 10px; }
.result-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.result-name { font-size: .83rem; color: var(--slate-600); }
.result-amount { font-family: 'Space Grotesk', sans-serif; font-size: .88rem; font-weight: 600; color: var(--slate-800); }
.result-amount.zero { color: var(--slate-300); }

.results-empty {
  text-align: center; padding: 32px 20px; color: var(--slate-400);
  font-size: .85rem; line-height: 1.65;
}
.results-empty svg { width: 36px; height: 36px; stroke: var(--slate-300); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; margin: 0 auto 12px; display: block; }

/* ANNUAL TOGGLE */
.period-toggle {
  display: flex; background: var(--slate-100); border-radius: var(--radius-sm);
  padding: 3px; margin-bottom: 16px; width: 100%;
}
.period-btn {
  flex: 1; padding: 7px; font-family: 'Space Grotesk', sans-serif;
  font-size: .78rem; font-weight: 600; border: none; border-radius: 6px;
  cursor: pointer; background: transparent; color: var(--slate-500); transition: all .2s;
}
.period-btn.active { background: var(--white); color: var(--brand); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* SAVINGS TIPS */
.savings-card {
  background: var(--green-bg); border: 1.5px solid var(--green-light);
  border-radius: var(--radius-lg); padding: 20px; margin-top: 16px;
}
.savings-title { font-family: 'Space Grotesk', sans-serif; font-size: .85rem; font-weight: 700; color: var(--green); margin-bottom: 12px; display: flex; align-items: center; gap: 6px; }
.savings-title svg { width: 16px; height: 16px; stroke: var(--green); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.saving-item { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; font-size: .78rem; color: #166534; line-height: 1.5; }
.saving-item:last-child { margin-bottom: 0; }
.saving-item::before { content: '→'; font-weight: 700; flex-shrink: 0; margin-top: 0; }

/* FREE TIER BADGE */
.free-tier-note {
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 12px;
  font-size: .76rem; color: var(--brand-dark); display: flex; align-items: flex-start; gap: 8px;
}
.free-tier-note svg { width: 14px; height: 14px; stroke: var(--brand); fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 1px; }

/* REGION NOTE */

/* REGION SELECT */
.region-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.region-select {
  font-family: 'Poppins', sans-serif;
  font-size: .78rem;
  font-weight: 600;
  color: var(--slate-800);
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: 6px;
  padding: 5px 32px 5px 10px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s;
  min-width: 240px;
}
.region-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(60,63,222,.08);
}
.region-chevron {
  position: absolute;
  right: 10px;
  pointer-events: none;
  width: 14px;
  height: 14px;
  stroke: var(--slate-400);
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke .2s;
}
.region-select:focus + .region-chevron { stroke: var(--brand); }

.region-strip {
  background: var(--slate-100); border-radius: var(--radius-sm);
  padding: 10px 14px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--slate-600);
}
.region-strip svg { width: 14px; height: 14px; stroke: var(--slate-500); fill: none; stroke-width: 1.75; flex-shrink: 0; }

/* EXPORT */
.export-btn {
  width: 100%; padding: 10px; margin-top: 12px;
  background: var(--slate-900); color: #fff;
  font-family: 'Space Grotesk', sans-serif; font-size: .82rem; font-weight: 600;
  border: none; border-radius: var(--radius-sm); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s; display: none;
}
.export-btn.visible { display: flex; }
.export-btn:hover { background: var(--brand); }
.export-btn svg { width: 15px; height: 15px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* COMPARISON */
.comparison-section {
  background: var(--white); border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-lg); padding: 28px 24px; margin-top: 20px;
}
.comparison-title { font-size: .95rem; font-weight: 700; color: var(--slate-900); margin-bottom: 4px; letter-spacing: -.01em; }
.comparison-sub { font-size: .8rem; color: var(--slate-500); margin-bottom: 20px; }
.comparison-bars { display: flex; flex-direction: column; gap: 14px; }
.compare-row { }
.compare-label { font-size: .78rem; font-weight: 500; color: var(--slate-600); margin-bottom: 5px; display: flex; justify-content: space-between; }
.compare-bar-track { height: 10px; background: var(--slate-100); border-radius: 100px; overflow: hidden; }
.compare-bar-fill { height: 100%; border-radius: 100px; transition: width .6s ease; }

/* FAQ */
.faq-section { max-width: 1200px; margin: 0 auto; padding: 0 2.5rem 64px; }
.faq-title { font-size: 1.3rem; font-weight: 700; color: var(--slate-900); margin-bottom: 20px; letter-spacing: -.02em; }
.faq-item { border-bottom: 1px solid var(--slate-200); }
.faq-q { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--slate-800); gap: 16px; }
.faq-q svg { width: 18px; height: 18px; stroke: var(--slate-400); fill: none; stroke-width: 2; flex-shrink: 0; transition: transform .2s; }
.faq-q.open svg { transform: rotate(180deg); }
.faq-a { font-size: .855rem; color: var(--slate-500); line-height: 1.75; padding-bottom: 16px; display: none; }
.faq-a.open { display: block; }

/* FOOTER */
footer { background: var(--slate-900); border-top: 1px solid rgba(255,255,255,.06); padding: 40px 2.5rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-logo img { height: 30px; filter: brightness(0) invert(1); opacity: .85; }
.footer-links { display: flex; gap: 1.75rem; list-style: none; flex-wrap: wrap; }
.footer-links a { font-size: .84rem; color: rgba(255,255,255,.42); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: rgba(255,255,255,.8); }
.footer-bottom { max-width: 1200px; margin: 24px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy,.footer-tagline { font-size: .78rem; color: rgba(255,255,255,.28); }

/* RESPONSIVE */
@media (max-width: 980px) { .calculator-wrap { grid-template-columns: 1fr; } .results-panel { position: static; } }
@media (max-width: 600px) { nav { padding: 0 1.25rem; } .nav-links { display: none; } .tool-hero { padding: 40px 1.25rem 36px; } .calculator-wrap { padding: 32px 1.25rem; } .faq-section { padding: 0 1.25rem 48px; } .field-row, .field-row-3 { grid-template-columns: 1fr; } footer { padding: 36px 1.25rem; } }
