/* =========================================================
   Maestro Innova · CNPIE 2027 · Hoja de estilos
   Paleta: tinta (#14213D), papel (#FBF7F0), coral (#E4572E), oro (#FCA311)
   ========================================================= */
@font-face { font-family: "Fraunces"; src: url(../fonts/fraunces-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(../fonts/fraunces-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(../fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(../fonts/plus-jakarta-sans-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(../fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Jakarta"; src: url(../fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: light;
  --ink: #111A2E; --ink-2: #364259; --muted: #687387; --line: #E3DED4;
  --paper: #F6F4EF; --surface: #FFFFFF; --soft: #F0ECE4; --card: var(--surface);
  --brand: #14213D; --brand-2: #22345E; --on-brand: #FFFFFF;
  --coral: #E4572E; --gold: #F2A50C; --teal: #2A9D8F; --ok: #1F8F5F; --err: #C2410C;
  --t-info-bg: #EEF5FF; --t-info-bd: #C9DCF5; --t-info-tx: var(--t-info-tx);
  --t-ok-bg: #E8F7EF; --t-ok-bd: #B6E3CA; --t-ok-tx: var(--t-ok-tx);
  --t-warn-bg: #FFF7E6; --t-warn-bd: #F1CD7E; --t-warn-tx: var(--t-warn-tx);
  --t-err-bg: var(--t-err-bg); --t-err-bd: #F5C3AE; --t-err-tx: var(--t-err-tx);
  --radius: 14px; --shadow: 0 1px 2px rgba(17,26,46,.05), 0 6px 20px -10px rgba(17,26,46,.16);
  --shadow-lg: 0 24px 50px -18px rgba(17,26,46,.35);
  --ff-head: "Fraunces", Georgia, serif; --ff: "Jakarta", system-ui, -apple-system, "Segoe UI", sans-serif;
  --c: var(--coral);
}
[data-theme="dark"] {
  color-scheme: dark;
  --ink: #E6EAF2; --ink-2: #C3CBDA; --muted: #8D98AE; --line: #2A3450;
  --paper: #0D1321; --surface: #151D30; --soft: #1C2640;
  --brand: #E6EAF2; --brand-2: #FFFFFF; --on-brand: #0D1321;
  --coral: #F0714A; --gold: #F5B533; --teal: #3CB8A8; --ok: #3DBB82; --err: #F07B52;
  --t-info-bg: #14233D; --t-info-bd: #284374; --t-info-tx: #BFD5F5;
  --t-ok-bg: #11291F; --t-ok-bd: #22573E; --t-ok-tx: #A8E6C6;
  --t-warn-bg: #2A2112; --t-warn-bd: #5E4719; --t-warn-tx: #F3D18E;
  --t-err-bg: #2C1812; --t-err-bd: #64301F; --t-err-tx: #F6B8A0;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.55);
  --shadow-lg: 0 24px 50px -18px rgba(0,0,0,.7);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--ff); color: var(--ink); background: var(--paper); line-height: 1.55; font-size: 15.5px; padding-bottom: env(safe-area-inset-bottom); }
h1, h2, h3, h4 { font-family: var(--ff-head); line-height: 1.2; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); }
h3 { font-size: 1.15rem; }
a { color: var(--ink); text-decoration-color: rgba(228,87,46,.5); text-underline-offset: 3px; }
a:hover { color: var(--coral); }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); } .small { font-size: .86rem; } .center { text-align: center; }
.eyebrow { text-transform: uppercase; font-size: .74rem; letter-spacing: .12em; font-weight: 700; color: var(--coral); margin-bottom: .35rem; }
.lead { font-size: 1.08rem; color: var(--ink-2); }
code { background: var(--soft); padding: .1em .35em; border-radius: 6px; }

/* ---------- Topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 1.2rem; padding: .7rem clamp(1rem, 3vw, 2rem); background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; }
.logo-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--brand); color: var(--gold); font-family: var(--ff-head); font-weight: 700; font-size: 1.05rem; box-shadow: inset 0 -3px 0 var(--coral); }
.brand-txt strong { display: block; font-family: var(--ff-head); font-size: 1.1rem; line-height: 1; }
.brand-txt small { font-size: .7rem; letter-spacing: .14em; color: var(--coral); font-weight: 700; }
.mainnav { display: flex; gap: .3rem; margin-left: 1rem; }
.mainnav a { text-decoration: none; padding: .45rem .8rem; border-radius: 10px; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.mainnav a.on, .mainnav a:hover { background: var(--brand); color: var(--on-brand); }
.usermenu { margin-left: auto; display: flex; align-items: center; gap: .7rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; font-weight: 700; }
.link-quiet { font-size: .88rem; color: var(--muted); }

.page { max-width: 1320px; margin: 0 auto; padding: clamp(1rem, 3vw, 2rem); }
.page-head { margin-bottom: 1.4rem; max-width: 820px; }

/* ---------- Buttons ---------- */
.btn { --b: var(--ink); display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1.5px solid transparent; border-radius: 12px; padding: .62rem 1.05rem; font: 600 .94rem var(--ff); cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .12s, background .15s; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 6px 14px -8px rgba(20,33,61,.7); }
.btn-primary:hover { background: var(--coral); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); color: var(--ink); background: var(--surface); }
.btn-danger { background: var(--surface); color: var(--err); border-color: var(--t-err-bd); }
.btn-danger:hover { background: var(--err); color: #fff; }
.btn-sm { padding: .42rem .75rem; font-size: .85rem; border-radius: 10px; }
.btn-lg { padding: .85rem 1.4rem; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---------- Cards & grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1rem, 2.2vw, 1.4rem); box-shadow: var(--shadow); margin-bottom: 1.1rem; }
.card-title { font-size: 1.02rem; margin-bottom: .6rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.grid-2 > .card, .grid-3 > .card, .grid-4 > .card { margin-bottom: 0; }
section.grid-2, section.grid-3 { margin-bottom: 1.1rem; }
.chart-box { position: relative; height: 260px; } .chart-box.tall { height: 360px; } .chart-box.sm { height: 210px; }
.tag { display: inline-flex; align-items: center; gap: .3rem; padding: .18rem .6rem; border-radius: 99px; font-size: .76rem; font-weight: 700; background: var(--brand); color: var(--on-brand); }
.tag-soft { background: var(--soft); color: var(--ink-2); }
.pill { display: inline-block; padding: .35rem .8rem; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: .8rem; font-weight: 600; }
.bar { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--coral), var(--gold)); border-radius: 99px; transition: width .4s; }

/* ---------- Alerts / toast ---------- */
.alert { border-radius: 12px; padding: .85rem 1rem; margin-bottom: 1rem; border: 1px solid; }
.alert ul { margin: .3rem 0 0 1.1rem; padding: 0; }
.alert-err { background: var(--t-err-bg); border-color: var(--t-err-bd); color: var(--t-err-tx); }
.alert-info { background: var(--t-info-bg); border-color: var(--t-info-bd); color: var(--t-info-tx); }
.toast { position: fixed; top: 76px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--brand); color: var(--on-brand); padding: .7rem 1.1rem; border-radius: 12px; box-shadow: var(--shadow); animation: toast 4s forwards; }
.toast-err { background: var(--err); }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -10px); } 8%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; visibility: hidden; } }

