/* Link-Credit — estilos compartidos. Sin fuentes ni recursos externos. */
:root {
  --navy: #193458;
  --navy-deep: #10233e;
  --blue: #2355a1;
  --green: #11796c;
  --green-strong: #0d5f55;
  --green-soft: #e8f5f1;
  --amber-soft: #fff6df;
  --amber-line: #e6c66a;
  --red: #b42318;
  --red-soft: #fdecea;
  --ink: #152339;
  --muted: #4a5b70;
  --line: #dce3ec;
  --bg: #f4f7fb;
  --card: #ffffff;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(11, 46, 89, .06), 0 6px 20px rgba(11, 46, 89, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1160px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 17px; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid #2f7de1; outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; color: var(--navy); padding: 10px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Cabecera */
.site-header { background: rgba(255, 255, 255, .97); color: var(--ink); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid #e5ebf2; backdrop-filter: blur(16px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy-deep); text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -.04em; line-height: 1.1; }
.brand:hover { color: var(--navy-deep); }
.brand .mark { height: 38px; width: 38px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(135deg, #2258a2, #0d907d); color: #fff; font-weight: 900; font-size: 24px; flex: none; letter-spacing: 0; }
.brand small { display: block; font-weight: 600; font-size: 10.5px; color: #5a687c; letter-spacing: 1.5px; margin-top: 1px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: #3d4d63; text-decoration: none; padding: 9px 12px; border-radius: 10px; font-size: 14.5px; font-weight: 650; }
.nav a:hover, .nav a[aria-current="page"] { background: #eef3fa; color: var(--blue); }
.nav a.navbtn { background: var(--green-soft); border: 1px solid #c7e6db; color: #0d5f55; border-radius: 30px; padding: 9px 16px; margin-left: 6px; }
.nav a.navbtn:hover { background: #d6efe6; }
.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; padding: 10px 14px; border: 1px solid #b7c4d6; border-radius: 10px; font-weight: 700; font-size: 15px; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .menu-list { display: flex; }
.menu-list { display: none; flex-direction: column; position: absolute; left: 0; right: 0; top: 72px; background: #fff; padding: 8px 20px 16px; border-bottom: 1px solid #e5ebf2; box-shadow: 0 14px 30px rgba(16, 35, 62, .12); }
.menu-list a { color: var(--ink); text-decoration: none; padding: 14px 4px; border-bottom: 1px solid #e5ebf2; font-weight: 650; }
@media (max-width: 960px) {
  .nav { display: none; }
  .menu { display: block; }
}

/* Héroe */
.hero { background: linear-gradient(120deg, #10233e 0%, #193458 58%, #13463f 145%); color: #fff; position: relative; overflow: hidden; padding: 0; }
.hero::before { content: ""; position: absolute; right: -150px; top: -240px; width: 720px; height: 720px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .11); box-shadow: 0 0 0 85px rgba(255, 255, 255, .03), 0 0 0 180px rgba(255, 255, 255, .03); pointer-events: none; }
.hero-in { padding: 88px 0 96px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; position: relative; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; border: 1px solid rgba(255, 255, 255, .28); border-radius: 100px; padding: 7px 13px; font-size: 12px; font-weight: 700; letter-spacing: .75px; color: #dcece9; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: #63d9c0; display: inline-block; }
.hero h1 { font-size: clamp(38px, 5.2vw, 64px); line-height: 1.08; letter-spacing: -.035em; margin: 22px 0 20px; max-width: 18ch; }
.hero h1 em { font-style: normal; color: #90ddc9; }
.hero p { font-size: 18px; max-width: 58ch; color: #d9e4f0; margin: 0 0 30px; }
.hero-note { display: flex; gap: 10px; color: #c3d6e4; font-size: 13px; margin-top: 26px; max-width: 52ch; }
.hero-note::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid #84d5c0; margin-top: 5px; flex: none; }
.feature { padding: 27px; border-radius: 23px; background: linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04)); box-shadow: 0 15px 55px rgba(8, 24, 47, .25); border: 1px solid rgba(255, 255, 255, .22); max-width: 440px; justify-self: end; width: 100%; }
.feature .kicker { color: #a6dbc8; font-size: 11.5px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.feature h2 { font-size: 24px; line-height: 1.25; margin: 10px 0 16px; color: #fff; }
.step { display: flex; gap: 13px; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.step .num { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #bcf1db; font-weight: 800; }
.step strong { display: block; font-size: 15px; }
.step small { display: block; font-size: 13px; color: #cad9e4; margin-top: 2px; }
@media (max-width: 890px) { .hero-in { grid-template-columns: 1fr; gap: 32px; padding: 64px 0 70px; } .feature { justify-self: start; max-width: 560px; } }
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; padding: 14px 22px; border-radius: 11px; font-weight: 700; text-decoration: none; font-size: 16px; border: 2px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.2; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-strong); color: #fff; }
.hero .btn-primary { background: #83d9bd; color: #10362b; }
.hero .btn-primary:hover { background: #a1e6cf; color: #10362b; }
.btn-ghost { border-color: #91a6ba; color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: #fff; }
.btn-outline:hover { background: var(--navy); color: #fff; }

/* Secciones */
section { padding: 56px 0; }
.section-title { font-size: clamp(26px, 4vw, 34px); line-height: 1.15; letter-spacing: -.015em; margin: 0 0 10px; color: var(--navy); }
.section-lead { color: var(--muted); max-width: 66ch; margin: 0 0 28px; font-size: 18px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 20px; color: var(--navy); line-height: 1.25; }
.card p { margin: 0 0 12px; color: var(--muted); }
.card a.more { font-weight: 700; text-decoration: none; }
.card a.more::after { content: " →"; }
.card.priority { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), var(--shadow); }
.tag { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--green-strong); background: var(--green-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 10px; }
.band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--green); font-weight: 800; }
.checks.no li::before { content: "✕"; color: var(--red); }

/* Páginas interiores */
.page-head { background: linear-gradient(120deg, #10233e 0%, #193458 62%, #13463f 150%); color: #fff; padding: 48px 0 44px; }
.page-head h1 { margin: 0 0 12px; font-size: clamp(30px, 5vw, 44px); line-height: 1.12; letter-spacing: -.02em; }
.page-head p { margin: 0; color: #dbe6f5; max-width: 66ch; font-size: 19px; }
.crumbs { font-size: 14px; margin-bottom: 14px; color: #b8c9e2; }
.crumbs a { color: #dbe6f5; }
.prose { max-width: 740px; }
.prose h2 { color: var(--navy); font-size: 27px; line-height: 1.2; margin: 44px 0 12px; letter-spacing: -.01em; }
.prose h3 { color: var(--navy); font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose li { color: #1b2a40; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.meta { color: var(--muted); font-size: 15px; margin: 0 0 24px; }
.note { background: var(--amber-soft); border: 1px solid var(--amber-line); border-radius: 12px; padding: 16px 18px; margin: 28px 0; font-size: 16px; }
.note strong { color: #7a5200; }
.info { background: var(--green-soft); border: 1px solid #b6dfc7; border-radius: 12px; padding: 16px 18px; margin: 24px 0; }
.sources { border-top: 2px solid var(--line); margin-top: 44px; padding-top: 8px; }
.sources h2 { font-size: 20px; margin-top: 24px; }
.sources li { font-size: 16px; }
.toc { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin: 0 0 30px; }
.toc strong { display: block; margin-bottom: 6px; color: var(--navy); }
.toc ol { margin: 0; padding-left: 20px; }
table.t { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; font-size: 16px; margin: 18px 0; }
table.t th, table.t td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.t th { background: #eef3fa; color: var(--navy); }
.table-scroll { overflow-x: auto; }
.glist { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.glist .card h3 a { text-decoration: none; color: var(--navy); }
.glist .card h3 a:hover { text-decoration: underline; }

/* Calculadora */
.calc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.calc fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.calc legend { font-weight: 800; color: var(--navy); margin-bottom: 10px; font-size: 18px; }
.row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 12px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 4px; color: #1b2a40; }
.field input { width: 100%; font: inherit; padding: 12px 14px; border: 2px solid #b7c4d6; border-radius: 10px; background: #fff; color: var(--ink); }
.field input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(47, 125, 225, .3); }
.field input[aria-invalid="true"] { border-color: var(--red); background: var(--red-soft); }
.row .rm { font: inherit; background: #fff; border: 2px solid #b7c4d6; border-radius: 10px; padding: 11px 14px; cursor: pointer; font-weight: 700; color: var(--muted); }
.row .rm:hover { border-color: var(--red); color: var(--red); }
@media (max-width: 560px) { .row { grid-template-columns: 1fr 1fr; } .row .rm { grid-column: 1 / -1; } }
.calc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 4px; }
.error { color: var(--red); font-weight: 700; margin: 10px 0 0; }
.result { margin-top: 26px; padding-top: 22px; border-top: 2px solid var(--line); }
.big { font-size: clamp(44px, 9vw, 68px); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--navy); }
.gauge { height: 18px; background: #e6ecf4; border-radius: 999px; overflow: hidden; margin: 16px 0 6px; position: relative; }
.gauge i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--green); transition: width .3s ease; }
.gauge i.mid { background: #b7791f; }
.gauge i.high { background: var(--red); }
.scale { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
@media (max-width: 640px) { .stat-grid { grid-template-columns: 1fr; } }
.stat { background: #f1f5fa; border-radius: 12px; padding: 14px 16px; }
.stat b { display: block; font-size: 22px; color: var(--navy); }
.stat span { font-size: 14px; color: var(--muted); }
.hidden { display: none !important; }

/* Pie */
.site-footer { background: #102138; color: #c9d6ea; padding: 44px 0 32px; font-size: 15px; }
.site-footer a { color: #e8f0fc; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 15px; color: #fff; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .06em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.legal-line { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 28px; padding-top: 18px; font-size: 14px; color: #a9bad3; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gauge i { transition: none; }
}
@media print {
  .site-header, .site-footer, .btns, .calc-actions { display: none; }
  body { background: #fff; }
}

/* utilidades (sin estilos en línea, para poder aplicar CSP estricta) */
.mt16 { margin-top: 16px; }
.mt20 { margin-top: 20px; }
.mt24 { margin-top: 24px; }
.mb26 { margin-bottom: 26px; }
.m0 { margin: 0; }
.m-top6 { margin: 6px 0 0; }

/* Inicio: franja, casos y calculadora rápida */
.sliver { background: #dff0e9; border-bottom: 1px solid #c7e4da; }
.sliver .wrap { padding: 15px 20px; font-size: 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #14594d; flex-wrap: wrap; }
.eyk { font-size: 12.5px; letter-spacing: 1.8px; text-transform: uppercase; color: #0d6a5d; font-weight: 850; margin: 0 0 6px; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; background: #fff; box-shadow: var(--shadow); }
.tile .icon { font-size: 22px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: #e9f1fd; color: #29599e; font-weight: 800; }
.tile .icon.green { background: #e7f5ee; color: var(--green); }
.tile h3 { font-size: 24px; margin: 18px 0 8px; letter-spacing: -.02em; color: var(--navy-deep); }
.tile p { color: var(--muted); margin: 0 0 18px; }
.tile .more { font-weight: 800; text-decoration: none; }
.tile .more::after { content: " →"; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; margin: 0 0 20px; padding: 0; list-style: none; }
.chips li { padding: 6px 11px; border-radius: 30px; background: #eef2f8; color: #3f506a; font-size: 12.5px; font-weight: 650; margin: 0; }
.case { display: grid; grid-template-columns: 1fr 1fr; gap: 55px; align-items: center; }
.case-block { background: #fff; border: 1px solid #dce6ef; border-radius: 21px; padding: 32px; box-shadow: var(--shadow); }
.case-block h3 { margin: 0 0 14px; font-size: 22px; color: var(--navy-deep); }
.case-row { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0; }
.case-row .check { width: 26px; height: 26px; border-radius: 50%; background: #dff4e9; color: #126a5a; display: grid; place-items: center; flex: none; font-weight: 800; }
.case-row b { font-size: 15px; }
.case-row p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.minor { font-size: 13.5px; color: #4a5b70; }
.guide3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.guide { display: flex; flex-direction: column; gap: 8px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.guide .label { font-size: 12px; text-transform: uppercase; color: #0d6a5d; font-weight: 800; letter-spacing: .65px; }
.guide h3 { font-size: 19px; line-height: 1.3; margin: 2px 0; color: var(--navy-deep); }
.guide h3 a { color: inherit; text-decoration: none; }
.guide h3 a:hover { text-decoration: underline; }
.guide p { font-size: 15px; color: var(--muted); margin: 0 0 10px; }
.guide .more { margin-top: auto; font-weight: 760; font-size: 15px; text-decoration: none; }
.guide .more::after { content: " →"; }
.qcalc { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.qcalc .fg { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 16px 0; }
.qres { border-radius: 17px; background: #e9f5ef; padding: 24px; text-align: center; color: #0f594d; }
.qres .big { display: block; font-size: 46px; font-weight: 850; letter-spacing: -.04em; line-height: 1.1; margin: 2px 0 6px; color: #0f594d; }
.qres span { font-size: 13.5px; }
.source-line { font-size: 15px; font-weight: 600; color: #3f506a; }
@media (max-width: 890px) { .case, .qcalc { grid-template-columns: 1fr; gap: 28px; } .guide3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 580px) { .guide3, .qcalc .fg { grid-template-columns: 1fr; } .tile, .case-block { padding: 24px; } .brand { font-size: 20px; } }

.glist .card h2 { margin: 0 0 8px; font-size: 20px; line-height: 1.25; }
.glist .card h2 a { text-decoration: none; color: var(--navy); }
.glist .card h2 a:hover { text-decoration: underline; }
.table-scroll:focus-visible { outline: 3px solid #2f7de1; outline-offset: 2px; }

/* Cronología (página Experiencia) */
.prose .timeline { list-style: none; padding: 0 0 0 4px; margin: 22px 0; border-left: 3px solid var(--green); }
.prose .timeline li { position: relative; margin: 0; padding: 0 0 20px 22px; }
.prose .timeline li::before { content: ""; position: absolute; left: -11px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--green); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--green); }
.prose .timeline .when { display: block; font-weight: 700; color: var(--navy); margin-bottom: 2px; }
