/* Upgrade Your Heart — plataforma educativa
   Sistema de diseño compartido. Mantiene la paleta, tipografías y texturas del sitio original. */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-garamond-latin-wght-normal.woff2') format('woff2');
  font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('../assets/fonts/cormorant-garamond-latin-wght-italic.woff2') format('woff2');
  font-weight: 300 700; font-style: italic; font-display: swap;
}
@font-face {
  font-family: 'Outfit';
  src: url('../assets/fonts/outfit-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 800; font-style: normal; font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #FAF9F6;
  --s1: #F4F1EC;
  --s2: #EBE5DB;
  --s3: #DFD7CA;
  --border: rgba(0, 0, 0, 0.08);
  --border2: rgba(0, 0, 0, 0.14);
  --dim: #71717A;
  --mid: #52525B;
  --text: #27272A;
  --hi: #000000;
  --red: #c41230;
  --red2: #9a0e25;
  --red-soft: rgba(196, 18, 48, 0.08);
  --red-glow: rgba(196, 18, 48, 0.18);
  --gold: #c4973a;
  --gold2: #8a6520;
  --gold-soft: rgba(196, 151, 58, 0.12);
  --ok: #3f6f57;
  --ok-soft: rgba(63, 111, 87, 0.10);
  --screen: #0d0d0f;
  --r: 4px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
}

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); font-weight: 400; line-height: 1.6;
  overflow-x: hidden;
}
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.028; background-size: 200px 200px;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Cursor (solo portada, puntero fino) ── */
#cursor, #cursor-ring { display: none; }
@media (pointer: fine) {
  body.has-cursor { cursor: none; }
  body.has-cursor a, body.has-cursor button { cursor: none; }
  body.has-cursor #cursor, body.has-cursor #cursor-ring { display: block; }
  #cursor { position: fixed; width: 10px; height: 10px; border-radius: 50%; background: var(--red); pointer-events: none; z-index: 9999; transform: translate(-50%, -50%); transition: width .3s, height .3s; }
  #cursor-ring { position: fixed; width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(196,18,48,.4); pointer-events: none; z-index: 9998; transform: translate(-50%, -50%); }
  body:has(a:hover) #cursor, body:has(button:hover) #cursor { width: 18px; height: 18px; }
}

#scroll-prog { position: fixed; top: 0; left: 0; height: 2px; background: var(--red); z-index: 2000; width: 0; }

/* ── Reveal ── */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .1s; } .reveal-d2 { transition-delay: .2s; } .reveal-d3 { transition-delay: .3s; } .reveal-d4 { transition-delay: .4s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* ── Nav ── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: 76px; border-bottom: 1px solid transparent; transition: background .4s, border-color .4s; }
.nav.scrolled, .nav.solid { background: rgba(250, 249, 246, 0.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-color: var(--border); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 32px; height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo img { height: 56px; width: auto; }
.nav-links { display: flex; gap: 30px; list-style: none; align-items: center; }
.nav-links a { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); text-decoration: none; position: relative; padding-bottom: 2px; transition: color .3s; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 1px; background: var(--red); transition: width .3s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--hi); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { width: 100%; }
.nav-cta { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--hi); border: 1px solid var(--border2); padding: 9px 20px; text-decoration: none; transition: background .3s, color .3s; white-space: nowrap; }
.nav-cta:hover { background: var(--hi); color: var(--bg); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border2); width: 42px; height: 42px; align-items: center; justify-content: center; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after { display: block; width: 18px; height: 1.5px; background: var(--hi); position: relative; content: ''; }
.nav-toggle span::before { position: absolute; top: -6px; } .nav-toggle span::after { position: absolute; top: 6px; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 32px 20px; }
  .nav.open .nav-links { display: flex; }
  .nav-links li { width: 100%; border-bottom: 1px solid var(--border); }
  .nav-links a { display: block; padding: 14px 0; font-size: .8rem; }
  .nav-links a::after { display: none; }
  .nav-cta { display: none; }
  .nav.open { background: var(--bg); border-color: var(--border); }
}
@media (max-width: 520px) { .nav-inner { padding: 0 18px; } .nav-logo img { height: 46px; } }

