:root {
  color-scheme: light dark;
  --topbar-height: 74px;
  --topbar-gap: 10px;
  --section-header-inset: 14px;
  --bg: #d6d6cf;
  --surface: #e9e9e2;
  --surface-2: #deded6;
  --text: #171717;
  --muted: #6a6a65;
  --line: #c7c7bd;
  --brand: #111111;
  --brand-contrast: #f1f1ef;
  --lingot-hue: 155;
  --light-comfort: 0%;
  --light-comfort-overlay: 0;
  --accent: #3f403b;
  --accent-text: #ffffff;
  --lingot-gold: #d1941f;
  --lingot-gold-deep: #a7660a;
  --signal-wait: #fff3bf;
  --signal-wait-line: #e5c96a;
  --notice-error: #b94a48;
  --notice-error-bg: #f5e5e2;
  --notice-success: #24724d;
  --notice-success-bg: #dceee5;
  --notice-warning: #8a6416;
  --notice-warning-bg: #f4e8c8;
  --notice-info: #356f95;
  --notice-info-bg: #e0ebf2;
  --radius: 8px;
  --shadow: 0 12px 40px rgb(0 0 0 / 0.06);
  --safe-bottom: max(18px, env(safe-area-inset-bottom, 0px));
}

html {
  scrollbar-gutter: stable;
  scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent;
  scrollbar-width: thin;
}

* {
  scrollbar-color: color-mix(in srgb, var(--muted) 45%, transparent) transparent;
  scrollbar-width: thin;
}

