/* DeutschUM Pro UI - behavior-preserving visual system */
:root {
  --red: #e3262e;
  --red-strong: #bd1820;
  --red-soft: #fff0f1;
  --ink: #172033;
  --ink-strong: #0f172a;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4e8ee;
  --line-strong: #d0d5dd;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef1f5;
  --navy: #101828;
  --green: #138a5b;
  --amber: #b76e00;
  --blue: #175cd3;
  --radius: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--surface);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background: var(--surface);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

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

a {
  color: inherit;
}

img,
svg,
canvas,
iframe {
  max-width: 100%;
}

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

.brand {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  gap: 9px;
  color: var(--ink-strong);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.brand-mark {
  display: inline-grid;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  place-items: center;
  border-radius: 7px;
  background: var(--red);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: none;
}

.brand > span > span {
  color: var(--red);
}

.logo-suffix {
  margin-left: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.btn,
.btn-ghost,
.soft,
.link-soft,
button.soft {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.btn:hover,
.btn-ghost:hover,
.soft:hover,
.link-soft:hover {
  transform: translateY(-1px);
}

.btn-red {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
  box-shadow: 0 4px 12px rgba(227, 38, 46, 0.2);
}

.btn-red:hover {
  border-color: var(--red-strong);
  background: var(--red-strong);
}

.btn-white,
.soft,
.link-soft,
.btn-ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.btn-white:hover,
.soft:hover,
.link-soft:hover,
.btn-ghost:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
}

.btn-lg {
  min-height: 48px;
  padding-inline: 21px;
  font-size: 14px;
}

.btn.sm,
.soft.sm,
.link-soft.sm {
  min-height: 34px;
  padding-inline: 12px;
  font-size: 12px;
}

.btn.full,
button.full {
  width: 100%;
}

.btn-dark-outline {
  border-color: #344054;
  background: transparent;
  color: #fff;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: 68px;
  border-bottom: 1px solid rgba(228, 232, 238, 0.9);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
  backdrop-filter: blur(12px);
}

.nav-wrap {
  display: grid;
  height: 68px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
}

.site-nav {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.site-nav a {
  position: relative;
  padding: 9px 10px;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 10px;
  bottom: 2px;
  left: 10px;
  height: 2px;
  border-radius: 2px;
  background: transparent;
  content: "";
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--red);
}

.site-nav a.active::after {
  background: var(--red);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-actions .btn-ghost {
  border-color: transparent;
  box-shadow: none;
}

.menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.menu-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--ink);
}

.hero2 {
  min-height: 560px;
  padding: 82px 0 72px;
  background: var(--surface-2);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(440px, 0.96fr);
  align-items: center;
  gap: 70px;
}

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

.pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 8px;
  border: 1px solid #ffd1d4;
  border-radius: 6px;
  padding: 0 10px;
  background: var(--red-soft);
  color: var(--red-strong);
  font-size: 11px;
  font-weight: 800;
}

.pill span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.hero-copy h1 {
  max-width: 600px;
  margin: 20px 0 18px;
  color: var(--ink-strong);
  font-size: clamp(42px, 5vw, 66px);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: 0;
}

.hero-copy h1 span {
  display: block;
  color: var(--red);
}

.hero-copy > p {
  max-width: 570px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 20px;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.hero-visual {
  position: relative;
  min-height: 400px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-visual::before,
.hero-visual::after {
  position: absolute;
  background: var(--surface-3);
  content: "";
}

.hero-visual::before {
  top: 0;
  bottom: 0;
  left: 51%;
  width: 1px;
}

.hero-visual::after {
  top: 48%;
  right: 0;
  left: 0;
  height: 1px;
}

.float-card,
.teacher-bubble,
.avatar-stack {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16, 24, 40, 0.09);
}

.float-card.live {
  position: absolute;
  z-index: 2;
  top: 42px;
  left: 34px;
  width: 58%;
  min-height: 154px;
  padding: 22px;
}

.float-card.live > b,
.float-card.test > b {
  display: block;
  color: var(--ink-strong);
  font-size: 17px;
}

.float-card.live > small,
.float-card.test > small,
.float-card.mini small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.float-card.live > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 17px;
}

.float-card.live > div span {
  border-radius: 5px;
  padding: 4px 7px;
  background: var(--surface-3);
  color: #475467;
  font-size: 9px;
  font-weight: 700;
}

