/* =====================================================================
   OPERACIÓN JUANITA · styles.css · Identidad Camilo Lezcano Yepes
   Navy de fondo (~60 %), verde de acento (~30 %), crema para leer.
   Reglas de contraste: navy → crema y títulos verdes · crema → navy ·
   verde → navy · azul medio → crema.
   ===================================================================== */
:root {
  --navy: #070024;
  --navy-2: #0D0A3A;
  --navy-3: #1A1650;
  --green: #1DB954;
  --green-lt: #25D468;
  --green-bg: #DDF5E5;
  --cream: #F2F1EC;
  --paper: #FBFAF7;
  --gray: #E8E7E0;
  --line: #DAD8CF;
  --ink: #070024;
  --ink-2: #3C3A57;
  --muted: #55536B;
  --amber: #E8A33D;
  --amber-bg: #FCF0DA;
  --amber-ink: #6B4300;
  --red: #B3261E;
  --red-bg: #FBE4E1;
  --red-ink: #7E1A15;
  --on-navy: #F2F1EC;
  --on-navy-2: rgba(242, 241, 236, .82);
  --radius: 6px;
  --f-title: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --focus: 0 0 0 3px var(--cream), 0 0 0 6px var(--green);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--f-body); font-size: 18px; line-height: 1.55; font-weight: 400; }
body.noscroll { overflow: hidden; }
h1, h2, h3, h4 { font-family: var(--f-title); text-transform: uppercase; letter-spacing: -.01em; line-height: 1; margin: 0; }
p { margin: 0 0 .7em; }
a { color: var(--ink); text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 3px; }
h1:focus, main:focus { outline: none; box-shadow: none; }
.ic { width: 1.1em; height: 1.1em; flex: 0 0 auto; vertical-align: -.18em; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--green); color: var(--navy); font-weight: 700; padding: 10px 16px; z-index: 100; border-radius: var(--radius); }
.skip:focus { top: 10px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 900px; }
.wrap.wide { max-width: 1360px; }

/* ---------- barra superior y navegación (navy) ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: var(--navy); color: var(--on-navy); }
.tb { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--on-navy); text-decoration: none; min-width: 0; }
.brand svg { width: 34px; height: 34px; flex: 0 0 auto; }
.brand b { display: block; font-family: var(--f-title); font-weight: 800; text-transform: uppercase; font-size: 22px; letter-spacing: -.01em; line-height: 1; }
.brand small { display: block; font-size: 13px; color: var(--on-navy-2); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--on-navy-2); white-space: nowrap; }
.saved.ok { color: var(--green-lt); }
.saved.err { color: #FFB4AB; white-space: normal; text-align: right; }
.nav { background: var(--navy-2); border-top: 1px solid rgba(242, 241, 236, .08); }
.nav .wrap { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav .wrap::-webkit-scrollbar { display: none; }
.nav a { position: relative; flex: 0 0 auto; color: var(--on-navy); text-decoration: none; font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 17px; letter-spacing: .02em; padding: 12px 12px 11px; display: inline-flex; align-items: center; gap: 6px; border-bottom: 3px solid transparent; }
.nav a:hover { color: var(--green-lt); }
.nav a[aria-current="page"] { border-bottom-color: var(--green); color: var(--green-lt); }
.nb { background: var(--green); color: var(--navy); font-family: var(--f-body); font-size: 12px; font-weight: 700; border-radius: 99px; padding: 1px 7px; line-height: 1.4; }
.nb[hidden] { display: none; }

/* ---------- cabeceras navy ---------- */
.head { background: var(--navy); color: var(--on-navy); padding: 34px 0 38px; }
.head h1 { color: var(--on-navy); font-weight: 800; font-size: clamp(38px, 8vw, 64px); margin: 4px 0 14px; }
.head .lead { color: var(--on-navy-2); max-width: 720px; font-size: 19px; }
.eyebrow { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 16px; color: var(--green-lt); margin: 0; }
.head .g { color: var(--green); }
.crumbs { font-size: 15px; color: var(--on-navy-2); margin-bottom: 14px; }
.crumbs a { color: var(--on-navy); }
.hero { padding-bottom: 44px; }
.hero-g { display: grid; gap: 26px; }
.now { background: var(--navy-2); border: 1px solid var(--navy-3); border-left: 5px solid var(--green); padding: 20px; border-radius: var(--radius); }
.now-k { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--on-navy-2); margin: 0; }
.now-h { font-family: var(--f-title); font-weight: 800; text-transform: uppercase; font-size: 34px; color: var(--green-lt); line-height: 1; margin: 4px 0 8px; }
.now-d { color: var(--on-navy); }
.now-d b { color: var(--green-lt); }
.now-e span { color: var(--on-navy-2); }
.now .btn { margin-top: 6px; width: 100%; justify-content: space-between; }
.caphead { padding-bottom: 28px; }
.caphead h1 { font-size: clamp(34px, 7vw, 56px); }
.capmeta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 18px; }
.chip-h { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 15px; letter-spacing: .03em; background: var(--navy-3); color: var(--on-navy); padding: 4px 10px; border-radius: 3px; }
.entrega { background: var(--navy-2); border-left: 5px solid var(--green); padding: 14px 18px; border-radius: var(--radius); max-width: 820px; }
.entrega p:last-child { margin: 0; font-size: 19px; color: var(--on-navy); }
.lbl { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 15px; margin: 0 0 6px; }
.head .lbl, .navy .lbl { color: var(--green-lt); }

/* ---------- estados ---------- */
.badge { display: inline-block; font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 14px; letter-spacing: .04em; padding: 3px 9px; border-radius: 3px; line-height: 1.3; white-space: nowrap; }
.b-sin { background: var(--gray); color: var(--ink); }
.b-borrador { background: var(--amber-bg); color: var(--amber-ink); }
.b-listo { background: var(--cream); color: var(--ink); box-shadow: inset 0 0 0 2px var(--green); }
.b-terminado { background: var(--green); color: var(--navy); }
.tag { display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 3px; line-height: 1.4; }
.tag.verify { background: var(--amber); color: var(--navy); }

