@layer legacy {
:root {
  --student-font-title: "Sora", "Manrope", sans-serif;
  --student-font-body: "Nunito Sans", "Nunito", sans-serif;
  --student-page: #0b1020;
  --student-surface: #141b2d;
  --student-surface-raised: #1a2338;
  --student-surface-soft: #10172a;
  --student-ink: #f7f8ff;
  --student-ink-soft: #c7cde0;
  --student-muted: #8f9ab7;
  --student-border: rgba(164, 178, 221, 0.16);
  --student-border-strong: rgba(164, 178, 221, 0.28);
  --student-purple: #7869ff;
  --student-purple-strong: #9186ff;
  --student-purple-soft: rgba(120, 105, 255, 0.15);
  --student-purple-line: rgba(120, 105, 255, 0.4);
  --student-blue: #2c91ff;
  --student-blue-soft: rgba(44, 145, 255, 0.14);
  --student-blue-line: rgba(44, 145, 255, 0.4);
  --student-cyan: #24cbe5;
  --student-cyan-soft: rgba(36, 203, 229, 0.13);
  --student-cyan-line: rgba(36, 203, 229, 0.38);
  --student-green: #11d2a5;
  --student-green-soft: rgba(17, 210, 165, 0.13);
  --student-green-line: rgba(17, 210, 165, 0.38);
  --student-amber: #ffb72e;
  --student-amber-soft: rgba(255, 183, 46, 0.13);
  --student-amber-line: rgba(255, 183, 46, 0.4);
  --student-coral: #ff667f;
  --student-coral-soft: rgba(255, 102, 127, 0.13);
  --student-coral-line: rgba(255, 102, 127, 0.38);
  --student-shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.16);
  --student-shadow-md: 0 24px 64px rgba(0, 0, 0, 0.3);
  --student-radius-sm: 12px;
  --student-radius: 18px;
  --student-radius-lg: 24px;
  --student-header-height: 64px;
  --student-sidebar-width: 272px;
  --section-accent: var(--student-blue);
  --section-soft: var(--student-blue-soft);
  --section-line: var(--student-blue-line);
}

html[data-theme="light"] {
  --student-page: #f3f5fb;
  --student-surface: #ffffff;
  --student-surface-raised: #ffffff;
  --student-surface-soft: #f7f8fc;
  --student-ink: #172038;
  --student-ink-soft: #4e5a76;
  --student-muted: #66718a;
  --student-border: #e2e6f0;
  --student-border-strong: #cfd5e3;
  --student-purple: #6258e8;
  --student-purple-strong: #4d44cf;
  --student-purple-soft: #efedff;
  --student-purple-line: #c9c4ff;
  --student-blue: #0c61b9;
  --student-blue-soft: #eaf4ff;
  --student-blue-line: #b7d9ff;
  --student-cyan: #05677d;
  --student-cyan-soft: #e5f9fd;
  --student-cyan-line: #afe8f1;
  --student-green: #006f59;
  --student-green-soft: #e5faf4;
  --student-green-line: #a7e8d7;
  --student-amber: #8a5200;
  --student-amber-soft: #fff4d8;
  --student-amber-line: #ffd47d;
  --student-coral: #c32d49;
  --student-coral-soft: #fff0f3;
  --student-coral-line: #ffc3cd;
  --student-shadow-sm: 0 10px 28px rgba(38, 48, 80, 0.07);
  --student-shadow-md: 0 24px 64px rgba(38, 48, 80, 0.13);
}

body[data-page="student"] {
  color: var(--student-ink);
  background: var(--student-page);
  font-family: var(--student-font-body);
}

body[data-page="student"] h1,
body[data-page="student"] h2,
body[data-page="student"] h3,
body[data-page="student"] h4,
body[data-page="student"] p {
  margin: 0;
}

body[data-page="student"] h1,
body[data-page="student"] h2,
body[data-page="student"] h3,
body[data-page="student"] h4 {
  color: var(--student-ink);
  font-family: var(--student-font-title);
  letter-spacing: -0.025em;
}

.student-main {
  min-height: calc(100vh - var(--student-header-height));
  background:
    radial-gradient(circle at 95% 7%, var(--student-purple-soft), transparent 26rem),
    var(--student-page);
}

