:root {
  --ink: #0d1120;
  --muted: #526078;
  --brand: #172579;
  --brand-2: #2857b8;
  --blue: #2857b8;
  --white: #ffffff;
  --accent: #f2a93b;
  --accent-soft: #fff5de;
  --brand-soft: #eef2ff;
  --cream: #fff8ec;
  --peach: #ffe4da;
  --line: #dbe3f2;
  --paper: #f7f9fe;
  --surface: #ffffff;
  --shadow: 0 18px 46px rgba(20, 36, 100, 0.12);
  --soft-shadow: 0 12px 28px rgba(20, 36, 100, 0.08);
  --edu-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='180' viewBox='0 0 260 180'%3E%3Cg fill='none' stroke='%23172579' stroke-opacity='.12' stroke-width='2'%3E%3Cpath d='M28 42h70M28 62h98M178 28l38 20-38 20-38-20zM158 116h60M158 136h38M72 118c22 0 22-34 44-34s22 34 44 34'/%3E%3Ccircle cx='54' cy='126' r='24'/%3E%3Cpath d='M36 126h36M54 108v36M196 84c18 0 18-24 36-24'/%3E%3C/g%3E%3Ctext x='28' y='98' fill='%23172579' fill-opacity='.14' font-family='Arial' font-size='18' font-weight='700'%3EA+%3C/text%3E%3Ctext x='168' y='98' fill='%23172579' fill-opacity='.12' font-family='Arial' font-size='16' font-weight='700'%3EH2O%3C/text%3E%3C/svg%3E");
  --max: 1200px;
  font-family: Avenir, Montserrat, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 10% 0%, rgba(242, 169, 59, 0.17), transparent 34rem),
    radial-gradient(circle at 92% 18%, rgba(40, 87, 184, 0.14), transparent 30rem),
    linear-gradient(180deg, #ffffff 0%, var(--paper) 100%);
  color: var(--ink);
  min-height: 100vh;
  position: relative;
}