*::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 42%, transparent);
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--muted) 62%, transparent);
  background-clip: content-box;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0d0c;
    --surface: #171716;
    --surface-2: #20201e;
    --text: #f2f1ec;
    --muted: #a8a69f;
    --line: #30302d;
    --brand: #f5f5f5;
    --brand-contrast: #111111;
    --accent: #a8a69f;
    --accent-text: #0d0d0c;
    --lingot-gold: #f1c85f;
    --lingot-gold-deep: #c88918;
    --signal-wait: #403713;
    --signal-wait-line: #8d7626;
    --notice-error: #f0a09c;
    --notice-error-bg: #3b1e1d;
    --notice-success: #90d7af;
    --notice-success-bg: #163528;
    --notice-warning: #e3c475;
    --notice-warning-bg: #3a3114;
    --notice-info: #9cc9ea;
    --notice-info-bg: #173143;
    --shadow: none;
  }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: color-mix(in srgb, #d6d6cf, #b8b7ad var(--light-comfort));
  --surface: color-mix(in srgb, #e9e9e2, #d0cfc5 var(--light-comfort));
  --surface-2: color-mix(in srgb, #deded6, #c4c3b9 var(--light-comfort));
  --text: #171717;
  --muted: #6a6a65;
  --line: #c7c7bd;
  --brand: #111111;
  --brand-contrast: #f1f1ef;
  --accent: #3f403b;
  --accent-text: #ffffff;
  --lingot-gold: #d1941f;
  --lingot-gold-deep: #a7660a;
  --signal-wait: #fff3bf;
  --signal-wait-line: #e5c96a;
  --notice-error: #b94a48;
  --notice-error-bg: #f5e5e2;
  --notice-success: #24724d;
  --notice-success-bg: #dceee5;
  --notice-warning: #8a6416;
  --notice-warning-bg: #f4e8c8;
  --notice-info: #356f95;
  --notice-info-bg: #e0ebf2;
  --shadow: 0 12px 40px rgb(0 0 0 / 0.06);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0d0d0c;
  --surface: #171716;
  --surface-2: #20201e;
  --text: #f2f1ec;
  --muted: #a8a69f;
  --line: #30302d;
  --brand: #f5f5f5;
  --brand-contrast: #111111;
  --accent: #a8a69f;
  --accent-text: #0d0d0c;
  --lingot-gold: #f1c85f;
  --lingot-gold-deep: #c88918;
  --signal-wait: #403713;
  --signal-wait-line: #8d7626;
  --notice-error: #f0a09c;
  --notice-error-bg: #3b1e1d;
  --notice-success: #90d7af;
  --notice-success-bg: #163528;
  --notice-warning: #e3c475;
  --notice-warning-bg: #3a3114;
  --notice-info: #9cc9ea;
  --notice-info-bg: #173143;
  --shadow: none;
}

:root[data-hue-custom="true"] {
  --bg: color-mix(in srgb, #d6d6cf 84%, hsl(var(--lingot-hue) 42% 54%));
  --surface: color-mix(in srgb, #e9e9e2 88%, hsl(var(--lingot-hue) 44% 66%));
  --surface-2: color-mix(in srgb, #deded6 84%, hsl(var(--lingot-hue) 42% 60%));
  --accent: hsl(var(--lingot-hue) 38% 28%);
}

@media (prefers-color-scheme: dark) {
  :root[data-hue-custom="true"] {
    --bg: color-mix(in srgb, #0d0d0c 80%, hsl(var(--lingot-hue) 42% 18%));
    --surface: color-mix(in srgb, #171716 84%, hsl(var(--lingot-hue) 42% 22%));
    --surface-2: color-mix(in srgb, #20201e 82%, hsl(var(--lingot-hue) 42% 25%));
    --accent: hsl(var(--lingot-hue) 37% 65%);
  }
}

:root[data-theme="light"][data-hue-custom="true"] {
  --bg: color-mix(in srgb, color-mix(in srgb, #d6d6cf 84%, hsl(var(--lingot-hue) 42% 54%)), #b8b7ad var(--light-comfort));
  --surface: color-mix(in srgb, color-mix(in srgb, #e9e9e2 88%, hsl(var(--lingot-hue) 44% 66%)), #d0cfc5 var(--light-comfort));
  --surface-2: color-mix(in srgb, color-mix(in srgb, #deded6 84%, hsl(var(--lingot-hue) 42% 60%)), #c4c3b9 var(--light-comfort));
  --accent: hsl(var(--lingot-hue) 38% 28%);
}

:root[data-theme="dark"][data-hue-custom="true"] {
  --bg: color-mix(in srgb, #0d0d0c 80%, hsl(var(--lingot-hue) 42% 18%));
  --surface: color-mix(in srgb, #171716 84%, hsl(var(--lingot-hue) 42% 22%));
  --surface-2: color-mix(in srgb, #20201e 82%, hsl(var(--lingot-hue) 42% 25%));
  --accent: hsl(var(--lingot-hue) 37% 65%);
}

* { box-sizing: border-box; }

html {
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: clip;
}

:root[data-theme="light"] body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  pointer-events: none;
  background: #000;
  opacity: var(--light-comfort-overlay);
  transition: opacity 120ms ease;
}

.site-shell {
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }

.topbar {
  display: flex;
  position: fixed;
  z-index: 50;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  border-radius: 0 0 14px 14px;
  padding: 20px 14px;
  background: var(--bg);
  box-shadow: 0 14px 22px -20px rgb(0 0 0 / 0.48);
}

.brand {
  display: inline-flex;
  align-items: center;
  font-weight: 720;
  letter-spacing: 0;
}

.brand img {
  display: block;
  object-fit: contain;
}

.brand.wordmark img {
  width: 116px;
  height: auto;
  max-height: 34px;
  object-fit: contain;
  filter: brightness(0) saturate(100%);
}

.brand.iconmark {
  display: none;
}

.brand.iconmark img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.topbar-identity {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.topbar-partner-mark {
  width: 1px;
  height: 28px;
  background: var(--line);
}

.topbar-organization-logo {
  display: block;
  width: auto;
  max-width: 132px;
  height: 32px;
  object-fit: contain;
  object-position: left center;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  font-size: 12px;
  font-weight: 650;
}

@media (prefers-color-scheme: dark) {
  .brand.wordmark img,
  .brand.iconmark img,
  .topbar-organization-logo {
    filter: brightness(0) saturate(100%) invert(96%) sepia(7%) saturate(93%) hue-rotate(11deg) brightness(102%) contrast(92%);
  }

  .brand.iconmark img {
    filter: brightness(0) saturate(100%) invert(96%) sepia(7%) saturate(93%) hue-rotate(11deg) brightness(98%) contrast(82%) opacity(0.86);
  }
}

.topnav {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
  color: var(--muted);
  font-size: 15px;
  font-weight: 550;
}

.topnav a:hover { color: var(--text); }

.topnav a.is-active {
  color: var(--text);
  font-weight: 650;
}

.nav-with-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}

.theme-toggle {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--muted);
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--muted) 54%, var(--line));
}

.theme-toggle .material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-size: 19px;
  font-weight: normal;
  line-height: 1;
}

.topbar-theme-toggle {
  margin-left: 0;
}

.public-signin-toggle {
  display: inline-flex;
  width: auto;
  gap: 6px;
  padding: 0 10px;
  text-decoration: none;
}

.public-signin-toggle span:not(.material-symbols-rounded) {
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.header-action-pill,
.target-language-pill {
  display: inline-flex;
  height: 34px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.header-action-pill {
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--text);
  padding: 0 12px;
}

.header-action-pill:hover {
  background: color-mix(in srgb, var(--surface-2) 86%, var(--surface));
  color: var(--text);
}

.active-session-pill {
  position: relative;
  width: 34px;
  padding: 0;
  border-color: color-mix(in srgb, #1f7a6d 48%, var(--line));
  border-right: 1px solid color-mix(in srgb, #1f7a6d 48%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, #1f7a6d 12%, var(--surface));
  color: color-mix(in srgb, #1f7a6d 72%, var(--text));
}

.active-session-pill:hover,
.active-session-pill.is-current {
  border-color: color-mix(in srgb, #1f7a6d 68%, var(--line));
  background: color-mix(in srgb, #1f7a6d 16%, var(--surface));
  color: color-mix(in srgb, #1f7a6d 82%, var(--text));
}

.active-session-pill::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid color-mix(in srgb, #1f7a6d 54%, transparent);
  border-radius: inherit;
  opacity: 0;
  animation: activeSessionPulse 1.65s ease-out infinite;
}

.active-session-pill .material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-size: 18px;
  line-height: 1;
  position: relative;
  z-index: 1;
}

@keyframes activeSessionPulse {
  0% {
    opacity: 0.65;
    transform: scale(0.86);
  }

  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

.topbar-session-close {
  display: inline-flex;
  margin: 0;
}

.active-session-close-pill {
  border-color: color-mix(in srgb, #b94b3d 56%, var(--line));
  background: color-mix(in srgb, #b94b3d 10%, var(--surface));
  color: #b94b3d;
}

.active-session-close-pill:hover {
  border-color: color-mix(in srgb, #b94b3d 76%, var(--line));
  background: color-mix(in srgb, #b94b3d 88%, var(--text));
  color: #fff;
}

.topup-action-pill {
  border-color: color-mix(in srgb, var(--lingot-gold) 58%, var(--line));
  background: color-mix(in srgb, var(--lingot-gold) 11%, var(--surface));
  color: var(--lingot-gold-deep);
}

.topup-action-pill:hover {
  border-color: var(--lingot-gold);
  background: color-mix(in srgb, var(--lingot-gold) 17%, var(--surface));
}

.topup-action-pill.is-empty {
  animation: topupEmptyPulse 1.7s ease-in-out infinite;
}

.topup-action-pill.is-empty:hover {
  animation-play-state: paused;
}

.topup-action-pill img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.context-guard-topbar-action {
  position: relative;
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, #c62525 60%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, #c62525 9%, var(--surface));
  color: #c62525;
  text-decoration: none;
}

.context-guard-topbar-action:hover,
.context-guard-topbar-action:focus-visible {
  border-color: #d71920;
  background: color-mix(in srgb, #c62525 15%, var(--surface));
  color: #a81f24;
}

.context-guard-topbar-action .material-symbols-rounded {
  font-size: 20px;
  line-height: 1;
}

@keyframes topupEmptyPulse {
  0%,
  100% {
    border-color: color-mix(in srgb, var(--lingot-gold) 58%, var(--line));
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--lingot-gold) 0%, transparent);
  }

  50% {
    border-color: var(--lingot-gold);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--lingot-gold) 24%, transparent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .topup-action-pill.is-empty {
    animation: none;
    border-color: var(--lingot-gold);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lingot-gold) 18%, transparent);
  }

  .active-session-pill::after {
    animation: none;
  }
}

.target-language-pill {
  min-width: 34px;
  margin-left: -8px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--text);
  color: var(--brand-contrast);
  padding: 0 9px;
}

.target-language-pill:hover {
  background: color-mix(in srgb, var(--text) 88%, var(--surface));
  color: var(--brand-contrast);
}

.target-language-switcher {
  display: inline-flex;
  height: 34px;
  flex: 0 0 auto;
  margin-left: -8px;
}

.target-language-switcher select,
.target-language-switcher button {
  min-width: 42px;
  height: 34px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--text);
  color: var(--brand-contrast);
  font: inherit;
  font-size: 12px;
  font-weight: 680;
  letter-spacing: 0.01em;
}

.target-language-switcher select {
  cursor: pointer;
  padding: 0 6px 0 10px;
}

.target-language-switcher button {
  padding: 0 9px;
}

.target-language-switcher:hover select,
.target-language-switcher:hover button {
  background: color-mix(in srgb, var(--text) 88%, var(--surface));
}

.admin-shell .topbar {
  gap: 14px;
}

.admin-shell .topbar-identity {
  gap: 10px;
}

.admin-shell .topbar-actions {
  flex: 0 0 auto;
  gap: 8px;
  overflow: visible;
  padding-bottom: 0;
}

.admin-shell .header-action-pill,
.admin-shell .target-language-pill {
  height: 30px;
  margin-right: 0;
  border: 1px solid var(--line);
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.admin-shell .header-action-pill:first-child {
  border-left: 1px solid var(--line);
  border-radius: var(--radius) 0 0 var(--radius);
}

.admin-shell .target-language-pill {
  min-width: auto;
  border-right: 1px solid var(--line);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.admin-shell .topbar-theme-toggle {
  margin-left: 0;
}

.app-language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
  height: 34px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  padding: 0;
  overflow: hidden;
}

.app-language-switcher button {
  min-width: 34px;
  height: 32px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 5px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.01em;
  cursor: pointer;
}

.app-language-switcher button + button {
  border-left: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.app-language-switcher button:hover {
  color: var(--text);
}

.app-language-switcher button.is-active {
  background: var(--text);
  color: var(--brand-contrast);
  border-left-color: var(--text);
}

:root[data-theme="light"] .brand.wordmark img,
:root[data-theme="light"] .brand.iconmark img {
  filter: brightness(0) saturate(100%);
}

:root[data-theme="light"] .brand.iconmark img {
  filter: brightness(0) saturate(100%) opacity(0.82);
}

:root[data-theme="dark"] .brand.wordmark img,
:root[data-theme="dark"] .brand.iconmark img,
:root[data-theme="dark"] .topbar-organization-logo {
  filter: brightness(0) saturate(100%) invert(96%) sepia(7%) saturate(93%) hue-rotate(11deg) brightness(102%) contrast(92%);
}

:root[data-theme="dark"] .brand.iconmark img {
  filter: brightness(0) saturate(100%) invert(96%) sepia(7%) saturate(93%) hue-rotate(11deg) brightness(98%) contrast(82%) opacity(0.86);
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: var(--surface);
  overflow: hidden;
}

.language-switcher a {
  display: inline-flex;
  min-width: 34px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  padding: 0 8px;
  line-height: 1.2;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.language-switcher a + a {
  border-left: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
}

.language-switcher a.is-active {
  background: var(--brand);
  color: var(--brand-contrast);
  border-left-color: var(--brand);
}

.page {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: calc(var(--topbar-height) + var(--topbar-gap)) 0 calc(72px + var(--safe-bottom));
}

.site-shell .page {
  width: 100%;
}

.site-shell.public-home-shell .page,
.site-shell .page:has(.hero-bleed) {
  padding-top: 0;
}

.page:has(.lesson-room) {
  display: flex;
  height: 100dvh;
  min-height: 0;
  flex-direction: column;
  padding-top: calc(var(--topbar-height) + 10px);
  padding-bottom: var(--safe-bottom);
  overflow: hidden;
}

.app-shell:has(.lesson-room) {
  height: 100dvh;
  overflow: hidden;
}

.footer-logo {
  --footer-ink: var(--text, #171717);
  --footer-muted: var(--muted, #6a6a65);
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(160px, 0.7fr));
  gap: 28px;
  width: min(1120px, calc(100% - 32px));
  margin: 42px auto 0;
  padding: 28px 0 calc(34px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  color: var(--footer-muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
}

.footer-logo b {
  font-weight: 650;
}

.footer-company-block {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.footer-company-block p {
  margin: 0;
}

.footer-wordmark {
  width: fit-content;
  color: var(--footer-ink);
  font-size: 18px;
  font-weight: 760;
  line-height: 1;
  text-decoration: none;
}

.footer-links {
  display: grid;
  align-content: start;
  justify-content: start;
  gap: 7px;
  margin: 0;
  color: var(--footer-muted);
  font-size: 12px;
  font-weight: 650;
}

.footer-links h2 {
  margin: 0 0 4px;
  color: var(--footer-ink);
  font-size: 11px;
  font-weight: 780;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  width: fit-content;
  color: color-mix(in srgb, var(--footer-ink) 62%, var(--footer-muted));
  text-decoration: none;
}

.footer-external-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.footer-external-link .material-symbols-rounded {
  font-size: 13px;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--footer-ink);
}

.footer-legal-links {
  gap: 6px;
}

:root[data-theme="dark"] .footer-logo {
  color: color-mix(in srgb, var(--footer-muted) 86%, transparent);
}

@media (max-width: 760px) {
  .footer-logo {
    grid-template-columns: 1fr 1fr;
    gap: 24px 14px;
    font-size: 13px;
  }

  .footer-company-block {
    grid-column: 1 / -1;
  }

  .footer-links {
    width: 100%;
    gap: 7px;
  }

  .footer-links a {
    min-height: 42px;
    width: 100%;
    max-width: none;
    padding: 10px 0;
    border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
    font-size: 14px;
    line-height: 1.25;
  }

  .footer-links a:hover,
  .footer-links a:focus-visible {
    border-bottom-color: color-mix(in srgb, var(--footer-ink) 38%, var(--line));
  }

  .footer-external-link .material-symbols-rounded {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .footer-logo {
    grid-template-columns: 1fr;
    width: calc(100% - 28px);
    gap: 22px;
  }
}

.hero {
  min-height: 58vh;
  display: grid;
  align-content: center;
  gap: 18px;
  max-width: 780px;
}

.hero-split {
  max-width: 1040px;
  grid-template-columns: minmax(240px, 420px) minmax(0, 560px);
  align-items: center;
  align-content: center;
  column-gap: clamp(28px, 6vw, 72px);
}

.hero-media {
  width: 100%;
  margin: 0;
}

.hero-media img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  object-fit: cover;
}

.hero-copy {
  display: grid;
  max-width: 540px;
  gap: 14px;
}

.hero-intro {
  min-height: auto;
  max-width: 820px;
  padding: 18px 0 34px;
}

.site-shell .hero-intro,
.site-shell .pricing-grid,
.site-shell .home-languages,
.site-shell .topup-section {
  width: min(1120px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.hero-intro .lead {
  max-width: 620px;
}

.hero-bleed {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 0;
  padding-bottom: 15px;
  background: #000;
}

.hero-bleed img,
.hero-bleed video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: clamp(520px, 78vh, 860px);
  object-fit: cover;
  object-position: center center;
}

.hero-bleed video {
  width: auto;
  max-width: calc(100% - 10px);
  margin: 0 auto;
  object-fit: contain;
  border-radius: 0 0 28px 28px;
  background: #000;
}

.hero-bleed::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 0 15px;
  pointer-events: none;
  background:
    linear-gradient(0deg, rgb(0 0 0 / 0.62), transparent 48%),
    linear-gradient(90deg, rgb(0 0 0 / 0.28), transparent 22%, transparent 78%, rgb(0 0 0 / 0.28)),
    linear-gradient(180deg, rgb(0 0 0 / 0.14), transparent 34%, rgb(0 0 0 / 0.16));
}

.hero-bleed-copy {
  display: grid;
  position: absolute;
  z-index: 3;
  right: max(32px, calc((100vw - 1120px) / 2));
  bottom: clamp(34px, 8vh, 92px);
  left: max(32px, calc((100vw - 1120px) / 2));
  max-width: 720px;
  gap: 10px;
  color: #fff;
  text-shadow: 0 3px 24px rgb(0 0 0 / 0.62);
}

.hero-bleed-copy h1 {
  margin: 0;
  max-width: 720px;
  color: #fff;
  font-size: clamp(44px, 7.2vw, 94px);
  line-height: 0.98;
}

.hero-bleed-copy .lead {
  max-width: 100%;
  margin: 0;
  color: rgb(255 255 255 / 0.88);
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 700;
}

[id] {
  scroll-margin-top: calc(var(--topbar-height) + 22px);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-copy .eyebrow,
.chat-message .eyebrow,
.homework-panel .eyebrow {
  margin-left: 0;
}

.not-found-shell .page {
  min-height: calc(100svh - var(--topbar-height) - 80px);
  display: grid;
  place-items: center;
}

.not-found-page {
  width: min(760px, calc(100% - 32px));
  display: grid;
  justify-items: start;
  gap: 16px;
  padding: clamp(44px, 9vw, 86px) 0;
}

.not-found-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.not-found-mark img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.not-found-page h1 {
  max-width: 680px;
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.02;
}

.not-found-page .lead {
  max-width: 560px;
}

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

h1 {
  max-width: 820px;
  margin-bottom: 0;
  font-size: clamp(42px, 8vw, 86px);
  line-height: 0.96;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 22px;
  letter-spacing: 0;
}

.lead {
  max-width: 500px;
  color: var(--muted);
  font-size: 19px;
}

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

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: var(--brand-contrast);
}

.button-label-stack {
  display: grid;
  gap: 1px;
  line-height: 1.1;
  text-align: left;
}

.button-label-stack small {
  font-size: 0.72rem;
  font-weight: 450;
  opacity: 0.72;
}

.app-dialog {
  width: min(680px, calc(100% - 28px));
  max-width: calc(100% - 28px);
  max-height: calc(100dvh - 40px);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text);
  padding: 0;
  overflow: hidden;
}

.app-dialog::backdrop {
  background: rgb(0 0 0 / 0.26);
  backdrop-filter: blur(8px);
}

.app-dialog-panel {
  display: grid;
  position: relative;
  gap: 14px;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 28px 80px rgb(0 0 0 / 0.24);
  padding: 24px;
  max-height: calc(100dvh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
}

.dialog-close {
  display: inline-flex;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
}

.dialog-close:hover {
  color: var(--text);
  border-color: var(--muted);
}

.dialog-close .material-symbols-rounded {
  font-size: 20px;
}

.global-loading {
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgb(0 0 0 / 0);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease, background-color 140ms ease;
}

.global-loading::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: color-mix(in srgb, var(--brand) 70%, var(--accent));
  transform: translateX(-100%);
}

.global-loading span {
  display: inline-block;
}

.global-loading-panel {
  display: flex;
  position: absolute;
  top: 50%;
  left: 50%;
  align-items: center;
  gap: 9px;
  max-width: min(420px, calc(100vw - 40px));
  border: 1px solid color-mix(in srgb, var(--text) 9%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  box-shadow:
    0 18px 54px rgb(0 0 0 / 0.12),
    0 1px 0 rgb(255 255 255 / 0.24) inset;
  backdrop-filter: blur(18px) saturate(1.08);
  padding: 10px 14px;
  transform: translate(-50%, -50%);
}

.global-loading-mark {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  color: color-mix(in srgb, var(--text) 66%, var(--muted));
  font-size: 19px;
}

.global-loading-copy {
  min-width: 0;
  color: color-mix(in srgb, var(--text) 72%, var(--muted));
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.global-loading-dots {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  align-items: center;
}

.global-loading-dots i {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 46%, var(--muted));
  opacity: 0.26;
}

.global-loading.is-active {
  background: color-mix(in srgb, var(--bg) 56%, transparent);
  opacity: 1;
}

.global-loading.is-active::before {
  animation: globalLoadingBar 1s ease-in-out infinite;
}

.global-loading.is-active .global-loading-panel {
  animation: globalLoadingPulse 1.8s ease-in-out infinite;
}

.global-loading.is-active .global-loading-dots i {
  animation: globalLoadingDot 1.45s ease-in-out infinite;
}

.global-loading.is-active .global-loading-dots i:nth-child(2) {
  animation-delay: 140ms;
}

.global-loading.is-active .global-loading-dots i:nth-child(3) {
  animation-delay: 280ms;
}

.is-loading-page {
  cursor: wait;
}

@keyframes globalLoadingBar {
  0% { transform: translateX(-100%); }
  55% { transform: translateX(-12%); }
  100% { transform: translateX(100%); }
}

@keyframes globalLoadingPulse {
  0%, 100% {
    box-shadow:
      0 18px 54px rgb(0 0 0 / 0.12),
      0 1px 0 rgb(255 255 255 / 0.24) inset,
      0 0 0 0 color-mix(in srgb, var(--brand) 0%, transparent);
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    box-shadow:
      0 20px 58px rgb(0 0 0 / 0.13),
      0 1px 0 rgb(255 255 255 / 0.28) inset,
      0 0 0 8px color-mix(in srgb, var(--brand) 6%, transparent);
    transform: translate(-50%, -50%) scale(1.012);
  }
}

@keyframes globalLoadingDot {
  0%, 100% {
    opacity: 0.32;
    transform: translateY(0);
  }
  45% {
    opacity: 0.72;
    transform: translateY(-2px);
  }
}

.system-dialog {
  width: min(420px, calc(100% - 28px));
}

.nav-dialog {
  width: min(420px, calc(100% - 28px));
}

.topup-dialog {
  width: min(640px, calc(100% - 28px));
}

.nav-dialog-panel {
  gap: 18px;
}

.nav-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-dialog-header .dialog-close {
  position: static;
  flex: 0 0 auto;
}

.topup-dialog-panel .nav-dialog-header {
  align-items: center;
}

.topup-dialog-mark {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

.topup-dialog-mark img {
  display: block;
  width: auto;
  max-width: min(280px, calc(100vw - 130px));
  height: 38px;
  object-fit: contain;
}

:root[data-theme="dark"] .topup-dialog-mark img {
  filter: grayscale(1) brightness(0) invert(1);
  opacity: 0.9;
}

.topup-dialog-strip {
  width: 100%;
  margin-left: 0;
}

.topup-dialog-strip .lingot-bars {
  height: 18px;
  border-radius: 999px;
}

.topup-dialog-grid {
  display: grid;
  gap: 10px;
}

.topup-dialog-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.topup-click-card {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.topup-click-card:hover,
.topup-click-card:focus-within {
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
  box-shadow: var(--shadow);
}

.topup-click-card:active {
  transform: translateY(1px);
}

.topup-dialog-history-link {
  justify-self: start;
}

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

.dialog-nav a {
  display: flex;
  min-width: 0;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 0 14px;
  color: var(--text);
  font-weight: 500;
}

.dialog-nav-label {
  display: inline-flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 10px;
  font-weight: inherit;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.dialog-nav-label .material-symbols-rounded {
  width: 22px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 19px;
  line-height: 1;
}

.dialog-nav a:hover,
.dialog-nav a.is-active {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
}

.dialog-nav a:hover .material-symbols-rounded,
.dialog-nav a.is-active .material-symbols-rounded {
  color: var(--text);
}

.system-dialog-panel {
  gap: 18px;
}

.system-dialog-panel h2 {
  margin-right: 0;
  margin-bottom: 0;
}

.system-dialog-message {
  margin: 0;
  color: var(--muted);
}

.dialog-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.35;
}

.dialog-checkbox input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--brand);
}

.system-dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

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

.homework-submit-actions .button {
  min-height: 52px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  text-align: left;
}

.homework-submit-actions .button small {
  display: block;
  color: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  opacity: 0.72;
}

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

.compact-metrics {
  margin-top: 12px;
}

.plan,
.panel,
.metrics article,
.narrow {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.plan {
  display: grid;
  align-content: start;
  gap: 12px;
}

.setup-form {
  display: grid;
  max-width: 680px;
  gap: 18px;
}

.onboarding-brief {
  display: grid;
  gap: 12px;
}

.onboarding-brief p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.onboarding-terms {
  align-items: flex-start;
  padding-top: 4px;
}

.onboarding-brand {
  display: inline-flex;
  position: fixed;
  z-index: 20;
  top: 24px;
  left: clamp(20px, 7vw, 64px);
  align-items: center;
  gap: 11px;
  color: var(--text);
  font-size: 24px;
  font-weight: 850;
}

.onboarding-brand img {
  width: 34px;
  height: 34px;
}

.onboarding-shell .page {
  min-height: calc(100svh - 96px);
  padding-top: clamp(92px, 13vh, 132px);
}

.onboarding-shell .setup-page,
.onboarding-shell .account-page {
  max-width: 920px;
  margin: 0 auto;
}

.onboarding-shell .setup-form,
.onboarding-shell .account-card-wide {
  max-width: 680px;
}

.onboarding-step .account-header {
  margin-bottom: 12px;
}

.onboarding-step .account-header h1 {
  letter-spacing: 0;
}

.onboarding-card {
  gap: 20px;
  border-radius: 16px;
  padding: clamp(22px, 5vw, 32px);
}

.onboarding-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-weight: 650;
}

.onboarding-progress {
  display: flex;
  gap: 7px;
  margin-bottom: 4px;
}

.onboarding-progress span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 28%, transparent);
}

.onboarding-progress .is-complete,
.onboarding-progress .is-active {
  background: var(--text);
}

.onboarding-progress .is-active {
  width: 24px;
}

.onboarding-brief {
  gap: 10px;
}

.onboarding-brief-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 36px;
}

.onboarding-brief-item .material-symbols-rounded {
  color: var(--muted);
  font-size: 22px;
}

.onboarding-actions {
  display: flex;
  justify-content: flex-end;
}

.onboarding-icon-button,
.floating-save-actions .onboarding-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  min-width: 54px;
  height: 54px;
  min-height: 54px;
  border-radius: 999px;
  padding: 0;
  box-shadow: 0 16px 38px rgb(0 0 0 / 0.18);
  text-decoration: none;
}

.onboarding-icon-button .material-symbols-rounded {
  font-size: 28px;
}

.onboarding-profile-form.floating-save-form {
  padding-bottom: calc(88px + var(--safe-bottom));
}

.onboarding-profile-form .floating-save-actions {
  justify-self: end;
}

.plan h2,
.plan p {
  margin-bottom: 0;
}

.plan .button {
  width: fit-content;
  margin-top: 4px;
}

.featured-plan {
  border-color: color-mix(in srgb, var(--accent) 48%, var(--line));
  box-shadow:
    0 14px 32px color-mix(in srgb, var(--accent) 12%, transparent),
    var(--shadow);
}

.plan strong {
  font-size: 26px;
}

.plan-lts {
  margin-top: -6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.home-languages {
  display: grid;
  gap: 18px;
  margin-bottom: 46px;
}

.home-languages-head {
  max-width: 680px;
  padding-inline: var(--section-header-inset);
}

.home-languages-head h2,
.home-languages-head p {
  margin-bottom: 0;
}

.home-languages-head p {
  color: var(--muted);
  font-size: 17px;
}

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

.language-card {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  padding: 16px;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.language-card:hover,
.language-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  box-shadow: var(--shadow-strong);
  transform: translateY(-2px);
}

.language-code {
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0.04em;
}

.language-card strong {
  overflow-wrap: anywhere;
  padding-right: 54px;
  font-size: 17px;
  line-height: 1.2;
}

.language-native {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 14px;
}

.language-card small {
  position: absolute;
  top: 12px;
  right: 12px;
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.home-organizations {
  padding-top: 24px;
  margin-bottom: 46px;
}

.organization-logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  align-items: center;
  justify-items: center;
  gap: 16px 24px;
  padding-inline: var(--section-header-inset);
}

.organization-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  color: inherit;
  text-decoration: none;
}

.organization-logo img {
  display: block;
  max-width: 180px;
  max-height: 44px;
  object-fit: contain;
}

:root[data-theme="dark"] .organization-logo img {
  filter: brightness(0) invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .organization-logo img {
    filter: brightness(0) invert(1);
  }
}

.topup-section {
  display: grid;
  gap: 12px;
  margin-bottom: 46px;
}

.topup-intro {
  max-width: 680px;
  padding-inline: var(--section-header-inset);
}

.topup-intro h2,
.topup-intro p {
  margin-bottom: 0;
}

.topup-intro h2,
.home-testimonials-head h2 {
  max-width: 640px;
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.08;
}

.topup-intro h2 {
  color: var(--lingot-gold);
}

.topup-intro p {
  color: var(--muted);
  font-size: 17px;
}

.topup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}

.topup-aiko-video {
  width: 100%;
  margin: 14px 0 0;
}

.topup-aiko-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #000;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.topup-jpy-note {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.topup-legal-accept {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 820px;
  margin: -3px 0 3px var(--section-header-inset);
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.topup-legal-accept input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.topup-legal-accept a {
  color: color-mix(in srgb, var(--text) 74%, var(--muted));
  text-decoration: underline;
  text-underline-offset: 2px;
}

.topup-legal-accept a:hover,
.topup-legal-accept a:focus-visible {
  color: var(--text);
}

.topup-legal-accept.is-attention {
  border-color: color-mix(in srgb, var(--lingot-gold) 72%, var(--line));
  background: color-mix(in srgb, var(--lingot-gold) 14%, transparent);
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
}

.topup-legal-accept.is-attention input {
  outline: 2px solid color-mix(in srgb, var(--lingot-gold) 70%, transparent);
  outline-offset: 2px;
}

.topup-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  container-type: inline-size;
  min-width: 0;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px 20px;
}

.topup-price-main {
  display: inline-grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  justify-content: start;
  column-gap: 7px;
  max-width: 100%;
  min-width: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.topup-price-block {
  min-width: 0;
}

.topup-usage-note {
  display: grid;
  gap: 2px;
  margin: 8px 0 0;
  max-width: 30ch;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.3;
}

.topup-price-figure {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.topup-price-figure strong {
  font-size: clamp(27px, 2.7vw, 32px);
  line-height: 0.95;
  font-weight: 740;
  letter-spacing: 0;
}

.topup-price-symbol {
  color: var(--muted);
  font-size: clamp(27px, 2.7vw, 32px);
  line-height: 0.95;
  font-weight: 740;
  transform: none;
}

.topup-price-meta {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  color: var(--muted);
  line-height: 1;
  transform: translateY(1px);
}

.topup-price-meta span {
  color: color-mix(in srgb, var(--ink) 70%, var(--muted));
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.topup-price-meta small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}

.topup-action-form {
  margin: 0;
}

.topup-card .button {
  width: fit-content;
  min-height: 38px;
  padding-inline: 14px;
}

.gift-section {
  display: grid;
  width: min(1120px, calc(100% - 32px));
  gap: 18px;
  margin: 0 auto 54px;
}

.gift-copy {
  display: grid;
  gap: 6px;
  max-width: 680px;
  padding-inline: var(--section-header-inset);
}

.gift-copy h2,
.gift-copy p {
  margin: 0;
}

.gift-copy p {
  color: var(--muted);
}

.gift-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 12px;
}

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

.gift-email-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  margin: 0;
}

.gift-email-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.gift-email-field input {
  width: 100%;
}

@container (max-width: 285px) {
  .topup-price-main {
    grid-template-columns: max-content;
    align-content: center;
    row-gap: 4px;
  }

  .topup-price-meta {
    grid-template-columns: max-content max-content;
    grid-template-rows: auto;
    align-items: center;
    gap: 6px;
    margin-left: 2px;
    transform: none;
  }
}

.home-testimonials,
.learn-hero,
.learn-nav,
.learn-section,
.learn-cta {
  width: min(1120px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.home-testimonials {
  display: grid;
  gap: 18px;
  margin-bottom: 46px;
}

.hero-bleed + .home-testimonials {
  margin-top: 34px;
}

.home-testimonials-head {
  padding-inline: var(--section-header-inset);
}

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

.home-testimonial {
  position: relative;
  display: grid;
  gap: 18px;
  min-width: 0;
  margin: 0;
  border: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 84%, transparent);
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.05);
  padding: 22px 22px 18px;
}

.home-testimonial::before {
  content: "\201C";
  position: absolute;
  top: 8px;
  right: 18px;
  color: color-mix(in srgb, var(--accent) 28%, transparent);
  font-size: 44px;
  font-weight: 850;
  line-height: 1;
  pointer-events: none;
}

.home-testimonial blockquote {
  margin: 0;
  max-width: 30ch;
  padding-right: 15px;
  color: var(--text);
  font-size: 17px;
  font-weight: 550;
  line-height: 1.45;
}

.home-testimonial figcaption {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.35;
}

.home-testimonial figcaption::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 44%, var(--line));
  flex: 0 0 auto;
}

.public-partner-shell .page {
  display: grid;
  gap: 32px;
}

.partner-hero,
.partner-grid-section,
.partner-profile {
  width: min(1120px, calc(100% - 32px));
  margin-right: auto;
  margin-left: auto;
}

.partner-hero {
  display: grid;
  gap: 12px;
  margin-top: 25px;
  padding-left: 10px;
  padding-top: 0;
}

.partner-hero h1,
.partner-profile h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.partner-hero .lead,
.partner-profile .lead {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.partner-grid-section {
  margin-bottom: 54px;
}

.partner-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 12px;
}

.partner-card {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.05);
  padding: 22px;
}

.partner-avatar {
  display: inline-grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 9%, var(--surface));
  color: var(--ink);
  font-size: 24px;
  font-weight: 820;
  text-transform: uppercase;
  overflow: hidden;
}

.partner-avatar.large {
  width: 92px;
  height: 92px;
  font-size: 40px;
}

.partner-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.partner-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.partner-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.partner-location {
  width: fit-content;
  margin: 0;
  border-left: 3px solid color-mix(in srgb, var(--accent) 76%, var(--ink));
  padding-left: 10px;
  color: color-mix(in srgb, var(--accent) 72%, var(--ink));
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
}

.partner-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.partner-card-actions .button,
.partner-profile .button {
  min-height: 38px;
  padding-inline: 14px;
}

.partner-card-media {
  display: grid;
  width: 100%;
  min-height: 72px;
  place-items: center;
}

.partner-card-media img {
  max-width: 210px;
  max-height: 58px;
  object-fit: contain;
}

.partner-card-media span {
  display: inline-grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--ink);
  font-size: 26px;
  font-weight: 820;
}

.partner-badge {
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.partner-empty {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.partner-profile {
  display: grid;
  gap: 24px;
  padding-top: 15px;
  margin-bottom: 54px;
}

.partner-profile-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.05);
  padding: 26px;
}

.partner-profile-main > div:last-child {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.partner-back {
  width: fit-content;
  color: var(--muted);
  font-weight: 760;
  text-decoration: none;
}

.partner-back:hover {
  color: var(--ink);
}

.organization-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 14px;
}

.organization-showcase-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 280px;
  min-width: 0;
  gap: 20px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 96%, var(--accent) 4%), var(--surface));
  box-shadow: 0 16px 38px rgb(0 0 0 / 0.055);
  padding: 24px;
}

.organization-showcase-logo {
  display: grid;
  min-height: 92px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 86%, white 14%);
  padding: 18px;
}

.organization-showcase-logo img {
  display: block;
  max-width: min(100%, 230px);
  max-height: 62px;
  object-fit: contain;
}

.organization-showcase-logo span {
  display: inline-grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
  color: var(--ink);
  font-size: 28px;
  font-weight: 820;
}

.organization-showcase-copy {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 10px;
}

.organization-showcase-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.organization-showcase-meta span {
  width: fit-content;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 999px;
  padding: 3px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 790;
  line-height: 1.2;
}

.organization-showcase-meta .is-location {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: color-mix(in srgb, var(--accent) 72%, var(--ink));
}

.organization-showcase-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: 24px;
  line-height: 1.12;
}

.organization-showcase-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.organization-showcase-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.organization-showcase-card .organization-showcase-actions {
  align-items: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
}

.organization-showcase-actions .button {
  min-height: 38px;
  padding-inline: 14px;
}

.organization-showcase-card .organization-showcase-actions .button {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.organization-profile {
  display: grid;
  width: min(1120px, calc(100% - 32px));
  gap: 14px;
  margin: 0 auto 54px;
  padding-top: 15px;
}

.organization-profile.has-topup-section {
  margin-bottom: 24px;
}

.organization-profile-cover {
  min-height: 190px;
  border-radius: 8px;
  background-position: center;
  background-size: cover;
}

.organization-profile-main {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
  border: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 16px 38px rgb(0 0 0 / 0.055);
  padding: 26px;
}

.organization-profile-logo {
  display: grid;
  min-height: 130px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--line) 62%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 86%, white 14%);
  padding: 18px;
}

.organization-profile-logo img {
  display: block;
  max-width: min(100%, 190px);
  max-height: 88px;
  object-fit: contain;
}

.organization-profile-logo span {
  color: var(--ink);
  font-size: 42px;
  font-weight: 820;
}

.organization-profile-copy {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.organization-profile-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.organization-profile-copy .lead {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  white-space: pre-line;
}

:root[data-theme="dark"] .organization-showcase-logo {
  background: color-mix(in srgb, var(--surface) 86%, black 14%);
}

:root[data-theme="dark"] .organization-showcase-logo img {
  filter: brightness(0) invert(1);
}

:root[data-theme="dark"] .organization-profile-logo {
  background: color-mix(in srgb, var(--surface) 86%, black 14%);
}

:root[data-theme="dark"] .organization-profile-logo img {
  filter: brightness(0) invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .organization-showcase-logo {
    background: color-mix(in srgb, var(--surface) 86%, black 14%);
  }

  :root:not([data-theme="light"]) .organization-showcase-logo img {
    filter: brightness(0) invert(1);
  }

  :root:not([data-theme="light"]) .organization-profile-logo {
    background: color-mix(in srgb, var(--surface) 86%, black 14%);
  }

  :root:not([data-theme="light"]) .organization-profile-logo img {
    filter: brightness(0) invert(1);
  }
}

.learn-hero {
  display: grid;
  min-height: 48vh;
  align-content: end;
  gap: 18px;
  padding: 54px var(--section-header-inset) 34px;
}

.learn-hero h1 {
  max-width: 920px;
  font-size: clamp(42px, 7vw, 82px);
}

.learn-hero .lead {
  max-width: 760px;
}

.learn-nav {
  display: flex;
  position: sticky;
  z-index: 12;
  top: calc(var(--topbar-height) + 8px);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow);
  padding: 0;
  overflow-x: auto;
}

.learn-nav a {
  display: inline-flex;
  min-height: 38px;
  flex: 0 0 auto;
  align-items: center;
  border-right: 1px solid var(--line);
  padding: 0 15px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.learn-nav a:last-child {
  border-right: 0;
}

.learn-nav a:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.learn-section {
  display: grid;
  gap: 18px;
  padding: 70px 0 0;
  scroll-margin-top: calc(var(--topbar-height) + 64px);
}

.learn-section-copy {
  max-width: 760px;
  padding-inline: var(--section-header-inset);
}

.learn-section-copy h2,
.learn-cta h2 {
  max-width: 760px;
  margin: 0 0 12px;
  font-size: clamp(30px, 5vw, 56px);
  line-height: 1.02;
}

.learn-section-copy p:not(.eyebrow),
.learn-cta p {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.learn-card-grid,
.learn-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.learn-card,
.learn-steps article,
.learn-faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 20px;
}

.learn-card h3,
.learn-steps h3 {
  margin: 0 0 8px;
  font-size: 20px;
}

.learn-card p,
.learn-steps p {
  margin: 0;
  color: var(--muted);
}

.learn-steps article {
  display: grid;
  align-content: start;
  gap: 8px;
}

.learn-steps span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.learn-faq-list {
  display: grid;
  gap: 10px;
}

.learn-faq-list details {
  padding: 0;
  overflow: hidden;
}

.learn-faq-list summary {
  cursor: pointer;
  padding: 18px 20px;
  font-weight: 800;
}

.learn-faq-list details p {
  margin: 0;
  border-top: 1px solid var(--line);
  padding: 16px 24px 22px;
  color: var(--muted);
}

.learn-cta {
  display: grid;
  gap: 14px;
  margin-top: 72px;
  margin-bottom: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 46px);
}

.learn-cta .button {
  width: fit-content;
}

.muted,
.metrics span {
  color: var(--muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.dashboard {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 25px;
  margin-bottom: 26px;
  padding-inline: 10px var(--section-header-inset);
}

.dashboard h1 {
  margin-left: 0;
  font-size: 48px;
}

.page-titlebar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-top: 25px;
  margin-bottom: 26px;
  padding-inline: 10px var(--section-header-inset);
}

.page-titlebar h1 {
  margin: 0;
  font-size: 48px;
  line-height: 0.98;
}

.page-titlebar p {
  margin: 8px 0 0;
}

.page-titlebar .eyebrow {
  margin: 0 0 8px;
}

.page-titlebar-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.icon-action {
  display: inline-flex;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text);
  padding: 0;
  text-decoration: none;
  cursor: pointer;
}

.icon-action:hover {
  border-color: color-mix(in srgb, var(--muted) 54%, var(--line));
  background: color-mix(in srgb, var(--surface-2) 86%, var(--surface));
  color: var(--text);
}

.icon-action .material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-size: 21px;
  font-weight: normal;
  line-height: 1;
}

.homework-generate-form {
  margin: 0;
}

.metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.metrics article {
  display: grid;
  gap: 8px;
}

.metrics strong {
  font-size: 22px;
}

.metric-estimate {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.metric-estimate-clamped {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.instructions-home-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  box-shadow: var(--shadow);
  padding: 18px 20px;
}

.instructions-home-prompt h2 {
  margin: 0 0 5px;
  font-size: 18px;
}

.instructions-home-prompt p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.daily-cap-meter {
  display: grid;
  gap: 6px;
  margin-top: 5px;
  padding-top: 9px;
  border-top: 1px solid color-mix(in srgb, var(--line) 74%, transparent);
}

.daily-cap-meter-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.daily-cap-meter-label strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.daily-cap-meter-track {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 56%, transparent);
}

.daily-cap-meter-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: color-mix(in srgb, var(--lingot-gold) 82%, var(--accent));
}

.metric-link {
  width: fit-content;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.metric-link:hover {
  color: var(--text);
}

.dashboard-learning-panel {
  display: grid;
  gap: 18px;
}

.quick-lesson-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.quick-lesson-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-lesson-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
}

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

.session-desire-form {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 24px;
}

.session-desire-form.is-paused {
  box-shadow: none;
}

.session-desire-form.is-paused .session-choice-card span {
  opacity: 0.45;
}

.open-session-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  border: 1px solid color-mix(in srgb, #1f7a6d 34%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, #1f7a6d 8%, var(--surface));
  box-shadow: var(--shadow);
  padding: 18px 24px;
}

.open-session-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, #1f7a6d 15%, var(--surface));
  color: #1f7a6d;
}

.open-session-icon .material-symbols-rounded {
  font-size: 25px;
  line-height: 1;
}

.open-session-copy {
  min-width: 0;
}

.open-session-copy h2,
.open-session-copy p {
  margin: 0;
}

.open-session-copy h2 {
  font-size: 18px;
  line-height: 1.15;
}

.open-session-copy p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.open-session-copy .open-session-kicker {
  margin-bottom: 3px;
  color: color-mix(in srgb, #1f7a6d 78%, var(--text));
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.open-session-actions {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.open-session-actions form {
  margin: 0;
}

.session-target-label {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
}

.session-choice-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.session-choice-group legend {
  color: var(--text);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.15;
  margin-bottom: 4px;
}

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

.session-choice-grid-activity {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.session-choice-card {
  display: block;
  min-width: 0;
  cursor: pointer;
}

.session-choice-link {
  display: block;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.session-choice-card input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.session-choice-card span,
.session-choice-link > span {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  padding: 11px 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}

.session-premium-tag {
  position: relative;
  top: -0.45em;
  color: #c82f2f;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.session-homework-link > span {
  gap: 8px;
  border-color: color-mix(in srgb, var(--line) 90%, var(--text) 10%);
  background: color-mix(in srgb, var(--surface-2) 94%, var(--surface));
}

.session-homework-link.is-homework-open > span {
  border-color: color-mix(in srgb, var(--lingot-gold) 46%, var(--line));
  background: color-mix(in srgb, var(--lingot-gold) 12%, var(--surface-2));
  color: color-mix(in srgb, var(--lingot-gold-deep) 72%, var(--text));
}

.session-homework-link.is-homework-ready > span {
  border-color: color-mix(in srgb, #4e7da8 48%, var(--line));
  background: color-mix(in srgb, #4e7da8 12%, var(--surface-2));
  color: color-mix(in srgb, #315f83 72%, var(--text));
}

.session-homework-link.is-homework-waiting > span {
  border-color: color-mix(in srgb, var(--muted) 22%, var(--line));
  background: color-mix(in srgb, var(--surface-2) 78%, var(--surface));
  color: var(--muted);
}

.session-homework-label {
  min-width: 0;
}

.session-homework-count {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 9%, var(--surface));
  color: inherit;
  padding: 0 7px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
}

.session-choice-grid-time .session-choice-card span {
  border-color: color-mix(in srgb, var(--line) 82%, #ffffff 18%);
  background: color-mix(in srgb, var(--surface) 90%, #ffffff 10%);
  color: color-mix(in srgb, var(--muted) 78%, var(--text) 22%);
}

.session-choice-card:hover span,
.session-choice-link:hover > span {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line));
  color: var(--text);
}

.session-homework-link.is-homework-open:hover > span {
  border-color: color-mix(in srgb, var(--lingot-gold) 62%, var(--line));
  background: color-mix(in srgb, var(--lingot-gold) 16%, var(--surface));
}

.session-homework-link.is-homework-ready:hover > span {
  border-color: color-mix(in srgb, #4e7da8 66%, var(--line));
  background: color-mix(in srgb, #4e7da8 16%, var(--surface));
}

.session-choice-card input:focus-visible + span {
  outline: 2px solid color-mix(in srgb, var(--text) 35%, transparent);
  outline-offset: 2px;
}

.session-choice-card input:checked + span {
  border-color: color-mix(in srgb, var(--text) 88%, var(--line));
  background: color-mix(in srgb, var(--text) 92%, var(--surface));
  color: var(--brand-contrast);
}

.dashboard-recent-units {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.dashboard-recent-unit {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: inherit;
  padding: 12px 14px;
  text-decoration: none;
}

.dashboard-recent-unit:hover,
.dashboard-recent-unit:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.dashboard-recent-unit > span:first-child {
  font-weight: 900;
}

.dashboard-recent-unit strong {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-recent-unit small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.dashboard-recent-unit .material-symbols-rounded {
  grid-column: 3;
  grid-row: 1 / span 2;
  font-size: 22px;
}

.session-activity-hero {
  align-items: end;
}

.session-intent-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface-2));
  padding: 8px 12px;
  font-weight: 850;
}

.session-intent-pill span {
  color: var(--muted);
}

.session-context-panel,
.session-action-panel {
  display: grid;
  gap: 12px;
}

.session-context-panel > div {
  display: grid;
  gap: 3px;
}

.session-context-panel span,
.session-context-panel small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.session-context-panel strong {
  font-size: 22px;
}

.quick-lesson-button {
  display: grid;
  width: 100%;
  min-height: 88px;
  gap: 4px;
  align-content: center;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.quick-lesson-button strong {
  font-size: 24px;
  line-height: 1;
}

.quick-lesson-button span {
  color: var(--muted);
  font-size: 13px;
}

.quick-lesson-button:hover {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.curriculum-home-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.curriculum-home-head {
  padding: 0 var(--section-header-inset, 14px);
}

.curriculum-home-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  line-height: 1.15;
}

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

.curriculum-home-link,
.curriculum-gate {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.curriculum-home-link {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.curriculum-home-link span,
.curriculum-gate span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.curriculum-home-link strong {
  font-size: 18px;
}

.curriculum-home-link:hover,
.curriculum-gate:hover,
.curriculum-gate.is-active {
  border-color: color-mix(in srgb, var(--accent) 46%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.curriculum-hero .eyebrow,
.curriculum-panel .eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.curriculum-hero h1 {
  margin-bottom: 8px;
}

.study-unit-summary {
  margin-left: 2px;
}

.curriculum-gates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

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

.study-hero {
  margin-bottom: 26px;
}

.study-hero h1 {
  font-size: clamp(42px, 5vw, 56px);
}

.curriculum-gate {
  display: grid;
  min-height: 138px;
  gap: 8px;
  align-content: start;
  padding: 18px;
}

.curriculum-gate strong {
  font-size: 22px;
}

.curriculum-gate small,
.curriculum-gate em {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.curriculum-gate em {
  margin-top: auto;
  font-weight: 750;
}

.study-track-card {
  grid-template-columns: minmax(0, 1fr);
  min-height: 78px;
  align-content: center;
  align-items: center;
}

.study-track-card strong {
  font-size: 22px;
  line-height: 1.15;
}

.write-gate-form {
  margin: 0;
}

.write-gate-button {
  width: 100%;
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.session-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin: -4px 0 14px;
  padding-inline: var(--section-header-inset);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.session-trail span:not(:last-child)::after {
  content: ">";
  margin-left: 7px;
  color: color-mix(in srgb, var(--muted) 58%, transparent);
}

.list-filter-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  width: min(100%, 640px);
  min-height: 52px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 10px 12px;
}

.list-filter-control .material-symbols-rounded {
  color: var(--muted);
  font-size: 20px;
}

.list-filter-control input {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: max(16px, 1em);
  outline: 0;
}

[data-list-filter-item][hidden] {
  display: none !important;
}

.curriculum-panel {
  display: grid;
  gap: 16px;
}

.curriculum-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-inline: var(--section-header-inset);
}

.curriculum-panel-head h2 {
  margin: 0;
}

.curriculum-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.curriculum-row {
  display: grid;
  grid-template-columns: minmax(150px, 0.65fr) minmax(0, 1.6fr) minmax(190px, 0.8fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 14px;
}

.curriculum-code,
.curriculum-main,
.curriculum-row-actions {
  display: grid;
  gap: 5px;
}

.curriculum-code span {
  font-weight: 850;
}

.curriculum-code small,
.curriculum-main p {
  color: var(--muted);
  font-size: 12px;
}

.curriculum-main h3,
.curriculum-main p {
  margin: 0;
}

.curriculum-row-actions {
  justify-items: end;
}

.curriculum-row-actions form {
  margin: 0;
}

.page-titlebar-actions form {
  margin: 0;
}

.study-topic-panel {
  display: grid;
  gap: 10px;
}

.study-filter-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 4px;
}

.study-filter-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 7px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
}

.study-filter-tabs button.is-active {
  background: var(--text);
  color: var(--brand-contrast);
}

.study-topic-row {
  grid-template-columns: minmax(88px, 110px) minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 14px;
  color: inherit;
  text-decoration: none;
}

.study-topic-row:hover,
.study-topic-row:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.study-topic-row .curriculum-row-actions {
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: end;
  gap: 10px;
}

.status-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.status-icon .material-symbols-rounded {
  font-size: 21px;
  font-variation-settings: "FILL" 0;
}

.status-icon.is-cached {
  color: var(--text);
}

.status-icon.is-cached .material-symbols-rounded {
  font-variation-settings: "FILL" 1;
}

.compact-button {
  min-height: 38px;
  padding: 9px 12px;
  font-size: 13px;
}

.curriculum-study-panel {
  display: grid;
  gap: 18px;
  max-width: 900px;
  margin-inline: auto;
}

.curriculum-study-panel p {
  margin: 0;
}

.curriculum-study-head {
  display: block;
  padding-inline: var(--section-header-inset);
}

.curriculum-study-head span:first-child {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.curriculum-study-head h2,
.curriculum-study-block h3 {
  margin: 0;
}

.curriculum-study-block {
  display: grid;
  gap: 10px;
}

.curriculum-phrase-list,
.curriculum-drill-list {
  display: grid;
  gap: 8px;
}

.curriculum-phrase,
.curriculum-drill {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 14px;
}

.curriculum-phrase strong {
  font-size: 20px;
}

.curriculum-phrase small,
.curriculum-phrase span,
.curriculum-phrase em,
.curriculum-drill p {
  color: var(--muted);
  font-size: 13px;
  font-style: normal;
}

.curriculum-drill summary {
  cursor: pointer;
  font-weight: 800;
}

.curriculum-final-check {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
  color: var(--muted);
}

.curriculum-unit-actions {
  display: grid;
  gap: 14px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 16px;
}

.curriculum-unit-actions h3,
.curriculum-unit-actions p {
  margin: 0;
}

.curriculum-unit-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.curriculum-practice-form {
  margin: 0;
}

.dashboard-learning-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-inline: var(--section-header-inset);
}

.dashboard-learning-head h2,
.dashboard-report h3 {
  margin: 0;
}

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

.dashboard-learning-grid > div {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 14px;
}

.dashboard-learning-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-learning-grid strong {
  font-size: 18px;
}

.dashboard-report {
  display: grid;
  gap: 8px;
}

.usage-page {
  display: grid;
  gap: 18px;
  max-width: 100%;
  overflow-x: clip;
}

.usage-page > * {
  min-width: 0;
}

.usage-page .dashboard,
.usage-page .metrics {
  margin-bottom: 0;
}

.usage-page > .lingot-strip {
  margin-top: 25px;
}

.usage-note {
  max-width: min(980px, calc(100vw - 52px));
  margin: 12px 0 0 10px;
  color: var(--muted);
  font-size: 14px;
}

.lingot-strip {
  display: grid;
  min-width: 0;
  width: calc(100% - 20px);
  max-width: 100%;
  margin-left: 10px;
}

.billing-page {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.billing-page .dashboard,
.billing-page .metrics {
  margin-bottom: 0;
}

.billing-page .panel,
.billing-page .metrics article,
.billing-page form {
  min-width: 0;
}

.billing-page .usage-table th.is-numeric,
.billing-page .usage-table td.is-numeric {
  text-align: right;
}

.billing-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.billing-package {
  display: grid;
  min-width: 0;
  align-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 18px;
}

.billing-package.is-featured {
  border-color: color-mix(in srgb, var(--accent) 52%, var(--line));
}

.billing-package-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.billing-package h3 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1;
}

.billing-package p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.panel-heading-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  margin-bottom: 16px;
}

.panel-heading-row h2,
.panel-heading-row p {
  margin-bottom: 0;
}

.billing-currency-pill {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  padding: 0 10px;
  color: var(--muted);
  font-size: 12px;
}

.billing-topup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 10px;
  min-width: 0;
}

.billing-topup-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  container-type: inline-size;
  min-width: 0;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 18px 16px;
}

.admin-form {
  display: grid;
  gap: 18px;
}

.admin-compact-list {
  display: grid;
  gap: 8px;
}

.admin-compact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 14px;
  color: var(--text);
}

.admin-compact-row:hover {
  border-color: color-mix(in srgb, var(--accent) 44%, var(--line));
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.admin-compact-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.admin-compact-main strong,
.admin-compact-main small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-compact-main small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.admin-compact-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.admin-compact-badges span {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 5px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.admin-compact-row > .material-symbols-rounded {
  color: var(--muted);
  font-size: 20px;
}

.admin-compact-empty {
  color: var(--muted);
}

.admin-settings-group {
  display: grid;
  gap: 14px;
}

.admin-setting-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 280px);
  gap: 16px;
  align-items: center;
}

.admin-setting-row span {
  display: grid;
  gap: 4px;
}

.admin-setting-row small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.admin-setting-row.is-stripe-amount {
  border: 1px solid color-mix(in srgb, var(--lingot-gold) 58%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--lingot-gold) 10%, var(--surface));
  padding: 12px;
}

.admin-setting-row.is-stripe-amount strong::after {
  content: " must match Stripe";
  color: var(--lingot-gold);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-setting-warning {
  display: grid;
  gap: 4px;
  border: 1px solid color-mix(in srgb, var(--lingot-gold) 62%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--lingot-gold) 11%, var(--surface));
  padding: 12px 14px;
}

.admin-setting-warning strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.admin-setting-warning span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 680;
}

.admin-setting-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-setting-divider::before,
.admin-setting-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.admin-setting-divider span {
  display: block;
  white-space: nowrap;
}

.admin-business-input {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

.admin-business-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent);
}

.admin-pricing-contexts {
  gap: 18px;
}

.admin-settings-fieldset {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 16px;
  min-width: 0;
}

.admin-settings-fieldset legend {
  padding: 0 8px;
  font-size: 15px;
  font-weight: 800;
}

.admin-settings-fieldset p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.admin-fx-reference {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px;
}

.admin-fx-reference > div:first-child {
  display: grid;
  gap: 4px;
}

.admin-fx-reference small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.admin-fx-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-fx-values span {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  padding: 7px 9px;
  font-size: 13px;
  font-weight: 750;
}

.admin-fx-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-dictionary-tools {
  display: grid;
  gap: 12px;
}

.admin-dictionary-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(130px, 1fr)) auto auto;
  gap: 10px;
  align-items: end;
}

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

.admin-dictionary-card {
  display: grid;
  gap: 14px;
}

.admin-dictionary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.admin-dictionary-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.admin-dictionary-head p {
  margin: 4px 0 0;
}

.admin-dictionary-meta,
.admin-dictionary-translations {
  display: grid;
  gap: 10px;
}

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

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

.admin-dictionary-card textarea {
  min-height: 84px;
  resize: vertical;
}

.admin-meta-form {
  display: grid;
  gap: 16px;
}

.admin-meta-group {
  display: grid;
  gap: 18px;
}

.admin-meta-group h2 {
  margin: 0;
  font-size: 18px;
}

.admin-meta-field {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.admin-meta-field legend {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  padding: 0;
  color: var(--text);
  font-weight: 760;
}

.admin-meta-field legend code {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.admin-meta-translations {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-meta-translations textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-checkbox-field > label {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

@media (max-width: 780px) {
  .admin-fx-reference {
    grid-template-columns: 1fr;
  }

  .admin-fx-actions {
    justify-content: flex-start;
  }

  .admin-setting-divider span {
    white-space: normal;
  }

  .admin-dictionary-filter,
  .admin-dictionary-meta,
  .admin-dictionary-translations,
  .admin-meta-translations {
    grid-template-columns: 1fr;
  }
}

.admin-inline-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legacy-login-panel {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.legacy-login-panel summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.legacy-login-panel form {
  margin-top: 14px;
}

.admin-inline-list span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 8px 10px;
  font-weight: 700;
}

.admin-model-map {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.admin-model-map article {
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 14px;
}

.admin-model-map span,
.admin-model-map small {
  color: var(--muted);
}

.admin-model-map strong {
  font-size: 16px;
}

.admin-one-lts-table {
  min-width: 920px;
}

.admin-one-lts-table td:nth-child(4),
.admin-one-lts-table td:nth-child(5) {
  max-width: 320px;
}

.admin-sales-table {
  min-width: 1180px;
}

.admin-sales-table td:nth-child(2) {
  display: grid;
  gap: 3px;
  min-width: 180px;
}

.admin-affiliate-list {
  display: grid;
  gap: 10px;
}

.admin-affiliate-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.1fr) minmax(230px, 1.4fr) minmax(240px, 1.2fr) minmax(190px, 0.9fr);
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.admin-affiliate-row:first-child {
  border-top: 0;
}

.admin-affiliate-identity,
.admin-affiliate-link-cell,
.admin-affiliate-state {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.admin-affiliate-identity strong {
  font-size: 16px;
}

.admin-affiliate-identity span,
.admin-affiliate-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.admin-affiliate-identity code,
.admin-affiliate-state small:last-child {
  overflow-wrap: anywhere;
}

.admin-affiliate-link {
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

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

.admin-affiliate-stats span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.admin-affiliate-stats b {
  overflow-wrap: anywhere;
}

.admin-affiliate-stats small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-copy-pill {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 5px 11px;
  border: 1px solid color-mix(in srgb, var(--border) 82%, var(--accent) 18%);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 86%, var(--accent) 14%);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.admin-copy-pill .material-symbols-rounded {
  font-size: 16px;
}

.admin-copy-pill:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border) 55%);
  background: color-mix(in srgb, var(--surface) 74%, var(--accent) 26%);
  transform: translateY(-1px);
}

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

.partner-kit-shell .page {
  display: grid;
  width: min(1120px, calc(100% - 32px));
  gap: 22px;
}

.partner-kit-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 18px;
  align-items: stretch;
  padding: 36px 0 4px;
}

.partner-kit-heading {
  display: grid;
  align-content: end;
  gap: 8px;
  min-width: 0;
}

.partner-kit-heading h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

.partner-kit-heading p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.partner-kit-link-panel,
.partner-kit-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-2) 8%);
  box-shadow: 0 14px 34px rgba(17, 19, 16, 0.06);
  padding: 20px;
}

.partner-kit-card-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.partner-kit-link-box {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.partner-kit-link-box a {
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

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

.partner-kit-card h2,
.partner-kit-card p {
  margin: 0;
}

.partner-kit-card h2 {
  font-size: 22px;
}

.partner-kit-preview,
.partner-kit-copy-preview,
.partner-kit-message-preview {
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  line-height: 1.55;
}

.partner-kit-preview a {
  color: var(--text);
  font-weight: 800;
}

.partner-kit-code {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.partner-kit-code summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.partner-kit-code pre {
  max-width: 100%;
  margin: 10px 0 0;
  overflow: auto;
  white-space: pre-wrap;
}

.partner-kit-code code {
  overflow-wrap: anywhere;
  font-size: 12px;
}

.partner-kit-button-preview a {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 999px;
  background: #161816;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.partner-landing-shell .page {
  display: grid;
  width: min(1088px, calc(100% - 64px));
  gap: 18px;
  padding: 64px 0 64px;
}

.partner-landing-hero {
  display: grid;
  gap: 16px;
  padding: 42px 0 14px;
}

.partner-landing-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1;
  letter-spacing: 0;
}

.partner-landing-hero .lead {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.partner-landing-media {
  width: 100%;
  height: clamp(150px, 22vw, 230px);
  margin: 0 0 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-2);
  box-shadow: 0 18px 42px rgb(0 0 0 / 0.06);
}

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

.partner-landing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.partner-landing-cta .button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

.partner-landing-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.05);
  padding: 22px;
}

.partner-landing-icon {
  display: inline-grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent-strong);
  font-size: 25px;
}

.partner-landing-card h2,
.partner-landing-steps h2,
.partner-landing-card p,
.partner-landing-steps p {
  margin: 0;
}

.partner-landing-card h2,
.partner-landing-steps h2 {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.partner-landing-card p,
.partner-landing-steps p {
  color: var(--muted);
  line-height: 1.55;
}

.partner-landing-steps {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 26px;
}

.partner-landing-steps > div {
  display: grid;
  gap: 10px;
}

.partner-landing-steps ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
}

@media (max-width: 820px) {
  .partner-kit-hero,
  .partner-kit-grid,
  .partner-landing-grid,
  .partner-landing-steps {
    grid-template-columns: 1fr;
  }

  .partner-landing-hero {
    padding-top: 12px;
  }

  .partner-landing-shell .page {
    width: min(100% - 32px, 1088px);
  }
}

@media (max-width: 1180px) {
  .admin-affiliate-row {
    grid-template-columns: minmax(190px, 1fr) minmax(240px, 1.2fr);
  }
}

@media (max-width: 720px) {
  .admin-affiliate-row,
  .admin-affiliate-stats {
    grid-template-columns: 1fr;
  }
}

.admin-package {
  display: grid;
  gap: 18px;
}

.admin-organization-new,
.admin-organization-card {
  display: grid;
  gap: 18px;
}

.admin-organization-create-form,
.admin-organization-fieldsets {
  display: grid;
  gap: 16px;
}

.admin-inline-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.admin-student-create-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-student-create-form .button {
  min-height: 44px;
}

.admin-student-card {
  display: grid;
  gap: 18px;
}

.admin-student-meta {
  display: grid;
  gap: 8px;
  align-self: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.admin-language-fieldset {
  align-self: stretch;
}

.admin-checkbox-field > label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--muted);
  font-weight: 700;
}

.admin-commission-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 14px;
}

.admin-commission-summary h3 {
  width: 100%;
  margin: 0;
  font-size: 14px;
}

.admin-commission-summary span {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 7px 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-language-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 8px;
}

.admin-language-grid label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  grid-template-areas:
    "check name"
    "check meta";
  column-gap: 10px;
  row-gap: 3px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 10px 12px;
  min-width: 0;
}

.admin-language-grid input {
  grid-area: check;
  margin: 2px 0 0;
}

.admin-language-grid span {
  grid-area: name;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
  font-weight: 750;
}

.admin-language-grid small {
  grid-area: meta;
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  text-transform: uppercase;
}

.admin-delete-form {
  display: none;
}

.admin-package-head,
.admin-checks {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.admin-checks {
  justify-content: flex-end;
}

.admin-checks label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.admin-price-table input {
  min-height: 36px;
}

.admin-package-translations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.admin-translation-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 14px;
}

.admin-translation-card h3 {
  margin: 0;
  font-size: 14px;
}

.lingot-bars {
  position: relative;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  height: 26px;
  border-radius: 4px;
  background:
    repeating-linear-gradient(
      90deg,
      color-mix(in srgb, var(--muted) 28%, var(--surface-2)) 0 7px,
      transparent 7px 10px
    );
}

.lingot-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--lingot-gold) 0%, var(--lingot-gold-deep) 100%);
  box-shadow: none;
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 10px);
  mask-image: repeating-linear-gradient(90deg, #000 0 7px, transparent 7px 10px);
}

