:root {
  --bg: #0b1220;
  --panel: rgba(255, 255, 255, 0.06);
  --panel2: rgba(255, 255, 255, 0.09);
  --text: rgba(255, 255, 255, 0.92);
  --muted: rgba(255, 255, 255, 0.62);
  --border: rgba(255, 255, 255, 0.1);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
  --radius: 16px;

  --primary: #5ea3ff;
  --primary2: #2f7dff;

  --ok: #44d38a;
  --warn: #ffcc66;

  --maxw: 1100px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
    sans-serif;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --panel: rgba(0, 0, 0, 0.04);
  --panel2: rgba(0, 0, 0, 0.06);
  --text: rgba(0, 0, 0, 0.88);
  --muted: rgba(0, 0, 0, 0.58);
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.12);

  --primary: #1f67ff;
  --primary2: #004cff;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  background: radial-gradient(
      1200px 700px at 20% -10%,
      rgba(94, 163, 255, 0.1),
      transparent 60%
    ),
    radial-gradient(
      900px 600px at 90% 10%,
      rgba(68, 211, 138, 0.1),
      transparent 55%
    ),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 26px 18px 70px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35),
    rgba(0, 0, 0, 0.1)
  );
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
[data-theme="light"] .topbar {
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.8),
    rgba(255, 255, 255, 0.55)
  );
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  color: white;
  box-shadow: var(--shadow);
}
.brand__title {
  font-weight: 700;
  letter-spacing: -0.2px;
}
.brand__sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 10px 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 120ms ease, background 120ms ease,
    border-color 120ms ease;
}
.btn:hover {
  transform: translateY(-1px);
  background: var(--panel2);
  border-color: rgba(255, 255, 255, 0.16);
}
.btn:active {
  transform: translateY(0px);
}
.btn--primary {
  border: none;
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  color: white;
}
.btn--ghost {
  background: transparent;
}

.icon {
  opacity: 0.9;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
}
.lang__btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 12px;
  cursor: pointer;
}
.lang__btn.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}
[data-theme="light"] .lang__btn.is-active {
  background: rgba(0, 0, 0, 0.06);
}

.footer {
  border-top: 1px solid var(--border);
  padding: 16px;
  background: rgba(0, 0, 0, 0.15);
}
[data-theme="light"] .footer {
  background: rgba(255, 255, 255, 0.65);
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  flex-wrap: wrap;
}
.footer__sep {
  opacity: 0.5;
}

.link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
}
[data-theme="light"] .link {
  border-bottom-color: rgba(0, 0, 0, 0.25);
}

/* Layout blocks */
.hero {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--panel2), var(--panel));
  box-shadow: var(--shadow);
}
.hero__title {
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.4px;
  margin: 0 0 8px 0;
}
.hero__subtitle {
  margin: 0;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 14px;
}
.grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .grid--3 {
    grid-template-columns: 1fr;
  }
  .grid--2 {
    grid-template-columns: 1fr;
  }
}

.card {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
}
.card--click {
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease,
    border-color 120ms ease;
}
.card--click:hover {
  transform: translateY(-2px);
  background: var(--panel2);
  border-color: rgba(255, 255, 255, 0.16);
}

.sectionTitle {
  font-size: 14px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 22px 0 10px;
}

.levelBadge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.levelDot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--primary);
}

.kpiRow {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.notice {
  display: grid;
  gap: 14px;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
}
@media (max-width: 900px) {
  .notice {
    grid-template-columns: 1fr;
  }
}
.notice__box {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(
    180deg,
    rgba(255, 204, 102, 0.14),
    rgba(255, 255, 255, 0.04)
  );
  border-radius: var(--radius);
  padding: 16px;
}
[data-theme="light"] .notice__box {
  border-color: rgba(0, 0, 0, 0.1);
}
.notice__title {
  margin: 0 0 6px;
  font-weight: 800;
}
.notice__text {
  margin: 0;
  color: var(--muted);
}

.trainers {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .trainers {
    grid-template-columns: 1fr;
  }
}
.trainerCard {
  display: flex;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.2);
}
.trainerCard img {
  width: auto;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
}
.trainerCard__name {
  font-weight: 800;
  margin: 0;
}
.trainerCard__meta {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.bigCta {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  justify-content: center;
}

.list {
  display: grid;
  gap: 10px;
}
.testRow {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
}
.testRow__left {
  min-width: 0;
}
.testRow__title {
  margin: 0;
  font-weight: 800;
}
.testRow__sub {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
}
.pill--ok {
  color: var(--ok);
}
.pill--warn {
  color: var(--warn);
}
.quizTop {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 10px 0 14px;
}
.quizTitle {
  font-weight: 900;
  font-size: 18px;
}
.quizProgress {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.qCard {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius);
  padding: 16px;
}
.qText {
  font-weight: 800;
  font-size: 16px;
  margin-bottom: 12px;
}
.optList {
  display: grid;
  gap: 10px;
}

.opt {
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 12px;
  cursor: pointer;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  transition: transform 120ms ease, background 120ms ease,
    border-color 120ms ease;
}
.opt:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
}
.opt__marker {
  width: 22px;
  opacity: 0.9;
}
.opt__text {
  flex: 1;
}

.opt--selected {
  border-color: rgba(94, 163, 255, 0.6);
}
.opt--correct {
  border-color: rgba(68, 211, 138, 0.7);
  background: rgba(68, 211, 138, 0.1);
}
.opt--wrong {
  border-color: rgba(255, 120, 120, 0.7);
  background: rgba(255, 120, 120, 0.1);
}

