/* Hallmark · macrostructure: Data Sheet (ficha A aprobada, 28-09-2026) · tone: técnico, sobrio
 * theme: marca Quality Stocks (tokens del sitio preservados) · anchor hue: índigo #4353FF
 * nav: N5 floating pill (patrón maestro del sitio) · footer: el del sitio
 * Página oscura del sitio + «hoja» clara para la ficha (el diseño A que aprobó Edu).
 * CSP: sin estilos inline; los SVG se colorean con clases de este fichero.
 */
:root {
  /* Sitio (idénticos a index.html) */
  --blue: #4353FF;
  --blue-hover: #6166ff;
  --blue-light: #7c89ff;
  --ink: #0a0a0f;
  --ink-2: #131319;
  --line: #232330;
  --text: #f5f5f2;
  --muted: #9b9ba0;
  --foot-text: #b3b3b8;
  /* Hoja de la ficha */
  --paper: #ffffff;
  --paper-2: #f7f8ff;
  --soft: #eceeff;
  --soft-2: #d7dbfb;
  --p-ink: #0e1330;
  --p-muted: #545b7a;
  --p-faint: #6b7190;
  --p-ref: #8e94b3;
  --up: #0b7f55;
  --down: #b4322b;
  --font: "Nunito", "Nunito Fallback", system-ui, -apple-system, sans-serif;
  --r-sheet: 24px;
  --r-card: 18px;
  --r-ctl: 12px;
  --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px; --space-md: 16px;
  --space-lg: 24px; --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 160ms;
}
@font-face { font-family: "Nunito Fallback"; src: local("Arial"); size-adjust: 102%; ascent-override: 101%; descent-override: 28%; line-gap-override: 0%; }

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: clip; }
body.rx { font-family: var(--font); background: var(--ink); color: var(--text); -webkit-font-smoothing: antialiased; line-height: 1.5; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 3px; border-radius: 6px; }

/* ---------- Nav (N5 pill, igual que la portada) ---------- */
.nav { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 40; width: calc(100% - 28px); max-width: 1080px;
  background: rgba(19, 19, 25, 0.86); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-inner { height: 60px; display: flex; align-items: center; gap: 28px; max-width: 1080px; margin: 0 auto; padding: 0 10px 0 18px; }
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 16px; letter-spacing: 0.01em; white-space: nowrap; }
.nav-logo .marca-q, .foot-marca .marca-q { width: 34px; height: 34px; border-radius: 9px; background: var(--blue); display: grid; place-items: center; flex: none; }
.nav-logo .marca-q img { width: 24px; height: 24px; object-fit: contain; }
.nav-logo span em { font-style: normal; color: var(--blue-light); }
.ai { font-size: 1.55em; font-weight: 900; letter-spacing: 0; color: var(--blue-light); }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { text-decoration: none; font-weight: 700; font-size: 15px; color: var(--muted); transition: color var(--dur) var(--ease-out); white-space: nowrap; }
.nav-links a:hover { color: var(--text); }
.nav-cta { text-decoration: none; background: var(--blue); color: #fff; font-weight: 800; font-size: 15px; padding: 10px 18px; border-radius: 999px;
  transition: background var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); white-space: nowrap; }
.nav-cta:hover { background: var(--blue-hover); }
.nav-cta:active { transform: scale(0.98); }
@media (max-width: 720px) { .nav-links { display: none; } .nav-cta { margin-left: auto; } }
@media (max-width: 560px) {
  .nav-logo { font-size: 14px; gap: 8px; }
  .nav-logo .marca-q { width: 28px; height: 28px; border-radius: 8px; }
  .nav-logo .marca-q img { width: 20px; height: 20px; }
  .nav-cta { font-size: 13px; padding: 9px 14px; }
  .nav-inner { padding: 0 8px 0 14px; gap: 12px; }
}

/* ---------- Página ---------- */
.rx-main { padding-top: 96px; padding-bottom: var(--space-2xl); }
.migas { display: flex; flex-wrap: wrap; gap: var(--space-xs); font-size: 13px; font-weight: 700; color: var(--muted); margin: 0 0 var(--space-md) 4px; }
.migas a { text-decoration: none; }
.migas a:hover { color: var(--text); }
.migas [aria-current] { color: var(--text); }

/* ---------- Hoja ---------- */
.sheet { background: var(--paper); color: var(--p-ink); border-radius: var(--r-sheet); padding: 36px 40px 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); font-variant-numeric: tabular-nums; }