/* ---------- Forms ---------- */
.form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .9rem; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=url], input[type=tel], input:not([type]), select, textarea {
  width: 100%; margin-top: .35rem; padding: .7rem .85rem; font: 400 .97rem var(--ff); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
textarea { resize: vertical; line-height: 1.6; min-height: 140px; }
.check { display: flex !important; align-items: flex-start; gap: .55rem; font-weight: 500 !important; cursor: pointer; }
.check input { margin-top: .3rem; accent-color: var(--coral); }
fieldset.card { border: 1px solid var(--line); }
legend { font-family: var(--ff-head); font-weight: 700; font-size: 1.12rem; padding: 0 .4rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.num { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: var(--coral); color: #fff; font-family: var(--ff); font-size: .85rem; }
.hint { background: var(--soft); border-radius: 10px; padding: .6rem .8rem; font-size: .9rem; margin: .8rem 0 0; }
.tip { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--soft); color: var(--ink-2); font-size: .72rem; font-weight: 700; cursor: help; position: relative; vertical-align: middle; border: 1px solid var(--line); }
.tip:hover::after, .tip:focus::after { content: attr(data-tip); position: absolute; left: 50%; bottom: 130%; transform: translateX(-50%); width: min(300px, 80vw); background: var(--brand); color: var(--on-brand); font: 400 .82rem/1.45 var(--ff); padding: .65rem .8rem; border-radius: 10px; z-index: 30; box-shadow: var(--shadow); white-space: normal; text-align: left; }
.radio-cards { gap: .8rem; }
.radio-card { position: relative; cursor: pointer; margin: 0 !important; }
.radio-card input { position: absolute; opacity: 0; }
.rc-body { display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: 1rem; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); transition: .15s; font-weight: 500; }
.rc-body strong { font-family: var(--ff-head); font-size: 1.05rem; }
.rc-body small { color: var(--coral); font-weight: 700; font-size: .76rem; }
.rc-desc { font-size: .86rem; color: var(--muted); font-weight: 400; }
.rc-ico { font-size: 1.6rem; }
.radio-card input:checked + .rc-body { border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 4px rgba(252,163,17,.25); }
.radio-card input:focus-visible + .rc-body { outline: 3px solid var(--gold); }
.radio-card.disabled { opacity: .38; pointer-events: none; }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { margin: 0 !important; cursor: pointer; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-block; padding: .45rem .8rem; border-radius: 99px; border: 1.5px solid var(--line); background: var(--surface); font-size: .85rem; font-weight: 500; transition: .15s; }
.chip input:checked + span { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.comp-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: .1rem 1rem; max-height: 340px; overflow: auto; padding: .4rem; border: 1px solid var(--line); border-radius: 12px; margin-top: .6rem; }
.comp-list .check { margin: 0 !important; padding: .35rem .3rem; border-radius: 8px; font-size: .88rem; }
.comp-list .check:hover { background: var(--soft); }
.counter-badge { font-family: var(--ff); font-size: .8rem; background: var(--soft); padding: .15rem .55rem; border-radius: 99px; }
.counter-badge.ok { background: var(--t-ok-bg); color: var(--ok); } .counter-badge.over { background: var(--t-err-bg); color: var(--err); }
.filter { margin-top: 0 !important; }
.helper { background: var(--t-warn-bg); border: 1px dashed var(--t-warn-bd); border-radius: 12px; padding: .7rem 1rem; margin-bottom: 1rem; }
.helper summary { cursor: pointer; font-weight: 600; }
.quiz-opts { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .6rem; }
.quiz-opts button { border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: .5rem .8rem; font: 500 .88rem var(--ff); cursor: pointer; text-align: left; }
.quiz-opts button:hover, .quiz-opts button.on { border-color: var(--brand); background: var(--brand); color: var(--on-brand); }
.quiz-res { font-weight: 600; color: var(--ok); }
.sticky-actions { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--paper) 30%); padding: 1.2rem 0 .6rem; display: flex; justify-content: flex-end; gap: .6rem; z-index: 5; }

/* ---------- Auth ---------- */
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 1.2rem; background: radial-gradient(circle at 15% 10%, #FFE9D6 0, transparent 40%), radial-gradient(circle at 90% 80%, #DCEFEA 0, transparent 40%), var(--paper); }
.auth-card { width: min(440px, 100%); background: var(--surface); border-radius: 22px; padding: 2rem; box-shadow: var(--shadow); border: 1px solid var(--line); }
.brand-lg { display: flex; gap: .7rem; align-items: center; text-decoration: none; margin-bottom: 1.4rem; }
.brand-lg strong { display: block; font-family: var(--ff-head); font-size: 1.3rem; }
.brand-lg small { color: var(--coral); font-weight: 700; letter-spacing: .1em; font-size: .72rem; }
.install-log { padding-left: 1.1rem; } .install-log li { margin-bottom: .4rem; }

/* ---------- Landing ---------- */
.hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; padding: 1.5rem 0 2.5rem; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); margin: 1rem 0; }
.hero h1 em { font-style: normal; color: var(--coral); background: linear-gradient(transparent 65%, rgba(252,163,17,.35) 0); }
.hero-cta { display: flex; gap: .7rem; flex-wrap: wrap; margin: 1.4rem 0; }
.countdown { display: inline-block; background: var(--brand); color: var(--on-brand); padding: 1rem 1.3rem; border-radius: 16px; }
.cd-label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.cd-grid, .cd-units { display: grid; grid-template-columns: repeat(3, 70px); text-align: center; }
.cd-grid b { font-family: var(--ff-head); font-size: 2rem; }
.cd-units span { font-size: .72rem; opacity: .7; }
.steps-orbit { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; counter-reset: s; }
.steps-orbit li { display: grid; grid-template-columns: 34px 34px 1fr; grid-template-rows: auto auto; column-gap: .6rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 14px; padding: .6rem .9rem; box-shadow: var(--shadow); transition: transform .2s; }
.steps-orbit li:nth-child(even) { margin-left: 1.6rem; }
.steps-orbit li:hover { transform: translateX(6px); }
.steps-orbit .n { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 700; }
.steps-orbit .ico { grid-row: span 2; font-size: 1.4rem; }
.steps-orbit small { color: var(--muted); font-size: .82rem; }
.band { padding: 2rem 0; } .band-alt { background: var(--surface); border-radius: 24px; padding: 2rem; border: 1px solid var(--line); }
.section-title { margin-bottom: 1.2rem; }
.cat-card .cat-ico { font-size: 2rem; }
.feature-grid .f-ico { font-size: 2rem; }

/* ---------- Dashboard ---------- */
.dash-head { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.4rem; }
.kpis { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: .6rem 1rem; text-align: center; min-width: 100px; }
.kpi b { display: block; font-family: var(--ff-head); font-size: 1.6rem; line-height: 1.1; }
.kpi span { font-size: .78rem; color: var(--muted); }
.kpi-warn b { color: var(--coral); }
.empty { text-align: center; padding: 3rem 1.5rem; }
.empty-ico { font-size: 3rem; }
.proj-card { display: grid; grid-template-columns: 84px 1fr auto; gap: 1.2rem; align-items: center; }
.proj-info h3 { margin: .4rem 0 .1rem; font-size: 1.2rem; }
.proj-info h3 a { text-decoration: none; }
.ring { --p: 0; width: 80px; height: 80px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--coral) calc(var(--p) * 1%), var(--soft) 0); }
.ring span { width: 62px; height: 62px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-family: var(--ff-head); }
.steps-mini { display: flex; gap: .3rem; margin-top: .5rem; flex-wrap: wrap; }
.steps-mini a { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: .8rem; font-weight: 700; text-decoration: none; color: var(--ink); border: 2px solid var(--c); background: linear-gradient(to top, color-mix(in srgb, var(--c) 35%, var(--surface)) var(--p), var(--surface) 0); }
.steps-mini a.opt { border-style: dashed; opacity: .7; }
.proj-actions { display: flex; flex-direction: column; gap: .4rem; align-items: stretch; min-width: 150px; }
.score { text-align: center; } .score b { font-family: var(--ff-head); font-size: 1.7rem; display: block; line-height: 1; } .score small { color: var(--muted); font-size: .75rem; }

