/* Créditos — estilos del componente compartido (creditos.js). Copia idéntica en los 3 portales.
 * Toma los colores de la página (--card, --text, --mute/--muted, --line, --brand) y cae a un
 * tema propio claro/oscuro si no existen. data-theme="light|dark" en <html> los fuerza. */
.cr-chip, .cr-panel, .cr-backdrop {
  --cr-bg: var(--card, #ffffff);
  --cr-fg: var(--text, #1b2230);
  --cr-muted: var(--mute, var(--muted, #5a6475));
  --cr-line: var(--line, rgba(20, 28, 45, .14));
  --cr-soft: var(--raised, rgba(20, 28, 45, .05));
  --cr-brand: var(--brand, #0c6fd6);
  --cr-brand-fg: #ffffff;
  --cr-shadow: 0 10px 34px rgba(8, 14, 30, .28);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cr-chip, :root:not([data-theme="light"]) .cr-panel, :root:not([data-theme="light"]) .cr-backdrop {
    --cr-bg: var(--card, #0e1420); --cr-fg: var(--text, #f1f3fa); --cr-muted: var(--mute, var(--muted, #98a0b8));
    --cr-line: var(--line, rgba(255, 255, 255, .12)); --cr-soft: var(--raised, rgba(255, 255, 255, .06));
    --cr-brand: var(--brand-text, #59a6f5); --cr-brand-fg: #04101f;
  }
}
[data-theme="light"] .cr-chip, .cr-panel[data-theme="light"], .cr-backdrop[data-theme="light"] {
  --cr-bg: #ffffff; --cr-fg: #1b2230; --cr-muted: #5a6475; --cr-line: rgba(20, 28, 45, .14);
  --cr-soft: rgba(20, 28, 45, .05); --cr-brand: #0c6fd6; --cr-brand-fg: #ffffff;
}
[data-theme="dark"] .cr-chip, .cr-panel[data-theme="dark"], .cr-backdrop[data-theme="dark"] {
  --cr-bg: #0e1420; --cr-fg: #f1f3fa; --cr-muted: #98a0b8; --cr-line: rgba(255, 255, 255, .14);
  --cr-soft: rgba(255, 255, 255, .06); --cr-brand: #59a6f5; --cr-brand-fg: #04101f;
}

.cr-chip {
  display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; padding: 0 .85rem;
  border: 1px solid var(--cr-line); border-radius: 999px; background: var(--cr-soft); color: var(--cr-fg);
  font: 600 .85rem/1 var(--font, system-ui, -apple-system, 'Segoe UI', sans-serif); cursor: pointer;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cr-chip:hover { border-color: var(--cr-brand); }
.cr-chip:focus-visible, .cr-x:focus-visible, .cr-btn:focus-visible, .cr-eq summary:focus-visible, .cr-title:focus-visible {
  outline: 2px solid var(--cr-brand); outline-offset: 2px;
}
.cr-chip--cell { min-height: 0; padding: .2rem .55rem; font-size: inherit; font-weight: 600; background: transparent; border-style: dashed; }
.cr-dot { width: .7rem; height: .7rem; border-radius: 50%; background: conic-gradient(var(--cr-brand) 0 62%, var(--cr-line) 0); flex: none; }

.cr-panel {
  position: absolute; z-index: 2147483000; box-sizing: border-box; max-height: min(78vh, 640px); overflow: auto;
  background: var(--cr-bg); color: var(--cr-fg); border: 1px solid var(--cr-line); border-radius: 14px;
  box-shadow: var(--cr-shadow); padding: 1rem 1.05rem 1.1rem;
  font: 400 .88rem/1.45 var(--font, system-ui, -apple-system, 'Segoe UI', sans-serif); text-align: left;
}
.cr-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: 100%; max-height: 86vh; border-radius: 18px 18px 0 0;
  padding-bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px)); animation: cr-up .22s ease-out;
}
.cr-backdrop { position: fixed; inset: 0; z-index: 2146999999; background: rgba(5, 8, 16, .55); }
@keyframes cr-up { from { transform: translateY(24px); opacity: .4; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cr-sheet { animation: none; } }

.cr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.cr-title { margin: 0; font: 700 1.02rem/1.25 var(--font-display, var(--font, system-ui, sans-serif)); }
.cr-x { flex: none; min-width: 44px; min-height: 44px; margin: -.55rem -.6rem 0 0; border: 0; background: transparent; color: var(--cr-muted); font-size: 1.5rem; line-height: 1; cursor: pointer; border-radius: 10px; }
.cr-x:hover { color: var(--cr-fg); }
.cr-sub { margin: .1rem 0 .6rem; color: var(--cr-muted); }
.cr-h3 { margin: 1rem 0 .3rem; font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; color: var(--cr-muted); }
.cr-table { width: 100%; border-collapse: collapse; margin: .35rem 0 .2rem; font-variant-numeric: tabular-nums; }
.cr-table th, .cr-table td { padding: .32rem .3rem; border-bottom: 1px solid var(--cr-line); text-align: right; font-weight: 400; vertical-align: baseline; }
.cr-table thead th { color: var(--cr-muted); font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.cr-table th:first-child, .cr-table td:first-child { text-align: left; }
.cr-table tbody th[scope="row"] { font-weight: 500; }
.cr-table tr:last-child th, .cr-table tr:last-child td { border-bottom: 0; }
.cr-unit { color: var(--cr-muted); font-size: .76rem; }
.cr-bar { height: 8px; border-radius: 999px; background: var(--cr-soft); border: 1px solid var(--cr-line); overflow: hidden; margin: .65rem 0 .25rem; }
.cr-bar > span { display: block; height: 100%; background: var(--cr-brand); border-radius: 999px; }
.cr-meta, .cr-note { margin: .35rem 0 0; color: var(--cr-muted); font-size: .78rem; }
.cr-eq { margin-top: .8rem; }
.cr-eq summary { cursor: pointer; min-height: 32px; font-weight: 600; color: var(--cr-brand); }
.cr-actions { margin-top: .9rem; }
.cr-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 1rem; border-radius: 10px; background: var(--cr-brand); color: var(--cr-brand-fg); font-weight: 700; text-decoration: none; }
.cr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
