:root {
  --ink: #17201b;
  --muted: #5d675f;
  --line: #d9dfd8;
  --paper: #f7f5ef;
  --surface: #ffffff;
  --surface-2: #eef3ef;
  --green: #1f6f55;
  --green-dark: #184f3f;
  --blue: #275d8c;
  --red: #9d3f35;
  --gold: #b77d22;
  --violet: #6053a8;
  --label-ink: #050706;
  --label-halo: #f7f5f0;
  --node-stroke: #ffffff;
  --shadow: 0 18px 45px rgba(33, 44, 37, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    linear-gradient(120deg, rgba(31, 111, 85, 0.08), transparent 42%),
    linear-gradient(180deg, #fbfaf6 0%, var(--paper) 100%);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 28px;
  background: rgba(247, 245, 239, 0.88);
  border-bottom: 1px solid rgba(23, 32, 27, 0.1);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--green-dark);
  border-radius: 8px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

nav a {
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 6px;
  text-decoration: none;
}

nav a:hover {
  color: var(--ink);
  background: rgba(31, 111, 85, 0.09);
}

main {
  width: min(1560px, 100%);
  margin: 0 auto;
  padding: 0 28px 64px;
}

.full-section {
  min-height: calc(100vh - 68px);
  margin-top: 28px;
  scroll-margin-top: 82px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 28px;
  align-items: end;
  min-height: calc(100vh - 92px);
  padding: 42px;
  background:
    linear-gradient(120deg, rgba(24, 79, 63, 0.88), rgba(39, 93, 140, 0.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='620' viewBox='0 0 1400 620'%3E%3Cg fill='none' stroke='%23f7f5ef' stroke-opacity='.28'%3E%3Cpath d='M40 500 C240 380 300 170 500 250 S780 570 980 350 1230 120 1360 210'/%3E%3Cpath d='M80 130 C270 250 430 90 610 190 S830 410 1080 260 1240 330 1340 450'/%3E%3Cpath d='M200 540 L340 380 L470 430 L610 240 L760 300 L930 160 L1120 250 L1300 90'/%3E%3C/g%3E%3Cg fill='%23f7f5ef' fill-opacity='.78'%3E%3Ccircle cx='340' cy='380' r='5'/%3E%3Ccircle cx='610' cy='240' r='6'/%3E%3Ccircle cx='930' cy='160' r='5'/%3E%3Ccircle cx='1120' cy='250' r='7'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
  border: 1px solid rgba(23, 32, 27, 0.08);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.landing-section {
  margin-top: 24px;
}

.hero-copy {
  color: #fff;
  max-width: 830px;
}

.eyebrow {
  margin: 0 0 8px;
  color: color-mix(in srgb, currentColor 68%, transparent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  max-width: 100%;
  font-size: clamp(32px, 4.1vw, 64px);
  line-height: 1.04;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero h1 span {
  display: inline-block;
  animation: titleReveal 900ms cubic-bezier(.2, .8, .2, 1) both;
}

.hero-intro {
  animation: copyReveal 900ms ease both;
  animation-delay: 260ms;
}

@keyframes titleReveal {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes copyReveal {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.8;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-metrics div {
  min-height: 112px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  color: #fff;
  backdrop-filter: blur(8px);
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  font-size: 38px;
  line-height: 1;
}

.hero-metrics span {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.74);
}

.course-intro {
  display: grid;
  align-content: center;
  gap: 22px;
}

.course-intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--line);
  box-shadow: 0 10px 28px rgba(33, 44, 37, 0.08);
}

.course-intro-grid section {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 260px;
  padding: 22px;
  background: #fff;
}

.course-intro-grid h3 {
  margin: 0;
  font-size: 22px;
}

.course-intro-grid ul,
.course-intro-grid ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions,
.path-next-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.student-panel,
.path-panel,
.graph-panel,
.learning-panel,
.assignment-panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(33, 44, 37, 0.08);
}

.student-panel {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 18px;
  padding: 20px;
}

.student-identity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.student-identity-grid label span {
  font-size: 14px;
}

.panel-title h2,
.section-head h2 {
  margin: 0;
  font-size: 22px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.student-panel label span {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.45;
}

textarea,
select,
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  line-height: 1.55;
  outline: none;
}

textarea:focus,
select:focus,
input[type="text"]:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31, 111, 85, 0.12);
}

.profile-buttons,
.intake-actions,
.segmented,
.graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-buttons button,
.segmented button,
.ghost-action,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  font-weight: 800;
}

.intake-actions {
  align-items: center;
}

.profile-buttons button.is-active,
.segmented button.is-active,
.ghost-action.is-active {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}

.primary-action {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}

.ghost-action.on-dark {
  border-color: rgba(255, 255, 255, .42);
  background: rgba(255, 255, 255, .12);
  color: #fff;
}

.intake-section {
  display: grid;
  grid-template-columns: minmax(320px, .82fr) minmax(420px, 1.18fr);
  gap: 22px;
  align-items: stretch;
}

.intake-copy,
.student-panel {
  align-self: stretch;
}

.intake-section .student-panel {
  position: static;
  top: auto;
}

.intake-copy {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(31, 111, 85, .09), rgba(183, 125, 34, .08)),
    #fff;
  box-shadow: 0 10px 28px rgba(33, 44, 37, 0.08);
}

.intake-copy h2 {
  margin: 0;
  max-width: 700px;
  font-size: clamp(30px, 4vw, 58px);
  line-height: 1.08;
}

.intake-copy > p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.rule-panel {
  padding: 18px;
  border: 1px solid rgba(31, 111, 85, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .72);
}

.rule-panel h3 {
  margin: 0 0 10px;
  font-size: 18px;
}

.rule-panel ol {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.75;
}

.rule-panel li + li {
  margin-top: 6px;
}

.path-insight {
  padding: 14px;
  border: 1px solid rgba(31, 111, 85, 0.18);
  border-radius: 8px;
  background: var(--surface-2);
}

.path-insight h3 {
  margin: 0 0 8px;
  font-size: 15px;
}

.path-insight p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.keyword-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(31, 111, 85, 0.18);
  border-radius: 8px;
  background: #fff;
}