/* ---------- Wizard ---------- */
.wizard-body .page { max-width: 1440px; }
.wizard { display: grid; grid-template-columns: 260px minmax(0, 1fr) 280px; gap: 1.4rem; align-items: start; }
.wz-steps { position: sticky; top: 80px; }
.wz-proj { display: block; text-decoration: none; background: var(--brand); color: var(--on-brand); border-radius: 16px; padding: 1rem; margin-bottom: .8rem; }
.wz-proj strong { display: block; font-family: var(--ff-head); margin: .5rem 0 .2rem; line-height: 1.25; }
.wz-proj small { color: var(--gold); font-size: .78rem; }
.wz-proj .tag { background: rgba(255,255,255,.14); }
.wz-proj:hover { color: var(--on-brand); background: var(--brand-2); }
.wz-steps ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; position: relative; }
.wz-steps li a { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border-radius: 12px; text-decoration: none; color: var(--ink); }
.wz-steps li a:hover { background: var(--surface); }
.wz-steps li.on a { background: var(--surface); box-shadow: var(--shadow); outline: 2px solid var(--c); }
.st-ring { --p: 0; width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--line) 0); }
.st-ring span { width: 30px; height: 30px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: .85rem; color: var(--c); }
.wz-steps li.done .st-ring span { background: var(--c); color: #fff; }
.st-txt b { display: block; font-size: .92rem; } .st-txt small { color: var(--muted); font-size: .75rem; }
.wz-total { margin-top: 1rem; display: grid; gap: .5rem; }
.wz-head { display: grid; grid-template-columns: auto 1fr auto; gap: 1.1rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1.3rem; margin-bottom: 1.1rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.wz-head::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; background: var(--c); }
.wz-head h1 { margin: 0; color: var(--c); }
.wz-head .lead { margin: .2rem 0 0; }
.wz-badge span { width: 64px; height: 64px; display: grid; place-items: center; font-size: 2rem; border-radius: 18px; background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.wz-pts { text-align: center; background: color-mix(in srgb, var(--c) 10%, var(--surface)); border-radius: 14px; padding: .6rem .9rem; }
.wz-pts b { display: block; font-family: var(--ff-head); font-size: 2rem; line-height: 1; color: var(--c); }
.wz-pts small { font-size: .72rem; color: var(--muted); }
.guide summary { cursor: pointer; font-weight: 700; font-family: var(--ff-head); font-size: 1.05rem; }
.guide summary small { font-family: var(--ff); font-weight: 400; color: var(--muted); font-size: .8rem; }
.guide > p { margin-top: .8rem; }
.guide-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1rem; }
.guide-grid h4 { font-size: .95rem; }
.guide-grid ul { margin: 0; padding-left: 1.1rem; font-size: .9rem; } .guide-grid li { margin-bottom: .35rem; }
.example { background: color-mix(in srgb, var(--c) 7%, var(--surface)); border-radius: 12px; padding: .8rem 1rem; font-size: .9rem; border: 1px dashed color-mix(in srgb, var(--c) 40%, var(--surface)); }
.ind { border-top: 4px solid var(--c); scroll-margin-top: 90px; }
.ind-head { display: grid; grid-template-columns: auto 1fr auto; gap: .8rem; align-items: start; }
.ind-head h3 { font-family: var(--ff); font-size: .99rem; font-weight: 600; margin: 0; line-height: 1.45; }
.ind-cod { font-weight: 700; font-size: .82rem; padding: .2rem .5rem; border-radius: 8px; background: var(--c); color: #fff; white-space: nowrap; }
.ind-pts { font-weight: 700; font-size: .82rem; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); padding: .2rem .55rem; border-radius: 8px; white-space: nowrap; }
.evid { font-size: .85rem; background: var(--soft); padding: .55rem .8rem; border-radius: 10px; margin: .8rem 0 0; }
.editor { margin-top: .8rem; }
.ed-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: .4rem; }
.len { flex: 1; display: flex; align-items: center; gap: .6rem; }
.len-bar { flex: 0 0 140px; height: 6px; border-radius: 99px; background: var(--soft); overflow: hidden; }
.len-bar span { display: block; height: 100%; width: 0; background: var(--c); transition: width .25s; }
.len.over .len-bar span { background: var(--err); } .len.over small { color: var(--err); }
.save-state { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.save-state.ok { color: var(--ok); } .save-state.err { color: var(--err); }
.checks { margin-top: .7rem; display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; }
.checks small { color: var(--muted); font-weight: 600; }
.checks ul { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.checks li { font-size: .78rem; padding: .2rem .55rem; border-radius: 99px; background: var(--soft); color: var(--muted); }
.checks li.ok { background: var(--t-ok-bg); color: var(--t-ok-tx); }
.checks li::before { content: "○ "; } .checks li.ok::before { content: "✓ "; }
.selfeval { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .9rem; padding-top: .8rem; border-top: 1px dashed var(--line); font-size: .88rem; font-weight: 600; }
.lvls { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.lvls button { border: 0; background: var(--surface); padding: .35rem .8rem; font: 700 .85rem var(--ff); cursor: pointer; border-right: 1px solid var(--line); color: var(--ink-2); }
.lvls button:last-child { border-right: 0; }
.lvls button[aria-checked=true] { background: var(--c); color: #fff; }
.lvls button:hover { background: color-mix(in srgb, var(--c) 15%, var(--surface)); }
.lvl-desc { font-weight: 400; }
.wz-nav { display: flex; justify-content: space-between; gap: .8rem; margin: 1.4rem 0 2rem; flex-wrap: wrap; }
.wz-side { position: sticky; top: 80px; }
.gauge { --v: 0; position: relative; width: 170px; height: 95px; margin: .5rem auto; overflow: hidden; }
.gauge::before { content: ""; position: absolute; inset: 0 0 -75px; border-radius: 50%; background: conic-gradient(from -90deg, var(--coral) calc(var(--v) * 1.8deg), var(--soft) 0 180deg, transparent 0); -webkit-mask: radial-gradient(circle at 50% 50%, transparent 55%, #000 56%); mask: radial-gradient(circle at 50% 50%, transparent 55%, #000 56%); }
.gauge-needle-unused { content: ""; position: absolute; left: calc(50% - 1px); bottom: 0; width: 2px; height: 85px; background: var(--brand); transform-origin: bottom; transform: rotate(36deg); opacity: .35; }
.gauge b { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-family: var(--ff-head); font-size: 1.8rem; }
.gauge small { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; color: var(--muted); font-size: .72rem; }
.tipcard { background: var(--t-warn-bg); border-color: var(--t-warn-bd); }

/* Tablas editables */
.tbl-block { margin-top: 1rem; background: var(--paper); border-radius: 14px; padding: .9rem; border: 1px solid var(--line); }
.tbl-block h4 { font-size: .98rem; display: flex; gap: .4rem; align-items: center; }
.tbl-wrap { overflow-x: auto; margin-bottom: .6rem; }
.etbl { width: 100%; border-collapse: separate; border-spacing: 0 6px; min-width: 900px; }
.etbl th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; text-align: left; color: var(--muted); padding: 0 .3rem; }
.etbl td { padding: 0 .2rem; vertical-align: top; }
.etbl td input, .etbl td select, .etbl td textarea { margin: 0; padding: .45rem .55rem; font-size: .86rem; border-radius: 9px; min-height: 0; }
.etbl td textarea { min-height: 38px; height: 38px; resize: vertical; }
.etbl .num-cell { width: 90px; } .etbl .tot-cell { width: 110px; font-weight: 700; padding-top: .55rem; font-size: .88rem; white-space: nowrap; }
.etbl .del { border: 0; background: transparent; cursor: pointer; font-size: 1rem; color: var(--muted); padding: .45rem; }
.etbl .del:hover { color: var(--err); }
.budget-meter { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: .3rem 1rem; align-items: center; margin-bottom: .6rem; }
.bm-bar { height: 12px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.bm-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--teal), var(--gold)); transition: width .3s; }
.budget-meter.over .bm-bar span { background: var(--err); } .budget-meter.over .bm-total { color: var(--err); }
.bm-bar, .bm-txt { grid-column: 1; }
.bm-chart { grid-row: 1 / 3; grid-column: 2; width: 110px !important; height: 110px !important; }
.bm-txt { font-size: .9rem; }
.actors-viz { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .6rem; }
.av-col { background: var(--surface); border-radius: 12px; padding: .6rem; border: 1px solid var(--line); min-height: 64px; }
.av-col h5 { margin: 0 0 .4rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); display: flex; justify-content: space-between; }
.av-col .bubble { display: inline-block; margin: .15rem; padding: .25rem .6rem; border-radius: 99px; font-size: .78rem; font-weight: 600; background: var(--soft); }
.bubble.alta { background: var(--brand); color: var(--on-brand); } .bubble.media { background: var(--gold); } .bubble.baja { background: var(--soft); }

/* ---------- Resumen ---------- */
.res-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-end; flex-wrap: wrap; max-width: none; }
.res-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin-bottom: 1.1rem; }
.kpi-row .card { margin: 0; }
.kpi-card small { display: block; color: var(--muted); font-weight: 600; font-size: .8rem; }
.kpi-card b { display: block; font-family: var(--ff-head); font-size: 2rem; margin: .1rem 0 .3rem; }
.kpi-card.good b { color: var(--ok); } .kpi-card.warn b { color: var(--coral); }
.checklist { list-style: none; padding: 0; margin: 0 0 1rem; } .checklist li { padding: .45rem 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.checklist li.no { color: var(--muted); }
.estado-sel { font-weight: 600; font-size: .9rem; }
.pend-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: .6rem; }
.pend { display: grid; grid-template-columns: auto 1fr; gap: .2rem .6rem; padding: .7rem; border-radius: 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); text-decoration: none; font-size: .87rem; background: var(--surface); }
.pend .ind-cod { background: var(--c); grid-row: span 2; align-self: start; }
.pend small { color: var(--muted); }
.pend:hover { box-shadow: var(--shadow); }
.danger-zone { display: flex; justify-content: space-between; align-items: center; background: var(--surface); }
.danger-zone h4 { margin: 0; font-size: .95rem; }

