/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --green-900: #0b3d24;
  --green-700: #146b3c;
  --green-600: #157a43;
  --green-500: #1f9955;
  --green-400: #34b56b;
  --green-100: #e3f5ea;
  --green-50:  #f3fbf6;

  --flex-500: #2f855d; /* discretionary category accent, softer */
  --amber-600: #b6790f; /* deficit warning */
  --amber-100: #fdf1dc;
  --red-700: #7a1c17; /* excessive-spending diagnosis */
  --red-600: #b3261e;
  --red-100: #fbe4e1;

  --ink: #10241a;
  --ink-soft: #3c554a;
  --gray-600: #5b6b63;
  --gray-300: #cfdcd4;
  --gray-200: #e3ebe6;
  --gray-100: #f0f5f2;

  --bg: #ffffff;
  --surface: #f7faf8;
  --card: #ffffff;
  --border: var(--gray-200);

  --accent: var(--green-600);
  --accent-strong: var(--green-700);
  --on-accent: #ffffff;

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

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 1px 2px rgba(11,61,36,.06), 0 12px 32px -16px rgba(11,61,36,.18);
}

/* Marca: fondo siempre blanco, el verde es solo el color de identidad.
   Sin modo oscuro automático a propósito — así el fondo nunca cambia. */

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  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%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { font-family: var(--display); text-wrap: balance; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }
input { font: inherit; color: inherit; }
::selection { background: var(--green-400); color: #062713; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

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

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 1.25rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* =============================================================
   4. Header / footer
   ============================================================= */
.site-header { padding-block: 1.1rem; border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 800; font-size: 1.12rem; color: var(--green-700); }
.logo-mark { color: var(--green-600); flex: none; }
.header-nav { display: flex; gap: 1.5rem; font-weight: 600; font-size: .94rem; }
.header-nav a { color: var(--ink-soft); transition: color .2s var(--ease-out); white-space: nowrap; }
.header-nav a:hover { color: var(--accent-strong); }

@media (max-width: 539px) {
  .header-row { flex-wrap: wrap; row-gap: .4rem; }
  .logo { font-size: 1rem; }
  .header-nav { gap: .9rem; font-size: .8rem; width: 100%; }
}

.site-footer { border-top: 1px solid var(--border); margin-top: 3rem; padding-block: 1.6rem; background: var(--surface); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; font-size: .88rem; color: var(--gray-600); }
.footer-row nav { display: flex; gap: 1.1rem; }
.footer-row nav a:hover { color: var(--accent-strong); }

/* =============================================================
   5. Hero
   ============================================================= */
.hero { padding-block: 2.6rem 1.4rem; text-align: center; }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 2.7rem); max-width: 20ch; margin-inline: auto; }
.hero-sub { margin: .9rem auto 0; max-width: 62ch; color: var(--ink-soft); font-size: 1.05rem; }

/* =============================================================
   6. Tool card
   ============================================================= */
.tool { padding-block: 0 1.5rem; }
.tool > h2 { text-align: center; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: .5rem; }
.tool > .section-sub { margin-bottom: 1.4rem; }
#vacaciones { padding-block: 2.6rem 1.5rem; border-top: 1px solid var(--border); }
.tool-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-card);
}
.tool-noscript { background: var(--amber-100); color: #6b4c0c; padding: .9rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-weight: 600; }

.tool-grid { display: grid; grid-template-columns: 1fr; gap: 1.6rem; }
/* Grid items default to min-width:auto (their max-content size), which lets
   long labels/inputs force a 1fr track wider than its container — the
   classic CSS Grid overflow trap. min-width:0 lets tracks actually shrink. */
.tool-grid > *, .field-grid > *, .income-row > *, .preview-summary > *, .breakdown-row > * { min-width: 0; }
@media (min-width: 960px) {
  .tool-grid { grid-template-columns: 1.15fr 1fr; align-items: start; }
  .tool-preview { position: sticky; top: 1.25rem; }
}

/* ---- form ---- */
.form-block + .form-block { margin-top: 1.3rem; }
.form-block-title { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-600); font-weight: 700; margin-bottom: .7rem; }

.form-block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .8rem; margin-bottom: .7rem; }
.form-block-head > * { min-width: 0; }
.form-block-head .form-block-title { margin-bottom: 0; }
.currency-picker { display: flex; align-items: center; gap: .45rem; min-width: 0; flex: 1 1 200px; }
.currency-picker label { font-size: .78rem; font-weight: 600; color: var(--gray-600); flex: none; }
.currency-picker select {
  font: inherit; font-size: .82rem; font-weight: 600; color: var(--ink);
  padding: .35rem .6rem; border: 1.5px solid var(--border); border-radius: 999px;
  min-width: 0; max-width: 100%;
  background: var(--surface); cursor: pointer;
}
.currency-picker select:focus { border-color: var(--accent); outline: none; }

