:root {
  --ink: #101828;
  --muted: #667085;
  --line: rgba(109, 126, 150, 0.24);
  --panel: rgba(255, 255, 255, 0.74);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --bg: #eef4fb;
  --nav: #eef5fc;
  --nav-soft: rgba(47, 127, 211, 0.1);
  --accent: #2f7fd3;
  --accent-strong: #1f5fa8;
  --gold: #e6edf5;
  --blue: #316fa8;
  --green: #2f7f9f;
  --silver: #f7f9fc;
  --glass: rgba(255, 255, 255, 0.62);
  --shadow: 0 18px 44px rgba(31, 77, 120, 0.13);
}

.consent-open {
  overflow: hidden;
}

.consent-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.consent-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(8px);
}

.consent-modal {
  position: relative;
  width: min(760px, calc(100vw - 28px));
  max-height: min(86vh, 820px);
  overflow: auto;
  border: 1px solid rgba(148, 181, 211, 0.58);
  border-radius: 16px;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(238, 247, 255, 0.98));
  box-shadow: 0 26px 70px rgba(32, 75, 118, 0.24);
  padding: 22px;
  color: #0f172a;
}

.consent-modal:focus {
  outline: 3px solid rgba(59, 130, 246, 0.34);
  outline-offset: 4px;
}

.consent-modal-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.consent-modal h2,
.consent-modal h3,
.consent-modal p {
  margin: 0;
}

.consent-modal h2 {
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.08;
}

.consent-modal p {
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
}

.consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.consent-actions.equal > button {
  flex: 1 1 180px;
  justify-content: center;
}

.consent-settings {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.consent-settings[hidden] {
  display: none;
}

.consent-category {
  border: 1px solid rgba(148, 181, 211, 0.44);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.consent-category-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.consent-category h3 {
  font-size: 16px;
  line-height: 1.2;
  margin-bottom: 5px;
}

.consent-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(127, 160, 192, 0.58);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(239, 248, 255, 0.9);
  color: #174a7a;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.consent-switch input {
  width: 18px;
  height: 18px;
  accent-color: #2f7dbe;
}

.consent-services {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.consent-service {
  border-radius: 10px;
  background: rgba(235, 244, 252, 0.64);
  padding: 10px;
}

.consent-service strong {
  display: block;
  margin-bottom: 8px;
  color: #173b63;
}

.consent-service dl {
  display: grid;
  gap: 5px;
  margin: 0;
}

.consent-service dl > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px;
}

.consent-service dt {
  color: #64748b;
  font-weight: 850;
}

.consent-service dd {
  margin: 0;
  color: #334155;
}

.consent-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
  color: #64748b;
  font-size: 13px;
}

.consent-links a {
  color: #1f65a6;
  font-weight: 800;
}

.consent-floating-button {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 999;
  border: 1px solid rgba(124, 159, 191, 0.54);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 28px rgba(40, 77, 112, 0.16);
  color: #1f578d;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  padding: 8px 11px;
}

.consent-floating-button:hover,
.consent-floating-button:focus-visible {
  background: #eef7ff;
  outline: 2px solid rgba(59, 130, 246, 0.3);
  outline-offset: 2px;
}

.consent-banner-open .consent-floating-button {
  display: none;
}

.consent-banner {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 9998;
  width: min(920px, calc(100vw - 28px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(148, 181, 211, 0.64);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 22px 58px rgba(31, 77, 120, 0.22);
  color: #0f172a;
  transform: translate(-50%, calc(100% + 28px));
  opacity: 0;
  transition:
    transform 0.34s cubic-bezier(.2,.86,.2,1),
    opacity 0.22s ease;
}

.consent-banner.visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.consent-banner-copy {
  display: grid;
  gap: 5px;
}

.consent-banner h2,
.consent-banner p {
  margin: 0;
}

.consent-banner h2 {
  font-size: 18px;
  line-height: 1.18;
}

.consent-banner p {
  max-width: 66ch;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}

.consent-banner-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 680px) {
  .consent-modal {
    padding: 18px;
  }

  .consent-category-head,
  .consent-service dl > div {
    grid-template-columns: 1fr;
  }

  .consent-actions > button {
    width: 100%;
  }

  .consent-banner {
    bottom: 10px;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 15px;
  }

  .consent-banner-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html.route-transition-pending body > main,
html.route-transition-pending body > .public-site,
html.route-transition-pending #homeApp,
html.route-transition-pending #teacherApp,
html.route-transition-pending #studentApp {
  opacity: 0 !important;
  visibility: hidden !important;
  transition: none !important;
}

html.route-transition-pending body {
  pointer-events: none;
}

html.builder-route-loading #homeApp,
html.builder-route-loading #studentApp,
html.builder-route-loading .public-site {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
}

html.builder-route-loading #teacherApp {
  display: grid !important;
  visibility: visible !important;
  opacity: 1 !important;
}

html.builder-route-loading:not(.builder-route-ready) #teacherApp > * {
  visibility: hidden !important;
  opacity: 0 !important;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(145deg, #fbfdff 0%, #f1f6fb 42%, #e5eef8 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
a,
input,
select {
  transition:
    background 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(47, 127, 211, 0.16);
}

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

.lucide-fallback {
  width: 1.35em;
  height: 1.35em;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  color: currentColor;
  background: rgba(47, 127, 211, 0.12);
  font-size: 0.82em;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.home-action .lucide-fallback {
  width: 44px;
  height: 44px;
  font-size: 22px;
}

.nav-button .lucide-fallback,
.icon-button .lucide-fallback {
  width: 20px;
  height: 20px;
  font-size: 12px;
}

.construct-icon .lucide-fallback,
.matrix-tab-button .lucide-fallback {
  width: 34px;
  height: 34px;
  font-size: 16px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
}

.home-shell {
  min-height: 100vh;
  padding: 28px 28px 70px;
  display: grid;
  align-content: start;
  gap: 22px;
}

.public-site {
  display: none;
}

.home-locked {
  padding: 0;
  gap: 0;
}

.home-locked .public-site {
  display: block;
}

.home-locked .profile-status {
  display: none;
}

.home-locked > .home-hero,
.home-locked .home-login-photo {
  display: none;
}

.public-nav {
  position: sticky;
  top: 0;
  z-index: 650;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 56px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  border-bottom: 1px solid rgba(109, 126, 150, 0.16);
  background: rgba(247, 251, 255, 0.9);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  transition: min-height 0.2s ease, box-shadow 0.2s ease;
}

.public-nav.is-compact {
  min-height: 58px;
  box-shadow: 0 14px 32px rgba(38, 74, 110, 0.08);
}

.public-brand,
.public-nav-links,
.public-nav-actions,
.public-hero-actions,
.public-final-cta div {
  display: flex;
  align-items: center;
}

.public-brand {
  gap: 10px;
  color: var(--ink);
  font-weight: 920;
  text-decoration: none;
  white-space: nowrap;
}

.public-brand-mark {
  width: 54px;
  height: 38px;
  min-width: 54px;
  padding: 4px 6px;
}

.public-brand-mark span {
  font-size: 8px;
}

.public-nav-links {
  justify-content: center;
  gap: clamp(12px, 2vw, 26px);
}

.public-nav-links a,
.public-footer a,
.public-footer button {
  color: #245f96;
  font-weight: 850;
  text-decoration: none;
}

.public-nav-links a {
  font-size: 13px;
}

.public-nav-actions {
  gap: 9px;
  justify-content: flex-end;
  align-items: flex-end;
}

.public-login-form {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.public-login-field {
  display: grid;
  gap: 3px;
  color: #315d85;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.public-login-form input {
  width: clamp(96px, 7.8vw, 126px);
  min-height: 31px;
  border: 1px solid rgba(109, 126, 150, 0.24);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 12px;
  font-weight: 760;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.public-login-form input:focus-visible {
  border-color: rgba(47, 127, 211, 0.72);
  box-shadow: 0 0 0 3px rgba(47, 127, 211, 0.14);
}

.public-nav-actions .secondary-button[type="submit"] {
  height: 31px;
  min-height: 31px;
  padding: 0 14px;
  color: #2c5f8c;
  border-color: rgba(47, 127, 211, 0.18);
  background: rgba(226, 240, 252, 0.78);
  box-shadow: none;
}

.public-nav-actions > .primary-button {
  align-self: flex-end;
  height: 31px;
  min-height: 31px;
  padding: 0 14px;
  color: #355f82;
  border-color: rgba(109, 126, 150, 0.18);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: none;
}

.public-nav-actions .secondary-button[type="submit"]:hover,
.public-nav-actions > .primary-button:hover {
  color: #17456f;
  border-color: rgba(47, 127, 211, 0.28);
  background: rgba(235, 245, 253, 0.86);
  box-shadow: none;
}

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

.public-hero {
  width: min(1240px, calc(100% - 40px));
  min-height: min(720px, calc(100vh - 72px));
  margin: 0 auto;
  padding: clamp(56px, 8vw, 104px) 0 clamp(46px, 6vw, 82px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.78fr);
  gap: clamp(30px, 4vw, 58px);
  align-items: center;
}

.public-hero-copy,
.public-section-head {
  display: grid;
  gap: 18px;
}

.public-hero h1,
.public-section h2,
.public-final-cta h2 {
  margin: 0;
  color: #101828;
  letter-spacing: 0;
}

.public-hero h1 {
  max-width: 880px;
  font-size: clamp(44px, 5.4vw, 74px);
  line-height: 0.98;
}

.public-slogan-stack {
  display: grid;
  gap: 0.05em;
  justify-items: start;
}

.public-slogan-stack span {
  display: block;
  white-space: nowrap;
}

.public-hero p,
.public-section p,
.public-final-cta p,
.public-footer p {
  margin: 0;
  color: #4e5f73;
  line-height: 1.65;
}

.public-hero-lead {
  color: #24496f !important;
  font-size: clamp(18px, 2.3vw, 24px);
  line-height: 1.45 !important;
}

.public-hero-actions,
.public-final-cta div {
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.public-hero-visual,
.feature-placeholder {
  border: 1px solid rgba(117, 154, 190, 0.26);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(232, 243, 253, 0.82)),
    radial-gradient(circle at 22% 12%, rgba(47, 127, 211, 0.13), transparent 32%);
  box-shadow: 0 26px 72px rgba(35, 91, 142, 0.15);
}

.public-hero-visual {
  min-height: 410px;
  padding: 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
}

.mock-browser-bar {
  display: flex;
  gap: 7px;
}

.mock-browser-bar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(49, 111, 168, 0.28);
}

.mock-dashboard {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  min-height: 295px;
}

.mock-sidebar,
.mock-main {
  border: 1px solid rgba(109, 126, 150, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.mock-sidebar {
  padding: 16px 12px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.mock-sidebar span,
.mock-line,
.mock-card-row span {
  display: block;
  border-radius: 999px;
  background: rgba(49, 111, 168, 0.22);
}

.mock-sidebar span {
  height: 18px;
}

.mock-main {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.mock-chart {
  min-height: 150px;
  border-radius: 14px;
  background:
    linear-gradient(180deg, transparent 0 33%, rgba(49, 111, 168, 0.08) 33% 34%, transparent 34% 66%, rgba(49, 111, 168, 0.08) 66% 67%, transparent 67%),
    linear-gradient(135deg, rgba(47, 127, 211, 0.12), rgba(63, 139, 94, 0.14));
}

.mock-card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mock-card-row span {
  height: 58px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(109, 126, 150, 0.12);
}

.mock-line {
  height: 13px;
}

.mock-line.short {
  width: 64%;
}

.public-hero-visual p {
  color: #718298;
  font-size: 12px;
  font-weight: 780;
  text-align: center;
}

.public-section {
  padding: clamp(64px, 8vw, 104px) clamp(20px, 5vw, 58px);
  background: linear-gradient(180deg, rgba(252, 254, 255, 0.98), rgba(246, 250, 254, 0.98));
}

#funktionen.public-section,
#preise.public-section {
  min-height: calc(100vh - 72px);
  padding-top: clamp(44px, 5vw, 68px);
  padding-bottom: clamp(38px, 4.5vw, 60px);
}

.public-section > * {
  width: min(1180px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.public-section-tint {
  background:
    linear-gradient(180deg, rgba(229, 243, 252, 0.96), rgba(238, 249, 244, 0.92)),
    radial-gradient(circle at 12% 0%, rgba(47, 127, 211, 0.14), transparent 30%);
}

.public-section-head {
  max-width: 850px;
  margin-bottom: 34px;
  text-align: left;
}

#funktionen .public-section-head,
#preise .public-section-head {
  margin-bottom: 18px;
}

.public-section h2 {
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
}

.why-grid,
.benefit-grid,
.feature-card-grid,
.trust-grid,
.pricing-grid {
  display: grid;
  gap: 18px;
}

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

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

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

.why-card,
.benefit-grid article,
.feature-card-grid article,
.trust-card,
.trust-grid article,
.pricing-card,
.faq-item {
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 18px 42px rgba(38, 74, 110, 0.08);
}

.why-card,
.benefit-grid article,
.feature-card-grid article,
.trust-card,
.trust-grid article {
  padding: 22px;
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.why-card svg,
.benefit-grid svg,
.feature-card-grid svg,
.trust-grid svg {
  width: 28px;
  height: 28px;
  color: #2f7fd3;
}

.public-section h3,
.pricing-card h3,
.faq-item h3 {
  margin: 0;
  color: #132238;
  font-size: 19px;
  line-height: 1.2;
}

.feature-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 0;
}

.feature-row {
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1.2fr);
  gap: 12px;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 18px 48px rgba(38, 74, 110, 0.08);
}

.feature-row.reverse {
  grid-template-columns: minmax(360px, 1.2fr) minmax(280px, 0.95fr);
}

#funktionen .feature-row h3 {
  font-size: 16px;
}

#funktionen .feature-row ul {
  font-size: 12px;
  line-height: 1.36;
}

#funktionen .feature-card-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

#funktionen .feature-card-grid article {
  padding: 14px;
  gap: 8px;
}

#funktionen .feature-card-grid h3 {
  font-size: 15px;
}

#funktionen .feature-card-grid svg {
  width: 22px;
  height: 22px;
}

.feature-row.reverse > div:first-child {
  order: 2;
}

.feature-row.reverse > .feature-placeholder {
  order: 1;
}

.feature-row ul,
.pricing-card ul {
  margin: 0;
  padding-left: 18px;
  color: #4e5f73;
  line-height: 1.6;
}

.feature-placeholder {
  min-height: 104px;
  display: grid;
  place-items: center;
  color: #63809a;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.process-steps {
  position: relative;
  counter-reset: process;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.process-steps::before {
  content: "";
  position: absolute;
  left: 7%;
  right: 7%;
  top: 32px;
  height: 2px;
  background: rgba(47, 127, 211, 0.16);
}

.process-steps [role="listitem"] {
  position: relative;
  z-index: 1;
  padding: 58px 14px 18px;
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 30px rgba(38, 74, 110, 0.08);
}

.process-steps [role="listitem"]::before {
  counter-increment: process;
  content: counter(process);
  position: absolute;
  top: 14px;
  left: 14px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #2f7fd3;
  font-weight: 900;
}

.process-steps strong,
.process-steps span {
  display: block;
}

.process-steps span {
  margin-top: 8px;
  color: #5c6d80;
  font-size: 13px;
  line-height: 1.45;
}

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

.trust-card.prominent {
  grid-row: span 2;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(231, 244, 253, 0.82));
}

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

.pricing-card {
  padding: clamp(20px, 3vw, 30px);
  display: grid;
  gap: 13px;
}

#preise .public-section-head {
  max-width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.1fr);
  gap: 18px;
  align-items: end;
}

#preise .public-section-head .eyebrow,
#preise .public-section-head h2 {
  grid-column: 1;
}

#preise .public-section-head p {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  padding-bottom: 3px;
  font-weight: 760;
}

#preise .pricing-card ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 4px;
  font-size: 13px;
}

.price {
  color: #17456f;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1;
}

[data-license-checkout][aria-busy="true"] {
  pointer-events: none;
  opacity: 0.72;
}

.price-examples {
  display: grid;
  gap: 7px;
}

.pricing-note {
  margin: 0 auto 14px !important;
  padding: 12px 16px;
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  color: #24496f !important;
  font-weight: 850;
  text-align: center;
}

.public-scroll-top {
  position: fixed;
  right: 18px;
  bottom: 62px;
  z-index: 920;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(124, 159, 191, 0.48);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1f578d;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 36px rgba(40, 77, 112, 0.16);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.94);
  transition: opacity 220ms ease, transform 220ms ease, background 160ms ease;
}

.public-scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.public-scroll-top:hover,
.public-scroll-top:focus-visible {
  background: #eef7ff;
  outline: 2px solid rgba(59, 130, 246, 0.3);
  outline-offset: 2px;
}

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

.faq-item {
  overflow: hidden;
}

.faq-item h3 {
  font-size: 16px;
}

.faq-item button {
  width: 100%;
  border: 0;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: #132238;
  background: transparent;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.faq-item button::after {
  content: "+";
  color: #2f7fd3;
  font-size: 22px;
  line-height: 1;
}

.faq-item button[aria-expanded="true"]::after {
  content: "−";
}

.faq-answer {
  padding: 0 20px 18px;
}

.public-final-cta {
  width: min(1180px, calc(100% - 40px));
  margin: clamp(56px, 8vw, 96px) auto;
  padding: clamp(32px, 5vw, 54px);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(231, 243, 253, 0.98), rgba(255, 255, 255, 0.94)),
    radial-gradient(circle at 10% 0%, rgba(47, 127, 211, 0.18), transparent 34%);
  box-shadow: 0 22px 58px rgba(38, 74, 110, 0.13);
}

.public-final-cta h2 {
  font-size: clamp(32px, 4vw, 52px);
}

.public-final-cta {
  display: grid;
  gap: 16px;
}

.public-final-cta strong {
  color: #17456f;
  font-size: 18px;
}

.public-footer {
  padding: 42px clamp(20px, 5vw, 58px) 28px;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(160px, 1fr));
  gap: 26px;
  border-top: 1px solid rgba(109, 126, 150, 0.18);
  background: rgba(241, 247, 252, 0.9);
}

.public-footer h2,
.public-footer h3 {
  margin: 0 0 10px;
}

.public-footer-brand h2 {
  display: grid;
  gap: 1px;
  color: #111827;
  line-height: 0.98;
}

.public-footer-brand p {
  display: grid;
  gap: 2px;
  color: #6f7f91 !important;
  font-weight: 760;
}

.public-footer-slogan span {
  display: block;
}

.public-footer div {
  display: grid;
  align-content: start;
  gap: 8px;
}

.public-footer button {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.public-legal {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid rgba(109, 126, 150, 0.14);
  color: #64748b !important;
  font-size: 13px;
}

html {
  scroll-behavior: smooth;
}

.public-hero,
.public-section,
.public-final-cta {
  scroll-margin-top: 72px;
}

.home-locked .public-hero,
.home-locked .public-section,
.home-locked .public-final-cta,
.home-locked .public-footer {
  opacity: 0;
  transform: translate3d(0, 112px, 0) scale(0.978);
  transition:
    opacity 1.18s cubic-bezier(.2,.86,.2,1),
    transform 1.18s cubic-bezier(.2,.86,.2,1);
  will-change: opacity, transform;
}

.home-locked .public-section .why-card,
.home-locked .public-section .benefit-grid article,
.home-locked .public-section .feature-row,
.home-locked .public-section .trust-grid article,
.home-locked .public-section .pricing-card,
.home-locked .public-section .faq-item,
.home-locked .public-section .process-steps [role="listitem"] {
  opacity: 0;
  transform: translate3d(0, 72px, 0);
  transition:
    opacity 1.2s cubic-bezier(.18,.9,.22,1),
    transform 1.2s cubic-bezier(.18,.9,.22,1);
  transition-delay: calc(var(--motion-index, 0) * 120ms);
  will-change: opacity, transform;
}

.home-locked .public-hero.is-visible,
.home-locked .public-section.is-visible,
.home-locked .public-final-cta.is-visible,
.home-locked .public-footer.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.home-locked .public-section.is-visible .why-card,
.home-locked .public-section.is-visible .benefit-grid article,
.home-locked .public-section.is-visible .feature-row,
.home-locked .public-section.is-visible .trust-grid article,
.home-locked .public-section.is-visible .pricing-card,
.home-locked .public-section.is-visible .faq-item,
.home-locked .public-section.is-visible .process-steps [role="listitem"] {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

@media (prefers-reduced-motion: reduce) {
  .home-locked .public-hero,
  .home-locked .public-section,
  .home-locked .public-final-cta,
  .home-locked .public-footer {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 1040px) {
  .public-nav {
    grid-template-columns: auto auto;
  }

  .public-nav-toggle {
    justify-self: end;
    border: 1px solid rgba(109, 126, 150, 0.18);
    border-radius: 8px;
    padding: 9px 11px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #17456f;
    background: rgba(255, 255, 255, 0.78);
    font: inherit;
    font-size: 12px;
    font-weight: 900;
  }

  .public-nav-links,
  .public-nav-actions {
    grid-column: 1 / -1;
    display: none;
  }

  .public-nav-links.open {
    display: grid;
    justify-content: stretch;
    gap: 6px;
  }

  .public-nav-links.open + .public-nav-actions,
  .public-nav:has(.public-nav-links.open) .public-nav-actions {
    display: grid;
    justify-content: flex-start;
  }

  .public-login-form {
    flex-wrap: wrap;
    align-items: end;
  }

  .public-login-form input {
    flex: 1 1 150px;
    width: auto;
  }

  .public-nav-links a {
    border-radius: 8px;
    padding: 9px 10px;
    background: rgba(239, 247, 253, 0.8);
  }

  .public-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 42px;
  }

  .public-hero-visual {
    min-height: 340px;
  }

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

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

  #funktionen .feature-showcase,
  #funktionen .feature-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-row,
  .feature-row.reverse {
    grid-template-columns: 1fr;
  }

  .feature-row.reverse > div:first-child {
    order: 0;
  }

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

  .trust-card.prominent {
    grid-row: auto;
    grid-column: 1 / -1;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }

  .process-steps::before {
    left: 31px;
    right: auto;
    top: 20px;
    bottom: 20px;
    width: 2px;
    height: auto;
  }

  .process-steps [role="listitem"] {
    padding: 18px 18px 18px 66px;
  }

  .process-steps [role="listitem"]::before {
    left: 14px;
  }

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

  #preise .public-section-head {
    grid-template-columns: 1fr;
  }

  #preise .public-section-head .eyebrow,
  #preise .public-section-head h2,
  #preise .public-section-head p {
    grid-column: auto;
    grid-row: auto;
  }
}

@media (max-width: 680px) {
  .public-nav {
    padding: 10px 14px;
  }

  .public-brand > span:last-child {
    display: none;
  }

  .home-locked .profile-status,
  .public-hero,
  .public-final-cta {
    width: min(100% - 24px, 1180px);
  }

  .public-hero h1 {
    font-size: clamp(36px, 13vw, 52px);
  }

  .public-hero-visual {
    padding: 14px;
  }

  .mock-dashboard {
    grid-template-columns: 1fr;
  }

  .mock-sidebar {
    display: none;
  }

  .public-section {
    padding: 52px 14px;
  }

  .why-grid,
  .benefit-grid,
  .feature-card-grid,
  #funktionen .feature-showcase,
  #funktionen .feature-card-grid,
  .trust-grid,
  .pricing-grid,
  .public-footer {
    grid-template-columns: 1fr;
  }

  #preise .pricing-card ul {
    grid-template-columns: 1fr;
  }

  .public-nav-actions,
  .public-hero-actions,
  .public-final-cta div {
    align-items: stretch;
    flex-direction: column;
  }

  .public-login-form {
    display: grid;
    gap: 8px;
  }

  .public-login-field {
    width: 100%;
  }

  .public-login-form input {
    width: 100%;
  }

  .public-nav-actions .primary-button,
  .public-nav-actions .secondary-button,
  .public-hero-actions .primary-button,
  .public-hero-actions .secondary-button,
  .public-final-cta .primary-button,
  .public-final-cta .secondary-button {
    justify-content: center;
    width: 100%;
  }
}

.home-shell:not(.home-locked) .home-footer {
  position: fixed;
  left: 28px;
  right: 28px;
  bottom: 8px;
  z-index: 40;
}

.home-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.home-hero .brand-mark {
  order: 0;
}

.home-hero .home-product-title {
  order: 3;
}

.home-hero .global-nav {
  order: 1;
}

.home-hero .home-hero-actions {
  order: 2;
}

.home-hero .top-profile-menu {
  order: 4;
  margin-left: auto;
}

.home-hero .school-year-control {
  order: 5;
  margin-left: 0;
}

.home-hero .top-profile-menu {
  margin-left: auto;
}

