/* ============================================================
   CRECE TU DINERO — styles.css
   ============================================================ */

/* Variables */
:root {
  --primary: #16a34a;
  --primary-dark: #15803d;
  --primary-light: #dcfce7;
  --primary-lighter: #f0fdf4;
  --accent: #22c55e;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --bg: #ffffff;
  --bg-gray: #f9fafb;
  --bg-dark: #111827;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04);
  --radius-sm: 4px;
  --radius: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --transition: .2s ease;
  --max-width: 1200px;
  --header-h: 64px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
button, input, select, textarea { font-family: var(--font); }
button { cursor: pointer; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 { line-height: 1.3; color: var(--text); font-weight: 700; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.25rem); }

/* ── Layout ── */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }
main { flex: 1; }
.section { padding: 3rem 0; }
.section-lg { padding: 4rem 0; }

/* ── Skip link ── */
.skip-link { position: absolute; top: -40px; left: 0; background: var(--primary); color: #fff; padding: 8px 16px; z-index: 999; border-radius: 0 0 var(--radius) 0; font-weight: 600; }
.skip-link:focus { top: 0; }

/* ──────────────────────────────────────
   HEADER & NAV
   ────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm); height: var(--header-h); }
.site-header > .container { height: 100%; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; min-height: var(--header-h); }

.logo { font-size: 1.2rem; font-weight: 800; color: var(--text); display: flex; align-items: center; gap: .25rem; white-space: nowrap; }
.logo:hover { color: var(--primary); }

.site-nav { display: none; }
@media (min-width: 768px) { .site-nav { display: flex; align-items: center; gap: .125rem; height: 100%; } }

.nav-link { display: inline-flex; align-items: center; gap: .35rem; line-height: 1; padding: .5rem .75rem; border-radius: var(--radius); font-size: .875rem; font-weight: 500; color: var(--text-muted); transition: all var(--transition); white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: var(--primary); background: var(--primary-lighter); }

/* Hamburger */
.hamburger { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; background: none; border: none; padding: 8px; border-radius: var(--radius); transition: background var(--transition); }
.hamburger:hover { background: var(--bg-gray); }
@media (min-width: 768px) { .hamburger { display: none; } }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .3s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu { display: none; position: fixed; top: var(--header-h); left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); z-index: 99; padding: 1rem; }
.mobile-menu.open { display: block; }
@media (min-width: 768px) { .mobile-menu { display: none !important; } }
.mobile-menu a { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; color: var(--text); font-weight: 500; border-radius: var(--radius); transition: all var(--transition); }
.mobile-menu a:hover { background: var(--bg-gray); color: var(--primary); }

/* ──────────────────────────────────────
   HERO
   ────────────────────────────────────── */
.hero { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 50%, #bbf7d0 100%); padding: 4rem 0 3rem; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: -40%; right: -15%; width: 500px; height: 500px; border-radius: 50%; background: rgba(22,163,74,.05); pointer-events: none; }
.hero-badge { display: inline-flex; align-items: center; gap: .5rem; background: var(--primary-light); color: var(--primary-dark); padding: .375rem 1rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; margin-bottom: 1.5rem; }
.hero-title { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; color: var(--text); margin-bottom: 1rem; line-height: 1.2; letter-spacing: -.02em; }
.hero-title .highlight { color: var(--primary); }
.hero-subtitle { font-size: clamp(1rem, 2.5vw, 1.2rem); color: var(--text-muted); max-width: 580px; margin: 0 auto 2rem; line-height: 1.7; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }

/* Stats bar */
.stats-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; padding: 1.5rem; background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); max-width: 680px; margin: 0 auto; }
.stat-item { text-align: center; }
.stat-number { font-size: 1.5rem; font-weight: 800; color: var(--primary); display: block; }
.stat-label { font-size: .8125rem; color: var(--text-muted); }

