/* consulta — lo propio del taller. Tokens, fuentes y componentes compartidos (encabezado, tablas,
   estados, botones, bloque Portafolio) vienen de tema.css, que se carga antes; aquí no se redefinen tokens.
   Guía: docs/guia-de-estilo.md. */

code { font-family: var(--mono); font-size: 0.88em; }
/* IBM Plex Sans se auto-aloja como fuente variable acotada a 400–600; el énfasis en
   cuerpo va explícito a 600 (SemiBold) en vez de dejar que el navegador sintetice una
   negrita 700. */
b, strong { font-weight: 600; }

/* enlaces: color de texto + subrayado tenue (siempre legible); acento al hover/foco. */
a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 2px;
  transition: color var(--t), text-decoration-color var(--t);
}
a:hover { color: var(--accent); text-decoration-color: var(--accent); }
a:focus-visible { outline: var(--focus); outline-offset: 2px; }
summary:focus-visible { outline: var(--focus); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- cabecera ---- */
.site-header {
  position: relative;
  max-width: var(--ancho-reporte);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* ---- interruptor día / noche ---- */
.theme-toggle {
  position: absolute;
  top: 2.4rem;
  right: 1.5rem;
  padding: 0.3rem 0.65rem;
  font-family: var(--sans);
  font-size: var(--fs-xs);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  line-height: 1;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t), border-color var(--t), background-color var(--t);
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent); }
/* en pantallas angostas el subtítulo pasa a ancho completo: deja aire para el botón */
@media (max-width: 640px) {
  .tagline, .tagline-sub { padding-right: 4.5rem; }
}
.site-header h1 {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: -0.022em;
  line-height: 1.1;
}
.tagline {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: var(--fs-md);
  max-width: 60ch;
}
.tagline-sub { margin: 0.5rem 0 0; font-size: var(--fs-sm); color: var(--faint); }
abbr[title] { text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; }
/* siglas del subtítulo enlazadas al glosario: color de acento (deliberado, pasa AA),
   sin subrayado del enlace — el abbr ya trae su punteado */
.tagline a { text-decoration: none; color: var(--accent); }
.tagline a abbr { color: inherit; cursor: pointer; }
.tagline a:hover abbr { color: var(--text); }

.qhelp {
  font-family: var(--sans);
  font-size: 0.72rem;
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  line-height: 1;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-chip);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  vertical-align: middle;
  transition: color var(--t), border-color var(--t);
}
.qhelp:hover { color: var(--text); border-color: var(--accent); }

.defs {
  border: 1px solid transparent;
  border-radius: var(--r);
  background: var(--surface-2);
  padding: 0.75rem 0.95rem;
  margin-bottom: 0.9rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.65;
  color: var(--muted);
}
.defs code { color: var(--accent); }

main {
  max-width: var(--ancho-reporte);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ---- carga ---- */
.drop-zone {
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--surface);
}
.drop-zone.dragover {
  border-color: var(--accent);
  background: var(--accent-weak);
}
.drop-zone > p:first-child { margin-top: 0; }

.file-button {
  display: inline-block;
  margin: 0.7rem 0;
  padding: 0.55rem 1.3rem;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--r);
  cursor: pointer;
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: filter var(--t);
}
.file-button:hover { filter: brightness(1.08); }
/* el input queda enfocable por teclado (no display:none) pero oculto a la vista */
.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.file-button:focus-within { outline: var(--focus); outline-offset: 2px; }

.synth {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: center;
  gap: 0.85rem;
  margin: 1.5rem 0 0.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.synth-label {
  flex-basis: 100%;
  color: var(--faint);
  font-family: var(--sans);
  font-size: var(--fs-xs);
}
.synth label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: var(--sans);
  font-size: var(--fs-xs);
  color: var(--muted);
  text-align: left;
}

.muted { color: var(--muted); font-size: var(--fs-sm); }

