:root {
  --bg: #070715;
  --panel: rgba(255, 255, 255, 0.10);
  --panel-strong: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.75);
  --green: #84ff59;
  --cyan: #20d6ff;
  --pink: #ff4968;
  --gold: #ffd447;
  --purple: #8c74ff;
  --line: rgba(255, 255, 255, 0.18);
  font-family: Inter, ui-rounded, "SF Pro Rounded", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 73, 104, 0.22), transparent 32rem),
    radial-gradient(circle at 86% 20%, rgba(32, 214, 255, 0.18), transparent 30rem),
    radial-gradient(circle at 50% 100%, rgba(132, 255, 89, 0.12), transparent 26rem),
    var(--bg);
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(7, 7, 21, 0.74);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 950;
  font-size: 1.2rem;
}

.brand-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(132, 255, 89, 0.26);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.nav a {
  padding: 0.55rem 0.85rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 850;
  font-size: 0.9rem;
  border-radius: 999px;
}

.nav a:hover,
.nav a:focus-visible {
  color: #07100b;
  background: var(--green);
  outline: none;
}

.hero {
  position: relative;
  min-height: min(760px, 92vh);
  display: grid;
  align-items: end;
  padding: clamp(6rem, 11vw, 9rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 7, 21, 0.12), rgba(7, 7, 21, 0.68)),
    url("assets/pointbase-wallpaper.png") center / cover no-repeat;
  filter: saturate(1.18);
  transform: scale(1.03);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 32%;
  background: linear-gradient(0deg, var(--bg), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.beta-badge {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 0.9rem;
  padding: 0.48rem 0.7rem;
  border: 1px solid rgba(255, 212, 71, 0.42);
  border-radius: 999px;
  color: #07100b;
  background: linear-gradient(135deg, var(--gold), var(--green));
  box-shadow: 0 12px 32px rgba(255, 212, 71, 0.14);
  font-size: 0.78rem;
  font-weight: 1000;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0.75rem;
  font-size: clamp(4.2rem, 16vw, 10rem);
  line-height: 0.86;
  font-weight: 1000;
  letter-spacing: 0;
  text-shadow: 0 0 34px rgba(255, 73, 104, 0.44);
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.1rem, 6vw, 4.8rem);
  line-height: 0.95;
  font-weight: 1000;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.45rem;
  font-weight: 1000;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 730px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1.18rem, 3vw, 1.75rem);
  line-height: 1.35;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  min-height: 3.3rem;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 950;
}

.button.primary {
  color: #07100b;
  background: linear-gradient(135deg, var(--green), var(--gold));
  box-shadow: 0 12px 34px rgba(132, 255, 89, 0.24);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.12);
}

.button.danger {
  color: #ffffff;
  background: rgba(255, 73, 104, 0.22);
  border-color: rgba(255, 73, 104, 0.44);
}

.math-float {
  position: absolute;
  z-index: 1;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(7, 7, 21, 0.38);
  font-weight: 1000;
  backdrop-filter: blur(10px);
  animation: floaty 5s ease-in-out infinite;
}

.math-a {
  top: 25%;
  right: 11%;
  color: var(--gold);
}

.math-b {
  top: 48%;
  right: 24%;
  color: var(--green);
  animation-delay: -1.4s;
}

.math-c {
  top: 34%;
  left: 7%;
  color: var(--cyan);
  animation-delay: -2.5s;
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

.section {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3.2rem, 8vw, 6rem) 0;
}

