:root {
  /* Surfaces */
  --bg: #f6f4ee;
  --bg-2: #ecebe2;
  --surface: #ffffff;
  --surface-2: #fbfaf6;
  --surface-3: #f1efe8;

  /* Ink */
  --ink: #0b1020;
  --ink-2: #2a3142;
  --ink-3: #5f6573;
  --ink-4: #8a909e;

  /* Borders */
  --border: #e6e3d8;
  --border-strong: #c9c5b7;

  /* Brand */
  --brand: #0e6b54;
  --brand-2: #14906f;
  --brand-deep: #073d2f;
  --brand-soft: #d6ebe2;
  --brand-tint: #ecf6f1;

  /* Accent (gold) */
  --accent: #b8730e;
  --accent-2: #d99826;
  --accent-soft: #f5e6c8;
  --accent-tint: #faf2e0;

  /* Semantic */
  --info: #1d4ed8;
  --info-tint: #e0eafc;
  --warning: #d97706;
  --danger: #b91c1c;

  /* Categories */
  --cat-aplus: #064e3b;
  --cat-a: #059669;
  --cat-b: #d97706;
  --cat-c: #ea580c;
  --cat-d: #b91c1c;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(11,16,32,.04);
  --shadow-sm: 0 1px 2px rgba(11,16,32,.04), 0 1px 3px rgba(11,16,32,.04);
  --shadow: 0 1px 2px rgba(11,16,32,.04), 0 8px 24px -10px rgba(11,16,32,.10);
  --shadow-lg: 0 4px 12px -2px rgba(11,16,32,.06), 0 16px 48px -12px rgba(11,16,32,.12);

  /* Typography */
  --ff-display: 'Bricolage Grotesque', sans-serif;
  --ff-body: 'Manrope', sans-serif;
  --ff-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --sidebar-w: 296px;
  --header-h: 132px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 60% at 15% 0%, rgba(14, 107, 84, 0.07), transparent 60%),
    radial-gradient(ellipse 70% 50% at 100% 30%, rgba(184, 115, 14, 0.06), transparent 55%);
  background-attachment: fixed;
}
button { font-family: inherit; cursor: pointer; }
a { color: inherit; }

/* ========== ICONS ========== */
.ic { width: 16px; height: 16px; stroke-width: 1.75; vertical-align: -3px; flex-shrink: 0; }
.ic-lg { width: 20px; height: 20px; }
.ic-sm { width: 13px; height: 13px; }

/* ========== HEADER ========== */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}
.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 18px 36px;
}
.brand-block { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  border-radius: 0;
  display: grid; place-items: center;
  color: #fff;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.04em;
  position: relative;
  overflow: hidden;
}
.brand-mark::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.25), transparent 60%);
}
.brand-text { display: flex; flex-direction: column; gap: 1px; }
.brand-eyebrow {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}
.brand-title {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}
.brand-title span { color: var(--accent); font-weight: 500; }

.kpi-strip {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
}
.kpi-item {
  padding: 8px 18px;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 96px;
}
.kpi-item:first-child { border-left: none; }
.kpi-num {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.kpi-lbl {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ========== TABS ========== */
.tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 36px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-3);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  letter-spacing: -0.005em;
  transition: all 0.18s ease;
  position: relative;
}
.tab:hover { color: var(--ink); }
.tab .tab-ic { color: var(--ink-4); transition: color 0.18s; }
.tab:hover .tab-ic { color: var(--brand); }
.tab.active {
  color: var(--ink);
  border-bottom-color: var(--brand);
}
.tab.active .tab-ic { color: var(--brand); }

/* ========== LAYOUT ========== */
.shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 0;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  padding: 24px 22px;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
  overflow-y: auto;
}
.main {
  padding: 28px 36px 80px;
  min-width: 0;
}

/* ========== SIDEBAR ========== */
.sb-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.sb-head-ic {
  width: 32px; height: 32px;
  background: var(--brand-tint);
  border-radius: 0;
  display: grid; place-items: center;
  color: var(--brand);
}
.sb-head-text {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.sb-head-text small {
  display: block;
  font-family: var(--ff-body);
  font-weight: 500;
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0;
}

.fg { margin-bottom: 16px; }
.fg-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.fg-label .ic { color: var(--ink-4); }

select, input[type="search"] {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  transition: all 0.15s ease;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2311143A' fill='none' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
  cursor: pointer;
}
select:hover, input:hover { border-color: var(--border-strong); }
select:focus, input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.chip-row { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  flex: 1;
  min-width: fit-content;
  padding: 7px 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-2);
  transition: all 0.15s ease;
  white-space: nowrap;
}
.chip:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }
.chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 14px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.15s ease;
  width: 100%;
}
.btn:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-deep); border-color: var(--brand-deep); }

/* ========== MAIN HEADINGS ========== */
.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.page-title {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.1;
}
.page-title span { color: var(--accent); font-weight: 500; }
.page-sub {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: 4px;
  font-weight: 500;
}
.page-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
}

.section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 16px;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.section-divider .ic { color: var(--brand); }