.student-dashboard[hidden],
.student-view[hidden],
.student-gate[hidden],
.student-gate-wrap:has(.student-gate[hidden]),
.student-review-details[hidden] {
  display: none !important;
}

.student-gate-wrap.container {
  width: min(780px, calc(100% - 2rem));
  max-width: none;
  margin: 0 auto;
  padding: clamp(2rem, 8vh, 6rem) 0;
}

.student-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid var(--student-border-strong);
  border-radius: var(--student-radius-lg);
  background: var(--student-surface);
  box-shadow: var(--student-shadow-md);
}

.student-gate-copy {
  display: grid;
  gap: 0.35rem;
}

.student-gate h1 {
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.student-gate p:last-child {
  max-width: 34rem;
  color: var(--student-ink-soft);
  font-size: 0.88rem;
}

.student-dashboard {
  display: grid;
  grid-template-columns: var(--student-sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--student-header-height));
}

.student-sidebar {
  position: sticky;
  top: var(--student-header-height);
  z-index: 20;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--student-header-height));
  padding: 1.15rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.09);
  overflow-y: auto;
  background:
    radial-gradient(circle at 10% 5%, rgba(120, 105, 255, 0.28), transparent 14rem),
    radial-gradient(circle at 90% 90%, rgba(44, 145, 255, 0.16), transparent 16rem),
    linear-gradient(180deg, #181a3a 0%, #11172b 62%, #0d1425 100%);
  color: #fff;
}

.student-sidebar-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.45rem 1.15rem;
}

.student-sidebar-logo {
  display: grid;
  width: 2.55rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--student-purple), var(--student-blue));
  color: #fff;
  box-shadow: 0 10px 24px rgba(98, 88, 232, 0.32);
}

.student-sidebar-brand strong {
  display: block;
  color: #fff;
  font: 800 0.82rem/1.3 var(--student-font-title);
}

.student-nav {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.7rem;
}

.student-nav-item {
  display: grid;
  grid-template-columns: 1.4rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  min-height: 3rem;
  padding: 0 0.85rem;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: rgba(233, 238, 255, 0.68);
  font: 800 0.8rem/1 var(--student-font-body);
  text-align: left;
  cursor: pointer;
  transition: 160ms ease;
}

.student-nav-item i {
  font-size: 1rem;
  text-align: center;
}

.student-nav-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.student-nav-item.is-active {
  border-color: rgba(145, 134, 255, 0.36);
  background: linear-gradient(100deg, rgba(120, 105, 255, 0.34), rgba(44, 145, 255, 0.14));
  color: #fff;
  box-shadow: inset 3px 0 #9389ff, 0 8px 24px rgba(3, 8, 23, 0.18);
}

.student-nav-count {
  min-width: 1.65rem;
  padding: 0.23rem 0.4rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  font-size: 0.62rem;
  text-align: center;
}

.student-workspace {
  min-width: 0;
}

.student-sidebar-toggle,
.student-sidebar-close,
.student-sidebar-overlay {
  display: none;
}

.student-topbar {
  position: sticky;
  top: var(--student-header-height);
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  min-height: 94px;
  padding: 1rem clamp(1rem, 2.5vw, 2.25rem);
  border-bottom: 1px solid var(--student-border);
  background: color-mix(in srgb, var(--student-page) 88%, transparent);
  backdrop-filter: blur(18px);
}

.student-topbar-copy h1 {
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.15;
}

.student-topbar-copy > p:last-child {
  margin-top: 0.22rem;
  color: var(--student-muted);
  font-size: 0.78rem;
}

.student-topbar-actions,
.student-primary-foot,
.student-class-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.student-button,
.student-text-link,
.student-recommendation-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--student-font-body);
  font-weight: 800;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.student-button {
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--student-border-strong);
  border-radius: 12px;
  background: var(--student-surface-raised);
  color: var(--student-ink-soft);
  font-size: 0.76rem;
}

.student-button:hover {
  border-color: var(--section-accent, var(--student-purple));
  color: var(--section-accent, var(--student-purple-strong));
  transform: translateY(-1px);
}

.student-button--primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--section-accent, var(--student-purple)), var(--student-purple) 55%, var(--student-blue));
  color: #fff;
  box-shadow: 0 9px 24px rgba(98, 88, 232, 0.24);
}