/* ---- callouts (nota / aviso) ---- */
.callout {
  border-radius: var(--r);
  background: var(--surface-2);
  padding: var(--sp-3) var(--sp-4);
  margin: 0.9rem 0;
  font-size: var(--fs-sm);
  text-align: left;
}
.callout--warn { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.callout--danger { background: color-mix(in srgb, var(--critica) 12%, transparent); }
.callout-label {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
  margin-right: 0.6ch;
}
.callout code { background: color-mix(in srgb, var(--text) 8%, transparent); padding: 0.05rem 0.3rem; border-radius: 3px; }

.error {
  border-radius: var(--r);
  background: color-mix(in srgb, var(--critica) 12%, transparent);
  color: var(--text);
  padding: 0.6rem 0.85rem;
  margin: 0.7rem 0 0;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-align: left;
}

/* ---- estado del runtime ---- */
.engine-status {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 1.1rem;
  font-family: var(--sans);
  font-size: var(--fs-sm);
  color: var(--muted);
}
.engine-status .dot {
  width: 7px;
  height: 7px;
  border-radius: var(--r-chip);
  background: var(--faint);
  flex-shrink: 0;
}
.engine-status[data-state="loading"] .dot { background: var(--accent); animation: blink 1s steps(2) infinite; }
.engine-status[data-state="ready"] .dot { background: var(--accent); }
.engine-status[data-state="error"] .dot { background: var(--critica); }
@keyframes blink { 50% { opacity: 0.25; } }
@media (prefers-reduced-motion: reduce) { .engine-status .dot { animation: none; } }

/* ---- espacio de trabajo (aparece al cargar una relación) ---- */
#workspace:not([hidden]) { animation: fadeUp 200ms ease; }

/* ---- archivo cargado ---- */
.file-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem 1rem;
  margin-top: 1.6rem;
  padding: 0.65rem 0.95rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: var(--fs-sm);
}
.file-bar .fname { font-family: var(--mono); color: var(--accent); font-weight: 500; word-break: break-all; }
.file-bar .fmeta { font-family: var(--mono); color: var(--muted); font-size: 0.78rem; }
.file-bar button:nth-last-of-type(2) { margin-left: auto; }
.file-bar button { font-size: 0.74rem; padding: 0.25rem 0.55rem; }
#sheet-pick-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  color: var(--muted);
}
#sheet-picker { font-size: 0.74rem; padding: 0.2rem 1.7rem 0.2rem 0.4rem; text-transform: none; letter-spacing: normal; }
#header-row-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: var(--fs-xs);
  color: var(--muted);
}
#header-row { width: 3.2rem; font-size: 0.74rem; padding: 0.2rem 0.4rem; text-transform: none; letter-spacing: normal; }

/* ---- pestañas ---- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.1rem;
  margin-top: 1.75rem;
  border-bottom: 1px solid var(--border-strong);
}
.tabs button {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  padding: 0.5rem 0.9rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t), border-color var(--t);
}
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }
.tabs button:hover { color: var(--text); }

.panel { margin-top: 1.6rem; }
.panel:not([hidden]) { animation: fadeIn 140ms ease; }
.panel h2 {
  margin: 0 0 0.4rem;
  font-family: var(--sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.panel .hint { margin: 0 0 1rem; color: var(--muted); font-size: var(--fs-sm); max-width: 68ch; }
.panel h3 {
  margin: 1.9rem 0 0.8rem;
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
}

/* ---- tablas ---- */
.table-scroll, .chart-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums lining-nums;
}
th, td {
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.null { color: var(--faint); }
thead th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  font-size: var(--fs-xs);
  position: sticky;
  top: 0;
}
tbody tr:last-child td { border-bottom: none; }

/* ---- editor SQL ---- */
.sql-editor {
  width: 100%;
  min-height: 7rem;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.55;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  resize: vertical;
  tab-size: 2;
}
.sql-editor:focus-visible { outline: var(--focus); outline-offset: 2px; }

.sql-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.8rem;
}
.sql-actions .kbd { font-family: var(--mono); font-size: 0.74rem; color: var(--faint); }

/* ---- barra de encabezados ---- */
.sql-toolbar { margin-top: 0.7rem; }
#headers-in { width: 100%; }

/* ---- plantillas ---- */
.templates {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.9rem;
}
.tpl-group { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; }
.tpl-title {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  color: var(--faint);
  width: 5.5rem;
  flex-shrink: 0;
}
.tpl-group button {
  font-family: var(--sans);
  font-size: var(--fs-xs);
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color var(--t), border-color var(--t), background-color var(--t);
}
.tpl-group button:hover { color: var(--text); border-color: var(--accent); background: var(--surface-2); }