:root[data-theme="dark"] .lingot-bars {
  background:
    repeating-linear-gradient(
      90deg,
      color-mix(in srgb, var(--muted) 20%, var(--surface-2)) 0 7px,
      transparent 7px 10px
    );
}

.ledger-type {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.ledger-type.is-reward {
  color: color-mix(in srgb, #d49b1e 72%, var(--text));
  font-weight: 850;
}

.ling-reward-glyph {
  display: inline-block;
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.narrow {
  max-width: 520px;
  margin: 48px auto;
}

.narrow h1 {
  margin-left: 10px;
  margin-bottom: 22px;
  font-size: 42px;
}

.lesson-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.lesson-list {
  display: grid;
  gap: 8px;
}

.lesson-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px 14px;
}

.lesson-row:hover {
  border-color: var(--muted);
}

.lesson-row span:first-child {
  display: grid;
  gap: 2px;
  align-self: center;
}

.lesson-row small,
.lesson-row span:not(:first-child) {
  color: var(--muted);
  font-size: 13px;
}

.lesson-row span:nth-child(2) {
  display: flex;
  min-width: 0;
  align-items: center;
  align-self: center;
  justify-self: start;
  line-height: 1.4;
  text-align: left;
}

.lesson-row .status-pill,
.lesson-row .score-pill {
  justify-self: end;
}

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

.record-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto) auto;
  gap: 12px 18px;
  align-items: center;
  min-height: 64px;
  padding: 12px 4px;
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

.record-row:last-child {
  border-bottom: 0;
}

.record-row:hover,
.record-row:focus-visible {
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.record-row > span:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.record-row strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.record-row small,
.record-row > span:not(:first-child):not(.status-pill):not(.score-pill) {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.record-row .status-pill,
.record-row .score-pill {
  justify-self: end;
}

.stack {
  display: grid;
  gap: 16px;
}

.compact-login-action {
  margin-top: 10px;
}

.otp-input {
  width: 100%;
  max-width: none;
  font-size: 28px;
  font-weight: 780;
  letter-spacing: 8px;
  text-align: center;
}

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

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

.context-choice {
  display: grid;
  gap: 0;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0;
}

.context-choice legend {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 7px;
  padding: 0;
}

.context-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(116px, 100%), 1fr));
  gap: 8px;
  min-width: 0;
}