.student-button--primary:hover {
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 28px rgba(98, 88, 232, 0.34);
}

.student-button:disabled {
  opacity: 0.45;
  pointer-events: none;
}

.student-button:focus-visible,
.student-nav-item:focus-visible,
.student-sidebar-toggle:focus-visible,
.student-sidebar-close:focus-visible,
.student-class-join input:focus-visible,
.student-recommendation-card a:focus-visible,
.student-attempt-item:focus-visible,
.student-review-details summary:focus-visible {
  outline: 3px solid var(--student-purple-soft);
  outline-offset: 2px;
}

.student-text-link {
  padding: 0.3rem;
  border: 0;
  background: transparent;
  color: var(--section-accent);
  font-size: 0.72rem;
}

.student-view-stack {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: clamp(1rem, 2.5vw, 2.25rem);
}

.student-view {
  --section-accent: var(--student-blue);
  --section-soft: var(--student-blue-soft);
  --section-line: var(--student-blue-line);
  animation: student-view-in 220ms ease both;
}

.student-section--welcome {
  --section-accent: var(--student-blue);
  --section-soft: var(--student-blue-soft);
  --section-line: var(--student-blue-line);
}

.student-section--results {
  --section-accent: var(--student-purple);
  --section-soft: var(--student-purple-soft);
  --section-line: var(--student-purple-line);
}

.student-section--next {
  --section-accent: var(--student-green);
  --section-soft: var(--student-green-soft);
  --section-line: var(--student-green-line);
}

.student-section--classes {
  --section-accent: var(--student-amber);
  --section-soft: var(--student-amber-soft);
  --section-line: var(--student-amber-line);
}

.student-section--activity {
  --section-accent: var(--student-cyan);
  --section-soft: var(--student-cyan-soft);
  --section-line: var(--student-cyan-line);
}

@keyframes student-view-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.student-section-inner.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.student-section-inner {
  display: grid;
  gap: 1rem;
}

.student-welcome {
  grid-template-columns: minmax(260px, 0.75fr) minmax(360px, 1.25fr);
  align-items: stretch;
}

.student-hero-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 280px;
  padding: clamp(1.3rem, 3vw, 2rem);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--student-radius-lg);
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.22), transparent 11rem),
    linear-gradient(145deg, #564cdd 0%, #7566f3 48%, #2992eb 100%);
  box-shadow: 0 18px 40px rgba(57, 62, 190, 0.24);
}

.student-hero-copy::after {
  position: absolute;
  top: 1.5rem;
  right: 1.7rem;
  width: 5.4rem;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: -3.1rem 2.7rem 0 -1.5rem rgba(255, 255, 255, 0.08);
  content: "";
}

.student-kicker,
.student-section-label,
.student-result-eyebrow {
  color: var(--section-accent);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.student-hero-copy .student-kicker {
  position: relative;
  z-index: 1;
  color: #dce9ff;
}

.student-hero-copy h2 {
  position: relative;
  z-index: 1;
  margin-top: 0.35rem;
  color: #fff;
  font-size: clamp(1.5rem, 2.8vw, 2.25rem);
}

.student-greeting {
  position: relative;
  z-index: 1;
  max-width: 28rem;
  margin-top: 0.45rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
}

html[data-theme="light"] .student-hero-copy h2,
html[data-theme="light"] .student-hero-copy .student-greeting {
  color: #ffffff;
}

.student-primary-action {
  display: grid;
  align-content: center;
  gap: 0.85rem;
  min-width: 0;
  min-height: 280px;
  padding: clamp(1.3rem, 3vw, 2rem);
  border: 1px solid var(--section-line);
  border-top: 4px solid var(--section-accent);
  border-radius: var(--student-radius-lg);
  background:
    linear-gradient(145deg, var(--section-soft), transparent 46%),
    var(--student-surface);
  box-shadow: var(--student-shadow-sm);
}

.student-primary-head,
.student-section-head,
.student-result-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.student-primary-head > div {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.student-primary-icon,
.student-zone-icon,
.student-progress-icon,
.student-activity-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 13px;
  background: var(--section-soft);
  color: var(--section-accent);
}

.student-primary-icon {
  width: 3rem;
  aspect-ratio: 1;
  font-size: 1.15rem;
}

.student-primary-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.6rem;
  padding: 0.2rem 0.58rem;
  border: 1px solid var(--student-amber-line);
  border-radius: 999px;
  background: var(--student-amber-soft);
  color: var(--student-amber);
  font-size: 0.6rem;
  font-weight: 900;
}

