/* SEORise — un tablero de control sobre papel cuadriculado: tarjetas blancas flotando sobre una rejilla
   de puntos, conectadas por pistas azules por las que circula el trabajo. Etiquetas en monoespaciada,
   texto en Manrope. Azul = sistema, coral = IA, verde/ámbar/rojo = estado. */
@font-face { font-family: "Manrope"; src: url("/public/fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2190-2199, U+2212, U+2215; }
@font-face { font-family: "Manrope"; src: url("/public/fonts/manrope-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; src: url("/public/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #f2f4f7; --grid: #d9dee6; --surface: #ffffff; --surface-2: #f7f8fa; --ink: #141a24; --muted: #5f6878; --faint: #98a1b0; --line: #e3e7ed;
  --accent: #3b68d8; --accent-ink: #ffffff; --accent-soft: #e9effc; --track: #8eaaf0;
  --ai: #c8583c; --ai-soft: #fcece6; --ai-line: #f0c8bb;
  --ok: #1d8a57; --ok-soft: #e4f5ec; --warn: #a76b00; --warn-soft: #fdf2d9; --bad: #c33b2c; --bad-soft: #fde9e6;
  --term-bg: #121821; --term-ink: #dfe6f0; --term-dim: #7f8aa0;
  --shadow: 0 1px 2px rgb(20 26 36 / 5%), 0 10px 30px -12px rgb(20 26 36 / 14%);
  --radius: 16px; --radius-s: 10px;
  --ui: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f131a; --grid: #1f2633; --surface: #171d27; --surface-2: #1c2330; --ink: #e8edf5; --muted: #a2acbd; --faint: #6d778a; --line: #283141;
    --accent: #7c9ef5; --accent-ink: #0d1322; --accent-soft: #1c2945; --track: #4d6bb8;
    --ai: #f08b6f; --ai-soft: #3a2119; --ai-line: #6b3627;
    --ok: #5fd39a; --ok-soft: #133426; --warn: #f2bd55; --warn-soft: #3a2c0d; --bad: #ff8f80; --bad-soft: #3d1a16;
    --term-bg: #0a0e14; --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px -14px rgb(0 0 0 / 60%); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f131a; --grid: #1f2633; --surface: #171d27; --surface-2: #1c2330; --ink: #e8edf5; --muted: #a2acbd; --faint: #6d778a; --line: #283141;
  --accent: #7c9ef5; --accent-ink: #0d1322; --accent-soft: #1c2945; --track: #4d6bb8;
  --ai: #f08b6f; --ai-soft: #3a2119; --ai-line: #6b3627;
  --ok: #5fd39a; --ok-soft: #133426; --warn: #f2bd55; --warn-soft: #3a2c0d; --bad: #ff8f80; --bad-soft: #3d1a16;
  --term-bg: #0a0e14; --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px -14px rgb(0 0 0 / 60%); color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 15px/1.55 var(--ui); color: var(--ink); background-color: var(--bg);
  background-image: radial-gradient(var(--grid) 1px, transparent 1.2px); background-size: 22px 22px;
}
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: 1.65rem; line-height: 1.2; margin: 0 0 1rem; font-weight: 700; }
h2 { font-size: 1.08rem; margin: 0 0 .6rem; font-weight: 700; }
h3 { font-size: .95rem; margin: 1.1rem 0 .5rem; font-weight: 700; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ── Cabecera ── */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem max(16px, env(safe-area-inset-right, 0px)) .7rem max(16px, env(safe-area-inset-left, 0px)); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.brand { font-weight: 800; text-decoration: none; color: var(--ink); display: inline-flex; align-items: center; gap: .5rem; letter-spacing: -0.02em; }
.brand-mark { width: 22px; height: 22px; flex: none; border-radius: 7px; }
.brand .logo-rise { background: linear-gradient(90deg, var(--accent), var(--ai)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wordmark { white-space: nowrap; }
.i-up { position: relative; display: inline-block; }
.i-up::before { content: ""; position: absolute; left: 50%; top: .14em; transform: translateX(-50%); border-left: .21em solid transparent; border-right: .21em solid transparent; border-bottom: .3em solid var(--ok); }
.topnav { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.topnav a { color: var(--muted); text-decoration: none; } .topnav a:hover { color: var(--ink); }
.bizbar { background: color-mix(in srgb, var(--surface) 70%, transparent); border-bottom: 1px solid var(--line); padding: .6rem max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); }
.bizname { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; font-weight: 700; max-width: 1280px; margin: 0 auto; }
.bizname a { color: var(--ink); text-decoration: none; }
.tabs { display: flex; gap: .2rem; overflow-x: auto; margin: .45rem auto 0; max-width: 1280px; scrollbar-width: none; }
.tabs a { padding: .5rem .8rem; white-space: nowrap; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; font-weight: 600; font-size: .92rem; }
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); border-color: var(--accent); }
.tabs a.tab-next { color: var(--accent); }
.container { max-width: 1280px; margin: 0 auto; padding-block: 1.5rem 3rem; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.footer { text-align: center; color: var(--faint); font-size: .78rem; padding: 1rem 16px 2rem; }

/* ── Piezas comunes ── */
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow); min-width: 0; overflow-x: auto; }
.card.narrow { max-width: 440px; margin: 3.5rem auto; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.pagehead { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pagehead h1 { margin: 0; }
.row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: minmax(120px, 36%) 1fr; gap: .4rem .9rem; margin: 0; }
.kv dt { color: var(--muted); font-size: .85rem; } .kv dd { margin: 0; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; } .badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; } .badge.info { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.badge.demo { background: var(--warn-soft); color: var(--warn); border-color: transparent; } .badge.real { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.banner { padding: .8rem 1rem; border-radius: var(--radius-s); margin: 0 0 1rem; background: var(--accent-soft); color: var(--accent); }
.banner.critical { border-radius: 0; margin: 0; background: var(--bad-soft); color: var(--bad); font-weight: 700; text-align: center; }
.banner.warn { background: var(--warn-soft); color: var(--warn); }
.banner.info { background: var(--accent-soft); color: var(--accent); }
.flash { padding: .8rem 1rem; border-radius: var(--radius-s); background: var(--accent-soft); color: var(--accent); margin-bottom: 1rem; font-weight: 600; }
.list { margin: 0; padding-left: 1.1rem; } .list li { margin-bottom: .55rem; }
.alerts-mini ul { margin: .5rem 0 0; padding-left: 1rem; font-size: .85rem; }
.sev-critical { color: var(--bad); } .sev-warning { color: var(--warn); }
.small { font-size: .84rem; } .muted, .empty { color: var(--muted); } .error { color: var(--bad); } .warn-text { color: var(--warn); }
.empty { padding: .6rem 0; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.scroll > .table, .card > .table { min-width: 560px; }
.table th, .table td { text-align: left; padding: .6rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--faint); font: 600 .7rem/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.table tbody tr:hover td { background: var(--surface-2); }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .row-bad td { background: var(--bad-soft); }
.url { overflow-wrap: anywhere; font-size: .85rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: 600 .9rem/1 var(--ui); padding: .65rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.btn:hover { border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: 0 6px 18px -8px var(--accent); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.big { padding: .9rem 1.4rem; font-size: 1rem; border-radius: 12px; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 45%, var(--line)); }
.btn.small { padding: .38rem .7rem; font-size: .82rem; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; } button.link:hover { color: var(--ink); }
form.inline { display: inline; }
.form { display: grid; gap: .85rem; } .form label { display: grid; gap: .3rem; font-size: .9rem; font-weight: 600; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .6rem; }
input, select, textarea { font: inherit; font-weight: 500; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); max-width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
fieldset { border: 1px solid var(--line); border-radius: var(--radius-s); padding: .6rem .9rem; margin: 0 0 .8rem; } legend { font-weight: 700; padding: 0 .3rem; }
label.radio { display: inline-flex; gap: .4rem; align-items: center; margin: .25rem 1rem .25rem 0; font-weight: 500; }
.step h2 { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; }
.stepn { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font: 700 .8rem var(--mono); }
.step.done .stepn { background: var(--ok-soft); color: var(--ok); }
.step.current { border: 2px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.step.current .stepn { background: var(--accent); color: var(--accent-ink); }
.step.done { opacity: .82; }
.next-hint { margin: .2rem 0 .8rem; padding: .55rem .8rem; border-radius: var(--radius-s); background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: .9rem; }
.onboard-progress .op-head { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.onboard-progress p { margin: .7rem 0 0; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.interview .qn { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; margin-right: .45rem; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font: 700 .75rem var(--mono); }
.interview-progress { position: sticky; top: .5rem; z-index: 2; margin: 0; padding: .45rem .8rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .85rem; font-weight: 600; width: fit-content; }
.interview-progress:empty { display: none; }
::placeholder { color: var(--faint); opacity: 1; }
details.advanced { margin: .4rem 0 .8rem; } details.advanced summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.checks li { display: grid; grid-template-columns: 1.4rem minmax(140px, 240px) 1fr; gap: .6rem; padding: .5rem .2rem; border-bottom: 1px solid var(--line); font-size: .9rem; align-items: baseline; }
.checks .mark { font-weight: 800; } .checks li.ok .mark { color: var(--ok); } .checks li.bad .mark, .checks li.bad strong { color: var(--bad); } .checks li.warn .mark { color: var(--warn); }
@media (max-width: 640px) { .checks li { grid-template-columns: 1.4rem 1fr; } .checks li .muted { grid-column: 2; } }
.preview { border: 1px dashed var(--line); padding: 1rem 1.2rem; border-radius: var(--radius-s); overflow-wrap: anywhere; background: var(--surface-2); } .preview img { max-width: 100%; height: auto; }
.op { border-bottom: 1px solid var(--line); padding: .9rem 0; } .op header { margin-bottom: .5rem; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.bar { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.bar span { display: block; width: 100%; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 60%, transparent)); border-radius: 4px 4px 1px 1px; }
.bar.missing { background: repeating-linear-gradient(45deg, var(--surface-2), var(--surface-2) 3px, transparent 3px, transparent 6px); border-radius: 4px; }
.bar.delayed { background: var(--warn-soft); border-radius: 4px; } .bar.zero span { height: 2px !important; background: var(--faint); }
.meter { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: .5rem 0 1rem; } .meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
details summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
code { font: .85em var(--mono); background: var(--surface-2); border: 1px solid var(--line); padding: .05rem .35rem; border-radius: 6px; }
.segmented { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 1.1rem; flex-wrap: wrap; }
.segmented a { padding: .45rem .9rem; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; }
.segmented a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.bizcard header { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; align-items: baseline; }
.bizcard h2 a { color: var(--ink); text-decoration: none; }

/* ── Etiquetas «• LO QUE MIRA ———» ── */
.eyebrow-line { display: flex; align-items: center; gap: .55rem; font: 600 .68rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: .2rem 0 .7rem; }
.eyebrow-line::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.eyebrow-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.note { font-size: .82rem; color: var(--muted); font-style: italic; margin: .55rem 0 0; }
.more { font-size: .85rem; font-weight: 700; text-decoration: none; display: inline-block; margin-top: .6rem; }

/* ── Portada: estado ── */
.hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin: .5rem 0 1.6rem; }
.hero h1 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); margin: .55rem 0 .35rem; letter-spacing: -0.025em; }
.hero-sub { margin: 0; color: var(--muted); max-width: 62ch; }
.hero-flags { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .8rem; }
.flag { font: 600 .72rem/1 var(--mono); letter-spacing: .03em; padding: .42rem .6rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.flag.on { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.flag.off { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.flag.demo { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.hero-cta { display: grid; justify-items: end; gap: .4rem; }
.status { display: inline-flex; align-items: center; gap: .55rem; font: 700 .78rem/1 var(--mono); letter-spacing: .04em; padding: .5rem .8rem .5rem .65rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.status i { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 60%, transparent); animation: pulse 2.4s ease-out infinite; }
.status.running i { background: var(--accent); animation: pulse-run 1.1s ease-out infinite; }
.status.paused i { background: var(--warn); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 80%, 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes pulse-run { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 80%, 100% { box-shadow: 0 0 0 10px transparent; } }

/* ── Portada: circuito ── */
.flow { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; align-items: start; padding-bottom: 54px; }
.track { position: absolute; left: 3%; right: 3%; top: 40px; height: 2px; background: var(--track); border-radius: 2px; z-index: 0; }
.track i { position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); animation: travel 9s linear infinite; }
.track i:nth-child(2) { animation-delay: -3s; } .track i:nth-child(3) { animation-delay: -6s; }
.flow.is-running .track i { animation-duration: 3.2s; }
.flow.is-running .track i:nth-child(2) { animation-delay: -1.07s; } .flow.is-running .track i:nth-child(3) { animation-delay: -2.13s; }
@keyframes travel { from { left: 0; } to { left: calc(100% - 8px); } }
.loop { position: absolute; left: 10%; right: 10%; bottom: 8px; height: 46px; border: 2px solid var(--track); border-top: 0; border-radius: 0 0 18px 18px; z-index: 0; pointer-events: none; }
.loop span { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); background: var(--bg); padding: 0 .6rem; font: 600 .66rem/1 var(--mono); letter-spacing: .18em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.stage { position: relative; z-index: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem 1.1rem; box-shadow: var(--shadow); min-width: 0; transition: box-shadow .3s, border-color .3s, transform .3s; }
.stage:has(.ai-chip) { border-color: var(--ai-line); background: linear-gradient(var(--surface), color-mix(in srgb, var(--ai-soft) 35%, var(--surface))); }
.stage.is-active { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); transform: translateY(-3px); }
.stage-head { display: grid; grid-template-columns: auto 1fr auto; gap: .65rem; align-items: start; }
.stage-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font: 700 .8rem var(--mono); }
.stage h2 { margin: .1rem 0 0; font-size: 1.12rem; }
.stage-sub { margin: .1rem 0 0; color: var(--muted); font-size: .84rem; }
.ai-chip { font: 700 .66rem/1 var(--mono); letter-spacing: .06em; color: var(--ai); background: var(--ai-soft); border: 1px solid var(--ai-line); border-radius: 999px; padding: .32rem .5rem; white-space: nowrap; }
.live-chip { display: none; grid-column: 1 / -1; justify-self: start; font: 700 .64rem/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: .32rem .55rem; }
.stage.is-active .live-chip { display: inline-flex; animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .45; } }
.stage-lead { margin: .8rem 0 .7rem; padding-top: .75rem; border-top: 1px solid var(--line); font-size: .88rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.chip { font: 600 .66rem/1 var(--mono); padding: .36rem .55rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: var(--surface); }
.chip.chip-ai { color: var(--ai); border-color: var(--ai-line); background: var(--ai-soft); }
.stage-body { border: 1px solid var(--line); border-radius: 12px; padding: .75rem; background: var(--surface); min-width: 0; }
.stage-body .empty { font-size: .85rem; padding: .2rem 0; margin: 0; }

.g-logo { font-weight: 800; letter-spacing: -0.02em; background: linear-gradient(90deg, #4285f4 0 25%, #ea4335 25% 42%, #fbbc05 42% 58%, #4285f4 58% 75%, #34a853 75% 85%, #ea4335 85%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.gsc-head { font-weight: 700; font-size: .9rem; padding-bottom: .55rem; border-bottom: 1px solid var(--line); margin-bottom: .65rem; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .6rem; display: grid; gap: .1rem; }
.kpi strong { font-size: 1.2rem; font-variant-numeric: tabular-nums; } .kpi span { font-size: .72rem; color: var(--muted); }
.c-imp { color: var(--accent); } .c-clk { color: var(--ok); }
.spark { width: 100%; height: 64px; margin: .55rem 0 .3rem; overflow: visible; }
.spark polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark .s-imp { stroke: var(--accent); } .spark .s-clk { stroke: var(--ok); } .spark .s-imp-dot { fill: var(--accent); }
.mini { width: 100%; border-collapse: collapse; font-size: .78rem; font-variant-numeric: tabular-nums; }
.mini th { font: 600 .62rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); text-align: left; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.mini th:not(:first-child), .mini td:not(:first-child) { text-align: right; padding-left: .5rem; }
.mini td { padding: .36rem 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.mini tr.gap td { color: var(--bad); }
.plan strong { display: block; margin-bottom: .4rem; }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; font-size: .86rem; }
.plan li { display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: .45rem; }
.plan li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-top: .45rem; background: var(--accent); }
.plan li.dot-muted::before { background: var(--faint); }
.plan em { font-style: normal; font-weight: 700; }
.term { background: var(--term-bg); border-radius: 10px; overflow: hidden; margin: -.75rem; color: var(--term-ink); font: .74rem/1.55 var(--mono); }
.term-bar { display: flex; align-items: center; gap: 5px; padding: .5rem .7rem; border-bottom: 1px solid rgb(255 255 255 / 7%); color: var(--term-dim); font-size: .68rem; }
.term-bar i { width: 8px; height: 8px; border-radius: 50%; background: rgb(255 255 255 / 18%); }
.term-bar span { margin-left: .4rem; }
.term-body { list-style: none; margin: 0; padding: .6rem .75rem .5rem; display: grid; gap: .3rem; }
.term-body li { display: grid; grid-template-columns: 1.1em 1fr; gap: .45rem; overflow-wrap: anywhere; }
.term-body .mark { color: var(--term-dim); } .term-body .ok .mark { color: #6fdc9e; } .term-body .ko .mark { color: #ff9d8a; } .term-body .ko { color: #ffc9be; }
.term-body li.fresh { animation: appear .5s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(4px); } }
.serp-q { display: flex; align-items: center; gap: .55rem; border: 1px solid var(--line); border-radius: 999px; padding: .45rem .75rem; font-size: .8rem; box-shadow: var(--shadow); }
.serp-input { flex: 1; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .serp-icon { color: var(--accent); }
.serp-hit { display: grid; gap: .15rem; margin-top: .75rem; }
.serp-url { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.serp-title { color: var(--accent); font-size: .98rem; font-weight: 600; line-height: 1.3; }
.serp-desc { font-size: .8rem; color: var(--muted); }
.verdict strong { display: block; margin-bottom: .55rem; }
.ba { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: center; }
.ba-box { border: 1px solid var(--line); border-radius: 10px; padding: .45rem; text-align: center; display: grid; } .ba-box span { font-size: .66rem; color: var(--muted); }
.ba-box b { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.ba-box.up { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); } .ba-box.down { border-color: var(--bad); background: var(--bad-soft); color: var(--bad); }
.arrow { color: var(--faint); }
.legend { display: flex; align-items: center; gap: .4rem; font-size: .82rem; margin: .6rem 0 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; } .dot.g { background: var(--ok); } .dot.r { background: var(--bad); } .dot.y { background: var(--warn); }
.progress { height: 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--ok)); border-radius: 999px; }
.soft-box { background: var(--surface-2); border-radius: 10px; padding: .7rem; font-size: .88rem; } .soft-box .note { margin-top: .3rem; }

.below { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; margin-top: .4rem; }
.todo { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.todo li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .65rem .8rem; border-radius: 12px; background: var(--surface-2); border-left: 3px solid var(--accent); font-size: .9rem; }
.todo li.tone-bad { border-left-color: var(--bad); } .todo li.tone-warn { border-left-color: var(--warn); }
.all-good { margin: 0; font-weight: 700; color: var(--ok); display: flex; align-items: center; gap: .5rem; }
.all-good::before { content: "✓"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ok-soft); }
.wins { margin: 0; padding-left: 1.1rem; display: grid; gap: .4rem; font-size: .88rem; }
/* Actividad entre ciclos: lo último que ha hecho y lo próximo. */
.activity { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; margin: .4rem 0 1.2rem; }
.feed { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.feed li { display: grid; grid-template-columns: 1.4em minmax(0, 1fr) auto; grid-template-areas: "m t w" "m k k"; column-gap: .55rem; padding: .5rem .2rem; border-bottom: 1px solid var(--line); font-size: .9rem; }
.feed li:last-child { border-bottom: 0; }
.feed li.fresh { animation: appear .5s ease-out; }
.feed .mark { grid-area: m; display: grid; place-items: center; width: 1.3em; height: 1.3em; border-radius: 50%; font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); }
.feed li.ok .mark { background: var(--ok-soft); color: var(--ok); }
.feed li.ko .mark { background: var(--bad-soft); color: var(--bad); }
.feed .txt { grid-area: t; overflow-wrap: anywhere; }
.feed time { grid-area: w; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.feed .kind { grid-area: k; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.agenda { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .55rem; }
.agenda li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem .6rem; padding: .6rem .8rem; border-radius: 12px; background: var(--surface-2); font-size: .88rem; }
.agenda li strong { text-align: right; font-weight: 600; }
.agenda li em { grid-column: 2; text-align: right; font-style: normal; color: var(--accent); font-size: .8rem; font-variant-numeric: tabular-nums; }

/* Tablet: rejilla sin pistas horizontales */
@media (max-width: 1240px) {
  .flow { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); padding-bottom: 0; }
  .track, .loop { display: none; }
}
/* Móvil: línea vertical que une las etapas */
@media (max-width: 680px) {
  .flow { grid-template-columns: 1fr; padding-left: 22px; gap: 16px; }
  .track { display: block; left: 6px; right: auto; top: 20px; bottom: 20px; width: 2px; height: auto; }
  .track i { left: -3px; animation-name: travel-y; }
  @keyframes travel-y { from { top: 0; } to { top: calc(100% - 8px); } }
  .below, .activity { grid-template-columns: 1fr; }
  .hero-cta { justify-items: start; }
  .kv { grid-template-columns: 1fr; } .kv dt { margin-top: .4rem; }
  .topbar { flex-wrap: wrap; }
  .todo li { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Vista general */
.bizcard { display: grid; gap: .8rem; align-content: start; }
.bizcard > .status { justify-self: start; }
.bizcard h2 { font-size: 1.2rem; margin: 0; }

/* Movimiento: estado del ciclo, cuenta atrás, cursor y gráfico */
.status-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.pips { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.pips li { width: 22px; height: 6px; border-radius: 999px; background: var(--line); transition: background .4s; }
.pips li.done { background: var(--ok); }
.pips li.now { background: linear-gradient(90deg, var(--accent) 0 40%, var(--accent-soft) 40%); background-size: 200% 100%; animation: fill 1.2s linear infinite; }
@keyframes fill { from { background-position: 100% 0; } to { background-position: 0 0; } }
.countdown { font: 600 .74rem/1 var(--mono); color: var(--muted); font-variant-numeric: tabular-nums; }
.term-prompt { display: flex; gap: .45rem; padding: 0 .75rem .75rem; color: var(--term-dim); font: .74rem/1.55 var(--mono); }
.term-prompt .mark { width: 1.1em; }
.cursor { display: inline-block; width: .55em; height: 1.05em; background: var(--term-ink); opacity: .8; animation: caret 1.05s steps(1) infinite; transform: translateY(2px); }
@keyframes caret { 50% { opacity: 0; } }
.term-body:empty { display: none; }
.spark polyline { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.8s ease-out .2s forwards; }
.spark .s-clk { animation-delay: .6s; }
.spark .s-imp-dot { opacity: 0; animation: appear .4s ease-out 1.9s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.stage.is-active::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 2px; background: conic-gradient(from var(--spin, 0deg), transparent 0 70%, var(--accent) 85%, transparent 100%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: spin 2.4s linear infinite; pointer-events: none; }
@property --spin { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin { to { --spin: 360deg; } }
.stage { animation: rise .5s ease-out both; }
.stage:nth-of-type(2) { animation-delay: .06s; } .stage:nth-of-type(3) { animation-delay: .12s; } .stage:nth-of-type(4) { animation-delay: .18s; } .stage:nth-of-type(5) { animation-delay: .24s; }
@keyframes rise { from { transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .spark polyline { stroke-dashoffset: 0; } .spark .s-imp-dot { opacity: 1; } }

/* ═════════ Inicio «wow»: núcleo vivo, aurora, cifras, circuito con cables y foco ═════════ */
.hero2 { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2rem; padding: 2rem 2.2rem; margin: .4rem 0 1rem; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; isolation: isolate; }
.hero2::before, .hero2::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; }
.hero2::before { width: 520px; height: 520px; right: -120px; top: -220px; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 45%, transparent), transparent 65%); animation: drift 18s ease-in-out infinite alternate; }
.hero2::after { width: 420px; height: 420px; right: 220px; bottom: -260px; background: radial-gradient(circle, color-mix(in srgb, var(--ai) 35%, transparent), transparent 65%); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { to { transform: translate(-60px, 40px) scale(1.08); } }
.hero2 h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); letter-spacing: -0.035em; line-height: 1.02; margin: .9rem 0 .6rem; background: linear-gradient(100deg, var(--ink) 30%, color-mix(in srgb, var(--accent) 70%, var(--ink)) 80%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero2 .hero-sub { font-size: 1.02rem; }
.hero2 .hero-cta { justify-items: start; margin-top: 1.3rem; display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.btn.big { position: relative; overflow: hidden; }
.btn-spark { position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / 45%) 50%, transparent 70%); transform: translateX(-120%); animation: shine 4.5s ease-in-out infinite; }
@keyframes shine { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }

/* Núcleo */
.core { position: relative; width: 260px; aspect-ratio: 1; max-width: 100%; }
.core-rings { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.core-rings circle { fill: none; stroke: var(--line); stroke-width: 1.5; transform-origin: 120px 120px; }
.core-rings .r1 { stroke: color-mix(in srgb, var(--accent) 35%, var(--line)); stroke-dasharray: 3 9; animation: rot 40s linear infinite; }
.core-rings .r2 { stroke-dasharray: 60 14 6 14; stroke: color-mix(in srgb, var(--accent) 55%, var(--line)); animation: rot 26s linear infinite reverse; }
.core-rings .r3 { stroke: color-mix(in srgb, var(--ai) 35%, var(--line)); stroke-dasharray: 2 6; animation: rot 60s linear infinite; }
.core.is-running .core-rings .r1 { animation-duration: 8s; } .core.is-running .core-rings .r2 { animation-duration: 5s; } .core.is-running .core-rings .r3 { animation-duration: 12s; }
@keyframes rot { to { transform: rotate(360deg); } }
.core-sweep { position: absolute; inset: 15%; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 75%, color-mix(in srgb, var(--accent) 28%, transparent) 100%); animation: rot 6s linear infinite; -webkit-mask: radial-gradient(circle, transparent 38%, #000 39%); mask: radial-gradient(circle, transparent 38%, #000 39%); }
.core.is-running .core-sweep { animation-duration: 1.6s; background: conic-gradient(from 0deg, transparent 0 65%, color-mix(in srgb, var(--accent) 55%, transparent) 100%); }
.core.is-paused .core-sweep, .core.is-paused .core-rings circle { animation-play-state: paused; }
.core-center { position: absolute; inset: 30%; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent-soft) 60%, transparent), var(--shadow); display: grid; place-content: center; text-align: center; gap: .25rem; padding: .4rem; }
.core-label { font: 600 .6rem/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.core-value { font: 700 1.05rem/1.1 var(--mono); font-variant-numeric: tabular-nums; color: var(--ink); }
.core-value:empty { display: none; }
.core-center .countdown { font-size: 1.05rem; color: var(--ink); }
.core-node { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); transition: background .4s, border-color .4s, transform .4s; }
.core-node em { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); font: 600 .58rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); font-style: normal; white-space: nowrap; }
.core-node.done { background: var(--ok); border-color: var(--ok); }
.core-node.now { background: var(--accent); border-color: var(--accent); transform: scale(1.35); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 25%, transparent); animation: pulse-run 1.1s ease-out infinite; }
.core-node.now em { color: var(--accent); }

/* Cifras */
.kpi-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 1.6rem; }
.kpi-tile { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: .95rem 1.1rem; box-shadow: var(--shadow); display: grid; gap: .2rem; position: relative; overflow: hidden; }
.kpi-tile::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--accent), transparent); opacity: .5; }
.kpi-tile strong { font-size: 1.9rem; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-label { font: 600 .64rem/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.kpi-foot { font-size: .76rem; color: var(--faint); }
.c-ai { color: var(--ai); }

/* Iconos de etapa */
.stage-ic { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.stage:has(.ai-chip) .stage-ic { background: var(--ai-soft); color: var(--ai); }
.stage-ic b { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 6px; background: var(--surface); border: 1px solid var(--line); font: 700 .6rem var(--mono); color: var(--muted); }
.ic { width: 24px; height: 24px; overflow: visible; }
.ic * { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic .ic-fill { fill: currentColor; stroke: none; }
.ic-listen .ic-ring { opacity: .45; } .ic-listen .ic-sweep { transform-origin: 16px 16px; animation: rot 3s linear infinite; }
.ic-decide .ic-node { fill: currentColor; stroke: none; opacity: .3; animation: alt 2.4s ease-in-out infinite; } .ic-decide .ic-b { animation-delay: 1.2s; }
@keyframes alt { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.ic-write .ic-ink { stroke-dasharray: 22; stroke-dashoffset: 22; animation: ink 2.6s ease-in-out infinite; }
@keyframes ink { 50%, 100% { stroke-dashoffset: 0; } }
.ic-publish .ic-rocket { animation: lift 2.2s ease-in-out infinite; } .ic-publish .ic-trail { opacity: .4; stroke-dasharray: 3 3; animation: trail .6s linear infinite; }
@keyframes lift { 50% { transform: translateY(-2px); } } @keyframes trail { to { stroke-dashoffset: -6; } }
.ic-check .ic-bubble { fill: currentColor; stroke: none; animation: bubble 2.4s ease-in infinite; } .ic-check .ic-b { animation-delay: 1.1s; }
@keyframes bubble { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-9px); opacity: 0; } }
.stage.is-active .stage-ic { background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px -8px var(--accent); }

/* Circuito con cables reales (SVG dibujado por app.js) */
.wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }
.flow.has-wires .track, .flow.has-wires .loop { display: none; }
.wires .wire { fill: none; stroke: var(--track); stroke-width: 2; opacity: .55; }
.wires .wire-flow { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 2 10; stroke-linecap: round; animation: march 1.6s linear infinite; opacity: .8; }
.wires .hot .wire { opacity: 1; stroke: var(--accent); stroke-width: 2.5; }
.wires .hot .wire-flow { stroke-width: 3; animation-duration: .6s; }
@keyframes march { to { stroke-dashoffset: -24; } }
.wires .comet { fill: var(--accent); filter: drop-shadow(0 0 6px var(--accent)); }
.wires .comet-tail { fill: color-mix(in srgb, var(--accent) 35%, transparent); }
.wires .loop-label { font: 600 10px var(--mono); letter-spacing: .18em; fill: var(--faint); text-transform: uppercase; }
.wires .loop-bg { fill: var(--bg); }

/* Foco: durante un ciclo, la etapa activa destaca y el resto se atenúa */
.flow.is-running .stage:not(.is-active) { opacity: .62; filter: saturate(.75); }
.flow .stage { transition: opacity .5s, filter .5s, transform .4s, box-shadow .4s; }
.stage:hover { transform: translateY(-2px); box-shadow: 0 1px 2px rgb(20 26 36 / 5%), 0 18px 40px -16px rgb(20 26 36 / 25%); }

@media (max-width: 980px) {
  .hero2 { grid-template-columns: 1fr; padding: 1.5rem 1.2rem; }
  .core { width: 220px; justify-self: center; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) { .kpi-tile strong { font-size: 1.5rem; } }
@media (prefers-reduced-motion: reduce) { .wires .comet, .wires .comet-tail { display: none; } }

/* Ajustes del núcleo */
.core { width: 300px; }
.core::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); filter: blur(18px); z-index: -1; animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.08); opacity: .7; } }
.core-rings .g0 { stop-color: var(--accent); } .core-rings .g1 { stop-color: var(--ai); }
.core-rings .arc { fill: none; stroke: url(#core-grad); stroke-width: 4; stroke-linecap: round; stroke-dasharray: var(--done, 100) 100; transform: rotate(-90deg); transform-origin: 120px 120px; transition: stroke-dasharray .8s; opacity: .9; }
.core:not(.is-running) .core-rings .arc { stroke-dasharray: 100 100; opacity: .35; animation: none; }
.core-center { inset: 27%; }
.core-center .countdown { white-space: pre-line; font-size: 1.3rem; line-height: 1.15; }
.core-node em { top: auto; left: auto; transform: translate(calc(-50% + 7px + var(--ox, 0) * 30px), calc(-50% + 7px + var(--oy, 0) * 22px)); }
.term-body li { display: grid; grid-template-columns: 1.1em minmax(0, 1fr); }
.term-body .txt { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
@media (max-width: 980px) { .core { width: 240px; } }
.hero2 .core { margin-inline: 34px; }
@media (max-width: 980px) { .hero2 .core { margin-inline: auto; } }

/* ───────── Plataformas: elección, publicación manual guiada y entrevista ───────── */
.platform-pick { display: grid; gap: 10px; border: 0; padding: 0; margin: 4px 0 8px; }
.platform-pick legend { font-weight: 700; margin-bottom: 6px; }
.platform-pick .pick { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); cursor: pointer; transition: border-color .2s, background .2s; }
.platform-pick .pick:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.platform-pick .pick span { display: grid; gap: 2px; }
.platform-pick .pick small { color: var(--muted); }
.platform-switch { margin-bottom: 12px; }
.manual-card { border: 1px solid var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.manual-steps { display: grid; gap: 14px; padding-left: 20px; margin: 14px 0; }
.manual-steps li::marker { font-weight: 800; color: var(--accent); }
.copy-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.copy-src { width: 100%; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--ink); resize: vertical; }
.btn.is-copied { border-color: var(--accent); color: var(--accent); }
.form label.check, label.check { display: flex; flex-direction: row; gap: 8px; align-items: center; font-weight: 500; }
label.check input { width: auto; margin: 0; }
.interview label { display: grid; gap: 4px; }
.form label:has(> input[type="checkbox"]), .form label:has(> input[type="radio"]) { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.form label > input[type="checkbox"], .form label > input[type="radio"] { width: auto; margin: 0; flex: none; }
.gen-image { margin: 0 0 16px; }
.gen-image img, .gen-thumb { display: block; width: 100%; max-width: 640px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--surface-2); }
.gen-image figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.gen-thumb { max-width: 320px; margin: 6px 0 10px; }
.plan-pick { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: var(--surface-2); }
.plan-pick h3 { margin: 0; }
.signup .form { margin-top: 1rem; }
.legal h2 { font-size: 1.05rem; margin: 1.2rem 0 .3rem; }

/* ───────── Admin Intelligence (sólo administración) ───────── */
.intel { display: grid; gap: 1rem; }
.intel-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-end; }
.intel-head h1 { margin: .1rem 0 .2rem; }
.intel-head p { margin: 0; }
.intel-eyebrow { font: 700 .72rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.intel-period { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.chip-link { padding: .35rem .7rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: .85rem; font-weight: 600; background: var(--surface); }
.chip-link.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.intel-tabs, .intel-subtabs { display: flex; gap: .2rem; overflow-x: auto; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.intel-tabs a, .intel-subtabs a { padding: .5rem .75rem; white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; border-bottom: 2px solid transparent; }
.intel-tabs a.active, .intel-subtabs a.active { color: var(--ink); border-color: var(--accent); }
.intel-kpis { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.intel-kpi { display: grid; gap: .2rem; align-content: start; padding: .9rem 1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.intel-kpi strong { font-size: 1.55rem; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.intel-kpi .kpi-label { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.intel-kpi .kpi-foot, .intel-kpi .delta { font-size: .78rem; color: var(--muted); }
.intel-kpi .delta.up { color: var(--ok); } .intel-kpi .delta.down { color: var(--bad); }
.intel-kpi details.def summary { font-size: .74rem; color: var(--accent); cursor: pointer; }
.intel-kpi details.def p { font-size: .78rem; margin: .3rem 0 0; }
.intel-state { display: grid; gap: .2rem; padding: .8rem 1rem; border-radius: var(--radius-s); border: 1px dashed var(--line); background: var(--surface-2); font-size: .9rem; }
.intel-state strong { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.intel-state.desactivado, .intel-state.no_configurado { border-color: var(--warn); }
.intel-chart { margin: 0; }
.intel-chart figcaption { font-weight: 700; margin-bottom: .4rem; }
.intel-chart svg { width: 100%; height: auto; }
.intel-chart .axis { stroke: var(--line); }
.intel-chart .tick { fill: var(--muted); font-size: 10px; font-family: var(--mono); }
.intel-chart polyline { fill: none; stroke-width: 2; stroke-linejoin: round; }
.intel-chart .s0 { stroke: var(--accent); } .intel-chart .s1 { stroke: var(--ai); }
.legend { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted); }
.legend .lg::before { content: ""; display: inline-block; width: 10px; height: 3px; margin-right: 6px; vertical-align: middle; background: var(--accent); }
.legend .lg.s1::before { background: var(--ai); }
.intel-bars, .intel-funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.intel-bars li, .intel-funnel li { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: .6rem; align-items: center; font-size: .88rem; }
.intel-bars .bt, .intel-funnel .bt { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.intel-bars .bt i, .intel-funnel .bt i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--track)); border-radius: 999px; }
.intel-bars .bv, .intel-funnel .fv { text-align: right; font-variant-numeric: tabular-nums; }
.intel-funnel .fv small { display: block; color: var(--muted); }
.intel-recs { margin: 0; padding-left: 1.1rem; display: grid; gap: .7rem; }
.intel-recs p { margin: .2rem 0 0; }
.intel-insights { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .9rem; }
.intel-insights .empeora { color: var(--bad); } .intel-insights .mejora { color: var(--ok); }
.intel-shortcuts { display: flex; gap: .8rem; flex-wrap: wrap; font-size: .88rem; }
.intel-cards { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.intel-rec { padding: .9rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); display: grid; gap: .3rem; align-content: start; }
.intel-rec header { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
.intel-rec h3 { margin: .1rem 0; font-size: 1rem; }
.intel-rec p { margin: 0; }
.intel-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; }
.intel-decisions { display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
table.cohort td.heat { background: color-mix(in srgb, var(--accent) calc(var(--h) * 70%), transparent); }
.heat-page { position: relative; aspect-ratio: 3 / 5; max-height: 520px; margin: 0 auto; border-radius: 10px; border: 1px solid var(--line); background: repeating-linear-gradient(0deg, var(--surface-2) 0 24px, var(--surface) 24px 48px); overflow: hidden; }
.heat-page i { position: absolute; width: 5%; height: 5%; background: rgb(240 80 50 / calc(var(--a) * .85)); border-radius: 4px; }
.fd-preview { display: grid; gap: 1rem; }
.fd-preview .fd-btn { display: inline-block; }
.replay-screen { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); overflow: hidden; }
.replay-screen .dot { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: rgb(240 80 50 / .75); box-shadow: 0 0 0 4px rgb(240 80 50 / .2); }
.replay-scroll { position: absolute; right: 6px; top: 6px; bottom: 6px; width: 6px; border-radius: 6px; background: var(--line); }
.replay-scroll i { position: absolute; left: 0; right: 0; height: 12%; border-radius: 6px; background: var(--accent); top: 0; }
.replay-route { position: absolute; left: 10px; top: 8px; font: 600 .8rem var(--mono); color: var(--muted); }
.replay-controls { display: flex; gap: .6rem; align-items: center; margin: .6rem 0; flex-wrap: wrap; }
.replay-controls input[type=range] { flex: 1; min-width: 160px; }
.replay-log { max-height: 240px; overflow: auto; font-size: .82rem; padding-left: 1.2rem; }
.replay-log li.now { font-weight: 700; color: var(--accent); }
.replay-log li.error { color: var(--bad); }
.intel pre { white-space: pre-wrap; font-size: .75rem; }

/* ═════════ Admin Intelligence · diseño de decisión (claro y oscuro) ═════════ */
.theme-toggle { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; transition: color .2s, transform .2s; }
.theme-toggle:hover { color: var(--ink); transform: rotate(-12deg); }
.theme-toggle .ico { width: 18px; height: 18px; }
.theme-toggle .t-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .t-sun { display: none; } :root[data-theme="dark"] .theme-toggle .t-moon { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .theme-toggle .t-sun { display: none; } :root:not([data-theme]) .theme-toggle .t-moon { display: block; } }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.ix { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start; }
.ix-side { position: sticky; top: 76px; display: grid; gap: 14px; padding: 14px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); max-height: calc(100vh - 96px); overflow: auto; }
.ix-brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 10px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.ix-brand strong { display: block; font-size: .98rem; } .ix-brand small { color: var(--muted); font-size: .72rem; }
.ix-brand-dot { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #3b68d8, #ff8a66); box-shadow: 0 8px 20px -10px #3b68d8; }
.ix-group { display: grid; gap: 2px; }
.ix-group-label { font: 700 .66rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--faint); padding: 4px 10px; }
.ix-link { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: .9rem; transition: background .15s, color .15s; }
.ix-link:hover { background: var(--surface-2); color: var(--ink); }
.ix-link.active { background: var(--accent-soft); color: var(--accent); }
.ix-count { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; text-align: center; }
.ix-main { display: grid; gap: 20px; min-width: 0; }
.ix-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ix-head h1 { margin: 0; font-size: 1.75rem; letter-spacing: -.02em; }
.ix-sub { margin: .25rem 0 0; color: var(--muted); }
.ix-period { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg a { padding: .35rem .75rem; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: .84rem; transition: background .2s, color .2s; }
.seg a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.seg-toggle { padding: .42rem .8rem; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-weight: 600; font-size: .84rem; background: var(--surface); }
.seg-toggle.on { border-color: var(--accent); color: var(--accent); }
.ix-updated { display: inline-flex; align-items: center; gap: 6px; font: 600 .74rem var(--mono); color: var(--faint); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: ix-pulse 2.4s infinite; }
@keyframes ix-pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* Héroe de estado */
.ix-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; padding: 22px 24px; border-radius: 22px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.ix-hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(closest-side, var(--hero-glow, rgb(29 138 87 / 16%)), transparent); pointer-events: none; }
.ix-hero.atencion { --hero-glow: rgb(214 140 0 / 18%); } .ix-hero.critico { --hero-glow: rgb(195 59 44 / 20%); }
.ix-hero-status { display: flex; gap: 16px; align-items: flex-start; position: relative; }
.ix-orb { flex: none; width: 46px; height: 46px; border-radius: 50%; margin-top: 4px; background: radial-gradient(circle at 35% 35%, #fff8, transparent 40%), var(--ok); box-shadow: 0 0 0 6px var(--ok-soft), 0 10px 26px -8px var(--ok); animation: ix-breathe 3.2s ease-in-out infinite; }
.ix-hero.atencion .ix-orb { background-color: var(--warn); box-shadow: 0 0 0 6px var(--warn-soft), 0 10px 26px -8px var(--warn); }
.ix-hero.critico .ix-orb { background-color: var(--bad); box-shadow: 0 0 0 6px var(--bad-soft), 0 10px 26px -8px var(--bad); }
@keyframes ix-breathe { 50% { transform: scale(1.06); } }
.ix-eyebrow { margin: 0; font: 700 .7rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.ix-hero h2 { margin: .25rem 0 .6rem; font-size: 1.45rem; letter-spacing: -.02em; }
.ix-pulse { margin: 0; padding: 0; list-style: none; display: grid; gap: .3rem; color: var(--muted); font-size: .92rem; }
.ix-pulse li::before { content: "•"; color: var(--accent); margin-right: .5rem; }
.ix-hero-counts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: center; position: relative; }
.ix-hc { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); text-decoration: none; color: var(--muted); font-size: .8rem; font-weight: 600; transition: transform .2s, border-color .2s; }
.ix-hc:hover { transform: translateY(-2px); border-color: var(--accent); }
.ix-hc b { font-size: 1.6rem; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }
.ix-hc.critico b { color: var(--bad); } .ix-hc.atencion b { color: var(--warn); } .ix-hc.oportunidad b { color: var(--accent); }

/* Indicadores */
.ix-kpis, .intel-kpis { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.ix-kpi { position: relative; display: grid; gap: 6px; align-content: start; padding: 16px 16px 10px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .2s ease, box-shadow .2s ease, border-color .2s; overflow: visible; }
.ix-kpi:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.ix-kpi header { display: flex; align-items: center; gap: 8px; }
.ix-kpi-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); }
.ix-kpi-ic .ico { width: 16px; height: 16px; }
.ix-kpi-label { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ix-kpi-value { font-size: 1.9rem; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ix-kpi-value.is-empty { font-size: 1.15rem; color: var(--faint); padding: .35rem 0; }
.ix-kpi-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; min-height: 1.3em; font-size: .78rem; color: var(--muted); }
.ix-delta { display: inline-flex; gap: 3px; padding: 1px 8px; border-radius: 999px; font-weight: 700; font-size: .74rem; background: var(--surface-2); color: var(--muted); }
.ix-delta.good { background: var(--ok-soft); color: var(--ok); } .ix-delta.bad { background: var(--bad-soft); color: var(--bad); }
.ix-spark { width: 100%; height: 34px; margin-top: 2px; }
.ix-spark .l { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ix-draw 1.2s .2s ease-out forwards; vector-effect: non-scaling-stroke; }
.ix-spark .a { fill: var(--accent); opacity: .1; }
.ix-spark.good .l { stroke: var(--ok); } .ix-spark.good .a { fill: var(--ok); } .ix-spark.bad .l { stroke: var(--bad); } .ix-spark.bad .a { fill: var(--bad); }
.ix-spark-empty { font-size: .72rem; color: var(--faint); height: 34px; display: flex; align-items: flex-end; }
@keyframes ix-draw { to { stroke-dashoffset: 0; } }

/* Explicaciones («i») */
.ix-explain { margin-left: auto; position: relative; }
.ix-explain summary { list-style: none; cursor: pointer; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; color: var(--faint); transition: color .15s, background .15s; }
.ix-explain summary::-webkit-details-marker { display: none; }
.ix-explain summary:hover, .ix-explain[open] summary { color: var(--accent); background: var(--accent-soft); }
.ix-explain summary .ico { width: 16px; height: 16px; }
.ix-pop { position: absolute; right: 0; top: 30px; z-index: 30; width: min(320px, 80vw); padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 18px 40px -16px rgb(0 0 0 / 35%); font-size: .84rem; line-height: 1.5; animation: ix-in .18s ease-out; }
.ix-pop strong { display: block; margin-bottom: .3rem; }
.ix-pop p { margin: .35rem 0 0; color: var(--muted); } .ix-pop b { color: var(--ink); }
.ix-pop .ix-src { font-size: .74rem; color: var(--faint); }
@keyframes ix-in { from { opacity: 0; transform: translateY(-4px); } }

/* Secciones y tarjetas de decisión */
.ix-section { display: grid; gap: 12px; }
.ix-section-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ix-section-head h2 { display: flex; gap: 8px; align-items: center; margin: 0; font-size: 1.15rem; }
.ix-hint { font-size: .84rem; color: var(--muted); }
.ix-brief-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); }
.ix-brief { display: grid; gap: 10px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); box-shadow: var(--shadow); animation: ix-rise .35s ease-out both; }
.ix-brief.critico { border-left-color: var(--bad); } .ix-brief.atencion { border-left-color: var(--warn); } .ix-brief.info { border-left-color: var(--faint); }
.ix-brief:nth-child(2) { animation-delay: .05s; } .ix-brief:nth-child(3) { animation-delay: .1s; } .ix-brief:nth-child(4) { animation-delay: .15s; }
@keyframes ix-rise { from { opacity: 0; transform: translateY(8px); } }
.ix-brief header { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: .76rem; }
.ix-sev { display: inline-flex; gap: 5px; align-items: center; padding: 2px 9px; border-radius: 999px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--accent-soft); color: var(--accent); }
.ix-sev .ico { width: 14px; height: 14px; }
.ix-brief.critico .ix-sev { background: var(--bad-soft); color: var(--bad); } .ix-brief.atencion .ix-sev { background: var(--warn-soft); color: var(--warn); } .ix-brief.info .ix-sev { background: var(--surface-2); color: var(--muted); }
.ix-area { color: var(--muted); font-weight: 600; } .ix-conf { margin-left: auto; color: var(--faint); }
.ix-brief h3 { margin: 0; font-size: 1.05rem; }
.ix-why { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: .88rem; }
.ix-why dt { color: var(--faint); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; padding-top: .1rem; }
.ix-why dd { margin: 0; color: var(--ink); }
.ix-why dd.ix-do { font-weight: 700; color: var(--accent); }
.ix-brief footer { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 8px; border-top: 1px dashed var(--line); }
.ix-quick { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ix-quick select { padding: .3rem .4rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: .8rem; }
.ix-quick .ico { width: 14px; height: 14px; }
.btn.ghost { background: transparent; }
.ix-evidence { flex-basis: 100%; font: .72rem var(--mono); color: var(--faint); overflow-wrap: anywhere; }
.ix-allgood { display: flex; gap: 14px; align-items: center; padding: 18px 20px; border-radius: 18px; background: var(--ok-soft); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.ix-allgood .ico { width: 28px; height: 28px; }
.ix-allgood strong { display: block; color: var(--ink); } .ix-allgood span { color: var(--muted); font-size: .9rem; }
.ix-cols { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.ix-card { border-radius: 18px; }
.ix-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: .6rem; }
.ix-card-head h2 { display: flex; gap: 8px; align-items: center; margin: 0; }
.ix-list { margin: 0 0 .6rem; padding-left: 1.1rem; display: grid; gap: .3rem; }
.ix-read { display: flex; gap: 8px; align-items: flex-start; margin: .7rem 0 0; padding: .55rem .75rem; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: .84rem; }
.ix-read .ico { width: 16px; height: 16px; color: var(--warn); margin-top: .1rem; }
.ix-shortcuts { display: flex; gap: .4rem; flex-wrap: wrap; }
.ix-shortcuts a { padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: .82rem; font-weight: 600; }
.ix-state { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line); background: var(--surface-2); font-size: .9rem; }
.ix-state strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ix-state-ic { color: var(--accent); } .ix-state.desactivado .ix-state-ic, .ix-state.no_configurado .ix-state-ic { color: var(--warn); }

/* Gráfico interactivo */
.ix-chart { margin: 0; }
.ix-chart figcaption { font-weight: 700; margin-bottom: .5rem; }
.ix-chart-box { position: relative; }
.ix-chart svg { width: 100%; height: auto; display: block; touch-action: pan-y; }
.ix-chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.ix-chart .tick { fill: var(--faint); font: 10px var(--mono); }
.ix-chart .line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: ix-draw 1.1s ease-out forwards; }
.ix-chart .line.s0, .gs0 { stroke: var(--accent); stop-color: var(--accent); } .ix-chart .line.s1, .gs1 { stroke: var(--ai); stop-color: var(--ai); }
.ix-chart .cursor { stroke: var(--muted); stroke-dasharray: 2 3; transition: opacity .15s; }
.ix-tip { position: absolute; top: 6px; pointer-events: none; padding: 8px 10px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: .78rem; line-height: 1.4; box-shadow: 0 10px 24px -10px rgb(0 0 0 / 40%); white-space: nowrap; transform: translateX(-50%); }
.ix-tip b { display: block; font-family: var(--mono); font-size: .72rem; opacity: .75; }
.ix-legend { display: flex; gap: 14px; margin-top: .4rem; font-size: .8rem; color: var(--muted); }
.ix-legend .lg::before { content: ""; display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--accent); }
.ix-legend .lg.s1::before { background: var(--ai); }
.ix-data summary { font-size: .8rem; color: var(--muted); cursor: pointer; margin-top: .4rem; }
.intel-bars .bt i, .intel-funnel .bt i { width: var(--w, auto); animation: ix-grow .9s ease-out both; }
@keyframes ix-grow { from { width: 0; } }

@media (max-width: 960px) {
  .ix { grid-template-columns: 1fr; gap: 14px; }
  .ix-side { position: static; max-height: none; display: flex; gap: 6px; overflow-x: auto; padding: 8px; border-radius: 14px; }
  .ix-brand, .ix-group-label { display: none; }
  .ix-group { display: flex; gap: 4px; }
  .ix-link { white-space: nowrap; padding: 7px 10px; }
  .ix-hero { grid-template-columns: 1fr; padding: 18px; }
  .ix-why { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ix-orb, .live-dot, .ix-brief, .ix-pop { animation: none; }
  .ix-spark .l, .ix-chart .line { animation: none; stroke-dashoffset: 0; }
  .intel-bars .bt i, .intel-funnel .bt i { animation: none; }
  .ix-kpi, .ix-hc { transition: none; }
}
.ix-state .ico, .ix-chart .ix-state svg { width: 20px; height: 20px; }
.ix-main { position: relative; z-index: 2; }
.ix-side { z-index: 1; }
.ix-pop.flip { right: auto; left: 0; }
.ix-discard { display: inline-flex; gap: 6px; align-items: center; padding-left: 8px; border-left: 1px solid var(--line); font-size: .78rem; color: var(--muted); }
@media (max-width: 640px) {
  .ix-kpis, .intel-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ix-kpi { padding: 12px 12px 8px; }
  .ix-kpi-value { font-size: 1.45rem; }
  .ix-kpi-label { font-size: .7rem; }
  .ix-kpi .ix-kpi-ic { display: none; }
  .ix-hero h2 { font-size: 1.2rem; }
  .ix-pop { position: fixed; left: 16px !important; right: 16px !important; top: auto; bottom: 16px; width: auto; }
}
.ix-kpi:has(.ix-explain[open]), .ix-card:has(.ix-explain[open]) { z-index: 20; }
.ix-card { position: relative; }

/* Competencia */
.lead { font-size: 1.05rem; max-width: 72ch; margin: .2rem 0 .4rem; }
td.actions { white-space: nowrap; }
td.actions form + form { margin-left: .3rem; }
.inline-form > p { flex-basis: 100%; margin: 0; }
.inline-form label { flex: 1 1 280px; }