/* ──────────────────────────────────────
   BUTTONS
   ────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .75rem 1.75rem; border-radius: var(--radius); font-weight: 600; font-size: .9375rem; transition: all var(--transition); border: 2px solid transparent; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(22,163,74,.3); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 6px 16px rgba(22,163,74,.4); }
.btn-secondary { background: white; color: var(--text); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: .5rem 1rem; font-size: .875rem; }
#btn-email, #btn-email-a, #btn-email-i, #btn-email-d { display: none !important; }
.btn-lg { padding: 1rem 2.5rem; font-size: 1.0625rem; }
.btn-full { width: 100%; justify-content: center; }

/* ──────────────────────────────────────
   SECTION HEADER
   ────────────────────────────────────── */
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-label { display: inline-block; font-size: .8125rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .1em; margin-bottom: .75rem; }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: .75rem; }
.section-desc { font-size: 1rem; color: var(--text-muted); max-width: 580px; margin: 0 auto; line-height: 1.7; }

/* ──────────────────────────────────────
   TOOLS GRID (homepage)
   ────────────────────────────────────── */
.tools-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-top: 2rem; }
@media (min-width: 640px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .tools-grid { grid-template-columns: repeat(4, 1fr); } }

.tool-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.75rem; transition: all .3s ease; display: flex; flex-direction: column; gap: 1rem; position: relative; overflow: hidden; }
.tool-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--primary); transform: scaleX(0); transition: transform .3s ease; }
.tool-card:hover { border-color: var(--primary); box-shadow: var(--shadow-xl); transform: translateY(-4px); }
.tool-card:hover::before { transform: scaleX(1); }
.tool-icon { font-size: 2.5rem; display: block; }
.tool-name { font-size: 1.1rem; font-weight: 700; }
.tool-desc { font-size: .875rem; color: var(--text-muted); line-height: 1.6; flex: 1; }

/* Benefits */
.benefits-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-top: 2rem; }
@media (min-width: 768px) { .benefits-grid { grid-template-columns: repeat(3, 1fr); } }
.benefit-item { text-align: center; padding: 2rem 1.5rem; border-radius: var(--radius-lg); background: var(--bg-gray); }
.benefit-icon { font-size: 2.5rem; margin-bottom: 1rem; display: block; }
.benefit-title { font-size: 1.125rem; font-weight: 700; margin-bottom: .5rem; }
.benefit-desc { font-size: .9375rem; color: var(--text-muted); line-height: 1.6; }

/* ──────────────────────────────────────
   CALCULATOR PAGE HEADER
   ────────────────────────────────────── */
.calc-page-header { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); padding: 2.5rem 0; text-align: center; }
.breadcrumb { display: flex; align-items: center; gap: .5rem; justify-content: center; font-size: .875rem; color: var(--text-muted); margin-bottom: 1rem; flex-wrap: wrap; }
.breadcrumb a { color: var(--primary); }
.breadcrumb .sep { color: var(--text-light); }
.calc-page-title { font-size: clamp(1.5rem, 4vw, 2.25rem); font-weight: 800; margin-bottom: .75rem; }
.calc-page-subtitle { font-size: 1rem; color: var(--text-muted); max-width: 540px; margin: 0 auto; }

/* ──────────────────────────────────────
   CALCULATOR LAYOUT
   ────────────────────────────────────── */
.calc-section { padding: 2.5rem 0 4rem; background: var(--bg-gray); }
.calc-wrapper { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 900px) { .calc-wrapper { grid-template-columns: 420px 1fr; align-items: start; } }

/* Form column (card + disclaimer) */
.calc-form-column { display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 900px) {
  .calc-form-column { position: sticky; top: calc(var(--header-h) + 1rem); align-self: start; }
}

.calc-form-disclaimer { font-size: .75rem; line-height: 1.55; color: var(--text-muted); margin: 0; padding: 0 .25rem; }

/* Form card */
.calc-form-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-md); }
@media (min-width: 900px) { .calc-form-card { position: sticky; top: calc(var(--header-h) + 1rem); } }
@media (min-width: 900px) { .calc-form-column .calc-form-card { position: static; } }

.form-title { font-size: 1.125rem; font-weight: 700; margin-bottom: 1.5rem; padding-bottom: .875rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: .5rem; }