.context-choice-card {
  display: block;
  min-width: 0;
  color: inherit;
  font-size: 14px;
  cursor: pointer;
}

.context-choice-card input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.context-choice-card span {
  display: flex;
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--muted);
  padding: 9px 11px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.context-choice-card:hover span {
  border-color: color-mix(in srgb, var(--muted) 48%, var(--line));
  color: var(--text);
}

.context-choice-card input:focus-visible + span {
  outline: 2px solid color-mix(in srgb, var(--text) 35%, transparent);
  outline-offset: 2px;
}

.context-choice-card input:checked + span {
  border-color: var(--text);
  background: var(--text);
  color: var(--brand-contrast);
}

.advanced-options {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-2) 54%, transparent);
  padding: 0;
}

.advanced-options summary {
  color: var(--muted);
  padding: 11px 13px;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}

.advanced-options[open] {
  padding-bottom: 13px;
}

.advanced-options .form-grid-2 {
  padding: 0 13px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
}

.form-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  padding: 12px 13px;
  font: inherit;
  font-size: max(16px, 1em);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px;
}

select::-ms-expand {
  display: none;
}

.notice {
  display: grid;
  position: relative;
  grid-template-columns: auto minmax(0, 1fr);
  grid-auto-rows: min-content;
  align-items: start;
  gap: 10px;
  width: min(1120px, 100%);
  margin: 0 auto;
  border: 1px solid color-mix(in srgb, var(--notice-error) 42%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--notice-error-bg) 72%, var(--surface));
  color: color-mix(in srgb, var(--notice-error) 86%, var(--text));
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.045);
}

