/* ============================================================
   Generador MaxDiff · Voxco
   Tinta sobre papel frío, cobalto para acciones,
   y el par del propio MaxDiff: verde "Más" / rosa "Menos".
   ============================================================ */
:root {
  --ink: #16213e;
  --ink-2: #4a5572;
  --ink-3: #7b849c;
  --paper: #f2f4f8;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --line: #dde2ec;
  --line-2: #c9d0de;
  --cobalt: #2d3bcb;
  --cobalt-2: #2330a8;
  --cobalt-soft: #e8eafc;
  --mas: #0f9d6b;
  --mas-soft: #e2f5ed;
  --menos: #d9435a;
  --menos-soft: #fce8eb;
  --amber: #b7790a;
  --amber-soft: #fdf3dc;
  --console: #121a33;
  --console-ink: #cfd6ea;

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e6e9f4; --ink-2: #aab2c9; --ink-3: #7f88a3;
    --paper: #0d1324; --surface: #151d33; --surface-2: #19223b;
    --line: #26304c; --line-2: #34405f;
    --cobalt: #7884ff; --cobalt-2: #9aa3ff; --cobalt-soft: #20285a;
    --mas: #3fcf96; --mas-soft: #143a2d;
    --menos: #ff7389; --menos-soft: #45202a;
    --amber: #f0b544; --amber-soft: #3d3016;
    --console: #090e1c;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 var(--f-body);
}
button, input, textarea { font: inherit; color: inherit; }
code, .mono { font-family: var(--f-mono); font-size: .86em; }
code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--cobalt) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------- layout */
.app { display: grid; grid-template-columns: 290px minmax(0, 1fr); min-height: 100vh; }
.main { padding: var(--s7) clamp(16px, 4vw, 64px) 96px; max-width: 1180px; width: 100%; }