/* ── Layout ── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }
@media (max-width: 520px) { .container { padding: 0 18px; } }
.section { padding: 112px 0; position: relative; }
@media (max-width: 720px) { .section { padding: 72px 0; } }

.section-rule { display: flex; align-items: center; gap: 20px; margin-bottom: 56px; }
.rule-line { flex: 1; height: 1px; background: var(--border); }
.rule-label { font-family: var(--mono); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.sh-pre { font-family: var(--mono); font-size: .66rem; letter-spacing: .18em; text-transform: uppercase; color: var(--red); display: block; margin-bottom: 18px; }
.sh-h2 { font-family: var(--serif); font-size: clamp(2.4rem, 4.6vw, 4rem); font-weight: 300; line-height: 1.02; color: var(--hi); letter-spacing: -.02em; }
.sh-h2 em { font-style: italic; color: var(--red); }
.lead { font-size: 1.04rem; font-weight: 300; color: var(--mid); line-height: 1.8; max-width: 560px; }
.mono-tag { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }

/* ── Buttons ── */
.btn { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 13px 28px; border: 1px solid var(--hi); background: var(--hi); color: var(--bg); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; transition: background .3s, color .3s, transform .3s, border-color .3s; }
.btn:hover { background: var(--mid); border-color: var(--mid); transform: translateY(-2px); }
.btn.ghost { background: transparent; color: var(--mid); border-color: var(--border2); font-weight: 500; }
.btn.ghost:hover { color: var(--hi); border-color: var(--hi); background: transparent; }
.btn.red { background: var(--red); border-color: var(--red); }
.btn.red:hover { background: var(--red2); border-color: var(--red2); }
.btn.sm { padding: 8px 16px; font-size: .7rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.arrow::after { content: '→'; font-family: var(--sans); }

/* ── Footer ── */
.footer { border-top: 1px solid var(--border); padding: 56px 0 40px; background: var(--s1); position: relative; z-index: 2; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.footer h4 { font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); font-weight: 500; margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer a { color: var(--mid); text-decoration: none; font-size: .9rem; }
.footer a:hover { color: var(--red); }
.footer-tagline { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--red); margin-top: 12px; }
.footer-note { font-size: .82rem; color: var(--dim); line-height: 1.7; max-width: 420px; margin-top: 14px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; } }

/* ═══════════ APLICACIONES ═══════════ */
.app-page { padding-top: 76px; position: relative; z-index: 2; }
.app-head { border-bottom: 1px solid var(--border); background: linear-gradient(135deg, var(--s1) 0%, var(--bg) 70%); position: relative; overflow: hidden; }
.app-head::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 40px 40px; opacity: .45; pointer-events: none; }
.app-head .container { padding-top: 44px; padding-bottom: 36px; }
.crumbs { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.crumbs a { text-decoration: none; color: var(--dim); } .crumbs a:hover { color: var(--red); }
.app-title { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 5vw, 4.2rem); line-height: 1; color: var(--hi); letter-spacing: -.02em; }
.app-title em { font-style: italic; color: var(--red); }
.app-sub { margin-top: 16px; color: var(--mid); font-weight: 300; max-width: 680px; line-height: 1.75; }
.app-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.chip { font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px; border: 1px solid var(--border2); color: var(--mid); background: var(--bg); }
.chip.red { color: var(--red); border-color: rgba(196,18,48,.35); }

.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin: 28px 0 28px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { background: none; border: none; border-bottom: 2px solid transparent; padding: 14px 20px 12px; font-family: var(--mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); cursor: pointer; white-space: nowrap; margin-bottom: -1px; transition: color .25s, border-color .25s; }
.tab:hover { color: var(--hi); }
.tab[aria-selected="true"] { color: var(--hi); border-bottom-color: var(--red); }
.tab-panel[hidden] { display: none; }

.app-body { padding: 8px 0 96px; }
.workbench { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.workbench.wide-left { grid-template-columns: 380px 1fr; }
@media (max-width: 980px) { .workbench, .workbench.wide-left { grid-template-columns: 1fr; } }

.panel { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); padding: 22px; position: relative; }
.panel.tint { background: var(--s1); }
.panel + .panel { margin-top: 16px; }
.panel-title { font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.panel h3 { font-family: var(--serif); font-weight: 600; font-size: 1.5rem; color: var(--hi); line-height: 1.15; margin-bottom: 8px; }
.panel p, .panel li { font-size: .92rem; color: var(--mid); line-height: 1.7; }
.panel ul, .panel ol { padding-left: 18px; display: grid; gap: 4px; }
.panel strong { color: var(--text); font-weight: 600; }
.note { font-size: .8rem !important; color: var(--dim) !important; line-height: 1.6 !important; margin-top: 12px; }
.note::before { content: '※ '; color: var(--red); }

/* Controles */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .field > .label { font-size: .78rem; color: var(--mid); font-weight: 500; display: flex; justify-content: space-between; gap: 8px; }
.field output, .val { font-family: var(--mono); font-size: .78rem; color: var(--hi); }
.field input[type="number"], .field select, .field input[type="text"], .field input[type="search"] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border2); border-radius: var(--r); background: #fff; font-size: .92rem; transition: border-color .2s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--red); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .row3 { grid-template-columns: 1fr 1fr; } }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: var(--s3); }
input[type="range"]::-moz-range-track { height: 2px; background: var(--s3); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--red); margin-top: -7px; border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--red); }
input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 3px solid var(--bg); box-shadow: 0 0 0 1px var(--red); }

.check { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: .88rem; color: var(--text); cursor: pointer; }
.check:last-child { border-bottom: none; }
.check input { margin-top: 4px; accent-color: var(--red); width: 16px; height: 16px; flex-shrink: 0; }
.check .pts { margin-left: auto; font-family: var(--mono); font-size: .72rem; color: var(--dim); white-space: nowrap; }

