:root {
  --font-main: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #19212d;
  --muted: #667085;
  --line: #d9e1ea;
  --surface: #ffffff;
  --panel: #f8fafc;
  --sidebar: #132238;
  --sidebar-ink: #eaf1fb;
  --shadow: 0 18px 50px rgba(25, 33, 45, 0.1);
  --radius: 8px;
  --touch-target: 44px;
  --bottom-nav-height: 74px;
}

.app-shell,
.auth-shell,
.theme-sea,
.auth-shell.theme-sea {
  --accent: #3f6df6;
  --accent-strong: #193ea8;
  --accent-soft: #e9efff;
  --accent-warm: #6b7280;
  --accent-cool: #64748b;
  --hero-a: #f8fbff;
  --hero-b: #e9efff;
  --sidebar: #132238;
}

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

.auth-main {
  grid-template-columns: minmax(320px, 560px);
  justify-content: center;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  font-family: var(--font-main);
  background: #edf4f7;
  overscroll-behavior-y: none;
}

button,
select,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button,
a,
summary,
input,
select,
textarea {
  -webkit-tap-highlight-color: rgba(63, 109, 246, 0.18);
}

button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent, #3f6df6) 62%, white);
  outline-offset: 3px;
}

input,
select,
textarea {
  min-height: var(--touch-target);
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

iframe {
  max-width: 100%;
  border: 0;
}

.app-shell,
.auth-shell,
.theme-sea,
.auth-shell.theme-sea {
  --accent: #3f6df6;
  --accent-strong: #193ea8;
  --accent-soft: #e9efff;
  --accent-warm: #6b7280;
  --accent-cool: #64748b;
  --hero-a: #f8fbff;
  --hero-b: #e9efff;
  --sidebar: #132238;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 60;
  transform: translateY(-150%);
  padding: 10px 14px;
  color: #ffffff;
  font-weight: 900;
  text-decoration: none;
  border-radius: var(--radius);
  background: var(--accent-strong, #193ea8);
}

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

.mobile-nav-drawer,
.mobile-bottom-nav {
  display: none;
}

.app-shell {
  --accent: #3f6df6;
  --accent-strong: #193ea8;
  --accent-soft: #e9efff;
  --accent-warm: #ffcb5d;
  --accent-cool: #2db7c4;
  --hero-a: #f8fbff;
  --hero-b: #e9efff;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.theme-sea {
  --accent: #0694a2;
  --accent-strong: #075f73;
  --accent-soft: #e2f8f7;
  --accent-warm: #f6c85f;
  --accent-cool: #3478f6;
  --hero-a: #f4fffd;
  --hero-b: #ddf7f1;
  --sidebar: #103243;
}

.top-navigation {
  position: sticky;
  top: 0;
  z-index: 70;
  display: grid;
  gap: 14px;
  padding: 14px clamp(14px, 2vw, 24px) 12px;
  color: var(--sidebar-ink);
  border-bottom: 1px solid rgba(25, 33, 45, 0.08);
  background:
    linear-gradient(180deg, rgba(16, 27, 45, 0.98), rgba(16, 27, 45, 0.92)),
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.1), transparent 28%);
  box-shadow: 0 16px 38px rgba(25, 33, 45, 0.16);
  backdrop-filter: blur(18px);
}

.top-navigation-topline {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-navigation-toggle {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.top-navigation-toggle span {
  position: absolute;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  background: rgba(234, 241, 251, 0.96);
  transition:
    transform 160ms ease,
    opacity 160ms ease;
}

.top-navigation-toggle span:nth-child(1) {
  transform: translateY(-8px);
}

.top-navigation-toggle span:nth-child(3) {
  transform: translateY(8px);
}

.top-navigation-toggle:hover,
.top-navigation-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.26);
}

.top-navigation-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg);
}

.top-navigation-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.top-navigation-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg);
}

.top-navigation-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 1 auto;
  min-width: 220px;
}

.top-navigation-brand .brand-kicker {
  color: rgba(234, 241, 251, 0.72);
}

.top-navigation-brand h1 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.16;
}

.top-navigation-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  overflow: visible;
}

.top-navigation-menu {
  display: flex;
  align-items: stretch;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  overflow: visible;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.top-navigation-menu::-webkit-scrollbar {
  height: 8px;
}

.top-navigation-menu::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.top-navigation-group {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  z-index: 1;
}

.top-navigation-group:hover,
.top-navigation-group:focus-within,
.top-navigation-group[open] {
  z-index: 90;
}

.top-navigation-group > summary {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  justify-content: center;
  padding: 0 15px;
  color: rgba(234, 241, 251, 0.92);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.top-navigation-group > summary::-webkit-details-marker,
.top-navigation-user-menu > summary::-webkit-details-marker {
  display: none;
}

.top-navigation-group > summary:hover,
.top-navigation-group.is-active > summary,
.top-navigation-group[open] > summary,
.top-navigation-user-menu > summary:hover,
.top-navigation-user-menu[open] > summary {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.24);
}

.top-navigation-panel,
.top-navigation-user-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 80;
  display: grid;
  gap: 6px;
  min-width: 260px;
  max-width: min(340px, calc(100vw - 24px));
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(25, 33, 45, 0.2);
  will-change: opacity, transform;
}

.top-navigation-panel::before,
.top-navigation-user-panel::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.top-navigation-panel,
.top-navigation-user-panel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px) scale(0.98);
  transition:
    opacity 180ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 180ms ease;
}

.top-navigation-group[open] > .top-navigation-panel,
.top-navigation-user-menu[open] > .top-navigation-user-panel,
.top-navigation-group.is-hover-open > .top-navigation-panel,
.top-navigation-user-menu.is-hover-open > .top-navigation-user-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.top-navigation-link {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  color: #344054;
  font-size: 0.85rem;
  font-weight: 750;
  text-decoration: none;
  border-radius: 12px;
}

button.top-navigation-link {
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.top-navigation-link:hover,
.top-navigation-link.is-active {
  color: #ffffff;
  background: var(--accent-strong);
}

.top-navigation-link span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.is-page-section-highlighted {
  animation: page-section-highlight 1500ms ease;
}

@keyframes page-section-highlight {
  0% {
    box-shadow:
      0 0 0 0 rgba(52, 120, 246, 0.28),
      0 18px 45px rgba(25, 33, 45, 0.08);
  }
  35% {
    box-shadow:
      0 0 0 5px rgba(52, 120, 246, 0.18),
      0 18px 45px rgba(25, 33, 45, 0.12);
  }
  100% {
    box-shadow:
      0 0 0 0 rgba(52, 120, 246, 0),
      0 18px 45px rgba(25, 33, 45, 0.08);
  }
}

.top-navigation-account {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  margin-left: auto;
}

.page-section-sidebar {
  position: fixed;
  top: 154px;
  left: clamp(12px, 1.4vw, 22px);
  z-index: 50;
  width: 56px;
  max-height: calc(100vh - 176px);
  overflow: hidden auto;
  padding: 10px;
  border: 1px solid rgba(217, 225, 234, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 38px rgba(25, 33, 45, 0.13);
  backdrop-filter: blur(18px);
  transition:
    width 190ms ease,
    box-shadow 190ms ease,
    background-color 190ms ease;
}

.page-section-sidebar:hover,
.page-section-sidebar:focus-within {
  width: min(230px, calc(100vw - 28px));
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 46px rgba(25, 33, 45, 0.18);
}

.page-section-sidebar-inner {
  display: grid;
  gap: 8px;
}

.page-section-sidebar .eyebrow {
  margin: 0 4px;
  color: var(--muted);
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 160ms ease;
}

.page-section-sidebar:hover .eyebrow,
.page-section-sidebar:focus-within .eyebrow {
  opacity: 1;
}

.page-section-nav {
  display: grid;
  gap: 5px;
}

.page-section-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 8px;
  color: #344054;
  font-size: 0.78rem;
  font-weight: 850;
  text-align: left;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  overflow: hidden;
  transition:
    padding 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.page-section-sidebar:hover .page-section-link,
.page-section-sidebar:focus-within .page-section-link {
  justify-content: flex-start;
  padding: 8px 10px;
}

.page-section-link::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 0;
  flex: 0 0 auto;
  border: 2px solid rgba(102, 112, 133, 0.62);
  border-radius: 999px;
  transition:
    margin 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.page-section-sidebar:hover .page-section-link::before,
.page-section-sidebar:focus-within .page-section-link::before {
  margin-right: 9px;
}

.page-section-link:hover,
.page-section-link:focus-visible {
  color: #ffffff;
  outline: 0;
  background: var(--accent-strong);
}

.page-section-link:hover::before,
.page-section-link:focus-visible::before {
  border-color: var(--accent-warm);
  background: var(--accent-warm);
}

.page-section-link span {
  min-width: 0;
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  transition:
    max-width 170ms ease,
    opacity 140ms ease;
}

.page-section-sidebar:hover .page-section-link span,
.page-section-sidebar:focus-within .page-section-link span {
  max-width: 160px;
  opacity: 1;
}

.app-shell.has-page-section-sidebar .main-content {
  padding-left: calc(clamp(16px, 3vw, 34px) + 76px);
}

.main-content [id^="page-section-"] {
  scroll-margin-top: 172px;
}

.top-navigation-user-menu {
  position: relative;
  z-index: 95;
}

.top-navigation-user-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  padding: 0;
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 850;
  list-style: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  cursor: pointer;
}

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

.top-navigation-user-avatar span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  letter-spacing: 0;
}

.top-navigation-user-avatar:hover,
.top-navigation-user-menu[open] > .top-navigation-user-avatar {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.26);
}

.top-navigation-user-panel {
  right: 0;
  left: auto;
  min-width: 220px;
  padding: 14px;
}

.top-navigation-user-card {
  display: grid;
  gap: 4px;
  justify-content: center;
  padding: 2px 2px 6px;
  text-align: center;
}

.top-navigation-user-card strong {
  color: #182230;
  font-size: 0.92rem;
  font-weight: 850;
}

.top-navigation-user-card span {
  color: #667085;
  font-size: 0.78rem;
  font-weight: 750;
}

.top-navigation-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding: 8px 12px;
  color: #344054;
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  border: 0;
  border-radius: 12px;
  background: transparent;
}

.top-navigation-menu-button:hover {
  color: #ffffff;
  background: var(--accent-strong);
}