/* ---------------------------------------------------- riel */
.rail {
  position: sticky; top: 0; height: 100vh;
  background: var(--ink);
  color: #dfe4f3;
  padding: var(--s6) var(--s5);
  display: flex; flex-direction: column; gap: var(--s6);
}
@media (prefers-color-scheme: dark) { .rail { background: #0a0f1e; border-right: 1px solid var(--line); } }
.brand { display: flex; gap: var(--s3); align-items: center; }
.brand svg { width: 40px; height: 40px; flex: none; }
.brand rect { fill: var(--cobalt); }
.brand path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.brand strong { display: block; font: 700 18px/1.1 var(--f-display); color: #fff; letter-spacing: -.01em; }
.brand span { font-size: 13px; color: #9aa4c4; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; position: relative; }
.steps li { position: relative; }
.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 25px; top: 46px; bottom: -10px; width: 2px;
  background: #2a3556; border-radius: 2px;
}
.steps li.done:not(:last-child)::after { background: var(--mas); }
.steps button {
  width: 100%; display: flex; gap: var(--s3); align-items: flex-start; text-align: left;
  background: none; border: 0; padding: 10px; border-radius: var(--r-md);
  color: inherit; cursor: pointer; transition: background .2s var(--ease);
}
.steps button:hover:not(:disabled) { background: rgba(255,255,255,.06); }
.steps button:disabled { cursor: not-allowed; opacity: .45; }
.steps .dot {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 14px var(--f-display);
  border: 2px solid #3a4568; color: #c9d0e8; background: var(--ink);
  transition: all .25s var(--ease);
}
.steps .txt b { display: block; font-weight: 600; color: #fff; font-size: 14.5px; }
.steps .txt small { display: block; color: #8e98b8; font-size: 12.5px; line-height: 1.35; margin-top: 2px; }
.steps li.current .dot { background: var(--cobalt); border-color: var(--cobalt); color: #fff; box-shadow: 0 0 0 5px rgba(45,59,203,.28); }
.steps li.current button { background: rgba(255,255,255,.07); }
.steps li.done .dot { background: var(--mas); border-color: var(--mas); color: #fff; font-size: 0; }
.steps li.done .dot::before { content: ""; width: 12px; height: 7px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translate(0,-2px) rotate(-45deg); }
.steps li.error .dot { background: var(--menos); border-color: var(--menos); color: #fff; }
.rail-note { margin-top: auto; font-size: 12.5px; color: #7f8ab0; }

/* ---------------------------------------------------- pasos */
.step { animation: enter .35s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step-head { max-width: 72ch; margin-bottom: var(--s6); }
.step-head h1 { font: 800 clamp(28px, 3.4vw, 40px)/1.08 var(--f-display); letter-spacing: -.02em; margin: 0 0 var(--s3); }
.step-head p { color: var(--ink-2); margin: 0; font-size: 16px; }
.step-foot {
  display: flex; align-items: center; gap: var(--s4); margin-top: var(--s7);
  padding-top: var(--s5); border-top: 1px solid var(--line);
}
.step-foot .hint { flex: 1; color: var(--ink-3); font-size: 14px; }
.step-foot .hint.bad { color: var(--menos); }
.step-foot .hint.good { color: var(--mas); }

/* ---------------------------------------------------- botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 20px; border-radius: 999px;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--ink);
  font-weight: 600; cursor: pointer; text-decoration: none;
  transition: transform .18s var(--ease), background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover:not(:disabled) { border-color: var(--ink-3); transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn.primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; box-shadow: 0 6px 18px -8px rgba(45,59,203,.7); }
.btn.primary:hover:not(:disabled) { background: var(--cobalt-2); border-color: var(--cobalt-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); padding: 0 12px; }
.btn.ghost:hover:not(:disabled) { color: var(--ink); background: var(--surface); }
.btn.big { min-height: 52px; padding: 0 28px; font-size: 16px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn .spin { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { background: none; border: 0; color: var(--cobalt); cursor: pointer; padding: 0; font-weight: 600; font-size: 13px; }
.link:hover { text-decoration: underline; }

/* ---------------------------------------------------- paso 1 */
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); margin-bottom: var(--s6); }
.mode {
  text-align: left; cursor: pointer; padding: var(--s5); border-radius: var(--r-lg);
  border: 1.5px solid var(--line); background: var(--surface);
  display: grid; gap: var(--s2); align-content: start;
  transition: border-color .2s, box-shadow .25s var(--ease), transform .2s var(--ease);
}
.mode svg { width: 48px; height: 48px; margin-bottom: var(--s2); }
.mode svg rect, .mode svg path { fill: none; stroke: var(--ink-3); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.mode svg .fill { fill: var(--line); stroke: none; transition: fill .2s; }
.mode svg .tick { stroke: #fff; }
.mode-title { font: 700 19px/1.2 var(--f-display); }
.mode-desc { color: var(--ink-2); font-size: 14.5px; }
.mode:hover { border-color: var(--line-2); transform: translateY(-2px); }
.mode[aria-checked="true"] { border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--cobalt-soft); }
.mode[aria-checked="true"] svg rect, .mode[aria-checked="true"] svg path:not(.tick) { stroke: var(--cobalt); }
.mode[aria-checked="true"] svg .fill { fill: var(--cobalt); }

.zone { animation: enter .3s var(--ease); }
.drop {
  display: grid; justify-items: center; gap: 6px; text-align: center; cursor: pointer;
  padding: var(--s6) var(--s5); border: 2px dashed var(--line-2); border-radius: var(--r-lg);
  background: var(--surface); transition: border-color .2s, background .2s;
}
.drop:hover, .drop.over { border-color: var(--cobalt); background: var(--cobalt-soft); }
.drop.busy { pointer-events: none; opacity: .7; }
.drop-icon { font: 700 22px var(--f-mono); color: var(--cobalt); width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--cobalt-soft); }
.drop-main { font-weight: 700; font-size: 16px; }
.drop-sub { color: var(--ink-3); font-size: 13.5px; }
.drop.compact { grid-template-columns: auto 1fr auto; justify-items: start; text-align: left; padding: var(--s4); gap: var(--s3); align-items: center; }
.drop.compact .drop-icon { width: 40px; height: 40px; font-size: 15px; border-radius: 10px; }

.survey-card, .base-info {
  margin-top: var(--s4); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s5); animation: enter .3s var(--ease);
}
.file-line { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; margin-bottom: var(--s4); }
.file-line .ok-badge { width: 28px; height: 28px; border-radius: 50%; background: var(--mas); display: grid; place-items: center; flex: none; }
.file-line .ok-badge::before { content: ""; width: 11px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translate(0,-1px) rotate(-45deg); }
.file-line b { font-size: 16px; word-break: break-all; }
.file-line .link { margin-left: auto; }
.facts { display: flex; flex-wrap: wrap; gap: var(--s5) var(--s6); margin: 0; }
.facts div { min-width: 90px; }
.facts dt { color: var(--ink-3); font-size: 13px; }
.facts dd { margin: 0; font: 700 22px/1.2 var(--f-display); }
.found { margin-top: var(--s5); border-top: 1px solid var(--line); padding-top: var(--s4); }
.found h3 { font: 700 15px var(--f-body); margin: 0 0 var(--s2); }
.found ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.found li { display: flex; gap: var(--s3); align-items: baseline; flex-wrap: wrap; font-size: 14.5px; }
.found li .mono { color: var(--cobalt); font-weight: 600; }
.note { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r-md); font-size: 14px; margin-top: var(--s3); }
.note.info { background: var(--cobalt-soft); color: var(--ink); }
.note.warn { background: var(--amber-soft); color: var(--ink); }
.note.bad { background: var(--menos-soft); color: var(--ink); }
.note.good { background: var(--mas-soft); color: var(--ink); }
.note::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--cobalt); }
.note.warn::before { background: var(--amber); }
.note.bad::before { background: var(--menos); }
.note.good::before { background: var(--mas); }

.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: 14.5px; }
.field small { color: var(--ink-3); font-size: 13px; }
.field input, .field textarea {
  width: 100%; border: 1.5px solid var(--line-2); border-radius: var(--r-md); background: var(--surface);
  padding: 11px 13px; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--cobalt-soft); }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
#study-name { font: 600 18px var(--f-body); max-width: 520px; }

/* ---------------------------------------------------- paso 2 */
.count-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
  padding: var(--s4) var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  margin-bottom: var(--s5);
}
.count-row b { display: block; font-size: 15.5px; }
.count-row small { color: var(--ink-3); }
.stepper { display: flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: 999px; overflow: hidden; flex: none; }
.stepper button { width: 44px; height: 44px; border: 0; background: var(--surface); font-size: 20px; cursor: pointer; transition: background .15s; }
.stepper button:hover:not(:disabled) { background: var(--cobalt-soft); color: var(--cobalt); }
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 44px; text-align: center; font: 800 22px var(--f-display); }