.intro-grid,
.trust-grid,
.leaderboard-band {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.intro-grid p,
.leaderboard-band p,
.beta p,
.legal-panel p,
.legal-list {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
  font-weight: 650;
}

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

.feature-card {
  min-height: 220px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.feature-card span {
  display: inline-flex;
  margin-bottom: 2.1rem;
  color: #07100b;
  background: var(--gold);
  padding: 0.38rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 1000;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.5;
  font-weight: 650;
}

.feature-card.hot { background: linear-gradient(145deg, rgba(255, 73, 104, 0.35), var(--panel)); }
.feature-card.green { background: linear-gradient(145deg, rgba(132, 255, 89, 0.28), var(--panel)); }
.feature-card.blue { background: linear-gradient(145deg, rgba(32, 214, 255, 0.28), var(--panel)); }
.feature-card.gold { background: linear-gradient(145deg, rgba(255, 212, 71, 0.28), var(--panel)); }
.feature-card.purple { background: linear-gradient(145deg, rgba(140, 116, 255, 0.33), var(--panel)); }
.feature-card.boss { background: linear-gradient(145deg, rgba(255, 73, 104, 0.30), rgba(7, 7, 21, 0.82)); }

.teacher-app {
  width: min(1240px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.teacher-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  align-items: end;
  margin-bottom: clamp(1.5rem, 4vw, 2.75rem);
}

.teacher-hero h1 {
  margin-bottom: 0.5rem;
  font-size: clamp(3.1rem, 10vw, 7.2rem);
}

.education-hero {
  align-items: center;
  padding: clamp(1.25rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(32, 214, 255, 0.10), rgba(132, 255, 89, 0.08)),
    rgba(255, 255, 255, 0.08);
}

.education-hero h1 {
  max-width: 780px;
  font-size: clamp(2.8rem, 7vw, 5.8rem);
  line-height: 0.96;
  text-shadow: none;
}

.teacher-copy {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.5;
  font-weight: 750;
}

.education-snapshot {
  display: grid;
  gap: 0.75rem;
  min-width: min(360px, 100%);
}

.education-snapshot div {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.education-snapshot span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.education-snapshot strong {
  color: var(--green);
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.education-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 1.25rem 0;
}

.education-card {
  min-height: 0;
  padding: 1.1rem 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
}

.education-card span {
  display: inline-flex;
  margin-bottom: 1.25rem;
  color: #07100b;
  background: var(--green);
  padding: 0.38rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 1000;
}

.education-card p,
.education-steps p {
  color: var(--muted);
  line-height: 1.65;
  font-weight: 650;
}

.education-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
  margin: 1.25rem 0;
}

.education-steps {
  display: grid;
  gap: 0.7rem;
}

.education-steps p {
  margin: 0;
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
}

.education-steps strong {
  color: #ffffff;
}

.education-simple {
  width: min(1040px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.education-intro {
  max-width: 860px;
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
}

.education-intro h1 {
  max-width: 720px;
  margin-bottom: 1.05rem;
  font-size: clamp(2.25rem, 5vw, 4.1rem);
  line-height: 1.04;
  font-weight: 950;
  text-shadow: none;
}

.education-lede {
  max-width: 720px;
  color: rgba(255, 255, 255, 0.80);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.65;
  font-weight: 650;
}

.education-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.education-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.education-proof span {
  display: inline-flex;
  padding: 0.5rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.88rem;
  font-weight: 850;
}

.education-trust {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: start;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.education-trust h2 {
  max-width: 520px;
  margin-bottom: 0;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.1;
  text-shadow: none;
}

.education-trust p:not(.eyebrow) {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 650;
}

.education-list {
  display: grid;
  gap: 0;
  margin-top: clamp(1.25rem, 4vw, 2.5rem);
}

.education-list article {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: clamp(0.75rem, 3vw, 1.5rem);
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.education-list span {
  color: var(--green);
  font-size: 0.9rem;
  font-weight: 1000;
}

.education-list h3 {
  margin-bottom: 0.35rem;
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  line-height: 1.1;
}

.education-list p {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.65;
  font-weight: 650;
}

.teacher-code {
  min-width: 190px;
  padding: 1rem;
  border: 1px solid rgba(132, 255, 89, 0.38);
  border-radius: 8px;
  text-align: center;
  background: rgba(132, 255, 89, 0.12);
  box-shadow: 0 18px 42px rgba(132, 255, 89, 0.12);
}

.teacher-code span,
.stage-top span {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.teacher-code strong {
  color: var(--green);
  font-size: 2rem;
}

.teacher-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
}

.account-layout {
  margin-bottom: 1rem;
}

.teacher-panel,
.classroom-stage {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.profile-page {
  width: min(1120px, calc(100% - 2rem));
}

.profile-page .teacher-hero {
  margin-bottom: 1rem;
}

.profile-page .education-hero {
  padding: clamp(1rem, 3vw, 2rem);
}

.profile-page .education-hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
}

.profile-page .teacher-panel {
  background: rgba(255, 255, 255, 0.075);
}

.profile-page .teacher-panel h2 {
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.teacher-panel h2 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
}

.profile-page .teacher-panel h2 {
  font-size: clamp(1.65rem, 3vw, 2.6rem);
  line-height: 1.05;
}

.field-label,
.settings-grid label {
  display: grid;
  gap: 0.45rem;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 900;
}

.name-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.name-entry input,
.settings-grid input,
.settings-grid select,
.settings-grid textarea,
.saved-class-entry select {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  font: inherit;
  font-weight: 850;
}

.settings-grid textarea {
  min-height: 8rem;
  resize: vertical;
  line-height: 1.45;
}

.wide-field {
  grid-column: 1 / -1;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-height: 4rem;
  margin-top: 1rem;
}

.player-chip {
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 212, 71, 0.36);
  border-radius: 999px;
  color: #07100b;
  background: var(--gold);
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
}

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

.start-class {
  width: 100%;
  margin-top: 1rem;
}

.save-note {
  min-height: 1.4rem;
  margin: 0.8rem 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.class-library-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.class-library {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.class-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.class-card strong,
.class-card span {
  display: block;
}

.class-card strong {
  font-size: 1.05rem;
}

.class-card span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-weight: 800;
}

.roster-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.roster-pill {
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  cursor: pointer;
}

.roster-pill:hover,
.roster-pill:focus-visible {
  color: #07100b;
  background: var(--gold);
  outline: none;
}

.live-classroom {
  margin-bottom: 1rem;
  background:
    linear-gradient(135deg, rgba(132, 255, 89, 0.08), rgba(32, 214, 255, 0.07)),
    rgba(255, 255, 255, 0.075);
}

.live-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.live-heading h2 {
  font-size: clamp(2.1rem, 5vw, 4.2rem);
}

.live-tabs {
  display: inline-flex;
  flex-shrink: 0;
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
}

.live-tab {
  min-height: 2.8rem;
  padding: 0.65rem 1rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.live-tab.active {
  color: #07100b;
  background: var(--green);
}

.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.55fr);
  gap: 1rem;
}

.live-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.live-card > input {
  width: 100%;
  min-height: 3.2rem;
  margin-bottom: 0.8rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  font: inherit;
  font-weight: 850;
}

.room-card {
  display: grid;
  align-content: center;
  min-height: 100%;
  text-align: center;
}

.room-card span {
  color: var(--muted);
  font-weight: 950;
  text-transform: uppercase;
}

.room-card strong {
  display: block;
  margin: 0.35rem 0;
  color: var(--green);
  font-size: clamp(2.4rem, 7vw, 4.4rem);
  line-height: 1;
}

.room-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.live-room-board {
  margin-top: 1rem;
}

.student-app .teacher-hero h1 {
  font-size: clamp(3rem, 9vw, 7rem);
}

.student-join-panel {
  margin-bottom: 1rem;
}

.freeplay-page {
  width: min(1100px, calc(100% - 2rem));
  min-height: calc(100vh - 96px);
  display: grid;
  align-content: center;
}

.freeplay-hero {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
  margin-bottom: 1rem;
}

.freeplay-hero .teacher-copy {
  margin: 0 auto;
}

.freeplay-center {
  display: grid;
  justify-items: center;
}

.freeplay-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.freeplay-choice-card {
  display: grid;
  gap: 0.45rem;
  width: 100%;
  min-height: 10rem;
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

.freeplay-choice-card strong {
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1.05;
}

.freeplay-choice-card small {
  color: var(--muted);
  font: inherit;
  font-weight: 750;
  line-height: 1.45;
}

.freeplay-choice-card:hover,
.freeplay-choice-card:focus-visible {
  outline: 3px solid rgba(132, 255, 89, 0.44);
  outline-offset: 3px;
}

.freeplay-card {
  width: min(620px, 100%);
  text-align: center;
}

.freeplay-card h2 {
  max-width: 540px;
  margin: 0 auto 0.75rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.02;
}

.freeplay-card .button {
  width: min(360px, 100%);
  margin-top: 1rem;
}

.freeplay-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.freeplay-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
  text-align: left;
}

.freeplay-options label {
  display: grid;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.freeplay-form input,
.freeplay-options select {
  width: 100%;
  min-height: 3.5rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.28);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 900;
  text-align: center;
}

.freeplay-options select {
  appearance: none;
  text-align: left;
}

.freeplay-form .button {
  width: 100%;
  margin-top: 0;
}

.freeplay-lobby {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.freeplay-code-block {
  display: grid;
  gap: 0.25rem;
}

.freeplay-code-block span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.freeplay-code-block strong {
  color: var(--green);
  font-size: clamp(3rem, 9vw, 6rem);
  line-height: 1;
}

.freeplay-code-block p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.room-summary {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(132, 255, 89, 0.28);
  border-radius: 8px;
  background: rgba(132, 255, 89, 0.10);
}

.room-summary span,
.refresh-pill {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.room-summary strong {
  color: var(--green);
  font-size: 1.5rem;
}

.waiting-roster {
  margin-top: 1rem;
}

.refresh-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(32, 214, 255, 0.28);
  border-radius: 999px;
  color: var(--cyan);
  background: rgba(32, 214, 255, 0.10);
}

.score-report-panel {
  margin-bottom: 1rem;
}

.auth-page {
  min-height: calc(100vh - 9rem);
  display: grid;
  align-items: center;
}

.auth-card {
  width: min(760px, 100%);
  margin: 0 auto;
}

.auth-card h1 {
  font-size: clamp(2.8rem, 8vw, 5.2rem);
}

.auth-card .teacher-copy {
  margin-bottom: 1.25rem;
}

.read-first-panel {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid rgba(132, 255, 89, 0.30);
  border-radius: 8px;
  background: rgba(132, 255, 89, 0.10);
}

.read-first-panel h3 {
  margin-bottom: 0;
}

.read-first-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  font-weight: 750;
}

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

.school-privacy-grid > div {
  padding: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.16);
}

.school-privacy-grid > div > strong {
  display: block;
  margin-bottom: 0.3rem;
  color: #ffffff;
}

.read-first-panel .privacy-guidance {
  padding-left: 0.85rem;
  border-left: 3px solid var(--gold);
  color: rgba(255, 255, 255, 0.9);
}

.terms-check {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  color: #ffffff;
  font-weight: 900;
}

.terms-check input {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2rem;
  accent-color: var(--green);
}

.auth-notice {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(32, 214, 255, 0.34);
  border-radius: 8px;
  background: rgba(32, 214, 255, 0.12);
}

.auth-notice strong {
  color: var(--cyan);
}

.auth-notice span {
  color: rgba(255, 255, 255, 0.80);
  font-weight: 800;
}

.registration-success {
  justify-items: center;
  max-width: 620px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  text-align: center;
}

.registration-success h2 {
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 4rem);
}

.registration-success p {
  max-width: 34rem;
  margin: 0.4rem auto;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.55;
}

.registration-success .button {
  width: min(320px, 100%);
  margin-top: 0.75rem;
}

.confirmation-mark {
  display: grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border: 1px solid rgba(32, 214, 255, 0.42);
  border-radius: 50%;
  color: #07121a;
  background: var(--cyan);
  font-size: 0.78rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.education-privacy-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.education-privacy-section h2 {
  font-size: clamp(1.8rem, 5vw, 3rem);
}

@media (max-width: 680px) {
  .school-privacy-grid {
    grid-template-columns: 1fr;
  }
}

.password-guidance {
  margin: 0.75rem 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
  font-weight: 750;
}

.auth-text-button {
  display: block;
  margin: 0.9rem auto 0;
  padding: 0.35rem;
  border: 0;
  color: var(--cyan);
  background: transparent;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.auth-text-button:hover,
.auth-text-button:focus-visible {
  color: #ffffff;
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* Secure teacher portal */
.profile-page {
  width: min(1180px, calc(100% - 2rem));
  padding-top: clamp(1.25rem, 3vw, 2.5rem);
}

.portal-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.portal-header h1 {
  margin: 0.2rem 0 0.35rem;
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  line-height: 1;
}

.portal-header p:not(.eyebrow) {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.portal-notice {
  margin: 0.75rem 0;
  padding: 0.65rem 0.8rem;
  border-left: 3px solid var(--cyan);
  color: rgba(255, 255, 255, 0.82);
  background: rgba(32, 214, 255, 0.08);
  font-weight: 800;
}

.portal-notice:empty {
  display: none;
}

.portal-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 1rem 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.portal-metrics > div {
  min-width: 0;
  padding: 0.9rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-metrics > div:last-child {
  border-right: 0;
}

.portal-metrics span,
.portal-metrics strong {
  display: block;
}

.portal-metrics span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.75rem;
  font-weight: 950;
  text-transform: uppercase;
}

.portal-metrics strong {
  margin-top: 0.25rem;
  overflow-wrap: anywhere;
  color: #ffffff;
  font-size: clamp(1.25rem, 3vw, 2rem);
}

.portal-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.portal-tab {
  min-height: 3rem;
  padding: 0.65rem 0.75rem;
  border: 0;
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.portal-tab:hover,
.portal-tab:focus-visible {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.portal-tab.active {
  color: #07100b;
  background: var(--green);
}

.portal-section {
  margin-bottom: 1rem;
}

.portal-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.85rem;
}

.portal-section-heading h2 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.portal-limit {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.85rem;
  font-weight: 900;
}

.portal-section .teacher-layout {
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
}

.portal-section .class-library-panel {
  display: block;
  margin: 0;
}

.class-library-heading {
  margin-bottom: 0.85rem;
}

.class-library-heading h3 {
  margin-bottom: 0.25rem;
}

.class-library-heading p {
  margin: 0;
  color: rgba(255, 255, 255, 0.64);
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (max-width: 760px) {
  .portal-header,
  .portal-section-heading {
    display: grid;
    align-items: start;
  }

  .portal-header .button {
    width: 100%;
  }

  .portal-metrics,
  .portal-tabs,
  .portal-section .teacher-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .portal-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .portal-metrics > div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .portal-section .teacher-layout {
    grid-template-columns: 1fr;
  }
}

.report-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.report-heading h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.report-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
}

.score-report-list,
.missed-report-list {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.report-card,
.missed-card {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
}

.report-card strong,
.report-card span,
.missed-card strong,
.missed-card span {
  display: block;
}

.report-card span,
.missed-card span {
  margin-top: 0.3rem;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.correct-card {
  border-color: rgba(132, 255, 89, 0.32);
}

.correct-card strong {
  color: var(--green);
}

.wrong-card {
  border-color: rgba(255, 73, 104, 0.36);
}

.wrong-card strong {
  color: var(--pink);
}

.mini-score-list {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.75rem;
}

.mini-score-list p {
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 900;
}

.hidden {
  display: none !important;
}

.classroom-stage {
  margin-top: 1rem;
}

.stage-top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stage-top > div {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
}

.stage-top strong {
  color: var(--green);
  font-size: clamp(1.25rem, 3vw, 2rem);
}

#timer-display.hot {
  color: var(--pink);
  text-shadow: 0 0 22px rgba(255, 73, 104, 0.78);
}

.question-board {
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid rgba(32, 214, 255, 0.28);
  border-radius: 8px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(32, 214, 255, 0.18), rgba(255, 73, 104, 0.12)),
    rgba(0, 0, 0, 0.22);
}

.question-board p {
  color: rgba(255, 255, 255, 0.74);
  font-weight: 850;
}

.question-board h2 {
  margin: 0.4rem 0 1.2rem;
  font-size: clamp(4rem, 12vw, 8.8rem);
}

.answer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.answer-choice {
  min-height: 5.6rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #07100b;
  background: linear-gradient(135deg, var(--gold), var(--green));
  font: inherit;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 1000;
  cursor: pointer;
}

.answer-choice:hover,
.answer-choice:focus-visible,
.score-row:hover,
.score-row:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.42);
  outline-offset: 2px;
}

.player-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.24);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.score-row.selected {
  color: #07100b;
  background: var(--cyan);
}

.score-row strong {
  color: var(--green);
  font-size: 1.45rem;
}

.score-row.selected strong {
  color: #07100b;
}

.stage-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 1rem;
}

.final {
  margin-bottom: 1rem;
}

.leaderboard-band,
.beta,
.legal-panel {
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.09);
}

.score-stack {
  display: grid;
  gap: 0.75rem;
}

.score-stack div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid var(--line);
}

.score-stack span {
  color: var(--muted);
  font-weight: 850;
}

.score-stack strong {
  color: var(--green);
  font-size: 1.8rem;
}

.trust-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.trust-list li {
  padding: 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid var(--line);
  font-weight: 900;
}

.beta a,
.legal-panel a,
.footer a {
  color: var(--green);
  font-weight: 900;
}

.legal-page {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 7rem) 0;
}

.legal-panel h1 {
  font-size: clamp(2.5rem, 8vw, 4.8rem);
  line-height: 0.95;
}

.legal-panel h2 {
  margin-top: 2rem;
  font-size: clamp(1.65rem, 4vw, 2.25rem);
}

.legal-list {
  padding-left: 1.2rem;
}

.last-updated {
  color: rgba(255, 255, 255, 0.58);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(0, 0, 0, 0.20);
}

.footer p {
  margin: 0;
  font-weight: 900;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

@media (max-width: 820px) {
  .site-header,
  .footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .intro-grid,
  .trust-grid,
  .leaderboard-band {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .trust-list {
    grid-template-columns: 1fr;
  }

  .education-list article {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .education-trust {
    grid-template-columns: 1fr;
  }

  .education-actions .button {
    width: 100%;
  }

  .teacher-hero,
  .teacher-layout,
  .class-library-panel,
  .class-library,
  .class-card,
  .education-grid,
  .education-band,
  .live-heading,
  .live-grid,
  .freeplay-choice,
  .report-grid,
  .stage-top,
  .player-scoreboard,
  .stage-actions,
  .freeplay-lobby {
    grid-template-columns: 1fr;
  }

  .freeplay-page {
    min-height: auto;
    align-content: start;
    padding-top: 2rem;
  }

  .freeplay-hero {
    text-align: left;
    justify-items: start;
  }

  .freeplay-lobby {
    text-align: center;
  }

  .freeplay-options {
    grid-template-columns: 1fr;
  }

  .live-heading,
  .report-heading {
    display: grid;
  }

  .live-tabs {
    width: 100%;
  }

  .live-tab {
    flex: 1;
  }

  .teacher-code {
    width: 100%;
  }

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

  .hero {
    min-height: 760px;
  }

  .math-float {
    display: none;
  }
}

/* Premium public website */
.premium-site {
  --premium-ink: #080918;
  --premium-paper: #f6f7fb;
  --premium-lime: #7cff4d;
  --premium-cyan: #27c9ee;
  --premium-coral: #ff4f70;
  --premium-gold: #ffd24a;
  color: #fff;
  background: var(--premium-ink);
}

.premium-header,
.education-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  min-height: 4.5rem;
  padding: 0 clamp(1rem, 4vw, 3.5rem);
}

.premium-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 9, 24, 0.9);
  backdrop-filter: blur(18px);
}

.premium-brand,
.education-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  font-size: 1.12rem;
  font-weight: 950;
  text-decoration: none;
}

.premium-brand img,
.education-brand img {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 7px;
}

.premium-nav,
.education-header nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.premium-nav a,
.education-header nav a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.premium-nav a:hover,
.premium-nav a:focus-visible {
  color: #fff;
}

.premium-header-action {
  padding: 0.65rem 1rem;
  border-radius: 6px;
  color: var(--premium-ink);
  background: var(--premium-lime);
  font-size: 0.88rem;
  font-weight: 950;
  text-decoration: none;
}

.premium-hero {
  position: relative;
  display: grid;
  min-height: min(760px, 82svh);
  align-items: center;
  overflow: hidden;
  padding: clamp(4rem, 9vw, 8rem) clamp(1rem, 7vw, 7rem);
  isolation: isolate;
}

.premium-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -3;
  background: url("assets/pointbase-wallpaper.png") center / cover no-repeat;
  filter: saturate(1.1);
}