.form-group { margin-bottom: 1.375rem; }
.form-label { display: flex; align-items: center; gap: .4rem; font-size: .875rem; font-weight: 600; color: var(--text); margin-bottom: .5rem; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.tasa-input-row { display: flex; gap: .625rem; align-items: stretch; flex-wrap: nowrap; }
.tasa-input-row .tasa-input-field { flex: 1; min-width: 0; }
.tasa-input-row .tasa-period-select.form-control { flex: 0 0 auto; width: auto; min-width: 6.75rem; max-width: 9rem; cursor: pointer; }

.form-control { width: 100%; padding: .75rem 1rem; border: 2px solid var(--border); border-radius: var(--radius); font-size: 1rem; color: var(--text); background: var(--bg); transition: all var(--transition); outline: none; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,163,74,.1); }

.input-wrapper { position: relative; }
.input-prefix { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--text-muted); pointer-events: none; z-index: 1; }
.input-suffix { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); font-weight: 600; color: var(--text-muted); pointer-events: none; }
.has-prefix .form-control { padding-left: 2.25rem; }
.has-suffix .form-control { padding-right: 2.75rem; }

/* Slider */
.slider-container { display: flex; flex-direction: column; gap: .5rem; }
.slider-row { display: flex; align-items: center; gap: .875rem; }
.range-slider { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: var(--border); outline: none; cursor: pointer; }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); cursor: pointer; box-shadow: 0 2px 4px rgba(22,163,74,.4); transition: transform var(--transition); }
.range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.range-slider::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); cursor: pointer; border: none; box-shadow: 0 2px 4px rgba(22,163,74,.4); }
.slider-num { width: 85px; text-align: center; font-weight: 700; font-size: .9375rem; }
.slider-limits { display: flex; justify-content: space-between; font-size: .75rem; color: var(--text-light); margin-top: .125rem; }

/* Radio buttons */
.radio-group { display: flex; gap: .5rem; }
.radio-opt { flex: 1; }
.radio-opt input { display: none; }
.radio-opt label { display: flex; align-items: center; justify-content: center; padding: .625rem .75rem; border: 2px solid var(--border); border-radius: var(--radius); font-size: .875rem; font-weight: 500; cursor: pointer; transition: all var(--transition); text-align: center; white-space: nowrap; }
.radio-opt input:checked + label { border-color: var(--primary); background: var(--primary-lighter); color: var(--primary-dark); font-weight: 600; }
.radio-opt label:hover { border-color: var(--primary); color: var(--primary); }

/* Tooltip */
.tooltip-wrap { position: relative; display: inline-flex; }
.tip-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--border); color: var(--text-muted); font-size: .625rem; font-weight: 700; cursor: help; }
.tip-text { display: none; position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: var(--text); color: white; font-size: .8125rem; font-weight: 400; padding: .5rem .75rem; border-radius: var(--radius); min-width: 180px; max-width: 240px; z-index: 10; box-shadow: var(--shadow-lg); line-height: 1.5; white-space: normal; }
.tooltip-wrap:hover .tip-text { display: block; }

