/* ================= Fuentes (locales, licencia SIL OFL 1.1: assets/fonts/OFL-*.txt) ================= */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../assets/fonts/inter-latin.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 700; font-display: swap;
  src: url("../assets/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-500-latin.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: "JetBrains Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/jetbrains-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ================= Tokens ================= */
:root {
  --navy: #0b1f3a;
  --navy-2: #12305a;
  --accent: #0f9d76;
  --accent-2: #12b886;
  --gold: #d4a64a;

  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #f0f3f8;
  --text: #0f1b2d;
  --muted: #64748b;
  --border: #e2e8f0;
  --grid: #edf1f6;
  --up: #0f9d58;
  --down: #d93025;
  --flat: #64748b;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 8px 24px rgba(15, 27, 45, .06);
  --shadow-lg: 0 24px 60px rgba(4, 16, 36, .28);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a1424;
    --surface: #101d33;
    --surface-2: #15243e;
    --text: #e6edf7;
    --muted: #8a9bb5;
    --border: #1f3050;
    --grid: #182844;
    --up: #2ecc71;
    --down: #ff6b5e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

/* ================= Base ================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1;
}
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

.container { width: min(1200px, 100% - 32px); margin-inline: auto; }
.container--narrow { width: min(780px, 100% - 32px); }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.lead { color: var(--muted); font-size: 17px; max-width: 56ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 10px;
  font-weight: 600; border: 1px solid transparent; transition: .15s ease;
  white-space: nowrap;
}
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: #0c8a67; }
.btn--ghost { border-color: rgba(255, 255, 255, .25); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .08); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ================= Ticker ================= */
.ticker {
  background: #061428;
  color: #c9d6ea;
  font-size: 12.5px;
  overflow: hidden;
  white-space: nowrap;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  height: 34px;
  display: flex; align-items: center;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}
.ticker__track { display: inline-flex; animation: ticker 70s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.tick { display: inline-flex; gap: 8px; align-items: center; padding: 0 22px; border-right: 1px solid rgba(255, 255, 255, .08); }
.tick b { color: #fff; font-weight: 600; }
.tick .up { color: #34d399; }
.tick .down { color: #f87171; }
.tick .flat { color: #94a3b8; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* ================= Header ================= */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 31, 58, .92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.header__inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; letter-spacing: -.02em; font-weight: 500; }
.brand strong { font-weight: 700; color: var(--accent-2); }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { padding: 8px 12px; border-radius: 8px; color: #c3cfe2; font-weight: 500; font-size: 14.5px; transition: .15s; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.header__actions { display: flex; align-items: center; gap: 16px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #a9b8cf; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

.menu-btn { display: none; margin-left: auto; width: 40px; height: 40px; border: 0; background: transparent; padding: 10px 8px; flex-direction: column; justify-content: space-between; }
.menu-btn span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: .2s; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ================= Hero ================= */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(18, 184, 134, .22), transparent 60%),
    radial-gradient(700px 400px at 0% 110%, rgba(212, 166, 74, .12), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, #0d2647 100%);
  padding: 72px 0 96px;
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 70%);
  pointer-events: none;
}
.hero__grid > * { min-width: 0; }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.hero .eyebrow { color: #6ee7b7; }
.hero h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 700; letter-spacing: -.035em; margin-bottom: 20px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #34d399, #6ee7b7); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: #b6c4da; font-size: 18px; }
.hero__stats { list-style: none; padding: 0; margin: 36px 0 0; display: flex; gap: 40px; flex-wrap: wrap; }
.hero__stats li { display: flex; flex-direction: column; }
.hero__stats strong { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.hero__stats span { font-size: 13px; color: #94a6c2; }

/* ================= Converter ================= */
.converter { color: var(--text); padding: 28px; box-shadow: var(--shadow-lg); border: 0; scroll-margin-top: 100px; }
.converter__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.converter__head h2 { font-size: 19px; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: rgba(15, 157, 118, .12); color: var(--accent); }

.field { display: block; }
.field__label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field__control, .select {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 14px;
  transition: border-color .15s, box-shadow .15s;
}
.field__control:focus-within, .select:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(15, 157, 118, .14); }
.field__prefix { font-weight: 600; color: var(--muted); font-size: 20px; min-width: 1ch; }
#amount { flex: 1; min-width: 0; height: 58px; border: 0; background: transparent; font-size: 26px; font-weight: 600; letter-spacing: -.02em; outline: none; }

.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: end; margin-top: 16px; }
.select { position: relative; height: 50px; padding-right: 32px; }
.select::after { content: ""; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select select { appearance: none; border: 0; background: transparent; width: 100%; height: 100%; font-weight: 600; outline: none; cursor: pointer; text-overflow: ellipsis; }
.select select option { background: var(--surface); color: var(--text); }
.flag img, .cur img { border-radius: 3px; object-fit: cover; box-shadow: 0 0 0 1px rgba(0, 0, 0, .08); }
.flag-txt { display: inline-grid; place-items: center; width: 22px; height: 16px; font-size: 9px; font-weight: 700; border-radius: 3px; background: var(--border); color: var(--muted); }

.swap {
  width: 44px; height: 44px; margin-bottom: 3px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  transition: .15s;
}
.swap:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.swap.spin svg { animation: spin .35s ease; }
@keyframes spin { from { transform: rotate(0); } to { transform: rotate(180deg); } }

.result { margin-top: 22px; padding: 20px; border-radius: 12px; background: linear-gradient(135deg, rgba(15, 157, 118, .08), rgba(11, 31, 58, .04)); border: 1px solid var(--border); }
.result__from { color: var(--muted); font-size: 14px; }
.result__to { font-size: clamp(28px, 3.4vw, 38px); font-weight: 700; letter-spacing: -.03em; margin: 2px 0 10px; word-break: break-word; }
.result__to small { font-size: .6em; color: var(--muted); font-weight: 600; }
.result__to .code { font-size: .45em; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.result__rates { display: flex; flex-wrap: wrap; gap: 6px 18px; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }

.quick { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.quick button { flex: 1; min-width: 56px; height: 34px; border-radius: 8px; border: 1px solid var(--border); background: transparent; font-size: 13px; font-weight: 600; color: var(--muted); transition: .15s; }
.quick button:hover { border-color: var(--accent); color: var(--accent); }

.converter__foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted); }
.converter__foot > span { display: inline-flex; align-items: center; gap: 6px; }
.link { border: 0; background: none; color: var(--accent); font-weight: 600; padding: 0; }
.link:hover { text-decoration: underline; }
.link:disabled { opacity: .5; cursor: wait; }

/* ================= Sections ================= */
.section { padding: 88px 0; }
.section--alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.section__head h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 700; }
.section__head--center { flex-direction: column; align-items: center; text-align: center; }
.section__head--center .lead { margin: 12px auto 0; }
.note { font-size: 12.5px; color: var(--muted); margin-top: 14px; }

.tabs { display: inline-flex; padding: 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.section--alt .tabs { background: var(--surface); }
.tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); transition: .15s; }
.tabs button[aria-selected="true"] { background: var(--navy); color: #fff; }

/* ================= Table ================= */
.table-wrap { overflow-x: auto; }
.rates { width: 100%; border-collapse: collapse; }
.rates th { text-align: left; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 14px 20px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.rates td { padding: 14px 20px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.rates tbody tr { cursor: pointer; transition: background .12s; }
.rates tbody tr:hover, .rates tbody tr:focus-visible { background: var(--surface-2); outline: none; }
.rates tbody tr:last-child td { border-bottom: 0; }
.rates .num { text-align: right; }
.rates td.num.mono { font-weight: 600; }
.spark-col { width: 150px; }
.cur { display: flex; align-items: center; gap: 12px; }
.cur div { display: flex; flex-direction: column; line-height: 1.25; }
.cur span { font-size: 12.5px; color: var(--muted); }
.pill { display: inline-block; min-width: 76px; text-align: center; padding: 3px 8px; border-radius: 6px; font-size: 12.5px; font-weight: 600; }
.pill.up { background: color-mix(in srgb, var(--up) 12%, transparent); }
.pill.down { background: color-mix(in srgb, var(--down) 12%, transparent); }
.pill.flat { background: var(--surface-2); }
.loading { text-align: center; color: var(--muted); padding: 40px !important; }
.spark { width: 120px; height: 32px; display: block; }
.spark__line { fill: none; stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark.up .spark__line { stroke: var(--up); } .spark.up .spark__area { fill: color-mix(in srgb, var(--up) 12%, transparent); }
.spark.down .spark__line { stroke: var(--down); } .spark.down .spark__area { fill: color-mix(in srgb, var(--down) 12%, transparent); }
.spark.flat .spark__line { stroke: var(--flat); } .spark.flat .spark__area { fill: transparent; }

/* ================= Chart ================= */
.chart-card { padding: 24px; }
.chart-card__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.chart-card__stats div { display: flex; flex-direction: column; }
.chart-card__stats span { font-size: 12px; color: var(--muted); font-weight: 500; }
.chart-card__stats strong { font-family: var(--mono); font-size: 18px; }
.chart { position: relative; height: 360px; touch-action: pan-y; }
.chart canvas { display: block; }
.chart__tip {
  position: absolute; top: 8px; transform: translateX(-50%);
  background: var(--navy); color: #fff; border-radius: 8px; padding: 8px 12px;
  font-size: 12px; pointer-events: none; display: flex; gap: 10px; align-items: baseline; white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}
.chart__tip span { color: #a9b8cf; }
.chart__tip strong { font-family: var(--mono); }
.chart__tip em { font-style: normal; font-weight: 600; }
.chart__tip .up { color: #34d399; } .chart__tip .down { color: #f87171; }
.chart__msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 24px; }

/* ================= Features ================= */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.feature { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: rgba(15, 157, 118, .1); color: var(--accent); margin-bottom: 18px; }
.feature__icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 17px; margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); font-size: 14.5px; }

.cta {
  margin-top: 40px; padding: 32px 36px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--navy), var(--navy-2)); color: #fff; border: 0;
}
.cta h3 { font-size: 21px; margin-bottom: 6px; }
.cta p { margin: 0; color: #b6c4da; }

/* ================= FAQ ================= */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
.faq summary { list-style: none; padding: 18px 22px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--accent); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 0; padding: 0 22px 20px; color: var(--muted); }

/* ================= Footer ================= */
.footer { background: #061428; color: #94a6c2; padding: 64px 0 28px; font-size: 14px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.brand--light { color: #fff; }
.footer__tag { margin: 14px 0 0; max-width: 32ch; }
.footer h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 14px; }
.footer__grid a:not(.brand) { display: block; padding: 4px 0; transition: color .15s; }
.footer__grid a:not(.brand):hover { color: #fff; }
.footer__legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 12.5px; }
.footer__legal p { margin: 0 0 8px; }

/* ================= Responsive ================= */
@media (max-width: 1080px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .status { display: none; }
}
@media (max-width: 920px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero { padding: 48px 0 64px; }
  .menu-btn { display: flex; }
  .header__actions { display: none; }
  .nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; padding: 12px 16px 20px;
    background: var(--navy); border-bottom: 1px solid rgba(255, 255, 255, .08);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .section { padding: 60px 0; }
  .converter { padding: 20px; }
  .pair { grid-template-columns: minmax(0, 1fr); }
  .swap { justify-self: center; transform: rotate(90deg); margin: 0; }
  .features { grid-template-columns: 1fr; }
  .chart-card { padding: 16px; }
  .chart-card__stats { grid-template-columns: repeat(2, 1fr); }
  .chart { height: 260px; }
  .rates th, .rates td { padding: 12px 14px; }
  .hide-xs { display: none; }
  .hero__stats { gap: 24px; }
  .cta { padding: 24px; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* ================= Consentimiento de cookies ================= */
.btn--line { background: transparent; border-color: var(--border); color: var(--text); }
.btn--line:hover { border-color: var(--accent); color: var(--accent); }

.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  max-width: 1100px; margin-inline: auto;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(4, 16, 36, .25);
  animation: consent-in .3s ease;
}
.consent__inner { display: flex; align-items: center; gap: 28px; padding: 22px 26px; }
.consent__text h2 { font-size: 16px; margin-bottom: 4px; }
.consent__text p { margin: 0; font-size: 13.5px; color: var(--muted); }
.consent__text a, .consent-modal a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.consent__actions { display: flex; gap: 10px; flex-shrink: 0; }
@keyframes consent-in { from { transform: translateY(16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .consent { animation: none; } }

.consent-modal {
  width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 32px);
  padding: 0; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg);
}
.consent-modal::backdrop { background: rgba(6, 20, 40, .55); backdrop-filter: blur(2px); }
.consent-modal form { padding: 24px; }
.consent-modal header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.consent-modal h2 { font-size: 19px; }
.consent-modal__close { border: 0; background: none; font-size: 26px; line-height: 1; color: var(--muted); padding: 4px 8px; }
.consent-modal__intro { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.consent-cat { border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.consent-cat__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; cursor: pointer; }
.consent-cat p { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.consent-cat__always { font-size: 12px; font-weight: 600; color: var(--accent); }
.consent-modal footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

.switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: .2s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--accent-2); outline-offset: 2px; }

@media (max-width: 760px) {
  .consent__inner { flex-direction: column; align-items: stretch; gap: 16px; padding: 18px; }
  .consent__actions { flex-wrap: wrap; }
  .consent__actions .btn { flex: 1; }
  .consent-modal footer .btn { flex: 1; }
}

/* ================= Páginas legales ================= */
.legal { padding: 56px 0 88px; }
.legal h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 8px; }
.legal h2 { font-size: 21px; margin: 36px 0 10px; }
.legal p, .legal li { color: var(--muted); }
.legal .updated { font-size: 13px; }
.legal table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.legal th, .legal td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.legal th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.legal code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-2); padding: 2px 6px; border-radius: 4px; }
.legal a { color: var(--accent); font-weight: 600; }
@media (max-width: 920px) {
  .nav.nav--static { position: static; display: flex; flex-direction: row; justify-content: flex-end; padding: 0; background: none; border: 0; }
  .nav.nav--static a { padding: 8px 10px; }
}
@media (max-width: 480px) { .nav.nav--static a:not(:first-child) { display: none; } }
.legal + .footer .footer__legal { margin-top: 0; border-top: 0; padding-top: 0; }
.consent-cat__always { white-space: nowrap; }
@media (max-width: 600px) {
  .legal table { display: block; overflow-x: auto; }
  .legal th, .legal td { min-width: 120px; }
}

/* ================= TC BCRP ================= */
.bcrp { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--border); font-size: 13px; color: var(--muted); }
.bcrp__title { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); margin-right: auto; }
.bcrp strong { font-family: var(--mono); color: var(--text); font-weight: 600; }
.chart-src { margin: 12px 0 0; }