/* ---- esquema (árbol de columnas) ---- */
.schema-tree {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.sc-group {
  --kind: var(--faint);
  border-radius: var(--r);
  background: var(--surface-2);
  padding: 0.6rem 0.75rem;
}
.sc-group[data-kind="temporal"] { --kind: #3b6fb6; }
.sc-group[data-kind="medida"] { --kind: var(--accent); }
.sc-group[data-kind="dimension"] { --kind: #8a64c0; }
.sc-group[data-kind="id"] { --kind: var(--faint); }
.sc-label {
  display: block;
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.sc-label::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--kind); margin-right: 6px; vertical-align: 0; }
.sc-count { color: var(--faint); font-weight: 400; }
.sc-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.sc-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.3;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--t), color var(--t);
}
.sc-chip em { font-style: normal; font-size: 0.63rem; color: var(--faint); }
.sc-chip:hover { border-color: var(--accent); }
.sc-chip.copied { border-color: var(--accent); color: var(--accent); }
.sc-chip.copied em { color: var(--accent); }

/* ---- desglose por dimensión ---- */
.dim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.9rem;
}
.dim {
  border: 1px solid transparent;
  border-radius: var(--r);
  background: var(--surface-2);
  padding: 0.65rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.73rem;
}
.dim-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  color: var(--muted);
}
.dim-name { color: var(--accent); font-weight: 500; }
.dim-row {
  display: grid;
  grid-template-columns: 1fr 3.5rem;
  gap: 0.35rem 0.5rem;
  align-items: center;
  padding: 0.12rem 0;
}
.dim-val { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dim-bar {
  grid-column: 1 / -1;
  height: 3px;
  border-radius: var(--r-chip);
  background: var(--surface-2);
}
.dim-bar > span { display: block; height: 100%; border-radius: var(--r-chip); background: var(--accent); }
.dim-n { text-align: right; color: var(--muted); font-size: var(--fs-xs); }
.dim-more { color: var(--faint); margin-top: 0.35rem; }

/* ---- asistente de CTEs ---- */
.cte-list { display: flex; flex-direction: column; gap: 0.6rem; }
.cte-item {
  display: grid;
  grid-template-columns: 8rem 1fr auto;
  gap: 0.5rem;
  align-items: start;
}
.cte-name { font-family: var(--mono); font-size: 0.8rem; }
.cte-body {
  font-family: var(--mono);
  font-size: 0.8rem;
  line-height: 1.5;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  resize: vertical;
}
.cte-del { align-self: start; }
@media (max-width: 560px) {
  .cte-item { grid-template-columns: 1fr auto; }
  .cte-name { grid-column: 1 / -1; }
}

.result-meta { margin-top: 0.9rem; font-family: var(--mono); font-size: 0.77rem; color: var(--muted); }
.result-meta.err { color: var(--critica); white-space: pre-wrap; }

/* ---- controles ---- */
select, button, input[type="text"], input[type="number"] {
  font-family: var(--sans);
  font-size: var(--fs-sm);
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--t), background-color var(--t);
}
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.9rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235b636e' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
  background-size: 0.62rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239aa2ad' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  }
}
:root[data-theme="dark"] select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%239aa2ad' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
select:hover, input[type="text"]:hover { border-color: var(--muted); }
select:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
button.primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  font-weight: 500;
  cursor: pointer;
  padding: 0.45rem 1.1rem;
  transition: filter var(--t);
}
button.primary:hover { filter: brightness(1.08); }
button.primary:disabled { opacity: 0.5; cursor: progress; filter: none; }
button.ghost {
  cursor: pointer;
  color: var(--muted);
  border-color: var(--border);
  transition: color var(--t), border-color var(--t);
}
button.ghost:hover { color: var(--text); border-color: var(--border-strong); }