/* ---------- Bases ---------- */
.tabs { display: flex; gap: .4rem; overflow-x: auto; padding-bottom: .4rem; margin-bottom: 1rem; scrollbar-width: thin; }
.tabs button { border: 1.5px solid var(--line); background: var(--surface); padding: .55rem .95rem; border-radius: 99px; font: 600 .88rem var(--ff); cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.tabs button[aria-selected=true] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.tbl-scroll { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 640px; }
.tbl th, .tbl td { padding: .6rem .7rem; border-bottom: 1px solid var(--line); text-align: left; }
.tbl th { font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.timeline li { display: flex; gap: .8rem; padding: .45rem 0; position: relative; }
.tl-dot { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--line); font-weight: 700; font-size: .8rem; z-index: 1; }
.timeline li.past .tl-dot { background: var(--soft); color: var(--muted); }
.timeline li.now .tl-dot { background: var(--coral); border-color: var(--coral); color: #fff; box-shadow: 0 0 0 5px rgba(228,87,46,.18); }
.timeline li b { display: block; font-size: .93rem; } .timeline li small { color: var(--muted); }
.timeline li em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--coral); background: var(--t-err-bg); padding: .1rem .45rem; border-radius: 99px; margin-left: .3rem; }
.crit-def { border-left: 5px solid var(--c); } .crit-def h4 { color: var(--c); }
.crit-defs { margin: 1.1rem 0; }
ul.nice { padding-left: 1.1rem; margin: 0; } ul.nice li { margin-bottom: .5rem; font-size: .92rem; }
.bono-sim output { font-weight: 700; margin-left: .5rem; }
.bono-sim input[type=range] { width: 100%; accent-color: var(--coral); }
.bono-out { background: var(--brand); color: var(--on-brand); border-radius: 14px; padding: 1rem; text-align: center; }
.bono-out b { display: block; font-family: var(--ff-head); font-size: 2.6rem; color: var(--gold); }
.faq details { margin-bottom: .6rem; } .faq summary { cursor: pointer; font-weight: 700; }
.faq .md { margin-top: .6rem; font-size: .93rem; }