.home-hero-actions {
  margin-left: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-hero-actions [hidden] {
  display: none !important;
}

.top-profile-menu {
  position: relative;
  margin-left: auto;
  flex: 0 0 auto;
  z-index: 9000;
  isolation: isolate;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(31, 77, 120, 0.1);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.top-profile-menu:hover {
  border-color: rgba(47, 127, 211, 0.34);
  background: rgba(255, 255, 255, 0.94);
  transform: translateY(-1px);
}

.top-profile-menu:focus-visible {
  outline: 3px solid rgba(47, 127, 211, 0.3);
  outline-offset: 3px;
}

.top-profile-menu svg {
  width: 20px;
  height: 20px;
}

.home-product-title {
  margin: -4px 0 0;
  position: static;
  transform: none;
  font-size: 44px;
  font-weight: 840;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 0 12px 28px rgba(71, 94, 119, 0.16);
  white-space: nowrap;
}

.home-product-title span,
.home-product-title strong {
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.home-product-title span {
  background-image: linear-gradient(105deg, #405166 0%, #b7c3ce 30%, #60748a 53%, #d2dae1 72%, #53687e 100%);
}

.home-product-title strong {
  background-image: linear-gradient(105deg, #245f96 0%, #68a6dd 52%, #2f78ba 100%);
  font-weight: 840;
}

.home-hero h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.home-hero .home-product-title {
  font-size: 44px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  align-items: start;
}

@keyframes homeIntroRise {
  from {
    opacity: 0;
    transform: translateY(54px);
    filter: blur(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

body.home-intro-active .profile-status,
body.home-intro-active .home-class-shortcuts,
body.home-intro-active .home-grid > .home-action {
  opacity: 0;
  animation: homeIntroRise 0.72s cubic-bezier(.18,.9,.22,1) forwards;
}

body.home-intro-active .profile-status {
  animation-delay: 0s;
}

body.home-intro-active .home-class-shortcuts {
  animation-delay: 0.22s;
}

body.home-intro-active .home-grid > .home-action:nth-child(1) { animation-delay: 0.38s; }
body.home-intro-active .home-grid > .home-action:nth-child(2) { animation-delay: 0.48s; }
body.home-intro-active .home-grid > .home-action:nth-child(3) { animation-delay: 0.58s; }
body.home-intro-active .home-grid > .home-action:nth-child(4) { animation-delay: 0.68s; }
body.home-intro-active .home-grid > .home-action:nth-child(5) { animation-delay: 0.78s; }
body.home-intro-active .home-grid > .home-action:nth-child(6) { animation-delay: 0.88s; }
body.home-intro-active .home-grid > .home-action:nth-child(7) { animation-delay: 0.98s; }
body.home-intro-active .home-grid > .home-action:nth-child(8) { animation-delay: 1.08s; }

.home-class-shortcuts {
  min-width: 0;
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 8px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 10px 26px rgba(38, 74, 110, 0.08);
}

.home-class-shortcuts[hidden] {
  display: none;
}

.home-class-shortcuts-label {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.home-class-shortcuts-list {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 1px;
}

.home-add-class {
  min-width: 136px;
  min-height: 42px;
  border: 1px dashed rgba(47, 127, 211, 0.34);
  border-radius: 8px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #17456f;
  background: rgba(242, 248, 254, 0.78);
  font-size: 10px;
  font-weight: 850;
  white-space: nowrap;
}

.home-add-class:hover {
  border-style: solid;
  background: rgba(225, 240, 252, 0.94);
}

.home-add-class svg {
  width: 15px;
  height: 15px;
}

.add-class-dialog {
  width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(109, 126, 150, 0.2);
  border-radius: 10px;
  padding: 0;
  color: var(--ink);
  background: rgba(247, 251, 255, 0.98);
  box-shadow: 0 28px 80px rgba(28, 56, 86, 0.24);
}

.add-class-dialog::backdrop {
  background: rgba(32, 48, 66, 0.24);
  backdrop-filter: blur(5px);
}

.add-class-dialog form {
  padding: 18px;
  display: grid;
  gap: 13px;
}

.add-class-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.add-class-dialog-head h2 {
  margin: 2px 0 0;
  font-size: 20px;
}

.add-class-dialog label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.add-class-dialog input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 11px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  font: inherit;
  font-size: 13px;
}

.add-class-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.form-message {
  min-height: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 760;
}

.home-class-shortcuts-list a {
  min-width: 118px;
  min-height: 46px;
  border: 1px solid rgba(47, 127, 211, 0.18);
  border-radius: 8px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  background: linear-gradient(145deg, rgba(247, 252, 255, 0.96), rgba(218, 233, 247, 0.82));
}

.home-class-shortcuts-list a:hover {
  border-color: rgba(47, 127, 211, 0.36);
  transform: translateY(-1px);
}

.home-class-shortcuts-list svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.home-class-shortcuts-list span,
.home-class-shortcuts-list strong,
.home-class-shortcuts-list small {
  min-width: 0;
  display: block;
}

.home-class-shortcuts-list strong {
  font-size: 12px;
}

.home-class-shortcuts-list small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 780;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-action,
.home-panel,
.home-analysis-rail {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.home-action-stack {
  display: grid;
  gap: 10px;
  align-self: start;
}

.home-action {
  min-height: 260px;
  padding: 18px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  color: #fff;
  background: linear-gradient(145deg, #5aa8f1 0%, #2f7fd3 55%, #2368b6 100%);
  font-weight: 850;
  font-size: 20px;
}

#newSurveyBtn,
.secondary-home-action,
.analysis-home-action,
.survey-list-home-action {
  color: #173f68;
  border-color: rgba(132, 151, 171, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(238, 244, 250, 0.92) 24%, rgba(196, 213, 230, 0.78) 52%, rgba(250, 253, 255, 0.96) 74%, rgba(213, 228, 242, 0.86) 100%),
    radial-gradient(circle at 22% 12%, rgba(255, 255, 255, 0.92), transparent 34%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 42px rgba(64, 92, 122, 0.13);
}

.home-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(31, 77, 120, 0.17);
}

.home-action-stack .home-action {
  min-height: 126px;
  height: 126px;
}

.home-grid > .home-action {
  min-height: 126px;
  height: 126px;
}

.class-dashboard-action,
.student-dashboard-action,
.personal-dashboard-action {
  color: #17456f;
  border-color: rgba(47, 127, 211, 0.26);
  background:
    linear-gradient(145deg, rgba(246, 251, 255, 0.98) 0%, rgba(213, 232, 250, 0.9) 48%, rgba(177, 211, 242, 0.78) 100%),
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.86), transparent 34%);
}

.class-dashboard-action:hover,
.student-dashboard-action:hover,
.personal-dashboard-action:hover {
  border-color: rgba(47, 127, 211, 0.38);
  background: linear-gradient(145deg, rgba(246, 251, 255, 0.98) 0%, rgba(204, 230, 252, 0.9) 58%, rgba(180, 215, 245, 0.8) 100%);
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(31, 77, 120, 0.13);
}

.planning-home-action {
  color: #1f4e3b;
  border-color: rgba(63, 139, 94, 0.24);
  background:
    linear-gradient(145deg, rgba(249, 254, 251, 0.98) 0%, rgba(220, 242, 229, 0.9) 52%, rgba(178, 220, 198, 0.78) 100%),
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.88), transparent 34%);
}

.analysis-home-action:hover,
.survey-list-home-action:hover {
  border-color: rgba(98, 126, 155, 0.34);
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(64, 92, 122, 0.14);
}

.planning-home-action:hover {
  border-color: rgba(63, 139, 94, 0.36);
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(50, 112, 77, 0.13);
}

.home-action svg {
  width: 34px;
  height: 34px;
}

.home-panel {
  padding: 20px;
  max-height: min(680px, calc(100vh - 210px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.home-analysis-rail {
  min-height: 150px;
  height: 150px;
  padding: 20px 14px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  color: #17456f;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(218, 232, 246, 0.78)),
    rgba(255, 255, 255, 0.72);
}

.home-rail-stack {
  align-self: start;
  position: sticky;
  top: 18px;
  display: grid;
  gap: 14px;
}

.home-analysis-rail:hover {
  border-color: rgba(47, 127, 211, 0.36);
  transform: translateY(-1px);
  box-shadow: 0 22px 50px rgba(31, 77, 120, 0.17);
}

.home-analysis-rail svg {
  width: 38px;
  height: 38px;
  color: var(--blue);
}

.home-analysis-rail span {
  font-size: 17px;
  font-weight: 850;
}

.home-analysis-rail small {
  max-width: 140px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.home-locked #homeClassShortcuts,
.home-locked .home-grid,
.home-locked .home-footer {
  display: none;
}

.home-login-photo {
  display: none;
  width: min(1240px, 100%);
  margin: 0 auto 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(38, 74, 110, 0.16);
  background: rgba(255, 255, 255, 0.5);
}

.home-login-photo img {
  display: block;
  width: 100%;
  height: clamp(300px, 36vw, 520px);
  object-fit: cover;
  object-position: center 42%;
}

.home-locked .home-login-photo {
  display: none;
}

.school-year-timeline {
  position: relative;
  width: 100%;
  margin: 0;
  border: 1px solid rgba(91, 125, 158, 0.18);
  border-radius: 10px;
  min-height: 106px;
  padding: 8px 16px 9px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(226, 238, 249, 0.8)),
    rgba(255, 255, 255, 0.64);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 16px 34px rgba(38, 74, 110, 0.1);
}

.school-year-timeline[data-open-planning] {
  cursor: pointer;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.school-year-timeline[data-open-planning]:hover,
.school-year-timeline[data-open-planning]:focus-visible {
  border-color: rgba(47, 127, 195, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 18px 38px rgba(47, 127, 195, 0.16);
  transform: translateY(-1px);
  outline: none;
}

.profile-status .school-year-timeline span {
  margin-top: 0;
}

.timeline-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.timeline-head h2 {
  margin: 0;
  color: #173f68;
  font-size: 15px;
  line-height: 1.05;
}

.timeline-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: right;
}

.timeline-track {
  position: relative;
  height: 16px;
  margin-top: 5px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(211, 225, 238, 0.68)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.72), rgba(195, 219, 241, 0.72));
  box-shadow:
    inset 0 0 0 1px rgba(109, 126, 150, 0.2),
    inset 0 1px 4px rgba(34, 62, 90, 0.08);
}

.timeline-break {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  border-inline: 1px solid rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(180deg, rgba(183, 207, 229, 0.84), rgba(135, 177, 214, 0.72));
}

.timeline-month-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 1px;
  background: rgba(65, 92, 122, 0.32);
}

.timeline-progress {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(133, 201, 150, 0.3), rgba(109, 190, 132, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.timeline-now {
  position: absolute;
  top: -4px;
  bottom: -4px;
  z-index: 4;
  width: 3px;
  border-radius: 999px;
  background: #3f8f55;
  box-shadow: 0 0 0 5px rgba(126, 190, 141, 0.18), 0 0 14px rgba(63, 143, 85, 0.3);
}

.timeline-legend {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.timeline-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.timeline-legend b {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(65, 142, 211, 0.58);
}

.timeline-break-list {
  position: relative;
  height: 29px;
  margin-top: 5px;
  padding-right: 0;
  color: var(--muted);
}

.timeline-break-list span {
  position: absolute;
  top: 0;
  width: 112px;
  font-size: 9px;
  font-weight: 780;
  line-height: 1.15;
  text-align: center;
}

.timeline-break-list span.start {
  text-align: left;
}

.timeline-break-list span.end {
  text-align: right;
}

.timeline-break-list span.paired-left {
  text-align: right;
}

.timeline-break-list span.paired-right {
  text-align: left;
}

.timeline-break-list strong,
.timeline-break-list small {
  display: block;
}

.timeline-month-labels {
  position: relative;
  height: 14px;
  margin-top: 3px;
  color: rgba(65, 86, 109, 0.82);
  font-size: 8px;
  font-weight: 820;
}

.timeline-month-labels span {
  position: absolute;
  bottom: 0;
  height: 13px;
  border-left: 1px solid rgba(91, 111, 132, 0.18);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
  text-align: center;
  white-space: nowrap;
}

.timeline-month-labels span:first-child {
  border-left: 0;
  padding-left: 0;
  transform: translateX(-8px);
}

.timeline-month-labels span:last-child {
  padding-right: 0;
  transform: translateX(8px);
}

.timeline-break-list strong {
  font-size: 8px;
  white-space: nowrap;
}

.timeline-break-list small {
  margin-top: 1px;
  font-size: 7px;
  font-weight: 760;
  color: rgba(94, 111, 135, 0.78);
}

.home-panel-title {
  margin: 0;
  color: var(--blue);
  font-size: 16px;
  letter-spacing: 0.08em;
}

.profile-status {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.profile-status:not(.has-profile) {
  display: grid;
  grid-template-columns: minmax(190px, 0.52fr) minmax(360px, 1fr);
  align-items: center;
}

.profile-login-copy .eyebrow {
  margin: 0 0 5px;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.profile-status.has-profile {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 82px;
  gap: 6px;
  align-items: stretch;
}

.profile-status.has-profile .school-year-timeline {
  width: 95%;
  justify-self: center;
}

.profile-status-center {
  min-width: 0;
  max-width: 260px;
  overflow: hidden;
  text-align: left;
}

.profile-status strong,
.profile-status span {
  display: block;
}

.profile-status span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.15;
}

.profile-email {
  margin-top: 2px;
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 760;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profile-status-actions,
.inline-login-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-login-form {
  justify-content: center;
}

.profile-status-actions.stacked {
  align-items: stretch;
  flex-direction: column;
  justify-self: end;
}

.profile-status-actions.stacked .secondary-button,
.profile-status-actions.stacked .primary-button {
  width: 100%;
}

.profile-dashboard-links {
  margin-top: 0;
  display: grid;
  width: min(360px, 100%);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  justify-content: center;
  align-self: center;
  justify-self: start;
}

.profile-dashboard-link {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 850;
  text-align: center;
}

.profile-dashboard-link svg {
  width: 18px;
  height: 18px;
}

.host-dashboard-link {
  color: #17456f;
  border-color: rgba(47, 127, 211, 0.22);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(218, 232, 246, 0.76));
}

.profile-quick-actions {
  display: grid;
  gap: 4px;
  justify-self: end;
  align-self: center;
  width: 98px;
  min-width: 0;
  overflow: hidden;
}

.profile-soft-action {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 40px;
  height: 40px;
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 8px;
  padding: 3px 5px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
  font-size: 8px;
  line-height: 1.05;
  font-weight: 800;
  white-space: normal;
  overflow: hidden;
}

.profile-soft-action:hover {
  color: var(--blue);
  border-color: rgba(47, 127, 211, 0.28);
  background: rgba(255, 255, 255, 0.76);
}

.profile-soft-action svg {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
}

.inline-login-form input {
  width: 190px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  outline: none;
}

.sidebar {
  min-height: calc(100vh - 78px);
  height: calc(100vh - 78px);
  padding: 16px 15px;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(222, 234, 247, 0.58));
  border-right: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
  position: relative;
  z-index: 30;
}

.builder-global-header {
  grid-column: 1 / -1;
  min-height: 62px;
  padding: clamp(14px, 2vw, 28px) clamp(14px, 2vw, 28px) 0;
  border-bottom: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.builder-global-header h1,
.student-global-header h1,
.analysis-header h1,
.home-hero h1 {
  margin: 0;
  min-width: 0;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: 0;
}

.builder-global-header > h1,
.builder-global-header .page-title-with-mark > h1,
.student-global-header h1,
.analysis-header h1 {
  position: static;
  left: auto;
  transform: none;
  color: var(--ink);
  background: none;
  font-size: 31px;
  font-weight: 820;
  text-align: left;
  text-shadow: none;
  white-space: nowrap;
  pointer-events: auto;
}

.builder-global-header .page-title-with-mark > h1 {
  flex: 0 1 auto;
  font-size: 31px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.builder-global-header .topbar-actions {
  margin-left: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 4px 10px;
}

.brand-mark {
  width: 78px;
  height: 38px;
  border-radius: 8px;
  padding: 4px 7px;
  display: grid;
  align-content: center;
  gap: 0;
  border: 1px solid rgba(101, 124, 150, 0.2);
  background: linear-gradient(145deg, #ffffff 0%, #dfe9f4 100%);
  color: #171714;
  box-shadow: 0 10px 24px rgba(31, 77, 120, 0.12);
  flex: 0 0 auto;
}

.brand-mark span {
  display: flex;
  align-items: baseline;
  min-width: 0;
  line-height: 1;
}

.brand-mark strong {
  width: 9px;
  color: transparent;
  background: linear-gradient(105deg, #526273 0%, #aeb9c4 45%, #627386 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-mark em {
  margin-left: 2px;
  color: transparent;
  background: linear-gradient(105deg, #526273 0%, #aeb9c4 45%, #627386 100%);
  background-clip: text;
  -webkit-background-clip: text;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark span:last-child strong,
.brand-mark span:last-child em {
  color: #2f7fc3;
  background: none;
}

a.brand-mark:hover {
  filter: brightness(0.96);
  transform: translateY(-1px);
}

.brand strong,
.brand-text span {
  display: block;
}

.brand-text span {
  color: #b8c8c2;
  font-size: 13px;
}

.search-wrap {
  position: relative;
}

.filter-wrap {
  display: grid;
  gap: 5px;
}

.filter-wrap label {
  color: var(--muted);
}

.filter-wrap select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  outline: none;
}

.filter-wrap option {
  color: var(--ink);
}

.sidebar-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 3px 8px;
}

.sidebar-section-head > div {
  min-width: 0;
}

.sidebar-section-head .eyebrow {
  margin-bottom: 0;
}

.sidebar-section-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.1;
}

.construct-head-actions {
  grid-column: 2;
  display: grid;
  grid-template-columns: repeat(2, max-content);
  gap: 5px;
  align-items: end;
  justify-self: end;
  transform: translateY(4px);
}

.add-custom-construct-button {
  min-height: 42px;
  padding: 4px 8px;
  gap: 2px;
  white-space: nowrap;
  color: #205d92;
  border-color: rgba(47, 127, 211, 0.32);
  background: linear-gradient(145deg, rgba(232, 244, 255, 0.98), rgba(185, 218, 247, 0.9));
  font-size: 9px;
  font-weight: 850;
}

.standard-instruments-button {
  min-height: 42px;
  padding: 4px 8px;
  gap: 2px;
  white-space: nowrap;
  color: #315f55;
  border-color: rgba(76, 147, 105, 0.32);
  background: linear-gradient(145deg, rgba(234, 249, 240, 0.98), rgba(184, 226, 201, 0.9));
  font-size: 9px;
  font-weight: 850;
}

.standard-instruments-button[aria-pressed="true"] {
  color: #194f3d;
  border-color: rgba(56, 132, 91, 0.38);
  background: linear-gradient(145deg, rgba(250, 255, 252, 0.98), rgba(214, 239, 225, 0.9));
}

.add-custom-construct-button svg,
.standard-instruments-button svg {
  width: 12px;
  height: 12px;
}

.search-wrap svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 16px;
  transform: translateY(-50%);
  color: #7a8da5;
}

.search-wrap input,
.form-row input,
.form-row select,
.copy-row input {
  width: 100%;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  outline: none;
}

.search-wrap input {
  padding-left: 36px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  border-color: var(--line);
}

.search-wrap input::placeholder {
  color: #7a8da5;
}

.search-wrap input:focus,
.form-row input:focus,
.form-row select:focus,
.copy-row input:focus,
.survey-search input:focus,
.compare-form select:focus,
.filter-wrap select:focus {
  border-color: rgba(47, 127, 211, 0.42);
  background: rgba(255, 255, 255, 0.88);
}

.construct-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  overflow-y: auto;
  padding-right: 4px;
}

.construct-item {
  width: 100%;
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 20px;
  align-items: start;
  gap: 10px;
}

.construct-item:hover,
.construct-item.active {
  background: rgba(232, 242, 252, 0.95);
  color: #17456f;
  border-color: rgba(47, 127, 211, 0.28);
  box-shadow: 0 10px 22px rgba(31, 77, 120, 0.08);
  transform: translateY(-1px);
}

.construct-icon {
  width: 30px;
  height: 30px;
  margin-top: 1px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(47, 127, 211, 0.1);
  color: var(--accent);
}

.construct-item.active .construct-icon,
.construct-item:hover .construct-icon {
  color: #fff;
  background: var(--accent);
}

.standard-instrument-item {
  min-height: 72px;
  border-color: rgba(76, 147, 105, 0.24);
  background: rgba(248, 253, 250, 0.72);
}

.standard-instrument-item:hover,
.standard-instrument-item.active {
  color: #194f3d;
  border-color: rgba(56, 132, 91, 0.34);
  background: rgba(232, 246, 238, 0.96);
}

.standard-instrument-item .construct-icon {
  color: #315f55;
  background: rgba(76, 147, 105, 0.12);
}

.standard-instrument-item:hover .construct-icon,
.standard-instrument-item.active .construct-icon {
  background: #3e8c63;
}

.standard-instrument-popover {
  position: absolute;
  left: calc(100% + 10px);
  top: 120px;
  width: min(368px, calc(100vw - 340px));
  z-index: 80;
  pointer-events: none;
}

.standard-instrument-popover[hidden] {
  display: none;
}

.standard-instrument-popover-card {
  position: relative;
  border: 1px solid rgba(76, 147, 105, 0.22);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 22px 48px rgba(31, 77, 120, 0.18);
  display: grid;
  gap: 10px;
}

.standard-instrument-popover-card::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 18px;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(76, 147, 105, 0.22);
  border-bottom: 1px solid rgba(76, 147, 105, 0.22);
  background: rgba(255, 255, 255, 0.96);
  transform: rotate(45deg);
}

.standard-instrument-popover-card strong {
  font-size: 15px;
  line-height: 1.2;
}

.standard-instrument-popover-card section {
  display: grid;
  gap: 4px;
}

.standard-instrument-popover-card small {
  color: #5c7388;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.standard-instrument-popover-card p {
  margin: 0;
  color: #263b4e;
  font-size: 12px;
  line-height: 1.35;
}

.standard-instrument-popover-card .construct-pill-list span {
  padding: 5px 7px;
  font-size: 11px;
}

.construct-text strong,
.construct-text span {
  display: block;
}

.construct-text strong {
  font-size: 13px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.construct-text strong.compact-title,
.selected-card strong.compact-title {
  font-size: 10px;
  line-height: 1.08;
}

.construct-text strong.compact-title-xs,
.selected-card strong.compact-title-xs {
  font-size: 9px;
  line-height: 1.05;
}

.construct-text span {
  margin-top: 3px;
  font-size: 11px;
  line-height: 1.15;
  color: currentColor;
  opacity: 0.76;
}

.workspace {
  padding: 16px 18px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.topbar,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar h1,
.panel h2,
.publish-panel h2,
.survey-card h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: 0;
}

.topbar h1 {
  font-size: 34px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-single-title {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.07em;
}

.topbar-actions,
.panel-actions,
.data-actions,
.copy-row,
.publish-content,
.publish-short-actions,
.page-title-with-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-title-with-mark {
  width: 100%;
}

.panel-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.school-year-control {
  margin-left: auto;
  width: 112px;
  min-width: 112px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 7px;
  display: grid;
  grid-template-columns: max-content;
  justify-content: start;
  align-content: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.school-year-control label,
.school-year-control span {
  position: relative;
  width: fit-content;
  min-width: 0;
  display: grid;
  gap: 1px;
}

.school-year-control label {
  cursor: pointer;
}

.school-year-control select {
  width: fit-content;
  field-sizing: content;
  max-width: 112px;
  min-width: 0;
  border: 0;
  padding: 0 13px 0 0;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 850;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.school-year-control label::after {
  content: "";
  position: absolute;
  right: 1px;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  pointer-events: none;
}

.page-title-with-mark .school-year-control,
.builder-global-header .school-year-control,
.student-global-header .school-year-control {
  order: 81;
  margin-left: 0;
}

.page-title-with-mark .top-profile-menu,
.builder-global-header .top-profile-menu,
.student-global-header .top-profile-menu {
  order: 80;
  margin-left: auto;
}

.nav-button {
  width: 112px;
  flex: 0 0 112px;
  min-width: 58px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink);
  background: var(--glass);
  font-size: 11px;
  font-weight: 820;
  white-space: normal;
  overflow: hidden;
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
}

.nav-button[href="index.html"] {
  width: 86px;
  flex-basis: 86px;
}

.nav-button[href="analysis.html"] {
  width: 126px;
  flex-basis: 126px;
}

.nav-button[href="teacher-dashboard.html"] {
  width: 126px;
  flex-basis: 126px;
}

.nav-button::after {
  content: attr(aria-label);
  color: rgba(23, 69, 111, 0.78);
  line-height: 1.02;
  text-align: center;
  white-space: pre-line;
  min-width: 0;
  max-width: 98px;
  overflow: hidden;
}

.nav-button[href="class-dashboard.html"]::after {
  content: "Klassen-\A Dashboard";
}

.nav-button[href="class-matrix.html"]::after {
  content: "Schüler-\A Dashboard";
}

.nav-button[href="teacher-dashboard.html"]::after {
  content: "Unterrichts-\A Dashboard";
}

.nav-button[href="teacher-dashboard.html"][aria-label="Unterrichtsdashboard"]::after {
  content: "Unterrichts-\A Dashboard";
}

.nav-button[href="index.html#new"]::after,
.nav-button[href="index.html?new=1#new"]::after {
  content: "Befragung\A erstellen";
}

.nav-button[href="analysis.html"]::after {
  content: "Auswertungs-\A bereich";
}

.nav-button:hover {
  border-color: rgba(47, 127, 211, 0.34);
  background: rgba(230, 242, 252, 0.9);
  transform: translateY(-1px);
}

.nav-button svg {
  width: 17px;
  height: 17px;
  min-width: 17px;
  min-height: 17px;
  flex: 0 0 17px;
  color: var(--blue);
}

.nav-button[href="class-matrix.html"] svg,
.nav-button[href="class-matrix.html"] .lucide-fallback {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  flex-basis: 18px;
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-button {
  padding: 0 16px;
  color: #fff;
  background: linear-gradient(145deg, #54a3ee, var(--accent));
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(47, 127, 211, 0.22);
}

.primary-button:hover {
  background: linear-gradient(145deg, #438ed8, var(--accent-strong));
  transform: translateY(-1px);
}

.secondary-button {
  padding: 0 13px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  border-color: var(--line);
  font-weight: 750;
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

.secondary-button:hover,
.icon-button:hover {
  border-color: rgba(47, 127, 211, 0.28);
  background: rgba(232, 242, 252, 0.88);
  transform: translateY(-1px);
}

.icon-button {
  width: 42px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.68);
  border-color: var(--line);
  flex: 0 0 auto;
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

.icon-button.ghost {
  background: transparent;
}

.primary-button svg,
.secondary-button svg,
.icon-button svg {
  width: 18px;
  height: 18px;
}

.sidebar-section-head .add-custom-construct-button,
.sidebar-section-head .standard-instruments-button {
  min-height: 42px;
  height: 42px;
  padding: 4px 8px;
  flex-direction: column;
  gap: 2px;
  border-radius: 6px;
  font-size: 9px;
  line-height: 1.02;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.sidebar-section-head .add-custom-construct-button svg,
.sidebar-section-head .standard-instruments-button svg {
  width: 12px;
  height: 12px;
}

.primary-button:disabled,
.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.class-carryover-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  padding: 28px;
  display: grid;
  place-items: center;
  background: rgba(226, 237, 248, 0.54);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.class-carryover-dialog {
  width: min(920px, calc(100vw - 32px));
  max-height: calc(100vh - 44px);
  border: 1px solid rgba(109, 126, 150, 0.2);
  border-radius: 14px;
  padding: 22px;
  display: grid;
  gap: 16px;
  overflow: auto;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(232, 241, 250, 0.9)),
    rgba(255, 255, 255, 0.86);
  box-shadow: 0 28px 80px rgba(31, 77, 120, 0.22);
}

.class-carryover-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.class-carryover-head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 28px;
  letter-spacing: 0;
}

.class-carryover-head .icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
}

.class-carryover-copy {
  margin: 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.5;
}

.class-carryover-table {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 96px minmax(220px, 1fr);
  gap: 9px;
  align-items: stretch;
}

.class-carryover-label {
  padding: 0 4px 2px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 920;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.class-carryover-label.transfer-label {
  text-align: center;
}

.class-carryover-old,
.class-carryover-new,
.class-carryover-arrow {
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 10px;
  min-height: 72px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
}

.class-carryover-old {
  display: grid;
  align-content: center;
  gap: 3px;
}

.class-carryover-old strong {
  color: var(--ink);
  font-size: 22px;
  font-weight: 920;
}

.class-carryover-old span,
.class-carryover-new span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.class-carryover-arrow {
  display: grid;
  place-items: center;
  color: var(--blue);
  background: linear-gradient(145deg, rgba(225, 240, 252, 0.9), rgba(246, 250, 254, 0.78));
}

.class-carryover-arrow span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(47, 127, 211, 0.72);
  font-size: 11px;
  font-weight: 900;
}

.class-carryover-arrow b {
  margin-top: -4px;
  font-size: 24px;
  font-weight: 900;
}

.class-carryover-new {
  display: grid;
  gap: 7px;
}

.class-carryover-new input {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(109, 126, 150, 0.2);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  font-weight: 880;
  outline: none;
}

.class-carryover-new input:focus {
  border-color: rgba(47, 127, 211, 0.42);
  box-shadow: 0 0 0 4px rgba(47, 127, 211, 0.12);
}

.class-carryover-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.danger-button {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.22);
}

.danger-button:hover {
  background: rgba(255, 239, 236, 0.9);
}

.setup-grid,
.builder-grid {
  display: grid;
  gap: 14px;
}

.setup-grid {
  grid-template-columns: minmax(520px, 1fr) minmax(520px, 1fr);
  align-items: stretch;
}

.builder-grid {
  grid-template-columns: minmax(260px, 0.56fr) minmax(520px, 1.44fr);
  align-items: start;
}

.builder-panel,
.preview-panel {
  max-height: calc(100vh - 368px);
  min-height: 238px;
  overflow: auto;
}

body.builder-intro-active .sidebar,
body.builder-intro-active .meta-panel,
body.builder-intro-active .builder-panel,
body.builder-intro-active .publish-panel,
body.builder-intro-active .preview-panel {
  animation: builderPanelSlideIn 0.32s cubic-bezier(.2,.86,.2,1) both;
}

body.builder-intro-active .sidebar {
  animation-delay: 0s;
}

body.builder-intro-active .meta-panel,
body.builder-intro-active .builder-panel {
  animation-delay: 0s;
}

body.builder-intro-active .publish-panel,
body.builder-intro-active .preview-panel {
  animation-delay: 0s;
}

@keyframes builderPanelSlideIn {
  from {
    opacity: 0;
    transform: translateX(-34px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.panel,
.publish-panel,
.survey-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.panel {
  padding: 14px;
}

.meta-panel {
  background:
    linear-gradient(145deg, rgba(247, 249, 252, 0.96), rgba(229, 236, 244, 0.72)),
    var(--panel);
}

.panel h2,
.publish-panel h2,
.survey-card h1 {
  font-weight: 790;
}

.metric,
.pill {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--blue);
  background: rgba(49, 111, 168, 0.11);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.form-row {
  margin-top: 12px;
  display: grid;
  gap: 5px;
}

.meta-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  column-gap: 10px;
}

.meta-form-grid .form-row {
  margin-top: 6px;
}

.meta-form-grid .toggle-row {
  grid-column: 1 / -1;
}

.hidden-meta-row {
  display: none;
}

.meta-title-row,
.meta-school-row {
  grid-column: 1 / -1;
}

.meta-profile-row {
  grid-column: 1;
  grid-row: 3;
}

.meta-form-grid .meta-smiley-row {
  grid-column: 1;
  grid-row: 4;
}

.meta-form-grid .meta-hospitation-row {
  grid-column: 1 / -1;
  grid-row: 5;
}

.meta-class-row {
  grid-column: 2;
  grid-row: 3;
}

.meta-subject-row {
  grid-column: 2;
  grid-row: 4;
}

.form-row.compact {
  margin-top: 12px;
}

#surveyTitle:required:invalid,
#assignmentSelect:not(:disabled):invalid {
  border-color: rgba(0, 0, 0, 0.92);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.toggle-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 6px;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.52);
  cursor: pointer;
}

.toggle-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  flex: 0 0 auto;
}

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

.toggle-row small {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 700;
}

label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.selected-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.selected-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.selected-card[draggable="true"] {
  cursor: grab;
}

.selected-card.is-drag-over {
  border-color: rgba(47, 127, 211, 0.46);
  box-shadow: 0 0 0 3px rgba(47, 127, 211, 0.12);
}

.selected-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.selected-card-actions .icon-button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  border-radius: 7px;
}

.selected-card-actions .icon-button svg {
  width: 15px;
  height: 15px;
}

.selected-drag-handle {
  cursor: grab;
  color: #2f6fa8;
}

.selected-card:active .selected-drag-handle {
  cursor: grabbing;
}

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

.selected-card strong {
  overflow-wrap: anywhere;
  hyphens: auto;
}

.selected-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.custom-question-panel {
  margin-top: 14px;
  border: 1px dashed rgba(47, 127, 211, 0.28);
  border-radius: 10px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: linear-gradient(145deg, rgba(232, 242, 252, 0.46), rgba(255, 255, 255, 0.68));
}

.custom-question-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.custom-question-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.custom-question-head > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.custom-question-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, 0.55fr);
  gap: 8px;
}

.custom-question-grid label {
  display: grid;
  gap: 5px;
}

.custom-question-grid textarea {
  resize: vertical;
}

.custom-question-add {
  justify-self: start;
}

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

.custom-construct-popover {
  position: fixed;
  top: 158px;
  left: 316px;
  right: 18px;
  z-index: 1200;
  max-height: min(540px, calc(100vh - 180px));
  border: 1px solid rgba(109, 126, 150, 0.22);
  border-radius: 12px;
  padding: 14px;
  display: grid;
  gap: 10px;
  overflow: auto;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(232, 242, 252, 0.92)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 72px rgba(31, 77, 120, 0.22);
  backdrop-filter: blur(20px) saturate(1.15);
  -webkit-backdrop-filter: blur(20px) saturate(1.15);
  animation: customConstructOpen 0.22s cubic-bezier(.2,.86,.2,1) both;
}

.custom-construct-popover::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 22px;
  width: 12px;
  height: 12px;
  border-left: 1px solid rgba(109, 126, 150, 0.22);
  border-bottom: 1px solid rgba(109, 126, 150, 0.22);
  background: rgba(255, 255, 255, 0.96);
  transform: rotate(45deg);
}

@keyframes customConstructOpen {
  from {
    opacity: 0;
    transform: translate(-12px, -8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

.custom-construct-head {
  display: grid;
  grid-template-columns: minmax(220px, 460px) auto;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}

.custom-construct-name-row {
  display: grid;
  gap: 5px;
}

.custom-construct-name-row input,
.custom-item-composer input,
.custom-item-composer select,
.custom-item-composer textarea,
.custom-construct-intro {
  width: 100%;
  border: 1px solid rgba(109, 126, 150, 0.2);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  outline: none;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
}

.custom-construct-name-row input,
.custom-item-composer input,
.custom-item-composer select {
  height: 36px;
  padding: 0 10px;
}

.custom-item-composer textarea,
.custom-construct-intro {
  min-height: 36px;
  padding: 9px 10px;
  resize: vertical;
}

.custom-construct-intro {
  min-height: 58px;
  background: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

.custom-construct-name-row input::placeholder,
.custom-construct-intro::placeholder {
  color: rgba(78, 96, 118, 0.78);
}

.custom-construct-intro-label {
  display: grid;
  gap: 5px;
  color: #59708a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.custom-construct-intro-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 250px);
  gap: 10px;
  align-items: end;
}

.custom-intro-preset-label {
  display: grid;
  gap: 5px;
  color: #59708a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.custom-intro-preset-label select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(109, 126, 150, 0.2);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 11px;
  font-weight: 760;
  outline: none;
}

.custom-item-composer {
  display: grid;
  grid-template-columns: minmax(120px, 0.5fr) minmax(210px, 1.1fr) minmax(260px, 1fr) auto;
  gap: 9px;
  align-items: end;
}

.custom-item-composer label,
.custom-construct-name-row label {
  display: grid;
  gap: 5px;
}

.custom-question-text-field textarea {
  min-height: 36px;
}

.custom-answer-field {
  min-width: 0;
}

.custom-answer-preview {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 2px;
}

.custom-answer-chip {
  min-height: 30px;
  min-width: 38px;
  max-width: 132px;
  border: 1px solid rgba(47, 127, 211, 0.18);
  border-radius: 8px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-align: center;
  white-space: normal;
}

.custom-answer-field select {
  min-width: 0;
  font-size: 11px;
  line-height: 1.15;
  text-overflow: ellipsis;
}

.custom-answer-chip.free {
  min-width: 150px;
  justify-content: flex-start;
  color: var(--muted);
  background: rgba(222, 234, 247, 0.52);
}

.custom-items-list {
  display: grid;
  gap: 7px;
}

.custom-items-section-head {
  color: #59708a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.custom-item-card {
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 8px;
  padding: 8px 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 1.2fr) auto;
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.68);
}

.custom-item-options {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
}

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

.custom-item-card strong {
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.custom-item-card span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.custom-item-options .custom-answer-chip {
  margin-top: 0;
  display: inline-flex;
  color: var(--ink);
  font-size: 11px;
}

.custom-item-options .custom-answer-chip.free {
  color: var(--muted);
}

.custom-item-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.custom-item-actions .icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
}

.custom-construct-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.custom-construct-confirm {
  min-height: 36px;
  border: 1px solid rgba(48, 142, 91, 0.24);
  border-radius: 8px;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: rgba(48, 142, 91, 0.24);
  color: #145d35;
  font: inherit;
  font-weight: 850;
  background: linear-gradient(145deg, rgba(225, 244, 233, 0.96), rgba(187, 226, 201, 0.88));
  box-shadow: 0 10px 22px rgba(48, 142, 91, 0.12);
  cursor: pointer;
}

.colleague-publish-row {
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.colleague-qr-box {
  width: 112px;
  min-height: 112px;
  margin-top: 8px;
}

.question-preview {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.question-block {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.question-block:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.question-block h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.question-block h4 {
  margin: 0 0 7px;
  font-size: 13px;
}

.preview-construct {
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
  display: grid;
  gap: 8px;
}

.preview-construct:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.preview-construct > h3 {
  margin: 0;
  font-size: 14px;
}

.preview-construct > p,
.student-construct > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.scale {
  display: grid;
  grid-template-columns: repeat(var(--scale-count, 5), minmax(0, 1fr));
  gap: 6px;
}

.scale > span {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 6px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.12;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.smiley-scale > span,
.smiley-radio-scale label {
  min-height: 58px;
}

.smiley-face,
.smiley-value {
  display: block;
  text-align: center;
}

.smiley-face {
  font-size: 28px;
  line-height: 1;
}

.smiley-value {
  display: none;
}

.empty-state {
  min-height: 180px;
  border: 1px dashed rgba(109, 126, 150, 0.34);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  text-align: center;
  padding: 16px;
}

.publish-panel {
  padding: 14px;
  display: grid;
  gap: 10px;
  align-items: start;
}

.publish-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.publish-content {
  min-width: 0;
  display: grid;
  grid-template-columns: 178px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px 16px;
}

.qr-link-column {
  width: 178px;
  display: grid;
  gap: 8px;
}

.qr-box {
  width: 178px;
  min-height: 178px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
}

.qr-box img {
  width: 160px;
  height: 160px;
  display: block;
}

.publish-details {
  flex: 1;
  min-width: 260px;
  display: grid;
  min-height: 178px;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: 8px;
}

.publish-details .data-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

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

.publish-details .data-actions .secondary-button,
.publish-short-actions .secondary-button,
.publish-short-actions .response-strip {
  width: 100%;
  min-height: 38px;
}

.publish-details .data-actions .secondary-button {
  border-color: rgba(108, 122, 139, 0.18);
  color: rgba(31, 45, 61, 0.72);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.68), rgba(230, 235, 241, 0.58)),
    rgba(240, 243, 247, 0.62);
  box-shadow: none;
}

.publish-details .data-actions .secondary-button:hover {
  border-color: rgba(87, 105, 127, 0.28);
  color: rgba(25, 38, 56, 0.88);
  background: rgba(238, 243, 248, 0.86);
}

.publish-main-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

.publish-main-button {
  min-height: 44px;
  min-width: min(100%, 290px);
  padding: 0 18px;
  font-size: 14px;
}

.publish-refresh-button,
.publish-pdf-button {
  width: 44px;
  min-height: 44px;
}

.pdf-file-icon {
  position: relative;
  width: 24px;
  height: 29px;
  border: 1.8px solid #1f5d91;
  border-radius: 4px 7px 4px 4px;
  display: grid;
  place-items: center;
  color: #1f5d91;
  background: linear-gradient(145deg, #ffffff, #e9f3fd);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.pdf-file-icon::after {
  content: "";
  position: absolute;
  top: -1.8px;
  right: -1.8px;
  width: 8px;
  height: 8px;
  border-left: 1.8px solid #1f5d91;
  border-bottom: 1.8px solid #1f5d91;
  border-radius: 0 5px 0 2px;
  background: #dcecfb;
}

.publish-link-row {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.copy-row input {
  min-width: 0;
}

.response-strip {
  min-height: 36px;
  border-radius: 8px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(224, 239, 252, 0.85);
  color: var(--blue);
  font-weight: 800;
  width: 126px;
}

.analysis-button {
  width: auto;
  min-width: 132px;
}

.home-footer {
  min-height: 38px;
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 10px;
  background: rgba(246, 250, 254, 0.88);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  padding: 6px 12px;
}

.home-footer a:hover,
.home-footer span:hover {
  color: var(--blue);
}

.social-login-block {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: grid;
  gap: 10px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
  font-weight: 750;
}

.registration-social-login {
  margin-top: 8px;
  border-top: 0;
  padding-top: 0;
}

.registration-divider {
  position: relative;
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.registration-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
}

.registration-divider span {
  position: relative;
  padding: 0 10px;
  background: rgba(245, 249, 253, 0.96);
}

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

.social-login-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  font-weight: 820;
}

.social-login-button.apple {
  color: #fff;
  border-color: #111827;
  background: #111827;
}

.social-login-button strong {
  font-size: 17px;
}

.social-login-button.disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.profile-form .form-row small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.verification-result {
  border-color: rgba(67, 151, 91, 0.24);
  background: rgba(228, 246, 234, 0.76);
}

.profile-result.empty-state {
  display: none;
}

.profile-result.school-license-request-intro {
  display: block;
}

.school-license-request-form textarea {
  min-height: 132px;
}

.school-license-request-form[hidden] {
  display: none;
}

.student-id-row {
  margin-top: 0;
}

.student-id-row small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
}

.student-demographics {
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  background: rgba(230, 241, 251, 0.46);
}

.student-demographics[hidden] {
  display: none;
}

.student-demographics > div {
  display: grid;
  gap: 5px;
}

.student-demographics label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 820;
}

.student-demographics input,
.student-demographics select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.student-demographics p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}

.error-text {
  color: #b42318 !important;
}

.student-shell {
  min-height: 100vh;
  padding: 28px 16px;
  display: grid;
  align-content: start;
  gap: 22px;
  background: linear-gradient(145deg, #fbfdff 0%, #f1f6fb 42%, #e5eef8 100%);
}

.student-global-header {
  display: none;
}

.analysis-shell {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  padding: clamp(14px, 2vw, 28px);
  display: grid;
  align-content: start;
  gap: 22px;
  overflow-x: clip;
}

.profile-shell {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  align-content: start;
  gap: 22px;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1380px);
  justify-content: center;
  gap: 22px;
}

.profile-grid > .panel {
  width: 100%;
}

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

.profile-edit-panel {
  border: 1px solid rgba(93, 125, 156, 0.18);
  border-radius: 12px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(247, 251, 255, 0.74), rgba(236, 245, 253, 0.54));
}

body.profile-has-account:not(.profile-editing) .profile-edit-panel {
  display: none;
}

body.profile-has-account .registration-social-login,
body.profile-has-account .registration-divider {
  display: none;
}

.profile-form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

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

.profile-form textarea {
  width: 100%;
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  resize: vertical;
  outline: none;
}

.profile-form textarea:focus {
  border-color: rgba(47, 127, 211, 0.42);
  box-shadow: 0 0 0 3px rgba(47, 127, 211, 0.11);
}

.assignment-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.54);
}

.subject-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.54);
}

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

.subject-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 7px;
  align-items: center;
}

.subject-row select,
.assignment-row select {
  min-width: 0;
}

.subject-remove {
  width: 38px;
  height: 38px;
}

.homeroom-class-options,
.profile-inline-homeroom-editor {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  background: rgba(255, 255, 255, 0.54);
}

.homeroom-class-options label,
.profile-inline-homeroom-editor label {
  border: 1px solid rgba(93, 125, 156, 0.2);
  border-radius: 7px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  background: rgba(244, 249, 253, 0.82);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.homeroom-class-options label:has(input:checked),
.profile-inline-homeroom-editor label:has(input:checked) {
  border-color: rgba(47, 127, 211, 0.4);
  color: var(--blue);
  background: rgba(218, 235, 250, 0.88);
}

.homeroom-empty {
  color: var(--muted);
  font-size: 11px;
}

.oauth-profile-completion .registration-social-login,
.oauth-profile-completion .registration-divider,
.oauth-profile-completion .password-registration-field {
  display: none;
}

.oauth-profile-completion #registerEmail {
  color: var(--muted);
  background: rgba(229, 237, 245, 0.7);
}

@media (max-width: 620px) {
  .subject-rows {
    grid-template-columns: 1fr;
  }

  .profile-school-context {
    grid-template-columns: 1fr;
  }
}

.assignment-editor-head,
.assignment-row {
  display: grid;
  grid-template-columns: minmax(90px, 0.74fr) minmax(150px, 1.26fr) 38px;
  gap: 8px;
  align-items: center;
}

.assignment-editor-head {
  padding: 0 46px 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.assignment-rows {
  display: grid;
  gap: 8px;
}

.assignment-row input {
  min-width: 0;
}

.assignment-remove {
  width: 38px;
  height: 38px;
}

.compact-add-button {
  width: fit-content;
  min-height: 36px;
  padding-inline: 12px;
}

.compact-profile-form {
  margin-bottom: 18px;
}

.profile-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.profile-account-card {
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(239, 247, 254, 0.74));
  box-shadow: 0 18px 44px rgba(31, 77, 120, 0.08);
}

.profile-id-card {
  border-radius: 8px;
  padding: 14px;
  color: #fff;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.38), transparent 28%),
    linear-gradient(145deg, #6aaeea, var(--blue));
}

.profile-id-card-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  align-items: end;
  gap: 18px;
}

.profile-id-primary {
  min-width: 0;
}

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

.profile-id-card span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  opacity: 0.84;
}

.profile-id-card strong {
  margin-top: 4px;
  font-size: clamp(22px, 3vw, 28px);
  line-height: 1.15;
}

.profile-local-name {
  min-width: 0;
  display: grid;
  gap: 5px;
  text-align: right;
}

.profile-local-name span {
  font-size: 12px;
}

.profile-local-name input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 0;
  padding: 0 0 2px;
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  line-height: 1.15;
  text-align: right;
  outline: none;
}

.profile-local-name input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.profile-local-name input:focus {
  border-color: rgba(255, 255, 255, 0.9);
}

.profile-data {
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.profile-data div {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.profile-data dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-data dd {
  margin: 3px 0 0;
  font-weight: 750;
}

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

.profile-section-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(360px, 1fr) minmax(460px, 1.2fr);
  gap: 12px;
  align-items: start;
}

.profile-section-card {
  min-width: 0;
  border: 1px solid rgba(93, 125, 156, 0.16);
  border-radius: 13px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: rgba(248, 251, 255, 0.68);
}

body.profile-has-account:not(.profile-editing) .profile-section-card {
  border-color: rgba(109, 126, 150, 0.12);
  background: rgba(239, 244, 249, 0.68);
}

.profile-section-card h3 {
  margin: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-edit-item {
  width: 100%;
  min-height: 58px;
  border: 1px solid rgba(93, 125, 156, 0.18);
  border-radius: 11px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.62);
}

body.profile-editing .profile-edit-item.editable:hover {
  border-color: rgba(47, 127, 211, 0.32);
  background: rgba(235, 245, 253, 0.82);
  transform: translateY(-1px);
}

.profile-edit-item.locked {
  color: rgba(63, 78, 96, 0.72);
  background: rgba(231, 237, 243, 0.72);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.profile-edit-item.locked strong {
  color: rgba(45, 58, 74, 0.66);
}

body.profile-editing .profile-edit-item.editable,
body.profile-editing .profile-edit-item.editing {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

body.profile-editing .profile-edit-item.editable strong,
body.profile-editing .profile-edit-item.editing strong {
  color: #111827;
}

.profile-edit-item:disabled {
  cursor: default;
  transform: none;
  opacity: 1;
}

.profile-edit-item.editing {
  border-color: rgba(47, 127, 211, 0.42);
  background: rgba(232, 244, 253, 0.92);
}

.profile-inline-main,
.profile-edit-item span {
  min-width: 0;
  display: grid;
  gap: 3px;
  flex: 1 1 auto;
}

.profile-inline-main small,
.profile-edit-item small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.profile-inline-main strong,
.profile-edit-item strong {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.22;
}

.profile-inline-main input,
.profile-inline-main select,
.profile-inline-main textarea {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(93, 125, 156, 0.24);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  font: inherit;
  font-weight: 760;
  outline: none;
}

.profile-inline-main textarea {
  resize: vertical;
  line-height: 1.35;
}

.profile-inline-main input:focus,
.profile-inline-main select:focus,
.profile-inline-main textarea:focus {
  border-color: rgba(47, 127, 211, 0.46);
  box-shadow: 0 0 0 3px rgba(47, 127, 211, 0.12);
}

.profile-inline-edit {
  width: 38px;
  height: 38px;
}

.profile-inline-assignment-editor {
  display: grid;
  gap: 8px;
}

.profile-inline-assignment-row {
  display: grid;
  grid-template-columns: minmax(84px, 0.72fr) minmax(150px, 1.28fr) 38px 38px;
  gap: 8px;
  align-items: center;
}

.profile-inline-assignment-row:not(.editing) input:disabled,
.profile-inline-assignment-row:not(.editing) select:disabled {
  color: var(--ink);
  opacity: 1;
  background: rgba(247, 250, 253, 0.82);
  -webkit-text-fill-color: var(--ink);
}

.profile-inline-assignment-row.editing {
  border-radius: 10px;
  background: rgba(232, 244, 253, 0.48);
}

.profile-inline-assignment-edit,
.profile-inline-assignment-remove {
  width: 38px;
  height: 38px;
}

.profile-inline-assignment-add {
  margin-top: 2px;
}

.profile-inline-subject-editor {
  display: grid;
  gap: 8px;
}

.profile-inline-subject-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.profile-inline-subject-row.options-open {
  z-index: 20;
}

.profile-subject-combobox {
  position: relative;
  min-width: 0;
}

.profile-subject-combobox input {
  padding-right: 40px;
}

.profile-subject-arrow {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
}

.profile-subject-arrow:hover {
  background: rgba(47, 127, 211, 0.1);
}

.profile-subject-arrow svg {
  width: 16px;
  height: 16px;
  transition: transform 0.16s ease;
}

.profile-inline-subject-row.options-open .profile-subject-arrow svg {
  transform: rotate(180deg);
}

.profile-subject-options {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 30;
  max-height: 230px;
  overflow-y: auto;
  border: 1px solid rgba(93, 125, 156, 0.2);
  border-radius: 12px;
  padding: 6px;
  display: grid;
  gap: 3px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 18px 42px rgba(31, 77, 120, 0.16);
  backdrop-filter: blur(18px) saturate(1.18);
  -webkit-backdrop-filter: blur(18px) saturate(1.18);
}

.profile-subject-options button,
.profile-subject-options span {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 7px 9px;
  text-align: left;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 760;
}

.profile-subject-options button {
  cursor: pointer;
}

.profile-subject-options button:hover,
.profile-subject-options button:focus {
  color: var(--blue);
  background: rgba(221, 237, 250, 0.86);
  outline: none;
}

.profile-subject-options span {
  color: var(--muted);
}

.profile-inline-subject-remove {
  width: 38px;
  height: 38px;
}

.profile-inline-subject-add {
  margin-top: 2px;
}

.profile-edit-item svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  color: var(--blue);
}

.profile-toolbar,
.profile-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-toolbar {
  justify-content: space-between;
}

.profile-save-button:disabled,
.profile-save-button[aria-disabled="true"] {
  border-color: rgba(101, 151, 198, 0.18);
  color: rgba(47, 127, 211, 0.42);
  background: rgba(218, 237, 252, 0.62);
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.profile-panel-reset {
  display: none;
}

body.profile-editing .profile-panel-reset {
  display: inline-flex;
}

.profile-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 760px) {
  .profile-section-grid {
    grid-template-columns: 1fr;
  }
}

/* Shared, restrained motion language for navigation and content discovery. */
:root {
  --motion-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-ease-press: cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sss-motion [data-motion-reveal] {
  opacity: 0;
  transform: translate3d(-34px, 0, 0);
  will-change: opacity, transform;
}

.sss-motion [data-motion-reveal][data-motion-kind="header"] {
  transform: translate3d(0, 18px, 0);
}

.sss-motion [data-motion-reveal][data-motion-kind="right"] {
  transform: translate3d(34px, 0, 0);
}

.sss-motion [data-motion-reveal][data-motion-kind="home-action"],
.sss-motion [data-motion-reveal][data-motion-kind="rise"] {
  transform: translate3d(0, 42px, 0);
}

.sss-motion [data-motion-reveal].motion-visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

.gauge-needle {
  transition: transform 760ms var(--motion-ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .nav-button,
  .home-action,
  .primary-button,
  .secondary-button,
  .matrix-tab-button,
  .class-scale-link,
  .teacher-quality-card[href] {
    transition:
      transform 180ms var(--motion-ease-press),
      border-color 180ms ease,
      box-shadow 220ms ease,
      background-color 180ms ease,
      color 180ms ease;
  }

  .nav-button:hover,
  .primary-button:hover,
  .secondary-button:hover,
  .matrix-tab-button:hover {
    transform: translateY(-1px);
  }

  .class-scale-link:hover,
  .teacher-quality-card[href]:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(31, 77, 120, 0.14);
  }

  .nav-button:hover svg,
  .home-action:hover svg,
  .icon-button:hover svg,
  .primary-button:hover svg,
  .secondary-button:hover svg {
    transform: translateY(-1px) scale(1.045);
  }
}

.nav-button svg,
.home-action svg,
.icon-button svg,
.primary-button svg,
.secondary-button svg {
  transition: transform 200ms var(--motion-ease-out);
}

.nav-button:active,
.home-action:active,
.primary-button:active,
.secondary-button:active,
.matrix-tab-button:active,
.class-scale-link:active,
.teacher-quality-card[href]:active {
  transform: translateY(0) scale(0.985);
  transition-duration: 80ms;
}

@media (prefers-reduced-motion: reduce) {
  .sss-motion [data-motion-reveal],
  .sss-motion [data-motion-reveal][data-motion-kind="header"] {
    opacity: 1;
    transform: none;
    transition: none;
    animation: none;
  }

  .gauge-needle,
  .nav-button,
  .home-action,
  .primary-button,
  .secondary-button,
  .matrix-tab-button,
  .class-scale-link,
  .teacher-quality-card[href],
  .nav-button svg,
  .home-action svg,
  .icon-button svg,
  .primary-button svg,
  .secondary-button svg {
    animation: none;
    transition: none;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .profile-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-classes-section {
    grid-column: 1 / -1;
  }
}

.analysis-header {
  position: relative;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.analysis-header h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.05;
}

.section-kicker {
  margin: 0;
  color: var(--blue);
  font-size: 18px;
  letter-spacing: 0.04em;
}

.analysis-grid {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(320px, 0.52fr);
  gap: 22px;
  align-items: start;
}

.analysis-detail-grid {
  display: grid;
  grid-template-columns: minmax(540px, 1fr) minmax(360px, 0.72fr);
  gap: 22px;
}

.wide-results-panel {
  grid-column: 1 / -1;
}

.standards-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.66fr) minmax(430px, 1.34fr);
  gap: 16px;
  align-items: start;
}

.standards-grid .panel {
  padding: 12px;
}

.template-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.template-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.58);
}

.template-card:hover,
.template-card.active {
  border-color: rgba(47, 127, 211, 0.28);
  background: rgba(232, 242, 252, 0.95);
  box-shadow: 0 10px 22px rgba(31, 77, 120, 0.08);
  transform: translateY(-1px);
}

.template-card strong,
.template-card small {
  display: block;
}

.template-card small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.template-detail-panel {
  min-height: 0;
}

.class-dashboard-layout {
  display: block;
  position: relative;
}

.class-dashboard-side {
  position: static;
  width: 100%;
  align-self: stretch;
}

.matrix-tab-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #17456f;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(218, 232, 246, 0.78));
  box-shadow: var(--shadow);
  font-weight: 850;
  font-size: 11px;
  text-align: center;
}

.matrix-tab-button.active,
.matrix-tab-button:hover {
  border-color: rgba(47, 127, 211, 0.34);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(190, 218, 244, 0.86));
}

.matrix-tab-button svg {
  width: 22px;
  height: 22px;
  color: var(--blue);
}

.class-dashboard-main {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.class-dashboard-picker {
  padding: 8px 10px;
}

.class-picker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(158px, 0.18fr);
  gap: 8px;
  align-items: start;
}

.class-picker-classes {
  min-width: 0;
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.class-picker-left {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  gap: 7px;
  align-content: start;
  align-self: start;
}

.class-picker-classes .panel-head {
  min-height: 0;
  align-items: center;
  justify-content: flex-start;
}

.class-picker-classes .class-dashboard-side {
  align-self: start;
}

.class-picker-classes .panel-head h2 {
  font-size: 16px;
  line-height: 1;
}

.class-picker-classes .dashboard-class-picker-box {
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
}

.dashboard-class-picker-box {
  display: grid;
  gap: 4px;
  align-items: start;
  align-content: start;
  padding: 6px 8px;
}

.dashboard-class-picker-box,
.matrix-class-picker {
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(231, 241, 251, 0.58)),
    rgba(255, 255, 255, 0.56);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.class-picker-summary {
  min-width: 0;
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 8px;
  padding: 6px 7px;
  background: rgba(255, 255, 255, 0.46);
}

.class-picker-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: start;
}

.class-dashboard-view-tools {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.dashboard-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-detail-row {
  margin-top: 0;
  min-height: 48px;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: nowrap;
}

.class-picker-classes > .dashboard-detail-row {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: start;
}

.class-detail-toggle {
  min-width: 238px;
  min-height: 46px;
  border: 1px solid rgba(75, 121, 164, 0.24);
  border-radius: 8px;
  padding: 5px 9px 5px 6px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  color: #17456f;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(218, 233, 247, 0.82)),
    rgba(238, 246, 253, 0.9);
  box-shadow: 0 8px 22px rgba(38, 74, 110, 0.1);
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.panel-head .class-detail-toggle {
  flex: 0 0 auto;
}

.dashboard-detail-row .class-detail-toggle {
  min-width: 214px;
  min-height: 40px;
  grid-template-columns: 30px minmax(0, 1fr) 14px;
  gap: 7px;
  padding: 4px 8px 4px 5px;
}

.dashboard-detail-row .class-detail-toggle-icon {
  width: 30px;
  height: 30px;
}

.dashboard-detail-row .dashboard-matrix-link {
  width: 168px;
  min-width: 0;
  min-height: 46px;
  padding: 5px 9px;
  justify-content: flex-start;
  text-align: left;
}

.dashboard-detail-row .dashboard-classroom-link {
  width: 168px;
  min-width: 0;
  min-height: 46px;
  padding: 5px 9px;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  line-height: 1.1;
}

.dashboard-detail-row .dashboard-classroom-link svg {
  flex: 0 0 auto;
}

.dashboard-detail-row .class-ai-analysis-button {
  width: 168px;
  min-width: 0;
  min-height: 46px;
  padding: 5px 9px;
  justify-content: flex-start;
  text-align: left;
  color: #315f55;
  border-color: rgba(79, 155, 93, 0.24);
  background: linear-gradient(145deg, rgba(250, 255, 252, 0.96), rgba(218, 239, 226, 0.82));
}

.class-ai-analysis-button:hover,
.class-ai-analysis-button:focus-visible {
  border-color: rgba(79, 155, 93, 0.48);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(198, 230, 209, 0.9));
}

.class-ai-analysis-button.loading svg {
  animation: class-ai-sparkle 1.15s ease-in-out infinite;
}

@keyframes class-ai-sparkle {
  50% {
    transform: scale(1.14) rotate(8deg);
    opacity: 0.66;
  }
}

.class-ai-analysis-panel {
  padding: 16px 18px;
  border-color: rgba(79, 155, 93, 0.2);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(229, 243, 234, 0.7)),
    rgba(255, 255, 255, 0.72);
}

.class-ai-analysis-result {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.class-ai-analysis-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(320px, 0.78fr);
  gap: 18px;
  align-items: start;
}

.class-ai-analysis-main,
.class-ai-analysis-side {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.class-ai-analysis-side {
  border-left: 1px solid rgba(79, 155, 93, 0.18);
  padding-left: 18px;
}

.class-ai-section {
  min-width: 0;
}

.class-ai-analysis-result h3 {
  margin: 8px 0 0;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(79, 155, 93, 0.18);
  color: #244f47;
  font-size: 15px;
}

.class-ai-analysis-result p,
.class-ai-analysis-result ul {
  margin: 0;
  color: #273d50;
  font-size: 13px;
  line-height: 1.55;
}

.class-ai-analysis-result ul {
  padding-left: 19px;
}

.class-ai-analysis-side h3:first-child,
.class-ai-analysis-main h3:first-child {
  margin-top: 0;
}

.class-ai-analysis-result.loading,
.class-ai-analysis-result.error {
  grid-template-columns: 1fr;
}

.class-ai-analysis-result.error {
  color: var(--danger);
}

.class-ai-loading-line {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #315f55;
  font-size: 13px;
  font-weight: 800;
}

.class-ai-loading-line svg {
  width: 20px;
  height: 20px;
  animation: class-ai-sparkle 1.15s ease-in-out infinite;
}

.class-ai-analysis-privacy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.class-ai-truncated {
  grid-column: 1 / -1;
  border-left: 3px solid rgba(232, 143, 49, 0.54);
  padding: 7px 9px;
  color: #77511e !important;
  background: rgba(248, 220, 176, 0.28);
}

@media (max-width: 980px) {
  .class-ai-analysis-result {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .class-ai-analysis-button.loading svg,
  .class-ai-loading-line svg {
    animation: none;
  }
}

.teacher-view-mode-row {
  gap: 7px;
  flex-wrap: wrap;
}

.teacher-view-mode-row .dashboard-matrix-link {
  min-width: 150px;
}

.teacher-mode-button.active {
  border-color: rgba(47, 127, 211, 0.46);
  background:
    linear-gradient(145deg, rgba(232, 245, 255, 0.98), rgba(190, 219, 246, 0.86)),
    rgba(230, 242, 253, 0.9);
  box-shadow: 0 10px 24px rgba(31, 77, 120, 0.14);
}

.dashboard-matrix-link.disabled {
  opacity: 0.52;
  pointer-events: none;
}

.class-dashboard-side .class-detail-toggle {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  grid-template-columns: 34px minmax(0, 1fr) 16px;
  gap: 9px;
}

.matrix-view-controls {
  width: min(162px, 100%);
  display: grid;
  gap: 4px;
}

.matrix-view-button {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(75, 121, 164, 0.22);
  border-radius: 8px;
  padding: 5px 8px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  color: #315d85;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(229, 239, 248, 0.78));
  font: inherit;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.1;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.matrix-view-button svg {
  width: 17px;
  height: 17px;
  color: var(--blue);
}

.matrix-view-button:hover,
.matrix-view-button.active {
  border-color: rgba(47, 127, 211, 0.42);
  color: #173f68;
  background: linear-gradient(145deg, rgba(240, 248, 255, 0.98), rgba(197, 223, 246, 0.88));
  box-shadow: 0 5px 14px rgba(38, 74, 110, 0.1);
}

.matrix-view-button:focus-visible {
  outline: 3px solid rgba(47, 127, 211, 0.18);
  outline-offset: 1px;
}

.class-detail-toggle:hover {
  border-color: rgba(47, 127, 211, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(199, 224, 247, 0.9)),
    rgba(238, 246, 253, 0.94);
  box-shadow: 0 11px 26px rgba(38, 74, 110, 0.14);
  transform: translateY(-1px);
}

.class-detail-toggle:focus-visible {
  outline: 3px solid rgba(47, 127, 211, 0.2);
  outline-offset: 2px;
}

.class-detail-toggle[aria-pressed="true"] {
  border-color: rgba(47, 127, 211, 0.46);
  background:
    linear-gradient(145deg, rgba(235, 246, 255, 0.98), rgba(183, 215, 243, 0.9)),
    rgba(224, 239, 252, 0.96);
}

.class-detail-toggle-icon {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(47, 127, 211, 0.18);
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.72);
}

.class-detail-toggle-icon svg {
  width: 18px;
  height: 18px;
}

.class-detail-toggle-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.class-detail-toggle-copy strong,
.class-detail-toggle-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.class-detail-toggle-copy strong {
  color: #173f68;
  font-size: 12px;
  font-weight: 880;
}

.class-detail-toggle-copy small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.class-detail-toggle-chevron {
  width: 15px;
  height: 15px;
  color: rgba(49, 83, 117, 0.7);
}

.class-picker-head h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.1;
}

.class-mini-label {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.class-chip-list {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.compact-class-chip-list {
  margin-top: 0;
  max-height: 64px;
  min-height: 48px;
  overflow: auto;
  padding: 0 3px 4px 0;
  flex-wrap: nowrap;
}

.class-dashboard-chips {
  margin-top: 0;
  align-content: start;
  min-height: 0;
  padding: 0;
}

.class-dashboard-chips .assignment-filter {
  flex: 0 0 152px;
}

.teacher-dashboard-picker .class-dashboard-chips .assignment-filter {
  flex: 0 0 172px;
}

.teacher-dashboard-picker .dashboard-class-picker-box {
  min-height: 96px;
}

.teacher-dashboard-picker .class-dashboard-chips {
  min-height: 48px;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  flex-wrap: nowrap;
}

.teacher-dashboard-picker .class-dashboard-chips.is-loading .assignment-filter {
  color: #60758a;
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(232,241,249,.74)),
    rgba(255,255,255,.58);
}

.class-dashboard-chips .assignment-filter strong,
.matrix-class-chips .assignment-filter strong {
  white-space: nowrap;
}

.matrix-class-chips .assignment-filter {
  flex: 0 0 172px;
}

.class-chip {
  flex: 0 0 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 7px;
  display: grid;
  gap: 3px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  text-align: left;
}

.class-chip.active,
.class-chip:hover {
  border-color: rgba(47, 127, 211, 0.32);
  background: rgba(232, 242, 252, 0.95);
}

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

.class-chip strong {
  font-size: 14px;
  line-height: 1.05;
}

.class-chip span {
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.2;
}

.class-survey-list {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.compact-class-survey-list {
  margin-top: 12px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  max-height: 132px;
  overflow: auto;
}

.class-filter-row {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 80px minmax(180px, 280px);
  align-items: center;
  gap: 10px;
}

.class-filter-row label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.class-filter-row select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  outline: none;
}

.compact-class-filter {
  margin-top: 2px;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
}

.compact-class-filter select {
  height: 30px;
  padding-inline: 9px;
  font-size: 12px;
}

.compact-class-filter label {
  font-size: 10px;
}

.class-survey-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
}

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

.class-survey-card span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.class-category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 14px;
  align-items: start;
  min-height: 180px;
  opacity: 1;
  visibility: visible;
}

.class-category-grid-visible {
  display: grid !important;
  min-height: 240px;
}

#classCategories,
#classAiAnalysisPanel:not([hidden]),
#classAiAnalysisResult,
#classCategories [data-motion-reveal],
#classAiAnalysisPanel:not([hidden]) [data-motion-reveal],
#classAiAnalysisResult [data-motion-reveal],
#classCategories .motion-visible,
#classAiAnalysisPanel:not([hidden]) .motion-visible,
#classAiAnalysisResult .motion-visible {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

#resultBody,
#compareBody,
#compareResult,
#aiResult,
#savedView:not([hidden]),
#detailView:not([hidden]),
#compareDetailView:not([hidden]),
#savedView:not([hidden]) [data-motion-reveal],
#detailView:not([hidden]) [data-motion-reveal],
#compareDetailView:not([hidden]) [data-motion-reveal],
#resultBody [data-motion-reveal],
#compareBody [data-motion-reveal],
#compareResult [data-motion-reveal],
#aiResult [data-motion-reveal],
#savedView:not([hidden]) .motion-visible,
#detailView:not([hidden]) .motion-visible,
#compareDetailView:not([hidden]) .motion-visible,
#resultBody .motion-visible,
#compareBody .motion-visible,
#compareResult .motion-visible,
#aiResult .motion-visible {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.class-aggregate-category-panel {
  min-height: 248px;
}