.student-primary-action h2 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.student-primary-action > p {
  color: var(--student-ink-soft);
  font-size: 0.8rem;
}

.student-primary-meta,
.student-result-facts,
.student-class-meta,
.student-activity-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.student-primary-meta:empty {
  display: none;
}

.student-primary-meta span,
.student-result-facts span,
.student-class-meta span,
.student-review-chip,
.student-activity-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 1.7rem;
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--student-border);
  border-radius: 999px;
  background: var(--student-surface-soft);
  color: var(--student-muted);
  font-size: 0.61rem;
  font-weight: 800;
}

.student-primary-foot {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) auto;
  margin-top: 0.2rem;
}

.student-progress-bar,
.student-area-bar,
.student-review-meter-bar {
  display: block;
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--student-border);
}

.student-progress-bar span,
.student-area-bar i,
.student-review-meter-bar i {
  display: block;
  width: var(--value, var(--score, 0%));
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--section-accent), var(--student-cyan));
}

.student-section-head {
  align-items: center;
  min-height: 72px;
  padding: 0.8rem 1rem;
  border: 1px solid var(--section-line);
  border-left: 4px solid var(--section-accent);
  border-radius: var(--student-radius);
  background: linear-gradient(110deg, var(--section-soft), var(--student-surface) 62%);
}

.student-section-heading {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.student-zone-icon {
  width: 2.7rem;
  aspect-ratio: 1;
  font-size: 1rem;
}

.student-section-head h2 {
  font-size: 1.05rem;
}

.student-simulado-overview {
  display: grid;
  gap: 1rem;
}

.student-simulado-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 140px;
  padding: 1.2rem;
  border: 1px dashed var(--section-line);
  border-radius: var(--student-radius);
  background: var(--student-surface);
}

.student-simulado-empty > span {
  display: grid;
  width: 3.3rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 15px;
  background: var(--section-soft);
  color: var(--section-accent);
  font-size: 1.3rem;
}

.student-simulado-empty h3 { font-size: 0.9rem; }
.student-simulado-empty p { margin-top: 0.25rem; color: var(--student-muted); font-size: 0.7rem; }

.student-result-lead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: clamp(1.2rem, 2.5vw, 1.7rem);
  border: 1px solid var(--section-line);
  border-top: 4px solid var(--section-accent);
  border-radius: var(--student-radius-lg);
  background:
    linear-gradient(145deg, var(--section-soft), transparent 42%),
    var(--student-surface);
  box-shadow: var(--student-shadow-sm);
}

.student-score-ring {
  --ring-color: var(--section-accent);
  display: grid;
  width: clamp(7.5rem, 12vw, 9rem);
  aspect-ratio: 1;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--score, 0) * 1%), var(--student-border) 0);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--ring-color) 18%, transparent);
}

.student-score-ring::before {
  grid-area: 1 / 1;
  width: calc(100% - 1rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--student-surface);
  content: "";
}

.student-score-ring > div {
  grid-area: 1 / 1;
  z-index: 1;
  display: grid;
  place-items: center;
  gap: 0.15rem;
}

.student-score-ring strong {
  font: 800 clamp(1.25rem, 2.5vw, 1.8rem)/1 var(--student-font-title);
}

.student-score-ring span {
  color: var(--student-muted);
  font-size: 0.57rem;
}

.student-result-copy {
  display: grid;
  min-width: 0;
  gap: 0.55rem;
}

.student-result-copy h3 {
  font-size: clamp(1.05rem, 2vw, 1.4rem);
}

.student-result-copy > p:not(.student-result-eyebrow) {
  color: var(--student-ink-soft);
  font-size: 0.75rem;
}

.student-comparison {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
  color: var(--student-muted);
  font-size: 0.65rem;
  font-weight: 900;
}