/* ---------- Chatbot ---------- */
.chat-fab { position: fixed; right: 18px; bottom: 18px; z-index: 50; display: flex; align-items: center; gap: .5rem; border: 0; background: var(--coral); color: #fff; padding: .8rem 1.1rem; border-radius: 99px; font: 700 .92rem var(--ff); cursor: pointer; box-shadow: 0 12px 26px -10px rgba(228,87,46,.8); animation: pulse 3s infinite; }
.chat-fab-ico { font-size: 1.2rem; }
@keyframes pulse { 0%, 100% { box-shadow: 0 12px 26px -10px rgba(228,87,46,.8); } 50% { box-shadow: 0 12px 26px -10px rgba(228,87,46,.8), 0 0 0 8px rgba(228,87,46,.15); } }
.chat-panel { position: fixed; right: 18px; bottom: 18px; z-index: 55; width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100vh - 100px)); background: var(--surface); border-radius: 22px; box-shadow: 0 30px 60px -20px rgba(20,33,61,.45); border: 1px solid var(--line); display: flex; flex-direction: column; overflow: hidden; transform: translateY(20px) scale(.97); opacity: 0; pointer-events: none; transition: .2s; }
.chat-panel.open { transform: none; opacity: 1; pointer-events: auto; }
.chat-head { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; background: var(--brand); color: var(--on-brand); }
.chat-head small { display: block; font-size: .74rem; opacity: .75; }
.chat-bot-avatar { width: 38px; height: 38px; border-radius: 12px; background: rgba(255,255,255,.12); display: grid; place-items: center; font-size: 1.3rem; }
.chat-close { margin-left: auto; border: 0; background: transparent; color: var(--on-brand); font-size: 1.1rem; cursor: pointer; }
.chat-body { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--paper); }
.msg { max-width: 88%; padding: .65rem .85rem; border-radius: 16px; font-size: .9rem; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word; }
.msg.bot { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.msg.user { background: var(--brand); color: var(--on-brand); border-bottom-right-radius: 4px; align-self: flex-end; }
.msg .refs { margin-top: .5rem; font-size: .78rem; }
.msg .refs summary { cursor: pointer; color: var(--coral); font-weight: 600; }
.msg .refs p { background: var(--soft); padding: .45rem .55rem; border-radius: 8px; margin: .35rem 0 0; }
.msg .src { display: block; margin-top: .35rem; font-size: .7rem; color: var(--muted); }
.typing span { display: inline-block; width: 7px; height: 7px; margin: 0 2px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing span:nth-child(2) { animation-delay: .2s; } .typing span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.chat-sugs { display: flex; gap: .35rem; overflow-x: auto; padding: .5rem .8rem; background: var(--paper); border-top: 1px solid var(--line); }
.chat-sugs button { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: .35rem .7rem; font: 500 .78rem var(--ff); cursor: pointer; }
.chat-sugs button:hover { border-color: var(--coral); color: var(--coral); }
.chat-form { display: flex; gap: .4rem; padding: .7rem; border-top: 1px solid var(--line); }
.chat-form input { margin: 0; }

/* ---------- Bottom nav (móvil) ---------- */
.bottomnav { display: none; }

/* ---------- Ficha imprimible ---------- */
.ficha-body { background: #E9E4DA; }
.ficha-toolbar { position: sticky; top: 0; display: flex; gap: .5rem; justify-content: center; padding: .7rem; background: rgba(233,228,218,.9); backdrop-filter: blur(6px); z-index: 5; flex-wrap: wrap; }
.ficha { max-width: 880px; margin: 1rem auto 3rem; background: var(--surface); padding: 2.4rem 2.6rem; box-shadow: var(--shadow); font-size: 11pt; line-height: 1.55; }
.ficha-head { text-align: center; border-bottom: 3px double var(--ink); padding-bottom: 1rem; margin-bottom: 1.2rem; }
.ficha-head small { letter-spacing: .06em; text-transform: uppercase; font-size: .75rem; }
.ficha-head h1 { font-size: 1.5rem; margin: .4rem 0; }
.ft { width: 100%; border-collapse: collapse; margin: .6rem 0 1rem; font-size: .88rem; }
.ft th, .ft td { border: 1px solid #BFB8AC; padding: .4rem .5rem; vertical-align: top; text-align: left; }
.ft th { background: #F3EEE4; font-weight: 700; }
.ft.datos th { width: 22%; }
.ft .tot td { font-weight: 700; background: #FAF7F1; }
.ficha-sec h2 { font-size: 1.15rem; background: var(--brand); color: var(--on-brand); padding: .4rem .7rem; border-radius: 4px; margin-top: 1.6rem; }
.ficha-sec h2 small { font-weight: 400; font-size: .8rem; opacity: .8; }
.ficha-ind h3 { font-family: var(--ff); font-size: .95rem; margin: 1rem 0 .4rem; }
.ficha-txt { text-align: justify; }
.vacio { color: #A3A3A3; font-style: italic; }
.ficha-foot { margin-top: 2rem; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: .6rem; }


/* ---------- Pie de página (créditos) ---------- */
.site-foot { text-align: center; font-size: .82rem; color: var(--muted); padding: 1.4rem 1rem 1.6rem; border-top: 1px solid var(--line); margin-top: 1rem; line-height: 1.6; }
.site-foot b { color: var(--ink); }
.site-foot a { color: var(--ink-2); }
.auth-card .site-foot { margin: 1.4rem -0.5rem -0.6rem; padding: 1rem 0 0; font-size: .76rem; }
@media (max-width: 960px) { body:has(.bottomnav) .site-foot { padding-bottom: 90px; } body:has(.bottomnav) .page { padding-bottom: 1rem; } }

/* ---------- Ícono de ayuda y tarjeta de ejemplo ---------- */
.ind-head { grid-template-columns: auto 1fr auto auto; }
.help-btn { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--c); background: var(--surface); color: var(--c); font: 800 .95rem var(--ff); cursor: pointer; display: grid; place-items: center; transition: .15s; position: relative; }
.help-btn:hover, .help-btn:focus-visible { background: var(--c); color: #fff; transform: scale(1.08); outline: none; }
.help-btn::after { content: "Ver ejemplo"; position: absolute; bottom: 120%; left: 50%; transform: translateX(-50%); background: var(--brand); color: var(--on-brand); font: 600 .7rem var(--ff); padding: .25rem .5rem; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: .15s; }
.help-btn:hover::after { opacity: 1; }
.ej-dialog { border: 0; padding: 0; background: transparent; max-width: min(720px, 94vw); width: 100%; max-height: 90vh; }
.ej-dialog::backdrop { background: rgba(20,33,61,.55); backdrop-filter: blur(3px); }
.ej-dialog[open] .ej-card { animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.ej-card { background: var(--surface); border-radius: 20px; padding: 1.3rem 1.4rem; border-top: 6px solid var(--c); box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); max-height: 90vh; overflow: auto; }
.ej-card header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.ej-badge { font-size: .76rem; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); padding: .25rem .65rem; border-radius: 99px; }
.ej-close { border: 0; background: var(--soft); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: .95rem; }
.ej-card h3 { font-family: var(--ff); font-size: .98rem; font-weight: 600; color: var(--ink-2); }
.ej-proj { display: grid; gap: .1rem; background: var(--brand); color: var(--on-brand); border-radius: 14px; padding: .8rem 1rem; margin: .7rem 0; }
.ej-proj small { color: var(--gold); font-weight: 700; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; }
.ej-proj strong { font-family: var(--ff-head); font-size: 1.05rem; }
.ej-proj span { font-size: .8rem; opacity: .85; }
.ej-proj em { font-style: normal; font-size: .8rem; opacity: .75; margin-top: .2rem; }
.ej-text { background: color-mix(in srgb, var(--c) 6%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--c) 45%, var(--surface)); border-radius: 14px; padding: .9rem 1rem; font-size: .92rem; line-height: 1.6; }
.ej-text p { margin: 0 0 .45rem; } .ej-text p:last-child { margin: 0; }
.ej-text b { color: var(--c); }
.ej-warn { font-size: .8rem; color: var(--t-err-tx); background: var(--t-err-bg); border-radius: 10px; padding: .55rem .75rem; margin: .8rem 0; }
.ej-card footer { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }

/* ---------- Revisión y administración ---------- */
.tag-admin { background: var(--coral); }
.alert-ok { background: var(--t-ok-bg); border-color: var(--t-ok-bd); color: var(--t-ok-tx); }
.alert-obs { background: var(--t-warn-bg); border-color: var(--t-warn-bd); color: var(--t-warn-tx); }
.obs-txt { margin: .5rem 0; padding: .6rem .8rem; background: color-mix(in srgb, var(--surface) 75%, transparent); border-radius: 10px; font-size: .92rem; color: var(--ink); }
.rev { display: inline-flex; align-items: center; gap: .25rem; font-size: .74rem; font-weight: 700; padding: .18rem .55rem; border-radius: 99px; white-space: nowrap; }
.rev-pendiente { background: var(--soft); color: var(--muted); } .rev-observado { background: var(--t-warn-bg); color: var(--t-warn-tx); } .rev-aprobado { background: var(--t-ok-bg); color: var(--t-ok-tx); }
.rev-big { font-size: 1.3rem !important; padding: .1rem .6rem; border-radius: 12px; display: inline-block; }
.txt-ok { color: var(--ok); } .txt-warn { color: var(--coral); }
.bar.mini { width: 80px; height: 6px; margin-bottom: .15rem; }
.card-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .8rem 1rem; }
.filters input, .filters select { margin: 0; width: auto; flex: 1 1 170px; }
.filters input[type=search] { flex: 2 1 240px; }
.grid-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 1rem; margin-top: 1rem; }
.grid-form .form-actions { grid-column: 1 / -1; }
.sum-btn { cursor: pointer; margin: 0; }
.row-off td { opacity: .55; }
.actions { position: relative; } .nowrap { white-space: nowrap; }
.actions .btn { margin: .1rem 0; }
.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; } .menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: 110%; z-index: 20; width: 300px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: .9rem; display: grid; gap: .7rem; }
.menu-pop label { margin-bottom: .5rem; font-size: .82rem; }
.menu-pop input, .menu-pop select { padding: .45rem .6rem; font-size: .88rem; }
.inline-form { display: flex; gap: .4rem; align-items: center; border-top: 1px dashed var(--line); padding-top: .7rem; }
.inline-form input { margin: 0; }
.menu-row { display: flex; gap: .4rem; justify-content: space-between; border-top: 1px dashed var(--line); padding-top: .7rem; }
.review-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.1rem; align-items: start; }
.review-side { position: sticky; top: 80px; }
.dict-opts { display: grid; gap: .45rem; margin-bottom: .9rem; }
.dict { margin: 0 !important; cursor: pointer; }
.dict input { position: absolute; opacity: 0; }
.dict span { display: block; padding: .65rem .8rem; border-radius: 12px; border: 2px solid var(--line); font-weight: 600; }
.dict.ok input:checked + span { border-color: var(--ok); background: var(--t-ok-bg); }
.dict.obs input:checked + span { border-color: var(--gold); background: var(--t-warn-bg); }
.dict.pen input:checked + span { border-color: var(--muted); background: var(--soft); }
.quick-obs { display: flex; flex-wrap: wrap; gap: .35rem; margin: -.3rem 0 1rem; }
.quick-obs small { width: 100%; }
.chip-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: .3rem .6rem; font: 500 .74rem var(--ff); cursor: pointer; text-align: left; }
.chip-btn:hover { border-color: var(--gold); background: var(--t-warn-bg); }
.hist { list-style: none; margin: 0; padding: 0; } .hist li { padding: .6rem 0; border-bottom: 1px dashed var(--line); } .hist li p { margin: .3rem 0 0; }
.ficha.embedded { box-shadow: none; margin: 0; padding: 0; max-width: none; font-size: .92rem; }
.ficha-nivel { display: inline-block; font-size: .74rem; font-weight: 600; color: var(--coral); background: var(--t-err-bg); padding: .05rem .45rem; border-radius: 6px; margin-left: .3rem; }
.vb-stamp { color: var(--ok); font-weight: 700; border: 2px solid var(--ok); display: inline-block; padding: .2rem .7rem; border-radius: 8px; margin-top: .4rem; }
.charts-3 .chart-box { height: 240px; }
@media (max-width: 1100px) { .review-grid { grid-template-columns: 1fr; } .review-side { position: static; } }
@media (max-width: 680px) {
  .grid-form { grid-template-columns: 1fr; }
  .ind-head { grid-template-columns: auto 1fr auto; }
  .ind-head .help-btn { grid-column: 3; grid-row: 1; }
  .ind-head .ind-pts { grid-column: 2; }
  .menu-pop { position: fixed; left: 12px; right: 12px; top: auto; bottom: 80px; width: auto; }
  .ej-card { padding: 1rem; }
}