.sheet-top { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-lg); padding-bottom: var(--space-lg); border-bottom: 1px solid var(--soft); }
.kicker { font-size: 12.5px; font-weight: 900; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue); margin-bottom: 6px; }
.sheet h1 { font-size: clamp(30px, 4vw, 44px); font-weight: 900; line-height: 1.05; letter-spacing: -0.01em; overflow-wrap: anywhere; min-width: 0; }
.sub { color: var(--p-muted); font-size: 14.5px; font-weight: 600; margin-top: 8px; }
.tk { display: inline-block; background: var(--soft); color: var(--blue); font-weight: 900; font-size: 13px; padding: 2px 9px; border-radius: 999px; margin-right: 4px; }

.px { text-align: right; min-width: 280px; }
.pv { font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: -0.01em; }
.chg { font-size: 14px; font-weight: 800; margin-top: 6px; }
.chg-up { color: var(--up); }
.chg-down { color: var(--down); }
.rango-w { margin: 12px 0 2px auto; width: 280px; max-width: 100%; }
.rango { display: block; width: 100%; height: auto; }
.rango .rt { fill: var(--soft); }
.rango .rf { fill: var(--soft-2); }
.rango .rd { fill: var(--blue); stroke: var(--paper); stroke-width: 3; }
.rl { display: flex; justify-content: space-between; gap: var(--space-xs); width: 280px; max-width: 100%; margin-left: auto; font-size: 11.5px; color: var(--p-muted); font-weight: 700; }
.rl span:nth-child(2) { color: var(--p-faint); font-weight: 600; }
.asof { font-size: 11.5px; color: var(--p-faint); margin-top: 6px; }

.sec-t { font-size: 13px; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); margin: var(--space-lg) 0 var(--space-md); display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.sec-t span { font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--p-faint); font-weight: 700; }