.dashboard-subject-tabs {
  grid-column: 1 / -1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
}

.dashboard-subject-tabs button {
  min-height: 34px;
  border: 1px solid rgba(47, 127, 211, 0.2);
  border-radius: 999px;
  padding: 0 12px;
  color: #17456f;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(225, 239, 252, 0.76)),
    rgba(236, 246, 254, 0.84);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(31, 77, 120, 0.08);
}

.dashboard-subject-tabs button.active,
.dashboard-subject-tabs button:hover {
  border-color: rgba(47, 127, 211, 0.48);
  background:
    linear-gradient(145deg, rgba(237, 248, 255, 0.98), rgba(187, 218, 246, 0.88)),
    rgba(218, 236, 252, 0.92);
}

.class-subject-dashboard {
  display: grid;
  gap: 18px;
}

.subject-category-section {
  display: grid;
  gap: 12px;
}

.subject-section-head {
  border: 1px solid rgba(109, 126, 150, 0.14);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(224, 239, 252, 0.46);
}

.subject-section-head h2 {
  margin: 2px 0 0;
  font-size: 19px;
}

.class-scale-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.class-scale-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-items: center;
  gap: 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.58);
}

.class-scale-link {
  color: inherit;
  text-decoration: none;
}

.class-scale-link:hover,
.class-scale-link:focus-visible {
  border-color: rgba(47, 127, 211, 0.42);
  background: rgba(232, 242, 252, 0.88);
  box-shadow: 0 12px 26px rgba(31, 77, 120, 0.12);
  transform: translateY(-1px);
}