@media (hover: hover) and (pointer: fine) and (min-width: 1101px) {
  .top-navigation-group:hover > .top-navigation-panel,
  .top-navigation-group:focus-within > .top-navigation-panel,
  .top-navigation-group.is-hover-open > .top-navigation-panel,
  .top-navigation-user-menu:hover > .top-navigation-user-panel,
  .top-navigation-user-menu:focus-within > .top-navigation-user-panel,
  .top-navigation-user-menu.is-hover-open > .top-navigation-user-panel {
    display: grid;
  }

  .top-navigation-group:hover > .top-navigation-panel,
  .top-navigation-group:focus-within > .top-navigation-panel,
  .top-navigation-group.is-hover-open > .top-navigation-panel,
  .top-navigation-user-menu:hover > .top-navigation-user-panel,
  .top-navigation-user-menu:focus-within > .top-navigation-user-panel,
  .top-navigation-user-menu.is-hover-open > .top-navigation-user-panel {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px;
}

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.brand-logo {
  padding: 4px;
  background: #ffffff;
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-kicker,
.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-kicker {
  color: rgba(234, 241, 251, 0.72);
}

.brand-block h1 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.16;
}

.brand-block > div,
.top-header > div,
.header-actions,
.section-heading > *,
.metric-card,
.panel,
.lesson-card,
.student-resource-row > *,
.preview-details,
.builder-field,
.filter-field {
  min-width: 0;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
}

.sidebar-link {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 38px;
  padding: 9px 10px;
  color: rgba(234, 241, 251, 0.82);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.18;
  text-decoration: none;
  border-radius: var(--radius);
}

.sidebar-link span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.sidebar-link:hover,
.sidebar-link.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-link-icon {
  flex: 0 0 auto;
  margin-top: 0.18rem;
  width: 10px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.72;
}

.sidebar-link.is-active .sidebar-link-icon {
  background: var(--accent-warm);
  border-color: var(--accent-warm);
}

@media (min-width: 1181px) and (hover: hover) and (pointer: fine) {
  .app-shell {
    grid-template-columns: 272px minmax(0, 1fr);
  }

  .sidebar {
    overflow-x: visible;
    padding-inline: 18px;
  }

  .brand-block {
    justify-content: flex-start;
    gap: 12px;
    padding-inline: 8px;
  }

  .brand-block > div {
    max-width: 186px;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 1;
    transform: none;
  }

  .sidebar-link {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0;
    min-height: 38px;
    padding-inline: 10px;
    overflow: hidden;
  }

  .sidebar-link-icon {
    display: none;
  }

  .sidebar-link span:last-child {
    max-width: 180px;
    opacity: 1;
    white-space: normal;
    transform: none;
  }
}

.mobile-nav-drawer {
  position: sticky;
  top: 0;
  z-index: 45;
  color: var(--sidebar-ink);
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(135deg, var(--sidebar), #0d1828);
  box-shadow: 0 14px 34px rgba(25, 33, 45, 0.16);
}

.mobile-nav-drawer summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  padding: 0 18px;
  cursor: pointer;
  list-style: none;
}

.mobile-nav-drawer summary::-webkit-details-marker {
  display: none;
}

.mobile-nav-drawer summary span {
  color: rgba(234, 241, 251, 0.72);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.mobile-nav-drawer summary strong {
  position: relative;
  padding-right: 28px;
  color: #ffffff;
  font-size: 1rem;
}

.mobile-nav-drawer summary strong::after {
  position: absolute;
  top: 50%;
  right: 0;
  width: 12px;
  height: 12px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.18s ease;
}

.mobile-nav-drawer[open] summary strong::after {
  transform: translateY(-30%) rotate(225deg);
}

.mobile-drawer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-height: min(62vh, 540px);
  padding: 0 16px 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-drawer-nav .sidebar-link {
  min-height: 46px;
  padding: 9px 10px;
  color: rgba(234, 241, 251, 0.86);
  font-size: 0.84rem;
  background: rgba(255, 255, 255, 0.08);
}

.mobile-bottom-nav {
  position: fixed;
  right: 10px;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 10px;
  z-index: 50;
  min-height: 62px;
  padding: 7px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 45px rgba(25, 33, 45, 0.22);
  backdrop-filter: blur(18px);
}

.mobile-bottom-link {
  display: grid;
  grid-template-rows: 18px auto;
  gap: 4px;
  justify-items: center;
  align-content: center;
  min-width: 0;
  min-height: 48px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
  border-radius: 12px;
}

.mobile-bottom-link.is-active {
  color: #ffffff;
  background: var(--accent-strong);
}

.mobile-bottom-icon {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.mobile-bottom-link.is-active .mobile-bottom-icon {
  background: var(--accent-warm);
  border-color: var(--accent-warm);
}

.main-content {
  min-width: 0;
  width: 100%;
  flex: 1 1 auto;
  padding: 22px clamp(16px, 3vw, 34px) 34px;
  scroll-margin-top: 112px;
  animation: page-enter 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.main-content:focus {
  outline: 0;
}

.top-header {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(25, 33, 45, 0.08);
}

.top-header > div:first-child {
  flex: 1 1 260px;
}

.top-header h2 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  overflow-wrap: anywhere;
}

.top-header,
.page-view-controls,
.dashboard-hero,
.page-hero,
.metric-grid,
.semester-tabs,
.filter-panel,
.dashboard-layout,
.curriculum-table-panel,
.unit-section,
.panel,
.lesson-card,
.metric-card {
  animation: surface-enter 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-card,
.auth-side-panel {
  animation: surface-enter 360ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.auth-side-panel {
  animation-delay: 90ms;
}

.curriculum-row:not(.curriculum-row-head),
.resource-row:not(.resource-row-head),
.storage-file-row:not(.storage-file-head),
.storage-folder-row,
.google-drive-row,
.activity-library-row:not(.activity-library-row-head),
.reading-library-row:not(.reading-library-row-head),
.writing-library-row:not(.writing-library-row-head),
.vocabulary-library-row:not(.vocabulary-library-row-head),
.submission-review-row:not(.submission-review-row-head) {
  animation: list-item-enter 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.main-content > *:nth-child(1) {
  animation-delay: 20ms;
}

.main-content > *:nth-child(2) {
  animation-delay: 55ms;
}

.main-content > *:nth-child(3) {
  animation-delay: 90ms;
}

.main-content > *:nth-child(4) {
  animation-delay: 125ms;
}

.main-content > *:nth-child(n + 5) {
  animation-delay: 155ms;
}

.metric-card,
.lesson-card,
.panel,
.page-view-button,
.action-button,
.quick-action,
.table-actions button,
.top-navigation-link,
.mobile-bottom-link {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

.metric-card:hover,
.lesson-card:hover,
.panel:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(25, 33, 45, 0.09);
}

.page-view-button:hover,
.action-button:hover,
.quick-action:hover,
.table-actions button:hover,
.mobile-bottom-link:hover {
  transform: translateY(-1px);
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes surface-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.992);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes list-item-enter {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes progress-fill {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes gentle-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes earned-glow {
  0%,
  100% {
    box-shadow: 0 10px 30px rgba(25, 33, 45, 0.06);
  }
  50% {
    box-shadow:
      0 14px 34px rgba(25, 33, 45, 0.1),
      0 0 0 4px color-mix(in srgb, var(--accent-warm) 24%, transparent);
  }
}

@keyframes soft-pop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.page-view-controls {
  position: sticky;
  top: 112px;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: -4px 0 18px;
  padding: 12px;
  border: 1px solid rgba(217, 225, 234, 0.88);
  border-radius: var(--radius);
  background: rgba(248, 250, 252, 0.92);
  box-shadow: 0 12px 28px rgba(25, 33, 45, 0.07);
  backdrop-filter: blur(18px);
}

.page-view-controls > div:first-child {
  display: grid;
  gap: 2px;
  min-width: 190px;
}

.page-view-controls .eyebrow {
  margin: 0;
}

.page-view-controls strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.page-view-button-row {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.page-view-button {
  min-height: 36px;
  padding: 0 13px;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 850;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(25, 33, 45, 0.05);
}

.page-view-button:hover {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 34%, white);
}

.page-view-button.is-active {
  color: #ffffff;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  box-shadow: 0 10px 20px rgba(37, 68, 165, 0.18);
}

.page-view-compact-button {
  border-style: dashed;
  background: #f7f9fc;
}

[data-view-group][hidden] {
  display: none !important;
}

.main-content.is-detail-view-hidden .activity-engine-layout,
.main-content.is-detail-view-hidden .reading-centre-layout,
.main-content.is-detail-view-hidden .writing-centre-layout,
.main-content.is-detail-view-hidden .vocabulary-centre-layout,
.main-content.is-detail-view-hidden .resource-library-layout,
.main-content.is-detail-view-hidden .storage-layout,
.main-content.is-detail-view-hidden .assessment-centre-layout,
.main-content.is-detail-view-hidden .submission-system-layout,
.main-content.is-detail-view-hidden .portfolio-layout,
.main-content.is-detail-view-hidden .ai-assistant-layout,
.main-content.is-detail-view-hidden .reporting-layout {
  grid-template-columns: minmax(0, 1fr);
}

.main-content.is-compact-view {
  padding-top: 16px;
}

.main-content.is-compact-view .top-header {
  margin-bottom: 14px;
}

.main-content.is-compact-view .panel {
  padding: 14px;
}

.main-content.is-compact-view .section-heading {
  margin-bottom: 10px;
}

.main-content.is-compact-view .metric-card {
  min-height: 118px;
  padding: 12px;
}

.main-content.is-compact-view .dashboard-hero {
  min-height: 118px;
  padding: 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 430px;
  gap: 10px;
  flex-wrap: wrap;
}

.teacher-chip,
.date-pill,
.theme-picker {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-height: 42px;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 24px rgba(25, 33, 45, 0.05);
}

.teacher-chip,
.date-pill {
  gap: 8px;
  padding: 0 12px;
  color: #344054;
  font-size: 0.86rem;
  font-weight: 700;
}

.teacher-chip span:last-child,
.date-pill {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-chip span:last-child {
  max-width: 16ch;
}

.avatar {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #ffffff;
  font-size: 0.78rem;
  border-radius: 50%;
  background: var(--accent-strong);
}

.theme-picker {
  flex-basis: 238px;
  gap: 8px;
  padding: 0 10px;
}

.theme-picker span {
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 800;
}

.theme-picker select {
  min-width: 0;
  width: min(100%, 142px);
  border: 0;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
  background: transparent;
  outline: 0;
}

.theme-picker {
  display: none;
}

.dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: center;
  min-height: 168px;
  margin-bottom: 18px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, white);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, var(--hero-a), var(--hero-b)),
    var(--surface);
  box-shadow: var(--shadow);
}

.dashboard-hero h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
}

.dashboard-hero p:last-child {
  max-width: 620px;
  margin: 12px 0 0;
  color: #475467;
  font-size: 1rem;
  font-weight: 600;
}

.theme-visual,
.metric-icon,
.theme-icon {
  display: none !important;
}

.theme-visual {
  position: relative;
  height: 0;
}

.theme-visual span {
  position: absolute;
  display: block;
}

.orbit {
  width: 116px;
  height: 116px;
  border: 2px solid rgba(63, 109, 246, 0.22);
  border-radius: 50%;
}

.orbit:first-child {
  top: 4px;
  left: 46px;
}

.orbit:last-child {
  right: 4px;
  bottom: 8px;
  width: 68px;
  height: 68px;
}

.planet {
  top: 34px;
  left: 84px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #ffffff 0 10%, var(--accent-warm) 11% 48%, #f58f5d 49% 100%);
  box-shadow: 0 12px 28px rgba(245, 143, 93, 0.28);
}

.planet::after {
  content: "";
  position: absolute;
  inset: 23px -16px auto;
  height: 8px;
  border: 2px solid rgba(63, 109, 246, 0.42);
  border-left: 0;
  border-right: 0;
  transform: rotate(-18deg);
}

.current {
  width: 116px;
  height: 36px;
  border-bottom: 5px solid rgba(6, 148, 162, 0.28);
  border-radius: 0 0 50% 50%;
}

.current:first-child {
  top: 14px;
  left: 26px;
}

.current:last-child {
  right: 10px;
  bottom: 18px;
  width: 82px;
}

.pearl {
  top: 42px;
  left: 88px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #ffffff 0 14%, #bceee8 15% 58%, #75d4cd 59% 100%);
  box-shadow: 0 14px 28px rgba(6, 148, 162, 0.22);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

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

.metric-card,
.panel,
.lesson-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(25, 33, 45, 0.06);
}

.metric-card {
  min-height: 150px;
  padding: 16px;
}

.metric-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.metric-card p,
.metric-card span {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.metric-card strong {
  display: block;
  min-height: 46px;
  margin: 6px 0 8px;
  font-size: clamp(1rem, 1.4vw, 1.22rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 350px);
  gap: 18px;
  align-items: start;
}

.content-column,
.side-column {
  display: grid;
  gap: 18px;
}

@media (min-width: 1101px) {
  .side-column,
  .analytics-dashboard-layout .side-column {
    position: sticky;
    top: 184px;
    align-self: start;
    max-height: calc(100vh - 204px);
    overflow: auto;
    scrollbar-width: thin;
  }
}

.panel {
  padding: 20px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.section-heading h3,
.lesson-card h4 {
  margin: 0;
}

.section-heading h3 {
  font-size: 1.22rem;
  overflow-wrap: anywhere;
}

.lesson-badge,
.status-pill,
.resource-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  max-width: 100%;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 800;
  border-radius: 999px;
  line-height: 1.15;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.lesson-badge {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.lesson-objective {
  max-width: 860px;
  margin: 0;
  color: #475467;
  font-size: 1.05rem;
  line-height: 1.62;
}

.lesson-meta-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.lesson-meta-row span {
  min-height: 30px;
  max-width: 100%;
  padding: 6px 10px;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.2;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  overflow-wrap: anywhere;
}

.button-row,
.quick-actions {
  display: grid;
  gap: 10px;
}

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

.action-button,
.quick-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  min-height: 44px;
  max-width: 100%;
  gap: 9px;
  padding: 0 12px;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  border-radius: var(--radius);
  background: var(--accent-soft);
  overflow-wrap: anywhere;
}

.action-button:hover,
.quick-action:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.button-icon,
.theme-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.theme-icon-planet {
  border-radius: 50%;
  background: var(--accent-warm);
  box-shadow: inset -5px -4px 0 rgba(0, 0, 0, 0.12);
}

.theme-icon-planet::after {
  content: "";
  position: absolute;
  left: -4px;
  top: 7px;
  width: 26px;
  height: 5px;
  border: 1px solid currentColor;
  border-left: 0;
  border-right: 0;
  transform: rotate(-18deg);
  opacity: 0.65;
}

.theme-icon-star {
  transform: rotate(45deg);
  border-radius: 3px;
  background: var(--accent-warm);
}

.theme-icon-star::before,
.theme-icon-star::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: inherit;
}

.theme-icon-star::before {
  transform: rotate(45deg);
}

.theme-icon-star::after {
  transform: rotate(90deg);
}

.theme-icon-pearl {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 26%, #ffffff 0 16%, #bdeee8 17% 100%);
  box-shadow: inset -4px -4px 0 rgba(7, 95, 115, 0.18);
}

.theme-icon-wave {
  overflow: hidden;
}

.theme-icon-wave::before,
.theme-icon-wave::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 12px;
  border-bottom: 4px solid var(--accent);
  border-radius: 0 0 50% 50%;
}

.theme-icon-wave::before {
  left: -4px;
  top: 0;
}

.theme-icon-wave::after {
  left: 8px;
  top: 6px;
}

.button-icon-screen {
  border: 2px solid currentColor;
  border-radius: 4px;
}

.button-icon-screen::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: -5px;
  height: 2px;
  background: currentColor;
}

.button-icon-folder {
  border: 2px solid currentColor;
  border-radius: 4px;
}

.button-icon-folder::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 5px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.button-icon-home::before {
  content: "";
  position: absolute;
  inset: 7px 3px 1px;
  border: 2px solid currentColor;
  border-top: 0;
}

.button-icon-home::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}

.button-icon-note {
  border: 2px solid currentColor;
  border-radius: 3px;
}

.button-icon-note::before,
.button-icon-note::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  background: currentColor;
}

.button-icon-note::before {
  top: 5px;
}

.button-icon-note::after {
  top: 10px;
}

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

.lesson-card {
  min-height: 150px;
  padding: 16px;
}

.lesson-card h4 {
  font-size: 1rem;
}

.lesson-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.lesson-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 28px;
}

.lesson-card time {
  color: #475467;
  font-size: 0.82rem;
  font-weight: 800;
}

.status-draft {
  color: #8a4b00;
  background: #fff1d6;
}

.status-ready {
  color: #076242;
  background: #daf8ea;
}

.status-not-started {
  color: #475467;
  background: #eef2f7;
}

.status-in-progress {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.status-completed {
  color: #344054;
  background: #e9eef5;
}

.status-needs-review {
  color: #8a4b00;
  background: #fff1d6;
}

.status-archived {
  color: #475467;
  background: #e4e7ec;
}

.resource-table {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.resource-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.35fr) minmax(130px, 0.7fr) minmax(190px, 1fr) minmax(130px, 0.7fr);
  gap: 12px;
  align-items: center;
  min-height: 58px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

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

.resource-row-head {
  min-height: 42px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #f8fafc;
}

.resource-row strong,
.resource-row span {
  min-width: 0;
}

.resource-row strong {
  font-size: 0.9rem;
}

.resource-row span:not(.resource-type) {
  color: #667085;
  font-size: 0.84rem;
  font-weight: 650;
}

.resource-type {
  justify-content: center;
  min-width: 116px;
}

.resource-presentation {
  color: #193ea8;
  background: #e9efff;
}

.resource-worksheet {
  color: #715100;
  background: #fff3cc;
}

.resource-homework {
  color: #075f73;
  background: #e2f8f7;
}

.resource-visual {
  color: #6f3d00;
  background: #fff0d5;
}

.resource-web-app {
  color: #1849a9;
  background: #e5edff;
}

.resource-video {
  color: #6941c6;
  background: #f0eaff;
}

.resource-audio {
  color: #05603a;
  background: #dcfae6;
}

.resource-external {
  color: #7a2e0e;
  background: #fff2e8;
}

.resource-notes {
  color: #363f72;
  background: #eaecf5;
}

.resource-assessment {
  color: #822c54;
  background: #fde7f1;
}

.progress-stack {
  display: grid;
  gap: 20px;
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  color: #344054;
  font-weight: 800;
}

.progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef5;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-warm));
  transform-origin: left center;
  animation: progress-fill 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.quick-action {
  justify-content: flex-start;
  min-height: 48px;
  color: #344054;
  background: #ffffff;
  border-color: var(--line);
}

.quick-action-primary {
  color: #ffffff;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.quick-action-primary .theme-icon-planet::after {
  border-color: #ffffff;
}

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

.semester-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 6px;
  margin-bottom: 18px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 24px rgba(25, 33, 45, 0.05);
}

.semester-tab {
  min-height: 40px;
  padding: 0 16px;
  color: #475467;
  font-weight: 800;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.semester-tab.is-active {
  color: #ffffff;
  background: var(--accent-strong);
}

.filter-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(190px, 0.32fr) minmax(190px, 0.32fr);
  gap: 12px;
  margin-bottom: 18px;
}

.filter-field {
  display: grid;
  gap: 7px;
}

.filter-field span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 750;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  outline: 0;
}

.filter-field input:focus,
.filter-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}

.curriculum-table-wrap,
.unit-table-wrap,
.resource-library-table-wrap,
.activity-library-table-wrap,
.reading-library-table-wrap,
.writing-library-table-wrap,
.vocabulary-library-table-wrap,
.submission-review-table-wrap,
.storage-table-wrap,
.google-drive-table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.curriculum-table-wrap > *,
.unit-table-wrap > *,
.resource-library-table-wrap > *,
.activity-library-table-wrap > *,
.reading-library-table-wrap > *,
.writing-library-table-wrap > *,
.vocabulary-library-table-wrap > *,
.submission-review-table-wrap > *,
.google-drive-table-wrap > * {
  min-width: 760px;
}

.curriculum-table-panel {
  padding: 0;
  max-width: 100%;
  overflow: hidden;
}