.field-hint { font-weight: 500; font-size: .82rem; color: var(--gray-600); }

.field { position: relative; display: flex; align-items: center; }
.field input {
  width: 100%;
  padding: .7rem .85rem;
  padding-right: 3.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-weight: 600;
  transition: border-color .18s var(--ease-out), background .18s var(--ease-out);
}
.field input:focus { border-color: var(--accent); background: var(--bg); outline: none; }
.field-suffix { position: absolute; right: .85rem; font-size: .82rem; color: var(--gray-600); font-weight: 600; pointer-events: none; }

.text-input {
  width: 100%;
  padding: .7rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-weight: 600;
  transition: border-color .18s var(--ease-out), background .18s var(--ease-out);
}
.text-input:focus { border-color: var(--accent); background: var(--bg); outline: none; }

.field-grid { display: grid; grid-template-columns: 1fr; gap: .7rem; }
.field-row { display: grid; gap: .3rem; align-content: start; }
.field-row label:not(.checkbox-row) { font-size: .92rem; font-weight: 600; }
.field-row label small { display: block; font-weight: 400; color: var(--gray-600); font-size: .78rem; }

.income-row { display: grid; grid-template-columns: 1fr; gap: .7rem; }
.income-row.is-partner { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--border); }

@media (min-width: 540px) {
  .field-grid, .income-row { grid-template-columns: 1fr 1fr; gap: .8rem 1rem; }
}

.link-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  margin-top: .75rem;
  font-size: .84rem; font-weight: 700; color: var(--accent-strong);
  padding: .3rem 0;
}
.link-btn:hover { color: var(--green-900); text-decoration: underline; }
.link-btn svg { flex: none; transition: transform .18s var(--ease-out); }
.link-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.checkbox-row {
  display: flex; align-items: center; gap: .45rem;
  font-size: .82rem; font-weight: 500; color: var(--ink-soft);
  margin-top: .1rem; cursor: pointer;
}
.checkbox-row input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.checkbox-row-center { justify-content: center; margin-bottom: .9rem; font-size: .86rem; }

/* ---- preview ---- */
.tool-preview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.15rem; }
.preview-summary { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: .9rem; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem .85rem; display: flex; flex-direction: column; gap: .2rem; }
.stat-primary { background: var(--green-600); border-color: var(--green-600); color: var(--on-accent); }
.stat-primary.is-deficit { background: var(--amber-600); border-color: var(--amber-600); }
.stat-label { font-size: .76rem; color: var(--gray-600); font-weight: 600; }
.stat-primary .stat-label { color: rgba(255,255,255,.82); }
.stat-value { font-family: var(--display); font-size: 1.5rem; font-weight: 800; line-height: 1.1; overflow-wrap: break-word; word-break: break-word; }
.stat-sub { font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.88); }
.stat:not(.stat-primary) .stat-value { color: var(--ink); }