.premium-hero-media {
  position: absolute;
  inset: 2rem 2vw -22rem 47%;
  z-index: -1;
  display: flex;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  transform: rotate(2deg);
}

.premium-screen {
  width: min(24vw, 310px);
  height: auto;
  align-self: start;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 8px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
}

.screen-welcome { margin-top: 7rem; }
.screen-boss { margin-top: 4rem; }

.premium-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(90deg, rgba(8, 9, 24, 0.98) 0%, rgba(8, 9, 24, 0.88) 34%, rgba(8, 9, 24, 0.42) 66%, rgba(8, 9, 24, 0.68) 100%);
}

.premium-hero-content {
  max-width: 650px;
  min-width: 0;
}

.premium-kicker,
.education-kicker {
  margin: 0 0 0.8rem;
  color: var(--premium-lime);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.premium-hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(4.2rem, 13vw, 9.5rem);
  line-height: 0.84;
  text-shadow: none;
}

.premium-hero-content > p:not(.premium-kicker) {
  max-width: 600px;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  font-weight: 650;
  line-height: 1.55;
}

.premium-actions,
.education-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.premium-button,
.education-button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 900;
  text-decoration: none;
}

.premium-button.primary,
.education-button.primary {
  color: var(--premium-ink);
  background: var(--premium-lime);
}

.premium-button.secondary {
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  background: rgba(8, 9, 24, 0.42);
}

.premium-button.dark {
  color: #fff;
  background: var(--premium-ink);
}

.premium-scroll-cue {
  position: absolute;
  bottom: 1.25rem;
  left: clamp(1rem, 7vw, 7rem);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.premium-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid rgba(255, 255, 255, 0.12);
  background: #0e1026;
}

.premium-proof div {
  display: grid;
  gap: 0.2rem;
  padding: 1.25rem clamp(1rem, 3vw, 2.5rem);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-proof strong { color: var(--premium-gold); font-size: 1.45rem; }
.premium-proof span { color: rgba(255, 255, 255, 0.66); font-size: 0.82rem; font-weight: 750; }

.premium-product {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.7fr);
  gap: clamp(2rem, 8vw, 8rem);
  align-items: center;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) 0;
}

.premium-product.reverse .premium-product-copy { order: 2; }
.premium-product.reverse .premium-product-visual { order: 1; }

.premium-product h2,
.premium-live-copy h2,
.premium-education-band h2,
.premium-safety h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  line-height: 0.98;
}

.premium-product-copy > p:not(.premium-kicker),
.premium-live-copy > p:not(.premium-kicker),
.premium-education-band p,
.premium-safety p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.05rem;
  line-height: 1.65;
}

.premium-product-visual {
  position: relative;
  width: min(100%, 420px);
  margin: 0 auto;
}

.premium-product-visual::before {
  content: "";
  position: absolute;
  inset: 8% -12%;
  z-index: -1;
  border-radius: 8px;
  background: var(--premium-cyan);
  opacity: 0.18;
}

.boss-visual::before { background: var(--premium-coral); }
.premium-product-visual img { display: block; width: 100%; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; box-shadow: 0 40px 90px rgba(0,0,0,.36); }

