/* CálculoCasa · v7 · cálido: fondo crema, grises cálidos, tinta casi negra, azul tinta para enlaces y terracota de marca (logo, dibujos y cifras); titulares con serifa y texto con la letra del sistema (sin descargas). Sin frameworks. */

/* ---------- 1. Tokens ---------- */
:root {
  --ink: #1f1a17;
  --ink-2: #3b332e;
  --muted: #6f625a;
  --faint: #807366;
  --line: #ece5dc;
  --line-2: #ddd3c7;
  --soft: #f5f0e9;
  --soft-2: #faf7f2;
  --bg: #fffdf9;
  /* Acento: azul tinta. --lime-d es la versión clara para fondos oscuros (barra inferior del móvil). */
  --lime: #2f4f9b;
  --lime-soft: #e7ebf5;
  --lime-ink: #233b74;
  --lime-hover: #3e5fae;
  --lime-on: #fff;
  --lime-d: #8ea8ec;
  --lime-d-hover: #a5b9f0;
  --lime-d-on: var(--ink);
  --hover: #ede6dd;
  /* Marca: terracota de las fachadas. --terra para rellenos (logo y dibujos); --terra-ink para cifras y texto (5,9:1 sobre el fondo). */
  --terra: #c0522e;
  --terra-ink: #a9441f;
  --sw-off: #d8cfc4;
  --bar: #d9cfc3;
  --hdr-bg: rgba(255, 253, 249, .92);
  --ftr-bg: #1f1a17;
  --ftr-text: #b3a69a;
  --ftr-link: #efe8e0;
  --ftr-dim: #93867a;
  --ftr-line: #3b332e;
  --seg-2: #7d7066;
  --seg-3: #cfc4b8;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 10px;
  --paper: #fff;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  /* Titulares con la letra con serifa del propio dispositivo (New York en iPhone y Mac, Georgia o Noto Serif en el resto): sin descargas. */
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Noto Serif", serif;
  --mono: var(--sans);
  --bar-h: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 16.5px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-feature-settings: "tnum" 0;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 600; letter-spacing: -0.008em; line-height: 1.15; }
p { margin: 0 0 1em; }
strong, b { font-weight: 600; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.tabnum { font-variant-numeric: tabular-nums; }

/* ---------- 3. Cabecera ---------- */
.hdr { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--line); background: var(--hdr-bg); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); }
.hdr-in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); }
.brand-mark { flex: none; width: 34px; height: auto; margin-top: -3px; overflow: visible; }
.brand-mark .s { fill: none; stroke: currentColor; stroke-width: 1.8px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.brand-mark .f { fill: var(--terra); }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 20px; letter-spacing: -0.005em; }
.nav { display: flex; align-items: center; gap: 4px; font-size: 15.5px; }
.nav-l, .nav-gb { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; transition: color .15s, background .15s; }
.nav-l:hover, .nav-gb:hover, .nav-g.is-open .nav-gb { color: var(--ink); }
.nav-l[aria-current], .nav-g.is-cur .nav-gb { color: var(--ink); font-weight: 600; text-decoration: underline 2px var(--terra); text-underline-offset: 9px; }
.nav-gb svg { transition: transform .2s var(--ease); }
@media (max-width: 480px) { .nav .nav-ext { display: none; } }
.nav-g { position: relative; }
.nav-gp { position: absolute; top: 100%; left: 0; z-index: 50; padding-top: 8px; display: none; }
.nav-g.is-open .nav-gp { display: block; }
.nav-g.is-open .nav-gb svg { transform: rotate(180deg); }
@media (hover: hover) and (min-width: 901px) {
  .nav-g:hover .nav-gp { display: block; }
  .nav-g:hover .nav-gb svg { transform: rotate(180deg); }
}
.nav-gp-in { width: 300px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); box-shadow: 0 10px 28px rgba(31, 26, 23, .1); }
.nav-gp-in a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.nav-gp-in a:hover, .nav-gp-in a[aria-current] { background: var(--soft); }
.nav-gp-in a[aria-current] b { color: var(--lime-ink); }
.nav-gp-in b { display: block; font-size: 15.5px; font-weight: 600; }
.nav-gp-in span { display: block; margin-top: 1px; font-size: 14px; color: var(--muted); }

/* ---------- 4. Calculadora ---------- */
.app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; padding-top: 64px; padding-bottom: 64px; align-items: start; }
.kicker { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--muted); margin-bottom: 20px; }
.kicker::before { content: ""; width: 24px; height: 1px; background: var(--ink); }
.news { display: inline-flex; align-items: center; gap: 10px; max-width: 100%; margin-bottom: 22px; padding: 4px 14px 4px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 14px; font-weight: 500; color: var(--ink-2); text-decoration: none; transition: border-color .2s, background .2s; }
.news:hover { border-color: var(--line-2); background: var(--soft); }
.news-k { display: inline-flex; align-items: center; gap: 6px; flex: none; padding: 3px 9px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 13px; }
.news-k::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lime-d); }
.news-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-go { flex: none; color: var(--muted); transition: transform .2s var(--ease); }
.news:hover .news-go { transform: translateX(3px); color: var(--ink); }
.cc:target { border-color: var(--lime); box-shadow: 0 0 0 3px var(--lime-soft); }
h1 { font-size: clamp(2.05rem, 1.5rem + 1.7vw, 2.85rem); letter-spacing: -0.012em; line-height: 1.1; max-width: 19ch; }
.sub { font-size: 17.5px; color: var(--muted); max-width: 46ch; margin: 14px 0 34px; line-height: 1.5; }