.keyword-panel h3 {
  margin: 0;
  font-size: 15px;
}

.keyword-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.keyword-head span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.keyword-head span.is-ready {
  color: var(--green-dark);
  font-weight: 700;
}

.keyword-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.keyword-chip {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfa;
  color: var(--ink);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
}

.keyword-chip.is-active {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
}

.empty-state {
  grid-column: 1 / -1;
  color: var(--muted);
}

.main-panel {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.section-head p:not(.eyebrow) {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.path-status {
  min-width: 82px;
  padding: 9px 12px;
  border: 1px solid rgba(31, 111, 85, 0.22);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--green-dark);
  text-align: center;
  font-weight: 900;
}

.path-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.path-card {
  display: grid;
  gap: 12px;
  min-height: 260px;
  padding: 16px;
  background: #fff;
}

.path-card h3 {
  margin: 0;
  font-size: 16px;
}

.path-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 13px;
}

.unit-chip-list {
  display: grid;
  gap: 7px;
}

.path-next-actions {
  justify-content: flex-end;
  margin: 0;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
  background: #fbfcfa;
}

.unit-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  width: 100%;
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcfa;
  padding: 8px;
  text-align: left;
}

.unit-chip.is-active {
  border-color: var(--gold);
  background: #fff7e6;
}

.unit-chip.is-done {
  border-color: rgba(31, 111, 85, 0.35);
  background: #edf6f0;
}

.unit-chip b {
  color: var(--green-dark);
}

.unit-chip span {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.4;
}