.premium-checks { display: grid; gap: 0.65rem; padding: 0; list-style: none; }
.premium-checks li { position: relative; padding-left: 1.5rem; color: rgba(255,255,255,.8); font-weight: 750; }
.premium-checks li::before { content: "✓"; position: absolute; left: 0; color: var(--premium-lime); }
.premium-statline { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.premium-statline span { padding: 0.75rem 0.9rem; border-left: 3px solid var(--premium-gold); background: rgba(255,255,255,.06); }
.premium-statline strong { display: block; color: var(--premium-gold); font-size: 1.4rem; }

.premium-live-band {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1fr);
  min-height: 650px;
  overflow: hidden;
  color: var(--premium-ink);
  background: var(--premium-gold);
}
.premium-live-image { position: relative; min-height: 650px; overflow: hidden; }
.premium-live-image img { position: absolute; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.premium-live-copy { align-self: center; max-width: 700px; padding: clamp(3rem, 8vw, 7rem); }
.premium-live-copy .premium-kicker { color: #6a3c00; }
.premium-live-copy > p:not(.premium-kicker) { color: rgba(8,9,24,.74); }

.premium-education-band,
.premium-safety {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3rem;
  align-items: end;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) 0;
}
.premium-education-actions { display: grid; gap: 1rem; justify-items: center; }
.premium-text-link { color: #fff; font-weight: 850; }
.premium-safety { grid-template-columns: minmax(260px, .7fr) 1.3fr; border-top: 1px solid rgba(255,255,255,.12); }
.premium-safety-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0; border-top: 1px solid rgba(255,255,255,.14); }
.premium-safety-grid p { display: grid; gap: .25rem; margin: 0; padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.premium-safety-grid p:nth-child(odd) { padding-right: 1rem; }
.premium-safety-grid p:nth-child(even) { padding-left: 1rem; border-left: 1px solid rgba(255,255,255,.14); }
.premium-safety-grid strong { color: #fff; }
.premium-safety-grid span { color: rgba(255,255,255,.62); font-size: .9rem; }

.premium-footer,
.education-footer {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(0, .6fr));
  gap: 2rem;
  padding: 3rem clamp(1rem, 5vw, 5rem);
}
.premium-footer { border-top: 1px solid rgba(255,255,255,.12); background: #050611; }
.premium-footer > div p { margin-top: 1rem; color: rgba(255,255,255,.55); }
.premium-footer nav,
.education-footer nav { display: grid; align-content: start; gap: .65rem; }
.premium-footer nav a { color: rgba(255,255,255,.64); text-decoration: none; font-size: .9rem; }

/* Premium education website */
.education-site {
  --edu-ink: #182033;
  --edu-muted: #647087;
  --edu-paper: #f5f7fb;
  --edu-line: #dce1ea;
  --edu-green: #35b866;
  --edu-cyan: #1b9fc3;
  --edu-coral: #ed5c6f;
  --edu-gold: #f2b63d;
  color: var(--edu-ink);
  background: #fff;
}
.education-header { border-bottom: 1px solid var(--edu-line); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); }
.education-brand span { display: grid; line-height: 1; }
.education-brand small { margin-top: .2rem; color: var(--edu-green); font-size: .68rem; text-transform: uppercase; }
.education-header nav a { color: var(--edu-muted); }
.education-header-actions { display: flex; align-items: center; gap: 1rem; }
.education-header-actions a { color: var(--edu-ink); font-size: .88rem; font-weight: 850; text-decoration: none; }
.education-header-actions .education-signin { padding: .65rem 1rem; border-radius: 6px; color: #fff; background: var(--edu-ink); }

.education-premium-hero {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(430px, .8fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
  min-height: min(760px, 82svh);
  padding: clamp(4rem, 8vw, 7rem) clamp(1rem, 6vw, 6rem);
  overflow: hidden;
  background: linear-gradient(120deg, #fff 0%, #f7fbf8 55%, #eef8fb 100%);
}
.education-beta { display: inline-flex; margin-bottom: 1rem; padding: .45rem .65rem; border-radius: 5px; color: #17633a; background: #dcf5e5; font-size: .72rem; font-weight: 950; text-transform: uppercase; }
.education-kicker { color: var(--edu-green); }
.education-hero-copy h1 { margin-bottom: 1.2rem; color: var(--edu-ink); font-size: clamp(2.8rem, 6.3vw, 5.8rem); line-height: .96; text-shadow: none; }
.education-hero-copy > p:not(.education-kicker,.education-assurance) { max-width: 670px; color: var(--edu-muted); font-size: 1.15rem; line-height: 1.65; }
.education-button.secondary { border-color: var(--edu-line); color: var(--edu-ink); background: #fff; }
.education-assurance { margin-top: 1rem; color: var(--edu-muted); font-size: .84rem; font-weight: 750; }

.education-dashboard-preview {
  position: relative;
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--edu-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 35px 90px rgba(24,32,51,.14);
}
.education-dashboard-preview::before { content: ""; position: absolute; inset: 1.5rem -2rem -2rem 2rem; z-index: -1; border-radius: 7px; background: var(--edu-cyan); opacity: .12; }
.preview-top { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; padding-bottom: .9rem; border-bottom: 1px solid var(--edu-line); }
.preview-top span { color: var(--edu-green); font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.preview-top strong { grid-column: 1; font-size: 1.25rem; }
.preview-top small { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--edu-muted); }
.preview-metrics { display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--edu-line); border-radius: 6px; }
.preview-metrics p { display: grid; gap: .3rem; margin: 0; padding: .85rem; border-right: 1px solid var(--edu-line); }
.preview-metrics p:last-child { border: 0; }
.preview-metrics span { color: var(--edu-muted); font-size: .7rem; }
.preview-metrics strong { font-size: 1.45rem; }
.preview-chart { padding: 1rem; border: 1px solid var(--edu-line); border-radius: 6px; }
.chart-heading { display: flex; justify-content: space-between; }
.chart-heading span { color: var(--edu-green); font-weight: 900; }
.chart-bars { display: flex; height: 8rem; align-items: end; gap: .65rem; margin-top: 1rem; border-bottom: 1px solid var(--edu-line); }
.chart-bars i { flex: 1; min-height: 1rem; border-radius: 3px 3px 0 0; background: var(--edu-cyan); }
.chart-bars i:last-child { background: var(--edu-green); }
.preview-table > div,
.preview-table p { display: grid; grid-template-columns: 1fr 4rem 4.5rem; gap: .75rem; margin: 0; padding: .65rem .25rem; border-bottom: 1px solid var(--edu-line); font-size: .78rem; }
.preview-table > div { color: var(--edu-muted); }
.preview-table b { color: var(--edu-green); }
.preview-table em { color: var(--edu-coral); font-style: normal; }

.education-trust-line { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem 2.5rem; padding: 1.2rem 1rem; border-block: 1px solid var(--edu-line); color: var(--edu-muted); background: var(--edu-paper); font-size: .82rem; font-weight: 800; }
.education-workflow,
.education-tools,
.education-levels,
.education-safety,
.education-final-cta { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(4rem, 9vw, 7rem) 0; }
.education-section-heading { max-width: 760px; }
.education-section-heading h2,
.education-tool-copy h2,
.education-levels h2,
.education-safety h2,
.education-final-cta h2 { margin-bottom: 1rem; color: var(--edu-ink); font-size: clamp(2.1rem, 5vw, 4rem); line-height: 1; }
.education-section-heading > p:not(.education-kicker),
.education-tool-copy > p:not(.education-kicker),
.education-safety p { color: var(--edu-muted); line-height: 1.65; }
.workflow-steps { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 2.5rem; border-top: 1px solid var(--edu-line); }
.workflow-steps article { padding: 1.5rem 1.5rem 1.5rem 0; border-right: 1px solid var(--edu-line); }
.workflow-steps article + article { padding-left: 1.5rem; }
.workflow-steps article:last-child { border: 0; }
.workflow-steps span { color: var(--edu-coral); font-size: .72rem; font-weight: 950; }
.workflow-steps h3 { margin: .9rem 0 .5rem; font-size: 1.25rem; }
.workflow-steps p { color: var(--edu-muted); line-height: 1.55; }

.education-tools { display: grid; grid-template-columns: minmax(0, .85fr) minmax(350px,.7fr); gap: clamp(3rem,8vw,8rem); align-items: center; }
.education-tools.reverse .education-tool-copy { order: 2; }
.education-tool-copy ul { display: grid; gap: .6rem; padding-left: 1.1rem; color: var(--edu-ink); font-weight: 750; }
.education-live-preview,
.education-assignment-preview { padding: 1.25rem; border: 1px solid var(--edu-line); border-radius: 7px; background: var(--edu-paper); box-shadow: 0 25px 70px rgba(24,32,51,.1); }
.live-preview-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding-bottom: 1rem; border-bottom: 1px solid var(--edu-line); }
.live-preview-head span { padding: .3rem .45rem; border-radius: 4px; color: #fff; background: var(--edu-coral); font-size: .68rem; font-weight: 950; }
.live-preview-head strong { font-size: 1.5rem; }
.live-preview-head small { color: var(--edu-green); font-weight: 800; }
.live-preview-question { display: grid; justify-items: center; gap: .45rem; padding: 2rem 0; }
.live-preview-question small { color: var(--edu-muted); }
.live-preview-question strong { font-size: 3rem; }
.live-preview-question span { color: var(--edu-coral); font-weight: 850; }
.live-preview-list p { display: flex; justify-content: space-between; margin: 0; padding: .65rem 0; border-top: 1px solid var(--edu-line); }
.live-preview-list strong { color: var(--edu-green); }
.education-assignment-preview > div { display: grid; gap: .3rem; }
.education-assignment-preview > div span { color: var(--edu-cyan); font-size: .72rem; font-weight: 950; text-transform: uppercase; }
.education-assignment-preview > div strong { font-size: 1.4rem; }
.education-assignment-preview > div small { color: var(--edu-muted); }
.education-assignment-preview progress { width: 100%; height: .65rem; margin: 1.5rem 0 .5rem; accent-color: var(--edu-green); }
.education-assignment-preview > p { display: flex; justify-content: space-between; color: var(--edu-muted); }
.education-assignment-preview dl { display: grid; grid-template-columns: 1fr 1fr; margin: 1.5rem 0 0; border-top: 1px solid var(--edu-line); }
.education-assignment-preview dl div { padding-top: 1rem; }
.education-assignment-preview dt { color: var(--edu-muted); font-size: .76rem; }
.education-assignment-preview dd { margin: .3rem 0 0; font-size: 1.5rem; font-weight: 900; }

.education-levels { display: grid; grid-template-columns: .7fr 1.3fr; gap: 3rem; border-block: 1px solid var(--edu-line); }
.level-track { display: grid; grid-template-columns: repeat(3,1fr); align-content: center; }
.level-track span { padding: 1rem; border-bottom: 1px solid var(--edu-line); color: var(--edu-muted); font-weight: 800; }
.level-track span:nth-child(3n+2), .level-track span:nth-child(3n+3) { border-left: 1px solid var(--edu-line); }
.education-safety { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem,7vw,7rem); }
.education-safety-links { display: grid; border-top: 1px solid var(--edu-line); }
.education-safety-links a { display: grid; gap: .25rem; padding: 1rem 0; border-bottom: 1px solid var(--edu-line); color: var(--edu-ink); text-decoration: none; }
.education-safety-links span { color: var(--edu-muted); font-size: .85rem; }
.education-final-cta { display: grid; justify-items: center; text-align: center; border-top: 1px solid var(--edu-line); }
.education-final-cta div { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.education-footer { color: var(--edu-ink); border-top: 1px solid var(--edu-line); background: var(--edu-paper); }
.education-footer > div p { max-width: 320px; margin-top: 1rem; color: var(--edu-muted); }
.education-footer nav a { color: var(--edu-muted); font-size: .88rem; text-decoration: none; }

@media (max-width: 900px) {
  .premium-nav,
  .education-header nav { display: none; }
  .premium-header,
  .education-header { grid-template-columns: 1fr auto; gap: 1rem; }
  .premium-hero-media { inset: 10% -12% -15rem 48%; opacity: .58; }
  .screen-welcome { display: none; }
  .premium-screen { width: min(42vw, 300px); }
  .premium-product,
  .premium-live-band,
  .premium-education-band,
  .premium-safety,
  .education-premium-hero,
  .education-tools,
  .education-levels,
  .education-safety { grid-template-columns: 1fr; }
  .premium-product.reverse .premium-product-copy,
  .premium-product.reverse .premium-product-visual,
  .education-tools.reverse .education-tool-copy { order: initial; }
  .premium-live-image { min-height: 480px; }
  .premium-education-actions { justify-items: start; }
  .premium-safety { align-items: start; }
  .education-premium-hero { min-height: auto; }
  .education-dashboard-preview { width: min(100%, 620px); }
  .premium-footer,
  .education-footer { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 600px) {
  .premium-header,
  .education-header { min-height: 4rem; padding-inline: .75rem; }
  .premium-header-action { padding: .55rem .7rem; }
  .education-header-actions > a:first-child { display: none; }
  .premium-hero { min-height: 80svh; padding-top: 5rem; align-items: end; }
  .premium-hero-media { inset: -1rem -45% 18% 38%; opacity: .44; }
  .screen-boss { display: none; }
  .premium-screen { width: 68vw; }
  .premium-hero-shade { background: linear-gradient(0deg, rgba(8,9,24,.98) 0%, rgba(8,9,24,.72) 56%, rgba(8,9,24,.42) 100%); }
  .premium-hero h1 { font-size: 4rem; }
  .premium-scroll-cue { display: none; }
  .premium-actions,
  .education-cta { display: grid; }
  .premium-proof { grid-template-columns: repeat(2,1fr); }
  .premium-product { grid-template-columns: 1fr; padding-block: 4rem; }
  .premium-product-visual { width: min(82%, 340px); }
  .premium-live-copy { padding: 3rem 1rem; }
  .premium-live-image { min-height: 420px; }
  .premium-safety-grid,
  .workflow-steps,
  .level-track { grid-template-columns: 1fr; }
  .premium-safety-grid p:nth-child(n) { padding-inline: 0; border-left: 0; }
  .workflow-steps article,
  .workflow-steps article + article { padding: 1.25rem 0; border-right: 0; border-bottom: 1px solid var(--edu-line); }
  .level-track span:nth-child(n) { border-left: 0; }
  .education-premium-hero { padding: 3.5rem 1rem; }
  .education-hero-copy h1 { font-size: 2.65rem; }
  .preview-table { overflow-x: auto; }
  .education-tools { grid-template-columns: minmax(0,1fr); }
  .premium-footer,
  .education-footer { grid-template-columns: 1fr; }
}

/* Free Play host controls */
.freeplay-lobby {
  grid-template-columns: minmax(18rem, 1fr) minmax(0, auto);
  column-gap: clamp(1rem, 3vw, 2rem);
}

.freeplay-code-block {
  min-width: 0;
}

.freeplay-code-block strong {
  overflow-wrap: anywhere;
}

.freeplay-host-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  align-self: center;
  width: min(100%, 30rem);
  margin: 0;
}

.freeplay-host-actions .button {
  width: auto;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.1;
  white-space: nowrap;
}

.freeplay-host-actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.freeplay-lobby > .save-note {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 820px) {
  .freeplay-lobby {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
  }

  .freeplay-host-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-self: center;
    width: min(100%, 28rem);
  }

  .freeplay-host-actions .button {
    width: 100%;
    white-space: normal;
  }
}

@media (max-width: 430px) {
  .freeplay-host-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* School trust and privacy */
.school-trust-page {
  width: min(100% - 2rem, 1040px);
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 4rem) 0;
}

.school-trust-hero {
  max-width: 760px;
  padding-bottom: 2rem;
}

.school-trust-hero h1 {
  margin: 0.35rem 0 0.75rem;
  font-size: clamp(2.5rem, 7vw, 5rem);
  line-height: 0.98;
}

.school-trust-hero > p:last-of-type {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.1rem;
  line-height: 1.6;
}

.trust-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--gold);
  background: rgba(255, 212, 71, 0.09);
}

.trust-status span,
.trust-section p,
.trust-section li {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.65;
}

.trust-jump {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.65rem 0;
  border-block: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(7, 7, 21, 0.92);
  backdrop-filter: blur(16px);
}

.trust-jump a {
  flex: 0 0 auto;
  padding: 0.55rem 0.75rem;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.trust-section {
  padding: clamp(2rem, 5vw, 4rem) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.trust-section h2 {
  max-width: 760px;
  margin: 0.35rem 0 1rem;
  font-size: clamp(1.65rem, 4vw, 2.7rem);
}

.trust-section > p,
.trust-section > ul {
  max-width: 820px;
}

.trust-table {
  margin: 1.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.trust-row {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1.15fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.trust-row span {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.45;
}

.trust-head strong {
  color: var(--cyan);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.trust-list {
  padding-left: 1.3rem;
}

.trust-list li + li {
  margin-top: 0.6rem;
}

.trust-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.text-link,
.student-privacy-note a,
.account-privacy-panel a {
  color: var(--cyan);
  font-weight: 800;
}

.student-privacy-note {
  margin-top: 1rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  line-height: 1.5;
}

.account-privacy-panel {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  align-items: center;
  margin-top: 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.account-privacy-panel h2 {
  margin: 0.2rem 0 0.45rem;
  font-size: 1.4rem;
}

.account-privacy-panel p {
  max-width: 650px;
  color: rgba(255, 255, 255, 0.72);
}

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

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

@media (max-width: 720px) {
  .trust-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .trust-head {
    display: none;
  }

  .account-privacy-panel {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Game Show Mode */
.buzzer-status {
  width: min(520px, 100%);
  margin: 0 auto 1rem;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.24);
  font-size: 1rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.game-show-buzzer {
  grid-column: 1 / -1;
  width: min(360px, 100%);
  min-height: 8rem;
  margin: 0 auto;
  border: 4px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  color: #ffffff;
  background: radial-gradient(circle at 35% 28%, #ff7388 0, #ff3155 34%, #a60025 100%);
  box-shadow: 0 14px 0 #620018, 0 26px 60px rgba(255, 49, 85, 0.45), inset 0 5px 10px rgba(255, 255, 255, 0.3);
  font: inherit;
  font-size: clamp(1.8rem, 6vw, 3rem);
  font-weight: 1000;
  cursor: pointer;
  transition: transform 100ms ease, box-shadow 100ms ease;
}

.game-show-buzzer:hover,
.game-show-buzzer:focus-visible {
  transform: translateY(3px);
  box-shadow: 0 10px 0 #620018, 0 22px 50px rgba(255, 49, 85, 0.5), inset 0 5px 10px rgba(255, 255, 255, 0.3);
}

.game-show-buzzer.queued {
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 10px 35px rgba(32, 214, 255, 0.28);
  cursor: default;
}

.game-show-answer {
  animation: answer-pop 180ms ease both;
}

@keyframes answer-pop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .math-float {
    animation: none;
  }
}

/* App polish pass */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 7, 21, 0.72), rgba(7, 7, 21, 0.92)),
    url("assets/pointbase-wallpaper.png") center / cover no-repeat;
  opacity: 0.54;
  pointer-events: none;
}

.site-header {
  padding-block: 0.8rem;
}

.brand span {
  line-height: 1;
}

.nav {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: clamp(1.25rem, 5vw, 4rem);
  align-items: end;
  min-height: min(760px, 88vh);
}

.hero-content {
  padding-bottom: clamp(0rem, 2vw, 2rem);
}

.hero h1 {
  font-size: clamp(4rem, 12vw, 8.4rem);
  line-height: 0.9;
}

.hero-copy {
  max-width: 660px;
}

.web-lobby-card {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.07)),
    rgba(7, 7, 21, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 28px 80px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
}

.lobby-brand-mark {
  display: inline-grid;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border-radius: 8px;
  color: #07100b;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  box-shadow: 0 16px 42px rgba(132, 255, 89, 0.24);
  font-size: 1.45rem;
  font-weight: 1000;
}

.freeplay-mark {
  margin: 0 auto 1rem;
}

.web-lobby-card h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  text-shadow: none;
}

.lobby-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.lobby-stat-row span {
  display: grid;
  min-height: 4.5rem;
  place-items: center;
  padding: 0.55rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.62);
  background: rgba(0, 0, 0, 0.18);
  font-size: 0.72rem;
  font-weight: 950;
  text-align: center;
  text-transform: uppercase;
}

.lobby-stat-row strong {
  display: block;
  color: #ffffff;
  font-size: 1.25rem;
  line-height: 1;
}

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

.mode-chip {
  display: flex;
  min-height: 3.3rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
  font-weight: 1000;
}

.mode-chip.rush { background: linear-gradient(145deg, rgba(255, 212, 71, 0.30), rgba(255, 255, 255, 0.08)); }
.mode-chip.kids { background: linear-gradient(145deg, rgba(32, 214, 255, 0.30), rgba(255, 255, 255, 0.08)); }
.mode-chip.web { background: linear-gradient(145deg, rgba(132, 255, 89, 0.25), rgba(255, 255, 255, 0.08)); }
.mode-chip.boss { background: linear-gradient(145deg, rgba(255, 73, 104, 0.34), rgba(255, 255, 255, 0.08)); }

.section {
  padding-block: clamp(2.6rem, 6vw, 4.8rem);
}

.feature-grid {
  gap: 0.8rem;
}

.feature-card {
  min-height: 190px;
  padding: 1rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055)),
    rgba(7, 7, 21, 0.40);
}

.feature-card span {
  margin-bottom: 1.35rem;
}

.leaderboard-band,
.education-trust,
.teacher-panel,
.classroom-stage {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055)),
    rgba(7, 7, 21, 0.42);
  backdrop-filter: blur(14px);
}

.education-simple {
  width: min(1120px, calc(100% - 2rem));
}

.education-intro {
  max-width: none;
  padding: clamp(1.15rem, 3vw, 1.7rem);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(32, 214, 255, 0.12), rgba(132, 255, 89, 0.07)),
    rgba(7, 7, 21, 0.50);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.education-intro h1 {
  font-size: clamp(2.35rem, 5vw, 4.25rem);
}

.education-proof span,
.beta-badge {
  border-radius: 8px;
}

.freeplay-page {
  width: min(1040px, calc(100% - 2rem));
}

.freeplay-hero h1 {
  font-size: clamp(3rem, 9vw, 6.5rem);
  line-height: 0.9;
}

.freeplay-center {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.freeplay-card {
  width: 100%;
  min-height: 100%;
  text-align: left;
}

.freeplay-card h2 {
  margin-inline: 0;
  font-size: clamp(1.7rem, 4vw, 2.8rem);
}

.freeplay-card .button {
  width: 100%;
}

.question-board {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(0, 0, 0, 0.28), rgba(255, 255, 255, 0.08)),
    rgba(7, 7, 21, 0.40);
}

.answer-grid button {
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
}

@media (max-width: 940px) {
  .hero,
  .freeplay-center {
    grid-template-columns: 1fr;
  }

  .web-lobby-card {
    max-width: 560px;
  }
}

@media (max-width: 820px) {
  .hero {
    min-height: auto;
    align-items: start;
    padding-top: 4.8rem;
  }

  .web-lobby-card {
    width: 100%;
  }

  .freeplay-card {
    text-align: left;
  }

  .freeplay-mark {
    margin-inline: 0;
  }

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

/* Game show energy layer */
body.theme-warm .question-board {
  border-color: rgba(132, 255, 89, 0.34);
}

body.theme-hot .question-board {
  border-color: rgba(255, 212, 71, 0.42);
  box-shadow: 0 0 34px rgba(255, 212, 71, 0.12);
}

body.theme-speed .question-board {
  border-color: rgba(32, 214, 255, 0.48);
  box-shadow: 0 0 38px rgba(32, 214, 255, 0.16);
}

body.theme-power .question-board,
body.theme-pro .question-board {
  border-color: rgba(140, 116, 255, 0.48);
  box-shadow: 0 0 42px rgba(140, 116, 255, 0.16);
}

body.theme-boss .question-board {
  border-color: rgba(255, 73, 104, 0.58);
  box-shadow: 0 0 48px rgba(255, 73, 104, 0.20);
}

body.theme-double .question-board {
  background:
    linear-gradient(145deg, rgba(255, 212, 71, 0.28), rgba(132, 255, 89, 0.16)),
    rgba(7, 7, 21, 0.46);
}

body.theme-final .question-board {
  background:
    linear-gradient(145deg, rgba(255, 73, 104, 0.34), rgba(255, 212, 71, 0.16)),
    rgba(7, 7, 21, 0.58);
  box-shadow: 0 0 60px rgba(255, 73, 104, 0.24);
}

body.theme-final .question-board h2,
body.theme-double .question-board h2 {
  text-shadow: 0 0 28px rgba(255, 255, 255, 0.24);
}

.score-row.leader {
  border-color: rgba(132, 255, 89, 0.46);
  background:
    linear-gradient(135deg, rgba(132, 255, 89, 0.18), rgba(255, 255, 255, 0.08)),
    rgba(0, 0, 0, 0.24);
}

.score-row.streaking {
  border-color: rgba(255, 212, 71, 0.58);
  box-shadow: 0 0 26px rgba(255, 212, 71, 0.16);
}

.winner-podium {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  width: 100%;
}

.podium-card {
  display: grid;
  gap: 0.35rem;
  min-height: 8rem;
  align-content: center;
  padding: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.26);
}

.podium-card span {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 1000;
  text-transform: uppercase;
}

.podium-card strong {
  color: #ffffff;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  line-height: 1;
}

.podium-card small {
  color: var(--muted);
  font: inherit;
  font-weight: 850;
}

.podium-card.place-1 {
  background:
    linear-gradient(145deg, rgba(255, 212, 71, 0.30), rgba(132, 255, 89, 0.16)),
    rgba(0, 0, 0, 0.24);
  box-shadow: 0 0 34px rgba(255, 212, 71, 0.16);
}

@media (max-width: 820px) {
  .winner-podium {
    grid-template-columns: 1fr;
  }
}

/* Free Play cleanup */
.freeplay-page {
  width: min(980px, calc(100% - 2rem));
  min-height: auto;
  align-content: start;
  padding-top: clamp(1.5rem, 4vw, 3rem);
}

.freeplay-hero {
  max-width: 720px;
  margin: 0 auto 1.1rem;
  padding: clamp(1rem, 3vw, 1.35rem);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05)),
    rgba(7, 7, 21, 0.42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.freeplay-hero h1 {
  margin-bottom: 0.45rem;
  font-size: clamp(2.45rem, 7vw, 4.4rem);
  line-height: 0.95;
}

.freeplay-hero .teacher-copy {
  max-width: 560px;
  font-size: clamp(0.98rem, 2vw, 1.15rem);
  line-height: 1.45;
}

.freeplay-mark {
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
}

.freeplay-choice {
  max-width: 820px;
  margin: 0 auto 1.1rem;
  gap: 0.9rem;
  perspective: 900px;
}

.freeplay-choice-card {
  position: relative;
  overflow: hidden;
  min-height: 8.2rem;
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06)),
    rgba(7, 7, 21, 0.46);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(1.25);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.freeplay-choice-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  opacity: 0.92;
}

