:root {
  color-scheme: dark;
  --ink: #eef8fb;
  --ink-soft: #a9bfcc;
  --night: #071827;
  --night-2: #0d2638;
  --surface: #0f2534;
  --surface-soft: #142f42;
  --paper: #091d2b;
  --line: rgba(223, 242, 247, 0.14);
  --cyan: #78e2df;
  --blue: #9ac8ef;
  --mint: #a9e2c4;
  --orange: #ffbd7a;
  --violet: #c9b3ef;
  --pink: #efaac7;
  --accent: #ff9f43;
  --success: #1d7b58;
  --danger: #9e3c45;
  --shadow: 0 25px 70px rgba(7, 24, 39, 0.13);
  --radius-large: 34px;
  --radius-medium: 23px;
  --radius-small: 14px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --ink: #0b2030;
  --ink-soft: #546b79;
  --surface: #ffffff;
  --surface-soft: #edf4f5;
  --paper: #f8fbfb;
  --line: rgba(11, 32, 48, 0.13);
  --shadow: 0 25px 70px rgba(7, 24, 39, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(135deg, #06141f, #0a1d2b 52%, #071827);
  font-family: Inter, Aptos, "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
}

:root[data-theme="light"] body {
  background: #f4f8f9;
}

:root[data-theme="dark"] .welcome-card,
:root[data-theme="dark"] .settings-card {
  background: #0f2534;
  border: 1px solid rgba(223, 242, 247, 0.12);
}

:root[data-theme="light"] .settings-card {
  background: #ffffff;
}

:root[data-theme="dark"] .welcome-card input,
:root[data-theme="dark"] .settings-card input,
:root[data-theme="dark"] .settings-stats div {
  color: var(--ink);
  background: #081b28;
  border-color: var(--line);
}

:root[data-theme="dark"] .modal-close {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 250;
  padding: 10px 16px;
  color: white;
  background: var(--night);
  border-radius: 10px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 26px;
  min-height: 88px;
  padding: 13px clamp(20px, 4vw, 64px);
  color: white;
  background: rgba(7, 24, 39, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: white;
  text-decoration: none;
  cursor: pointer;
  transition: color 180ms ease, transform 220ms ease;
}

.brand:hover,
.brand:focus-visible {
  color: white;
  transform: translateY(-1px);
}

.brand:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 7px;
  border-radius: 18px;
}

.brand-mark,
.profile-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 900;
}

.brand-mark {
  position: relative;
  isolation: isolate;
  width: 68px;
  height: 68px;
  filter: drop-shadow(0 13px 28px rgba(0, 0, 0, 0.24));
  transform-origin: 50% 55%;
  transition:
    filter 260ms ease,
    transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.brand-mark::before {
  inset: -4px;
  z-index: -1;
  border: 1px solid rgba(123, 232, 232, 0.26);
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(255, 185, 116, 0.08),
    0 0 16px rgba(123, 232, 232, 0.16),
    0 0 24px rgba(255, 185, 116, 0.08);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 240ms ease, transform 260ms ease;
}

.brand-mark::after {
  inset: 8px;
  z-index: 2;
  border-radius: 16px;
  background: linear-gradient(
    115deg,
    transparent 24%,
    rgba(255, 255, 255, 0.2) 48%,
    transparent 68%
  );
  opacity: 0;
  transform: translateX(-120%) skewX(-14deg);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
  transition: transform 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.brand:hover .brand-mark,
.brand:focus-visible .brand-mark {
  filter:
    drop-shadow(0 13px 28px rgba(0, 0, 0, 0.22))
    drop-shadow(0 0 10px rgba(123, 232, 232, 0.18));
  transform: translateY(-1px) rotate(-1deg) scale(1.025);
}

.brand:hover .brand-mark::before,
.brand:focus-visible .brand-mark::before {
  opacity: 0.68;
  transform: scale(1);
}

.brand:hover .brand-mark::after,
.brand:focus-visible .brand-mark::after {
  animation: brand-shine 920ms ease forwards;
  opacity: 0.34;
}

.brand:hover .brand-mark img,
.brand:focus-visible .brand-mark img {
  transform: scale(1.012);
}

.brand-copy strong,
.brand-copy small {
  display: block;
}

.brand-copy strong {
  font-size: 0.98rem;
}

.brand-copy small {
  color: #a9bdc9;
  font-size: 0.72rem;
}

@keyframes brand-shine {
  from {
    transform: translateX(-120%) skewX(-14deg);
  }

  to {
    transform: translateX(120%) skewX(-14deg);
  }
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.header-center {
  display: grid;
  justify-items: center;
  gap: 7px;
}

.field-nav {
  display: inline-flex;
  gap: 5px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.nav-link,
.mobile-link,
.field-link {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.nav-link {
  padding: 9px 13px;
  color: #aac0cc;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
}

.nav-link:hover {
  color: white;
}

.nav-link[hidden],
.mobile-link[hidden] {
  display: none;
}

.feedback-form {
  width: min(660px, 100%);
  margin-inline: auto;
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nav-link.is-active {
  color: var(--night);
  background: var(--cyan);
}

.field-link {
  padding: 5px 10px;
  color: #a9bdc9;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.field-link:hover {
  color: white;
}

.field-link.is-active {
  color: var(--night);
  background: var(--orange);
}

.profile-chip {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 5px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 9px;
}

.theme-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-left: 5px;
  color: #cfe1ea;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(120, 226, 223, 0.2);
  border-radius: 11px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.theme-toggle-mobile {
  display: none;
}

.theme-toggle:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(120, 226, 223, 0.38);
  transform: translateY(-1px);
}

.theme-toggle-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 160ms ease, transform 160ms ease;
}

.moon-icon {
  fill: currentColor;
  stroke: currentColor;
}

.sun-icon {
  position: absolute;
  color: #0b2030;
  opacity: 0;
  transform: rotate(-18deg) scale(0.78);
}

:root[data-theme="light"] .theme-toggle {
  color: #0b2030;
  background: #d9f4f7;
  border-color: rgba(11, 32, 48, 0.12);
}

:root[data-theme="light"] .moon-icon {
  opacity: 0;
  transform: rotate(18deg) scale(0.78);
}

:root[data-theme="light"] .sun-icon {
  opacity: 1;
  transform: rotate(0) scale(1);
}

:root[data-theme="light"] .site-header {
  color: var(--night);
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: rgba(11, 32, 48, 0.1);
}

:root[data-theme="light"] .brand {
  color: var(--night);
}

:root[data-theme="light"] .brand-copy small,
:root[data-theme="light"] .profile-copy small {
  color: var(--ink-soft);
}

:root[data-theme="light"] .desktop-nav,
:root[data-theme="light"] .field-nav {
  background: #edf4f5;
  border-color: rgba(11, 32, 48, 0.1);
}

:root[data-theme="light"] .nav-link,
:root[data-theme="light"] .field-link {
  color: var(--ink-soft);
}

:root[data-theme="light"] .nav-link:hover,
:root[data-theme="light"] .field-link:hover {
  color: var(--night);
}

:root[data-theme="light"] .profile-copy strong {
  color: var(--night);
}

:root[data-theme="light"] .profile-chip:hover {
  background: rgba(11, 32, 48, 0.05);
  border-color: rgba(11, 32, 48, 0.08);
}

.profile-chip:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.1);
}

.profile-avatar {
  width: 39px;
  height: 39px;
  color: var(--night);
  background: var(--orange);
  border-radius: 50%;
}

.profile-copy strong,
.profile-copy small {
  display: block;
}

.profile-copy strong {
  color: white;
  font-size: 0.83rem;
}

.profile-copy small {
  color: #9bb1be;
  font-size: 0.7rem;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: #087b7a;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow.light {
  color: var(--cyan);
}

.hero {
  position: relative;
  min-height: min(780px, calc(100vh - 82px));
  display: grid;
  align-items: center;
  overflow: hidden;
  color: white;
  background: var(--night);
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  background-image: url("assets/ecommerce-consultation-hero.png");
  background-position: 42% center;
  background-size: cover;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(7, 24, 39, 0.9) 0%, rgba(7, 24, 39, 0.72) 40%, rgba(7, 24, 39, 0.18) 76%, rgba(7, 24, 39, 0.08) 100%),
    linear-gradient(0deg, rgba(7, 24, 39, 0.36), transparent 55%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(700px, calc(100% - 40px));
  margin-right: auto;
  margin-left: max(20px, calc((100vw - 1180px) / 2));
  padding-block: 90px;
}

.hero-content h1 {
  max-width: 100%;
  margin-bottom: 24px;
  font-size: clamp(3.1rem, 5.1vw, 5.35rem);
  line-height: 0.98;
  font-weight: 760;
  text-wrap: balance;
}

.hero-content h1 em {
  color: var(--cyan);
  font-style: normal;
  font-weight: 480;
}

.hero-content > p:not(.eyebrow) {
  max-width: min(670px, 100%);
  color: #c1d1da;
  font-size: clamp(1rem, 1.6vw, 1.22rem);
}

.hero-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 34px;
}

.hero-meta span {
  padding: 7px 11px;
  color: #b7c9d2;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
}

.primary-button,
.secondary-button,
.light-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 999px;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-button {
  color: white;
  background: var(--night);
  box-shadow: 0 12px 28px rgba(7, 24, 39, 0.2);
}

.primary-button:hover,
.secondary-button:hover,
.light-button:hover,
.ghost-button:hover {
  transform: translateY(-1px);
}

.primary-button.bright {
  color: var(--night);
  background: var(--cyan);
}

.primary-button.bright:hover {
  background: #a0f3ef;
}

.secondary-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
}

.secondary-button:hover {
  background: white;
}

.light-button {
  color: var(--night);
  background: white;
}

.ghost-button {
  color: white;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.danger-button {
  color: #8f2f3a;
  background: #fde9eb;
}

.full-width {
  width: 100%;
}

.dashboard-stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 18px;
  margin-top: -54px;
}

.progress-orbit,
.level-panel {
  min-height: 235px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.progress-orbit {
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: center;
  gap: 35px;
  padding: 32px 38px;
  border-radius: var(--radius-large) var(--radius-large) var(--radius-large) 10px;
}

.progress-ring,
.mini-ring,
.result-score {
  display: grid;
  place-content: center;
  text-align: center;
  border-radius: 50%;
}

.progress-ring {
  width: 150px;
  height: 150px;
  background:
    radial-gradient(circle closest-side, white 78%, transparent 80% 100%),
    conic-gradient(var(--accent) var(--progress), #e6edef 0);
}

.progress-ring strong {
  font-size: 2.2rem;
}

.progress-ring span,
.mini-ring span {
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.progress-orbit h2 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
}

.progress-orbit p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.level-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  align-content: center;
  gap: 22px;
  padding: 30px;
  color: white;
  background: var(--night-2);
  border-color: transparent;
  border-radius: var(--radius-large) var(--radius-large) 10px var(--radius-large);
}

.mini-ring {
  width: 110px;
  height: 110px;
  background:
    radial-gradient(circle closest-side, var(--night-2) 75%, transparent 78% 100%),
    conic-gradient(var(--cyan) var(--progress), rgba(255, 255, 255, 0.12) 0);
}

.mini-ring span {
  color: #95acb8;
}

.mini-ring strong {
  font-size: 2.6rem;
  line-height: 1;
}

.level-copy {
  align-self: center;
}

.level-copy strong,
.level-copy span {
  display: block;
}

.level-copy strong {
  font-size: 1.12rem;
}

.level-copy span {
  color: #9eb4bf;
  font-size: 0.78rem;
}

.stat-pair {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-pair span {
  padding: 12px;
  color: #aac0ca;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-size: 0.77rem;
}

.stat-pair strong {
  display: block;
  color: white;
  font-size: 1.25rem;
}

.section-block {
  padding-block: 74px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 35px;
  margin-bottom: 32px;
}

.section-heading h2,
.lesson-heading h2,
.takeaway-card h2,
.practice-callout h2,
.lab-teaser h2,
.focus-card h2,
.interpretation-card h2 {
  margin-bottom: 0;
  font-size: clamp(2.15rem, 4vw, 4rem);
  line-height: 1;
}

.text-link,
.text-button,
.card-link,
.back-button {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font-weight: 850;
  cursor: pointer;
}

.text-link:hover,
.card-link:hover,
.back-button:hover {
  text-decoration: underline;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.module-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 390px;
  padding: 26px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium) var(--radius-medium) var(--radius-medium) 7px;
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.16);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.module-card.has-media {
  min-height: 500px;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(7, 24, 39, 0.13);
}

.module-card:focus-visible {
  outline: 4px solid rgba(120, 226, 223, 0.72);
  outline-offset: 4px;
}

.module-card.cyan,
.module-hero.cyan,
.question-module.cyan {
  background: linear-gradient(135deg, #083140, #102c3d);
}

.module-card.blue,
.module-hero.blue,
.question-module.blue {
  background: linear-gradient(135deg, #102744, #0d334d);
}

.module-card.mint,
.module-hero.mint,
.question-module.mint {
  background: linear-gradient(135deg, #0a3529, #113846);
}

.module-card.orange,
.module-hero.orange,
.question-module.orange {
  background: linear-gradient(135deg, #3a2415, #4a2d1a);
}

.module-card.violet,
.module-hero.violet,
.question-module.violet {
  background: linear-gradient(135deg, #261f3c, #342852);
}

.module-card.pink,
.module-hero.pink,
.question-module.pink {
  background: linear-gradient(135deg, #3a1d31, #47243d);
}

:root[data-theme="light"] .module-card,
:root[data-theme="light"] .module-hero {
  color: var(--night);
}

:root[data-theme="light"] .module-card.cyan,
:root[data-theme="light"] .module-hero.cyan,
:root[data-theme="light"] .question-module.cyan {
  background: var(--cyan);
}

:root[data-theme="light"] .module-card.blue,
:root[data-theme="light"] .module-hero.blue,
:root[data-theme="light"] .question-module.blue {
  background: var(--blue);
}

:root[data-theme="light"] .module-card.mint,
:root[data-theme="light"] .module-hero.mint,
:root[data-theme="light"] .question-module.mint {
  background: var(--mint);
}

:root[data-theme="light"] .module-card.orange,
:root[data-theme="light"] .module-hero.orange,
:root[data-theme="light"] .question-module.orange {
  background: var(--orange);
}

:root[data-theme="light"] .module-card.violet,
:root[data-theme="light"] .module-hero.violet,
:root[data-theme="light"] .question-module.violet {
  background: var(--violet);
}

:root[data-theme="light"] .module-card.pink,
:root[data-theme="light"] .module-hero.pink,
:root[data-theme="light"] .question-module.pink {
  background: var(--pink);
}

.module-topline {
  display: flex;
  align-items: start;
  justify-content: space-between;
}

.module-code,
.question-module {
  width: fit-content;
  padding: 6px 9px;
  border: 1px solid rgba(223, 242, 247, 0.24);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.module-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(223, 242, 247, 0.24);
  border-radius: 50% 50% 50% 13px;
  font-size: 1rem;
  font-weight: 900;
}

.module-card-media {
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 22px 0 2px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(223, 242, 247, 0.18);
  border-radius: 18px 18px 18px 6px;
}

.module-card-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.module-card h3 {
  margin: 22px 0 12px;
  font-size: clamp(1.43rem, 1.55vw, 1.5rem);
  line-height: 1.06;
  hyphens: auto;
  overflow-wrap: break-word;
}

.module-card p {
  color: rgba(238, 248, 251, 0.78);
}

.module-progress {
  margin-top: auto;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  background: rgba(223, 242, 247, 0.16);
  border-radius: 999px;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--cyan);
  border-radius: inherit;
}

.module-progress small {
  display: block;
  margin-top: 7px;
  color: rgba(238, 248, 251, 0.7);
}

:root[data-theme="light"] .module-card {
  border-color: rgba(11, 32, 48, 0.1);
  box-shadow: 0 16px 45px rgba(7, 24, 39, 0.08);
}

:root[data-theme="light"] .module-code,
:root[data-theme="light"] .question-module {
  border-color: rgba(11, 32, 48, 0.22);
}

:root[data-theme="light"] .module-mark {
  border-color: rgba(11, 32, 48, 0.24);
}

:root[data-theme="light"] .module-card-media {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(11, 32, 48, 0.1);
}

:root[data-theme="light"] .module-card p {
  color: rgba(11, 32, 48, 0.75);
}

:root[data-theme="light"] .progress-track {
  background: rgba(11, 32, 48, 0.12);
}

:root[data-theme="light"] .progress-track span {
  background: var(--night);
}

:root[data-theme="light"] .module-progress small {
  color: rgba(11, 32, 48, 0.67);
}

.card-link {
  display: flex;
  justify-content: space-between;
  margin-top: 21px;
  text-align: left;
}

.lab-teaser {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(45px, 8vw, 100px);
  overflow: hidden;
  padding-inline: clamp(32px, 6vw, 72px);
  color: white;
  background:
    radial-gradient(circle at 82% 12%, rgba(120, 226, 223, 0.2), transparent 18rem),
    linear-gradient(135deg, #0a2032, #112f43);
  border-radius: var(--radius-large) var(--radius-large) var(--radius-large) 10px;
  box-shadow: var(--shadow);
}

.lab-teaser-copy p:not(.eyebrow) {
  max-width: 650px;
  color: #b9ccd5;
}

.lab-teaser .light-button {
  margin-top: 10px;
}

.metric-stack {
  display: grid;
  gap: 12px;
}

.metric-stack > div {
  display: grid;
  grid-template-columns: 48px 80px 1fr;
  align-items: center;
  gap: 13px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
}

.metric-stack span {
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 900;
}

.metric-stack i {
  position: relative;
  height: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
}

.metric-stack i::after {
  display: block;
  width: var(--bar);
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  border-radius: inherit;
  content: "";
}

.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.focus-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 410px;
  padding: 38px;
  border-radius: var(--radius-large) var(--radius-large) var(--radius-large) 10px;
}

.focus-card h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  hyphens: auto;
  overflow-wrap: break-word;
}

.focus-index {
  align-self: end;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  font-weight: 900;
}

.focus-card > div {
  margin-top: auto;
}

.focus-card p:not(.eyebrow) {
  color: var(--ink-soft);
}

.focus-card button,
.focus-card .secondary-button {
  align-self: flex-start;
  margin-top: 22px;
}

.mistake-card {
  background: var(--surface);
  border: 1px solid var(--line);
}

.mistake-card .focus-index {
  color: white;
  background: var(--night);
}

.glossary-card {
  color: var(--night);
  background: var(--orange);
}

.glossary-card .eyebrow {
  color: #075f73;
}

.glossary-card p:not(.eyebrow) {
  color: rgba(11, 32, 48, 0.74);
}

.glossary-card .focus-index {
  border: 1px solid rgba(11, 32, 48, 0.25);
}

.curriculum-card {
  color: var(--night);
  background: var(--blue);
}

.curriculum-card .eyebrow {
  color: #075f73;
}

.curriculum-card p:not(.eyebrow) {
  color: rgba(11, 32, 48, 0.74);
}

.curriculum-card .focus-index {
  color: var(--night);
  background: var(--cyan);
}

.competency-card {
  color: white;
  background:
    radial-gradient(circle at 84% 12%, rgba(255, 190, 122, 0.24), transparent 13rem),
    linear-gradient(135deg, #0b2030, #12364a);
  border: 1px solid rgba(223, 242, 247, 0.12);
}

.competency-card .eyebrow {
  color: var(--cyan);
}

.competency-card p:not(.eyebrow) {
  color: #b9ccd5;
}

.competency-card .focus-index {
  color: var(--night);
  background: var(--orange);
}

.competency-card .secondary-button {
  color: var(--night);
  background: var(--cyan);
}

.teacher-card {
  color: var(--night);
  background: var(--mint);
}

.teacher-card .eyebrow {
  color: #087b7a;
}

.teacher-card p:not(.eyebrow) {
  color: rgba(11, 32, 48, 0.74);
}

.teacher-card .focus-index {
  color: white;
  background: var(--night);
}

.portal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  margin-top: 25px;
  padding-block: 24px 34px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 0.76rem;
}

.portal-footer a {
  font-weight: 800;
  color: var(--ink);
  text-underline-offset: 3px;
}

.page-intro {
  padding-top: clamp(80px, 11vw, 145px);
}

.page-intro h1 {
  max-width: 980px;
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 7vw, 6.8rem);
  line-height: 0.95;
  hyphens: auto;
  overflow-wrap: break-word;
}

.page-intro > p:not(.eyebrow) {
  max-width: 690px;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.overall-progress {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 25px;
  max-width: 760px;
  margin-top: 43px;
}

.overall-progress > strong {
  font-size: 2.8rem;
}

.overall-progress span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
}

.progress-track.large {
  height: 12px;
}

.reference-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  margin-block: 10px 65px;
  padding: 34px 42px;
  color: white;
  background: var(--night);
  border-radius: var(--radius-medium);
}

.reference-strip h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
}

:root[data-theme="light"] .reference-strip {
  color: var(--night);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 55px rgba(7, 24, 39, 0.08);
}

:root[data-theme="light"] .reference-strip .eyebrow.light {
  color: #087b7a;
}

:root[data-theme="light"] .reference-strip .light-button {
  color: white;
  background: var(--night);
}

.module-hero {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.module-hero-inner {
  padding-block: 34px 85px;
}

.module-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 360px);
  align-items: center;
  gap: 45px;
  padding-top: 50px;
}

.module-hero-grid > div:first-child {
  min-width: 0;
}

.module-hero h1 {
  margin-bottom: 18px;
  font-size: clamp(2.25rem, 5vw, 4.5rem);
  line-height: 1;
  overflow-wrap: break-word;
  hyphens: auto;
}

.module-hero .eyebrow {
  color: var(--cyan);
}

.module-hero p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(238, 248, 251, 0.86);
  font-size: 1.12rem;
}

.mission-box {
  max-width: 680px;
  margin-top: 25px;
  padding: 17px 19px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(223, 242, 247, 0.15);
  border-radius: 14px;
}

.mission-box span,
.mission-box strong {
  display: block;
}

.mission-box span {
  margin-bottom: 4px;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.module-status {
  align-self: center;
  color: rgba(238, 248, 251, 0.72);
  font-size: 0.84rem;
  font-weight: 750;
}

.module-hero-visual {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(223, 242, 247, 0.18);
  border-radius: 30px 30px 30px 9px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.24);
}

.module-hero-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.module-hero-badge {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 2px;
  min-width: 86px;
  padding: 12px 14px;
  color: var(--night);
  text-align: center;
  background: rgba(238, 248, 251, 0.9);
  border-radius: 18px 18px 18px 6px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
}

.module-hero-badge span {
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.09em;
}

.module-hero-badge strong {
  font-size: 1.35rem;
  line-height: 1;
}

.module-hero-visual i {
  position: absolute;
  inset: 14px;
  border: 2px solid rgba(238, 248, 251, 0.36);
  border-radius: inherit;
  pointer-events: none;
}

.module-hero-mark {
  position: relative;
  display: grid;
  place-content: center;
  width: clamp(210px, 25vw, 325px);
  height: clamp(210px, 25vw, 325px);
  text-align: center;
  border: 2px solid rgba(223, 242, 247, 0.24);
  border-radius: 50% 50% 50% 30px;
}

.module-hero-mark span,
.module-hero-mark strong {
  position: relative;
  z-index: 1;
  display: block;
}

.module-hero-mark span {
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.module-hero-mark strong {
  font-size: clamp(3rem, 6vw, 5.5rem);
  line-height: 1;
}

.module-hero-mark i {
  position: absolute;
  inset: 18px;
  border-radius: inherit;
  background:
    radial-gradient(circle closest-side, transparent 87%, rgba(255, 255, 255, 0.25) 89% 100%),
    conic-gradient(rgba(120, 226, 223, 0.62) var(--progress), transparent 0);
  opacity: 0.55;
}

:root[data-theme="light"] .module-hero p:not(.eyebrow) {
  color: rgba(11, 32, 48, 0.78);
}

:root[data-theme="light"] .module-hero .eyebrow {
  color: #087b7a;
}

:root[data-theme="light"] .mission-box {
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(11, 32, 48, 0.13);
}

:root[data-theme="light"] .mission-box span {
  color: rgba(11, 32, 48, 0.63);
}

:root[data-theme="light"] .module-status {
  color: rgba(11, 32, 48, 0.7);
}

:root[data-theme="light"] .module-hero-visual {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(11, 32, 48, 0.12);
  box-shadow: 0 25px 70px rgba(7, 24, 39, 0.12);
}

:root[data-theme="light"] .module-hero-visual i {
  border-color: rgba(11, 32, 48, 0.12);
}

:root[data-theme="light"] .module-hero-mark {
  border-color: rgba(11, 32, 48, 0.25);
}

:root[data-theme="light"] .module-hero-mark i {
  background:
    radial-gradient(circle closest-side, transparent 87%, rgba(255, 255, 255, 0.25) 89% 100%),
    conic-gradient(rgba(11, 32, 48, 0.55) var(--progress), transparent 0);
}

.lesson-layout {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: clamp(45px, 8vw, 120px);
}

.lesson-heading {
  position: sticky;
  top: 120px;
  align-self: start;
}

.lesson-list {
  border-top: 1px solid var(--line);
}

.lesson-card {
  display: grid;
  grid-template-columns: 55px 1fr;
  gap: 24px;
  padding: 29px 0;
  border-bottom: 1px solid var(--line);
}

.lesson-card > span {
  color: #087b7a;
  font-size: 1.18rem;
  font-weight: 900;
}

.lesson-card h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.lesson-card p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.takeaway-card {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 50px;
  padding: 55px;
  color: white;
  background: var(--night);
  border-radius: var(--radius-large) var(--radius-large) var(--radius-large) 10px;
}

.takeaway-card ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.takeaway-card li {
  position: relative;
  padding: 15px 17px 15px 52px;
  color: #e1edf1;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
}

.takeaway-card li::before {
  position: absolute;
  left: 18px;
  color: var(--cyan);
  content: "✓";
  font-weight: 900;
}

.resource-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: stretch;
  padding: clamp(28px, 5vw, 46px);
  color: white;
  background: var(--night);
  border: 1px solid var(--line);
  border-radius: 34px 34px 34px 10px;
}

.resource-panel h2 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
}