.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1.5px solid var(--line); margin-bottom: var(--s5); }
.tab {
  display: flex; align-items: center; gap: var(--s2); padding: 12px 18px; border: 0; background: none; cursor: pointer;
  font-weight: 600; color: var(--ink-3); border-bottom: 3px solid transparent; margin-bottom: -1.5px; white-space: nowrap;
  transition: color .2s, border-color .2s;
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { color: var(--ink); border-color: var(--cobalt); }
.tab .st { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2); }
.tab .st.ok { background: var(--mas); }
.tab .st.bad { background: var(--menos); }
.tab .st.warn { background: var(--amber); }
.tab .sfx { font: 500 12px var(--f-mono); color: var(--ink-3); }

.md-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); }
.panel > h2 { font: 700 20px/1.2 var(--f-display); margin: 0 0 4px; letter-spacing: -.01em; }
.panel > .lead { color: var(--ink-2); font-size: 14px; margin: 0 0 var(--s4); }
.names { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--s3); }
.names span { font: 500 12.5px var(--f-mono); padding: 3px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); }
.target { font-size: 14px; color: var(--ink-2); margin-top: var(--s3); }
.target b { color: var(--ink); }

/* resumen del CSV */
.design-facts { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s6); margin: var(--s4) 0; }
.design-facts div { display: grid; }
.design-facts b { font: 800 26px/1 var(--f-display); }
.design-facts span { color: var(--ink-3); font-size: 13px; margin-top: 4px; }