/* ---------- botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; justify-content: center; min-height: 48px; padding: 10px 18px; border-radius: var(--radius); border: 2px solid var(--navy); background: var(--navy); color: var(--on-navy); font-weight: 600; font-size: 17px; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: left; }
.btn:hover { background: var(--navy-3); border-color: var(--navy-3); }
.btn.g { background: var(--green); border-color: var(--green); color: var(--navy); }
.btn.g:hover { background: var(--green-lt); border-color: var(--green-lt); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--navy); }
.btn.ghost:hover { background: var(--gray); }
.btn.ghost-l { background: transparent; color: var(--on-navy); border-color: var(--on-navy-2); }
.btn.ghost-l:hover { background: var(--navy-3); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.sm { min-height: 44px; padding: 8px 14px; font-size: 16px; }
.btn[disabled] { background: var(--gray); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.lnk { font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- tarjetas ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; margin: 18px 0; }
.card h2, .card .sub { font-size: 28px; font-weight: 800; margin-bottom: 12px; }
.card.navy { background: var(--navy-2); color: var(--on-navy); border-color: var(--navy-2); }
.card.navy h2 { color: var(--green-lt); }
.card.navy .small { color: var(--on-navy-2); }
.small { font-size: 16px; }
.help { color: var(--muted); font-size: 16px; margin: 4px 0 10px; }
.navy .help { color: var(--on-navy-2); }
.sub { font-size: 26px; font-weight: 800; margin: 26px 0 10px; }
.sub2 { font-size: 21px; font-weight: 700; margin: 22px 0 8px; }
.more { margin: 22px 0; }
.home { padding-bottom: 30px; }
.priv { display: flex; gap: 10px; align-items: flex-start; background: var(--navy); padding: 12px 14px; border-radius: var(--radius); border-left: 4px solid var(--green); }
.priv .ic { color: var(--green-lt); width: 1.4em; height: 1.4em; }
.roles { display: grid; gap: 12px; margin-top: 8px; }
.role { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: #fff; }
.rn { font-family: var(--f-title); font-weight: 800; text-transform: uppercase; font-size: 21px; margin: 0; }
.rq { color: var(--muted); font-size: 16px; margin: 0 0 6px; }
.big { font-family: var(--f-title); font-weight: 800; font-size: 64px; line-height: .9; margin: 0 0 4px; }
.big span { font-size: 30px; color: var(--muted); }
.pbar { list-style: none; padding: 0; margin: 14px 0 8px; display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.pbar a { display: flex; align-items: center; justify-content: center; height: 40px; font-family: var(--f-title); font-weight: 700; font-size: 17px; text-decoration: none; border-radius: 3px; color: var(--ink); }
.pbar .s-sin a { background: var(--gray); }
.pbar .s-borrador a { background: var(--amber-bg); color: var(--amber-ink); box-shadow: inset 0 -4px 0 var(--amber); }
.pbar .s-listo a { background: #fff; box-shadow: inset 0 0 0 2px var(--green); }
.pbar .s-terminado a { background: var(--green); color: var(--navy); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 15px; color: var(--muted); margin: 8px 0; }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 3px; vertical-align: -2px; margin-right: -6px; }
.lg.s-sin { background: var(--gray); }
.lg.s-borrador { background: var(--amber); }
.lg.s-listo { background: #fff; box-shadow: inset 0 0 0 2px var(--green); }
.lg.s-terminado { background: var(--green); }
.hitos { list-style: none; padding: 0; margin: 0; }
.hitos li { display: grid; gap: 2px; padding: 12px 0 12px 16px; border-left: 3px solid var(--line); position: relative; }
.hitos li::before { content: ''; position: absolute; left: -8px; top: 17px; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 3px solid var(--line); }
.hitos li.cur { border-left-color: var(--green); }
.hitos li.cur::before { background: var(--green); border-color: var(--green); }
.hitos li.past { color: var(--muted); }
.hitos li.past::before { background: var(--navy); border-color: var(--navy); }
.hitos b { font-family: var(--f-title); text-transform: uppercase; font-size: 20px; }
.hf { font-weight: 600; }
.howl { padding-left: 22px; margin: 0; }
.howl li { margin-bottom: 8px; }

/* ---------- formularios ---------- */
.field { margin: 0 0 14px; min-width: 0; }
.flab { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.flab label, .fuente > label { font-weight: 600; font-size: 17px; }
.count { font-size: 14px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.count.over { color: var(--red); font-weight: 700; }
input[type=text], input[type=url], input[type=date], input:not([type]), select, textarea { width: 100%; font-size: 18px; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); min-height: 48px; }
textarea { resize: vertical; line-height: 1.45; }
input::placeholder, textarea::placeholder { color: #77758A; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--navy); }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--navy) 50%), linear-gradient(135deg, var(--navy) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.navy input, .navy select, .navy textarea { border-color: var(--navy-3); }
.moneyfmt { display: block; font-size: 14px; color: var(--muted); min-height: 1.2em; font-variant-numeric: tabular-nums; }
fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
legend { font-weight: 600; font-size: 17px; padding: 0; margin-bottom: 6px; }
.ropts { display: flex; flex-wrap: wrap; gap: 8px; }
.ropt { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.ropt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ropt span { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); background: #fff; font-weight: 500; }
.ropt input:checked + span { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.ropt input:focus-visible + span { box-shadow: var(--focus); }
.ropt.pick { flex-direction: column-reverse; gap: 6px; }
.chk { display: flex; align-items: flex-start; gap: 10px; margin: 8px 0; }
.chk input, .checks input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--green); flex: 0 0 auto; cursor: pointer; }
.chk label { font-size: 17px; cursor: pointer; }
.two { display: grid; gap: 0 16px; }
.datafield { border-left: 3px solid var(--green); padding-left: 14px; margin: 4px 0 18px; }
.fuente { background: var(--gray); border-radius: var(--radius); padding: 10px 12px; margin-top: -4px; }
.fuente > label { display: block; font-size: 16px; margin-bottom: 4px; }
.fuente input[type=text] { min-height: 44px; }
.warn, .alert, .okmsg { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius); font-size: 16px; margin: 8px 0; }
.warn { background: var(--amber-bg); color: var(--amber-ink); }
.alert { background: var(--red-bg); color: var(--red-ink); font-weight: 600; }
.okmsg { background: var(--green-bg); color: var(--ink); }
.warn[hidden], .alert[hidden] { display: none; }
.navy .warn { background: var(--amber); color: var(--navy); }

/* ---------- capítulo ---------- */
.capbody { max-width: 1120px; padding-top: 18px; padding-bottom: 40px; }
.secb > p, .steps, .qs, .ej, .checks, .gate, .prompt, .etica-line { max-width: 820px; }
.capbody:not(.wide) .work .secb { max-width: 860px; }
details.sec { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin: 12px 0; }
details.sec > summary { list-style: none; cursor: pointer; padding: 16px 52px 16px 18px; position: relative; border-radius: var(--radius); }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::after { content: ''; position: absolute; right: 22px; top: 50%; width: 11px; height: 11px; border-right: 3px solid var(--navy); border-bottom: 3px solid var(--navy); transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
details.sec[open] > summary::after { transform: translateY(-30%) rotate(-135deg); }
details.sec > summary h2 { font-size: 24px; font-weight: 800; }
details.sec.work { border-top: 5px solid var(--green); }
details.sec.cl { border-top: 5px solid var(--navy); }
.secb { padding: 0 18px 18px; }
.steps, .qs { padding-left: 24px; margin: 0; }
.steps li, .qs li { margin-bottom: 8px; }
.steps li::marker { font-family: var(--f-title); font-weight: 800; }
.caso { font-size: 16px; color: var(--muted); font-style: italic; }
.ej { display: grid; gap: 12px; }
.ej > div { padding: 14px 16px; border-radius: var(--radius); background: #fff; }
.ej-b { border-left: 5px solid var(--green); }
.ej-f { border-left: 5px solid var(--red); }
.ej .lbl { display: flex; align-items: center; gap: 6px; }
.ej-b .lbl .ic { color: #128A3E; }
.ej-f .lbl .ic { color: var(--red); }
.checks { list-style: none; padding: 0; margin: 0 0 10px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--gray); }
.checks label { cursor: pointer; }
.gate { background: var(--gray); border-radius: var(--radius); padding: 14px 16px; margin-top: 10px; }
.gate p { margin-bottom: 10px; }
.gate.ready { background: #fff; box-shadow: inset 0 0 0 2px var(--green); }
.gate.done { background: var(--green-bg); }
.gate .ic { color: #128A3E; }
.prompt { background: var(--navy-2); color: var(--on-navy); padding: 16px 18px; border-radius: var(--radius); white-space: pre-wrap; word-wrap: break-word; font-family: var(--f-body); font-size: 17px; line-height: 1.5; margin: 10px 0; border-left: 5px solid var(--green); }
.ia-rule { display: flex; gap: 8px; align-items: flex-start; font-size: 17px; }
.ia-rule .ic { color: #128A3E; width: 1.3em; height: 1.3em; }
.etica-line { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-bg); color: var(--amber-ink); padding: 12px 16px; border-radius: var(--radius); border-left: 5px solid var(--amber); margin: 12px 0; }
.etica-line b { color: var(--navy); }
.capnav { display: grid; gap: 10px; margin-top: 26px; }
.capnav a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--navy); color: var(--on-navy); text-decoration: none; border-radius: var(--radius); font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 19px; line-height: 1.1; }
.capnav a small { display: block; font-family: var(--f-body); text-transform: none; font-weight: 500; font-size: 14px; color: var(--green-lt); }
.capnav a:hover { background: var(--navy-3); }
.capnav .next { justify-content: space-between; text-align: right; }
.capnav .ic { color: var(--green-lt); }
.lockbox { display: flex; gap: 14px; align-items: flex-start; background: var(--gray); padding: 18px; border-radius: var(--radius); }
.lockbox > .ic { width: 2em; height: 2em; }
.preview { background: #fff; border: 1px dashed var(--line); padding: 14px 16px; border-radius: var(--radius); margin: 10px 0 18px; }
.frase { font-size: 20px; line-height: 1.5; margin: 0; }
.frase b { color: var(--ink); background: var(--green-bg); padding: 0 4px; border-radius: 2px; }
.frase b.blank { background: var(--gray); color: var(--muted); }
.foda-wrap { margin: 6px 0 14px; }
.foda-wrap .sub { margin-top: 10px; font-size: 21px; display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline; }
.foda { display: grid; gap: 0 14px; }

/* recorrido */
.journey { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 12px; }
.jstage { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); padding: 12px 14px 2px; border-radius: var(--radius); }
.jn { display: flex; align-items: center; gap: 8px; font-family: var(--f-title); font-weight: 800; text-transform: uppercase; font-size: 21px; margin-bottom: 8px; }
.jn span { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; background: var(--green); color: var(--navy); border-radius: 50%; font-size: 17px; }

/* mapa perceptual */
.ejes { display: grid; gap: 12px; }
.eje { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 0; }
.pm-wrap { display: grid; gap: 18px; margin: 16px 0; }
.pm-p { display: grid; grid-template-columns: auto 1fr; gap: 0 10px; align-items: end; padding: 10px 0; border-bottom: 1px solid var(--gray); }
.pm-p .ropt { grid-row: span 2; align-self: center; }
.pm-p .field { margin-bottom: 6px; }
.pm-p .xs { display: inline-block; }
.pm-p .xs select { min-width: 84px; }
.pm-p > .field:not(.xs), .pm-fixed { grid-column: 2; }
.pm-p .xs { grid-column: 2; }
.pm-p { grid-template-columns: auto 1fr 1fr; }
.pm-p > .field:not(.xs), .pm-p .pm-fixed { grid-column: 2 / span 2; }
.pm-p .xs:nth-last-child(2) { grid-column: 2; }
.pm-p .xs:last-child { grid-column: 3; }
.pm-p .ropt { grid-row: 1 / span 2; }
.pm-fixed { margin: 0 0 6px; padding: 10px 0; }
.dot { width: 18px; height: 18px; border-radius: 50%; display: inline-block; padding: 0 !important; min-height: 0 !important; border: 0 !important; }
.pt0, .dot.pt0 { background: var(--navy); color: var(--on-navy); }
.pt1, .dot.pt1 { background: var(--green); color: var(--navy); }
.pt2, .dot.pt2 { background: var(--amber); color: var(--navy); }
.pt3, .dot.pt3 { background: #CFCBF5; color: var(--navy); }
.pm { display: grid; grid-template-columns: 28px 1fr; grid-template-rows: 1fr auto; gap: 6px; }
.pm-y { writing-mode: vertical-rl; transform: rotate(180deg); display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.pm-y b, .pm-x b { color: var(--ink); font-family: var(--f-title); text-transform: uppercase; font-size: 16px; }
.pm-x { grid-column: 2; display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); gap: 8px; }
.pm-grid { display: grid; grid-template-columns: repeat(5, 1fr); aspect-ratio: 1; border: 2px solid var(--navy); background: #fff; }
.pm-c { border: 0; border-right: 1px solid var(--gray); border-bottom: 1px solid var(--gray); background: transparent; padding: 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; min-width: 0; min-height: 44px; }
.pm-c:hover { background: var(--green-bg); }
.pm-c .pt { font-size: 12px; font-weight: 700; padding: 1px 5px; border-radius: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.3; }

/* objetivos y embudo */
.objs { display: grid; gap: 12px; }
.obj, .emb-r { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px 0; }
.emb { display: grid; gap: 12px; }
.funnel { margin: 18px 0 8px; display: grid; gap: 8px; }
.fr { display: grid; grid-template-columns: 96px 1fr; gap: 2px 10px; align-items: center; }
.fl { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 17px; }
.fb { height: 28px; background: var(--gray); border-radius: 3px; overflow: hidden; }
.fb span { display: block; height: 100%; background: var(--navy); }
.fr:nth-child(2) .fb span { background: var(--navy-3); }
.fr:nth-child(3) .fb span { background: #128A3E; }
.fr:nth-child(4) .fb span { background: var(--green); }
.fv { grid-column: 2; font-weight: 600; font-variant-numeric: tabular-nums; }
.fv small { color: var(--muted); font-weight: 500; }
.conv { grid-column: 2; font-size: 14px; color: var(--muted); }

/* mensaje */
.msgcard { background: var(--navy); color: var(--on-navy); padding: 20px; border-radius: var(--radius); border-left: 6px solid var(--green); margin: 8px 0 14px; }
.msgcard .prom { font-family: var(--f-title); font-weight: 800; text-transform: uppercase; color: var(--green-lt); font-size: 34px; line-height: 1; margin: 6px 0 14px; }
.msgcard dl { margin: 0; display: grid; gap: 8px; }
.msgcard dt { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--on-navy-2); }
.msgcard dd { margin: 0; }

/* indicadores */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0; }
.stat { border-radius: var(--radius); padding: 12px; display: grid; gap: 2px; align-content: start; }
.stat b { font-family: var(--f-title); font-weight: 800; font-size: 34px; line-height: 1; }
.stat span { font-weight: 600; font-size: 16px; line-height: 1.2; }
.stat small { font-size: 14px; line-height: 1.3; }
.stat.ok { background: var(--green); color: var(--navy); }
.stat.no { background: var(--navy); color: var(--on-navy); }
.stat.no b { color: var(--amber); }

/* matriz */
.mx { display: grid; gap: 14px; }
.mx-row.mx-headrow { display: none; }
.mx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: var(--paper); }
.mx-tool { grid-column: 1 / -1; background: var(--navy); color: var(--on-navy); padding: 10px 14px; border-radius: var(--radius); }
.mx-tool b { display: block; font-family: var(--f-title); text-transform: uppercase; font-size: 21px; color: var(--green-lt); }
.mx-tool small, .mx-ch small { display: block; font-size: 14px; color: var(--on-navy-2); }
.cell { text-align: left; border: 1.5px solid var(--line); background: #fff; border-radius: var(--radius); padding: 10px; min-height: 92px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; font-size: 15px; line-height: 1.3; color: var(--ink); }
.cell:hover { border-color: var(--navy); }
.cell .cl { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 15px; color: var(--muted); }
.cell .ca { font-weight: 600; }
.cell .cm { font-size: 13px; color: var(--muted); }
.cell .ce { color: var(--muted); font-weight: 600; margin-top: auto; }
.cell .cw { font-size: 13px; font-weight: 700; color: var(--red-ink); }
.cell.c-ok { border-left: 6px solid var(--green); }
.cell.c-nokpi { border-left: 6px solid var(--amber); }
.cell.c-parcial { border-left: 6px solid var(--amber); background: var(--amber-bg); }
.cell.c-contra { border-left: 6px solid var(--red); background: var(--red-bg); }
.cell.c-empty { border-style: dashed; }
.lg.c-ok { background: var(--green); }
.lg.c-nokpi { background: var(--amber); }
.lg.c-parcial { background: var(--amber-bg); box-shadow: inset 4px 0 0 var(--amber); }
.lg.c-contra { background: var(--red-bg); box-shadow: inset 4px 0 0 var(--red); }

/* presupuesto */
.bg { display: grid; gap: 12px; }
.bg-head { display: none !important; }
.bg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.bg-tool { grid-column: 1 / -1; font-family: var(--f-title); font-weight: 800; text-transform: uppercase; font-size: 20px; }
.bg-cell label { display: block; }
.bg-cell .cl, .bg-tot .cl, .bg-foot .cl { display: block; font-size: 14px; font-weight: 600; color: var(--muted); }
.bg-cell input { text-align: right; font-variant-numeric: tabular-nums; }
.bg-cell .has { display: block; font-size: 13px; color: var(--muted); line-height: 1.25; }
.bg-tot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--gray); padding-top: 8px; }
.bg-tot b, .bg-foot b { font-variant-numeric: tabular-nums; }
.bg-foot { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.bg-foot > div:first-child { grid-column: 1 / -1; font-family: var(--f-title); font-weight: 800; text-transform: uppercase; color: var(--green-lt); font-size: 20px; }
.bg-foot .cl { color: var(--on-navy-2); }
.otro { display: grid; gap: 0 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px 0; margin-bottom: 8px; }
.otro .del { margin-bottom: 12px; justify-self: start; }
.bsum { background: var(--navy); color: var(--on-navy); padding: 18px; border-radius: var(--radius); margin: 18px 0 10px; }
.bnums { display: grid; gap: 10px; }
.bnums .k { display: block; font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--on-navy-2); }
.bnums b { font-family: var(--f-title); font-weight: 800; font-size: 32px; color: var(--green-lt); font-variant-numeric: tabular-nums; }
.bsum.over .bnums div:last-child b { color: #FFB4AB; }
.bar { height: 16px; background: var(--navy-3); border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.bar span { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .3s; }
.bsum.over .bar span { background: #E5534B; }
.bpct { font-size: 15px; color: var(--on-navy-2); }
.bsum .alert { background: #E5534B; color: var(--navy); }
.bsum .warn { background: var(--amber); color: var(--navy); }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0 12px; }
.t { width: 100%; border-collapse: collapse; font-size: 16px; background: #fff; }
.t th, .t td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--gray); vertical-align: top; }
.t thead th { background: var(--navy); color: var(--on-navy); font-family: var(--f-title); text-transform: uppercase; font-weight: 700; letter-spacing: .03em; font-size: 15px; }
.t td { font-variant-numeric: tabular-nums; }

/* cronograma */
.strip { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; margin: 10px 0 4px; }
.strip span { text-align: center; font-size: 12px; font-weight: 700; padding: 8px 0; background: var(--gray); color: var(--muted); border-radius: 3px; }
.strip span.on { background: var(--green); color: var(--navy); }
.strip span.end { background: var(--navy); color: var(--on-navy); font-size: 10px; }
.weeks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.wk { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px 0; }
.wn { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.wn b { font-family: var(--f-title); text-transform: uppercase; font-size: 19px; }
.wn span { font-size: 15px; color: var(--muted); }

/* KPI, IA */
.kpis { display: grid; gap: 12px; }
.kpi, .iarow { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 12px 0; margin-bottom: 10px; }
.kh { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.kh b { font-family: var(--f-title); text-transform: uppercase; font-size: 20px; }
.kgrid { display: grid; gap: 0 12px; }

/* ética y rúbrica */
.etica { list-style: none; padding: 0; margin: 0; counter-reset: q; }
.eq { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--navy); border-radius: var(--radius); padding: 14px 14px 2px; margin-bottom: 12px; }
.eq legend { font-size: 18px; }
.rub { display: grid; gap: 14px; }
.rc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 0 14px 14px; }
.rc legend { display: flex; justify-content: space-between; gap: 10px; width: 100%; background: var(--navy); color: var(--on-navy); padding: 10px 14px; margin: 0 -14px 12px; width: calc(100% + 28px); border-radius: var(--radius) var(--radius) 0 0; float: left; }
.rc legend span { font-weight: 600; }
.rc legend b { color: var(--green-lt); font-family: var(--f-title); font-size: 20px; white-space: nowrap; }
.rlv { clear: both; display: grid; gap: 8px; }
.lv { position: relative; display: grid; gap: 2px; align-content: start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.lv input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lvn { font-family: var(--f-title); font-weight: 800; text-transform: uppercase; font-size: 18px; }
.lvd { font-size: 16px; color: var(--ink-2); }
.lv:has(input:checked) { background: var(--green); border-color: var(--green); }
.lv:has(input:checked) .lvd { color: var(--navy); }
.lv:has(input:focus-visible) { box-shadow: var(--focus); }
.rtot { display: flex; gap: 16px; align-items: center; background: var(--navy); color: var(--on-navy); padding: 16px 18px; border-radius: var(--radius); margin-top: 14px; }
.rtot b { font-family: var(--f-title); font-weight: 800; font-size: 54px; color: var(--green-lt); line-height: 1; white-space: nowrap; }
.rtot b span { font-size: 24px; color: var(--on-navy-2); }
.rtot p { margin: 0; font-size: 16px; }

/* mapa del plan */
.states { margin: 18px 0 6px; }
.route { list-style: none; padding: 0; margin: 14px 0 24px; display: grid; gap: 0; position: relative; }
.node { position: relative; padding-left: 34px; }
.node::before { content: ''; position: absolute; left: 11px; top: 0; bottom: 0; width: 3px; background: var(--line); }
.node:first-child::before { top: 24px; }
.node:last-child::before { bottom: calc(100% - 24px); }
.node::after { content: ''; position: absolute; left: 3px; top: 18px; width: 19px; height: 19px; border-radius: 50%; background: var(--cream); border: 3px solid var(--line); }
.node.s-borrador::after { border-color: var(--amber); background: var(--amber-bg); }
.node.s-listo::after { border-color: var(--green); background: #fff; }
.node.s-terminado::after { border-color: var(--green); background: var(--green); }
.node a { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; padding: 12px 14px; margin: 6px 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); }
.node a:hover { border-color: var(--navy); }
.nn { grid-row: span 3; font-family: var(--f-title); font-weight: 800; font-size: 38px; line-height: .9; color: var(--ink); }
.nt { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 20px; line-height: 1.05; }
.nh { display: flex; flex-wrap: wrap; gap: 4px; }
.nh .chip-h { background: var(--gray); color: var(--ink); font-size: 13px; padding: 2px 7px; }
.node .badge { justify-self: start; }
.node.s-terminado a { background: var(--navy); color: var(--on-navy); border-color: var(--navy); }
.node.s-terminado .nn { color: var(--green-lt); }
.alerts-card h2 { margin-bottom: 6px; }
.acount { font-weight: 600; }
.acount b { font-family: var(--f-title); font-size: 28px; }
.alist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.alist a { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius); text-decoration: none; color: var(--ink); background: var(--amber-bg); border-left: 5px solid var(--amber); font-size: 16px; }
.alist .red a { background: var(--red-bg); border-left-color: var(--red); }
.alist a:hover { text-decoration: underline; }
.an { flex: 0 0 auto; font-family: var(--f-title); font-weight: 800; text-transform: uppercase; font-size: 15px; background: var(--navy); color: var(--on-navy); padding: 1px 7px; border-radius: 3px; }

/* recursos */
.datos { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.datos li { background: #fff; border-left: 5px solid var(--green); padding: 12px 14px; border-radius: var(--radius); }
.datos p { margin: 0; }
.src { font-size: 15px; color: var(--muted); margin-top: 4px !important; }
.defs { margin: 0; display: grid; gap: 10px; }
.defs div { background: #fff; padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--line); }
.defs dt { font-family: var(--f-title); font-weight: 800; text-transform: uppercase; font-size: 20px; }
.defs dt span { font-family: var(--f-body); text-transform: none; font-weight: 600; font-size: 15px; color: var(--muted); margin-left: 6px; }
.defs dd { margin: 0; }
.tpl { margin-bottom: 18px; }
.biblio { padding-left: 20px; }
.biblio li { margin-bottom: 8px; }

/* descargar: caja principal del PDF */
.pdfbox { display: grid; gap: 16px; align-items: center; background: var(--navy); color: var(--on-navy); border-left: 6px solid var(--green); border-radius: var(--radius); padding: 22px 20px; margin: 24px 0 12px; }
.pdfbox h2 { color: var(--green-lt); font-size: 34px; font-weight: 800; margin-bottom: 6px; }
.pdfbox p { color: var(--on-navy-2); margin: 0; font-size: 17px; }
.pdfbox b { color: var(--on-navy); }
.btn.big { min-height: 60px; font-size: 21px; padding: 12px 28px; font-weight: 700; }
.alt-l { margin-top: 22px; color: var(--ink); }
.alt { display: flex; flex-wrap: wrap; gap: 10px; }
@media (min-width: 640px) { .pdfbox { grid-template-columns: 1fr auto; padding: 26px 28px; } }

/* documento: la vista previa en pantalla usa el mismo diseño del PDF */
.doc { margin: 10px 0 48px; font-size: 16px; line-height: 1.5; color: var(--ink); }
.doc > section { position: relative; background: #fff; border: 1px solid var(--line); box-shadow: 0 18px 36px -28px rgba(7, 0, 36, .5); padding: 34px 30px; margin-bottom: 22px; }
.doc a { color: inherit; text-decoration: none; }
.doc .dk { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; color: #128A3E; margin: 0 0 4px; }
.doc h2 { font-size: 34px; font-weight: 800; margin: 0 0 18px; }
.doc h3 { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; margin: 26px 0 10px; }
.doc h3::before { content: ''; flex: 0 0 18px; height: 5px; background: var(--green); }
.doc h4 { font-size: 16px; font-weight: 700; letter-spacing: .03em; margin: 18px 0 6px; color: var(--ink-2); }
.pend { color: var(--muted); font-style: italic; }
.dash { color: #A9A7B8; }

/* portada */
.doc .doc-cover { background: var(--navy); color: var(--on-navy); border: 0; border-top: 10px solid var(--green); display: flex; flex-direction: column; justify-content: space-between; gap: 40px; min-height: 640px; overflow: hidden; padding: 44px 34px; }
.doc-cover::before { content: ''; position: absolute; right: -130px; top: -130px; width: 420px; height: 420px; border-radius: 50%; border: 46px solid rgba(29, 185, 84, .14); }
.doc-cover::after { content: ''; position: absolute; right: 34px; bottom: 34px; width: 90px; height: 90px; border: 4px solid var(--green); }
.doc-cover > div { position: relative; z-index: 1; }
.dc-k { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 15px; color: var(--green-lt); margin: 0; }
.dc-title { font-family: var(--f-title); font-weight: 800; text-transform: uppercase; font-size: clamp(52px, 11vw, 96px); line-height: .88; letter-spacing: -.02em; margin: 16px 0 18px; }
.dc-title span { color: var(--green); display: block; }
.dc-sub { font-size: 19px; color: var(--on-navy-2); max-width: 520px; margin: 0; }
.dc-l { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: 13px; color: var(--green-lt); margin: 0 0 4px; }
.dc-name { font-family: var(--f-title); font-weight: 800; text-transform: uppercase; font-size: 40px; line-height: 1; margin: 0 0 16px; }
.dc-roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; }
.dc-roles div { border-left: 3px solid var(--green); padding-left: 10px; }
.dc-roles dt { font-size: 13px; color: var(--on-navy-2); }
.dc-roles dd { margin: 0; font-weight: 600; font-size: 18px; }
.dc-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; border-top: 1px solid rgba(242, 241, 236, .25); padding-top: 16px; font-size: 15px; }
.dc-foot p { margin: 0; }

/* índice */
.dix { list-style: none; padding: 0; margin: 0 0 24px; }
.dix li { display: grid; grid-template-columns: 54px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray); }
.dixn { font-family: var(--f-title); font-weight: 800; font-size: 24px; color: var(--ink); }
.dixt { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 19px; line-height: 1.1; }
.dchip { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 12.5px; letter-spacing: .04em; padding: 3px 8px; border-radius: 3px; white-space: nowrap; }
.e-sin { background: var(--gray); color: var(--ink); }
.e-borrador { background: var(--amber-bg); color: var(--amber-ink); }
.e-listo { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--green); }
.e-terminado { background: var(--green); color: var(--navy); }
.dabout { background: var(--paper); border-left: 4px solid var(--green); padding: 12px 16px; font-size: 15px; color: var(--ink-2); }
.dabout p { margin: 0; }

/* el plan en una página */
.dmsg { background: var(--navy); color: var(--on-navy); border-left: 6px solid var(--green); padding: 16px 20px; margin: 8px 0 16px; }
.doc .dmsg .dk { color: var(--green-lt); }
.dmp { font-family: var(--f-title); font-weight: 800; text-transform: uppercase; color: var(--green-lt); font-size: 30px; line-height: 1; margin: 0 0 12px; }
.dmsg.big .dmp { font-size: 40px; }
.dmv { margin: 0; font-size: 18px; }
.dmv span { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .08em; background: var(--green); color: var(--navy); padding: 2px 7px; border-radius: 3px; margin-right: 6px; }
.dmsg .pend { color: var(--on-navy-2); }
.dq { margin: 4px 0 16px; padding: 12px 16px; border-left: 4px solid var(--navy); background: var(--paper); font-size: 18px; line-height: 1.45; }
.dstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.dstats.four { grid-template-columns: repeat(2, 1fr); }
.dt { border-top: 4px solid var(--navy); background: var(--paper); padding: 10px 12px; display: grid; gap: 2px; }
.dt b { font-family: var(--f-title); font-weight: 800; font-size: 26px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.dt span { font-size: 13.5px; color: var(--muted); line-height: 1.25; }
.dt.ok { border-top-color: var(--green); }
.dt.bad { border-top-color: var(--red); }
.dt.bad b { color: var(--red); }
.dtwo { display: grid; gap: 16px; }
.dtwo p:last-child { margin: 0; }
@media (min-width: 640px) { .dstats.four { grid-template-columns: repeat(4, 1fr); } .dtwo { grid-template-columns: 1fr 1fr; } }

/* capítulos */
.dsh { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; align-items: end; padding-bottom: 14px; border-bottom: 3px solid var(--navy); margin-bottom: 14px; }
.dsh .dchip { grid-column: 2; justify-self: start; }
.dsn { grid-row: span 2; align-self: stretch; display: flex; align-items: center; justify-content: center; min-width: 76px; background: var(--navy); color: var(--green-lt); font-family: var(--f-title); font-weight: 800; font-size: 46px; line-height: 1; padding: 8px 10px; }
.dsh h2 { margin: 0; font-size: 30px; line-height: 1; }
.dent { font-size: 15px; color: var(--ink-2); background: var(--paper); border-left: 3px solid var(--green); padding: 8px 12px; margin-bottom: 8px; }
.dkv { margin: 0 0 12px; }
.dkv div { display: grid; gap: 2px 18px; padding: 9px 0; border-bottom: 1px solid var(--gray); }
.dkv dt { font-weight: 700; font-size: 14.5px; color: var(--ink-2); }
.dkv dd { margin: 0; }
@media (min-width: 640px) { .dkv div { grid-template-columns: 34% 1fr; } }
.dnote { color: var(--muted); font-size: 14.5px; border-left: 3px solid var(--line); padding-left: 10px; }
.doc .t { font-size: 14px; }
.doc .t th, .doc .t td { padding: 7px 9px; }
.doc .t tbody tr:nth-child(even) td { background: #FAF9F5; }
.doc .t tr.tf td { background: var(--gray); font-weight: 700; border-top: 2px solid var(--navy); }
.doc .t.num td:not(:first-child), .doc .t.num th:not(:first-child) { text-align: right; }
.doc .t.mxt { table-layout: fixed; }
.doc .t.mxt td:first-child { font-weight: 700; }
.doc .t.mxt th:nth-child(1) { width: 11%; } .doc .t.mxt th:nth-child(2) { width: 25%; } .doc .t.mxt th:nth-child(3) { width: 18%; } .doc .t.mxt th:nth-child(4) { width: 14%; } .doc .t.mxt th:nth-child(5) { width: 13%; } .doc .t.mxt th:nth-child(6) { width: 11%; } .doc .t.mxt th:nth-child(7) { width: 8%; }
.doc .t.eth td:first-child { width: 42%; }
.dfoda { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--navy); margin: 6px 0 14px; }
.fq { padding: 10px 12px; min-height: 90px; }
.fq:nth-child(1), .fq:nth-child(2) { border-bottom: 1px solid var(--line); }
.fq:nth-child(odd) { border-right: 1px solid var(--line); }
.fql { font-family: var(--f-title); font-weight: 800; text-transform: uppercase; font-size: 15px; margin: 0 0 4px; }
.fq.in .fql::after { content: ' · interna'; font-weight: 600; color: var(--muted); font-size: 12px; }
.fq.ex .fql::after { content: ' · externa'; font-weight: 600; color: var(--muted); font-size: 12px; }
.fq ul { margin: 0; padding-left: 18px; font-size: 15px; }
.dfun { display: grid; gap: 6px; margin: 8px 0 12px; }
.dfun > div { display: grid; grid-template-columns: 100px 1fr 90px; gap: 10px; align-items: center; }
.dfl { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 15px; }
.dfb { height: 18px; background: var(--gray); }
.dfb i { display: block; height: 100%; background: var(--navy); }
.dfun > div:nth-child(3) .dfb i, .dfun > div:nth-child(4) .dfb i { background: var(--green); }
.dfv { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.dpmw { display: grid; gap: 12px; align-items: start; }
@media (min-width: 640px) { .dpmw { grid-template-columns: 340px 1fr; } }
.dpm { width: 100%; max-width: 340px; display: block; }
.dl, .dbib { padding-left: 20px; margin: 0 0 12px; }
.dbib li { padding-left: 22px; text-indent: -22px; list-style: none; margin-bottom: 6px; }
.dbib { padding-left: 0; }
.dal { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.dal li { padding: 8px 12px; background: var(--amber-bg); border-left: 4px solid var(--amber); font-size: 15px; }
.dal li.red { background: var(--red-bg); border-left-color: var(--red); }
.dal span { font-family: var(--f-title); font-weight: 800; text-transform: uppercase; font-size: 13px; background: var(--navy); color: var(--on-navy); padding: 1px 6px; border-radius: 3px; margin-right: 8px; }

/* modal y aviso */
.modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(7, 0, 36, .7); display: flex; align-items: flex-end; justify-content: center; }
.modal { background: var(--cream); width: 100%; max-height: 92vh; display: flex; flex-direction: column; border-radius: 12px 12px 0 0; box-shadow: 0 -10px 40px rgba(0, 0, 0, .3); }
.mhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--navy); color: var(--on-navy); padding: 14px 16px; border-radius: 12px 12px 0 0; }
.mhead h2 { color: var(--green-lt); font-size: 26px; font-weight: 800; }
.mx-close { background: transparent; border: 0; color: var(--on-navy); width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; border-radius: var(--radius); }
.mx-close .ic { width: 26px; height: 26px; }
.mbody { padding: 16px; overflow-y: auto; }
.mfoot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); background: var(--paper); }
.mctx { font-size: 16px; background: #fff; border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--radius); }
.mmsg { font-size: 16px; background: var(--navy); color: var(--on-navy); padding: 10px 12px; border-radius: var(--radius); border-left: 4px solid var(--green); }
#toast { visibility: hidden; opacity: 0; position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); background: var(--green); color: var(--navy); font-weight: 700; padding: 12px 20px; border-radius: var(--radius); z-index: 80; transition: transform .25s; box-shadow: 0 10px 30px -10px rgba(7, 0, 36, .5); max-width: calc(100% - 32px); }
#toast.on { transform: translate(-50%, 0); visibility: visible; opacity: 1; }

/* pie */
.foot { background: var(--navy); color: var(--on-navy-2); padding: 26px 0; font-size: 16px; }
.foot p { margin: 0 0 6px; }
.foot b { color: var(--on-navy); }
.foot a { color: var(--green-lt); }

/* ---------- tablet y escritorio ---------- */
@media (min-width: 640px) {
  .two { grid-template-columns: 1fr 1fr; }
  .foda { grid-template-columns: 1fr 1fr; }
  .ej { grid-template-columns: 1fr 1fr; }
  .roles { grid-template-columns: repeat(3, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
  .capnav { grid-template-columns: 1fr 1fr; }
  .ejes { grid-template-columns: 1fr 1fr; }
  .bnums { grid-template-columns: repeat(3, 1fr); }
  .kgrid { grid-template-columns: 1fr 1fr; }
  .otro { grid-template-columns: 2fr 1fr 1fr auto; align-items: end; }
  .otro .del { margin-bottom: 14px; }
  .weeks { grid-template-columns: 1fr 1fr; }
  .emb { grid-template-columns: 1fr 1fr; }
  .modal-bg { align-items: center; padding: 20px; }
  .modal { max-width: 560px; border-radius: 12px; }
  .modal.wide { max-width: 860px; }
  .mhead { border-radius: 12px 12px 0 0; }
  .rlv { grid-template-columns: repeat(3, 1fr); }
  .card { padding: 26px 26px; }
}
@media (min-width: 900px) {
  .head { padding: 48px 0 52px; }
  .hero-g { grid-template-columns: 1.3fr 1fr; align-items: end; gap: 40px; }
  .home { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; grid-template-areas: "team team" "prog hitos" "av hitos" "how how"; align-items: start; }
  .home .team { grid-area: team; } .home .how { grid-area: how; } .home .prog { grid-area: prog; } .home .hit { grid-area: hitos; } .home .navy { grid-area: av; }
  .objs { grid-template-columns: repeat(3, 1fr); }
  .journey { grid-template-columns: repeat(5, 1fr); }
  .kgrid { grid-template-columns: repeat(4, 1fr); }
  .kgrid .radios { grid-column: span 2; }
  .weeks { grid-template-columns: repeat(3, 1fr); }
  .pm-wrap { grid-template-columns: 1fr 1fr; align-items: start; }
  /* matriz como tabla */
  .mx { gap: 6px; }
  .mx-row.mx-headrow { display: grid; }
  .mx-row { grid-template-columns: 190px repeat(4, 1fr); gap: 6px; }
  .mx-tool { grid-column: auto; display: flex; flex-direction: column; justify-content: center; }
  .mx-corner { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 14px; color: var(--muted); display: flex; align-items: flex-end; padding: 8px; }
  .mx-ch { background: var(--navy-2); color: var(--on-navy); padding: 10px 12px; border-radius: var(--radius); }
  .mx-ch b { font-family: var(--f-title); text-transform: uppercase; font-size: 20px; color: var(--green-lt); }
  .cell .cl { display: none; }
  .cell { min-height: 110px; }
  /* presupuesto como tabla */
  .bg { gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .bg-head { display: grid !important; background: var(--navy); color: var(--on-navy); font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 16px; }
  .bg-row { grid-template-columns: 190px repeat(4, 1fr) 150px; border: 0; border-bottom: 1px solid var(--gray); border-radius: 0; align-items: start; padding: 10px 12px; }
  .bg-tool { grid-column: auto; font-size: 18px; padding-top: 10px; }
  .bg-cell .cl, .bg-tot .cl, .bg-foot .cl { display: none; }
  .bg-tot { grid-column: auto; border: 0; padding-top: 12px; justify-content: flex-end; font-size: 18px; }
  .bg-foot { border-radius: 0; }
  .bg-foot > div:first-child { grid-column: auto; font-size: 18px; }
  .bg-foot > div { text-align: right; }
  .bg-foot > div:first-child { text-align: left; }
}
@media (min-width: 1000px) {
  .route { grid-template-columns: repeat(5, 1fr); gap: 34px 12px; padding-top: 18px; }
  .node { padding-left: 0; padding-top: 30px; }
  .node::before { left: -12px; right: 0; top: 13px; bottom: auto; width: auto; height: 3px; }
  .node:first-child::before { top: 13px; left: 10px; }
  .node:last-child::before { bottom: auto; right: calc(100% - 10px); }
  .node:nth-child(5n)::before { right: 0; }
  .node:nth-child(5n + 1)::before { left: 10px; }
  .node::after { left: 0; top: 4px; }
  .node a { height: calc(100% - 6px); grid-template-columns: 1fr; align-content: start; margin: 0; }
  .nn { grid-row: auto; }
}
/* ---------- accesibilidad: menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- PDF (impresión) ---------- */
@media print {
  @page { size: letter; margin: 20mm 16mm 18mm; }
  @page portada { margin: 0; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }
  html, body { background: #fff !important; }
  body { font-size: 10.5pt; line-height: 1.45; }
  .topbar, .nav, .foot, .head, .no-print, #toast, .skip, .modal-bg { display: none !important; }
  main, .wrap, .wrap.narrow { max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .doc { margin: 0; font-size: 10.5pt; }
  .doc > section { border: 0; box-shadow: none; padding: 0; margin: 0; }
  .doc .doc-cover { page: portada; height: 279mm; min-height: 0; padding: 26mm 22mm 22mm; border-top: 0; border-left: 14mm solid var(--green); break-after: page; page-break-after: always; justify-content: space-between; }
  .doc-cover::before { right: -40mm; top: -40mm; width: 130mm; height: 130mm; border-width: 14mm; }
  .doc-cover::after { right: 18mm; top: 118mm; bottom: auto; width: 26mm; height: 26mm; border-width: 1.6mm; }
  .dc-title { font-size: 70pt; }
  .dc-sub { font-size: 14pt; max-width: 120mm; }
  .dc-name { font-size: 30pt; }
  .dc-roles dd { font-size: 13pt; }
  .dc-foot { font-size: 10.5pt; }
  .doc-index, .doc-ficha { break-after: page; page-break-after: always; }
  .doc-sec { break-before: page; page-break-before: always; }
  .doc h2 { font-size: 24pt; }
  .doc h3 { font-size: 14pt; margin: 18px 0 8px; break-after: avoid; page-break-after: avoid; }
  .doc h4 { font-size: 11pt; break-after: avoid; page-break-after: avoid; }
  .dsn { font-size: 32pt; min-width: 22mm; }
  .dsh { break-after: avoid; page-break-after: avoid; }
  .dsh h2 { font-size: 22pt; }
  .dix li { padding: 7px 0; }
  .dixt { font-size: 13pt; }
  .dixn { font-size: 16pt; }
  .dmsg.big .dmp { font-size: 28pt; }
  .dmp { font-size: 20pt; }
  .dstats.four { grid-template-columns: repeat(4, 1fr); }
  .dtwo { grid-template-columns: 1fr 1fr; }
  .dt b { font-size: 16pt; }
  .dkv div { grid-template-columns: 32% 1fr; }
  .dpmw { grid-template-columns: 75mm 1fr; }
  .doc .t { font-size: 8.8pt; }
  .doc .t th { font-size: 8.5pt; }
  .doc .t tr, .dkv div, .dt, .dmsg, .dq, .dfoda, .dal li, .dpmw, .dfun { break-inside: avoid; page-break-inside: avoid; }
  .doc .t thead { display: table-header-group; }
  .tablewrap { overflow: visible; }
}

/* saltos internos del capítulo 8 */
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.jump a { font-family: var(--f-title); font-weight: 700; text-transform: uppercase; font-size: 16px; padding: 8px 14px; border: 1.5px solid var(--navy); border-radius: var(--radius); text-decoration: none; }
.jump a:hover { background: var(--navy); color: var(--on-navy); }

@media (min-width: 900px) { .pm-wrap > [data-fn="pmap"] { position: sticky; top: 130px; } }