.resource-panel p:not(.eyebrow) {
  color: #b7c9d2;
}

.resource-list {
  display: grid;
  gap: 12px;
}

.resource-card {
  display: grid;
  gap: 8px;
  padding: 22px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(223, 242, 247, 0.1);
  border-radius: var(--radius-medium) var(--radius-medium) var(--radius-medium) 7px;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.resource-card.is-document {
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.resource-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(120, 226, 223, 0.38);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.2);
}

.resource-document-icon {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 7px;
  width: 58px;
  height: 72px;
  padding: 11px 9px;
  overflow: hidden;
  color: var(--night);
  background: linear-gradient(155deg, #ffffff 0%, #eef6f7 100%);
  border: 1px solid rgba(120, 226, 223, 0.56);
  border-radius: 9px 9px 9px 4px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.resource-document-icon::after {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 17px;
  height: 17px;
  background: linear-gradient(225deg, var(--night) 48%, rgba(120, 226, 223, 0.6) 50%, #d9ecee 54%);
  content: "";
}

.resource-document-icon > span {
  position: absolute;
  top: 10px;
  left: 8px;
  padding: 3px 6px;
  color: var(--night);
  background: var(--orange);
  border-radius: 6px;
  font-size: 0.63rem;
  font-weight: 900;
  line-height: 1;
}

.resource-document-icon i {
  display: block;
  width: 100%;
  height: 3px;
  background: rgba(11, 32, 48, 0.2);
  border-radius: 999px;
}

.resource-document-icon i:last-child {
  width: 68%;
}

.resource-type-pill {
  width: fit-content;
  padding: 5px 9px;
  color: var(--night);
  background: var(--orange);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.resource-card-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.resource-card strong {
  font-size: 1.35rem;
  line-height: 1.1;
}

.resource-card small {
  color: var(--ink-soft);
}

.resource-card-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  margin-top: 4px;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.resource-card-action > span {
  font-size: 0.9rem;
  transition: transform 180ms ease;
}

.resource-card:hover .resource-card-action > span {
  transform: translate(2px, -2px);
}

.project-steps {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 26px;
  align-items: start;
}

.step-list {
  display: grid;
  gap: 11px;
}

.step-list article {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 7px;
}

.step-list span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--night);
  background: var(--cyan);
  border-radius: 13px;
  font-weight: 900;
}

.step-list p {
  margin: 0;
  color: var(--ink-soft);
}

:root[data-theme="light"] .takeaway-card,
:root[data-theme="light"] .resource-panel {
  color: var(--night);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 18px 55px rgba(7, 24, 39, 0.08);
}

:root[data-theme="light"] .takeaway-card li {
  color: rgba(11, 32, 48, 0.82);
  background: #f4f8f9;
  border-color: rgba(11, 32, 48, 0.08);
}

:root[data-theme="light"] .resource-panel p:not(.eyebrow) {
  color: var(--ink-soft);
}

:root[data-theme="light"] .resource-card,
:root[data-theme="light"] .step-list article {
  color: var(--night);
  background: #ffffff;
  border-color: rgba(11, 32, 48, 0.11);
}

:root[data-theme="light"] .resource-card small,
:root[data-theme="light"] .step-list p {
  color: var(--ink-soft);
}

:root[data-theme="light"] .resource-card:hover {
  background: #f9fcfc;
  border-color: rgba(10, 137, 145, 0.32);
}

:root[data-theme="light"] .resource-document-icon::after {
  background: linear-gradient(225deg, #ffffff 48%, rgba(10, 137, 145, 0.42) 50%, #dceff0 54%);
}

:root[data-theme="light"] .resource-card-action {
  color: #087d80;
}

.practice-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding-inline: 44px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
}

.practice-callout p:last-child {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.lab-hero {
  padding-block: 80px;
  color: white;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    var(--night);
  background-size: 34px 34px;
}

.lab-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 70px;
}

.lab-hero h1 {
  margin-bottom: 20px;
  font-size: clamp(3.8rem, 8vw, 7.4rem);
  line-height: 0.92;
}

.lab-hero p:not(.eyebrow) {
  color: #b9cbd4;
  font-size: 1.1rem;
}

.formula-cloud {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  gap: 10px;
  min-height: 280px;
  padding: 34px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px 50px 50px 14px;
}

.formula-cloud span {
  padding: 12px 15px;
  color: #d8e6eb;
  background: rgba(120, 226, 223, 0.08);
  border: 1px solid rgba(120, 226, 223, 0.2);
  border-radius: 999px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.78rem;
}

.lab-workspace {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 22px;
  align-items: start;
}

.lab-input-card {
  position: sticky;
  top: 110px;
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow);
}

.lab-input-card h2 {
  margin-bottom: 22px;
  font-size: 2.3rem;
}

.lab-field-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 20px;
}