/* la matriz de diseño: el elemento memorable */
.matrix-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); padding: var(--s3); }
.matrix { border-collapse: separate; border-spacing: 3px; font-family: var(--f-mono); font-size: 11.5px; }
.matrix th { font: 600 11.5px var(--f-body); color: var(--ink-3); padding: 2px 4px; text-align: center; position: sticky; left: 0; }
.matrix tbody th { background: var(--surface-2); text-align: right; padding-right: 8px; }
.matrix td { padding: 0; }
.cell { display: grid; gap: 1px; padding: 4px 3px; min-width: 30px; border-radius: 5px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.cell i { font-style: normal; line-height: 1.35; border-radius: 3px; transition: background .12s, color .12s; }
.matrix.hl .cell i { color: var(--ink-3); opacity: .55; }
.matrix.hl .cell i.on { background: var(--cobalt); color: #fff; opacity: 1; font-weight: 600; }
.matrix-legend { display: flex; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; color: var(--ink-3); font-size: 12.5px; margin-top: var(--s2); }

.balance { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 4px; margin-top: var(--s4); }
.bal { display: grid; justify-items: center; gap: 2px; cursor: default; border-radius: 6px; padding: 4px 0; transition: background .15s; }
.bal:hover, .bal.on { background: var(--cobalt-soft); }
.bal .bar { width: 14px; height: 46px; background: var(--line); border-radius: 4px; display: flex; align-items: flex-end; overflow: hidden; }
.bal .bar span { width: 100%; background: var(--cobalt); border-radius: 4px; }
.bal small { font: 500 11px var(--f-mono); color: var(--ink-2); }

/* atributos */
.attr-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); flex-wrap: wrap; }
.count-badge { font: 700 13px var(--f-body); padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.count-badge.ok { background: var(--mas-soft); border-color: transparent; color: var(--mas); }
.count-badge.bad { background: var(--menos-soft); border-color: transparent; color: var(--menos); }
.count-badge.warn { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.editor { display: grid; grid-template-columns: 54px minmax(0, 1fr); border: 1.5px solid var(--line-2); border-radius: var(--r-md); overflow: hidden; background: var(--surface); transition: border-color .2s, box-shadow .2s; }
.editor:focus-within { border-color: var(--cobalt); box-shadow: 0 0 0 4px var(--cobalt-soft); }
.gutter { background: var(--surface-2); border-right: 1px solid var(--line); padding: 11px 0; font: 500 12.5px/24px var(--f-mono); color: var(--ink-3); text-align: center; overflow: hidden; user-select: none; }
.gutter div { height: 24px; cursor: default; }
.gutter div.extra { color: var(--menos); }
.gutter div.on { color: var(--cobalt); font-weight: 700; }
.editor textarea { border: 0; outline: none; resize: vertical; min-height: 240px; padding: 11px 13px; font: 400 14px/24px var(--f-body); background: transparent; white-space: pre; overflow-x: auto; }
.lang-switch { display: flex; gap: var(--s4); align-items: center; flex-wrap: wrap; margin: var(--s3) 0; font-size: 14px; }
.check { display: inline-flex; gap: var(--s2); align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--cobalt); }
.lang-tabs { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
.lang-tabs button { border: 0; background: none; padding: 5px 14px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.lang-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }

/* pregunta + vista previa */
.q-row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--s4); }
.preview {
  margin-top: var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2);
  padding: var(--s4) var(--s5);
}
.preview-cap { font-size: 12.5px; color: var(--ink-3); margin-bottom: var(--s2); }
.preview .qname { font: 500 13px var(--f-mono); color: var(--ink-2); margin-bottom: 4px; }
.preview .qtext { font-size: 14.5px; }
.preview .qtext .ref { font: 500 12.5px var(--f-mono); color: var(--cobalt); background: var(--cobalt-soft); padding: 1px 6px; border-radius: 4px; }
.mock { margin-top: var(--s3); border-collapse: collapse; font-size: 14px; }
.mock th { font-weight: 700; padding: 4px 12px; font-size: 13px; }
.mock th.m { color: var(--mas); }
.mock th.n { color: var(--menos); }
.mock td { padding: 5px 12px; border-top: 1px solid var(--line); }
.mock td:first-child { padding-left: 0; }
.mock .r { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid var(--ink-3); display: block; margin: auto; }
.mock .lbl small { font: 500 11.5px var(--f-mono); color: var(--ink-3); margin-left: 6px; }