.site-shell .notice {
  width: min(1120px, calc(100% - 32px));
}

.app-shell .notice,
.admin-shell .notice {
  width: 100%;
}

.notice::before {
  content: "error";
  display: inline-grid;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  place-items: center;
  background: color-mix(in srgb, var(--notice-error) 13%, transparent);
  color: var(--notice-error);
  font-family: "Material Symbols Rounded";
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.notice > * {
  grid-column: 2;
}

.notice.good {
  border-color: color-mix(in srgb, var(--notice-success) 48%, var(--line));
  background: color-mix(in srgb, var(--notice-success-bg) 82%, var(--surface));
  color: color-mix(in srgb, var(--notice-success) 88%, var(--text));
  box-shadow: 0 14px 34px color-mix(in srgb, var(--notice-success) 12%, transparent);
}

.notice.good::before {
  content: "check_circle";
  background: color-mix(in srgb, var(--notice-success) 14%, transparent);
  color: var(--notice-success);
}

.notice.warning {
  border-color: color-mix(in srgb, var(--notice-warning) 48%, var(--line));
  background: color-mix(in srgb, var(--notice-warning-bg) 82%, var(--surface));
  color: color-mix(in srgb, var(--notice-warning) 88%, var(--text));
}

.notice.warning::before {
  content: "warning";
  background: color-mix(in srgb, var(--notice-warning) 14%, transparent);
  color: var(--notice-warning);
}

.notice.info {
  border-color: color-mix(in srgb, var(--notice-info) 48%, var(--line));
  background: color-mix(in srgb, var(--notice-info-bg) 82%, var(--surface));
  color: color-mix(in srgb, var(--notice-info) 88%, var(--text));
}

.notice.info::before {
  content: "info";
  background: color-mix(in srgb, var(--notice-info) 14%, transparent);
  color: var(--notice-info);
}

.notice p,
p.notice {
  margin-top: 0;
  margin-bottom: 0;
}

.context-guard {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.context-guard-copy {
  grid-column: 2;
  display: grid;
  gap: 4px;
}

.context-guard-copy p {
  margin: 0;
}

.context-guard-action {
  grid-column: 3;
  min-height: 42px;
  display: inline-grid;
  grid-auto-flow: column;
  place-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, #b58b21 58%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, #d9a928 20%, var(--surface));
  color: inherit;
  padding: 0 12px 0 14px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.context-guard-action:hover {
  transform: translateX(2px);
  background: color-mix(in srgb, #d9a928 28%, var(--surface));
  border-color: color-mix(in srgb, #b58b21 72%, var(--line));
}

.context-guard-action .material-symbols-rounded {
  font-size: 21px;
}

.account-page {
  display: grid;
  gap: 16px;
}

.account-header {
  margin-bottom: 0;
}

.account-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.account-card {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 22px;
}

.account-card h2 {
  margin-bottom: 0;
  font-size: 18px;
}

a.account-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

a.account-card:hover,
a.account-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface));
}

.user-settings-page {
  gap: 18px;
}

.user-settings-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.user-settings-hero p,
.user-settings-hero span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.user-settings-hero h1 {
  margin: 3px 0 4px;
  color: var(--text);
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.user-settings-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.user-settings-tabs a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--muted);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.user-settings-tabs a:hover,
.user-settings-tabs a:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  color: var(--text);
}

.user-settings-tabs a.is-active {
  border-color: var(--text);
  background: var(--text);
  color: var(--brand-contrast);
}

.user-settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.user-settings-main,
.user-settings-section {
  display: grid;
  min-width: 0;
  gap: 14px;
}

.user-settings-section {
  scroll-margin-top: calc(var(--topbar-height) + 18px);
}

.user-settings-section + .user-settings-section {
  margin-top: 4px;
}

.user-settings-section[hidden] {
  display: none;
}

.profile-card-header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-card-organization {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.25;
}

.profile-card-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.add-language-pill {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface-2));
  color: var(--text);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.add-language-pill:hover {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-2));
}

