:root {
    --obs-aqua: #8dcdcc;
    --obs-aqua-light: #bbe1e4;
    --obs-pink: #f3a0c4;
    --obs-pink-light: #f8d0d6;
    --obs-yellow: #f6c978;
    --obs-ink: #263238;
    --obs-bg: #f6fbfb;
}

html { scroll-behavior: smooth; }
body {
    background: var(--obs-bg);
    color: var(--obs-ink);
}
.brand-header {
    background: linear-gradient(180deg, #fff 0%, var(--obs-aqua-light) 100%);
}
.brand-banner {
    width: min(620px, 92vw);
    height: auto;
}
.btn-brand {
    --bs-btn-color: #203033;
    --bs-btn-bg: var(--obs-aqua);
    --bs-btn-border-color: var(--obs-aqua);
    --bs-btn-hover-bg: #77bdbc;
    --bs-btn-hover-border-color: #77bdbc;
    --bs-btn-active-bg: #69afae;
    --bs-btn-active-border-color: #69afae;
}
.brand-badge { background: var(--obs-pink-light); color: #723653; }
.soft-card { background: rgba(255,255,255,.94); }
.analysis-pill {
    padding: .8rem 1rem;
    border-radius: 1rem;
    margin-bottom: .65rem;
    background: #f7fbfb;
    border-left: 5px solid var(--obs-aqua);
}
.analysis-pill:nth-child(3n) { border-left-color: var(--obs-pink); }
.analysis-pill:nth-child(4n) { border-left-color: var(--obs-yellow); }
.actor-card { border-top: 4px solid var(--obs-aqua) !important; }
.actor-card:nth-child(2) { border-top-color: var(--obs-pink) !important; }
.kpi-card { border-bottom: 4px solid var(--obs-aqua) !important; }
.feature-box {
    height: 100%;
    padding: 1rem;
    border-radius: .9rem;
    background: #f8fafb;
    color: #5c6970;
}
.feature-box strong { color: var(--obs-ink); }
.instrument-card { transition: transform .18s ease, box-shadow .18s ease; }
.instrument-card:hover { transform: translateY(-2px); }
.instrument-card-active { outline: 3px solid rgba(141,205,204,.55); }
.mini-kpi {
    height: 100%;
    padding: .75rem .4rem;
    border-radius: .8rem;
    background: #f7fbfb;
}
.mini-kpi strong { display: block; font-size: 1.35rem; color: var(--obs-ink); }
.mini-kpi span { display: block; font-size: .72rem; color: #6c757d; }
.question-row + .question-row { border-top: 1px solid #edf1f2; }
.filter-badge { background: var(--obs-aqua-light); color: #254d50; }
.option-chip {
    display: inline-block;
    padding: .28rem .55rem;
    border-radius: 999px;
    background: #f2f6f7;
    color: #53636a;
    font-size: .78rem;
}
.option-chip-legacy { background: #fff3cd; color: #785d09; }
.legacy-section { border-left: 5px solid #adb5bd !important; }

.chart-box { position: relative; min-height: 300px; }
.table thead th { white-space: nowrap; font-size: .82rem; color: #647278; }

/* Paso 4 · Explorador analítico */
.question-focus-card { border-left: 6px solid var(--obs-pink) !important; }
.explorer-chart { position: relative; min-height: 390px; }
.explorer-chart-tall { min-height: 430px; }
.mini-stat {
    height: 100%; padding: 1rem 1.1rem; border-radius: .9rem; background: #fff;
    box-shadow: 0 .125rem .35rem rgba(38,50,56,.08); border-top: 4px solid var(--obs-yellow);
}
.mini-stat span { display: block; color: #6c757d; font-size: .82rem; }
.mini-stat strong { display: block; font-size: 1.65rem; margin-top: .2rem; }
.response-table { min-width: 850px; }
.response-cell { min-width: 260px; max-width: 520px; white-space: normal; font-size: .9rem; }
.advanced-filter-row:last-child { margin-bottom: 0 !important; }
@media (max-width: 767.98px) {
    .explorer-chart { min-height: 320px; }
    .explorer-chart-tall { min-height: 360px; }
}

/* Paso 5 · Dashboard ejecutivo */
.dashboard-filter-card { border-left: 5px solid var(--obs-aqua) !important; }
.dashboard-chart { position: relative; width: 100%; }
.dashboard-chart-sm { min-height: 275px; }
.dashboard-chart-lg { min-height: 370px; }
.dashboard-chart-xl { min-height: 480px; }
.territorial-matrix th, .territorial-matrix td { vertical-align: middle; }
.matrix-value { display:inline-flex; min-width:2.25rem; height:2.25rem; align-items:center; justify-content:center; border-radius:999px; background:var(--obs-aqua-light); color:#254d50; font-weight:700; }
.matrix-zero { background:#f1f3f4; color:#98a1a5; font-weight:500; }
.indicator-group-card { border-top: 5px solid var(--obs-aqua) !important; }
.indicator-card { padding:1.05rem 1.1rem; background:#f9fcfc; border:1px solid #e9f1f1; border-radius:1rem; transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease; }
.indicator-card:hover { transform:translateY(-2px); box-shadow:0 .4rem 1rem rgba(38,50,56,.09); border-color:var(--obs-aqua); }
.dimension-badge { background:var(--obs-pink-light); color:#723653; font-weight:600; }
.indicator-value { font-size:2.15rem; font-weight:800; line-height:1; color:#315d60; }
.indicator-label { color:#526168; line-height:1.35; }
.term-cloud { display:flex; flex-wrap:wrap; gap:.45rem; }
.term-chip { display:inline-flex; gap:.35rem; align-items:center; border-radius:999px; padding:.35rem .65rem; background:#f2f6f7; color:#526168; font-size:.82rem; }
.term-chip:nth-child(3n+2) { background:var(--obs-pink-light); color:#6f4054; }
.term-chip:nth-child(3n) { background:#fff2d9; color:#6d5730; }
.dashboard-method-note { background:#fff8e8; color:#5f533b; }
@media(max-width:767.98px){.dashboard-chart-sm{min-height:245px}.dashboard-chart-lg{min-height:330px}.dashboard-chart-xl{min-height:420px}.indicator-value{font-size:1.8rem}}
@media print {
    nav,.brand-header,footer,.dashboard-filter-card,.dashboard-print-btn,.btn { display:none !important; }
    body { background:#fff; }
    .dashboard-page { max-width:none !important; width:100% !important; }
    .card { box-shadow:none !important; break-inside:avoid; }
    .dashboard-chart { min-height:260px !important; }
}

/* Paso 6 · Analítica comparativa y cualitativa */
.comparative-filter-card,.qualitative-filter-card { border-left:5px solid var(--obs-pink) !important; }
.comparison-indicator-card { border-top:5px solid var(--obs-aqua) !important; }
.comparison-badge { background:var(--obs-aqua-light); color:#254d50; }
.comparison-actor-panel { background:#f9fcfc; border:1px solid #e5eeee; border-radius:1rem; padding:1rem; }
.comparison-bars .progress,.qual-code-list .progress { height:.55rem; background:#e8eeee; }
.comparison-bars .progress-bar,.qual-code-list .progress-bar { background:var(--obs-aqua); }
.tiny-text { font-size:.72rem; }
.thematic-card { border-top:5px solid var(--obs-yellow) !important; }
.thematic-question { padding:.8rem 0; border-top:1px solid #edf0f1; }
.thematic-question:first-of-type { border-top:0; }
.qualitative-access-card { border-left:5px solid var(--obs-yellow) !important; }
.qualitative-table { min-width:1100px; }
.rule-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.75rem 0; border-top:1px solid #edf0f1; }
.rule-row:first-of-type { border-top:0; }
.qual-code-list { max-height:430px; overflow:auto; padding-right:.4rem; }
@media(max-width:991.98px){.rule-row{align-items:flex-start;flex-direction:column}.qualitative-table{min-width:980px}}


/* Paso 8 · Accesibilidad y producción */
.skip-link{position:fixed;left:1rem;top:-5rem;z-index:2000;background:#fff;color:#173f42;padding:.75rem 1rem;border-radius:.5rem;box-shadow:0 .25rem 1rem rgba(0,0,0,.18);font-weight:700}
.skip-link:focus{top:1rem}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:3px solid #315d60 !important;outline-offset:3px}
footer a{color:#4d6468;text-decoration-thickness:.08em;text-underline-offset:.18em}
footer a:hover{color:#254d50}
.progress[role=progressbar]{min-height:.55rem}
@media (prefers-reduced-motion: reduce){*,*::before,*::after{scroll-behavior:auto !important;transition:none !important;animation:none !important}.instrument-card:hover,.indicator-card:hover{transform:none}}
@media (forced-colors: active){.badge,.option-chip,.analysis-pill,.matrix-value{border:1px solid CanvasText}.progress-bar{forced-color-adjust:auto}}