.tiles { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.tile { background: var(--paper-2); border: 1px solid var(--soft); border-radius: var(--r-card); padding: 16px 10px 16px; text-align: center; }
.gauge { width: 100px; height: 100px; display: block; margin: 0 auto; }
.gauge .gt { stroke: var(--soft); }
.gauge .gv { stroke: var(--blue); }
.gauge .gn { fill: var(--p-ink); font-family: var(--font); font-weight: 900; font-size: 30px; }
.tile-n { font-size: 16px; font-weight: 900; margin-top: -8px; }
.tile-t { font-size: 12.5px; color: var(--p-muted); margin-top: 4px; line-height: 1.35; font-weight: 600; }

.mid { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: var(--space-lg); margin-top: var(--space-lg); align-items: start; }
.rad { background: var(--paper-2); border: 1px solid var(--soft); border-radius: var(--r-card); padding: 12px 12px 16px; position: sticky; top: 92px; }
.radar { display: block; width: 100%; height: auto; }
.radar .rg { stroke: var(--soft-2); stroke-width: 1; }
.radar .rg-out { stroke-width: 2; }
.radar .rref { stroke: var(--p-ref); stroke-width: 2; }
.radar .rv { fill: rgba(67, 83, 255, 0.22); stroke: var(--blue); stroke-width: 3; stroke-linejoin: round; }
.radar .rdot { fill: var(--blue); stroke: var(--paper); stroke-width: 2; }
.radar .rlab { fill: var(--p-ink); font-family: var(--font); font-weight: 800; }
.radar .rnum { fill: var(--blue); font-family: var(--font); font-weight: 900; }
.rad figcaption { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 8px; font-size: 12px; color: var(--p-muted); font-weight: 700; }
.lg { display: inline-block; width: 18px; height: 10px; border-radius: 3px; }
.lg-v { background: rgba(67, 83, 255, 0.22); border: 2px solid var(--blue); }
.lg-r { border-top: 2px dashed var(--p-ref); height: 0; border-radius: 0; margin-left: 10px; }

.blks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.blk { border: 1px solid var(--soft); border-radius: 16px; padding: 14px 16px 10px; }
.blk-h { display: flex; justify-content: space-between; align-items: center; gap: var(--space-xs); margin-bottom: 4px; }
.blk-h h3 { font-size: 17px; font-weight: 900; }
.blk-nota { background: var(--soft); color: var(--blue); font-weight: 900; font-size: 14px; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.blk-nota small { font-size: 11px; font-weight: 800; opacity: 0.8; }
.blk table { width: 100%; border-collapse: collapse; font-size: 13px; }
.blk thead th { font-size: 10.5px; font-weight: 700; color: var(--p-faint); text-align: right; padding: 2px 0 4px 8px; white-space: nowrap; }
.blk thead th:last-child { text-align: left; padding-left: 12px; }
.blk tbody th { text-align: left; font-weight: 700; padding: 6px 0; border-top: 1px solid var(--paper-2); }
.m-n { display: block; line-height: 1.3; }
.blk td { padding: 6px 0 6px 8px; text-align: right; white-space: nowrap; border-top: 1px solid var(--paper-2); }
.blk td.v { font-weight: 900; }
.blk td.md { color: var(--p-muted); font-weight: 600; }
.blk td.p { width: 76px; padding-left: 12px; text-align: left; }
.pos { display: block; width: 64px; height: auto; }
.pos .pt { fill: var(--soft); }
.pos .pv { fill: var(--blue); }
.pos .pm { fill: var(--p-ink); }
.leer { border: 1px dashed var(--soft-2); border-radius: 16px; padding: 14px 16px; background: var(--paper); }
.leer h3 { font-size: 15px; font-weight: 900; }
.leer-bar { margin: 10px 0 8px; }
.leer-bar .pos { width: 180px; }
.leer ul { list-style: none; display: grid; gap: 6px; }
.leer li { font-size: 12.5px; color: var(--p-muted); font-weight: 600; line-height: 1.45; }
.leer b { color: var(--p-ink); font-weight: 800; }
.pos-na { font-size: 11px; color: var(--p-faint); font-weight: 700; }

.bot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; margin-top: var(--space-lg); }
.ch, .grupo { background: var(--paper-2); border: 1px solid var(--soft); border-radius: var(--r-card); padding: 14px 18px 10px; }
.ch figcaption, .grupo h2 { font-size: 14px; font-weight: 900; display: flex; justify-content: space-between; gap: var(--space-xs); color: var(--p-ink); }
.ch figcaption span, .grupo h2 span { font-weight: 700; color: var(--p-faint); font-size: 12px; }
.bars { display: block; width: 100%; height: auto; margin-top: 6px; }
.bars .b { fill: var(--soft-2); }
.bars .b-last { fill: var(--blue); }
.bars .bx { stroke: var(--soft-2); stroke-width: 1; }
.bars .bv { fill: var(--p-muted); font-family: var(--font); font-size: 12px; font-weight: 800; }
.bars .bv.b-last { fill: var(--p-ink); font-weight: 900; }
.bars .by { fill: var(--p-faint); font-family: var(--font); font-size: 12px; font-weight: 700; }
.grupo h2 { font-size: 14px; }
.peers { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 12px; }
.peers li { font-size: 12.5px; font-weight: 700; background: var(--paper); border: 1px solid var(--soft); border-radius: 999px; padding: 3px 10px; }
.peers li span { color: var(--p-faint); font-weight: 700; font-size: 11px; margin-left: 2px; }
.grupo p { font-size: 12.5px; color: var(--p-muted); line-height: 1.5; font-weight: 600; }

.sheet-foot { margin-top: var(--space-lg); padding-top: var(--space-md); border-top: 1px solid var(--soft); }
.aviso { font-size: 14px; font-weight: 800; color: var(--p-ink); }
.fuentes { font-size: 12px; color: var(--p-faint); margin-top: 4px; line-height: 1.55; font-weight: 600; }

/* ---------- Método (zona oscura) ---------- */
.metodo { margin-top: var(--space-2xl); }
.metodo h2 { font-size: 22px; font-weight: 900; margin-bottom: var(--space-md); }
.metodo-g { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-lg); }
.metodo p { color: var(--muted); font-size: 14.5px; line-height: 1.6; font-weight: 600; }
.metodo strong { color: var(--text); display: block; margin-bottom: 4px; font-weight: 800; }

/* ---------- Llamada a la acción bajo las 5 notas (hoja clara) ---------- */
.cta-rx { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md) var(--space-lg); flex-wrap: wrap;
  margin-top: var(--space-lg); padding: 18px 22px; background: var(--paper-2); border: 1px solid var(--soft-2); border-radius: var(--r-card); }
