/* ════════════════════════════════════════════════════════
   Banco de Sangre — Documentación
   Hoja de estilos compartida (portal · wiki · guía de uso)
   ════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --accent-dark:  #8B1A1A;
  --accent-mid:   #C0392B;
  --accent-light: #E74C3C;
  --accent-pale:  #FDECEC;
  --gray-900:   #1A1A2E;
  --gray-700:   #2C3E50;
  --gray-500:   #5D6D7E;
  --gray-200:   #ECF0F1;
  --gray-100:   #F8F9FA;
  --white:      #FFFFFF;
  --border:     #D5D8DC;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
  --radius:     8px;
  --font-main:  'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono:  'Cascadia Code', 'Fira Code', 'Courier New', monospace;
}

/* ── Variante de color: Guía de Usuario (azul/teal) ── */
body.theme-guide {
  --accent-dark:  #154360;
  --accent-mid:   #1F618D;
  --accent-light: #3498DB;
  --accent-pale:  #EBF5FB;
}

/* ── Variante de color: Portal (morado) ── */
body.theme-portal {
  --accent-dark:  #4A235A;
  --accent-mid:   #6C3483;
  --accent-light: #8E44AD;
  --accent-pale:  #F4ECF7;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--gray-100);
  color: var(--gray-700);
  line-height: 1.7;
  font-size: 15px;
}

/* ── Page layout ──────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────── */
.sidebar {
  width: 270px;
  min-width: 270px;
  background: var(--gray-900);
  color: var(--gray-200);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  background: var(--accent-dark);
  padding: 28px 20px 20px;
  border-bottom: 3px solid var(--accent-light);
}

.sidebar-logo .logo-icon {
  font-size: 36px;
  margin-bottom: 6px;
  display: block;
}

.sidebar-logo h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--white);
  line-height: 1.4;
}

.sidebar-logo p {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  margin-top: 4px;
}

.sidebar nav { padding: 16px 0 24px; flex: 1; }

.sidebar nav .nav-section {
  padding: 10px 20px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,.35);
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 13px;
  transition: all .18s;
  border-left: 3px solid transparent;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  color: var(--white);
  background: rgba(255,255,255,.06);
  border-left-color: var(--accent-light);
}

.sidebar nav a .icon { font-size: 14px; opacity: .8; min-width: 18px; }

.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 11px;
  color: rgba(255,255,255,.35);
}

.sidebar-footer a { color: rgba(255,255,255,.55); }

/* ── Main content ─────────────────────────────────── */
.main {
  flex: 1;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* ── Top header ───────────────────────────────────── */
.top-header {
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-mid) 60%, var(--accent-light) 100%);
  color: var(--white);
  padding: 52px 56px 44px;
  position: relative;
  overflow: hidden;
}

.top-header::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}

.top-header::after {
  content: '';
  position: absolute;
  bottom: -80px; left: 30%;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}

.top-header .badge {
  display: inline-block;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.top-header h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1.1;
  margin-bottom: 10px;
}

.top-header p {
  font-size: 15px;
  opacity: .82;
  max-width: 620px;
  line-height: 1.6;
}

.header-stats {
  display: flex;
  gap: 28px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.stat-card {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: var(--radius);
  padding: 14px 22px;
  text-align: center;
  min-width: 100px;
  backdrop-filter: blur(4px);
}

.stat-card .stat-num {
  font-size: 26px;
  font-weight: 800;
  display: block;
}

.stat-card .stat-label {
  font-size: 11px;
  opacity: .75;
  text-transform: uppercase;
  letter-spacing: .8px;
}

/* ── Content area ─────────────────────────────────── */
.content {
  padding: 48px 56px;
  flex: 1;
  max-width: 1100px;
  width: 100%;
}

/* ── Section headings ─────────────────────────────── */
.section {
  margin-bottom: 60px;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}

.section-header .section-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--accent-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.section-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--gray-900);
  letter-spacing: -.2px;
}