.float-card.live em {
  position: absolute;
  top: 18px;
  right: 18px;
  border-radius: 5px;
  padding: 4px 7px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.float-card.test {
  position: absolute;
  z-index: 2;
  right: 28px;
  bottom: 34px;
  width: 53%;
  padding: 20px;
}

.float-card.test .bar {
  height: 7px;
  margin: 15px 0 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--surface-3);
}

.float-card.test .bar i {
  display: block;
  width: 72%;
  height: 100%;
  border-radius: inherit;
  background: var(--red);
}

.float-card.mini {
  position: absolute;
  z-index: 3;
  display: grid;
  min-width: 108px;
  min-height: 92px;
  place-content: center;
  padding: 15px;
  text-align: center;
}

.float-card.mini b {
  color: var(--ink-strong);
  font-size: 26px;
}

.float-card.mini.one {
  top: 44px;
  right: 24px;
}

.float-card.mini.two {
  bottom: 48px;
  left: 28px;
}

.hero-visual .avatar-stack,
.hero-visual .teacher-bubble {
  display: none;
}

.partner-strip {
  border-block: 1px solid var(--line);
  padding: 23px 0;
  background: #fff;
}

.partner-strip p {
  margin: 0 0 13px;
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.partner-strip .wrap > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  overflow: hidden;
  color: #7b8494;
  white-space: nowrap;
}

.partner-strip span {
  font-size: 11px;
  font-weight: 700;
}

.section {
  padding: 88px 0;
  background: #fff;
}

.section.light {
  background: var(--surface-2);
}

.section-head {
  max-width: 690px;
  margin: 0 auto 40px;
  text-align: center;
}

.section-head.left {
  margin-inline: 0;
  text-align: left;
}

.section-head > span,
.eyebrow {
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.section-head h2,
.subhero h1 {
  margin: 8px 0 12px;
  color: var(--ink-strong);
  font-size: 36px;
  font-weight: 800;
  line-height: 1.15;
}

.section-head p,
.subhero p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.home-feature-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(350px, 0.85fr);
  align-items: center;
  gap: 72px;
}

.feature-list-ref {
  display: grid;
  gap: 10px;
}