.freeplay-choice-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.20), transparent 42%);
  pointer-events: none;
}

#free-choose-host::before {
  background:
    radial-gradient(circle at 18% 10%, rgba(132, 255, 89, 0.38), transparent 42%),
    radial-gradient(circle at 95% 95%, rgba(255, 212, 71, 0.22), transparent 44%),
    rgba(7, 7, 21, 0.32);
}

#free-choose-join::before {
  background:
    radial-gradient(circle at 18% 10%, rgba(32, 214, 255, 0.34), transparent 42%),
    radial-gradient(circle at 95% 95%, rgba(255, 73, 104, 0.22), transparent 44%),
    rgba(7, 7, 21, 0.32);
}

.freeplay-choice-card:hover,
.freeplay-choice-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.36);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 30px 80px rgba(0, 0, 0, 0.30);
}

.choice-icon {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  margin-bottom: 0.7rem;
  border-radius: 8px;
  color: #07100b;
  background: linear-gradient(135deg, var(--green), var(--gold));
  box-shadow: 0 16px 32px rgba(132, 255, 89, 0.20);
  font-size: 1.05rem;
  font-weight: 1000;
}

#free-choose-join .choice-icon {
  color: #ffffff;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 16px 32px rgba(32, 214, 255, 0.18);
}