.seg { display: inline-flex; border: 1px solid var(--border2); border-radius: var(--r); overflow: hidden; flex-wrap: wrap; }
.seg button { background: transparent; border: none; border-right: 1px solid var(--border2); padding: 8px 12px; font-size: .78rem; color: var(--mid); cursor: pointer; }
.seg button:last-child { border-right: none; }
.seg button[aria-pressed="true"] { background: var(--hi); color: var(--bg); }

.optlist { display: grid; gap: 8px; }
.opt { text-align: left; background: var(--bg); border: 1px solid var(--border2); border-radius: var(--r); padding: 12px 14px; font-size: .9rem; color: var(--text); cursor: pointer; transition: border-color .2s, background .2s; line-height: 1.5; }
.opt:hover:not(:disabled) { border-color: var(--hi); }
.opt.correct { border-color: var(--ok); background: var(--ok-soft); }
.opt.wrong { border-color: var(--red); background: var(--red-soft); }
.opt:disabled { cursor: default; }

/* Resultados */
.result { display: grid; gap: 4px; }
.big { font-variant-numeric: lining-nums; font-family: var(--serif); font-weight: 700; font-size: 3rem; line-height: 1; color: var(--hi); letter-spacing: -.03em; }
.big small { font-family: var(--sans); font-size: .9rem; font-weight: 400; color: var(--dim); letter-spacing: 0; margin-left: 4px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; border-top: 1px solid var(--border); border-left: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.kpi { background: var(--bg); padding: 14px 16px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.kpi .k { font-family: var(--mono); font-size: .58rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.kpi .v { font-variant-numeric: lining-nums; font-family: var(--serif); font-weight: 700; font-size: 1.9rem; color: var(--hi); line-height: 1.1; margin-top: 4px; letter-spacing: -.02em; }
.kpi .v small { font-family: var(--sans); font-weight: 400; font-size: .74rem; color: var(--dim); letter-spacing: 0; }
.kpi .u { font-size: .74rem; color: var(--dim); }
.kpi.warn .v { color: var(--gold2); } .kpi.bad .v { color: var(--red); } .kpi.good .v { color: var(--ok); }
.badge { display: inline-block; font-family: var(--mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; padding: 5px 10px; border-radius: 2px; border: 1px solid currentColor; }
.badge.good { color: var(--ok); background: var(--ok-soft); }
.badge.warn { color: var(--gold2); background: var(--gold-soft); }
.badge.bad { color: var(--red); background: var(--red-soft); }
.badge.neutral { color: var(--mid); background: var(--s1); }
.verdict { border-left: 3px solid var(--hi); padding: 12px 16px; background: var(--s1); font-size: .92rem; color: var(--text); line-height: 1.65; margin-top: 14px; }
.verdict.good { border-color: var(--ok); } .verdict.warn { border-color: var(--gold); } .verdict.bad { border-color: var(--red); }

/* Tablas de referencia */
.ref-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.ref-table th { font-family: var(--mono); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); text-align: left; font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--border2); }
.ref-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--mid); vertical-align: top; }
.ref-table tr.hl td { background: var(--red-soft); color: var(--text); }
.table-wrap { overflow-x: auto; }

/* Lienzos */
.stage { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; position: relative; }
.stage.dark { background: var(--screen); border-color: #000; }
.stage-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); font-family: var(--mono); font-size: .6rem; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); flex-wrap: wrap; }
.stage.dark .stage-bar { border-color: #222; color: #8b8b93; }
.scroll-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ecg-canvas { display: block; width: 100% !important; height: auto !important; min-width: 760px; max-width: none; cursor: crosshair; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .76rem; color: var(--mid); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.score-pill { font-family: var(--mono); font-size: .66rem; letter-spacing: .12em; color: var(--mid); }
.progress { height: 2px; background: var(--s3); margin: 10px 0 18px; }
.progress i { display: block; height: 100%; background: var(--red); transition: width .4s var(--ease); }

.disclaimer { font-size: .78rem; color: var(--dim); border-top: 1px solid var(--border); margin-top: 48px; padding-top: 18px; line-height: 1.7; }

/* SVG interactivo */
.hot { cursor: pointer; transition: opacity .2s, fill .2s, stroke .2s; }
.hot:hover { opacity: .85; }
.tip { position: absolute; pointer-events: none; background: var(--hi); color: var(--bg); font-size: .74rem; padding: 6px 10px; border-radius: 2px; white-space: nowrap; transform: translate(-50%, -130%); opacity: 0; transition: opacity .15s; z-index: 5; }
.tip.show { opacity: 1; }

/* ═══════════ PORTADA ═══════════ */
.hero { min-height: 100vh; display: grid; grid-template-columns: 55fr 45fr; position: relative; overflow: hidden; padding-top: 60px; }
.hero-left { display: flex; flex-direction: column; justify-content: center; padding: 80px 64px 80px max(32px, calc((100vw - 1280px) / 2 + 32px)); position: relative; z-index: 2; }
.hero-tag { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); margin-bottom: 36px; }
.hero-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.hero-h1 { font-family: var(--serif); line-height: .92; margin-bottom: 34px; }
.hero-h1 .ln1 { display: block; font-size: clamp(4.2rem, 8vw, 8.5rem); font-style: italic; font-weight: 300; color: var(--hi); letter-spacing: -.03em; }
.hero-h1 .ln2 { display: block; font-size: clamp(2.4rem, 4.5vw, 5rem); font-weight: 300; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; margin-top: .1em; }
.hero-h1 .ln3 { display: block; font-size: clamp(4.2rem, 8vw, 8.5rem); font-weight: 700; color: var(--hi); letter-spacing: -.04em; margin-top: -.05em; }
.hero-h1 .ln3 span { color: var(--red); }
.hero-desc { font-size: 1.04rem; font-weight: 300; color: var(--mid); line-height: 1.8; max-width: 480px; margin-bottom: 40px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--border); padding-top: 28px; gap: 28px; max-width: 600px; }
.hstat-num { font-variant-numeric: lining-nums; font-family: var(--serif); font-weight: 700; font-size: 2.8rem; color: var(--hi); letter-spacing: -.04em; line-height: 1; }
.hstat-label { font-size: .72rem; color: var(--dim); margin-top: 4px; letter-spacing: .04em; }
.hero-right { position: relative; display: flex; align-items: center; justify-content: center; border-left: 1px solid var(--border); background: linear-gradient(135deg, var(--s1) 0%, var(--bg) 100%); overflow: hidden; }
.hero-right::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 40px 40px; opacity: .5; }
.hero-instrument { position: relative; width: min(380px, 80%); aspect-ratio: 1; }
.hero-monitor { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 62%; }
.hero-right-label { position: absolute; bottom: 72px; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); white-space: nowrap; }
.ecg-strip { position: absolute; bottom: 0; left: 0; right: 0; height: 60px; overflow: hidden; }
.ecg-strip svg { width: 200%; height: 100%; max-width: none; animation: ecg-scroll 8s linear infinite; }
@keyframes ecg-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-left { padding: 72px 32px 48px; }
  .hero-right { min-height: 360px; border-left: none; border-top: 1px solid var(--border); }
}
@media (max-width: 520px) { .hero-left { padding: 56px 18px 40px; } .hstat-num { font-size: 2.1rem; } .hero-stats { gap: 16px; } }

