/* =============================================================
   Margen · estilos
   Estilo editorial y sobrio: una sola familia (Manrope), paleta verde,
   bordes finos en vez de sombras, color semántico solo para resultados.
   ============================================================= */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-var.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* 1. Tokens ---------------------------------------------------- */
:root {
  --brand: #163D36;
  --accent: #2F7863;
  --accent-soft: #E7F0EC;
  --bg: #F7F7F2;
  --surface: #FFFFFF;
  --surface-2: #F1F2EC;
  --ink: #202624;
  --ink-2: #4A5550;
  --muted: #65706B;
  --line: #DBE2DD;
  --line-strong: #C3CCC6;

  --good: #1D6B47;  --good-bg: #E5F1EA;
  --warn: #855600;  --warn-bg: #FBF0D9;
  --bad: #B0261C;   --bad-bg: #FBE8E5;

  --c-tax: #A5AFAA; --c-prod: #163D36; --c-ship: #5F8F80; --c-fee: #9BB7AC;
  --c-other: #CDB99A; --c-ads: #BF7A4E; --c-profit: #2F7863; --c-loss: #B0261C;

  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 14px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --header-h: 64px;
  color-scheme: light;
}

/* 2. Base ------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  background: var(--bg); color: var(--ink);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
p { text-wrap: pretty; }
h1, h2, h3 { color: var(--ink); line-height: 1.12; letter-spacing: -0.025em; text-wrap: balance; font-weight: 780; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* 3. Utilidades ------------------------------------------------ */
.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 14px; background: var(--brand); color: #fff; border-radius: 8px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }
.eyebrow { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }
[hidden] { display: none !important; }

/* 4. Cabecera -------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); font-weight: 780; font-size: 1.2rem; letter-spacing: -0.02em; }
.brand:hover { color: var(--brand); }
.brand svg { width: 30px; height: 30px; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.nav-list { display: none; list-style: none; padding: 0; gap: 2px; }
.nav-list a, .nav-panel a { display: block; padding: 8px 11px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-size: .9rem; font-weight: 600; }
.nav-list a:hover, .nav-panel a:hover { background: var(--surface-2); color: var(--ink); }
.nav-list a[aria-current="page"], .nav-panel a[aria-current="page"] { color: var(--brand); background: var(--accent-soft); }
.nav-mobile { position: relative; }
.nav-mobile > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; font-weight: 700; font-size: .92rem; cursor: pointer; background: var(--surface);
}
.nav-mobile > summary::-webkit-details-marker { display: none; }
.nav-mobile > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.nav-mobile[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
.nav-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(280px, calc(100vw - 32px)); list-style: none; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 32px -16px rgba(22, 61, 54, .35); display: grid; gap: 2px; }
.nav-panel a { padding: 12px; font-size: 1rem; }
@media (min-width: 1000px) { .nav-list { display: flex; } .nav-mobile { display: none; } }

/* 5. Botones --------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 700; font-size: .95rem; text-decoration: none; transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: #0F2E29; color: #fff; }
.btn-ghost { border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-link { color: var(--ink-2); font-weight: 600; font-size: .9rem; min-height: 44px; padding: 0 6px; text-decoration: underline; text-underline-offset: 3px; }
.btn-link:hover { color: var(--brand); }

/* 6. Portada --------------------------------------------------- */
.home-hero { padding-block: 44px 28px; display: grid; gap: 32px; align-items: start; }
.home-hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); max-width: 15ch; margin-top: 12px; }
.home-hero .lead { margin-top: 16px; font-size: 1.1rem; color: var(--ink-2); max-width: 52ch; }
.hero-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 10px; }

.quick { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.quick-title { font-weight: 780; font-size: 1.05rem; }
.quick-sub { font-size: .88rem; color: var(--muted); margin-top: 2px; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.quick-result { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); border-left: 4px solid var(--line-strong); }
.quick-result[data-level="good"] { border-left-color: var(--good); background: var(--good-bg); }
.quick-result[data-level="warn"] { border-left-color: var(--warn); background: var(--warn-bg); }
.quick-result[data-level="bad"] { border-left-color: var(--bad); background: var(--bad-bg); }
.quick-label { font-size: .82rem; font-weight: 700; color: var(--ink-2); }
.quick-number { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.quick-result[data-level="good"] .quick-number { color: var(--good); }
.quick-result[data-level="warn"] .quick-number { color: var(--warn); }
.quick-result[data-level="bad"] .quick-number { color: var(--bad); }
.quick-explain { font-size: .86rem; color: var(--ink-2); margin-top: 4px; }
.quick-foot { margin-top: 12px; font-size: .88rem; }

.section { padding-block: 40px; }
.section-head h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); }
.section-head p { margin-top: 8px; color: var(--ink-2); max-width: 60ch; }