.quizActions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.hint {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.fb {
  margin-top: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
}
.fb--ok {
  border-color: rgba(68, 211, 138, 0.65);
  background: rgba(68, 211, 138, 0.08);
}
.fb--bad {
  border-color: rgba(255, 120, 120, 0.65);
  background: rgba(255, 120, 120, 0.08);
}
.fb__title {
  font-weight: 900;
  margin-bottom: 6px;
}
.fb__text {
  color: var(--muted);
}

.resultRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.resultNum {
  font-size: 36px;
  font-weight: 1000;
  letter-spacing: -1px;
}
.resultSub {
  color: var(--muted);
}
.brand--link {
  text-decoration: none;
  color: inherit;
}

.brand__logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.ctaLink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;

  padding: 8px 10px;
  border-radius: 12px;

  text-decoration: none;
  font-weight: 800;
  font-size: 13px;

  color: white;
  background: linear-gradient(135deg, var(--primary2), var(--primary));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);

  transition: transform 120ms ease, filter 120ms ease;
}

.ctaLink:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}

.ctaLink:active {
  transform: translateY(0px);
}

.ctaLink__icon {
  opacity: 0.95;
  font-weight: 900;
}
.footerLSV {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 6px 6px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 1fr;
  gap: 14px;
  align-items: center;
}

@media (max-width: 900px) {
  .footerLSV {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

.footerLSV__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 900px) {
  .footerLSV__brand {
    justify-content: center;
    flex-direction: column;
  }
}

.footerLSV__logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.footerLSV__title {
  font-weight: 900;
  letter-spacing: -0.2px;
}

.footerLSV__sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.footerLSV__links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.footerLSV__link {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
}

[data-theme="light"] .footerLSV__link {
  border-bottom-color: rgba(0, 0, 0, 0.25);
}

.footerLSV__sep {
  opacity: 0.55;
}

.footerLSV__social {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

@media (max-width: 900px) {
  .footerLSV__social {
    justify-content: center;
  }
}

.footerLSV__social a {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.7);
  transition: transform 120ms ease, background 120ms ease;
}

.footerLSV__social a:hover {
  transform: translateY(-1px);
  background: var(--panel2);
}

.footerLSV__social img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  opacity: 0.95;
}
/* ===== Header responsive fix ===== */
.topbar {
  gap: 12px;
}

.topbar__left,
.topbar__right {
  min-width: 0;
}

.topbar__right {
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Evita que textos largos rompan */
.brand__text {
  min-width: 0;
}
.brand__title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

/* Mobile: header en 2 filas */
@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar__left {
    width: 100%;
    display: flex;
    justify-content: flex-start;
  }

  .topbar__right {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  /* botones más compactos */
  .btn {
    padding: 8px 10px;
    border-radius: 12px;
  }

  /* el grupo de idioma no rompe */
  .lang {
    border-radius: 12px;
  }

  /* opcional: ocultar texto en botones para ahorrar espacio */
  .btn .icon + span {
    display: none;
  }
}

/* Muy chico: muestra texto solo en Ajustes */
@media (max-width: 420px) {
  .btn .icon + span {
    display: none;
  }
  .topbar__right [data-nav="#settings"] .icon + span {
    display: inline;
  }
}
.pill--score {
  border-color: rgba(94, 163, 255, 0.45);
  background: rgba(94, 163, 255, 0.1);
}
/* Hero: logo + KPIs centrados */
.hero {
  text-align: center;
}

.kpiRow--center {
  justify-content: center;
}

/* Logo que cambia por tema */
.hero__logo {
  display: block;
  margin: 0 auto 10px;
  height: 44px;
  width: auto;
  object-fit: contain;
  content: url("../../images/Dante_Logotype_White.png"); /* default dark */
}

[data-theme="light"] .hero__logo {
  content: url("../../images/Dante_Logotype_Black.png");
}
/* ==============================
   LEVEL VIEW — Test rows (mobile fix)
   Aplica a tu estructura actual:
   .list > .testRow > .testRow__left + (div inline flex)
   ============================== */

/* Base (desktop-friendly) */
.testRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
}

/* Texto izquierdo */
.testRow__left {
  min-width: 0; /* permite que el texto haga wrap */
}

.testRow__title {
  margin: 0;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.testRow__sub {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.25;
}

/* Bloque acciones: es el <div style="display:flex..."> que está al lado derecho */
.testRow > div[style*="display:flex"] {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  flex-wrap: nowrap;
  justify-content: flex-end;
  min-width: 0;
}

/* ==============================
   MOBILE
   ============================== */
@media (max-width: 640px) {
  .testRow {
    flex-direction: column; /* apila */
    align-items: stretch; /* ancho completo */
    gap: 12px;
  }

  /* El bloque de acciones ahora se apila / wrap */
  .testRow > div[style*="display:flex"] {
    flex-wrap: wrap !important;
    justify-content: flex-start;
    gap: 8px !important;
  }

  /* Píldoras un poco más compactas */
  .pill {
    padding: 6px 10px;
    font-size: 13px;
  }

  /* Botón principal ocupa todo el ancho */
  .testRow .btn.btn--primary {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
  }

  /* Opcional: que el "best %" quede al lado del status y el botón abajo */
  .testRow .pill--score {
    margin-left: 0;
  }
}