.ticker { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 14px 0; overflow: hidden; background: var(--s1); position: relative; z-index: 2; }
.ticker-inner { display: flex; animation: ticker-scroll 40s linear infinite; white-space: nowrap; width: max-content; }
.ticker-item { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mid); padding: 0 32px; display: inline-flex; align-items: center; gap: 32px; }
.ticker-item::after { content: '◆'; color: var(--red); font-size: .5rem; }
.ticker-item em { font-style: normal; color: var(--red); }
@keyframes ticker-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; margin-bottom: 56px; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; gap: 24px; } }

.mod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
@media (max-width: 1000px) { .mod-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .mod-grid { grid-template-columns: 1fr; } }
.mod-card { background: var(--bg); padding: 34px 30px 30px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 14px; position: relative; transition: background .35s; min-height: 300px; }
.mod-card:hover { background: var(--s1); }
.mod-card .mod-n { font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; color: var(--dim); display: flex; justify-content: space-between; align-items: center; }
.mod-card .mod-icon { width: 54px; height: 54px; }
.mod-card .mod-icon svg { width: 100%; height: 100%; }
.mod-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.8rem; color: var(--hi); line-height: 1.05; letter-spacing: -.01em; }
.mod-card p { font-size: .9rem; color: var(--mid); line-height: 1.7; font-weight: 300; flex: 1; }
.mod-card .mod-go { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--hi); display: flex; align-items: center; gap: 8px; }
.mod-card .mod-go::after { content: '→'; font-family: var(--sans); transition: transform .3s; }
.mod-card:hover .mod-go::after { transform: translateX(6px); }
.mod-card::before { content: ''; position: absolute; left: 0; top: 0; height: 2px; width: 0; background: var(--red); transition: width .5s var(--ease); }
.mod-card:hover::before { width: 100%; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 32px; } }
.step-n { font-variant-numeric: lining-nums; font-family: var(--serif); font-style: italic; font-size: 4.2rem; font-weight: 300; color: var(--red); line-height: 1; }
.step h3 { font-family: var(--serif); font-weight: 600; font-size: 1.7rem; color: var(--hi); margin: 10px 0 8px; }
.step p { color: var(--mid); font-weight: 300; line-height: 1.75; font-size: .95rem; }

.band { background: var(--s1); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.pat-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 24px; align-items: stretch; }
@media (max-width: 960px) { .pat-grid { grid-template-columns: 1fr; } }
.pat-card { background: var(--bg); border: 1px solid var(--border); padding: 30px; display: flex; flex-direction: column; gap: 12px; }
.pat-card h3 { font-family: var(--serif); font-weight: 600; font-size: 1.6rem; color: var(--hi); line-height: 1.1; }
.pat-card p { color: var(--mid); font-weight: 300; font-size: .93rem; line-height: 1.7; flex: 1; }