.unit-chip small {
  display: block;
  margin-top: 4px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

.detail-open-unit {
  margin-top: 12px;
}

.meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meta-grid span {
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.graph-panel {
  overflow: hidden;
  background: #f6f4ef;
}

.graph-head {
  padding: 13px 18px 10px;
  background: #fcfbf7;
}

.graph-head .eyebrow {
  color: #2f604f;
  text-transform: none;
}

.graph-head h2 {
  font-size: 20px;
  font-weight: 500;
}

.graph-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(252, 251, 247, 0.92);
}

.graph-toolbar-left,
.graph-toolbar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.graph-toolbar-left > .segmented:first-child {
  margin-right: 8px;
}

.graph-depth-select {
  width: auto;
  min-width: 126px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 6px 34px 6px 10px;
  font-size: 13px;
  font-weight: 650;
}

.graph-toolbar .segmented button,
.graph-toolbar .ghost-action {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 7px;
  font-size: 13px;
}

.student-graph-shell {
  display: grid;
  grid-template-columns: minmax(180px, var(--student-outline-width, 260px)) 7px minmax(0, 1fr);
  min-height: 680px;
  height: min(86vh, 920px);
  background: #f7f5f0;
}

.student-map-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.student-outline-panel {
  min-width: 0;
  overflow: auto;
  border-right: 1px solid var(--line);
  background: rgba(255, 254, 250, 0.94);
}

.student-column-resizer {
  position: relative;
  cursor: col-resize;
  background: linear-gradient(90deg, transparent, rgba(47, 96, 79, 0.12), transparent);
}

.student-column-resizer::after {
  content: "";
  position: absolute;
  inset: 0 2px;
  border-radius: 999px;
}

.student-column-resizer:hover::after,
.student-column-resizer.is-dragging::after {
  background: rgba(47, 96, 79, 0.28);
}

.student-panel-head {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  background: #fcfbf7;
}

.student-panel-head p {
  margin: 0 0 5px;
  color: #2f604f;
  font-size: 12px;
  font-weight: 700;
}

.student-panel-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.25;
}

.student-outline-tree {
  display: grid;
  gap: 1px;
  padding: 6px 7px 12px;
}

.student-outline-title {
  min-width: 0;
  min-height: 24px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  padding: 3px 6px 3px calc(8px + (var(--depth) - 1) * 15px);
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 300;
  line-height: 1.15;
}

.student-outline-title::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--outline-fill, #2f604f);
  border: 0;
  vertical-align: 1px;
}

.student-outline-title.is-level-2::before {
  border-radius: 2px;
}

.student-outline-title.is-level-3::before {
  border-radius: 1px;
  transform: rotate(45deg);
}

.student-outline-title.is-level-4::before {
  background: transparent;
  border: 2px solid var(--outline-fill, #2f604f);
}

.student-outline-title.is-level-5::before {
  width: 5px;
  height: 5px;
}

.student-outline-title.is-path::before {
  background: var(--gold);
  border-color: var(--gold);
}

.student-outline-title:hover {
  background: #edf1ed;
}

.student-outline-title.is-active {
  background: #e8f0ec;
  color: #2f604f;
  box-shadow: inset 3px 0 0 #2f604f;
}

.graph-wrap {
  position: relative;
  height: auto;
  min-height: 0;
  background: #f7f5f0;
}

#flatGraph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

#flatGraph {
  cursor: grab;
}

#flatGraph:active {
  cursor: grabbing;
}


.graph-link {
  fill: none;
  stroke: rgba(47, 96, 79, 0.36);
  stroke-opacity: 1;
  stroke-width: 0.82;
  stroke-linecap: round;
}

.graph-link.is-path {
  stroke: var(--gold);
  stroke-width: 1.7;
  stroke-opacity: 0.78;
}

.graph-link.is-path-unit-link {
  stroke: rgba(183, 125, 34, 0.74);
  stroke-width: 1.25;
  stroke-opacity: 0.72;
}

.graph-link.is-path-unit-anchor {
  stroke: rgba(183, 125, 34, 0.42);
  stroke-width: 0.78;
  stroke-opacity: 0.52;
}

.graph-cluster-label {
  font-size: 15px;
  font-weight: 900;
  paint-order: stroke;
  stroke: #fdfcf8;
  stroke-width: 4px;
  pointer-events: none;
}

.graph-link.is-background {
  stroke: rgba(67, 103, 89, 0.68);
  stroke-width: 0.48;
  stroke-opacity: 0.14;
}

