/* Mind Pi TrustOps AI — estilo blueprint */
:root {
  --navy: #1B2A4A;
  --navy-2: #2C3E66;
  --ink: #2A3550;
  --muted: #6B7385;
  --red: #E4573D;
  --red-soft: #FBE3DC;
  --amber: #C98A12;
  --amber-soft: #FBF0D4;
  --green: #2F7D57;
  --green-soft: #DDEFE4;
  --blue-soft: #E1E7F3;
  --cream: #F3F0E8;
  --paper: #FBFAF6;
  --line: rgba(27, 42, 74, .18);
  --grid: rgba(27, 42, 74, .055);
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--sans); color: var(--navy); font-size: 15px; line-height: 1.45;
  background-color: var(--cream);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
}
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
h1, h2, h3, h4 { font-family: var(--cond); margin: 0; letter-spacing: -.005em; }
h1 { font-size: 30px; line-height: 1.1; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
code, .mono { font-family: var(--mono); font-size: .86em; }

/* Layout */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--navy); color: #E9ECF4; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; z-index: 40; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 12px; }
.brand .logo { width: 36px; height: 36px; background: var(--cream); padding: 3px; }
.brand strong { display: block; font-family: var(--cond); font-size: 18px; color: #fff; }
.brand span { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #F6A693; }
nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; color: #CDD3E2; text-decoration: none; border-left: 3px solid transparent; font-size: 14.5px; }
nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
nav a.on { background: rgba(255,255,255,.1); color: #fff; border-left-color: var(--red); font-weight: 600; }
nav a .ico, .btn .ico { width: 18px; height: 18px; flex: none; }
.nav-group { margin: 14px 10px 4px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8F9AB3; }
.nav-group:first-child { margin-top: 2px; }
nav a .count { margin-left: auto; background: var(--red); color: #fff; border-radius: 9px; font-size: 11px; padding: 0 7px; font-weight: 700; }
.side-foot { margin-top: auto; font-size: 12px; color: #A9B1C6; padding: 12px 4px 0; border-top: 1px solid rgba(255,255,255,.12); display: grid; gap: 6px; }
.side-foot p { margin: 4px 6px 0; }
.rail-btn { width: 100%; justify-content: flex-start; background: transparent; color: #fff; border-color: rgba(255,255,255,.25); }
.rail-btn:hover { background: rgba(255,255,255,.08); }
.rail-btn.quiet { border-color: transparent; color: #CDD3E2; }
.side-foot b { color: #fff; }

.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 28px; border-bottom: 1.5px solid var(--line); background: rgba(251,250,246,.85); backdrop-filter: blur(4px); position: sticky; top: 0; z-index: 20; }
.top .org { font-weight: 600; }
.top .org small { display: block; color: var(--muted); font-weight: 400; font-size: 12.5px; }
.top .spacer { flex: 1; }
.seg { display: inline-flex; border: 1.5px solid var(--navy); }
.seg button { border: 0; background: transparent; padding: 5px 10px; cursor: pointer; font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--navy); color: #fff; }
.menu { display: none !important; }
.icon-btn { padding: 6px; }
.ws { width: 34px; height: 34px; display: grid; place-items: center; border: 1.5px solid var(--line); font-family: var(--mono); font-weight: 600; flex: none; }
.demo-chip { color: var(--green); font: 500 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.demo-chip::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 7px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
#view { padding: 24px 28px 40px; max-width: 1320px; outline: none; }

/* Elements */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1.5px solid var(--navy); background: var(--paper); padding: 7px 13px; cursor: pointer; font-weight: 600; font-size: 14px; transition: transform .12s ease, background .15s; text-decoration: none; color: var(--navy); }
.btn:hover { background: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.pri { background: var(--navy); color: #fff; }
.btn.red { background: var(--red); border-color: var(--red); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { padding: 4px 9px; font-size: 12.5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.kicker { font-family: var(--cond); font-weight: 600; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 4px; }
.lead { color: var(--ink); margin: 6px 0 0; max-width: 760px; }
.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.h-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.card { background: rgba(251,250,246,.92); border: 1.5px solid var(--navy); padding: 16px 18px; position: relative; }
.card.corner::before, .card.corner::after { content: ""; position: absolute; width: 12px; height: 12px; border: 2.5px solid var(--red); }
.card.corner::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; }
.card.corner::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; }
.card h3 { margin-bottom: 10px; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-h h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.two { grid-template-columns: 1.3fr 1fr; margin-bottom: 16px; }
.two.even { grid-template-columns: 1fr 1fr; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; font-size: 12px; font-weight: 600; border: 1.2px solid currentColor; white-space: nowrap; }
.pill.ok { color: var(--green); background: var(--green-soft); }
.pill.decl { color: var(--navy-2); background: var(--blue-soft); }
.pill.pend, .pill.warn { color: var(--amber); background: var(--amber-soft); }
.pill.gap, .pill.fail, .pill.high { color: var(--red); background: var(--red-soft); }
.pill.med { color: var(--amber); background: var(--amber-soft); }
.pill.low, .pill.pass { color: var(--green); background: var(--green-soft); }
.pill.neutral { color: var(--muted); background: #fff; }

/* KPI */
.kpi { display: flex; gap: 14px; align-items: center; }
.kpi .big { font-family: var(--cond); font-size: 34px; font-weight: 700; line-height: 1; }
.kpi .lbl { font-weight: 600; }
.ring { width: 86px; height: 86px; flex: none; }
.ring circle { fill: none; stroke-width: 9; }
.ring .bg { stroke: #E3DFD4; }
.ring .fg { stroke-linecap: butt; transition: stroke-dashoffset .8s ease; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring text { font-family: var(--cond); font-weight: 700; font-size: 22px; fill: var(--navy); }

/* Timeline */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.tl li:last-child { border-bottom: 0; }
.tl time { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.tl .dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; background: var(--navy); }
.tl .dot.change, .tl .dot.incident, .tl .dot.alert { background: var(--red); }
.tl .dot.wisp { background: var(--green); }
.tl .dot.cyber { background: var(--amber); }

/* Controls chips */
.ctrls { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.ctrl { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; padding: 7px 10px; font-size: 13px; }

/* Table */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-family: var(--cond); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--navy); padding: 8px; }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr.sel td { background: #fff; }
tr.click { cursor: pointer; }
tr.click:hover td { background: rgba(255,255,255,.7); }
.lvl { font-family: var(--mono); font-weight: 600; }
.strike { text-decoration: line-through; color: var(--muted); }

/* Chain */
.chain { display: flex; flex-direction: column; gap: 0; }
.chain .node { border: 1.5px solid var(--navy); background: #fff; padding: 10px 12px; }
.chain .node .k { font-family: var(--cond); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--red); font-weight: 700; }
.chain .arrow { text-align: center; color: var(--red); font-weight: 700; line-height: 1.6; }

/* Diagnóstico */
.quiz { max-width: 780px; }
.progress { height: 8px; background: #E3DFD4; margin: 10px 0 20px; }
.progress span { display: block; height: 100%; background: var(--red); transition: width .3s ease; }
.qtext { font-family: var(--cond); font-size: 25px; font-weight: 600; line-height: 1.2; margin: 6px 0 20px; }
.answers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.answers button { border: 1.8px solid var(--navy); background: #fff; padding: 16px; cursor: pointer; font-weight: 600; font-size: 16px; transition: all .15s; }
.answers button:hover { transform: translateY(-2px); }
.answers button.on { background: var(--navy); color: #fff; }
.answers button.on.no { background: var(--red); border-color: var(--red); }
.answers button.on.unk { background: var(--amber); border-color: var(--amber); }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 18px; }
.sumgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0; }
.sumgrid div { border: 1.5px dashed var(--navy); padding: 12px; text-align: center; background: #fff; }
.sumgrid b { display: block; font-family: var(--cond); font-size: 30px; }

/* WISP */
.wisp-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 16px; }
.doc { background: #fff; border: 1.5px solid var(--navy); padding: 34px 40px; box-shadow: 6px 6px 0 rgba(27,42,74,.1); font-size: 14.5px; }
.doc h2 { font-size: 24px; }
.doc .meta { color: var(--muted); font-size: 13px; margin: 4px 0 22px; padding-bottom: 14px; border-bottom: 2px solid var(--navy); }
.doc h4 { font-size: 16px; margin: 20px 0 6px; }
.doc p { margin: 5px 0; }
.line { padding: 5px 8px; border-left: 3px solid transparent; margin: 3px 0; display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.line.ok { border-left-color: var(--green); }
.line.decl { border-left-color: var(--navy-2); }
.line.pend { border-left-color: var(--amber); background: var(--amber-soft); }
.line.gap { border-left-color: var(--red); background: var(--red-soft); }
.line.note { border-left-color: var(--navy-2); background: var(--blue-soft); font-style: italic; }
.vers li { list-style: none; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.vers { padding: 0; margin: 0; }
.hash { font-family: var(--mono); font-size: 11.5px; word-break: break-all; color: var(--muted); }
.diff { font-family: var(--mono); font-size: 12px; max-height: 260px; overflow: auto; background: #fff; border: 1px solid var(--line); padding: 8px; }
.diff .add { color: var(--green); }
.diff .del { color: var(--red); }
.status-box { border: 2px solid var(--red); background: var(--red-soft); padding: 12px; margin-bottom: 12px; }
.status-box.ok { border-color: var(--green); background: var(--green-soft); }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.col { background: rgba(255,255,255,.45); border: 1.5px dashed var(--navy); min-height: 380px; padding: 10px; transition: background .15s; }
.col.over { background: var(--blue-soft); border-style: solid; }
.col.done-col.over { background: var(--green-soft); }
.col h3 { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 10px; }
.col h3 span { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tcard { background: #fff; border: 1.5px solid var(--navy); padding: 10px; margin-bottom: 9px; cursor: grab; transition: transform .12s, box-shadow .12s; }
.tcard:hover { transform: translateY(-2px); box-shadow: 3px 3px 0 rgba(27,42,74,.12); }
.tcard.dragging { opacity: .4; }
.tcard .id { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.tcard .t { font-weight: 600; font-size: 14px; margin: 3px 0 6px; }
.tcard .meta { display: flex; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); align-items: center; }
.tcard.over-due { border-left: 5px solid var(--red); }
.tag { font-size: 11px; font-weight: 600; padding: 1px 6px; background: var(--cream); border: 1px solid var(--line); }

/* Cyber */
.big-red { width: 100%; border: 0; background: var(--red); color: #fff; padding: 18px; font-family: var(--cond); font-size: 22px; font-weight: 700; cursor: pointer; box-shadow: 5px 5px 0 var(--navy); transition: transform .12s; }
.big-red:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--navy); }
.txt-rec { font-family: var(--mono); background: var(--navy); color: #fff; padding: 10px 12px; font-size: 13px; margin: 10px 0; word-break: break-all; }
.check-row { display: grid; grid-template-columns: 120px 90px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.toggle { width: 20px; height: 20px; accent-color: var(--navy); cursor: pointer; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.field { display: flex; gap: 8px; margin-top: 8px; }
.field input, .field select, textarea, .inp { border: 1.5px solid var(--navy); background: #fff; padding: 8px 10px; flex: 1; min-width: 0; }
textarea { width: 100%; min-height: 70px; resize: vertical; }

/* Chat */
.chat { display: flex; flex-direction: column; height: 560px; }
.msgs { flex: 1; overflow: auto; padding: 6px 4px 12px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 78%; padding: 10px 13px; font-size: 14.5px; animation: pop .2s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } }
.msg.user { align-self: flex-end; background: var(--navy); color: #fff; }
.msg.bot { align-self: flex-start; background: #fff; border: 1.5px solid var(--navy); }
.msg.bot.esc { border-color: var(--red); background: var(--red-soft); }
.msg .cite { display: block; margin-top: 7px; font-size: 12px; color: var(--muted); font-family: var(--mono); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chips button { border: 1.2px solid var(--navy); background: #fff; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.chips button:hover { background: var(--navy); color: #fff; }

/* Alert banner */
.banner { margin: 14px 28px 0; border: 2px solid var(--red); background: var(--red-soft); padding: 11px 14px; display: flex; gap: 12px; align-items: center; animation: pop .3s ease; }
.banner .ic { font-size: 22px; }
.banner p { margin: 0; flex: 1; font-weight: 500; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(27,42,74,.55); display: grid; place-items: center; z-index: 60; padding: 20px; }
.modal[hidden] { display: none; }
.modal .box { background: var(--paper); border: 2px solid var(--navy); max-width: 640px; width: 100%; max-height: 88vh; overflow: auto; padding: 22px 24px; position: relative; animation: pop .2s ease; box-shadow: 8px 8px 0 rgba(0,0,0,.18); }
.modal .x { position: absolute; top: 10px; right: 12px; border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.modal h2 { margin-bottom: 10px; padding-right: 30px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.checklist label { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.checklist input { accent-color: var(--red); width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* Toasts */
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: var(--navy); color: #fff; padding: 11px 15px; max-width: 380px; font-size: 14px; box-shadow: 4px 4px 0 rgba(0,0,0,.2); animation: pop .25s ease; border-left: 5px solid var(--green); }
.toast.err { border-left-color: var(--red); }
.toast.warn { border-left-color: var(--amber); }

/* Disclaimer */
.disclaimer { background: var(--navy); color: #DDE2EE; font-size: 12.5px; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; padding: 9px 14px; text-align: center; }
.disclaimer b { color: #F6A693; }

/* Tour */
#tour .hole { position: fixed; z-index: 90; border: 3px solid var(--red); box-shadow: 0 0 0 9999px rgba(27,42,74,.6); transition: all .3s ease; pointer-events: none; }
#tour .tip { position: fixed; z-index: 91; background: var(--paper); border: 2px solid var(--navy); padding: 16px 18px; width: 340px; box-shadow: 6px 6px 0 rgba(0,0,0,.2); animation: pop .25s ease; }
#tour .tip h3 { margin-bottom: 6px; }
#tour .tip p { margin: 0 0 12px; font-size: 14px; }
#tour .tip .row { display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .two, .two.even, .wisp-wrap { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 10px; }
  nav { display: flex; overflow-x: auto; }
  nav a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; }
  nav a.on { border-bottom-color: var(--red); }
  .side-foot, .brand span { display: none; }
  .kpis, .kanban, .answers, .sumgrid { grid-template-columns: 1fr; }
  #view { padding: 16px; }
  .doc { padding: 20px; }
  .check-row { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }


/* ---------- v2: componentes incorporados tras revisar demo2 ---------- */
.main { display: flex; flex-direction: column; min-width: 0; }
#view { flex: 1; width: 100%; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr); background: var(--navy); color: #fff; border: 1.5px solid var(--navy); margin-bottom: 16px; min-height: 210px; }
.hero-copy { padding: 24px clamp(16px, 3vw, 32px); display: grid; align-content: center; gap: 10px; }
.hero .kicker { color: #FFAB99; margin: 0; }
.hero h2 { font-size: clamp(26px, 3.2vw, 42px); line-height: 1.08; max-width: 19ch; }
.hero p { margin: 0; color: #D7DFEC; font-size: 14px; }
.hero-art { width: 100%; height: 100%; min-height: 180px; color: #A1B2CE; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 24px 24px; }
.hero-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.hero-ghost:hover { background: rgba(255,255,255,.08); }
.kpi-body { flex: 1; min-width: 0; }
.meter { display: block; width: 100%; height: 5px; margin-top: 8px; border: 0; appearance: none; -webkit-appearance: none; background: var(--blue-soft); }
.meter::-webkit-progress-bar { background: var(--blue-soft); }
.meter::-webkit-progress-value { background: var(--navy); }
.meter::-moz-progress-bar { background: var(--navy); }
.card:has(table) { overflow-x: auto; }
.followup { color: var(--navy-2); background: var(--blue-soft); padding: 4px 8px; display: inline-block; margin: 0 0 6px; }
.err { color: var(--red); background: var(--red-soft); padding: 6px 10px; font-size: 13px; margin: 8px 0 0; }
.err[hidden] { display: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.linkish { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 0; cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.tcard { cursor: grab; }
.tcard-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 9px; }
.tcard-actions .btn { justify-content: center; }
.inp.sm { padding: 4px 6px; font-size: 12.5px; min-height: 30px; width: 100%; }
.empty { padding: 6px 2px; }
.banner.warn { border-color: var(--amber); background: var(--amber-soft); }
.banner-mini { background: var(--red-soft); border: 1.5px solid var(--red); color: var(--red); padding: 8px 10px; font-size: 13.5px; font-weight: 500; margin: 0 0 10px; }
.tl-v { list-style: none; margin: 0 0 12px; padding: 0 0 0 14px; border-left: 2px solid var(--line); font-size: 13.5px; }
.tl-v li { position: relative; padding: 3px 0 6px; }
.tl-v li::before { content: ""; position: absolute; left: -19px; top: 9px; width: 8px; height: 8px; background: var(--paper); border: 2px solid var(--navy); border-radius: 50%; }
.tl-v time { font-family: var(--mono); font-size: 11.5px; color: var(--muted); margin-right: 6px; }
.checklist label.next { background: var(--blue-soft); padding-left: 6px; }
.checklist input:disabled + span { color: var(--muted); }
.steps-list { margin: 8px 0 0; padding-left: 20px; }
.steps-list li { margin: 4px 0; }
ul.plain { list-style: none; padding: 0; margin: 0 0 12px; }
ul.plain li { padding: 7px 0; border-bottom: 1px dashed var(--line); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* Tour no bloqueante */
.tour { position: fixed; right: 18px; bottom: 18px; z-index: 70; width: min(380px, calc(100vw - 24px)); }
.tour-card { background: var(--paper); border: 2px solid var(--navy); padding: 14px 16px; box-shadow: 6px 6px 0 rgba(27,42,74,.18); animation: pop .25s ease; }
.tour-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tour-card h3 { margin: 4px 0 6px; outline: none; }
.tour-card p { margin: 0 0 6px; font-size: 14px; }
.tour-card .meter { margin: 6px 0 10px; }
.tour-target { outline: 3px solid var(--red); outline-offset: 4px; scroll-margin-top: 90px; }
body.touring #view { padding-bottom: 260px; }
body.touring .toasts { bottom: auto; top: 76px; }

/* Responsive: 360 → 1920 sin desbordes horizontales */
@media (min-width: 1600px) { .app { grid-template-columns: 256px minmax(0, 1fr); } #view { max-width: 1480px; } }
@media (max-width: 1100px) { .app { grid-template-columns: 208px minmax(0, 1fr); } .top .org small { display: none; } }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .hero-art { display: none; } .grid.two, .grid.two.even { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .menu { display: inline-flex !important; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; width: min(280px, 84vw); height: 100vh; transform: translateX(-105%); transition: transform .2s ease; padding-top: 14px; }
  body.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(27,42,74,.5); }
  nav { display: block; overflow: visible; }
  nav a { white-space: normal; border-bottom: 0; border-left: 3px solid transparent; }
  nav a.on { border-left-color: var(--red); }
  .side-foot, .brand span { display: grid; }
  .brand span { display: block; }
  .top { padding: 8px 12px; gap: 8px; }
  .ws, .demo-chip, .avatar { display: none; }
  .top .org { font-size: 14px; min-width: 0; }
  #view { padding: 16px 12px 28px; }
  h1 { font-size: 25px; }
  .page-h { align-items: flex-start; }
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kanban { grid-template-columns: minmax(0, 1fr); }
  .col { min-height: 0; }
  .answers, .sumgrid { grid-template-columns: minmax(0, 1fr); }
  .quiz-nav { flex-wrap: wrap; gap: 8px; }
  .doc { padding: 18px 14px; }
  .line { flex-direction: column; }
  .check-row { grid-template-columns: 1fr auto; }
  .check-row > :nth-child(3) { grid-column: 1 / -1; }
  .msg { max-width: 92%; }
  .chat { height: 70vh; }
  .banner { margin: 10px 12px 0; flex-wrap: wrap; }
  .modal { padding: 10px; }
  .modal .box { padding: 18px 14px; }
  .btn, .seg button, nav a { min-height: 40px; }
  .tour { right: 8px; left: 8px; bottom: 8px; width: auto; }
}
@media (min-width: 761px) and (max-width: 1100px) { .kanban { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.side-foot .btn.rail-btn { background: transparent; color: #fff; border-color: rgba(255,255,255,.28); }
.side-foot .btn.rail-btn:hover { background: rgba(255,255,255,.08); }
.side-foot .btn.rail-btn.quiet { border-color: transparent; color: #CDD3E2; }
.tcard-actions { grid-template-columns: auto minmax(0, 1fr); }
.tcard-actions .btn { white-space: nowrap; font-size: 12.5px; padding: 4px 8px; }