body::before {
  background-image:
    var(--edu-pattern),
    linear-gradient(rgba(23, 37, 121, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 37, 121, 0.035) 1px, transparent 1px);
  background-position: center top, center top, center top;
  background-size: 260px 180px, 34px 34px, 34px 34px;
  content: "";
  inset: 0;
  opacity: 0.7;
  pointer-events: none;
  position: fixed;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

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

.site-header,
.site-footer {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(219, 227, 242, 0.92);
  border-top: 0;
  box-shadow: 0 8px 28px rgba(20, 36, 100, 0.06);
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--max);
  padding: 26px 36px 18px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-footer {
  background:
    linear-gradient(135deg, rgba(13, 17, 32, 0.98), rgba(23, 37, 121, 0.96)),
    var(--edu-pattern);
  background-size: auto, 280px 194px;
  border: 0;
  box-shadow: none;
  color: #ffffff;
  display: block;
  margin-top: 0;
  overflow: hidden;
  padding: 52px clamp(80px, 7vw, 120px) 30px 44px;
  position: relative;
}

.site-footer::before {
  background: linear-gradient(90deg, var(--accent), #ffcf66, var(--brand-2));
  content: "";
  height: 4px;
  inset: 0 0 auto;
  position: absolute;
}

.footer-grid {
  display: grid;
  gap: clamp(28px, 4vw, 64px);
  grid-template-columns: minmax(300px, 1.45fr) minmax(140px, 0.62fr) minmax(140px, 0.62fr) minmax(220px, 0.9fr);
}

.footer-brand-summary {
  display: grid;
  gap: 22px;
}

.footer-brand-link {
  align-items: flex-start;
  min-width: 0;
}

.footer-brand-link .brand-name {
  color: #ffffff;
  font-size: 1.25rem;
}

.footer-brand-link .brand-tagline {
  color: rgba(255, 255, 255, 0.76);
  font-size: 1rem;
  line-height: 1.55;
  max-width: 320px;
}

.footer-contact-list {
  display: grid;
  font-style: normal;
  gap: 12px;
}

.footer-contact-list > div {
  align-items: center;
  display: flex;
  gap: 12px;
}

.footer-contact-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  color: var(--accent);
  display: flex;
  flex: none;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.footer-contact-icon svg {
  height: 15px;
  width: 15px;
}

.footer-contact-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.footer-contact-label {
  color: #ffcf66;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.footer-contact-value {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.4;
  text-decoration: none;
}

.footer-contact-list a.footer-contact-value:hover,
.footer-contact-list a.footer-contact-value:focus-visible {
  color: #ffffff;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.footer-link-group {
  align-content: start;
  display: grid;
  gap: 12px;
}

.footer-link-group h2 {
  color: #ffcf66;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  margin: 6px 0 6px;
  text-transform: uppercase;
}

.footer-link-group > a:not(.button):not(.footer-portal-link) {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  width: fit-content;
}

.footer-link-group > a:not(.button):not(.footer-portal-link):hover,
.footer-link-group > a:not(.button):not(.footer-portal-link):focus-visible {
  color: #ffffff;
  outline: none;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 5px;
}

.footer-portal-link {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  margin-top: 4px;
  padding: 8px 16px;
  text-decoration: none;
  width: fit-content;
}

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

.footer-primary-action {
  background: linear-gradient(135deg, var(--accent), #ffcf66);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
  color: #171717;
  margin-bottom: 2px;
  min-height: 46px;
  padding: 10px 18px;
}

.footer-bottom {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-top: 38px;
  padding-top: 22px;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.82rem;
  margin: 0;
}

.footer-utility-links {
  align-items: center;
  display: flex;
  gap: 18px;
}

.footer-utility-links > a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.footer-utility-links > a:hover,
.footer-utility-links > a:focus-visible {
  color: #ffffff;
  outline: none;
}

.footer-credit-link {
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0;
}

.footer-credit-link:hover,
.footer-credit-link:focus-visible {
  color: #ffffff;
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.credits-dialog {
  border: 0;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(20, 36, 100, 0.24);
  max-width: min(760px, calc(100vw - 32px));
  padding: 0;
}

.credits-dialog::backdrop {
  background: rgba(13, 22, 54, 0.48);
  backdrop-filter: blur(4px);
}

.credits-panel {
  background: var(--white);
  color: var(--ink);
  padding: 34px;
  position: relative;
}

.credits-close {
  align-items: center;
  background: rgba(243, 246, 252, 0.95);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--blue-dark);
  cursor: pointer;
  display: flex;
  font-size: 1.6rem;
  height: 42px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 22px;
  top: 22px;
  width: 42px;
}

.credits-panel h2 {
  margin: 0 48px 10px 0;
}

.credits-intro {
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 620px;
}

.credits-table-wrap {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow-x: auto;
}

.credits-table {
  border-collapse: collapse;
  min-width: 620px;
  width: 100%;
}

.credits-table th,
.credits-table td {
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
}

.credits-table th {
  background: rgba(243, 246, 252, 0.92);
  color: var(--blue-dark);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.credits-table tr:last-child td {
  border-bottom: 0;
}

.brand {
  align-items: center;
  display: flex;
  gap: 18px;
  min-width: 260px;
  text-decoration: none;
}

.brand.small {
  min-width: 220px;
}

.brand-logo-motion {
  align-items: center;
  display: inline-flex;
  flex: 0 0 92px;
  height: 92px;
  isolation: isolate;
  justify-content: center;
  position: relative;
  width: 92px;
}

.brand-logo-motion::before {
  background: radial-gradient(circle, rgba(242, 169, 59, 0.2), rgba(104, 54, 151, 0.1) 48%, transparent 70%);
  border-radius: 50%;
  content: "";
  inset: 7px;
  opacity: 0.75;
  position: absolute;
  transform: scale(0.88);
  animation: brand-nucleus-glow 3.6s ease-in-out infinite;
  z-index: -1;
}

.brand-logo {
  animation: brand-nucleus-breathe 5.4s ease-in-out infinite;
  filter: drop-shadow(0 5px 9px rgba(73, 36, 111, 0.2));
  height: 86px;
  object-fit: contain;
  position: relative;
  width: 86px;
  z-index: 1;
}

.brand-particle,
.brand-star {
  pointer-events: none;
  position: absolute;
  z-index: 3;
}

.brand-particle {
  background: #fff7c2;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow:
    0 0 4px #ffffff,
    0 0 9px rgba(255, 191, 62, 0.95),
    0 0 15px rgba(242, 169, 59, 0.7);
  height: 7px;
  left: calc(50% - 3.5px);
  top: calc(50% - 3.5px);
  width: 7px;
}

.brand-particle-one {
  animation: brand-electron-orbit 3.8s linear infinite;
  --orbit-radius: 43px;
}

.brand-particle-two {
  animation: brand-electron-orbit-reverse 5.1s linear -1.8s infinite;
  background: #f4dcff;
  box-shadow: 0 0 4px #ffffff, 0 0 10px rgba(141, 75, 190, 0.95), 0 0 16px rgba(104, 54, 151, 0.68);
  --orbit-radius: 35px;
}

.brand-particle-three {
  animation: brand-electron-orbit 6.2s linear -3.1s infinite;
  height: 5px;
  width: 5px;
  --orbit-radius: 47px;
}

.brand-star {
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 194, 64, 0.95);
  height: 2px;
  width: 10px;
}

.brand-star::after {
  background: inherit;
  content: "";
  height: 10px;
  left: 4px;
  position: absolute;
  top: -4px;
  width: 2px;
}

.brand-star-one {
  animation: brand-star-twinkle 2.4s ease-in-out infinite;
  right: 2px;
  top: 8px;
}

.brand-star-two {
  animation: brand-star-twinkle 2.9s ease-in-out -1.2s infinite;
  bottom: 8px;
  left: 1px;
  transform: scale(0.72);
}

@keyframes brand-electron-orbit {
  from { transform: rotate(0deg) translateX(var(--orbit-radius)) rotate(0deg); }
  to { transform: rotate(360deg) translateX(var(--orbit-radius)) rotate(-360deg); }
}

@keyframes brand-electron-orbit-reverse {
  from { transform: rotate(360deg) translateX(var(--orbit-radius)) rotate(-360deg); }
  to { transform: rotate(0deg) translateX(var(--orbit-radius)) rotate(0deg); }
}

@keyframes brand-nucleus-glow {
  0%, 100% { opacity: 0.45; transform: scale(0.82); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

@keyframes brand-nucleus-breathe {
  0%, 100% { transform: scale(1) rotate(-0.7deg); }
  50% { transform: scale(1.035) rotate(0.7deg); }
}

@keyframes brand-star-twinkle {
  0%, 100% { opacity: 0.2; scale: 0.6; }
  45% { opacity: 1; scale: 1.18; }
  65% { opacity: 0.55; scale: 0.86; }
}

.brand.small .brand-logo-motion {
  flex-basis: 76px;
  height: 76px;
  transform: scale(0.82);
  transform-origin: left center;
  width: 76px;
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-name {
  color: var(--brand);
  font-size: 1.1rem;
  font-weight: 800;
}

.brand-tagline {
  font-size: clamp(1.15rem, 2vw, 1.8rem);
  line-height: 1.1;
}

.brand-locale {
  align-items: center;
  align-self: start;
  background: rgba(40, 87, 184, 0.1);
  border: 1px solid rgba(40, 87, 184, 0.18);
  border-radius: 999px;
  color: var(--brand);
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  margin-top: 4px;
  padding: 5px 10px;
  width: fit-content;
}

.site-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--ink);
  display: inline-flex;
  font-weight: 700;
  padding: 8px 0;
  position: relative;
  text-decoration: none;
}

.site-nav a::after {
  background: var(--accent);
  border-radius: 999px;
  bottom: 0;
  content: "";
  height: 3px;
  left: 0;
  position: absolute;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 160ms ease;
  width: 100%;
}

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

.site-nav a.active::after,
.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-nav > .nav-portal-link {
  background: linear-gradient(135deg, var(--brand), var(--blue));
  border-radius: 999px;
  color: var(--white);
  padding: 10px 16px;
}

.site-nav > .nav-portal-link::after {
  display: none;
}

.site-nav > .nav-portal-link:hover,
.site-nav > .nav-portal-link:focus-visible {
  box-shadow: 0 8px 20px rgba(36, 75, 184, 0.24);
  color: var(--white);
  outline: none;
  transform: translateY(-1px);
}

.site-nav > .nav-portal-session {
  align-items: center;
  background: linear-gradient(135deg, var(--brand), var(--blue));
  border-radius: 999px;
  display: inline-flex;
  gap: 10px;
  padding: 8px 8px 8px 16px;
}

.site-nav > .nav-portal-session .nav-portal-name {
  align-items: center;
  color: var(--white);
  display: inline-flex;
  font-weight: 600;
  gap: 6px;
}

.site-nav > .nav-portal-session .nav-portal-name::after {
  display: none;
}

.site-nav > .nav-portal-session .nav-portal-name-arrow {
  opacity: 0.75;
  transition: transform 160ms ease;
}

.site-nav > .nav-portal-session .nav-portal-name:hover .nav-portal-name-arrow,
.site-nav > .nav-portal-session .nav-portal-name:focus-visible .nav-portal-name-arrow {
  opacity: 1;
  transform: translateX(2px);
}

.site-nav > .nav-portal-session .nav-portal-logout {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: var(--white);
  font-size: 0.85em;
  padding: 4px 12px;
}

.site-nav > .nav-portal-session .nav-portal-logout::after {
  display: none;
}

.site-nav > .nav-portal-session .nav-portal-logout:hover,
.site-nav > .nav-portal-session .nav-portal-logout:focus-visible {
  background: rgba(255, 255, 255, 0.3);
  color: var(--white);
  outline: none;
}

.footer-link-group .nav-portal-session {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  display: inline-flex;
  gap: 4px;
  margin-top: 4px;
  padding: 6px 6px 6px 14px;
  width: fit-content;
}

.footer-link-group .nav-portal-session .nav-portal-name {
  align-items: center;
  color: #ffffff;
  display: inline-flex;
  font-weight: 700;
  gap: 5px;
  text-decoration: none;
}

.footer-link-group .nav-portal-session .nav-portal-name-arrow {
  opacity: 0.7;
  transition: transform 160ms ease;
}

.footer-link-group .nav-portal-session .nav-portal-name:hover .nav-portal-name-arrow,
.footer-link-group .nav-portal-session .nav-portal-name:focus-visible .nav-portal-name-arrow {
  opacity: 1;
  transform: translateX(2px);
}

.footer-link-group .nav-portal-session .nav-portal-logout {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 5px 12px;
  text-decoration: none;
}

.footer-link-group .nav-portal-session .nav-portal-logout:hover,
.footer-link-group .nav-portal-session .nav-portal-logout:focus-visible {
  background: rgba(255, 255, 255, 0.26);
  color: #ffffff;
  outline: none;
}

.nav-toggle {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 5px;
  height: 44px;
  justify-content: center;
  padding: 0;
  width: 44px;
}

.nav-toggle span {
  background: var(--brand);
  border-radius: 999px;
  display: block;
  height: 2px;
  transition: transform 160ms ease, opacity 160ms ease;
  width: 20px;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-item.has-dropdown {
  margin-bottom: -20px;
  padding-bottom: 20px;
  position: relative;
}

.nav-dropdown-toggle {
  display: none;
}

.nav-dropdown-menu {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  gap: 2px;
  left: 50%;
  min-width: 220px;
  opacity: 0;
  padding: 10px;
  position: absolute;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  transition: opacity 140ms ease;
  z-index: 20;
}

.nav-item.has-dropdown:hover .nav-dropdown-menu,
.nav-item.has-dropdown:focus-within .nav-dropdown-menu,
.nav-item.has-dropdown.dropdown-open .nav-dropdown-menu {
  display: flex;
  opacity: 1;
}

.nav-dropdown-menu a {
  border-radius: 8px;
  color: var(--ink);
  font-weight: 600;
  padding: 10px 12px;
  white-space: nowrap;
}

.nav-dropdown-menu a::after {
  display: none;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  background: var(--accent-soft);
  color: var(--brand);
}

.nav-dropdown-overview {
  align-items: center;
  justify-content: space-between;
}

.nav-dropdown-overview small {
  color: var(--muted);
  font-size: 0.7rem;
  margin-left: 16px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  isolation: isolate;
  margin: 34px auto 42px;
  max-width: var(--max);
  min-height: 600px;
  padding: 0 36px;
  position: relative;
}

.hero::before {
  background:
    radial-gradient(circle at 16% 18%, rgba(242, 169, 59, 0.3), transparent 16rem),
    linear-gradient(135deg, rgba(23, 37, 121, 0.96), rgba(40, 87, 184, 0.9)),
    var(--edu-pattern);
  background-size: auto, 260px 180px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  content: "";
  inset: 26px 18px -26px 18px;
  position: absolute;
  z-index: -1;
}

.hero-copy {
  background:
    radial-gradient(circle at 12% 12%, rgba(242, 169, 59, 0.24), transparent 15rem),
    linear-gradient(135deg, rgba(13, 17, 32, 0.96), rgba(23, 37, 121, 0.94)),
    var(--edu-pattern);
  background-position: center;
  background-size: auto, 260px 180px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px 0 0 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px;
}

.hero-kicker {
  align-self: flex-start;
  background: rgba(242, 169, 59, 0.18);
  border: 1px solid rgba(242, 169, 59, 0.55);
  border-radius: 999px;
  color: #ffe7a8 !important;
  font-size: 0.9rem !important;
  font-weight: 900;
  margin: 0 0 24px !important;
  padding: 9px 14px;
}

.hero-copy h1 {
  color: #ffffff;
  font-size: clamp(3rem, 6vw, 4.9rem);
  line-height: 1;
  margin: 0 0 30px;
}

.hero-copy p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.18rem;
  line-height: 1.6;
  margin: 0 0 24px;
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 34px;
}

.hero-pills a,
.hero-pills span {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 8px 12px;
  text-decoration: none;
  transition: background 150ms ease, transform 150ms ease, border-color 150ms ease;
}

.hero-pills a:hover,
.hero-pills a:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.hero-media {
  border: 1px solid rgba(219, 227, 242, 0.95);
  border-left: 0;
  border-radius: 0 18px 18px 0;
  box-shadow: var(--shadow);
  min-height: 460px;
  overflow: hidden;
}

.hero-image {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.button {
  align-items: center;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 50px;
  padding: 12px 22px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  width: fit-content;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), #ffcf66);
  box-shadow: 0 12px 24px rgba(242, 169, 59, 0.25);
  color: #171717;
}

.button.light {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.82);
  color: var(--brand);
}

.hero .button.primary {
  background: #ffffff;
  color: var(--brand);
  min-width: 190px;
}

.learning-strip {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto 110px;
  max-width: var(--max);
  padding: 0 36px;
}

.learning-strip article {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 28px;
  position: relative;
}

.learning-strip article::before {
  background: linear-gradient(180deg, var(--accent), var(--brand-2));
  border-radius: 999px;
  content: "";
  height: calc(100% - 44px);
  left: 0;
  position: absolute;
  top: 22px;
  width: 5px;
}

.learning-strip strong {
  color: var(--brand);
  font-size: 1.25rem;
}

.learning-strip span {
  color: var(--muted);
  line-height: 1.55;
}

.page-highlights {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 auto 86px;
  max-width: var(--max);
  padding: 0 36px;
}

.page-highlights article {
  background:
    linear-gradient(135deg, rgba(23, 37, 121, 0.96), rgba(40, 87, 184, 0.88)),
    var(--edu-pattern);
  background-size: auto, 260px 180px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  box-shadow: var(--shadow);
  color: #ffffff;
  min-height: 190px;
  overflow: hidden;
  padding: 28px;
  position: relative;
}

.page-highlights article::after {
  background: rgba(242, 169, 59, 0.18);
  border-radius: 999px;
  content: "";
  height: 118px;
  position: absolute;
  right: -38px;
  top: -42px;
  width: 118px;
}

.page-highlights article:nth-child(2) {
  background:
    linear-gradient(135deg, rgba(13, 17, 32, 0.96), rgba(23, 37, 121, 0.9)),
    var(--edu-pattern);
}

.page-highlights article:nth-child(3) {
  background:
    linear-gradient(135deg, rgba(242, 169, 59, 0.96), rgba(255, 207, 102, 0.9));
  color: #171717;
}

.page-highlights span {
  color: rgba(255, 255, 255, 0.76);
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 900;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.page-highlights article:nth-child(3) span {
  color: rgba(23, 37, 121, 0.78);
}

.page-highlights strong {
  display: block;
  font-size: clamp(1.35rem, 2vw, 1.8rem);
  line-height: 1.1;
  margin-bottom: 14px;
  position: relative;
  z-index: 1;
}

.page-highlights p {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.6;
  margin: 0;
  position: relative;
  z-index: 1;
}

.page-highlights article:nth-child(3) p {
  color: rgba(23, 37, 121, 0.82);
}

.about-showcase,
.chemistry-showcase,
.maths-showcase,
.science-showcase,
.computer-showcase,
.experiments-showcase,
.physics-showcase,
.examprep-showcase {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  margin: 0 auto 86px;
  max-width: var(--max);
  padding: 0 36px;
}

.showcase-copy,
.chemistry-board,
.maths-board,
.science-board,
.computer-board,
.experiments-board,
.physics-board,
.examprep-board {
  background:
    radial-gradient(circle at 18% 10%, rgba(242, 169, 59, 0.26), transparent 14rem),
    linear-gradient(135deg, rgba(13, 17, 32, 0.96), rgba(23, 37, 121, 0.92)),
    var(--edu-pattern);
  background-size: auto, 260px 180px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  color: #ffffff;
  min-height: 360px;
  padding: 42px;
}

.showcase-copy .eyebrow,
.chemistry-board .eyebrow,
.maths-board .eyebrow,
.science-board .eyebrow,
.computer-board .eyebrow,
.experiments-board .eyebrow,
.physics-board .eyebrow,
.examprep-board .eyebrow {
  color: #ffcf66;
}

.showcase-copy h2,
.chemistry-board h2,
.maths-board h2,
.science-board h2,
.computer-board h2,
.experiments-board h2,
.physics-board h2,
.examprep-board h2 {
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.02;
  margin: 0 0 22px;
}

.showcase-copy p,
.chemistry-board p,
.maths-board p,
.science-board p,
.computer-board p,
.experiments-board p,
.physics-board p,
.examprep-board p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.08rem;
  line-height: 1.7;
}

.about-pillars,
.chemistry-steps,
.maths-steps,
.science-steps,
.computer-steps,
.experiments-steps,
.physics-steps,
.examprep-steps {
  display: grid;
  gap: 18px;
}

.about-pillars article,
.chemistry-steps article,
.maths-steps article,
.science-steps article,
.computer-steps article,
.experiments-steps article,
.physics-steps article,
.examprep-steps article {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
  min-height: 108px;
  padding: 26px;
  position: relative;
}

.about-pillars article {
  display: grid;
  gap: 10px;
  grid-template-columns: 54px minmax(0, 1fr);
}

.about-pillars span {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 12px;
  color: var(--brand);
  display: flex;
  font-weight: 900;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.about-pillars h3 {
  color: var(--brand);
  font-size: 1.28rem;
  grid-column: 2;
  margin: 0;
}

.about-pillars p {
  color: var(--muted);
  grid-column: 2;
  line-height: 1.58;
  margin: 0;
}

.about-hero-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.about-story {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  margin: 0 auto 86px;
  max-width: var(--max);
  overflow: hidden;
  padding: 46px 36px 36px;
}

.about-story-heading {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  margin-bottom: 34px;
}

.about-story-heading .eyebrow {
  grid-column: 1 / -1;
  margin: 0;
}

.about-story-heading h2 {
  color: var(--brand);
  font-size: clamp(2.15rem, 4vw, 3.5rem);
  line-height: 1.04;
  margin: 0;
  max-width: 1100px;
}

.about-story-heading > p:last-child {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.72;
  margin: 0;
  max-width: 1080px;
}

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

.about-story-grid article {
  background: linear-gradient(145deg, rgba(237, 242, 255, 0.84), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(36, 75, 184, 0.12);
  border-left: 5px solid var(--accent);
  border-radius: 14px;
  padding: 26px;
}

.about-story-grid span {
  color: var(--brand-2);
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.about-story-grid h3 {
  color: var(--brand);
  font-size: 1.28rem;
  line-height: 1.25;
  margin: 0 0 10px;
}

.about-story-grid p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.about-story-closing {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 14px;
  display: flex;
  gap: 28px;
  justify-content: space-between;
  margin-top: 18px;
  padding: 24px 26px;
}

.about-story-closing p {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.65;
  margin: 0;
  max-width: 780px;
}

.about-story-closing .button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.about-team-preview {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  margin: 0 auto 86px;
  max-width: var(--max);
  padding: 42px 36px;
}

.about-team-heading {
  align-items: end;
  display: flex;
  gap: 30px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.about-team-heading h2 {
  color: var(--brand);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.05;
  margin: 0 0 14px;
}

.about-team-heading p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
  max-width: 760px;
}

.about-team-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.about-team-grid article {
  align-items: center;
  background: linear-gradient(145deg, rgba(237, 242, 255, 0.86), rgba(255, 255, 255, 0.98));
  border: 1px solid rgba(36, 75, 184, 0.12);
  border-radius: 14px;
  display: flex;
  gap: 14px;
  min-height: 92px;
  padding: 16px;
}

.about-team-grid article > span {
  align-items: center;
  background: linear-gradient(135deg, var(--brand), var(--blue));
  border-radius: 50%;
  color: var(--white);
  display: flex;
  flex: 0 0 48px;
  font-size: 0.78rem;
  font-weight: 900;
  height: 48px;
  justify-content: center;
}

.about-team-grid h3 {
  color: var(--brand);
  font-size: 1rem;
  margin: 0 0 5px;
}

.about-team-grid p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.formula-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.hero-formulas {
  margin: 30px 0 0;
}

.formula-row span {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  color: #ffffff;
  display: flex;
  font-size: 1.2rem;
  font-weight: 900;
  min-height: 54px;
  padding: 0 18px;
}

.chemistry-steps article,
.maths-steps article,
.science-steps article,
.computer-steps article,
.experiments-steps article,
.physics-steps article,
.examprep-steps article {
  border-left: 6px solid var(--accent);
  display: grid;
  gap: 10px;
}

.chemistry-steps strong,
.maths-steps strong,
.science-steps strong,
.computer-steps strong,
.experiments-steps strong,
.physics-steps strong,
.examprep-steps strong {
  color: var(--brand);
  font-size: 1.35rem;
}

.chemistry-steps span,
.maths-steps span,
.science-steps span,
.computer-steps span,
.experiments-steps span,
.physics-steps span,
.examprep-steps span {
  color: var(--muted);
  line-height: 1.62;
}

.button.dark {
  background: #101322;
  box-shadow: 0 12px 24px rgba(16, 19, 34, 0.16);
  color: #ffffff;
  min-width: 160px;
}

.button.outline {
  background: #ffffff;
  border-color: var(--brand);
  color: var(--brand);
}

.button.ghost {
  background: transparent;
  color: var(--brand);
}

.games-access .button.ghost {
  background: rgba(255, 255, 255, 0.86);
  border-color: rgba(23, 37, 121, 0.2);
}

.button:hover {
  box-shadow: 0 14px 30px rgba(20, 36, 100, 0.16);
  transform: translateY(-1px);
}

.subjects-section {
  display: grid;
  gap: 70px;
  grid-template-columns: 240px minmax(0, 1fr);
  margin: 0 auto 120px;
  max-width: var(--max);
  padding: 0 36px;
}

.why-copy {
  background: rgba(255, 255, 255, 0.78);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  font-size: 1.13rem;
  line-height: 1.65;
  padding: 26px;
}

.why-copy h2,
.contact-band h2,
.topic-card h2,
.two-column-list h2,
.team-card h2,
.mini-contact h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1.1;
  margin: 0 0 24px;
}

.subject-grid {
  display: grid;
  gap: 58px 76px;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.subject-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  color: inherit;
  display: grid;
  gap: 16px;
  overflow: hidden;
  padding: 18px;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.subject-card:hover {
  border-color: rgba(40, 87, 184, 0.35);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.subject-card h3 {
  font-size: 1.55rem;
  line-height: 1.1;
  margin: 0;
}

.subject-card p {
  color: var(--ink);
  line-height: 1.55;
  margin: 0;
}

.subject-art {
  align-items: center;
  aspect-ratio: 1;
  background: var(--brand-soft);
  border-radius: 8px;
  color: var(--brand);
  display: flex;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.subject-art.image-card {
  background: #f7f8ff;
}

.subject-image {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.subject-art span {
  font-size: 1.1rem;
  font-weight: 900;
  max-width: 78%;
  text-align: center;
}

.subject-art.math span {
  color: #222222;
  font-family: Avenir, Montserrat, "Helvetica Neue", Arial, sans-serif;
  transform: rotate(-8deg);
}

.subject-art.science::before,
.subject-art.science::after {
  border: 5px solid #3845cf;
  border-radius: 50%;
  content: "";
  height: 100px;
  position: absolute;
  width: 42px;
}

.subject-art.science::before {
  transform: rotate(55deg);
}

.subject-art.science::after {
  transform: rotate(-55deg);
}

.subject-art.computer::before {
  background: #2b2f96;
  box-shadow: 0 38px 0 -30px #6c74ec;
  content: "";
  height: 62px;
  width: 86px;
}

.subject-art.language::before {
  border-bottom: 28px solid #27318d;
  border-left: 78px solid transparent;
  border-right: 78px solid transparent;
  content: "";
  height: 0;
  transform: translateY(8px);
  width: 0;
}

.subject-art.experiment,
.subject-art.chemistry {
  background: var(--peach);
}

.subject-art.experiment::before {
  background: #3845cf;
  border-radius: 50%;
  content: "";
  height: 92px;
  width: 92px;
}

.subject-art.chemistry::before {
  border: 26px solid transparent;
  border-bottom: 88px solid #263194;
  content: "";
  transform: translateY(-24px);
  width: 0;
}

.games-hero {
  background:
    radial-gradient(circle at 82% 20%, rgba(242, 169, 59, 0.34), transparent 20rem),
    linear-gradient(135deg, rgba(13, 17, 32, 0.96), rgba(23, 37, 121, 0.92)),
    var(--edu-pattern);
  color: #ffffff;
}

.games-hero p {
  color: rgba(255, 255, 255, 0.84);
}

.games-hero .eyebrow {
  color: #ffd77e;
}

.games-hero-panel {
  align-items: center;
  align-self: stretch;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 46px);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  display: grid;
  justify-items: center;
  min-height: 240px;
  padding: 28px;
  text-align: center;
}

.games-hero-panel span,
.games-hero-panel small {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.games-hero-panel strong {
  color: #ffffff;
  font-size: clamp(4rem, 10vw, 7.5rem);
  line-height: 0.9;
}

.games-access {
  margin: 0 auto 72px;
  max-width: var(--max);
  padding: 0 36px;
}

.games-lock,
.games-unlocked {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.games-lock {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.55fr);
  padding: clamp(24px, 4vw, 40px);
}

.games-lock h2,
.games-unlocked-heading h2 {
  color: var(--brand);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  margin: 0 0 16px;
}

.games-lock p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.games-login {
  align-self: start;
  background: var(--accent-soft);
  border: 1px solid rgba(242, 169, 59, 0.28);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  padding: 22px;
}

.games-login label {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

.games-login input {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 50px;
  padding: 0 14px;
  width: 100%;
}

.games-login input:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(40, 87, 184, 0.14);
  outline: none;
}

.games-status {
  font-size: 0.95rem;
  font-weight: 800;
  min-height: 24px;
}

.games-status.error {
  color: #a00022;
}

.games-unlocked {
  display: grid;
  gap: 26px;
  padding: clamp(22px, 4vw, 36px);
}

.games-unlocked[hidden],
.games-lock[hidden] {
  display: none;
}

.games-unlocked-heading {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

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

.game-access-card {
  background: #101322;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #ffffff;
  display: grid;
  grid-template-rows: 220px minmax(0, 1fr);
  min-height: 420px;
  overflow: hidden;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.game-access-card:hover {
  border-color: rgba(242, 169, 59, 0.78);
  box-shadow: 0 18px 42px rgba(13, 17, 32, 0.22);
  transform: translateY(-3px);
}

.game-preview {
  display: block;
  overflow: hidden;
  position: relative;
}

.game-access-card.prism .game-preview {
  background:
    repeating-linear-gradient(90deg, rgba(32, 217, 232, 0.28) 0 1px, transparent 1px 54px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.1) 0 1px, transparent 1px 40px),
    linear-gradient(155deg, #120833, #07192b 62%, #241307);
}

.game-access-card.prism .game-preview::before {
  background: #20d9e8;
  box-shadow: 0 0 26px rgba(32, 217, 232, 0.82);
  content: "";
  height: 44px;
  left: 18%;
  position: absolute;
  top: 48%;
  transform: rotate(14deg);
  width: 44px;
}

.game-access-card.prism .game-preview::after {
  border-bottom: 60px solid #ff4d5d;
  border-left: 25px solid transparent;
  border-right: 25px solid transparent;
  content: "";
  filter: drop-shadow(0 0 16px rgba(255, 77, 93, 0.58));
  height: 0;
  left: 55%;
  position: absolute;
  top: 44%;
  width: 0;
}

.game-access-card.haunted .game-preview {
  background:
    linear-gradient(90deg, rgba(88, 214, 141, 0.22), transparent 20% 80%, rgba(255, 77, 93, 0.18)),
    repeating-linear-gradient(90deg, #171411 0 44px, #211913 44px 48px),
    #0b0908;
}

.game-access-card.haunted .game-preview::before {
  background: linear-gradient(#1e1814, #100d0b);
  border: 1px solid rgba(255, 255, 255, 0.1);
  clip-path: polygon(50% 0, 100% 34%, 100% 100%, 0 100%, 0 34%);
  content: "";
  inset: 30px 15% 0;
  position: absolute;
}

.game-access-card.haunted .game-preview::after {
  background: linear-gradient(#8f8a83 0 18px, #2a2726 18px);
  border-radius: 22px 22px 5px 5px;
  bottom: 0;
  box-shadow: 0 0 28px rgba(255, 77, 93, 0.45);
  content: "";
  height: 94px;
  left: 54%;
  position: absolute;
  width: 46px;
}

.game-access-card.manor .game-preview {
  background:
    radial-gradient(circle at 52% 38%, rgba(183, 31, 48, 0.22), transparent 27%),
    linear-gradient(180deg, rgba(231, 186, 98, 0.14), transparent 45%),
    repeating-linear-gradient(90deg, #13100e 0 34px, #211914 34px 38px),
    #080706;
}

.game-access-card.manor .game-preview::before {
  background:
    linear-gradient(90deg, transparent 45%, rgba(231, 186, 98, 0.42) 47% 53%, transparent 55%),
    linear-gradient(#1c1512, #090807);
  border: 1px solid rgba(231, 186, 98, 0.24);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.62);
  clip-path: polygon(50% 0, 100% 28%, 100% 100%, 0 100%, 0 28%);
  content: "";
  inset: 28px 12% 0;
  position: absolute;
}

.game-access-card.manor .game-preview::after {
  background:
    radial-gradient(circle at 50% 15%, #ded8cf 0 12px, #161111 13px 24px, transparent 25px),
    linear-gradient(#151010 0 100%);
  border-radius: 36px 36px 6px 6px;
  bottom: 0;
  box-shadow: 0 0 34px rgba(216, 66, 76, 0.38);
  content: "";
  height: 122px;
  left: 56%;
  position: absolute;
  width: 58px;
}

.game-access-card.niaar .game-preview {
  background:
    linear-gradient(180deg, transparent 62%, rgba(31, 127, 191, 0.85) 62%),
    radial-gradient(circle at 74% 22%, rgba(255, 240, 180, 0.9) 0 16px, rgba(255, 240, 180, 0.25) 17px 30px, transparent 31px),
    linear-gradient(180deg, #6ec6ff, #aee2ff 70%);
}

.game-access-card.niaar .game-preview::before {
  background:
    linear-gradient(180deg, transparent 0 8%, #cfd6de 8% 12%, transparent 12% 26%, #aab4c0 26% 34%, #cfd6de 34% 100%);
  clip-path: polygon(46% 0, 54% 0, 53% 26%, 72% 26%, 72% 36%, 58% 36%, 62% 100%, 38% 100%, 42% 36%, 28% 36%, 28% 26%, 47% 26%);
  content: "";
  filter: drop-shadow(0 4px 10px rgba(13, 27, 46, 0.35));
  inset: 14px 30% 0;
  position: absolute;
}

.game-access-card.niaar .game-preview::after {
  background: radial-gradient(circle at 38% 34%, #ffe9a8 0 18%, #ffc94f 45%, #f09a1e 100%);
  border-radius: 50%;
  bottom: 26px;
  box-shadow: 0 0 30px rgba(255, 182, 46, 0.85);
  content: "";
  height: 52px;
  left: 16%;
  position: absolute;
  width: 52px;
}

.game-copy {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.game-label {
  color: #ffd77e;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.game-copy strong {
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.02;
}

.game-copy span:last-child {
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.55;
}

.contact-band {
  background:
    radial-gradient(circle at 82% 8%, rgba(242, 169, 59, 0.22), transparent 15rem),
    linear-gradient(135deg, rgba(23, 37, 121, 0.97), rgba(40, 87, 184, 0.9)),
    var(--edu-pattern);
  background-size: auto, auto, 260px 180px;
  border-radius: 22px;
  color: #ffffff;
  display: grid;
  gap: 28px 40px;
  grid-template-columns: minmax(220px, 0.85fr) minmax(260px, 1fr) minmax(220px, 0.85fr);
  isolation: isolate;
  margin: 64px auto 0;
  max-width: var(--max);
  overflow: hidden;
  padding: 44px 48px;
  position: relative;
}

.contact-band a {
  color: inherit;
}

/* A slow, quiet orbit motif in the corner — echoes the brand's atom mark
   without repeating it outright. Purely decorative (aria-hidden), so
   prefers-reduced-motion simply freezes it rather than needing a fallback. */
.cb-orbit {
  height: 260px;
  inset: -60px -60px auto auto;
  pointer-events: none;
  position: absolute;
  width: 260px;
  z-index: 0;
}

.cb-orbit-ring {
  animation: cb-orbit-spin 34s linear infinite;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  inset: 0;
  position: absolute;
}

.cb-orbit-ring-2 {
  animation-direction: reverse;
  animation-duration: 22s;
  inset: 34px;
}

.cb-orbit-dot {
  animation: cb-orbit-spin 22s linear infinite;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 14px 3px rgba(242, 169, 59, 0.55);
  height: 8px;
  inset: 34px 34px auto auto;
  position: absolute;
  width: 8px;
}

@keyframes cb-orbit-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cb-orbit-ring,
  .cb-orbit-dot {
    animation: none;
  }
}

.cb-intro {
  position: relative;
  z-index: 1;
}

.cb-kicker {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.contact-band .cb-intro h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  margin: 0 0 10px;
}

.cb-subtitle {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
  line-height: 1.5;
  margin: 0;
  max-width: 30ch;
}

.cb-facts {
  display: grid;
  gap: 14px 22px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}

.cb-facts li {
  align-items: flex-start;
  display: flex;
  gap: 10px;
}

.cb-fact-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  color: var(--accent);
  display: flex;
  flex: none;
  height: 32px;
  justify-content: center;
  width: 32px;
}

.cb-fact-icon svg {
  height: 17px;
  width: 17px;
}

.cb-fact-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cb-fact-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cb-fact-value {
  font-size: 0.9rem;
  line-height: 1.35;
}

.cb-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.cb-action {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  padding: 11px 14px;
  text-decoration: none;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.cb-action:hover,
.cb-action:focus-visible {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.32);
  outline: none;
  transform: translateY(-1px);
}

.cb-action-icon {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 9px;
  display: flex;
  flex: none;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.cb-action-icon svg {
  height: 18px;
  width: 18px;
}

.cb-action-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.cb-action-label {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cb-action-value {
  font-size: 0.94rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cb-action-whatsapp {
  background: rgba(37, 211, 102, 0.16);
  border-color: rgba(37, 211, 102, 0.4);
}

.cb-action-whatsapp .cb-action-icon {
  background: #25d366;
  color: #0b3d1f;
}

.cb-action-whatsapp:hover,
.cb-action-whatsapp:focus-visible {
  background: rgba(37, 211, 102, 0.28);
  border-color: rgba(37, 211, 102, 0.6);
}

.cb-action-pay {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
  justify-content: center;
}

.cb-action-pay:hover,
.cb-action-pay:focus-visible {
  background: #ffcf66;
  border-color: #ffcf66;
}

@media (max-width: 900px) {
  .contact-band {
    grid-template-columns: 1fr;
    padding: 36px 28px;
  }

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

  .cb-orbit {
    height: 160px;
    width: 160px;
  }
}

@media (max-width: 480px) {
  .cb-facts {
    grid-template-columns: 1fr;
  }
}

.page-hero,
.split-section,
.form-page {
  align-items: center;
  background:
    radial-gradient(circle at 14% 16%, rgba(242, 169, 59, 0.26), transparent 16rem),
    linear-gradient(135deg, rgba(23, 37, 121, 0.96), rgba(40, 87, 184, 0.9)),
    var(--edu-pattern);
  background-size: auto, 260px 180px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  box-shadow: var(--shadow);
  color: #ffffff;
  display: grid;
  gap: 56px;
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1fr);
  isolation: isolate;
  margin: 34px auto 80px;
  max-width: var(--max);
  padding: 54px;
  position: relative;
}

.page-hero::before,
.split-section::before,
.form-page::before {
  background: linear-gradient(180deg, #ffcf66, var(--accent));
  border-radius: 999px;
  content: "";
  inset: 54px auto 54px 0;
  position: absolute;
  width: 6px;
  z-index: 0;
}

.page-hero.compact {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.7fr);
}

.chemistry-hero {
  background:
    radial-gradient(circle at 16% 14%, rgba(128, 237, 153, 0.22), transparent 16rem),
    radial-gradient(circle at 78% 22%, rgba(242, 169, 59, 0.24), transparent 14rem),
    linear-gradient(135deg, rgba(8, 31, 48, 0.98), rgba(23, 37, 121, 0.92)),
    var(--edu-pattern);
  background-size: auto, auto, auto, 260px 180px;
}

.chemistry-hero::after {
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
  height: 180px;
  position: absolute;
  right: 8%;
  top: 42px;
  transform: rotate(-18deg);
  width: 180px;
  z-index: 0;
}

.chemistry-hero .page-hero-image {
  border-color: rgba(128, 237, 153, 0.42);
  box-shadow: 0 20px 50px rgba(8, 31, 48, 0.3);
}

.maths-hero {
  background:
    radial-gradient(circle at 16% 14%, rgba(94, 214, 237, 0.24), transparent 16rem),
    radial-gradient(circle at 78% 22%, rgba(242, 169, 59, 0.24), transparent 14rem),
    linear-gradient(135deg, rgba(8, 20, 48, 0.98), rgba(23, 37, 121, 0.92)),
    var(--edu-pattern);
  background-size: auto, auto, auto, 260px 180px;
}

.maths-hero::after {
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
  height: 180px;
  position: absolute;
  right: 8%;
  top: 42px;
  transform: rotate(-18deg);
  width: 180px;
  z-index: 0;
}

.maths-hero .page-hero-image {
  border-color: rgba(94, 214, 237, 0.42);
  box-shadow: 0 20px 50px rgba(8, 31, 48, 0.3);
  transform-origin: 50% 55%;
  will-change: transform;
}

.maths-hero .page-hero-image.motion-image.is-visible {
  animation: maths-art-flight 6.8s ease-in-out infinite;
}

@keyframes maths-art-flight {
  0%, 100% {
    box-shadow: 0 20px 50px rgba(8, 31, 48, 0.3);
    transform: translate3d(0, 4px, 0) rotate(-1.5deg);
  }
  25% {
    transform: translate3d(14px, -17px, 0) rotate(1.8deg);
  }
  50% {
    box-shadow: 0 38px 64px rgba(8, 31, 48, 0.2);
    transform: translate3d(2px, -34px, 0) rotate(-0.7deg);
  }
  75% {
    transform: translate3d(-14px, -15px, 0) rotate(-2deg);
  }
}

.science-hero {
  background:
    radial-gradient(circle at 16% 14%, rgba(126, 217, 87, 0.24), transparent 16rem),
    radial-gradient(circle at 78% 22%, rgba(242, 169, 59, 0.24), transparent 14rem),
    linear-gradient(135deg, rgba(9, 38, 24, 0.98), rgba(23, 37, 121, 0.92)),
    var(--edu-pattern);
  background-size: auto, auto, auto, 260px 180px;
}

.science-hero::after {
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
  height: 180px;
  position: absolute;
  right: 8%;
  top: 42px;
  transform: rotate(-18deg);
  width: 180px;
  z-index: 0;
}

.science-hero .page-hero-image {
  border-color: rgba(126, 217, 87, 0.42);
  box-shadow: 0 20px 50px rgba(9, 38, 24, 0.3);
}

.computer-hero {
  background:
    radial-gradient(circle at 16% 14%, rgba(157, 128, 237, 0.26), transparent 16rem),
    radial-gradient(circle at 78% 22%, rgba(242, 169, 59, 0.24), transparent 14rem),
    linear-gradient(135deg, rgba(20, 15, 48, 0.98), rgba(23, 37, 121, 0.92)),
    var(--edu-pattern);
  background-size: auto, auto, auto, 260px 180px;
}

.computer-hero::after {
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
  height: 180px;
  position: absolute;
  right: 8%;
  top: 42px;
  transform: rotate(-18deg);
  width: 180px;
  z-index: 0;
}

.computer-hero .page-hero-image {
  border-color: rgba(157, 128, 237, 0.42);
  box-shadow: 0 20px 50px rgba(20, 15, 48, 0.3);
}

.languages-hero {
  background:
    radial-gradient(circle at 16% 14%, rgba(237, 128, 174, 0.24), transparent 16rem),
    radial-gradient(circle at 78% 22%, rgba(242, 169, 59, 0.24), transparent 14rem),
    linear-gradient(135deg, rgba(48, 15, 34, 0.98), rgba(23, 37, 121, 0.92)),
    var(--edu-pattern);
  background-size: auto, auto, auto, 260px 180px;
}

.languages-hero::after {
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
  height: 180px;
  position: absolute;
  right: 8%;
  top: 42px;
  transform: rotate(-18deg);
  width: 180px;
  z-index: 0;
}

.languages-hero .page-hero-image {
  border-color: rgba(237, 128, 174, 0.42);
  box-shadow: 0 20px 50px rgba(48, 15, 34, 0.3);
}

.experiments-hero {
  background:
    radial-gradient(circle at 16% 14%, rgba(242, 108, 76, 0.26), transparent 16rem),
    radial-gradient(circle at 78% 22%, rgba(242, 169, 59, 0.24), transparent 14rem),
    linear-gradient(135deg, rgba(48, 18, 10, 0.98), rgba(23, 37, 121, 0.92)),
    var(--edu-pattern);
  background-size: auto, auto, auto, 260px 180px;
}

.experiments-hero::after {
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
  height: 180px;
  position: absolute;
  right: 8%;
  top: 42px;
  transform: rotate(-18deg);
  width: 180px;
  z-index: 0;
}

.experiments-hero .page-hero-image {
  border-color: rgba(242, 108, 76, 0.42);
  box-shadow: 0 20px 50px rgba(48, 18, 10, 0.3);
}

.physics-hero {
  background:
    radial-gradient(circle at 16% 14%, rgba(74, 144, 237, 0.28), transparent 16rem),
    radial-gradient(circle at 78% 22%, rgba(94, 214, 237, 0.2), transparent 14rem),
    linear-gradient(135deg, rgba(10, 20, 48, 0.98), rgba(23, 37, 121, 0.92)),
    var(--edu-pattern);
  background-size: auto, auto, auto, 260px 180px;
}

.physics-hero::after {
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
  height: 180px;
  position: absolute;
  right: 8%;
  top: 42px;
  transform: rotate(-18deg);
  width: 180px;
  z-index: 0;
}

.physics-hero .page-hero-image {
  border-color: rgba(74, 144, 237, 0.42);
  box-shadow: 0 20px 50px rgba(10, 20, 48, 0.3);
}

.examprep-hero {
  background:
    radial-gradient(circle at 16% 14%, rgba(242, 200, 76, 0.28), transparent 16rem),
    radial-gradient(circle at 78% 22%, rgba(157, 128, 237, 0.22), transparent 14rem),
    linear-gradient(135deg, rgba(38, 22, 6, 0.98), rgba(23, 37, 121, 0.92)),
    var(--edu-pattern);
  background-size: auto, auto, auto, 260px 180px;
}

.examprep-hero::after {
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
  height: 180px;
  position: absolute;
  right: 8%;
  top: 42px;
  transform: rotate(-18deg);
  width: 180px;
  z-index: 0;
}

.examprep-hero .page-hero-image {
  border-color: rgba(242, 200, 76, 0.42);
  box-shadow: 0 20px 50px rgba(38, 22, 6, 0.3);
}

.language-block {
  margin-bottom: 64px;
}

.language-block:last-of-type {
  margin-bottom: 0;
}

.page-hero h1,
.split-section h1,
.section-heading h1,
.form-page h1,
.studio-panel h1 {
  color: inherit;
  font-size: clamp(2.7rem, 5vw, 4.8rem);
  line-height: 1;
  margin: 0 0 24px;
}

.page-hero > *,
.split-section > *,
.form-page > * {
  position: relative;
  z-index: 1;
}

.page-hero p,
.split-section p,
.form-page p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.12rem;
  line-height: 1.65;
}

.split-section .text-link,
.form-page h2 {
  color: #ffcf66;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.page-hero-image,
.split-image {
  aspect-ratio: 1.2;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 14px;
  box-shadow: var(--shadow);
  object-fit: cover;
  width: 100%;
}

.content-grid,
.two-column-list,
.team-list,
.section-heading,
.mini-contact,
.classes-subject-section {
  margin: 0 auto 80px;
  max-width: var(--max);
  padding: 0 36px;
}

.content-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
}

.topic-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-top: 6px solid var(--accent);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  padding: 28px;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.topic-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.topic-image {
  aspect-ratio: 1.2;
  margin: -28px -28px 24px;
  object-fit: cover;
  width: calc(100% + 56px);
}

.topic-card h2 {
  font-size: 1.5rem;
}

ul {
  margin: 0;
  padding-left: 20px;
}

li {
  line-height: 1.7;
  margin: 4px 0;
}

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

.two-column-list article {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 242, 255, 0.9)),
    var(--edu-pattern);
  background-size: auto, 260px 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  padding: 36px;
}

.text-link {
  color: var(--brand);
  font-weight: 900;
}

.section-heading {
  background:
    linear-gradient(135deg, rgba(23, 37, 121, 0.95), rgba(40, 87, 184, 0.86)),
    var(--edu-pattern);
  background-size: auto, 260px 180px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  color: #ffffff;
  margin-bottom: 36px;
  padding-bottom: 42px;
  padding-top: 36px;
}

.section-heading .eyebrow,
.section-heading h1 {
  color: #ffffff;
}

.team-list {
  display: grid;
  gap: 44px;
}

.team-card {
  align-items: start;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 38px;
  grid-template-columns: 260px minmax(0, 1fr);
  padding: 28px;
}

.team-photo,
.portrait-placeholder {
  aspect-ratio: 1;
  background: var(--brand-soft);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(20, 36, 100, 0.12);
  object-fit: cover;
  width: 100%;
}

.portrait-placeholder {
  align-items: center;
  color: var(--brand);
  display: flex;
  font-size: 3rem;
  font-weight: 900;
  justify-content: center;
}

.team-copy p {
  color: var(--muted);
  line-height: 1.65;
}

.role {
  color: var(--ink) !important;
  font-weight: 800;
}

.member-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.mini-contact {
  background:
    linear-gradient(135deg, rgba(255, 248, 236, 0.96), rgba(255, 255, 255, 0.9)),
    var(--edu-pattern);
  background-size: auto, 260px 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding-bottom: 40px;
  padding-top: 40px;
}

.contact-form {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  padding: 32px;
}

.contact-form .form-trap {
  height: 1px;
  left: -10000px;
  overflow: hidden;
  position: absolute;
  top: auto;
  width: 1px;
}

.form-image {
  aspect-ratio: 1.25;
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  margin-top: 24px;
  object-fit: cover;
  width: 100%;
}

.contact-form label {
  color: var(--ink);
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.contact-form .form-contact-requirement {
  background: rgba(40, 87, 184, 0.08);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.5;
  margin: 0;
  padding: 10px 12px;
}

.form-contact-requirement strong {
  color: var(--brand);
}

.contact-form input,
.contact-form textarea,
.studio-editor textarea {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 13px 14px;
  width: 100%;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: rgba(82, 96, 120, 0.7);
}

.contact-form input:focus,
.contact-form textarea:focus,
.studio-editor textarea:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(40, 87, 184, 0.12);
  outline: none;
}

.contact-form textarea,
.studio-editor textarea {
  resize: vertical;
}

.form-status,
.studio-status {
  color: var(--muted);
  margin: 0;
}

.form-status.ok {
  color: #126138;
  font-weight: 800;
}

.form-status.error {
  color: #a00022;
  font-weight: 800;
}

.contact-form button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.chat-assistant {
  align-items: end;
  bottom: 24px;
  display: grid;
  gap: 12px;
  justify-items: end;
  pointer-events: none;
  position: fixed;
  right: 24px;
  z-index: 60;
}

.chat-assistant > * {
  pointer-events: auto;
}

.chat-nudge {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  max-width: 260px;
  padding: 12px 14px;
}

.chat-assistant.nudge-dismissed .chat-nudge,
.chat-assistant.is-open .chat-nudge {
  display: none;
}

.chat-launcher {
  align-items: center;
  background: var(--brand);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 900;
  gap: 10px;
  min-height: 54px;
  padding: 12px 16px;
}

.chat-launcher-mark {
  align-items: center;
  background: #ffffff;
  border-radius: 8px;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  position: relative;
  width: 30px;
}

.chat-launcher-mark::before,
.chat-launcher-mark::after {
  background: var(--brand);
  content: "";
  position: absolute;
}

.chat-launcher-mark::before {
  border-radius: 999px;
  height: 12px;
  width: 16px;
}

.chat-launcher-mark::after {
  border-radius: 0 0 999px 0;
  height: 8px;
  right: 7px;
  top: 18px;
  transform: rotate(38deg);
  width: 8px;
}

.chat-panel {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(13, 17, 32, 0.22);
  display: flex;
  flex-direction: column;
  max-height: min(660px, calc(100vh - 118px));
  max-height: min(660px, calc(100dvh - 118px));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  width: min(390px, calc(100vw - 32px));
}

.chat-panel[hidden],
.chat-transcript-form[hidden] {
  display: none;
}

.chat-panel-header {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(23, 37, 121, 0.98), rgba(40, 87, 184, 0.92)),
    var(--edu-pattern);
  background-size: auto, 260px 180px;
  color: #ffffff;
  display: flex;
  flex: none;
  justify-content: space-between;
  min-height: 74px;
  padding: 16px;
  position: sticky;
  top: 0;
  z-index: 2;
}

.chat-panel-header div {
  display: grid;
  gap: 4px;
}

.chat-panel-header strong {
  font-size: 1rem;
}

.chat-panel-header span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.84rem;
  line-height: 1.3;
}

.chat-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  height: 38px;
  justify-content: center;
  position: relative;
  width: 38px;
}

.chat-close span::before,
.chat-close span::after {
  background: #ffffff;
  border-radius: 999px;
  content: "";
  height: 2px;
  left: 10px;
  position: absolute;
  top: 18px;
  width: 16px;
}

.chat-close span::before {
  transform: rotate(45deg);
}

.chat-close span::after {
  transform: rotate(-45deg);
}

.chat-messages {
  background: var(--paper);
  display: grid;
  gap: 10px;
  max-height: 310px;
  min-height: 210px;
  overflow-y: auto;
  padding: 16px;
}

.chat-message {
  border-radius: 8px;
  display: grid;
  gap: 5px;
  line-height: 1.45;
  max-width: 88%;
  overflow-wrap: anywhere;
  padding: 10px 12px;
}

.chat-message span {
  font-size: 0.76rem;
  font-weight: 900;
  opacity: 0.78;
}

.chat-message p {
  margin: 0;
}

.chat-message.assistant {
  background: #ffffff;
  border: 1px solid var(--line);
  color: var(--ink);
  justify-self: start;
}

.chat-message.user {
  background: var(--brand);
  color: #ffffff;
  justify-self: end;
}

.chat-message.typing p {
  color: var(--muted);
}

.chat-quick-actions {
  background: #ffffff;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 0;
}

.chat-quick-actions button,
.chat-transcript-toggle {
  background: var(--brand-soft);
  border: 1px solid rgba(40, 87, 184, 0.18);
  border-radius: 8px;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  min-height: 36px;
  padding: 8px 10px;
}

.chat-form {
  background: #ffffff;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px 14px;
}

.chat-form textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 44px;
  overflow: hidden;
  padding: 11px 12px;
  resize: none;
}

.chat-form textarea:focus,
.chat-transcript-form input:focus {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 4px rgba(40, 87, 184, 0.12);
  outline: none;
}

.chat-form button {
  background: var(--accent);
  border: 0;
  border-radius: 8px;
  color: #171717;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  min-height: 44px;
  padding: 0 14px;
}

.chat-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
  margin: -4px 14px 10px;
}

.chat-email-link {
  color: var(--brand);
  font-weight: 800;
}

.chat-transcript-toggle {
  margin: 0 14px 14px;
  width: calc(100% - 28px);
}

.chat-transcript-form {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  padding: 14px;
}

.chat-transcript-form label {
  color: var(--ink);
  display: grid;
  gap: 5px;
  font-size: 0.9rem;
  font-weight: 900;
}

.chat-transcript-form input {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 9px 10px;
}

.chat-status {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  margin: 0;
}

.chat-status.ok {
  color: #126138;
  font-weight: 800;
}

.chat-status.error {
  color: #a00022;
  font-weight: 800;
}

.chat-form button:disabled,
.chat-quick-actions button:disabled,
.chat-transcript-form button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.studio-shell {
  display: grid;
  gap: 24px;
  grid-template-columns: 360px minmax(0, 1fr);
  min-height: 100vh;
  padding: 28px;
}

.studio-panel {
  background: var(--cream);
  padding: 28px;
}

.studio-panel p {
  line-height: 1.6;
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0;
}

.studio-editor {
  display: grid;
  gap: 10px;
}

.studio-editor label {
  font-weight: 900;
}

.studio-editor textarea {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  min-height: calc(100vh - 78px);
  white-space: pre;
}

.studio-status.ok {
  color: #126138;
}

.studio-status.error {
  color: #a00022;
}

@media (max-width: 1100px) {
  .site-footer {
    padding-right: 44px;
  }

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

  .footer-brand-summary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .site-footer {
    padding: 44px 36px 30px;
  }

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

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

  .site-header {
    align-items: center;
    flex-wrap: wrap;
    row-gap: 14px;
  }

  .nav-toggle {
    display: flex;
  }

  #site-nav {
    display: none;
    flex-basis: 100%;
    order: 3;
  }

  #site-nav.is-open {
    align-items: flex-start;
    background:
      linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(247, 249, 255, 0.98)),
      var(--edu-pattern);
    background-size: auto, 220px 152px;
    border: 1px solid rgba(36, 75, 184, 0.12);
    border-radius: 20px;
    box-shadow: 0 18px 42px rgba(20, 36, 100, 0.12);
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: calc(100dvh - 138px);
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
  }

  #site-nav > a,
  #site-nav .nav-parent-link,
  #site-nav .nav-dropdown-toggle {
    border-radius: 12px;
    min-height: 48px;
    padding: 12px 14px;
    width: 100%;
  }

  #site-nav > a {
    align-items: center;
  }

  #site-nav > a::after,
  #site-nav .nav-parent-link::after {
    display: none;
  }

  #site-nav .nav-item.has-dropdown {
    margin-bottom: 0;
    padding-bottom: 0;
    width: 100%;
  }

  #site-nav .nav-parent-link {
    display: none;
  }

  #site-nav .nav-dropdown-toggle {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-weight: 800;
    justify-content: space-between;
    text-align: left;
  }

  #site-nav .nav-dropdown-toggle:hover,
  #site-nav .nav-dropdown-toggle:focus-visible,
  #site-nav .nav-item.dropdown-open .nav-dropdown-toggle {
    background: linear-gradient(135deg, var(--brand), var(--blue));
    color: var(--white);
    outline: none;
  }

  #site-nav .nav-dropdown-toggle.active:not(:hover):not(:focus-visible) {
    background: rgba(242, 169, 59, 0.14);
    color: var(--brand);
  }

  .nav-dropdown-chevron {
    border-bottom: 2px solid currentColor;
    border-right: 2px solid currentColor;
    height: 10px;
    margin-right: 4px;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 180ms ease;
    width: 10px;
  }

  .nav-item.dropdown-open .nav-dropdown-chevron {
    transform: rotate(225deg) translate(-2px, -2px);
  }

  #site-nav .nav-dropdown-menu {
    background: rgba(237, 242, 255, 0.82);
    border: 1px solid rgba(36, 75, 184, 0.12);
    border-radius: 14px;
    box-shadow: none;
    display: none;
    gap: 3px;
    left: auto;
    margin: 6px 0 8px;
    min-width: 0;
    opacity: 1;
    padding: 8px;
    position: static;
    top: auto;
    transform: none;
    width: 100%;
  }

  #site-nav .nav-item.dropdown-open .nav-dropdown-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #site-nav .nav-dropdown-menu a {
    align-items: center;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid transparent;
    border-radius: 10px;
    display: flex;
    font-size: 0.92rem;
    line-height: 1.25;
    min-height: 44px;
    padding: 9px 10px;
    white-space: normal;
  }

  #site-nav .nav-dropdown-menu a:hover,
  #site-nav .nav-dropdown-menu a:focus-visible {
    background: var(--white);
    border-color: rgba(36, 75, 184, 0.2);
  }

  #site-nav .nav-dropdown-menu .nav-dropdown-overview {
    background: rgba(242, 169, 59, 0.18);
    color: var(--brand);
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  #site-nav .nav-dropdown-menu .nav-dropdown-overview small {
    font-size: 0.75rem;
    font-weight: 600;
    opacity: 0.72;
  }

  .hero,
  .learning-strip,
  .page-highlights,
  .about-showcase,
  .about-team-grid,
  .chemistry-showcase,
  .maths-showcase,
  .science-showcase,
  .computer-showcase,
  .experiments-showcase,
  .physics-showcase,
  .examprep-showcase,
  .subjects-section,
  .contact-band,
  .page-hero,
  .page-hero.compact,
  .games-lock,
  .games-grid,
  .split-section,
  .form-page,
  .two-column-list,
  .team-card,
  .studio-shell {
    grid-template-columns: 1fr;
  }

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

  .about-story-heading,
  .about-story-grid {
    grid-template-columns: 1fr;
  }

  .about-story-closing {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    margin-bottom: 72px;
    min-height: auto;
  }

  .hero-copy {
    border-radius: 18px 18px 0 0;
    padding: 48px 34px;
  }

  .hero-media {
    border-left: 1px solid rgba(219, 227, 242, 0.95);
    border-radius: 0 0 18px 18px;
  }

  .hero-copy h1 {
    margin-bottom: 40px;
  }

  .subject-grid,
  .content-grid,
  .learning-strip,
  .page-highlights {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-showcase,
  .chemistry-showcase,
  .maths-showcase,
  .science-showcase,
  .computer-showcase,
  .experiments-showcase,
  .physics-showcase,
  .examprep-showcase {
    grid-template-columns: 1fr;
  }

  .team-card {
    max-width: 680px;
  }

  .team-media {
    max-width: 260px;
  }

  .games-hero-panel {
    min-height: 180px;
  }

  .chat-panel {
    max-height: min(640px, calc(100vh - 102px));
    max-height: min(640px, calc(100dvh - 102px));
  }
}