.author { display: grid; grid-template-columns: 360px 1fr; gap: 64px; align-items: center; }
@media (max-width: 860px) { .author { grid-template-columns: 1fr; gap: 32px; } }
.author-photo { position: relative; }
.author-photo img { width: 100%; aspect-ratio: 4/5; object-fit: cover; filter: grayscale(.15) contrast(1.02); border: 1px solid var(--border); }
.author-photo::after { content: ''; position: absolute; inset: 14px -14px -14px 14px; border: 1px solid var(--red); z-index: -1; opacity: .5; }
.author h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem, 4vw, 3.4rem); color: var(--hi); line-height: 1.05; }
.author h2 em { color: var(--red); }
.author p { color: var(--mid); font-weight: 300; line-height: 1.85; margin-top: 18px; max-width: 600px; }

.cta-final { text-align: center; padding: 120px 0; position: relative; overflow: hidden; }
.cta-final h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 6vw, 5.4rem); color: var(--hi); line-height: 1; letter-spacing: -.02em; }
.cta-final h2 em { color: var(--red); }
.cta-final p { color: var(--mid); font-weight: 300; margin: 22px auto 36px; max-width: 520px; line-height: 1.8; }
.cta-final .hero-actions { justify-content: center; margin-bottom: 0; }

.next-mod { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; text-decoration: none; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 28px 0; }
.next-mod .next-title { font-family: var(--serif); font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--hi); font-weight: 400; }
.next-mod:hover .next-title { color: var(--red); }
@media (max-width: 700px) { .axis-grid { grid-template-columns: 1fr !important; } }
.split-side { display: grid; grid-template-columns: 1fr 220px; gap: 24px; align-items: center; }
@media (max-width: 640px) { .split-side { grid-template-columns: 1fr; } .split-side svg { max-width: 200px; margin: 0 auto; } }
.ag-table input, .ag-table select { width: 100%; min-width: 70px; padding: 7px 8px; border: 1px solid var(--border2); border-radius: var(--r); background: #fff; font-size: .86rem; }
.ag-table td { vertical-align: middle; }
.seg button i { flex-shrink: 0; }
.bar-row { display: grid; grid-template-columns: 210px 1fr 120px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: .84rem; }
.bar-row.cur .bar-label { color: var(--hi); font-weight: 600; }
.bar-row.cur .bar-label::after { content: ' · actual'; color: var(--red); font-weight: 500; }
.bar-label { color: var(--mid); }
.bar-track { position: relative; height: 14px; background: var(--s1); border-radius: 2px; }
.bar-fill { height: 100%; border-radius: 2px; transition: width .4s var(--ease); }
.bar-fill.ok { background: var(--ok); } .bar-fill.no { background: var(--s3); }
.bar-goal { position: absolute; top: -5px; bottom: -5px; width: 2px; background: var(--red); }
.bar-val { font-family: var(--mono); font-size: .74rem; color: var(--text); text-align: right; }
@media (max-width: 640px) { .bar-row { grid-template-columns: 1fr 90px; } .bar-track { grid-column: 1 / -1; grid-row: 2; } }
.case-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); }
@media (max-width: 900px) { .case-grid { grid-template-columns: 1fr; } }
.case-card { background: var(--bg); border: none; text-align: left; padding: 30px 28px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: background .3s; min-height: 220px; position: relative; }
.case-card:hover { background: var(--s1); }
.case-card .case-title { font-family: var(--serif); font-size: 1.8rem; font-weight: 600; color: var(--hi); line-height: 1.1; flex: 1; }
.case-card .case-meta { font-size: .86rem; color: var(--mid); }
.case-card .mod-go { font-family: var(--mono); font-size: .62rem; letter-spacing: .16em; text-transform: uppercase; color: var(--hi); }
.case-card .mod-go::after { content: ' →'; }
.sc-text { font-size: 1.02rem !important; color: var(--text) !important; line-height: 1.75 !important; max-width: 820px; }
.panel p.mono-tag, .panel span.mono-tag { font-size: .62rem !important; color: var(--dim) !important; line-height: 1.4 !important; letter-spacing: .16em; }
.calc-layout { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .calc-layout { grid-template-columns: 1fr; } }
.calc-side { position: sticky; top: 96px; }
@media (max-width: 900px) { .calc-side { position: static; } }
#calc-nav { display: grid; gap: 6px; }
.calc-link { padding: 9px 12px; font-size: .86rem; }
.calc-link[aria-current="true"] { border-color: var(--hi); background: var(--bg); box-shadow: inset 3px 0 0 var(--red); }
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 760px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-out { background: var(--s1); border: 1px solid var(--border); padding: 20px; border-radius: var(--r); position: sticky; top: 96px; }
.big small { white-space: nowrap; }
/* Las columnas de las grillas pueden achicarse; los lienzos anchos se desplazan dentro de .scroll-x */
.workbench > *, .calc-layout > *, .calc-grid > *, .intro-grid > *, .pat-grid > *, .split-side > *, .row2 > *, .row3 > * { min-width: 0; }
#sg-heart { max-width: 340px; }
@media (max-width: 980px) { .wb-side { display: contents; } .wb-late { order: 3; margin-top: 0 !important; } }