/* =========================================================
   CAPA PROFESIONAL v5 · tipografía, superficies, temas
   ========================================================= */
html { background: var(--paper); }
body { transition: background .25s, color .25s; -webkit-font-smoothing: antialiased; }
h1, h2 { font-weight: 700; letter-spacing: -.02em; }
h3, h4 { font-family: var(--ff); font-weight: 700; letter-spacing: -.01em; }
.card-title { font-family: var(--ff); font-weight: 700; font-size: .98rem; display: flex; align-items: center; gap: .45rem; }
.ico { flex: none; vertical-align: -3px; }
.card { box-shadow: var(--shadow); border-color: var(--line); }
.card:hover { border-color: color-mix(in srgb, var(--line) 60%, var(--muted)); }
.eyebrow { display: flex; align-items: center; gap: .35rem; }
.eyebrow a { color: inherit; text-decoration: none; }

/* Topbar */
.topbar { height: 64px; box-shadow: 0 1px 0 var(--line); border-bottom: 0; }
.mainnav a { display: inline-flex; align-items: center; gap: .45rem; color: var(--ink-2); }
.mainnav a.on, .mainnav a:hover { background: var(--soft); color: var(--ink); }
.mainnav a.on { box-shadow: inset 0 -2px 0 var(--coral); border-radius: 10px 10px 4px 4px; }
.logo-mark { background: linear-gradient(145deg, #14213D, #2B4277); color: #F2A50C; box-shadow: inset 0 -3px 0 #E4572E, 0 4px 10px -4px rgba(20,33,61,.5); }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: .15s; text-decoration: none; }
.icon-btn:hover { color: var(--ink); border-color: var(--muted); }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.user-chip { display: flex; align-items: center; gap: .55rem; padding: .25rem .35rem .25rem .25rem; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); }
.user-chip .uname { font-size: .84rem; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { background: linear-gradient(135deg, var(--gold), var(--coral)); color: #fff; font-size: .9rem; }

/* Botones */
.btn { letter-spacing: -.005em; }
.btn-primary { background: var(--brand); color: var(--on-brand); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 6px 16px -8px rgba(17,26,46,.6); }
.btn-primary:hover { background: var(--coral); color: #fff; }
.btn-accent { background: var(--coral); color: #fff; box-shadow: 0 8px 20px -10px var(--coral); }
.btn-accent:hover { filter: brightness(1.06); color: #fff; }
.btn-ghost { background: var(--surface); }
.btn .ico { margin: 0 -.1rem; }

/* Formularios en modo oscuro */
input, select, textarea { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line) !important; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
[data-theme="dark"] select option { background: var(--surface); }

/* Hero */
.landing .hero { position: relative; }
.landing .hero::before { content: ""; position: absolute; inset: -40px -10vw auto; height: 520px; z-index: -1; background: radial-gradient(600px 300px at 10% 20%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 70%), radial-gradient(500px 280px at 90% 30%, color-mix(in srgb, var(--teal) 14%, transparent), transparent 70%); }
.hero-stats { display: flex; gap: 1.6rem; flex-wrap: wrap; margin: 1.2rem 0 0; }
.hero-stats div b { display: block; font-family: var(--ff-head); font-size: 1.6rem; }
.hero-stats div span { font-size: .8rem; color: var(--muted); }
.steps-orbit .ico-wrap, .cat-ico, .rc-ico, .wz-badge span, .f-ico { color: var(--c, var(--coral)); }
.steps-orbit .ico { color: var(--c); }
.cat-ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--coral) 12%, var(--surface)); color: var(--coral); margin-bottom: .6rem; }
.f-ico { width: 46px; height: 46px; border-radius: 14px; display: grid !important; place-items: center; background: var(--soft); color: var(--coral); margin-bottom: .5rem; }
.rc-ico { color: var(--coral); }
.wz-badge span { color: var(--c); }
.countdown { background: var(--brand); color: var(--on-brand); }
[data-theme="dark"] .countdown { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }

/* Botón Instalar App */
.install-card { display: none; align-items: center; gap: .9rem; margin-top: 1rem; padding: .8rem 1rem; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); max-width: 480px; }
.install-card.show { display: flex; }
.install-card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--teal) 15%, var(--surface)); color: var(--teal); flex: none; }
.install-card div { flex: 1; font-size: .86rem; } .install-card b { display: block; font-size: .95rem; }
.ios-hint { display: none; font-size: .82rem; color: var(--muted); margin-top: .4rem; }