.curriculum-table-panel .section-heading {
  align-items: flex-start;
  padding: 20px 20px 0;
}

.curriculum-table-panel .section-heading > div {
  min-width: 0;
}

.section-subtitle {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
}

.curriculum-table-wrap {
  margin-top: 14px;
  padding: 0 20px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  border-radius: 0 0 var(--radius) var(--radius);
  scrollbar-gutter: stable both-edges;
}

.table-scroll-hint {
  position: sticky;
  left: 0;
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 10px;
  padding: 6px 10px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.curriculum-table {
  width: 100%;
  min-width: 1360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.curriculum-row {
  display: grid;
  grid-template-columns:
    70px 116px minmax(150px, 0.95fr) 66px 70px 74px
    minmax(178px, 1fr) minmax(138px, 0.78fr) minmax(132px, 0.72fr) 94px 138px;
  gap: 8px;
  align-items: center;
  min-height: 70px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

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

.curriculum-row-head {
  min-height: 44px;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #f8fafc;
}

.curriculum-row strong,
.curriculum-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.curriculum-row > span:not(.status-pill),
.curriculum-row > strong {
  color: #475467;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.42;
}

.curriculum-row > strong {
  color: var(--ink);
  font-weight: 850;
}

.word-list {
  color: #344054;
}

.curriculum-summary {
  display: grid;
  gap: 4px;
}

.curriculum-summary strong {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  line-height: 1.32;
}

.curriculum-summary small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.spelling-block {
  display: grid;
  gap: 5px;
}

.spelling-block strong {
  color: var(--ink);
  font-size: 0.78rem;
}

.spelling-block small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.table-actions button {
  flex: 1 1 76px;
  min-height: 32px;
  max-width: 100%;
  padding: 0 9px;
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1.12;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, white);
  border-radius: 6px;
  background: var(--accent-soft);
  overflow-wrap: anywhere;
}

.curriculum-row > .table-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  gap: 5px;
}

.curriculum-row > .table-actions button {
  width: 100%;
  min-height: 30px;
}

@media (max-width: 1100px) {
  .curriculum-table-wrap {
    margin-top: 12px;
    overflow: visible;
  }

  .table-scroll-hint {
    display: none;
  }

  .curriculum-table {
    display: grid;
    gap: 12px;
    width: 100%;
    min-width: 0;
    border: 0;
    overflow: visible;
    background: transparent;
  }

  .curriculum-row-head {
    display: none;
  }

  .curriculum-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    min-height: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 8px 22px rgba(25, 33, 45, 0.045);
  }

  .curriculum-row > span,
  .curriculum-row > strong {
    display: grid;
    align-content: start;
    gap: 4px;
    min-height: 58px;
    padding: 9px;
    border: 1px solid #edf1f6;
    border-radius: 7px;
    background: #fbfcfe;
  }

  .curriculum-row > span::before,
  .curriculum-row > strong::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }

  .curriculum-row > strong::before {
    content: "Unit Title";
  }

  .curriculum-row > span:nth-child(3),
  .curriculum-row > span:nth-child(7),
  .curriculum-row > span:nth-child(8),
  .curriculum-row > span:nth-child(9),
  .curriculum-row > span:nth-child(11) {
    grid-column: span 2;
  }

  .table-actions {
    align-content: start;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .table-actions button {
    min-height: 36px;
  }
}

@media (max-width: 820px) {
  .curriculum-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .curriculum-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .curriculum-row > span:nth-child(3),
  .curriculum-row > span:nth-child(7),
  .curriculum-row > span:nth-child(8),
  .curriculum-row > span:nth-child(9),
  .curriculum-row > span:nth-child(11) {
    grid-column: auto;
  }
}

.table-actions button:hover {
  border-color: var(--accent);
}

.empty-state {
  min-height: 82px;
  padding: 28px 16px;
  color: var(--muted);
  font-weight: 750;
  text-align: center;
  background: #ffffff;
}

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

.unit-hero .lesson-meta-row {
  margin-bottom: 14px;
}

.essential-question {
  display: grid;
  max-width: 780px;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.essential-question span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.essential-question strong {
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.42;
}

.unit-section {
  margin-bottom: 18px;
}

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

.unit-theme-card {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.theme-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}

.theme-card-header > div {
  flex: 1 1 160px;
  min-width: 0;
}

.theme-card-header p,
.theme-card-header h4 {
  margin: 0;
  overflow-wrap: anywhere;
}

.theme-card-header p {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.theme-card-header h4 {
  margin-top: 5px;
  font-size: 1.18rem;
}

.theme-details {
  display: grid;
  gap: 9px;
  margin: 0;
}

.theme-details div {
  display: grid;
  gap: 3px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--line);
}

.theme-details div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.theme-details dt,
.theme-word-group > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.theme-details dd {
  margin: 0;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.4;
}

.theme-word-group {
  display: grid;
  gap: 8px;
}

.word-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.word-chip-list span {
  min-height: 27px;
  padding: 5px 9px;
  color: #344054;
  font-size: 0.76rem;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fafc;
}

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

.theme-button-row .action-button {
  min-height: 40px;
  font-size: 0.78rem;
}

.unit-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 350px);
  gap: 18px;
  align-items: start;
}

.unit-table-panel {
  padding: 0;
}

.unit-table-panel .section-heading {
  padding: 20px 20px 0;
}

.unit-table-wrap {
  overflow-x: auto;
  padding: 0 20px 20px;
}

.unit-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.lesson-sequence-table {
  min-width: 940px;
}

.resource-list-table,
.assessment-list-table {
  min-width: 820px;
}

.unit-row {
  display: grid;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.lesson-sequence-table .unit-row {
  grid-template-columns: 100px minmax(170px, 1.25fr) minmax(130px, 0.9fr) minmax(170px, 1fr) 126px minmax(170px, 0.95fr);
}

.resource-list-table .unit-row,
.assessment-list-table .unit-row {
  grid-template-columns: minmax(220px, 1.4fr) minmax(130px, 0.75fr) minmax(145px, 0.8fr) minmax(145px, 0.8fr) 126px;
}

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

.unit-row-head {
  min-height: 44px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #f8fafc;
}

.unit-row > span,
.unit-row > strong {
  min-width: 0;
  color: #475467;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.42;
}

.unit-row > strong {
  color: var(--ink);
  font-weight: 850;
}

.teacher-notes-panel {
  position: sticky;
  top: 22px;
}

.teacher-note-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-note-list li {
  padding: 12px 13px;
  color: #344054;
  font-size: 0.91rem;
  font-weight: 700;
  line-height: 1.45;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: #ffffff;
}

.lesson-hero {
  min-height: 152px;
}

.lesson-quick-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.lesson-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 390px);
  gap: 18px;
  align-items: start;
}

.lesson-page-grid .side-column {
  grid-template-columns: 1fr;
}

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

.objective-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.objective-card p {
  margin: 0;
  color: #344054;
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.45;
}

.checkmark {
  position: relative;
  display: inline-grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
}

.checkmark::after {
  content: "";
  width: 9px;
  height: 5px;
  border-left: 2px solid var(--accent-strong);
  border-bottom: 2px solid var(--accent-strong);
  transform: rotate(-45deg) translateY(-1px);
}

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

.vocabulary-card {
  min-height: 148px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.vocabulary-card h4 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.vocabulary-card p,
.vocabulary-card span {
  display: block;
  margin: 0;
  color: #475467;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.42;
}

.vocabulary-card span {
  margin-top: 10px;
  color: var(--accent-strong);
}

.lesson-flow-panel {
  overflow: hidden;
}

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

.lesson-flow-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
}

.flow-marker {
  display: grid;
  justify-items: center;
}

.flow-marker span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 900;
  border-radius: 50%;
  background: var(--accent-strong);
}

.flow-content {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.flow-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.flow-heading p,
.flow-heading h4 {
  margin: 0;
}

.flow-heading p {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.flow-heading h4 {
  margin-top: 4px;
  font-size: 1.05rem;
}

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

.flow-detail-grid div {
  display: grid;
  align-content: start;
  gap: 6px;
}

.flow-detail-grid span,
.homework-starters > span,
.teacher-reminder span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.flow-detail-grid p {
  margin: 0;
  color: #344054;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
}

.lesson-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 280px));
  justify-content: start;
  gap: 14px;
}

.lesson-resource-card {
  display: grid;
  align-content: space-between;
  min-height: 164px;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.lesson-resource-card h4 {
  margin: 0 0 10px;
  font-size: 0.98rem;
  line-height: 1.28;
}

.lesson-resource-card > div:first-child > span {
  display: block;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.lesson-resource-footer {
  display: grid;
  grid-template-columns: auto minmax(104px, 1fr);
  align-items: center;
  gap: 8px;
}

.lesson-resource-footer .status-pill {
  min-width: 58px;
  min-height: 36px;
  padding: 0 9px;
  font-size: 0.7rem;
  line-height: 1.08;
  white-space: nowrap;
}

.lesson-resource-footer button {
  min-height: 36px;
  padding: 0 10px;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1.1;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, white);
  border-radius: 6px;
  background: var(--accent-soft);
  overflow-wrap: anywhere;
}

.homework-preview-panel {
  display: grid;
  gap: 14px;
}

.homework-instructions {
  margin: 0;
  color: #344054;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.52;
}

.homework-starters,
.teacher-reminder {
  display: grid;
  gap: 8px;
}

.teacher-reminder {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.teacher-reminder strong {
  color: var(--accent-strong);
  font-size: 0.9rem;
  line-height: 1.42;
}

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

.checklist li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.checklist li span:last-child {
  color: #344054;
  font-size: 0.88rem;
  font-weight: 750;
  line-height: 1.4;
}

.support-grid {
  display: grid;
  gap: 12px;
}

.support-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.support-grid h4 {
  margin: 0 0 10px;
  font-size: 0.98rem;
}

.support-grid ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #344054;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.42;
}

.notes-area {
  min-height: 190px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(#ffffff, #ffffff 31px, #eef2f7 32px),
    #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

.notes-area p {
  margin: 0 0 11px;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.45;
}

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

.resource-filter-panel {
  grid-template-columns: minmax(260px, 1.15fr) repeat(5, minmax(150px, 0.7fr));
}

.resource-library-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 390px);
  gap: 18px;
  align-items: start;
}

.resource-library-panel {
  padding: 0;
}

.resource-library-panel .section-heading {
  padding: 20px 20px 0;
}

.resource-library-table-wrap {
  overflow-x: auto;
  padding: 0 20px 20px;
}

.resource-library-table {
  min-width: 1280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.resource-library-row {
  display: grid;
  grid-template-columns:
    minmax(210px, 1.25fr) 135px minmax(150px, 0.9fr) minmax(130px, 0.8fr)
    minmax(160px, 1fr) 96px 112px 98px minmax(250px, 1.2fr);
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

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

.resource-library-row.is-selected {
  background: color-mix(in srgb, var(--accent-soft) 72%, white);
}

.resource-library-row-head {
  min-height: 44px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #f8fafc;
}

.resource-library-row > span,
.resource-library-row > strong {
  min-width: 0;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.42;
}

.resource-library-row > strong {
  color: var(--ink);
  font-weight: 850;
}

.resource-library-row > .table-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 6px;
}

.resource-library-row > .table-actions button {
  width: 100%;
  min-height: 30px;
  padding-inline: 7px;
}

.resource-preview-panel {
  position: sticky;
  top: 22px;
}

.preview-box {
  display: grid;
  min-height: 170px;
  place-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--accent-strong);
  font-weight: 850;
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, white);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent-soft) 70%, white), #ffffff),
    #ffffff;
}

.preview-box .theme-icon {
  width: 26px;
  height: 26px;
}

.preview-details {
  display: grid;
  gap: 12px;
  margin: 0;
}

.preview-details div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.preview-details div:last-child {
  border-bottom: 0;
}

.preview-details dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
}

.preview-details dd {
  margin: 0;
  color: #344054;
  font-size: 0.88rem;
  font-weight: 730;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.preview-launch-button {
  width: 100%;
  margin-top: 16px;
}

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

.activity-filter-panel {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
}

.activity-filter-panel .filter-field:first-child {
  grid-column: span 2;
}

.activity-engine-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 18px;
  align-items: start;
}

.activity-preview-panel {
  position: sticky;
  top: 22px;
}

.preview-action-stack {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.activity-library-panel {
  padding: 0;
  max-width: 100%;
  overflow: hidden;
}

.activity-library-panel .section-heading {
  padding: 20px 20px 0;
}

.activity-library-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  padding: 0 20px 20px;
  max-width: 100%;
  scrollbar-gutter: stable both-edges;
}

.activity-library-table {
  width: 100%;
  min-width: 1300px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.activity-library-row {
  display: grid;
  grid-template-columns:
    minmax(160px, 1.08fr) 116px minmax(100px, 0.72fr) minmax(100px, 0.68fr)
    minmax(126px, 0.86fr) 70px 64px 76px 60px 84px 190px;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

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

.activity-library-row.is-selected {
  background: color-mix(in srgb, var(--accent-soft) 74%, white);
}

.activity-library-row-head {
  min-height: 44px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #f8fafc;
}

.activity-library-row > span,
.activity-library-row > strong {
  min-width: 0;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.42;
}

.activity-library-row > strong {
  color: var(--ink);
  font-weight: 850;
}

.activity-library-row > .table-actions,
.reading-library-row > .table-actions,
.writing-library-row > .table-actions,
.vocabulary-library-row > .table-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: center;
  gap: 6px;
}

.activity-library-row > .table-actions button,
.reading-library-row > .table-actions button,
.writing-library-row > .table-actions button,
.vocabulary-library-row > .table-actions button {
  min-height: 30px;
  padding: 0 7px;
  font-size: 0.66rem;
  line-height: 1.08;
}

.activity-type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  min-width: 120px;
  padding: 5px 9px;
  color: #1849a9;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
  border-radius: 999px;
  background: #e5edff;
}

.activity-matching {
  color: #075f73;
  background: #e2f8f7;
}

.activity-drag-drop {
  color: #715100;
  background: #fff3cc;
}

.activity-sequencing {
  color: #6941c6;
  background: #f0eaff;
}

.activity-true-false {
  color: #822c54;
  background: #fde7f1;
}

.activity-image-selection {
  color: #6f3d00;
  background: #fff0d5;
}

.activity-sentence-builder {
  color: #155e75;
  background: #cffafe;
}

.activity-flashcards {
  color: #1d4ed8;
  background: #dbeafe;
}

.activity-memory-game {
  color: #166534;
  background: #dcfce7;
}

.activity-builder-panel,
.activity-player-panel {
  margin-top: 18px;
}

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

.builder-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.builder-field-wide {
  grid-column: span 2;
}

.side-column .builder-form-grid,
.side-column .builder-dynamic-grid {
  grid-template-columns: 1fr;
}

.side-column .builder-field-wide {
  grid-column: auto;
}

.builder-field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.builder-field input,
.builder-field textarea,
.builder-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: #344054;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.password-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.password-input-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.password-toggle-button {
  flex: 0 0 82px;
  min-height: 42px;
  padding: 0 12px;
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 850;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 72%, white);
}

.password-toggle-button:hover {
  border-color: var(--accent);
}

.password-requirement-hint {
  margin: 0;
  padding: 9px 10px;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
}