.class-summary-scale-card {
  min-height: 188px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(221, 235, 248, 0.66));
}

.class-summary-scale-button {
  width: 100%;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.class-summary-scale-button:hover,
.class-summary-scale-button:focus-visible {
  border-color: rgba(47, 127, 211, 0.42);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(207, 228, 247, 0.82));
  box-shadow: 0 12px 26px rgba(31, 77, 120, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.class-summary-gauge {
  width: 126px;
  height: 63px;
}

.class-summary-gauge.empty-gauge {
  opacity: 0.52;
}

.class-scale-meta strong,
.class-scale-meta span,
.class-scale-meta b {
  display: block;
}

.class-scale-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.class-scale-meta b {
  margin-top: 8px;
  color: var(--blue);
  font-size: 18px;
}

.class-scale-meta small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.class-gauge {
  width: 108px;
  height: 54px;
  aspect-ratio: auto;
}

.class-social-network-card {
  grid-template-columns: minmax(0, 1fr);
  min-height: 150px;
  padding: 9px;
  gap: 7px;
  background:
    radial-gradient(circle at 22% 24%, rgba(47, 127, 211, 0.16), transparent 28%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(226, 239, 250, 0.72));
}

.class-social-network-card .class-scale-meta b {
  color: #1f5f9f;
  font-size: 15px;
}

.class-social-network-icon {
  width: 112px;
  height: 78px;
  border: 1px solid rgba(47, 127, 211, 0.24);
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #2368ab;
  background:
    radial-gradient(circle at 25% 32%, rgba(70, 151, 222, 0.26) 0 7px, transparent 8px),
    radial-gradient(circle at 72% 28%, rgba(70, 151, 222, 0.22) 0 7px, transparent 8px),
    radial-gradient(circle at 54% 72%, rgba(70, 151, 222, 0.22) 0 7px, transparent 8px),
    rgba(255, 255, 255, 0.74);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.class-social-network-icon svg {
  width: 34px;
  height: 34px;
  stroke-width: 1.8;
}

.class-social-network-preview {
  width: 100%;
  min-height: 96px;
  max-height: 118px;
  overflow: hidden;
  border: 1px solid rgba(47, 127, 211, 0.2);
  border-radius: 10px;
  background: rgba(247, 251, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.class-social-network-preview svg {
  display: block;
  width: 100%;
  height: 116px;
}

.student-matrix-panel {
  min-width: 0;
}

.student-matrix-wrap {
  margin-top: 18px;
  overflow: auto;
  max-height: 68vh;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.class-matrix-table {
  min-width: 980px;
}

.class-matrix-table th:first-child,
.class-matrix-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(246, 250, 254, 0.96);
}

.matrix-class-picker {
  margin-top: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  align-items: start;
}

.matrix-class-picker > label {
  grid-column: 1;
  margin: 0;
  padding-top: 6px;
}

.matrix-class-picker select {
  display: none;
}

.matrix-class-chips {
  grid-column: 1;
  margin-top: 0;
}

.matrix-class-picker .dashboard-detail-row {
  grid-column: 1;
  margin-top: 3px;
}

.matrix-class-picker .class-detail-toggle {
  min-height: 40px;
  grid-template-columns: 30px minmax(0, 1fr) 14px;
}

.matrix-class-picker .class-detail-toggle-icon {
  width: 30px;
  height: 30px;
}

.matrix-class-filter.homeroom {
  border-color: rgba(47, 127, 211, 0.68);
  box-shadow: 0 0 0 2px rgba(47, 127, 211, 0.12);
}

.class-role-badge,
.class-title-badge {
  border: 1px solid rgba(47, 127, 211, 0.2);
  border-radius: 999px;
  padding: 2px 7px;
  color: #1f5fa8;
  background: rgba(225, 241, 253, 0.82);
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
}

.class-role-badge {
  display: inline-flex;
  white-space: nowrap;
  margin-left: 4px;
  vertical-align: 2px;
}

.class-title-badge {
  display: inline-flex;
  white-space: nowrap;
  margin-left: 7px;
  vertical-align: middle;
}

.planning-shell {
  --planning-label-width: 116px;
  gap: 16px;
}

.planning-timeline {
  flex: 1 1 520px;
  max-width: 760px;
  min-height: 74px;
  padding: 10px 12px;
}

.planning-timeline .timeline-head {
  margin-bottom: 6px;
}

.planning-timeline .timeline-head h2 {
  font-size: 15px;
}

.planning-timeline .timeline-break-list {
  display: none;
}

.planning-board-panel {
  width: 100%;
  margin-inline: auto;
}

.planning-board-panel .panel-head {
  display: grid;
  grid-template-columns: minmax(132px, 0.18fr) minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

.planning-dashboard-links {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.planning-dashboard-links[hidden] {
  display: none;
}

.planning-dashboard-links a {
  min-height: 30px;
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 999px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #315f89;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(224, 239, 252, 0.68));
  box-shadow: 0 8px 22px rgba(38, 74, 110, 0.08);
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}

.planning-dashboard-links svg {
  width: 13px;
  height: 13px;
}

.planning-dashboard-links a:hover {
  border-color: rgba(47, 127, 211, 0.28);
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
}

.planning-class-hub {
  margin-left: 0;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 10px;
  padding: 6px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(350px, 0.9fr);
  gap: 6px;
  align-items: stretch;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(229, 241, 252, 0.66)),
    rgba(255, 255, 255, 0.68);
  box-shadow: 0 14px 32px rgba(38, 74, 110, 0.08);
}

.planning-class-picker-area,
.planning-active-class-area {
  min-width: 0;
  min-height: 54px;
  border: 1px solid rgba(109, 126, 150, 0.12);
  border-radius: 8px;
  padding: 6px;
  display: grid;
  align-items: center;
  background: rgba(255, 255, 255, 0.44);
}

.planning-class-picker-area {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.planning-class-picker-area .eyebrow {
  margin: 0;
  white-space: nowrap;
}

.planning-active-class-area {
  grid-template-columns: minmax(84px, 0.34fr) minmax(0, 1fr);
  gap: 5px;
}

.planning-selected-class {
  min-height: 38px;
  border-radius: 8px;
  padding: 6px 8px;
  display: grid;
  align-content: center;
  gap: 1px;
  background: rgba(235, 244, 252, 0.84);
}

.planning-selected-class strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 940;
  line-height: 1;
}

.planning-selected-class span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 820;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planning-class-hub .planning-class-chips {
  margin-top: 0;
  min-width: 0;
  max-height: 58px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.planning-class-hub .planning-class-chip {
  min-width: 66px;
  padding: 4px 7px;
}

.planning-class-hub .planning-class-chip strong {
  font-size: 13px;
}

.planning-class-hub .planning-class-chip span {
  font-size: 10px;
}

.planning-class-chip.homeroom {
  border-color: rgba(47, 127, 211, 0.68);
  box-shadow: 0 0 0 2px rgba(47, 127, 211, 0.12);
}

.planning-board-empty {
  border: 1px dashed rgba(109, 126, 150, 0.28);
  border-radius: 8px;
  padding: 24px;
  color: var(--muted);
  background: rgba(246, 250, 254, 0.68);
  font-weight: 760;
}

.planning-board-wrap {
  margin-top: 10px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(235, 244, 252, 0.72)),
    rgba(255, 255, 255, 0.7);
}

.planning-tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 10px;
  padding: 12px;
  align-items: start;
}

.planning-palette {
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.76);
  align-self: stretch;
  overflow-x: auto;
}

.planning-palette .eyebrow {
  margin: 0 4px 0 0;
  flex: 0 0 auto;
}

.planning-palette small {
  flex: 1 1 180px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.planning-add-block {
  min-height: 27px;
  flex: 0 0 auto;
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 8px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
  background: rgba(246, 250, 254, 0.9);
  font-size: 10px;
  font-weight: 850;
  cursor: grab;
}

.planning-add-block:active {
  cursor: grabbing;
}

.planning-add-block svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.planning-add-block.unit {
  color: #17456f;
  background: rgba(224, 239, 252, 0.92);
}

.planning-add-block.project {
  color: #355b2d;
  background: rgba(230, 242, 221, 0.94);
}

.planning-add-block.trip {
  color: #5d4a12;
  background: rgba(248, 239, 201, 0.94);
}

.planning-add-block.finalWeek {
  color: #5d4772;
  background: rgba(236, 226, 247, 0.94);
}

.planning-add-block.gradeStop {
  color: #111827;
  background: rgba(229, 231, 235, 0.96);
}

.planning-add-block.survey {
  color: #2f6641;
  background: rgba(224, 242, 230, 0.92);
}

.planning-add-block.test {
  color: #7a4d13;
  background: rgba(249, 235, 209, 0.92);
}

.planning-add-block.exam {
  color: #8b2f42;
  background: rgba(250, 224, 231, 0.94);
}

.planning-add-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(38, 74, 110, 0.12);
}

.planning-canvas-area {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.planning-canvas-toolbar {
  display: grid;
  grid-template-columns: minmax(500px, 1fr) minmax(112px, 0.18fr) auto;
  gap: 6px;
  align-items: stretch;
}

.planning-timeline-scroll {
  width: 100%;
  min-width: 0;
  padding-bottom: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior-inline: contain;
}

.planning-timeline-content {
  box-sizing: border-box;
  width: 100%;
  min-width: 100%;
}

.planning-period-half .planning-timeline-content {
  width: calc(200% - var(--planning-label-width));
}

.planning-period-zoom .planning-timeline-content {
  width: var(--planning-zoom-width, 400%);
}

.planning-canvas-head {
  position: relative;
  padding-inline: var(--planning-label-width) 0;
  display: grid;
  grid-template-columns: repeat(var(--axis-count, 12), minmax(0, 1fr));
  grid-auto-rows: minmax(18px, auto);
  row-gap: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

.planning-axis-month {
  min-width: 0;
  min-height: 18px;
  border-left: 1px solid rgba(109, 126, 150, 0.22);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.planning-axis-month:first-child {
  border-left: 0;
}

.planning-canvas-head.year-axis {
  margin-left: var(--planning-label-width);
  padding-inline: 0;
  min-height: 20px;
  display: block;
}

.planning-canvas-head.year-axis .planning-axis-month {
  position: absolute;
  top: 0;
  bottom: 0;
}

.planning-period-half .planning-canvas-head {
  font-size: 9px;
}

.planning-axis-week {
  min-width: 0;
  padding-inline: 2px;
  display: grid;
  gap: 1px;
  align-content: center;
}

.planning-axis-week strong,
.planning-axis-week small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-axis-week strong {
  color: #17456f;
  font-size: 9px;
  font-weight: 920;
}

.planning-axis-week small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 820;
}

.planning-axis-week em {
  color: rgba(23, 69, 111, 0.68);
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.planning-axis-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  width: 100%;
}

.planning-axis-days b {
  min-width: 0;
  color: inherit;
  font: inherit;
  text-align: center;
}

.planning-axis-week.break-week {
  border-radius: 5px;
  background: rgba(168, 197, 226, 0.14);
}

.planning-axis-week.break-week strong {
  color: #6f7d8d;
}

.planning-toolbar-controls {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-self: end;
  gap: 6px;
  max-width: 100%;
}

.planning-view-toggle {
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 8px;
  padding: 3px;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  background: rgba(255, 255, 255, 0.74);
}

.planning-view-toggle button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  padding: 0 10px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.planning-view-toggle button.active {
  color: #17456f;
  background: rgba(224, 239, 252, 0.96);
}

.planning-canvas {
  position: relative;
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 8px;
  overflow: visible;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(240, 247, 253, 0.78)),
    rgba(255, 255, 255, 0.7);
}

.planning-canvas-guides {
  position: absolute;
  inset: 0 0 0 var(--planning-label-width);
  z-index: 1;
  pointer-events: none;
}

.planning-canvas-guides .timeline-break {
  opacity: 0.22;
  border-inline: 0;
  background: linear-gradient(90deg, rgba(184, 197, 210, 0.16), rgba(148, 163, 184, 0.18));
}

.planning-canvas-guides .timeline-month-tick {
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(91, 111, 132, 0.24);
}

.planning-canvas-guides .planning-month-separator {
  background: rgba(91, 111, 132, 0.28);
}

.planning-today-overlay {
  position: absolute;
  inset: 0 0 0 var(--planning-label-width);
  z-index: 7;
  pointer-events: none;
}

.planning-today-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.34);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.planning-grade-stop-overlay {
  position: absolute;
  inset: 0 0 0 var(--planning-label-width);
  z-index: 6;
  pointer-events: none;
}

.planning-grade-stop-canvas-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.84);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.38);
  transform: translateX(-50%);
}

.planning-canvas-guides .timeline-week-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(65, 92, 122, 0.09);
}

.planning-canvas-guides .planning-week-start-tick {
  width: 1px;
  background: rgba(36, 74, 109, 0.18);
}

.planning-canvas-guides .timeline-break.day-break {
  opacity: 0.24;
}

.planning-canvas-guides .planning-day-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(65, 92, 122, 0.115);
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.48);
}

.planning-period-unit .planning-canvas-guides .planning-day-tick {
  background: rgba(47, 97, 145, 0.18);
}

.planning-lane {
  position: relative;
  z-index: 2;
  min-height: 96px;
  display: grid;
  grid-template-columns: var(--planning-label-width) minmax(0, 1fr);
  border-bottom: 1px solid rgba(109, 126, 150, 0.14);
}

.planning-overview-lane {
  min-height: 146px;
  background: rgba(255, 255, 255, 0.42);
}

.planning-lane:last-child {
  border-bottom: 0;
}

.planning-lane[data-lane="special"] {
  min-height: 80px;
}

.planning-lane[data-lane="special"] .planning-lane-track {
  min-height: 80px;
}

.planning-lane[data-lane="unit"],
.planning-lane[data-lane="unit"] .planning-lane-track {
  min-height: 112px;
}

.planning-lane[data-lane="survey"],
.planning-lane[data-lane="test"],
.planning-lane[data-lane="exam"] {
  min-height: 64px;
}

.planning-lane[data-lane="survey"] .planning-lane-track,
.planning-lane[data-lane="test"] .planning-lane-track,
.planning-lane[data-lane="exam"] .planning-lane-track {
  min-height: 64px;
}