.feature-row-ref {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.feature-row-ref > div,
.feature-card > div:first-child,
.process-card > div {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 7px;
  background: var(--red-soft);
  font-size: 18px;
}

.feature-row-ref h3,
.feature-row-ref p,
.feature-card h3,
.feature-card p {
  margin: 0;
}

.feature-row-ref h3 {
  font-size: 14px;
}

.feature-row-ref p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

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

.home-stats article {
  min-height: 124px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.home-stats b {
  display: block;
  color: var(--red);
  font-size: 31px;
  line-height: 1;
}

.home-stats span {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.level-track-ref {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.level-item-ref {
  position: relative;
  min-width: 0;
  padding-top: 21px;
}

.level-item-ref::before {
  position: absolute;
  top: 11px;
  right: -10px;
  left: 0;
  height: 2px;
  background: var(--line);
  content: "";
}

.level-item-ref:last-child::before {
  right: 50%;
}

.level-dot-ref {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 3px solid #fff;
  border-radius: 50%;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  box-shadow: 0 0 0 1px var(--line);
}

.level-card-ref {
  min-height: 286px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px 14px 16px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.level-card-ref small {
  color: var(--red);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.level-card-ref h3 {
  min-height: 38px;
  margin: 7px 0 5px;
  color: var(--ink-strong);
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.level-card-ref p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 9px;
}

.level-card-ref ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.level-card-ref li {
  position: relative;
  padding-left: 10px;
  color: #667085;
  font-size: 9px;
  line-height: 1.4;
}

.level-card-ref li::before {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--red);
  content: "•";
}

.feature-grid,
.process-grid,
.teacher-grid,
.testimonial-grid {
  display: grid;
  gap: 16px;
}

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

.feature-card,
.process-card,
.teacher-card,
.testimonial-grid article,
.certificate-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.feature-card {
  min-height: 286px;
  padding: 24px;
}

.feature-card h3 {
  margin-top: 18px;
  color: var(--ink-strong);
  font-size: 17px;
}

.feature-card strong {
  display: block;
  margin-top: 6px;
  color: #475467;
  font-size: 12px;
}

.feature-card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
}

.tags span {
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 4px 7px;
  color: #475467;
  font-size: 9px;
  font-weight: 700;
}

.teacher-grid.single {
  grid-template-columns: minmax(260px, 360px);
  justify-content: center;
}

.teacher-card {
  padding: 26px;
}

.teacher-card .avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
}

.teacher-card h3 {
  margin: 16px 0 6px;
  font-size: 17px;
}

.teacher-card p,
.teacher-card small,
.teacher-meta-ref {
  color: var(--muted);
  font-size: 11px;
}

.teacher-pill-ref {
  display: inline-flex;
  margin-top: 12px;
  border-radius: 5px;
  padding: 5px 8px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
}

.teacher-meta-ref {
  display: flex;
  gap: 12px;
  margin: 14px 0 6px;
}

.certificate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
  align-items: center;
  gap: 80px;
}

.certificate-card {
  min-height: 292px;
  padding: 40px;
  text-align: center;
}

.cert-trophy {
  font-size: 35px;
}

.certificate-card h3 {
  margin: 12px 0;
  font-size: 23px;
}

.certificate-card i {
  display: block;
  width: 72px;
  height: 72px;
  margin: 20px auto;
  border: 8px solid var(--ink-strong);
  background: #fff;
  box-shadow: inset 0 0 0 8px #fff;
}

.certificate-card em {
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.check-list {
  display: grid;
  gap: 9px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.check-list li {
  color: #475467;
  font-size: 12px;
}

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

.process-card {
  min-height: 218px;
  padding: 22px;
}

.process-card small {
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
}

.process-card > div {
  margin: 17px 0 14px;
}

.process-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.process-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.testimonial-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 870px;
  margin-inline: auto;
}

.testimonial-grid article {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  padding: 24px;
}

.testimonial-grid article > b,
.testimonial-grid article > p {
  grid-column: 1 / -1;
}

.testimonial-grid article > b {
  color: #e8a000;
  font-size: 12px;
}

.testimonial-grid article > p {
  min-height: 62px;
  color: #475467;
  font-size: 12px;
}

.testimonial-grid article > span {
  display: grid;
  width: 34px;
  height: 34px;
  grid-row: span 2;
  place-items: center;
  border-radius: 7px;
  background: var(--navy);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.testimonial-grid article > strong {
  font-size: 11px;
}

.testimonial-grid article > small {
  color: var(--muted);
  font-size: 9px;
}

.faq-wrap-ref {
  max-width: 900px;
}

.faq-item-ref {
  border-top: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
}

.faq-item-ref:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-head-ref {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 700;
}

.faq-head-ref b {
  color: var(--muted);
}

.faq-content-ref {
  display: none;
  max-width: 760px;
  padding: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.faq-item-ref.on .faq-content-ref {
  display: block;
}

.cta-dark {
  padding: 64px 0;
  background: var(--navy);
  color: #fff;
  text-align: center;
}

.cta-dark h2 {
  margin: 0;
  font-size: 32px;
}

.cta-dark p {
  margin: 10px 0 22px;
  color: #98a2b3;
}

.cta-dark .wrap > div {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.footer {
  padding: 52px 0 26px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 56px;
}

.footer-grid > div:first-child p {
  max-width: 290px;
}

.footer h4 {
  margin: 3px 0 14px;
  color: var(--ink-strong);
  font-size: 12px;
}

.footer p,
.footer a,
.footer-bottom {
  color: var(--muted);
  font-size: 11px;
}

.footer a {
  display: block;
  margin: 9px 0;
  text-decoration: none;
}

.footer a:hover {
  color: var(--red);
}

.footer-bottom {
  margin-top: 38px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.subhero {
  min-height: 300px;
  padding: 90px 0;
  background: var(--surface-2);
  text-align: center;
}

/* Auth */
.auth-body {
  background: var(--surface-2);
}

.auth-body .site-header {
  display: block;
}

.auth-page {
  display: grid;
  width: min(1180px, calc(100% - 40px));
  min-height: 690px;
  grid-template-columns: minmax(0, 0.92fr) minmax(480px, 1.08fr);
  margin: 38px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.auth-brand {
  display: flex;
  padding: 58px;
  background: var(--navy);
  color: #fff;
}

.auth-brand > div {
  display: flex;
  width: 100%;
  flex-direction: column;
}

.auth-brand .brand {
  color: #fff;
}

.auth-brand h1 {
  max-width: 440px;
  margin: 82px 0 18px;
  color: #fff;
  font-size: 42px;
  line-height: 1.08;
}

.auth-brand > div > p {
  max-width: 430px;
  margin: 0;
  color: #b6becb;
  font-size: 15px;
}

.auth-testimonial {
  margin-top: auto;
  border-left: 3px solid var(--red);
  padding: 18px 0 18px 20px;
}

.auth-testimonial p {
  margin: 0 0 12px;
  color: #e4e7ec;
  font-size: 13px;
}

.auth-testimonial b,
.auth-testimonial span {
  display: block;
}

.auth-testimonial b {
  font-size: 12px;
}

.auth-testimonial span {
  margin-top: 4px;
  color: #98a2b3;
  font-size: 9px;
  font-weight: 800;
}

.auth-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  margin-top: 28px;
}

.auth-stats span {
  color: #98a2b3;
  font-size: 10px;
}

.auth-stats b {
  color: #fff;
  font-size: 15px;
}

.auth-form {
  display: grid;
  place-items: center;
  padding: 64px 72px;
  background: #fff;
}

.auth-body .auth-top {
  display: none;
}

.form-shell {
  width: min(100%, 450px);
}

.form-shell > h1 {
  margin: 7px 0 8px;
  color: var(--ink-strong);
  font-size: 31px;
  line-height: 1.15;
}

.form-shell > p {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
}

.form-shell form,
.form-grid {
  display: grid;
  gap: 15px;
}

.form-shell label,
.form-grid label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 11px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: none;
  background: #fff;
  color: var(--ink-strong);
}

input,
select {
  padding: 0 12px;
}

textarea {
  min-height: 110px;
  padding: 11px 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(227, 38, 46, 0.1);
}

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

label.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  line-height: 1.45;
}

label.check input,
.join-options input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin-top: 2px;
  accent-color: var(--red);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 11px;
}

.form-row a,
.auth-bottom a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}

.auth-bottom {
  margin: 21px 0 0 !important;
  text-align: center;
}

/* Admin, teacher and student workspaces */
.panel-body {
  background: #f3f5f7;
}

.panel-app {
  min-height: 100dvh;
  background: #f3f5f7;
}

.panel-top {
  position: fixed;
  z-index: 120;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 64px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 22px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.03);
}

.panel-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.panel-user > span {
  max-width: 220px;
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-user form {
  margin: 0;
}

.panel-user button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: #fff;
  color: #475467;
  font-size: 11px;
  font-weight: 700;
}

.side {
  position: fixed;
  z-index: 110;
  top: 64px;
  bottom: 0;
  left: 0;
  width: 252px;
  overflow-x: hidden;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  padding: 16px 12px 30px;
  background: #fff;
  scrollbar-width: thin;
}

.side .ns {
  margin: 18px 10px 7px;
  color: #98a2b3;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.ni {
  display: grid;
  width: 100%;
  min-height: 41px;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  margin: 2px 0;
  border: 0;
  border-radius: 7px;
  padding: 7px 10px;
  background: transparent;
  color: #475467;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  text-align: left;
}

.ni:hover {
  background: var(--surface-2);
  color: var(--ink-strong);
}

.ni.on {
  background: var(--red-soft);
  color: var(--red-strong);
  font-weight: 800;
}

.ni .ico {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 6px;
  background: #f1f3f6;
  font-size: 13px;
  line-height: 1;
}

.ni.on .ico {
  background: #fff;
}

.panel-main {
  width: auto;
  max-width: none;
  min-height: 100dvh;
  margin-left: 252px;
  padding: 94px 28px 48px;
}

.page {
  display: none;
  width: min(100%, 1440px);
  margin: 0 auto;
}

.page.on {
  display: block;
}

.page-head {
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0;
  color: var(--ink-strong);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.2;
}

.page-head p {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-card {
  display: grid;
  min-height: 102px;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.stat-card > span {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-3);
  font-size: 17px;
}

.stat-card b,
.stat-card small {
  display: block;
}

.stat-card b {
  color: var(--ink-strong);
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.stat-card small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

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

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

.card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.card + .card,
.grid-2 + .card,
.grid-3 + .card,
.stat-grid + .card {
  margin-top: 16px;
}

.grid-2 > .card + .card,
.grid-3 > .card + .card {
  margin-top: 0;
}

.card h3 {
  margin: 0 0 16px;
  color: var(--ink-strong);
  font-size: 14px;
  font-weight: 800;
}

.card-head,
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-head {
  margin-bottom: 15px;
}

.card-head h3 {
  margin: 0;
}

.toolbar {
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.toolbar input,
.toolbar select {
  width: auto;
  min-width: 160px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 11px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  color: #475467;
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-2);
  color: #344054;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #fafbfc;
}

.badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border-radius: 5px;
  padding: 3px 7px;
  background: var(--surface-3);
  color: #475467;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.ok {
  background: #e9f8f1;
  color: var(--green);
}

.badge.err {
  background: var(--red-soft);
  color: var(--red-strong);
}

.badge.blue {
  background: #eaf2ff;
  color: var(--blue);
}

.ok-text {
  color: var(--green) !important;
  font-weight: 800;
}

.warn-text {
  color: var(--amber) !important;
  font-weight: 800;
}

.muted,
.field-note,
.empty {
  color: var(--muted);
}

.field-note {
  display: block;
  margin-top: 12px;
  font-size: 10px;
  line-height: 1.5;
}

.notification-result {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.status-list p,
.list p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 11px 0;
  color: #475467;
  font-size: 11px;
}

.status-list p span,
.list p span {
  color: var(--ink-strong);
  font-weight: 700;
  text-align: right;
}

.quick {
  display: grid;
  align-content: start;
  gap: 8px;
}

.quick h3 {
  margin-bottom: 8px;
}

.quick > button,
.quick > a {
  display: flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  background: var(--surface-2);
  color: #344054;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
}

.inline-form {
  display: inline-flex;
  margin: 0;
}

.toast {
  position: fixed;
  z-index: 1000;
  top: 82px;
  right: 20px;
  max-width: min(390px, calc(100vw - 40px));
  border: 1px solid #b9ead2;
  border-radius: 8px;
  padding: 13px 16px;
  background: #effbf5;
  color: #086b46;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
}

.toast.err {
  border-color: #ffc9cd;
  background: #fff3f4;
  color: var(--red-strong);
}

/* Live classroom */
.classroom-body,
.classroom-page {
  min-height: 100dvh;
  background: #080d18;
  color: #e4e7ec;
}

.classroom-page {
  display: grid;
}

.live-gate-page {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 32px;
  background: #0b1220;
}

.live-gate-card,
.classroom-lobby {
  display: grid;
  width: min(1160px, 100%);
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
  overflow: hidden;
  border: 1px solid #263247;
  border-radius: 8px;
  background: #111827;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.live-gate-copy,
.lobby-main {
  padding: 54px;
}

.live-gate-side,
.lobby-side {
  display: grid;
  align-content: center;
  gap: 12px;
  border-left: 1px solid #263247;
  padding: 42px;
  background: #0d1525;
}

.lobby-badge {
  display: inline-flex;
  width: max-content;
  border: 1px solid #5c2630;
  border-radius: 6px;
  padding: 5px 9px;
  background: #2b151b;
  color: #ff7c83;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.live-gate-copy h1,
.lobby-main h1 {
  margin: 16px 0 10px;
  color: #fff;
  font-size: 36px;
  line-height: 1.12;
}

.live-gate-copy > p,
.lobby-main > p,
.live-gate-side p,
.live-gate-side li,
.lobby-side {
  color: #98a2b3;
  font-size: 12px;
}

.live-meta-grid,
.live-gate-details {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 26px 0;
}

.live-meta-grid span,
.live-gate-details span,
.lobby-panel {
  border: 1px solid #263247;
  border-radius: 7px;
  padding: 12px;
  background: #151f31;
  color: #d0d5dd;
  font-size: 10px;
}

.live-meta-grid b,
.live-gate-details b,
.lobby-panel strong,
.lobby-panel span {
  display: block;
}

.live-meta-grid b,
.live-gate-details b,
.lobby-panel strong {
  margin-bottom: 4px;
  color: #fff;
  font-size: 9px;
}

.classroom-lobby {
  align-self: center;
  justify-self: center;
  margin: 30px;
}

.lobby-main label {
  display: grid;
  gap: 7px;
  color: #d0d5dd;
  font-size: 11px;
  font-weight: 700;
}

.lobby-main input[type="text"],
.lobby-main input:not([type]) {
  border-color: #344054;
  background: #0d1525;
  color: #fff;
}

.join-options {
  display: flex;
  gap: 18px;
  margin: 14px 0 20px;
}

.join-options label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #98a2b3;
  font-size: 10px;
}

.lobby-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.live-orbit {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  border: 1px solid #344054;
  border-radius: 50%;
  color: #fff;
}

.classroom-shell {
  display: grid;
  min-width: 0;
  min-height: 100dvh;
  grid-template-rows: 64px minmax(0, 1fr) 58px;
  background: #080d18;
}

.classroom-shell[hidden],
.classroom-lobby[hidden] {
  display: none !important;
}

.cls-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
  border-bottom: 1px solid #263247;
  padding: 0 20px;
  background: #101828;
}

.cls-header .brand {
  color: #fff;
}

.live-title {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.live-title strong {
  max-width: 430px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-title span,
.live-title small {
  border-radius: 5px;
  padding: 4px 7px;
  background: #263247;
  color: #d0d5dd;
  font-size: 9px;
  font-weight: 700;
}

.live-title span {
  background: var(--red);
  color: #fff;
}

.classroom-actions {
  display: flex;
  gap: 7px;
}

.classroom-layout {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) 380px;
}

.video-stage {
  display: grid;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  background: #080d18;
}

.video-frame {
  position: relative;
  min-width: 0;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid #263247;
  border-radius: 8px;
  background: #020617;
}

.jitsi-api-frame,
.jitsi-api-frame > div,
.jitsi-api-frame iframe,
.video-stage iframe {
  width: 100% !important;
  height: 100% !important;
  min-height: 520px;
  border: 0;
}

.live-connection-tools {
  position: absolute;
  z-index: 10;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #344054;
  border-radius: 7px;
  padding: 7px;
  background: rgba(16, 24, 40, 0.92);
}

.live-connection-tools span {
  padding-inline: 5px;
  color: #d0d5dd;
  font-size: 9px;
  font-weight: 700;
}

.live-connection-tools button {
  min-height: 28px;
  border: 1px solid #475467;
  border-radius: 5px;
  padding: 0 9px;
  background: #1d2939;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
}

.lesson-panel {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
  border-left: 1px solid #263247;
  background: #111827;
}

.lesson-panel .tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid #263247;
  background: #151f31;
}

.lesson-panel .tabs button {
  min-width: 0;
  min-height: 52px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 4px;
  background: transparent;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 800;
}

.lesson-panel .tabs button.on {
  border-bottom-color: var(--red);
  background: #101828;
  color: #fff;
}

.live-tab {
  display: none;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 16px;
}

.live-tab.on {
  display: block;
}

.chat-box.on {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.messages {
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
}

.messages p {
  margin: 0;
  border-radius: 7px;
  padding: 10px 12px;
  background: #1d2939;
  color: #d0d5dd;
  font-size: 11px;
}

.messages p b {
  color: #fff;
}

.chat-box form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding-top: 12px;
}

.chat-box input,
.notes-box textarea {
  border-color: #344054;
  background: #1d2939;
  color: #fff;
}

.chat-box button,
.wb-tools button,
.board-command-strip button,
.host-tools button,
.room-tools button,
.participant-row button {
  min-height: 36px;
  border: 1px solid #344054;
  border-radius: 6px;
  padding: 0 11px;
  background: #1d2939;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.chat-box form button {
  border-color: var(--red);
  background: var(--red);
}

.board-command-strip,
.wb-tools,
.tool-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.board-command-strip span,
.tool-head span {
  color: #98a2b3;
  font-size: 9px;
}

.board-box canvas {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #fff;
}

.notes-box textarea {
  min-height: 300px;
  margin-bottom: 10px;
}

.host-tools,
.room-tools {
  border: 1px solid #263247;
  border-radius: 7px;
  padding: 14px;
  background: #151f31;
}

.host-command-grid,
.room-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.host-tools p,
.room-tools p {
  color: #98a2b3;
  font-size: 10px;
}

.participant-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.participant-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #263247;
  padding: 10px 0;
}

.participant-row > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 7px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.participant-row strong,
.participant-row small {
  display: block;
}

.participant-row strong {
  color: #fff;
  font-size: 10px;
}

.participant-row small {
  margin-top: 2px;
  color: #98a2b3;
  font-size: 8px;
}

.control-bar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  overflow-x: auto;
  border-top: 1px solid #263247;
  padding: 8px 14px;
  background: #101828;
}

.control-bar > span {
  margin-right: auto;
  color: #98a2b3;
  font-size: 10px;
  font-weight: 800;
}

.control-bar button,
.control-bar a {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid #344054;
  border-radius: 6px;
  padding: 0 12px;
  background: #1d2939;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.control-bar a.red {
  border-color: var(--red);
  background: var(--red);
}

@media (max-width: 1100px) {
  .nav-wrap {
    gap: 14px;
  }

  .site-nav a {
    padding-inline: 7px;
    font-size: 11px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
    gap: 40px;
  }

  .level-track-ref {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 24px;
  }

  .classroom-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
}

@media (max-width: 920px) {
  .menu-btn {
    display: block;
    grid-column: 3;
    grid-row: 1;
  }

  .nav-wrap {
    grid-template-columns: auto 1fr auto;
  }

  .site-nav {
    position: absolute;
    top: 68px;
    right: 20px;
    left: 20px;
    display: none;
    align-items: stretch;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .site-nav.open,
  .site-nav.on {
    display: flex;
  }

  .site-nav a {
    min-height: 42px;
    padding: 12px;
  }

  .site-nav a::after {
    display: none;
  }

  .nav-actions {
    display: none;
  }

  .hero2 {
    padding: 62px 0;
  }

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

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

  .hero-visual {
    min-height: 390px;
  }

  .home-feature-layout,
  .certificate-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 42px;
  }

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

  .auth-page {
    grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1.2fr);
  }

  .auth-brand,
  .auth-form {
    padding: 40px;
  }

  .auth-brand h1 {
    margin-top: 62px;
    font-size: 34px;
  }

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

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

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

  .lesson-panel {
    min-height: 480px;
    border-top: 1px solid #263247;
    border-left: 0;
  }
}