.password-requirement-hint.is-valid {
  color: #166534;
  border-color: color-mix(in srgb, #15803d 30%, white);
  background: #f0fdf4;
}

.password-requirement-hint.is-invalid {
  color: #9f1239;
  border-color: color-mix(in srgb, #e11d48 28%, white);
  background: #fff1f2;
}

.builder-field textarea {
  resize: vertical;
}

.builder-dynamic-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 58%, white);
}

.builder-dynamic-panel .section-heading {
  margin-bottom: 14px;
}

.builder-dynamic-panel h4 {
  margin: 0;
  font-size: 1rem;
}

.builder-action-row,
.activity-player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.builder-action-row .quick-action {
  min-width: min(150px, 100%);
}

.activity-player-panel.is-fullscreen-preview {
  position: fixed;
  z-index: 20;
  inset: 20px;
  overflow: auto;
  border-radius: var(--radius);
  box-shadow: 0 26px 80px rgba(25, 33, 45, 0.28);
}

.activity-player-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.activity-player-header h3 {
  margin: 0 0 5px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.activity-player-header span:not(.status-pill),
.activity-player-topline span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.activity-player-stage {
  min-height: 320px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 12%, color-mix(in srgb, var(--accent-warm) 22%, transparent), transparent 30%),
    linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--accent-soft) 68%, white));
}

.activity-player-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.activity-question h4 {
  margin: 0 0 18px;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.25;
}

.activity-answer-grid,
.image-choice-grid,
.matching-grid,
.activity-drop-grid,
.flashcard-grid,
.memory-card-grid {
  display: grid;
  gap: 12px;
}

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

.activity-answer-grid-two {
  max-width: 520px;
}

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

.matching-grid > div {
  display: grid;
  gap: 10px;
}

.activity-answer-card,
.image-choice-card {
  min-height: 74px;
  padding: 16px;
  color: #344054;
  font-size: 1rem;
  font-weight: 850;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.activity-answer-card:hover,
.activity-answer-card.is-selected,
.image-choice-card:hover,
.image-choice-card.is-selected {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 44%, white);
  background: var(--accent-soft);
}

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

.image-choice-card {
  display: grid;
  min-height: 132px;
  place-items: center;
  gap: 10px;
  text-align: center;
}

.image-choice-card .theme-icon {
  width: 28px;
  height: 28px;
}

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

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

.flashcard,
.memory-card {
  display: grid;
  min-height: 132px;
  align-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.flashcard span,
.memory-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.flashcard strong,
.memory-card strong {
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.35;
}

.flashcard:hover,
.flashcard.is-selected,
.memory-card:hover,
.memory-card.is-selected {
  border-color: color-mix(in srgb, var(--accent) 44%, white);
  background: var(--accent-soft);
}

.activity-drag-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.activity-drag-chip {
  min-height: 48px;
  padding: 0 14px;
  color: var(--accent-strong);
  font-weight: 850;
  border: 1px solid color-mix(in srgb, var(--accent) 36%, white);
  border-radius: 999px;
  background: #ffffff;
  touch-action: none;
  user-select: none;
}

.activity-drag-chip.is-dragging {
  opacity: 0.55;
}

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

.activity-drop-zone {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  min-height: 142px;
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, white);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.authoring-unit-card,
.authoring-theme-card,
.authoring-lesson-card {
  touch-action: pan-y;
}

.activity-drop-zone.is-drag-over {
  background: var(--accent-soft);
}

.activity-drop-zone strong,
.activity-drop-zone > span {
  width: 100%;
}

.activity-drop-zone strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.activity-drop-zone > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.activity-drop-zone .activity-drag-chip {
  background: var(--accent-soft);
}

.sequence-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
}

.sequence-list li {
  min-height: 58px;
  padding: 10px 12px;
  color: #344054;
  font-weight: 850;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.sequence-list li,
.sequence-list li div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sequence-list button,
.activity-player-actions button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--accent-strong);
  font-weight: 850;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, white);
  border-radius: 6px;
  background: #ffffff;
}

.activity-player-actions button:first-child,
.activity-player-actions button:nth-child(2) {
  color: #ffffff;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.activity-progress-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.activity-progress-panel > div {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.activity-progress-panel span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-transform: uppercase;
}

.activity-progress-panel strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.activity-status-summary {
  align-content: center;
}

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

.reading-filter-panel {
  grid-template-columns: minmax(250px, 1.1fr) repeat(6, minmax(130px, 0.7fr));
}

.reading-centre-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 390px);
  gap: 18px;
  align-items: start;
}

.reading-centre-layout .side-column {
  grid-template-columns: 1fr;
}

.mini-action-button,
.collection-action-row button,
.reading-activity-grid button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 850;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, white);
  border-radius: 6px;
  background: #ffffff;
}

.reading-library-panel {
  padding: 0;
  max-width: 100%;
  overflow: hidden;
}

.reading-library-panel .section-heading {
  padding: 20px 20px 0;
}

.reading-library-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  padding: 0 20px 20px;
  max-width: 100%;
  scrollbar-gutter: stable both-edges;
}

.reading-library-table {
  width: 100%;
  min-width: 1210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.reading-library-row {
  display: grid;
  grid-template-columns:
    minmax(160px, 1.1fr) 112px 58px 104px minmax(145px, 1fr)
    minmax(120px, 0.86fr) 90px 90px 220px;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

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

.reading-library-row.is-selected {
  background: color-mix(in srgb, var(--accent-soft) 74%, white);
}

.reading-library-row-head {
  min-height: 44px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
  background: #f8fafc;
}

.reading-library-row > strong,
.reading-library-row > span {
  min-width: 0;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 730;
  line-height: 1.42;
}

.reading-library-row > strong {
  display: grid;
  color: var(--ink);
  font-weight: 850;
}

.reading-library-row span span,
.reading-library-row strong span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.reading-level-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 28px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 900;
  border-radius: 999px;
  background: var(--accent-soft);
}

.reading-collections-panel,
.reading-builder-panel,
.reading-player-panel,
.reading-vocabulary-panel,
.guided-reading-panel,
.independent-reading-panel {
  margin-top: 18px;
}

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

.reading-collection-card,
.independent-reading-card,
.reading-expectation-grid article {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.reading-collection-card.is-selected {
  border-color: color-mix(in srgb, var(--accent) 36%, white);
  background: color-mix(in srgb, var(--accent-soft) 56%, white);
}

.reading-collection-card h4,
.independent-reading-card h4,
.reading-expectation-grid h4 {
  margin: 0;
  font-size: 1rem;
}

.reading-collection-card p,
.independent-reading-card p {
  margin: 5px 0 0;
  color: #475467;
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.42;
}

.reading-collection-card ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.reading-collection-card li {
  color: #344054;
  font-size: 0.86rem;
  font-weight: 800;
}

.reading-collection-card li span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.75rem;
}

.collection-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reading-content-field {
  grid-column: span 4;
}

.reading-player-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.reading-player-header h3 {
  margin: 0 0 5px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.reading-player-header span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.reading-player-stage {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 12%, color-mix(in srgb, var(--accent-warm) 20%, transparent), transparent 30%),
    linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--accent-soft) 62%, white));
}

.reading-placeholder-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reading-placeholder-row span,
.reading-vocabulary-preview > span,
.reading-activity-links span,
.reading-reflection-box span,
.guided-reading-grid span,
.independent-reading-card > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reading-placeholder-row span {
  padding: 7px 10px;
  border: 1px dashed color-mix(in srgb, var(--accent) 28%, white);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
}

.reading-illustration {
  display: grid;
  min-height: 150px;
  place-items: center;
  gap: 10px;
  color: var(--accent-strong);
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, white);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.reading-illustration .theme-icon {
  width: 34px;
  height: 34px;
}

.reading-vocabulary-preview {
  display: grid;
  gap: 10px;
}

.reading-passage {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.reading-passage p {
  margin: 0;
  color: #2e3440;
  font-size: clamp(1.08rem, 1.7vw, 1.32rem);
  font-weight: 720;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.reading-activity-links,
.reading-reflection-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.reading-activity-grid,
.reading-vocab-grid,
.guided-reading-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.reading-activity-grid article,
.reading-vocab-card,
.guided-reading-grid article {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.reading-activity-grid h4,
.reading-vocab-card strong {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
}

.reading-activity-grid p,
.reading-vocab-card p,
.reading-vocab-card span,
.reading-reflection-box p {
  margin: 0;
  color: #475467;
  font-size: 0.88rem;
  font-weight: 720;
  line-height: 1.45;
}

.vocab-illustration {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--accent-strong);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.reading-progress-details {
  margin-top: 16px;
}

.reading-badges-panel .student-badge {
  align-items: stretch;
}

.reading-badges-panel .student-badge > div {
  flex: 1;
}

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

.writing-filter-panel {
  grid-template-columns: minmax(250px, 1.2fr) repeat(4, minmax(140px, 0.7fr));
}

.writing-centre-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 390px);
  gap: 18px;
  align-items: start;
}

.writing-centre-layout .side-column {
  grid-template-columns: 1fr;
}

.writing-library-panel {
  padding: 0;
  max-width: 100%;
  overflow: hidden;
}

.writing-library-panel .section-heading {
  padding: 20px 20px 0;
}

.writing-library-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  padding: 0 20px 20px;
  max-width: 100%;
  scrollbar-gutter: stable both-edges;
}

.writing-library-table {
  width: 100%;
  min-width: 1280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.writing-library-row {
  display: grid;
  grid-template-columns:
    minmax(168px, 1.12fr) 100px minmax(145px, 1fr) minmax(120px, 0.84fr)
    minmax(120px, 0.84fr) 120px 90px 90px 220px;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

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

.writing-library-row.is-selected {
  background: color-mix(in srgb, var(--accent-soft) 74%, white);
}

.writing-library-row-head {
  min-height: 44px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
  background: #f8fafc;
}

.writing-library-row > strong,
.writing-library-row > span {
  min-width: 0;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 730;
  line-height: 1.42;
}

.writing-library-row > strong {
  display: grid;
  color: var(--ink);
  font-weight: 850;
}

.writing-library-row span span,
.writing-library-row strong span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.writing-projects-panel,
.writing-builder-panel,
.writing-workshop-panel,
.writing-planner-panel,
.writing-sentence-panel,
.writing-template-panel,
.writing-vocabulary-panel,
.writing-reading-panel,
.writing-progress-panel,
.writing-badges-panel,
.writing-homework-panel,
.reading-writing-bridge-panel,
.homework-writing-panel {
  margin-top: 18px;
}

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

.writing-project-card,
.writing-template-card,
.planner-preview-grid > div {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.writing-project-card.is-selected,
.writing-template-card.is-selected {
  border-color: color-mix(in srgb, var(--accent) 36%, white);
  background: color-mix(in srgb, var(--accent-soft) 56%, white);
}

.writing-project-card h4,
.writing-template-card h4 {
  margin: 0;
  font-size: 1rem;
}

.writing-project-card p {
  margin: 5px 0 0;
  color: #475467;
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.42;
}

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

.writing-stage-list div,
.planner-preview-grid > div {
  min-width: 0;
}

.writing-stage-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.writing-stage-list span,
.planner-preview-grid span,
.writing-template-card > span,
.writing-prompt-card span,
.writing-support-grid span,
.writing-draft-area span,
.writing-sentence-stage > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.writing-prompt-field {
  grid-column: span 4;
}

.writing-workshop-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.writing-workshop-header h3 {
  margin: 0 0 5px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.writing-workshop-header span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.writing-workshop-stage,
.writing-sentence-stage {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent-warm) 20%, transparent), transparent 30%),
    linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--accent-soft) 62%, white));
}

.writing-prompt-card,
.writing-support-grid article {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.writing-prompt-card p,
.writing-support-grid p {
  margin: 0;
  color: #344054;
  font-size: 0.96rem;
  font-weight: 740;
  line-height: 1.5;
}

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

.writing-draft-area {
  display: grid;
  gap: 8px;
}

.writing-draft-area textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  padding: 14px;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  line-height: 1.55;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.planner-preview-grid {
  margin: 14px 0;
}

.planner-preview-grid strong {
  color: #344054;
  font-size: 0.9rem;
}

.writing-template-card .word-chip-list {
  margin: 0;
}

.writing-vocab-grid {
  grid-template-columns: 1fr;
}

.writing-badges-panel .student-badge {
  align-items: stretch;
}

.writing-badges-panel .student-badge > div {
  flex: 1;
}

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

.vocabulary-filter-panel {
  grid-template-columns: minmax(250px, 1.2fr) repeat(5, minmax(130px, 0.7fr));
}

.vocabulary-centre-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 390px);
  gap: 18px;
  align-items: start;
}

.vocabulary-centre-layout .side-column {
  grid-template-columns: 1fr;
}

.vocabulary-library-panel {
  padding: 0;
  max-width: 100%;
  overflow: hidden;
}

.vocabulary-library-panel .section-heading {
  padding: 20px 20px 0;
}

.vocabulary-library-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  padding: 0 20px 20px;
  max-width: 100%;
  scrollbar-gutter: stable both-edges;
}

.vocabulary-library-table {
  width: 100%;
  min-width: 1180px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.vocabulary-library-row {
  display: grid;
  grid-template-columns:
    minmax(165px, 1.12fr) minmax(145px, 1fr) minmax(130px, 0.9fr) 90px
    minmax(145px, 1fr) 90px 90px 220px;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

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

.vocabulary-library-row.is-selected {
  background: color-mix(in srgb, var(--accent-soft) 74%, white);
}

.vocabulary-library-row-head {
  min-height: 44px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
  background: #f8fafc;
}

.vocabulary-library-row > strong,
.vocabulary-library-row > span {
  min-width: 0;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 730;
  line-height: 1.42;
}

.vocabulary-library-row > strong {
  display: grid;
  color: var(--ink);
  font-weight: 850;
}

.vocabulary-library-row span span,
.vocabulary-library-row strong span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.vocabulary-sets-panel,
.vocabulary-builder-panel,
.vocabulary-student-hub-panel,
.vocabulary-activities-panel,
.vocabulary-progress-panel,
.vocabulary-badges-panel,
.vocabulary-homework-panel,
.vocabulary-reading-panel,
.vocabulary-writing-panel,
.reading-vocabulary-bridge-panel,
.writing-vocabulary-bridge-panel,
.homework-vocabulary-panel {
  margin-top: 18px;
}

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

.vocabulary-set-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.vocabulary-set-card.is-selected {
  border-color: color-mix(in srgb, var(--accent) 36%, white);
  background: color-mix(in srgb, var(--accent-soft) 56%, white);
}

.vocabulary-set-card h4 {
  margin: 0;
  font-size: 1rem;
}

.vocabulary-set-card p {
  margin: 5px 0 0;
  color: #475467;
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.42;
}

.vocabulary-builder-grid .builder-field-wide {
  grid-column: span 2;
}

.vocabulary-hub-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.vocabulary-hub-header h3 {
  margin: 0 0 5px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.vocabulary-hub-header span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.vocabulary-practice-stage {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent-warm) 20%, transparent), transparent 30%),
    linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--accent-soft) 62%, white));
}

.vocabulary-audio-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, white);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
}

.vocabulary-audio-placeholder span,
.vocabulary-word-card span,
.vocabulary-activity-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.vocabulary-audio-placeholder strong {
  color: #344054;
  font-size: 0.92rem;
}

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