.lab-field-grid label > span,
.lab-field-grid small {
  display: block;
}

.lab-field-grid label > span {
  margin-bottom: 6px;
  font-weight: 800;
}

.lab-field-grid input {
  width: 100%;
  min-height: 50px;
  padding: 10px 13px;
  color: var(--ink);
  background: #f5f9fa;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 1.05rem;
  font-weight: 750;
}

.lab-field-grid input:focus {
  border-color: #128b89;
  box-shadow: 0 0 0 3px rgba(120, 226, 223, 0.28);
}

.lab-field-grid small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.lab-example {
  display: block;
  margin: 14px auto 0;
  color: #087b7a;
}

.lab-results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.metric-card {
  min-height: 245px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium) var(--radius-medium) var(--radius-medium) 7px;
}

.metric-card:last-child {
  grid-column: 1 / -1;
  min-height: 210px;
  color: white;
  background: var(--night-2);
}

.metric-topline {
  display: flex;
  justify-content: space-between;
  color: #087b7a;
  font-size: 0.75rem;
  font-weight: 900;
}

.metric-card:last-child .metric-topline {
  color: var(--cyan);
}

.metric-card > strong {
  margin: 22px 0 14px;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  letter-spacing: -0.06em;
}

.metric-card code {
  width: fit-content;
  padding: 7px 9px;
  color: #42606f;
  background: var(--surface-soft);
  border-radius: 8px;
  font-size: 0.73rem;
}