.tool-list { list-style: none; padding: 0; margin-top: 22px; display: grid; grid-template-columns: 1fr; border-top: 1px solid var(--line); }
.tool-item a { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 4px 16px; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.tool-item a:hover { background: var(--surface); }
.tool-item a:hover .tool-arrow { transform: translateX(3px); color: var(--brand); }
.tool-icon { grid-row: span 2; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--brand); }
.tool-name { font-weight: 780; font-size: 1.08rem; letter-spacing: -0.01em; }
.tool-name small { font-weight: 600; font-size: .78rem; color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.tool-desc { grid-column: 2; font-size: .92rem; color: var(--ink-2); line-height: 1.5; }
.tool-arrow { grid-row: 1 / span 2; grid-column: 3; color: var(--muted); font-size: 1.2rem; transition: transform .2s var(--ease); }

.steps { list-style: none; padding: 0; counter-reset: paso; display: grid; gap: 24px; margin-top: 24px; }
.steps li { counter-increment: paso; padding-top: 14px; border-top: 2px solid var(--brand); }
.steps li::before { content: "Paso " counter(paso); display: block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.steps h3 { font-size: 1.1rem; margin-top: 6px; }
.steps p { color: var(--ink-2); margin-top: 6px; font-size: .95rem; }

.benefits { list-style: none; padding: 0; display: grid; gap: 18px; margin-top: 22px; }
.benefits li { display: grid; grid-template-columns: 24px 1fr; gap: 12px; }
.benefits svg { color: var(--accent); margin-top: 2px; }
.benefits strong { display: block; }
.benefits span { color: var(--ink-2); font-size: .93rem; }

@media (min-width: 760px) {
  .tool-list { grid-template-columns: 1fr 1fr; column-gap: 32px; }
  .steps, .benefits { grid-template-columns: repeat(3, 1fr); gap: 32px; }
}
@media (min-width: 1000px) {
  .home-hero { grid-template-columns: 1.15fr 1fr; gap: 56px; padding-block: 64px 40px; }
}

/* 7. Páginas de calculadora ------------------------------------ */
.breadcrumb { padding-top: 18px; font-size: .85rem; color: var(--muted); }
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: var(--line-strong); }
.breadcrumb a { color: var(--ink-2); text-decoration: none; }
.breadcrumb a:hover { color: var(--brand); text-decoration: underline; }
.page-hero { padding-block: 14px 22px; }
.page-hero h1 { font-size: clamp(1.75rem, 4.6vw, 2.6rem); max-width: 26ch; }
.page-hero .lead { margin-top: 10px; color: var(--ink-2); max-width: 62ch; font-size: 1.02rem; }

.tool-card { display: grid; grid-template-columns: 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.noscript { padding: 18px; color: var(--bad); font-weight: 700; }
.tool-form { padding: 20px; display: grid; gap: 22px; min-width: 0; }
fieldset { border: 0; padding: 0; min-width: 0; display: grid; gap: 14px; }
legend { font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; padding: 0; }
.field { display: grid; gap: 6px; min-width: 0; align-content: start; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.label-row { display: flex; align-items: center; gap: 6px; min-height: 22px; }
.label-row label { font-size: .92rem; font-weight: 650; }
.hint { font-size: .8rem; color: var(--muted); line-height: 1.45; }
.input-wrap { display: flex; align-items: center; background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.input-wrap:hover { border-color: #A9B4AE; }
.input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-wrap input { flex: 1; min-width: 0; width: 100%; height: 46px; border: 0; background: transparent; padding: 0 6px 0 13px; font-size: 1.05rem; font-weight: 650; font-variant-numeric: tabular-nums; outline: none; }
.input-wrap .unit { padding-right: 13px; color: var(--muted); font-weight: 650; font-size: .9rem; white-space: nowrap; }
.field.has-error .input-wrap { border-color: var(--bad); }
.field-error { font-size: .8rem; color: var(--bad); font-weight: 650; }
.input-wrap.small { max-width: 170px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: .82rem; font-weight: 650; color: var(--ink-2); }
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Ayudas «?» */
.tip { position: relative; display: inline-block; }
.tip > summary { list-style: none; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink-2); font-size: .75rem; font-weight: 800; display: grid; place-items: center; cursor: pointer; background: var(--surface); }
.tip > summary::-webkit-details-marker { display: none; }
.tip > summary:hover, .tip[open] > summary { border-color: var(--brand); color: var(--brand); }
.tip-body { position: absolute; z-index: 20; left: -8px; top: calc(100% + 8px); width: min(280px, calc(100vw - 48px)); padding: 12px 14px; background: var(--brand); color: #fff; border-radius: 10px; font-size: .85rem; line-height: 1.5; font-weight: 500; box-shadow: 0 12px 28px -14px rgba(22, 61, 54, .55); }
.tip-body strong { color: #fff; }

details.advanced { border-top: 1px dashed var(--line); padding-top: 14px; }
details.advanced > summary { cursor: pointer; font-weight: 700; font-size: .9rem; color: var(--ink-2); list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 32px; }
details.advanced > summary::-webkit-details-marker { display: none; }
details.advanced > summary::before { content: "+"; width: 20px; height: 20px; border-radius: 6px; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: .9rem; }
details.advanced[open] > summary::before { content: "−"; }
details.advanced > .field { margin-top: 12px; }

/* Resultados */
.results { padding: 20px; border-top: 1px solid var(--line); background: #FBFBF8; border-radius: 0 0 var(--radius) var(--radius); display: grid; gap: 4px; align-content: start; min-width: 0; }
.verdict { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: .86rem; background: var(--surface-2); color: var(--ink-2); }
.verdict-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.verdict[data-level="good"] { background: var(--good-bg); color: var(--good); }
.verdict[data-level="warn"] { background: var(--warn-bg); color: var(--warn); }
.verdict[data-level="bad"] { background: var(--bad-bg); color: var(--bad); }
.big-label { margin-top: 14px; font-size: .88rem; font-weight: 650; color: var(--ink-2); }
.big-number { font-size: clamp(2.5rem, 8vw, 3.3rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.big-number[data-level="good"] { color: var(--good); }
.big-number[data-level="warn"] { color: var(--warn); }
.big-number[data-level="bad"] { color: var(--bad); }
.big-sub { color: var(--ink-2); font-size: .95rem; }
.big-sub strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.explain { margin-top: 10px; font-size: .92rem; color: var(--ink-2); line-height: 1.55; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.stat { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: grid; gap: 2px; align-content: start; min-width: 0; }
.stat-label { display: flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 650; color: var(--ink-2); }
.stat-value { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.25; overflow-wrap: anywhere; }
.stat-help { font-size: .76rem; color: var(--muted); line-height: 1.35; }

.block { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.block-title { font-size: .9rem; font-weight: 750; margin-bottom: 10px; }
.bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); }
.seg { height: 100%; transition: width .3s var(--ease); }
.seg + .seg { border-left: 2px solid #FBFBF8; }
.legend { list-style: none; padding: 0; margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 700; }
.legend .is-loss b { color: var(--bad); }
.sw { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.c-tax { background: var(--c-tax); } .c-prod { background: var(--c-prod); } .c-ship { background: var(--c-ship); } .c-fee { background: var(--c-fee); }
.c-other { background: var(--c-other); } .c-ads { background: var(--c-ads); } .c-profit { background: var(--c-profit); } .c-loss { background: var(--c-loss); }

.inline-target { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 12px; }
.inline-target .label-row label { font-weight: 650; font-size: .9rem; }
.target-out { grid-column: 1 / -1; font-size: .95rem; color: var(--ink-2); }
.target-out strong { color: var(--ink); font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.segmented { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); margin-bottom: 10px; flex-wrap: wrap; }
.segmented button { min-height: 36px; padding: 0 12px; border-radius: 8px; font-size: .84rem; font-weight: 650; color: var(--ink-2); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--brand); box-shadow: 0 1px 2px rgba(22, 61, 54, .12); }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.data-table th, .data-table td { text-align: right; padding: 9px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.data-table tbody th { font-weight: 600; color: var(--ink-2); }
.data-table tr.is-current th, .data-table tr.is-current td { background: var(--accent-soft); color: var(--brand); font-weight: 750; }
.num-good { color: var(--good); } .num-bad { color: var(--bad); }

.meter-row { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 4px 12px; font-size: .85rem; margin-top: 8px; }
.meter-label { color: var(--ink-2); font-weight: 650; }
.meter-value { grid-column: 2; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .82rem; }
.meter { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--good); transition: width .3s var(--ease); }
.meter span[data-level="warn"] { background: #C58A0B; }
.meter span[data-level="bad"] { background: var(--bad); }
.note { font-size: .84rem; color: var(--ink-2); margin-top: 10px; line-height: 1.5; }
.note strong { color: var(--ink); }

.warn-list { list-style: none; padding: 12px 14px; margin-top: 16px; border-radius: 10px; background: var(--warn-bg); color: #5E3E00; font-size: .86rem; display: grid; gap: 6px; }
.warn-list li { padding-left: 18px; position: relative; }
.warn-list li::before { content: "!"; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--warn); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.share-note { margin-top: 8px; display: grid; gap: 6px; font-size: .84rem; color: var(--ink-2); }
.share-note input { height: 40px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 8px; width: 100%; font-size: .85rem; }

.privacy { margin-top: 12px; font-size: .84rem; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.privacy svg { flex: none; margin-top: 2px; color: var(--accent); }

@media (min-width: 760px) {
  .tool-form, .results { padding: 26px; }
}
@media (min-width: 1000px) {
  .tool-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .results { border-top: 0; border-left: 1px solid var(--line); border-radius: 0 var(--radius) var(--radius) 0; position: sticky; top: calc(var(--header-h) + 12px); align-self: start; }
}

/* Resultado fijo abajo en móvil */
.sticky-result { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); background: var(--brand); color: #fff; font-size: .9rem; font-weight: 650; transform: translateY(110%); transition: transform .25s var(--ease); }
.sticky-result strong { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sticky-result.is-on { transform: none; }
.sticky-result a { color: #fff; }
@media (min-width: 1000px) { .sticky-result { display: none; } }

/* 8. Contenido ------------------------------------------------- */
.content { padding-block: 48px 24px; }
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.35rem, 3.2vw, 1.75rem); margin: 36px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.1rem; margin: 22px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose p + p { margin-top: 12px; }
.prose ul { padding-left: 20px; display: grid; gap: 6px; margin-top: 10px; }
.formula { margin: 14px 0; padding: 14px 16px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; font-weight: 650; color: var(--ink); font-size: .95rem; }
.formula span { display: block; font-weight: 500; color: var(--ink-2); font-size: .86rem; margin-top: 4px; }
.faq { max-width: 68ch; margin-top: 14px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 13px; font-size: 1.3rem; color: var(--accent); font-weight: 600; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 16px; color: var(--ink-2); }
.faq-title { font-size: clamp(1.35rem, 3.2vw, 1.75rem); margin-top: 44px; }

.related { padding-block: 24px 56px; }
.related h2 { font-size: 1.25rem; }
.related .tool-list { margin-top: 14px; }

/* Anuncios y recomendaciones (solo aparecen si están configurados) */
.ad-slot { margin-block: 28px; min-height: 120px; display: grid; gap: 6px; }
.ad-label { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.affiliates { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.aff-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: baseline; }
.aff-head h2 { font-size: 1.05rem; }
.aff-head p { font-size: .8rem; color: var(--muted); }
.aff-list { list-style: none; padding: 0; margin-top: 10px; display: grid; gap: 10px; }
.aff-item { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.aff-name { font-weight: 750; }
.aff-tag { font-size: .7rem; font-weight: 700; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 8px; margin-left: 6px; }
.aff-desc { font-size: .88rem; color: var(--ink-2); }

/* Consentimiento */
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60; max-width: 560px; margin-inline: auto; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 16px 40px -20px rgba(22, 61, 54, .5); font-size: .9rem; color: var(--ink-2); }
.consent-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* Legales y páginas de texto */
.page-text { padding-block: 32px 56px; }
.page-text h1 { font-size: clamp(1.8rem, 4.5vw, 2.5rem); margin-bottom: 8px; }
.pending { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--warn-bg); color: #5E3E00; font-weight: 700; font-size: .9em; }
.pending-box { margin: 18px 0; padding: 14px 16px; border-radius: 10px; background: var(--warn-bg); color: #5E3E00; font-size: .9rem; }

/* 404 */
.not-found { padding-block: 64px; }
.not-found h1 { font-size: clamp(2rem, 5vw, 3rem); }

/* 9. Pie ------------------------------------------------------- */
.site-footer { margin-top: 24px; padding: 44px 0 28px; background: var(--brand); color: #C9D9D3; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; gap: 28px; }
.footer-brand .brand { color: #fff; }
.footer-brand p { margin-top: 12px; max-width: 38ch; font-size: .9rem; line-height: 1.55; }
.footer-title { font-size: .74rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #9FBDB2; margin-bottom: 10px; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 8px; font-size: .92rem; }
.footer-col button { color: #fff; font-size: .92rem; padding: 0; text-align: left; }
.footer-col button:hover { text-decoration: underline; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .82rem; color: #9FBDB2; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
@media (max-width: 999px) { body.has-sticky .site-footer { padding-bottom: 88px; } }

/* Selector dentro de un campo */
.input-wrap select { flex: 1; min-width: 0; height: 46px; border: 0; background: transparent; padding: 0 10px 0 13px; font: inherit; font-size: 1rem; font-weight: 650; color: var(--ink); outline: none; cursor: pointer; }

/* Las ayudas se abren a lo ancho del campo, sin salirse de la pantalla */
.field, .stats, .inline-target { position: relative; }
.tip, .stat { position: static; }
.tip:not([open]) .tip-body { display: none; }
.tip-body { left: 0; right: 0; width: auto; max-width: 340px; }
.results > *, .tool-form > * { min-width: 0; }
.tool-card { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .tool-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.chip { white-space: nowrap; flex: none; display: inline-flex; align-items: center; }
.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