.student-comparison[data-tone="up"] { color: var(--student-green); }
.student-comparison[data-tone="down"] { color: var(--student-coral); }

.student-result-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

.student-result-metrics article {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
  min-height: 72px;
  padding: 0.75rem;
  border: 1px solid var(--student-border);
  border-radius: 13px;
  background: var(--student-surface-soft);
}

.student-result-metrics span {
  color: var(--student-muted);
  font-size: 0.59rem;
}

.student-result-metrics strong {
  overflow: hidden;
  font: 800 0.95rem/1.15 var(--student-font-title);
  text-overflow: ellipsis;
}

.student-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.student-result-card,
.student-attempts,
.student-review-details {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--student-border);
  border-top: 3px solid var(--section-accent);
  border-radius: var(--student-radius);
  background:
    linear-gradient(145deg, var(--section-soft), transparent 36%),
    var(--student-surface);
  box-shadow: var(--student-shadow-sm);
}

.student-result-card-head {
  align-items: center;
  margin-bottom: 0.9rem;
}

.student-result-card-head span {
  color: var(--section-accent);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.student-result-card-head h3 {
  margin-top: 0.18rem;
  font-size: 0.85rem;
}

.student-result-card-head > i {
  color: var(--section-accent);
  font-size: 1.05rem;
}

.student-trend {
  display: flex;
  align-items: end;
  justify-content: space-around;
  gap: 0.65rem;
  min-height: 160px;
  padding-top: 0.5rem;
}

.student-trend-item {
  display: grid;
  flex: 1 1 0;
  justify-items: center;
  gap: 0.3rem;
  height: 150px;
}

.student-trend-item > span,
.student-trend-item small {
  color: var(--student-muted);
  font-size: 0.58rem;
  font-weight: 800;
}

.student-trend-item > div {
  display: flex;
  align-items: end;
  width: min(2.1rem, 70%);
  height: 100%;
  overflow: hidden;
  border-radius: 9px 9px 5px 5px;
  background: var(--student-border);
}

.student-trend-item i {
  width: 100%;
  height: var(--score, 0%);
  min-height: 4px;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--student-purple), var(--student-blue));
}

.student-area-list {
  display: grid;
  gap: 0.8rem;
}

.student-area-item {
  display: grid;
  gap: 0.35rem;
}

.student-area-item > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.68rem;
}

.student-area-item small {
  color: var(--student-muted);
  font-size: 0.58rem;
}

.student-muted {
  color: var(--student-muted);
  font-size: 0.7rem;
}

.student-attempt-list {
  display: grid;
  gap: 0.5rem;
}

.student-attempt-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem;
  border: 1px solid var(--student-border);
  border-radius: 13px;
  background: var(--student-surface-raised);
  transition: 150ms ease;
}

.student-attempt-item:hover {
  border-color: var(--section-accent);
  transform: translateY(-1px);
}

.student-attempt-score {
  display: grid;
  width: 2.8rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 12px;
  background: var(--section-soft);
  color: var(--section-accent);
  font-size: 0.66rem;
  font-weight: 900;
}

.student-attempt-item > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 0.12rem;
}

.student-attempt-item strong {
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-attempt-item small,
.student-attempt-meta {
  color: var(--student-muted);
  font-size: 0.6rem;
}

.student-review-details {
  padding: 0;
  overflow: hidden;
}

.student-review-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.8rem;
  padding: 0.8rem 1rem;
  color: var(--student-ink);
  font-size: 0.72rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.student-review-details summary::-webkit-details-marker { display: none; }
.student-review-details[open] summary { border-bottom: 1px solid var(--student-border); }
.student-review-details[open] summary > i { transform: rotate(180deg); }
.student-review-details summary span i { margin-right: 0.35rem; color: var(--student-amber); }

.student-review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  padding: 0.9rem;
}

.student-review-block {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid var(--student-border);
  border-radius: 13px;
  background: var(--student-surface-soft);
}

.student-review-block--wide { grid-column: 1 / -1; }
.student-review-block > h3 { margin-bottom: 0.6rem; font-size: 0.78rem; }

.student-review-list {
  display: grid;
  gap: 0.5rem;
}

.student-review-list--chips {
  display: flex;
  flex-wrap: wrap;
}

.student-review-list--spaced {
  margin-top: 0.7rem;
}