.planning-lane[data-lane="survey"] .planning-lane-label,
.planning-lane[data-lane="test"] .planning-lane-label,
.planning-lane[data-lane="exam"] .planning-lane-label {
  padding-block: 7px;
  font-size: 11px;
  line-height: 1.05;
  word-break: normal;
}

.planning-lane-label {
  position: sticky;
  left: 0;
  z-index: 12;
  min-width: 0;
  width: var(--planning-label-width);
  padding: 12px 8px;
  display: flex;
  align-items: center;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--blue);
  background:
    linear-gradient(180deg, rgba(246, 250, 254, 0.98), rgba(232, 242, 251, 0.96)),
    rgba(235, 244, 252, 0.96);
  box-shadow: 10px 0 18px rgba(47, 73, 102, 0.08);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  white-space: pre-line;
}

.planning-lane-track {
  position: relative;
  z-index: 2;
  min-height: 96px;
  overflow: hidden;
}

.planning-lane-track.drop-active {
  background: rgba(47, 127, 211, 0.1);
  box-shadow: inset 0 0 0 2px rgba(47, 127, 211, 0.34);
}

.planning-lane-track.planning-drag-track-active,
.planning-overview-track.planning-drag-track-active {
  overflow: visible;
}

.planning-add-block.dragging {
  opacity: 0.52;
}

.planning-overview-track {
  min-height: 146px;
  overflow: visible;
}

.planning-block {
  position: absolute;
  top: 12px;
  box-sizing: border-box;
  min-width: 0;
  height: 68px;
  border: 1px solid rgba(47, 127, 211, 0.22);
  border-radius: 8px;
  padding: 7px 16px 7px 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 3px;
  color: #173f68;
  background: linear-gradient(145deg, rgba(224, 239, 252, 0.98), rgba(191, 219, 244, 0.88));
  box-shadow: 0 10px 24px rgba(38, 74, 110, 0.12);
  cursor: grab;
  text-align: left;
  touch-action: none;
  overflow: hidden;
}

.planning-lane[data-lane="unit"] .planning-block:not(.point-event) {
  top: 9px;
  height: calc(100% - 18px);
  min-height: 94px;
  padding-bottom: 10px;
}

.planning-block > i,
.planning-block-title,
.planning-block small,
.planning-resize-handle {
  position: relative;
  z-index: 2;
}

.planning-holiday-stripe {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 1;
  border-inline: 1px solid rgba(65, 92, 122, 0.08);
  background:
    repeating-linear-gradient(
      135deg,
      rgba(104, 116, 132, 0.46) 0,
      rgba(104, 116, 132, 0.46) 9px,
      rgba(255, 255, 255, 0.42) 9px,
      rgba(255, 255, 255, 0.42) 18px
    );
  pointer-events: none;
}

.planning-block.survey {
  border-color: rgba(67, 151, 91, 0.26);
  color: #2f6641;
  background: linear-gradient(145deg, rgba(225, 242, 231, 0.98), rgba(184, 222, 195, 0.88));
}

.planning-block.test {
  border-color: rgba(180, 123, 38, 0.26);
  color: #704910;
  background: linear-gradient(145deg, rgba(250, 237, 213, 0.98), rgba(238, 209, 157, 0.88));
}

.planning-block.exam {
  border-color: rgba(190, 76, 105, 0.28);
  color: #852d42;
  background: linear-gradient(145deg, rgba(251, 229, 235, 0.98), rgba(239, 188, 201, 0.9));
}

.planning-block.gradeStop {
  border-color: rgba(17, 24, 39, 0.32);
  color: #111827;
  background: linear-gradient(145deg, rgba(248, 250, 252, 0.98), rgba(209, 213, 219, 0.9));
}

.planning-block.point-event {
  top: 18px;
  width: 26px !important;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  cursor: grab;
}

.planning-block.point-event > i {
  width: 13px;
  height: 13px;
}

.planning-block.point-event .planning-block-title,
.planning-block.point-event small,
.planning-block.point-event .planning-resize-handle {
  display: none;
}

.planning-block.project,
.planning-overview-unit.project {
  border-color: rgba(75, 131, 54, 0.24);
  color: #355b2d;
  background: linear-gradient(145deg, rgba(232, 244, 224, 0.98), rgba(201, 229, 187, 0.9));
}

.planning-block.trip,
.planning-overview-unit.trip {
  border-color: rgba(167, 133, 31, 0.24);
  color: #5d4a12;
  background: linear-gradient(145deg, rgba(250, 242, 207, 0.98), rgba(238, 222, 160, 0.9));
}

.planning-block.finalWeek,
.planning-overview-unit.finalWeek {
  border-color: rgba(118, 84, 151, 0.24);
  color: #5d4772;
  background: linear-gradient(145deg, rgba(239, 230, 248, 0.98), rgba(218, 201, 235, 0.9));
}

.planning-lane[data-lane="special"] .planning-block:not(.point-event) {
  top: 12px;
  height: 56px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.planning-lane[data-lane="special"] .planning-block:not(.point-event) > i,
.planning-lane[data-lane="special"] .planning-block:not(.point-event) > svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-bottom: 0;
}

.planning-lane[data-lane="special"] .planning-block:not(.point-event) .planning-block-title {
  display: block;
  min-width: 0;
  white-space: nowrap;
  line-height: 1;
  -webkit-line-clamp: unset;
}

.planning-block.selected {
  outline: 2px solid rgba(17, 24, 39, 0.92);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.82), 0 12px 28px rgba(17, 24, 39, 0.18);
}

.planning-block.workspace-active,
.planning-overview-unit.workspace-active {
  outline: 2.5px solid rgba(24, 82, 143, 0.96);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(47, 127, 211, 0.16), 0 18px 36px rgba(24, 82, 143, 0.24);
}

.planning-block.planning-dragging,
.planning-overview-unit.planning-dragging {
  z-index: 40;
  transform: translate3d(var(--planning-drag-x, 0), 0, 0);
  opacity: 0.9;
  cursor: grabbing;
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.24);
  transition: none !important;
  will-change: transform, width;
}

.planning-block.point-event.planning-dragging {
  transform: translateX(-50%) translate3d(var(--planning-drag-x, 0), 0, 0);
}

.planning-overview-unit {
  position: absolute;
  top: 14px;
  z-index: 4;
  box-sizing: border-box;
  height: 58px;
  min-width: 0;
  border: 1px solid rgba(47, 127, 211, 0.24);
  border-radius: 8px;
  padding: 8px 18px;
  display: grid;
  align-content: center;
  gap: 3px;
  color: #173f68;
  background: linear-gradient(145deg, rgba(224, 239, 252, 0.98), rgba(189, 219, 246, 0.9));
  box-shadow: 0 12px 28px rgba(38, 74, 110, 0.13);
  text-align: left;
  cursor: grab;
  touch-action: none;
}

.planning-overview-unit span,
.planning-overview-unit small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planning-overview-unit > span:not(.planning-holiday-stripe),
.planning-overview-unit > small,
.planning-overview-unit > .planning-resize-handle {
  position: relative;
  z-index: 2;
}

.planning-overview-unit span {
  font-size: 11px;
  font-weight: 920;
}

.planning-overview-unit small {
  font-size: 8px;
  font-weight: 780;
  opacity: 0.78;
}

.planning-overview-marker {
  position: absolute;
  top: 86px;
  z-index: 6;
  width: 20px;
  min-width: 20px;
  height: 20px;
  border: 1px solid rgba(67, 151, 91, 0.26);
  border-radius: 999px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f6641;
  background: rgba(225, 242, 231, 0.96);
  box-shadow: 0 9px 20px rgba(38, 74, 110, 0.12);
  transform: translateX(-50%);
  cursor: grab;
  touch-action: none;
}

.planning-overview-marker.planning-dragging {
  z-index: 42;
  transform: translateX(-50%) translate3d(var(--planning-drag-x, 0), 0, 0);
  opacity: 0.9;
  cursor: grabbing;
  box-shadow: 0 14px 28px rgba(17, 24, 39, 0.24);
  transition: none !important;
  will-change: transform;
}

.planning-overview-marker.survey {
  top: 78px;
}

.planning-overview-marker svg {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
}

.planning-overview-marker span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.planning-overview-marker.test {
  top: 101px;
  border-color: rgba(180, 123, 38, 0.26);
  color: #704910;
  background: rgba(250, 237, 213, 0.96);
}

.planning-overview-marker.exam {
  top: 124px;
  border-color: rgba(190, 76, 105, 0.28);
  color: #852d42;
  background: rgba(251, 229, 235, 0.97);
}

.planning-overview-marker.gradeStop {
  top: var(--marker-top, 101px);
  border-color: rgba(17, 24, 39, 0.32);
  color: #111827;
  background: rgba(243, 244, 246, 0.98);
  box-shadow: 0 0 0 2px rgba(17, 24, 39, 0.08), 0 9px 20px rgba(38, 74, 110, 0.12);
}

.planning-grade-stop-line {
  position: absolute;
  top: 0;
  z-index: 3;
  width: 2px;
  height: 338px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.72);
  transform: translateX(-50%);
  pointer-events: none;
}

.planning-overview-unit.selected,
.planning-overview-marker.selected {
  outline: 2px solid rgba(17, 24, 39, 0.92);
  outline-offset: 2px;
}

.planning-block:active {
  cursor: grabbing;
}

.planning-block svg {
  width: 14px;
  height: 14px;
  margin-bottom: 1px;
}

.planning-block-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.08;
  font-size: 10px;
  font-weight: 900;
}

.planning-block.unit .planning-block-title {
  align-self: center;
}

.planning-block small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
  font-weight: 780;
  opacity: 0.82;
}

.planning-resize-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 5;
  width: 14px;
  cursor: ew-resize;
}

.planning-resize-handle.left {
  left: 0;
}

.planning-resize-handle.right {
  right: 0;
}

.planning-detail-panel {
  box-sizing: border-box;
  min-height: 58px;
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 760;
}

.planning-detail-empty {
  min-width: 0;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.planning-detail-empty span {
  margin: 0;
  font-size: 10px;
  line-height: 1.05;
  text-align: center;
}

.planning-count-pill {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--blue);
  background: rgba(49, 111, 168, 0.11);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.planning-canvas-toolbar > .planning-detail-panel {
  min-width: 0;
  justify-self: stretch;
  align-self: stretch;
}

@media (max-width: 1280px) {
  .planning-shell {
    --planning-label-width: 104px;
  }

  .planning-board-panel .panel-head {
    grid-template-columns: minmax(118px, 0.16fr) minmax(0, 1fr);
  }

  .planning-class-hub {
    grid-template-columns: minmax(190px, 1fr) minmax(310px, 0.92fr);
  }

  .planning-canvas-toolbar {
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.2fr);
  }

  .planning-toolbar-controls {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .planning-palette {
    flex-wrap: wrap;
  }
}

@media (max-width: 980px) {
  .planning-board-panel .panel-head,
  .planning-class-hub,
  .planning-active-class-area {
    grid-template-columns: 1fr;
  }

  .planning-class-picker-area {
    grid-template-columns: 1fr;
  }

  .planning-dashboard-links {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .planning-canvas-toolbar {
    grid-template-columns: 1fr;
  }
}

.planning-detail-unit {
  border-color: rgba(47, 127, 211, 0.2);
  background: linear-gradient(145deg, rgba(232, 243, 253, 0.9), rgba(247, 251, 255, 0.82));
}

.planning-detail-survey {
  border-color: rgba(67, 151, 91, 0.28);
  background: linear-gradient(145deg, rgba(220, 243, 228, 0.96), rgba(244, 252, 247, 0.9));
}

.planning-detail-test {
  border-color: rgba(180, 123, 38, 0.2);
  background: linear-gradient(145deg, rgba(252, 241, 221, 0.92), rgba(255, 251, 245, 0.82));
}

.planning-detail-exam {
  border-color: rgba(190, 76, 105, 0.22);
  background: linear-gradient(145deg, rgba(253, 233, 239, 0.92), rgba(255, 248, 250, 0.82));
}

.planning-detail-project {
  border-color: rgba(75, 131, 54, 0.2);
  background: linear-gradient(145deg, rgba(235, 247, 228, 0.92), rgba(250, 253, 248, 0.82));
}

.planning-detail-trip {
  border-color: rgba(167, 133, 31, 0.2);
  background: linear-gradient(145deg, rgba(252, 245, 215, 0.92), rgba(255, 253, 247, 0.82));
}

.planning-detail-finalWeek {
  border-color: rgba(118, 84, 151, 0.2);
  background: linear-gradient(145deg, rgba(242, 234, 250, 0.92), rgba(252, 249, 255, 0.82));
}

.planning-detail-gradeStop {
  border-color: rgba(17, 24, 39, 0.18);
  background: linear-gradient(145deg, rgba(243, 244, 246, 0.94), rgba(255, 255, 255, 0.84));
}

.planning-detail-panel strong,
.planning-detail-panel span {
  display: block;
}

.planning-detail-panel strong {
  color: var(--ink);
  font-size: 15px;
}

.planning-detail-panel span {
  margin-top: 4px;
  font-size: 12px;
}

.planning-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 7px;
  align-items: center;
}

.planning-detail-survey.planning-detail-grid {
  grid-template-columns: minmax(0, 1fr) 29px 29px;
}

.planning-draft-status {
  margin: 3px 0 0 !important;
  color: #4d7459;
  font-size: 8px !important;
  font-weight: 820;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planning-detail-panel .form-row {
  margin-top: 0;
  gap: 2px;
}

.planning-detail-panel label {
  font-size: 9px;
  font-weight: 850;
  line-height: 1;
}

.planning-detail-panel input,
.planning-detail-panel select {
  min-width: 0;
  height: 27px;
  padding-inline: 6px;
  font-size: 10px;
}

.planning-name-input {
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 7px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.68);
}

.planning-name-input svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.planning-name-input input {
  height: 25px;
  border: 0;
  padding: 0;
  background: transparent;
}

.compact-delete {
  width: 29px;
  min-width: 29px;
  height: 29px;
  min-height: 29px;
  border-radius: 999px;
  padding: 0;
  justify-content: center;
}

.compact-delete svg {
  width: 15px;
  height: 15px;
}

.planning-survey-jump {
  width: 29px;
  min-width: 29px;
  height: 29px;
  min-height: 29px;
  border: 1px solid rgba(67, 151, 91, 0.22);
  border-radius: 7px;
  padding: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f6641;
  background: linear-gradient(145deg, rgba(241, 250, 244, 0.96), rgba(205, 235, 215, 0.76));
  box-shadow: 0 5px 12px rgba(55, 125, 75, 0.09);
}

.planning-survey-jump:hover {
  border-color: rgba(67, 151, 91, 0.46);
  background: linear-gradient(145deg, rgba(247, 253, 249, 1), rgba(191, 229, 202, 0.96));
  transform: translateY(-1px);
}

.planning-survey-jump svg {
  width: 15px;
  height: 15px;
}

.ai-limit-note {
  margin-top: 14px;
  border: 1px solid rgba(180, 123, 38, 0.22);
  border-radius: 8px;
  padding: 10px 12px;
  color: #704910;
  background: rgba(250, 237, 213, 0.72);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.45;
}

.planning-unit-lessons {
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 14px;
  min-height: 360px;
}

.planning-survey-builder {
  border: 1px solid rgba(67, 151, 91, 0.22);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: linear-gradient(145deg, rgba(220, 243, 228, 0.94), rgba(244, 252, 247, 0.86));
}

.planning-survey-builder.planning-detail-survey .planning-survey-frame {
  border-color: rgba(67, 151, 91, 0.24);
  background: rgba(239, 250, 243, 0.92);
}

.planning-survey-builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.planning-survey-builder-head h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.planning-survey-full-link {
  min-height: 34px;
  font-size: 11px;
}

.planning-survey-frame {
  width: 100%;
  height: 760px;
  min-height: 760px;
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 8px;
  background: #f5f9fd;
  overflow: hidden;
}

body.embedded-survey-builder {
  min-width: 0;
  background: transparent;
}

body.embedded-survey-builder #homeApp,
body.embedded-survey-builder #studentApp,
body.embedded-survey-builder .builder-global-header {
  display: none !important;
}

body.embedded-survey-builder #teacherApp {
  min-height: 0;
  display: grid !important;
  grid-template-columns: minmax(230px, 270px) minmax(0, 1fr);
  grid-template-rows: auto;
  background: transparent;
}

body.embedded-survey-builder .sidebar {
  min-height: 760px;
  height: auto;
}

body.embedded-survey-builder .workspace {
  min-width: 0;
}

.planning-unit-lessons-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.planning-unit-lessons h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.compact-toggle button {
  min-height: 26px;
  font-size: 10px;
}

.planning-week-schedule {
  border: 1px solid rgba(109, 126, 150, 0.15);
  border-radius: 8px;
  padding: 7px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.68);
}

.planning-week-schedule > span {
  color: #17456f;
  font-size: 10px;
  font-weight: 900;
}

.planning-week-schedule label {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  text-align: center;
}

.planning-week-schedule input {
  width: 38px;
  min-height: 27px;
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 7px;
  padding: 3px 4px;
  color: var(--ink);
  background: rgba(248, 251, 254, 0.92);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.planning-week-schedule input::-webkit-outer-spin-button,
.planning-week-schedule input::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.planning-week-schedule input.zero-hours {
  color: rgba(109, 126, 150, 0.58);
  background: rgba(241, 245, 249, 0.74);
}

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

.planning-lesson-row {
  border: 1px solid rgba(109, 126, 150, 0.13);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  grid-template-columns: 88px minmax(78px, 0.38fr) minmax(176px, 1fr) minmax(184px, 1.1fr) 82px;
  gap: 8px;
  align-items: start;
  background: rgba(255, 255, 255, 0.62);
}

.planning-lesson-row.week-start {
  margin-top: 10px;
  padding-top: 14px;
  border-top-color: rgba(47, 127, 211, 0.28);
  box-shadow: 0 -8px 0 -7px rgba(47, 127, 211, 0.26);
}

.planning-lesson-empty {
  border: 1px dashed rgba(109, 126, 150, 0.28);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: rgba(247, 250, 253, 0.72);
  font-size: 12px;
  font-weight: 780;
  text-align: center;
}

.planning-lesson-row.cancelled {
  border-color: rgba(109, 126, 150, 0.22);
  background:
    linear-gradient(135deg, rgba(180, 191, 205, 0.17) 25%, transparent 25%, transparent 50%, rgba(180, 191, 205, 0.17) 50%, rgba(180, 191, 205, 0.17) 75%, transparent 75%),
    rgba(238, 242, 246, 0.9);
  background-size: 18px 18px;
}

.planning-lesson-row.cancelled input,
.planning-lesson-row.cancelled textarea {
  color: #6f7d8d;
  background: rgba(247, 249, 251, 0.54);
  cursor: not-allowed;
}

.planning-lesson-event-controls {
  grid-column: 2 / -1;
  display: grid;
  gap: 7px;
}

.planning-lesson-event-control {
  border: 1px solid rgba(109, 126, 150, 0.14);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  grid-template-columns: minmax(140px, 0.42fr) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  background: rgba(255, 255, 255, 0.56);
}

.planning-lesson-event-control.survey {
  grid-template-columns: minmax(140px, 1fr) 32px;
  background: rgba(224, 242, 231, 0.72);
}

.planning-lesson-event-control.test {
  background: rgba(250, 237, 213, 0.72);
}

.planning-lesson-event-control.exam {
  background: rgba(251, 229, 235, 0.72);
}

.planning-lesson-event-control > span {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 880;
}

.planning-lesson-event-control svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.planning-lesson-event-control textarea {
  min-height: 44px;
  border: 1px solid rgba(109, 126, 150, 0.14);
  border-radius: 7px;
  padding: 7px 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 11px;
  resize: vertical;
}

.planning-unit-events {
  border-top: 1px solid rgba(109, 126, 150, 0.14);
  padding-top: 12px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.planning-unit-event {
  min-width: 42px;
  min-height: 42px;
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 999px;
  padding: 5px 9px;
  display: inline-grid;
  grid-template-columns: 16px minmax(0, auto);
  align-items: center;
  gap: 5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
}

.planning-unit-event svg {
  width: 14px;
  height: 14px;
}

.planning-unit-event span,
.planning-unit-event small {
  display: block;
  white-space: nowrap;
}

.planning-unit-event span {
  font-size: 9px;
  font-weight: 850;
}

.planning-unit-event small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 760;
}

.planning-unit-event.survey {
  color: #2f6641;
  background: rgba(225, 242, 231, 0.94);
}

.planning-unit-event.test {
  color: #704910;
  background: rgba(250, 237, 213, 0.94);
}

.planning-unit-event.exam {
  color: #852d42;
  background: rgba(251, 229, 235, 0.94);
}

.planning-lesson-index strong,
.planning-lesson-index span {
  display: block;
}

.planning-lesson-index strong {
  color: var(--ink);
  font-size: 12px;
}

.planning-lesson-index span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.planning-lesson-row label {
  display: grid;
  gap: 3px;
  align-self: start;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.planning-lesson-row input,
.planning-lesson-row textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 11px;
  resize: vertical;
}

.planning-lesson-notes {
  display: grid;
  gap: 6px;
}

.planning-lesson-notes-primary {
  position: relative;
  min-width: 0;
}

.planning-lesson-notes-primary.has-survey-link textarea {
  padding-right: 44px;
}

.planning-lesson-survey-link {
  position: absolute;
  top: 6px;
  right: 14px;
  width: 24px;
  min-width: 24px;
  height: 24px;
  min-height: 24px;
  border: 1px solid rgba(67, 151, 91, 0.22);
  border-radius: 7px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2f6641;
  background: linear-gradient(145deg, rgba(241, 250, 244, 0.96), rgba(205, 235, 215, 0.76));
  box-shadow: 0 5px 12px rgba(55, 125, 75, 0.09);
  cursor: pointer;
}

.planning-lesson-survey-link:hover {
  border-color: rgba(67, 151, 91, 0.38);
  background: linear-gradient(145deg, rgba(248, 253, 250, 1), rgba(192, 229, 204, 0.88));
  transform: translateY(-1px);
}

.planning-lesson-survey-link svg {
  width: 13px;
  height: 13px;
}

.planning-lesson-notes.with-assessment {
  grid-template-columns: minmax(0, 1fr) minmax(104px, 0.92fr);
}

.planning-lesson-assessment-fields {
  display: grid;
  gap: 5px;
}

.planning-lesson-assessment-field {
  min-width: 0;
}

.planning-lesson-assessment-field textarea {
  min-height: 100%;
  border-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(109, 126, 150, 0.1);
}

.planning-lesson-assessment-field.test textarea {
  background: rgba(255, 247, 229, 0.86);
}

.planning-lesson-assessment-field.exam textarea {
  background: rgba(253, 239, 244, 0.9);
}

.planning-lesson-assessment-field.survey textarea {
  background: rgba(239, 250, 243, 0.9);
}

.planning-lesson-flags {
  display: grid;
  grid-template-columns: repeat(3, 22px);
  gap: 4px;
  align-content: center;
  justify-content: end;
}

.planning-lesson-flag {
  position: relative;
  display: block;
  min-width: 0;
  font-size: 0;
}

.planning-lesson-flag input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.planning-lesson-flag span {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 30px;
  border: 1px solid rgba(109, 126, 150, 0.1);
  border-radius: 7px;
  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.planning-lesson-flag span::after {
  content: "✓";
  position: absolute;
  top: 1px;
  right: 2px;
  opacity: 0;
  font-size: 8px;
  font-weight: 950;
  line-height: 1;
}

.planning-lesson-flag svg {
  width: 11px;
  height: 11px;
}

.planning-lesson-flag.survey span {
  color: rgba(45, 125, 80, 0.74);
  background: rgba(235, 247, 240, 0.64);
}

.planning-lesson-flag.test span {
  color: rgba(147, 98, 15, 0.7);
  background: rgba(255, 248, 236, 0.66);
}

.planning-lesson-flag.exam span {
  color: rgba(167, 47, 83, 0.68);
  background: rgba(253, 242, 246, 0.68);
}

.planning-lesson-flag input:checked + span {
  transform: translateY(-1px);
}

.planning-lesson-flag input:checked + span::after {
  opacity: 1;
}

.planning-lesson-flag.survey input:checked + span {
  border-color: rgba(45, 125, 80, 0.28);
  background: rgba(201, 237, 215, 0.84);
  box-shadow: 0 7px 14px rgba(45, 125, 80, 0.1);
}

.planning-lesson-flag.test input:checked + span {
  border-color: rgba(147, 98, 15, 0.26);
  background: rgba(252, 226, 178, 0.86);
  box-shadow: 0 7px 14px rgba(147, 98, 15, 0.1);
}

.planning-lesson-flag.exam input:checked + span {
  border-color: rgba(167, 47, 83, 0.24);
  background: rgba(248, 209, 220, 0.88);
  box-shadow: 0 7px 14px rgba(167, 47, 83, 0.1);
}

.planning-lesson-flag input:focus-visible + span {
  outline: 2px solid rgba(47, 127, 195, 0.32);
  outline-offset: 2px;
}

.planning-lesson-flag input:disabled {
  cursor: not-allowed;
}

.planning-lesson-flag input:disabled + span {
  opacity: 0.42;
  background: rgba(232, 238, 245, 0.7);
  box-shadow: none;
}

.matrix-student-list {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.matrix-dashboard-host {
  display: block;
  min-width: 0;
}

.matrix-dashboard-panel {
  overflow: hidden;
}

.student-dashboard-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(130px, 160px) repeat(4, minmax(160px, 1fr)) minmax(315px, 350px);
  gap: 10px;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 3px;
}

.student-dashboard-head {
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 8px;
  padding: 11px 10px;
  color: var(--blue);
  background: rgba(224, 239, 252, 0.78);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.student-dashboard-head.student-id-head {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
}

.student-dashboard-head.grades-head {
  color: #111827;
  background: rgba(229, 231, 235, 0.82);
}

.student-sort-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex-wrap: wrap;
}

.matrix-panel-title-block {
  display: grid;
  justify-items: start;
  gap: 5px;
}

.matrix-subject-tabs {
  grid-column: auto;
  justify-content: flex-end;
}

.student-sort-controls span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.student-sort-controls button {
  min-height: 30px;
  border: 1px solid rgba(109, 126, 150, 0.2);
  border-radius: 8px;
  padding: 0 10px;
  color: #17456f;
  background: rgba(255, 255, 255, 0.68);
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}

.student-sort-controls button.active,
.student-sort-controls button:hover {
  border-color: rgba(47, 127, 211, 0.4);
  background: linear-gradient(145deg, rgba(235, 246, 255, 0.96), rgba(199, 224, 247, 0.86));
}

.student-search-control {
  min-height: 30px;
  border: 1px solid rgba(109, 126, 150, 0.2);
  border-radius: 8px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.74);
}

.student-search-control span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.student-search-control input {
  width: 150px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 760;
}

.student-search-control button {
  min-height: 24px;
  border: 0;
  border-radius: 7px;
  padding: 0 8px;
  color: #17456f;
  background: rgba(224, 239, 252, 0.9);
  font: inherit;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}

.student-search-control button:hover {
  background: rgba(199, 224, 247, 0.96);
}

.student-dashboard-id.student-search-hit,
.student-dashboard-cell.student-search-hit {
  border-color: rgba(47, 127, 211, 0.72);
  box-shadow: 0 0 0 4px rgba(47, 127, 211, 0.14), 0 12px 26px rgba(47, 127, 211, 0.16);
  animation: studentSearchPulse 0.9s ease-out;
}

.student-dashboard-cell.student-search-hit {
  background: linear-gradient(145deg, rgba(238, 248, 255, 0.98), rgba(218, 237, 252, 0.78));
}

@keyframes studentSearchPulse {
  0% { transform: scale(0.992); }
  45% { transform: scale(1.018); }
  100% { transform: scale(1); }
}

.student-dashboard-id {
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 8px;
  padding: 9px 8px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 0;
  color: var(--ink);
  background: rgba(224, 239, 252, 0.78);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  transition: border-color 1.05s ease, box-shadow 1.15s cubic-bezier(.22,1,.36,1), background 1.15s ease, transform .32s ease;
}

.student-identity-block {
  position: static;
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 5px;
  align-content: center;
  justify-items: center;
}

.student-dashboard-id-code {
  width: 100%;
  color: rgba(96, 109, 130, 0.82);
  font-size: 11px;
  font-weight: 880;
  line-height: 1.12;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.student-demographic-note {
  width: 100%;
  color: rgba(94, 111, 135, 0.72);
  font-size: 9px;
  font-weight: 740;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.student-name-fields {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(142, 157, 178, 0.26);
  border-radius: 7px;
  display: flex;
  align-items: stretch;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(235, 242, 249, 0.82));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

.student-name-input {
  width: 50%;
  flex: 1 1 50%;
  min-width: 0;
  min-height: 32px;
  border: 0;
  border-radius: 0;
  padding: 0 5px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 880;
  line-height: 1.25;
  text-align: center;
  overflow-wrap: anywhere;
}

.student-name-input + .student-name-input {
  border-left: 1px solid rgba(109, 126, 150, 0.2);
}

.student-name-input:focus {
  position: relative;
  z-index: 1;
  outline: 2px solid rgba(47, 127, 211, 0.28);
  outline-offset: -2px;
  background: rgba(241, 248, 255, 0.96);
}

.student-longitudinal-button {
  width: 100%;
  min-height: 30px;
  border: 1px solid rgba(159, 170, 187, 0.46);
  border-radius: 7px;
  padding: 5px 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #17456f;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(224,231,240,.78) 48%, rgba(255,255,255,.9)),
    linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.75), rgba(255,255,255,0));
  font-size: 9px;
  font-weight: 850;
  box-shadow: 0 9px 18px rgba(48, 63, 83, 0.13), inset 0 1px 0 rgba(255,255,255,.92);
  text-decoration: none;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.student-longitudinal-button:hover {
  border-color: rgba(133, 150, 173, 0.68);
  box-shadow: 0 12px 24px rgba(48, 63, 83, 0.18), inset 0 1px 0 rgba(255,255,255,.98);
  transform: translateY(-1px);
}

.student-longitudinal-button svg {
  width: 14px;
  height: 14px;
}

.student-longitudinal-surveys {
  margin-top: 20px;
}

.student-dashboard-cell {
  min-width: 0;
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 8px;
  background: rgba(255, 255, 255, 0.46);
  transition: border-color 1.05s ease, box-shadow 1.15s cubic-bezier(.22,1,.36,1), background 1.15s ease, transform .32s ease;
}

.student-dashboard-cell:has(.matrix-summary-button) {
  align-content: center;
}

.grade-entry-cell {
  gap: 5px;
  padding: 7px;
}

.grade-sheet {
  display: grid;
  gap: 5px;
}

.grade-sheet-row {
  display: grid;
  gap: 3px;
  align-items: center;
}

.grade-sheet-row.exam-grade-row {
  grid-template-columns: 58px repeat(3, minmax(22px, 1fr));
}

.grade-sheet-row.other-grade-row {
  grid-template-columns: 58px repeat(6, minmax(20px, 1fr));
}

.grade-sheet-row > span {
  align-self: center;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.1;
}

.grade-entry-cell label,
.class-grade-row label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
}

.grade-entry-cell input,
.class-grade-row input {
  width: 100%;
  min-height: 28px;
  border: 1px solid rgba(109, 126, 150, 0.2);
  border-radius: 6px;
  padding: 0 5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-weight: 850;
}

.grade-sheet-row input {
  min-width: 0;
  min-height: 25px;
  padding: 0 1px;
  border-radius: 5px;
  font-size: 10px;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.grade-sheet-row input::-webkit-inner-spin-button,
.grade-sheet-row input::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.grade-entry-cell strong {
  color: var(--ink);
  font-size: 11px;
}

.grade-entry-cell small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 780;
}

.grade-summary-cell {
  align-content: start;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 5px;
}

.student-grade-summary-head {
  border: 1px solid rgba(47, 127, 211, 0.14);
  border-radius: 7px;
  padding: 5px 7px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  background: rgba(232, 242, 252, 0.68);
}

.student-grade-summary-head span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.student-grade-summary-head strong {
  font-size: 14px;
  line-height: 1;
}

.student-grade-subject-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 3px;
  padding-right: 2px;
}