@media (max-width: 580px) {
  .site-header,
  .site-footer,
  .hero,
  .learning-strip,
  .page-highlights,
  .about-showcase,
  .chemistry-showcase,
  .maths-showcase,
  .science-showcase,
  .computer-showcase,
  .experiments-showcase,
  .physics-showcase,
  .examprep-showcase,
  .subjects-section,
  .page-hero,
  .games-access,
  .split-section,
  .content-grid,
  .two-column-list,
  .team-list,
  .section-heading,
  .mini-contact,
  .classes-subject-section,
  .form-page {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-footer {
    padding-bottom: 112px;
    padding-top: 40px;
  }

  .footer-grid {
    gap: 30px;
    grid-template-columns: 1fr;
  }

  .footer-brand-summary {
    grid-column: auto;
  }

  .footer-brand-link {
    align-items: center;
  }

  .footer-bottom {
    margin-top: 32px;
  }

  .footer-utility-links {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    height: 64px;
    width: 64px;
  }

  .site-nav {
    gap: 14px 18px;
  }

  .about-team-preview {
    margin-bottom: 64px;
    padding: 30px 20px;
  }

  .about-story {
    margin-bottom: 64px;
    padding: 32px 20px 20px;
  }

  .about-story-grid article {
    padding: 22px 20px;
  }

  .about-story-closing {
    padding: 22px 20px;
  }

  .about-story-closing .button {
    white-space: normal;
  }

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

  .about-team-grid {
    grid-template-columns: 1fr;
  }

  .page-hero,
  .split-section,
  .form-page {
    border-radius: 14px;
    gap: 30px;
    margin-top: 20px;
    padding-bottom: 34px;
    padding-top: 34px;
  }

  .page-hero::before,
  .split-section::before,
  .form-page::before {
    inset: 34px auto 34px 0;
  }

  .page-hero h1,
  .split-section h1,
  .section-heading h1,
  .form-page h1 {
    font-size: clamp(2.25rem, 11vw, 3rem);
    line-height: 1.06;
    overflow-wrap: anywhere;
  }

  .form-page h1 {
    font-size: clamp(2rem, 8.8vw, 2.35rem);
    overflow-wrap: normal;
  }

  .form-page h2 {
    font-size: 1.55rem;
    line-height: 1.22;
  }

  .page-hero p,
  .split-section p,
  .form-page p {
    font-size: 1rem;
  }

  .page-highlights article,
  .learning-strip article {
    min-height: auto;
  }

  .subject-grid,
  .content-grid,
  .learning-strip,
  .page-highlights,
  .games-grid {
    grid-template-columns: 1fr;
  }

  .games-lock,
  .games-unlocked {
    padding: 22px;
  }

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

  .game-access-card {
    grid-template-rows: 170px minmax(0, 1fr);
    min-height: 360px;
  }

  .contact-band {
    padding-left: 20px;
    padding-right: 20px;
  }

  .studio-shell {
    padding: 16px;
  }

  .showcase-copy,
  .chemistry-board,
  .maths-board,
  .science-board,
  .computer-board,
  .experiments-board,
  .physics-board,
  .examprep-board {
    min-height: auto;
    padding: 30px;
  }

  .about-pillars article {
    grid-template-columns: 1fr;
  }

  .about-pillars h3,
  .about-pillars p {
    grid-column: auto;
  }

  .chat-assistant {
    bottom: 14px;
    left: 14px;
    right: 14px;
  }

  .chat-nudge {
    max-width: calc(100vw - 28px);
  }

  .chat-panel {
    max-height: min(76vh, 620px);
    max-height: min(76dvh, 620px);
    width: 100%;
  }

  .chat-messages {
    max-height: 34vh;
    min-height: 190px;
  }

  .chat-launcher {
    min-height: 50px;
  }
}

/* ============================================================
   V2 enhancements — playful hero, motion, stats, testimonials,
   how-it-works, FAQ
   ============================================================ */

/* --- Scroll reveal --- */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 640ms ease, transform 640ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-reveal="left"] {
  transform: translate3d(-34px, 14px, 0) rotate(-0.8deg);
}