.savings-bar { height: 12px; border-radius: 999px; background: var(--amber-100); overflow: hidden; }
.savings-bar-fill { height: 100%; background: var(--green-500); border-radius: 999px 0 0 999px; transition: width .35s var(--ease-out); }
.savings-bar-legend { display: flex; gap: 1rem; font-size: .78rem; color: var(--gray-600); margin: .5rem 0 1rem; font-weight: 600; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.dot-gasto { background: var(--amber-600); opacity: .55; }
.dot-ahorro { background: var(--green-500); }

.breakdown { display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.1rem; }
.breakdown-row { display: grid; grid-template-columns: 1fr auto; gap: .1rem .6rem; align-items: center; }
.breakdown-name { font-size: .84rem; font-weight: 600; grid-column: 1; }
.breakdown-amount { font-size: .82rem; font-weight: 700; color: var(--ink-soft); grid-column: 2; text-align: right; overflow-wrap: break-word; word-break: break-word; }
.breakdown-track { grid-column: 1 / -1; height: 7px; border-radius: 999px; background: var(--gray-200); overflow: hidden; }
.breakdown-fill { height: 100%; border-radius: 999px; background: var(--green-500); transition: width .3s var(--ease-out); }
.breakdown-row.is-flexible .breakdown-fill { background: var(--flex-500); opacity: .8; }
.breakdown-pct { font-size: .74rem; color: var(--gray-600); grid-column: 1/-1; }
.breakdown-status { grid-column: 1/-1; justify-self: start; font-size: .68rem; font-weight: 700; padding: .16rem .5rem; border-radius: 999px; margin-top: .1rem; }
.breakdown-status.is-sano { background: var(--green-100); color: var(--green-700); }
.breakdown-status.is-ajustado { background: var(--amber-100); color: #8a5a0c; }
.breakdown-status.is-excesivo { background: var(--red-100); color: var(--red-700); }

.diagnostics-summary { margin: -.2rem 0 1rem; padding: .75rem .9rem; background: var(--gray-100); border-radius: var(--radius-sm); }
.diagnostics-summary[hidden] { display: none; }
.diagnostics-title { font-size: .82rem; font-weight: 700; margin-bottom: .5rem; color: var(--ink); }
.diagnostics-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.diagnostics-list li { font-size: .78rem; padding-left: .6rem; border-left: 3px solid var(--amber-600); line-height: 1.4; }
.diagnostics-list li.is-excesivo { border-left-color: var(--red-600); }
.diagnostics-list li strong { color: var(--ink); }
.diagnostics-tip { display: block; color: var(--gray-600); margin-top: .1rem; }

.savings-benchmark-note { font-size: .78rem; color: var(--gray-600); margin: -.3rem 0 .8rem; line-height: 1.4; }
.savings-benchmark-note[hidden] { display: none; }

.currency-dialog {
  border: none; border-radius: var(--radius-lg); padding: 1.4rem;
  max-width: min(92vw, 440px); width: 100%;
  box-shadow: 0 30px 60px -20px rgba(11,61,36,.35);
  color: var(--ink); background: var(--card);
}
.currency-dialog::backdrop { background: rgba(10,25,18,.55); backdrop-filter: blur(2px); }
.currency-dialog-title { font-size: 1.08rem; margin: .2rem 1.6rem .5rem 0; }
.currency-dialog-text { font-size: .88rem; color: var(--ink-soft); line-height: 1.5; margin-bottom: 1rem; }
.currency-suggest-actions { display: flex; flex-direction: column; gap: .55rem; }
.currency-suggest-actions .btn { width: 100%; }
.currency-suggest-actions .link-btn { align-self: center; margin-top: .2rem; }

.preview-subtitle { font-size: .92rem; margin-bottom: .55rem; }
/* display:block + overflow-x:auto directly on the <table> (not a wrapper div)
   so a pathologically wide number (very high income, unusual combos) scrolls
   inside the table instead of forcing the whole page wider — the page body
   itself must never gain horizontal scroll. Harmless in the normal case:
   only engages when content genuinely exceeds the available width. */
.projection-table { width: 100%; max-width: 100%; border-collapse: collapse; font-size: .86rem; text-align: center; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.projection-table th { color: var(--gray-600); font-weight: 600; padding-bottom: .35rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.projection-table td { font-family: var(--display); font-weight: 800; color: var(--green-700); padding: .5rem .3rem; background: var(--card); border: 1px solid var(--border); }
.projection-table td:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.projection-table td:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

@media (max-width: 359px) {
  .projection-table { font-size: .72rem; }
  .projection-table td { padding: .4rem .1rem; }
}

.deficit-note { margin-top: -.3rem; margin-bottom: .8rem; background: var(--amber-100); color: #6b4c0c; border-radius: var(--radius-sm); padding: .65rem .8rem; font-size: .84rem; font-weight: 600; }
.deficit-note[hidden] { display: none; }

.preview-note { margin-top: .5rem; font-size: .78rem; color: var(--gray-600); }

/* ---- actions ---- */
.tool-actions { margin-top: 1.3rem; text-align: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.6rem; border-radius: 999px; font-weight: 700; font-size: 1rem;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s var(--ease-out);
}
.btn-primary { background: var(--green-600); color: #fff; box-shadow: 0 10px 24px -10px rgba(21,122,67,.55); }
.btn-primary:hover { background: var(--green-700); transform: translateY(-1px); }
.btn-primary[disabled] { opacity: .65; cursor: progress; transform: none; }
.btn-secondary { background: var(--gray-100); color: var(--ink); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-share { font-size: .92rem; padding: .8rem 1.3rem; }
.tool-actions-row { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }
.tool-limits { margin-top: .65rem; font-size: .82rem; color: var(--gray-600); }
.restored-note { margin-top: .6rem; font-size: .8rem; color: var(--gray-600); }
.restored-note[hidden] { display: none; }
.link-btn-inline { display: inline; font-size: inherit; font-weight: 700; color: var(--accent-strong); text-decoration: underline; padding: 0; margin-left: .3rem; }

.privacy-badge { margin-top: 1.1rem; display: flex; align-items: center; gap: .5rem; justify-content: center; font-size: .84rem; color: var(--green-700); font-weight: 600; }

/* =============================================================
   7. Ad slots
   ============================================================= */
.ad-slot {
  border: 1.5px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  min-height: 90px;
  margin-block: 1.6rem;
  color: var(--gray-600);
}
.ad-label { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.ad-slot-banner { min-height: 100px; }
.ad-slot-incontent { min-height: 250px; max-width: 728px; }
.ad-slot-popup { min-height: 250px; margin: 1rem 0 .5rem; border: 1.5px dashed var(--gray-300); border-radius: var(--radius-sm); background: var(--surface); }

/* =============================================================
   8. Plans
   ============================================================= */
/* =============================================================
   7.5 Live projection chart
   ============================================================= */
.projection-live { padding-block: 2.4rem 1rem; }
.projection-live h2 { text-align: center; font-size: clamp(1.4rem, 3vw, 1.9rem); }

.chart-card {
  max-width: 880px; margin-inline: auto;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.4rem; box-shadow: var(--shadow-card);
}
.chart-card .projection-table { margin-bottom: 1.2rem; }
.projection-table-label { font-size: .78rem; font-weight: 700; color: var(--gray-600); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .4rem; }
.projection-compare { margin-bottom: 1.2rem; padding: .9rem .9rem .3rem; background: var(--green-50); border: 1.5px solid var(--green-500); border-radius: var(--radius-md); }
.projection-compare[hidden] { display: none; }
.projection-compare .projection-table-label { color: var(--green-700); }
.projection-table-compare td { color: var(--green-700); background: var(--card); }
.projection-gain { font-size: .92rem; color: var(--green-900); font-weight: 600; margin-top: .8rem; padding-top: .1rem; }
.projection-gain strong { font-family: var(--display); }
.chart-plan-toggle { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.chart-canvas-wrap { position: relative; }
.chart-tooltip {
  position: absolute; pointer-events: none; z-index: 5;
  background: var(--ink); color: #fff; border-radius: 8px; padding: .5rem .7rem;
  font-size: .78rem; line-height: 1.5; white-space: nowrap;
  transform: translate(-50%, -100%); margin-top: -10px;
  box-shadow: 0 8px 20px -6px rgba(11,61,36,.4);
}
.chart-tooltip[hidden] { display: none; }
.chart-tooltip strong { font-family: var(--display); }
.chart-tooltip .tt-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: .3rem; }
.chip {
  padding: .5rem 1rem; border-radius: 999px; font-size: .86rem; font-weight: 700;
  background: var(--gray-100); color: var(--ink-soft);
  border: 1.5px solid transparent;
  transition: background .18s var(--ease-out), color .18s var(--ease-out), border-color .18s var(--ease-out);
}
.chip:hover { background: var(--gray-200); }
.chip.is-active { background: var(--green-600); color: #fff; }
.chip[data-plan-toggle="extremo"].is-active { background: var(--amber-600); }

#projection-canvas { width: 100%; height: auto; display: block; }
.chart-explain { margin-top: 1rem; font-size: .9rem; color: var(--ink-soft); line-height: 1.6; }

/* =============================================================
   7.6 Vacation CTA banner
   ============================================================= */
.cta-banner { padding-block: .5rem 2rem; }
.cta-card {
  max-width: 980px; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem;
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  color: #fff; border-radius: var(--radius-lg); padding: 1.6rem 1.8rem;
}
.cta-card h2 { color: #fff; font-size: 1.25rem; margin-bottom: .3rem; }
.cta-card p { color: rgba(255,255,255,.88); font-size: .92rem; max-width: 46ch; }
.cta-card .btn-secondary { background: #fff; color: var(--green-700); white-space: nowrap; flex: none; max-width: 100%; }
.cta-card .btn-secondary:hover { background: var(--green-50); }

@media (max-width: 719px) {
  .cta-card { flex-direction: column; align-items: stretch; }
  .cta-card .btn-secondary { white-space: normal; text-align: center; }
}

.plans { padding-block: 2.4rem; }
.plans h2 { text-align: center; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.section-sub { text-align: center; color: var(--ink-soft); max-width: 56ch; margin: .6rem auto 1.8rem; }

.plans-grid { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }
@media (min-width: 720px) { .plans-grid { grid-template-columns: 1fr 1fr; } }

.plan-card { background: var(--card); border: 1.5px solid var(--border); border-radius: var(--radius-md); padding: 1.4rem; box-shadow: var(--shadow-card); }
.plan-card-accent { border-color: var(--green-500); background: linear-gradient(180deg, var(--green-50), var(--card) 40%); }
.plan-card-extreme { border-color: var(--amber-600); background: linear-gradient(180deg, var(--amber-100), var(--card) 40%); }
.plan-card-extreme .plan-badge-strong { background: var(--amber-600); }
.plan-card-extreme .plan-stats strong { color: var(--amber-600); }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .5rem; }
.plan-head h3 { font-size: 1.15rem; }
.plan-badge { font-size: .72rem; font-weight: 700; padding: .28rem .6rem; border-radius: 999px; white-space: nowrap; }
.plan-badge-soft { background: var(--gray-100); color: var(--ink-soft); }
.plan-badge-strong { background: var(--green-600); color: #fff; }
.plan-summary { color: var(--ink-soft); font-size: .92rem; margin-bottom: 1.1rem; }

.plan-stats { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.plan-stats > div { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.plan-stats span { font-size: .74rem; color: var(--gray-600); font-weight: 600; }
.plan-stats strong { font-family: var(--display); font-size: 1.15rem; color: var(--green-700); overflow-wrap: break-word; word-break: break-word; }

.plans-note { text-align: center; color: var(--gray-600); font-size: .86rem; margin-top: 1.4rem; }

/* =============================================================
   9. How it works / uses
   ============================================================= */
.how, .uses { padding-block: 2.4rem; }
.how h2, .uses h2 { text-align: center; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 1.8rem; }

.how-grid, .uses-grid { display: grid; grid-template-columns: 1fr; gap: 1.2rem; }
@media (min-width: 720px) { .how-grid, .uses-grid { grid-template-columns: repeat(3, 1fr); } }

.how-step { text-align: center; padding: 0 .5rem; }
.how-icon {
  width: 54px; height: 54px; border-radius: 16px; background: var(--green-100); color: var(--green-700);
  display: flex; align-items: center; justify-content: center; margin: 0 auto .9rem;
}
.how-step h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.how-step p { color: var(--ink-soft); font-size: .92rem; }

.use-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.3rem; }
.use-card h3 { font-size: 1.02rem; margin-bottom: .5rem; color: var(--green-700); }
.use-card p { color: var(--ink-soft); font-size: .92rem; }

/* =============================================================
   10. FAQ
   ============================================================= */
.faq { padding-block: 2.4rem 3rem; }
.faq h2 { text-align: center; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 1.6rem; }
.faq-list { max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; gap: .6rem; }
.faq-list details { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .2rem .2rem; background: var(--card); }
.faq-list summary {
  cursor: pointer; font-weight: 700; padding: .85rem 1rem; list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 1.3rem; color: var(--accent); flex: none; }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list p { padding: 0 1rem 1rem; color: var(--ink-soft); font-size: .92rem; }

/* =============================================================
   11. Ad dialog (download interstitial)
   ============================================================= */
.ad-dialog {
  border: none; border-radius: var(--radius-lg); padding: 1.4rem;
  max-width: min(92vw, 420px); width: 100%;
  box-shadow: 0 30px 60px -20px rgba(11,61,36,.35);
  color: var(--ink); background: var(--card);
}
.ad-dialog::backdrop { background: rgba(10,25,18,.55); backdrop-filter: blur(2px); }
.ad-dialog-close {
  position: absolute; top: .8rem; right: .8rem; width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--gray-600); background: var(--gray-100);
}
.ad-dialog-close:hover { background: var(--gray-200); }
.ad-dialog-caption { text-align: center; font-size: .9rem; color: var(--ink-soft); margin: .9rem 0 1rem; }
.ad-dialog .btn-secondary { width: 100%; }

/* =============================================================
   12. Corner toast
   ============================================================= */
.corner-toast {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 60;
  width: 220px; min-height: 110px;
  background: var(--card); border: 1.5px dashed var(--gray-300); border-radius: var(--radius-sm);
  box-shadow: 0 18px 40px -16px rgba(11,61,36,.28);
  display: flex; align-items: center; justify-content: center;
  animation: toastIn .4s var(--ease-out);
}
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.corner-toast-close {
  position: absolute; top: .4rem; right: .4rem; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--gray-600); background: var(--gray-100);
}
.corner-toast-close:hover { background: var(--gray-200); }
@media (max-width: 539px) { .corner-toast { right: .6rem; bottom: .6rem; width: 168px; min-height: 90px; } }

/* =============================================================
   13. Reduced motion (only intrusive)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .corner-toast { animation: none; }
}