.student-grade-subject-row {
  border: 1px solid rgba(109, 126, 150, 0.14);
  border-radius: 6px;
  padding: 3px 5px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  background: rgba(255, 255, 255, 0.6);
  font-size: 10px;
}

.student-grade-subject-row span {
  overflow: hidden;
  color: var(--ink);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-grade-subject-row b {
  color: #184c7c;
  font-size: 10px;
}

.class-grades-panel {
  grid-column: 1 / -1;
}

.class-grade-list {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.class-grade-row {
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(100px, 130px) minmax(260px, 1.6fr) minmax(120px, auto) minmax(155px, auto);
  gap: 10px;
  align-items: end;
  background: rgba(255, 255, 255, 0.58);
}

.class-grade-row > strong {
  align-self: center;
  color: var(--ink);
  font-size: 14px;
  font-weight: 920;
}

.class-grade-row b {
  align-self: center;
  color: #111827;
  font-size: 13px;
}

.class-grade-row small {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.class-other-grade-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.all-subject-grade-panel {
  height: 248px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.all-subject-grade-panel .class-scale-list {
  margin-top: 12px;
  min-height: 0;
  gap: 0;
}

.all-subject-grade-panel .class-grade-average-card {
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  justify-items: stretch;
  text-align: left;
}

.all-subject-grade-gauge {
  justify-self: end;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.all-subject-grade-gauge b {
  color: var(--blue);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.all-subject-grade-list {
  max-height: 100%;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  align-content: start;
  gap: 8px 12px;
  padding-right: 4px;
}

.all-subject-grade-row {
  min-height: 30px;
  border: 1px solid rgba(109, 126, 150, 0.15);
  border-radius: 8px;
  padding: 5px 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.all-subject-grade-row strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.all-subject-grade-row span {
  color: #184c7c;
  font-weight: 850;
}

.all-subject-grade-row em {
  color: var(--muted);
  font-style: normal;
  font-weight: 760;
}

.teacher-dashboard-host {
  display: block;
  min-width: 0;
}

.teacher-quality-panel {
  overflow: hidden;
}

.teacher-quality-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(145px, 170px) repeat(3, minmax(220px, 1fr));
  gap: 10px;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 3px;
}

.teacher-quality-head {
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 8px;
  padding: 11px 10px;
  color: var(--blue);
  background: rgba(224, 239, 252, 0.78);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.teacher-quality-head.class-head {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.56);
}

.teacher-quality-class {
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  color: var(--ink);
  background: rgba(224, 239, 252, 0.78);
}

.teacher-quality-class strong,
.teacher-quality-class span,
.teacher-quality-class small {
  display: block;
}

.teacher-quality-class strong {
  font-size: 22px;
  font-weight: 900;
}

.teacher-quality-class span,
.teacher-quality-class small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.teacher-quality-cell {
  min-width: 0;
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  align-content: start;
  gap: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.teacher-quality-card {
  min-height: 152px;
  border: 1px solid rgba(109, 126, 150, 0.2);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  justify-items: center;
  align-content: space-between;
  gap: 8px;
  text-align: center;
  background: rgba(255, 255, 255, 0.64);
}

.teacher-quality-link,
.matrix-gauge-link {
  color: inherit;
  text-decoration: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease;
}

.teacher-quality-link:hover,
.teacher-quality-link:focus-visible,
.matrix-gauge-link:hover,
.matrix-gauge-link:focus-visible {
  border-color: rgba(47, 127, 211, 0.42);
  background: rgba(232, 242, 252, 0.9);
  box-shadow: 0 12px 26px rgba(31, 77, 120, 0.12);
  outline: none;
  transform: translateY(-1px);
}

.matrix-student-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.58);
}

.matrix-student-id {
  border-radius: 8px;
  padding: 12px;
  display: grid;
  align-content: center;
  background: rgba(224, 239, 252, 0.76);
}

.matrix-student-id span,
.matrix-student-id strong {
  display: block;
}

.matrix-student-id span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.matrix-student-id strong {
  margin-top: 5px;
  font-size: 22px;
}

.matrix-area-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.matrix-area-column {
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.42);
}

.matrix-area-column h3 {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

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

.matrix-gauge-card {
  min-height: 142px;
  border: 1px solid rgba(109, 126, 150, 0.2);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  justify-items: center;
  align-content: space-between;
  gap: 6px;
  text-align: center;
  background: rgba(255, 255, 255, 0.62);
}

.matrix-gauge-card strong,
.matrix-gauge-card span,
.matrix-gauge-card b {
  display: block;
}

.matrix-gauge-card strong {
  font-size: 12px;
  line-height: 1.25;
}

.matrix-gauge-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.matrix-gauge-card b {
  color: var(--blue);
  font-size: 14px;
}

.matrix-summary-button {
  width: 100%;
  min-height: 128px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  align-content: center;
}

.matrix-summary-button:hover,
.matrix-summary-button:focus-visible {
  border-color: rgba(47, 127, 211, 0.44);
  box-shadow: 0 12px 24px rgba(47, 127, 211, 0.12);
  outline: none;
}

.student-profile-button {
  margin-top: 0;
  font-size: 10px;
  letter-spacing: .01em;
}

.student-profile-shell {
  min-height: 100vh;
}

.student-profile-header {
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(460px, 1.35fr) auto;
  grid-template-areas:
    "identity nav actions"
    "identity nav actions";
  align-items: center;
  gap: 10px 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(229,240,250,.76)),
    radial-gradient(circle at 12% 20%, rgba(47,127,211,.12), transparent 30%);
}

.student-profile-header > div:first-child {
  grid-area: identity;
  min-width: 0;
}

.student-profile-section-nav {
  grid-area: nav;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.student-profile-section-nav > button,
.student-profile-jump-menu summary,
.section-top-button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  padding: 0 15px;
  color: #24506f;
  background: rgba(230, 241, 250, .86);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.student-profile-section-nav > button:hover,
.student-profile-section-nav > button:focus-visible,
.student-profile-jump-menu summary:hover,
.section-top-button:hover {
  background: rgba(205, 229, 247, .94);
}

.student-profile-jump-menu {
  position: relative;
}

.student-profile-jump-menu summary {
  width: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  list-style: none;
}

.student-profile-jump-menu summary::-webkit-details-marker {
  display: none;
}

.student-profile-jump-menu svg {
  width: 16px;
  height: 16px;
}

.student-profile-jump-menu > div {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  min-width: 230px;
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 5px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 18px 40px rgba(31, 58, 84, .18);
}

.student-profile-jump-menu button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 10px;
  text-align: left;
  color: #17456f;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.student-profile-jump-menu button:hover {
  background: #eef7ff;
}

.student-profile-floating-nav {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: grid;
  gap: 8px;
  justify-items: end;
  pointer-events: none;
}

.student-profile-floating-nav > * {
  pointer-events: auto;
}

.student-profile-floating-top {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(47,127,211,.22);
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #17456f;
  background: rgba(255,255,255,.96);
  box-shadow: 0 16px 36px rgba(31,58,84,.18);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  cursor: pointer;
}

.student-profile-floating-nav.scrolled .student-profile-floating-top {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.student-profile-floating-nav .student-profile-jump-menu {
  position: relative;
}

.student-profile-floating-nav .student-profile-jump-menu summary {
  width: 44px;
  height: 44px;
  min-height: 44px;
  border: 1px solid rgba(47,127,211,.24);
  background: rgba(255,255,255,.96);
  box-shadow: 0 16px 36px rgba(31,58,84,.18);
}

.student-profile-floating-nav .student-profile-jump-menu > div {
  right: 0;
  top: auto;
  bottom: calc(100% + 10px);
  z-index: 100;
  box-shadow: 0 22px 46px rgba(20, 38, 57, .24);
}

.student-profile-floating-nav .student-profile-jump-menu[open] summary {
  background: #dff0ff;
  color: #0f4a7d;
}

.section-top-button {
  margin-left: auto;
  min-height: 28px;
  font-size: 10px;
}

.student-profile-header h2 {
  margin: 2px 0 5px;
  color: var(--ink);
  font-size: clamp(26px, 3vw, 42px);
}

.student-profile-header p:last-child {
  margin: 0;
  color: var(--muted);
  font-weight: 780;
}

.student-profile-stats {
  display: none;
}

.student-profile-stats span {
  min-height: 64px;
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  background: rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
}

.student-profile-stats b {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
}

.student-profile-stats small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.student-profile-actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.student-profile-dossier {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(230px, 0.48fr);
  gap: 16px;
  align-items: stretch;
  background:
    linear-gradient(145deg, rgba(255,255,255,.94), rgba(236,244,252,.74)),
    radial-gradient(circle at 18% 20%, rgba(47,127,211,.1), transparent 34%);
}

.student-profile-development {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(500px, 1fr);
  gap: 10px;
}

.student-profile-dossier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.student-profile-dossier-head h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 22px;
}

.student-profile-mode-switch {
  display: inline-flex;
  gap: 7px;
  flex-wrap: wrap;
}

.student-profile-mode-switch button {
  min-height: 34px;
  border: 1px solid rgba(47,127,211,.24);
  border-radius: 8px;
  padding: 0 14px;
  color: #17456f;
  background: rgba(255,255,255,.76);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.student-profile-mode-switch button.active {
  border-color: rgba(47,127,211,.58);
  background: linear-gradient(145deg, rgba(234,247,255,.98), rgba(193,222,248,.88));
  box-shadow: 0 10px 22px rgba(47,127,211,.12);
}

.student-profile-chart-wrap {
  position: relative;
  min-height: min(540px, calc(100vh - 285px));
  border: 1px solid rgba(91,125,158,.18);
  border-radius: 18px;
  padding: 4px 4px 18px;
  background: rgba(248,252,255,.86);
  overflow: hidden;
}

.student-profile-y-label,
.student-profile-x-label {
  position: absolute;
  color: #244a6d;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}

.student-profile-y-label {
  left: 2px;
  top: 8px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.student-profile-x-label {
  right: 16px;
  bottom: 3px;
}

.student-profile-development-chart {
  min-height: min(520px, calc(100vh - 305px));
  height: 100%;
}

.student-profile-development-svg {
  display: block;
  width: 100%;
  height: 100%;
  min-height: min(520px, calc(100vh - 305px));
}

.profile-plot-bg {
  fill: rgba(255,255,255,.72);
  stroke: rgba(47,127,211,.12);
}

.profile-grid-line,
.profile-year-line {
  stroke: rgba(109,126,150,.16);
  stroke-width: 1;
}

.profile-year-line {
  stroke-dasharray: 5 6;
}

.profile-axis {
  stroke: rgba(36,74,109,.62);
  stroke-width: 2;
  stroke-linecap: round;
}

.profile-axis-label,
.profile-year-label,
.profile-class-label,
.profile-axis-caption {
  fill: #455e78;
  font-size: 12px;
  font-weight: 850;
  text-anchor: middle;
}

.profile-axis-label {
  text-anchor: end;
}

.profile-class-label {
  fill: #77889b;
  font-size: 10px;
  text-anchor: start;
}

.profile-axis-caption {
  fill: #244a6d;
  font-size: 11px;
  text-anchor: end;
}

.profile-series-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-series-point {
  fill: #fff;
  stroke: currentColor;
  stroke-width: 3;
}

.profile-series-grade {
  color: #17456f;
}

.profile-series-motivational {
  color: #2f7fd3;
}

.profile-series-performance {
  color: #6e8bb2;
}

.profile-series-affective {
  color: #c46f9e;
}

.profile-series-metacognitive {
  color: #4f9b5d;
}

.profile-series-observation {
  color: #be7a3d;
}

.profile-series-observation .profile-series-line {
  stroke-dasharray: 8 7;
}

.student-profile-dossier-side {
  border-left: 1px solid rgba(109,126,150,.14);
  padding-left: 14px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.student-profile-legend {
  display: grid;
  gap: 8px;
}

.student-profile-legend-all {
  min-height: 32px;
  border: 0;
  border-radius: 999px;
  padding: 0 12px;
  justify-self: start;
  color: #24506f;
  background: rgba(230, 241, 250, .86);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.student-profile-legend-all.active {
  background: #cfe6f8;
  color: #0f4a7d;
}

.student-profile-legend-item {
  width: 100%;
  border: 0;
  padding: 0;
  min-height: 52px;
  display: grid;
  grid-template-columns: 32px minmax(0,1fr);
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-items: center;
  text-align: left;
  background: transparent;
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
}

.student-profile-legend-item:hover,
.student-profile-legend-item:focus-visible {
  background: rgba(232, 242, 252, .62);
  outline: none;
}

.student-profile-legend-item.active {
  background: linear-gradient(145deg, rgba(236, 247, 255, .98), rgba(214, 233, 249, .72));
  box-shadow: inset 0 0 0 1px rgba(47,127,211,.2);
}

.student-profile-legend-item b {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  color: #17456f;
  background: transparent;
  font-size: 13px;
}

.student-profile-legend-item b i {
  display: block;
  width: 12px;
  height: 12px;
  background: currentColor;
}

.student-profile-legend-item b[data-shape="circle"] i {
  border-radius: 999px;
}

.student-profile-legend-item b[data-shape="square"] i {
  border-radius: 3px;
}

.student-profile-legend-item b[data-shape="diamond"] i {
  border-radius: 3px;
  transform: rotate(45deg);
}

.student-profile-legend-item b[data-shape="triangle"] i {
  width: 0;
  height: 0;
  background: transparent;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 13px solid currentColor;
}

.student-profile-legend-item[data-series="motivational"] b { color: #2f7fd3; }
.student-profile-legend-item[data-series="performance"] b { color: #6e8bb2; }
.student-profile-legend-item[data-series="affective"] b { color: #c46f9e; }
.student-profile-legend-item[data-series="metacognitive"] b { color: #4f9b5d; }
.student-profile-legend-item[data-series="observation"] b { color: #be7a3d; }

.student-profile-legend-item em {
  min-width: 0;
  color: var(--ink);
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}

.student-profile-legend-item small {
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.student-profile-current-strip {
  border: 1px solid rgba(109,126,150,.16);
  border-radius: 10px;
  padding: 10px;
  background: rgba(255,255,255,.68);
}

.student-profile-current-strip > strong {
  display: block;
  margin-bottom: 8px;
  color: #244a6d;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.student-profile-current-strip div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 7px;
}

.student-profile-current-strip span {
  min-height: 54px;
  border: 1px solid rgba(47,127,211,.14);
  border-radius: 8px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  background: #f7fbff;
}

.student-profile-current-strip b {
  color: var(--blue);
  font-size: 17px;
}

.student-profile-current-strip small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 820;
  text-align: center;
}

@media (max-width: 980px) {
  .student-profile-header,
  .student-profile-dossier,
  .student-profile-grid {
    grid-template-columns: 1fr;
  }

  .student-profile-header {
    display: grid;
  }

  .student-profile-stats {
    min-width: 0;
  }

  .student-profile-dossier-side {
    border-left: 0;
    border-top: 1px solid rgba(109,126,150,.14);
    padding-left: 0;
    padding-top: 12px;
  }

  .student-profile-current-strip div {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1600px), (max-height: 950px) {
  .student-profile-shell {
    gap: 10px;
  }

  .student-profile-header {
    grid-template-columns: minmax(190px, 0.85fr) minmax(320px, 1fr) auto;
    grid-template-areas: "identity nav actions";
    gap: 8px 12px;
    padding: 10px 12px;
  }

  .student-profile-header h2 {
    margin: 1px 0 3px;
    font-size: clamp(22px, 2.2vw, 31px);
    line-height: 1;
  }

  .student-profile-header p:last-child {
    font-size: 12px;
    line-height: 1.2;
  }

  .student-profile-section-nav {
    justify-content: flex-start;
    gap: 5px;
  }

  .student-profile-section-nav > button {
    min-height: 27px;
    padding-inline: 8px;
    font-size: 10px;
  }

  .student-profile-stats {
    grid-template-columns: repeat(4, minmax(60px, 1fr));
    gap: 6px;
  }

  .student-profile-stats span {
    min-height: 48px;
    gap: 1px;
  }

  .student-profile-stats b {
    font-size: 15px;
  }

  .student-profile-stats small {
    font-size: 8px;
    letter-spacing: .04em;
  }

  .student-profile-actions {
    gap: 6px;
  }

  .student-profile-actions .secondary-button {
    min-height: 31px;
    padding-inline: 9px;
    font-size: 11px;
  }

  .student-profile-dossier {
    grid-template-columns: minmax(0, 2.45fr) minmax(205px, 0.42fr);
    gap: 12px;
    padding: 10px 12px;
  }

  .student-profile-development {
    grid-template-rows: auto minmax(350px, 1fr);
    gap: 7px;
  }

  .student-profile-dossier-head h2 {
    font-size: 18px;
  }

  .student-profile-mode-switch button {
    min-height: 29px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .student-profile-chart-wrap {
    min-height: min(430px, calc(100vh - 275px));
    border-radius: 14px;
    padding-bottom: 10px;
  }

  .student-profile-development-chart {
    min-height: min(410px, calc(100vh - 295px));
  }

  .student-profile-development-svg {
    min-height: min(410px, calc(100vh - 295px));
    height: 100%;
  }

  .student-profile-y-label,
  .student-profile-x-label {
    font-size: 10px;
  }

  .student-profile-dossier-side {
    gap: 8px;
    padding-left: 10px;
  }

  .student-profile-legend {
    gap: 4px;
  }

  .student-profile-legend-all {
    min-height: 27px;
    padding-inline: 10px;
    font-size: 10px;
  }

  .student-profile-legend-item {
    min-height: 40px;
    grid-template-columns: 24px minmax(0, 1fr);
    column-gap: 6px;
  }

  .student-profile-legend-item b {
    width: 22px;
    height: 22px;
  }

  .student-profile-legend-item em {
    font-size: 11px;
  }

  .student-profile-legend-item small {
    font-size: 9px;
    line-height: 1.05;
  }

  .student-profile-current-strip {
    padding: 8px;
  }

  .student-profile-current-strip > strong {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .student-profile-current-strip div {
    gap: 5px;
  }

  .student-profile-current-strip span {
    min-height: 40px;
  }

  .student-profile-current-strip b {
    font-size: 14px;
  }

  .student-profile-current-strip small {
    font-size: 8px;
  }
}

@media (max-width: 1180px) {
  .student-profile-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "identity actions"
      "nav nav";
  }

  .student-profile-section-nav {
    justify-content: flex-start;
  }

  .student-profile-dossier {
    grid-template-columns: minmax(0, 1.8fr) minmax(190px, 0.42fr);
  }

  .student-profile-sociogram-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .student-profile-header {
    grid-template-columns: 1fr;
    grid-template-areas:
      "identity"
      "nav"
      "actions";
  }

  .student-profile-actions {
    justify-content: flex-start;
  }

  .student-profile-dossier,
  .student-profile-grid {
    grid-template-columns: 1fr;
  }

  .student-profile-longitudinal-picker {
    grid-template-columns: 1fr;
  }

  .student-search-control input {
    width: 118px;
  }
}

.student-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.32fr);
  gap: 14px;
  align-items: stretch;
}

.student-profile-grid > .panel,
.student-profile-grid > aside {
  height: 100%;
}

.student-profile-category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(126px, 1fr));
  gap: 9px;
}

.student-profile-category {
  min-height: 150px;
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 10px;
  padding: 8px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(235, 246, 255, 0.54));
}

.student-profile-category-toggle {
  width: 100%;
  border: 0;
  padding: 0;
  display: grid;
  justify-items: center;
  gap: 5px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.student-profile-category-toggle .scale-gauge {
  width: min(100%, 108px);
}

.student-profile-category h3 {
  margin: 0;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.student-profile-category strong {
  color: var(--ink);
  font-size: 14px;
}

.student-profile-category small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 780;
}

.student-profile-category ul {
  width: 100%;
  margin: 2px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  list-style: none;
}

.student-profile-grid > aside {
  max-height: 100%;
  min-height: 100%;
  overflow: auto;
}

.student-profile-category li {
  border-top: 1px solid rgba(109, 126, 150, 0.14);
  padding-top: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.student-profile-category li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-profile-category li b {
  color: var(--ink);
}

.student-profile-category li a {
  color: var(--blue);
  font-weight: 880;
  text-decoration: none;
}

.student-profile-grade-box {
  display: grid;
  gap: 10px;
  max-height: 100%;
  overflow: auto;
  padding-right: 2px;
}

.student-profile-grade-filter {
  margin-bottom: 8px;
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.student-profile-grade-filter select {
  appearance: none;
  min-height: 32px;
  border: 1px solid rgba(109, 126, 150, 0.22);
  border-radius: 8px;
  padding: 0 30px 0 10px;
  color: var(--ink);
  background:
    linear-gradient(45deg, transparent 50%, #54718a 50%) right 13px center / 6px 6px no-repeat,
    linear-gradient(135deg, #fff, #eef7ff);
  font: inherit;
  font-size: 12px;
  font-weight: 820;
  text-transform: none;
  letter-spacing: 0;
}

.student-profile-grade-card {
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.student-profile-grade-card header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.student-profile-grade-card header strong {
  color: var(--blue);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.student-profile-grade-card header span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 880;
}

.student-profile-grade-row {
  display: grid;
  grid-template-columns: 76px repeat(6, minmax(34px, 1fr));
  gap: 5px;
  align-items: stretch;
}

.student-profile-grade-row:first-of-type {
  grid-template-columns: 76px repeat(3, minmax(38px, 54px));
}

.student-profile-grade-row > b {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
}

.student-profile-grade-chip {
  min-height: 34px;
  border: 1px solid rgba(109, 126, 150, 0.2);
  border-radius: 7px;
  padding: 4px 5px;
  display: grid;
  place-items: center;
  gap: 1px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.student-profile-grade-chip.empty {
  color: #8a98a8;
  background: rgba(241, 246, 250, 0.72);
}

.student-profile-grade-chip em {
  font-style: normal;
  font-size: 15px;
  font-weight: 880;
  line-height: 1;
}

.student-profile-grade-chip small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 760;
  line-height: 1;
}

.student-profile-grade-history {
  margin-top: 10px;
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.student-profile-grade-history h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.student-profile-grade-chart {
  width: 100%;
  height: auto;
}

.grade-chart-line {
  stroke: #2f7fd3;
}

.grade-chart-point {
  fill: #fff;
  stroke: #2f7fd3;
  stroke-width: 2;
}

.student-profile-grade-events {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.student-profile-grade-events span {
  border: 1px solid rgba(47, 127, 211, 0.18);
  border-radius: 999px;
  padding: 4px 8px;
  color: #244a6d;
  background: #f6fbff;
  font-size: 11px;
  font-weight: 780;
}

.student-profile-grade-events b {
  margin-right: 5px;
  color: #1d6097;
}

.student-profile-longitudinal-head {
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.student-profile-longitudinal-controls {
  margin-left: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 7px;
  min-width: 0;
  flex: 1 1 auto;
}

.student-profile-longitudinal-controls label {
  flex: 0 0 auto;
  min-width: 128px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: grid;
  gap: 3px;
}

.student-profile-longitudinal-controls select {
  appearance: none;
  min-height: 34px;
  border: 1px solid rgba(109, 126, 150, 0.22);
  border-radius: 999px;
  padding: 0 28px 0 11px;
  color: var(--ink);
  background:
    linear-gradient(45deg, transparent 50%, #54718a 50%) right 13px center / 6px 6px no-repeat,
    linear-gradient(135deg, #fff, #eef7ff);
  font: inherit;
  font-size: 13px;
  font-weight: 820;
  text-transform: none;
  letter-spacing: 0;
}

.student-profile-longitudinal-controls label:last-of-type {
  min-width: 104px;
  max-width: 124px;
}

.student-profile-longitudinal-controls label:last-of-type select {
  width: 124px;
}

.student-profile-longitudinal {
  display: block;
}

.student-profile-longitudinal-builder {
  display: grid;
  gap: 12px;
}

.student-profile-longitudinal-picker {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.student-profile-longitudinal-picker > span {
  min-height: 28px;
  border: 1px solid rgba(47, 127, 211, 0.22);
  border-radius: 999px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  color: #17456f;
  background: linear-gradient(145deg, #fff, #eef7ff);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.student-profile-longitudinal-chip-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.student-profile-longitudinal-chip-row.inline {
  flex: 1 1 0;
  min-width: 0;
  max-width: min(100%, 720px);
  width: 100%;
  align-self: end;
  padding: 2px 0 4px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
}

.student-profile-longitudinal-chip-row button {
  flex: 0 0 auto;
  min-height: 28px;
  border: 1px solid rgba(47, 127, 211, 0.22);
  border-radius: 999px;
  padding: 0 10px;
  color: #17456f;
  background: linear-gradient(145deg, #fff, #eef7ff);
  font: inherit;
  font-size: 11px;
  font-weight: 880;
  cursor: pointer;
}

.student-profile-longitudinal-chip-row button.active {
  border-color: rgba(47, 127, 211, 0.58);
  background: linear-gradient(145deg, #e9f5ff, #cfe7fb);
  box-shadow: 0 10px 22px rgba(47, 127, 211, 0.13);
}

.student-profile-longitudinal-drop {
  min-height: 230px;
  border: 1px dashed rgba(47, 127, 211, 0.24);
  border-radius: 12px;
  padding: 10px;
  background: rgba(248, 252, 255, 0.72);
}

.student-profile-longitudinal-drop.drag-active {
  border-color: rgba(47, 127, 211, 0.58);
  background: rgba(226, 243, 255, 0.72);
}

.student-profile-longitudinal-empty {
  min-height: 210px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255,255,255,.58);
  font-size: 13px;
  font-weight: 780;
  text-align: center;
  padding: 18px;
}

.student-profile-longitudinal-card {
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.student-profile-longitudinal-card h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 16px;
}

.student-profile-social-panel {
  margin-bottom: 24px;
}

.student-profile-sociogram {
  display: grid;
  gap: 10px;
}

.student-profile-sociogram-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.28fr);
  gap: 12px;
  align-items: stretch;
}

.student-profile-sociogram-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.student-profile-sociogram-meta strong {
  color: var(--ink);
  font-size: 15px;
}

.student-profile-sociogram-graph {
  min-height: 420px;
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 14px;
  padding: 8px;
  background: #f7fbff;
  overflow: hidden;
}

.student-profile-sociogram-graph svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
}

.student-profile-sociogram-stats {
  border: 1px solid rgba(47, 127, 211, 0.16);
  border-radius: 12px;
  padding: 12px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: linear-gradient(145deg, rgba(255,255,255,.88), rgba(233, 245, 255, .66));
}

.student-profile-sociogram-stats > span {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.student-profile-sociogram-stats strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.student-profile-sociogram-stats dl {
  margin: 0;
  display: grid;
  gap: 7px;
}

.student-profile-sociogram-stats dl div {
  border-top: 1px solid rgba(109, 126, 150, 0.14);
  padding-top: 7px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.student-profile-sociogram-stats dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.student-profile-sociogram-stats dd {
  margin: 0;
  color: var(--blue);
  font-size: 18px;
  font-weight: 920;
}

.student-profile-sociogram-stats small {
  color: #607589;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
}

.student-profile-observations {
  display: grid;
  gap: 10px;
}

.student-profile-observation-summary {
  border: 1px solid rgba(47, 127, 211, 0.18);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
  color: #1d6097;
  background: linear-gradient(145deg, rgba(235, 246, 255, 0.96), rgba(213, 232, 248, 0.72));
}

.student-profile-observation-kpi {
  min-width: 96px;
  border: 1px solid rgba(47, 127, 211, 0.15);
  border-radius: 9px;
  padding: 6px 9px;
  display: grid;
  gap: 1px;
  background: rgba(255,255,255,.62);
}

.student-profile-observation-kpi strong {
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.student-profile-observation-kpi span {
  color: #244a6d;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.student-profile-observation-kpi.muted strong {
  color: #607589;
}

.student-profile-observation-average {
  min-width: 260px;
  border: 1px solid rgba(47, 127, 211, 0.15);
  border-radius: 9px;
  padding: 7px 10px;
  display: grid;
  gap: 5px;
  background: rgba(255,255,255,.62);
}

.student-profile-observation-average-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.student-profile-observation-average-head span {
  color: #244a6d;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.student-profile-observation-average-head strong {
  color: var(--blue);
  font-size: 18px;
  line-height: 1;
}

.student-profile-observation-average-scale {
  position: relative;
  height: 21px;
  border-radius: 999px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  overflow: visible;
  background: linear-gradient(90deg, #bf7772, #efcfcc 25%, #c9d3dc 50%, #cee8d8 75%, #4c996c);
  box-shadow: inset 0 0 0 1px rgba(109,126,150,.2);
}

.student-profile-observation-average-scale > span {
  display: grid;
  place-items: center;
  color: rgba(17, 24, 39, 0.62);
  font-size: 9px;
  font-weight: 900;
}

.student-profile-observation-average-scale i {
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 2px;
  border-radius: 999px;
  background: #111827;
  transform: translateX(-50%);
  pointer-events: none;
}

.student-profile-observation-average-scale i b {
  position: absolute;
  left: 50%;
  bottom: 100%;
  transform: translate(-50%, -3px);
  border-radius: 999px;
  padding: 2px 5px;
  color: #111827;
  background: rgba(255,255,255,.9);
  box-shadow: 0 4px 10px rgba(17,24,39,.14);
  font-size: 9px;
  font-style: normal;
  white-space: nowrap;
}

.student-profile-observation-filters {
  margin-left: auto;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.student-profile-observation-filters button {
  min-height: 28px;
  border: 1px solid rgba(47, 127, 211, 0.22);
  border-radius: 7px;
  padding: 4px 9px;
  color: #23597f;
  background: rgba(255, 255, 255, 0.78);
  font: inherit;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.student-profile-observation-filters button.active {
  border-color: rgba(47, 127, 211, 0.55);
  background: #dff0ff;
  color: #0f4a7d;
}

.student-profile-observation-distribution {
  height: 16px;
  border-radius: 999px;
  display: flex;
  overflow: hidden;
  background: #e7eef5;
  box-shadow: inset 0 0 0 1px #d4e2ed;
}

.student-profile-observation-distribution span + span {
  border-left: 2px solid #fff;
}

.student-profile-observation-distribution span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 14px;
}

.student-profile-observation-distribution em {
  font-style: normal;
  font-size: 8px;
  font-weight: 850;
  color: rgba(28, 58, 82, 0.72);
}

.student-profile-observation-distribution span[data-rating="-2"] { background: #bf7772; }
.student-profile-observation-distribution span[data-rating="-1"] { background: #efcfcc; }
.student-profile-observation-distribution span[data-rating="0"] { background: #c9d3dc; }
.student-profile-observation-distribution span[data-rating="1"] { background: #cee8d8; }
.student-profile-observation-distribution span[data-rating="2"] { background: #4c996c; }
.student-profile-observation-distribution span[data-rating="-2"] em,
.student-profile-observation-distribution span[data-rating="2"] em { color: rgba(255, 255, 255, 0.88); }

.student-profile-observation-development {
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 10px;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.student-profile-observation-development > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.student-profile-observation-development strong {
  color: var(--blue);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.student-profile-observation-development span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.student-profile-observation-development small {
  flex-basis: 100%;
  color: #587083;
  font-size: 10px;
  font-weight: 760;
}

.student-profile-observation-development svg {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: rgba(232, 242, 252, 0.52);
}

.student-profile-observation-development .observation-axis {
  stroke: rgba(109, 126, 150, 0.38);
  stroke-width: 1;
}

.student-profile-observation-development .observation-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.student-profile-observation-development .observation-trend-line {
  stroke: #6f8194;
  stroke-width: 2;
  stroke-dasharray: 6 5;
  stroke-linecap: round;
}

.student-profile-observation-development .observation-trend-line.positive {
  stroke: #4c996c;
}

.student-profile-observation-development .observation-trend-line.negative {
  stroke: #bf7772;
}

.student-profile-observation-development .observation-point {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 2;
}

.student-profile-observation-development .observation-point[data-rating="-2"],
.student-profile-observation-development .observation-point[data-rating="-1"] {
  stroke: #bf7772;
}

.student-profile-observation-development .observation-point[data-rating="1"],
.student-profile-observation-development .observation-point[data-rating="2"] {
  stroke: #4c996c;
}

.student-profile-observation-development .observation-date-label {
  fill: #6c8094;
  font-size: 9px;
  font-weight: 760;
  text-anchor: middle;
}

.student-profile-observation-list {
  display: grid;
  gap: 8px;
}

.student-profile-observation-card {
  --obs-bg: rgba(255, 255, 255, 0.78);
  --obs-line: rgba(109, 126, 150, 0.22);
  border: 1px solid var(--obs-line);
  border-left: 4px solid var(--obs-line);
  border-radius: 8px;
  padding: 9px 10px;
  background: var(--obs-bg);
}

.student-profile-observation-card[data-level="1"] {
  --obs-bg: #eff8f2;
  --obs-line: #98c6a6;
}

.student-profile-observation-card[data-level="2"] {
  --obs-bg: #dcefe3;
  --obs-line: #4c996c;
}

.student-profile-observation-card[data-level="-1"] {
  --obs-bg: #fcf1f0;
  --obs-line: #d4a29e;
}

.student-profile-observation-card[data-level="-2"] {
  --obs-bg: #f5dedc;
  --obs-line: #bf7772;
}

.student-profile-observation-card div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 820;
}

.student-profile-observation-card b {
  margin-left: auto;
  color: var(--ink);
}

.student-profile-observation-card p {
  margin: 6px 0 0;
  color: #253f56;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.student-profile-mini-chart {
  width: 100%;
  height: auto;
  margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(232, 242, 252, 0.52);
}

.student-profile-mini-chart .chart-axis {
  stroke: rgba(109, 126, 150, 0.5);
  stroke-width: 1;
}

.student-profile-mini-chart .chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.student-profile-mini-chart .chart-point {
  fill: #ffffff;
  stroke: var(--blue);
  stroke-width: 2;
}

.matrix-gauge {
  width: 104px;
  height: 62px;
}

.matrix-empty-cell {
  border: 1px dashed rgba(109, 126, 150, 0.2);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.template-detail {
  margin-top: 12px;
  display: grid;
  gap: 14px;
}

.template-detail p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.38;
}

.construct-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.construct-pill-list span {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 750;
}

.construct-pill-list small {
  color: var(--muted);
  font-weight: 700;
}

.template-summary {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.template-summary > span {
  color: var(--muted);
  font-weight: 750;
}

.file-list {
  margin-top: 18px;
  display: grid;
  align-content: start;
  gap: 10px;
}

#dashboardSurveyList {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.survey-search {
  position: relative;
  margin-top: 18px;
}

.assignment-filter-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.assignment-filter {
  min-width: 82px;
  border: 1px solid rgba(109, 126, 150, 0.2);
  border-radius: 8px;
  padding: 7px 10px;
  display: grid;
  gap: 1px;
  color: #163f68;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(226, 237, 248, 0.72));
  text-align: left;
  cursor: pointer;
}

.assignment-filter strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.05;
}

.assignment-filter span {
  color: rgba(87, 103, 123, 0.86);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.15;
}

.assignment-filter:hover,
.assignment-filter.active {
  border-color: rgba(47, 127, 211, 0.38);
  background: linear-gradient(145deg, rgba(239, 247, 255, 0.96), rgba(203, 225, 247, 0.84));
  box-shadow: 0 10px 22px rgba(31, 77, 120, 0.09);
}

.assignment-filter.active {
  outline: 2px solid rgba(47, 127, 211, 0.18);
}

.analysis-domain-filters {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}

.analysis-domain-filters label {
  min-width: min(100%, 245px);
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.analysis-domain-filters select {
  min-height: 36px;
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 8px;
  padding: 0 34px 0 11px;
  color: #315a7b;
  background: rgba(247, 251, 255, 0.86);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  outline: none;
}

.host-csv-filters {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.host-csv-filters .form-row {
  margin-top: 0;
}

.survey-search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #7b8794;
}

.survey-search input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px 0 40px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  outline: none;
}

.file-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  background: rgba(255, 255, 255, 0.58);
}

.file-card:hover {
  border-color: rgba(47, 127, 211, 0.22);
  background: rgba(255, 255, 255, 0.76);
}

.file-card[draggable="true"] {
  cursor: grab;
}

.file-card.dragging {
  opacity: 0.55;
}

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

.file-card span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.file-card .survey-meta-line {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: rgba(101, 124, 150, 0.11);
  font-weight: 750;
}

.file-card .home-survey-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--ink);
  font-weight: 850;
}

.home-survey-meta span {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin-top: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.home-survey-meta em {
  color: var(--muted);
  font-style: normal;
  font-weight: 750;
}

.home-survey-meta strong {
  color: #101828;
  font-weight: 900;
}

.home-survey-card {
  grid-template-columns: minmax(0, 1fr) minmax(225px, 250px);
  align-items: start;
}

.home-file-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: stretch;
}

.home-action-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.home-row-icon {
  width: 42px;
  height: 42px;
  min-width: 0;
  justify-self: start;
  align-self: center;
  background: rgba(255, 255, 255, 0.58);
}

.home-file-actions .secondary-button {
  width: 100%;
  min-height: 42px;
  height: 42px;
  align-self: center;
  justify-content: center;
  white-space: nowrap;
}

.builder-global-header > h1,
.student-global-header h1,
.analysis-header h1 {
  position: static;
  transform: none;
  color: var(--ink);
  background: none;
  font-size: 34px;
  font-weight: 820;
  text-align: left;
  text-shadow: none;
}

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

.analysis-tools-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.analysis-tool-card {
  padding: 0;
  overflow: hidden;
}

.analysis-tool-card summary {
  min-height: 74px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  list-style: none;
}

.analysis-tool-card summary::-webkit-details-marker {
  display: none;
}

.analysis-tool-card summary > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.analysis-tool-card summary strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1.15;
}

.analysis-tool-card summary svg {
  width: 20px;
  height: 20px;
  color: var(--blue);
  transition: transform 0.18s ease;
}

.analysis-tool-card[open] summary {
  border-bottom: 1px solid var(--line);
}

.analysis-tool-card[open] summary svg {
  transform: rotate(180deg);
}

.analysis-tool-content {
  padding: 0 14px 14px;
}

.result-body {
  margin-top: 18px;
}

.compare-panel {
  align-self: start;
}

.compare-form {
  margin-top: 18px;
  display: grid;
  gap: 9px;
}

.compare-form select {
  min-width: 0;
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
}

.drop-zone {
  min-height: 78px;
  border: 1px dashed #aeb9c6;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.48);
}

.drop-zone.active {
  border-color: var(--accent);
  background: rgba(226, 241, 253, 0.9);
}

.drop-zone span,
.drop-zone strong {
  display: block;
}

.drop-zone span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.drop-zone strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.25;
}

.compact-empty {
  min-height: 120px;
}

.comparison-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.comparison-summary span {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--blue);
  background: rgba(49, 111, 168, 0.11);
  font-size: 12px;
  font-weight: 800;
}

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

.comparison-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.comparison-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.comparison-card p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.comparison-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.comparison-card div {
  min-width: 0;
}

.comparison-card dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.comparison-card dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.longitudinal-link {
  margin-top: 14px;
  width: 100%;
}

.longitudinal-mode-row,
#longitudinalClassGroup,
#longitudinalTeacherGroup {
  display: grid;
  gap: 6px;
}

.longitudinal-chart {
  min-height: 320px;
  margin: 14px 0;
  border: 1px solid rgba(109, 126, 150, 0.16);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.54);
  overflow-x: auto;
}

.longitudinal-chart svg {
  width: min(100%, 860px);
  min-width: 640px;
  height: auto;
}

.chart-axis {
  stroke: rgba(30, 49, 68, 0.42);
  stroke-width: 1.4;
}

.chart-grid {
  stroke: rgba(109, 126, 150, 0.16);
  stroke-width: 1;
}

.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-point {
  fill: #fff;
  stroke: var(--blue);
  stroke-width: 3;
}

.chart-label,
.chart-value,
.chart-x-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-value {
  fill: var(--ink);
  text-anchor: middle;
}

.chart-x-label {
  text-anchor: middle;
}

.ai-action-row {
  margin: 0 0 16px;
  display: flex;
  justify-content: flex-start;
}

.ai-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.ai-result.loading {
  color: var(--blue);
  background: rgba(224, 239, 252, 0.85);
  font-weight: 800;
}

.ai-progress {
  min-height: 86px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.ai-progress-pulse {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 0 0 0 rgba(47, 127, 211, 0.34);
  animation: ai-pulse 1.5s infinite;
}

.ai-progress strong,
.ai-progress p {
  margin: 0;
}

.ai-progress p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ai-progress small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

@keyframes ai-pulse {
  70% { box-shadow: 0 0 0 8px rgba(47, 127, 211, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 127, 211, 0); }
}

.ai-result.error {
  border-color: rgba(180, 35, 24, 0.24);
  background: rgba(255, 239, 236, 0.9);
}

.ai-result p {
  margin: 8px 0 0;
}

.ai-text h3 {
  margin: 18px 0 7px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.ai-text h3:first-child {
  margin-top: 4px;
}

.ai-text strong {
  color: var(--ink);
  font-weight: 900;
}

.ai-result code {
  border-radius: 6px;
  padding: 2px 5px;
  background: rgba(23, 32, 42, 0.08);
}

.ai-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.ai-result-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.result-heading {
  margin: 18px 0 10px;
  font-size: 16px;
}

.result-heading:first-child {
  margin-top: 0;
}

.item-analysis-list {
  display: grid;
  gap: 18px;
}

.item-analysis-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.68);
}

.item-analysis-title-row {
  min-height: 38px;
  border-bottom: 1px solid rgba(71, 91, 113, 0.42);
  padding-bottom: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 12px;
  align-items: end;
}

.item-analysis-main {
  min-width: 0;
}

.item-analysis-title-row h4 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
}

.item-analysis-stat-head {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  text-align: center;
  font-size: 14px;
  font-weight: 850;
}

.item-analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(158px, 0.22fr);
  gap: 18px;
  align-items: start;
}

.item-analysis-table {
  min-width: 0;
}

.item-analysis-row {
  min-height: 70px;
  display: grid;
  grid-template-columns: minmax(170px, 0.9fr) minmax(160px, 1fr) 48px 48px;
  gap: 6px;
  align-items: center;
}

.item-analysis-label {
  min-width: 0;
  padding-right: 12px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.38;
}

.item-analysis-label span,
.item-analysis-label small {
  display: block;
}

.item-analysis-label small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.item-analysis-bar {
  position: relative;
  min-width: 0;
  height: 30px;
  display: flex;
  overflow: hidden;
  background: rgba(107, 133, 158, 0.1);
}

.item-analysis-segment {
  min-width: 0;
  height: 100%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--segment-color);
  font-size: 12px;
}

.item-analysis-segment.light {
  color: #153a53;
}

.item-analysis-segment strong {
  overflow: hidden;
  text-overflow: clip;
}

.item-analysis-no-data {
  margin: auto;
  color: var(--muted);
  font-size: 11px;
}

.item-analysis-bar-multiple {
  height: auto;
  min-height: 30px;
  display: grid;
  gap: 3px;
  padding: 3px;
}

.item-analysis-choice-row {
  position: relative;
  min-height: 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.item-analysis-choice-row i {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  border-radius: inherit;
  background: color-mix(in srgb, var(--segment-color) 72%, white);
}

.item-analysis-choice-row strong,
.item-analysis-choice-row em {
  position: relative;
  z-index: 1;
  font-style: normal;
}

.item-analysis-free-summary {
  min-height: 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  padding: 4px;
  background: rgba(107, 133, 158, 0.1);
  overflow: hidden;
}

.item-analysis-free-summary span {
  max-width: 220px;
  overflow: hidden;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted-strong);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.item-analysis-stat {
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
}

.student-scale-warning-group {
  position: absolute;
  left: 11px;
  bottom: 9px;
  z-index: 4;
  display: inline-flex;
  gap: 3px;
  margin: 0;
  pointer-events: auto;
}

.student-scale-warning {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(174, 111, 38, 0.32);
  border-radius: 50%;
  background: #fff2d8;
  color: #9b5a08;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.student-scale-warning.percentile {
  width: 17px;
  min-width: 17px;
  border-color: rgba(153, 60, 60, 0.32);
  background: #fde4e4;
  color: #9c2c2c;
  font-size: 7px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  padding: 0;
  transform: translateY(0.5px);
}

.item-analysis-total-row {
  min-height: 42px;
  border-top: 1px solid rgba(71, 91, 113, 0.42);
  border-bottom: 1px solid rgba(71, 91, 113, 0.7);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px 48px;
  gap: 6px;
  align-items: center;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.item-analysis-total-row strong {
  text-align: left;
}

.peer-observation-analysis {
  display: grid;
  gap: 12px;
  margin: 10px 0 18px;
}

.peer-observation-analysis > header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid rgba(76, 129, 107, 0.22);
  border-radius: 8px;
  background: rgba(231, 246, 238, 0.72);
}

.peer-observation-notes {
  display: grid;
  gap: 8px;
  max-height: 240px;
  overflow: auto;
}

.peer-observation-notes article {
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.peer-observation-notes strong,
.peer-observation-notes span,
.peer-observation-notes p {
  display: block;
  margin: 0;
}

.peer-observation-notes span {
  color: var(--muted);
  font-size: 11px;
}

.item-analysis-legend {
  padding-top: 15px;
  display: grid;
  gap: 10px;
}

.item-analysis-legend > strong {
  margin-bottom: 2px;
  font-size: 14px;
}

.item-analysis-legend span {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.item-analysis-legend i {
  width: 18px;
  height: 18px;
  background: var(--segment-color);
}

.item-analysis-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1380px) {
  .item-analysis-layout {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .item-analysis-legend {
    padding-top: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .item-analysis-legend > strong {
    flex: 1 0 100%;
  }
}

@media (max-width: 900px) {
  .item-analysis-title-row {
    grid-template-columns: 1fr;
  }

  .item-analysis-stat-head {
    display: none;
  }

  .item-analysis-row {
    padding: 10px 0;
    grid-template-columns: 1fr 44px 44px;
    min-height: 0;
  }

  .item-analysis-label,
  .item-analysis-bar {
    grid-column: 1 / -1;
  }

  .item-analysis-stat:nth-last-child(2) {
    grid-column: 2;
  }

  .item-analysis-stat:last-child {
    grid-column: 3;
  }

  .item-analysis-stat::before {
    color: var(--muted);
    font-size: 10px;
  }

  .item-analysis-stat:nth-last-child(2)::before {
    content: "M ";
  }

  .item-analysis-stat:last-child::before {
    content: "SD ";
  }
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.kpi {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.52);
}

.kpi span,
.kpi strong {
  display: block;
}

.kpi span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi strong {
  margin-top: 6px;
  color: var(--blue);
  font-size: 24px;
}

.network-kpi-row {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  position: relative;
  z-index: 20;
  overflow: visible;
}

.network-kpi-row .kpi {
  position: relative;
  padding: 9px 10px;
}

.network-kpi-row .kpi span {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
}

.network-kpi-row .kpi strong {
  margin-top: 4px;
  font-size: 20px;
}

.network-info-kpi .network-kpi-help {
  width: 15px;
  height: 15px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #244b73;
  background: rgba(47, 127, 211, 0.12);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: none;
}

.network-info-kpi em {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  z-index: 120;
  width: min(320px, 72vw);
  padding: 9px 10px;
  border: 1px solid rgba(47, 127, 211, 0.18);
  border-radius: 10px;
  color: #46566b;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 34px rgba(16, 32, 51, 0.18);
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: 0;
  text-transform: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.network-info-kpi:hover em,
.network-info-kpi:focus-within em {
  opacity: 1;
  transform: translateY(0);
}

.network-kpi-row .network-info-kpi:last-child em {
  right: 0;
  left: auto;
}

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

.scale-gauge-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 9px;
  background: rgba(255, 255, 255, 0.58);
}

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

.scale-gauge-card > div:first-child span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.scale-gauge {
  position: relative;
  width: min(190px, 100%);
  aspect-ratio: 2 / 1;
  justify-self: center;
  overflow: hidden;
  border-radius: 190px 190px 0 0;
  background: var(--gauge-bg);
}

.scale-gauge::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  aspect-ratio: 2 / 1;
  border-radius: 160px 160px 0 0;
  background: rgba(248, 251, 255, 0.96);
}

.gauge-needle {
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: 3px;
  height: 82%;
  border-radius: 999px;
  background: var(--ink);
  transform: translateX(-50%) rotate(var(--needle-angle));
  transform-origin: 50% 100%;
}

.gauge-center {
  position: absolute;
  left: 50%;
  bottom: -7px;
  z-index: 3;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: var(--ink);
  transform: translateX(-50%);
}

.matrix-gauge {
  width: 104px;
  height: 52px;
  aspect-ratio: auto;
}

.class-gauge {
  width: 108px;
  height: 54px;
  aspect-ratio: auto;
}

.class-gauge .gauge-center {
  width: 14px;
  height: 14px;
  bottom: -5px;
}

.class-gauge .gauge-needle {
  width: 2px;
}

.matrix-gauge .gauge-center {
  width: 14px;
  height: 14px;
  bottom: -5px;
}

.matrix-gauge .gauge-needle {
  width: 2px;
}

.result-table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.7);
}

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

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

.result-table th {
  color: var(--blue);
  background: rgba(232, 242, 252, 0.9);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.result-table th:not(:first-child),
.result-table td:not(:first-child) {
  width: 84px;
  text-align: right;
}

.cfa-table th:last-child,
.cfa-table td:last-child {
  width: auto;
  min-width: 170px;
  text-align: left;
}

.fit-cell {
  border-radius: 6px;
  font-weight: 800;
}

.fit-good {
  color: #1f6b45;
  background: rgba(40, 167, 112, 0.16);
}

.fit-acceptable {
  color: #2e7350;
  background: rgba(100, 190, 135, 0.12);
}

.fit-bad {
  color: #a23b35;
  background: rgba(214, 74, 58, 0.11);
}

.fit-missing {
  color: var(--muted);
  background: rgba(101, 124, 150, 0.08);
}

.apa-table th:nth-child(2),
.apa-table td:nth-child(2) {
  width: auto;
  text-align: left;
}

.table-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.scale-poles {
  margin: 0;
  color: #244b73;
  font-size: 13px;
  font-weight: 800;
  background: rgba(232, 242, 252, 0.72);
  border: 1px solid rgba(47, 127, 211, 0.16);
  border-radius: 8px;
  padding: 8px 10px;
}

.network-interactive-layout {
  position: relative;
  display: block;
}

html.network-focus-open,
body.network-focus-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.network-focus-open {
  touch-action: none;
}

.network-focus-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1998;
  border: 0;
  padding: 0;
  background: rgba(10, 18, 28, 0.36);
  cursor: default;
  animation: networkBackdropIn 180ms ease-out both;
}

.network-interactive-layout.network-expanded {
  position: fixed;
  inset: clamp(24px, 3.8vh, 44px) clamp(26px, 3.8vw, 58px);
  z-index: 1999;
  border-radius: 18px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
  transform-origin: center center;
  animation: networkFocusPop 260ms cubic-bezier(0.2, 0.82, 0.22, 1) both;
}

@keyframes networkFocusPop {
  from {
    opacity: 0.82;
    transform: scale(0.82) translateY(18px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes networkBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.network-heading-row {
  margin-top: 18px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.network-heading-row .result-heading {
  margin: 0;
}

.network-heading-row span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.network-centrality-title-row {
  margin-top: 18px;
  margin-bottom: 2px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: nowrap;
  min-height: 42px;
}

.network-centrality-title-row .result-heading {
  margin: 0;
}

.network-centrality-legend {
  display: flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: nowrap;
  flex: 1 1 520px;
  min-width: 0;
}

.network-centrality-legend > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.network-centrality-legend p {
  min-height: 24px;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: #59687d;
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
}

.network-centrality-legend.pinned p {
  color: #46566b;
  background: transparent;
}

.network-sort-button {
  width: 100%;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: inherit;
  background: transparent;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.network-sort-label {
  display: inline-grid;
  justify-items: end;
  gap: 2px;
}

.network-sort-main sub {
  font-size: 0.72em;
  vertical-align: sub;
  letter-spacing: 0;
  text-transform: none;
}

.network-sort-label small {
  color: #6d7e96;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.network-table th:first-child .network-sort-button {
  justify-content: flex-start;
}

.network-table th:first-child .network-sort-label {
  justify-items: start;
}

.network-sort-button:hover,
.network-sort-button:focus-visible,
.network-sort-button.active {
  color: #102033;
  outline: none;
}

.network-sort-indicator {
  width: 10px;
  min-width: 10px;
  color: var(--blue);
  font-size: 11px;
  line-height: 1;
}

.network-centrality-table th {
  vertical-align: middle;
  font-size: 10px;
  line-height: 1.12;
}

.network-centrality-table {
  table-layout: fixed;
}

.network-centrality-table th,
.network-centrality-table td {
  padding: 6px 4px;
  vertical-align: middle;
}

.network-centrality-table th:first-child,
.network-centrality-table td:first-child {
  width: 13.5%;
}

.network-centrality-table th:nth-child(2),
.network-centrality-table td:nth-child(2) {
  width: 5.2%;
}

.network-centrality-table th:nth-child(3),
.network-centrality-table td:nth-child(3) {
  width: 3.9%;
}

.network-centrality-table th:nth-child(4),
.network-centrality-table td:nth-child(4),
.network-centrality-table th:nth-child(5),
.network-centrality-table td:nth-child(5),
.network-centrality-table th:nth-child(6),
.network-centrality-table td:nth-child(6),
.network-centrality-table th:nth-child(7),
.network-centrality-table td:nth-child(7),
.network-centrality-table th:nth-child(8),
.network-centrality-table td:nth-child(8) {
  width: 6.1%;
}

.network-centrality-table th:nth-child(9),
.network-centrality-table td:nth-child(9),
.network-centrality-table th:nth-child(10),
.network-centrality-table td:nth-child(10),
.network-centrality-table th:nth-child(11),
.network-centrality-table td:nth-child(11),
.network-centrality-table th:nth-child(12),
.network-centrality-table td:nth-child(12) {
  width: 6.8%;
}

.network-centrality-table th:nth-child(13),
.network-centrality-table td:nth-child(13) {
  width: 4.7%;
}

.network-centrality-table th:nth-child(14),
.network-centrality-table td:nth-child(14) {
  width: 5.5%;
}

.network-centrality-table th:not(:first-child),
.network-centrality-table td:not(:first-child) {
  text-align: center;
}

.network-centrality-table td {
  font-size: 13px;
  line-height: 1.15;
  font-weight: 500;
}

.network-centrality-table td:nth-child(2) {
  font-size: 11px;
  line-height: 1.05;
}

.network-centrality-table .network-sort-button {
  justify-content: center;
}

.network-centrality-table th:first-child .network-sort-button {
  justify-content: flex-start;
}

.network-inline-help {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: inherit;
  cursor: help;
  text-decoration: none;
}

.network-inline-help sub {
  font-size: 0.72em;
  vertical-align: sub;
  letter-spacing: 0;
  text-transform: none;
}

.network-inline-help em {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 120;
  display: none;
  width: min(300px, 70vw);
  transform: translateX(-50%);
  padding: 9px 10px;
  border: 1px solid rgba(47, 127, 211, 0.22);
  border-radius: 10px;
  color: #46566b;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 36px rgba(16, 32, 51, 0.14);
  font-size: 11.5px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.32;
  letter-spacing: 0;
  text-transform: none;
  white-space: normal;
  pointer-events: none;
}

.network-inline-help:hover em,
.network-inline-help:focus-visible em {
  display: block;
}

.network-table th:last-child .network-inline-help em,
.network-signal-row span:last-child .network-inline-help em {
  right: 0;
  left: auto;
  transform: none;
}

.network-help-table-wrap {
  overflow: visible;
  position: relative;
  z-index: 20;
}

.network-longitudinal-panel {
  margin-top: 12px;
  border: 1px solid rgba(47, 127, 211, 0.18);
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(232, 242, 252, 0.72));
}

.network-longitudinal-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.network-timepoint-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.network-timepoint-card {
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.78);
}

.network-timepoint-card.active {
  border-color: rgba(47, 127, 211, 0.48);
  background: rgba(220, 238, 255, 0.78);
  box-shadow: 0 10px 24px rgba(47, 127, 211, 0.12);
}

.network-timepoint-card span,
.network-timepoint-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.network-timepoint-card strong {
  display: block;
  margin: 4px 0;
  color: var(--ink);
  font-size: 14px;
}

.network-subheading {
  margin: 14px 0 8px;
  color: #244b73;
  font-size: 14px;
  font-weight: 900;
}

.network-change-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 3px 9px;
  background: rgba(232, 242, 252, 0.9);
  color: #244b73;
  font-size: 12px;
  font-weight: 900;
}

.network-change-pill.cluster-change {
  background: rgba(242, 184, 75, 0.18);
  color: #8a5a09;
}

.network-change-pill.new {
  background: rgba(98, 181, 143, 0.2);
  color: #286247;
}

.network-change-pill.missing {
  background: rgba(217, 107, 107, 0.16);
  color: #8f2e2e;
}

.network-graph {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(232, 242, 252, 0.72));
  overflow: hidden;
  min-height: 0;
}

.network-expanded .network-graph {
  width: 100%;
  height: 100%;
  border-radius: 18px;
}

.network-graph svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(76vh, 820px);
  min-height: 520px;
  user-select: none;
  touch-action: none;
}

.network-graph svg.network-panzoom-ready {
  cursor: grab;
}

.network-graph svg.network-panzoom-ready.network-panning {
  cursor: grabbing;
}

.network-expanded .network-graph svg {
  height: 100%;
  max-height: none;
  min-height: 0;
  object-fit: contain;
}

.network-map-tools {
  position: absolute;
  right: 24px;
  bottom: 118px;
  z-index: 7;
  display: grid;
  gap: 8px;
}

.network-tool-button {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(47, 127, 211, 0.22);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--blue);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 28px rgba(16, 32, 51, 0.16);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
  cursor: pointer;
}

.network-tool-button:hover,
.network-tool-button:focus-visible {
  border-color: rgba(47, 127, 211, 0.45);
  background: rgba(232, 242, 252, 0.94);
  outline: none;
}

.network-tool-button svg {
  width: 18px;
  height: 18px;
}

.network-reset-zoom-button {
  color: #244b73;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0;
}

.network-close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 8;
  display: none;
}

.network-expanded .network-close-button {
  display: inline-grid;
}

.network-graph svg {
  image-rendering: auto;
  text-rendering: geometricPrecision;
}

.network-graph svg text {
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}

.network-graph svg [data-network-edge],
.network-graph svg [data-network-label-link] {
  vector-effect: non-scaling-stroke;
}

.network-graph svg [data-network-cluster],
.network-graph svg [data-network-edge] {
  transition: opacity 160ms ease, filter 160ms ease;
}

.network-graph svg.network-cluster-focused .network-muted-cluster,
.network-graph svg.network-node-focused .network-muted-cluster {
  opacity: 0.24;
  filter: grayscale(0.95) saturate(0.35);
}

.network-graph svg.network-cluster-focused [data-network-edge].network-muted-cluster,
.network-graph svg.network-node-focused [data-network-edge].network-muted-cluster {
  opacity: 0.12;
}

.network-graph svg.network-cluster-focused .network-active-cluster,
.network-graph svg.network-node-focused .network-active-cluster {
  opacity: 1;
  filter: drop-shadow(0 8px 12px rgba(16, 32, 51, 0.2));
}

.network-graph svg [data-network-role="node"] {
  cursor: pointer;
  pointer-events: auto;
}

.network-graph svg .network-selected-node circle {
  stroke: #111827;
  stroke-width: 5;
}

.network-graph svg .network-strong-contact circle {
  stroke: #2f7fd3;
  stroke-width: 5;
}

.network-graph svg .network-weak-contact circle {
  stroke: #f2b84b;
  stroke-width: 5;
  stroke-dasharray: 4 3;
}

.network-graph svg [data-network-edge].network-strong-contact {
  stroke: #2f7fd3;
  stroke-opacity: 0.72;
}

.network-graph svg [data-network-edge].network-weak-contact {
  stroke: #f2b84b;
  stroke-dasharray: 7 5;
  stroke-opacity: 0.7;
}

.network-cluster-controls {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 4;
  width: auto;
  border: 1px solid rgba(109, 126, 150, 0.18);
  border-radius: 10px;
  padding: 8px 10px;
  display: grid;
  align-content: start;
  gap: 7px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(16, 32, 51, 0.12);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  max-height: none;
  overflow: visible;
}

.network-cluster-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.network-cluster-all {
  min-height: 28px;
  border: 1px solid rgba(47, 127, 211, 0.24);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--blue);
  background: rgba(232, 242, 252, 0.74);
  font-weight: 880;
  font-size: 12px;
  cursor: pointer;
}

.network-cluster-knobs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.network-signal-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.network-signal-button {
  min-height: 28px;
  border: 1px solid rgba(47, 127, 211, 0.2);
  border-radius: 999px;
  padding: 0 10px;
  color: #244b73;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 16px rgba(16, 32, 51, 0.08);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.network-signal-button.isolate {
  border-color: rgba(217, 107, 107, 0.28);
  color: #8f2e2e;
  background: rgba(217, 107, 107, 0.11);
}

.network-signal-button.bridge {
  border-color: rgba(98, 181, 143, 0.32);
  color: #286247;
  background: rgba(98, 181, 143, 0.13);
}

.network-signal-button.active {
  outline: 3px solid rgba(16, 32, 51, 0.14);
  background: rgba(232, 242, 252, 0.9);
  transform: translateY(-1px);
}

.network-cluster-knob {
  width: 29px;
  height: 29px;
  border: 2px solid color-mix(in srgb, var(--cluster-color) 72%, #ffffff);
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: var(--cluster-color);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--cluster-color) 25%, transparent);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.network-cluster-all.active,
.network-cluster-knob.active {
  outline: 3px solid rgba(16, 32, 51, 0.18);
  transform: translateY(-1px);
}

.network-cluster-name-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
}

.network-cluster-name-field {
  border: 1px solid color-mix(in srgb, var(--cluster-color) 24%, rgba(109, 126, 150, 0.2));
  border-radius: 9px;
  padding: 6px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cluster-color) 10%, #ffffff), rgba(255, 255, 255, 0.78));
}

.network-cluster-name-field span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.network-cluster-name-field input {
  width: 100%;
  min-height: 28px;
  border: 1px solid rgba(109, 126, 150, 0.22);
  border-radius: 8px;
  padding: 0 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.8);
  font-weight: 780;
}

@media (max-width: 980px) {
  .network-cluster-controls {
    position: static;
    width: 100%;
    margin-top: 8px;
    max-height: none;
  }

  .network-graph svg {
    min-height: 360px;
    max-height: none;
  }

  .network-map-tools {
    right: 14px;
    bottom: 14px;
  }
}

.network-table:not(.network-centrality-table) th:nth-child(3),
.network-table:not(.network-centrality-table) td:nth-child(3) {
  width: auto;
  text-align: left;
}

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

.network-signal-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.76);
}

.network-signal-card h4 {
  margin: 0 0 8px;
  color: var(--ink);
}

.network-signal-card p,
.network-signal-card ul {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.network-signal-card ul {
  padding-left: 18px;
  margin-top: 10px;
}

.network-signal-list {
  margin-top: 10px;
  display: grid;
  gap: 3px;
  color: #59687d;
  font-size: 12px;
}

.network-signal-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(42px, 0.55fr) minmax(64px, 0.8fr) minmax(52px, 0.65fr);
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

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

.network-signal-head {
  color: #6d7e96;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.network-signal-name {
  color: #102033;
  font-weight: 900;
}

.muted-line {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.survey-card {
  width: min(760px, 100%);
  padding: 24px;
  justify-self: center;
}

.survey-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.student-form {
  margin-top: 20px;
  display: grid;
  gap: 20px;
}

.privacy-notice {
  border: 1px solid rgba(47, 127, 211, 0.2);
  border-radius: 8px;
  padding: 12px 14px;
  display: grid;
  gap: 5px;
  background: rgba(232, 242, 252, 0.72);
  color: var(--ink);
  font-size: 13px;
}

.privacy-notice strong,
.privacy-notice span,
.privacy-notice a {
  display: block;
}

.privacy-notice a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.student-question {
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0 0 18px;
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.student-question:last-of-type {
  border-bottom: 0;
}

.student-question legend {
  padding: 0;
  font-weight: 800;
}

.peer-context-builder {
  gap: 14px;
}

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

.peer-group-card {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.peer-group-card legend {
  padding: 0 6px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.peer-roster-options {
  max-height: 220px;
  overflow: auto;
  display: grid;
  gap: 6px;
  padding-right: 4px;
}

.peer-roster-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(47, 127, 211, 0.12);
  border-radius: 8px;
  padding: 7px 8px;
  color: var(--ink);
  background: rgba(232, 242, 252, 0.34);
  font-size: 13px;
  font-weight: 750;
}

.radio-scale {
  display: grid;
  grid-template-columns: repeat(var(--scale-count, 5), minmax(52px, 1fr));
  gap: 8px;
}

.radio-scale label {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: clamp(10px, 1.4vw, 13px);
  line-height: 1.14;
  overflow-wrap: anywhere;
  hyphens: auto;
}

.student-construct {
  display: grid;
  gap: 14px;
}

.student-construct h2 {
  margin: 0;
  font-size: 18px;
}

.radio-scale input {
  position: absolute;
  opacity: 0;
}

.radio-scale label:has(input:checked) {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.custom-free-answer {
  width: 100%;
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  resize: vertical;
}

.student-observation-note {
  margin-top: 9px;
  display: grid;
  grid-template-columns: minmax(74px, 0.42fr) minmax(98px, 0.58fr) minmax(0, 1.3fr);
  gap: 7px;
}

.student-observation-note input {
  min-width: 0;
}

.success {
  border-radius: 8px;
  padding: 16px;
  background: rgba(224, 239, 252, 0.9);
  color: var(--blue);
  font-weight: 850;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .custom-construct-popover {
    top: 92px;
    left: 12px;
    right: 12px;
    max-height: calc(100vh - 110px);
  }

  .custom-construct-popover::before {
    display: none;
  }

  .custom-item-composer,
  .custom-construct-head {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    height: auto;
    overflow: visible;
  }

  .builder-grid,
  .setup-grid,
  .home-grid,
  .profile-grid,
  .analysis-grid,
  .analysis-detail-grid,
  .class-dashboard-layout,
  .standards-grid,
  .host-csv-filters,
  .publish-panel,
  .publish-content {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .profile-status,
  .file-card {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .profile-status.has-profile {
    grid-template-columns: 1fr;
  }

  .class-dashboard-side {
    position: static;
  }

  .matrix-tab-button {
    min-height: 54px;
  }

  .meta-profile-row,
  .meta-form-grid .meta-smiley-row,
  .meta-class-row,
  .meta-subject-row {
    grid-column: 1;
    grid-row: auto;
  }

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

  .matrix-area-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .class-category-grid {
    grid-template-columns: repeat(2, minmax(170px, 1fr));
  }

  .profile-status-center {
    text-align: left;
  }

  .profile-status-actions.stacked {
    justify-self: stretch;
  }

  .profile-dashboard-links {
    width: 100%;
  }

  .analysis-header,
  .builder-global-header,
  .home-hero,
  .student-global-header {
    flex-wrap: wrap;
  }

  .home-product-title {
    position: static;
    transform: none;
    flex: 1 1 100%;
    order: 3;
    white-space: normal;
  }

  .builder-global-header > h1,
  .builder-global-header .page-title-with-mark > h1,
  .student-global-header h1,
  .analysis-header h1 {
    position: static;
    transform: none;
    flex: 1 1 100%;
    order: 3;
    white-space: normal;
    pointer-events: auto;
  }

  .builder-global-header .topbar-actions,
  .home-hero-actions {
    margin-left: 0;
  }

  .meta-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .workspace,
  .sidebar {
    padding: 18px 14px;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .topbar-actions,
  .data-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .primary-button,
  .secondary-button {
    flex: 1 1 180px;
  }

  .analysis-shell {
    padding: 18px 14px;
  }

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

  .scale,
  .radio-scale {
    grid-template-columns: repeat(var(--scale-count, 5), minmax(38px, 1fr));
  }

  .matrix-area-grid {
    grid-template-columns: 1fr;
  }

  .class-category-grid,
  .class-filter-row {
    grid-template-columns: 1fr;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #111827;
    overflow: visible;
  }

  .student-profile-shell {
    padding: 0;
    gap: 12px;
  }

  .student-profile-shell .analysis-header,
  .student-profile-actions,
  .student-profile-section-nav,
  .student-profile-floating-nav,
  .student-profile-mode-switch,
  .section-top-button {
    display: none;
  }

  .student-profile-shell .panel,
  .student-profile-dossier,
  .student-profile-category,
  .student-profile-longitudinal-card {
    border-color: #d8dee8;
    box-shadow: none;
    break-inside: avoid;
    background: #ffffff;
  }

  .student-profile-grid,
  .student-profile-dossier,
  .student-profile-category-grid,
  .student-profile-longitudinal {
    grid-template-columns: 1fr 1fr;
  }

  .student-profile-header {
    grid-template-columns: 1fr;
    grid-template-areas: "identity";
    padding: 8px 0;
  }

  .student-profile-dossier {
    grid-template-columns: 1fr;
  }

  .student-profile-chart-wrap,
  .student-profile-development-chart,
  .student-profile-development-svg {
    min-height: 360px;
    height: auto;
  }

  .student-profile-grade-box,
  .student-profile-grid > aside,
  .student-profile-observation-list {
    max-height: none;
    min-height: 0;
    overflow: visible;
  }
}

/* Responsive desktop scale: keeps the full application usable on 13-14 inch screens. */
html {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 1440px), (max-height: 850px) {
  .home-shell,
  .profile-shell,
  .analysis-shell {
    padding: 14px 16px;
    gap: 12px;
  }

  .home-hero,
  .analysis-header,
  .builder-global-header,
  .student-global-header {
    min-height: 58px;
    gap: 8px;
  }

  .home-hero .home-product-title {
    max-width: 340px;
    font-size: 28px;
    line-height: 1;
  }

  .builder-global-header > h1,
  .builder-global-header .page-title-with-mark > h1,
  .student-global-header h1,
  .analysis-header h1 {
    font-size: 26px;
  }

  .builder-global-header .page-title-with-mark > h1 {
    flex: 0 1 auto;
    font-size: 26px;
  }

  .page-title-with-mark > h1,
  .builder-global-header > h1,
  .student-global-header > h1 {
    margin-left: 10px;
  }

  .brand-mark {
    width: 70px;
    height: 36px;
    padding-inline: 6px;
  }

  .global-nav {
    gap: 4px;
  }

  .nav-button {
    width: 106px;
    flex-basis: 106px;
    min-width: 44px;
    height: 38px;
    padding-inline: 6px;
    gap: 4px;
    font-size: 8.5px;
  }

  .nav-button[href="index.html"] {
    width: 82px;
    flex-basis: 82px;
  }

  .nav-button[href="analysis.html"] {
    width: 118px;
    flex-basis: 118px;
  }

  .nav-button svg {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    flex-basis: 16px;
  }

  .school-year-control {
    min-width: 108px;
    width: 108px;
    min-height: 36px;
    grid-template-columns: max-content;
  }

  .top-profile-menu {
    width: 38px;
    height: 38px;
  }

  .profile-status {
    padding: 11px 13px;
  }

  .profile-status.has-profile {
    grid-template-columns: 92px minmax(0, 1fr) 82px;
  }

  .profile-quick-actions {
    width: 82px;
    min-width: 0;
  }

  .profile-soft-action {
    width: 100%;
    min-width: 0;
    padding-inline: 4px;
    font-size: 8px;
    white-space: normal;
  }

  .home-hero-actions .secondary-button {
    min-height: 38px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .school-year-timeline {
    min-height: 104px;
    padding: 8px 12px 9px;
  }

  .timeline-break-list {
    margin-top: 6px;
  }

  .home-grid {
    gap: 10px;
  }

  .home-action-stack {
    gap: 8px;
  }

  .home-action-stack .home-action {
    min-height: 102px;
    height: 102px;
    padding: 12px;
    font-size: 16px;
  }

  .home-grid > .home-action {
    min-height: 102px;
    height: 102px;
    padding: 12px;
    font-size: 16px;
  }

  .home-action svg {
    width: 27px;
    height: 27px;
  }

  .home-footer {
    padding-block: 8px;
  }

  .app-shell {
    grid-template-columns: 270px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  .builder-global-header {
    min-height: 58px;
    padding: 14px 16px 0;
    gap: 8px;
  }

  .sidebar {
    min-height: calc(100vh - 72px);
    height: calc(100vh - 72px);
    padding: 12px;
    gap: 9px;
  }

  .workspace {
    padding: 11px 13px;
    gap: 10px;
  }

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

  .builder-grid {
    grid-template-columns: minmax(220px, 0.48fr) minmax(0, 1.52fr);
    gap: 10px;
  }

  .panel,
  .publish-panel {
    padding: 11px;
  }

  .builder-panel,
  .preview-panel {
    max-height: calc(100vh - 308px);
  }

  .analysis-grid,
  .analysis-detail-grid {
    grid-template-columns: minmax(0, 1fr) minmax(285px, 0.48fr);
    gap: 12px;
  }

  .class-picker-grid {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 0.3fr);
  }

  .class-category-grid {
    gap: 9px;
  }

  .class-category-panel {
    padding: 10px;
  }

  .class-category-panel h2 {
    font-size: 20px;
  }

  .class-category-panel .metric {
    padding: 4px 7px;
    font-size: 10px;
  }

  .class-scale-card {
    padding: 9px;
  }

  .planning-shell {
    --planning-label-width: 92px;
  }

  .planning-tool-grid {
    padding: 8px;
  }
}

@media (max-width: 1180px) {
  .home-hero,
  .page-title-with-mark,
  .builder-global-header,
  .student-global-header {
    flex-wrap: wrap;
  }

  .home-product-title,
  .builder-global-header > h1,
  .student-global-header h1,
  .analysis-header h1 {
    order: 20;
    flex: 1 1 100%;
    white-space: normal;
  }

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

  .profile-status.has-profile,
  .profile-status:not(.has-profile) {
    grid-template-columns: minmax(180px, 0.42fr) minmax(0, 1fr);
  }

  .profile-quick-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-self: end;
  }

  .app-shell {
    grid-template-columns: 235px minmax(0, 1fr);
  }

  .setup-grid,
  .analysis-grid,
  .analysis-detail-grid,
  .profile-grid,
  .standards-grid {
    grid-template-columns: 1fr;
  }

  .builder-panel,
  .preview-panel {
    max-height: none;
  }

  .class-category-grid {
    grid-template-columns: repeat(3, minmax(160px, 1fr));
  }

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

  .class-picker-summary {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .class-carryover-overlay {
    padding: 12px;
  }

  .class-carryover-dialog {
    width: calc(100vw - 24px);
    padding: 16px;
  }

  .class-carryover-table {
    grid-template-columns: 1fr;
  }

  .class-carryover-label.transfer-label,
  .class-carryover-arrow {
    display: none;
  }

  .home-shell,
  .profile-shell,
  .analysis-shell {
    padding: 10px;
  }

  .home-grid,
  .profile-status.has-profile,
  .profile-status:not(.has-profile),
  .class-category-grid {
    grid-template-columns: 1fr;
  }

  .class-picker-classes,
  .matrix-class-picker {
    grid-template-columns: 1fr;
  }

  .class-picker-left,
  .class-picker-classes .dashboard-class-picker-box,
  .class-picker-classes > .dashboard-detail-row {
    grid-column: 1;
    grid-row: auto;
  }

  .class-picker-classes .dashboard-class-picker-box {
    grid-template-columns: 1fr;
  }

  .class-picker-classes .panel-head,
  .class-picker-classes .dashboard-class-picker-box,
  .class-picker-classes > .dashboard-detail-row,
  .matrix-class-picker > label,
  .matrix-class-chips,
  .matrix-class-picker .dashboard-detail-row {
    grid-column: 1;
  }

  .dashboard-detail-row {
    align-items: stretch;
    flex-direction: column;
    flex-wrap: wrap;
  }

  .dashboard-detail-row .dashboard-matrix-link,
  .dashboard-detail-row .dashboard-classroom-link,
  .dashboard-detail-row .class-ai-analysis-button {
    width: 100%;
  }

  .standard-instrument-popover {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto !important;
    width: auto;
  }

  .standard-instrument-popover-card::before {
    display: none;
  }

  .home-action-stack .home-action {
    min-height: 86px;
    height: 86px;
  }

  .home-grid > .home-action {
    min-height: 86px;
    height: 86px;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    height: auto;
    min-height: 0;
    max-height: 46vh;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .construct-list {
    max-height: 31vh;
  }

  .class-picker-grid,
  .planning-class-hub,
  .planning-active-class-area {
    grid-template-columns: 1fr;
  }

  .planning-dashboard-links {
    justify-content: flex-start;
  }

  .planning-canvas-toolbar {
    grid-template-columns: 1fr;
  }

  .planning-detail-survey.planning-detail-grid {
    grid-template-columns: minmax(0, 1fr) 29px 29px;
  }

  .grade-sheet-row.exam-grade-row,
  .grade-sheet-row.other-grade-row {
    grid-template-columns: repeat(3, minmax(32px, 1fr));
  }

  .grade-sheet-row.other-grade-row {
    grid-template-columns: repeat(6, minmax(32px, 1fr));
  }

  .grade-sheet-row > span {
    grid-column: 1 / -1;
  }
}