.freeplay-choice-card strong {
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  line-height: 1.05;
}

.freeplay-choice-card small {
  max-width: 25rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.freeplay-center {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

.freeplay-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1rem, 3vw, 1.35rem);
  text-align: left;
  border-color: rgba(255, 255, 255, 0.20);
  background:
    radial-gradient(circle at top left, rgba(32, 214, 255, 0.16), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06)),
    rgba(7, 7, 21, 0.48);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 24px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(18px) saturate(1.2);
}

.freeplay-card h2 {
  margin-bottom: 0.65rem;
  font-size: clamp(1.55rem, 4vw, 2.35rem);
}

.freeplay-card .save-note {
  font-size: 0.95rem;
  line-height: 1.45;
}

.freeplay-options {
  grid-template-columns: 1fr;
}

.freeplay-form input,
.freeplay-options select {
  text-align: left;
}

.freeplay-lobby {
  max-width: 980px;
  margin-inline: auto;
}

.freeplay-page .stage-top {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.freeplay-page .question-board h2 {
  font-size: clamp(3rem, 10vw, 7rem);
}

@media (max-width: 820px) {
  .freeplay-page {
    width: min(100% - 1rem, 680px);
    padding-top: 1rem;
  }

  .freeplay-hero {
    text-align: left;
    justify-items: start;
  }

  .freeplay-mark {
    margin-inline: 0;
  }

  .freeplay-choice,
  .freeplay-page .stage-top {
    grid-template-columns: 1fr;
  }
}

/* Teacher workspace */
.teacher-portal-site {
  --portal-ink: #1a2234;
  --portal-muted: #667187;
  --portal-bg: #f4f6f9;
  --portal-surface: #ffffff;
  --portal-line: #dfe3eb;
  --portal-green: #2faa61;
  --portal-cyan: #168fac;
  --portal-coral: #d94e62;
  --portal-gold: #e6a72e;
  min-height: 100vh;
  color: var(--portal-ink);
  background: var(--portal-bg);
}

.teacher-portal-site::before {
  display: none;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  min-height: 4.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--portal-line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--portal-ink);
  font-weight: 950;
  text-decoration: none;
}