.metric-card:last-child code {
  color: #d7e7eb;
  background: rgba(255, 255, 255, 0.08);
}

.metric-card p {
  margin: auto 0 0;
  padding-top: 20px;
  color: var(--ink-soft);
}

.metric-card:last-child p {
  color: #a9bec8;
}

.lab-empty {
  grid-column: 1 / -1;
  min-height: 520px;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 45px;
  text-align: center;
  background:
    linear-gradient(rgba(11, 32, 48, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 32, 48, 0.04) 1px, transparent 1px),
    rgba(255, 255, 255, 0.55);
  background-size: 30px 30px;
  border: 1px dashed rgba(11, 32, 48, 0.22);
  border-radius: var(--radius-medium);
}

.lab-empty > span {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin-bottom: 22px;
  color: var(--night);
  background: var(--cyan);
  border-radius: 50% 50% 50% 15px;
  font-size: 2.4rem;
  font-weight: 900;
}

.lab-empty h2 {
  margin-bottom: 8px;
  font-size: 2.2rem;
}

.lab-empty p {
  max-width: 450px;
  color: var(--ink-soft);
}

.interpretation-card {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 55px;
  margin-bottom: 70px;
  padding: 42px;
  background: var(--orange);
  border-radius: var(--radius-medium);
}

.interpretation-card p:last-child {
  align-self: center;
  margin: 0;
  color: rgba(11, 32, 48, 0.76);
}