.section-header .section-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-mid);
  text-transform: uppercase;
  letter-spacing: 1px;
}

h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-900);
  margin: 28px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

h3::before {
  content: '';
  width: 4px;
  height: 18px;
  background: var(--accent-mid);
  border-radius: 2px;
  flex-shrink: 0;
}

h3:first-child { margin-top: 0; }

p { margin-bottom: 12px; color: var(--gray-500); }

ul, ol { padding-left: 22px; margin-bottom: 12px; color: var(--gray-500); }
li { margin-bottom: 4px; }

a { color: var(--accent-mid); }

strong { color: var(--gray-900); }

.file-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 8px;
  display: inline-block;
}

/* ── Overview / flow cards ─────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 20px 0 28px;
}

.flow-card {
  border-radius: var(--radius);
  padding: 24px;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.flow-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
}

.flow-card.donor::before    { background: var(--accent-mid); }
.flow-card.receptor::before { background: var(--gray-700); }

.flow-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.flow-card h4 .pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: .6px;
}

.flow-card.donor h4 .pill    { background: var(--accent-pale); color: var(--accent-dark); }
.flow-card.receptor h4 .pill { background: var(--gray-200); color: var(--gray-700); }

.flow-card p { font-size: 13px; margin-bottom: 10px; }

.flow-card .model-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--gray-200);
  color: var(--gray-700);
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 4px;
}

/* ── Tables ───────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  margin: 16px 0 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 13.5px;
}

thead {
  background: var(--gray-900);
  color: var(--white);
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .8px;
  white-space: nowrap;
}

tbody tr { border-bottom: 1px solid var(--gray-200); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--gray-100); }

tbody td {
  padding: 11px 16px;
  vertical-align: top;
  color: var(--gray-700);
}

code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--gray-200);
  color: var(--accent-dark);
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Method badges (HTTP) ─────────────────────────── */
.method {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}