.student-review-item {
  display: grid;
  gap: 0.3rem;
  padding: 0.65rem;
  border: 1px solid var(--student-border);
  border-radius: 11px;
  background: var(--student-surface-raised);
}

.student-review-item > strong { font-size: 0.68rem; }
.student-review-item p { color: var(--student-muted); font-size: 0.6rem; }

.student-review-meter {
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr);
  align-items: center;
  gap: 0.5rem;
}

.student-review-meter > span { color: var(--student-muted); font-size: 0.58rem; }

.student-next-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  align-items: start;
  gap: 1rem;
}

.student-recommendation-grid,
.student-progress-grid {
  display: grid;
  gap: 0.75rem;
}

.student-recommendation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.student-recommendation-card {
  --card-accent: var(--student-blue);
  --card-soft: var(--student-blue-soft);
  --card-line: var(--student-blue-line);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  min-height: 118px;
  padding: 0.9rem;
  border: 1px solid var(--card-line);
  border-left: 4px solid var(--card-accent);
  border-radius: var(--student-radius);
  background:
    linear-gradient(130deg, var(--card-soft), transparent 55%),
    var(--student-surface);
  box-shadow: var(--student-shadow-sm);
}

.student-recommendation-card[data-tone="warm"] {
  --card-accent: var(--student-amber);
  --card-soft: var(--student-amber-soft);
  --card-line: var(--student-amber-line);
}

.student-recommendation-card[data-tone="fresh"],
.student-recommendation-card[data-tone="success"] {
  --card-accent: var(--student-green);
  --card-soft: var(--student-green-soft);
  --card-line: var(--student-green-line);
}

.student-recommendation-card > i {
  display: grid;
  width: 2.6rem;
  aspect-ratio: 1;
  place-items: center;
  border-radius: 12px;
  background: var(--card-soft);
  color: var(--card-accent);
  font-size: 1rem;
}

.student-recommendation-card h3 { font-size: 0.78rem; }
.student-recommendation-card p { margin-top: 0.2rem; color: var(--student-muted); font-size: 0.63rem; }

.student-recommendation-card a {
  padding: 0.4rem;
  color: var(--card-accent);
  font-size: 0.65rem;
}

.student-progress-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  min-height: 118px;
  padding: 0.9rem;
  border: 1px solid var(--student-border);
  border-radius: var(--student-radius);
  background: var(--student-surface);
  box-shadow: var(--student-shadow-sm);
}

.student-progress-icon {
  width: 2.6rem;
  aspect-ratio: 1;
}

.student-progress-card > div {
  display: grid;
  gap: 0.15rem;
}

.student-progress-card span,
.student-progress-card small { color: var(--student-muted); font-size: 0.59rem; }
.student-progress-card strong { font-size: 0.76rem; }
.student-progress-card p { color: var(--student-ink-soft); font-size: 0.63rem; }

.student-game-evidence-intro,
.student-game-evidence-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.7rem;
  color: var(--student-muted);
  font-size: 0.64rem;
}

.student-game-performance { margin-top: 1rem; }

.student-game-evidence-intro {
  margin-bottom: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--student-border);
  border-radius: var(--student-radius);
  background: var(--student-surface);
}

.student-game-evidence-intro span,
.student-game-evidence-foot span { font-weight: 900; }
.student-game-evidence-intro p { max-width: 52rem; margin: 0; }

.student-game-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.student-game-evidence-card {
  display: grid;
  gap: 0.65rem;
  padding: 0.85rem;
  border: 1px solid var(--student-border);
  border-radius: var(--student-radius);
  background: var(--student-surface);
  box-shadow: var(--student-shadow-sm);
}

.student-game-evidence-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.7rem;
}