.practice-shell {
  min-height: calc(100vh - 82px);
  padding-block: 42px 90px;
  color: white;
  background:
    radial-gradient(circle at 85% 14%, rgba(120, 226, 223, 0.12), transparent 28rem),
    var(--night);
}

.practice-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.practice-header div {
  display: flex;
  gap: 15px;
}

.practice-header span {
  color: #a8bdc7;
}

.light-back {
  color: white;
}

.practice-progress {
  margin-bottom: 35px;
  background: rgba(255, 255, 255, 0.12);
}

.practice-progress span {
  background: var(--cyan);
}

.question-card {
  max-width: 900px;
  margin-inline: auto;
  padding: clamp(30px, 6vw, 68px);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 38px 38px 38px 10px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
}

.question-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 750;
}

.question-card h1 {
  margin-bottom: 35px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.06;
}

.choice-list {
  display: grid;
  gap: 11px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-option {
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  gap: 14px;
  min-height: 67px;
  padding: 12px 18px 12px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
  cursor: pointer;
}

.choice-option:hover {
  border-color: #78e2df;
}

.choice-option:has(input:checked) {
  background: rgba(120, 226, 223, 0.16);
  border-color: #78e2df;
}

:root[data-theme="light"] .choice-option {
  background: white;
}

:root[data-theme="light"] .choice-option:hover {
  border-color: #087b7a;
}

:root[data-theme="light"] .choice-option:has(input:checked) {
  background: #e5f7f6;
  border-color: #087b7a;
}

.choice-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-letter {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  background: var(--surface-soft);
  border-radius: 10px;
  font-weight: 900;
}

.number-answer > span:first-child {
  display: block;
  margin-bottom: 10px;
  font-weight: 800;
}

.number-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 10px 17px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 15px;
}

:root[data-theme="light"] .number-input-wrap {
  background: white;
}

.number-input-wrap:focus-within {
  border-color: #087b7a;
  box-shadow: 0 0 0 3px rgba(120, 226, 223, 0.25);
}

.number-input-wrap input {
  width: 100%;
  padding: 10px 0;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 1.6rem;
  font-weight: 800;
}

.number-input-wrap strong {
  color: var(--ink-soft);
}

.number-answer small {
  display: block;
  margin-top: 8px;
  color: var(--ink-soft);
}

.answer-button {
  width: 100%;
  margin-top: 24px;
}

.feedback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-top: 22px;
  padding: 22px;
  border-radius: 15px;
}

.feedback.correct {
  background: rgba(29, 123, 88, 0.28);
  border: 1px solid #3ea981;
}

.feedback.incorrect {
  background: rgba(158, 60, 69, 0.3);
  border: 1px solid #cf7680;
}

:root[data-theme="light"] .feedback.correct {
  background: #ddf2e7;
  border-color: #89c6a7;
}

:root[data-theme="light"] .feedback.incorrect {
  background: #fae5e8;
  border-color: #dea2aa;
}

.feedback strong {
  font-size: 1.05rem;
}

.feedback p {
  margin: 4px 0 0;
}

.result-section {
  min-height: calc(100vh - 82px);
  display: grid;
  place-items: center;
  padding-block: 80px;
  color: white;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(120, 226, 223, 0.16), transparent 30rem),
    var(--night);
}

.result-inner {
  display: grid;
  justify-items: center;
}

.result-score {
  width: 190px;
  height: 190px;
  margin-bottom: 34px;
  background:
    radial-gradient(circle closest-side, var(--night) 76%, transparent 78% 100%),
    conic-gradient(var(--accent) var(--result), rgba(255, 255, 255, 0.12) 0);
}

.result-score span {
  font-size: 3.4rem;
  font-weight: 800;
}

.result-section h1 {
  max-width: 850px;
  margin-bottom: 17px;
  font-size: clamp(3.2rem, 7vw, 6.5rem);
  line-height: 0.95;
}

.result-section p:not(.eyebrow) {
  color: #afc2cb;
}

.mistake-overview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  padding: 34px;
  background: var(--orange);
  border-radius: var(--radius-medium);
}