.vocabulary-word-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  min-height: 146px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.vocabulary-picture-placeholder {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  color: var(--accent-strong);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.vocabulary-word-card h4,
.vocabulary-word-card p,
.vocabulary-word-card strong {
  margin: 0;
}

.vocabulary-word-card h4 {
  margin-top: 4px;
  color: var(--accent-strong);
  font-size: 1.18rem;
}

.vocabulary-word-card p,
.vocabulary-word-card strong,
.vocabulary-activity-note {
  color: #475467;
  font-size: 0.88rem;
  font-weight: 720;
  line-height: 1.45;
}

.vocabulary-word-card strong {
  display: block;
  margin-top: 8px;
}

.vocabulary-activity-note {
  margin: 0 0 14px;
  text-transform: none;
}

.vocabulary-activity-grid {
  margin-bottom: 14px;
}

.vocabulary-badges-panel .student-badge {
  align-items: stretch;
}

.vocabulary-badges-panel .student-badge > div {
  flex: 1;
}

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

.submission-filter-panel {
  grid-template-columns: minmax(280px, 1.3fr) repeat(2, minmax(150px, 0.7fr));
}

.submission-system-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 390px);
  gap: 18px;
  align-items: start;
}

.submission-system-layout .side-column {
  grid-template-columns: 1fr;
}

.submission-list-panel,
.submission-workspace-panel,
.submission-review-panel,
.submission-detail-panel,
.submission-progress-panel,
.submission-badges-panel,
.submission-homework-panel,
.reading-submission-bridge-panel,
.writing-submission-bridge-panel,
.homework-submission-panel {
  margin-top: 18px;
}

.submission-list-panel {
  margin-top: 0;
}

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

.submission-assignment-card {
  display: grid;
  gap: 12px;
  min-height: 210px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.submission-assignment-card.is-selected {
  border-color: color-mix(in srgb, var(--accent) 36%, white);
  background: color-mix(in srgb, var(--accent-soft) 56%, white);
}

.submission-assignment-card p {
  margin: 0;
  color: #475467;
  font-size: 0.88rem;
  font-weight: 720;
  line-height: 1.45;
}

.submission-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.submission-workspace-header h3 {
  margin: 0 0 5px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.submission-workspace-header span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.submission-workspace-stage {
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 28px);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent-warm) 20%, transparent), transparent 30%),
    linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--accent-soft) 62%, white));
}

.submission-instructions-card,
.submission-upload-card,
.submission-text-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.submission-instructions-card > span,
.submission-upload-card span,
.submission-text-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.submission-instructions-card p {
  margin: 0;
  color: #344054;
  font-size: 0.96rem;
  font-weight: 740;
  line-height: 1.5;
}

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

.submission-upload-card {
  align-content: center;
  min-height: 172px;
  color: var(--accent-strong);
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, white);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
}

.submission-upload-card .theme-icon {
  width: 32px;
  height: 32px;
}

.submission-upload-card strong {
  color: var(--ink);
  font-size: 1rem;
}

.submission-upload-card input {
  width: 100%;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 750;
}

.submission-text-card {
  grid-column: span 1;
}

.submission-text-card textarea,
.submission-feedback-field textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  padding: 12px;
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.submission-review-panel {
  padding: 0;
}

.submission-review-panel .section-heading {
  padding: 20px 20px 0;
}

.submission-review-table-wrap {
  overflow-x: auto;
  padding: 0 20px 20px;
}

.submission-review-table {
  min-width: 1060px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.submission-review-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) 150px 130px 120px minmax(220px, 1fr) minmax(330px, 1.25fr);
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

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

.submission-review-row.is-selected {
  background: color-mix(in srgb, var(--accent-soft) 74%, white);
}

.submission-review-row-head {
  min-height: 44px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 850;
  text-transform: uppercase;
  background: #f8fafc;
}

.submission-review-row > strong,
.submission-review-row > span {
  min-width: 0;
  color: #475467;
  font-size: 0.82rem;
  font-weight: 730;
  line-height: 1.42;
}

.submission-review-row > strong {
  display: grid;
  color: var(--ink);
  font-weight: 850;
}

.submission-review-row span span,
.submission-review-row strong span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.submission-link-stack {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.submission-link-stack button {
  min-height: 38px;
  padding: 0 12px;
  color: var(--accent-strong);
  font-weight: 850;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, white);
  border-radius: 6px;
  background: #ffffff;
}

.submission-detail-panel .builder-field {
  margin-top: 12px;
}

.submission-badges-panel .student-badge {
  align-items: stretch;
}

.submission-badges-panel .student-badge > div {
  flex: 1;
}

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

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

.reward-system-layout .side-column {
  grid-template-columns: 1fr;
}

.reward-profile-panel,
.reward-automation-panel,
.reward-teacher-panel,
.reward-history-panel,
.reward-progress-panel,
.class-rewards-panel,
.reward-shop-panel {
  margin-top: 18px;
}

.reward-profile-panel {
  margin-top: 0;
}

.reward-profile-header {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.reward-profile-header > strong {
  color: var(--accent-strong);
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.reward-avatar {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 900;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}

.reward-profile-header h3,
.reward-level-card h4,
.reward-source-card strong,
.reward-shop-card h4,
.class-goal-card h4 {
  margin: 0;
}

.reward-profile-header span,
.reward-level-card span,
.reward-source-card span,
.class-points-grid span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reward-level-card {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 14px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--accent-warm) 18%, transparent), transparent 28%),
    linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--accent-soft) 62%, white));
}

.reward-level-card p {
  margin: 6px 0 0;
  color: #475467;
  font-size: 0.9rem;
  font-weight: 720;
  line-height: 1.45;
}

.reward-badge-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.reward-badge-chip-list span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 850;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  border-radius: 999px;
  background: var(--accent-soft);
}

.reward-badge-chip-list .theme-icon {
  width: 14px;
  height: 14px;
}

.reward-source-grid,
.reward-shop-grid,
.class-points-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.reward-source-card,
.reward-shop-card,
.class-points-grid article,
.class-goal-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.reward-source-card p {
  margin: 0;
  color: #475467;
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.42;
}

.reward-control-grid {
  display: grid;
  grid-template-columns: 140px 190px minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.reward-note-field {
  min-width: 0;
}

.reward-category-builder {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 56%, white);
}

.reward-history-list,
.class-goal-list {
  display: grid;
  gap: 10px;
}

.reward-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.reward-history-row strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.reward-history-row > strong:last-child {
  color: #047857;
  font-size: 1rem;
}

.reward-history-row > strong.is-negative {
  color: #b42318;
}

.reward-history-row span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.class-points-grid {
  margin-bottom: 14px;
}

.class-points-grid strong {
  color: var(--accent-strong);
  font-size: 1.25rem;
}

.class-goal-card .progress-stack {
  margin-top: 0;
}

.reward-shop-card .word-chip-list {
  margin: 0;
}

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

.analytics-filter-panel {
  grid-template-columns: repeat(6, minmax(130px, 1fr));
}

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

.analytics-dashboard-layout .side-column {
  grid-template-columns: 1fr;
}

.analytics-profile-panel,
.analytics-student-list-panel,
.class-analytics-panel,
.intervention-panel,
.analytics-reports-panel,
.analytics-module-panel {
  margin-top: 18px;
}

.analytics-profile-panel {
  margin-top: 0;
}

.analytics-profile-header {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.analytics-profile-header h3,
.analytics-profile-grid strong,
.analytics-student-card strong,
.analytics-chart-card h4,
.analytics-report-card h4,
.analytics-module-grid strong,
.intervention-card strong {
  margin: 0;
}

.analytics-profile-header span:not(.status-pill),
.analytics-profile-grid span,
.analytics-student-card span:not(.status-pill),
.analytics-module-grid span,
.analytics-note span,
.intervention-card span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.analytics-profile-grid,
.analytics-student-grid,
.analytics-chart-grid,
.analytics-report-grid,
.analytics-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analytics-profile-grid article,
.analytics-student-card,
.analytics-chart-card,
.analytics-report-card,
.analytics-module-grid article,
.intervention-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.analytics-profile-grid strong,
.analytics-module-grid strong {
  color: var(--ink);
  font-size: 0.96rem;
  overflow-wrap: anywhere;
}

.analytics-student-card.is-selected {
  border-color: color-mix(in srgb, var(--accent) 36%, white);
  background: color-mix(in srgb, var(--accent-soft) 56%, white);
}

.analytics-student-card button,
.intervention-card button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 850;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, white);
  border-radius: 6px;
  background: #ffffff;
}

.analytics-chart-card {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
}

.analytics-chart-ring {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 52%, transparent 54%),
    conic-gradient(var(--accent) var(--progress), #e6edf4 0);
}

.analytics-chart-ring span {
  color: var(--accent-strong);
  font-size: 0.92rem;
  font-weight: 900;
}

.analytics-chart-card h4 {
  font-size: 0.98rem;
}

.analytics-summary-details {
  margin-top: 14px;
}

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

.intervention-card {
  background:
    radial-gradient(circle at 92% 10%, color-mix(in srgb, var(--accent-warm) 18%, transparent), transparent 30%),
    #ffffff;
}

.analytics-report-card p,
.analytics-module-grid p {
  margin: 0;
  color: #475467;
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.42;
}

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

.analytics-module-grid article {
  min-height: 104px;
}

.analytics-module-grid strong {
  color: var(--accent-strong);
  font-size: 1.22rem;
}

.analytics-note {
  margin-top: 16px;
}

.webapp-overview,
.content-overview {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.webapp-filter-panel {
  grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(130px, 0.8fr));
}

.content-filter-panel {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
}

.webapp-framework-layout,
.content-builder-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
  gap: 18px;
  align-items: start;
}

.webapp-framework-layout .side-column,
.content-builder-layout .side-column {
  grid-template-columns: 1fr;
}

.webapp-library-panel,
.webapp-builder-panel,
.webapp-preview-panel,
.webapp-integration-panel,
.webapp-progress-panel,
.published-content-panel,
.content-library-panel,
.content-builder-panel,
.content-preview-panel,
.content-integration-panel,
.homework-webapp-panel,
.lesson-webapp-panel {
  margin-top: 18px;
}

.webapp-library-panel,
.content-library-panel,
.webapp-preview-panel,
.content-preview-panel {
  margin-top: 0;
}

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

.webapp-card,
.content-card,
.published-content-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.webapp-card.is-selected,
.content-card.is-selected {
  border-color: color-mix(in srgb, var(--accent) 36%, white);
  background: color-mix(in srgb, var(--accent-soft) 56%, white);
}

.webapp-card h4,
.webapp-card p,
.content-card h4,
.content-card p,
.published-content-card h4,
.published-content-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.webapp-card p,
.content-card p,
.published-content-card p {
  color: #475467;
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.42;
}

.webapp-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.webapp-preview-header h3 {
  margin: 0 0 5px;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
}

.webapp-preview-header span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

.webapp-preview-stage {
  display: grid;
  min-height: 210px;
  place-items: center;
  gap: 10px;
  padding: 18px;
  text-align: center;
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, white);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 12%, color-mix(in srgb, var(--accent-warm) 18%, transparent), transparent 30%),
    linear-gradient(135deg, #ffffff, color-mix(in srgb, var(--accent-soft) 62%, white));
}

.webapp-preview-stage .theme-icon {
  width: 36px;
  height: 36px;
}

.webapp-preview-stage strong {
  color: var(--accent-strong);
  font-size: 1.08rem;
}

.webapp-preview-stage p {
  max-width: 280px;
  margin: 0;
  color: #475467;
  font-size: 0.88rem;
  font-weight: 720;
  line-height: 1.42;
}

.content-preview-stage {
  margin-bottom: 14px;
}

.assessment-overview,
.communication-overview,
.resource-builder-overview,
.authoring-overview,
.portfolio-overview,
.ai-overview,
.reporting-overview {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.assessment-filter-panel {
  grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(130px, 0.8fr));
}

.portfolio-filter-panel {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.portfolio-filter-panel .filter-field:first-child {
  grid-column: span 2;
}

.communication-filter-panel,
.resource-builder-filter-panel,
.authoring-filter-panel,
.reporting-filter-panel {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.assessment-centre-layout,
.communication-centre-layout,
.resource-builder-layout,
.curriculum-authoring-layout,
.portfolio-layout,
.ai-assistant-layout,
.reporting-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
  gap: 18px;
  align-items: start;
}

.assessment-centre-layout .side-column,
.communication-centre-layout .side-column,
.resource-builder-layout .side-column,
.curriculum-authoring-layout .side-column,
.portfolio-layout .side-column,
.ai-assistant-layout .side-column,
.reporting-layout .side-column {
  grid-template-columns: 1fr;
}

.assessment-library-panel,
.assessment-builder-panel,
.assessment-student-panel,
.assessment-record-panel,
.assessment-progress-panel,
.assessment-integration-panel,
.linked-assessments-panel,
.communication-list-panel,
.communication-composer-panel,
.message-template-panel,
.parent-communication-preview-panel,
.communication-integration-panel,
.access-restrictions-panel,
.homework-communication-panel,
.built-resource-library-panel,
.resource-builder-form-panel,
.printable-preview-panel,
.resource-builder-integration-panel,
.generated-resource-links-panel,
.authoring-hierarchy-panel,
.authoring-detail-panel,
.curriculum-template-panel,
.authoring-integration-panel,
.portfolio-library-panel,
.portfolio-detail-panel,
.portfolio-student-panel,
.portfolio-parent-panel,
.portfolio-summary-panel,
.portfolio-integration-panel,
.ai-generator-panel,
.ai-output-panel,
.ai-saved-panel,
.ai-safety-panel,
.ai-integration-panel {
  margin-top: 18px;
}

.assessment-library-panel,
.assessment-student-panel,
.message-template-panel,
.parent-communication-preview-panel,
.built-resource-library-panel,
.printable-preview-panel,
.authoring-hierarchy-panel,
.authoring-detail-panel,
.portfolio-library-panel,
.portfolio-detail-panel,
.ai-generator-panel,
.ai-safety-panel {
  margin-top: 0;
}

.assessment-card-grid,
.communication-card-grid,
.parent-message-stack,
.built-resource-grid,
.portfolio-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.assessment-card,
.communication-card,
.message-template-preview,
.parent-message-card,
.built-resource-card,
.portfolio-card,
.authoring-unit-card,
.authoring-theme-card,
.authoring-lesson-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.assessment-card.is-selected,
.communication-card.is-selected,
.built-resource-card.is-selected,
.portfolio-card.is-selected,
.authoring-unit-card.is-selected,
.authoring-theme-card.is-selected,
.authoring-lesson-card.is-selected {
  border-color: color-mix(in srgb, var(--accent) 36%, white);
  background: color-mix(in srgb, var(--accent-soft) 56%, white);
}

.assessment-card h4,
.assessment-card p,
.communication-card h4,
.communication-card p,
.message-template-preview h4,
.message-template-preview p,
.parent-message-card h4,
.parent-message-card p,
.portfolio-card h4,
.portfolio-card p {
  margin: 0;
  overflow-wrap: anywhere;
}

.assessment-card p,
.communication-card p,
.message-template-preview p,
.parent-message-card p,
.portfolio-card p {
  color: #475467;
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.42;
}

.portfolio-card .collection-action-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.45fr) minmax(150px, 1fr);
  gap: 7px;
}

.portfolio-card .collection-action-row button {
  width: 100%;
  min-height: 34px;
  padding-inline: 8px;
  font-size: 0.72rem;
}