@media (max-width: 700px) {
  .wrap {
    width: min(100% - 28px, 1180px);
  }

  .site-header,
  .nav-wrap {
    height: 62px;
  }

  .site-nav {
    top: 62px;
    right: 14px;
    left: 14px;
  }

  .hero2 {
    min-height: auto;
    padding: 46px 0 48px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-copy > p {
    font-size: 14px;
  }

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

  .hero-visual {
    min-height: 350px;
  }

  .float-card.live {
    top: 24px;
    left: 18px;
    width: 62%;
    padding: 17px;
  }

  .float-card.mini.one {
    top: 24px;
    right: 16px;
    min-width: 90px;
  }

  .float-card.mini.two {
    bottom: 27px;
    left: 16px;
    min-width: 90px;
  }

  .float-card.test {
    right: 16px;
    bottom: 24px;
    width: 58%;
    padding: 16px;
  }

  .partner-strip .wrap > div {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .section {
    padding: 62px 0;
  }

  .section-head h2,
  .subhero h1 {
    font-size: 29px;
  }

  .home-stats,
  .feature-grid,
  .process-grid,
  .testimonial-grid.two,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .level-card-ref {
    min-height: 270px;
  }

  .feature-card,
  .process-card {
    min-height: auto;
  }

  .certificate-card {
    padding: 28px 18px;
  }

  .cta-dark .wrap > div {
    align-items: stretch;
    flex-direction: column;
  }

  .footer-grid {
    gap: 24px;
  }

  .footer-grid > div:not(:first-child) {
    border-top: 1px solid var(--line);
    padding-top: 18px;
  }

  .auth-page {
    width: min(100% - 20px, 560px);
    min-height: auto;
    grid-template-columns: minmax(0, 1fr);
    margin: 18px auto;
  }

  .auth-brand {
    min-height: 220px;
    padding: 28px;
  }

  .auth-brand h1 {
    margin: 40px 0 12px;
    font-size: 28px;
  }

  .auth-brand > div > p {
    font-size: 12px;
  }

  .auth-testimonial,
  .auth-stats {
    display: none;
  }

  .auth-form {
    padding: 36px 24px;
  }

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

  .panel-top {
    height: 60px;
    padding: 0 10px 0 72px;
  }

  .panel-top .brand {
    font-size: 14px;
  }

  .panel-top .brand-mark {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .panel-top .logo-suffix,
  .panel-user > span {
    display: none;
  }

  .side {
    top: 0;
    z-index: 121;
    width: 62px;
    padding: 8px 7px 24px;
  }

  .side .ns,
  .ni > span:last-child {
    display: none;
  }

  .ni {
    min-height: 46px;
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 5px;
  }

  .ni .ico {
    width: 32px;
    height: 32px;
  }

  .panel-main {
    width: calc(100% - 62px);
    max-width: calc(100% - 62px);
    margin-left: 62px;
    padding: 82px 10px 32px;
  }

  .page-head h1 {
    font-size: 23px;
  }

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

  .stat-card {
    min-height: 86px;
  }

  .card {
    padding: 15px;
  }

  .toolbar > * {
    width: 100%;
  }

  .toolbar input,
  .toolbar select,
  .toolbar .btn,
  .toolbar .soft,
  .toolbar .link-soft {
    width: 100%;
  }

  .panel-main table {
    min-width: 680px;
  }

  .live-gate-page {
    padding: 12px;
  }

  .live-gate-card,
  .classroom-lobby {
    grid-template-columns: minmax(0, 1fr);
  }

  .live-gate-copy,
  .lobby-main {
    padding: 28px 20px;
  }

  .live-gate-side,
  .lobby-side {
    display: none;
  }

  .live-meta-grid,
  .live-gate-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .classroom-lobby {
    width: calc(100% - 20px);
    margin: 10px;
  }

  .classroom-shell {
    grid-template-rows: auto auto auto;
  }

  .cls-header {
    min-height: 60px;
    gap: 6px;
    padding: 7px 8px;
  }

  .cls-header .brand > span:not(.brand-mark),
  .cls-header .logo-suffix,
  .live-title span {
    display: none;
  }

  .live-title {
    gap: 5px;
  }

  .live-title strong {
    max-width: 125px;
    font-size: 10px;
  }

  .classroom-actions .btn,
  .classroom-actions .link-soft {
    min-height: 32px;
    padding-inline: 8px;
    font-size: 9px;
  }

  .video-stage {
    padding: 0;
  }

  .video-frame,
  .jitsi-api-frame,
  .jitsi-api-frame > div,
  .jitsi-api-frame iframe,
  .video-stage iframe {
    min-height: 56dvh;
    border-radius: 0;
  }

  .live-connection-tools {
    right: 8px;
    left: 8px;
    max-width: calc(100vw - 16px);
    overflow-x: auto;
  }

  .lesson-panel {
    min-height: 450px;
  }

  .lesson-panel .tabs {
    display: flex;
    overflow-x: auto;
  }

  .lesson-panel .tabs button {
    min-width: 76px;
    flex: 1 0 76px;
  }

  .host-command-grid,
  .room-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .control-bar {
    position: sticky;
    z-index: 30;
    bottom: 0;
    justify-content: flex-start;
  }

  .control-bar > span {
    display: none;
  }
}

@media (max-width: 420px) {
  .hero-copy h1 {
    font-size: 36px;
  }

  .hero-visual {
    min-height: 420px;
  }

  .float-card.live,
  .float-card.test {
    right: 14px;
    left: 14px;
    width: auto;
  }

  .float-card.test {
    bottom: 16px;
  }

  .float-card.mini.one {
    top: 190px;
    right: 14px;
  }

  .float-card.mini.two {
    bottom: 118px;
    left: 14px;
  }

  .level-track-ref {
    grid-template-columns: minmax(0, 1fr);
  }

  .level-card-ref {
    min-height: 0;
  }

  .form-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

/* Final hero geometry: prevents legacy reference-card coordinates from colliding. */
.home-ref .hero-visual {
  height: 400px;
  min-height: 400px;
}

.home-ref .hero-visual .float-card.live {
  top: 28px;
  left: 28px;
  width: 260px;
  min-height: 145px;
  padding: 20px;
}

.home-ref .hero-visual .float-card.mini.one {
  top: 28px;
  right: 20px;
  width: 112px;
  min-width: 112px;
  min-height: 94px;
}

.home-ref .hero-visual .float-card.test {
  right: 20px;
  bottom: 20px;
  width: 180px;
  min-height: 150px;
  padding: 18px;
}

.home-ref .hero-visual .float-card.mini.two {
  bottom: 28px;
  left: 24px;
  width: 122px;
  min-width: 122px;
  min-height: 86px;
}

@media (max-width: 700px) {
  .home-ref .hero-visual {
    height: 510px;
    min-height: 510px;
  }

  .home-ref .hero-visual .float-card.live {
    top: 16px;
    right: 14px;
    left: 14px;
    width: auto;
    min-height: 142px;
  }

  .home-ref .hero-visual .float-card.mini.one {
    display: none;
  }

  .home-ref .hero-visual .float-card.mini.two {
    display: none;
  }

  .home-ref .hero-visual .float-card.test {
    top: 190px;
    right: 14px;
    bottom: auto;
    left: 14px;
    width: auto;
    min-height: 158px;
  }
}