[data-reveal="right"] {
  transform: translate3d(34px, 14px, 0) rotate(0.8deg);
}

[data-reveal="scale"] {
  transform: translateY(18px) scale(0.96);
}

.motion-image.is-visible {
  animation: page-image-float 7.5s ease-in-out var(--float-delay, 0s) infinite;
  transform-origin: center;
  will-change: translate;
}

@keyframes page-image-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

.has-page-doodles {
  overflow: hidden;
  position: relative;
}

.has-page-doodles > :not(.page-motion-doodles) {
  position: relative;
  z-index: 1;
}

.page-motion-doodles {
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.page-motion-doodle {
  color: rgba(255, 255, 255, 0.28);
  position: absolute;
  user-select: none;
}

.page-doodle-atom {
  animation: page-doodle-spin 28s linear infinite;
  height: 104px;
  right: 2.5%;
  top: 3%;
  width: 104px;
}

.page-doodle-symbol {
  animation: page-doodle-float 8s ease-in-out -2.6s infinite;
  color: rgba(255, 207, 102, 0.32);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  left: 48%;
  top: 7%;
}

.page-doodle-beaker {
  animation: page-doodle-float 9.5s ease-in-out -5s infinite;
  bottom: 3%;
  color: rgba(255, 255, 255, 0.24);
  height: 64px;
  right: 43%;
  width: 52px;
}

.page-doodle-spark {
  animation: page-doodle-twinkle 4.2s ease-in-out infinite;
  color: rgba(255, 207, 102, 0.58);
  font-size: 1.7rem;
}

.page-doodle-spark-one {
  left: 47%;
  top: 34%;
}

.page-doodle-spark-two {
  animation-delay: -2.1s;
  bottom: 13%;
  right: 4%;
}

@keyframes page-doodle-spin {
  to { transform: rotate(360deg); }
}

@keyframes page-doodle-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-14px) rotate(5deg); }
}