.assessment-card .collection-action-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 7px;
}

.assessment-card .collection-action-row button {
  width: 100%;
  min-height: 34px;
  padding-inline: 8px;
  font-size: 0.72rem;
}

.built-resource-card h4,
.built-resource-card p,
.authoring-unit-card h4,
.authoring-theme-card strong,
.authoring-lesson-card strong {
  margin: 0;
  overflow-wrap: anywhere;
}

.built-resource-card p {
  color: #475467;
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.42;
}

.assessment-preview-stage {
  margin-bottom: 14px;
}

.portfolio-preview-stage,
.ai-preview-stage {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 18px;
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 86% 10%, color-mix(in srgb, var(--accent-warm) 16%, transparent), transparent 30%),
    color-mix(in srgb, var(--accent-soft) 48%, white);
}

.portfolio-preview-stage .theme-icon,
.ai-preview-stage .theme-icon {
  width: 38px;
  height: 38px;
}

.portfolio-preview-stage strong,
.ai-preview-stage strong {
  color: var(--accent-strong);
  font-size: 1rem;
}

.portfolio-preview-stage p,
.ai-preview-stage p {
  max-width: 310px;
  margin: 0;
  color: #475467;
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.42;
}

.portfolio-rule-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.portfolio-rule-list span {
  padding: 9px 10px;
  color: #475467;
  font-size: 0.78rem;
  font-weight: 780;
  line-height: 1.35;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent-soft) 34%, white);
}

.portfolio-summary-ready {
  margin: 14px 0;
}

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

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

.reporting-filter-panel {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.report-student-panel,
.report-class-panel,
.report-curriculum-panel,
.report-intervention-panel,
.report-portfolio-panel,
.report-assessment-panel,
.report-export-panel {
  margin-top: 18px;
}

.report-student-panel,
.report-class-panel,
.report-curriculum-panel,
.report-intervention-panel {
  margin-top: 0;
}

.report-profile-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 38%, white);
}

.report-profile-card h4,
.report-profile-card p,
.report-comment-box p,
.report-progress-item p,
.intervention-card h4,
.intervention-card p,
.report-gap-grid h4,
.report-gap-grid p {
  margin: 0;
}

.report-profile-card h4 {
  color: var(--ink);
  font-size: 1rem;
}

.report-profile-card p,
.report-comment-box p,
.report-progress-item p,
.intervention-card p,
.report-gap-grid p {
  color: #475467;
  font-size: 0.86rem;
  font-weight: 720;
  line-height: 1.42;
}

.report-profile-card > strong {
  color: var(--accent-strong);
  font-size: 1.05rem;
}

.report-avatar {
  width: 48px;
  height: 48px;
}

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

.report-progress-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.report-comment-box,
.intervention-card,
.report-gap-grid article {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.report-comment-box span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.report-export-ready {
  margin: 14px 0;
}

.printable-sheet-preview {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px dashed color-mix(in srgb, var(--accent) 42%, white);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 90% 12%, color-mix(in srgb, var(--accent-warm) 16%, transparent), transparent 32%),
    #ffffff;
}

.printable-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.printable-sheet-header strong {
  color: var(--accent-strong);
  font-size: 1.1rem;
}

.printable-sheet-header span,
.printable-sheet-preview p,
.authoring-theme-card span,
.authoring-lesson-card span {
  color: #475467;
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.4;
}

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

.printable-section-grid article {
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent-soft) 42%, white);
}

.printable-section-grid span,
.printable-section-grid strong {
  display: block;
}

.printable-section-grid span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.printable-section-grid strong {
  margin-top: 8px;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.35;
}

.authoring-unit-stack,
.authoring-theme-stack,
.authoring-lesson-stack {
  display: grid;
  gap: 12px;
}

.authoring-theme-stack {
  padding-left: 14px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 24%, white);
}

.authoring-lesson-stack {
  padding-left: 14px;
}

.authoring-theme-card,
.authoring-lesson-card {
  background: color-mix(in srgb, var(--accent-soft) 28%, white);
}

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

.authoring-lesson-card .authoring-control-row {
  grid-column: 1 / -1;
}

.authoring-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.authoring-control-row button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 880;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, white);
  border-radius: 6px;
  background: #ffffff;
}

.detail-actions {
  margin-top: 14px;
}

.rubric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.rubric-grid article {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, white);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 48%, white);
}

.rubric-grid article > span:first-child,
.message-template-preview > span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rubric-grid strong {
  color: var(--accent-strong);
  font-size: 1rem;
}

.assessment-checklist {
  display: grid;
  gap: 9px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.communication-builder-grid .toggle-field {
  align-content: end;
}

.toggle-field input {
  width: 22px;
  height: 22px;
}

.parent-message-stack {
  grid-template-columns: 1fr;
}

.parent-view-grid .parent-communication-preview-panel {
  grid-column: 1 / -1;
}

.published-content-card button {
  min-height: 36px;
  padding: 0 12px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 850;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, white);
  border-radius: 6px;
  background: #ffffff;
}

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

.student-welcome-copy h2 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

.student-avatar-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 170px;
}

.student-avatar {
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  color: #ffffff;
  font-size: 2.6rem;
  font-weight: 900;
  border: 8px solid rgba(255, 255, 255, 0.86);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-strong), var(--accent));
  box-shadow: 0 20px 40px rgba(25, 33, 45, 0.16);
}

.student-avatar-wrap > span {
  position: absolute;
  right: 32px;
  bottom: 22px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(25, 33, 45, 0.14);
}

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

.student-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 390px);
  gap: 18px;
  align-items: start;
}

.student-learning-panel {
  min-height: 500px;
}

.student-learning-panel .section-heading h3 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.student-learning-goal {
  max-width: 780px;
  margin: 0 0 18px;
  color: #344054;
  font-size: 1.12rem;
  font-weight: 750;
  line-height: 1.55;
}

.student-learning-card {
  display: grid;
  min-height: 160px;
  align-items: center;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, color-mix(in srgb, var(--accent-soft) 72%, white), #ffffff),
    #ffffff;
}

.student-learning-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.student-learning-card strong {
  display: block;
  margin-top: 7px;
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.student-learning-card p,
.student-homework-summary {
  margin: 9px 0 0;
  color: #475467;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
}

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

.student-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  gap: 10px;
  padding: 0 16px;
  color: var(--accent-strong);
  font-size: 0.98rem;
  font-weight: 900;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, white);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.student-action-primary {
  color: #ffffff;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.student-side-panel .student-action-button {
  width: 100%;
  margin-top: 14px;
}

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

.student-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.student-badge.is-earned {
  border-color: color-mix(in srgb, var(--accent) 28%, white);
  background: var(--accent-soft);
}

.student-badge strong,
.student-badge span {
  display: block;
}

.student-badge strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.student-badge span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

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

.student-lesson-hero .student-back-button {
  width: fit-content;
  min-width: 230px;
  margin-top: 16px;
}

.student-lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 390px);
  gap: 18px;
  align-items: start;
}

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

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

.student-goal-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.student-goal-card p {
  margin: 0;
  color: #344054;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.45;
}

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

.student-vocabulary-card {
  display: grid;
  gap: 9px;
  min-height: 122px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.student-vocabulary-card strong {
  color: var(--accent-strong);
  font-size: 1.15rem;
}

.student-vocabulary-card span {
  color: #475467;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.4;
}

.student-activity-grid {
  display: grid;
  gap: 12px;
}

.student-activity-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.student-activity-card h4,
.student-activity-card p {
  margin: 0;
}

.student-activity-card h4 {
  font-size: 1.1rem;
}

.student-activity-card p {
  margin: 7px 0 12px;
  color: #475467;
  font-size: 0.94rem;
  font-weight: 730;
  line-height: 1.45;
}

.student-resource-stack {
  display: grid;
  gap: 10px;
}

.student-resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.student-resource-row > div {
  flex: 1 1 180px;
  min-width: 0;
}

.student-resource-row strong {
  display: block;
  margin-bottom: 7px;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
}

.student-resource-row span:not(.status-pill) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.student-resource-row button {
  flex: 0 1 auto;
  min-height: 40px;
  max-width: 100%;
  padding: 0 14px;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.15;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, white);
  border-radius: var(--radius);
  background: var(--accent-soft);
  overflow-wrap: anywhere;
}

.student-start-button {
  width: 100%;
  margin-top: 14px;
}

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

.homework-hub-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.homework-status-control {
  display: grid;
  gap: 7px;
}

.homework-status-control span,
.homework-support-grid span,
.presentation-support span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.homework-status-control select {
  min-height: 48px;
  padding: 0 12px;
  color: var(--ink);
  font-weight: 850;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.homework-support-grid {
  display: grid;
  gap: 12px;
}

.homework-support-grid > div {
  display: grid;
  gap: 8px;
}

.homework-reading-panel {
  margin-top: 18px;
}

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

.homework-reading-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.homework-reading-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 0.98rem;
}

.homework-reading-card span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.homework-reading-card p {
  margin: 0;
  color: #475467;
  font-size: 0.88rem;
  font-weight: 720;
  line-height: 1.45;
}

.upload-placeholder {
  min-height: 72px;
  padding: 14px;
  color: #475467;
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.45;
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, white);
  border-radius: var(--radius);
  background: #ffffff;
}

.progress-ring-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.progress-ring-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 170px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(25, 33, 45, 0.06);
}

.progress-ring {
  display: grid;
  width: 112px;
  height: 112px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #ffffff 0 55%, transparent 56%),
    conic-gradient(var(--accent) var(--progress), #e9eef5 0);
}

.progress-ring span {
  color: var(--accent-strong);
  font-size: 1.2rem;
  font-weight: 900;
}

.progress-ring-card h4 {
  margin: 0;
  font-size: 1.2rem;
}

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

.skill-progress-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.skill-progress-card strong {
  font-size: 1rem;
}

.skill-progress-card > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

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

.badge-gallery-card {
  display: grid;
  gap: 12px;
  min-height: 260px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(25, 33, 45, 0.06);
}

.badge-gallery-card.is-earned {
  border-color: color-mix(in srgb, var(--accent) 32%, white);
  background: var(--accent-soft);
}

.badge-gallery-card.is-locked {
  opacity: 0.72;
}

.badge-medal {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(25, 33, 45, 0.08);
}

.badge-gallery-card h3,
.badge-gallery-card p {
  margin: 0;
}

.badge-gallery-card h3 {
  font-size: 1.08rem;
}

.badge-gallery-card p {
  color: #475467;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.42;
}

.badge-gallery-card > strong {
  color: var(--accent-strong);
  font-size: 0.9rem;
}

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

.student-hero,
.student-learning-card,
.student-goal-card,
.student-vocabulary-card,
.student-activity-card,
.student-resource-row,
.homework-hub-card,
.homework-reading-card,
.progress-ring-card,
.skill-progress-card,
.badge-gallery-card,
.parent-message-card,
.portfolio-card {
  animation: soft-pop 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.student-avatar,
.student-avatar-wrap > span,
.badge-medal,
.progress-ring {
  animation: gentle-float 4200ms ease-in-out infinite;
}

.student-avatar-wrap > span,
.badge-medal {
  animation-delay: 420ms;
}

.student-learning-card,
.student-goal-card,
.student-vocabulary-card,
.student-activity-card,
.student-resource-row,
.homework-hub-card,
.homework-reading-card,
.progress-ring-card,
.skill-progress-card,
.badge-gallery-card,
.parent-message-card,
.portfolio-card {
  transition:
    transform 190ms ease,
    box-shadow 190ms ease,
    border-color 190ms ease,
    background-color 190ms ease;
}

.student-learning-card:hover,
.student-goal-card:hover,
.student-vocabulary-card:hover,
.student-activity-card:hover,
.student-resource-row:hover,
.homework-hub-card:hover,
.homework-reading-card:hover,
.progress-ring-card:hover,
.skill-progress-card:hover,
.badge-gallery-card:hover,
.parent-message-card:hover,
.portfolio-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 32%, white);
  box-shadow: 0 18px 38px rgba(25, 33, 45, 0.1);
}

.student-action-button,
.student-resource-row button,
.student-start-button,
.homework-reading-card button,
.portfolio-card .collection-action-row button,
.published-content-card button {
  transition:
    transform 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease,
    color 150ms ease;
}

.student-action-button:hover,
.student-resource-row button:hover,
.student-start-button:hover,
.homework-reading-card button:hover,
.portfolio-card .collection-action-row button:hover,
.published-content-card button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(25, 33, 45, 0.12);
}

.student-action-button:active,
.student-resource-row button:active,
.student-start-button:active,
.homework-reading-card button:active,
.portfolio-card .collection-action-row button:active,
.published-content-card button:active {
  transform: translateY(0) scale(0.985);
}

.student-badge.is-earned,
.badge-gallery-card.is-earned {
  animation: earned-glow 3600ms ease-in-out infinite;
}

.student-badge.is-earned .theme-icon,
.badge-gallery-card.is-earned .badge-medal {
  transform-origin: center;
}

.student-action-grid > *:nth-child(2),
.student-goal-grid > *:nth-child(2),
.student-vocabulary-grid > *:nth-child(2),
.homework-card-grid > *:nth-child(2),
.parent-view-grid > *:nth-child(2),
.badge-gallery-grid > *:nth-child(2),
.portfolio-card-grid > *:nth-child(2) {
  animation-delay: 70ms;
}

.student-action-grid > *:nth-child(3),
.student-vocabulary-grid > *:nth-child(3),
.progress-ring-grid > *:nth-child(3),
.badge-gallery-grid > *:nth-child(3),
.portfolio-card-grid > *:nth-child(3) {
  animation-delay: 120ms;
}

.badge-gallery-grid > *:nth-child(n + 4),
.portfolio-card-grid > *:nth-child(n + 4) {
  animation-delay: 165ms;
}

.presentation-main {
  min-height: 100vh;
}

.presentation-stage {
  display: grid;
  min-height: calc(100vh - 80px);
  gap: 20px;
  padding: clamp(20px, 4vw, 42px);
  color: var(--ink);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
  border-radius: var(--radius);
  background:
    linear-gradient(120deg, var(--hero-a), var(--hero-b)),
    #ffffff;
  box-shadow: var(--shadow);
}

.presentation-stage:fullscreen {
  overflow: auto;
  border-radius: 0;
}

.presentation-stage.is-fullscreen-preview {
  position: fixed;
  z-index: 20;
  inset: 0;
  min-height: 100vh;
  overflow: auto;
  border-radius: 0;
}

.presentation-topbar,
.presentation-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.presentation-topbar h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.presentation-timer {
  display: grid;
  min-width: 150px;
  padding: 12px 16px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
}

.presentation-timer span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.presentation-timer strong {
  font-size: 1.8rem;
}

.presentation-slide {
  display: grid;
  min-height: 360px;
  align-content: center;
  gap: 18px;
  padding: clamp(20px, 5vw, 56px);
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, white);
  border-radius: var(--radius);
  background: #ffffff;
}

.presentation-slide p,
.presentation-slide h1,
.presentation-slide strong,
.presentation-slide span {
  margin: 0;
}

.presentation-slide p {
  color: var(--muted);
  font-weight: 900;
}

.presentation-slide h1 {
  font-size: clamp(2.6rem, 7vw, 5.8rem);
}

