/* Trader Guardian · estilos compartidos (página y guía) */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --border: #dde2ea;
  --fg: #0f1729;
  --muted: #5a6478;
  --brand: #4f46e5;
  --brand-fg: #ffffff;
  --brand-soft: rgba(79, 70, 229, 0.10);
  --accent: #0891b2;
  --profit: #15803d;
  --profit-soft: rgba(21, 128, 61, 0.10);
  --loss: #b91c1c;
  --loss-soft: rgba(185, 28, 28, 0.10);
  --warning: #b45309;
  --warning-soft: rgba(180, 83, 9, 0.12);
  --panel-bg: #0d1220;
  --panel-fg: #e6e9ef;
  --panel-muted: #8b93a7;
  --panel-border: #232b3d;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 41, 0.06), 0 8px 24px rgba(15, 23, 41, 0.06);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f19;
    --surface: #121826;
    --surface-2: #1a2132;
    --border: #273047;
    --fg: #e6e9ef;
    --muted: #9aa3b6;
    --brand: #818cf8;
    --brand-fg: #0b0f19;
    --brand-soft: rgba(129, 140, 248, 0.14);
    --accent: #22d3ee;
    --profit: #4ade80;
    --profit-soft: rgba(74, 222, 128, 0.12);
    --loss: #f87171;
    --loss-soft: rgba(248, 113, 113, 0.12);
    --warning: #fbbf24;
    --warning-soft: rgba(251, 191, 36, 0.12);
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f19; --surface: #121826; --surface-2: #1a2132; --border: #273047;
  --fg: #e6e9ef; --muted: #9aa3b6; --brand: #818cf8; --brand-fg: #0b0f19;
  --brand-soft: rgba(129, 140, 248, 0.14); --accent: #22d3ee;
  --profit: #4ade80; --profit-soft: rgba(74, 222, 128, 0.12);
  --loss: #f87171; --loss-soft: rgba(248, 113, 113, 0.12);
  --warning: #fbbf24; --warning-soft: rgba(251, 191, 36, 0.12);
  --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
img, svg { max-width: 100%; }
.num, code, kbd { font-family: var(--mono); font-variant-numeric: tabular-nums; }
code { font-size: 0.88em; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Barra superior */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--fg); text-decoration: none; letter-spacing: -0.01em; white-space: nowrap; }
.logo svg { width: 28px; height: 28px; flex: none; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--fg); }
.nav a.btn-primary, .nav a.btn-primary:hover { color: var(--brand-fg); }
@media (max-width: 720px) { .nav a.hide-sm { display: none; } }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: var(--radius); font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .08s ease, background .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-fg); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.btn:focus-visible, a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Secciones */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--border); }
.eyebrow { color: var(--brand); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin: 0 0 8px; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(34px, 6vw, 54px); }
h2 { font-size: clamp(26px, 4vw, 36px); }
h3 { font-size: 18px; }
.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

/* Hero */
.hero { padding: 64px 0 72px; }
.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 880px) { .hero-grid { grid-template-columns: 1fr; gap: 36px; } }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.chips li { font-size: 13px; color: var(--muted); border: 1px solid var(--border); background: var(--surface); padding: 4px 10px; border-radius: 999px; }

/* Panel ilustrativo (siempre oscuro, como en NinjaTrader) */
.panel { background: var(--panel-bg); color: var(--panel-fg); border: 1px solid var(--panel-border); border-radius: 12px; padding: 16px; box-shadow: 0 20px 50px rgba(13, 18, 32, 0.25); font-size: 14px; }
.panel-title { display: flex; justify-content: space-between; color: var(--panel-muted); font-size: 12px; margin-bottom: 10px; }
.franja { border-radius: 6px; padding: 12px 14px; font-weight: 700; letter-spacing: 0.02em; margin-bottom: 4px; }
.franja.ok { background: #14532d; color: #dcfce7; }
.franja.pausa { background: #78350f; color: #fef3c7; }
.franja.fin { background: #7f1d1d; color: #fee2e2; }
.franja small { display: block; font-weight: 500; letter-spacing: 0; opacity: .85; margin-top: 2px; }
.panel dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 14px 0 0; }
.panel dt { color: var(--panel-muted); }
.panel dd { margin: 0; text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.panel .up { color: #4ade80; }
.panel .down { color: #f87171; }
.panel .warn { color: #fbbf24; }
.panel-note { color: var(--muted); font-size: 12px; text-align: center; margin-top: 8px; }

/* Tarjetas */
.grid { display: grid; gap: 16px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 880px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 12px; }
.icon svg { width: 20px; height: 20px; }

/* Pasos */
.steps { counter-reset: paso; list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.steps > li { counter-increment: paso; position: relative; padding: 18px 18px 18px 64px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.steps > li::before { content: counter(paso); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; background: var(--brand); color: var(--brand-fg); display: grid; place-items: center; font-weight: 700; font-family: var(--mono); }
.steps strong { display: block; margin-bottom: 2px; }

/* Precio */
.price-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 880px) { .price-wrap { grid-template-columns: 1fr; } }
.price-card { background: var(--surface); border: 2px solid var(--brand); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 8px 0 4px; }
.price { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 48px; font-weight: 700; letter-spacing: -0.03em; }
.price small { font-size: 16px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.alt-price { font-family: var(--mono); color: var(--muted); }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.fundador { margin: 18px 0; padding: 14px 16px; border-radius: 10px; background: var(--brand-soft); border: 1px dashed var(--brand); font-size: 15px; }
.fundador code { background: var(--surface); }
.checks { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; }
.checks li { padding-left: 28px; position: relative; font-size: 15px; }
.checks li::before { content: "✓"; position: absolute; left: 4px; color: var(--brand); font-weight: 700; }
.pay-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
@media (max-width: 420px) { .pay-buttons { grid-template-columns: 1fr; } }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; }
details + details { margin-top: 10px; }
summary { cursor: pointer; font-weight: 600; }
details p { color: var(--muted); margin: 10px 0 0; }

/* Aviso */
.aviso { background: var(--warning-soft); border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent); border-radius: 12px; padding: 20px 22px; font-size: 14px; }
.aviso h3 { color: var(--warning); font-size: 16px; }
.aviso p { margin: 8px 0 0; }

footer { padding: 36px 0 48px; border-top: 1px solid var(--border); color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
footer a { color: var(--muted); }

/* Guía */
.doc { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 40px; padding: 40px 0 72px; }
@media (max-width: 880px) { .doc { grid-template-columns: minmax(0, 1fr); gap: 16px; } }
.toc { position: sticky; top: 80px; align-self: start; font-size: 14px; }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--fg); }
@media (max-width: 880px) { .toc { position: static; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; } }
.doc article { max-width: 760px; }
.doc article h2 { font-size: 26px; margin-top: 48px; padding-top: 12px; scroll-margin-top: 80px; }
.doc article h2:first-of-type { margin-top: 8px; }
.doc article h3 { margin-top: 24px; }
.doc article p, .doc article li { color: var(--fg); }
.doc article ul, .doc article ol { padding-left: 22px; }
.doc article li + li { margin-top: 4px; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tag.si { background: var(--surface-2); color: var(--muted); }
.tag.no { background: var(--loss-soft); color: var(--loss); }
.tag.ok { background: var(--profit-soft); color: var(--profit); }
.tag.am { background: var(--warning-soft); color: var(--warning); }
.callout { border-left: 4px solid var(--brand); background: var(--brand-soft); padding: 12px 16px; border-radius: 0 8px 8px 0; margin: 16px 0; }