.form { display: flex; flex-direction: column; gap: 20px; }
.fld { margin: 0; padding: 0; border: 0; min-width: 0; }
.fld > label, .fld > legend { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); margin: 0 0 8px; padding: 0; }
.lbl-s { color: var(--faint); font-weight: 400; }
.tag { font-size: 12px; font-weight: 500; color: var(--lime-on); background: var(--lime); border-radius: 6px; padding: 1px 6px; }
.tag[hidden] { display: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.inp { position: relative; display: flex; align-items: center; background: var(--soft); border-radius: var(--r-sm); border: 1px solid transparent; transition: background .15s, border-color .15s, box-shadow .15s; }
.inp:hover { background: var(--hover); }
.inp:focus-within { background: var(--paper); border-color: var(--ink-2); box-shadow: 0 0 0 4px rgba(31, 26, 23, .07); }
.inp[hidden] { display: none; }
.inp input, .inp select { flex: 1; min-width: 0; width: 100%; height: 52px; border: 0; background: transparent; font: inherit; font-size: 17px; color: var(--ink); padding: 0 16px; outline: none; font-variant-numeric: tabular-nums; }
.inp input::placeholder { color: var(--faint); }
.unit { padding-right: 16px; color: var(--muted); font-weight: 500; }
.inp--price input { height: 72px; font-size: clamp(1.8rem, 1.45rem + 1vw, 2.25rem); font-weight: 600; letter-spacing: -0.02em; padding-left: 18px; }
.inp--price .unit { font-size: 22px; padding-right: 20px; }
.inp--sel::after { content: ""; position: absolute; right: 18px; top: 50%; width: 7px; height: 7px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.inp--sel select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--soft); border: 1px solid transparent; border-radius: var(--r-sm); padding: 4px; height: 52px; }
.seg label { position: relative; display: flex; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg span { flex: 1; display: grid; place-items: center; border-radius: 6px; font-size: 15px; font-weight: 500; color: var(--muted); transition: background .2s var(--ease), color .2s; white-space: nowrap; }
.seg input:checked + span { background: var(--ink); color: #fff; font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.box { border: 1px solid var(--line); border-radius: var(--r-md); padding: 4px 18px; }
.box-row { min-height: 56px; display: flex; align-items: center; }
.box-body { padding: 2px 0 18px; }
.box-body[hidden] { display: none; }
.sw { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; cursor: pointer; user-select: none; }
.sw-t { font-size: 16px; font-weight: 500; color: var(--ink); }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw-ui { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: var(--sw-off); transition: background .2s var(--ease); }
.sw-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s var(--ease); }
.sw input:checked + .sw-ui { background: var(--ink); }
.sw input:checked + .sw-ui::after { transform: translateX(18px); }
.sw input:focus-visible + .sw-ui { outline: 2px solid var(--ink); outline-offset: 2px; }
.sw--sm { height: 21px; margin-bottom: 8px; }
.sw--sm .sw-t { font-size: 14px; color: var(--muted); }
.sw--sm .sw-ui { width: 36px; height: 21px; }
.sw--sm .sw-ui::after { width: 15px; height: 15px; }
.sw--sm input:checked + .sw-ui::after { transform: translateX(15px); }

.range-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.range-top label { font-size: 14px; color: var(--muted); font-weight: 500; }
output { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
input[type="range"] { --p: 77.8%; -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--ink) var(--p), var(--line-2) var(--p)); }
input[type="range"]::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-2); }
input[type="range"]::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--ink); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); box-shadow: 0 2px 6px rgba(31, 26, 23, .15); }
input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid var(--ink); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(31, 26, 23, .16); }
.hint { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.hint a { color: var(--lime-ink); }

.more { border-top: 1px solid var(--line); }
.more summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 18px 28px 18px 0; position: relative; }
.more summary::-webkit-details-marker { display: none; }
.more summary span { font-size: 16px; font-weight: 600; }
.more summary small { font-size: 14px; color: var(--faint); }
.more summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 12px; height: 12px; background: linear-gradient(var(--ink), var(--ink)) center/12px 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center/1.5px 12px no-repeat; transform: translateY(-50%); transition: transform .2s var(--ease); }
.more[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.more-b { display: flex; flex-direction: column; gap: 16px; padding-bottom: 6px; }
.noscript { font-size: 15px; background: var(--lime-soft); padding: 10px 14px; border-radius: 10px; }

/* ---------- 5. Resultado ---------- */
.app-out { position: sticky; top: 88px; }
.out { background: var(--soft); border-radius: var(--r-lg); padding: 32px; }
.res-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 12px; }
.res-head > span { white-space: nowrap; }
.res-label { font-size: 15px; font-weight: 600; color: var(--ink); }
.res-loc { font-size: 13.5px; color: var(--muted); text-align: right; }
.res-num { display: flex; align-items: baseline; gap: 8px; margin: 10px 0 6px; font-family: var(--serif); font-size: clamp(3rem, 2.2rem + 2.4vw, 4.4rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.res-c { font-size: .45em; letter-spacing: 0; color: var(--muted); font-weight: 600; }
.res-sub { font-size: 15px; color: var(--muted); margin: 0 0 22px; }
.res-sub b { color: var(--ink); font-variant-numeric: tabular-nums; }
.bar { display: flex; gap: 3px; height: 10px; border-radius: 999px; overflow: hidden; background: var(--line); }
.bar-seg { display: block; height: 100%; min-width: 0; transition: width .55s var(--ease); }
.bar-entrada { background: var(--ink); }
.bar-impuestos { background: var(--lime); }
.bar-nr { background: var(--seg-2); }
.bar-otros { background: var(--seg-3); }
.legend { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 20px; font-size: 14px; }
.legend li { display: flex; align-items: center; gap: 8px; color: var(--muted); min-width: 0; }
.legend i { flex: none; width: 8px; height: 8px; border-radius: 2px; }
.legend b { margin-left: auto; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-entrada i { background: var(--ink); }
.lg-impuestos i { background: var(--lime); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.lg-nr i { background: var(--seg-2); }
.lg-otros i { background: var(--seg-3); }

/* Recibo */
.receipt { position: relative; background: var(--bg); border-radius: 18px 18px 6px 6px; padding: 22px 24px 20px; margin: 26px 0 30px; box-shadow: 0 1px 0 rgba(0, 0, 0, .03); }
.receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 14px; background: radial-gradient(circle at 7px 7px, var(--soft) 6px, transparent 6.5px) -1px 0 / 14px 14px repeat-x; }
.rc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.rc-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.rc-meta { font-size: 13px; color: var(--faint); text-align: right; }
.rc { margin: 0; }
.rc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 6px 0; font-size: 15px; }
.rc-row dt { margin: 0; color: var(--ink-2); min-width: 0; }
.rc-row dt small { display: block; font-size: 13px; color: var(--faint); line-height: 1.35; margin-top: 1px; }
.rc-row dd { margin: 0; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-chip { display: inline-block; font-size: 12px; font-weight: 500; color: var(--muted); background: var(--soft); border-radius: 6px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; letter-spacing: 0; }
.rc-strong dt, .rc-strong dd { color: var(--ink); font-weight: 600; }
.rc-muted dt, .rc-muted dd { color: var(--muted); }
.rc-off { font-size: 14px; color: var(--faint); }
.rc-detail { padding: 2px 0 2px 12px; font-size: 13.5px; }
.rc-detail dt { color: var(--muted); }
.rc-detail dd { font-size: 14px; color: var(--muted); }
.rc-sep { display: flex; align-items: center; gap: 10px; margin: 16px 0 4px; line-height: 1.55; font-size: 13px; font-weight: 600; color: var(--muted); }
.rc-sep::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.rc-subtotal { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }
.rc-subtotal dt, .rc-subtotal dd { font-weight: 600; color: var(--ink); }
.rc-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--ink-2); font-weight: 700; font-size: 16px; }
.rc-total strong { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rc-bank { font-size: 13.5px; line-height: 1.45; color: var(--lime-ink); background: var(--lime-soft); border-radius: 10px; padding: 10px 12px; margin: 16px 0 0; }
.rc-bank strong { color: var(--lime-ink); }
.rc-notes { list-style: none; margin: 12px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.rc-notes li { position: relative; padding-left: 14px; margin-top: 4px; line-height: 1.4; }
.rc-notes li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 4px; height: 4px; border-radius: 50%; background: var(--faint); }

.actions { display: flex; flex-direction: column; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border: 0; border-radius: var(--r-sm); background: var(--ink); color: #fff; font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; transition: background .2s, transform .1s, color .2s; }
.btn:hover { background: var(--ink-2); }
.btn:active { transform: scale(.99); }
.btn.is-done { background: #1f7a4d; color: #fff; }
.btn--ghost { background: var(--soft); color: var(--ink); min-height: 46px; }
.btn--ghost:hover { background: var(--hover); }
.btn-link { background: none; border: 0; font: inherit; font-size: 14px; color: var(--muted); cursor: pointer; padding: 6px; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.btn-link:hover { color: var(--ink); }
.fine { font-size: 13px; color: var(--faint); text-align: center; margin: 14px 0 0; }
.fine a { color: var(--muted); }

/* ---------- 6. Huecos de anuncio (placeholders) ---------- */
.ad-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; background: var(--soft-2); border: 1px solid var(--line); border-radius: var(--r-md); margin: 0 auto; text-align: center; }
.ad-label { font-size: 12px; font-weight: 500; color: var(--faint); }
.ad-size { font-size: 11px; color: var(--seg-3); }
.ad-slot--leaderboard { max-width: 970px; min-height: 110px; margin-bottom: 8px; }
.ad-slot--incontent { max-width: 336px; min-height: 280px; margin: 64px auto 0; }
.ad-slot.is-live { display: block; background: none; border: 0; border-radius: 0; min-height: 0; width: 100%; }
.ad-slot.is-live .adsbygoogle { min-height: 0; }
/* Hasta que AdSense rellena el bloque, el hueco queda plegado (sin alto ni etiqueta) pero conserva su ancho para que Google pueda medirlo. */
.ad-slot.is-live:not(:has(ins[data-ad-status="filled"])) { height: 0; min-height: 0; margin-top: 0; margin-bottom: 0; overflow: hidden; }
.ad-slot.is-live:has(ins[data-ad-status="unfilled"]) { display: none; }
.ad-note { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; color: var(--faint); }

.copy-modal { border: 0; padding: 0; border-radius: 14px; width: min(360px, calc(100vw - 32px)); background: var(--bg); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .25); }
.copy-modal::backdrop { background: rgba(31, 26, 23, .45); }
.copy-modal-box { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 24px 22px 20px; }
.copy-modal-msg { align-self: stretch; margin: 0 34px 0 0; font-size: 16px; font-weight: 500; line-height: 1.4; }
.copy-modal-msg span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--lime); color: var(--lime-on); font-size: 13px; margin-right: 6px; vertical-align: -3px; }
.copy-modal .btn--ghost { align-self: stretch; }
.copy-modal.is-fallback { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 90; }
.copy-fallback { display: block; width: 100%; margin-top: 10px; font: inherit; font-size: 14px; border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; }
.x-close { position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--soft); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.x-close:hover { background: var(--hover); }

/* ---------- 7. Páginas de contenido ---------- */
.out-link { display: inline-flex; gap: 6px; margin: 20px 0 18px; font-size: 15px; font-weight: 500; color: var(--lime-ink); text-decoration: underline; text-decoration-color: rgba(35, 59, 116, .35); text-underline-offset: 3px; }
.out-link:hover { text-decoration-color: currentColor; }

.page-hero { padding-top: 72px; padding-bottom: 12px; }
.page-hero h1 { max-width: 20ch; }
.lead { font-size: 18px; color: var(--muted); max-width: 64ch; margin: 16px 0 0; line-height: 1.55; }
.lead strong { color: var(--ink); }
.blk { padding-top: 64px; padding-bottom: 8px; }
.blk-h { max-width: 720px; margin-bottom: 28px; }
.blk-h h2 { font-size: clamp(1.5rem, 1.25rem + .8vw, 1.9rem); letter-spacing: -0.008em; line-height: 1.2; }
.blk-intro { color: var(--muted); font-size: 17px; margin: 10px 0 0; }
.blk-intro a { color: var(--lime-ink); }
.blk--narrow > * { max-width: 820px; }
.blk--table > .table-wrap, .blk--table > .note { max-width: 980px; }
.h3 { font-size: 20px; letter-spacing: -0.01em; margin: 48px 0 12px; }

/* Inicio: accesos a las demás páginas */
.explore { padding-top: 64px; padding-bottom: 8px; }
.explore-h { font-size: clamp(1.35rem, 1.15rem + .6vw, 1.65rem); letter-spacing: -0.016em; margin: 0 0 20px; }
.xp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.xp-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.xp-card:hover { border-color: var(--line-2); box-shadow: 0 2px 8px rgba(31, 26, 23, .06); }
.xp-t { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; color: var(--lime-ink); }
.xp-d { font-size: 15px; color: var(--muted); line-height: 1.45; }
.aviso-home { padding-top: 48px; padding-bottom: 80px; }
.aviso-home > * { max-width: 820px; }
.aviso-k { font-size: 15px; font-weight: 700; color: var(--ink); border-top: 1px solid var(--line); padding-top: 24px; margin: 0 0 8px; }

/* Llamada a la calculadora */
.cta { padding-top: 72px; padding-bottom: 88px; }
.cta-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; background: var(--soft); color: var(--ink); border-radius: var(--r-lg); padding: 28px 32px; }
.cta-t { font-size: clamp(1.2rem, 1.05rem + .6vw, 1.5rem); font-weight: 700; letter-spacing: -0.014em; line-height: 1.25; margin: 0; max-width: 30ch; }
a.btn { text-decoration: none; }
.btn--lime { background: var(--lime); color: var(--lime-on); }
.btn--lime:hover { background: var(--lime-hover); }