.sphere-guides {
  pointer-events: none;
}

.sphere-guide {
  fill: none;
  stroke: rgba(73, 119, 103, 0.22);
  stroke-width: 0.82;
  stroke-dasharray: 2 7;
}

.sphere-guide.middle {
  stroke-opacity: 0.2;
}

.sphere-guide.inner {
  stroke-opacity: 0.16;
}

.graph-node {
  cursor: pointer;
}

.graph-dot {
  fill: var(--node-fill, #2f725f);
  stroke: var(--node-stroke);
  stroke-width: 2.6;
  filter: drop-shadow(0 2px 6px rgba(26, 47, 60, 0.15));
}

.graph-node.is-path .graph-dot {
  fill: var(--gold);
  stroke: #fff;
  stroke-width: 2.6;
}

.graph-node.is-path-anchor .graph-dot {
  stroke: rgba(190, 128, 28, 0.72);
  stroke-width: 2.2;
}

.graph-node.is-path .graph-path-unit {
  fill: #c98b24;
  stroke: #fffaf0;
  stroke-width: 2.8;
}

.graph-square,
.graph-diamond {
  stroke-width: 2.4;
}

.graph-node.is-muted {
  opacity: 0.36;
}

.graph-label {
  fill: var(--label-ink);
  font-size: 9.5px;
  font-weight: 300;
  paint-order: stroke;
  stroke: var(--label-halo);
  stroke-width: 4px;
  stroke-linejoin: round;
  dominant-baseline: middle;
  pointer-events: none;
}

.graph-label.is-path {
  font-size: 9px;
  font-weight: 700;
  fill: #5f4415;
  stroke-width: 3px;
}

.graph-label.is-muted {
  opacity: 0.42;
}


.graph-node path,
.graph-node rect,
.graph-node circle {
  pointer-events: all;
}


.load-error {
  margin: 12px 0;
  padding: 14px 16px;
  border: 1px solid rgba(157, 63, 53, 0.28);
  border-radius: 7px;
  background: #fff3ef;
  color: #7b312a;
}

.load-error h3,
.load-error p {
  margin: 0 0 8px;
}

.graph-detail {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: min(360px, calc(100% - 32px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.detail-close {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 17px;
  line-height: 1;
}

.match-note {
  margin-top: 10px !important;
  color: var(--gold) !important;
  font-size: 13px;
  font-weight: 800;
}

.graph-detail h3,
.unit-study h3,
.assignment-panel h3 {
  margin: 0 0 8px;
  font-size: 18px;
}

.graph-detail p,
.unit-study p,
.assignment-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.unit-study {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 520px;
}

.unit-list {
  border-right: 1px solid var(--line);
  background: #fbfcfa;
  max-height: 720px;
  overflow: auto;
}

.unit-list button {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 12px;
  text-align: left;
}

.unit-list button.is-active {
  background: #fff7e6;
}

.unit-list button span {
  color: var(--muted);
  font-size: 12px;
}

.study-content {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.study-content article {
  display: grid;
  gap: 14px;
}

.study-content h4 {
  margin: 0;
  font-size: 15px;
}

.study-box {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.study-box pre {
  margin: 0;
  white-space: pre-wrap;
  color: var(--muted);
  font-family: inherit;
  line-height: 1.7;
}

.answer-panel {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(31, 111, 85, 0.2);
  border-radius: 8px;
  background: #f6faf6;
}

.answer-panel h4 {
  margin: 0;
}

.answer-panel textarea {
  min-height: 120px;
}

.question-list {
  display: grid;
  gap: 12px;
}

.question-card {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.question-card legend,
.question-card > span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
}

.question-card label {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.55;
}

.question-card input {
  margin-top: 4px;
}

.question-card textarea {
  min-height: 86px;
}

.mastery-check {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.mastery-check legend {
  width: 100%;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mastery-check label {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.assignment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1px;
  background: var(--line);
}

.stage-list,
.rubric-table {
  display: grid;
  gap: 1px;
  background: var(--line);
}

.stage-item,
.rubric-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  background: #fff;
}

.rubric {
  background: #fff;
  padding: 18px;
}

.rubric h3 {
  margin-bottom: 14px;
}

.stage-num {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--green-dark);
  color: #fff;
  font-weight: 900;
}

.rubric-percent {
  color: var(--red);
  font-weight: 900;
}

.submission-panel {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(31, 111, 85, .22);
  border-radius: 8px;
  background: #f6faf6;
}

.submission-panel input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px dashed rgba(31, 111, 85, .35);
  border-radius: 8px;
  background: #fff;
}

.current-submission {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(31, 111, 85, .2);
  border-radius: 8px;
  background: #fff;
}

.current-submission strong,
.current-submission span {
  display: block;
}

.current-submission span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.danger-action {
  border-color: rgba(157, 63, 53, .28);
  color: var(--red);
  background: #fff8f5;
}

.submit-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.submit-status.is-success {
  color: var(--green-dark);
  font-weight: 800;
}

.unit-page {
  width: min(1320px, 100%);
  padding-top: 24px;
}

.unit-page-shell {
  display: grid;
  gap: 20px;
}

.unit-hero-card,
.unit-side-panel,
.unit-main-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 28px rgba(33, 44, 37, 0.08);
}

.unit-hero-card {
  display: grid;
  gap: 14px;
  padding: 34px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(31, 111, 85, 0.12), rgba(39, 93, 140, 0.08) 48%, rgba(183, 125, 34, 0.08)),
    #fffdfa;
}

.unit-hero-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.unit-hero-topline > span {
  padding: 6px 10px;
  border: 1px solid rgba(31, 111, 85, .2);
  border-radius: 8px;
  color: var(--green-dark);
  background: rgba(255, 255, 255, .72);
  font-size: 13px;
  font-weight: 800;
}

.unit-hero-card h1 {
  margin: 0;
  max-width: 980px;
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 1.16;
}

.unit-hero-card p {
  max-width: 980px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.unit-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ghost-action.is-disabled {
  opacity: .45;
  cursor: default;
}

.unit-page-grid {
  display: grid;
  grid-template-columns: minmax(280px, .32fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.unit-side-panel,
.unit-main-panel {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.unit-side-panel {
  position: sticky;
  top: 86px;
}

.unit-side-panel h3,
.unit-main-panel h3 {
  margin: 0;
}

.unit-main-panel h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.22;
}

.unit-side-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.side-block {
  display: grid;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(23, 32, 27, .08);
}

.side-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.lesson-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.6;
}

.score-mini strong {
  color: var(--green-dark);
  font-size: 34px;
  line-height: 1;
}

.study-focus {
  display: grid;
  gap: 10px;
  padding: 20px 22px;
  border: 1px solid rgba(31, 111, 85, .18);
  border-radius: 8px;
  background: #fff;
}

.study-focus ul {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}

.study-focus li {
  padding: 2px 0;
}

.study-focus li p,
.reading-section p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.85;
}

.reading-section {
  display: grid;
  gap: 20px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.reading-section h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.22;
}

.concept-lead {
  padding: 14px 16px;
  border-left: 3px solid var(--gold);
  background: #fffaf0;
  color: var(--ink) !important;
  font-size: 18px !important;
  line-height: 1.85 !important;
}

.content-flow {
  display: grid;
  gap: 22px;
}

.keyword-mark {
  padding: 0;
  color: inherit;
  background: transparent;
  border-bottom: 2px solid rgba(183, 125, 34, .5);
  font-weight: 700;
}

.quiz-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.quiz-head h3 {
  margin-top: 4px;
}

.quiz-head > span {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 8px;
  color: var(--green-dark);
  background: #fff;
  border: 1px solid rgba(31, 111, 85, .16);
  font-weight: 900;
}

.quiz-card {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.quiz-card.is-correct {
  border-color: rgba(31, 111, 85, .45);
  background: #f1faf4;
}

.quiz-card.is-wrong {
  border-color: rgba(157, 63, 53, .34);
  background: #fff8f6;
}

.quiz-card legend {
  display: block;
  width: 100%;
  padding: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.7;
}

.quiz-card legend > span {
  display: inline-flex;
  margin-right: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--green-dark);
  background: var(--surface-2);
  font-size: 12px;
}

.option-list {
  display: grid;
  gap: 8px;
}

.option-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid rgba(23, 32, 27, .09);
  border-radius: 8px;
  background: #fbfcfa;
}

.option-row input {
  flex: 0 0 auto;
  margin-top: 4px;
}

.option-row span {
  font-size: 16px;
  line-height: 1.55;
}

.quiz-card input.blank-input[type="text"] {
  display: inline-block;
  width: 6em;
  margin: 0 2px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid rgba(183, 125, 34, .75);
  border-radius: 0;
  color: var(--green-dark);
  background: transparent;
  text-align: center;
  font-weight: 800;
  outline: none;
  vertical-align: baseline;
}

.quiz-card input.blank-input[type="text"]:focus {
  box-shadow: 0 0 0 3px rgba(183, 125, 34, .15);
}

.blank-answer,
.quiz-feedback {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.teacher-page {
  display: grid;
  gap: 22px;
  padding-top: 24px;
}

.teacher-login-page {
  min-height: calc(100vh - 76px);
  display: grid;
  place-items: center;
  padding-top: 24px;
}

.teacher-login-panel {
  width: min(440px, 100%);
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 28px rgba(33, 44, 37, 0.08);
}

.teacher-login-panel h1 {
  margin: 0;
  font-size: 28px;
}

.teacher-login-panel form {
  display: grid;
  gap: 14px;
}

.teacher-logout {
  min-height: 34px;
}

.teacher-hero,
.teacher-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 28px rgba(33, 44, 37, 0.08);
}

.teacher-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}

.teacher-hero h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.1;
}

.teacher-hero p:not(.eyebrow) {
  max-width: 820px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.teacher-status {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.teacher-status.is-success {
  color: var(--green-dark);
}

.teacher-status.is-warning {
  color: var(--red);
}

.teacher-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 18px 16px;
  align-items: end;
}

.teacher-filter-bar label {
  min-width: 180px;
}

.teacher-filter-bar label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.roster-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 18px 16px;
  padding: 14px 16px;
  background: rgba(31, 111, 85, 0.06);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.roster-panel h3 {
  margin: 2px 0 6px;
  font-size: 19px;
}

.roster-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.metric-card {
  min-height: 108px;
  padding: 16px;
  background: #fff;
}

.metric-card strong,
.metric-card span {
  display: block;
}

.metric-card strong {
  color: var(--green-dark);
  font-size: 32px;
  line-height: 1;
}

.metric-card span {
  margin-top: 12px;
  color: var(--muted);
  font-weight: 800;
}

.teacher-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 22px;
}

.teacher-panel {
  overflow: hidden;
}

.teacher-map-editor {
  padding: 0;
}

.teacher-map-editor iframe {
  display: block;
  width: 100%;
  height: min(82vh, 860px);
  min-height: 640px;
  border: 0;
  background: #fff;
}

.teacher-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.teacher-panel-head h2 {
  margin: 0;
  font-size: 22px;
}

.teacher-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.table-wrap {
  max-height: 420px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fbfcfa;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

td strong,
td span {
  display: block;
}

td span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.inline-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
  min-height: 28px;
  border: 1px solid rgba(31, 111, 85, .24);
  border-radius: 7px;
  background: #f6faf6;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.empty-table {
  color: var(--muted);
  text-align: center;
}

.student-detail {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.student-unit-list {
  display: grid;
  gap: 10px;
}

.student-unit-list h4 {
  margin: 0;
  font-size: 16px;
}

.student-unit-item {
  display: grid;
  gap: 5px;
  padding: 11px 12px;
  border: 1px solid rgba(31, 111, 85, .18);
  border-radius: 8px;
  background: #fbfcfa;
}

.student-unit-item strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.student-unit-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.assignment-workbench {
  display: grid;
  grid-template-columns: minmax(280px, .38fr) minmax(0, 1fr);
  min-height: 560px;
}

.assignment-list {
  border-right: 1px solid var(--line);
  background: #fbfcfa;
  overflow: auto;
}

.assignment-list button {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 14px;
  text-align: left;
}

.assignment-list button.is-active {
  background: #fff7e6;
}

.assignment-list button strong {
  color: var(--ink);
  line-height: 1.45;
}

.assignment-list button span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.assignment-detail {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 18px;
  background: #fff;
}

.teacher-file-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(31, 111, 85, .2);
  border-radius: 8px;
  background: #f6faf6;
}

.teacher-file-panel strong,
.teacher-file-panel span {
  display: block;
}

.teacher-file-panel span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.detail-title {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.detail-title h3 {
  margin: 0;
  font-size: 24px;
}

.detail-title > span {
  padding: 6px 9px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 900;
}

.assignment-fields {
  display: grid;
  gap: 1px;
  margin: 0;
  background: var(--line);
}

.assignment-fields div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  background: #fff;
}

.assignment-fields dt,
.assignment-fields dd {
  margin: 0;
  line-height: 1.65;
}

.assignment-fields dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.assignment-fields dd {
  color: var(--ink);
}

.review-list,
.review-form {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(31, 111, 85, .18);
  border-radius: 8px;
  background: #f6faf6;
}

.review-list h4 {
  margin: 0;
}

.review-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.blank-answer mark {
  padding: 3px 8px;
  border-radius: 6px;
  color: var(--green-dark);
  background: #fff3d8;
  font-weight: 900;
}

/* AI analysis panels */
.ai-profile-panel,
.ai-report,
.assignment-ai-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 111, 85, 0.18);
  border-radius: 8px;
}