.presentation-slide strong {
  color: var(--accent-strong);
  font-size: clamp(1.35rem, 3vw, 2.3rem);
  line-height: 1.25;
}

.presentation-slide span {
  color: #475467;
  font-size: clamp(1.05rem, 2vw, 1.5rem);
  font-weight: 750;
}

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

.presentation-support > div {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.presentation-controls button {
  min-height: 48px;
  padding: 0 16px;
  color: var(--accent-strong);
  font-weight: 900;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, white);
  border-radius: var(--radius);
  background: #ffffff;
}

.header-link-button,
.link-button {
  min-height: 38px;
  max-width: 100%;
  padding: 0 12px;
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1.15;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent-soft) 68%, white);
  overflow-wrap: anywhere;
}

.header-link-button:hover,
.link-button:hover {
  border-color: var(--accent);
}

.link-button {
  width: fit-content;
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-shell {
  --accent: #3f6df6;
  --accent-strong: #193ea8;
  --accent-soft: #e9efff;
  --accent-warm: #ffcb5d;
  --accent-cool: #2db7c4;
  --hero-a: #f8fbff;
  --hero-b: #e9efff;
  min-height: 100vh;
  padding: clamp(18px, 4vw, 42px);
  background:
    radial-gradient(circle at 12% 14%, color-mix(in srgb, var(--accent-soft) 74%, transparent), transparent 28%),
    linear-gradient(135deg, var(--hero-a), var(--hero-b));
}

.auth-shell.theme-sea {
  --accent: #0694a2;
  --accent-strong: #075f73;
  --accent-soft: #e2f8f7;
  --accent-warm: #f6c85f;
  --accent-cool: #3478f6;
  --hero-a: #f4fffd;
  --hero-b: #ddf7f1;
}

.auth-main {
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(260px, 420px);
  gap: clamp(18px, 4vw, 42px);
  align-items: stretch;
  width: min(1120px, 100%);
  min-height: calc(100vh - clamp(36px, 8vw, 84px));
  margin: 0 auto;
}

.auth-card,
.auth-side-panel {
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.auth-card {
  display: grid;
  align-content: center;
  gap: 22px;
  padding: clamp(22px, 5vw, 42px);
}

.auth-side-panel {
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: clamp(18px, 4vw, 30px);
  overflow: hidden;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-brand .brand-logo {
  width: 58px;
  height: 58px;
}

.auth-brand .brand-kicker {
  color: var(--accent-strong);
}

.auth-brand h1 {
  margin: 0;
  font-size: 1.12rem;
}

.auth-heading h2 {
  margin: 0 0 8px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.05;
}

.auth-heading p {
  max-width: 48ch;
  margin: 0;
  color: #475467;
  line-height: 1.6;
}

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

.auth-form .quick-action {
  width: 100%;
}

.auth-theme-picker {
  justify-self: start;
  background: #ffffff;
}

.auth-visual {
  display: flex;
  justify-content: center;
  min-height: 140px;
  padding: 24px 0;
}

.auth-feedback {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.auth-feedback strong,
.auth-feedback p {
  margin: 0;
}

.auth-feedback p {
  color: #475467;
  line-height: 1.5;
}

.auth-feedback code {
  width: fit-content;
  padding: 6px 8px;
  color: var(--accent-strong);
  font-weight: 850;
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.auth-feedback-success {
  border-color: color-mix(in srgb, #15803d 26%, white);
  background: #f0fdf4;
}

.auth-feedback-error {
  border-color: color-mix(in srgb, #b42318 26%, white);
  background: #fff1f2;
}

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 5000;
  display: grid;
  gap: 10px;
  width: min(380px, calc(100vw - 36px));
  pointer-events: none;
}

.toast-notification {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 14px 42px 14px 16px;
  color: #111827;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  animation: toast-enter 180ms ease-out;
}

.toast-notification::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: #2563eb;
}

.toast-notification strong,
.toast-notification p,
.toast-notification small {
  margin: 0;
}

.toast-notification strong {
  font-size: 0.88rem;
  font-weight: 850;
}

.toast-notification p {
  color: #475467;
  font-size: 0.88rem;
  line-height: 1.42;
}

.toast-notification small {
  color: #667085;
  font-size: 0.78rem;
  line-height: 1.35;
}

.toast-notification code {
  width: fit-content;
  padding: 5px 7px;
  color: var(--accent-strong);
  font-size: 0.8rem;
  font-weight: 850;
  border-radius: 8px;
  background: var(--accent-soft);
}

.toast-notification-success::before {
  background: #16a34a;
}

.toast-notification-error::before {
  background: #dc2626;
}

.toast-notification-warning::before {
  background: #f59e0b;
}

.toast-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  color: #667085;
  font-size: 1.2rem;
  line-height: 1;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.toast-dismiss:hover,
.toast-dismiss:focus-visible {
  color: #111827;
  background: rgba(15, 23, 42, 0.08);
}

@keyframes toast-enter {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1100px) {
  .toast-stack {
    top: 76px;
    right: 12px;
    width: min(360px, calc(100vw - 24px));
  }
}

.auth-overview {
  margin-bottom: 18px;
}

.profile-fact-card strong {
  overflow-wrap: anywhere;
  font-size: clamp(0.86rem, 1.1vw, 1rem);
}

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

.profile-layout .profile-panel:last-child {
  grid-column: 1 / -1;
}

.profile-layout .profile-panel:nth-child(2) .builder-form-grid {
  grid-template-columns: 1fr;
  max-width: 720px;
}

.profile-layout .profile-panel:nth-child(2) .password-field,
.profile-layout .profile-panel:nth-child(2) .builder-field-wide {
  grid-column: 1 / -1;
}

.profile-layout .profile-panel:nth-child(2) .password-requirement-hint {
  max-width: 100%;
  padding: 7px 9px;
}

.user-management-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(420px, 1.2fr);
  gap: 18px;
  align-items: start;
}

.user-directory-panel,
.user-editor-panel {
  min-width: 0;
}

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

.user-directory-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.user-directory-card:hover,
.user-directory-card.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 62%, white);
}

.user-directory-card div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.user-directory-card strong,
.user-directory-card span:not(.status-pill) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-directory-card span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

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

.roster-metric-card strong {
  overflow-wrap: anywhere;
  font-size: clamp(0.92rem, 1.1vw, 1.08rem);
}

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

.roster-side-column {
  grid-template-columns: 1fr;
}

.roster-class-grid,
.roster-student-grid,
.roster-admin-stack {
  display: grid;
  gap: 12px;
}

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

.roster-class-card,
.roster-student-card,
.roster-admin-block {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.roster-class-card {
  display: grid;
  gap: 12px;
  min-height: 190px;
  padding: 14px;
}

.roster-class-card:hover,
.roster-class-card.is-selected,
.roster-student-card:hover,
.roster-student-card.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 62%, white);
}

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

.roster-student-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.roster-student-card div:not(.roster-student-avatar) {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.roster-student-card strong,
.roster-student-card span:not(.status-pill) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roster-student-card span:not(.status-pill) {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.roster-student-card button {
  min-height: 34px;
  padding: 0 10px;
  color: var(--accent-strong);
  font-weight: 850;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
  border-radius: var(--radius);
  background: #ffffff;
}

.roster-student-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: #ffffff;
  font-weight: 900;
  border-radius: var(--radius);
  background: var(--accent-strong);
}

.roster-admin-block {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.roster-admin-block h4 {
  margin: 0;
  font-size: 1rem;
}

.roster-admin-block .builder-form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.roster-note {
  margin: 12px 0 0;
  color: #475467;
  font-weight: 750;
  line-height: 1.55;
}

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

.permission-metric-card strong {
  overflow-wrap: anywhere;
  font-size: clamp(0.88rem, 1vw, 1.05rem);
}

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

.permissions-main-panel,
.permission-audit-panel {
  min-width: 0;
}

.permissions-side-column {
  grid-template-columns: 1fr;
}

.permission-role-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  overflow-x: visible;
  padding-bottom: 4px;
}

.permission-role-tab {
  display: inline-flex;
  flex: 1 1 132px;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 13px;
  color: var(--accent-strong);
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
  border-radius: var(--radius);
  background: #ffffff;
}

.permission-role-tab:hover,
.permission-role-tab.is-active {
  color: #ffffff;
  border-color: var(--accent-strong);
  background: var(--accent-strong);
}

.permission-note {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.5;
}

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

.permission-area-card,
.audit-log-row,
.permission-rule-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.permission-area-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 190px;
  padding: 14px;
}

.permission-area-card > div:first-child {
  display: grid;
  gap: 6px;
}

.permission-area-card strong {
  font-size: 0.98rem;
}

.permission-area-card span,
.permission-toggle-row small,
.audit-log-row span,
.audit-log-row time,
.permission-rule-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.45;
}

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

.permission-toggle-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, white);
  border-radius: var(--radius);
  background: var(--panel);
}

.permission-toggle-row input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.permission-toggle-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.permission-toggle-row strong,
.permission-toggle-row small {
  overflow-wrap: anywhere;
}

.permissions-support-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  margin-top: 18px;
}

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

.permission-rule-grid article {
  display: grid;
  gap: 6px;
  padding: 12px;
}

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

.audit-log-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, auto);
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.audit-log-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.audit-log-row strong,
.audit-log-row span,
.audit-log-row time {
  overflow-wrap: anywhere;
}

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

.storage-metric-card strong {
  overflow-wrap: anywhere;
  font-size: clamp(0.88rem, 1vw, 1.05rem);
}

.storage-filter-panel {
  grid-template-columns: 1.4fr repeat(4, minmax(140px, 1fr));
}

.storage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  gap: 18px;
  align-items: start;
}

.storage-side-column {
  grid-template-columns: 1fr;
  position: sticky;
  top: calc(var(--top-nav-height, 96px) + 18px);
  max-height: calc(100vh - var(--top-nav-height, 96px) - 36px);
  overflow: auto;
  padding-right: 4px;
}

.storage-folder-panel,
.storage-file-panel,
.storage-detail-panel,
.storage-upload-panel,
.storage-tool-panel,
.storage-dashboard-panel,
.storage-provider-panel {
  min-width: 0;
}

.storage-tool-panel {
  display: grid;
  gap: 12px;
}

.storage-tool-select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  font: inherit;
  font-weight: 850;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.storage-tool-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.storage-tool-tabs button {
  min-height: 34px;
  padding: 0 11px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
}

.storage-tool-tabs button:hover,
.storage-tool-tabs button.is-active {
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 34%, white);
  background: color-mix(in srgb, var(--accent-soft) 72%, white);
}

.storage-helper-note {
  margin: -2px 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.45;
}

.storage-compact-form {
  grid-template-columns: 1fr;
  gap: 10px;
}

.storage-dashboard-mini-grid {
  grid-template-columns: 1fr;
  margin-bottom: 14px;
}

.storage-dashboard-panel .panel {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.storage-dashboard-panel .student-resource-row {
  background: #ffffff;
}

.storage-danger-row {
  align-items: stretch;
}

.storage-folder-tree {
  display: grid;
  gap: 9px;
}

.storage-folder-row {
  display: grid;
  grid-template-columns: 88px minmax(140px, 0.35fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.storage-folder-row:hover,
.storage-folder-row.is-selected,
.storage-file-row:hover,
.storage-file-row.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 62%, white);
}

.storage-folder-row span,
.storage-folder-row small,
.storage-file-row small,
.storage-file-row span,
.storage-version-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.45;
}

.storage-folder-row strong,
.storage-folder-row small,
.storage-file-row strong,
.storage-file-row span,
.storage-file-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.storage-table-wrap {
  display: grid;
  gap: 8px;
}

.storage-file-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(150px, 0.6fr) minmax(220px, 1fr) minmax(105px, 0.45fr) minmax(220px, 0.7fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.storage-file-head {
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  background: transparent;
  border-color: transparent;
}

.storage-file-row > div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.storage-row-actions,
.storage-detail-actions,
.storage-version-row,
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.storage-row-actions button,
.storage-version-row button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 850;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, white);
  border-radius: var(--radius);
  background: #ffffff;
}

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

.auth-google-panel,
.google-account-panel,
.google-drive-panel,
.google-attachment-panel,
.google-classroom-panel,
.google-calendar-panel,
.google-integration-panel,
.google-sync-log-panel {
  display: grid;
  gap: 14px;
}

.auth-google-panel {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 20%, white);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

.auth-google-panel h3,
.auth-google-panel p {
  margin: 0;
}

.google-overview,
.google-workspace-layout,
.google-card-grid,
.google-sync-list {
  display: grid;
  gap: 18px;
}

.google-workspace-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  align-items: start;
  margin-top: 18px;
}

.google-drive-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.google-drive-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) minmax(190px, 0.9fr) minmax(160px, 0.7fr) minmax(180px, 0.7fr);
  gap: 12px;
  align-items: center;
  min-width: 760px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}

.google-drive-row:not(.google-drive-head) {
  cursor: pointer;
}

.google-drive-row:hover,
.google-drive-row.is-selected,
.google-classroom-card:hover {
  background: var(--accent-soft);
}