/* ═══════════ MODO EMBEBIDO (apps dentro de los escenarios) ═══════════ */
html.embed .nav, html.embed .app-head, html.embed .footer, html.embed .next-wrap, html.embed .tabs, html.embed .disclaimer, html.embed #scroll-prog, html.embed .sr-only { display: none !important; }
html.embed body { background: transparent; }
html.embed body::after { display: none; }
html.embed .app-page { padding-top: 0; }
html.embed .app-body { padding: 2px 0 4px; }
html.embed .container { padding: 0 2px; max-width: none; }
.embed-hidden { display: none !important; }
.tool-box { border: 1px solid var(--border2); border-radius: var(--r); margin: 16px 0; background: var(--bg); overflow: hidden; }
.tool-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--s1); border-bottom: 1px solid var(--border); }
.tool-bar .mono-tag { color: var(--red) !important; }
.tool-open { font-size: .78rem; color: var(--mid); text-decoration: none; border-bottom: 1px solid var(--border2); }
.tool-open:hover { color: var(--red); }
.tool-hint { font-size: .86rem !important; color: var(--mid) !important; padding: 10px 14px 0; margin: 0; }
.tool-hint::before { content: '→ '; color: var(--red); }
.embed-frame { display: block; width: 100%; border: 0; height: 520px; background: transparent; padding: 12px; }
.case-apps { display: flex; gap: 6px; flex-wrap: wrap; }
.case-static { cursor: default; background: var(--s1); }
.case-static:hover { background: var(--s1); }
.case-static .chip { text-decoration: none; }
.case-static .chip:hover { color: var(--red); border-color: var(--red); }
.workbench:has(> .embed-hidden) { grid-template-columns: 1fr; }
@media (max-width: 520px) { #sc-play > .panel { padding: 14px; } .embed-frame { padding: 4px; } .tool-bar { padding: 8px 10px; } }

/* ═════════ Versión simple (v2): portada, quiz de repetición, acceso ═════════ */
.cta-ok { display: none; }
html[data-access] .cta-lock { display: none; }
html[data-access] .cta-ok { display: inline; color: var(--ok); }
html[data-access] .lock { display: none; }
.lock { color: var(--dim); flex: none; }
.tag-free { font-family: var(--mono); font-style: normal; font-size: .56rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ok); border: 1px solid rgba(63,111,87,.35); background: var(--ok-soft); padding: 2px 7px; border-radius: 2px; flex: none; }
.btn-free { font-family: var(--mono); font-size: .56rem; letter-spacing: .14em; background: rgba(255,255,255,.2); padding: 2px 7px; border-radius: 2px; }

/* Barra de navegación simple: en escritorio, enlaces y acceso; en el celular, pestañas abajo */
@media (max-width: 960px) {
  .nav-links { display: flex; position: static; flex-direction: row; align-items: center; gap: 22px; background: none; border: 0; padding: 0; }
  .nav-links li { width: auto; border: 0; }
  .nav-links a { display: inline; padding: 0 0 2px; font-size: .72rem; }
  .nav-links a::after { display: block; }
  .nav-cta { display: inline-block; }
}
.tabbar { display: none; }
@media (max-width: 720px) {
  .nav, .nav-inner { height: 60px; }
  .nav-logo img { height: 40px; }
  .nav-links { display: none; }
  .nav-cta { padding: 7px 12px; font-size: .62rem; }
  .app-page, main { padding-top: 60px; }
  body { padding-bottom: 68px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; background: rgba(250,249,246,.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { flex: 1; display: grid; justify-items: center; gap: 3px; padding: 9px 4px 8px; text-decoration: none; color: var(--dim); font-family: var(--mono); font-size: .56rem; letter-spacing: .12em; text-transform: uppercase; }
  .tabbar a[aria-current="page"] { color: var(--red); }
}
html.embed .tabbar { display: none !important; }

/* Portada */
.home-hero { padding: 132px 0 72px; position: relative; overflow: hidden; }
.home-hero::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 40px 40px; opacity: .4; pointer-events: none; mask-image: linear-gradient(180deg, #000 30%, transparent); -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent); }
.home-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 72px; align-items: center; }
.home-tag { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.home-tag i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 10px var(--red); animation: blink 2.4s ease-in-out infinite; }
.home-h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(3.4rem, 7.2vw, 6.6rem); line-height: .95; letter-spacing: -.025em; color: var(--hi); }
.home-h1 em { color: var(--red); font-weight: 400; }
.home-sub { margin-top: 24px; color: var(--mid); font-weight: 300; font-size: 1.08rem; line-height: 1.7; max-width: 520px; }
.home-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 36px; }
.library { border-top: 1px solid var(--border2); background: var(--bg); position: relative; }
.lib-row { padding: 22px 4px; border-bottom: 1px solid var(--border); }
.lib-row h3 { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; color: var(--hi); line-height: 1.1; margin-bottom: 10px; }
.lib-links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.lib-links a { display: inline-flex; align-items: center; gap: 8px; color: var(--mid); text-decoration: none; font-size: .92rem; padding: 3px 0; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
.lib-links a:hover { color: var(--red); border-color: var(--red); }
.home-h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.2rem, 4.2vw, 3.4rem); line-height: 1.05; color: var(--hi); letter-spacing: -.015em; margin-top: 10px; }
.home-h2 em { color: var(--red); }
.home-method { padding: 72px 0; border-top: 1px solid var(--border); background: var(--s1); }
.method { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 40px; border-top: 1px solid var(--border2); }
.method li { padding: 24px 28px 8px 0; }
.method li + li { padding-left: 28px; border-left: 1px solid var(--border); }
.method b { font-family: var(--mono); font-size: .66rem; letter-spacing: .16em; color: var(--red); font-weight: 500; }
.method h3 { font-family: var(--serif); font-weight: 500; font-size: 1.6rem; color: var(--hi); margin: 8px 0 6px; }
.method p { color: var(--mid); font-size: .94rem; line-height: 1.7; }
.home-access { padding: 64px 0; border-top: 1px solid var(--border); }
.home-access-in { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.home-pt { border-top: 1px solid var(--border); background: var(--s1); }
.home-pt-link { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 0; text-decoration: none; color: var(--mid); font-size: .95rem; flex-wrap: wrap; }
.home-pt-link:hover { color: var(--red); }
@media (max-width: 980px) { .home-grid { grid-template-columns: 1fr; gap: 40px; } .home-hero { padding: 104px 0 56px; } .method { grid-template-columns: 1fr; } .method li, .method li + li { padding: 20px 0; border-left: 0; border-bottom: 1px solid var(--border); } }

/* Encabezado de módulo más simple */
.app-head .container { padding-top: 38px; padding-bottom: 26px; }
.app-title { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
.app-sub { font-size: .98rem; margin-top: 12px; }

/* Pie simple */
.footer { padding: 40px 0 28px; }
.footer-simple { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; flex-wrap: wrap; }
.footer-links { list-style: none; display: flex; gap: 8px 24px; flex-wrap: wrap; }
.footer .footer-tagline { margin-top: 8px; font-size: 1rem; }
.footer .footer-note { margin-top: 24px; max-width: 560px; }
.footer-bottom { margin-top: 20px; padding-top: 16px; }

/* Practicar */
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding-top: 28px; }
.pk-card { display: grid; gap: 10px; align-content: start; padding: 24px; border: 1px solid var(--border); background: var(--bg); text-decoration: none; transition: border-color .25s, transform .25s; }
.pk-card:hover { border-color: var(--red); transform: translateY(-3px); }
.pk-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pk-card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; color: var(--hi); line-height: 1.1; }
.pk-card p { color: var(--mid); font-size: .94rem; line-height: 1.65; }