.ai-profile-panel:empty {
  display: none;
}

.ai-profile-panel p,
.ai-report p,
.assignment-ai-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.ai-profile-head,
.ai-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-profile-head span,
.ai-report-head span {
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}

.ai-profile-grid,
.ai-report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.ai-report-grid section {
  min-width: 0;
  padding: 12px;
  background: rgba(238, 243, 239, 0.72);
  border: 1px solid rgba(31, 111, 85, 0.12);
  border-radius: 8px;
}

.ai-report-grid h3,
.ai-report-grid h5 {
  margin: 0 0 8px;
  font-size: 15px;
}

.ai-report-grid ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.ai-profile-note {
  font-size: 13px;
}

.ai-teacher-panel {
  margin-top: 18px;
}

.assignment-ai-panel {
  margin: 16px 0;
}

.ai-assignment-result {
  display: grid;
  gap: 10px;
}

@media (max-width: 1180px) {
  .hero,
  .workspace,
  .intake-section,
  .unit-study,
  .unit-page-grid,
  .assignment-layout,
  .teacher-grid,
  .assignment-workbench {
    grid-template-columns: 1fr;
  }

  .course-intro-grid {
    grid-template-columns: 1fr;
  }

  .student-panel {
    position: static;
  }

  .student-identity-grid {
    grid-template-columns: 1fr;
  }

  .unit-side-panel {
    position: static;
  }

  .path-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .assignment-list {
    max-height: 320px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .unit-list {
    max-height: 360px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .student-graph-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .student-column-resizer {
    display: none;
  }

  .student-outline-panel {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .graph-wrap {
    height: min(72vh, 620px);
    min-height: 420px;
  }
}

@media (max-width: 720px) {
  .app-header,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .graph-toolbar-left,
  .graph-toolbar-right {
    width: 100%;
  }

  main {
    padding: 0 12px 42px;
  }

  .hero {
    padding: 24px;
  }

  .full-section {
    min-height: auto;
    margin-top: 16px;
  }

  .intake-copy {
    padding: 24px;
  }

  .hero-metrics,
  .path-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .teacher-hero,
  .teacher-panel-head,
  .detail-title {
    align-items: stretch;
    flex-direction: column;
  }

  .assignment-fields div {
    grid-template-columns: 1fr;
  }

  .graph-wrap {
    min-height: 520px;
  }
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) {
  .app-header {
    gap: 8px;
    padding: 8px 10px;
  }

  .brand {
    gap: 8px;
    min-width: 0;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    font-size: 16px;
  }

  .brand strong {
    font-size: 15px;
    line-height: 1.18;
  }

  .brand small {
    font-size: 11px;
  }

  nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    margin: 0 -2px;
    padding: 0 2px 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  nav::-webkit-scrollbar,
  .graph-toolbar-left::-webkit-scrollbar,
  .graph-toolbar-right::-webkit-scrollbar {
    display: none;
  }

  nav a {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 6px 8px;
    border: 1px solid rgba(31, 111, 85, 0.12);
    background: rgba(255, 255, 255, 0.58);
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  main {
    padding: 0 8px 34px;
  }

  .full-section {
    margin-top: 10px;
    scroll-margin-top: 88px;
  }

  .hero {
    gap: 14px;
    padding: 18px;
  }

  .hero h1 {
    font-size: clamp(21px, 7vw, 30px);
    line-height: 1.08;
  }

  .hero p:not(.eyebrow) {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.6;
  }

  .hero-actions,
  .path-next-actions,
  .intake-actions,
  .profile-buttons,
  .segmented,
  .graph-toolbar {
    gap: 6px;
  }

  .profile-buttons button,
  .segmented button,
  .ghost-action,
  .primary-action {
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.1;
  }

  .hero-actions .primary-action,
  .hero-actions .ghost-action {
    flex: 1 1 auto;
  }

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

  .hero-metrics div {
    min-height: 72px;
    padding: 12px;
  }

  .hero-metrics strong {
    font-size: 26px;
  }

  .hero-metrics span {
    margin-top: 6px;
    font-size: 12px;
  }

  .student-graph-shell {
    min-height: 0;
  }

  .student-outline-panel {
    max-height: 150px;
  }

  .student-panel-head {
    padding: 9px 10px;
  }

  .student-panel-head p {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .student-panel-head h3 {
    font-size: 15px;
  }

  .student-outline-tree {
    padding: 4px 5px 8px;
  }

  .student-outline-title {
    min-height: 22px;
    padding-top: 3px;
    padding-bottom: 3px;
    font-size: 11px;
  }

  .graph-head {
    padding: 12px 14px;
  }

  .graph-head h2 {
    font-size: 22px;
    line-height: 1.15;
  }

  .graph-toolbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px 10px;
  }

  .graph-toolbar-left,
  .graph-toolbar-right {
    display: flex;
    flex-wrap: nowrap;
    width: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .graph-toolbar-right {
    margin-top: 0;
  }

  .graph-toolbar-left > *,
  .graph-toolbar-right > * {
    flex: 0 0 auto;
  }

  .graph-toolbar-left > .segmented:first-child {
    margin-right: 0;
  }

  .graph-depth-select {
    min-width: 96px;
    min-height: 32px;
    padding: 5px 26px 5px 8px;
    font-size: 12px;
  }

  .graph-toolbar .segmented button,
  .graph-toolbar .ghost-action {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 12px;
    white-space: nowrap;
  }

  .graph-wrap {
    height: calc(100svh - 260px);
    min-height: 430px;
  }

  .graph-detail {
    max-width: min(330px, calc(100% - 24px));
    padding: 12px;
    font-size: 12px;
  }

  .intake-section,
  .workspace,
  .assignment-layout,
  .unit-study,
  .unit-page-grid {
    gap: 12px;
  }

  .intake-copy,
  .student-panel,
  .unit-hero-card,
  .unit-side-panel,
  .unit-main-panel,
  .assignment-panel {
    padding: 18px;
  }

  .intake-copy h2,
  .section-head h2,
  .unit-hero-card h1 {
    font-size: 24px;
    line-height: 1.18;
  }
}

@media (max-width: 480px) {
  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .graph-wrap {
    height: calc(100svh - 235px);
    min-height: 390px;
  }

  .graph-head h2 {
    font-size: 20px;
  }

  .graph-toolbar .ghost-action#pathOverlayButton {
    max-width: 138px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