/* ---- gráfico ---- */
.chart-controls { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin: 0.35rem 0 0.6rem; }
.chart-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-family: var(--sans);
  font-size: var(--fs-xs);
  color: var(--muted);
}
.chart-controls label.chart-chk { flex-direction: row; align-items: center; gap: 0.4rem; }
.chart-chk input { width: auto; padding: 0; }
.chart-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.4rem; }
.chart-actions button { font-size: 0.74rem; padding: 0.3rem 0.65rem; }
.chart-tip { margin: 0 0 0.6rem !important; font-size: 0.74rem !important; }
#result-chart { width: 100%; height: 340px; display: block; touch-action: none; }
#chart-zoom-capture { cursor: crosshair; }
.zoom-sel { fill: var(--accent); fill-opacity: 0.12; stroke: var(--accent); stroke-opacity: 0.5; stroke-dasharray: 3 2; }
.bar-label, .axis-label { font-family: var(--sans); font-variant-numeric: tabular-nums; font-size: 0.66rem; fill: var(--text); }
.axis-label.muted { fill: var(--muted); }
.axis-title { font-family: var(--sans); font-size: 0.72rem; fill: var(--muted); }
.data-label {
  font-family: var(--sans);
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
  fill: var(--text);
  paint-order: stroke;
  stroke: var(--surface);
  stroke-width: 3px;
  stroke-linejoin: round;
  text-anchor: middle;
}

/* ---- historial de consultas ---- */
.history { margin-top: 1.4rem; }
.history-head { display: flex; align-items: center; gap: 0.75rem; }
.history-head h3 { margin: 0; }
.history-list { display: flex; flex-direction: column; gap: 0.35rem; margin-top: 0.65rem; }
.history-item {
  font-family: var(--mono);
  font-size: 0.74rem;
  text-align: left;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color var(--t), border-color var(--t);
}
.history-item:hover { color: var(--text); border-color: var(--accent); }

/* ---- matriz de correlación ---- */
#corr-wrap { margin-top: 0.4rem; }
#corr-table tbody th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  font-size: var(--fs-xs);
  position: sticky;
  left: 0;
}

/* ---- panel explicativo ---- */
details.explain {
  margin-top: 1.4rem;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: var(--surface-2);
  padding: 0.7rem 0.95rem;
}
details.explain summary { cursor: pointer; font-family: var(--sans); font-weight: 500; color: var(--accent); font-size: var(--fs-sm); }
details.explain pre {
  font-family: var(--mono);
  font-size: 0.8rem;
  white-space: pre-wrap;
  margin: 0.7rem 0 0;
  color: var(--text);
}

/* "Combinar por pasos" plegado dentro de la pestaña Consulta SQL (modo avanzado) */
.combine[open] { padding-bottom: 0.95rem; }
.combine .hint { margin: 0.75rem 0 0; }
.combine .templates { margin-top: 0.85rem; }
.combine .cte-list { margin-top: 0.85rem; }
.combine .sql-actions { margin-top: 0.9rem; }

/* ---- glosario ---- */
.glos { padding-top: 0.5rem; }
/* el contenedor sigue a 960px (alineado con la cabecera); el texto se acota a ~46rem */
.glos > .callout, .glos section { max-width: 46rem; }
.glos > .callout { margin-top: 0; }
.glos section { margin-bottom: 2.5rem; }
.glos h2 {
  font-family: var(--sans);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-strong);
}
.glos dl { margin: 0; }
.glos dt {
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  margin-top: 1.15rem;
}
.glos dt:first-child { margin-top: 0; }
.glos dt code { color: inherit; font-size: 0.95em; }
.glos dd {
  margin: 0.3rem 0 0;
  max-width: 68ch;
  color: var(--text);
}
.glos dd code {
  background: var(--surface-2);
  padding: 0.05rem 0.3rem;
  border: 1px solid var(--border);
  border-radius: 3px;
}

/* ---- pie ---- */
.site-footer {
  max-width: var(--ancho-reporte);
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--sans);
  font-size: var(--fs-sm);
}
.site-footer a { color: var(--muted); text-decoration-color: var(--border); }
.site-footer a:hover { color: var(--accent); }

[hidden] { display: none !important; }

.site-header .firma { margin: 0.35rem 0 0; font-size: var(--fs-sm); color: var(--muted); }
.site-header .firma a { color: var(--muted); }
.portafolio { margin-bottom: var(--sp-4); }
.portafolio-titulo { margin: 0 0 var(--sp-2); color: var(--text); }