.method-get    { background: #EBF5FB; color: #1A5276; border: 1px solid #AED6F1; }
.method-post   { background: #EAFAF1; color: #145A32; border: 1px solid #A9DFBF; }
.method-put    { background: #FEF9E7; color: #7D6608; border: 1px solid #F9E79F; }
.method-delete { background: #FDEDEC; color: #922B21; border: 1px solid #F1948A; }

/* ── Module cards (API) ───────────────────────────── */
.module-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.module-card-header {
  background: var(--gray-900);
  color: var(--white);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.module-card-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
  margin: 0;
}

.module-card-header h3::before { display: none; }

.module-card-header .ep-count {
  margin-left: auto;
  background: var(--accent-mid);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.module-card-header .file-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(255,255,255,.55);
  background: rgba(255,255,255,.08);
  padding: 2px 8px;
  border-radius: 4px;
}

.module-card table { border-radius: 0; }
.module-card .table-wrap { margin: 0; border: none; border-radius: 0; box-shadow: none; }

/* ── Use case / role cards ─────────────────────────── */
.cu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}

.cu-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.cu-card-header {
  padding: 14px 18px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent-mid));
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cu-card-header .cu-num {
  font-size: 10px;
  font-weight: 800;
  background: rgba(255,255,255,.25);
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.cu-card-header h4 {
  font-size: 13px;
  font-weight: 700;
}

.cu-card-body { padding: 16px 18px; }

.cu-card-body .actor {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-mid);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Numbered step lists (casos de uso / guía paso a paso) ── */
.steps, .cu-steps { list-style: none; padding-left: 0; }

.steps li, .cu-steps li {
  display: flex;
  gap: 10px;
  font-size: 12.5px;
  color: var(--gray-700);
  padding: 5px 0;
  border-bottom: 1px solid var(--gray-200);
  align-items: flex-start;
}

.steps li:last-child, .cu-steps li:last-child { border-bottom: none; }

.steps li .step-num, .cu-steps li .step-num {
  background: var(--accent-pale);
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.steps li code, .cu-steps li code { font-size: 11px; }

/* Larger step list used in the user guide (one item per "pantalla") */
.guide-steps {
  list-style: none;
  padding-left: 0;
  counter-reset: guide-step;
  margin: 16px 0 24px;
}

.guide-steps > li {
  counter-increment: guide-step;
  position: relative;
  padding: 14px 18px 14px 56px;
  margin-bottom: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 13.5px;
}

.guide-steps > li::before {
  content: counter(guide-step);
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent-mid);
  color: var(--white);
  font-weight: 800;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}

.guide-steps > li strong { display: block; margin-bottom: 2px; color: var(--gray-900); }
.guide-steps > li p { margin: 4px 0 0; font-size: 12.5px; }

/* ── Flow diagrams (ASCII) ─────────────────────────── */
.flow-diagram {
  background: var(--gray-900);
  color: #A8D8A8;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 28px 32px;
  border-radius: var(--radius);
  overflow-x: auto;
  line-height: 1.8;
  white-space: pre;
  margin: 16px 0 28px;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

.flow-diagram .comment  { color: #6A9FB5; }
.flow-diagram .endpoint { color: #FFD580; }
.flow-diagram .node     { color: #FFFFFF; font-weight: 700; }
.flow-diagram .arrow    { color: var(--accent-light); }

/* ── Model / info cards ────────────────────────────── */
.model-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 12px;
}

.model-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.model-card-header {
  padding: 12px 16px;
  background: var(--gray-100);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.model-card-header h4 {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
}

.model-card-header .file-path {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gray-500);
  margin-left: auto;
  white-space: nowrap;
}

.model-card-body { padding: 0; }

/* ── Status badges (proceso / estatus) ─────────────── */
.status-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  white-space: nowrap;
}

.status-ok       { background: #EAFAF1; color: #145A32; border: 1px solid #A9DFBF; }
.status-warn     { background: #FEF9E7; color: #7D6608; border: 1px solid #F9E79F; }
.status-bad      { background: #FDEDEC; color: #922B21; border: 1px solid #F1948A; }
.status-neutral  { background: var(--gray-200); color: var(--gray-700); border: 1px solid var(--border); }

/* ── Tech notes / callout grid ─────────────────────── */
.tech-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 8px;
}

.tech-note {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent-mid);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.tech-note h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tech-note p { font-size: 12.5px; margin-bottom: 0; color: var(--gray-500); line-height: 1.6; }

.tech-note ul { list-style: none; margin-top: 6px; padding-left: 0; }

.tech-note ul li {
  font-size: 12px;
  color: var(--gray-500);
  padding: 3px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tech-note ul li::before {
  content: '→';
  color: var(--accent-mid);
  font-weight: 700;
  font-size: 11px;
}

/* ── Summary bar chart ─────────────────────────────── */
.summary-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-200);
}

.summary-bar:last-child { border-bottom: none; }

.summary-bar .bar-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray-700);
  min-width: 220px;
}

.summary-bar .bar-track {
  flex: 1;
  background: var(--gray-200);
  border-radius: 20px;
  height: 8px;
  overflow: hidden;
}

.summary-bar .bar-fill {
  background: linear-gradient(90deg, var(--accent-dark), var(--accent-light));
  height: 100%;
  border-radius: 20px;
  transition: width .3s;
}

.summary-bar .bar-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-dark);
  min-width: 30px;
  text-align: right;
}

/* ── Note / callout boxes (guía de usuario) ────────── */
.note {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 14px 0 22px;
  font-size: 13px;
  border: 1px solid transparent;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.note .note-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
.note p { margin: 0; }
.note p + p { margin-top: 6px; }
.note strong { color: inherit; }

.note-info    { background: #EBF5FB; border-color: #AED6F1; color: #1A5276; }
.note-tip     { background: #EAFAF1; border-color: #A9DFBF; color: #145A32; }
.note-warning { background: #FEF9E7; border-color: #F9E79F; color: #7D6608; }
.note-danger  { background: #FDEDEC; border-color: #F1948A; color: #922B21; }
.note-pending { background: var(--gray-200); border-color: var(--border); color: var(--gray-700); }

/* ── Role pills ─────────────────────────────────────── */
.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--accent-pale);
  color: var(--accent-dark);
  margin-bottom: 14px;
}

/* ── Glossary ───────────────────────────────────────── */
.glossary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.glossary-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
}

.glossary-item dt {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12.5px;
  color: var(--accent-dark);
  margin-bottom: 4px;
}

.glossary-item dd { font-size: 12.5px; color: var(--gray-500); }

/* ── FAQ (details/summary) ─────────────────────────── */
.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::before {
  content: '▸';
  color: var(--accent-mid);
  transition: transform .15s;
  flex-shrink: 0;
}

.faq-item[open] summary::before { transform: rotate(90deg); }

.faq-item .faq-body {
  padding: 0 18px 16px 42px;
  font-size: 13px;
  color: var(--gray-500);
}

/* ── Portal (index.html) ───────────────────────────── */
.portal-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent-mid) 55%, var(--accent-light) 100%);
  padding: 40px 20px;
}

.portal-wrap { max-width: 980px; width: 100%; }

.portal-header { text-align: center; color: var(--white); margin-bottom: 40px; }

.portal-header .logo-icon { font-size: 48px; display: block; margin-bottom: 10px; }

.portal-header h1 { font-size: 32px; font-weight: 800; margin-bottom: 10px; letter-spacing: -.5px; }

.portal-header p { color: rgba(255,255,255,.85); font-size: 15px; max-width: 560px; margin: 0 auto; }

.portal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}