/* Chat */
.chat-fab { background: linear-gradient(135deg, var(--coral), #D9441B); }
.chat-head { background: var(--brand); color: var(--on-brand); }
.chat-bot-avatar { background: color-mix(in srgb, var(--on-brand) 14%, transparent); }
.msg.user { background: var(--brand); color: var(--on-brand); }
.msg.bot { background: var(--surface); }

/* Pie de página */
.site-foot { background: var(--surface); }
.site-foot .ico { vertical-align: -3px; color: var(--coral); }

/* Ficha: siempre papel claro */
.ficha { --surface: #fff; --soft: #F3EEE4; --line: #E3DED4; --ink: #111A2E; --ink-2: #364259; --muted: #687387; --brand: #14213D; --on-brand: #fff; color: #111A2E; background: #fff; }
.ficha-body { background: #E9E4DA; }
[data-theme="dark"] .ficha-body { background: #0D1321; }
.ficha.embedded { padding: 1.2rem; border-radius: 12px; border: 1px solid #E3DED4; }

/* Equipo responsable (nuevo proyecto) */
.team-table .etbl { min-width: 860px; }
.team-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .4rem; }
.team-rules { display: flex; gap: .4rem; flex-wrap: wrap; }
.team-rules span { font-size: .76rem; font-weight: 600; padding: .25rem .6rem; border-radius: 99px; background: var(--soft); color: var(--muted); }
.team-rules span.ok { background: var(--t-ok-bg); color: var(--t-ok-tx); }
.team-warn { font-size: .82rem; color: var(--t-warn-tx); background: var(--t-warn-bg); border-radius: 10px; padding: .5rem .7rem; margin-top: .4rem; display: none; }
.team-warn.show { display: block; }
.team-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
.member { display: flex; gap: .6rem; align-items: center; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.member .avatar { width: 36px; height: 36px; flex: none; }
.member small { display: block; color: var(--muted); font-size: .76rem; }

/* Admin · usuarios */
.stat-chips { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.stat-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .85rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink-2); font-size: .85rem; font-weight: 600; }
.stat-chip b { font-family: var(--ff-head); font-size: 1.15rem; color: var(--ink); }
.stat-chip.on { border-color: var(--coral); box-shadow: 0 0 0 3px color-mix(in srgb, var(--coral) 18%, transparent); }
.toolbar { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.toolbar .left, .toolbar .right { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.toolbar input[type=search] { width: 280px; margin: 0; }
.toolbar select { width: auto; margin: 0; }
.bulkbar { display: none; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .6rem .8rem; border-radius: 12px; background: var(--brand); color: var(--on-brand); margin-bottom: .8rem; }
.bulkbar.show { display: flex; }
.bulkbar .btn-ghost { background: transparent; color: var(--on-brand); border-color: color-mix(in srgb, var(--on-brand) 35%, transparent); }
.utbl td { vertical-align: middle; }
.utbl th a { color: inherit; text-decoration: none; } .utbl th a:hover { color: var(--coral); }
.utbl .ucell { display: flex; align-items: center; gap: .6rem; }
.utbl .ucell .avatar { width: 34px; height: 34px; font-size: .85rem; flex: none; }
.utbl input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--coral); }
.row-actions { display: flex; gap: .3rem; justify-content: flex-end; }
.row-actions .icon-btn { width: 32px; height: 32px; }
.icon-btn.danger:hover { color: var(--err); border-color: var(--err); }
.pager { display: flex; gap: .3rem; justify-content: center; margin-top: 1rem; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; font-size: .88rem; padding: 0 .6rem; background: var(--surface); }
.pager .on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
dialog.modal { border: 0; padding: 0; border-radius: 18px; width: min(560px, 94vw); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(10,15,28,.55); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; display: flex; align-items: center; gap: .5rem; }
.modal-body { padding: 1.1rem 1.2rem; max-height: 70vh; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .9rem 1.2rem; border-top: 1px solid var(--line); background: var(--soft); border-radius: 0 0 18px 18px; }
.modal .grid-2 { gap: 0 1rem; }
.drop { border: 2px dashed var(--line); border-radius: 14px; padding: 1.2rem; text-align: center; color: var(--muted); }
.code-sample { font-family: ui-monospace, monospace; font-size: .8rem; background: var(--soft); padding: .6rem .8rem; border-radius: 10px; overflow-x: auto; white-space: pre; }
.pw-out { font-family: ui-monospace, monospace; font-weight: 700; background: var(--t-ok-bg); color: var(--t-ok-tx); padding: .15rem .45rem; border-radius: 6px; }
.badge-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.badge-dot.on { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 25%, transparent); }
@media (max-width: 760px) {
  .toolbar input[type=search] { width: 100%; }
  .toolbar .left, .toolbar .right { width: 100%; }
  .utbl .hide-sm { display: none; }
  .user-chip .uname { display: none; }
}

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--brand); color: var(--on-brand); padding: .5rem .8rem; border-radius: 8px; }
.skip:focus { left: 8px; }
.auth-top { position: absolute; top: 14px; right: 14px; }
[data-theme="dark"] .auth-body { background: radial-gradient(circle at 15% 10%, #1B2440 0, transparent 40%), radial-gradient(circle at 90% 80%, #12302C 0, transparent 40%), var(--paper); }
.auth-card { background: var(--surface); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .wizard { grid-template-columns: 230px minmax(0, 1fr); }
  .wz-main, .wz-steps { min-width: 0; }
  .wz-side { display: none; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .mainnav { display: none; }
  .wizard { grid-template-columns: minmax(0, 1fr); }
  .wz-steps { position: static; min-width: 0; }
  .wz-main { min-width: 0; }
  .wz-proj { margin-bottom: .6rem; }
  .wz-steps ol { display: flex; overflow-x: auto; gap: .4rem; padding: .2rem .1rem .6rem; scroll-snap-type: x mandatory; }
  .wz-steps li { flex: none; scroll-snap-align: start; }
  .wz-steps li a { flex-direction: column; gap: .2rem; padding: .45rem .5rem; min-width: 84px; text-align: center; background: var(--surface); border: 1px solid var(--line); }
  .st-txt b { font-size: .76rem; } .st-txt small { display: none; }
  .wz-total { display: none; }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface); border-top: 1px solid var(--line); padding: .35rem .3rem calc(.35rem + env(safe-area-inset-bottom)); justify-content: space-around; }
  .bottomnav a { display: flex; flex-direction: column; align-items: center; font-size: .7rem; font-weight: 600; text-decoration: none; color: var(--ink-2); padding: .2rem .6rem; }
  .bottomnav a .ico { margin-bottom: 2px; }
  body:has(.bottomnav) .page { padding-bottom: 90px; }
  body:has(.bottomnav) .chat-fab { display: none; }
  .chat-panel { bottom: 70px; }
  .sticky-actions { bottom: 58px; }
}
@media (max-width: 680px) {
  body { font-size: 15px; }
  .grid-2, .grid-4, .kpi-row { grid-template-columns: 1fr; }
  .comp-list { grid-template-columns: 1fr; }
  .proj-card { grid-template-columns: 64px 1fr; }
  .ring { width: 62px; height: 62px; } .ring span { width: 48px; height: 48px; font-size: .85rem; }
  .proj-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .wz-head { grid-template-columns: auto 1fr; }
  .wz-pts { grid-column: 1 / -1; display: flex; align-items: baseline; gap: .5rem; justify-content: center; }
  .wz-badge span { width: 52px; height: 52px; font-size: 1.6rem; }
  .guide-grid { grid-template-columns: 1fr; }
  .ind-pts { justify-self: start; }
  .ed-foot { flex-direction: column; align-items: flex-start; }
  .steps-orbit li:nth-child(even) { margin-left: 0; }
  .brand-txt small { display: none; }
  .chat-panel { right: 12px; left: 12px; width: auto; height: calc(100vh - 150px); }
  .ficha { padding: 1.2rem; }
  .budget-meter { grid-template-columns: 1fr; } .bm-chart { display: none; }
  .actors-viz { grid-template-columns: 1fr; }
  .wz-nav .btn { flex: 1; white-space: normal; }
}
@media print {
  .site-foot,
  .no-print, .topbar, .chat-fab, .chat-panel, .bottomnav { display: none !important; }
  body, .ficha-body { background: var(--surface); }
  .ficha { box-shadow: none; margin: 0; padding: 0; max-width: none; }
  .ficha-sec h2 { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ficha-ind { break-inside: avoid-page; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.steps-orbit .ico-wrap { grid-row: span 2; display: grid; place-items: center; }
.empty-ico { color: var(--teal); }
.guide summary .ico, .evid .ico, .tipcard h4 .ico { color: var(--c); }
.ej-badge .ico { vertical-align: -2px; }
.countdown-mini b { color: var(--coral); }
.ficha-sub { font-family: var(--ff); font-size: .95rem; margin: 1rem 0 .3rem; }
.team-table .etbl td input, .team-table .etbl td select { min-width: 110px; }
.team-table .etbl td:first-child input { min-width: 190px; }
.drop { display: block; cursor: pointer; margin: .6rem 0; }
.drop input[type=file] { display: block; margin: .6rem auto 0; width: auto; }
th.right, .right { text-align: right; }
.toolbar label { display: flex; align-items: center; gap: .4rem; margin: 0; font-weight: 600; }
html, body { overflow-x: clip; }
@media (max-width: 680px) {
  .topbar { gap: .5rem; padding: .55rem .8rem; }
  .usermenu { gap: .4rem; }
  .usermenu > .btn-ghost.btn-sm { display: none; }
  .brand-txt strong { font-size: 1rem; }
  .hero-cta .btn { flex: 1; }
  .install-card { flex-wrap: wrap; }
  .install-card .btn { width: 100%; }
}
.hero-stats .countdown-mini b span { font-size: inherit; color: inherit; }
/* ---------- Autenticación segura ---------- */
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pw-field { position: relative; display: block; }
.pw-field input { padding-right: 2.8rem; }
.pw-eye { position: absolute; right: 6px; top: calc(50% + .17rem); transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: .35rem; border-radius: 8px; }
.pw-eye:hover, .pw-eye.on { color: var(--coral); }
.pw-meter { display: block; height: 5px; border-radius: 99px; background: var(--soft); margin-top: .45rem; overflow: hidden; }
.pw-meter span { display: block; height: 100%; width: 0; transition: width .2s, background .2s; }
.pw-rules { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; font-weight: 500; }
.pw-rules span { padding: .1rem .5rem; border-radius: 99px; background: var(--soft); color: var(--muted); font-size: .74rem; }
.pw-rules span.ok { background: var(--t-ok-bg); color: var(--t-ok-tx); }
.pw-rules span.ok::before { content: "✓ "; }
.pw-match { display: block; margin-top: .3rem; font-size: .78rem; } .pw-match.ok { color: var(--ok); } .pw-match.no { color: var(--err); }
.sso { margin: .4rem 0 1rem; }
.sso-sep { display: flex; align-items: center; gap: .7rem; color: var(--muted); font-size: .8rem; margin: 1rem 0; }
.sso-sep::before, .sso-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.g-btn-wrap { display: flex; justify-content: center; min-height: 44px; }
.sso-err { color: var(--err); font-size: .85rem; text-align: center; margin: .5rem 0 0; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: .35rem; font-size: .75rem; color: var(--muted); margin: .6rem 0 0; }
.secure-note .ico { color: var(--ok); }
.g-badge { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #4285F4; color: #fff; font-size: .62rem; font-weight: 800; vertical-align: 1px; }
.switch { display: flex !important; align-items: center; gap: .65rem; cursor: pointer; font-weight: 500 !important; font-size: .9rem; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 40px; height: 22px; flex: none; border-radius: 99px; background: var(--line); position: relative; transition: .2s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { left: 21px; }
.switch input:focus-visible + span { outline: 3px solid var(--gold); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.is-locked .wz-main textarea, .is-locked .wz-main input { background: var(--soft) !important; cursor: not-allowed; }
.lock-banner > div:last-child { margin-top: .6rem; }
form.inline { display: inline; margin: 0; }
/* ---------- Comentarios por indicador ---------- */
.cmt { margin-top: 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); padding: .8rem .9rem; font-family: var(--ff); }
.cmt.has-open { border-color: var(--t-warn-bd); background: var(--t-warn-bg); }
.cmt-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .86rem; }
.cmt-head > span:first-child { display: inline-flex; align-items: center; gap: .4rem; }
.cmt-head small { background: var(--soft); border-radius: 99px; padding: 0 .45rem; font-weight: 700; }
.cmt-badge { font-size: .72rem; font-weight: 700; padding: .15rem .55rem; border-radius: 99px; background: var(--coral); color: #fff; }
.cmt-badge.ok { background: var(--t-ok-bg); color: var(--t-ok-tx); }
.cmt-list { list-style: none; margin: .6rem 0 0; padding: 0; display: grid; gap: .55rem; }
.cmt-list li { display: flex; gap: .6rem; padding: .6rem .7rem; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.cmt-list li.from-admin { border-left: 3px solid var(--coral); }
.cmt-list li.from-team { border-left: 3px solid var(--teal); margin-left: 1.4rem; }
.cmt-list li.done { opacity: .7; }
.cmt-list li.done p { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.avatar.sm { width: 28px; height: 28px; font-size: .75rem; flex: none; }
.cmt-body { flex: 1; min-width: 0; }
.cmt-meta { font-size: .8rem; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.cmt-meta small { color: var(--muted); }
.cmt-rol { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .05rem .4rem; border-radius: 6px; background: var(--soft); color: var(--muted); }
.from-admin .cmt-rol { background: var(--t-err-bg); color: var(--t-err-tx); }
.cmt-ok { font-size: .72rem; font-weight: 700; color: var(--ok); }
.cmt-body p { margin: .25rem 0 .2rem; font-size: .9rem; white-space: normal; }
.cmt-actions { display: flex; gap: .7rem; }
.cmt-actions button { border: 0; background: none; padding: 0; font: 600 .76rem var(--ff); color: var(--muted); cursor: pointer; }
.cmt-actions button:hover { color: var(--coral); } .cmt-actions button.danger:hover { color: var(--err); }
.cmt-form { margin-top: .6rem; }
.cmt-form textarea { min-height: 64px !important; margin-top: 0; font-size: .9rem; }
.cmt-form.collapsed textarea, .cmt-form.collapsed .cmt-send { display: none; }
.cmt-form:not(.collapsed) .cmt-open { display: none; }
.cmt-open { border: 1px dashed var(--line); background: var(--surface); width: 100%; padding: .5rem; border-radius: 10px; font: 600 .82rem var(--ff); color: var(--ink-2); cursor: pointer; }
.cmt-open:hover { border-color: var(--coral); color: var(--coral); }
.cmt-send { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-top: .4rem; }
.cmt-dot { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--coral); color: #fff; font-size: .64rem; font-weight: 800; vertical-align: 1px; }
.cmt-dot[hidden] { display: none; }
.ficha .cmt { font-size: .9rem; }
@media print { .cmt { display: none !important; } }
/* ---------- APA ---------- */
.apa-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 8px; padding: .25rem .55rem; font: 600 .76rem var(--ff); cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.apa-btn:hover { border-color: var(--c); color: var(--c); }
.apa-btn[disabled] { opacity: .45; cursor: not-allowed; }
.apa-dialog { width: min(720px, 96vw); }
.apa-tabs { display: flex; gap: .3rem; padding: .6rem 1.2rem 0; border-bottom: 1px solid var(--line); }
.apa-tabs button { border: 0; background: none; padding: .5rem .8rem; font: 600 .86rem var(--ff); color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.apa-tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--coral); }
.apa-form label { margin-bottom: .6rem; font-size: .84rem; }
.apa-form .grid-2 { gap: 0 .9rem; }
.apa-form [hidden] { display: none !important; }
.apa-preview { background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; padding: .8rem 1rem; margin-top: .4rem; }
.apa-preview small { color: var(--muted); font-weight: 700; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.apa-preview p { margin: .25rem 0 .7rem; padding-left: 1.5em; text-indent: -1.5em; font-size: .92rem; }
.apa-citas { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.apa-citas code, .apa-lista code { background: var(--surface); border: 1px solid var(--line); padding: .15rem .45rem; border-radius: 6px; font-size: .82rem; }
.apa-opts { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; margin-top: .8rem; }
.apa-opts label { display: flex !important; align-items: center; gap: .4rem; margin: 0 !important; }
.apa-opts select { width: auto; margin: 0; padding: .35rem .5rem; }
.apa-lista { margin: 0; padding-left: 1.2rem; display: grid; gap: .7rem; }
.apa-ref { padding-left: 1.5em; text-indent: -1.5em; font-size: .9rem; }
.apa-li-act { display: flex; gap: .6rem; align-items: center; margin-top: .25rem; flex-wrap: wrap; }
.apa-li-act button { border: 0; background: none; font: 600 .76rem var(--ff); color: var(--muted); cursor: pointer; padding: 0; }
.apa-li-act button:hover { color: var(--coral); } .apa-li-act button.danger:hover { color: var(--err); }
.ficha-refs p { padding-left: 1.5em; text-indent: -1.5em; margin: 0 0 .5rem; }
.ed-foot { flex-wrap: wrap; }