/* Error */
.err-msg { display: none; color: #ef4444; font-size: .8125rem; margin-top: .375rem; font-weight: 500; }
.has-error .err-msg { display: block; }
.has-error .form-control { border-color: #ef4444; }

/* ──────────────────────────────────────
   RESULTS
   ────────────────────────────────────── */
.results-panel { animation: fadeIn .35s ease; }
.results-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1.5rem; }

.result-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.375rem 1.25rem; text-align: center; box-shadow: var(--shadow-sm); }
.result-card.featured { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); border-color: var(--primary-dark); grid-column: 1 / -1; }
.result-card.featured .result-label { color: rgba(255,255,255,.85); }
.result-card.featured .result-value { color: white; font-size: 2.25rem; }
.result-card.featured .result-sub,
.result-card.featured .result-sub-featured { color: #fff; font-weight: 600; font-size: .9375rem; opacity: .98; text-shadow: 0 1px 2px rgba(0,0,0,.2); letter-spacing: .01em; }
.result-label { font-size: .8125rem; color: var(--text-muted); font-weight: 500; margin-bottom: .375rem; }
.result-value { font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1.2; }
.result-sub { font-size: .8125rem; color: var(--text-muted); margin-top: .25rem; }
.result-card.danger .result-value { color: #ef4444; }
.result-card.success .result-value { color: var(--primary); }
.result-card.warning .result-value { color: #f59e0b; }

/* Chart */
.chart-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.5rem; margin-bottom: 1.5rem; }
.chart-card-title { font-size: .9375rem; font-weight: 700; margin-bottom: 1rem; }
.chart-inner { display: flex; align-items: center; justify-content: center; gap: 2rem; flex-wrap: wrap; }
.chart-legend { display: flex; flex-direction: column; gap: .5rem; }
.legend-row { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }

/* Amortization table */
.table-toggle-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; background: var(--bg-gray); border: 1px solid var(--border); border-radius: var(--radius); font-weight: 600; font-size: .9375rem; color: var(--text); transition: all var(--transition); }
.table-toggle-btn .table-toggle-label { flex: 1; text-align: left; min-width: 0; }
.table-toggle-btn:hover { background: var(--primary-lighter); border-color: var(--primary); color: var(--primary); }
.toggle-arrow { transition: transform .3s ease; }
.table-toggle-btn.open .toggle-arrow { transform: rotate(180deg); }
.amort-wrapper { display: none; margin-top: 1rem; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.amort-wrapper.open { display: block; animation: fadeIn .2s ease; }
.table-scroll { overflow-x: auto; max-height: 420px; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead { position: sticky; top: 0; background: var(--text); color: white; z-index: 1; }
thead th { padding: .75rem 1rem; text-align: right; font-weight: 600; white-space: nowrap; }
thead th:first-child { text-align: center; }
tbody tr { border-bottom: 1px solid var(--border-light); transition: background var(--transition); }
tbody tr:hover { background: var(--bg-gray); }
tbody td { padding: .625rem 1rem; text-align: right; color: var(--text-muted); }
tbody td:first-child { text-align: center; font-weight: 600; color: var(--text); }

tfoot.amort-tfoot { position: sticky; bottom: 0; z-index: 2; }
tfoot.amort-tfoot tr { box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
tfoot.amort-tfoot th,
tfoot.amort-tfoot td {
  padding: .875rem 1rem;
  text-align: right;
  font-weight: 700;
  font-size: .9375rem;
  color: var(--text);
  background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
  border-top: 2px solid var(--primary);
  border-bottom: none;
}
tfoot.amort-tfoot th:first-child,
tfoot.amort-tfoot td:first-child { text-align: center; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
tfoot.amort-tfoot th:first-child { font-size: .8125rem; text-transform: uppercase; letter-spacing: .04em; }
tfoot.amort-tfoot td:last-child { color: var(--text-muted); font-weight: 600; }
tfoot.amort-tfoot tr th:first-child { border-radius: 0 0 0 var(--radius); }
tfoot.amort-tfoot tr td:last-child { border-radius: 0 0 var(--radius) 0; }

/* Action buttons */
.action-btns { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1rem; }

/* Share popover */
.share-popover {
  position: fixed;
  display: none;
  min-width: 224px;
  max-width: min(320px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .5rem;
  box-shadow: 0 16px 32px rgba(17,24,39,.16);
  z-index: 9100;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease;
}
.share-popover.open {
  opacity: 1;
  transform: translateY(0);
}
.share-popover-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .6rem .7rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.share-popover-item:hover {
  background: var(--bg-gray);
  color: var(--primary-dark);
}
.share-popover-icon {
  width: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

/* ──────────────────────────────────────
   SEO CONTENT
   ────────────────────────────────────── */
.content-area { margin-top: 3rem; }
.content-card { background: white; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 1.5rem; }
.content-card h2 { font-size: 1.375rem; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 2px solid var(--primary-light); }
.content-card h2.seo-collapsible-heading { margin: 0; padding: 0; border: none; font-size: 1.375rem; line-height: 1.3; }
.content-card p { color: var(--text-muted); line-height: 1.8; }

/* SEO: bloques informativos colapsables (cerrados por defecto) */
.seo-collapsible-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0 .75rem 0;
  margin: 0;
  background: none;
  border: none;
  border-bottom: 2px solid var(--primary-light);
  cursor: pointer;
  text-align: left;
  font: inherit;
  font-weight: 700;
  color: var(--text);
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.seo-collapsible-toggle:hover { color: var(--primary); border-color: var(--primary-light); }
.seo-collapsible-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}
.seo-collapsible.open .seo-collapsible-toggle { color: var(--primary-dark); border-color: var(--primary-light); }
.seo-collapsible-title { flex: 1; min-width: 0; }
.seo-collapsible-icon {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  transition: transform .3s ease;
  flex-shrink: 0;
  line-height: 1;
}
.seo-collapsible.open .seo-collapsible-icon { transform: rotate(45deg); }
.seo-collapsible-panel {
  display: none;
  padding-top: 1rem;
}
.seo-collapsible.open .seo-collapsible-panel {
  display: block;
  animation: fadeIn .2s ease;
}
.content-card p + p { margin-top: .75rem; }

.steps-ol { list-style: none; counter-reset: steps; display: flex; flex-direction: column; gap: 1rem; }
.steps-ol li { counter-increment: steps; display: flex; gap: 1rem; align-items: flex-start; }
.steps-ol li::before { content: counter(steps); display: flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: white; font-weight: 700; font-size: .875rem; flex-shrink: 0; }
.steps-ol li p { margin: 0; color: var(--text-muted); line-height: 1.7; }
.steps-ol li strong { display: block; color: var(--text); font-weight: 600; margin-bottom: .25rem; }

.tips-list { display: flex; flex-direction: column; gap: .75rem; }
.tip-item { display: flex; gap: .875rem; padding: 1rem 1.25rem; background: var(--bg-gray); border-radius: var(--radius); border-left: 3px solid var(--primary); align-items: flex-start; }
.tip-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: .1rem; }
.tip-content p { margin: 0; color: var(--text-muted); font-size: .9375rem; line-height: 1.6; }
.tip-content strong { color: var(--text); }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: .75rem; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.faq-q { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.125rem 1.25rem; background: white; border: none; cursor: pointer; text-align: left; font-size: .9375rem; font-weight: 600; color: var(--text); transition: all var(--transition); }
.faq-q:hover { background: var(--bg-gray); color: var(--primary); }
.faq-q.open { background: var(--primary-lighter); color: var(--primary-dark); }
.faq-icon { font-size: 1.25rem; color: var(--primary); transition: transform .3s ease; flex-shrink: 0; }
.faq-q.open .faq-icon { transform: rotate(45deg); }
.faq-a { display: none; padding: 1rem 1.25rem; background: var(--bg-gray); color: var(--text-muted); font-size: .9375rem; line-height: 1.75; border-top: 1px solid var(--border); }
.faq-a.open { display: block; animation: fadeIn .2s ease; }

/* Other tools */
.other-tools-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.other-tool { display: flex; align-items: center; gap: .875rem; padding: 1rem 1.25rem; background: white; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); font-weight: 600; font-size: .9375rem; transition: all var(--transition); }
.other-tool:hover { border-color: var(--primary); color: var(--primary); transform: translateX(4px); }
.other-tool-icon { font-size: 1.5rem; }

/* ──────────────────────────────────────
   ADS
   ────────────────────────────────────── */
.ad-container { display: none !important; }
.ad-label { font-size: .6875rem; color: var(--text-light); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .25rem; }
.ad-placeholder { display: flex; align-items: center; justify-content: center; background: #f3f4f6; color: var(--text-light); font-size: .8125rem; width: 100%; height: 100%; }
.ad-728x90 { width: 100%; max-width: 728px; height: 100px; margin: 1.5rem auto; display: none; }
@media (min-width: 768px) { .ad-728x90 { display: flex; } }
.ad-320x100 { width: 100%; max-width: 320px; height: 100px; margin: 1.5rem auto; }
@media (min-width: 768px) { .ad-320x100 { display: none; } }
.ad-300x250 { width: 300px; height: 250px; margin: 1.5rem auto; }
.ad-native { width: 100%; min-height: 90px; margin: 1rem 0; }

/* ──────────────────────────────────────
   FOOTER
   ────────────────────────────────────── */
.site-footer { background: #e8ecf1; color: var(--text); padding: 3rem 0 1.5rem; margin-top: auto; border-top: 1px solid #d8dee6; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .footer-inner { grid-template-columns: 2fr 1fr 1fr; } }
.footer-brand .logo { color: var(--text); margin-bottom: .75rem; display: inline-flex; }
.footer-brand p { font-size: .875rem; color: var(--text-muted); line-height: 1.7; }
.footer-col-title { font-size: .8125rem; font-weight: 700; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-links { display: flex; flex-direction: column; gap: .5rem; }
.footer-links a { font-size: .875rem; color: var(--text-muted); transition: color var(--transition); }
.footer-links a:hover { color: var(--primary-dark); }
.footer-bottom { border-top: 1px solid #d8dee6; padding-top: 1.5rem; display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer-legal { font-size: .8125rem; color: var(--text-muted); line-height: 1.6; max-width: 580px; }
.footer-copy { font-size: .8125rem; color: var(--text-muted); white-space: nowrap; }

/* ──────────────────────────────────────
   SAVINGS YEAR TABLE
   ────────────────────────────────────── */
.year-table-wrapper { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }

/* ──────────────────────────────────────
   ANIMATIONS
   ────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: translateX(0); } }

/* Utilities */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.fw-bold { font-weight: 700; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.gap-1 { gap: .5rem; }
.align-center { align-items: center; }

/* Highlight box */
.highlight-box { background: var(--primary-lighter); border: 1px solid var(--primary-light); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1rem 0; font-size: .9375rem; color: var(--primary-dark); }

/* Formula box */
.formula-box { background: #1f2937; color: #86efac; font-family: 'SF Mono', 'Fira Code', Consolas, monospace; font-size: .875rem; padding: 1.25rem 1.5rem; border-radius: var(--radius); margin: 1rem 0; overflow-x: auto; line-height: 1.8; }

/* Inflation comparison visual */
.comparison-visual { display: flex; gap: 1.5rem; align-items: flex-start; flex-wrap: wrap; padding: 1.5rem; background: var(--bg-gray); border-radius: var(--radius); margin-top: 1rem; }
.comp-box { flex: 1; min-width: 140px; text-align: center; padding: 1.25rem 1rem; background: white; border-radius: var(--radius); border: 1px solid var(--border); }
.comp-year { font-size: .8125rem; color: var(--text-muted); margin-bottom: .25rem; }
.comp-amount { font-size: 1.625rem; font-weight: 800; color: var(--text); }
.comp-arrow { font-size: 2rem; color: var(--primary); align-self: center; }

/* Debt timeline */
.timeline-bar { height: 24px; border-radius: 999px; background: var(--border); overflow: hidden; margin: .5rem 0; }
.timeline-fill { height: 100%; border-radius: 999px; background: var(--primary); transition: width .6s ease; display: flex; align-items: center; justify-content: flex-end; padding-right: .5rem; }
.timeline-fill span { font-size: .75rem; font-weight: 700; color: white; white-space: nowrap; }

/* Print */
@media print {
  .site-header, .site-footer, .ad-container, .hamburger, .mobile-menu, .action-btns, .table-toggle-btn { display: none !important; }
  .seo-collapsible-panel { display: block !important; padding-top: .75rem; }
  body { color: black; }
  .calc-form-card { box-shadow: none; border: 1px solid #ccc; }
}

/* ── Email modal ── */
#email-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.email-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.email-modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 2rem 1.75rem 1.75rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 40px rgba(0,0,0,.2);
  animation: modalIn .2s ease;
  text-align: center;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.email-modal-close {
  position: absolute;
  top: .875rem;
  right: .875rem;
  background: none;
  border: none;
  font-size: 1.125rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: .25rem;
  border-radius: 6px;
  transition: background .15s;
}
.email-modal-close:hover { background: var(--bg-gray); }
.email-modal-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.email-modal-title { font-size: 1.2rem; font-weight: 700; color: var(--text); margin-bottom: .375rem; }
.email-modal-desc { font-size: .9375rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.email-modal-form { display: flex; flex-direction: column; gap: .75rem; text-align: left; }
.email-modal-input {
  width: 100%;
  padding: .6875rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  transition: border-color .2s;
}
.email-modal-input:focus { outline: none; border-color: var(--primary); }
.email-modal-error { font-size: .875rem; color: #ef4444; min-height: 1.25rem; display: block; }
.email-modal-success { padding: 1rem 0 .5rem; }
.email-modal-success p { font-size: 1rem; color: var(--text); }