.portal-card {
  background: var(--white);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 8px 30px rgba(0,0,0,.18);
  text-decoration: none;
  color: var(--gray-700);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform .15s, box-shadow .15s;
}

.portal-card:hover { transform: translateY(-4px); box-shadow: 0 12px 36px rgba(0,0,0,.24); }

.portal-card .portal-icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin-bottom: 4px;
}

.portal-card.dev .portal-icon  { background: var(--accent-pale); }
.portal-card.user .portal-icon { background: #EBF5FB; }

.portal-card h2 { font-size: 19px; font-weight: 800; color: var(--gray-900); }

.portal-card p { font-size: 13.5px; color: var(--gray-500); margin: 0; }

.portal-card .portal-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }

.portal-card .portal-tags span {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--gray-200);
  color: var(--gray-700);
}

.portal-card .portal-cta {
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-mid);
}

.portal-refs {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px;
  padding: 22px 28px;
  backdrop-filter: blur(4px);
}

.portal-refs h3 {
  color: var(--white);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
}

.portal-refs h3::before { display: none; }

.portal-refs ul { list-style: none; padding: 0; display: flex; gap: 12px; flex-wrap: wrap; }

.portal-refs a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--white);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  padding: 7px 14px;
  border-radius: 20px;
  text-decoration: none;
}

.portal-refs a:hover { background: rgba(255,255,255,.22); }

.portal-footer {
  text-align: center;
  color: rgba(255,255,255,.6);
  font-size: 12px;
  margin-top: 28px;
}

/* ── Footer (wiki / guía) ───────────────────────────── */
.page-footer {
  margin-top: 40px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray-500);
  font-size: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.page-footer a { color: var(--accent-mid); }

/* ── Print styles ─────────────────────────────────── */
@media print {
  .sidebar { display: none; }
  .main { width: 100%; }
  .top-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .module-card-header { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  thead { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .top-header { padding: 32px 24px; }
  .content { padding: 24px; }
  .overview-grid, .cu-grid, .model-grid, .tech-notes, .glossary-grid, .portal-grid { grid-template-columns: 1fr; }
  .top-header h1 { font-size: 26px; }
}