.portal-brand img {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 7px;
}

.portal-brand span {
  display: grid;
  line-height: 1;
}

.portal-brand small {
  margin-top: 0.2rem;
  color: var(--portal-green);
  font-size: 0.64rem;
  text-transform: uppercase;
}

.portal-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.portal-topbar-actions a,
.portal-topbar-actions button {
  border: 0;
  color: var(--portal-muted);
  background: transparent;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.portal-topbar-actions button {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--portal-line);
  border-radius: 5px;
  color: var(--portal-ink);
  background: #fff;
}

.portal-shell {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr);
  min-height: calc(100vh - 4.25rem);
}

.portal-sidebar {
  position: sticky;
  top: 4.25rem;
  display: flex;
  height: calc(100vh - 4.25rem);
  flex-direction: column;
  padding: 1.25rem 0.8rem;
  border-right: 1px solid var(--portal-line);
  background: #fff;
}

.portal-account {
  display: grid;
  grid-template-columns: 2.4rem minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  padding: 0 0.45rem 1.25rem;
  border-bottom: 1px solid var(--portal-line);
}

.portal-account > span {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--portal-ink);
  font-weight: 900;
}

.portal-account div {
  display: grid;
  min-width: 0;
  gap: 0.2rem;
}

.portal-account strong,
.portal-account small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-account small {
  color: var(--portal-muted);
  font-size: 0.72rem;
}

.portal-sidebar nav {
  display: grid;
  gap: 0.25rem;
  margin-top: 1rem;
}

.portal-sidebar .portal-tab {
  min-height: 2.75rem;
  padding: 0.65rem 0.8rem;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 4px;
  color: var(--portal-muted);
  background: transparent;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.portal-sidebar .portal-tab:hover,
.portal-sidebar .portal-tab:focus-visible {
  color: var(--portal-ink);
  background: var(--portal-bg);
}

.portal-sidebar .portal-tab.active {
  border-left-color: var(--portal-green);
  color: var(--portal-ink);
  background: #edf8f1;
}

.portal-sidebar-help {
  display: grid;
  gap: 0.4rem;
  margin-top: auto;
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--portal-line);
}

.portal-sidebar-help span {
  color: var(--portal-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.portal-sidebar-help a {
  color: var(--portal-cyan);
  font-size: 0.8rem;
  font-weight: 850;
}

.portal-workspace {
  min-width: 0;
  padding: clamp(1.25rem, 3vw, 2.5rem);
}

.portal-page-header,
.portal-section-heading,
.portal-surface-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
}

.portal-page-header {
  margin-bottom: 1rem;
}

.portal-page-header h1 {
  margin: 0.15rem 0 0.35rem;
  color: var(--portal-ink);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.05;
  text-shadow: none;
}

.portal-page-header p:not(.portal-eyebrow),
.portal-section-heading p,
.portal-surface-heading p {
  margin: 0;
  color: var(--portal-muted);
  line-height: 1.5;
}

.portal-eyebrow {
  margin: 0;
  color: var(--portal-green);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.portal-primary-action,
.portal-button,
.portal-link-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.9rem;
  border: 1px solid transparent;
  border-radius: 5px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.portal-primary-action,
.portal-button.primary {
  color: #fff;
  background: var(--portal-green);
}

.portal-button.secondary,
.portal-link-button {
  border-color: var(--portal-line);
  color: var(--portal-ink);
  background: #fff;
}

.portal-button.danger {
  border-color: var(--portal-coral);
  color: #fff;
  background: var(--portal-coral);
}

.portal-button.quiet-danger {
  color: var(--portal-coral);
  background: transparent;
}

.portal-notice {
  min-height: 0;
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;
  border-left: 3px solid var(--portal-cyan);
  color: var(--portal-ink);
  background: #eaf7fa;
  font-size: 0.85rem;
}

.portal-notice:empty {
  display: none;
}

.portal-section {
  padding: 0;
}

.portal-section-heading {
  margin: 1.5rem 0;
  align-items: center;
}

.portal-section-heading > div {
  max-width: 760px;
}

.portal-section-heading h2,
.portal-surface-heading h2 {
  margin: 0.25rem 0 0.45rem;
  color: var(--portal-ink);
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.15;
}

.portal-limit {
  padding: 0.45rem 0.65rem;
  border-radius: 4px;
  color: var(--portal-muted);
  background: #e9ecf2;
  font-size: 0.72rem;
  font-weight: 850;
}

.portal-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.25rem;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: #fff;
}

.portal-metrics > div {
  display: grid;
  gap: 0.2rem;
  padding: 1rem;
  border-right: 1px solid var(--portal-line);
}

.portal-metrics > div:last-child {
  border: 0;
}

.portal-metrics span,
.portal-metrics small {
  color: var(--portal-muted);
  font-size: 0.72rem;
}

.portal-metrics strong {
  color: var(--portal-ink);
  font-size: 1.7rem;
}

.portal-overview-grid,
.portal-two-column,
.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.portal-overview-grid.lower {
  margin-top: 1.25rem;
}

.portal-surface {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  color: var(--portal-ink);
  background: var(--portal-surface);
  box-shadow: 0 10px 30px rgba(26, 34, 52, 0.04);
}

.portal-surface h3 {
  margin-bottom: 1rem;
  color: var(--portal-ink);
  font-size: 1.1rem;
}

.portal-surface-heading {
  align-items: center;
  margin-bottom: 1rem;
}

.portal-surface-heading button {
  border: 0;
  color: var(--portal-cyan);
  background: transparent;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 850;
  cursor: pointer;
}

.portal-quick-actions {
  display: grid;
  border-top: 1px solid var(--portal-line);
}

.portal-quick-actions button,
.overview-class-list button,
.overview-assignment-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.9rem 0;
  border: 0;
  border-bottom: 1px solid var(--portal-line);
  color: var(--portal-ink);
  background: transparent;
  font: inherit;
  text-align: left;
}

.portal-quick-actions button {
  display: grid;
  justify-content: stretch;
  cursor: pointer;
}

.portal-quick-actions span,
.overview-class-list small,
.overview-assignment-list small {
  color: var(--portal-muted);
  font-size: 0.78rem;
}

.overview-class-list button > span,
.overview-assignment-list > div > span {
  display: grid;
  gap: 0.2rem;
}

.overview-class-list b {
  color: var(--portal-cyan);
  font-size: 0.76rem;
}

.portal-progress-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-block: 1px solid var(--portal-line);
}

.portal-progress-metrics p {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 1rem 0;
}

.portal-progress-metrics p + p {
  padding-left: 1rem;
  border-left: 1px solid var(--portal-line);
}

.portal-progress-metrics span,
.portal-progress-summary > p {
  color: var(--portal-muted);
  font-size: 0.78rem;
}

.portal-progress-metrics strong {
  font-size: 1.65rem;
}

.portal-progress-bar {
  height: 0.55rem;
  margin: 1.25rem 0 0.75rem;
  overflow: hidden;
  border-radius: 3px;
  background: #e6e9ef;
}

.portal-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--portal-green);
  transition: width 240ms ease;
}

.settings-grid label,
.report-toolbar label {
  color: var(--portal-muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.teacher-portal-site input,
.teacher-portal-site select,
.teacher-portal-site textarea {
  border: 1px solid #cfd5df;
  border-radius: 5px;
  color: var(--portal-ink);
  background: #fff;
  font: inherit;
  font-size: 0.9rem;
}

.class-library {
  display: grid;
  gap: 0;
}

.class-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
  border: 0;
  border-bottom: 1px solid var(--portal-line);
  border-radius: 0;
  background: transparent;
}

.class-card > div:first-child {
  min-width: 0;
}

.class-card strong {
  display: block;
  color: var(--portal-ink);
}

.class-card > div:first-child > span {
  display: block;
  margin-top: 0.25rem;
  color: var(--portal-muted);
  font-size: 0.78rem;
}

.class-card-actions,
.portal-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.roster-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.roster-entry {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.4rem 0.35rem 0.55rem;
  border: 1px solid var(--portal-line);
  border-radius: 4px;
  color: var(--portal-ink);
  background: var(--portal-bg);
  font-size: 0.76rem;
  font-weight: 750;
}

.roster-remove {
  display: grid;
  width: 1.35rem;
  height: 1.35rem;
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--portal-muted);
  background: transparent;
  font-size: 1rem;
  cursor: pointer;
}