.add-language-pill:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.add-language-pill .material-symbols-rounded {
  font-size: 17px;
  line-height: 1;
}

.account-card-note {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.profile-goal-prompt {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  border-color: color-mix(in srgb, #c62525 35%, var(--line));
  background: color-mix(in srgb, #c62525 7%, var(--surface));
  box-shadow: 0 16px 40px rgb(198 37 37 / 0.08);
  scroll-margin-top: calc(var(--topbar-height) + 18px);
}

.profile-goal-prompt-led {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 999px;
  background: #d71920;
  box-shadow: 0 0 0 5px rgb(215 25 32 / 0.11), 0 0 14px rgb(215 25 32 / 0.36);
}

.profile-goal-prompt-copy {
  display: grid;
  gap: 7px;
}

.profile-goal-prompt-copy h2 {
  margin: 0;
  color: var(--text);
}

.profile-goal-prompt-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.instructions-article {
  max-width: 860px;
  margin: 0 auto;
  gap: 24px;
}

.instructions-header {
  display: grid;
  gap: 10px;
}

.instructions-header h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0;
}

.instructions-header p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.65;
}

.instructions-body {
  display: grid;
  gap: 20px;
}

.instructions-body section {
  display: grid;
  gap: 8px;
}

.instructions-body h2 {
  margin: 0;
  font-size: 18px;
}

.instructions-body p,
.instructions-body li {
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.65;
}

.instructions-body p,
.instructions-body ul {
  margin: 0;
}

.instructions-body ul {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

.instructions-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.instructions-mark-form {
  margin: 0;
}

.instructions-seen-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-switcher {
  width: min(100%, 420px);
}

.profile-switcher label {
  display: grid;
  gap: 7px;
}

.profile-switcher span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.profile-switcher select {
  min-height: 52px;
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
  background-color: color-mix(in srgb, var(--accent) 8%, var(--surface));
  font-size: 17px;
  font-weight: 800;
}

.theme-range-control,
.hue-control {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  align-items: center;
}

.theme-range-control input,
.hue-control input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--accent);
}

.theme-range-control small,
.hue-control small {
  display: inline-flex;
  min-width: 96px;
  margin-left: auto;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.theme-reset,
.hue-reset {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.theme-reset::after,
.hue-reset::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 70%, var(--line));
  border-radius: 999px;
  background: var(--accent);
}

.theme-reset:hover,
.hue-reset:hover {
  color: var(--text);
}

.theme-reset:hover::after,
.hue-reset:hover::after {
  border-color: var(--text);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.target-language-select {
  background-color: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
  border-color: color-mix(in srgb, var(--accent) 36%, var(--line));
}

.account-affiliation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.account-affiliation img {
  width: 104px;
  max-width: 28vw;
  height: 40px;
  object-fit: contain;
  object-position: right center;
}

.account-card-wide,
.account-actions {
  grid-column: 1 / -1;
}

.account-hint {
  margin: -2px 0 0;
  font-size: 13px;
}

.account-actions {
  display: flex;
  justify-content: flex-end;
}

.floating-save-form {
  padding-bottom: calc(76px + var(--safe-bottom));
}

.floating-save-actions {
  display: flex;
  position: sticky;
  z-index: 35;
  right: 0;
  bottom: var(--safe-bottom);
  justify-self: end;
  width: fit-content;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.floating-save-actions .button {
  min-width: 116px;
  box-shadow: 0 16px 38px rgb(0 0 0 / 0.26);
}

.autosave-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.autosave-status[data-state="saved"] {
  color: color-mix(in srgb, var(--accent) 72%, var(--text));
}

.autosave-status[data-state="error"] {
  color: #b35b5b;
}

.button.shine {
  position: relative;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  box-shadow:
    0 14px 34px rgb(0 0 0 / 0.28),
    0 1px 0 rgb(255 255 255 / 0.1) inset;
}

.button.shine::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 0 34%, rgb(255 255 255 / 0.18) 47%, transparent 60% 100%);
  transform: translateX(-115%);
  animation: buttonShine 5s ease-in-out infinite;
}

@keyframes buttonShine {
  0%, 78% { transform: translateX(-115%); }
  92%, 100% { transform: translateX(115%); }
}

.save-status {
  max-width: min(52vw, 420px);
  border: 1px solid color-mix(in srgb, #b35b5b 48%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, #b35b5b 11%, var(--surface));
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.14);
  color: #b35b5b;
  padding: 9px 12px;
  font-size: 13px;
}

.save-status.good {
  border-color: color-mix(in srgb, var(--accent) 70%, var(--line));
  background: color-mix(in srgb, var(--accent) 20%, var(--surface));
  color: #174d38;
}

:root[data-theme="dark"] .save-status {
  color: #d77f7f;
}