@keyframes page-doodle-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.75) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.18) rotate(28deg); }
}

.page-hero:not(.compact)::after {
  animation: page-orbit 16s ease-in-out infinite;
}

.page-hero::before {
  animation: page-accent-pulse 4.8s ease-in-out infinite;
}

.formula-row span {
  animation: page-chip-float 5.8s ease-in-out infinite;
}

.formula-row span:nth-child(2) {
  animation-delay: -1.4s;
}

.formula-row span:nth-child(3) {
  animation-delay: -2.8s;
}

.formula-row span:nth-child(4) {
  animation-delay: -4.2s;
}

@keyframes page-orbit {
  0%, 100% { transform: rotate(-18deg) translate3d(0, 0, 0); }
  50% { transform: rotate(-8deg) translate3d(-8px, 8px, 0); }
}

@keyframes page-accent-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(255, 207, 102, 0); opacity: 0.82; }
  50% { box-shadow: 0 0 24px rgba(255, 207, 102, 0.48); opacity: 1; }
}

@keyframes page-chip-float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -4px; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .motion-image.is-visible,
  .maths-hero .page-hero-image.motion-image.is-visible,
  .brand-logo,
  .brand-logo-motion::before,
  .brand-particle,
  .brand-star,
  .page-hero:not(.compact)::after,
  .page-hero::before,
  .formula-row span,
  .page-motion-doodle {
    animation: none;
    translate: none;
  }
}

/* --- Home hero --- */
.home-hero {
  align-items: center;
  background:
    radial-gradient(circle at 84% 8%, rgba(242, 169, 59, 0.32), transparent 20rem),
    radial-gradient(circle at 8% 92%, rgba(255, 120, 90, 0.2), transparent 18rem),
    linear-gradient(130deg, #131b4d 0%, #172579 42%, #2857b8 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  box-shadow: var(--shadow);
  color: #ffffff;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  isolation: isolate;
  margin: 34px auto 46px;
  max-width: calc(var(--max) - 36px);
  overflow: hidden;
  padding: 64px 60px;
  position: relative;
}

.home-hero::after {
  animation: hh-drift 26s linear infinite alternate;
  background: var(--edu-pattern);
  background-size: 260px 180px;
  content: "";
  inset: -60px;
  opacity: 0.32;
  filter: invert(1) brightness(1.6);
  pointer-events: none;
  position: absolute;
  z-index: -1;
}

@keyframes hh-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-40px, -28px, 0); }
}

.hh-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.hh-copy h1 {
  font-size: clamp(2.7rem, 5.2vw, 4.2rem);
  line-height: 1.04;
  margin: 0 0 22px;
}

.hh-accent {
  color: #ffcf66;
  display: inline-block;
  position: relative;
  white-space: nowrap;
}

.hh-underline {
  bottom: -0.18em;
  color: rgba(242, 169, 59, 0.85);
  height: 0.34em;
  left: 0;
  position: absolute;
  width: 100%;
}

.hh-subtitle {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.16rem;
  line-height: 1.62;
  margin: 0 0 22px;
  max-width: 46ch;
}

.hh-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 8px 0 20px;
}

.button.hh-cta {
  background: linear-gradient(135deg, var(--accent), #ffcf66);
  box-shadow: 0 14px 30px rgba(242, 169, 59, 0.35);
  color: #171717;
  min-width: 180px;
}

.button.hh-cta:hover {
  box-shadow: 0 18px 36px rgba(242, 169, 59, 0.45);
  transform: translateY(-2px) scale(1.02);
}

.hh-trust {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0;
}

.locale-notice {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.92);
  display: grid;
  gap: 6px;
  margin-top: 18px;
  max-width: 42rem;
  padding: 14px 16px;
}

.locale-notice strong {
  color: #ffffff;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.locale-notice span {
  font-size: 0.96rem;
  line-height: 1.55;
}

.hh-media {
  align-self: center;
  position: relative;
  z-index: 1;
}

.hh-photo-frame {
  animation: hh-bob 7s ease-in-out infinite;
  border: 5px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px 90px 30px 90px;
  box-shadow: 0 30px 60px rgba(6, 10, 34, 0.45);
  overflow: hidden;
  transform: rotate(1.6deg);
}

.hh-photo {
  display: block;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  width: 100%;
}

@keyframes hh-bob {
  0%, 100% { transform: rotate(1.6deg) translateY(0); }
  50% { transform: rotate(1.6deg) translateY(-10px); }
}

.hh-badge {
  align-items: center;
  animation: hh-badge-bob 5.4s ease-in-out infinite;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(6, 10, 34, 0.35);
  color: var(--brand);
  display: inline-flex;
  font-size: 0.92rem;
  font-weight: 800;
  gap: 9px;
  padding: 11px 18px;
  position: absolute;
}

.hh-badge svg {
  height: 20px;
  width: 20px;
}

.hh-badge-1 {
  left: -26px;
  top: -14px;
}

.hh-badge-2 {
  animation-delay: -2.6s;
  bottom: -12px;
  right: -10px;
}

@keyframes hh-badge-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hh-doodle {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 900;
  pointer-events: none;
  position: absolute;
  user-select: none;
  z-index: 0;
}

.hh-doodle-pi {
  animation: hh-float 9s ease-in-out infinite;
  color: rgba(255, 207, 102, 0.5);
  font-size: 4.4rem;
  right: 44%;
  top: 6%;
}

.hh-doodle-aplus {
  animation: hh-float 8s ease-in-out infinite -3s;
  bottom: 10%;
  font-size: 2.1rem;
  left: 42%;
}

.hh-doodle-formula {
  animation: hh-float 10s ease-in-out infinite -5s;
  bottom: 20%;
  font-size: 1.35rem;
  left: 4%;
  opacity: 0.75;
}

.hh-doodle-atom {
  animation: hh-spin 30s linear infinite;
  height: 88px;
  right: 3%;
  top: 6%;
  width: 88px;
}

.hh-doodle-beaker {
  animation: hh-float 8.6s ease-in-out infinite -1.6s;
  bottom: 6%;
  height: 62px;
  right: 40%;
  width: 50px;
}

.hh-doodle-star {
  animation: hh-twinkle 4.4s ease-in-out infinite;
  color: rgba(255, 207, 102, 0.65);
  height: 26px;
  left: 47%;
  top: 24%;
  width: 26px;
}

@keyframes hh-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-16px) rotate(4deg); }
}

@keyframes hh-spin {
  to { transform: rotate(360deg); }
}

@keyframes hh-twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.8) rotate(0deg); }
  50% { opacity: 0.9; transform: scale(1.15) rotate(24deg); }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero::after,
  .hh-photo-frame,
  .hh-badge,
  .hh-doodle {
    animation: none;
  }
}

/* --- Stats band --- */
.stats-band {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 auto 26px;
  max-width: var(--max);
  padding: 0 36px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--soft-shadow);
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 26px 18px;
  position: relative;
  text-align: center;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px) rotate(-0.6deg);
}

.stat-card::before {
  background: linear-gradient(135deg, var(--accent), #ffcf66);
  border-radius: 999px;
  content: "";
  height: 5px;
  left: 50%;
  position: absolute;
  top: 0;
  transform: translate(-50%, -50%);
  width: 56px;
}

.stat-value {
  color: var(--brand);
  font-size: clamp(2rem, 4vw, 2.9rem);
  font-weight: 900;
  line-height: 1;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 600;
}

/* --- Subject card polish --- */
.subject-card {
  border-radius: 16px;
}

.subject-card .subject-art {
  border-radius: 12px;
}

.subject-card .subject-image {
  height: 100%;
  object-fit: cover;
  transition: transform 420ms ease;
  width: 100%;
}

.subject-card:hover .subject-image {
  transform: scale(1.06) rotate(0.8deg);
}

.subject-card:hover {
  transform: translateY(-6px);
}

.subject-card-cta {
  align-content: center;
  background:
    radial-gradient(circle at 80% 12%, rgba(255, 207, 102, 0.35), transparent 10rem),
    linear-gradient(135deg, #172579, #2857b8);
  border: 0;
  color: #ffffff;
  justify-items: start;
  min-height: 260px;
  position: relative;
}

.subject-card-cta h3,
.subject-card-cta p {
  color: #ffffff;
}

.subject-card-cta p {
  opacity: 0.85;
}

.subject-card-cta .cta-doodle {
  color: #ffcf66;
  font-size: 1.8rem;
}

.subject-card-cta .cta-arrow {
  font-size: 1.7rem;
  transition: transform 220ms ease;
}

.subject-card-cta:hover .cta-arrow {
  transform: translateX(8px);
}

.subject-card-cta:hover {
  box-shadow: 0 24px 48px rgba(23, 37, 121, 0.35);
}

/* --- Centered section headings (light) --- */
.section-heading.centered {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  color: var(--ink);
  margin: 0 auto 14px;
  max-width: var(--max);
  padding: 0 36px 8px;
  text-align: center;
}

.section-heading.centered .eyebrow {
  background: var(--accent-soft);
  border: 1px solid rgba(242, 169, 59, 0.5);
  border-radius: 999px;
  color: #a86a0a;
  display: inline-block;
  font-weight: 800;
  padding: 7px 14px;
}

.section-heading.centered h2 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.12;
  margin: 16px 0 0;
}

/* --- How it works --- */
.how-it-works {
  margin: 0 auto 120px;
  max-width: var(--max);
  padding: 0 36px;
}

.hiw-steps {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 40px;
  position: relative;
}

.hiw-step {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  padding: 34px 28px 30px;
  position: relative;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.hiw-step:hover {
  box-shadow: var(--shadow);
  transform: translateY(-6px);
}

.hiw-step:nth-child(2) {
  border-top: 4px solid var(--accent);
}

.hiw-step:nth-child(1) {
  border-top: 4px solid var(--brand-2);
}

.hiw-step:nth-child(3) {
  border-top: 4px solid #2e9e6b;
}

.hiw-number {
  align-items: center;
  background: linear-gradient(135deg, var(--accent), #ffcf66);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(242, 169, 59, 0.35);
  color: #171717;
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 900;
  height: 52px;
  justify-content: center;
  margin-bottom: 18px;
  width: 52px;
}

.hiw-step:nth-child(1) .hiw-number {
  background: linear-gradient(135deg, var(--brand-2), #5b8ae0);
  box-shadow: 0 10px 22px rgba(40, 87, 184, 0.3);
  color: #ffffff;
}

.hiw-step:nth-child(3) .hiw-number {
  background: linear-gradient(135deg, #2e9e6b, #5fc793);
  box-shadow: 0 10px 22px rgba(46, 158, 107, 0.3);
  color: #ffffff;
}

.hiw-step h3 {
  font-size: 1.3rem;
  line-height: 1.2;
  margin: 0 0 12px;
}

.hiw-step p {
  color: var(--muted);
  line-height: 1.62;
  margin: 0;
}

/* --- Testimonials --- */
.testimonials {
  margin: 0 auto 120px;
  max-width: var(--max);
  padding: 0 36px;
}

.testimonial-carousel {
  margin: 36px auto 0;
  max-width: 780px;
}

.testimonial-track {
  display: grid;
}

.testimonial-slide {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  padding: 46px 48px 38px;
  position: relative;
  text-align: center;
  transform: translateY(14px) scale(0.985);
  transition: opacity 480ms ease, transform 480ms ease;
  visibility: hidden;
}

.testimonial-slide.is-active {
  opacity: 1;
  transform: none;
  visibility: visible;
}

.testimonial-mark {
  color: var(--accent);
  display: block;
  font-family: Georgia, serif;
  font-size: 4.6rem;
  line-height: 0.6;
  margin-bottom: 18px;
}

.testimonial-slide p {
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.7;
  margin: 0 0 26px;
}

.testimonial-slide footer {
  display: grid;
  gap: 3px;
}

.testimonial-slide footer strong {
  color: var(--brand);
}

.testimonial-slide footer span {
  color: var(--muted);
  font-size: 0.94rem;
}

/* --- Homepage rotating banners (admin-managed) --- */

.home-banners {
  margin: 0 auto 26px;
  max-width: var(--max);
  padding: 0 36px;
}

.hb-track {
  display: grid;
}

.hb-slide {
  align-items: center;
  background:
    linear-gradient(120deg, rgba(23, 37, 121, 0.96), rgba(40, 87, 184, 0.88)),
    var(--edu-pattern);
  background-size: auto, 220px 152px;
  border-radius: 18px;
  color: #ffffff;
  display: flex;
  gap: 18px;
  grid-area: 1 / 1;
  opacity: 0;
  padding: 22px 28px;
  text-decoration: none;
  transform: translateY(10px);
  transition: opacity 420ms ease, transform 420ms ease;
  visibility: hidden;
}

.hb-slide.is-active {
  opacity: 1;
  transform: none;
  visibility: visible;
}

a.hb-slide:hover,
a.hb-slide:focus-visible {
  outline: none;
}

a.hb-slide:hover .hb-cta,
a.hb-slide:focus-visible .hb-cta {
  background: #ffcf66;
}

.hb-image {
  border-radius: 12px;
  flex: none;
  height: 56px;
  overflow: hidden;
  width: 56px;
}

.hb-image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.hb-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.hb-headline {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

.hb-body {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
  line-height: 1.4;
}

.hb-cta {
  background: var(--accent);
  border-radius: 999px;
  color: var(--ink);
  flex: none;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 9px 18px;
  transition: background 160ms ease;
  white-space: nowrap;
}

.hb-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 14px;
}

.hb-dot {
  background: rgba(23, 37, 121, 0.18);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 9px;
  padding: 0;
  transition: background 200ms ease, transform 200ms ease, width 200ms ease;
  width: 9px;
}

.hb-dot.is-active {
  background: var(--brand);
  width: 26px;
}

.hb-dot:hover {
  transform: scale(1.2);
}

@media (max-width: 640px) {
  .hb-slide {
    flex-wrap: wrap;
    padding: 20px;
  }

  .hb-cta {
    margin-left: 74px;
  }
}

.testimonial-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 22px;
}

.testimonial-dots button {
  background: rgba(23, 37, 121, 0.18);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  height: 11px;
  padding: 0;
  transition: background 200ms ease, transform 200ms ease, width 200ms ease;
  width: 11px;
}

.testimonial-dots button.is-active {
  background: var(--accent);
  width: 30px;
}

.testimonial-dots button:hover {
  transform: scale(1.2);
}

/* --- FAQ --- */
.faq-section {
  margin: 0 auto 40px;
  max-width: var(--max);
  padding: 0 36px;
}

.faq-list {
  display: grid;
  gap: 14px;
  margin: 36px auto 0;
  max-width: 820px;
}

.faq-item {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.faq-item[open] {
  border-color: rgba(242, 169, 59, 0.6);
  box-shadow: var(--shadow);
}

.faq-item summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-size: 1.08rem;
  font-weight: 800;
  gap: 18px;
  justify-content: space-between;
  list-style: none;
  padding: 20px 24px;
  user-select: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--brand);
}

.faq-icon {
  border-radius: 999px;
  background: var(--brand-soft);
  flex: 0 0 auto;
  height: 30px;
  position: relative;
  transition: background 200ms ease, transform 260ms ease;
  width: 30px;
}

.faq-icon::before,
.faq-icon::after {
  background: var(--brand);
  border-radius: 2px;
  content: "";
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
}

.faq-icon::before {
  height: 2.5px;
  width: 13px;
}

.faq-icon::after {
  height: 13px;
  width: 2.5px;
  transition: transform 260ms ease;
}

.faq-item[open] .faq-icon {
  background: var(--accent-soft);
  transform: rotate(180deg);
}

.faq-item[open] .faq-icon::after {
  transform: translate(-50%, -50%) scaleY(0);
}

.faq-item > p {
  border-top: 1px dashed var(--line);
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
  padding: 18px 24px 22px;
}

/* --- V2 responsive --- */
@media (max-width: 1080px) {
  .stats-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  .home-hero {
    gap: 40px;
    grid-template-columns: 1fr;
    padding: 46px 34px 56px;
  }

  .hh-media {
    margin: 0 auto;
    max-width: 520px;
    width: 100%;
  }

  .hh-badge-1 {
    left: -6px;
  }

  .hh-badge-2 {
    right: -4px;
  }

  .hh-doodle-pi,
  .hh-doodle-beaker,
  .hh-doodle-aplus {
    display: none;
  }

  .hiw-steps {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 580px) {
  .home-hero {
    border-radius: 18px;
    margin: 20px auto 36px;
    max-width: calc(100% - 24px);
    padding: 38px 22px 46px;
  }

  .hh-copy h1 {
    font-size: clamp(2.3rem, 10vw, 2.9rem);
  }

  .hh-actions .button {
    flex: 1 1 100%;
  }

  .stats-band {
    gap: 12px;
    padding: 0 20px;
  }

  .stat-card {
    padding: 20px 12px;
  }

  .how-it-works,
  .testimonials,
  .faq-section,
  .section-heading.centered {
    padding-left: 20px;
    padding-right: 20px;
  }

  .testimonial-slide {
    padding: 36px 24px 30px;
  }

  .testimonial-slide p {
    font-size: 1.06rem;
  }

  .hh-photo {
    min-height: 250px;
  }
}

/* ============================================================
   Virtual Titration Lab
   ============================================================ */

.titration-hero-panel {
  align-items: center;
  align-self: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  display: grid;
  gap: 4px;
  justify-items: center;
  justify-self: end;
  min-width: 180px;
  padding: 28px 34px;
}

.titration-hero-panel span {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  opacity: 0.8;
  text-transform: uppercase;
}

.titration-hero-panel strong {
  font-size: 3rem;
  line-height: 1;
}

.titration-hero-panel small {
  opacity: 0.7;
}

.titration-lab {
  margin: 0 auto 90px;
  max-width: var(--max);
  padding: 0 36px;
}

.titration-lab [hidden] {
  display: none !important;
}

.lab-development {
  border: 1px solid rgba(242, 169, 59, 0.5);
  margin-bottom: 18px;
}

.lab-notice-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
}

.lab-notice-grid .lab-callout {
  height: 100%;
  margin: 0;
}

.lab-mode-panel {
  display: grid;
  gap: 16px;
  margin-bottom: 22px;
}

.lab-mode-panel .eyebrow {
  margin: 0 0 6px;
}

.lab-mode-panel h2 {
  margin-bottom: 0;
}

.lab-mode-buttons {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lab-mode-button {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 6px;
  min-height: 126px;
  padding: 18px;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.lab-mode-button:hover,
.lab-mode-button:focus-visible {
  border-color: var(--brand-2);
  outline: 3px solid rgba(40, 87, 184, 0.16);
  outline-offset: 2px;
  transform: translateY(-2px);
}

.lab-mode-button.is-active,
.lab-mode-button[aria-pressed="true"] {
  background: var(--brand-soft);
  border-color: var(--brand-2);
}

.lab-mode-button strong {
  color: var(--brand);
  font-size: 1.05rem;
}

.lab-mode-button span {
  color: var(--muted);
  line-height: 1.5;
}

.lab-guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.lab-guide-links a {
  color: var(--brand-2);
  font-weight: 800;
  text-underline-offset: 4px;
}

.lab-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr);
}

.lab-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  padding: 26px;
}

.lab-panel h2 {
  font-size: 1.35rem;
  margin: 0 0 18px;
}

.lab-setup {
  display: grid;
  gap: 14px;
  align-content: start;
}

.lab-setup form {
  display: grid;
  gap: 14px;
}

.lab-setup label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--muted);
}