/* ---------------------------------------------------- paso 3 */
.review-list { display: grid; gap: var(--s3); }
.rv { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s4); align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s4) var(--s5); }
.rv .mk { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 14px var(--f-display); color: #fff; background: var(--cobalt); }
.rv h3 { margin: 0; font: 700 16px var(--f-display); }
.rv p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.rv .tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tag { font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); white-space: nowrap; }
.tag.ok { background: var(--mas-soft); color: var(--mas); border-color: transparent; }
.tag.warn { background: var(--amber-soft); color: var(--amber); border-color: transparent; }

.progress { margin-top: var(--s6); display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: var(--s5); animation: enter .3s var(--ease); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; align-content: start; }
.timeline li { display: grid; grid-template-columns: 28px 1fr; gap: var(--s3); align-items: start; padding-bottom: 18px; position: relative; color: var(--ink-3); }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 28px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li.done::after { background: var(--mas); }
.timeline .tdot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; background: var(--surface); }
.timeline li.running { color: var(--ink); font-weight: 600; }
.timeline li.running .tdot { border-color: var(--cobalt); border-top-color: transparent; animation: spin .9s linear infinite; }
.timeline li.done { color: var(--ink); }
.timeline li.done .tdot { background: var(--mas); border-color: var(--mas); }
.timeline li.done .tdot::before { content: ""; width: 10px; height: 6px; border: solid #fff; border-width: 0 0 2.5px 2.5px; transform: translate(0,-1px) rotate(-45deg); }
.timeline li.error { color: var(--menos); font-weight: 600; }
.timeline li.error .tdot { background: var(--menos); border-color: var(--menos); }
.timeline li.error .tdot::before { content: "!"; color: #fff; font-weight: 800; font-size: 14px; }
.timeline span { padding-top: 3px; }
.console-wrap { background: var(--console); border-radius: var(--r-lg); overflow: hidden; min-width: 0; }
.console-bar { display: flex; justify-content: space-between; padding: 10px 16px; color: #8d97b8; font-size: 13px; border-bottom: 1px solid #222c4a; }
.console-bar .link { color: #9aa3ff; }
.console { margin: 0; height: 300px; overflow: auto; padding: 12px 16px; color: var(--console-ink); font: 12px/1.6 var(--f-mono); white-space: pre-wrap; word-break: break-word; }
.console .w { color: #f3c36b; }
.console .e { color: #ff8a9c; }
.console .ok { color: #6fe0b0; }

/* ---------------------------------------------------- paso 4 */
.verdict { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s5); align-items: center; padding: var(--s6); border-radius: var(--r-lg); margin-bottom: var(--s5); }
.verdict.ok { background: var(--mas-soft); }
.verdict.bad { background: var(--menos-soft); }
.verdict .big-mk { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--mas); }
.verdict.bad .big-mk { background: var(--menos); }
.verdict.ok .big-mk::before { content: ""; width: 24px; height: 13px; border: solid #fff; border-width: 0 0 4px 4px; transform: translate(0,-3px) rotate(-45deg); }
.verdict.bad .big-mk::before { content: "!"; color: #fff; font: 800 34px var(--f-display); }
.verdict h1 { font: 800 clamp(26px, 3vw, 36px)/1.1 var(--f-display); margin: 0 0 6px; letter-spacing: -.02em; }
.verdict p { margin: 0; color: var(--ink-2); }
.downloads { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s4); margin-bottom: var(--s5); }
.dl {
  display: grid; grid-template-columns: auto minmax(0,1fr); gap: var(--s2) var(--s4); align-items: center; text-decoration: none; color: inherit;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-lg); padding: var(--s5);
  transition: border-color .2s, transform .2s var(--ease), box-shadow .25s;
}
.dl:hover { border-color: var(--cobalt); transform: translateY(-2px); box-shadow: 0 12px 28px -18px rgba(22,33,62,.45); }
.dl.main-dl { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.dl.main-dl small { color: #d4d8ff; }
.dl .ext { grid-row: span 2; width: 52px; height: 60px; border-radius: 8px; display: grid; place-items: center; font: 700 12px var(--f-mono); background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.dl.main-dl .ext { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.25); color: #fff; }
.dl b { font: 700 16px var(--f-display); word-break: break-all; }
.dl small { color: var(--ink-3); font-size: 13px; }
.stats { display: flex; flex-wrap: wrap; gap: var(--s5) var(--s7); padding: var(--s5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: var(--s5); }
.stats div { display: grid; }
.stats b { font: 800 28px/1 var(--f-display); }
.stats span { color: var(--ink-3); font-size: 13px; margin-top: 4px; }
details.checks { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s4) var(--s5); margin-bottom: var(--s4); }
details.checks summary { cursor: pointer; font-weight: 700; }
.check-list { list-style: none; margin: var(--s4) 0 0; padding: 0; display: grid; gap: 2px; }
.check-list li { display: grid; grid-template-columns: 64px 150px minmax(0, 1fr); gap: var(--s3); padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.check-list .st { font-weight: 700; font-size: 12.5px; }
.check-list .st.OK { color: var(--mas); }
.check-list .st.FALLA { color: var(--menos); }
.check-list .st.AVISO { color: var(--amber); }
.check-list .area { color: var(--ink-3); }
.check-list small { display: block; color: var(--ink-3); }

/* ---------------------------------------------------- toasts */
.toasts { position: fixed; right: 20px; bottom: 20px; display: grid; gap: 10px; z-index: 50; max-width: min(420px, calc(100vw - 40px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-md); font-size: 14px; box-shadow: 0 14px 30px -14px rgba(0,0,0,.5); display: flex; gap: 10px; align-items: flex-start; animation: toast .3s var(--ease); }
.toast::before { content: ""; flex: none; width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; background: var(--mas); }
.toast.bad::before { background: var(--menos); }
.toast.warn::before { background: var(--amber); }
@media (prefers-color-scheme: dark) { .toast { background: #26304c; } }
@keyframes toast { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------- responsive */
@media (max-width: 1000px) {
  .downloads { grid-template-columns: 1fr; }
  .progress { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: sticky; top: 0; z-index: 20; height: auto; padding: 12px 16px; gap: 10px; }
  .brand span, .rail-note { display: none; }
  .brand svg { width: 30px; height: 30px; }
  .brand strong { font-size: 16px; }
  .steps { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .steps li::after { display: none; }
  .steps button { flex-direction: column; align-items: center; text-align: center; padding: 6px 2px; gap: 4px; }
  .steps .txt small { display: none; }
  .steps .txt b { font-size: 11.5px; font-weight: 600; line-height: 1.2; }
  .steps .dot { width: 26px; height: 26px; font-size: 12px; }
  .main { padding: var(--s6) 16px 80px; }
  .modes { grid-template-columns: 1fr; }
  .q-row { grid-template-columns: 1fr; }
  .count-row { flex-direction: column; align-items: flex-start; }
  .step-foot { flex-wrap: wrap; }
  .step-foot .hint { order: -1; flex-basis: 100%; }
  .step-foot .btn.primary { margin-left: auto; }
  .rv { grid-template-columns: auto minmax(0, 1fr); }
  .rv .tags { grid-column: 1 / -1; justify-content: flex-start; }
  .check-list li { grid-template-columns: 56px minmax(0, 1fr); }
  .check-list .area { display: none; }
  .verdict { padding: var(--s5); grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