.student-game-evidence-head h3 { margin-top: 0.12rem; font-size: 0.82rem; }
.student-game-evidence-head span:first-child { color: var(--student-muted); font-size: 0.6rem; }
.student-status-chip { padding: 0.24rem 0.45rem; border-radius: 999px; background: var(--student-purple-soft); color: var(--student-purple-strong); font-size: 0.58rem; font-weight: 900; white-space: nowrap; }
.student-game-evidence-copy { color: var(--student-ink-soft); font-size: 0.69rem; line-height: 1.5; }
.student-game-evidence-note { color: var(--student-accent); font-size: 0.64rem; font-weight: 800; }
.student-game-evidence-facts,
.student-game-window-list { display: grid; gap: 0.28rem; color: var(--student-muted); font-size: 0.62rem; line-height: 1.45; }
.student-game-window-list { padding-top: 0.45rem; border-top: 1px solid var(--student-border); }
.student-game-window-list strong { color: var(--student-ink-soft); font-size: 0.64rem; }
.student-game-evidence-foot { margin-top: 0.75rem; }

.student-classes-layout {
  display: grid;
  gap: 1rem;
}

.student-class-join {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: end;
  gap: 0.65rem;
  padding: 0.9rem;
  border: 1px solid var(--section-line);
  border-left: 4px solid var(--section-accent);
  border-radius: var(--student-radius);
  background: linear-gradient(110deg, var(--section-soft), var(--student-surface) 62%);
}

.student-class-join label {
  display: grid;
  gap: 0.4rem;
}

.student-class-join label span {
  color: var(--student-muted);
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.student-class-join input {
  min-height: 2.75rem;
  padding: 0 0.85rem;
  border: 1px solid var(--student-border-strong);
  border-radius: 12px;
  outline: 0;
  background: var(--student-surface-raised);
  color: var(--student-ink);
  font: 800 0.78rem/1 var(--student-font-body);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.student-class-join input:focus {
  border-color: var(--section-accent);
  box-shadow: 0 0 0 3px var(--section-soft);
}

.student-class-join-status {
  grid-column: 1 / -1;
  min-height: 0;
  color: var(--student-green);
  font-size: 0.67rem;
  font-weight: 800;
}

.student-class-join-status:empty { display: none; }
.student-class-join-status.is-error { color: var(--student-coral); }

.student-class-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.student-class-item {
  position: relative;
  display: grid;
  align-content: start;
  gap: 0.65rem;
  min-width: 0;
  min-height: 210px;
  padding: 1.05rem;
  overflow: hidden;
  border: 1px solid var(--student-border);
  border-radius: var(--student-radius);
  background: var(--student-surface);
  box-shadow: var(--student-shadow-sm);
}

.student-class-item::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--student-amber), var(--student-coral));
  content: "";
}

.student-class-item h3 {
  overflow: hidden;
  font-size: 0.95rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-class-item > p {
  color: var(--student-muted);
  font-size: 0.65rem;
}

.student-class-actions {
  margin-top: auto;
}

.student-class-actions .student-button {
  width: 100%;
}

.student-activity-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.student-activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
  min-height: 100px;
  padding: 0.9rem;
  border: 1px solid var(--student-border);
  border-left: 4px solid var(--section-accent);
  border-radius: var(--student-radius);
  background:
    linear-gradient(125deg, var(--section-soft), transparent 45%),
    var(--student-surface);
  box-shadow: var(--student-shadow-sm);
  transition: 150ms ease;
}

.student-activity-item:hover {
  border-color: var(--section-accent);
  transform: translateY(-1px);
}

.student-activity-icon {
  width: 3rem;
  aspect-ratio: 1;
  font-size: 1.05rem;
}