.lab-setup select,
.lab-setup input[type="number"],
.lab-setup input[type="text"],
.lab-name-label input {
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  padding: 10px 12px;
  width: 100%;
}

.lab-setup select:focus,
.lab-setup input:focus {
  border-color: var(--brand-2);
  outline: 2px solid rgba(40, 87, 184, 0.2);
}

.lab-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.lab-objective {
  background: var(--brand-soft);
  border-left: 4px solid var(--brand-2);
  border-radius: 8px;
  color: var(--ink);
  line-height: 1.55;
  margin: 0;
  padding: 12px 14px;
}

.lab-prediction,
.lab-technique-checklist,
.lab-challenge-work {
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 0;
  padding: 14px;
}

.lab-prediction,
.lab-technique-checklist {
  display: grid;
  gap: 12px;
}

.lab-prediction legend,
.lab-technique-checklist legend {
  color: var(--brand);
  font-weight: 900;
  padding: 0 6px;
}

.lab-technique-checklist > p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.lab-technique-checklist > label:not(:last-child) {
  align-items: start;
  display: grid;
  font-weight: 600;
  gap: 8px;
  grid-template-columns: auto 1fr;
}

.lab-technique-checklist input[type="checkbox"] {
  margin-top: 3px;
}

.lab-challenge-work {
  background: var(--accent-soft);
}

.lab-challenge-work h3 {
  color: var(--brand);
  margin: 0 0 8px;
}

.lab-challenge-work > p {
  line-height: 1.55;
  margin: 0 0 12px;
}

.lab-form-error {
  background: #fff0f0;
  border-left: 4px solid #b42318;
  border-radius: 8px;
  color: #7a1b14;
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  padding: 12px 14px;
}

.lab-check {
  align-items: start;
  display: flex !important;
  flex-direction: row;
  gap: 10px;
  font-weight: 600 !important;
}

.lab-check input {
  margin-top: 3px;
}

.lab-difficulty {
  display: flex;
  gap: 8px;
}

.lab-chip {
  background: var(--brand-soft);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--brand);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  padding: 8px 16px;
  transition: background 160ms ease, border-color 160ms ease;
}

.lab-chip.is-active {
  background: linear-gradient(135deg, var(--accent), #ffcf66);
  color: #171717;
}

.lab-bench {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(200px, 300px) minmax(0, 1fr);
}

.lab-apparatus {
  background:
    linear-gradient(180deg, rgba(238, 242, 255, 0.6), rgba(255, 248, 236, 0.5));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
}

.lab-svg {
  display: block;
  height: auto;
  margin: 0 auto;
  max-height: 520px;
  width: 100%;
}

.flask-liquid {
  transition: fill 700ms ease, y 500ms ease, height 500ms ease;
}

.flask-surface {
  transition: fill 700ms ease, cy 500ms ease;
}

.lab-svg.is-pouring .flask-surface {
  animation: surface-wobble 800ms ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes surface-wobble {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.7); }
}

.pour-stream {
  opacity: 0;
  transition: opacity 180ms ease;
}

.lab-svg.is-pouring .pour-stream {
  animation: stream-flow 420ms linear infinite;
  opacity: 1;
}

@keyframes stream-flow {
  to { stroke-dashoffset: -10; }
}

.falling-drop {
  animation: drop-fall 480ms cubic-bezier(0.5, 0, 0.9, 0.6) forwards;
}

@keyframes drop-fall {
  0% { transform: translateY(0); opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(var(--fall, 62px)); opacity: 0.85; }
}