/* Quiz de repetición */
.qz-body { padding-top: 0; }
.qz-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.qz-top .tabs { margin-bottom: 0; border-bottom: 0; }
.qz-set { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; }
.qz-set label { font-family: var(--mono); font-size: .6rem; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); }
.qz-set select { font: inherit; font-size: .86rem; padding: 7px 28px 7px 10px; border: 1px solid var(--border2); background: var(--bg); border-radius: var(--r); color: var(--text); }
.qz-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin: 6px 0 18px; }
.qz-rounds { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; }
.qz-rounds li { font-family: var(--mono); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); padding: 5px 10px; border: 1px solid var(--border); border-radius: 2px; }
.qz-rounds li b { color: var(--dim); font-weight: 500; margin-right: 4px; }
.qz-rounds li.on { color: var(--red); border-color: rgba(196,18,48,.4); background: var(--red-soft); }
.qz-rounds li.on b { color: var(--red); }
.qz-mastery { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; color: var(--dim); text-transform: uppercase; }
.qz-mastery b { color: var(--ok); font-weight: 600; }
.qz-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.qz-grid > * { min-width: 0; }
@media (max-width: 980px) { .qz-grid { grid-template-columns: 1fr; } }
.qz-strip { position: relative; min-width: 760px; }
.qz-strip .ecg-canvas { min-width: 0; }
.qz-window { position: absolute; top: 0; bottom: 0; background: var(--red-soft); border-left: 1px dashed rgba(196,18,48,.55); border-right: 1px dashed rgba(196,18,48,.55); pointer-events: none; transition: left .15s var(--ease); }
.qz-detail-cv { display: block; max-width: 100%; }
.qz-side .note { margin-top: 10px; }
.qz-prompt { font-family: var(--mono); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin: 24px 0 12px; }
.qz-answer { min-height: 70px; }
.qz-answer .optlist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .qz-answer .optlist { grid-template-columns: 1fr; } }
.opt { display: flex; align-items: center; gap: 12px; }
.opt-k { font-family: var(--mono); font-size: .62rem; color: var(--dim); border: 1px solid var(--border2); border-radius: 2px; width: 20px; height: 20px; display: inline-grid; place-items: center; flex: none; }
.qz-clue { font-family: var(--mono); font-size: clamp(1rem, 2.4vw, 1.4rem); letter-spacing: .14em; color: var(--mid); margin-bottom: 16px; word-break: break-word; }
.qz-label { margin-bottom: 4px; }
.qz-input { position: relative; max-width: 640px; border-bottom: 1px solid var(--hi); }
.qz-input input, .qz-ghost { font-family: var(--mono); font-size: clamp(1.15rem, 3vw, 1.7rem); padding: 8px 0; letter-spacing: 0; line-height: 1.3; }
.qz-input input { position: relative; width: 100%; background: transparent; border: 0; outline: none; color: var(--hi); }
.qz-input input.ok { color: var(--ok); } .qz-input input.bad { color: var(--red); }
.qz-input:focus-within { border-bottom-color: var(--red); }
.qz-ghost { position: absolute; inset: 0; pointer-events: none; white-space: pre; overflow: hidden; }
.qz-ghost .ty { color: transparent; } .qz-ghost .rest { color: #b9b4aa; }
.qz-hint-line { margin-top: 8px; }
.qz-why { border: 1px solid var(--border); border-left: 3px solid var(--gold); background: var(--s1); padding: 18px 20px; margin-top: 14px; }
.qz-why .panel-title { color: var(--hi); margin-bottom: 8px; }
.qz-why ul { padding-left: 18px; display: grid; gap: 4px; font-size: .92rem; color: var(--mid); line-height: 1.65; }
.qz-ex { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; margin-top: 18px; align-items: start; }
@media (max-width: 860px) { .qz-ex { grid-template-columns: 1fr; } }
.qz-ex-list { display: grid; gap: 2px; border-top: 1px solid var(--border); max-height: 560px; overflow: auto; }
@media (max-width: 860px) { .qz-ex-list { max-height: 220px; } }
.qz-ex-g { padding: 14px 0 6px; }
.qz-ex-b { text-align: left; background: none; border: 0; border-bottom: 1px solid var(--border); padding: 9px 4px; font: inherit; font-size: .9rem; color: var(--mid); cursor: pointer; }
.qz-ex-b:hover { color: var(--red); }
.qz-ex-b[aria-pressed="true"] { color: var(--hi); font-weight: 600; box-shadow: inset 3px 0 0 var(--red); padding-left: 12px; }
.qz-ex-view .panel { margin-top: 16px; }

/* Acceso */
.acc { padding-top: 12px; }
.acc-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 56px; align-items: start; padding-top: 56px; }
@media (max-width: 900px) { .acc-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 28px; } }
.acc-list { list-style: none; margin-top: 28px; border-top: 1px solid var(--border2); }
.acc-list li { padding: 16px 0; border-bottom: 1px solid var(--border); display: grid; gap: 2px; }
.acc-list strong { color: var(--hi); font-weight: 600; font-size: .98rem; }
.acc-list span { color: var(--dim); font-size: .88rem; }
.acc-free { margin-top: 20px; font-size: .9rem; color: var(--mid); }
.acc-free a { color: var(--red); }
.acc-card { border: 1px solid var(--border2); background: var(--bg); padding: 28px; position: sticky; top: 96px; }
.acc-price { font-family: var(--serif); font-size: 2.6rem; font-weight: 500; color: var(--hi); line-height: 1.1; margin-top: 10px; }
.acc-once { color: var(--dim); font-size: .86rem; margin: 8px 0 20px; }
.acc-buy { width: 100%; justify-content: center; }
.acc-buy[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: auto; transform: none; }
.acc-sep { height: 1px; background: var(--border); margin: 24px 0 18px; }
.acc-code { display: flex; gap: 8px; margin-top: 8px; }
.acc-code input { flex: 1; min-width: 0; font-family: var(--mono); font-size: .9rem; padding: 11px 12px; border: 1px solid var(--border2); background: var(--bg); border-radius: var(--r); text-transform: uppercase; }
.acc-code input:focus { outline: none; border-color: var(--red); }
.acc-msg { min-height: 1.4em; margin-top: 8px; font-size: .84rem; color: var(--ok); }
.acc-msg.bad { color: var(--red); }
.acc-link { background: none; border: 0; margin-top: 16px; font: inherit; font-size: .82rem; color: var(--dim); text-decoration: underline; cursor: pointer; }
.acc-link:hover { color: var(--red); }

.app-head.compact .container { padding-top: 26px; padding-bottom: 14px; }
.app-head.compact .crumbs { margin-bottom: 8px; }
.app-head.compact .app-title { font-size: clamp(2rem, 3.6vw, 2.8rem); }
.qz-top .tabs { margin-top: 8px; }
.qz-meta { margin-bottom: 14px; }

.acc-grid > * { min-width: 0; }
.acc-copy .app-title { margin-top: 8px; }
.acc { padding-top: 0; }

/* Ojo de buey y curvas dentro del quiz */
.qz-be { max-width: 420px; margin: 0 auto; padding: 14px 14px 6px; }
.qz-be svg { display: block; width: 100%; height: auto; }
.sg-q { display: block; }
@media (max-width: 720px) { .nav-cta { display: none; } }

/* Sin panel de detalle: la pregunta ocupa una sola columna, sin hueco a la derecha */
.qz-noside #qz-practice { max-width: 900px; }
.qz-noside .qz-grid { grid-template-columns: minmax(0, 1fr); }
.qz-noside .qz-top { max-width: 900px; }
.qz-noside .qz-top .qz-set { margin-left: auto; }