:root[data-theme="dark"] .save-status.good {
  color: #93c9ae;
  border-color: color-mix(in srgb, #93c9ae 62%, var(--line));
  background: color-mix(in srgb, #315f4d 28%, var(--surface));
}

.lesson-room {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 10px;
  flex: 1;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.lesson-axis {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.lesson-chat-axis {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 2px 4px;
}

.lesson-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  opacity: 0.18;
  border-radius: var(--radius);
  animation: lessonMarkPulse 5.6s ease-in-out infinite;
  transition: opacity 180ms ease, filter 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.lesson-mark img {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: brightness(0) saturate(100%);
}

@media (prefers-color-scheme: dark) {
  .lesson-mark img {
    filter: brightness(0) saturate(100%) invert(96%) sepia(7%) saturate(93%) hue-rotate(11deg) brightness(102%) contrast(92%);
  }

  .lesson-mark.is-listening img,
  .lesson-mark.is-connecting img,
  .lesson-mark.is-updating img {
    filter: brightness(0) saturate(100%) invert(59%) sepia(31%) saturate(687%) hue-rotate(101deg) brightness(91%) contrast(87%);
  }
}

@keyframes lessonMarkPulse {
  0%, 100% { opacity: 0.12; transform: scale(0.96); }
  50% { opacity: 0.28; transform: scale(1); }
}

.lesson-mark.is-listening {
  background: color-mix(in srgb, var(--surface) 42%, transparent);
  box-shadow:
    0 0 0 6px color-mix(in srgb, #22b86f 10%, transparent),
    0 0 18px color-mix(in srgb, #22b86f 18%, transparent);
  opacity: 0.95;
  animation-duration: 2.4s;
}

.lesson-mark.is-listening img {
  filter: brightness(0) saturate(100%) invert(58%) sepia(94%) saturate(519%) hue-rotate(92deg) brightness(88%) contrast(98%);
}

.lesson-mark.is-connecting,
.lesson-mark.is-updating {
  background: color-mix(in srgb, var(--surface) 42%, transparent);
  box-shadow: 0 0 0 6px color-mix(in srgb, #22b86f 8%, transparent);
  opacity: 0.74;
  animation-duration: 1.8s;
}

.lesson-mark.is-connecting img,
.lesson-mark.is-updating img {
  filter: brightness(0) saturate(100%) invert(58%) sepia(94%) saturate(519%) hue-rotate(92deg) brightness(88%) contrast(98%);
}

.lesson-mark.is-error {
  background: color-mix(in srgb, #b35b5b 14%, transparent);
  opacity: 0.68;
}

:root[data-theme="light"] .lesson-mark img {
  filter: brightness(0) saturate(100%);
}

:root[data-theme="dark"] .lesson-mark img {
  filter: brightness(0) saturate(100%) invert(96%) sepia(7%) saturate(93%) hue-rotate(11deg) brightness(102%) contrast(92%);
}

:root[data-theme="dark"] .lesson-mark.is-listening img,
:root[data-theme="dark"] .lesson-mark.is-connecting img,
:root[data-theme="dark"] .lesson-mark.is-updating img {
  filter: brightness(0) saturate(100%) invert(75%) sepia(67%) saturate(416%) hue-rotate(91deg) brightness(96%) contrast(91%);
}

.chat {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 14px;
}

.chat.is-empty {
  align-content: start;
}

.lesson-start-panel {
  display: grid;
  min-height: 180px;
  place-items: center;
}

.lesson-start-button {
  display: inline-grid;
  position: relative;
  overflow: hidden;
  width: 70px;
  height: 70px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
  box-shadow: 0 14px 30px rgb(0 0 0 / 0.14);
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.lesson-start-button::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: linear-gradient(110deg, transparent 0 30%, rgb(255 255 255 / 0.34) 46%, transparent 62% 100%);
  transform: translateX(-120%);
  animation: voiceActiveShine 2.4s ease-in-out infinite;
  pointer-events: none;
}

.lesson-start-button:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 18px 34px rgb(0 0 0 / 0.2);
}

.lesson-start-button:active {
  transform: translateY(0) scale(0.98);
}

.lesson-start-button img {
  position: relative;
  z-index: 1;
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.lesson-start-button:disabled {
  cursor: wait;
  opacity: 0.62;
  transform: none;
}

.voice-panel {
  display: flex;
  position: sticky;
  z-index: 80;
  top: 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.08);
  backdrop-filter: blur(12px);
  padding: 7px 10px;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.voice-panel.is-connecting,
.voice-panel.is-updating {
  border-color: var(--signal-wait-line);
  background: var(--signal-wait);
}

.voice-panel.is-error {
  border-color: #b35b5b;
  background: color-mix(in srgb, #b35b5b 12%, var(--surface));
}

.inline-select {
  display: flex;
  flex: 0 1 160px;
  align-items: center;
  grid-template-columns: none;
  gap: 0;
}

.inline-select select {
  width: 100%;
  min-width: 132px;
  padding: 9px 10px;
}

.lesson-advanced-controls {
  position: relative;
}

.lesson-advanced-controls summary {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 72%, var(--paper));
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.lesson-advanced-controls summary::-webkit-details-marker {
  display: none;
}

.lesson-advanced-controls[open] summary,
.lesson-advanced-controls summary:hover {
  color: var(--ink);
  background: var(--paper);
}

.lesson-advanced-controls summary .material-symbols-rounded {
  font-size: 22px;
}

.lesson-advanced-grid {
  position: absolute;
  z-index: 90;
  top: calc(100% + 8px);
  left: 0;
  display: grid;
  width: min(560px, calc(100vw - 44px));
  grid-template-columns: repeat(2, minmax(160px, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 18px 42px rgb(0 0 0 / 0.16);
  padding: 10px;
}

.lesson-advanced-grid .inline-select {
  flex: 1 1 auto;
}

.voice-state {
  display: flex;
  min-width: 112px;
  align-items: baseline;
  gap: 6px;
}

.voice-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.voice-floating-button {
  position: relative;
  overflow: hidden;
  min-width: 152px;
  box-shadow:
    0 16px 36px rgb(0 0 0 / 0.24),
    0 0 0 1px rgb(255 255 255 / 0.08) inset;
}

.voice-floating-button.is-active {
  border-color: #ff6b6b;
  background: #c92f2f;
  color: #fff;
  box-shadow:
    0 18px 40px rgb(201 47 47 / 0.34),
    0 0 0 4px rgb(201 47 47 / 0.14),
    0 0 0 1px rgb(255 255 255 / 0.14) inset;
}

.voice-floating-button.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 0 28%, rgb(255 255 255 / 0.26) 45%, transparent 62% 100%);
  transform: translateX(-110%);
  animation: voiceActiveShine 1.9s ease-in-out infinite;
  pointer-events: none;
}

.voice-floating-button.is-active:hover {
  background: #b92828;
  color: #fff;
}

@keyframes voiceActiveShine {
  0%, 42% { transform: translateX(-110%); }
  72%, 100% { transform: translateX(110%); }
}

.voice-interrupt-notice {
  display: grid;
  position: fixed;
  z-index: 140;
  inset: 0;
  place-items: center;
  padding: 20px;
  background: rgb(0 0 0 / 0.28);
  backdrop-filter: blur(6px);
}

.voice-interrupt-notice[hidden] {
  display: none;
}

.voice-interrupt-card {
  display: grid;
  width: min(420px, 100%);
  gap: 14px;
  justify-items: center;
  border: 1px solid color-mix(in srgb, #c92f2f 28%, var(--line));
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 28px 80px rgb(0 0 0 / 0.24);
  padding: 24px;
  text-align: center;
}

.voice-interrupt-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, #c92f2f 13%, var(--surface-2));
  color: #c92f2f;
  font-size: 30px;
}

.voice-interrupt-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.voice-interrupt-card p {
  margin: 0;
  color: var(--muted);
}

.voice-interrupt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.table-wrap {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
}

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

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

.usage-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.usage-table th.is-numeric,
.usage-table td.is-numeric {
  text-align: right;
}

.evaluation-panel {
  display: grid;
  gap: 14px;
}

.evaluation-section-head {
  display: grid;
  gap: 4px;
  padding-inline: var(--section-header-inset);
}

.evaluation-section-head h2,
.evaluation-section-head p {
  margin: 0;
}

.evaluation-table {
  min-width: 900px;
}

.evaluation-table td:last-child {
  max-width: 360px;
}

.chat-message {
  display: grid;
  position: relative;
  gap: 5px;
  width: 100%;
  max-width: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px 14px;
}

.chat-message.student {
  justify-self: end;
  width: calc(100% - 18px);
  margin-left: 18px;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.chat-message.lesson-note {
  border-style: dashed;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface-2));
}

.chat-message.assistant.is-latest {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--line));
  background: color-mix(in srgb, var(--accent) 6%, var(--surface-2));
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.06);
}

.chat-message span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.bubble-audio-player {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  margin-top: 6px;
  opacity: 0.58;
  transition: opacity 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.bubble-audio-player.is-cached {
  opacity: 1;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--accent) 7%, transparent);
  padding: 6px 8px;
}

.bubble-audio-toggle {
  display: inline-flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  padding: 0;
  font: inherit;
  cursor: pointer;
}

.bubble-audio-toggle:hover {
  color: var(--text);
  border-color: var(--muted);
}

.bubble-audio-toggle:disabled {
  cursor: pointer;
  opacity: 0.6;
}

.bubble-audio-player.is-loading .bubble-audio-toggle .material-symbols-rounded {
  animation: audioSpinner 900ms linear infinite;
}

.bubble-audio-toggle .material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-size: 18px;
  font-weight: normal;
  line-height: 1;
}

@keyframes audioSpinner {
  to { transform: rotate(360deg); }
}

.bubble-audio-seek {
  height: 26px;
  border: 0;
  background: transparent;
  padding: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.bubble-audio-seek:disabled {
  cursor: default;
  opacity: 0.45;
}

.bubble-audio-time {
  display: inline-flex;
  min-width: 72px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.chat-body,
.chat-message p {
  margin: 0;
}

.chat-body p {
  margin: 0;
}

.chat-body p + p,
.chat-body ul + p,
.chat-body p + ul {
  margin-top: 8px;
}

.chat-body ul {
  margin: 0;
  padding-left: 18px;
}

.chat-body li + li {
  margin-top: 4px;
}

.chat-body code {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  padding: 1px 5px;
  font-size: 0.92em;
}

.chat-message.thinking {
  width: 72px;
}

.chat-message.thinking span {
  display: none;
}

.chat-message.thinking .chat-body,
.chat-message.thinking p {
  display: flex;
  gap: 5px;
  align-items: center;
  min-height: 18px;
}

.chat-message.thinking i {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.35;
  animation: thinkingPulse 1s ease-in-out infinite;
}

.chat-message.thinking i:nth-child(2) {
  animation-delay: 0.12s;
}

.chat-message.thinking i:nth-child(3) {
  animation-delay: 0.24s;
}

@keyframes thinkingPulse {
  0%, 100% { opacity: 0.28; transform: translateY(0); }
  50% { opacity: 0.9; transform: translateY(-2px); }
}

.composer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  margin-top: auto;
  min-height: 0;
}

.composer textarea {
  min-height: 96px;
  max-height: 20dvh;
  resize: vertical;
  padding: 14px 15px 18px;
  line-height: 1.5;
  background: color-mix(in srgb, var(--surface-2) 86%, var(--surface));
}

.composer textarea::placeholder {
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

.composer-actions {
  display: grid;
  grid-template-rows: 1fr auto auto;
  gap: 8px;
  min-width: 152px;
}

.composer-voice {
  display: inline-flex;
  min-height: 48px;
  flex-direction: column;
  gap: 2px;
  align-items: center;
  justify-content: center;
  line-height: 1.15;
  text-align: center;
  white-space: pre-line;
}

.composer-voice small {
  font-size: 11px;
  font-weight: 700;
  opacity: 0.82;
}

.composer-voice-note {
  display: none;
  max-width: 152px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

.composer-send {
  display: inline-flex;
  width: 100%;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--brand-contrast);
  cursor: pointer;
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.18);
}

.composer-send:hover {
  transform: translateY(-1px);
}

.composer-send:active {
  transform: translateY(0);
}

.composer-send .material-symbols-rounded {
  font-size: 21px;
}

.homework-panel {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 18px;
}

.homework-panel h2,
.homework-panel p {
  margin-bottom: 0;
}

.homework-correction {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 14px;
}

.homework-correction h3 {
  margin: 18px 0 8px;
  font-size: 1rem;
  line-height: 1.25;
}

.homework-correction h3:first-child {
  margin-top: 0;
}

.homework-correction p {
  margin: 0 0 14px;
  line-height: 1.72;
}

.homework-correction p:last-child,
.homework-correction ul:last-child {
  margin-bottom: 0;
}

.homework-correction ul {
  margin: 0 0 14px;
  padding-left: 20px;
}

.homework-correction li {
  margin-bottom: 7px;
  line-height: 1.62;
}

.mytext-original {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 12px 14px;
}

.mytext-original summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 750;
}

.mytext-original-body {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.write-text-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.history-page {
  display: grid;
  gap: 16px;
}

.activity-hero {
  align-items: end;
}

.activity-hero p {
  max-width: 720px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
}

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

.activity-summary > div {
  display: grid;
  gap: 6px;
  min-height: 74px;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-2) 92%, var(--brand) 8%);
  padding: 12px 14px;
}

.activity-summary span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.activity-summary strong {
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.history-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--muted);
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
}

.history-filter strong {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 14%, transparent);
  color: inherit;
  font-size: 11px;
  line-height: 1;
}

.history-filter.is-active {
  border-color: var(--text);
  background: var(--text);
  color: var(--brand-contrast);
}

.history-list {
  display: grid;
  gap: 8px;
}

.history-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  padding: 13px 15px;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.history-row.is-hidden,
.history-row[hidden] {
  display: none;
}

.history-row:hover {
  border-color: var(--muted);
  background: color-mix(in srgb, var(--surface-2) 86%, var(--brand) 14%);
  transform: translateY(-1px);
}

.history-kind {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
}

.history-kind .material-symbols-rounded {
  font-size: 20px;
}