.student-activity-copy {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.student-activity-copy > strong,
.student-activity-copy > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-activity-copy > strong { font-size: 0.76rem; }
.student-activity-copy > small { color: var(--student-muted); font-size: 0.6rem; }

.student-empty-state {
  display: grid;
  grid-column: 1 / -1;
  min-height: 8rem;
  place-items: center;
  align-content: center;
  padding: 1.2rem;
  border: 1px dashed var(--student-border-strong);
  border-radius: 13px;
  background: var(--student-surface-soft);
  color: var(--student-muted);
  font-size: 0.7rem;
  text-align: center;
}

.student-status {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 100;
  max-width: min(26rem, calc(100vw - 2rem));
  border-radius: 12px;
  pointer-events: none;
}

.student-status:not(:empty) {
  padding: 0.8rem 1rem;
  border: 1px solid var(--student-border-strong);
  background: var(--student-surface-raised);
  color: var(--student-ink);
  box-shadow: var(--student-shadow-md);
  font-size: 0.75rem;
  font-weight: 900;
}

.student-status.is-error:not(:empty) { border-color: var(--student-coral-line); color: var(--student-coral); }
.student-status.is-success:not(:empty) { border-color: var(--student-green-line); color: var(--student-green); }

@media (max-width: 1260px) {
  .student-result-lead { grid-template-columns: auto minmax(0, 1fr); }
  .student-result-metrics { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .student-class-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-next-layout { grid-template-columns: 1fr; }
  .student-progress-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1020px) {
  .student-welcome { grid-template-columns: 1fr; }
  .student-hero-copy { min-height: 220px; }
  .student-primary-action { min-height: 0; }
}

@media (max-width: 900px) {
  :root { --student-header-height: 0px; }
  body[data-page="student"].student-menu-open { overflow: hidden; }
  .student-dashboard { display: block; }

  .student-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 55;
    width: min(86vw, 304px);
    height: 100dvh;
    padding: max(1rem, env(safe-area-inset-top)) 1rem max(1rem, env(safe-area-inset-bottom));
    transform: translateX(-105%);
    transition: transform 210ms ease;
  }

  body[data-page="student"].student-menu-open .student-sidebar { transform: none; }

  .student-sidebar-close,
  .student-sidebar-toggle {
    display: grid;
    place-items: center;
    width: 2.75rem;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid var(--student-border-strong);
    border-radius: 12px;
    background: var(--student-surface);
    color: var(--student-purple-strong);
    cursor: pointer;
  }

  .student-sidebar-close {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
  }

  .student-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: block;
    visibility: hidden;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(4, 8, 20, 0.7);
    opacity: 0;
    transition: 180ms ease;
  }

  body[data-page="student"].student-menu-open .student-sidebar-overlay { visibility: visible; opacity: 1; }

  .student-topbar {
    top: 0;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 86px;
    padding: 0.75rem 1rem;
  }

  .student-topbar-actions { grid-column: 1 / -1; }
  .student-result-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .student-gate { grid-template-columns: 1fr; }
  .student-gate .student-button { width: 100%; }
  .student-view-stack { padding: 0.75rem; }
  .student-topbar-copy > p:last-child { display: none; }
  .student-topbar-actions { display: grid; grid-template-columns: 0.7fr 1.3fr; }
  .student-topbar-actions .student-button { width: 100%; padding-inline: 0.7rem; }

  .student-hero-copy { min-height: 200px; padding: 1.2rem; }
  .student-primary-action { padding: 1.1rem; }
  .student-primary-foot { grid-template-columns: 1fr; }
  .student-primary-foot .student-button { width: 100%; }

  .student-section-head { align-items: flex-start; }
  .student-section-head .student-text-link { white-space: nowrap; }

  .student-simulado-empty { grid-template-columns: auto minmax(0, 1fr); }
  .student-simulado-empty .student-button { grid-column: 1 / -1; width: 100%; }
  .student-result-lead { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .student-result-copy { justify-items: center; }
  .student-result-facts { justify-content: center; }
  .student-result-metrics { grid-column: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; text-align: left; }
  .student-review-grid { grid-template-columns: 1fr; }
  .student-review-block--wide { grid-column: auto; }

  .student-recommendation-grid,
  .student-progress-grid,
  .student-game-evidence-grid,
  .student-class-list,
  .student-activity-list { grid-template-columns: 1fr; }

  .student-class-join { grid-template-columns: 1fr; }
  .student-class-join .student-button { width: 100%; }

  .student-attempt-item { grid-template-columns: auto minmax(0, 1fr); }
  .student-attempt-meta { grid-column: 2; }
}

@media (max-width: 440px) {
  .student-topbar-actions .student-button:first-child span { display: none; }
  .student-section-head { align-items: stretch; flex-direction: column; }
  .student-section-head .student-text-link { align-self: flex-start; }
  .student-result-metrics { grid-template-columns: 1fr; }
  .student-recommendation-card { grid-template-columns: auto minmax(0, 1fr); }
  .student-recommendation-card a { grid-column: 2; justify-self: start; }
  .student-activity-meta { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .student-view { animation: none; }
  .student-nav-item,
  .student-button,
  .student-attempt-item,
  .student-activity-item { transition: none; }
}
}