.mistake-overview > div {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.mistake-overview strong {
  font-size: 3.5rem;
}

.mistake-list {
  margin-top: 25px;
  border-top: 1px solid var(--line);
}

.mistake-list article {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 22px;
  padding: 25px 0;
  border-bottom: 1px solid var(--line);
}

.mistake-list h2 {
  margin-bottom: 5px;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.mistake-list p {
  margin-bottom: 0;
  color: var(--ink-soft);
}

.empty-state {
  max-width: 650px;
  margin: 20px auto 100px;
  padding: 60px 35px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-large);
}

.empty-state > span {
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  margin: 0 auto 25px;
  color: var(--night);
  background: var(--cyan);
  border-radius: 50% 50% 50% 14px;
  font-size: 2rem;
  font-weight: 900;
}

.empty-state h2 {
  font-size: 2.2rem;
}

.achievement-summary,
.competency-summary {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 16px;
}

.competency-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.achievement-summary article,
.competency-summary article {
  padding: 30px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
}

.achievement-summary span,
.achievement-summary small,
.achievement-summary strong,
.competency-summary span,
.competency-summary small,
.competency-summary strong {
  display: block;
}

.achievement-summary span,
.achievement-summary small,
.competency-summary span,
.competency-summary small {
  color: var(--ink-soft);
}

.achievement-summary strong,
.competency-summary strong {
  margin: 10px 0;
  font-size: 3.3rem;
}

.achievement-summary .progress-track {
  margin-top: 20px;
}

.competency-list {
  display: grid;
  gap: 14px;
}

.competency-item {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(310px, 0.9fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  box-shadow: 0 18px 55px rgba(7, 24, 39, 0.08);
}

.competency-item-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  min-width: 0;
}

.competency-item h2 {
  margin: 6px 0 8px;
  font-size: clamp(1.3rem, 2vw, 2rem);
  line-height: 1.08;
  hyphens: auto;
  overflow-wrap: break-word;
}

.competency-item p:not(.eyebrow),
.competency-item small {
  color: var(--ink-soft);
}

.competency-item .progress-track {
  margin: 14px 0 7px;
}

.competency-scale {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.competency-scale label {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 96px;
  padding: 13px;
  background: rgba(120, 226, 223, 0.08);
  border: 1px solid rgba(120, 226, 223, 0.18);
  border-radius: 12px;
  cursor: pointer;
}

.competency-scale label:focus-within {
  outline: 3px solid rgba(120, 226, 223, 0.55);
  outline-offset: 2px;
}

.competency-scale label.is-selected {
  color: var(--night);
  background: var(--cyan);
  border-color: transparent;
}

.competency-scale input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.competency-scale span {
  font-size: 0.82rem;
  font-weight: 900;
}

.competency-scale small {
  font-size: 0.73rem;
  line-height: 1.35;
}

.competency-scale label.is-selected small {
  color: rgba(11, 32, 48, 0.7);
}

.competency-actions {
  display: grid;
  gap: 8px;
}

.competency-actions .primary-button,
.competency-actions .secondary-button {
  white-space: nowrap;
}

.teacher-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  gap: 18px;
  align-items: start;
}

.teacher-form,
.teacher-panel {
  padding: clamp(24px, 4vw, 38px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  box-shadow: 0 18px 55px rgba(7, 24, 39, 0.08);
}

.teacher-form h2,
.teacher-panel h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  line-height: 1;
}

.teacher-form label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.teacher-form label span {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.teacher-form input,
.teacher-form select,
.teacher-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}

:root[data-theme="light"] .teacher-form input,
:root[data-theme="light"] .teacher-form select,
:root[data-theme="light"] .teacher-form textarea {
  background: #ffffff;
}

.teacher-form textarea {
  resize: vertical;
}

.teacher-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.teacher-note {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.teacher-panel {
  position: sticky;
  top: 125px;
  display: grid;
  gap: 24px;
}

.teacher-panel p:not(.eyebrow) {
  color: var(--ink-soft);
}

.teacher-actions {
  display: grid;
  gap: 9px;
}

.teacher-actions .file-button {
  min-height: 48px;
}

.custom-task-list {
  display: grid;
  gap: 14px;
}

.custom-task-card {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(260px, 0.75fr) minmax(220px, 0.6fr) auto;
  gap: 18px;
  align-items: start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
}

.custom-task-card h3 {
  margin: 14px 0 8px;
  font-size: 1.32rem;
  line-height: 1.12;
  hyphens: auto;
  overflow-wrap: break-word;
}

.custom-task-card p {
  margin: 0;
  color: var(--ink-soft);
}

.custom-task-card ol {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.custom-task-card li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding: 9px 10px;
  background: rgba(120, 226, 223, 0.08);
  border: 1px solid rgba(120, 226, 223, 0.14);
  border-radius: 10px;
}

.custom-task-card li.is-correct {
  color: var(--night);
  background: var(--cyan);
  border-color: transparent;
}

.custom-task-card li span {
  font-weight: 900;
}

.danger-link {
  color: var(--danger);
}

.badge-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.badge-card {
  display: grid;
  grid-template-columns: 78px 1fr;
  align-items: center;
  gap: 20px;
  padding: 25px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
}

.badge-card.locked {
  filter: grayscale(1);
  opacity: 0.52;
}

.badge-symbol {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  background: linear-gradient(135deg, var(--cyan), var(--orange));
  border-radius: 50% 50% 50% 14px;
  font-weight: 900;
}

.badge-card small {
  color: #087b7a;
  font-weight: 900;
  text-transform: uppercase;
}

.badge-card h3 {
  margin: 4px 0;
  font-size: 1.45rem;
}

.badge-card p {
  margin: 0;
  color: var(--ink-soft);
}

.glossary-tools {
  display: grid;
  gap: 18px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(11, 32, 48, 0.1);
  border-radius: var(--radius-medium);
  box-shadow: 0 20px 55px rgba(7, 24, 39, 0.08);
}

.glossary-search {
  display: grid;
  gap: 8px;
}

.glossary-search span {
  color: #087b7a;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.glossary-search input {
  width: 100%;
  min-height: 58px;
  padding: 14px 18px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 1.05rem;
}

.glossary-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-chip {
  padding: 9px 13px;
  color: var(--ink-soft);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
}

.filter-chip:hover,
.filter-chip.is-active {
  color: var(--night);
  background: var(--cyan);
  border-color: transparent;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.glossary-term-card {
  display: flex;
  flex-direction: column;
  align-items: start;
  min-height: 255px;
  padding: 24px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium) var(--radius-medium) var(--radius-medium) 7px;
  cursor: pointer;
  box-shadow: 0 16px 45px rgba(7, 24, 39, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.glossary-term-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 55px rgba(7, 24, 39, 0.13);
}

.glossary-term-card:nth-child(5n + 1) {
  background: #dcf4f2;
}

.glossary-term-card:nth-child(5n + 2) {
  background: #e1eef8;
}

.glossary-term-card:nth-child(5n + 3) {
  background: #fbe4cf;
}

.glossary-term-card:nth-child(5n + 4) {
  background: #e9e0f6;
}

.glossary-term-card:nth-child(5n) {
  background: #e1f1e8;
}

.term-number,
.term-category {
  color: rgba(11, 32, 48, 0.54);
  font-size: 0.72rem;
  font-weight: 900;
}

.term-category {
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.glossary-term-card strong {
  margin-top: 8px;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.05;
}

.glossary-term-card p {
  margin: 12px 0 20px;
  color: rgba(11, 32, 48, 0.72);
}

.glossary-term-card small {
  margin-top: auto;
  color: #087b7a;
  font-weight: 900;
}

.glossary-empty {
  grid-column: 1 / -1;
}

.term-detail-hero {
  padding-block: 70px 20px;
}

.term-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
  margin-top: 28px;
}

.term-detail-grid h1 {
  margin-bottom: 16px;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.94;
}

.term-detail-grid > div > p:not(.eyebrow) {
  max-width: 740px;
  color: var(--ink-soft);
  font-size: 1.2rem;
}

.term-summary-card,
.term-detail-card,
.term-quiz-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-medium) var(--radius-medium) var(--radius-medium) 7px;
  box-shadow: var(--shadow);
}

:root[data-theme="light"] .term-detail-card,
:root[data-theme="light"] .term-quiz-card {
  background: white;
}

.term-summary-card {
  display: grid;
  align-content: end;
  gap: 8px;
  padding: 26px;
  background:
    radial-gradient(circle at 90% 10%, rgba(120, 226, 223, 0.33), transparent 11rem),
    var(--night);
  color: white;
}

.term-summary-card span {
  color: var(--cyan);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.term-summary-card strong {
  font-size: 1.55rem;
  line-height: 1.1;
}

.term-summary-card small {
  color: #b7c9d2;
}

.term-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.term-detail-card,
.term-quiz-card {
  padding: clamp(24px, 4vw, 38px);
}

.term-detail-card h2,
.term-quiz-card h2 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 3.2vw, 3.3rem);
  line-height: 1;
}

.term-detail-card > p {
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.term-example {
  margin-top: 24px;
  padding: 18px;
  background: rgba(120, 226, 223, 0.1);
  border: 1px solid rgba(120, 226, 223, 0.25);
  border-radius: 16px;
}

:root[data-theme="light"] .term-example {
  background: #eff8f7;
  border-color: rgba(8, 123, 122, 0.16);
}

.term-example span {
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

:root[data-theme="light"] .term-example span {
  color: #087b7a;
}

.term-example p {
  margin: 7px 0 0;
}

.glossary-choice-list {
  margin-top: 22px;
}

.mobile-nav {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 17, 28, 0.75);
  backdrop-filter: blur(9px);
}

.modal-backdrop[hidden] {
  display: none;
}

.welcome-card,
.settings-card {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100vh - 40px);
  padding: clamp(28px, 5vw, 48px);
  overflow: auto;
  overflow-x: hidden;
  background: #f4f8f9;
  border-radius: 34px 34px 34px 10px;
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.38);
}

.welcome-card h1,
.settings-card h2 {
  margin-bottom: 14px;
  font-size: clamp(2.25rem, 6vw, 3.45rem);
  line-height: 1.02;
  overflow-wrap: break-word;
}

.welcome-card > p:not(.eyebrow),
.settings-card > p:not(.eyebrow) {
  color: var(--ink-soft);
}

.welcome-card label,
.settings-card label:not(.file-button) {
  display: block;
  margin: 24px 0 8px;
  font-weight: 800;
}