.history-main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.history-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-main small,
.history-main em {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

@media (max-width: 720px) {
  .user-settings-hero {
    display: grid;
    align-items: start;
  }

  .user-settings-tabs {
    justify-content: flex-start;
  }

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

  .activity-summary {
    display: none;
  }

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

  .history-badges {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .history-filter {
    flex: 1 1 calc(50% - 8px);
    justify-content: space-between;
  }
}

.context-page {
  display: grid;
  gap: 18px;
}

.context-hero {
  align-items: center;
  margin-bottom: 2px;
}

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

.context-panel {
  display: grid;
  align-content: start;
  gap: 16px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: grid;
  grid-template-columns: minmax(120px, 0.45fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-top: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  padding-top: 10px;
}

.info-list div:first-child {
  border-top: 0;
  padding-top: 0;
}

.info-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.info-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
}

.context-memory-list {
  display: grid;
  gap: 10px;
}

.context-memory-item {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: var(--surface-2);
}

.context-memory-item small,
.context-memory-item p {
  margin: 0;
  color: var(--muted);
}

.context-wide {
  display: grid;
  gap: 16px;
}

.context-wide details {
  display: grid;
  gap: 14px;
}

.context-wide details summary {
  cursor: pointer;
  font-weight: 800;
}

.context-pre {
  max-height: 520px;
  overflow: auto;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-2);
  color: var(--text);
  font: 13px/1.55 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  white-space: pre-wrap;
}

.homework-correction.is-empty {
  display: none;
}

.chat-body s,
.homework-correction s {
  color: var(--muted);
}

.homework-page {
  display: grid;
  gap: 14px;
}

.homework-row {
  text-decoration: none;
}

.status-pill,
.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.status-pill.good {
  border-color: color-mix(in srgb, var(--accent) 54%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent);
}

.status-pill.warning {
  border-color: color-mix(in srgb, #d9a928 56%, var(--line));
  background: color-mix(in srgb, #d9a928 15%, var(--surface));
  color: #7c5b0e;
}

.status-pill.info {
  border-color: color-mix(in srgb, #4e7da8 52%, var(--line));
  background: color-mix(in srgb, #4e7da8 12%, var(--surface));
  color: #315f83;
}

.homework-detail {
  display: grid;
  gap: 14px;
}

.homework-assignment,
.homework-submission,
.homework-result {
  display: grid;
  gap: 14px;
}

.homework-result-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.read-context-summary {
  margin: 0;
}

.reading-body {
  display: grid;
  gap: 12px;
  font-size: 18px;
  line-height: 1.8;
}

.reading-body p {
  margin: 0;
}

.reading-body ruby {
  ruby-position: over;
}

.reading-body rt {
  color: var(--muted);
  font-size: 0.62em;
  font-weight: 700;
}

.reading-support {
  display: grid;
  gap: 10px;
}

.reading-support h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.reading-glossary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.reading-glossary article,
.reading-questions details {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: color-mix(in srgb, var(--surface) 76%, transparent);
}

.reading-glossary article {
  display: grid;
  gap: 4px;
}

.reading-glossary span,
.reading-glossary small,
.reading-questions p {
  color: var(--muted);
}

.page details:not(.lesson-advanced-controls) summary + * {
  margin-top: 10px;
}

.page details summary {
  cursor: pointer;
}

.page details:not(.lesson-advanced-controls) > :not(summary) {
  padding-left: 14px;
}

.reading-questions {
  display: grid;
  gap: 8px;
}

.score-pill {
  border-color: var(--text);
  background: var(--text);
  color: var(--brand-contrast);
}

.score-pill-group {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.score-pill.is-muted {
  border-color: var(--line);
  background: var(--surface);
  color: var(--muted);
}

:root[data-theme="dark"] .status-pill.warning {
  color: #d9bb70;
}

:root[data-theme="dark"] .status-pill.info {
  color: #8eb8dc;
}

@media (max-width: 900px) {
  .topbar {
    width: 100%;
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-height: 102px;
    --topbar-gap: 15px;
    --section-header-inset: 6px;
    --safe-bottom: max(28px, env(safe-area-inset-bottom, 0px));
  }

  :root:has(.app-shell) {
    --topbar-height: 53px;
  }

  .site-shell {
    --topbar-height: 53px;
  }

  [id],
  .learn-section {
    scroll-margin-top: calc(var(--topbar-height) + 8px);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 12px 48px 12px 12px;
  }

  .topbar-theme-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    margin-left: 0;
  }

  .topnav {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
  }

  .page {
    width: min(1120px, calc(100% - 20px));
    padding-top: calc(var(--topbar-height) + var(--topbar-gap));
    padding-bottom: calc(92px + var(--safe-bottom));
  }

  .app-shell .page {
    width: min(1120px, calc(100% - 18px));
    max-width: calc(100% - 18px);
  }

  .public-login-shell .page {
    width: 100%;
    padding-right: 14px;
    padding-left: 14px;
  }

  .public-login-shell .narrow {
    width: 100%;
    max-width: 420px;
    margin-right: auto;
    margin-left: auto;
  }

  .usage-page .lingot-strip {
    width: calc(100vw - 40px);
    max-width: 100%;
  }

  .context-guard {
    align-items: flex-start;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .context-guard-action {
    grid-column: 2;
    align-self: flex-start;
  }

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

  .info-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .page:has(.lesson-room) {
    height: 100dvh;
    min-height: 0;
    padding-top: calc(var(--topbar-height) + 8px);
    padding-bottom: var(--safe-bottom);
    overflow: hidden;
  }

  .app-shell .topbar {
    align-items: center;
    flex-direction: row;
    gap: 8px;
    overflow: hidden;
    padding: 12px;
  }

  .app-shell .topbar-actions {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    gap: 7px;
    font-size: 12px;
  }

  .admin-shell .topbar {
    overflow: hidden;
  }

  .admin-shell .topbar-actions {
    flex: 0 0 auto;
    gap: 7px;
    min-width: 0;
    max-width: none;
    overflow: visible;
  }

  .app-shell .topbar-theme-toggle {
    position: static;
    top: auto;
    right: auto;
  }

  .target-language-pill {
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    font-size: 11px;
  }

  .target-language-switcher,
  .target-language-switcher select,
  .target-language-switcher button {
    height: 34px;
    font-size: 11px;
  }

  .target-language-switcher select {
    min-width: 38px;
    padding: 0 5px 0 9px;
  }

  .header-action-pill {
    height: 34px;
    padding: 0 10px;
    font-size: 11px;
  }

  .app-language-switcher button {
    min-width: 32px;
    padding: 0 5px;
    font-size: 11px;
  }

  .app-dialog {
    width: min(680px, calc(100vw - 20px));
    max-width: calc(100vw - 20px);
  }

  .app-dialog-panel {
    padding: 20px;
  }

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

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

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

  .open-session-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px;
  }

  .open-session-icon {
    display: none;
  }

  .open-session-actions {
    justify-content: stretch;
  }

  .open-session-actions .button,
  .open-session-actions form {
    width: 100%;
  }

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

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

  .quick-lesson-button {
    min-height: 64px;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    align-content: center;
    text-align: left;
  }

  .curriculum-home-grid,
  .curriculum-gates {
    grid-template-columns: 1fr;
  }

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

  .study-hero {
    margin-bottom: 18px;
  }

  .study-hero h1 {
    font-size: 48px;
  }

  .list-filter-control {
    width: 100%;
    min-height: 68px;
  }

  .curriculum-gate {
    min-height: 0;
  }

  .curriculum-panel-head {
    align-items: start;
    flex-direction: column;
  }

  .curriculum-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .curriculum-row-actions {
    justify-items: stretch;
  }

  .study-topic-row .curriculum-row-actions {
    grid-template-columns: 1fr auto;
    justify-content: stretch;
  }

  .study-topic-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
  }

  .study-topic-row .curriculum-code {
    grid-column: 1;
    grid-row: 1;
    grid-template-columns: auto auto;
    align-items: baseline;
    justify-content: start;
    gap: 12px;
  }

  .study-topic-row .curriculum-main {
    grid-column: 1;
    grid-row: 2;
  }

  .study-topic-row .curriculum-row-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    grid-template-columns: 1fr;
    align-content: space-between;
    justify-items: center;
    align-self: stretch;
    min-height: 78px;
  }

  .curriculum-row-actions .button {
    width: 100%;
  }

  .app-shell .brand.wordmark {
    flex: 0 1 auto;
    min-width: 0;
  }

  .app-shell .brand.wordmark img {
    width: 96px;
    max-width: 100%;
  }

  .app-shell .topbar-identity {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
    overflow: hidden;
  }

  .app-shell .topbar-organization-logo {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 112px;
    height: 28px;
  }

  .site-shell .topbar {
    align-items: center;
    flex-direction: row;
    gap: 12px;
    overflow: hidden;
    padding: 12px;
  }

  .site-shell .brand.wordmark {
    flex: 1 1 auto;
    min-width: 0;
  }

  .site-shell .topbar-actions {
    flex: 0 0 auto;
    gap: 7px;
  }

  .site-shell .topbar-theme-toggle {
    position: static;
    top: auto;
    right: auto;
  }

  .site-shell .language-switcher {
    flex: 0 0 auto;
    gap: 1px;
  }

  .site-shell .language-switcher a {
    min-width: 25px;
    padding: 0 5px;
    text-align: center;
    font-size: 0;
  }

  .site-shell .language-switcher a::before {
    content: attr(data-short);
    font-size: 12px;
  }

  .site-shell .public-signin-toggle {
    display: inline-flex;
    width: 34px;
    gap: 0;
    padding: 0;
  }

  .site-shell .public-signin-toggle span:not(.material-symbols-rounded) {
    display: none;
  }

  .lesson-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
    min-height: 0;
  }

  .lesson-row span:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 2px;
  }

  .record-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    padding: 12px 2px;
  }

  .record-row > span:not(:first-child):not(.status-pill):not(.score-pill) {
    grid-column: 1 / -1;
  }

  .app-shell .language-switcher {
    width: 100%;
    justify-content: space-between;
  }

  .pricing-grid,
  .metrics,
  .language-grid,
  .billing-topup-grid,
  .topup-grid,
  .home-testimonial-grid,
  .partner-card-grid,
  .learn-card-grid,
  .learn-steps,
  .form-grid-2,
  .admin-inline-form,
  .admin-student-create-form,
  .account-form {
    grid-template-columns: 1fr;
  }

  .partner-profile-main {
    grid-template-columns: 1fr;
  }

  .organization-profile-main {
    grid-template-columns: 1fr;
  }

  .instructions-home-prompt {
    align-items: stretch;
    flex-direction: column;
  }

  .billing-page {
    gap: 12px;
    overflow-x: clip;
  }

  .billing-page .panel,
  .billing-page .metrics article {
    padding: 16px;
  }

  .billing-page .metrics {
    gap: 10px;
  }

  .panel-heading-row {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .billing-currency-pill {
    width: fit-content;
  }

  .billing-topup-card {
    padding: 14px;
  }

  .billing-topup-card .button {
    min-height: 38px;
    padding-inline: 13px;
  }

  .table-wrap {
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .billing-page .usage-table {
    min-width: 0;
  }

  .billing-page .usage-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
  }

  .billing-page .usage-table,
  .billing-page .usage-table tbody,
  .billing-page .usage-table tr,
  .billing-page .usage-table td {
    display: block;
    width: 100%;
  }

  .billing-page .usage-table tr {
    border-bottom: 1px solid var(--line);
    padding: 10px 0;
  }

  .billing-page .usage-table tr:last-child {
    border-bottom: 0;
  }

  .billing-page .usage-table td {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 0;
    padding: 5px 0;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .billing-page .usage-table td.is-numeric {
    text-align: right;
  }

  .billing-page .usage-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-align: left;
  }

  .account-card {
    padding: 18px;
  }

  .account-actions {
    justify-content: stretch;
  }

  .floating-save-actions {
    bottom: var(--safe-bottom);
    justify-self: stretch;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .account-actions .button,
  .floating-save-actions .button {
    width: 100%;
  }

  .admin-compact-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-compact-badges {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .floating-save-actions .button.shine {
    min-height: 44px;
    font-size: 16px;
    box-shadow:
      0 14px 34px rgb(0 0 0 / 0.3),
      0 1px 0 rgb(255 255 255 / 0.1) inset;
  }

  .onboarding-profile-form .floating-save-actions {
    align-items: flex-end;
  }

  .onboarding-profile-form .floating-save-actions .onboarding-icon-button {
    width: 54px;
  }

  .save-status {
    max-width: none;
    width: 100%;
  }

  .dashboard {
    align-items: stretch;
    flex-direction: column;
  }

  .context-hero {
    align-items: center;
    flex-direction: row;
  }

  .page-titlebar {
    align-items: stretch;
    flex-direction: column;
  }

  .page-titlebar h1 {
    font-size: 40px;
  }

  .page-titlebar-actions {
    justify-content: flex-start;
  }

  .account-affiliation {
    justify-content: flex-start;
  }

  .account-affiliation img {
    object-position: left center;
  }

  .hero {
    min-height: 52vh;
  }

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

  .hero-media {
    max-width: 360px;
  }

  .hero-intro {
    min-height: auto;
    align-content: start;
    padding-top: 4px;
    padding-bottom: 24px;
  }

  .hero-bleed {
    margin-bottom: 0;
  }

  .hero-bleed img,
  .hero-bleed video {
    height: clamp(430px, 72vh, 620px);
    object-position: 64% center;
  }

  .hero-bleed video {
    object-fit: cover;
  }

  .hero-bleed::after {
    background:
      linear-gradient(0deg, rgb(0 0 0 / 0.72), transparent 58%),
      linear-gradient(90deg, rgb(0 0 0 / 0.2), transparent 28%, transparent 78%, rgb(0 0 0 / 0.28)),
      linear-gradient(180deg, rgb(0 0 0 / 0.18), transparent 34%, rgb(0 0 0 / 0.2));
  }

  .hero-bleed-copy {
    right: 20px;
    bottom: 28px;
    left: 20px;
    max-width: none;
  }

  .hero-bleed-copy h1 {
    max-width: 360px;
    font-size: clamp(38px, 12vw, 58px);
  }

  .hero-bleed-copy .lead {
    max-width: 100%;
    font-size: 14px;
  }

  .home-organizations {
    padding-top: 14px;
  }

  .lesson-mark {
    width: 30px;
    height: 30px;
  }

  .lesson-mark img {
    width: 24px;
    height: 24px;
  }

  .composer textarea {
    min-height: 88px;
    padding: 12px 13px 16px;
  }

  .voice-panel {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    top: 4px;
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--surface) 78%, transparent);
  }

  .chat {
    padding: 10px;
  }

  .chat-message {
    padding: 10px 12px;
  }

  .voice-state {
    min-width: 96px;
  }

  .inline-select {
    flex: 1 1 150px;
  }

  .inline-select select {
    min-width: 0;
  }

  .lesson-advanced-controls {
    flex: 0 0 auto;
  }

  .lesson-advanced-grid {
    right: 0;
    left: auto;
    width: min(360px, calc(100vw - 28px));
    grid-template-columns: 1fr;
  }

  .voice-actions {
    margin-left: 0;
  }

  .voice-floating-button {
    min-width: 136px;
  }

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

@media (max-width: 520px) {
  .onboarding-brand {
    top: 18px;
    left: 18px;
    gap: 8px;
    font-size: 20px;
  }

  .onboarding-brand img {
    width: 30px;
    height: 30px;
  }

  .onboarding-shell .page {
    padding-top: 78px;
  }

  .app-shell .topbar-identity {
    flex: 0 0 auto;
  }

  .app-shell .brand.wordmark,
  .app-shell .topbar-partner-mark,
  .app-shell .topbar-organization-logo {
    display: none;
  }

  .app-shell .brand.iconmark {
    display: inline-flex;
  }
}

@media (max-width: 430px) {
  .app-shell .page {
    width: calc(100% - 14px);
    max-width: calc(100% - 14px);
  }

  .billing-page .panel,
  .billing-page .metrics article {
    padding: 14px;
  }

  .billing-topup-card {
    gap: 10px;
  }

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

  .composer-actions {
    grid-template-columns: minmax(0, 1fr) 48px;
    grid-template-rows: auto;
    min-width: 0;
  }

  .composer-voice {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
  }

  .composer-send {
    grid-column: 2;
    grid-row: 1;
  }

  .composer-voice-note {
    grid-column: 1 / -1;
    grid-row: 2;
    max-width: none;
    text-align: left;
  }

  .composer-send {
    height: 44px;
  }

  .site-shell .topbar {
    width: 100%;
    gap: 8px;
  }

  .site-shell .brand.wordmark img {
    width: 92px;
  }

  .site-shell .topbar-actions {
    gap: 6px;
  }
}