.google-drive-head {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.google-drive-row strong,
.google-drive-row span,
.google-drive-row small {
  display: block;
  overflow-wrap: anywhere;
}

.google-drive-row small {
  margin-top: 3px;
  color: var(--muted);
}

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

.google-classroom-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.storage-detail-actions {
  margin: 14px 0;
}

.storage-mini-section {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

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

.storage-version-row {
  justify-content: space-between;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.storage-version-row div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.checkbox-field {
  justify-content: flex-start;
  min-height: 42px;
  padding: 8px 0;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.danger-action {
  color: #9f1c1c;
  border-color: #f1b3b3;
  background: #fff5f5;
}

@media (pointer: coarse) {
  .sidebar-link,
  .mobile-drawer-nav .sidebar-link,
  .quick-action,
  .action-button,
  .table-actions button,
  .storage-row-actions button,
  .storage-version-row button,
  .analytics-student-card button,
  .intervention-card button,
  .roster-student-card button,
  .semester-tab,
  .permission-role-tab,
  .activity-drag-chip {
    min-height: 48px;
  }

  .filter-field input,
  .filter-field select,
  .builder-field input,
  .builder-field textarea,
  .builder-field select {
    min-height: 48px;
    font-size: 1rem;
  }
}

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

@media (max-width: 1180px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    display: none;
  }

  .mobile-nav-drawer {
    display: block;
  }

  .top-navigation-brand {
    min-width: 0;
  }

  .top-navigation-menu {
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
  }

  .main-content {
    padding: 20px clamp(14px, 3vw, 28px) 30px;
  }

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

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

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

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

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

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

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

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

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

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

  .webapp-overview,
  .content-overview,
  .assessment-overview,
  .communication-overview,
  .resource-builder-overview,
  .authoring-overview,
  .portfolio-overview,
  .ai-overview,
  .reporting-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

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

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

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

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

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

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

  .webapp-filter-panel,
  .content-filter-panel,
  .assessment-filter-panel,
  .communication-filter-panel,
  .resource-builder-filter-panel,
  .authoring-filter-panel,
  .portfolio-filter-panel,
  .reporting-filter-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

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

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

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

  .unit-page-grid {
    grid-template-columns: 1fr;
  }

  .unit-page-grid .side-column {
    grid-template-columns: 1fr;
  }

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

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

  .teacher-notes-panel {
    position: static;
  }

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

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

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

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

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

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

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

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

  .webapp-framework-layout,
  .content-builder-layout,
  .assessment-centre-layout,
  .communication-centre-layout,
  .resource-builder-layout,
  .curriculum-authoring-layout,
  .portfolio-layout,
  .ai-assistant-layout,
  .reporting-layout,
  .permissions-layout,
  .permissions-support-grid,
  .storage-layout,
  .google-workspace-layout {
    grid-template-columns: 1fr;
  }

  .storage-side-column {
    position: static;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .reading-centre-layout .side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .writing-centre-layout .side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vocabulary-centre-layout .side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .submission-system-layout .side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .reward-system-layout .side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-dashboard-layout .side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .webapp-framework-layout .side-column,
  .content-builder-layout .side-column,
  .assessment-centre-layout .side-column,
  .communication-centre-layout .side-column,
  .resource-builder-layout .side-column,
  .curriculum-authoring-layout .side-column,
  .portfolio-layout .side-column,
  .ai-assistant-layout .side-column,
  .reporting-layout .side-column,
  .permissions-layout .side-column,
  .storage-layout .side-column,
  .google-workspace-layout .side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .resource-preview-panel,
  .activity-preview-panel {
    position: static;
  }

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

  .student-dashboard-layout .side-column {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .homework-card-grid,
  .progress-ring-grid,
  .badge-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

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

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

  .storage-file-row {
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 0.55fr) minmax(200px, 0.9fr);
  }

  .storage-file-row > span:nth-child(4),
  .storage-file-head span:nth-child(4) {
    display: none;
  }

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

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

  .profile-layout,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .profile-layout .profile-panel:last-child {
    grid-column: auto;
  }
}

@media (max-width: 1100px) {
  .auth-main {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-side-panel {
    align-content: start;
  }

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

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

  .top-header > div:first-child,
  .header-actions {
    flex: 0 1 auto;
  }

  .header-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .top-navigation {
    gap: 10px;
    padding-block: 12px;
  }

  .top-navigation-topline {
    align-items: center;
    justify-content: space-between;
  }

  .top-navigation-brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .top-navigation-brand h1 {
    font-size: 0.95rem;
    overflow-wrap: anywhere;
  }

  .top-navigation-toggle {
    display: inline-flex;
    flex: 0 0 auto;
  }

  .top-navigation-row {
    display: none;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
  }

  .top-navigation.is-mobile-menu-open .top-navigation-row,
  .top-navigation-row.is-mobile-menu-open {
    display: grid;
    max-height: calc(100dvh - 88px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .top-navigation-menu,
  .top-navigation-account {
    width: 100%;
  }

  .top-navigation-menu {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .top-navigation-account {
    margin-left: 0;
  }

  .top-navigation-panel,
  .top-navigation-user-panel {
    position: static;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-top: 8px;
    box-shadow: none;
  }

  .top-navigation-link,
  .top-navigation-menu-button {
    min-height: 44px;
  }

  .top-navigation-group {
    width: 100%;
  }

  .top-navigation-group > summary {
    width: 100%;
    min-height: 44px;
    justify-content: space-between;
    border-radius: 14px;
  }

  .top-navigation-user-avatar {
    width: 100%;
    height: 44px;
    border-radius: 14px;
  }

  .page-section-sidebar {
    position: sticky;
    top: 88px;
    left: auto;
    width: auto;
    max-height: none;
    margin: 12px clamp(14px, 3vw, 28px) 0;
    overflow: visible;
    border-radius: 16px;
  }

  .page-section-sidebar:hover,
  .page-section-sidebar:focus-within {
    width: auto;
  }

  .page-section-sidebar-inner {
    gap: 6px;
  }

  .page-section-sidebar .eyebrow {
    opacity: 1;
  }

  .page-section-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .page-section-link {
    flex: 0 0 auto;
    width: auto;
    justify-content: flex-start;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .page-section-link::before {
    margin-right: 9px;
  }

  .page-section-link span {
    max-width: none;
    opacity: 1;
  }

  .app-shell.has-page-section-sidebar .main-content {
    padding-left: clamp(14px, 3vw, 28px);
  }

  .main-content [id^="page-section-"] {
    scroll-margin-top: 150px;
  }

  .teacher-chip,
  .date-pill,
  .theme-picker,
  .header-link-button {
    min-height: 46px;
  }

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

  .theme-visual {
    display: none;
  }

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

  .student-avatar-wrap {
    min-height: 130px;
    place-items: start;
  }

  .student-dashboard-layout .side-column,
  .storage-layout .side-column,
  .google-workspace-layout .side-column,
  .student-action-grid {
    grid-template-columns: 1fr;
  }

  .homework-card-grid,
  .progress-ring-grid,
  .badge-gallery-grid,
  .parent-view-grid,
  .presentation-support,
    .skill-progress-grid,
    .homework-reading-grid,
    .homework-writing-grid,
    .homework-vocabulary-grid,
    .homework-submission-grid,
    .activity-progress-panel,
    .activity-drop-grid,
    .image-choice-grid,
    .flashcard-grid,
    .memory-card-grid,
    .reading-centre-layout .side-column,
    .writing-centre-layout .side-column,
    .vocabulary-centre-layout .side-column,
    .submission-system-layout .side-column,
    .reward-system-layout .side-column,
    .analytics-dashboard-layout .side-column,
    .webapp-framework-layout .side-column,
    .content-builder-layout .side-column,
    .assessment-centre-layout .side-column,
    .communication-centre-layout .side-column,
    .resource-builder-layout .side-column,
    .curriculum-authoring-layout .side-column,
    .portfolio-layout .side-column,
    .ai-assistant-layout .side-column,
    .reporting-layout .side-column,
    .reading-collection-grid,
    .independent-reading-grid,
    .reading-expectation-grid,
    .reading-activity-grid,
    .reading-vocab-grid,
    .guided-reading-grid,
    .writing-project-grid,
    .writing-template-grid,
    .planner-preview-grid,
    .writing-support-grid,
    .vocabulary-set-grid,
    .vocabulary-word-grid,
    .submission-assignment-grid,
    .submission-method-grid,
    .reward-source-grid,
    .reward-shop-grid,
    .analytics-profile-grid,
    .analytics-student-grid,
    .analytics-chart-grid,
    .analytics-report-grid,
    .analytics-module-grid,
    .webapp-card-grid,
    .content-card-grid,
    .assessment-card-grid,
    .communication-card-grid,
    .built-resource-grid,
    .portfolio-card-grid,
    .ai-saved-grid,
    .report-chart-grid,
    .report-gap-grid,
    .report-export-grid,
    .printable-section-grid,
    .rubric-grid,
    .published-content-grid,
    .class-points-grid,
    .reward-level-card,
    .reward-control-grid,
    .roster-class-grid,
    .roster-module-grid,
    .permissions-overview,
    .permission-area-grid,
    .permissions-support-grid,
    .permission-rule-grid,
    .storage-overview,
    .google-overview,
    .google-card-grid,
    .storage-folder-row,
    .storage-file-row,
    .google-drive-row,
    .storage-dashboard-grid {
    grid-template-columns: 1fr;
  }

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

  .storage-file-head,
  .google-drive-head {
    display: none;
  }

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

  .button-row,
  .lesson-list,
  .side-column {
    grid-template-columns: 1fr;
  }

  .resource-row,
  .resource-row-head {
    grid-template-columns: 1fr;
  }

  .resource-row-head {
    display: none;
  }

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

  .activity-filter-panel .filter-field:first-child,
  .portfolio-filter-panel .filter-field:first-child {
    grid-column: span 1;
  }

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

  .activity-filter-panel,
  .reading-filter-panel,
  .writing-filter-panel,
  .vocabulary-filter-panel,
  .submission-filter-panel,
  .analytics-filter-panel,
  .webapp-filter-panel,
  .content-filter-panel,
  .assessment-filter-panel,
  .communication-filter-panel,
  .resource-builder-filter-panel,
  .authoring-filter-panel,
  .portfolio-filter-panel,
  .reporting-filter-panel,
    .storage-filter-panel,
    .google-filter-panel,
    .builder-form-grid,
  .reading-builder-grid,
  .writing-builder-grid,
  .vocabulary-builder-grid,
  .builder-dynamic-grid,
  .activity-answer-grid,
  .matching-grid {
    grid-template-columns: 1fr;
  }

  .builder-field-wide {
    grid-column: auto;
  }

  .roster-admin-block .builder-form-grid {
    grid-template-columns: 1fr;
  }

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

  .objective-grid,
  .vocabulary-grid,
  .flow-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .top-navigation {
    padding-inline: 12px;
  }

  .top-navigation-brand {
    gap: 10px;
  }

  .top-navigation-brand .brand-kicker {
    display: none;
  }

  .top-navigation-brand .brand-mark {
    width: 40px;
    height: 40px;
  }

  .top-navigation-brand h1 {
    font-size: 0.92rem;
  }

  .top-navigation-user-card,
  .top-navigation-menu-button {
    justify-content: center;
  }

  .main-content {
    padding: 16px 12px 24px;
  }

  .page-view-controls {
    position: static;
    display: grid;
    gap: 10px;
    margin-bottom: 14px;
  }

  .page-view-controls > div:first-child {
    min-width: 0;
  }

  .page-view-button-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-view-button {
    width: 100%;
    min-height: 40px;
    padding-inline: 10px;
  }

  .header-actions > *,
  .theme-picker select {
    width: 100%;
  }

  .theme-picker,
  .teacher-chip,
  .date-pill {
    justify-content: space-between;
  }

  .auth-shell {
    padding: 12px;
  }

  .auth-card,
  .auth-side-panel {
    padding: 18px;
  }

  .user-directory-card,
  .roster-student-card {
    grid-template-columns: 1fr;
  }

  .user-directory-card .status-pill,
  .roster-student-card .status-pill {
    justify-self: start;
  }

  .dashboard-hero {
    padding: 22px;
  }

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

  .curriculum-overview {
    grid-template-columns: 1fr;
  }

  .resource-overview {
    grid-template-columns: 1fr;
  }

  .activity-overview {
    grid-template-columns: 1fr;
  }

  .reading-overview {
    grid-template-columns: 1fr;
  }

  .writing-overview {
    grid-template-columns: 1fr;
  }

  .vocabulary-overview {
    grid-template-columns: 1fr;
  }

  .submission-overview {
    grid-template-columns: 1fr;
  }

  .reward-overview {
    grid-template-columns: 1fr;
  }

  .analytics-overview {
    grid-template-columns: 1fr;
  }

  .webapp-overview,
  .content-overview,
  .portfolio-overview,
  .ai-overview,
  .reporting-overview {
    grid-template-columns: 1fr;
  }

  .student-summary-grid {
    grid-template-columns: 1fr;
  }

  .student-goal-grid,
  .student-vocabulary-grid {
    grid-template-columns: 1fr;
  }

  .semester-tabs {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .panel {
    padding: 16px;
  }

  .reading-library-panel {
    padding: 0;
  }

  .writing-library-panel {
    padding: 0;
  }

  .vocabulary-library-panel {
    padding: 0;
  }

  .submission-review-panel {
    padding: 0;
  }

  .reading-library-panel .section-heading {
    padding: 16px 16px 0;
  }

  .writing-library-panel .section-heading {
    padding: 16px 16px 0;
  }

  .vocabulary-library-panel .section-heading {
    padding: 16px 16px 0;
  }

  .submission-review-panel .section-heading {
    padding: 16px 16px 0;
  }

  .reading-library-table-wrap {
    padding: 0 16px 16px;
  }

  .writing-library-table-wrap {
    padding: 0 16px 16px;
  }

  .vocabulary-library-table-wrap {
    padding: 0 16px 16px;
  }

  .submission-review-table-wrap {
    padding: 0 16px 16px;
  }

  .reading-player-header {
    flex-direction: column;
  }

  .writing-workshop-header {
    flex-direction: column;
  }

  .vocabulary-hub-header {
    flex-direction: column;
  }

  .submission-workspace-header {
    flex-direction: column;
  }

  .webapp-preview-header {
    flex-direction: column;
  }

  .reward-profile-header {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .reward-profile-header > strong {
    grid-column: 1 / -1;
  }

  .analytics-profile-header {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .analytics-profile-header .status-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

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

  .reading-passage {
    padding: 16px;
  }

  .curriculum-table-panel {
    padding: 0;
  }

  .curriculum-table-panel .section-heading {
    padding: 16px 16px 0;
  }

  .curriculum-table-wrap {
    padding: 0 16px 16px;
  }

  .resource-library-panel {
    padding: 0;
  }

  .resource-library-panel .section-heading {
    padding: 16px 16px 0;
  }

  .resource-library-table-wrap {
    padding: 0 16px 16px;
  }

  .activity-library-panel {
    padding: 0;
  }

  .activity-library-panel .section-heading {
    padding: 16px 16px 0;
  }

  .activity-library-table-wrap {
    padding: 0 16px 16px;
  }

  .unit-table-panel {
    padding: 0;
  }

  .unit-table-panel .section-heading {
    padding: 16px 16px 0;
  }

  .unit-table-wrap {
    padding: 0 16px 16px;
  }

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

  .lesson-quick-actions,
  .lesson-resource-grid {
    grid-template-columns: 1fr;
  }

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

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

  .student-resource-row {
    align-items: stretch;
    flex-direction: column;
  }

  .student-resource-row button {
    width: 100%;
  }

  .presentation-controls button {
    width: 100%;
  }

  .activity-player-actions button,
  .builder-action-row .quick-action {
    width: 100%;
  }

  .flow-marker {
    justify-items: start;
  }

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

@media (max-width: 760px) {
  body {
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .main-content {
    padding: 16px 12px calc(var(--bottom-nav-height) + 24px);
  }

  .mobile-nav-drawer summary {
    min-height: 54px;
    padding: 0 14px;
  }

  .mobile-drawer-nav {
    grid-template-columns: 1fr;
    max-height: 54vh;
    padding: 0 12px 12px;
  }

  .dashboard-hero {
    min-height: auto;
    padding: 18px;
  }

  .dashboard-hero h2 {
    font-size: 1.75rem;
  }

  .dashboard-hero p {
    font-size: 0.95rem;
  }

  .top-header h2 {
    font-size: 1.35rem;
  }

  .teacher-chip,
  .date-pill,
  .theme-picker,
  .header-link-button {
    width: 100%;
    justify-content: center;
  }

  .theme-picker select {
    min-width: 0;
    width: 100%;
  }

  .metric-card {
    min-height: auto;
  }

  .quick-action,
  .action-button,
  .builder-action-row .quick-action,
  .activity-player-actions button,
  .storage-row-actions button,
  .google-sync-list button,
  .storage-version-row button,
  .roster-student-card button {
    width: 100%;
    min-height: 48px;
  }

  .storage-row-actions,
  .storage-detail-actions,
  .builder-action-row,
  .google-sync-list .student-resource-row,
  .activity-player-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

.app-shell,
.auth-shell,
.theme-sea,
.auth-shell.theme-sea {
  --accent: #3f6df6;
  --accent-strong: #193ea8;
  --accent-soft: #e9efff;
  --accent-warm: #6b7280;
  --accent-cool: #64748b;
  --hero-a: #f8fbff;
  --hero-b: #e9efff;
  --sidebar: #132238;
}

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

.auth-main {
  grid-template-columns: minmax(320px, 560px);
  justify-content: center;
}