/* ========== GRID ========== */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-23 { grid-template-columns: 2fr 3fr; }
.grid-32 { grid-template-columns: 3fr 2fr; }
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .grid-2, .grid-23, .grid-32 { grid-template-columns: 1fr; }
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ========== CARDS ========== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.18s;
}
.card:hover { box-shadow: var(--shadow); }

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
  background: var(--brand);
  opacity: 0.85;
}
.stat.amber::before { background: var(--accent); }
.stat.deep::before { background: var(--ink); }
.stat.purple::before { background: #6d28d9; }
.stat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.stat-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.stat-ic {
  width: 30px; height: 30px;
  background: var(--brand-tint);
  border-radius: 0;
  display: grid; place-items: center;
  color: var(--brand);
}
.stat.amber .stat-ic { background: var(--accent-tint); color: var(--accent); }
.stat.deep .stat-ic { background: #e5e7eb; color: var(--ink); }
.stat.purple .stat-ic { background: #ede9fe; color: #6d28d9; }
.stat-num {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat-num small {
  font-family: var(--ff-body);
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  margin-left: 4px;
  letter-spacing: 0;
}
.stat-foot {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--ink-3);
}
.delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 0;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.delta.up { color: #047857; background: #d1fae5; }
.delta.down { color: #b91c1c; background: #fee2e2; }

/* ========== CHART CARDS ========== */
.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-xs);
}
.chart-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 16px;
  gap: 12px;
}
.chart-card-title {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.chart-card-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
  font-weight: 500;
}
.chart-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--surface-3);
  color: var(--ink-2);
  border-radius: 0;
}
.chart-wrap {
  position: relative;
  height: 280px;
}
.chart-wrap.tall { height: 360px; }
.chart-wrap.tall-2 { height: 420px; }

/* ========== CATEGORY PILL ========== */
.cat-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 0;
  letter-spacing: -0.01em;
  min-width: 32px;
}
.cat-Aplus { background: var(--cat-aplus); color: #d1fae5; }
.cat-A { background: var(--cat-a); color: #fff; }
.cat-B { background: var(--cat-b); color: #fff; }
.cat-C { background: var(--cat-c); color: #fff; }
.cat-D { background: var(--cat-d); color: #fff; }
.cat-pill.lg { font-size: 36px; padding: 12px 22px; border-radius: 0; }
.cat-pill.xl { font-size: 48px; padding: 14px 28px; border-radius: 0; }

/* ========== TABLE ========== */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface-3);
  border-bottom: 1px solid var(--border-strong);
  font-weight: 700;
  white-space: nowrap;
}
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
}
.table tr:hover td { background: var(--brand-tint); }
.table tr:last-child td { border-bottom: none; }
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--ff-mono);
  font-size: 12.5px;
}
.table .num.strong { font-weight: 600; color: var(--ink); }
.table .rank {
  font-family: var(--ff-display);
  font-weight: 600;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  width: 40px;
}
.table .rank-top { color: var(--accent); }

/* ========== SCHOOL HERO ========== */
.school-hero {
  background: linear-gradient(135deg, var(--brand-deep) 0%, var(--brand) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.school-hero::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(217, 152, 38, 0.18), transparent 70%);
}
.school-hero::after {
  content: "";
  position: absolute;
  bottom: -50px; left: -50px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
}
.school-hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.school-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
}
.school-name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin: 10px 0 14px;
  color: #fff;
}
.school-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
}
.school-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.8);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.school-meta-item b { color: #fff; font-weight: 700; }
.school-meta-item .ic { color: rgba(255,255,255,0.7); }
.school-cat-box {
  text-align: center;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 18px 24px;
  backdrop-filter: blur(8px);
}
.school-cat-box-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 6px;
}
.school-score {
  margin-top: 12px;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 24px;
  color: #fff;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.school-score small {
  font-family: var(--ff-body);
  font-size: 11px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-left: 4px;
}