.drop-ripple {
  animation: drop-ripple 440ms ease-out forwards;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes drop-ripple {
  from { opacity: 0.85; transform: scale(1); }
  to { opacity: 0; transform: scale(4.2); }
}

@media (prefers-reduced-motion: reduce) {
  .lab-svg.is-pouring .flask-surface,
  .lab-svg.is-pouring .pour-stream {
    animation: none;
  }
}

.stopcock-handle {
  transition: transform 200ms ease;
  transform-origin: 119px 358px;
}

.lab-bench-side {
  display: grid;
  align-content: start;
  gap: 18px;
}

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

.lab-readouts article {
  background: var(--brand-soft);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.lab-readouts span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.lab-readouts strong {
  color: var(--brand);
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}

.lab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

[data-lab-mobile-controls] {
  position: sticky;
  top: 118px;
  z-index: 4;
}

.lab-colour-status {
  background: var(--cream);
  border: 1px solid rgba(242, 169, 59, 0.5);
  border-radius: 10px;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.5;
  margin: 0;
  padding: 12px 14px;
}

.lab-actions .button {
  min-height: 44px;
  padding: 8px 16px;
}

.lab-status {
  background: rgba(238, 242, 255, 0.7);
  border-left: 4px solid var(--brand-2);
  border-radius: 8px;
  color: var(--ink);
  line-height: 1.55;
  margin: 0;
  padding: 12px 14px;
}

.lab-status.warn {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.lab-status.ok {
  background: rgba(46, 158, 107, 0.12);
  border-left-color: #2e9e6b;
}

.lab-chart-panel {
  grid-column: 1 / -1;
}

.lab-chart-wrap {
  height: 340px;
  position: relative;
}

#lab-curve-summary {
  color: var(--muted);
  line-height: 1.55;
  margin: -8px 0 14px;
}

.lab-chart-fallback {
  background: var(--accent-soft);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  line-height: 1.55;
  margin-top: 12px;
  padding: 12px 14px;
}

.lab-data-details {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}

.lab-data-details summary {
  color: var(--brand-2);
  cursor: pointer;
  font-weight: 800;
  margin-bottom: 12px;
}

.lab-results {
  grid-column: 1 / -1;
}

.lab-results h3 {
  color: var(--brand);
  margin: 0 0 12px;
}

.lab-review-section {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 20px;
}

.lab-review-section p {
  line-height: 1.65;
}

.lab-criteria-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.lab-criteria-list li {
  border-left: 4px solid var(--line);
  border-radius: 8px;
  line-height: 1.55;
  padding: 10px 12px;
}

.lab-criteria-list .is-met {
  background: rgba(46, 158, 107, 0.1);
  border-left-color: #2e9e6b;
}

.lab-criteria-list .is-review {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.lab-callout {
  border-left: 4px solid var(--brand-2);
  background: rgba(238, 242, 255, 0.7);
  border-radius: 10px;
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 16px 18px;
}

.lab-callout.warn {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.lab-callout.ok {
  background: rgba(46, 158, 107, 0.12);
  border-left-color: #2e9e6b;
}

.lab-callout p {
  line-height: 1.6;
  margin: 0;
}

.lab-result-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.lab-result-grid article {
  background: var(--brand-soft);
  border-radius: 12px;
  display: grid;
  gap: 4px;
  padding: 14px;
}

.lab-result-grid span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.lab-result-grid strong {
  color: var(--brand);
  font-size: 1.1rem;
}

.lab-history {
  grid-column: 1 / -1;
}

.lab-notebook {
  grid-column: 1 / -1;
}

.lab-notebook-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.lab-history-heading {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.lab-name-label {
  display: grid;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  max-width: 260px;
}

.lab-history-table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

[data-lab-history-scroll] {
  overflow-x: auto;
}

.lab-history-table th,
.lab-history-table td {
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
  padding: 10px 12px;
  text-align: left;
}

.lab-history-table th {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lab-muted {
  color: var(--muted);
  margin: 0;
}

@media (max-width: 1020px) {
  .lab-notice-grid,
  .lab-mode-buttons {
    grid-template-columns: 1fr;
  }

  .lab-mode-button {
    min-height: 0;
  }

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

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

  .lab-bench-side {
    order: -1;
  }

  .lab-apparatus {
    margin: 0 auto;
    max-width: 340px;
    width: 100%;
  }

  [data-lab-mobile-controls] {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 12px;
    bottom: 8px;
    box-shadow: var(--soft-shadow);
    padding: 10px;
    top: auto;
  }
}

@media (max-width: 580px) {
  .credits-panel {
    padding: 26px 18px 20px;
  }

  .credits-close {
    right: 14px;
    top: 14px;
  }

  .titration-lab {
    padding: 0 20px;
  }

  .lab-panel {
    padding: 18px;
  }

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

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

  .lab-actions .button {
    flex: 1 1 45%;
  }

  .lab-chart-wrap {
    height: 260px;
  }

  .lab-history-table th:first-child,
  .lab-history-table td:first-child {
    display: table-cell;
  }
}

@media print {
  body[data-page="titration"] .site-header,
  body[data-page="titration"] .page-hero,
  body[data-page="titration"] .lab-development,
  body[data-page="titration"] .lab-notice-grid,
  body[data-page="titration"] .lab-mode-panel,
  body[data-page="titration"] .lab-setup,
  body[data-page="titration"] .lab-bench,
  body[data-page="titration"] .lab-chart-panel,
  body[data-page="titration"] .lab-results,
  body[data-page="titration"] .lab-history,
  body[data-page="titration"] .contact-band,
  body[data-page="titration"] .site-footer,
  body[data-page="titration"] .chat-widget,
  body[data-page="titration"] .lab-notebook-actions {
    display: none !important;
  }

  body[data-page="titration"] .titration-lab,
  body[data-page="titration"] .lab-notebook {
    margin: 0;
    max-width: none;
    padding: 0;
  }

  body[data-page="titration"] .lab-notebook {
    border: 0;
    box-shadow: none;
    display: block !important;
  }
}

/* Titration student and teacher manual */
.titration-manual {
  display: grid;
  gap: 24px;
  margin: 0 auto 90px;
  max-width: 980px;
  padding: 0 36px;
}

.manual-contents {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--soft-shadow);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 16px 20px;
  position: sticky;
  top: 118px;
  z-index: 5;
}

.manual-contents strong {
  color: var(--brand);
}

.manual-contents a {
  color: var(--brand-2);
  font-weight: 800;
  text-underline-offset: 3px;
}

.manual-section {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--soft-shadow);
  padding: clamp(24px, 5vw, 48px);
  scroll-margin-top: 190px;
}

.manual-section > .eyebrow {
  margin: 0 0 8px;
}

.manual-section h2 {
  color: var(--brand);
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  margin: 0 0 20px;
}

.manual-section h3 {
  color: var(--brand);
  margin: 26px 0 12px;
}

.manual-section p,
.manual-section li,
.manual-table td,
.manual-table th {
  line-height: 1.68;
}

.manual-checklist,
.manual-questions,
.manual-steps {
  display: grid;
  gap: 10px;
  padding-left: 24px;
}

.manual-steps {
  counter-reset: manual-step;
  list-style: none;
  padding: 0;
}

.manual-steps > li {
  background: var(--brand-soft);
  border-left: 4px solid var(--brand-2);
  border-radius: 10px;
  counter-increment: manual-step;
  padding: 14px 16px 14px 50px;
  position: relative;
}

.manual-steps > li::before {
  align-items: center;
  background: var(--brand);
  border-radius: 50%;
  color: #fff;
  content: counter(manual-step);
  display: flex;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  left: 14px;
  position: absolute;
  top: 14px;
  width: 26px;
}

.manual-table {
  border-collapse: collapse;
  margin: 18px 0;
  min-width: 680px;
  width: 100%;
}

.manual-table.compact {
  min-width: 0;
}

.manual-table th,
.manual-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

.manual-table thead th {
  background: var(--brand-soft);
  color: var(--brand);
}

.manual-example {
  background: var(--cream);
  border: 1px solid rgba(242, 169, 59, 0.45);
  border-radius: 14px;
  margin-top: 24px;
  padding: 18px;
}

.manual-example h3 {
  margin-top: 0;
}

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

.manual-card-grid article {
  background: var(--brand-soft);
  border-radius: 12px;
  padding: 18px;
}

.manual-card-grid h3 {
  margin-top: 0;
}

.manual-card-grid p {
  margin-bottom: 0;
}

.manual-references a {
  color: var(--brand-2);
  font-weight: 750;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .titration-manual {
    padding: 0 20px;
  }

  .manual-contents {
    position: static;
  }

  .manual-card-grid {
    grid-template-columns: 1fr;
  }

  .manual-section {
    padding: 22px;
  }
}

@media print {
  body[data-page="titrationManual"] .site-header,
  body[data-page="titrationManual"] .page-hero,
  body[data-page="titrationManual"] .site-footer,
  body[data-page="titrationManual"] .chat-widget,
  body[data-page="titrationManual"] .manual-contents {
    display: none !important;
  }

  body[data-page="titrationManual"] .titration-manual {
    display: block;
    margin: 0;
    max-width: none;
    padding: 0;
  }

  body[data-page="titrationManual"] .manual-section {
    border: 0;
    box-shadow: none;
    break-inside: avoid;
    padding: 18px 0;
  }
}

/* ============================================================
   EQAO & NGAT Practice Game
   ============================================================ */

.exam-game {
  --eg-eqao-1: #ff8a5c;
  --eg-eqao-2: #2fd1c5;
  --eg-ngat-1: #8a5cff;
  --eg-ngat-2: #ffb703;
  --eg-ib-1: #0f766e;
  --eg-ib-2: #2563eb;
  --eg-coral: #ff6b6b;
  --eg-coral-soft: #ffe3e0;
  --eg-teal: #14b8a6;
  --eg-teal-soft: #d4f6f1;
  --eg-purple: #8b5cf6;
  --eg-purple-soft: #ece2ff;
  --eg-blue: #3b82f6;
  --eg-blue-soft: #dbeafe;
  --eg-gold: #d97706;
  --eg-gold-soft: #fef3c7;
  --eg-green: #22c55e;
  --eg-green-soft: #dcfce7;
  --eg-red: #ef4444;
  --eg-red-soft: #fde2e1;
  margin: 0 auto 90px;
  max-width: 860px;
  padding: 0 36px;
}

.exam-game-hero-icon {
  display: inline-block;
  margin-right: 14px;
}

.exam-game-promo {
  align-items: center;
  background: linear-gradient(135deg, var(--eg-purple-soft), var(--eg-teal-soft));
  border-radius: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin: 0 auto 70px;
  max-width: var(--max);
  padding: 28px 36px;
}

.exam-game-promo h2 {
  margin: 4px 0 8px;
}

.exam-game-promo p {
  color: var(--muted);
  margin: 0;
  max-width: 46ch;
}

.exam-game-bank-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.exam-game-bank-card {
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--soft-shadow);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 8px;
  padding: 26px;
  position: relative;
  overflow: hidden;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.exam-game-bank-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
}

.exam-game-bank-card[data-theme="eqao"]::before {
  background: linear-gradient(90deg, var(--eg-eqao-1), var(--eg-eqao-2));
}

.exam-game-bank-card[data-theme="ngat"]::before {
  background: linear-gradient(90deg, var(--eg-ngat-1), var(--eg-ngat-2));
}

.exam-game-bank-card[data-theme="ib"]::before {
  background: linear-gradient(90deg, var(--eg-ib-1), var(--eg-ib-2));
}

.exam-game-bank-card[data-theme="brain"]::before {
  background: linear-gradient(90deg, var(--eg-blue), var(--eg-green));
}

.exam-game-bank-card[data-theme="skills"]::before {
  background: linear-gradient(90deg, #ef7a59, #f0b84b);
}

.exam-game-bank-card:hover,
.exam-game-bank-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 20px 46px rgba(20, 20, 30, 0.16);
}

.exam-game-bank-card[data-theme="eqao"]:hover { border-color: var(--eg-eqao-2); }
.exam-game-bank-card[data-theme="ngat"]:hover { border-color: var(--eg-ngat-1); }
.exam-game-bank-card[data-theme="ib"]:hover { border-color: var(--eg-ib-1); }
.exam-game-bank-card[data-theme="brain"]:hover { border-color: var(--eg-blue); }
.exam-game-bank-card[data-theme="skills"]:hover { border-color: #ef7a59; }

.exam-game-bank-icon {
  font-size: 2.2rem;
  line-height: 1;
}

.exam-game-bank-card h3 {
  margin: 0;
  font-size: 1.25rem;
}

.exam-game-bank-card p {
  color: var(--muted);
  margin: 0;
}

.exam-game-bank-meta {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.exam-game-bank-card .play {
  color: var(--brand);
  font-weight: 800;
  margin-top: 6px;
}

.exam-game-quiz {
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  padding: 30px;
}

.exam-game-difficulty-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 14px 0 22px;
}

.exam-game-difficulty-card {
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid var(--line);
  border-radius: 18px;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 6px;
  padding: 22px 20px;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.exam-game-difficulty-card:hover,
.exam-game-difficulty-card:focus-visible {
  box-shadow: var(--soft-shadow);
  transform: translateY(-2px);
}

.exam-game-difficulty-card[data-level="easy"] { border-color: var(--eg-green); }
.exam-game-difficulty-card[data-level="medium"] { border-color: var(--eg-ngat-2); }
.exam-game-difficulty-card[data-level="hard"] { border-color: var(--eg-coral); }

.exam-game-section-card[data-color="coral"] { border-color: var(--eg-coral); }
.exam-game-section-card[data-color="teal"] { border-color: var(--eg-teal); }
.exam-game-section-card[data-color="purple"] { border-color: var(--eg-purple); }
.exam-game-section-card[data-color="blue"] { border-color: var(--eg-blue); }
.exam-game-section-card[data-color="gold"] { border-color: var(--eg-gold); }
.exam-game-section-card[data-color="green"] { border-color: var(--eg-green); }

.exam-game-section-card .exam-game-bank-icon {
  font-size: 1.8rem;
}

.exam-game-difficulty-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.exam-game-difficulty-card p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
}

.exam-game-set-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 14px 0 22px;
}

.exam-game-set-card {
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 18px 10px;
  text-align: center;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.exam-game-set-card:hover,
.exam-game-set-card:focus-visible {
  background: var(--eg-purple-soft);
  border-color: var(--eg-purple);
  box-shadow: var(--soft-shadow);
  transform: translateY(-2px);
}

.exam-game-level-badge[data-level="set"] { background: var(--eg-purple-soft); color: #6c37d6; }

.exam-game-back-link {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.exam-game-level-badge {
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 5px 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.exam-game-level-badge[data-level="easy"] { background: var(--eg-green-soft); color: #1a8a45; }
.exam-game-level-badge[data-level="medium"] { background: #fff2d6; color: #a3690a; }
.exam-game-level-badge[data-level="hard"] { background: var(--eg-coral-soft); color: #c23c3c; }

.exam-game-progress-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 22px;
}

.exam-game-category-badge {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 6px;
  padding: 6px 14px;
}

.exam-game-category-badge[data-color="coral"] { background: var(--eg-coral-soft); color: #b02f2f; }
.exam-game-category-badge[data-color="teal"] { background: var(--eg-teal-soft); color: #0d766c; }
.exam-game-category-badge[data-color="purple"] { background: var(--eg-purple-soft); color: #6c37d6; }
.exam-game-category-badge[data-color="blue"] { background: var(--eg-blue-soft); color: #1d4ed8; }
.exam-game-category-badge[data-color="gold"] { background: var(--eg-gold-soft); color: #9a5504; }
.exam-game-category-badge[data-color="green"] { background: var(--eg-green-soft); color: #167c3d; }

.exam-game-progress-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  margin-left: auto;
}

.exam-game-progress-bar {
  background: var(--brand-soft);
  border-radius: 999px;
  flex-basis: 100%;
  height: 10px;
  overflow: hidden;
}

.exam-game-progress-bar span {
  display: block;
  height: 100%;
  transition: width 220ms ease;
}

.exam-game-progress-bar[data-theme="eqao"] span {
  background: linear-gradient(90deg, var(--eg-eqao-1), var(--eg-eqao-2));
}

.exam-game-progress-bar[data-theme="ngat"] span {
  background: linear-gradient(90deg, var(--eg-ngat-1), var(--eg-ngat-2));
}

.exam-game-progress-bar[data-theme="ib"] span {
  background: linear-gradient(90deg, var(--eg-ib-1), var(--eg-ib-2));
}

.exam-game-progress-bar[data-theme="brain"] span {
  background: linear-gradient(90deg, var(--eg-blue), var(--eg-green));
}

.exam-game-prompt {
  font-size: 1.4rem;
  margin: 0 0 20px;
}

.exam-game-prompt:focus,
.exam-game-score:focus {
  outline: 3px solid var(--eg-purple);
  outline-offset: 5px;
}

.exam-game-passage,
.exam-game-text-stimulus,
.exam-game-table-wrap {
  background: linear-gradient(145deg, #fffdf8, #f7fbff);
  border: 2px solid var(--line);
  border-radius: 18px;
  margin: 0 0 24px;
  padding: 22px 24px;
}

.exam-game-passage.is-compact,
.exam-game-text-stimulus.is-compact,
.exam-game-table-wrap.is-compact {
  border-radius: 14px;
  padding: 16px 18px;
}

.exam-game-passage-type {
  color: #b02f2f;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  margin: 0 0 5px;
  text-transform: uppercase;
}

.exam-game-passage h3 {
  font-size: 1.25rem;
  margin: 0 0 14px;
}

.exam-game-passage-copy {
  color: #28354a;
  font-size: 1.02rem;
  line-height: 1.75;
}

.exam-game-passage-copy p {
  margin: 0 0 1em;
}

.exam-game-passage-copy p:last-child,
.exam-game-text-stimulus p {
  margin-bottom: 0;
}

/* Reading alone uses the available desktop width as a split workspace: the
   passage remains visible on the left while the active question stays close
   on the right. Other EQAO and NGAT sections keep the standard card width. */
.exam-game-quiz-set[data-theme="eqao"][data-section="reading"],
.exam-game-quiz-set.has-wide-reading-layout {
  left: 50%;
  position: relative;
  transform: translateX(-50%);
  width: min(1480px, calc(100vw - 48px));
}

.exam-game-reading-layout {
  align-items: start;
  display: grid;
  gap: 30px;
  grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr);
}

.exam-game-reading-stimulus,
.exam-game-reading-response {
  min-width: 0;
}

.exam-game-reading-stimulus .exam-game-passage {
  margin-bottom: 0;
}

.exam-game-reading-stimulus .exam-game-passage-copy {
  max-width: 76ch;
}

.exam-game-text-stimulus p {
  line-height: 1.65;
  white-space: pre-line;
}

.exam-game-table-wrap {
  overflow-x: auto;
}

.exam-game-data-table {
  border-collapse: collapse;
  min-width: 420px;
  width: 100%;
}

.exam-game-data-table caption {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 10px;
  text-align: left;
}

.exam-game-data-table th,
.exam-game-data-table td {
  border: 1px solid #cfd9ec;
  padding: 9px 12px;
  text-align: center;
}

.exam-game-data-table thead th,
.exam-game-data-table tbody th {
  background: var(--brand-soft);
  font-weight: 800;
}

.exam-game-response-instruction {
  color: var(--muted);
  font-weight: 800;
  margin: -8px 0 14px;
}

.exam-game-question-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -10px 0 18px;
}

.exam-game-question-meta span {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: #1e3a8a;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 9px;
}

.exam-game-response-error {
  background: var(--eg-red-soft);
  border-left: 4px solid var(--eg-red);
  color: #8f2525;
  font-size: 0.9rem;
  font-weight: 800;
  margin: -4px 0 14px;
  padding: 9px 12px;
}

.exam-game-open-response {
  display: grid;
  gap: 9px;
}

.exam-game-open-response label {
  font-weight: 900;
}

.exam-game-open-response textarea {
  border: 2px solid var(--line);
  border-radius: 14px;
  font: inherit;
  line-height: 1.55;
  min-height: 180px;
  padding: 14px 16px;
  resize: vertical;
  width: 100%;
}

.exam-game-open-response textarea:focus {
  border-color: var(--eg-eqao-2);
  outline: 3px solid rgba(47, 209, 197, 0.2);
}

.exam-game-open-response > p,
.exam-game-score-note {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.exam-game-numeric-response {
  display: grid;
  gap: 9px;
  max-width: 460px;
}

.exam-game-numeric-response label {
  font-weight: 900;
}

.exam-game-numeric-input-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.exam-game-numeric-input-row input {
  border: 2px solid var(--line);
  border-radius: 14px;
  font: inherit;
  font-size: 1.15rem;
  font-weight: 800;
  min-width: 0;
  padding: 13px 15px;
  width: min(100%, 280px);
}

.exam-game-numeric-input-row input:focus {
  border-color: var(--eg-ib-2);
  outline: 3px solid rgba(37, 99, 235, 0.16);
}

.exam-game-numeric-input-row span {
  color: var(--muted);
  font-weight: 800;
}

.exam-game-numeric-response > p {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0;
}

.exam-game-quiz[data-theme="eqao"] .exam-game-level-badge[data-level="set"] {
  background: var(--eg-teal-soft);
  color: #0d766c;
}

.exam-game-quiz[data-theme="ib"] .exam-game-level-badge[data-level="set"] {
  background: #dbeafe;
  color: #1d4ed8;
}

/* Declarative figures used by all three active NGAT visual sections. */
.exam-game-visual-stimulus {
  background: linear-gradient(145deg, #f8fbff, #f4fbfa);
  border: 2px solid var(--line);
  border-radius: 18px;
  margin: 0 auto 22px;
  max-width: 520px;
  padding: 16px;
}

.exam-game-visual-stimulus.is-compact {
  border-radius: 14px;
  margin-bottom: 14px;
  max-width: 400px;
  padding: 10px;
}

.exam-game-matrix {
  display: grid;
  gap: 10px;
  margin: 0 auto;
}

.exam-game-matrix[data-columns="1"] {
  grid-template-columns: 1fr;
  max-width: 150px;
}

.exam-game-matrix[data-columns="2"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 350px;
}

.exam-game-matrix[data-columns="3"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 460px;
}

.exam-game-matrix-cell {
  align-items: center;
  aspect-ratio: 1;
  background: #ffffff;
  border: 2px solid #cfd9ec;
  border-radius: 12px;
  color: #263b5c;
  display: flex;
  justify-content: center;
  min-width: 0;
  overflow: hidden;
  padding: 6px;
}

.exam-game-matrix-cell.is-missing {
  background: repeating-linear-gradient(135deg, #f7f4ff 0, #f7f4ff 8px, #eee8ff 8px, #eee8ff 16px);
  border-color: var(--eg-purple);
  color: #6c37d6;
  font-size: clamp(1.7rem, 6vw, 2.8rem);
  font-weight: 900;
}

.exam-game-figure-svg {
  color: inherit;
  display: block;
  height: 100%;
  overflow: visible;
  width: 100%;
}

.exam-game-choices {
  display: grid;
  gap: 12px;
}

.exam-game-choices.is-visual {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.exam-game-choices.is-visual[data-choice-count="6"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.exam-game-choice {
  align-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 2px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 14px;
  padding: 14px 18px;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 120ms ease;
}

.exam-game-choice:focus-visible {
  border-color: var(--eg-purple);
  box-shadow: 0 0 0 4px var(--eg-purple-soft);
  outline: none;
}

.exam-game-choice.is-visual {
  align-items: stretch;
  flex-direction: column;
  gap: 6px;
  min-height: 150px;
  padding: 10px;
}

.exam-game-choice-figure {
  align-items: center;
  align-self: stretch;
  color: #263b5c;
  display: flex;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.exam-game-answer-figure {
  height: 108px;
  max-width: 108px;
  width: 100%;
}

.exam-game-choice-figure.is-compact .exam-game-answer-figure {
  height: 76px;
  max-width: 76px;
}

.exam-game-choice-letter {
  align-items: center;
  background: var(--brand-soft);
  border-radius: 10px;
  color: var(--brand);
  display: flex;
  flex: none;
  font-weight: 800;
  height: 30px;
  justify-content: center;
  width: 30px;
}

.exam-game-choice:hover:not(:disabled) {
  border-color: var(--eg-purple);
  transform: translateY(-1px);
}

.exam-game-choice:disabled {
  cursor: default;
}

.exam-game-choice.is-correct {
  background: var(--eg-green-soft);
  border-color: var(--eg-green);
  font-weight: 700;
}

.exam-game-choice.is-correct .exam-game-choice-letter {
  background: var(--eg-green);
  color: #ffffff;
}

.exam-game-choice.is-incorrect {
  background: var(--eg-red-soft);
  border-color: var(--eg-red);
}

.exam-game-choice.is-incorrect .exam-game-choice-letter {
  background: var(--eg-red);
  color: #ffffff;
}

.exam-game-feedback {
  border-radius: 16px;
  margin-top: 20px;
  padding: 18px 20px;
}

.exam-game-feedback.is-correct {
  background: var(--eg-green-soft);
}

.exam-game-feedback.is-incorrect {
  background: var(--eg-red-soft);
}

.exam-game-feedback p {
  margin: 0 0 14px;
}

.exam-game-results {
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  padding: 30px;
}

.exam-game-score {
  font-size: 2.6rem;
  margin: 6px 0 4px;
}

.exam-game-score span {
  color: var(--muted);
  font-size: 1.2rem;
  font-weight: 700;
}

.exam-game-praise {
  font-size: 1.1rem;
  font-weight: 800;
  margin: 0 0 22px;
}

.exam-game-results[data-theme="eqao"] .exam-game-praise { color: #0d766c; }
.exam-game-results[data-theme="ngat"] .exam-game-praise { color: #6c37d6; }
.exam-game-results[data-theme="ib"] .exam-game-praise { color: var(--eg-ib-1); }
.exam-game-results[data-theme="brain"] .exam-game-praise { color: #1d4ed8; }

.exam-game-profile {
  border-top: 1px solid var(--line);
  margin: 24px 0 8px;
  padding-top: 20px;
}

.exam-game-profile h3 {
  margin: 0 0 12px;
}

.exam-game-profile-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.exam-game-profile-card {
  background: linear-gradient(145deg, #f0fdfa, #eff6ff);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  display: grid;
  gap: 3px;
  padding: 14px 16px;
}

.exam-game-profile-card > span {
  color: var(--eg-ib-1);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.exam-game-profile-card small {
  color: var(--muted);
  line-height: 1.4;
}

.exam-game-breakdown {
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.exam-game-breakdown-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 12px 18px;
}

.exam-game-breakdown-row:last-child {
  border-bottom: none;
}

.exam-game-breakdown-score {
  font-weight: 800;
}

.exam-game-admin-report {
  background: rgba(255, 255, 255, 0.97);
  border: 2px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--soft-shadow);
  margin: 0 auto;
  max-width: 760px;
  padding: 30px;
}

.exam-game-admin-report-title {
  margin: 4px 0 6px;
}

.exam-game-admin-report-summary {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 22px;
}

.exam-game-admin-report-error,
.exam-game-admin-report-empty {
  color: var(--muted);
  margin: 12px 0 20px;
}

.exam-game-admin-report-columns {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 22px;
}

.exam-game-admin-report-heading {
  font-size: 0.95rem;
  margin: 0 0 10px;
}

.exam-game-admin-report-list {
  border: 1px solid var(--line);
  border-radius: 14px;
  list-style: none;
  margin: 0;
  overflow: hidden;
  padding: 0;
}

.exam-game-admin-report-row {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 14px;
}

.exam-game-admin-report-row:last-child {
  border-bottom: none;
}

.exam-game-admin-report-row-label {
  display: grid;
  gap: 2px;
}

.exam-game-admin-report-row-meta {
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.exam-game-admin-report-row-score {
  font-weight: 800;
  white-space: nowrap;
}

.exam-game-admin-report-pct-good { color: var(--eg-green); }
.exam-game-admin-report-pct-mid { color: var(--eg-gold); }
.exam-game-admin-report-pct-low { color: var(--eg-red); }

.exam-game-admin-report-all {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 20px;
  padding: 14px 18px;
}

.exam-game-admin-report-all summary {
  cursor: pointer;
  font-weight: 700;
}

.exam-game-admin-report-all .exam-game-admin-report-list {
  border: none;
  margin-top: 12px;
}

.exam-game-admin-report-footnote {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0 0 18px;
}

@media (max-width: 640px) {
  .exam-game-admin-report-columns {
    grid-template-columns: 1fr;
  }
}

.exam-game-progress-report {
  max-width: 860px;
}

.exam-game-progress-report-print-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.exam-game-progress-report-note {
  background: var(--eg-gold-soft);
  border-radius: 14px;
  margin: 0 0 22px;
  padding: 16px 18px;
}

.exam-game-progress-report-note p {
  color: #6b4a05;
  line-height: 1.55;
  margin: 6px 0 0;
  white-space: pre-wrap;
}

.exam-game-progress-report-section {
  margin-bottom: 26px;
}

.exam-game-progress-report-heading-meta {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 8px;
  text-transform: none;
}

.exam-game-progress-report-table {
  border: 1px solid var(--line);
  border-collapse: collapse;
  border-radius: 14px;
  font-size: 0.88rem;
  overflow: hidden;
  width: 100%;
}

.exam-game-progress-report-table th,
.exam-game-progress-report-table td {
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.exam-game-progress-report-table thead th {
  background: var(--eg-purple-soft);
  color: var(--eg-ib-1);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.exam-game-progress-report-table tbody tr:last-child td {
  border-bottom: none;
}

.exam-game-progress-report-generated {
  color: var(--muted);
  font-size: 0.78rem;
  margin: 24px 0 6px;
}

.exam-game-progress-report-back {
  display: inline-block;
}

@media (max-width: 700px) {
  .exam-game-progress-report-table {
    display: block;
    overflow-x: auto;
  }
}

@media print {
  body[data-page="examGame"] .site-header,
  body[data-page="examGame"] .site-footer,
  body[data-page="examGame"] .page-hero,
  body[data-page="examGame"] .contact-band,
  body[data-page="examGame"] [data-chat-widget],
  body[data-page="examGame"] .exam-game-progress-report-print-actions,
  body[data-page="examGame"] .exam-game-progress-report-back {
    display: none !important;
  }

  body[data-page="examGame"] {
    background: #fff !important;
  }

  body[data-page="examGame"]::before {
    display: none !important;
  }

  body[data-page="examGame"] .exam-game-progress-report {
    border: none;
    box-shadow: none;
    margin: 0;
    max-width: none;
    padding: 0;
  }
}

.exam-game-cta {
  background: linear-gradient(135deg, var(--eg-purple-soft), var(--eg-teal-soft));
  border-radius: 18px;
  margin-top: 30px;
  padding: 26px;
}

.exam-game-cta h3 {
  margin: 0 0 8px;
}

.exam-game-cta p {
  color: var(--muted);
  margin: 0 0 18px;
}

.exam-game-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.exam-game-toolbar,
.exam-game-quiz-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
}

.exam-game-quiz-toolbar {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 16px;
}

.exam-game-switch-link {
  background: none;
  border: 0;
  color: var(--brand-2);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.exam-game-student-banner {
  background: var(--eg-green-soft);
  border-radius: 10px;
  color: #1a8a45;
  font-weight: 700;
  margin: 10px 0 18px;
  padding: 12px 16px;
}

.exam-game-student-banner-guest {
  background: var(--eg-purple-soft);
  color: #6c37d6;
}

.exam-game-student-banner-locked {
  background: var(--eg-gold-soft);
  color: #92620a;
}

.exam-game-start-notice {
  background: var(--eg-gold-soft);
  border-radius: 10px;
  color: #92620a;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 10px 0 18px;
  padding: 12px 16px;
}

.exam-game-student-banner a,
.exam-game-request-access a {
  color: inherit;
  text-decoration: underline;
}

.exam-game-request-access {
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed var(--line);
  border-radius: 10px;
  margin: 4px 0 18px;
  padding: 14px 16px;
}

.exam-game-request-access p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

.exam-game-request-access-locked {
  background: var(--eg-gold-soft);
  border-style: solid;
  border-color: transparent;
}

.exam-game-request-access-locked p {
  color: #92620a;
}

.exam-game-set-card {
  position: relative;
}

.exam-game-set-card.is-locked {
  background: rgba(0, 0, 0, 0.02);
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.75;
}

.exam-game-set-card.is-locked:hover,
.exam-game-set-card.is-locked:focus-visible {
  background: rgba(0, 0, 0, 0.02);
  border-color: var(--line);
  box-shadow: none;
  transform: none;
}

.exam-game-set-lock {
  display: block;
  font-size: 0.85rem;
  margin-top: 4px;
}

.exam-game-set-best {
  color: var(--eg-teal);
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  margin-top: 4px;
}

/* ---- NGAT free-navigation quiz: question navigator, selected state ---- */

.exam-game-qnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 22px;
}

.exam-game-qnav-dot {
  align-items: center;
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font-weight: 800;
  font-size: 0.85rem;
  height: 34px;
  justify-content: center;
  transition: border-color 140ms ease, background 140ms ease, transform 120ms ease;
  width: 34px;
}

.exam-game-qnav-dot:hover {
  border-color: var(--eg-purple);
  transform: translateY(-1px);
}

.exam-game-qnav-dot.is-answered {
  background: var(--eg-teal-soft);
  border-color: var(--eg-teal);
  color: #0d766c;
}

.exam-game-qnav-dot.is-current {
  border-color: var(--eg-purple);
  box-shadow: 0 0 0 3px var(--eg-purple-soft);
}

.exam-game-choice.is-selected {
  background: var(--eg-purple-soft);
  border-color: var(--eg-purple);
  font-weight: 700;
}

.exam-game-choice.is-selected .exam-game-choice-letter {
  background: var(--eg-purple);
  color: #ffffff;
}

.exam-game-quiz-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.exam-game-quiz-nav-row .button {
  flex: none;
}

.exam-game-quiz-nav-row .button[data-submit-set] {
  margin-left: auto;
}

.exam-game-set-switch {
  align-items: center;
  display: flex;
  gap: 8px;
}

.exam-game-set-switch label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.exam-game-set-switch select {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  padding: 6px 10px;
}

/* ---- Review screen (per-question, shown after Submit) ---- */

.exam-game-review {
  border-top: 1px solid var(--line);
  margin-top: 26px;
  padding-top: 22px;
}

.exam-game-review-heading {
  margin: 0 0 16px;
}

.exam-game-review-item {
  border-radius: 16px;
  margin-bottom: 16px;
  padding: 18px 20px;
}

.exam-game-review-item.is-correct {
  background: var(--eg-green-soft);
}

.exam-game-review-item.is-incorrect {
  background: var(--eg-red-soft);
}

.exam-game-review-item.is-open {
  background: var(--eg-blue-soft);
}

.exam-game-review-prompt {
  font-weight: 700;
  margin: 0 0 12px;
}

.exam-game-review-num {
  color: var(--muted);
  font-weight: 800;
}

.exam-game-review-choices {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.exam-game-review-choices.is-visual {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.exam-game-review-choices.is-visual[data-choice-count="6"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.exam-game-disclaimer {
  background: #fffaf0;
  border: 1px solid #ecd9ae;
  border-radius: 12px;
  color: #65512a;
  font-size: 0.88rem;
  line-height: 1.55;
  margin: 12px 0 20px;
  padding: 10px 14px;
}

.exam-game-source-links {
  display: block;
  margin-top: 6px;
}

.exam-game-source-links a {
  color: inherit;
  font-weight: 800;
  text-decoration: underline;
}

.exam-game-review-choice {
  align-items: center;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 10px;
  display: flex;
  gap: 12px;
  padding: 10px 14px;
}

.exam-game-review-choice.is-visual {
  align-items: stretch;
  flex-direction: column;
  gap: 4px;
  min-height: 100px;
  padding: 8px 10px;
}

.exam-game-review-choice.is-correct-answer {
  background: var(--eg-green-soft);
  font-weight: 700;
  outline: 2px solid var(--eg-green);
}

.exam-game-review-choice.is-wrong-answer {
  background: var(--eg-red-soft);
  outline: 2px solid var(--eg-red);
}

.exam-game-review-mark {
  font-weight: 900;
  margin-left: auto;
}

.exam-game-review-explain {
  margin: 0;
}

.exam-game-review-open-response {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 14px 16px;
}

.exam-game-review-open-response p,
.exam-game-review-open-response ul,
.exam-game-review-open-response blockquote {
  margin: 0;
}

.exam-game-review-open-response blockquote {
  border-left: 4px solid var(--eg-blue);
  line-height: 1.6;
  padding: 8px 14px;
  white-space: pre-wrap;
}

.exam-game-review-open-response ul {
  display: grid;
  gap: 6px;
  padding-left: 22px;
}

.exam-game-review-open-response details {
  margin-top: 4px;
}

.exam-game-review-open-response summary {
  color: var(--brand);
  cursor: pointer;
  font-weight: 800;
}

.exam-game-review-numeric-response {
  background: rgba(255, 255, 255, 0.78);
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: 12px;
  padding: 12px 16px;
}

.exam-game-review-numeric-response p {
  margin: 0;
}

/* ---- Perfect-score celebration ---- */

.exam-game-celebration {
  bottom: 0;
  left: 0;
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 60;
}

.exam-game-celebration-emoji {
  animation: exam-game-celebration-fall 2.2s ease-in forwards;
  font-size: 2rem;
  position: absolute;
  top: -10%;
  transform: translateX(var(--drift, 0));
}

@keyframes exam-game-celebration-fall {
  0% { opacity: 0; transform: translate(0, -10vh) scale(0.6) rotate(0deg); }
  12% { opacity: 1; transform: translate(var(--drift, 0), 10vh) scale(1) rotate(15deg); }
  100% { opacity: 0; transform: translate(var(--drift, 0), 100vh) scale(1) rotate(-20deg); }
}

@media (prefers-reduced-motion: reduce) {
  .exam-game-celebration-emoji {
    animation: none;
    display: none;
  }
}

@media (max-width: 1080px) {
  .exam-game-quiz-set[data-theme="eqao"][data-section="reading"],
  .exam-game-quiz-set.has-wide-reading-layout {
    left: auto;
    transform: none;
    width: 100%;
  }

  .exam-game-reading-layout {
    display: block;
  }

  .exam-game-reading-stimulus .exam-game-passage {
    margin-bottom: 24px;
  }

}

@media (max-width: 720px) {
  .exam-game-bank-grid,
  .exam-game-difficulty-grid {
    grid-template-columns: 1fr;
  }

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

  .exam-game-quiz,
  .exam-game-results {
    padding: 22px;
  }

  .exam-game-passage,
  .exam-game-text-stimulus,
  .exam-game-table-wrap {
    padding: 18px;
  }

  .exam-game-passage-copy {
    font-size: 0.98rem;
    line-height: 1.68;
  }

  .exam-game-progress-label {
    margin-left: 0;
  }

  .exam-game-qnav-dot {
    height: 30px;
    width: 30px;
  }

  .exam-game-quiz-nav-row .button[data-submit-set] {
    margin-left: 0;
    width: 100%;
  }

  .exam-game-review-choices {
    gap: 6px;
  }

  .exam-game-profile-grid {
    grid-template-columns: 1fr;
  }

  .exam-game-visual-stimulus {
    border-radius: 14px;
    padding: 10px;
  }

  .exam-game-matrix {
    gap: 6px;
  }

  .exam-game-matrix-cell {
    border-radius: 9px;
    padding: 4px;
  }

  .exam-game-choices.is-visual {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-game-choices.is-visual[data-choice-count="6"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-game-review-choices.is-visual {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-game-review-choices.is-visual[data-choice-count="6"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exam-game-choice.is-visual {
    gap: 6px;
    min-height: 112px;
    padding: 9px;
  }

  .exam-game-choice.is-visual .exam-game-choice-letter,
  .exam-game-review-choice.is-visual .exam-game-choice-letter {
    height: 26px;
    width: 26px;
  }

  .exam-game-answer-figure {
    height: 82px;
    max-width: 82px;
  }

  .exam-game-choice-figure.is-compact .exam-game-answer-figure {
    height: 62px;
    max-width: 62px;
  }

  .exam-game-review-choice.is-visual {
    gap: 5px;
    min-height: 82px;
    padding: 7px;
  }
}

/* ============================================================
   Growth: WhatsApp button, SEO landing pages
   ============================================================ */

.button.whatsapp {
  align-items: center;
  background: #25d366;
  border-color: transparent;
  color: #0b3d1f;
  display: inline-flex;
  gap: 9px;
}

.button.whatsapp svg {
  height: 21px;
  width: 21px;
}

.button.whatsapp:hover {
  background: #2be271;
  box-shadow: 0 14px 30px rgba(37, 211, 102, 0.35);
}

.landing-cta-panel {
  align-self: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  display: grid;
  gap: 12px;
  justify-items: start;
  padding: 28px;
}

.landing-cta-panel h2 {
  font-size: 1.5rem;
  line-height: 1.15;
  margin: 0;
}

.landing-cta-panel p {
  font-size: 1rem !important;
  margin: 0 !important;
}

.landing-cta-panel .button {
  min-height: 46px;
  width: 100%;
}

.course-links-section {
  margin: 0 auto 80px;
  max-width: var(--max);
  padding: 0 36px;
}

.course-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.course-link {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--soft-shadow);
  color: var(--brand);
  font-size: 0.94rem;
  font-weight: 700;
  padding: 10px 18px;
  text-decoration: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.course-link:hover {
  border-color: rgba(40, 87, 184, 0.4);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

@media (max-width: 580px) {
  .course-links-section {
    padding: 0 20px;
  }
}

/* ============================================================
   Animated SVG brand logo (atom with live electrons + pi)
   ============================================================ */

.brand-atom {
  animation: brand-nucleus-breathe 5.4s ease-in-out infinite;
  display: block;
  filter: drop-shadow(0 5px 9px rgba(73, 36, 111, 0.2));
  height: 86px;
  overflow: visible;
  width: 86px;
  z-index: 1;
}

.atom-orbits ellipse {
  stroke-linecap: round;
}

.atom-electron {
  fill: #e8873a;
  filter: drop-shadow(0 0 2.5px rgba(255, 191, 62, 0.95)) drop-shadow(0 0 5px rgba(242, 169, 59, 0.6));
}

.atom-pi {
  fill: #1c1633;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  font-weight: 700;
  animation: pi-glitter 5.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes pi-glitter {
  0%, 78%, 100% {
    fill: #1c1633;
    filter: none;
    transform: scale(1);
  }
  84% {
    fill: #6a3fb5;
    filter: drop-shadow(0 0 3px rgba(255, 210, 110, 0.95)) drop-shadow(0 0 8px rgba(242, 169, 59, 0.8));
    transform: scale(1.12) rotate(-2deg);
  }
  90% {
    fill: #1c1633;
    filter: drop-shadow(0 0 2px rgba(255, 210, 110, 0.5));
    transform: scale(1.02);
  }
}

.atom-sparkle {
  fill: #ffcf66;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.atom-sparkle-1 {
  animation: atom-sparkle-twinkle 5.6s ease-in-out infinite;
  animation-delay: 4.4s;
}

.atom-sparkle-2 {
  animation: atom-sparkle-twinkle 5.6s ease-in-out infinite;
  animation-delay: 4.75s;
}

@keyframes atom-sparkle-twinkle {
  0%, 12%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  4% { opacity: 1; transform: scale(1.15) rotate(45deg); }
  8% { opacity: 0.5; transform: scale(0.7) rotate(80deg); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-atom,
  .atom-pi,
  .atom-sparkle {
    animation: none;
  }

  .brand-atom .atom-electrons {
    display: none;
  }
}

/* --- Two stars revolving around the original logo --- */
.brand-orbit-star {
  height: 0;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 50%;
  width: 0;
  z-index: 3;
}

.brand-orbit-star-one {
  animation: brand-electron-orbit 7.5s linear infinite;
  --orbit-radius: 45px;
}

.brand-orbit-star-two {
  animation: brand-electron-orbit-reverse 10.5s linear -3.4s infinite;
  --orbit-radius: 38px;
}

.brand-orbit-star > span {
  background: #ffffff;
  box-shadow: 0 0 8px rgba(255, 194, 64, 0.95);
  display: block;
  height: 2px;
  left: -5px;
  position: absolute;
  top: -1px;
  width: 10px;
}

.brand-orbit-star > span::after {
  background: inherit;
  box-shadow: inherit;
  content: "";
  height: 10px;
  left: 4px;
  position: absolute;
  top: -4px;
  width: 2px;
}

.brand-orbit-star-one > span {
  animation: brand-star-twinkle 2.4s ease-in-out infinite;
}

.brand-orbit-star-two > span {
  animation: brand-star-twinkle 3.1s ease-in-out -1.4s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .brand-orbit-star,
  .brand-orbit-star > span {
    animation: none;
  }

  .brand-orbit-star {
    display: none;
  }
}

/* --- Logo orbit dots: the original orange dots, now moving & glittering --- */
.brand-orbit-overlay {
  height: 86px;
  left: 50%;
  overflow: visible;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86px;
  z-index: 2;
}

.orbit-dot {
  fill: #d97b35;
  stroke: #8a4a1e;
  stroke-width: 2;
}

.orbit-dot-1 {
  animation: orbit-dot-glitter 6.5s ease-in-out infinite;
}

.orbit-dot-2 {
  animation: orbit-dot-glitter 6.5s ease-in-out -2.2s infinite;
}

.orbit-dot-3 {
  animation: orbit-dot-glitter 6.5s ease-in-out -4.4s infinite;
}

@keyframes orbit-dot-glitter {
  0%, 74%, 100% {
    fill: #d97b35;
    filter: none;
  }
  80% {
    fill: #ffb45e;
    filter: drop-shadow(0 0 6px rgba(255, 200, 90, 0.95)) drop-shadow(0 0 14px rgba(242, 169, 59, 0.7));
  }
  88% {
    fill: #d97b35;
    filter: drop-shadow(0 0 3px rgba(255, 200, 90, 0.4));
  }
}

.orbit-dots-static {
  display: none;
  fill: #d97b35;
  stroke: #8a4a1e;
  stroke-width: 2;
}

@media (prefers-reduced-motion: reduce) {
  .orbit-dot {
    display: none;
  }

  .orbit-dots-static {
    display: block;
  }
}

/* --- Logo overlay alignment: image and orbit overlay always share one box --- */
.brand-logo-motion .brand-logo {
  height: 100%;
  width: 100%;
}

.brand-orbit-overlay {
  height: 100%;
  left: 0;
  top: 0;
  transform: none;
  width: 100%;
}

@media (max-width: 580px) {
  .brand-logo-motion {
    flex: 0 0 64px;
    height: 64px;
    width: 64px;
  }
}

/* --- Whole-logo slow revolution (replaces moving dots) --- */
.brand-logo-motion .brand-logo {
  animation: brand-slow-spin 36s linear infinite;
}

@keyframes brand-slow-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .brand-logo-motion .brand-logo {
    animation: none;
  }
}

/* --- Stationary pi layer above the revolving rings --- */
.brand-pi-still {
  height: 100%;
  left: 0;
  object-fit: contain;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 100%;
  z-index: 2;
}
