/* Simple mode: institutional (navy, serif, tables). Advanced mode: analyst terminal (dark, mono). */
/* Fonts are served from this site (latin subsets, OFL; licences in /fonts/), never from a font CDN. */
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url(/fonts/SourceSerif4-latin-var.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/Inter-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/Inter-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/Inter-latin-600.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(/fonts/IBMPlexMono-latin-400.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/fonts/IBMPlexMono-latin-500.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 600; font-display: swap; src: url(/fonts/IBMPlexMono-latin-600.woff2) format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  --navy: #0f2a4a; --navy-2: #173a63; --gold: #b08d3e;
  --bg: #f7f8fa; --card: #fff; --ink: #1b2430; --dim: #5f6b7a; --rule: #dde3ea; --head: #f1f4f8; --pos: #1d7a4f; --warn: #a3501b;
  /* --navy is the brand surface (nav, hero); --brand is navy used as text. */
  --brand: var(--navy); --link: var(--navy-2); --sel: var(--navy); --badge: #7d6020;
  --ok-bg: #e3f3ea; --ok-ink: #1d6b45; --warn-bg: #fdf0dc; --warn-ink: #8a5a12; --bad-bg: #fbe6e3; --bad-ink: #9b2c1e;
  --serif: "Source Serif 4", Georgia, serif; --sans: "Inter", system-ui, sans-serif; --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
/* Dark Institucional: same navy and gold, on a deep navy page. It follows the
   device unless the visitor picked a theme (theme.js sets data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #0d2140; --gold: #c9a55a;
    --bg: #0a1220; --card: #111c2c; --ink: #e3e9f1; --dim: #9aa9bb; --rule: #23324a; --head: #16233a; --pos: #5fd19b; --warn: #f0a868;
    --brand: #dbe5f2; --link: #9cc1ec; --sel: #2b4f80; --badge: #d4b26a;
    --ok-bg: #12392a; --ok-ink: #7fdcac; --warn-bg: #3a2f12; --warn-ink: #f0c77a; --bad-bg: #3b1d1d; --bad-ink: #ff9d92;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --navy: #0d2140; --gold: #c9a55a;
  --bg: #0a1220; --card: #111c2c; --ink: #e3e9f1; --dim: #9aa9bb; --rule: #23324a; --head: #16233a; --pos: #5fd19b; --warn: #f0a868;
  --brand: #dbe5f2; --link: #9cc1ec; --sel: #2b4f80; --badge: #d4b26a;
  --ok-bg: #12392a; --ok-ink: #7fdcac; --warn-bg: #3a2f12; --warn-ink: #f0c77a; --bad-bg: #3b1d1d; --bad-ink: #ff9d92;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.in { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 560px) { .in { padding: 0 16px; } }

/* ── header ── */
.nav { background: var(--navy); color: #fff; }
.nav .in { display: flex; align-items: center; gap: 28px; min-height: 60px; }
.logo { font: 600 21px/1 var(--serif); text-decoration: none; }
.logo span { color: var(--gold); }
.logo .pro { display: none; }
.links { display: flex; gap: 22px; font-size: 14px; }
.links a { color: #c9d4e2; text-decoration: none; padding: 4px 0; white-space: nowrap; border-bottom: 2px solid transparent; }
.links a[aria-current] { color: #fff; border-color: var(--gold); }
.mode { margin-left: auto; display: flex; padding: 3px; border-radius: 6px; background: #ffffff14; }
.mode button { border: 0; background: none; padding: 6px 14px; border-radius: 4px; cursor: pointer; font-size: 13px; font-weight: 600; color: #c9d4e2; }
.mode button[aria-pressed="true"] { background: #fff; color: #0f2a4a; }
/* Below 900px the links get their own row under the logo and scroll sideways. */
@media (max-width: 900px) {
  .nav .in { flex-wrap: wrap; row-gap: 0; }
  .links { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; gap: 18px; padding-bottom: 8px; }
}

/* ── hero + calculator ── */
.hero { background: linear-gradient(180deg, var(--navy) 0 calc(100% - 48px), var(--bg) calc(100% - 48px)); }
.hero .in { padding-top: 40px; }
.intro h1 { font: 400 clamp(28px, 4vw, 40px)/1.15 var(--serif); color: #fff; margin: 0 0 10px; max-width: 34ch; }
.intro p { color: #c9d4e2; margin: 0 0 28px; max-width: 62ch; }
.calc { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 12px 30px -18px #0f2a4a55; display: grid; grid-template-columns: 1fr 1fr auto; }
.field { padding: 16px 22px; border-right: 1px solid var(--rule); display: block; min-width: 0; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.val { display: flex; align-items: baseline; gap: 6px; font: 600 28px/1.3 var(--serif); color: var(--brand); }
.val i { font-style: normal; color: var(--dim); font-weight: 400; font-size: .75em; }
.val input { border: 0; background: none; padding: 0; width: 100%; min-width: 0; font: inherit; color: inherit; }
.val input:focus { outline: none; }
.field:focus-within { background: var(--head); }
.field input[type=range] { width: 100%; accent-color: var(--brand); margin: 6px 0 0; }
.chips { display: flex; flex-wrap: wrap; align-content: center; gap: 6px; padding: 16px 20px; max-width: 260px; }
.chips button { border: 1px solid var(--rule); background: var(--card); border-radius: 4px; padding: 5px 10px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--brand); }
.chips button[aria-pressed="true"] { background: var(--sel); border-color: var(--sel); color: #fff; }
@media (max-width: 820px) {
  .calc { grid-template-columns: 1fr; }
  .field { border-right: 0; border-bottom: 1px solid var(--rule); }
  .chips { max-width: none; }
}

/* ── simple mode ── */
main { max-width: 1160px; margin: 0 auto; padding: 28px 24px 0; }
@media (max-width: 560px) { main { padding: 24px 16px 0; } }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--rule); background: var(--card); border-radius: 6px; margin-bottom: 32px; }
.kpis div { padding: 16px 20px; border-right: 1px solid var(--rule); }
.kpis div:last-child { border-right: 0; }
.kpis span { font-size: 12px; color: var(--dim); }
.kpis b { display: block; font: 600 26px/1.3 var(--serif); color: var(--brand); }
.kpis small { color: var(--dim); font-size: 12px; }
@media (max-width: 760px) { .kpis { grid-template-columns: 1fr 1fr; } .kpis div:nth-child(2) { border-right: 0; } .kpis div:nth-child(-n+2) { border-bottom: 1px solid var(--rule); } }
.simple section { margin-bottom: 36px; }
h2 { font: 600 22px/1.2 var(--serif); color: var(--brand); margin: 0 0 4px; }
.sub { color: var(--dim); margin: 0 0 14px; font-size: 14px; }
.table-wrap { overflow-x: auto; }
.simple table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.simple th { text-align: left; font-size: 12px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; padding: 12px 16px; background: var(--head); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.simple td { padding: 13px 16px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.simple .n { text-align: right; }
.simple tr:last-child td { border-bottom: 0; }
.results { min-width: 760px; }
.bank { font-weight: 600; }
.bank small { display: block; font-weight: 400; color: var(--dim); font-size: 12px; }
.rate { font: 600 18px var(--serif); color: var(--brand); }
.badge { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .04em; color: var(--gold); border: 1px solid var(--gold); border-radius: 3px; padding: 1px 6px; margin-left: 8px; vertical-align: 2px; }
.pos { color: var(--pos); font-weight: 600; }
.src { color: var(--link); font-size: 13px; }
.terms { min-width: 720px; }
.warn { color: var(--warn); font-size: 14px; margin: 10px 0 0; min-height: 1px; }
.empty td { color: var(--dim); text-align: center; padding: 28px; white-space: normal; }

.method { border-top: 1px solid var(--rule); padding: 32px 0 40px; }
.method .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; color: var(--dim); font-size: 14px; }
.method p { margin: 8px 0 0; }
.foot { border-top: 1px solid var(--rule); padding: 18px 0 32px; color: var(--dim); font-size: 12px; }

/* ── advanced mode: terminal ── */
.adv { display: none; }
body[data-mode="advanced"] {
  --bg: #0b1016; --card: #111821; --p2: #17202b; --ink: #e6edf5; --dim: #8396ab; --rule: #223040; --acc: #4cc2ff; --up: #3ddc97; --warn: #ffb547;
  --brand: var(--ink); --link: var(--acc); --sel: #1f3b57; --head: var(--p2);
  color-scheme: dark; font-size: 14px;
}
body[data-mode="advanced"] .simple, body[data-mode="advanced"] .intro { display: none; }
body[data-mode="advanced"] .adv { display: block; }
body[data-mode="advanced"] .nav { background: var(--card); border-bottom: 1px solid var(--rule); }
body[data-mode="advanced"] .nav .in, body[data-mode="advanced"] .hero .in, body[data-mode="advanced"] main { max-width: 1440px; }
body[data-mode="advanced"] .logo { font: 600 16px/1 var(--sans); letter-spacing: .02em; }
body[data-mode="advanced"] .logo span { color: var(--acc); }
body[data-mode="advanced"] .logo .pro { display: inline; font: 400 13px var(--sans); color: var(--dim); margin-left: 6px; }
body[data-mode="advanced"] .links a[aria-current] { border-color: var(--acc); }
body[data-mode="advanced"] .mode { background: var(--p2); }
body[data-mode="advanced"] .mode button[aria-pressed="true"] { background: var(--acc); color: #06121c; }
body[data-mode="advanced"] .hero { background: none; border-bottom: 1px solid var(--rule); }
body[data-mode="advanced"] .hero .in { padding-top: 14px; padding-bottom: 14px; }
body[data-mode="advanced"] .calc { background: none; border: 0; box-shadow: none; gap: 12px; grid-template-columns: minmax(220px, 300px) minmax(220px, 300px) 1fr; }
body[data-mode="advanced"] .field { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 8px 12px; }
body[data-mode="advanced"] .field > span { font: 500 11px var(--mono); letter-spacing: .08em; }
body[data-mode="advanced"] .val { font: 600 18px/1.4 var(--mono); color: var(--ink); }
body[data-mode="advanced"] .field input[type=range] { accent-color: var(--acc); }
body[data-mode="advanced"] .chips { max-width: none; padding: 0; }
body[data-mode="advanced"] .chips button { background: var(--card); border-color: var(--rule); color: var(--dim); font: 500 12px var(--mono); }
body[data-mode="advanced"] .chips button[aria-pressed="true"] { background: var(--p2); color: var(--acc); border-color: var(--acc); }
body[data-mode="advanced"] main { padding-top: 14px; }
body[data-mode="advanced"] .method { border-color: var(--rule); }
body[data-mode="advanced"] .method h2 { color: var(--ink); font: 600 13px var(--mono); text-transform: uppercase; letter-spacing: .1em; }
body[data-mode="advanced"] .foot { border-color: var(--rule); font-family: var(--mono); }
@media (max-width: 820px) { body[data-mode="advanced"] .calc { grid-template-columns: 1fr; } }

.status { font: 500 12px var(--mono); color: var(--dim); margin-bottom: 12px; }
.status i { color: var(--up); font-style: normal; }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; padding-bottom: 28px; }
.p { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 14px; min-width: 0; }
.p h3 { margin: 0 0 10px; font: 600 11px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .1em; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.p h3 span { font-weight: 400; text-transform: none; letter-spacing: 0; }
.s4 { grid-column: span 4; } .s6 { grid-column: span 6; } .s8 { grid-column: span 8; } .s12 { grid-column: 1 / -1; }
.kpi { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.kpi div { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 14px; }
.kpi span { font: 600 11px var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: .1em; }
.kpi b { display: block; font: 600 26px/1.3 var(--mono); letter-spacing: -.02em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--dim); font-size: 12px; }
.kpi .up b { color: var(--up); }
@media (max-width: 1100px) { .kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); } .s4, .s8, .s6 { grid-column: 1 / -1; } }
@media (max-width: 560px) { .kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi b { font-size: 21px; } }

.adv table { width: 100%; border-collapse: collapse; font: 400 13px var(--mono); font-variant-numeric: tabular-nums; }
.adv th { text-align: right; color: var(--dim); font-weight: 500; padding: 6px 8px; border-bottom: 1px solid var(--rule); font-size: 11px; text-transform: uppercase; white-space: nowrap; }
.adv td { text-align: right; padding: 7px 8px; border-bottom: 1px solid #1a2532; white-space: nowrap; }
.adv th:first-child, .adv td:first-child { text-align: left; }
.term { min-width: 560px; }
.term tr:hover td { background: var(--p2); }
.term a { color: var(--acc); text-decoration: none; }
.inl { display: inline-block; height: 6px; background: var(--acc); border-radius: 2px; vertical-align: middle; margin-right: 8px; opacity: .85; }
.best { color: var(--up); font-weight: 600; }
.heat { min-width: 720px; }
.heat td { text-align: center; color: #06121c; font-weight: 600; border: 2px solid var(--card); border-radius: 4px; }
.heat td.na { color: var(--dim); font-weight: 400; }
.heat td:first-child { color: var(--ink); font-weight: 400; text-align: left; }
.heat td.top { box-shadow: inset 0 0 0 2px #fff; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { fill: var(--dim); font: 400 10px var(--mono); }
.k-best { color: var(--acc); font-weight: 400; } .k-med { color: var(--dim); font-weight: 400; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.legend button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); background: none; border-radius: 4px; padding: 4px 9px; cursor: pointer; font: 500 12px var(--mono); }
.legend i { width: 10px; height: 3px; border-radius: 2px; }
.legend button[aria-pressed="false"] { opacity: .35; }
.hbars { display: grid; gap: 8px; }
.hbar { display: grid; grid-template-columns: 130px minmax(0, 1fr) 64px; gap: 10px; align-items: center; font: 400 12px var(--mono); }
.hbar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 12px; background: var(--p2); border-radius: 2px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--acc); }
.hbar b { text-align: right; font-weight: 600; }
.note { font: 400 12px/1.5 var(--mono); color: var(--dim); margin: 10px 0 0; }
.cov-sum { display: flex; flex-wrap: wrap; gap: 18px; font: 400 12px var(--mono); color: var(--dim); margin-bottom: 12px; }
.cov-sum b { color: var(--ink); }
.cov { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.cov div { border: 1px solid var(--rule); border-radius: 6px; padding: 10px; font-size: 12px; color: var(--dim); }
.cov div b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.tag { display: inline-block; font: 600 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px; border-radius: 3px; margin-bottom: 4px; }
.tag.ok { background: #12392a; color: var(--up); } .tag.pend { background: #3a2f12; color: var(--warn); } .tag.bad { background: #3b1d1d; color: #ff8a8a; } .tag.na { background: var(--p2); color: var(--dim); }
.pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pick button { border: 1px solid var(--rule); background: none; border-radius: 4px; padding: 5px 10px; cursor: pointer; font: 500 12px var(--mono); }
.pick button[aria-pressed="true"] { border-color: var(--acc); color: var(--acc); background: var(--p2); }
.dive h4 { margin: 0 0 6px; font: 600 13px var(--sans); }
.dive .table-wrap { margin-bottom: 16px; }
.dive table { min-width: 560px; }
.dive td.hi { color: var(--acc); font-weight: 600; box-shadow: inset 0 0 0 1px var(--acc); }
.dive small { color: var(--dim); }
.prov { font: 400 12px/1.7 var(--mono); color: var(--dim); word-break: break-all; }
.prov a { color: var(--acc); }
.prov code { color: var(--ink); }

/* ── status page & legal notices ── */
.hero-flat { background: var(--navy); }
.hero-flat .in { padding-bottom: 36px; }
.hero-flat .intro p { margin-bottom: 0; }
.page-estado main { padding-top: 28px; }
.simple-block { margin-bottom: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.filters button { border: 1px solid var(--rule); background: var(--card); border-radius: 4px; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--brand); }
.filters button span { color: var(--dim); font-weight: 400; margin-left: 4px; }
.filters button[aria-pressed="true"] { background: var(--sel); border-color: var(--sel); color: #fff; }
.filters button[aria-pressed="true"] span { color: #c9d4e2; }
.status-table { width: 100%; min-width: 900px; border-collapse: collapse; background: var(--card); border: 1px solid var(--rule); font-size: 14px; }
.status-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; padding: 12px 14px; background: var(--head); border-bottom: 1px solid var(--rule); white-space: nowrap; }
.status-table td { padding: 12px 14px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.status-table .why { display: block; color: var(--dim); font-size: 12px; margin-top: 4px; max-width: 30ch; }
.status-table .docs { width: 26%; }
.status-table td.bank { width: 17%; }
.status-table .docs a { display: block; color: var(--link); font-size: 12px; margin-bottom: 4px; line-height: 1.35; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill.bad { background: var(--bad-bg); color: var(--bad-ink); }
.pill.na { background: var(--head); color: var(--dim); }
.legend-line { margin-top: 10px; }
.sources { margin: 0; padding-left: 18px; color: var(--dim); font-size: 13px; }
.sources a { color: var(--link); }
.disclaimer { border-top: 1px solid var(--rule); padding: 28px 0 32px; }
.disc-body { color: var(--dim); font-size: 13px; max-width: 90ch; }
.disc-body p { margin: 8px 0; }
.disc-body a { color: var(--link); }
.notice { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--gold); background: var(--card); color: var(--dim); font-size: 13px; }
.foot p { margin: 4px 0; }
body[data-mode="advanced"] .notice { border-color: var(--acc); }
body[data-mode="advanced"] .disc-body a { color: var(--acc); }

/* ── product tabs ── */
[hidden] { display: none !important; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 22px; border-bottom: 1px solid #ffffff26; }
.tabs button { border: 0; background: none; color: #c9d4e2; font-size: 14px; font-weight: 600; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-pressed="true"] { color: #fff; border-color: var(--gold); }
body[data-mode="advanced"] .tabs { border-color: var(--rule); margin-bottom: 12px; }
body[data-mode="advanced"] .tabs button { color: var(--dim); font: 500 13px var(--mono); }
body[data-mode="advanced"] .tabs button[aria-pressed="true"] { color: var(--ink); border-color: var(--acc); }
.hero.no-calc { background: var(--navy); }
.hero.no-calc .in { padding-bottom: 32px; }
body[data-mode="advanced"] .hero.no-calc { background: none; }
.kind-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.kind-chips button { border: 1px solid var(--rule); background: var(--card); border-radius: 4px; padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--brand); }
.kind-chips button[aria-pressed="true"] { background: var(--sel); border-color: var(--sel); color: #fff; }
body[data-mode="advanced"] .kind-chips button { color: var(--dim); font: 500 12px var(--mono); }
body[data-mode="advanced"] .kind-chips button[aria-pressed="true"] { background: var(--p2); color: var(--acc); border-color: var(--acc); }
.cond { display: block; font-size: 12px; color: var(--dim); white-space: normal; max-width: 46ch; margin-top: 3px; }
.simple td.wrap, .adv td.wrap { white-space: normal; }
.annual { margin: 0; padding: 0; list-style: none; font-size: 12px; }
.annual li { margin: 0 0 3px; }
.annual b { font-variant-numeric: tabular-nums; }
.simple section.product { margin-bottom: 36px; }
body:not([data-product="plazo"]) .calc { grid-template-columns: 1fr; max-width: 520px; }
body[data-mode="advanced"]:not([data-product="plazo"]) .calc { grid-template-columns: minmax(220px, 300px); }
.adv th.l, .adv td.l { text-align: left; }
.simple td.l, .simple th.l { text-align: left; }
.h3 { font: 600 17px/1.3 var(--serif); color: var(--brand); margin: 22px 0 8px; }
body[data-mode="advanced"] .h3 { color: var(--ink); }

/* ── phones: results rows become cards ── */
@media (max-width: 640px) {
  .simple .results { min-width: 0; border: 0; background: none; }
  .simple .results thead { display: none; }
  .simple .results tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 12px 14px; margin-bottom: 10px; }
  .simple .results td { display: contents; border: 0; padding: 0; white-space: normal; }
  .simple .results td.rank { display: none; }
  .simple .results td.bank { display: block; grid-column: 1 / -1; font-size: 16px; margin-bottom: 6px; }
  .simple .results td[data-label] { display: flex; grid-column: 1 / -1; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--rule); text-align: right; }
  .simple .results td[data-label]::before { content: attr(data-label); color: var(--dim); font-size: 12px; text-align: left; font-weight: 500; }
  .simple .results td.rate { font-size: 18px; }
  .simple .results td.src-cell { display: block; grid-column: 1 / -1; text-align: right; padding-top: 6px; }
  .simple .results td.wrap .cond { max-width: none; }
  .simple .results tr.empty td { display: block; grid-column: 1 / -1; }
}
.simple .results td[data-label]::before { font-family: var(--sans); }

/* ── accessibility ── */
.skip { position: absolute; left: 16px; top: -48px; z-index: 50; background: #fff; color: #0f2a4a; padding: 10px 14px; border-radius: 4px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
main:focus { outline: none; }
/* Gold on white is 3:1; this darker gold keeps the brand and reaches 4.9:1. */
.badge { color: var(--badge); border-color: var(--badge); }
.tabs button:focus-visible, .mode button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ── bank badges ── */
.bn { display: inline-flex; align-items: center; gap: 8px; }
.bb { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 5px; object-fit: contain; background: #fff; box-shadow: 0 0 0 1px var(--rule); }
.bb-mono { display: inline-grid; place-items: center; font: 700 9px/1 var(--sans); letter-spacing: .02em; color: var(--brand); background: var(--head); }
body[data-mode="advanced"] .bb { box-shadow: 0 0 0 1px #ffffff26; }
body[data-mode="advanced"] .bb-mono { color: var(--ink); background: var(--p2); }
.cov .bn { display: flex; }
@media (max-width: 640px) { .simple .results td.bank .bn { font-size: 16px; } .simple .results .bb { width: 26px; height: 26px; flex-basis: 26px; } }
.rating { font: 600 14px var(--sans); color: var(--brand); }
body[data-mode="advanced"] .rating { color: var(--ink); }

/* ── fee checker ── */
.checker { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; background: var(--card); border: 1px solid var(--rule); border-radius: 6px; padding: 16px; margin-bottom: 18px; }
.checker label { display: grid; gap: 6px; min-width: 0; font-size: 12px; font-weight: 600; color: var(--dim); text-transform: uppercase; letter-spacing: .05em; }
.checker select, .checker input { font: 500 15px var(--sans); color: var(--ink); text-transform: none; letter-spacing: 0; padding: 9px 10px; border: 1px solid var(--rule); border-radius: 4px; background: var(--card); min-width: 0; width: 100%; }
.kpis-2 { grid-template-columns: 1fr 1fr; }
.verdict { padding: 12px 14px; border-radius: 6px; margin: 0 0 18px; }
.verdict.ok { background: var(--ok-bg); color: var(--ok-ink); }
.verdict.bad { background: var(--bad-bg); color: var(--bad-ink); }
.letter textarea { width: 100%; font: 14px/1.5 var(--mono); padding: 12px; border: 1px solid var(--rule); border-radius: 6px; background: var(--card); color: var(--ink); }
.btn { background: var(--sel); color: #fff; border: 0; border-radius: 4px; padding: 10px 16px; font: 600 14px var(--sans); cursor: pointer; }

/* ── open data ── */
.datasets { list-style: none; margin: 0; padding: 0; border: 1px solid var(--rule); border-radius: 8px; background: var(--card); }
.datasets li { display: flex; gap: 24px; justify-content: space-between; align-items: center; padding: 16px 20px; }
.datasets li + li { border-top: 1px solid var(--rule); }
.datasets h3 { margin: 0 0 4px; font-size: 15px; }
.datasets p { margin: 0; font-size: 14px; color: var(--dim); }
.datasets .dl { white-space: nowrap; font-size: 14px; font-weight: 600; }
@media (max-width: 560px) { .datasets li { flex-direction: column; align-items: flex-start; gap: 8px; } }

/* ── bank pages ── */
a.bn { color: inherit; text-decoration: none; }
a.bn:hover { text-decoration: underline; }
.crumb { margin: 0 0 6px; font-size: 13px; color: #c9d4e2; }
.crumb a { color: #fff; }
.bank-h { display: flex; align-items: center; gap: 12px; }
.bank-h img { width: 28px; height: 28px; border-radius: 6px; background: #fff; padding: 3px; flex: none; }
.kpis b.b-sm { font-size: 19px; }
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 4px; }
.jump a { font-size: 13px; font-weight: 600; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); color: var(--brand); text-decoration: none; }
.bank-sec .h3 { margin-top: 22px; }
.bank-sec .results { min-width: 0; }
.bank-sec .results th, .bank-sec .results td { padding-left: 12px; padding-right: 12px; }
.bank-sec td.bank { min-width: 200px; }
.bank-sec details { margin-top: 6px; font-size: 13px; font-weight: 400; color: var(--dim); max-width: 60ch; }
.bank-sec summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: 12px; }
.grid-t td, .grid-t tbody th { padding: 9px 12px; }
.grid-t tbody th { font-weight: 600; text-align: left; border-bottom: 1px solid var(--rule); white-space: nowrap; text-transform: none; letter-spacing: 0; background: none; font-size: 14px; color: var(--ink); }
.grid-t small, .bank-sec .results small { display: block; font-size: 11px; color: var(--dim); }
.cite { font-size: 12px; color: var(--dim); margin: 8px 0 0; overflow-wrap: anywhere; }
.more { margin: 14px 0 0; font-weight: 600; font-size: 14px; }
.docs-list { padding-left: 18px; overflow-wrap: anywhere; }

/* ── footer ── */
.foot-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 24px; padding: 8px 0 18px; }
.foot-grid .logo { color: var(--brand); font-size: 18px; }
.foot-grid p { max-width: 42ch; font-size: 13px; line-height: 1.5; }
.foot-grid nav { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.foot-grid nav b { color: var(--ink); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 2px; }
.foot-grid nav a { color: var(--dim); text-decoration: none; }
.foot-grid nav a:hover { color: var(--brand); text-decoration: underline; }
.foot-note { border-top: 1px solid var(--rule); padding-top: 14px; }
body[data-mode="advanced"] .foot-grid .logo, body[data-mode="advanced"] .foot-grid nav b { color: var(--ink); }
body[data-mode="advanced"] .foot-grid nav a:hover { color: var(--acc); }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > div:first-child { grid-column: 1 / -1; } }

/* ── hero facts ── */
.intro .facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: -16px 0 24px; font-size: 13px; color: #c9d4e2; }
.intro .facts:empty { display: none; }
.intro .facts span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: middle; }
.intro .facts a { color: #fff; }

/* ── FAQ ── */
.faq details { border-bottom: 1px solid var(--rule); padding: 14px 0; max-width: 820px; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--brand); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 400 20px/1 var(--sans); color: var(--gold); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--dim); font-size: 14px; margin: 10px 0 0; max-width: 72ch; }
body[data-mode="advanced"] .faq summary { color: var(--ink); }
body[data-mode="advanced"] .faq summary::after { color: var(--acc); }
body[data-mode="advanced"] .disclaimer h2 { color: var(--ink); }

/* ── overview and glossary ── */
.lead-sum { font: 400 18px/1.5 var(--serif); color: var(--ink); max-width: 70ch; margin: 0 0 20px; }
.stats tbody th { font-weight: 600; text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--rule); background: none; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); }
.stats td small { display: block; font-size: 12px; color: var(--dim); white-space: normal; }
.stats td small a { color: var(--dim); }
.page-estado .results.stats { min-width: 0; }
.glossary { margin: 8px 0 0; max-width: 820px; }
.glossary > div { padding: 16px 0; border-bottom: 1px solid var(--rule); scroll-margin-top: 16px; }
.glossary > div:target { background: var(--head); padding-left: 12px; padding-right: 12px; }
.glossary dt { font: 600 18px/1.3 var(--serif); color: var(--brand); }
.glossary dd { margin: 6px 0 0; color: var(--dim); font-size: 15px; max-width: 72ch; }
.intro .facts a + a { margin-left: 0; }
@media (max-width: 640px) {
  .simple .stats tbody th { display: block; grid-column: 1 / -1; border: 0; padding: 0 0 6px; font-size: 16px; white-space: normal; }
}

/* ── theme toggle ── */
.theme-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #ffffff33; background: none; color: #c9d4e2; border-radius: 6px; padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.theme-btn:hover { color: #fff; border-color: #ffffff66; }
.theme-btn + .mode { margin-left: 8px; }
.theme-ico { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.theme-btn[data-theme="light"] .theme-ico { background: none; }
.theme-btn[data-theme="dark"] .theme-ico { background: currentColor; }
body[data-mode="advanced"] .theme-btn { display: none; }
body[data-mode="advanced"] .theme-btn + .mode { margin-left: auto; }
@media (max-width: 480px) { .theme-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .theme-btn { padding: 7px; } }
@media (max-width: 480px) { .nav .in { column-gap: 12px; } .mode button { padding: 6px 10px; } }

/* ── services ── */
.val-line { padding: 3px 0; }
.val-line + .val-line { border-top: 1px dashed var(--rule); }
.val-line b { font-variant-numeric: tabular-nums; }
.stats tbody th small { display: block; font-weight: 400; font-size: 12px; color: var(--dim); }
.lineup { margin: 14px 0 0; font-size: 14px; color: var(--dim); }
.lineup summary { cursor: pointer; color: var(--brand); font-weight: 600; }
.lineup p { margin: 8px 0 0; line-height: 1.6; }

/* ── earnings ── */
.earn tr.tot th, .earn tr.tot td { border-top: 2px solid var(--rule); }
.earn tbody th a { color: var(--brand); }

/* Charts drawn at build time (pipeline/lib/charts.js): marks in the link colour,
   recessive grid and axis text, a table beside every chart. */
.chart { margin: 8px 0 14px; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .bar { fill: var(--link); }
.chart .bar:hover, .chart .dot:hover { fill: var(--brand); }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .zero { stroke: var(--dim); stroke-width: 1; }
.chart .ax { fill: var(--dim); font: 11px var(--sans); }
.chart .line { fill: none; stroke: var(--link); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { fill: var(--link); stroke: var(--card); stroke-width: 2; }
.chart .bar.partial { fill-opacity: .5; }
.chart .val { fill: var(--ink); font: 600 12px var(--sans); }
/* The SVG scales down on phones; larger type keeps axis text readable there. */
@media (max-width: 640px) { .chart .ax { font-size: 19px; } .chart .val { font-size: 21px; } }
