@font-face { font-family: "Red Hat Display"; src: url("../fonts/red-hat-display.7e28f9c03ec4.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Red Hat Text"; src: url("../fonts/red-hat-text.b8508430d095.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Red Hat Mono"; src: url("../fonts/red-hat-mono.fae41f897664.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
:root {
  --red: #ee0000; --cta: #a60000; --cta-hover: #7c0000;
  --ink: #151515; --ink-2: #4d4d4d; --muted: #707070;
  --line: #e0e0e0; --surface: #f2f2f2; --white: #fff; --link: #0066cc;
  --r: 3px;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--surface); color: var(--ink);
  font: 400 1rem/1.5 "Red Hat Text", Helvetica, Arial, sans-serif; }
h1, h2, h3 { font-family: "Red Hat Display", Helvetica, Arial, sans-serif; font-weight: 700; margin: 0; line-height: 1.25; }
a, .btn.link { color: var(--ink); text-decoration: underline 2px var(--red); text-underline-offset: .25em; }
a:not([class]):hover, .btn.link:hover, .rowbtn:hover { color: var(--cta); }
.rowbtn:hover { text-decoration: underline 2px var(--red); text-underline-offset: .25em; }

.btn { font: 500 1rem "Red Hat Text", sans-serif; padding: 10px 20px; border-radius: var(--r); border: 1px solid transparent; cursor: pointer;
  background: var(--cta); color: #fff; }
.btn:hover { background: var(--cta-hover); }
a.btn { display: inline-block; text-decoration: none; }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.secondary:hover { background: var(--surface); }
.btn.link { background: none; color: var(--ink); padding: 0; border: 0; }
.btn.danger { background: transparent; color: var(--cta); border-color: var(--cta); }
.btn.danger:hover { background: #fce3e3; }
.btn.sm { padding: 6px 14px; font-size: .875rem; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 4px; }
input, select, textarea { font: inherit; color: inherit; width: 100%; padding: 8px 12px; border: 1px solid #a3a3a3; border-radius: var(--r); background: #fff; }
input:focus, select:focus, textarea:focus { border-color: var(--link); outline: none; box-shadow: inset 0 -2px 0 var(--link); }
.field { margin-bottom: 16px; }
.inline { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
.inline > .grow { flex: 1; min-width: 180px; }
.inline > select { width: auto; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.card + .card { margin-top: 24px; }
.card h2 { font-size: 1.25rem; margin-bottom: 16px; }
.muted { color: var(--muted); font-size: .875rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 500; padding: 2px 10px; border-radius: 64px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); vertical-align: middle; }

/* Auth: panel oscuro con la propuesta a la izquierda, formulario a la derecha */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr;
  grid-template-areas: "brand form" "intro form"; background: var(--white); }
.auth-brand { grid-area: brand; background: var(--ink); padding: 56px 72px 0; }
.auth .intro { grid-area: intro; background: var(--ink); color: #fff; padding: 48px 72px 56px; display: flex; flex-direction: column; gap: 48px; }
.auth .pitch { display: grid; gap: 20px; max-width: 640px; margin-block: auto; }
.auth .intro h1 { font-size: clamp(2.25rem, 4.5vw, 4rem); line-height: 1.05; letter-spacing: -.01em; }
.auth .pitch p { margin: 0; color: #c7c7c7; font-size: 1.25rem; }
.auth .flow { width: 100%; height: auto; margin-top: 20px; font-size: 16px; }
.auth .foot { margin: 0; display: flex; gap: 24px; font-size: .875rem; color: #a3a3a3; }
.auth .foot a { color: inherit; }
.auth-form { grid-area: form; display: grid; place-items: center; padding: 64px; }
.auth .card { width: 100%; max-width: 400px; border: 0; padding: 0; background: none; }
.auth .card h2 { font-size: 2rem; margin-bottom: 24px; }
.auth .card .btn:not(.link) { width: 100%; min-height: 48px; }
.auth .card input:not([type=checkbox]), .auth .card select { min-height: 48px; }
.auth .alt { margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.error h1::after { content: ""; display: block; width: 48px; height: 4px; background: var(--red); margin-top: 16px; }
.error .card { border-top: 3px solid var(--red); margin: 0; }
.providers { display: grid; gap: 8px; }
.providers .btn { text-align: center; }
.divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: .875rem; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.code-input { max-width: 12ch; font: 500 1.5rem "Red Hat Mono", monospace; letter-spacing: .3em; }
#captcha:not(:empty) { margin-bottom: 16px; }
.totp { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.totp p { margin: 0 0 12px; }
.qr svg { display: block; border: 1px solid var(--line); border-radius: var(--r); }
.recovery { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.recovery code { font: 500 1rem "Red Hat Mono", monospace; }
.try { margin: 24px 0; background: var(--surface); }

/* Shell: barra lateral de módulos + contenido */
.brand { display: flex; align-items: center; gap: .6rem; font: 700 1.25rem "Red Hat Display", sans-serif; color: #fff; text-decoration: none; }
.brand i { width: 32px; height: 32px; background: url("../img/logo-negativo.7e10a6f1e83b.svg") center / contain no-repeat; }
.shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; background: var(--ink); }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--ink); color: #fff;
  display: flex; flex-direction: column; gap: 20px; padding: 20px 16px; }
.brand.dark { color: var(--ink); }
.brand.dark i { background-image: url("../img/logo.0c101d82b52e.svg"); }
/* Punto de la i en rojo: la misma "i" encima, pintada en rojo solo en su parte superior. */
.brand .i { position: relative; }
.brand .i::after { content: "i" / ""; position: absolute; left: 0; top: 0; color: transparent;
  background: linear-gradient(var(--red) 36%, transparent 0); -webkit-background-clip: text; background-clip: text; }
.sidebar .brand { padding: 0 8px; }
.org-menu { position: relative; }
.org-trigger { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #1f1f1f; color: #fff;
  border: 1px solid #383838; border-radius: var(--r); font: inherit; text-align: left; cursor: pointer; }
.org-trigger:hover, .org-trigger[aria-expanded="true"] { border-color: #a3a3a3; }
.org-mark { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: var(--r); background: #a60000; color: #fff;
  font: 700 .875rem "Red Hat Display", sans-serif; }
.org-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.org-text b { font-weight: 500; font-size: .9375rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org-text small { font-size: .75rem; color: #a3a3a3; }
.org-pop { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5; padding: 6px; background: #1f1f1f;
  border: 1px solid #383838; border-radius: var(--r); box-shadow: 0 12px 32px #0008; }
.org-pop-title { display: block; padding: 8px 10px 6px; font-size: .6875rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #a3a3a3; }
.org-pop [role^="menuitem"] { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; background: none;
  border: 0; border-radius: var(--r); color: #e0e0e0; font: inherit; font-size: .875rem; text-align: left; text-decoration: none; cursor: pointer; }
.org-pop [role^="menuitem"]:hover, .org-pop [role^="menuitem"]:focus-visible, .org-pop [aria-checked="true"] { background: #383838; color: #fff; }
.org-pop .org-mark { width: 28px; height: 28px; background: #383838; font-size: .75rem; }
.org-pop [aria-checked="true"] .org-mark { background: #a60000; }
.org-pop [aria-checked="false"]:hover .org-mark { background: #4d4d4d; }
.org-pop .check { display: grid; color: var(--red); }
.org-pop hr { margin: 6px 0; border: 0; border-top: 1px solid #383838; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; color: #e0e0e0; text-decoration: none; border-radius: var(--r); }
.nav a:hover { background: #1f1f1f; color: #fff; }
.nav a[aria-current] { background: #383838; color: #fff; font-weight: 500; box-shadow: inset 3px 0 0 var(--red); }
.nav-title { padding: 16px 12px 6px; font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #a3a3a3; }
.nav-empty { padding: 4px 12px; font-size: .875rem; color: #a3a3a3; }
.nav-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid #383838; }
.me { display: flex; align-items: center; gap: 12px; padding: 8px 0 0 12px; }
.me .email { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; color: #c7c7c7; }
/* Enlace a la cuenta: bloque (no flex, como .nav a) para que funcione la elipsis. */
.me a.email { display: block; line-height: 44px; margin-left: -8px; padding: 0 8px; text-decoration: none; border-radius: var(--r); }
.me a.email:hover { background: #1f1f1f; color: #fff; }
.me a.email[aria-current] { background: #383838; color: #fff; }
.avatar { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #383838; color: #fff; font: 700 .875rem "Red Hat Display", sans-serif; }
.icon-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: none; border: 0; border-radius: var(--r); color: inherit; cursor: pointer; }
.icon-btn:hover { background: var(--surface); }
.sidebar .icon-btn { color: #c7c7c7; }
.sidebar .icon-btn:hover { background: #1f1f1f; color: #fff; }
.main { background: #fff; }
.topbar { height: 72px; display: flex; align-items: center; gap: 8px; padding: 0 48px; border-bottom: 1px solid var(--line); }
.crumb { font-size: .875rem; color: var(--ink-2); }
.crumb span { color: #a3a3a3; }
.crumb b { color: var(--ink); font-weight: 500; }
.menu { display: none; margin-left: -12px; }
.content { padding: 48px; }
.content > section + section { margin-top: 40px; }
.content > .card { margin-top: 24px; }
.content > section > h2 { font-weight: 500; font-size: 1.25rem; margin-bottom: 16px; }

/* Inicio */
.greeting { font-weight: 500; font-size: 2.25rem; }
.lead { margin: 8px 0 40px; font-size: 1.0625rem; color: var(--ink-2); }
.quick { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.tile { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--surface); border: 1px solid transparent; border-radius: var(--r); color: var(--ink); text-decoration: none; }
.tile:hover { border-color: var(--ink); }
/* Primeros pasos del inicio */
.onboarding { display: grid; gap: 20px; padding: 20px 24px; }
.onboarding-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.onboarding-head h2 { margin: 0; font-size: 1rem; }
.onboarding-head .btn:not(.link) { margin-left: auto; padding: 8px 16px; font-size: .875rem; }
/* Ocultar: discreto, junto al contador y lejos del botón principal. */
.onboarding-head .hide-steps { font-size: .75rem; color: var(--muted); text-decoration: none; opacity: .8; }
.onboarding-head .hide-steps:hover { opacity: 1; color: var(--ink); text-decoration: underline 1px; }
.onboarding-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.onboarding-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 8px; text-align: center; font-size: .875rem; color: var(--ink-2); }
/* Conector con el paso anterior: oscuro si ese paso ya está hecho. */
.onboarding-steps li + li::before { content: ""; position: absolute; top: 13px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.onboarding-steps li.done + li::before { background: var(--ink); }
.step-mark { position: relative; z-index: 1; width: 28px; height: 28px; flex: none; display: grid; place-items: center; border: 1px solid #a3a3a3; border-radius: 50%; background: #fff; font-size: .8125rem; }
.step-mark svg { width: 16px; height: 16px; }
.onboarding-steps .done .step-mark { background: var(--ink); border-color: var(--ink); color: #fff; }
.onboarding-steps .current { color: var(--ink); font-weight: 700; }
.onboarding-steps .current .step-mark { border: 2px solid var(--red); }
/* Casilla con texto (términos al registrarse) */
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; margin-top: 4px; accent-color: var(--cta); }
/* Enlaces-botón seguidos fuera de un flex con gap (acceso, celdas de tabla). */
td .btn.link + .btn.link { margin-left: 16px; }
.auth .btn + .btn.link { margin-top: 12px; }
/* Página legal (contenido estático, sin JS) */
.legal { max-width: 720px; width: calc(100% - 32px); margin: 64px auto; }
.legal h1 { margin-top: 32px; }
/* Páginas de error (templates/4xx/5xx y static/errors/50x.html): el aspecto del acceso, sin JS */
.error { min-height: 100vh; display: flex; flex-direction: column; padding: 40px 24px; }
.error main { flex: 1; display: grid; place-items: center; }
.error .card { width: 100%; max-width: 560px; padding: clamp(24px, 5vw, 40px); display: grid; gap: 16px; }
.error .code { font: .875rem "Red Hat Mono", monospace; color: var(--ink-2); letter-spacing: .08em; }
.error h1 { font-size: 2.25rem; }
.error p { margin: 0; font-size: 1.125rem; color: var(--ink-2); }
.error .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.tile.outline { background: #fff; border-color: var(--line); }
.tile.outline:hover { border-color: var(--ink); }
.tile-icon { width: 44px; height: 44px; flex: none; display: grid; place-items: center; background: var(--ink); color: #fff; border-radius: var(--r); }
.tile.outline .tile-icon { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.tile b { display: block; font: 700 1.0625rem "Red Hat Display", sans-serif; }
.tile small { display: block; font-size: .875rem; color: var(--ink-2); }
.empty { padding: 48px 24px; border: 1px dashed #a3a3a3; border-radius: var(--r); text-align: center; color: var(--ink-2); }
.empty b { display: block; margin-bottom: 4px; font: 500 1.125rem "Red Hat Display", sans-serif; color: var(--ink); }

/* Constructor de decisiones */
.kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kind { position: relative; display: flex; align-items: center; gap: 16px; margin: 0; padding: 20px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--r); cursor: pointer; font-size: 1rem; font-weight: 400; }
.kind:hover { border-color: var(--ink); }
.kind input { position: absolute; opacity: 0; pointer-events: none; }
.kind:has(:focus-visible) { outline: 2px solid var(--link); outline-offset: 2px; }
.kind .tile-icon { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.kind:has(:checked) { border-color: var(--ink); box-shadow: inset 0 4px 0 var(--red); }
.kind:has(:checked) .tile-icon { background: var(--ink); color: #fff; }
.kind b { display: block; font: 700 1.0625rem "Red Hat Display", sans-serif; }
.kind small { display: block; font-size: .875rem; color: var(--ink-2); }
.build { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; margin-top: 24px; }
.build > .card { margin: 0; }
.build .muted { margin: 0 0 12px; }
#preview { position: sticky; top: 24px; background: var(--surface); border-color: transparent; }
#preview h3 { font-size: .75rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
#preview .muted { font-size: 1rem; color: var(--ink); }
#preview p:last-child { margin-bottom: 0; }
.label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: 4px; }
textarea { resize: vertical; }
input[type="range"] { padding: 0; accent-color: var(--cta); }
fieldset { border: 0; margin: 0; min-width: 0; }
fieldset.card { padding: 24px; }
.card h2:not(:first-child) { margin-top: 32px; }
.result { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.items { list-style: none; margin: 0 0 16px; padding: 0; }
.items li { display: grid; grid-template-columns: 28px minmax(0, 1fr) 44px; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.items li:first-child { border-top: 1px solid var(--line); }
.item-fields { display: grid; gap: 6px; }
.item-fields input { font-weight: 500; }
.item-n { width: 28px; height: 28px; margin-top: 6px; display: grid; place-items: center; font: 700 .875rem "Red Hat Display", sans-serif; }
.score .item-n { background: var(--ink); color: #fff; border-radius: var(--r); }
.choice .item-n { width: 18px; height: 18px; margin: 11px 5px 0; border: 2px solid #a3a3a3; border-radius: 50%; }
.items .icon-btn:disabled { opacity: .35; cursor: not-allowed; background: none; }
.meter { position: relative; display: block; height: 8px; margin: 16px 0; background: #fff; border-radius: 4px; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: inherit; }
.meter .mark { position: absolute; top: -6px; bottom: -6px; width: 3px; margin-left: -1px; background: var(--red); }
.verdict { padding: 2px 12px; border-radius: 64px; background: var(--ink); color: #fff; }
.probs { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.probs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.probs .meter { grid-column: 1 / -1; margin: 0; height: 6px; }
.probs li:not(.top) .meter i { background: #a3a3a3; }
.probs .top { font-weight: 500; }
.scale { position: relative; height: 8px; margin: 24px 12px 40px; background: linear-gradient(90deg, #fff, var(--ink)); border-radius: 4px; }
.scale .tick { position: absolute; top: 16px; translate: -50%; font: 700 .875rem "Red Hat Display", sans-serif; }
.scale .tick::before { content: ""; position: absolute; top: -16px; left: 50%; width: 2px; height: 8px; margin-left: -1px; background: var(--ink-2); }
.scale .mark { position: absolute; top: 50%; width: 16px; height: 16px; translate: -50% -50%; background: var(--red); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 1px 3px #0005; }

/* Decisiones: lista, ficha y asistente */
.btn:disabled { opacity: .5; cursor: not-allowed; }
.lead-sm { margin: 6px 0 0; max-width: 720px; color: var(--ink-2); font-size: 1.0625rem; }
.block { display: block; }
.ink { color: var(--ink); }
.grow { flex: 1; }
.label-up { display: block; font-size: .75rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.error-text { color: var(--cta); font-size: .875rem; }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.two > .card { margin: 0; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.toolbar input { max-width: 380px; }
.seg { display: inline-flex; border: 1px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px; border: 0; background: #fff; font: 500 .875rem "Red Hat Text", sans-serif; color: var(--ink); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg svg { width: 18px; height: 18px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 500; color: var(--ink-2); vertical-align: middle; font-family: "Red Hat Text", sans-serif; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #a3a3a3; }
.status.on { color: #2d5411; }
.status.on::before { background: #3d7317; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border: 1px solid #a3a3a3; border-radius: 64px; font-size: .8125rem; background: #fff; }
.chip svg, .kind-label svg, .qlist svg, .recipe-q svg, .fan svg { width: 14px; height: 14px; flex: none; }
.kind-label { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 500; color: var(--ink-2); }
.badge.auto { background: #3d7317; border-color: #3d7317; color: #fff; }
.badge.review { background: #f0ab00; border-color: #f0ab00; color: var(--ink); }
.badge.error { background: #fce3e3; border-color: var(--cta); color: var(--cta); }

.dcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.dcard { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); text-decoration: none; }
.dcard:hover { border-color: var(--ink); }
.dcard .muted { font-size: .875rem; }
.dcard-top, .dcard-foot { display: flex; justify-content: space-between; gap: 8px; font-size: .8125rem; }
.dcard-name { font: 700 1.1875rem "Red Hat Display", sans-serif; }
.dcard-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); color: var(--ink-2); }
.dcard.new { align-items: center; justify-content: center; text-align: center; background: transparent; border: 1px dashed #a3a3a3; min-height: 220px; }
.dcard.new .tile-icon { background: #fff; color: var(--ink); border: 1px solid var(--ink); }
.qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9375rem; }
.qlist li { display: flex; gap: 10px; align-items: center; min-width: 0; }
.qlist li > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qicon { width: 26px; height: 26px; flex: none; display: grid; place-items: center; border: 1px solid var(--ink); border-radius: var(--r); }

.dtable { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; }
.card.flush { padding: 0; overflow: hidden; }
.dtable > .card { margin: 0; }
.card.flush th, .card.flush td { padding-inline: 16px; }
.dtable td:last-child { text-align: left; }
.dtable tr.sel td { background: #f5f9ff; }
.dtable tr.sel td:first-child { box-shadow: inset 3px 0 0 var(--link); }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rowbtn { padding: 0; border: 0; background: none; font: 700 .9375rem "Red Hat Display", sans-serif; color: var(--ink); text-align: left; cursor: pointer; }
.summary { position: sticky; top: 24px; display: grid; gap: 14px; }
.card.summary h2 { margin: 0; }
.summary p { margin: 0; }
.recipe { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: r; }
.recipe > li { position: relative; padding-left: 40px; display: grid; gap: 8px; counter-increment: r; }
.recipe > li::before { content: counter(r); position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: #fff; font: 700 .8125rem "Red Hat Display", sans-serif; }
.recipe-q { display: grid; gap: 6px; padding: 10px 12px; background: var(--surface); border-radius: var(--r); }
.recipe-q b { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.rule-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .875rem; }
.dtable tr[data-click] { cursor: pointer; }
.dtable tr[data-click]:not(.sel):hover td { background: var(--surface); }

.head h1 .status { margin-left: 8px; }
.flow { display: grid; grid-template-columns: 220px minmax(0, 1fr); margin-top: 16px; }
.flow-in { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 20px; background: var(--surface); border-radius: var(--r); }
.flow-in b { font: 700 1.0625rem "Red Hat Display", sans-serif; }
.flow-qs { display: grid; gap: 12px; }
.flow-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px 290px; align-items: center; }
.flow-arrow { display: grid; place-items: center; color: #a3a3a3; }
.flow-q { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); }
.flow-q b { font-weight: 500; }
.flow-rule { display: grid; gap: 8px; font-size: .875rem; }
.flow-rule span { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); border-radius: var(--r); }
.links { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.links li { display: grid; gap: 2px; }
.links a { font-weight: 500; }

.stepper { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.stepper button { width: 100%; height: 100%; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 0; border-top: 4px solid var(--line); background: #fff; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.stepper button:disabled { color: var(--muted); cursor: not-allowed; }
.stepper button[aria-current="step"] { border-top-color: var(--red); }
.stepper button.done { border-top-color: var(--ink); }
.stepper .n { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 2px solid currentColor; font: 700 .875rem "Red Hat Display", sans-serif; }
.stepper [aria-current="step"] .n { background: var(--red); border-color: var(--red); color: #fff; }
.stepper .done .n { background: var(--ink); border-color: var(--ink); color: #fff; }
.stepper .n svg { width: 16px; height: 16px; }
.stepper b { display: block; font-size: .9375rem; font-weight: 500; }
.stepper small { display: block; font-size: .75rem; color: var(--ink-2); }
.wizard h2 { font-size: 1.625rem; margin: 0; }
.wizard > .lead-sm { margin-bottom: 24px; }
.wfoot { display: flex; align-items: center; gap: 16px; margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
#wside { position: sticky; top: 24px; }
.help h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin-bottom: 8px; }
.help h3 svg { color: var(--link); }
.help p, .help ul { margin: 0 0 12px; color: var(--ink-2); font-size: .9375rem; }
.help ul { padding-left: 18px; display: grid; gap: 6px; }
.help b { color: var(--ink); }
.flowline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .8125rem; font-weight: 500; }
.flowline span { padding: 3px 10px; background: var(--surface); border-radius: var(--r); color: var(--ink); }
.flowline .dark { background: var(--ink); color: #fff; }
.fan { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; color: #a3a3a3; }
.fan-in { padding: 8px 10px; background: var(--ink); color: #fff; border-radius: var(--r); font-size: .8125rem; font-weight: 500; max-width: 110px; overflow-wrap: anywhere; }
.help .fan ul { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.fan li { display: flex; gap: 8px; align-items: center; padding: 6px 10px; background: var(--surface); border-radius: var(--r); font-size: .8125rem; color: var(--ink); }
.fan li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum { margin: 8px 0 0; display: grid; gap: 4px; font-size: .9375rem; }
.sum dt { margin-top: 8px; font-size: .75rem; font-weight: 500; color: var(--muted); text-transform: uppercase; }
.sum dd { margin: 0; }
.sum ol { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 8px; }
.qcards { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 12px; }
.qcard { border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.qcard.open { border-color: var(--ink); box-shadow: inset 0 3px 0 var(--red); }
.qcard-head { display: flex; align-items: center; gap: 14px; padding: 12px 14px; }
.qcard-head .tile-icon { width: 40px; height: 40px; }
.qhead { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; margin: 0; }
.qhead b { font-weight: 500; }
.qhead small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qcard-body { padding: 18px 16px 20px 68px; border-top: 1px solid var(--line); }
.qcard-body .two { margin-top: 0; gap: 16px; }
.kinds-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 16px; width: 100%; }
.kinds-seg button { justify-content: flex-start; text-align: left; padding: 8px 12px; }
.kinds-seg small { display: block; font-weight: 400; font-size: .75rem; opacity: .8; }
.add-box { padding: 20px; border: 1px dashed #a3a3a3; border-radius: var(--r); display: grid; gap: 12px; }
button.kind { font: inherit; color: inherit; text-align: left; }
.suggest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.pill { min-height: 36px; padding: 0 14px; border: 1px solid #a3a3a3; background: var(--surface); border-radius: 64px; font: 500 .875rem "Red Hat Text", sans-serif; color: var(--ink); cursor: pointer; }
.pill:hover { border-color: var(--ink); }
.rule-card { padding-bottom: 14px; }
.rule-card input[type="range"], .rule-card .zones { margin: 0 14px; width: calc(100% - 28px); }
.th-out { font: 700 1.5rem "Red Hat Display", sans-serif; white-space: nowrap; }
.zones { display: flex; height: 28px; margin-top: 8px; border-radius: var(--r); overflow: hidden; font-size: .8125rem; font-weight: 500; }
.zones span { display: flex; align-items: center; padding: 0 10px; white-space: nowrap; overflow: hidden; }
.zones span:first-child { background: #fdf0d0; color: #5c4400; }
.zones span:last-child { flex: 1; justify-content: flex-end; background: var(--ink); color: #fff; }
.tally { margin: 24px 0 12px; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.results-grid .result { margin: 0; padding: 16px; border: 0; background: var(--surface); border-radius: var(--r); }
.results-grid .meter, .results-grid .probs .meter { background: #fff; }
.result p { margin: 8px 0; }

/* Historial: pruebas y ejecuciones */
.history { margin-top: 40px; }
.more { text-align: center; margin-top: 16px; }
.history .head h2 { font-size: 1.25rem; }
.head select { width: auto; max-width: 320px; }
.legend { display: flex; gap: 16px; margin: 0 0 12px; font-size: .875rem; color: var(--ink-2); }
.answer { display: inline-flex; align-items: center; gap: 6px; font-size: .875rem; }
.answer::before { content: ""; width: 10px; height: 10px; flex: none; border-radius: 50%; }
.answer.auto::before { background: #3d7317; }
.answer.review::before { background: #f0ab00; box-shadow: inset 0 0 0 2px #b07d00; }
.runs { background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.run + .run { border-top: 1px solid var(--line); }
.run summary { display: grid; grid-template-columns: 170px minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px; align-items: center; padding: 14px 16px; cursor: pointer; }
.run[open] summary { background: var(--surface); }
.run-what b { display: block; }
.run-what small { color: var(--muted); }
.run-answers { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.run-body { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; padding: 16px 16px 20px; }
.run-body dl { margin: 0; }
.run-body dt { font-size: .75rem; font-weight: 500; color: var(--muted); text-transform: uppercase; }
.run-body dd { margin: 2px 0 12px; white-space: pre-wrap; }
.run-body .result:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stats div { padding: 16px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); }
.stats b { display: block; font: 700 1.75rem "Red Hat Display", sans-serif; }
.stats span { font-size: .875rem; color: var(--ink-2); }

/* Integraciones */
code { font-family: "Red Hat Mono", ui-monospace, monospace; font-size: .875rem; }
code.key { display: block; margin-top: 8px; padding: 8px 12px; background: var(--surface); border-radius: var(--r); overflow-wrap: anywhere; }
pre.code { margin: 4px 0 16px; padding: 16px; background: var(--ink); color: #e0e0e0; border-radius: var(--r); font: .8125rem/1.6 "Red Hat Mono", ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.card .inline { margin-top: 16px; }

/* Organización */
.head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.head h1 { font-size: 1.75rem; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .875rem; font-weight: 500; color: var(--ink-2); border-bottom: 2px solid var(--ink); padding: 8px; }
td { padding: 12px 8px; border-bottom: 1px solid var(--line); }
td select { width: auto; }
.card form + table { margin-top: 24px; }
td:last-child { text-align: right; }
.notice { background: #fff; border-left: 4px solid var(--link); padding: 16px 24px; margin-bottom: 24px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap; box-shadow: 0 1px 2px #0002; }
.notice p { margin: 0; flex: 1; }
.notice input { width: auto; }
.danger-zone { display: flex; gap: 8px; flex-wrap: wrap; }

dialog.modal { width: min(560px, calc(100% - 32px)); padding: 28px 32px 32px; border: 0; border-top: 4px solid var(--red); border-radius: var(--r); color: var(--ink); box-shadow: 0 8px 32px #0005; }
dialog.modal::backdrop { background: #15151599; }
dialog.modal form { display: grid; gap: 20px; }
dialog.modal p { margin: 0; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; }
.modal-head h2 { flex: 1; font-size: 1.375rem; padding-top: 6px; }
.modal-head .icon-btn { margin: -2px -12px 0 0; color: var(--ink-2); }
.danger-ico { color: var(--cta); padding-top: 8px; }
dialog.modal.info { border-top-color: var(--link); }
.modal.info .danger-ico { color: var(--link); }
.alert { padding: 14px 16px; background: #fce3e3; border-radius: var(--r); font-size: .9375rem; }
.alert b { font-weight: 500; }
.facts { margin: 0; padding: 16px; background: var(--surface); border-radius: var(--r); display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 16px; font-size: .875rem; }
.facts dt { color: var(--ink-2); }
.facts dd { margin: 0; }
code.chip { padding: 1px 6px; background: var(--surface); border-radius: var(--r); }
.modal-foot { display: flex; align-items: center; gap: 24px; }
#flash { position: fixed; bottom: 24px; right: 24px; padding: 12px 20px; border-radius: var(--r); background: var(--cta); color: #fff;
  box-shadow: 0 4px 12px #0003; opacity: 0; translate: 0 8px; transition: .2s; pointer-events: none; }
#flash.ok { background: var(--ink); border-left: 4px solid #3d7317; }
#flash.show { opacity: 1; translate: 0; }

@media (max-width: 860px) {
  /* Primeros pasos en vertical: cada paso en su fila, sin conectores. */
  .onboarding-steps { grid-template-columns: 1fr; gap: 12px; }
  .onboarding-steps li { flex-direction: row; text-align: left; padding: 0; }
  .onboarding-steps li + li::before { content: none; }
  /* Acceso compacto: logo y formulario arriba, la propuesta debajo. */
  .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "brand" "form" "intro"; }
  .auth-brand { background: none; padding: 20px 24px 0; }
  .auth-brand .brand { color: var(--ink); }
  .auth-brand .brand i { background-image: url("../img/logo.0c101d82b52e.svg"); }
  .auth-form { padding: 24px 24px 40px; place-items: start center; }
  .auth .card h2 { font-size: 1.5rem; margin-bottom: 16px; }
  .auth .intro { padding: 32px 24px; gap: 24px; }
  .auth .intro h1 { font-size: 1.75rem; }
  .auth .pitch { gap: 12px; margin-block: 0; }
  .auth .pitch p { font-size: 1rem; }
  .auth .flow { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; width: 280px; translate: -100%; transition: translate .2s; }
  .nav-open .sidebar { translate: 0; box-shadow: 0 0 0 100vmax #0007; }
  .menu { display: grid; }
  .topbar { height: 56px; padding: 0 16px; }
  .content { padding: 28px 16px; }
  .greeting { font-size: 1.75rem; }
  .build { grid-template-columns: minmax(0, 1fr); }
  .two, .dtable, .run-body, .flow { grid-template-columns: minmax(0, 1fr); }
  .summary, #wside { position: static; }
  .flow-row { grid-template-columns: minmax(0, 1fr); }
  .flow-arrow { transform: rotate(90deg); height: 32px; }
  .stepper { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stepper button { justify-content: center; padding: 8px 4px; }
  .stepper button > span:last-child { display: none; }
  .kinds-seg { grid-template-columns: minmax(0, 1fr); }
  .kinds-seg button + button { border-left: 0; border-top: 1px solid var(--line); }
  .qcard-body { padding-left: 16px; }
  .run summary { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar input { max-width: none; }
  #preview { position: static; }
  .card { padding: 16px; }
  table { display: block; overflow-x: auto; }
  th, td { padding-inline: 4px; }
  td:first-child { overflow-wrap: anywhere; }
  td select { max-width: 124px; }
}

/* Tarjetas de plantilla: no son enlaces */
article.dcard:hover { border-color: var(--line); }

/* Recorrido guiado de la primera decisión (decisiones.js): globo en la capa superior y anillo sobre lo que señala. */
.coach { position: absolute; inset: auto; margin: 0; width: min(320px, calc(100% - 32px)); padding: 20px; border: 0; border-top: 4px solid var(--link);
  border-radius: var(--r); background: var(--white); color: var(--ink); box-shadow: 0 8px 32px #0004; }
.coach h3 { margin: 0 0 8px; font-size: 1rem; }
.coach p { margin: 0; font-size: .9375rem; }
.coach-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; }
.coach-on { outline: 2px solid var(--link); outline-offset: 4px; border-radius: var(--r); }

/* Glosario (core.js): botón ⓘ junto al término y globo con su definición. */
.term-i { display: inline-flex; vertical-align: middle; margin-left: 4px; padding: 2px; border: 0; background: none; color: var(--link); cursor: pointer; border-radius: 50%; }
.term-i svg { width: 16px; height: 16px; }
.term-pop { position: absolute; inset: auto; margin: 0; width: min(280px, calc(100% - 32px)); padding: 12px 16px; border: 0; border-top: 3px solid var(--link);
  border-radius: var(--r); background: var(--white); color: var(--ink); box-shadow: 0 8px 24px #0003; font-size: .875rem; }
.term-pop p { margin: 4px 0 0; color: var(--ink-2); }

/* Primeros pasos en la barra lateral (core.js) */
.nav a.nav-steps { align-items: flex-start; padding: 10px 12px; margin-bottom: 8px; background: #1f1f1f; }
.nav-steps svg { margin-top: 2px; flex: none; }
.nav-steps small { display: block; color: #a3a3a3; font-size: .75rem; margin-top: 2px; }
.nav-steps .meter { height: 4px; margin: 8px 0 2px; background: #383838; }
.nav-steps .meter i { background: #fff; }
.onboarding .muted .btn.link { font-size: inherit; }