/* Ranking con su propio precio */
.rk-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: end; max-width: 720px; padding: 18px; border-radius: 14px; background: var(--soft); }
.rk-tools .inp, .rk-tools .seg { background: var(--bg); }
.rk-tools .inp:hover { background: var(--bg); }
.rk-tools .inp input { font-size: 19px; font-weight: 600; letter-spacing: -0.012em; }
.rk-cap { color: var(--muted); font-size: 16px; margin: 26px 0 0; }
.rk-cap b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rank { list-style: none; margin: 14px 0 0; padding: 0; max-width: 960px; }
.rk-item { border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.rk-row { display: grid; grid-template-columns: 230px minmax(0, 1fr) 96px 64px; align-items: center; gap: 16px; height: 44px; padding-right: 30px; position: relative; font-size: 15px; list-style: none; cursor: pointer; }
.rk-row::-webkit-details-marker { display: none; }
.rk-row::after { content: ""; position: absolute; right: 6px; top: 50%; width: 11px; height: 11px; background: linear-gradient(var(--muted), var(--muted)) center/11px 1.5px no-repeat, linear-gradient(var(--muted), var(--muted)) center/1.5px 11px no-repeat; transform: translateY(-50%); transition: transform .25s var(--ease); }
.rk-d[open] > .rk-row::after { transform: translateY(-50%) rotate(45deg); }
.rk-row:hover .rk-name { color: var(--ink); }
.rk-det { max-width: 520px; padding: 2px 0 16px; font-size: 15px; color: var(--ink-2); }
.rk-dt { margin: 0 0 8px; }
.rk-det .cc-scale { margin: 4px 0 12px; }
.rk-det small { margin-left: 4px; font-size: 13.5px; color: var(--muted); }
.rk-det .cc-go { margin-top: 4px; }
.rk-nota { margin: 18px 0 0; font-size: 15px; color: var(--muted); max-width: 72ch; }
.rk-name { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rk-bar { height: 8px; border-radius: 2px; background: var(--soft); overflow: hidden; }
.rk-bar i { display: block; height: 100%; border-radius: 2px; background: var(--bar); transition: width .5s var(--ease); }
.rk-val { text-align: right; font-size: 14.5px; font-weight: 500; font-variant-numeric: tabular-nums; }
.rk-pct { text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.is-sel .rk-name { color: var(--ink); font-weight: 600; }
.is-sel .rk-name::after { content: "Tu comunidad"; margin-left: 8px; font-size: 10.5px; font-weight: 600; background: var(--lime); color: var(--lime-on); padding: 2px 6px; border-radius: 6px; vertical-align: 1px; }
.is-sel .rk-bar i { background: var(--lime); }
.rk-more { margin: 28px 0 0; }

/* Tarjetas de tipos por comunidad */
.cc-group + .cc-group { margin-top: 48px; }
.cc-gh { display: flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: -0.01em; margin: 0 0 16px; }
.cc-gh span { font-size: 13px; font-weight: 500; color: var(--muted); background: var(--soft); border-radius: 6px; padding: 2px 8px; }
.cc-legend { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; margin: -4px 0 18px; padding: 0; font-size: 14.5px; color: var(--muted); }
.cc-legend li { display: flex; align-items: center; gap: 8px; }
.cc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cc-grid--flat { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cc { display: flex; flex-direction: column; padding: 20px 20px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); scroll-margin-top: 96px; transition: border-color .2s, box-shadow .2s; }
.cc:hover { border-color: var(--line-2); }
.cc:target { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(47, 79, 155, .2); }
.cc-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 24px; margin-bottom: 14px; }
.cc-h h3 { font-size: 17px; letter-spacing: -0.008em; }
.cc-tag { flex: none; font-size: 12.5px; font-weight: 500; padding: 3px 9px; border-radius: 6px; white-space: nowrap; }
.cc-tag--progressive { background: var(--lime-soft); color: var(--lime-ink); }
.cc-tag--whole { background: var(--soft); color: var(--ink-2); }
.cc-k { font-size: 12.5px; font-weight: 500; color: var(--faint); margin: 0 0 4px; }
.cc-rate { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.cc--flat .cc-rate { font-size: 30px; }
.cc-sub { font-size: 13.5px; color: var(--muted); margin: 0 0 4px; line-height: 1.45; }
.cc-scale { list-style: none; margin: 14px 0 10px; padding: 0; }
.cc-scale li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.cc-l { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cc-scale b { font-size: 14.5px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-new { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: auto 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.cc-new > div { min-width: 0; }
.cc-new dt { font-size: 12.5px; font-weight: 500; color: var(--faint); }
.cc-new dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; letter-spacing: -0.004em; }
.cc-new dd small { display: block; font-size: 12.5px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.note--wide { margin-top: 20px; max-width: 980px; }

/* Tablas */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
thead th { font-size: 13px; font-weight: 600; color: var(--muted); padding-top: 0; }
tbody th { font-weight: 600; color: var(--ink); }
td { color: var(--ink-2); }
.pill { display: inline-block; font-size: 13px; font-weight: 500; border-radius: 6px; padding: 3px 10px; white-space: nowrap; }
.pill--you { background: var(--lime); color: #fff; }
.pill--bank { background: var(--lime-soft); color: var(--lime-ink); }
.pill--seller { background: var(--soft); color: var(--ink-2); }
.who small { color: var(--faint); }
.note { font-size: 15px; color: var(--muted); background: var(--soft-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 20px; }
.note strong { color: var(--ink); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; max-width: 980px; }
.stat { border-top: 1px solid var(--line-2); padding-top: 16px; }
.stat-k { font-size: 14px; font-weight: 500; color: var(--muted); margin: 0 0 6px; }
.stat-v { font-size: clamp(2.2rem, 1.7rem + 1.4vw, 3rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1; margin: 0 0 16px; color: var(--ink); }
.stat-v span { font-size: .45em; letter-spacing: -0.008em; color: var(--muted); font-weight: 500; }
.stat p:last-child { font-size: 16px; color: var(--muted); margin: 0; }
.stat p:last-child strong { color: var(--ink); }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; position: relative; padding: 20px 0 18px 40px; border-bottom: 1px solid var(--line); color: var(--muted); }
.steps li:first-child { padding-top: 0; }
.steps li:first-child::before { top: -4px; }
.steps li::before { content: counter(s); position: absolute; left: 2px; top: 16px; font-family: var(--serif); font-size: 27px; font-weight: 600; line-height: 1; color: var(--terra-ink); font-variant-numeric: lining-nums; }
.steps li strong { color: var(--ink); }

.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; position: relative; padding: 18px 44px 18px 0; font-size: 17.5px; font-weight: 600; letter-spacing: -0.006em; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; background: linear-gradient(var(--ink), var(--ink)) center/14px 1.5px no-repeat, linear-gradient(var(--ink), var(--ink)) center/1.5px 14px no-repeat; transform: translateY(-50%); transition: transform .25s var(--ease); }
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-a { color: var(--ink-2); padding: 0 44px 6px 0; }
.faq-a p { margin-bottom: 18px; }

.updated { font-size: 15px; color: var(--muted); max-width: 820px; }
.sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 24px; }
.sources h3 { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 10px; }
.sources ul { list-style: none; margin: 0; padding: 0; font-size: 14.5px; }
.sources li { padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.4; }
.sources a { text-decoration: none; color: var(--ink-2); }
.sources a:hover { color: var(--ink); text-decoration: underline; }
.disclaimer p { font-size: 16px; color: var(--muted); margin: 0; }
.disclaimer strong { color: var(--ink); }

/* Páginas legales */
.no-mbar { --bar-h: 0px; }
.legal { max-width: 800px; padding-top: 64px; padding-bottom: 96px; }
.legal h1 { font-size: clamp(1.9rem, 1.5rem + 1.2vw, 2.5rem); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 28px; max-width: none; }
.legal h2 { font-size: 19px; letter-spacing: -0.008em; margin: 36px 0 8px; }
.legal p, .legal li { color: var(--ink-2); }

/* ---------- 8. Pie ---------- */
.ftr { background: var(--ftr-bg); color: var(--ftr-text); padding: 44px 0 calc(44px + var(--bar-h)); font-size: 14px; }
.ftr-in { display: flex; flex-direction: column; gap: 24px; }
.ftr-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; }
.ftr-top p { margin: 0; }
.ftr-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 32px; padding-top: 20px; border-top: 1px solid var(--ftr-line); }
.ftr nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ftr a { color: var(--ftr-link); text-decoration: none; }
.ftr a:hover { color: #fff; }
.ftr-cmp { font: inherit; color: var(--ftr-link); background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.ftr-cmp:hover { color: #fff; }
.brand--inv { color: #fff; }

/* ---------- 9. Barra móvil ---------- */
.mbar { display: none; }

/* ---------- 10. Responsive ---------- */
@media (max-width: 1080px) {
  .app { gap: 44px; }
  .xp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-grid--flat { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --bar-h: 72px; }
  .no-mbar { --bar-h: 0px; }
  .hdr { position: relative; }
  .hdr-in { flex-wrap: wrap; height: auto; padding-top: 12px; }
  html { scroll-padding-top: 20px; }
  .brand { height: 34px; }
  .nav { order: 2; flex: 1 0 100%; gap: 22px; margin: 4px 0 0; padding: 0; }
  .nav-g { position: static; }
  .nav-gp { left: 0; right: 0; padding: 0 20px 14px; }
  .nav-gp-in { width: auto; }
  .app { grid-template-columns: 1fr; gap: 36px; padding-top: 32px; padding-bottom: 40px; }
  .app-out { position: static; }
  h1 { max-width: 20ch; }
  .sub { margin-bottom: 28px; }
  .page-hero { padding-top: 40px; }
  .blk { padding-top: 48px; }
  .mbar { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--ink); color: #fff; padding-bottom: env(safe-area-inset-bottom); }
  .mbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--bar-h); padding: 0 20px; max-width: 700px; margin: 0 auto; }
  .mbar-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
  .mbar-label { font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--ftr-text); }
  .mbar-num { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .mbar-btn { flex: none; background: var(--lime-d); color: var(--lime-d-on); font-size: 15px; font-weight: 600; text-decoration: none; padding: 11px 18px; border-radius: var(--r-sm); }
  }
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .nav-gp { padding: 0 16px 14px; }
  h1 { font-size: 1.95rem; }
  .sub, .lead { font-size: 17px; }
  .grid-2 { grid-template-columns: 1fr; gap: 20px; }
  .inp--price input { height: 66px; }
  .out { padding: 20px 16px; }
  .res-num { font-size: 3.1rem; }
  .receipt { padding: 18px 16px 18px; }
  .legend { grid-template-columns: 1fr; }
  .xp-grid { grid-template-columns: 1fr; gap: 10px; }
  .xp-card { padding: 16px 18px 18px; }
  .cc-grid { grid-template-columns: 1fr; gap: 12px; }
  .cc-grid--flat { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cc--flat { padding: 16px 14px 14px; }
  .cc--flat .cc-rate { font-size: 26px; }
  .cc--flat .cc-new { grid-template-columns: 1fr; gap: 8px; }
  .cc { padding: 20px 18px 18px; }
  .rk-tools { grid-template-columns: 1fr; padding: 14px; border-radius: 12px; }
  .stats { grid-template-columns: 1fr; gap: 28px; }
  .sources { grid-template-columns: 1fr; gap: 24px; }
  .rk-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name val" "bar bar"; gap: 6px 12px; height: auto; padding: 10px 28px 12px 0; font-size: 15px; }
  .rk-name { grid-area: name; }
  .rk-val { grid-area: val; }
  .rk-bar { grid-area: bar; height: 6px; }
  .rk-pct { display: none; }
  .more summary small { flex-basis: 100%; }
  .ad-slot--leaderboard { max-width: 320px; min-height: 100px; }
  .faq-item summary { font-size: 16.5px; }
  .cta-in { padding: 26px 22px; border-radius: 12px; }
  .cta-in .btn { width: 100%; }
  /* Tabla de quién paga como lista */
  .who thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .who tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .who th, .who td { display: block; border: 0; padding: 3px 0; }
  .who tbody th { font-size: 16px; padding-bottom: 6px; }
  .who td { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 8px; }
  .who td::before { content: attr(data-label); font-size: 13px; color: var(--faint); }
  .who td > * { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bar-seg, .rk-bar i { transition: none; }
}
@media print {
  .hdr, .ad-slot, .mbar { display: none; }
  .app { display: block; padding: 0; }
  .out { filter: none; }
}

/* ---------- Páginas por comunidad, rebajas y menú desplegable (6/10/2026) ---------- */
[hidden] { display: none !important; }
.out-links { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 20px 0 18px; }
.out-links .out-link { margin: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; font-size: 14px; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); font-weight: 500; }
.lbl { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--muted); margin: 0 0 8px; }
.inp--fixed { gap: 12px; padding: 0 16px; height: 52px; background: var(--soft-2); border-color: var(--line); }
.inp--fixed:hover { border-color: var(--line); }
.fixed-v { font-size: 17px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fixed-a { flex: none; margin-left: auto; font-size: 13.5px; font-weight: 400; color: var(--muted); }
.fixed-a:hover { color: var(--ink); }

.sit { padding: 4px 18px 16px; }
.sit-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; padding: 14px 0 10px; }
.sit-t { margin: 0; font-size: 16px; font-weight: 600; color: var(--ink); }
.sit-res { margin: 0; font-size: 13.5px; font-weight: 500; color: var(--muted); background: var(--soft); border-radius: 6px; padding: 4px 11px; }
.sit-res.is-on { color: var(--lime-ink); background: var(--lime-soft); }
.sit-row { min-height: 50px; display: flex; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.sit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 14px; margin-bottom: 14px; }
.sit-chks { display: flex; flex-wrap: wrap; gap: 8px; }
.chk { display: inline-flex; align-items: flex-start; gap: 9px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); font-size: 15px; line-height: 1.35; color: var(--ink-2); cursor: pointer; user-select: none; transition: border-color .15s, background .15s; }
.chk:hover { border-color: var(--line-2); }
.chk input { flex: none; width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--lime); }
.chk:has(input:checked) { border-color: var(--lime); background: var(--lime-soft); }
.chk small { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.chk--wide { display: flex; width: 100%; }
.sit-note { margin: 12px 0 0; }
.rc-save dd { color: var(--lime-ink); }

.cc-go { align-self: flex-start; margin-top: 14px; font-size: 14.5px; font-weight: 500; color: var(--lime-ink); text-decoration: underline; text-decoration-color: rgba(35, 59, 116, .35); text-underline-offset: 3px; }
.cc-go:hover { text-decoration-color: currentColor; }

.blk-p { max-width: 72ch; color: var(--ink-2); margin: 0 0 14px; }
.blk-p a { color: var(--lime-ink); }
.src-1 { font-size: 15px; color: var(--muted); }
.facts { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; max-width: 860px; }
.facts li { padding: 12px 0 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.facts b { color: var(--ink); font-weight: 600; }
.dots { list-style: none; margin: 0 0 18px; padding: 0; max-width: 860px; color: var(--ink-2); font-size: 16px; }
.dots li { position: relative; margin: 8px 0; padding-left: 18px; }
.dots li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--seg-2); }
.h3 { font-size: 18px; letter-spacing: -0.008em; margin: 26px 0 10px; }
.kv { display: grid; max-width: 860px; margin: 0 0 18px; border-top: 1px solid var(--line); }
.kv > div { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.kv dt { font-size: 14px; color: var(--faint); }
.kv dd { margin: 0; color: var(--ink-2); }
.sources--one { display: block; max-width: 860px; margin-top: 0; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; }
.chip { display: inline-flex; padding: 7px 13px; border-radius: 8px; background: var(--soft); color: var(--ink-2); font-size: 14.5px; text-decoration: none; transition: background .15s; }
.chip:hover { background: var(--hover); }
.chip--page { background: var(--lime-soft); color: var(--lime-ink); font-weight: 600; }
.chip--page:hover { background: #dfe5f3; }


@media (max-width: 900px) {
}
@media (max-width: 640px) {
  .sit { padding: 2px 14px 14px; }
  .sit-grid { grid-template-columns: 1fr; }
  .chk { width: 100%; }
  .kv > div { grid-template-columns: 1fr; gap: 4px; }
}

/* Entre 901 y 1180 px la columna del formulario es estrecha: comunidad y tipo, uno debajo del otro. */
@media (min-width: 901px) and (max-width: 1180px) {
  .grid-2 { grid-template-columns: 1fr; gap: 20px; }
}

/* Página 404 */
.nf-ccaa { margin-top: 14px; }
.explore .rk-more:first-child { margin: 0 0 28px; }

/* Tipos reducidos: lista plegable (como las preguntas frecuentes), con el tipo a la vista */
.rb-list { max-width: 860px; }
.rb-item summary { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.rb-n { min-width: 0; }
.rb-t { flex: none; font-size: 19px; font-weight: 700; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; text-align: right; }
.rb-t small { display: block; font-size: 12.5px; font-weight: 500; letter-spacing: 0; color: var(--faint); }
.rb-more summary { font-size: 16px; color: var(--muted); }
.rbc-req { list-style: none; margin: 0 0 12px; padding: 0; font-size: 15.5px; line-height: 1.45; color: var(--ink-2); }
.rbc-req li { position: relative; padding-left: 16px; }
.rbc-req li + li { margin-top: 6px; }
.rbc-req li::before { content: ""; position: absolute; left: 3px; top: .58em; width: 5px; height: 5px; border-radius: 50%; background: var(--seg-2); }
.faq-a .rb-meta { font-size: 15px; color: var(--muted); margin: 0 0 4px; }
.faq-a .rb-art { font-size: 13.5px; color: var(--faint); margin: 10px 0 18px; }
.faq-a .rb-sub { font-size: 15px; font-weight: 600; color: var(--ink); margin: 18px 0 6px; }
.rb-more .dots { font-size: 15.5px; }

/* Novedad en una línea */
.nov { display: flex; align-items: baseline; gap: 10px; max-width: 860px; margin: 0 0 18px; padding: 12px 14px; border-radius: var(--r-md); background: var(--lime-soft); font-size: 15px; color: var(--ink-2); }
.nov-k { flex: none; font-size: 12.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--lime); color: #fff; }
.nov a { color: var(--lime-ink); white-space: nowrap; }

/* Cómo se paga: tres datos */
.pay { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-width: 860px; margin: 0 0 14px; }
.pay > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg); }
.pay dt { font-size: 13px; color: var(--muted); }
.pay dd { margin: 4px 0 0; font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -0.008em; color: var(--ink); }
.pay-go { font-size: 15px; }

/* Cierre de las páginas de comunidad */
.fin { padding-top: 40px; }
.fin-links { font-size: 15.5px; color: var(--muted); margin: 0 0 10px; }
.fin-links a { color: var(--lime-ink); }
.fin-fine { max-width: 860px; font-size: 14px; line-height: 1.55; color: var(--faint); margin: 0; }
.fin-fine a { color: var(--muted); }
@media (max-width: 640px) {
  .pay { grid-template-columns: 1fr; gap: 8px; }
  .pay > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 14px; }
  .pay dd { margin: 0; font-size: 16px; text-align: right; }
  .nov { font-size: 14.5px; }
}

/* Desglose plegado bajo el resultado */
.dg { margin: 22px 0 26px; }
.dg > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: var(--r-sm); background: var(--bg); font-size: 15px; font-weight: 500; color: var(--ink); transition: background .2s; }
.dg > summary:hover { background: var(--soft-2); }
.dg > summary::-webkit-details-marker { display: none; }
.dg > summary::after { content: ""; width: 7px; height: 7px; margin-top: -3px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg); transition: transform .2s var(--ease); }
.dg[open] > summary::after { transform: rotate(-135deg); margin-top: 3px; }
.dg-c, .dg[open] .dg-o { display: none; }
.dg[open] .dg-c { display: inline; }
.dg .receipt { margin: 14px 0 0; }
.fin-src { margin-top: 8px; font-size: 14px; color: var(--muted); }
.fin-src > summary { cursor: pointer; width: max-content; color: var(--muted); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; }
.fin-src ul { margin: 8px 0 0; padding-left: 18px; }
.fin-src li { margin: 4px 0; }
.fin-src a { color: var(--muted); }
.rk-nota { margin-bottom: 48px; }
.fld-hint { margin: 6px 2px 0; font-size: 13.5px; line-height: 1.4; color: var(--muted); }

/* Subida del alquiler */
.seg--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.alq .res-num { font-size: clamp(2.7rem, 2.1rem + 2vw, 3.8rem); }
.alq .res-sub { margin-bottom: 14px; }
.alq-idx { display: inline-flex; margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--bg); font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.alq .rc-notes { margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.alq .actions { margin-top: 26px; }
.alq-mas { margin-top: 28px; }
.alq-mas .table-wrap { margin-top: 12px; }
.carta { margin: 14px 0 0; padding: 18px 20px; border-radius: var(--r-md); background: var(--bg); font-size: 14.5px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 380px; overflow: auto; }
.btn:disabled { opacity: .4; cursor: default; }
#indices .table-wrap { max-width: 760px; }
.alq-t th, .alq-t td { padding: 11px 16px 11px 0; }
.alq-t th:last-child, .alq-t td:last-child { padding-right: 0; }
.alq-t .n { text-align: right; font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.alq-t tbody th { font-weight: 500; white-space: nowrap; }
.alq-t tbody tr:first-child th, .alq-t tbody tr:first-child td { font-weight: 600; color: var(--ink); }
.coef-t thead th.n { white-space: normal; vertical-align: bottom; }
.upd { position: relative; max-width: 36em; margin: 14px 0 30px; padding-left: 17px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.upd::before { content: ""; position: absolute; left: 0; top: .58em; width: 7px; height: 7px; border-radius: 50%; background: var(--terra); }
.upd b { font-weight: 600; color: var(--ink); }
.upd a { color: var(--terra-ink); }
.coef-t tbody tr:first-child th { font-weight: 500; }
.coef-t tbody tr:first-child td { font-weight: 400; color: var(--ink-2); }
.alq-kv > div { grid-template-columns: 220px minmax(0, 1fr); }
.alq-kv dt { font-size: 15px; font-weight: 500; color: var(--ink); }
.alq-kv dd b { color: var(--ink); }
@media (max-width: 640px) {
  .alq .res-num { font-size: 2.7rem; }
  .seg--4 span { font-size: 14.5px; }
  .alq-t { font-size: 14px; }
  .alq-t th, .alq-t td { padding: 10px 10px 10px 0; }
  .alq-t .n { font-size: 13.5px; }
  .alq-kv > div { grid-template-columns: 1fr; }
  .carta { padding: 14px 14px; font-size: 14px; }
}

/* ---------- Tarjeta del resultado ---------- */
.out { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px 28px 24px; }
.res-head { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.res-loc { font-size: 14px; }
.res-num { margin: 20px 0 14px; color: var(--terra-ink); font-variant-numeric: lining-nums tabular-nums; }
.res-sub { margin: 0 0 18px; }
.res-line, .alq .res-sub { padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--ink-2); }
.res-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.res-line b, .alq .res-sub b { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bar { height: 8px; gap: 2px; border-radius: 4px; }
.legend { grid-template-columns: 1fr; gap: 0; margin: 12px 0 0; font-size: 15px; }
.legend li { align-items: baseline; padding: 5px 0; color: var(--ink-2); }
.legend i { align-self: center; }
.legend span { flex: 1; min-width: 0; }
.legend b { margin-left: 8px; font-size: 15px; font-weight: 600; }
.out-links { margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.dg { margin: 18px 0 20px; }
.dg > summary { border: 1px solid var(--line-2); }
.dg > summary:hover { background: var(--soft-2); }
.out .receipt { background: none; border-radius: 0; box-shadow: none; padding: 8px 0 0; margin: 12px 0 0; }
.out .receipt::after { display: none; }
.alq .res-sub { margin-bottom: 14px; }
.alq-idx { border-radius: 6px; background: var(--soft); font-size: 14px; font-weight: 500; }
.out .carta { background: var(--soft-2); border: 1px solid var(--line); border-radius: var(--r-md); }
@media (max-width: 640px) {
  .out { padding: 20px 16px 18px; }
}

/* Menú «Comprar» con las 19 comunidades al lado (8/10/2026) */
.nav-gp-in .nav-gp-cc a { display: block; padding: 5px 8px; margin: 0 -8px; border-radius: 8px; font-size: 15px; color: var(--ink-2); line-height: 1.3; }
.nav-gp-in .nav-gp-cc a:hover, .nav-gp-in .nav-gp-cc a[aria-current] { background: var(--soft); color: var(--ink); }
.nav-gp-in .nav-gp-cc a[aria-current] { font-weight: 600; }
.nav-gp-cc { padding: 10px 14px 8px; }
.nav-gp-k { margin: 0 0 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.nav-gp-cc ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (min-width: 901px) {
  .nav-gp--mega { left: auto; right: 0; }
  .nav-gp--mega .nav-gp-in { display: grid; grid-template-columns: 280px minmax(0, 1fr); width: 620px; }
  .nav-gp--mega .nav-gp-cc { border-left: 1px solid var(--line); margin: 4px 0; }
  .nav-gp-cc a { white-space: nowrap; }
}
@media (max-width: 900px) {
  .nav-gp--mega .nav-gp-cc { border-top: 1px solid var(--line); margin: 4px 0 0; }
}

/* Registro de cambios (novedades.html) */
.log { list-style: none; margin: 0; padding: 0; max-width: 820px; border-top: 1px solid var(--line); }
.log > li { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 4px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.log time { padding-top: 1px; font-size: 14px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.log ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; color: var(--ink-2); }
.log a { color: var(--lime-ink); }
@media (max-width: 640px) {
  .log > li { grid-template-columns: 1fr; }
}

/* Calculadoras de hipoteca, venta y alquilar o comprar */
.rc-total small { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--muted); }
.pre-lim { margin: 0 0 18px; }
.pre-lim b { font-weight: 600; }
.seg--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg--2x2 { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 44px; height: auto; }
.hint--fld { margin: -6px 0 0; }
.out .dg .table-wrap { margin-top: 12px; }
.amort-t th, .amort-t td { padding: 8px 10px; }
.amort-t tbody tr.is-sel th, .amort-t tbody tr.is-sel td { font-weight: 600; color: var(--ink); }
.box > .hint { margin: 6px 0 0; }
.box .box-body + .box-body { margin-top: 0; }
.coefs { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 28px; }
.coefs li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.coefs b { font-weight: 600; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums; }
.esc-t { max-width: 520px; }
@media (max-width: 900px) { .coefs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .coefs { gap: 0 20px; } .coefs li { font-size: 15px; } }
/* Menú en el móvil y la tableta: una fila de texto bajo el logo, como las secciones de un periódico.
   La sección en la que estás va subrayada sobre la línea de la cabecera. */
@media (max-width: 900px) {
  .nav-l, .nav-gb, .nav-l:hover, .nav-gb:hover, .nav-g.is-open .nav-gb, .nav-l[aria-current], .nav-g.is-cur .nav-gb { background: none; }
  .nav-l, .nav-gb { gap: 5px; margin-bottom: -1px; padding: 10px 0 11px; border-bottom: 2px solid transparent; border-radius: 0; font-size: 15.5px; color: var(--ink-2); }
  .nav-gb svg { width: 9px; height: 9px; opacity: .55; }
  .nav-g.is-open .nav-gb { color: var(--ink); }
  .nav-l[aria-current], .nav-g.is-cur .nav-gb { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom-color: var(--terra); }
  .nav-gp { padding-top: 0; }
}
@media (max-width: 480px) {
  .nav { justify-content: space-between; gap: 0; }
}
@media (max-width: 640px) {
  .amort-t th, .amort-t td { padding: 8px 5px; font-size: 13px; }
}
.amort-t td b { font-weight: 600; color: var(--ink); }
/* Preguntas: dos en cada calculadora con enlace a las demás, y en la página de preguntas, por temas */
.faq-more { margin: 16px 0 0; font-size: 15.5px; }
.faq-more a { color: var(--lime-ink); }
.faq-sub { margin: 32px 0 8px; font-size: 18px; letter-spacing: -0.008em; }
.blk-h + .faq-sub { margin-top: 6px; }
.page-hero .faq-temas { margin: 22px 0 0; }
.nav-gp-in a.nav-faq { position: relative; margin-top: 9px; }
.nav-gp-in a.nav-faq::before { content: ""; position: absolute; left: 12px; right: 12px; top: -5px; border-top: 1px solid var(--line); }
/* Explicaciones al pasar el ratón por algunas palabras (main.js) */
.tip { text-decoration: underline dotted var(--muted); text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: help; border-radius: 3px; }
.tip:hover { text-decoration-color: var(--ink); }
.tip:focus { outline: none; }
.tip:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.tipbox { position: absolute; z-index: 120; max-width: min(300px, calc(100vw - 20px)); padding: 9px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-size: 14.5px; font-weight: 400; line-height: 1.45; letter-spacing: 0; text-transform: none; box-shadow: 0 8px 24px rgba(31, 26, 23, .22); pointer-events: none; }
.tipbox::before { content: ""; position: absolute; top: -5px; left: calc(var(--ax, 50%) - 5px); width: 10px; height: 10px; border-radius: 2px; background: var(--ink); transform: rotate(45deg); }
.tipbox.is-up::before { top: auto; bottom: -5px; }
@media print { .tipbox { display: none; } }
/* Portada (index.html): acceso rápido a la calculadora de gastos, cómo funciona, calculadoras por secciones y datos del mes */
.ini-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: stretch; padding-top: 56px; padding-bottom: 8px; }
.ini-hero-t { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.ini-hero h1 { max-width: 16ch; }
.ini-hero .sub { margin-bottom: 28px; }
.ini-fr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; }
.ini-foto { margin: 0; overflow: hidden; border-radius: 2px; background: var(--soft); }
.ini-foto img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ini-foto--hero { min-height: 420px; }
.ini-como { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.ini-como .ini-foto { aspect-ratio: 3 / 2; }
.ini-como h2 { margin: 0 0 22px; font-size: clamp(1.4rem, 1.2rem + .7vw, 1.75rem); letter-spacing: -0.016em; line-height: 1.2; }
.ini-como .steps li { color: var(--ink-2); }
.ini-como .steps a { color: var(--lime-ink); }
.ini-como .steps li:last-child { padding-bottom: 0; border-bottom: 0; }
.ini-form { display: flex; flex-direction: column; gap: 16px; padding: 24px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--paper); }
.ini-ft { margin: 0; font-size: 17px; font-weight: 700; color: var(--ink); }
.ini-form .btn { width: 100%; margin-top: 4px; }
.ini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 36px 36px; align-items: start; }
.ini-gh { padding-bottom: 10px; border-bottom: 1.5px solid var(--ink); }
.ini-gh .dib { width: 128px; margin: 0 0 8px -6px; }
.ini-g h3 { margin: 0; font-size: 21px; letter-spacing: -0.01em; }
.ini-g ul { list-style: none; margin: 0; padding: 0; }
.ini-g li + li { border-top: 1px solid var(--line); }
.ini-g li a { display: block; padding: 11px 0 10px; text-decoration: none; }
.ini-g li b { display: block; font-size: 16px; font-weight: 600; color: var(--lime-ink); }
.ini-g li span { display: block; margin-top: 1px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.ini-g li a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.ini-faq { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.ini-faq a { color: var(--muted); }
.ini-faq a:hover { color: var(--ink); }
.ini-datos { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); border-top: 1.5px solid var(--ink); }
.ini-d { display: flex; flex-direction: column; gap: 4px; padding: 16px 24px 6px; border-left: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.ini-d:first-child { padding-left: 0; border-left: 0; }
.ini-d:hover .ini-dk { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ini-spark { width: 100%; max-width: 264px; height: auto; margin: 10px 0 2px; overflow: visible; }
.ini-spark polyline { fill: none; stroke: var(--ink-2); stroke-width: 2px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ini-spark .b { stroke: var(--line-2); stroke-width: 1px; vector-effect: non-scaling-stroke; }
.ini-spark .u { fill: var(--terra); stroke: var(--bg); stroke-width: 2px; vector-effect: non-scaling-stroke; }
.ini-spark .h { fill: transparent; }
.ini-spark .h:hover { fill: rgba(31, 26, 23, .07); }
.ini-sx { display: flex; justify-content: space-between; max-width: 264px; margin-bottom: 4px; font-size: 12.5px; color: var(--muted); }
.ini-dk { font-size: 14px; font-weight: 600; color: var(--muted); }
.ini-dv { font-family: var(--serif); font-size: 36px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.1; color: var(--terra-ink); font-variant-numeric: lining-nums tabular-nums; }
.ini-dv small { font-size: .55em; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.ini-ds { font-size: 14px; line-height: 1.45; color: var(--muted); }
.ini-cc { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); columns: 4; column-gap: 36px; }
.ini-cc li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.ini-cc a { display: block; padding: 9px 0 8px; color: var(--ink-2); text-decoration: none; }
.ini-cc a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.ini-fin { padding-top: 40px; padding-bottom: 88px; }
.ini-fin p { max-width: 72ch; margin: 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.ini-fin a { color: var(--lime-ink); }
.ini-fin .ini-cred { margin-top: 10px; padding-top: 0; border-top: 0; font-size: 13.5px; }
.ini-fin .ini-cred a { color: var(--muted); }
@media (max-width: 1080px) {
  .ini-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 36px; }
  .ini-fr { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 900px) {
  .ini-hero { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; }
  .ini-foto--hero { order: -1; min-height: 0; aspect-ratio: 2 / 1; }
  .ini-fr { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 12px; }
  .ini-como { display: block; }
  .ini-como .ini-foto { display: none; }
  .ini-datos { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ini-d:first-child { grid-column: 1 / -1; padding-right: 0; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .ini-d:nth-child(2) { padding-left: 0; border-left: 0; }
  .ini-cc { columns: 3; }
}
@media (max-width: 640px) {
  .ini-grid { grid-template-columns: 1fr; gap: 30px; }
  .ini-gh { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: flex-end; gap: 12px; }
  .ini-gh .dib { width: 92px; margin: 0 -4px 0 0; }
  .ini-datos { grid-template-columns: 1fr; }
  .ini-d, .ini-d:nth-child(2) { padding: 14px 0 6px; border-left: 0; }
  .ini-d + .ini-d { border-top: 1px solid var(--line); }
  .ini-d:first-child { border-bottom: 0; }
  .ini-cc { columns: 2; column-gap: 24px; }
  .ini-form { padding: 18px 16px; }
  .ini-fr { grid-template-columns: 1fr; gap: 16px; }
  .ini-dv { font-size: 30px; }
  .ini-fin { padding-bottom: 64px; }
}
/* Dibujos a trazo encima del título de las calculadoras (tools/dibujos.py) */
.dib { width: 150px; height: auto; margin: -8px 0 14px -6px; color: var(--ink); overflow: visible; }
.dib .s { fill: none; stroke: currentColor; stroke-width: 1.7px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.dib .f { fill: var(--terra); }
.dib .p { fill: currentColor; }
@media (max-width: 900px) { .dib { width: 128px; margin-top: 0; } }
@media (max-width: 640px) { .dib { width: 112px; margin-bottom: 10px; } }
/* Accesibilidad: foco visible en las zonas oscuras, borde de los interruptores, foco del deslizador y modo de alto contraste */
.ftr :focus-visible, .mbar :focus-visible { outline-color: #fff; }
.sw-ui { box-shadow: inset 0 0 0 1.5px #8f8377; }
.sw input:checked + .sw-ui { box-shadow: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--ink); }
.res-head > .res-loc { white-space: normal; }
@media (max-width: 900px) {
  html { scroll-padding-bottom: calc(var(--bar-h) + 16px); }
  .rk-name { white-space: normal; }
}
@media (forced-colors: active) {
  .sw-ui { border: 1px solid CanvasText; }
  .sw-ui::after { background: CanvasText; }
  .sw input:checked + .sw-ui { background: Highlight; }
  .seg input:checked + span { background: Highlight; color: HighlightText; forced-color-adjust: none; }
}
.tipbox { pointer-events: auto; }
[tabindex="-1"]:focus { outline: none; }
