/* ==========================================================================
   Spaces — aspecto general («secretaría académica»)

   Una herramienta de trabajo para academias: elegante por la tipografía y
   la contención, no por los adornos.

   - Letra: Source Serif 4 para títulos y cifras (el tono de un expediente
     o de un acta) y Source Sans 3 para toda la interfaz (legible a cualquier
     tamaño, con cifras tabulares).
   - Color: papel gris azulado, superficies blancas, tinta azul marino como
     color de acción y un único latón para marcar «dónde estás» (pestaña
     activa, foco). Rojo, verde y ámbar solo para estados.
   - Forma: bordes finos en lugar de sombras (la sombra queda para lo que
     flota: menús, diálogos, avisos), radios pequeños y jerárquicos (6 en
     controles, 10 en paneles).

   Se carga la última; en la página del alumno, antes de los temas, para que
   cada tema siga mandando.
   ========================================================================== */

@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('fuentes/source-sans-3-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('fuentes/bricolage-grotesque-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url('fuentes/dm-sans-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('fuentes/source-serif-4-latin-wght-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url('fuentes/source-serif-4-latin-wght-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Lexend';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fuentes/lexend-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Inter: la letra de la interfaz (marca Cademico) y de algunos temas del alumno. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Marca Cademico: papel «niebla», tinta azul pizarra y el azul de Spaces. */
  --bg: #f3f9fa;
  --bg-soft: #f7fbfc;
  --surface: #ffffff;
  --surface-2: #eef5f7;
  --surface-3: #dce9ed;
  --border: #dce9ed;
  --border-strong: #c9dce2;
  --text: #34465e;
  --text-soft: #46586f;
  --muted: #5e6e84;
  /* Enlaces y lo seleccionado: el azul de Spaces (#3F7FD9) un punto más
     hondo para leerse bien sobre blanco. */
  --primary: #2f6bc4;
  --primary-hover: #2559a6;
  --primary-soft: rgba(63, 127, 217, 0.1);
  --primary-border: rgba(63, 127, 217, 0.3);
  /* «Dónde estás» (pestaña abierta, foco): el azul de Spaces. */
  --laton: #3f7fd9;
  --laton-soft: rgba(63, 127, 217, 0.14);
  /* Estados. */
  --danger: #b3261e;
  --danger-soft: #fdecec;
  --warn: #8f5600;
  --warn-soft: #fdf6e8;
  --warn-border: #f0d9a8;
  --ok: #1f6b4d;
  --ok-soft: #e3f6ee;
  --info: #2f6bc4;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 20px;
  /* Acción principal: el azul de Spaces con texto blanco. En las páginas con
     la marca de una academia pasa a su color. */
  --cta: #3570c8;
  --cta-hover: #2b60b0;
  --on-cta: #fff;
  --shadow-sm: none;
  --shadow: 0 18px 40px -16px rgba(38, 53, 74, 0.28), 0 2px 6px rgba(38, 53, 74, 0.06);
  --ring: 0 0 0 3px rgba(63, 127, 217, 0.2);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  /* Títulos y el nombre: Lexend, semi negrita. */
  --display: 'Lexend', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --topbar-h: 64px;
}

html[data-theme='dark'] {
  --bg: #17212f;
  --bg-soft: #1b2636;
  --surface: #1f2b3c;
  --surface-2: #253346;
  --surface-3: #2e3e54;
  --border: #314259;
  --border-strong: #3e5170;
  --text: #e8eef4;
  --text-soft: #c2cdd9;
  --muted: #95a4b7;
  --primary: #8cb6f0;
  --primary-hover: #a8c8f4;
  --primary-soft: rgba(140, 182, 240, 0.12);
  --primary-border: rgba(140, 182, 240, 0.32);
  --laton: #6fa1e8;
  --laton-soft: rgba(111, 161, 232, 0.16);
  --danger: #f2877f;
  --danger-soft: rgba(242, 135, 127, 0.1);
  --warn: #f0be62;
  --warn-soft: rgba(240, 190, 98, 0.08);
  --warn-border: rgba(240, 190, 98, 0.28);
  --ok: #6fcf9c;
  --ok-soft: rgba(111, 207, 156, 0.1);
  --cta: #3f7fd9;
  --cta-hover: #5690e2;
  --on-cta: #fff;
  --shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.7);
  --ring: 0 0 0 3px rgba(140, 182, 240, 0.22);
}

body {
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.012em;
  font-optical-sizing: auto;
}
h4 {
  font-weight: 650;
  letter-spacing: 0;
}

::selection {
  background: var(--laton-soft);
}

:focus-visible {
  outline: 2px solid var(--laton);
  outline-offset: 2px;
}

a {
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

/* ------------------------------ barra superior ------------------------------ */

/* Membrete: una franja fina de tinta arriba y la barra en blanco. */
.topbar {
  height: var(--topbar-h);
  padding: 0 28px;
  background: var(--surface);
  border-top: 3px solid var(--primary);
  border-bottom: 1px solid var(--border);
  backdrop-filter: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: inset 0 0 0 2px var(--surface), 0 0 0 1px var(--primary);
}
.brand-mark svg {
  width: 16px;
  height: 16px;
}
.brand-text strong {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.brand-text small {
  font-size: 12.5px;
  color: var(--muted);
}
.topbar-right {
  gap: 2px;
}
.topbar-right .button:not(.button-primary) {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--text-soft);
}
.topbar-right .button:not(.button-primary):hover {
  background: var(--surface-2);
  color: var(--text);
}
.topbar-right .button-primary {
  margin-left: 8px;
}
.topbar-right .muted,
#who {
  margin-right: 8px;
  color: var(--muted);
  font-size: 14px;
}

/* --------------------------------- botones --------------------------------- */

.button {
  gap: 6px;
  min-height: 36px;
  padding: 7px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.25;
  box-shadow: none;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}
.button:hover {
  background: var(--bg-soft);
  border-color: var(--muted);
}
.button:active {
  transform: none;
  background: var(--surface-2);
}
.button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--laton);
}
.button:disabled,
.button[disabled] {
  opacity: 0.55;
}
.button-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}
.button-primary:hover {
  border-color: var(--primary-hover);
  background: var(--primary-hover);
  color: #fff;
}
.button-primary:active {
  background: var(--primary-hover);
}
html[data-theme='dark'] .button-primary,
html[data-theme='dark'] .button-primary:hover {
  color: #0e131b;
}
.button-ghost {
  border-color: transparent;
  background: transparent;
}
.button-ghost:hover {
  background: var(--surface-2);
  border-color: transparent;
}
.button-danger-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--danger);
}
.button-danger-ghost:hover {
  border-color: transparent;
  background: var(--danger-soft);
  color: var(--danger);
}
.button-small {
  min-height: 30px;
  padding: 4px 11px;
  border-radius: var(--radius);
  font-size: 13.5px;
}

