/* Explicado · hoja de estilo única. Sin fuentes externas, sin dependencias. */

/* ---------- 1. Tokens ---------- */
:root {
  --paper: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f3efe7;
  --ink: #16202e;
  --ink-2: #43505f;
  --ink-3: #6b7684;
  --line: #e2ddd2;
  --line-2: #cfc8b9;
  --accent: #0c6b5a;
  --accent-ink: #075044;
  --accent-soft: #e4f1ed;
  --mark: #f2b705;
  --mark-soft: #fff6da;
  --danger: #a52218;
  --danger-soft: #fdeceb;
  --info: #1d5aa8;
  --info-soft: #e8f0fa;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(22, 32, 46, .06), 0 6px 20px -12px rgba(22, 32, 46, .28);
  --measure: 40rem;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --serif: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --step-0: clamp(1.0625rem, 1.02rem + .2vw, 1.15rem);
  --step-1: clamp(1.2rem, 1.12rem + .4vw, 1.4rem);
  --step-2: clamp(1.45rem, 1.32rem + .65vw, 1.85rem);
  --step-3: clamp(1.75rem, 1.5rem + 1.15vw, 2.5rem);
  --step-4: clamp(2.05rem, 1.6rem + 2vw, 3.2rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e1218;
    --surface: #161c25;
    --surface-2: #1d2530;
    --ink: #e8edf3;
    --ink-2: #b3bfcc;
    --ink-3: #8795a5;
    --line: #2a333f;
    --line-2: #3a4654;
    --accent: #5ed0b6;
    --accent-ink: #8ce0cc;
    --accent-soft: #12302a;
    --mark: #f4c433;
    --mark-soft: #2e2713;
    --danger: #ff9d93;
    --danger-soft: #33201e;
    --info: #8fbcf2;
    --info-soft: #16263a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -14px rgba(0, 0, 0, .8);
  }
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg, table { max-width: 100%; }
img { height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -.016em; margin: 0; text-wrap: balance; }
p, ul, ol, dl, table, figure, pre { margin: 0 0 1.1em; }
a { color: var(--accent-ink); text-underline-offset: .18em; text-decoration-thickness: .07em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
strong, b { font-weight: 650; }
abbr[title] { text-decoration: underline dotted; cursor: help; }
code, kbd { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: .1em .32em; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }

.vh {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 0; top: -100%; z-index: 99; background: var(--accent);
  color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 var(--radius) 0; font-weight: 600;
}
.skip:focus { top: 0; }

/* Anchura del contenedor por tramos. En tabletas se estrecha para que el
   texto no quede pegado a la izquierda con medio ancho de pantalla vacío;
   en escritorio se reabre para dejar sitio al índice lateral. */
.wrap { width: min(100% - 2rem, 74rem); margin-inline: auto; }
@media (min-width: 40em) { .wrap { width: min(100% - 3rem, 74rem); } }
@media (min-width: 48em) {
  :root { --measure: 44rem; }
  .wrap { width: min(100% - 3rem, 48rem); }
}

/* ---------- 3. Cabecera ---------- */
.hd {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 40em) { .hd { position: sticky; top: 0; z-index: 40; } }
.hd__in { display: flex; align-items: center; gap: 1rem; min-height: 3.75rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; padding: .45rem 0; }
.brand__mark {
  display: grid; place-items: center; width: 2.1rem; height: 2.1rem; flex: none;
  background: var(--ink); color: var(--paper); border-radius: 7px;
  font-weight: 700; font-size: .9rem; letter-spacing: -.03em;
}
@media (prefers-color-scheme: dark) { .brand__mark { background: var(--accent); color: #06201b; } }
.brand__txt { display: flex; flex-direction: column; line-height: 1.1; }
.brand__txt b { font-size: 1.08rem; letter-spacing: -.025em; }
.brand__txt small { color: var(--ink-3); font-size: .72rem; letter-spacing: .01em; }
.nav { margin-left: auto; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.nav::-webkit-scrollbar { display: none; }
.nav ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  display: block; padding: .58rem .7rem; border-radius: 7px; text-decoration: none;
  color: var(--ink-2); font-size: .95rem; font-weight: 550; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current] { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- 4. Estructura de página ---------- */
.page { padding: 1.5rem 0 3.5rem; }
.crumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: 1.2rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .1rem .4rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: .4rem; color: var(--line-2); }
.crumbs a { color: var(--ink-3); }

.art { display: block; }
.art__hd { margin-bottom: 1.6rem; }
.eyebrow {
  font-size: .76rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 .55rem;
}
.art__hd h1 { font-size: var(--step-4); margin-bottom: .5rem; }
.standfirst {
  font-size: var(--step-1); color: var(--ink-2); line-height: 1.5; max-width: 44rem;
  margin-bottom: 1.1rem; text-wrap: pretty;
}
.byline { border-top: 1px solid var(--line); padding-top: .75rem; font-size: .85rem; color: var(--ink-3); }
.byline__l { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin: 0 0 .3rem; }
.byline__b { color: var(--accent-ink); font-weight: 650; }
.byline__b::before { content: "✓ "; }
.byline__sep { color: var(--line-2); }
.byline__n { margin: 0; max-width: 44rem; line-height: 1.5; }

/* Índice lateral pegajoso en pantallas anchas.
   El contenedor se estrecha a 63rem para que la columna de texto quede en
   42,5rem (unos 75 caracteres por línea) y para que las migas, el artículo
   y los enlaces relacionados compartan el mismo margen izquierdo. */
@media (min-width: 68em) {
  .wrap { width: min(100% - 4rem, 63rem); }
  .art {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 16rem;
    column-gap: 4.5rem;
    align-items: start;
  }
  .art > * { grid-column: 1; min-width: 0; max-width: none; }
  .toc {
    grid-column: 2; grid-row: 1 / span 60; margin: 0;
    position: sticky; top: 5rem; align-self: start;
    max-height: calc(100vh - 7rem); overflow-y: auto;
  }
}

/* ---------- 5. Índice ---------- */
.toc {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1.1rem; margin: 0 0 2rem; font-size: .92rem;
}
.toc__h { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin-bottom: .6rem; }
.toc__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .34rem; counter-reset: toc; }
.toc__list li { counter-increment: toc; display: flex; gap: .5rem; line-height: 1.35; }
.toc__list li::before { content: counter(toc); color: var(--ink-3); font-variant-numeric: tabular-nums; font-size: .82em; padding-top: .12em; }
.toc a { color: var(--ink-2); text-decoration: none; }
.toc a:hover { color: var(--accent-ink); text-decoration: underline; }

/* ---------- 6. Prosa ---------- */
.prose { max-width: var(--measure); }
.page--wide .prose, .page--wide .art { max-width: none; }
.prose > h2 {
  font-size: var(--step-3); margin: 2.6rem 0 .8rem; padding-top: .4rem;
  scroll-margin-top: 1.5rem;
}
.prose > h2:first-child { margin-top: .5rem; }
.prose > h3 { font-size: var(--step-1); margin: 2rem 0 .6rem; scroll-margin-top: 1.5rem; }
.prose > h4 { font-size: 1.03rem; margin: 1.5rem 0 .4rem; color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.35rem; }
.prose li { margin-bottom: .45rem; }
.prose li > ul, .prose li > ol { margin-top: .45rem; }
.prose p { text-wrap: pretty; }
.lead { font-size: 1.08em; color: var(--ink-2); }
mark { background: var(--mark-soft); color: inherit; padding: .05em .2em; border-radius: 3px; box-decoration-break: clone; }

blockquote {
  margin: 1.6rem 0; padding: .2rem 0 .2rem 1.2rem; border-left: 3px solid var(--mark);
  font-family: var(--serif); font-size: 1.08em; color: var(--ink-2);
}
blockquote p:last-child { margin-bottom: 0; }

/* ---------- 7. Resumen "En corto" ---------- */
.keyfacts {
  background: var(--accent-soft); border-radius: var(--radius-lg);
  padding: 1.1rem 1.3rem 1.2rem; margin: 0 0 2rem; max-width: var(--measure);
  border: 1px solid var(--line);
  border-color: color-mix(in srgb, var(--accent) 22%, transparent);
}
.keyfacts__h {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent-ink); margin-bottom: .6rem;
}
.keyfacts ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.keyfacts li { position: relative; padding-left: 1.35rem; line-height: 1.55; }
.keyfacts li::before {
  content: ""; position: absolute; left: 0; top: .62em; width: .55rem; height: .55rem;
  background: var(--accent); border-radius: 2px; transform: rotate(45deg);
}
.keyfacts strong { color: var(--ink); }

/* ---------- 8. Avisos ---------- */
.note, .warn, .tip, .src-note {
  border-radius: var(--radius); padding: .95rem 1.15rem; margin: 1.7rem 0;
  border-left: 4px solid var(--line-2); background: var(--surface-2); font-size: .96em;
}
.note { border-left-color: var(--info); background: var(--info-soft); }
.warn { border-left-color: var(--danger); background: var(--danger-soft); }
.tip { border-left-color: var(--mark); background: var(--mark-soft); }
.note > :last-child, .warn > :last-child, .tip > :last-child, .src-note > :last-child { margin-bottom: 0; }
.note__h, .warn__h, .tip__h {
  display: block; font-size: .74rem; text-transform: uppercase; letter-spacing: .09em;
  font-weight: 700; margin-bottom: .3rem; color: var(--ink-2);
}

/* ---------- 9. Tablas ---------- */
.tbl {
  overflow-x: auto; margin: 1.7rem 0; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
  scrollbar-width: thin;
  background-image:
    linear-gradient(to right, var(--surface), rgba(128, 128, 128, 0)),
    linear-gradient(to left, var(--surface), rgba(128, 128, 128, 0)),
    linear-gradient(to right, rgba(22, 32, 46, .1), rgba(128, 128, 128, 0)),
    linear-gradient(to left, rgba(22, 32, 46, .1), rgba(128, 128, 128, 0));
  background-position: 0 0, 100% 0, 0 0, 100% 0;
  background-repeat: no-repeat;
  background-size: 2.5rem 100%, 2.5rem 100%, .9rem 100%, .9rem 100%;
  background-attachment: local, local, scroll, scroll;
}
.tbl > table { margin: 0; border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 26rem; }
.tbl--slim > table { min-width: 20rem; }
.tbl caption {
  caption-side: bottom; text-align: left; font-size: .82rem; color: var(--ink-3);
  padding: .7rem 1rem; border-top: 1px solid var(--line); line-height: 1.45;
}
.tbl th, .tbl td { padding: .6rem .85rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl thead th {
  background: var(--surface-2); font-size: .78rem; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-2); font-weight: 700; white-space: nowrap;
}
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:last-child th { border-bottom: 0; }
.tbl tfoot td, .tbl tfoot th { background: var(--surface-2); font-weight: 650; border-top: 2px solid var(--line-2); }
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl th[scope="row"] { font-weight: 600; }
.tbl .pos { color: var(--accent-ink); }
.tbl .neg { color: var(--danger); }

/* ---------- 10. Documento anotado ---------- */
.doc {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow); margin: 1.8rem 0; overflow: hidden; font-size: .88rem;
}
.doc__cap {
  background: var(--surface-2); border-bottom: 1px solid var(--line); padding: .6rem .9rem;
  font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); font-weight: 700;
}
.doc__body { padding: .9rem; }
.doc__row {
  display: grid; grid-template-columns: 1.6rem 1fr auto; gap: .55rem; align-items: baseline;
  padding: .42rem .3rem; border-bottom: 1px dashed var(--line);
}
.doc__row:last-child { border-bottom: 0; }
.doc__row--head { font-weight: 700; background: var(--surface-2); border-radius: 6px; border-bottom: 0; margin-top: .5rem; }
.doc__row--total { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; margin-top: .35rem; padding-top: .6rem; }
.doc__row--sub { color: var(--ink-2); }
.doc__n {
  display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem;
  background: var(--mark); color: #2c2200; border-radius: 50%; font-size: .72rem;
  font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: none;
}
a.doc__n:hover { background: var(--ink); color: var(--paper); }
.doc__lbl { min-width: 0; }
.doc__val { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.doc__val--neg { color: var(--danger); }
figure.fig { margin: 1.8rem 0; }
figure.fig figcaption { font-size: .84rem; color: var(--ink-3); line-height: 1.5; margin-top: .6rem; }

/* Lista de anotaciones numeradas que acompaña al documento */
.ann { list-style: none; counter-reset: ann; padding: 0; margin: 1.8rem 0; display: grid; gap: 1.1rem; }
.ann > li { counter-increment: ann; display: grid; grid-template-columns: 1.75rem 1fr; gap: .85rem; scroll-margin-top: 1.5rem; }
.ann > li::before {
  content: counter(ann); display: grid; place-items: center; width: 1.75rem; height: 1.75rem;
  background: var(--mark); color: #2c2200; border-radius: 50%; font-size: .82rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ann__t { display: block; font-weight: 700; margin-bottom: .15rem; }
.ann > li > div > :last-child { margin-bottom: 0; }
.ann :target, li:target .ann__t { color: var(--accent-ink); }

/* ---------- 11. Fórmulas y cálculos paso a paso ---------- */
.formula {
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent);
  border-radius: var(--radius); padding: .9rem 1.1rem; margin: 1.5rem 0;
  font-family: var(--mono); font-size: .92rem; line-height: 1.7; overflow-x: auto;
}
.formula b { color: var(--accent-ink); font-weight: 700; }
.formula .eq { display: block; white-space: nowrap; }
.steps { list-style: none; counter-reset: st; padding: 0; margin: 1.7rem 0; display: grid; gap: .9rem; }
.steps > li { counter-increment: st; display: grid; grid-template-columns: 1.8rem 1fr; gap: .85rem; }
.steps > li::before {
  content: counter(st); display: grid; place-items: center; width: 1.8rem; height: 1.8rem;
  background: var(--accent); color: #fff; border-radius: 8px; font-size: .85rem; font-weight: 700;
}
@media (prefers-color-scheme: dark) { .steps > li::before { color: #06201b; } }
.steps > li > div > :last-child { margin-bottom: 0; }

/* ---------- 12. Tarjetas ---------- */
.cards { list-style: none; padding: 0; margin: 1.8rem 0; display: grid; gap: 1rem; }
@media (min-width: 34em) { .cards { grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); } }
.card {
  display: flex; flex-direction: column; gap: .35rem; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s;
}
a.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card__k { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); font-weight: 700; }
.card__t { font-size: 1.06rem; font-weight: 700; letter-spacing: -.015em; line-height: 1.25; }
a.card:hover .card__t { color: var(--accent-ink); }
.card__d { font-size: .92rem; color: var(--ink-2); line-height: 1.5; margin: 0; }
.card__m { margin-top: auto; padding-top: .5rem; font-size: .8rem; color: var(--ink-3); }

/* Cifras destacadas */
.kpis { list-style: none; padding: 0; margin: 1.8rem 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.kpi__v { display: block; font-size: 1.45rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi__l { display: block; font-size: .82rem; color: var(--ink-2); margin-top: .25rem; line-height: 1.35; }

/* ---------- 13. Comparativas ---------- */
.vs { display: grid; gap: 1rem; margin: 1.8rem 0; }
@media (min-width: 40em) { .vs { grid-template-columns: 1fr 1fr; } }
.vs__col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.1rem 1.2rem; }
.vs__h { font-size: 1.02rem; margin-bottom: .5rem; }
.vs ul { margin: 0; padding-left: 1.15rem; font-size: .94rem; }

/* ---------- 14. FAQ ---------- */
.faq { max-width: var(--measure); margin: 3rem 0 0; }
.faq > h2 { font-size: var(--step-2); margin-bottom: 1rem; scroll-margin-top: 1.5rem; }
.faq__item { border-top: 1px solid var(--line); padding: 1.1rem 0; }
.faq__item:last-child { border-bottom: 1px solid var(--line); }
.faq__q { font-size: 1.04rem; margin-bottom: .4rem; }
.faq__a > :last-child { margin-bottom: 0; }
.faq__a { color: var(--ink-2); }

/* ---------- 15. Fuentes ---------- */
.sources { max-width: var(--measure); margin: 3rem 0 0; padding: 1.3rem 1.4rem; background: var(--surface-2); border-radius: var(--radius-lg); }
.sources > h2 { font-size: 1.1rem; margin-bottom: .4rem; scroll-margin-top: 1.5rem; }
.sources__intro { font-size: .88rem; color: var(--ink-2); margin-bottom: .8rem; }
.sources__list { font-size: .88rem; color: var(--ink-2); padding-left: 1.2rem; margin: 0; }
.sources__list li { margin-bottom: .5rem; }
.sources__list cite { font-style: normal; font-weight: 600; color: var(--ink); }

/* ---------- 16. Relacionados ---------- */
.rel { margin-top: 3.5rem; padding-top: 2rem; border-top: 2px solid var(--line); }
.rel > h2 { font-size: var(--step-2); margin-bottom: 1rem; }
.rel__grid { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
@media (min-width: 34em) { .rel__grid { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); } }
.rel__card {
  display: flex; flex-direction: column; gap: .3rem; height: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .95rem 1.05rem; text-decoration: none; color: inherit;
}
.rel__card:hover { border-color: var(--accent); }
.rel__t { font-weight: 700; line-height: 1.3; font-size: .99rem; }
.rel__card:hover .rel__t { color: var(--accent-ink); }
.rel__d { font-size: .87rem; color: var(--ink-3); line-height: 1.45; }

/* ---------- 17. Portada ---------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); padding: 3rem 0 2.6rem; }
.hero h1 { font-size: var(--step-4); max-width: 20ch; margin-bottom: .9rem; }
.hero p { font-size: var(--step-1); color: var(--ink-2); max-width: 40rem; line-height: 1.5; }
.hero__meta { font-size: .85rem; color: var(--ink-3); margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.hero__meta span { display: inline-flex; align-items: center; gap: .35rem; }
.hero__meta span::before { content: "✓"; color: var(--accent); font-weight: 700; }

.sec { margin: 3rem 0; }
.sec__h { font-size: var(--step-2); margin-bottom: .5rem; }
.sec__s { color: var(--ink-2); max-width: 44rem; margin-bottom: 1.3rem; }

/* ---------- 18. Herramientas / calculadoras ---------- */
.calc {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem 1.4rem; margin: 1.8rem 0; box-shadow: var(--shadow);
}
.calc__h { font-size: 1.15rem; margin-bottom: .3rem; }
.calc__s { font-size: .9rem; color: var(--ink-2); margin-bottom: 1.1rem; }
.calc__grid { display: grid; gap: .9rem; }
@media (min-width: 34em) { .calc__grid { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: .3rem; }
.field label { font-size: .85rem; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: .78rem; color: var(--ink-3); line-height: 1.4; }
.field input, .field select {
  font: inherit; font-size: 1rem; padding: .55rem .7rem; border: 1px solid var(--line-2);
  border-radius: 8px; background: var(--paper); color: var(--ink); width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--accent); }
.btn {
  font: inherit; font-weight: 650; padding: .65rem 1.15rem; border-radius: 9px; border: 1px solid transparent;
  background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block;
}
@media (prefers-color-scheme: dark) { .btn { color: #06201b; } }
.btn:hover { background: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--accent-ink); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--surface-2); }
.calc__out { margin-top: 1.3rem; border-top: 1px solid var(--line); padding-top: 1.1rem; }
.calc__hero { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-bottom: 1rem; }
.calc__hero div { min-width: 8rem; }
.calc__hero .v { display: block; font-size: 1.8rem; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.calc__hero .l { display: block; font-size: .8rem; color: var(--ink-3); margin-top: .2rem; }
.calc__note { font-size: .82rem; color: var(--ink-3); margin-top: 1rem; line-height: 1.5; }
.nojs { display: none; }
.no-js .nojs { display: block; }
.no-js .calc__out { display: none; }

/* ---------- 19. Glosario ---------- */
.gloss { margin: 2rem 0; }
.gloss__jump { display: flex; flex-wrap: wrap; gap: .3rem; margin: 1rem 0 2rem; padding: 0; list-style: none; }
.gloss__jump a {
  display: grid; place-items: center; min-width: 2.75rem; height: 2.75rem; padding: 0 .45rem;
  border: 1px solid var(--line); border-radius: 7px; background: var(--surface);
  text-decoration: none; font-weight: 650; font-size: .9rem; color: var(--ink-2);
}
.gloss__jump a:hover { border-color: var(--accent); color: var(--accent-ink); }
.gloss__l { font-size: var(--step-2); margin: 2.2rem 0 .8rem; padding-bottom: .3rem; border-bottom: 2px solid var(--mark); scroll-margin-top: 1.5rem; }
.gloss dl { margin: 0; display: grid; gap: 1.1rem; }
.gloss dt { font-weight: 700; font-size: 1.02rem; scroll-margin-top: 1.5rem; }
.gloss dd { margin: .2rem 0 0; color: var(--ink-2); }
.gloss dd > :last-child { margin-bottom: 0; }
.gloss__tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); font-weight: 700; margin-left: .5rem; }

/* Registro de cambios */
.log { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 0; }
.log > li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--line); }
.log > li:last-child { border-bottom: 1px solid var(--line); }
.log time { font-size: .85rem; color: var(--ink-3); font-variant-numeric: tabular-nums; padding-top: .1rem; }
.log__t { font-weight: 700; display: block; margin-bottom: .15rem; }
.log__d { font-size: .93rem; color: var(--ink-2); }
.log__d > :last-child { margin-bottom: 0; }
@media (max-width: 32em) { .log > li { grid-template-columns: 1fr; gap: .25rem; } }

/* ---------- 20. Pie ---------- */
.ft { background: var(--surface); border-top: 1px solid var(--line); padding: 2.6rem 0 2rem; margin-top: 3rem; font-size: .92rem; }
.ft__grid { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); margin-bottom: 2rem; }
.ft__h { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3); margin-bottom: .6rem; }
.ft ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.ft a { color: var(--ink-2); text-decoration: none; }
.ft a:hover { color: var(--accent-ink); text-decoration: underline; }
.ft__note { font-size: .85rem; color: var(--ink-3); line-height: 1.55; max-width: 46rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.ft__legal { font-size: .82rem; color: var(--ink-3); margin: .8rem 0 0; }
.ft__legal a { color: var(--ink-3); text-decoration: underline; }

/* ---------- 21. Impresión ---------- */
@media (min-width: 40em) {
  .prose > h2, .prose > h3, .faq > h2, .sources > h2, .gloss__l, .gloss dt, .ann > li { scroll-margin-top: 5rem; }
}

@media print {
  .hd, .ft, .toc, .rel, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .wrap { width: auto; }
  a::after { content: " (" attr(href) ")"; font-size: .8em; color: #555; }
  .prose, .faq, .sources, .keyfacts { max-width: none; }
}