.portal-room-code {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 18rem;
  padding: 2rem;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  text-align: center;
  background: var(--portal-ink);
}

.portal-room-code span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-room-code strong {
  margin: 0.4rem 0;
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
}

.portal-room-code p {
  max-width: 330px;
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.5;
}

.homework-code {
  background: var(--portal-cyan);
}

.assignment-library {
  margin-top: 1.25rem;
}

.assignment-list {
  display: grid;
  border-top: 1px solid var(--portal-line);
}

.assignment-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(150px, 0.7fr) 5rem 5rem;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--portal-line);
}

.assignment-row > div:first-child {
  display: grid;
  gap: 0.25rem;
}

.assignment-row > div:first-child span,
.assignment-progress small {
  color: var(--portal-muted);
  font-size: 0.75rem;
}

.assignment-progress {
  display: grid;
  gap: 0.35rem;
}

.assignment-progress > span {
  height: 0.4rem;
  overflow: hidden;
  border-radius: 3px;
  background: #e7eaf0;
}

.assignment-progress i {
  display: block;
  height: 100%;
  background: var(--portal-green);
}

.assignment-code {
  font-size: 0.92rem;
}

.assignment-status {
  justify-self: start;
  padding: 0.3rem 0.45rem;
  border-radius: 4px;
  color: var(--portal-muted);
  background: #e9ecf2;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: capitalize;
}

.assignment-status.active {
  color: #19723e;
  background: #def4e7;
}

.assignment-status.completed {
  color: #0c6680;
  background: #dff2f7;
}

.assignment-status.closed {
  color: #8d3947;
  background: #f8e2e6;
}

.portal-empty-state {
  display: grid;
  gap: 0.3rem;
  padding: 1.5rem 0;
  color: var(--portal-ink);
}

.portal-empty-state span {
  color: var(--portal-muted);
  font-size: 0.82rem;
}

.report-toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding: 0.9rem;
  border: 1px solid var(--portal-line);
  border-radius: 6px;
  background: #fff;
}

.report-toolbar label {
  display: grid;
  gap: 0.35rem;
}

.report-card,
.missed-card {
  padding: 0.9rem 0;
  border: 0;
  border-bottom: 1px solid var(--portal-line);
  border-radius: 0;
  color: var(--portal-ink);
  background: transparent;
}

.report-card > span,
.missed-card > span,
.mini-score-list p {
  color: var(--portal-muted);
}

.missed-card.correct-card {
  border-left: 3px solid var(--portal-green);
  padding-left: 0.75rem;
}

.missed-card.wrong-card {
  border-left: 3px solid var(--portal-coral);
  padding-left: 0.75rem;
}

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

.settings-account div {
  display: grid;
  gap: 0.3rem;
  padding: 1rem;
  border-bottom: 1px solid var(--portal-line);
}

.settings-account div:nth-child(even) {
  border-left: 1px solid var(--portal-line);
}

.settings-account span {
  color: var(--portal-muted);
  font-size: 0.72rem;
}

.portal-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px solid #edc7ce;
  border-radius: 6px;
  background: #fff8f9;
}

.portal-danger-zone h2 {
  margin: 0.25rem 0 0.5rem;
  color: var(--portal-ink);
  font-size: 1.3rem;
}

.portal-danger-zone p {
  max-width: 720px;
  color: var(--portal-muted);
  line-height: 1.5;
}

.portal-danger-zone a {
  color: var(--portal-cyan);
  font-weight: 800;
}

.teacher-portal-site .live-room-board {
  margin-top: 1.25rem;
}

.education-button.primary {
  color: #fff;
  background: var(--edu-green);
}

/* Education account screens */
.education-auth-site {
  --auth-ink: #15243b;
  --auth-muted: #5e6c7f;
  --auth-line: #dce2e8;
  --edu-green: #35b866;
  --edu-cyan: #1b9fc3;
  margin: 0;
  min-height: 100vh;
  color: var(--auth-ink);
  background: #f3f6f8;
}

.education-auth-site::before {
  display: none;
}

.education-auth-site .auth-nav {
  position: relative;
  border-bottom: 1px solid var(--auth-line);
  background: #fff;
}

.education-auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.7fr);
  gap: 5rem;
  align-items: center;
  width: min(1120px, calc(100% - 3rem));
  min-height: calc(100vh - 73px);
  margin: 0 auto;
  padding: 4rem 0;
}

.education-auth-intro {
  max-width: 620px;
}

.education-auth-intro h1 {
  max-width: 12ch;
  margin: 0.8rem 0 1rem;
  color: var(--auth-ink);
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.education-auth-intro > p {
  max-width: 58ch;
  color: var(--auth-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.auth-trust-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 2rem;
}

.auth-trust-list span {
  padding-top: 0.75rem;
  border-top: 2px solid var(--edu-green);
  color: var(--auth-ink);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.education-auth-site .auth-card {
  width: 100%;
  max-width: 460px;
  margin: 0 0 0 auto;
  padding: 2rem;
  border: 1px solid var(--auth-line);
  border-radius: 6px;
  color: var(--auth-ink);
  background: #fff;
  box-shadow: 0 18px 50px rgba(20, 35, 57, 0.09);
}

.education-auth-site .auth-card h1,
.education-auth-site .auth-card h2 {
  margin: 0.35rem 0 0.55rem;
  color: var(--auth-ink);
  font-size: 1.8rem;
  letter-spacing: 0;
}

.education-auth-site .auth-card .teacher-copy,
.education-auth-site .auth-card .save-note,
.education-auth-site .password-guidance {
  color: var(--auth-muted);
}

.education-auth-site .auth-card label {
  color: var(--auth-ink);
}

.education-auth-site .auth-card input,
.education-auth-site .auth-card select,
.education-auth-site .auth-card textarea {
  border: 1px solid #cbd3dc;
  border-radius: 5px;
  color: var(--auth-ink);
  background: #fff;
}

.education-auth-site .auth-card .button.primary,
.education-auth-site .auth-card .start-class {
  border-radius: 5px;
  color: #fff;
  background: var(--edu-green);
  box-shadow: none;
}

.education-auth-site .auth-text-button {
  color: #126880;
}

.education-register-shell {
  width: min(980px, calc(100% - 3rem));
  margin: 0 auto;
  padding: 3rem 0 5rem;
}

.education-register-shell .auth-card {
  max-width: none;
  margin: 0;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.education-auth-site .read-first-panel {
  border: 1px solid var(--auth-line);
  border-radius: 6px;
  color: var(--auth-ink);
  background: #f7faf9;
}

.education-auth-site .school-privacy-grid > div {
  border-color: var(--auth-line);
  color: var(--auth-ink);
  background: #fff;
}

.education-auth-site .read-first-panel p,
.education-auth-site .school-privacy-grid strong {
  color: var(--auth-ink);
}

.education-auth-site .school-privacy-grid p,
.education-auth-site .privacy-guidance,
.education-auth-site .terms-check span {
  color: var(--auth-muted);
}

@media (max-width: 820px) {
  .education-auth-shell {
    grid-template-columns: minmax(0, 1fr);
    gap: 2rem;
    min-height: auto;
    padding: 2.5rem 0 4rem;
  }

  .education-auth-intro h1 {
    max-width: 14ch;
    font-size: 2.7rem;
  }

  .education-auth-site .auth-card {
    max-width: none;
    margin: 0;
  }
}

@media (max-width: 600px) {
  .education-auth-site .auth-nav nav a:not(:last-child) {
    display: none;
  }

  .education-auth-shell,
  .education-register-shell {
    width: min(100% - 1.5rem, 980px);
  }

  .auth-trust-list,
  .education-auth-site .school-privacy-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .education-auth-site .auth-fields,
  .education-register-shell .settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .portal-shell {
    grid-template-columns: 11.5rem minmax(0, 1fr);
  }

  .portal-sidebar-help {
    display: none;
  }

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

  .assignment-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .portal-topbar-actions a {
    display: none;
  }

  .portal-shell {
    display: block;
  }

  .portal-sidebar {
    position: sticky;
    top: 4.25rem;
    z-index: 30;
    display: block;
    width: 100%;
    height: auto;
    padding: 0.5rem;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--portal-line);
  }

  .portal-account,
  .portal-sidebar-help {
    display: none;
  }

  .portal-sidebar nav {
    display: flex;
    width: max-content;
    margin: 0;
  }

  .portal-sidebar .portal-tab {
    min-height: 2.4rem;
    border-left: 0;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
  }

  .portal-sidebar .portal-tab.active {
    border-bottom-color: var(--portal-green);
  }

  .portal-workspace {
    padding: 1rem;
  }

  .portal-page-header,
  .portal-section-heading,
  .portal-danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-primary-action,
  .portal-link-button {
    width: 100%;
  }

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

  .portal-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .portal-metrics > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--portal-line);
  }

  .class-card,
  .assignment-row,
  .report-toolbar,
  .settings-account {
    grid-template-columns: minmax(0, 1fr);
  }

  .class-card-actions {
    justify-content: flex-start;
  }

  .assignment-row {
    gap: 0.6rem;
  }

  .settings-account div:nth-child(even) {
    border-left: 0;
  }
}