/* Las filas de actividades llevan muchas acciones: discretas hasta que se usan. */
.activity-actions .button,
.cell-actions .button,
.campo-actions .button {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}
.activity-actions .button:hover,
.cell-actions .button:hover,
.campo-actions .button:hover {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}
.activity-item:hover .activity-actions .button,
.data-table tbody tr:hover .cell-actions .button {
  color: var(--text-soft);
}
.activity-actions .button-danger-ghost,
.cell-actions .button-danger-ghost {
  color: var(--danger);
}

.link-button {
  font-family: var(--font);
}

/* --------------------------------- paneles --------------------------------- */

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
}
.panel-head {
  min-height: 58px;
  padding: 14px 22px;
}
.panel-head h2,
.panel-head h3 {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.panel-head .form-text,
.form-text {
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}
.panel-actions {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}
.panel-footnote,
.panel-note {
  color: var(--muted);
}

/* Cifras: una sola tira con separadores, como la cabecera de un acta
   (no seis tarjetas sueltas). */
.summary-cards {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
/* Separadores que valen en cualquier reparto de filas: cada cifra dibuja una
   línea a su izquierda y encima (sobre la vecina); el marco recorta las del
   borde. */
.summary-cards > .card {
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: -1px -1px 0 var(--border);
}
.card {
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
}
.card-label {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.card-value {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.015em;
  font-variant-numeric: lining-nums tabular-nums;
}
.card-value.is-small {
  font-size: 18px;
}
.card-hint {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

/* --------------------------------- insignias --------------------------------- */

.badge {
  padding: 1px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.badge-primary {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary);
}
.badge-ok,
.badge-success {
  border-color: color-mix(in srgb, var(--ok) 26%, transparent);
  background: var(--ok-soft);
  color: var(--ok);
}
.badge-warn {
  border-color: var(--warn-border);
  background: var(--warn-soft);
  color: var(--warn);
}
.tab-count {
  min-width: 20px;
  padding: 0 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.tab-count.is-alerta,
.tab-count.is-pending {
  background: var(--danger);
  color: #fff;
}

/* ---------------------------------- avisos ---------------------------------- */

.alert {
  border-radius: var(--radius);
  border-left-width: 3px;
  font-size: 14.5px;
  box-shadow: none;
}
.alert-warn strong {
  color: color-mix(in srgb, var(--warn) 85%, #000);
}
html[data-theme='dark'] .alert-warn strong {
  color: var(--warn);
}

/* En qué papel se ha entrado: una línea, no un cartel. */
.rol-banner {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--laton);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
  font-size: 14px;
}

/* -------------------------------- formularios -------------------------------- */

.field > span {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}
.field input[type='text'],
.field input[type='email'],
.field input[type='password'],
.field input[type='number'],
.field input[type='url'],
.field input[type='tel'],
.field input[type='datetime-local'],
.field input[type='date'],
.field input[type='search'],
.field select,
.field textarea,
.select-input,
.panel-tools input[type='search'],
.course-search {
  padding: 8px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: none;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
.field input::placeholder,
.field textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 80%, transparent);
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.select-input:focus,
.panel-tools input[type='search']:focus,
.course-search:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: var(--ring);
}
.field input[type='file'] {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.field-hint {
  color: var(--muted);
  font-size: 13px;
}
.form-section h4 {
  color: var(--text);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.005em;
  text-transform: none;
}
.switch input {
  border-color: var(--border-strong);
  background: var(--surface-3);
}
.switch input:checked {
  border-color: var(--primary);
  background: var(--primary);
}

/* ---------------------------------- tablas ---------------------------------- */

.data-table {
  font-size: 14.5px;
}
.data-table thead th {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.data-table td {
  padding: 11px 16px;
  border-top: 1px solid var(--border);
}
.data-table tbody tr:hover td {
  background: var(--bg-soft);
}

/* ---------------------------------- pestañas ---------------------------------- */

/* Navegación de apartados (Mi cuenta, Mis cursos, superadmin…): texto con
   subrayado; el apartado abierto, en tinta con la marca de latón. */
.tabs {
  gap: 0 4px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
}
.tab {
  position: relative;
  margin-bottom: -1px;
  padding: 9px 12px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: none;
}
.tab:hover {
  background: transparent;
  color: var(--text);
}
.tab[aria-selected='true'] {
  border-bottom-color: var(--laton);
  background: transparent;
  color: var(--text);
  box-shadow: none;
}
.tab .tab-icon {
  opacity: 0.8;
}
.tab[aria-selected='true'] .tab-icon {
  color: var(--primary);
  opacity: 1;
}

/* Secciones del curso. */
.curso-grupos {
  gap: 2px;
  margin-left: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.curso-grupos::-webkit-scrollbar {
  display: none;
}
.curso-grupos .tab {
  padding: 11px 13px 12px;
  font-size: 15px;
}
/* Apartados del grupo: texto pequeño; el abierto, con fondo de papel. */
.subtabs {
  gap: 2px;
  margin-top: 14px;
  padding: 0;
  border-bottom: 0;
}
.subtab {
  margin-bottom: 0;
  padding: 5px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.subtab:hover {
  background: var(--surface-2);
  color: var(--text);
}
.subtab[aria-selected='true'] {
  border-color: var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}
.subtab[aria-selected='true'] .tab-icon {
  color: var(--primary);
}
.subtab[aria-selected='true']::after {
  display: none;
}

/* Chips de filtro (temas, motivos de riesgo…). */
.temas-chip {
  border-radius: var(--radius);
  font-weight: 600;
}
.temas-chip.is-activo {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

/* ------------------------------ cabecera del curso ------------------------------ */

.course-title {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.course-back {
  margin-left: -10px;
  color: var(--muted);
}
.results-head h1,
.results-head h2 {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.results-head p,
.results-head .muted {
  color: var(--muted);
}

/* ------------------------------ estados vacíos ------------------------------ */

.empty-art {
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--primary);
  box-shadow: none;
}

/* ---------------------------- tarjetas de curso ---------------------------- */

.course-card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.course-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
}
.course-card-title {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.course-card dt,
.course-card .course-meta dt,
.course-meta dt,
.course-stat-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

/* ---------------------------------- portada ---------------------------------- */

.hub-hero {
  max-width: 760px;
  text-align: left;
}
.hub-hero h1 {
  font-family: var(--display);
  font-size: clamp(36px, 5.2vw, 58px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.04;
}
.hub-hero p {
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.55;
}
.hub-card-title {
  font-family: var(--display);
}

/* ------------------------------ modales y avisos ------------------------------ */

.modal,
dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.modal h2,
.modal h3 {
  font-family: var(--display);
}
.toast {
  border-radius: var(--radius);
  border-left: 3px solid var(--primary);
  box-shadow: var(--shadow);
  font-size: 14.5px;
}
.toast.is-error {
  border-left-color: var(--danger);
}

/* Selectores dentro de una tabla: a la altura de la fila. */
.data-table select,
.data-table .select-input {
  padding: 4px 8px;
  font-size: 14px;
  box-shadow: none;
}

/* Móvil: la barra superior se reparte en dos líneas. */
@media (max-width: 860px) {
  .topbar {
    height: auto;
    min-height: var(--topbar-h);
    padding: 8px 16px;
  }
  .curso-grupos .tab,
  .tabs .tab {
    flex: 0 0 auto;
  }
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .course-title,
  .results-head h1,
  .results-head h2 {
    font-size: 25px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation-duration: 0.01ms !important;
  }
}

/* ===================== ajustes por pantalla ===================== */

/* Portada: título a la izquierda, alineado con las dos tarjetas. */
.hub-hero {
  max-width: 900px;
  margin: 24px auto 40px;
  text-align: left;
}
.hub-hero h1 {
  margin-bottom: 16px;
}
.hub-hero p {
  max-width: 62ch;
}
.hub-hero .muted {
  color: var(--muted);
  font-size: 16px;
}
.hub-card {
  padding: 22px 24px;
}

/* Tarjetas con portada: la imagen llega a los bordes. */
.course-card {
  padding-left: 18px;
  padding-right: 18px;
}
.course-card-cover {
  border-bottom: 1px solid var(--border);
}

/* Página del alumno: los accesos (guía, mensajes, calendario…) como
   botones de papel con el icono en tinta. */
.curso-atajos {
  gap: 8px;
  padding: 10px;
}
.curso-atajo {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 14px;
}
.curso-atajo:hover {
  border-color: var(--primary-border);
  background: var(--primary-soft);
  color: var(--primary);
}
.curso-resumen-nota-etiqueta {
  font-size: 13px;
  letter-spacing: 0;
  text-transform: none;
}
.curso-actividad-titulo {
  font-size: 15.5px;
}
.curso-actividad-icono {
  border-radius: 50%;
  background: var(--surface);
}
@media (max-width: 520px) {
  .curso-actividad-flecha {
    display: none;
  }
}

/* Páginas de venta (curso, programa, suscripción, canje). */
.buy-kicker {
  color: var(--laton);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}
.buy-info h1,
.canjear-caja h1,
.prog-avance h1 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.buy-price {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
}
/* Los datos del curso, en una sola tira con separadores. */
.buy-facts {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.buy-facts li {
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: -1px -1px 0 var(--border);
}
.buy-facts span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.buy-block h2 {
  font-family: var(--display);
}

html[data-theme='dark'] .brand-mark {
  color: #0e131b;
}
.pasos,
.embudo {
  padding-top: 14px;
}

/* ==========================================================================
   Barra superior: la versión oscura de la marca Cademico (#26354A), con el
   símbolo de Spaces, el nombre en Lexend y las acciones en gris claro; la
   principal, en el azul de Spaces. Igual en claro y en oscuro.
   ========================================================================== */
:root {
  --tb-bg: #26354a;
  --tb-borde: #26354a;
  --tb-texto: #ffffff;
  --tb-suave: #a9b7c8;
  --tb-hover: rgba(255, 255, 255, 0.08);
  --tb-laton: #3f7fd9;
  --tb-laton-hover: #5690e2;
  --tb-sobre-laton: #ffffff;
}
html[data-theme='dark'] {
  --tb-bg: #121b28;
  --tb-borde: #26354a;
}
.topbar {
  height: var(--topbar-h);
  background: var(--tb-bg);
  color: var(--tb-texto);
  border-top: 0;
  border-bottom: 1px solid var(--tb-borde);
  backdrop-filter: none;
  color-scheme: dark;
}
/* El símbolo de Spaces: círculo claro, formas translúcidas y la S blanca. */
.brand-mark,
.topbar .brand-mark,
html[data-theme='dark'] .brand-mark,
html[data-theme='dark'] .topbar .brand-mark {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: none;
}
.brand-mark svg,
.topbar .brand-mark svg {
  width: 100%;
  height: 100%;
}
.topbar .sa-mark {
  background: transparent;
}
.topbar .brand,
.topbar .brand-link {
  gap: 10px;
}
.topbar .brand-text strong {
  color: var(--tb-texto);
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.topbar .brand-text small {
  color: var(--tb-suave);
  font-size: 12px;
}
.topbar .brand-link:hover .brand-text strong,
.topbar .brand-link:focus-visible .brand-text strong {
  color: #d3e4fa;
}
.topbar .brand-link:focus-visible {
  outline-color: var(--tb-laton);
}
/* Logotipo de una academia: sobre blanco, para que se lea en la barra oscura. */
.topbar .brand-logo,
.topbar .buy-logo {
  padding: 3px 6px;
  border: 0;
  border-radius: 8px;
  background: #fff;
}
.topbar .muted,
.topbar #who {
  color: var(--tb-suave);
}
.topbar .button:not(.button-primary),
.topbar .icon-button {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--tb-suave);
}
.topbar .button:not(.button-primary):hover,
.topbar .icon-button:hover {
  border-color: transparent;
  background: var(--tb-hover);
  color: #fff;
}
.topbar .button svg {
  color: currentColor;
}
.topbar .button-primary {
  border-color: var(--tb-laton);
  border-radius: 10px;
  background: var(--tb-laton);
  color: var(--tb-sobre-laton);
  font-weight: 650;
}
.topbar .button-primary:hover {
  border-color: var(--tb-laton-hover);
  background: var(--tb-laton-hover);
  color: var(--tb-sobre-laton);
}
/* La acción propia de la página (volver al panel, ir al showroom…): en latón,
   como el enlace activo de Connectors. */
.topbar .button-panel,
.topbar .topbar-demo,
.topbar .comprar-showroom {
  color: var(--tb-laton);
}
.topbar .button:focus-visible,
.topbar .icon-button:focus-visible {
  outline: 2px solid var(--tb-laton);
  outline-offset: 2px;
}
@media (max-width: 860px) {
  .topbar {
    height: auto;
    min-height: var(--topbar-h);
  }
  .topbar .brand-text strong {
    font-size: 18px;
  }
}
.topbar a.button,
.topbar a.button:hover {
  text-decoration: none;
}

/* ==========================================================================
   Estilo Cademico: títulos en Lexend semi negrita, interfaz en Inter,
   botones en píldora con la acción principal en el azul de Spaces,
   tarjetas de 20 px con borde fino y etiquetas en píldora.
   ========================================================================== */
h1,
h2,
h3,
h4,
.form-section h4,
.panel-head h2,
.panel-head h3,
.modal h2,
.modal h3,
.buy-block h2,
.course-title,
.results-head h1,
.results-head h2,
.hub-hero h1,
.buy-info h1,
.canjear-caja h1,
.prog-avance h1,
.course-card-title,
.hub-card-title,
.card-value,
.buy-price {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
}
h4,
.form-section h4 {
  font-weight: 500;
  letter-spacing: -0.01em;
}
.card-value,
.buy-price {
  font-weight: 500;
}

/* Botones en píldora, como en la web de Cademico. */
.button {
  border-radius: 999px;
  font-weight: 600;
}
.topbar .button-primary {
  border-radius: 999px;
}
.button-primary,
html[data-theme='dark'] .button-primary {
  border-color: var(--cta);
  background: var(--cta);
  color: var(--on-cta);
}
.button-primary:hover,
.button-primary:active,
html[data-theme='dark'] .button-primary:hover {
  border-color: var(--cta-hover);
  background: var(--cta-hover);
  color: var(--on-cta);
}

/* Con la marca de una academia, la acción principal va en su color. */
html.con-marca {
  --cta: var(--primary);
  --cta-hover: color-mix(in srgb, var(--primary) 86%, #000);
  --on-cta: #fff;
}

/* Etiquetas en píldora */
.badge,
.tab-count {
  border-radius: 999px;
}
.badge {
  padding: 2px 10px;
}

/* Tarjetas y paneles: blancas, borde fino, 20 px */
.panel,
.card,
.modal,
.course-card,
.hub-card {
  border-radius: var(--radius-lg);
}
.summary-cards > .card {
  border-radius: 0;
}

/* Showroom: la misma barra de tinta, de lado a lado (embebido en otra web
   no: allí manda la página que lo acoge). */
html:not(.sr-embebido) .sr-bar {
  min-height: var(--topbar-h);
  padding-top: 12px;
  padding-bottom: 12px;
  margin-bottom: 8px;
  background: var(--tb-bg);
  color: var(--tb-texto);
  box-shadow: 0 0 0 100vmax var(--tb-bg);
  clip-path: inset(0 -100vmax);
  color-scheme: dark;
}
html:not(.sr-embebido) .sr-marca {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
html:not(.sr-embebido) .sr-marca-signo {
  border-radius: 8px;
  box-shadow: none;
}
/* El showroom de la plataforma lleva el símbolo de Spaces tal cual. */
html:not(.sr-embebido) .sr-marca:not(.is-anfitrion) .sr-marca-signo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
}
html:not(.sr-embebido) .sr-marca:not(.is-anfitrion) .sr-marca-signo svg {
  width: 100%;
  height: 100%;
}
html:not(.sr-embebido) .sr-marca-lema {
  color: var(--tb-suave);
  font-family: var(--font);
  letter-spacing: 0;
}
html:not(.sr-embebido) .sr-marca-logo {
  padding: 3px 6px;
  border-radius: 8px;
  background: #fff;
}
html:not(.sr-embebido) .sr-entrar {
  color: var(--tb-suave);
  text-decoration: none;
}
html:not(.sr-embebido) .sr-entrar:hover {
  color: #fff;
}