.welcome-card input,
.settings-card input {
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.login-hint {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.welcome-card .primary-button {
  margin-top: 12px;
}

.welcome-card .text-button {
  display: block;
  margin: 15px auto 0;
  color: var(--ink-soft);
}

.welcome-visual {
  position: relative;
  display: grid;
  place-items: center;
  height: 170px;
  margin: -15px 0 30px;
}

.welcome-logo {
  display: block;
  width: min(168px, 54vw);
  height: min(168px, 54vw);
  object-fit: contain;
  border-radius: 32px;
  filter: drop-shadow(0 20px 42px rgba(0, 0, 0, 0.28));
}

.welcome-mark {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  color: var(--night);
  background: linear-gradient(135deg, var(--cyan), var(--orange));
  border-radius: 30px 30px 30px 8px;
  font-size: 2.5rem;
  font-weight: 900;
}

.signal {
  position: absolute;
  border: 2px solid;
  border-radius: 50%;
}

.signal-one {
  width: 145px;
  height: 145px;
  border-color: var(--cyan);
}

.signal-two {
  width: 205px;
  height: 105px;
  border-color: var(--orange);
  transform: rotate(28deg);
}

.signal-three {
  width: 110px;
  height: 215px;
  border-color: var(--violet);
  transform: rotate(-35deg);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  background: rgba(11, 32, 48, 0.08);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.4rem;
  transition: background 160ms ease, transform 160ms ease;
}

.modal-close:hover {
  background: rgba(11, 32, 48, 0.16);
  transform: scale(1.06);
}

:root[data-theme="dark"] .modal-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.settings-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 24px;
  padding-right: 44px;
}

.settings-head .eyebrow {
  margin-bottom: 4px;
}

.settings-card .settings-head h2 {
  margin-bottom: 0;
  font-size: clamp(1.85rem, 5vw, 2.5rem);
  line-height: 1.05;
}

.settings-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  color: var(--night);
  background: linear-gradient(135deg, var(--cyan), var(--orange));
  border-radius: 20px 20px 20px 7px;
  font-size: 1.7rem;
  font-weight: 900;
}

.settings-card label:not(.file-button),
.settings-section-label {
  margin: 26px 0 8px;
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.settings-card input {
  border-radius: 14px;
}

.settings-card .inline-form .secondary-button {
  color: var(--night);
  background: var(--cyan);
  border: 0;
  font-weight: 900;
}

.settings-card .inline-form .secondary-button:hover {
  background: #a0f3ef;
}

.settings-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 26px 0 0;
}