/* ========== LEVEL BARS ========== */
.level-row {
  margin: 16px 0;
}
.level-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.level-row-name {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
}
.level-row-score {
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.level-row-score b {
  color: var(--ink);
  font-family: var(--ff-mono);
  font-size: 13px;
  margin-left: 4px;
}
.level-bar {
  display: flex;
  height: 26px;
  width: 100%;
  overflow: hidden;
  border-radius: 0;
  background: var(--surface-3);
}
.level-bar > div {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: flex 0.4s ease;
  font-family: var(--ff-mono);
}
.level-bar > div:nth-child(1) { background: var(--cat-d); }
.level-bar > div:nth-child(2) { background: var(--cat-c); color: #fff; }
.level-bar > div:nth-child(3) { background: var(--cat-b); color: #fff; }
.level-bar > div:nth-child(4) { background: var(--cat-a); }
.level-bar > div:nth-child(5) { background: var(--cat-aplus); color: #d1fae5; }

.legend-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.legend-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend-dot {
  width: 10px; height: 10px; border-radius: 0;
}

/* ========== PROJECTION ========== */
.proj-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.proj-hero-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}
.proj-hero-info h2 {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.15;
}
.proj-arrow {
  display: flex;
  align-items: center;
  gap: 24px;
}
.proj-arrow-step {
  text-align: center;
}
.proj-arrow-lbl {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.proj-arrow-line {
  color: var(--accent);
  font-size: 28px;
  font-weight: 300;
}
.proj-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 1100px) {
  .proj-grid { grid-template-columns: 1fr; }
  .proj-hero-content { grid-template-columns: 1fr; }
}

.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.proj-card.immediate { border-top: 4px solid var(--accent); }
.proj-card.long { border-top: 4px solid var(--brand); }
.proj-card-head {
  display: flex;
  align-items: start;
  gap: 14px;
  margin-bottom: 6px;
}
.proj-card-ic {
  width: 38px; height: 38px;
  border-radius: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.proj-card.immediate .proj-card-ic { background: var(--accent-tint); color: var(--accent); }
.proj-card.long .proj-card-ic { background: var(--brand-tint); color: var(--brand); }
.proj-card-title {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 2px;
}
.proj-card-sub {
  font-size: 11.5px;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.uplift-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
  padding: 18px;
  background: linear-gradient(135deg, var(--accent-tint) 0%, var(--accent-soft) 100%);
  border-radius: var(--radius);
}
.uplift-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.uplift-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.uplift-val {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: -0.025em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.uplift-val small {
  font-family: var(--ff-body);
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 500;
  margin-left: 4px;
  letter-spacing: 0;
}

.area-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}
.area-item {
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.area-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  gap: 10px;
}
.area-item-name {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.area-item-score {
  font-family: var(--ff-mono);
  font-weight: 600;
  font-size: 16px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.area-item-gap {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-bottom: 10px;
  font-weight: 500;
}
.area-item-gap b { color: var(--ink); }
.area-item-actions {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.55;
}
.area-item-actions-head {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.area-item-actions ul {
  padding-left: 18px;
  margin: 0;
}
.area-item-actions li {
  margin-bottom: 6px;
}

.priority-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: 0;
}
.priority-alta { background: #fee2e2; color: #b91c1c; }
.priority-media { background: var(--accent-tint); color: var(--accent); }
.priority-baja { background: #d1fae5; color: #047857; }

.note-block {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--info-tint);
  border-left: 3px solid var(--info);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-top: 16px;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.6;
}
.note-block b { color: var(--ink); }
.note-block .ic { color: var(--info); flex-shrink: 0; margin-top: 2px; }

/* ========== EMPTY ========== */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 420px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.empty-ic {
  width: 64px; height: 64px;
  background: var(--brand-tint);
  border-radius: 0;
  display: grid; place-items: center;
  color: var(--brand);
  margin-bottom: 16px;
}
.empty-title {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 20px;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 6px;
}
.empty-sub {
  font-size: 13px;
  color: var(--ink-3);
  max-width: 380px;
}
.empty-sub b { color: var(--ink); }

/* ========== SCORE EXPLAINER (PROYECCIÓN HERO) ========== */
.score-explainer {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.se-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.se-cell { display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.se-lbl {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.se-val {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 36px;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.se-sub {
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  margin-top: 2px;
}
.se-sub b { color: var(--ink); font-weight: 700; }
.se-arrow { color: var(--accent); }
.se-arrow .ic { width: 28px; height: 28px; }
.se-prose {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--surface-2);
  padding: 14px 16px;
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}
.se-prose b { color: var(--ink); }

/* ========== DISCURSO PEDAGÓGICO ========== */
.discurso-card {
  background: linear-gradient(135deg, var(--brand-deep) 0%, #052e23 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 18px 0;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.discurso-card::before {
  content: "";
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(217, 152, 38, 0.15), transparent 70%);
}
.discurso-head {
  display: flex;
  align-items: start;
  gap: 14px;
  margin-bottom: 22px;
  position: relative;
}
.discurso-head .ic { color: var(--accent-2); width: 32px; height: 32px; flex-shrink: 0; margin-top: 2px; }
.discurso-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: -0.025em;
  color: #fff;
  line-height: 1.15;
}
.discurso-title em { font-style: italic; color: var(--accent-2); }
.discurso-sub {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
}
.discurso-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  position: relative;
}
@media (max-width: 900px) { .discurso-grid { grid-template-columns: 1fr; } }
.discurso-grid > div {
  padding: 18px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.12);
  backdrop-filter: blur(4px);
}
.discurso-num {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 48px;
  line-height: 1;
  color: var(--accent-2);
  letter-spacing: -0.04em;
}
.discurso-num-lbl {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-bottom: 8px;
}
.discurso-grid p {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255,255,255,0.88);
}
.discurso-grid p b { color: #fff; font-weight: 700; }
.discurso-foot {
  margin-top: 20px;
  padding: 14px 18px;
  background: rgba(0,0,0,0.2);
  border-left: 3px solid var(--accent-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
  position: relative;
}
.discurso-foot b { color: var(--accent-2); }

/* ========== PRIORITY MAP ========== */
.priority-map {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 8px;
}
@media (max-width: 1100px) { .priority-map { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .priority-map { grid-template-columns: 1fr; } }
.pm-card {
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  border-top: 3px solid var(--brand);
}
.pm-card.pm-alta { border-top-color: var(--danger); background: #fef2f2; }
.pm-card.pm-media { border-top-color: var(--accent); background: var(--accent-tint); }
.pm-card.pm-baja { border-top-color: var(--brand); background: var(--brand-tint); }
.pm-rank {
  font-family: var(--ff-mono);
  font-weight: 600;
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.pm-area {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 10px;
  min-height: 36px;
  line-height: 1.2;
}
.pm-score {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 28px;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pm-score small {
  font-family: var(--ff-body);
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
  margin-left: 3px;
}
.pm-meta {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pm-baja {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
}
.pm-aporte {
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 600;
  padding-top: 4px;
  border-top: 1px dashed var(--border-strong);
  margin-top: 2px;
}
.pm-aporte b { color: var(--brand-deep); font-family: var(--ff-mono); }

/* ========== AREA PLAN ========== */
.area-plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 18px;
  box-shadow: var(--shadow-sm);
}
.area-plan-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.area-plan-title {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}
.ap-num {
  width: 48px; height: 48px;
  background: var(--brand);
  color: #fff;
  border-radius: 0;
  display: grid; place-items: center;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 22px;
  flex-shrink: 0;
}
.ap-name {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.025em;
  color: var(--ink);
  line-height: 1.1;
}
.ap-meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.ap-meta b { color: var(--ink); font-weight: 700; }

/* PLAZO BLOCK */
.plazo-block { margin-bottom: 22px; }
.plazo-block:last-child { margin-bottom: 0; }
.plazo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.plazo-ic {
  width: 36px; height: 36px;
  background: var(--accent-tint);
  color: var(--accent);
  border-radius: 0;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.plazo-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.plazo-sub {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
}

/* COMPETENCIA CARD (corto plazo) */
.comp-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 12px;
}
.comp-card:last-of-type { margin-bottom: 12px; }
.comp-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 10px;
}
.comp-card-name {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.comp-card-pct {
  background: var(--accent);
  color: #fff;
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 0;
  flex-shrink: 0;
}
.comp-afirmacion {
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  padding: 8px 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.comp-afirmacion b { color: var(--brand); }
.comp-evidencias {
  font-size: 12px;
  line-height: 1.55;
  color: var(--ink-3);
  margin-bottom: 12px;
}
.comp-evidencias b { color: var(--ink); }
.comp-estrategias {
  padding: 12px 14px;
  background: var(--accent-tint);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}
.comp-estrategias-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.comp-estrategias ul {
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-2);
}
.comp-estrategias li { margin-bottom: 6px; }
.comp-estrategias li:last-child { margin-bottom: 0; }
.comp-note {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--info-tint);
  border-left: 3px solid var(--info);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 12px;
  color: var(--ink-2);
  line-height: 1.55;
}
.comp-note .ic { color: var(--info); flex-shrink: 0; margin-top: 1px; }
.comp-note b { color: var(--ink); }

/* EBC */
.ebc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 1000px) { .ebc-grid { grid-template-columns: 1fr; } }
.ebc-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  border-top: 3px solid var(--brand);
}
.ebc-card-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.ebc-grado {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--brand);
}
.ebc-grado-detail {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.ebc-section { margin-bottom: 14px; }
.ebc-section:last-child { margin-bottom: 0; }
.ebc-section-head {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ebc-list {
  list-style: none;
  padding: 0;
}
.ebc-list li {
  padding: 8px 10px 8px 24px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  position: relative;
  border-bottom: 1px solid var(--border);
}
.ebc-list li:last-child { border-bottom: none; }
.ebc-list li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.ebc-list-actions li::before { background: var(--accent); }
.ebc-list-actions li { color: var(--ink-2); }

.grid-5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1400px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .grid-5 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-5 { grid-template-columns: 1fr; } }

/* ========== DISPERSION VIEW ========== */
.explainer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--info);
}
.explainer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.explainer-ic {
  width: 38px; height: 38px;
  background: var(--info-tint);
  color: var(--info);
  border-radius: 0;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.explainer-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.explainer-sub {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
}
.explainer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) { .explainer-grid { grid-template-columns: 1fr; } }
.explainer-grid > div {
  padding: 16px 18px;
  background: var(--surface-2);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.explainer-num {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  color: var(--info);
  letter-spacing: -0.04em;
}
.explainer-num-lbl {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 4px 0 10px;
}
.explainer-grid p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.explainer-grid p b { color: var(--ink); font-weight: 700; }

/* SCHOOL DISP CARD */
.school-disp-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.school-disp-head { margin-bottom: 18px; }
.school-disp-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0;
  margin-bottom: 8px;
}
.school-disp-title {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 6px;
}
.school-disp-sub {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 760px;
}
.school-disp-sub b { color: var(--ink); }
.school-disp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
@media (max-width: 1400px) { .school-disp-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .school-disp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .school-disp-grid { grid-template-columns: 1fr; } }

.sd-card {
  padding: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.sd-card.sd-homog { border-left: 3px solid #047857; background: #f0fdf4; }
.sd-card.sd-heter { border-left: 3px solid var(--danger); background: #fef2f2; }
.sd-card.sd-na { border-left: 3px solid var(--ink-4); }
.sd-card-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 8px;
  margin-bottom: 10px;
}
.sd-area {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1.2;
}
.sd-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 0;
  white-space: nowrap;
}
.sd-tag .ic { width: 11px; height: 11px; }
.sd-homog-tag { background: #d1fae5; color: #047857; }
.sd-heter-tag { background: #fee2e2; color: var(--danger); }
.sd-val {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 32px;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.sd-val small {
  font-family: var(--ff-body);
  font-size: 12px;
  color: var(--ink-3);
  font-weight: 500;
  margin-left: 3px;
  letter-spacing: 0;
}
.sd-bar-wrap { position: relative; margin-bottom: 18px; }
.sd-bar {
  height: 8px;
  background: var(--surface-3);
  border-radius: 0;
  overflow: hidden;
}
.sd-bar-fill {
  height: 100%;
  border-radius: 0;
  transition: width 0.4s ease;
}
.sd-homog-fill { background: linear-gradient(90deg, #059669, #047857); }
.sd-heter-fill { background: linear-gradient(90deg, var(--accent), var(--danger)); }
.sd-bar-marker {
  position: absolute;
  top: -2px;
  width: 2px;
  height: 12px;
  background: var(--ink);
  transform: translateX(-1px);
}
.sd-bar-marker-lbl {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-family: var(--ff-mono);
  white-space: nowrap;
}
.sd-meta {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
}
.sd-meta b { color: var(--ink); font-family: var(--ff-mono); }
.sd-na-msg {
  font-size: 12px;
  font-style: italic;
  color: var(--ink-3);
  padding: 18px 0;
  text-align: center;
}

/* AGGREGATE STATS */
.stat-disp {
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.stat-disp::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 3px; height: 100%;
}
.stat-disp.is-homog::before { background: #047857; }
.stat-disp.is-heter::before { background: var(--danger); }
.stat-disp-area {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 8px;
  min-height: 32px;
  line-height: 1.2;
}
.stat-disp-val {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.stat-disp-val small {
  font-family: var(--ff-body);
  font-size: 10.5px;
  color: var(--ink-3);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 4px;
}
.stat-disp-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.stat-disp-split > div {
  text-align: center;
}
.stat-disp-split b {
  display: block;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat-disp.is-homog .stat-disp-split > div:first-child b { color: #047857; }
.stat-disp.is-heter .stat-disp-split > div:last-child b { color: var(--danger); }
.stat-disp-split span {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 4px;
}
.stat-disp-foot {
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

/* SCATTER AREA SELECTOR */
.disp-area-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.disp-chip {
  flex: none;
  padding: 5px 10px;
  font-size: 11px;
}

/* QUADRANT LEGEND */
.quadrant-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
  font-size: 12px;
  line-height: 1.55;
}
@media (max-width: 800px) { .quadrant-legend { grid-template-columns: 1fr; } }
.quadrant-legend > div {
  display: flex;
  gap: 8px;
  align-items: start;
}
.ql-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 3px;
}
.ql-1 { background: rgba(217, 119, 6, 0.85); }
.ql-2 { background: rgba(185, 28, 28, 0.85); }
.ql-3 { background: rgba(75, 85, 99, 0.75); }
.ql-4 { background: rgba(5, 150, 105, 0.85); }
.quadrant-legend b { color: var(--ink); font-weight: 700; }

/* RANK LIST */
.rank-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  border-radius: var(--radius-sm);
}
.rank-item:hover { background: var(--brand-tint); }
.rank-item:last-child { border-bottom: none; }
.rank-num {
  width: 28px; height: 28px;
  border-radius: 0;
  display: grid;
  place-items: center;
  font-family: var(--ff-mono);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.rank-num.rank-homog { background: #d1fae5; color: #047857; }
.rank-num.rank-heter { background: #fee2e2; color: var(--danger); }
.rank-info { flex: 1; min-width: 0; }
.rank-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-meta {
  font-size: 10.5px;
  color: var(--ink-3);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rank-val {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.rank-val small {
  font-family: var(--ff-body);
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 500;
  margin-left: 2px;
}

/* DEPARTMENT FILTER (the first, special one) */
.fg-dept {
  padding: 14px;
  background: linear-gradient(135deg, var(--brand-tint), var(--surface-2));
  border: 1px solid var(--brand-soft);
  border-radius: var(--radius);
  margin-bottom: 18px;
  position: relative;
}
.fg-dept::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 3px;
  background: var(--brand);
  border-radius: var(--radius) 0 0 var(--radius);
}
.fg-dept .fg-label { color: var(--brand-deep); font-weight: 800; }
.fg-dept .fg-label .ic { color: var(--brand); }
.fg-dept select {
  font-weight: 600;
  border-color: var(--brand-soft);
  background-color: #fff;
}
.fg-dept-stats {
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--ink-3);
  font-family: var(--ff-mono);
  letter-spacing: 0.02em;
}
.fg-dept-stats b { color: var(--brand-deep); font-weight: 700; }

/* ========== SCHOOL SEARCH ========== */
.school-search { position: relative; }
.school-search-input {
  padding-left: 32px !important;
}
.school-search .search-ic {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-4);
}
.school-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
  display: none;
  box-shadow: var(--shadow-lg);
}
.school-results.show { display: block; }
.school-results .sr-head {
  padding: 8px 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  background: var(--surface-3);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
}
.school-results div[data-codigo] {
  padding: 10px 12px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.school-results div[data-codigo]:last-child { border-bottom: none; }
.school-results div[data-codigo]:hover { background: var(--brand-tint); }
.school-results div[data-codigo] b { font-weight: 600; color: var(--ink); display: block; margin-bottom: 2px; }
.school-results div[data-codigo] small { color: var(--ink-3); font-size: 10.5px; font-family: var(--ff-mono); }

.school-selected {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--brand-tint);
  border: 1px solid var(--brand-soft);
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--brand-deep);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.school-selected button {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px;
}

.hidden { display: none !important; }

/* Scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* Loading shimmer */
.shimmer {
  background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Animation */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.35s ease-out; }

/* Tooltip helper */
.help {
  display: inline-flex;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--ink-4);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  align-items: center;
  justify-content: center;
  cursor: help;
}
/* ========== WARNING BLOCK ========== */
.warn-block {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: #fef3c7;
  border-left: 4px solid var(--warning);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 16px;
  font-size: 12.5px;
  color: #78350f;
  line-height: 1.6;
}
.warn-block b { color: #451a03; }
.warn-block .ic { color: var(--warning); flex-shrink: 0; margin-top: 2px; }
.warn-block.warn-soft {
  background: var(--info-tint);
  border-left-color: var(--info);
  color: var(--ink-2);
}
.warn-block.warn-soft b { color: var(--ink); }
.warn-block.warn-soft .ic { color: var(--info); }

/* ========== PRINT BUTTON ========== */
.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 18px;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.15s;
}
.print-btn:hover { background: var(--brand); transform: translateY(-1px); }
.print-btn .ic { width: 15px; height: 15px; }

/* ========== PERFIL INSTITUCIONAL ========== */
.perfil-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.perfil-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.perfil-ic {
  width: 38px; height: 38px;
  background: var(--brand-tint);
  color: var(--brand);
  border-radius: 0;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.perfil-title { font-family: var(--ff-display); font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--ink); }
.perfil-sub { font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; margin-top: 2px; }
.perfil-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.perfil-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 0;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.pt-info { background: var(--info-tint); color: var(--info); }
.pt-warn { background: var(--accent-tint); color: var(--accent); }
.pt-ok { background: #d1fae5; color: #047857; }
.pt-danger { background: #fee2e2; color: #b91c1c; }
.pt-neutral { background: var(--surface-3); color: var(--ink-2); }
.pt-brand { background: var(--brand-tint); color: var(--brand-deep); }
.perfil-notes { display: flex; flex-direction: column; gap: 8px; }
.perfil-note {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
  padding: 10px 14px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--border-strong);
}
.perfil-note b { color: var(--ink); }

/* ========== ACCIONES CONTEXTUALES POR ÁREA ========== */
.ctx-block {
  margin-bottom: 18px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--brand-tint), var(--surface-2));
  border: 1px solid var(--brand-soft);
  border-radius: var(--radius);
}
.ctx-block-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 10px;
}
.ctx-block-head .ic { color: var(--brand); }
.ctx-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ctx-list li {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  padding: 10px 12px;
  background: rgba(255,255,255,0.75);
  border-radius: var(--radius-sm);
}
.ctx-fuente {
  display: inline-block;
  padding: 1px 8px;
  margin-right: 8px;
  background: var(--brand);
  color: #fff;
  border-radius: 0;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  vertical-align: 1px;
}

/* ========== PANORAMA NACIONAL ========== */
.nat-hero {
  background: linear-gradient(135deg, #0b1020 0%, var(--brand-deep) 60%, var(--brand) 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 36px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.nat-hero::before {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 440px; height: 440px;
  background: radial-gradient(circle, rgba(217,152,38,0.22), transparent 70%);
}
.nat-hero-title {
  font-family: var(--ff-display);
  font-weight: 800;
  font-size: 34px;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 8px;
  position: relative;
}
.nat-hero-title em { font-style: italic; color: var(--accent-2); font-weight: 500; }
.nat-hero-sub { font-size: 14px; color: rgba(255,255,255,0.8); max-width: 640px; line-height: 1.6; position: relative; }
.nat-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 24px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(6px);
  background: rgba(255,255,255,0.06);
  position: relative;
}
.nat-stat { padding: 16px 26px; border-right: 1px solid rgba(255,255,255,0.15); }
.nat-stat:last-child { border-right: none; }
.nat-stat b {
  display: block;
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.025em;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.nat-stat span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-top: 6px;
}

.nat-rank-item {
  display: grid;
  grid-template-columns: 44px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  border-radius: var(--radius-sm);
}
.nat-rank-item:hover { background: var(--brand-tint); }
.nat-rank-pos {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-3);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.nat-rank-item:nth-child(1) .nat-rank-pos,
.nat-rank-item:nth-child(2) .nat-rank-pos,
.nat-rank-item:nth-child(3) .nat-rank-pos { color: var(--accent); }
.nat-rank-name { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.nat-rank-meta { font-size: 10.5px; color: var(--ink-3); font-family: var(--ff-mono); margin-top: 1px; }
.nat-rank-bar-wrap { width: 160px; height: 8px; background: var(--surface-3); border-radius: 0; overflow: hidden; }
.nat-rank-bar { height: 100%; border-radius: 0; background: linear-gradient(90deg, var(--brand-2), var(--brand)); }
.nat-rank-score {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  min-width: 58px;
  text-align: right;
}

.level-bar-vacio {
  flex: 1;
  display: grid; place-items: center;
  font-size: 11.5px;
  color: var(--ink-4);
  background: var(--surface-3);
  letter-spacing: 0;
}

/* ========== HALLAZGOS ==========
   Sin tarjeta: los hallazgos se leen como las conclusiones de un informe
   impreso, sobre el papel y separados por reglas finas. La dirección del
   hallazgo (mejora, retroceso, dato) va en el margen izquierdo, no en un
   punto de color: es información, no adorno. */
.insights-card {
  margin-top: 34px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
}
.insights-head { margin-bottom: 20px; max-width: 62ch; }
.insights-title {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.insights-sub {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
  margin-top: 6px;
}
.insights-grid { columns: 2; column-gap: 46px; }
@media (max-width: 900px){ .insights-grid { columns: 1; } }
.insight {
  break-inside: avoid;
  padding: 11px 0 13px 15px;
  border-top: 1px solid var(--border);
  border-left: 2px solid var(--border-strong);
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 58ch;
}
/* En multicolumna, :first-child solo afecta al primer ítem real, y la
   segunda columna quedaba desnivelada. Se deja la regla superior en todos. */
.insight b { font-weight: 700; color: var(--ink); }
.insight.in-up    { border-left-color: var(--brand); }
.insight.in-down  { border-left-color: var(--danger); }
.insight.in-neutral { border-left-color: var(--border-strong); }

/* ========== PRINT STYLES ========== */
@media print {
  @page { size: A4; margin: 12mm; }
  body {
    background: #fff !important;
    background-image: none !important;
    font-size: 11px;
  }
  .header, .tabs, .sidebar, .print-btn, .no-print, .disp-area-selector { display: none !important; }
  .shell { display: block !important; }
  .main { padding: 0 !important; }
  .print-header { display: block !important; }
  .card, .chart-card, .stat, .proj-card, .area-plan, .perfil-card, .school-hero, .discurso-card, .nat-hero, .explainer-card, .school-disp-card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
  .insights-card { break-inside: avoid; box-shadow: none !important; }
  .school-hero, .discurso-card, .insights-card, .nat-hero {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .grid-4 { grid-template-columns: repeat(4, 1fr) !important; }
  .grid-2, .grid-32, .grid-23 { grid-template-columns: 1fr 1fr !important; }
  .chart-wrap { height: 220px !important; }
  .chart-wrap.tall { height: 260px !important; }
  .chart-wrap.tall-2 { height: 300px !important; }
  .fade-up { animation: none !important; }
  .level-bar > div, .cat-pill, .priority-tag, .perfil-tag, .ctx-fuente, .sd-tag {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  a { text-decoration: none; color: inherit; }
}
.print-header { display: none; }
@media print {
  .print-header {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid #0b1020;
  }
  .print-header .ph-title { font-family: var(--ff-display); font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
  .print-header .ph-title span { color: var(--accent); }
  .print-header .ph-meta { text-align: right; font-size: 10px; color: #555; line-height: 1.5; }
}

/* ===== FILTRO DE TIPO DE OFERTA (grado 11 vs grado 26) ===== */
.fg-oferta{
  padding:12px; background:var(--accent-tint);
  border:1px solid var(--accent-soft); border-radius:var(--radius);
}
.fg-oferta .fg-label{ color:#7c4a03; font-weight:800; }
.fg-oferta .fg-label .ic{ color:var(--accent); }
.fg-oferta .chip{ font-size:11px; }
.fg-oferta .chip.active{ background:var(--accent); border-color:var(--accent); color:#fff; }
.fg-oferta-nota{
  margin-top:8px; font-size:10.5px; line-height:1.5; color:#7c4a03; font-weight:600;
}
/* ===== BLOQUE METODOLÓGICO DE CATEGORÍA ===== */
.idx-box{
  display:flex; flex-wrap:wrap; gap:14px; align-items:center;
  padding:12px 14px; background:var(--surface-2);
  border:1px solid var(--border); border-radius:var(--radius); margin-top:10px;
}
.idx-item{ display:flex; flex-direction:column; gap:2px; }
.idx-item span{
  font-size:10px; font-weight:700; letter-spacing:.1em;
  text-transform:uppercase; color:var(--ink-3);
}
.idx-item b{
  font-family:var(--ff-display); font-weight:700; font-size:20px;
  letter-spacing:-.02em; color:var(--ink); font-variant-numeric:tabular-nums;
}
.idx-formula{
  font-family:var(--ff-mono); font-size:11.5px; color:var(--ink-2);
  background:var(--surface); padding:6px 10px; border-radius:var(--radius-sm);
  border:1px dashed var(--border-strong);
}

.rank-modo{ display:flex; gap:6px; }
.rk-chip{ flex:none; padding:7px 12px; font-size:11.5px; }
.rk-chip.active{ background:var(--brand); border-color:var(--brand); color:#fff; }

.dos-palancas{ display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:4px 0 16px; }
@media (max-width:900px){ .dos-palancas{ grid-template-columns:1fr; } }
.palanca{
  display:flex; gap:12px; padding:14px; background:var(--surface-2);
  border:1px solid var(--border); border-radius:var(--radius);
}
.palanca-ic{
  width:34px; height:34px; border-radius: 0; display:grid; place-items:center;
  background:var(--brand-tint); color:var(--brand); flex-shrink:0;
}
.palanca-tit{ font-family:var(--ff-display); font-weight:700; font-size:14px; color:var(--ink); margin-bottom:3px; }
.palanca-txt{ font-size:12.5px; line-height:1.55; color:var(--ink-2); }

/* ==========================================================
   Identidad Orvian (sobrescribe la paleta original del observatorio)
   noche #11143A · cobalto #3446FF · ámbar #FFB547 · radio 0 · sin sombras
   ========================================================== */
:root {
  --bg: #F3F4F7;
  --bg-2: #E4E6EE;
  --surface: #FFFFFF;
  --surface-2: #FFFFFF;
  --surface-3: #F3F4F7;
  --ink: #11143A;
  --ink-2: #1B1F4D;
  --ink-3: #4A4F6A;
  --ink-4: #6A7093;
  --border: #E4E6EE;
  --border-strong: #CFD3E2;
  --brand: #3446FF;
  --brand-2: #2535E0;
  --brand-deep: #11143A;
  --brand-soft: #D9DDFF;
  --brand-tint: #EEF0FF;
  --accent: #B86E00;
  --accent-2: #FFB547;
  --accent-soft: #FFE2B3;
  --accent-tint: #FFF5E5;
  --info: #3446FF;
  --info-tint: #EEF0FF;
  --danger: #B3261E;
  --shadow-xs: none;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: none;
  --ff-display: 'Bricolage Grotesque', 'Geist', system-ui, sans-serif;
  --ff-body: 'Geist', system-ui, sans-serif;
  --ff-mono: 'Geist Mono', ui-monospace, monospace;
  --radius: 0px;
  --radius-sm: 0px;
  --radius-lg: 0px;
}
body { background-image: none; background: var(--bg); }
::selection { color: #11143A; background: #EEF0FF; }
:focus-visible { outline: 2px solid #3446FF; outline-offset: 1px; }
select:focus, input:focus { box-shadow: none; }

/* Firma Orvian en el encabezado */
.brand-mark { background: none; width: 34px; height: 34px; }
.brand-mark::after { display: none; }
.brand-mark svg { width: 34px; height: 34px; display: block; }
.brand-eyebrow { font-family: var(--ff-mono); letter-spacing: .09em; color: var(--brand); }
.brand-title { font-weight: 500; letter-spacing: -0.03em; }
.brand-title #brand-dept { color: var(--ink); }
.brand-title span:last-child { color: var(--ink-4); }
.kpi-lbl, .fg-label { font-family: var(--ff-mono); letter-spacing: .08em; font-weight: 500; }
.tab { font-weight: 500; }
.tab.active { border-bottom-color: var(--brand); }
.chip.active { background: var(--ink); border-color: var(--ink); }
.print-btn { background: var(--brand); font-family: var(--ff-mono); text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.print-btn:hover { background: var(--ink); transform: none; }
.page-title, .nat-hero-title { font-weight: 500; letter-spacing: -0.03em; }
.page-title span, .nat-hero-title em { color: var(--brand); }

/* Puente con los módulos de Orvian Aula */
.puente-aula {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px 20px;
  align-items: center;
  margin: 14px 0 4px;
  padding: 14px 16px;
  background: #11143A;
  color: #fff;
}
.puente-aula .pa-texto { font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.82); }
.puente-aula .pa-texto b { color: #fff; font-weight: 600; }
.puente-aula .pa-eyebrow {
  display: block; margin-bottom: 4px;
  font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: #FFB547;
}
.puente-aula .pa-acciones { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.btn-aula {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  background: #3446FF; color: #fff; border: 1px solid #3446FF;
}
.btn-aula:hover { background: #fff; color: #11143A; border-color: #fff; }
.btn-aula.sec { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.btn-aula.sec:hover { background: #fff; color: #11143A; border-color: #fff; }
.comp-aula {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-family: var(--ff-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
  color: #3446FF; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px;
}
.comp-aula:hover { color: #11143A; }
@media (max-width: 700px) {
  .puente-aula { grid-template-columns: 1fr; }
  .puente-aula .pa-acciones { justify-content: flex-start; }
}
@media print { .puente-aula, .comp-aula { display: none !important; } }

/* Carga de datos */
.carga-obs { padding: 60px 20px; text-align: center; color: var(--ink-3); font-size: 14px; }
.carga-obs b { display: block; font-family: var(--ff-display); font-weight: 500; font-size: 20px; color: var(--ink); margin-bottom: 6px; }
.carga-obs .barra { width: 160px; height: 2px; background: var(--border); margin: 18px auto 0; overflow: hidden; position: relative; }
.carga-obs .barra::after { content: ""; position: absolute; inset: 0; width: 40%; background: #3446FF; animation: obs-barra 1.1s ease-in-out infinite; }
@keyframes obs-barra { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
body.cargando .main section { opacity: .35; pointer-events: none; transition: opacity .15s; }

/* Celular y tableta: el observatorio original solo tenía diseño de escritorio */
@media (max-width: 900px) {
  :root { --header-h: 0px; }
  .header { position: static; }
  .header-row { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .header-row > div:empty { display: none; }
  .kpi-strip { justify-content: flex-start; flex-wrap: wrap; gap: 0; }
  .kpi-item { min-width: 0; padding: 6px 14px 6px 0; border-left: 0; margin-right: 14px; }
  .print-btn { display: none; }
  .tabs { padding: 0 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; position: sticky; top: 0; z-index: 90; }
  .tab { white-space: nowrap; padding: 12px 10px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--border); padding: 16px; }
  .main { padding: 18px 16px 60px; }
  .table-wrap { overflow-x: auto; }
}
