:root {
  --ink: #112d4e;
  --deep: #0b3768;
  --deep-2: #061b36;
  --teal: #0875b5;
  --mint: #1bb5df;
  --gold: #e6b94a;
  --sky: #eaf4fb;
  --line: #cadbe8;
  --muted: #61788b;
  --paper: #ffffff;
  --bg: #f1f6f7;
  --good: #087653;
  --good-bg: #e3f7ef;
  --bad: #a33a38;
  --bad-bg: #fdecea;
  --warn: #8a5b12;
  --warn-bg: #fff5d9;
  --shadow: 0 16px 44px rgba(8, 49, 66, 0.09);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.5; }
.topbar { color: white; background: radial-gradient(circle at 12% -30%, rgba(27,181,223,.25), transparent 34%), linear-gradient(115deg, #061b36, #0b3768); border-bottom: 4px solid transparent; border-image: linear-gradient(90deg, var(--gold), var(--mint), #ffffff) 1; }
.topbar-inner { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 14px 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 22px; min-width: 0; }
.institutional-logos { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.institutional-logos img { display: block; object-fit: contain; }
.onep-logo { width: 86px; height: 86px; }
.pucesa-logo { width: 198px; height: auto; }
.logo-divider { width: 1px; height: 48px; background: linear-gradient(transparent, rgba(255,255,255,.65), transparent); }
.brand-copy { min-width: 0; }
.topbar h1 { margin: 1px 0 0; font-size: clamp(1.12rem, 2vw, 1.5rem); line-height: 1.2; }
.eyebrow { margin: 0; color: #bfeeff; font-size: .76rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.risk-pill { flex: 0 0 auto; padding: 10px 13px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; color: #e7f8f4; background: rgba(255,255,255,.08); font-size: .82rem; font-weight: 760; }
.risk-pill .pulse { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--mint); }
.risk-pill.loading .pulse { animation: pulse 1.3s infinite; }
.risk-pill.warning { color: #ffe8ae; border-color: rgba(255,216,122,.35); }
.risk-pill.warning .pulse { background: #f1bd48; }
@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 58px; }
.intro { display: grid; grid-template-columns: minmax(0,1fr) 330px; align-items: end; gap: 42px; margin: 8px 0 30px; }
.kicker { margin: 0 0 8px; color: var(--teal); font-size: .8rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.intro h2 { margin: 0 0 10px; max-width: 760px; font-family: Georgia, serif; font-size: clamp(2.15rem, 5vw, 3.5rem); line-height: 1.02; letter-spacing: -.04em; }
.intro > div > p:last-child { max-width: 760px; margin: 0; color: var(--muted); font-size: 1.05rem; }
.formula-card { padding: 20px; border: 1px solid #d3e4e8; border-radius: 15px; background: white; box-shadow: var(--shadow); }
.formula-card span, .formula-card small { display: block; color: var(--muted); font-size: .8rem; }
.formula-card span { font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.formula-card strong { display: block; margin: 6px 0; color: var(--deep); font-size: 1.08rem; }
.concepts { margin: -2px 0 25px; padding: 23px 25px; border: 1px solid #c8dce9; border-radius: 16px; background: linear-gradient(135deg, #ffffff, #edf6fb); box-shadow: var(--shadow); }
.concepts-heading { margin-bottom: 15px; }
.concepts-heading .kicker { margin-bottom: 3px; }
.concepts-heading h2 { margin: 0; color: var(--deep); font-size: 1.32rem; }
.concept-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.concept-grid article { display: flex; align-items: flex-start; gap: 13px; padding: 16px; border: 1px solid #cfe0eb; border-radius: 12px; background: white; }
.concept-grid article > span { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; color: white; background: var(--deep); font-size: .7rem; font-weight: 900; }
.concept-grid h3 { margin: 0; color: var(--deep); font-size: 1rem; }
.concept-grid h3 small { display: block; margin-top: 1px; color: #4f7188; font-size: .74rem; font-weight: 750; }
.concept-grid p { margin: 7px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.5; }
.simulator-notice { display: flex; align-items: flex-start; gap: 14px; margin: -4px 0 25px; padding: 16px 18px; border: 1px solid #dfc67c; border-left: 5px solid var(--gold); border-radius: 12px; color: #634e1d; background: #fff9e8; box-shadow: 0 10px 26px rgba(72,55,12,.06); }
.notice-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; color: #4b3a13; background: var(--gold); font-family: Georgia, serif; font-size: 1rem; font-weight: 900; }
.simulator-notice strong { display: block; color: #493815; font-size: .94rem; }
.simulator-notice p { margin: 3px 0 0; font-size: .86rem; line-height: 1.5; }
.panel { margin: 22px 0; padding: 27px; background: var(--paper); border: 1px solid #d7e5e9; border-radius: 18px; box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.section-heading h2 { margin: 0; font-size: 1.34rem; }
.section-heading p { margin: 2px 0 0; color: var(--muted); font-size: .92rem; }
.step { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; color: white; background: var(--deep); font-size: .8rem; font-weight: 850; letter-spacing: .05em; }
.field-grid { display: grid; gap: 17px; }
.market-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.three-cols { grid-template-columns: repeat(3, minmax(0,1fr)); }
label { position: relative; display: flex; flex-direction: column; gap: 7px; color: #2c4b58; font-size: .88rem; font-weight: 760; }
label small { color: var(--muted); font-weight: 500; line-height: 1.35; }
.required, .optional { position: absolute; right: 2px; top: 0; font-size: .68rem; font-weight: 750; letter-spacing: .02em; }
.required { color: #a05743; }
.optional { color: var(--teal); }
select, input { width: 100%; min-height: 46px; padding: 10px 12px; color: var(--ink); background: #fbfdfd; border: 1px solid #bcd0d8; border-radius: 9px; font: inherit; font-size: .96rem; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
select:focus, input:focus { border-color: var(--teal); background: white; box-shadow: 0 0 0 3px rgba(8,117,181,.14); }
input:user-invalid { border-color: #c7685c; }
.annual-note { margin: -5px 0 22px; padding: 13px 15px; border: 1px solid #bfd9eb; border-left: 4px solid var(--teal); border-radius: 11px; background: #eef7fc; }
.annual-note strong { color: var(--deep); font-size: .87rem; }
.annual-note p { margin: 2px 0 0; color: var(--muted); font-size: .82rem; }
.debt-risk-card { grid-column: span 2; display: flex; align-items: center; justify-content: space-between; gap: 22px; min-height: 104px; padding: 16px 18px; border: 1px solid #b8d9ec; border-radius: 12px; background: #edf7fc; }
.debt-risk-card > div { display: flex; flex-direction: column; min-width: 0; }
.debt-risk-card span { color: #356c91; font-size: .74rem; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.debt-risk-card strong { margin: 3px 0 1px; color: var(--deep); font-size: 1.22rem; }
.debt-risk-card small { color: #526f84; font-size: .78rem; }
.debt-risk-card a { flex: 0 0 auto; padding: 10px 13px; border: 1px solid #82b8d5; border-radius: 9px; color: #075e94; background: white; font-size: .8rem; font-weight: 800; text-decoration: none; }
.debt-risk-card a:hover { border-color: var(--teal); background: #f8fffd; }
.debt-risk-card a:focus-visible { outline: 3px solid rgba(8,117,181,.22); outline-offset: 2px; }
.debt-risk-card.custom { border-color: #bfd7e1; background: #eef6f9; }
.debt-risk-card.custom span { color: #497584; }
.debt-risk-card.warning { border-color: #efd594; background: var(--warn-bg); }
.debt-risk-card.warning strong, .debt-risk-card.warning small { color: var(--warn); }
.benchmark-message { margin-top: 18px; padding: 13px 14px; border-left: 4px solid var(--teal); border-radius: 7px; background: #edf7fc; color: #205b82; font-size: .92rem; }
.benchmark-message.warning { border-color: #d9a33c; background: var(--warn-bg); color: var(--warn); }
.subheading { display: flex; align-items: baseline; gap: 12px; padding-bottom: 9px; margin-bottom: 14px; border-bottom: 1px solid #dce8eb; }
.subheading.spaced { margin-top: 27px; }
.subheading span { color: var(--deep); font-size: .84rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.subheading p { margin: 0; color: var(--muted); font-size: .84rem; }
.form-error { margin-top: 18px; padding: 12px 14px; border-left: 4px solid var(--bad); border-radius: 7px; color: var(--bad); background: var(--bad-bg); font-weight: 700; }
.primary-button { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 24px; padding: 15px 19px; border: 0; border-radius: 10px; color: white; background: linear-gradient(90deg, var(--deep), var(--teal)); font: inherit; font-weight: 850; cursor: pointer; box-shadow: 0 10px 22px rgba(8,78,126,.24); }
.primary-button:hover { background: linear-gradient(90deg, #082b51, #075e94); }
.primary-button:focus-visible { outline: 3px solid rgba(8,117,181,.28); outline-offset: 3px; }
.results { margin: 27px 0; padding: 30px; border-radius: 20px; color: white; background: radial-gradient(circle at 94% 8%, rgba(100,217,184,.18), transparent 30%), linear-gradient(145deg, var(--deep-2), var(--deep)); box-shadow: 0 22px 50px rgba(7,43,61,.22); }
.results[hidden] { display: none; }
.results-topline { margin-bottom: 18px; }
.results-topline h2 { margin: 2px 0 0; font-size: 1.35rem; }
.verdict { display: flex; align-items: center; gap: 18px; padding: 21px; border-radius: 14px; }
.verdict > span { display: grid; place-items: center; width: 54px; height: 54px; flex: 0 0 54px; border-radius: 50%; font-size: 1.8rem; font-weight: 900; }
.verdict p { margin: 0 0 1px; font-size: .73rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.verdict strong { display: block; font-size: clamp(1.45rem,4vw,2.25rem); line-height: 1.1; }
.verdict small { display: block; margin-top: 6px; line-height: 1.4; }
.verdict.good { color: #dffff4; background: rgba(44,198,145,.16); border: 1px solid rgba(100,217,184,.42); }
.verdict.good > span { color: var(--deep); background: var(--mint); }
.verdict.bad { color: #ffe9e5; background: rgba(206,77,68,.18); border: 1px solid rgba(255,142,131,.35); }
.verdict.bad > span { color: white; background: #c85850; }
.verdict.neutral { color: #fff1c7; background: rgba(223,169,61,.14); border: 1px solid rgba(245,200,108,.3); }
.verdict.neutral > span { color: var(--deep); background: #f3c762; }
.kpi-heading { margin: 25px 0 13px; }
.kpi-heading h3 { margin: 0; font-size: 1.05rem; }
.kpi-heading p { margin: 2px 0 0; color: #b7d0d8; font-size: .86rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.kpi-card { position: relative; min-height: 142px; padding: 17px 18px 17px 22px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: rgba(255,255,255,.07); }
.kpi-card::before { position: absolute; inset: 0 auto 0 0; width: 5px; content: ""; background: #a7c8d2; }
.kpi-card.good::before { background: var(--mint); }
.kpi-card.bad::before { background: #ff8e83; }
.kpi-card.warn::before { background: #f0c35c; }
.kpi-card.info::before { background: #81c6df; }
.kpi-card header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-card h4 { margin: 0; font-size: .95rem; }
.kpi-card p { margin: 10px 0 0; color: #c6dce3; font-size: .88rem; line-height: 1.45; }
.kpi-state { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; font-size: .68rem; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.kpi-card.good .kpi-state { color: #bff7e6; background: rgba(78,212,166,.16); }
.kpi-card.bad .kpi-state { color: #ffd6d1; background: rgba(232,107,97,.17); }
.kpi-card.warn .kpi-state { color: #ffe9ae; background: rgba(239,188,72,.15); }
.kpi-card.info .kpi-state { color: #d5f2ff; background: rgba(73,159,195,.16); }
.methodology { margin: 24px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.methodology summary { color: var(--deep); font-weight: 850; cursor: pointer; }
.method-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(190px,1fr)); gap: 11px; margin: 17px 0; }
.method-grid div { padding: 13px; border-radius: 9px; background: #f3f8f9; }
.method-grid strong { color: var(--deep); font-size: .84rem; }
.method-grid p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; }
.methodology ul { padding-left: 21px; }
.methodology li { margin: 8px 0; color: var(--muted); }
footer { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; color: #6c828b; background: #e6eff4; font-size: .85rem; }
footer strong { color: var(--deep); }
footer strong::after { margin-left: 12px; color: var(--gold); content: "•"; }
@media (max-width: 1100px) { .brand { align-items: flex-start; flex-direction: column; gap: 6px; } .institutional-logos { gap: 13px; } .onep-logo { width: 70px; height: 70px; } .pucesa-logo { width: 175px; } }
@media (max-width: 1000px) { .market-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .three-cols { grid-template-columns: repeat(2,minmax(0,1fr)); } .debt-risk-card { grid-column: 1 / -1; } .method-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px) { .topbar-inner { align-items: flex-start; flex-direction: column; } .risk-pill { align-self: stretch; text-align: center; } .intro { grid-template-columns: 1fr; gap: 20px; } .formula-card { max-width: 480px; } .concept-grid { grid-template-columns: 1fr; } .market-grid, .kpi-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { main { width: min(100% - 20px, 1180px); padding-top: 22px; } .topbar-inner { width: min(100% - 20px, 1180px); } .brand { width: 100%; } .institutional-logos { width: 100%; justify-content: space-between; gap: 10px; } .onep-logo { width: 66px; height: 66px; } .pucesa-logo { width: min(190px, 58vw); } .brand-copy h1 { font-size: 1.08rem; } .concepts { padding: 18px 15px; } .concept-grid article { padding: 14px; } .panel, .results { padding: 19px 15px; border-radius: 14px; } .market-grid, .three-cols, .kpi-grid, .method-grid { grid-template-columns: 1fr; } .debt-risk-card { align-items: stretch; flex-direction: column; gap: 12px; } .debt-risk-card a { text-align: center; } .subheading { align-items: flex-start; flex-direction: column; gap: 2px; } .simulator-notice { padding: 14px; } .verdict { align-items: flex-start; } .verdict > span { width: 44px; height: 44px; flex-basis: 44px; } footer { align-items: center; flex-direction: column; gap: 3px; } footer strong::after { display: none; } }
