/* Layout: una columna de lectura (~68ch) bajo una barra fija con las 6 lecciones; cada lección = cabecera numerada + texto + regla destacada + capturas + test. Oscuro primero, como el gráfico. */
:root {
  --bg: #0e1318;
  --surface: #151c24;
  --surface-2: #1b2430;
  --line: #263241;
  --fg: #e5e9ef;
  --muted: #8d99aa;
  --accent: #f2a43a;
  --accent-ink: #1a1206;
  --up: #26a69a;
  --down: #ef5350;
  --up-soft: rgba(38,166,154,.14);
  --down-soft: rgba(239,83,80,.14);
  --accent-soft: rgba(242,164,58,.13);
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f6f8; --surface: #ffffff; --surface-2: #eef1f5; --line: #d9dee6;
    --fg: #121820; --muted: #566273; --accent: #b8660a; --accent-ink: #ffffff;
    --up: #0b8276; --down: #cf3532;
    --up-soft: rgba(11,130,118,.10); --down-soft: rgba(207,53,50,.09); --accent-soft: rgba(184,102,10,.10);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #eef1f5; --line: #d9dee6;
  --fg: #121820; --muted: #566273; --accent: #b8660a; --accent-ink: #ffffff;
  --up: #0b8276; --down: #cf3532;
  --up-soft: rgba(11,130,118,.10); --down-soft: rgba(207,53,50,.09); --accent-soft: rgba(184,102,10,.10);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body {
  background: var(--bg); color: var(--fg);
  font: 17px/1.65 var(--f-body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--f-display); line-height: 1.1; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.up { color: var(--up); } .down { color: var(--down); }

/* Barra superior */
.bar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar-in { max-width: 1080px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 18px; }
.brand { font-family: var(--f-display); font-weight: 800; font-size: 18px; text-decoration: none; color: var(--fg); white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.brand svg { flex: none; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.chips::-webkit-scrollbar { display: none; }
.chips a {
  flex: none; text-decoration: none; color: var(--muted); font-size: 14px;
  padding: 6px 11px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
}
.chips a b { font-family: var(--f-mono); font-weight: 500; color: var(--accent); margin-right: 5px; font-size: 12px; }
.chips a:hover { color: var(--fg); border-color: var(--line); }
.chips a.on { color: var(--fg); background: var(--surface-2); border-color: var(--line); }
/* Flechas y menú de la barra (con ratón no se puede arrastrar la barra de lado) */
.chips-wrap { position: relative; display: flex; min-width: 0; flex: 1; }
.chips-wrap .chips { flex: 1; scroll-behavior: smooth; }
.chip-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-size: 18px; line-height: 1; cursor: pointer; box-shadow: 0 2px 10px rgba(0,0,0,.18); display: grid; place-items: center; padding: 0 0 2px; }
.chip-arrow.left { left: -6px; } .chip-arrow.right { right: -6px; }
.chip-arrow:hover { border-color: var(--accent); }
.menu-btn { flex: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; cursor: pointer; white-space: nowrap; }
.menu-btn:hover, .menu-btn[aria-expanded="true"] { border-color: var(--accent); }
.menu-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: 0 14px 30px rgba(0,0,0,.18); max-height: calc(100vh - 70px); overflow-y: auto; }
.menu-in { max-width: 1080px; margin: 0 auto; padding: 18px 16px 22px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px 24px; }
.menu-in h4 { margin: 0 0 6px; font-family: var(--f-mono); font-weight: 500; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.menu-in a { display: block; padding: 5px 0; text-decoration: none; color: var(--fg); font-size: 15px; }
.menu-in a b { font-family: var(--f-mono); font-weight: 500; font-size: 12px; color: var(--accent); margin-right: 6px; }
.menu-in a:hover { color: var(--accent); }
.menu-in a.on { color: var(--accent); font-weight: 600; }
@media (max-width: 760px) { .menu-in { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .menu-btn span { display: none; } }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 16px; }
.col { max-width: 720px; }

/* Portada */
.hero { padding-block: 56px 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.eyebrow { font-family: var(--f-mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(40px, 7vw, 72px); font-weight: 800; letter-spacing: -.02em; margin-top: 14px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { color: var(--muted); font-size: 19px; margin-top: 18px; max-width: 34ch; }
.hero-chart { width: 100%; height: auto; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 24px; font-size: 14px; color: var(--muted); }
.hero-meta span::before { content: "▸ "; color: var(--accent); }

/* Índice */
.index { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; margin-bottom: 24px; }
.index a { background: var(--surface); padding: 20px; text-decoration: none; color: var(--fg); display: grid; gap: 6px; align-content: start; transition: background .15s; }
.index a:hover { background: var(--surface-2); }
.index .n { font-family: var(--f-mono); font-size: 13px; color: var(--accent); }
.index h3 { font-size: 20px; font-weight: 700; }
.index p { font-size: 14.5px; color: var(--muted); line-height: 1.5; }

/* Lecciones */
.lesson { padding-block: 64px; border-top: 1px solid var(--line); }
.lesson-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 22px; align-items: end; margin-bottom: 28px; }
.big-n { font-family: var(--f-display); font-weight: 800; font-size: 88px; line-height: .8; color: transparent; -webkit-text-stroke: 1.5px var(--accent); grid-row: span 2; }
.lesson h2 { font-size: clamp(30px, 4.4vw, 46px); font-weight: 800; letter-spacing: -.015em; }
.lesson .sub { color: var(--muted); font-size: 16px; }
.prose { display: grid; gap: 16px; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: 6px; }
.prose li::marker { color: var(--accent); }
.prose h3 { font-size: 22px; font-weight: 700; margin-top: 18px; }

.rule {
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 12px; padding: 16px 18px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: start;
}
.rule .tag { font-family: var(--f-mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; background: var(--accent); color: var(--accent-ink); padding: 3px 7px; border-radius: 5px; margin-top: 3px; }
.rule p { font-weight: 600; }

/* Capturas */
figure { margin: 8px 0 0; }
.shot { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #131722; cursor: zoom-in; }
.shot img { display: block; width: 100%; height: auto; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
figcaption b { color: var(--fg); font-weight: 600; }
.shots-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }

/* Diagramas */
.diag { width: 100%; height: auto; display: block; }
.diag .ln { fill: none; stroke: var(--fg); stroke-width: 2.2; stroke-linejoin: round; }
.diag .ln-a { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linejoin: round; }
.diag .dash { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 5 5; fill: none; }
.diag .t-up { fill: var(--up); } .diag .t-dn { fill: var(--down); }
.diag text { font-family: var(--f-mono); font-size: 12px; fill: var(--muted); }
.diag text.hi { fill: var(--fg); }
.diag text.ac { fill: var(--accent); }
.trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.trio > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; }
.trio h3 { font-size: 17px; margin: 0; }
.trio p { font-size: 14px; color: var(--muted); line-height: 1.5; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }

/* Escalera Fibonacci */
.ladder { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ladder > div { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 11px 16px; background: var(--surface); border-top: 1px solid var(--line); }
.ladder > div:first-child { border-top: 0; }
.ladder .r { font-family: var(--f-mono); font-size: 18px; font-weight: 500; }
.ladder .d { font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.pill { font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.pill.sr { background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); }
.pill.tp { background: var(--up-soft); color: var(--up); }
.pill.lp { background: var(--accent-soft); color: var(--accent); }

/* Matriz medias */
.matrix { display: grid; grid-template-columns: 150px repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.matrix > div { background: var(--surface); padding: 14px; font-size: 15px; line-height: 1.45; }
.matrix .h { background: var(--surface-2); font-family: var(--f-mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; }
.matrix .ok { box-shadow: inset 3px 0 0 var(--up); }
.matrix .bad { box-shadow: inset 3px 0 0 var(--down); }
.matrix .meh { box-shadow: inset 3px 0 0 var(--muted); }
.matrix b { display: block; font-weight: 600; margin-bottom: 3px; }
.matrix .ok b { color: var(--up); } .matrix .bad b { color: var(--down); }

/* Ciclo acumulación y objetivos */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 14.5px; line-height: 1.5; color: var(--muted); }
.steps li::before { content: "Paso " counter(s); display: block; font-family: var(--f-mono); font-size: 12px; color: var(--accent); margin-bottom: 4px; }
.steps li strong { color: var(--fg); display: block; font-size: 16px; margin-bottom: 2px; }
.targets { display: grid; gap: 10px; }
.targets > div { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 14px; align-items: center; }
.targets .k { font-family: var(--f-mono); font-size: 13px; text-align: center; padding: 6px 0; border-radius: 8px; background: var(--up-soft); color: var(--up); }
.targets .k.req { background: var(--surface-2); color: var(--fg); border: 1px solid var(--line); }

/* Opciones */
.opts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.opt { border-radius: 12px; padding: 18px; border: 1px solid var(--line); background: var(--surface); display: grid; gap: 10px; align-content: start; }
.opt h3 { font-size: 22px; margin: 0; }
.opt.call h3 { color: var(--up); } .opt.put h3 { color: var(--down); }
.opt .what { font-size: 15px; }
.opt dl { margin: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; font-size: 14.5px; }
.opt dt { font-family: var(--f-mono); font-size: 12px; color: var(--muted); padding-top: 2px; }
.opt dd { margin: 0; }
.timeline { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.timeline > div { padding: 16px; background: var(--surface); border-left: 1px solid var(--line); display: grid; gap: 6px; align-content: start; }
.timeline > div:first-child { border-left: 0; }
.timeline .when { font-family: var(--f-mono); font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.timeline h3 { font-size: 18px; margin: 0; }
.timeline p { font-size: 14.5px; color: var(--muted); line-height: 1.5; }

/* Test */
.quiz { margin-top: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 22px; }
.quiz-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.quiz-h h3 { font-size: 20px; }
.quiz-h span { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.q p { font-weight: 600; margin-bottom: 10px; }
.q .ans { display: grid; gap: 8px; }
.q button {
  font: inherit; font-size: 15px; text-align: left; color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.q button:hover:not(:disabled) { border-color: var(--accent); }
.q button:disabled { cursor: default; }
.q button.right { border-color: var(--up); background: var(--up-soft); }
.q button.wrong { border-color: var(--down); background: var(--down-soft); }
.q .why { font-size: 14.5px; color: var(--muted); margin-top: 10px; }

/* Cierre */
.foot { border-top: 1px solid var(--line); padding-block: 40px 56px; display: grid; gap: 14px; color: var(--muted); font-size: 14.5px; }
.foot .sig { font-family: var(--f-display); font-size: 26px; font-weight: 700; color: var(--fg); }
.theme-btn { font: inherit; font-size: 13px; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; cursor: pointer; justify-self: start; }

/* Herramientas */
.tools-band { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 14px; }
.tools-band.last { margin-bottom: 72px; }
.band-label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.tools-band.four { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tools-band.four a { grid-template-columns: minmax(0, 1fr); }
.tools-band.four a .ico { grid-row: auto; }
@media (max-width: 1100px) { .tools-band.four { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px) { .tools-band.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tools-band.four { grid-template-columns: minmax(0, 1fr); } }
.tools-band a { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: center; text-decoration: none; color: var(--fg); padding: 16px 18px; border: 1px dashed color-mix(in srgb, var(--accent) 55%, transparent); border-radius: 14px; background: var(--accent-soft); }
.tools-band a:hover { border-style: solid; }
.tools-band .ico { grid-row: span 2; font-family: var(--f-mono); font-size: 20px; color: var(--accent); width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.tools-band b { font-family: var(--f-display); font-size: 18px; }
.tools-band span { font-size: 14px; color: var(--muted); }
.tool { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 18px; }
.tool-h { display: grid; gap: 4px; }
.tool-h h3 { font-size: 24px; }
.tool-h p { color: var(--muted); font-size: 15px; }
.seg { display: inline-grid; grid-template-columns: repeat(2, minmax(0, 1fr)); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { font: inherit; font-size: 14.5px; border: 0; border-radius: 8px; padding: 8px 12px; background: none; color: var(--muted); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; gap: 5px; min-width: 0; }
.field label { font-family: var(--f-mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.field input { font: 500 17px var(--f-mono); font-variant-numeric: tabular-nums; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; width: 100%; }
.field input:focus { outline: none; border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: var(--down); }
.fib-out { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 18px; align-items: start; }
.fib-tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.fib-tbl th { text-align: left; font-family: var(--f-mono); font-weight: 400; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0 8px 8px 0; }
.fib-tbl td { padding: 9px 8px 9px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.fib-tbl .r { font-family: var(--f-mono); color: var(--muted); }
.fib-tbl .p { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; }
.fib-tbl .dist { font-family: var(--f-mono); font-size: 13px; white-space: nowrap; text-align: right; padding-right: 0; }
.fib-tbl tr.near td { background: var(--accent-soft); }
.fib-scale { width: 100%; height: auto; }
.fib-scale text { font-family: var(--f-mono); font-size: 11px; fill: var(--muted); }
.fib-msg { font-size: 14.5px; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.btn { font: inherit; font-size: 14.5px; font-weight: 600; color: var(--accent-ink); background: var(--accent); border: 0; border-radius: 9px; padding: 9px 16px; cursor: pointer; }
.btn.ghost { color: var(--fg); background: none; border: 1px solid var(--line); font-weight: 400; }
.btn-note { font-size: 13.5px; color: var(--muted); }
.ck-group { display: grid; gap: 8px; }
.ck-group h4 { margin: 0; font-family: var(--f-mono); font-weight: 500; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ck { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); cursor: pointer; font-size: 15.5px; line-height: 1.4; }
.ck input { appearance: none; width: 22px; height: 22px; margin: 0; border: 1.5px solid var(--muted); border-radius: 6px; display: grid; place-items: center; cursor: pointer; }
.ck input::after { content: ""; width: 10px; height: 6px; border-left: 2.5px solid var(--accent-ink); border-bottom: 2.5px solid var(--accent-ink); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.ck input:checked { background: var(--accent); border-color: var(--accent); }
.ck input:checked::after { opacity: 1; }
.ck:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
.ck.warn input:checked { background: var(--down); border-color: var(--down); }
.ck.warn:has(input:checked) { border-color: color-mix(in srgb, var(--down) 50%, var(--line)); }
.ck a { font-family: var(--f-mono); font-size: 12px; color: var(--muted); text-decoration: none; padding: 2px 7px; border: 1px solid var(--line); border-radius: 6px; white-space: nowrap; }
.ck a:hover { color: var(--accent); border-color: var(--accent); }
.verdict { border-radius: 12px; padding: 16px 18px; display: grid; gap: 6px; border: 1px solid var(--line); background: var(--surface-2); }
.verdict .meter { display: flex; gap: 6px; }
.verdict .meter i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.verdict .meter i.on { background: var(--accent); }
.verdict.good .meter i.on { background: var(--up); }
.verdict strong { font-family: var(--f-display); font-size: 20px; }
.verdict.good strong { color: var(--up); }
.verdict p { font-size: 14.5px; color: var(--muted); }

/* Semáforo BTC */
.live { margin: -24px 0 40px; display: grid; gap: 12px; }
.live-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.live-h h2 { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--up); box-shadow: 0 0 0 4px var(--up-soft); }
.live-dot.stale { background: var(--muted); box-shadow: 0 0 0 4px var(--surface-2); }
.live-h .price { font-family: var(--f-mono); font-size: 15px; color: var(--muted); }
.live-h .price b { color: var(--fg); font-size: 20px; font-weight: 500; }
.lights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.light { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; align-content: start; position: relative; overflow: hidden; }
.light::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--muted); }
.light.ok::before { background: var(--up); }
.light.bad::before { background: var(--down); }
.light.att::before { background: var(--accent); }
.light .lbl { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.light .lbl a { color: var(--muted); text-decoration: none; }
.light .lbl a:hover { color: var(--accent); }
.light .state { font-family: var(--f-display); font-size: 22px; font-weight: 800; line-height: 1.1; }
.light.ok .state { color: var(--up); } .light.bad .state { color: var(--down); } .light.att .state { color: var(--accent); }
.light p { font-size: 14px; color: var(--muted); line-height: 1.45; }
.light p b { color: var(--fg); font-weight: 600; font-family: var(--f-mono); font-size: 13.5px; }
.countdown { font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 500; }
.live-foot { font-size: 13px; color: var(--muted); }

@media (max-width: 760px) { .lights { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .lights { grid-template-columns: minmax(0, 1fr); } .live { margin-top: -12px; } }

/* Tips */
.tips { list-style: none; margin: 0; padding: 0; display: grid; }
.tip { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.tip:last-child { border-bottom: 1px solid var(--line); }
.tip-n { font-family: var(--f-display); font-weight: 800; font-size: 40px; line-height: 1; color: var(--accent); grid-row: span 3; font-variant-numeric: tabular-nums; }
.tip-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tip-tags .pill.risk { background: var(--down-soft); color: var(--down); }
.tip h3 { font-size: 21px; font-weight: 700; margin: 4px 0 6px; }
.tip-body { display: grid; gap: 10px; color: var(--fg); }
.tip-body p { font-size: 16px; }
.tip-body .quiet { color: var(--muted); font-size: 15px; }
.lev { border: 1px solid var(--line); border-radius: 10px; overflow-x: auto; }
.lev table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 420px; }
.lev th, .lev td { padding: 9px 12px; text-align: left; border-top: 1px solid var(--line); }
.lev th { font-family: var(--f-mono); font-weight: 400; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-top: 0; background: var(--surface-2); }
.lev td.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.warn-line { font-size: 15px; padding: 12px 14px; border-radius: 10px; background: var(--down-soft); border: 1px solid color-mix(in srgb, var(--down) 35%, transparent); }
@media (max-width: 560px) {
  .tip { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; }
  .tip-n { font-size: 28px; }
}

/* Calculadora de posición */
.fields-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pos-res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pos-res > div { background: var(--bg); padding: 12px 14px; display: grid; gap: 2px; }
.pos-res span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.pos-res b { font-family: var(--f-mono); font-weight: 500; font-size: 18px; font-variant-numeric: tabular-nums; }
.pos-res small { font-size: 13px; color: var(--muted); }
.pos-res .liq b { color: var(--down); }
.pos-res .win b { color: var(--up); }
.ruler { position: relative; height: 54px; margin: 6px 8px 0; }
.ruler .track { position: absolute; left: 0; right: 0; top: 22px; height: 4px; border-radius: 2px; background: var(--line); }
.ruler .zone { position: absolute; top: 22px; height: 4px; }
.ruler .mk { position: absolute; top: 0; transform: translateX(-50%); display: grid; justify-items: center; gap: 3px; font-family: var(--f-mono); font-size: 11px; white-space: nowrap; }
.ruler .mk i { width: 2px; height: 16px; border-radius: 1px; }
.ruler .mk.liq { color: var(--down); } .ruler .mk.liq i { background: var(--down); }
.ruler .mk.ent { color: var(--fg); } .ruler .mk.ent i { background: var(--fg); }
.ruler .mk.tp { color: var(--up); } .ruler .mk.tp i { background: var(--up); }
.ruler .mk span { margin-top: 12px; }
.pos-note { font-size: 13.5px; color: var(--muted); }
@media (max-width: 760px) {
  .fields-4 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pos-res { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .fields-4 .field:last-child { grid-column: auto; }
}

/* Registro del Laboratorio */
.lab-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lab-sum > div { padding: 14px 16px; background: var(--surface); border-left: 1px solid var(--line); display: grid; gap: 2px; }
.lab-sum > div:first-child { border-left: 0; }
.lab-sum b { font-family: var(--f-display); font-size: 28px; font-weight: 800; line-height: 1.1; }
.lab-sum span { font-size: 13.5px; color: var(--muted); }
.lab-sum .w b { color: var(--up); } .lab-sum .l b { color: var(--down); }
.lab-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.lab-bar .seg { grid-template-columns: repeat(4, auto); }
.lab-bar input { font: 15px var(--f-body); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; width: 200px; max-width: 100%; }
.lab-bar input:focus { outline: none; border-color: var(--accent); }
.lab-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.lab { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 640px; }
.lab th { text-align: left; font-family: var(--f-mono); font-weight: 400; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: 10px 12px; position: sticky; top: 0; }
.lab td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: middle; }
.lab td.m { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; font-size: 13.5px; }
.lab td.a { font-weight: 600; white-space: nowrap; }
.lab tr.star td.a::after { content: " ★"; color: var(--accent); }
.dir { font-family: var(--f-mono); font-size: 12px; }
.dir.long { color: var(--up); } .dir.short { color: var(--down); }
.res { display: inline-block; font-family: var(--f-mono); font-size: 12.5px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.res.win { background: var(--up-soft); color: var(--up); }
.res.loss, .res.liq { background: var(--down-soft); color: var(--down); }
.res.liq { font-weight: 600; }
.res.be { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.res.open { background: var(--accent-soft); color: var(--accent); }
.lab a { font-family: var(--f-mono); font-size: 13px; white-space: nowrap; }
.lab-empty { padding: 18px; color: var(--muted); font-size: 15px; }
.lab-note { font-size: 13.5px; color: var(--muted); }
@media (max-width: 640px) {
  .lab-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lab-sum > div:nth-child(3) { border-left: 0; }
  .lab-sum > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .lab-bar .seg { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .lab-bar input { width: 100%; }
}

/* Glosario */
.glo-search { font: 16px var(--f-body); color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; width: 100%; }
.glo-search:focus { outline: none; border-color: var(--accent); }
.glo { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.glo > div { padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 3px; align-content: start; }
.glo dt { font-weight: 600; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.glo dt a { font-family: var(--f-mono); font-weight: 400; font-size: 12px; color: var(--muted); text-decoration: none; }
.glo dt a:hover { color: var(--accent); }
.glo dd { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.5; }
.glo-none { color: var(--muted); font-size: 15px; }
@media (max-width: 640px) { .glo { grid-template-columns: minmax(0, 1fr); } }

/* Sobre mí */
.about-intro { font-size: 19px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stats > div { padding: 16px; background: var(--surface); border-left: 1px solid var(--line); display: grid; gap: 2px; }
.stats > div:first-child { border-left: 0; }
.stats b { font-family: var(--f-display); font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stats span { font-size: 13.5px; color: var(--muted); }
.creed { margin: 6px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); font-family: var(--f-display); font-size: clamp(22px, 3.2vw, 28px); font-weight: 700; line-height: 1.25; text-wrap: balance; }
.calls { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.calls li { display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.calls li:last-child { border-bottom: 1px solid var(--line); }
.calls time { font-family: var(--f-mono); font-size: 13px; color: var(--accent); padding-top: 3px; }
.calls p { font-size: 16px; }
.bad-box { background: var(--down-soft); border: 1px solid color-mix(in srgb, var(--down) 35%, transparent); border-radius: 12px; padding: 16px 18px; display: grid; gap: 8px; }
.bad-box h3 { margin: 0; font-size: 18px; color: var(--down); }
.no-sell { display: flex; flex-wrap: wrap; gap: 8px; }
.no-sell span { font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.no-sell span::before { content: "✕ "; color: var(--down); }
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a { text-decoration: none; font-size: 15px; font-weight: 600; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); }
.links a:hover { border-color: var(--accent); }
.links a small { display: block; font-weight: 400; font-size: 12.5px; color: var(--muted); font-family: var(--f-mono); }
.hero-about { display: inline-block; margin-top: 16px; font-size: 15px; font-weight: 600; text-decoration: none; }
@media (max-width: 560px) {
  .stats b { font-size: 24px; }
  .stats > div { padding: 12px; }
  .calls li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* Otros activos en el semáforo */
.assets { display: grid; gap: 8px; margin-top: 6px; }
.assets h3 { font-size: 17px; font-weight: 700; margin: 0; }
.assets-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.assets-t { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.assets-t th { text-align: left; font-family: var(--f-mono); font-weight: 400; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; }
.assets-t td { padding: 9px 12px; border-top: 1px solid var(--line); }
.assets-t td.m { font-family: var(--f-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.assets-t td.n { font-weight: 600; white-space: nowrap; }
.assets-t small { color: var(--muted); font-family: var(--f-mono); margin-left: 6px; }

/* Gráficos */
.chart-box { display: grid; gap: 10px; }
.chart-bar { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.chart { height: 360px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.chart-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.chart-leg i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.chart-note { font-size: 13.5px; color: var(--muted); }
@media (max-width: 560px) { .chart { height: 300px; } }

/* Práctica: ¿Qué harías tú? */
.prac { display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-top: 20px; }
.prac-top { display: flex; justify-content: space-between; gap: 10px; font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.prac-top a { color: var(--accent); text-decoration: none; }
.prac h3 { font-size: clamp(20px, 3vw, 26px); margin: 0; }
.prac .chart { background: var(--bg); }
.prac-ans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.prac-ans button { font: inherit; font-size: 15px; font-weight: 600; text-align: center; color: var(--fg); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; cursor: pointer; }
.prac-ans button:hover:not(:disabled) { border-color: var(--accent); }
.prac-ans button:disabled { cursor: default; opacity: .55; }
.prac-ans button.ok { border-color: var(--up); background: var(--up-soft); opacity: 1; }
.prac-ans button.meh { border-color: var(--accent); background: var(--accent-soft); opacity: 1; }
.prac-ans button.bad { border-color: var(--down); background: var(--down-soft); opacity: 1; }
.prac-res { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.prac-res .verdict-l { font-family: var(--f-display); font-size: 20px; font-weight: 800; }
.prac-res .verdict-l.ok { color: var(--up); } .prac-res .verdict-l.meh { color: var(--accent); } .prac-res .verdict-l.bad { color: var(--down); }
.prac-res .what { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.prac-end { text-align: center; display: grid; gap: 10px; justify-items: center; padding: 10px 0; }
.prac-end b { font-family: var(--f-display); font-size: 44px; }
@media (max-width: 560px) { .prac-ans { grid-template-columns: minmax(0, 1fr); } .prac { padding: 14px; } }

/* Progreso */
.progress { display: grid; gap: 8px; margin: 0 0 24px; }
.progress[hidden] { display: none; }
.progress-h { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; flex-wrap: wrap; }
.progress-h a { font-weight: 600; text-decoration: none; }
.progress-bar { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.progress-bar i { display: block; height: 100%; background: var(--up); border-radius: 4px; transition: width .3s; }
.index a.done .n::after { content: "  ✓ hecha"; color: var(--up); font-size: 12px; }

/* Examen y diploma */
.exam { display: grid; gap: 18px; margin-top: 20px; }
.exam-q { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.exam-q .q p { font-weight: 600; }
.exam-q .n { font-family: var(--f-mono); font-size: 12px; color: var(--accent); margin-bottom: 6px; }
.exam-score { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); justify-self: center; z-index: 5; font-family: var(--f-mono); font-size: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.exam-end { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; display: grid; gap: 14px; }
.exam-end h3 { font-size: 26px; margin: 0; }
.exam-end.pass h3 { color: var(--up); }
.diploma-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.diploma-form .field { flex: 1 1 220px; }
#diplomaCanvas { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); display: block; }

/* Estacionalidad */
.season-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.season-sum > div { padding: 14px 16px; background: var(--surface); border-left: 1px solid var(--line); display: grid; gap: 2px; align-content: start; }
.season-sum > div:first-child { border-left: 0; }
.season-sum span { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.season-sum b { font-family: var(--f-display); font-size: 26px; font-weight: 800; line-height: 1.15; }
.season-sum small { font-size: 13.5px; color: var(--muted); }
.season-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.season { border-collapse: separate; border-spacing: 2px; font-family: var(--f-mono); font-size: 12px; font-variant-numeric: tabular-nums; width: 100%; min-width: 760px; padding: 6px; }
.season th { font-weight: 500; color: var(--muted); padding: 6px 4px; text-align: center; }
.season th.y { text-align: left; color: var(--fg); padding-left: 8px; }
.season td { text-align: center; padding: 7px 2px; border-radius: 5px; color: var(--fg); }
.season td.na { color: var(--line); }
.season td.now { outline: 2px dashed var(--accent); outline-offset: -2px; }
.season td.tot { font-weight: 600; border-left: 1px solid var(--line); }
.season tr.sum th, .season tr.sum td { border-top: 1px solid var(--line); background: var(--surface-2); color: var(--fg); }
.season col.cur { background: var(--accent-soft); }
.season-line { font-size: 14.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; margin-top: 4px; }
.season-line b { color: var(--fg); }
@media (max-width: 560px) { .season-sum { grid-template-columns: minmax(0, 1fr); } .season-sum > div { border-left: 0; border-top: 1px solid var(--line); } .season-sum > div:first-child { border-top: 0; } }

/* Lección 0: formularios de orden de ejemplo (genéricos, no son de ningún exchange) */
.ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 10px; max-width: 380px; font-size: 14px; }
.ticket-h { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.ticket .tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg); border-radius: 8px; padding: 3px; }
.ticket .tabs span { text-align: center; padding: 6px; border-radius: 6px; font-weight: 600; color: var(--muted); }
.ticket .tabs span.on-buy { background: var(--up); color: #fff; }
.ticket .tabs span.on { background: var(--surface-2); color: var(--fg); box-shadow: 0 0 0 1px var(--line); }
.ticket .row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; align-items: center; }
.ticket .row span:first-child { color: var(--muted); font-size: 13px; }
.ticket .row b { font-family: var(--f-mono); font-weight: 500; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 6px 9px; }
.ticket .go { text-align: center; font-weight: 700; padding: 9px; border-radius: 8px; background: var(--up); color: #fff; }
.ticket .go.dn { background: var(--down); }
.ticket .tabs span.go { color: #fff; }
.ticket-n { counter-reset: t; }
.ticket-n .row span:first-child::before { counter-increment: t; content: counter(t) " · "; color: var(--accent); font-family: var(--f-mono); }
.tickets { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cmp-tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.cmp-tbl th, .cmp-tbl td { padding: 10px 12px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.cmp-tbl thead th { border-top: 0; font-family: var(--f-mono); font-weight: 400; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.cmp-tbl td.m { font-family: var(--f-mono); white-space: nowrap; }
.start-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; text-decoration: none; color: var(--fg); padding: 14px 18px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--up) 45%, var(--line)); background: var(--up-soft); margin: 0 0 14px; }
.start-banner .ico { font-size: 22px; }
.start-banner b { font-family: var(--f-display); font-size: 18px; display: block; }
.start-banner span { font-size: 14px; color: var(--muted); }
.start-banner em { font-style: normal; font-weight: 700; color: var(--up); white-space: nowrap; }
@media (max-width: 640px) { .tickets { grid-template-columns: minmax(0, 1fr); } .start-banner { grid-template-columns: auto minmax(0, 1fr); } .start-banner em { grid-column: 2; } }

/* Análisis de la semana */
.ana-list { display: grid; gap: 22px; margin-top: 20px; }
.ana { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 12px; }
.ana-top { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); }
.ana-top b { color: var(--accent); font-weight: 500; }
.ana h3 { margin: 0; font-size: clamp(21px, 3vw, 26px); }
.ana .txt { display: grid; gap: 10px; font-size: 17px; max-width: 72ch; }
.ana .lvl { display: flex; flex-wrap: wrap; gap: 8px; }
.ana .lvl span { font-size: 14px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.ana .lvl span b { font-family: var(--f-mono); font-weight: 500; font-size: 12px; color: var(--muted); margin-right: 6px; text-transform: uppercase; letter-spacing: .05em; }
.ana .since { font-size: 15px; padding: 10px 14px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); }
.ana .since b { font-family: var(--f-mono); }
.ana.old { padding: 14px 18px; }
.tools-band.cuatro { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .tools-band.cuatro { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .tools-band.cuatro { grid-template-columns: minmax(0, 1fr); } }

/* Pregunta del día */
.daily { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; display: grid; gap: 10px; margin: 0 0 14px; }
.daily-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.daily-h h3 { margin: 0; font-size: 18px; }
.daily-h span { font-family: var(--f-mono); font-size: 13px; color: var(--muted); }
.daily-h span b { color: var(--accent); }
.daily .q p { font-weight: 600; margin-bottom: 8px; }
.daily .q .ans { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .daily .q .ans { grid-template-columns: minmax(0, 1fr); } }

/* Calculadora de impuestos */
.tax-tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tax-tbl th, .tax-tbl td { padding: 8px 10px; border-top: 1px solid var(--line); text-align: left; }
.tax-tbl thead th { border-top: 0; font-family: var(--f-mono); font-weight: 400; font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.tax-tbl td.m { font-family: var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.tax-tbl tr.tot td { font-weight: 700; border-top: 2px solid var(--line); }
.tax-tbl tr.off td { color: var(--muted); }

/* Reglas a prueba */
.bt-block { display: grid; gap: 12px; }
.bt-block h3 { font-size: 21px; margin: 0; }
.bt-block > p { color: var(--muted); font-size: 15.5px; max-width: 72ch; }
.bt-cmp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bt-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 6px; }
.bt-card.main { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); background: var(--accent-soft); }
.bt-card h4 { margin: 0; font-family: var(--f-mono); font-weight: 500; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.bt-card dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; font-size: 14.5px; }
.bt-card dt { color: var(--muted); }
.bt-card dd { margin: 0; font-family: var(--f-mono); font-variant-numeric: tabular-nums; font-weight: 500; text-align: right; }
.bt-say { font-size: 15.5px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--fg) !important; }
.lab td.ok { color: var(--up); font-weight: 600; } .lab td.no { color: var(--down); font-weight: 600; }
@media (max-width: 560px) { .bt-cmp { grid-template-columns: minmax(0, 1fr); } }

/* Calendario de la semana */
.week { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: grid; gap: 8px; }
.week h3 { font-size: 16px; font-weight: 700; margin: 0; }
.week ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.week li { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14.5px; }
.week li:first-child { border-top: 0; }
.week li time { font-family: var(--f-mono); font-size: 12.5px; color: var(--accent); white-space: nowrap; }
.week li small { font-family: var(--f-mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.week li.past { opacity: .5; }
.week li.opt time { color: var(--up); }
@media (max-width: 560px) { .week li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* Compartir */
.share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-block: 8px 20px; max-width: 720px; }
.share > span { font-family: var(--f-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.share a, .share button { font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--fg); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.share a:hover, .share button:hover { border-color: var(--accent); }

/* Miedo y codicia */
.fng-spark { width: 100%; height: 26px; display: block; }
.fng-spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.6; vector-effect: non-scaling-stroke; }

/* Calculadora «¿Y si hubiera comprado?» */
.dca-res { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.dca-res > div { background: var(--bg); padding: 12px 14px; display: grid; gap: 2px; }
.dca-res span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.dca-res b { font-family: var(--f-mono); font-weight: 500; font-size: 18px; font-variant-numeric: tabular-nums; }
.dca-res small { font-size: 13px; color: var(--muted); }
.dca-res .win b { color: var(--up); } .dca-res .loss b { color: var(--down); }
.field input[type="month"] { font-family: var(--f-mono); font-size: 15px; min-width: 0; max-width: 100%; padding-inline: 8px; }
@media (max-width: 760px) { .dca-res { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* Ciclos */
.cyc-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.cyc-sum > div { padding: 14px 16px; background: var(--surface); border-left: 1px solid var(--line); display: grid; gap: 2px; align-content: start; }
.cyc-sum > div:first-child { border-left: 0; }
.cyc-sum span { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.cyc-sum b { font-family: var(--f-display); font-size: 24px; font-weight: 800; line-height: 1.15; }
.cyc-sum small { font-size: 13.5px; color: var(--muted); }
.cyc-sum .now { background: var(--accent-soft); }
.cyc-sum .now b { color: var(--accent); }
@media (max-width: 760px) { .cyc-sum { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .cyc-sum > div:nth-child(3) { border-left: 0; } .cyc-sum > div:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* Páginas sueltas (versión web) */
.page-sub > .lesson:first-child { border-top: 0; padding-top: 36px; }
.pager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; padding-block: 8px 48px; max-width: 720px; }
.pager a { display: grid; gap: 2px; text-decoration: none; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); }
.pager a:hover { border-color: var(--accent); }
.pager a span { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.pager a b { font-family: var(--f-display); font-size: 17px; }
.pager .next { text-align: right; }

/* Visor de capturas */dialog { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
dialog::backdrop { background: rgba(5,8,12,.86); }
dialog img { display: block; max-width: 96vw; max-height: 86vh; border-radius: 8px; }
dialog p { color: #c9d1db; font-size: 14px; margin-top: 8px; text-align: center; }

@media (max-width: 820px) {
  .hero { grid-template-columns: minmax(0, 1fr); padding-block: 36px 28px; gap: 24px; }
  .index { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .shots-2 { grid-template-columns: minmax(0, 1fr); }

}
@media (max-width: 640px) {
  .fib-out { grid-template-columns: minmax(0, 1fr); }
  .fib-scale { max-width: 200px; justify-self: center; }
  .fib-tbl { font-size: 14px; }
  .fib-tbl td { padding-right: 6px; }
  .fib-tbl .pill { white-space: normal; display: inline-block; line-height: 1.3; letter-spacing: .02em; }
  .fib-tbl .dist { font-size: 12px; }
  .fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fields .field:last-child { grid-column: span 2; }
  .tools-band { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .index, .trio, .opts, .timeline, .steps { grid-template-columns: minmax(0, 1fr); }
  .timeline > div { border-left: 0; border-top: 1px solid var(--line); }
  .timeline > div:first-child { border-top: 0; }
  .big-n { font-size: 60px; }
  .lesson { padding-block: 48px; }
  .matrix { grid-template-columns: 92px repeat(2, minmax(0, 1fr)); }
  .matrix > div { padding: 10px; font-size: 13.5px; }
  .ladder > div { grid-template-columns: 58px minmax(0, 1fr); }
  .ladder .pill { grid-column: 2; justify-self: start; }
  .brand span { display: none; }
}