.settings-stats div {
  padding: 14px 8px 12px;
  text-align: center;
  background: #eef4f6;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.settings-stats strong,
.settings-stats span {
  display: block;
}

.settings-stats strong {
  font-size: 1.65rem;
  line-height: 1.2;
}

:root[data-theme="dark"] .settings-stats strong {
  color: var(--cyan);
}

.settings-stats span {
  margin-top: 2px;
  color: var(--ink-soft);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-actions {
  display: grid;
  gap: 10px;
}

.settings-actions .secondary-button,
.settings-actions .file-button {
  min-height: 52px;
  color: var(--ink);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.settings-actions .secondary-button:hover,
.settings-actions .file-button:hover {
  background: #ffffff;
  border-color: rgba(11, 32, 48, 0.25);
}

:root[data-theme="dark"] .settings-actions .secondary-button:hover,
:root[data-theme="dark"] .settings-actions .file-button:hover {
  background: #1c3d55;
  border-color: rgba(223, 242, 247, 0.3);
}

.settings-card .danger-button {
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 16px;
}

.settings-card .danger-button:hover {
  background: #fbd9dd;
}

:root[data-theme="dark"] .settings-card .danger-button {
  color: #ffccd2;
  background: rgba(158, 60, 69, 0.18);
  border-color: rgba(255, 150, 160, 0.28);
}

:root[data-theme="dark"] .settings-card .danger-button:hover {
  background: rgba(158, 60, 69, 0.34);
}

.file-button {
  display: grid;
  place-items: center;
  cursor: pointer;
}

.settings-card p.settings-help {
  margin: 20px 0 0;
  padding: 13px 16px;
  color: #45606f;
  font-size: 0.85rem;
  line-height: 1.5;
  background: #eef4f6;
  border: 1px solid var(--line);
  border-left: 3px solid #087b7a;
  border-radius: 8px 14px 14px 8px;
}

:root[data-theme="dark"] .settings-card p.settings-help {
  color: #c3d6e0;
  background: #081b28;
  border-color: var(--line);
  border-left-color: var(--cyan);
}

.settings-card p.privacy-note {
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.5;
}

.toast-region {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  display: grid;
  gap: 10px;
}

.toast {
  max-width: 370px;
  padding: 14px 18px;
  color: white;
  background: var(--night);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: var(--shadow);
  animation: toast-in 220ms ease both;
}

.toast.is-error {
  background: var(--danger);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.noscript-message {
  margin: 30px;
  padding: 20px;
  background: #fde9eb;
  border-radius: 12px;
}

@media (max-width: 1080px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
    gap: 12px;
  }

  .desktop-nav {
    display: none;
  }

  .theme-toggle-mobile {
    display: grid;
    margin-left: 0;
  }

  .header-center {
    justify-self: center;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

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

  .competency-item {
    grid-template-columns: 1fr;
  }

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

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

  .lab-workspace {
    grid-template-columns: 1fr;
  }

  .teacher-workspace,
  .custom-task-card {
    grid-template-columns: 1fr;
  }

  .teacher-panel {
    position: static;
  }

  .lab-input-card {
    position: static;
  }

  .lesson-layout {
    grid-template-columns: 1fr;
  }

  .resource-panel,
  .project-steps {
    grid-template-columns: 1fr;
  }

  .lesson-heading {
    position: static;
  }
}

@media (max-width: 820px) {
  body {
    padding-bottom: 82px;
  }

  .site-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    min-height: 70px;
    padding: 10px 16px;
  }

  .field-link {
    padding: 5px 8px;
    font-size: 0.68rem;
  }

  .brand-mark {
    width: 54px;
    height: 54px;
  }

  .brand-copy small,
  .profile-copy {
    display: none;
  }

  .profile-chip {
    padding: 0;
  }

  .header-actions {
    gap: 7px;
  }

  .theme-toggle {
    width: 39px;
    height: 39px;
  }

  .mobile-nav {
    position: fixed;
    right: 10px;
    bottom: 10px;
    left: 10px;
    z-index: 70;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    padding: 7px;
    background: rgba(7, 24, 39, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(15px);
  }

  .mobile-link {
    display: grid;
    justify-items: center;
    gap: 2px;
    min-width: 0;
    padding: 7px 2px;
    color: #9fb5c0;
    border-radius: 14px;
    font-size: 0.58rem;
    font-weight: 800;
  }

  .mobile-link span {
    font-size: 0.82rem;
    font-weight: 900;
  }

  .mobile-link.is-active {
    color: var(--night);
    background: var(--cyan);
  }

  .hero {
    min-height: 690px;
  }

  .hero-image {
    background-position: 48% center;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(7, 24, 39, 0.98) 0%, rgba(7, 24, 39, 0.9) 58%, rgba(7, 24, 39, 0.45)),
      linear-gradient(0deg, rgba(7, 24, 39, 0.55), transparent);
  }

  .term-detail-grid,
  .term-detail-layout {
    grid-template-columns: 1fr;
  }

  .term-summary-card {
    min-height: 220px;
  }

  .hero-content h1 {
    font-size: clamp(3.2rem, 12vw, 5.6rem);
  }

  .dashboard-stats {
    margin-top: -35px;
  }

  .progress-orbit {
    grid-template-columns: 130px 1fr;
    gap: 22px;
    padding: 27px;
  }

  .progress-ring {
    width: 125px;
    height: 125px;
  }

  .lab-teaser,
  .lab-hero-grid,
  .interpretation-card {
    grid-template-columns: 1fr;
  }

  .lab-teaser {
    gap: 35px;
  }

  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .module-hero-grid {
    grid-template-columns: 1fr;
  }

  .module-hero-mark {
    width: 165px;
    height: 165px;
  }

  .module-hero-visual {
    width: min(100%, 420px);
  }

  .takeaway-card {
    grid-template-columns: 1fr;
    padding: 35px 28px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(1180px, calc(100% - 28px));
  }

  .hero {
    align-items: end;
    min-height: 720px;
  }

  .theme-toggle-mobile {
    display: none;
  }

  .brand {
    gap: 0;
  }

  .brand-copy {
    display: none;
  }

  .hero-content {
    width: min(100% - 28px, 1180px);
    margin-inline: auto;
    padding-block: 65px;
  }

  .hero-content h1,
  .page-intro h1,
  .result-section h1 {
    font-size: clamp(3rem, 15vw, 4.8rem);
  }

  .page-intro h1 {
    font-size: 2.75rem;
    line-height: 1.04;
  }

  .hero-actions,
  .result-actions {
    display: grid;
  }

  .hero-actions button,
  .result-actions button {
    width: 100%;
  }

  .dashboard-stats {
    margin-top: 14px;
  }

  .progress-orbit {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .level-panel {
    grid-template-columns: auto 1fr;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .module-grid,
  .glossary-grid,
  .badge-grid,
  .achievement-summary,
  .competency-summary,
  .lab-results {
    grid-template-columns: minmax(0, 1fr);
  }

  .glossary-tools {
    padding: 18px;
  }

  .term-detail-hero {
    padding-block: 48px 0;
  }

  .term-detail-grid h1 {
    font-size: clamp(2.8rem, 14vw, 4.6rem);
  }

  .term-detail-card,
  .term-quiz-card {
    padding: 25px;
  }

  .settings-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .competency-item-main,
  .competency-scale,
  .competency-actions,
  .teacher-option-grid {
    grid-template-columns: 1fr;
  }

  .competency-scale label {
    min-height: auto;
  }

  .module-card {
    min-height: 350px;
  }

  .module-card.has-media {
    min-height: 470px;
  }

  .lab-teaser {
    padding: 38px 24px;
  }

  .metric-stack > div {
    grid-template-columns: 43px 73px 1fr;
    padding: 14px;
  }

  .focus-card {
    min-height: 360px;
    padding: 30px;
  }

  .portal-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .overall-progress {
    grid-template-columns: 1fr;
  }

  .reference-strip,
  .practice-callout,
  .mistake-overview {
    align-items: stretch;
    flex-direction: column;
    padding: 30px 24px;
  }

  .reference-strip button,
  .practice-callout button,
  .mistake-overview button {
    width: 100%;
  }

  .resource-card.is-document {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
  }

  .resource-document-icon {
    width: 46px;
    height: 59px;
    padding: 9px 7px;
  }

  .resource-document-icon::after {
    width: 14px;
    height: 14px;
  }

  .resource-document-icon > span {
    top: 8px;
    left: 6px;
    padding: 3px 5px;
    font-size: 0.58rem;
  }

  .resource-card strong {
    font-size: 1.18rem;
  }

  .module-hero-inner {
    padding-bottom: 50px;
  }

  .module-hero-grid {
    padding-top: 38px;
  }

  .module-hero h1 {
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1.05;
  }

  .lesson-card {
    grid-template-columns: 42px 1fr;
    gap: 15px;
  }

  .lab-hero {
    padding-block: 58px;
  }

  .lab-hero h1 {
    font-size: clamp(3.3rem, 16vw, 5rem);
  }

  .formula-cloud {
    min-height: auto;
    padding: 24px;
    border-radius: 30px 30px 30px 10px;
  }

  .lab-input-card {
    padding: 24px;
  }

  .metric-card:last-child {
    grid-column: auto;
  }

  .interpretation-card {
    gap: 20px;
    padding: 30px 24px;
  }

  .practice-header {
    align-items: start;
    flex-direction: column;
  }

  .question-card {
    padding: 28px 20px;
    border-radius: 26px 26px 26px 8px;
  }

  .question-meta,
  .feedback {
    align-items: stretch;
    flex-direction: column;
  }

  .feedback button {
    width: 100%;
  }

  .choice-option {
    grid-template-columns: 36px 1fr;
    padding-right: 12px;
  }

  .mistake-list article {
    grid-template-columns: 1fr;
  }

  .badge-card {
    grid-template-columns: 65px 1fr;
    padding: 20px;
  }

  .badge-symbol {
    width: 64px;
    height: 64px;
  }

  .inline-form {
    grid-template-columns: 1fr;
  }

  .toast-region {
    right: 14px;
    bottom: 96px;
    left: 14px;
  }

  .toast {
    max-width: none;
  }
}

@media (max-width: 390px) {
  .brand-copy strong {
    font-size: 0.84rem;
  }

  .mobile-link {
    font-size: 0.56rem;
  }

  .mobile-link span {
    font-size: 0.74rem;
  }

  .stat-pair {
    grid-template-columns: 1fr;
  }

  .level-panel {
    grid-template-columns: 1fr;
  }
}

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

  .brand:hover,
  .brand:focus-visible,
  .brand:hover .brand-mark,
  .brand:focus-visible .brand-mark,
  .brand:hover .brand-mark img,
  .brand:focus-visible .brand-mark img {
    transform: none;
  }

  .brand-mark::after {
    display: none;
  }
}

@media print {
  @page {
    margin: 14mm;
  }

  *,
  *::before,
  *::after {
    color: #0b2030 !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }

  html,
  body {
    min-height: auto;
    background: #ffffff !important;
  }

  body {
    font-size: 10.5pt;
    line-height: 1.42;
  }

  .site-header,
  .mobile-nav,
  .toast-region,
  .modal-backdrop,
  .portal-footer,
  .back-button,
  .print-button,
  .practice-callout,
  .module-hero-visual,
  .module-hero-mark {
    display: none !important;
  }

  #app {
    display: block;
  }

  .page-shell {
    width: 100%;
    max-width: none;
  }

  .section-block,
  .module-hero-inner {
    margin: 0 0 10mm;
    padding: 0;
  }

  .module-hero,
  .takeaway-card,
  .resource-panel,
  .lesson-card,
  .step-list article {
    background: #ffffff !important;
    border-color: #cfd8de !important;
  }

  .module-hero {
    border-bottom: 1px solid #cfd8de;
  }

  .module-hero-grid,
  .lesson-layout,
  .takeaway-card,
  .resource-panel,
  .project-steps {
    display: block;
  }

  .module-hero-grid {
    padding-top: 0;
  }

  .module-hero h1,
  .lesson-heading h2,
  .takeaway-card h2,
  .resource-panel h2 {
    margin-bottom: 4mm;
    font-size: 22pt;
    line-height: 1.08;
  }

  .module-hero p,
  .mission-box,
  .lesson-card p,
  .takeaway-card li,
  .resource-panel p,
  .resource-card small,
  .step-list p {
    color: #233746 !important;
  }

  .mission-box {
    margin-top: 6mm;
    padding: 4mm;
    border: 1px solid #cfd8de;
    border-radius: 0;
  }

  .hero-actions {
    display: block;
    margin-top: 5mm;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button {
    display: none !important;
  }

  .module-status {
    display: inline-block;
    color: #4e6572 !important;
  }

  .lesson-heading {
    position: static;
  }

  .lesson-list {
    border-top: 1px solid #cfd8de;
  }

  .lesson-card {
    grid-template-columns: 12mm 1fr;
    gap: 5mm;
    padding: 5mm 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .lesson-card h3 {
    font-size: 13pt;
  }

  .takeaway-card {
    padding: 6mm;
    border: 1px solid #cfd8de;
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .takeaway-card ul {
    gap: 3mm;
  }

  .takeaway-card li {
    padding: 2.5mm 3mm 2.5mm 8mm;
    background: #ffffff !important;
    border: 1px solid #dbe4e8;
    border-radius: 0;
  }

  .takeaway-card li::before {
    left: 2mm;
    color: #087b7a !important;
  }

  .resource-panel {
    padding: 6mm;
    border: 1px solid #cfd8de;
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .resource-list {
    gap: 3mm;
  }

  .resource-card {
    padding: 4mm;
    background: #ffffff !important;
    border: 1px solid #dbe4e8;
    border-radius: 0;
  }

  .resource-card::after {
    content: attr(href);
    color: #4e6572 !important;
    font-size: 8pt;
    overflow-wrap: anywhere;
  }

  .project-steps {
    break-before: auto;
  }

  .step-list {
    gap: 3mm;
  }

  .step-list article {
    grid-template-columns: 11mm 1fr;
    padding: 3.5mm;
    border-radius: 0;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .step-list span {
    width: 9mm;
    height: 9mm;
    background: #e8fbfa !important;
    border: 1px solid #b7dadd;
    border-radius: 0;
  }
}