.cta-rx-txt { min-width: 0; flex: 1 1 320px; }
.cta-rx h2 { font-size: 19px; font-weight: 900; line-height: 1.25; overflow-wrap: anywhere; }
.cta-rx p { font-size: 13.5px; color: var(--p-muted); font-weight: 600; margin-top: 4px; line-height: 1.45; }
.cta-rx-acc { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cta-rx-b { text-decoration: none; background: var(--blue); color: #fff; font-weight: 900; font-size: 15px; padding: 12px 22px; border-radius: 999px;
  transition: background var(--dur) var(--ease-out); white-space: nowrap; }
.cta-rx-b:hover { background: var(--blue-hover); }
.cta-rx-b:active { transform: scale(0.98); }
.cta-rx-l { font-size: 13px; font-weight: 800; color: var(--blue); text-decoration: none; }
.cta-rx-l:hover { text-decoration: underline; }

/* ---------- Preguntas frecuentes (zona oscura, mismo patrón que Método) ---------- */
.faq-i h3 { color: var(--text); font-size: 16px; font-weight: 900; margin-bottom: 6px; }

/* ---------- Footer (el del sitio) ---------- */
.rx-footer { padding: 56px 0 40px; }
.rx-footer .wrap { max-width: 1120px; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; }
.foot-marca { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 15px; }
.foot-marca .marca-q { width: 30px; height: 30px; border-radius: 8px; }
.foot-marca .marca-q img { width: 21px; height: 21px; object-fit: contain; }
.foot-redes { display: flex; gap: 18px; margin-left: auto; }
.foot-redes a { text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); transition: color var(--dur) var(--ease-out); }
.foot-redes a:hover { color: var(--text); }
.foot-legal { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--foot-text); font-size: 13px; font-weight: 600; line-height: 1.6; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .mid { grid-template-columns: minmax(0, 1fr); }
  .rad { position: static; max-width: 460px; width: 100%; margin: 0 auto; }
  .bot { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .grupo { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .tile { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 14px; text-align: left; padding: 8px 14px 8px 8px; }
  .gauge { width: 64px; height: 64px; }
  .tile-n { margin-top: 0; }
  .blks { grid-template-columns: minmax(0, 1fr); }
  .metodo-g { grid-template-columns: minmax(0, 1fr); gap: var(--space-md); }
}
@media (max-width: 640px) {
  .wrap { padding: 0 12px; }
  .rx-main { padding-top: 88px; }
  .sheet { padding: 22px 16px 18px; border-radius: 20px; }
  .sheet-top { flex-direction: column; align-items: stretch; gap: var(--space-md); }
  .px { text-align: left; min-width: 0; }
  .pv { font-size: 34px; }
  .rango-w, .rl { width: 100%; margin-left: 0; }
  .bot { grid-template-columns: minmax(0, 1fr); }
  .blk { padding: 12px 12px 8px; }
  .blk table { font-size: 12.5px; }
  .blk td.p { width: 60px; padding-left: 8px; }
  .pos { width: 54px; }
  .foot-redes { margin-left: 0; }
  .cta-rx { padding: 16px; }
  .cta-rx-acc { align-items: stretch; width: 100%; }
  .cta-rx-b { text-align: center; }
}
/* ---------- Índice (radiografia/index.html) ---------- */
.idx-top { padding-bottom: var(--space-md); border-bottom: 1px solid var(--soft); }
.idx-top .sub { max-width: 720px; }
.idx-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.idx-card { background: var(--paper-2); border: 1px solid var(--soft); border-radius: var(--r-card); padding: 16px 18px 14px; }
.idx-a { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-decoration: none; }
.idx-n { font-size: 20px; font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.idx-a:hover .idx-n { color: var(--blue); }
.idx-m { font-size: 12.5px; color: var(--p-muted); font-weight: 700; margin-top: 2px; }
.idx-notas { list-style: none; margin-top: 12px; display: grid; gap: 6px; }
.idx-notas li { display: grid; grid-template-columns: 96px minmax(0, 1fr) 28px; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 700; color: var(--p-muted); }
.idx-notas b { text-align: right; color: var(--blue); font-weight: 900; font-size: 14px; }
.mb { display: block; width: 100%; height: 12px; }
.mb .mb0 { fill: var(--soft); }
.mb .mb1 { fill: var(--blue); }
.mb .mbm { fill: var(--p-ink); }
@media (max-width: 1100px) { .idx-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .idx-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0.01ms !important; } }
