:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --surface-soft: #eef2f8;
  --text: #101828;
  --muted: #667085;
  --line: rgba(16, 24, 40, 0.11);
  --accent: #635bff;
  --accent-strong: #4f46e5;
  --accent-soft: rgba(99, 91, 255, 0.1);
  --cyan: #06b6d4;
  --green: #10b981;
  --shadow: 0 28px 80px rgba(15, 23, 42, 0.1);
  --radius: 24px;
}

body.dark {
  color-scheme: dark;
  --bg: #07111f;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-solid: #0c1728;
  --surface-soft: rgba(255, 255, 255, 0.055);
  --text: #f8fafc;
  --muted: #94a3b8;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #818cf8;
  --accent-strong: #a5b4fc;
  --accent-soft: rgba(99, 102, 241, 0.14);
  --cyan: #22d3ee;
  --green: #34d399;
  --shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: background 180ms ease, color 180ms ease;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.18;
  pointer-events: none;
}

.ambient-one {
  top: -15rem;
  right: -12rem;
  background: #6366f1;
}

.ambient-two {
  bottom: -18rem;
  left: 10%;
  background: #06b6d4;
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: blur(22px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--accent), var(--cyan));
  box-shadow: 0 12px 32px color-mix(in srgb, var(--accent) 28%, transparent);
  color: #fff;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 14px;
  letter-spacing: -0.02em;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.top-actions,
.hero-actions,
.subject-links,
.view-controls,
.cta-section > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.button,
.chip,
.icon-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.button {
  padding: 0 15px;
}

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

.button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.button.large {
  min-height: 46px;
  padding: 0 20px;
  font-size: 12px;
}

.button.quiet {
  background: var(--surface);
}

.icon-button {
  width: 38px;
  padding: 0;
}

.mobile-menu,
.close-menu {
  display: none;
}

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

.sidebar {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  padding: 25px 16px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
}

.sidebar-head,
.progress-heading,
.subject-card-head,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.sidebar-copy {
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.search-control {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
  color: var(--muted);
}

.search-control:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search-control input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 11px;
}

kbd {
  padding: 2px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 9px;
}

.subject-nav {
  display: grid;
  gap: 5px;
  margin: 18px 0 24px;
}

.subject-nav-item {
  display: grid;
  min-height: 45px;
  grid-template-columns: 25px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: all 150ms ease;
}

.subject-nav-item:hover,
.subject-nav-item.active {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.nav-number {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.nav-title {
  overflow: hidden;
  font-size: 11px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-progress {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.sidebar-progress {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.progress-heading {
  font-size: 10px;
  font-weight: 750;
}

.progress-heading strong {
  color: var(--accent);
}

.progress-track,
.subject-meter {
  height: 5px;
  margin: 11px 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.progress-track span,
.subject-meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  transition: width 220ms ease;
}

.sidebar-progress p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.main-content {
  min-width: 0;
}

.hero {
  display: grid;
  min-height: 560px;
  grid-template-columns: minmax(0, 1fr) minmax(350px, 0.65fr);
  align-items: center;
  gap: 50px;
  padding: 72px clamp(28px, 6vw, 92px);
}

.hero h1 {
  max-width: 760px;
  margin: 14px 0 18px;
  font-size: clamp(48px, 7vw, 94px);
  line-height: 0.96;
  letter-spacing: -0.075em;
}

.hero h1 em {
  background: linear-gradient(90deg, var(--accent), var(--cyan));
  background-clip: text;
  color: transparent;
  font-style: normal;
}

.hero-copy {
  min-width: 0;
}

.hero-copy > p {
  max-width: 620px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.hero-panel {
  position: relative;
  min-width: 0;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 52%),
    var(--surface);
  box-shadow: var(--shadow);
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  border: 1px dashed color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-one {
  width: 250px;
  height: 250px;
}

.orbit-two {
  width: 360px;
  height: 360px;
}

.hero-stat {
  position: absolute;
  display: grid;
  min-width: 90px;
  min-height: 90px;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-solid) 86%, transparent);
  box-shadow: var(--shadow);
  text-align: center;
}

.hero-stat span {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.05em;
}

.hero-stat small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.main-stat {
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  border-color: var(--accent);
  transform: translate(-50%, -50%);
}

.main-stat span {
  font-size: 48px;
  color: var(--accent);
}

.stat-one {
  top: 38px;
  left: 34px;
}

.stat-two {
  top: 54px;
  right: 28px;
}

.stat-three {
  right: 62px;
  bottom: 32px;
}

.signal-strip {
  display: grid;
  margin: 0 clamp(28px, 6vw, 92px);
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.signal-strip div {
  display: flex;
  min-height: 74px;
  align-items: center;
  gap: 13px;
  padding: 0 20px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.signal-strip div:last-child {
  border: 0;
}

.signal-strip strong {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.1em;
}

.curriculum-section {
  padding: 110px clamp(28px, 6vw, 92px);
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2,
.cta-section h2 {
  margin: 8px 0 0;
  font-size: clamp(32px, 4.5vw, 60px);
  letter-spacing: -0.055em;
}

.chip {
  min-height: 34px;
  padding: 0 13px;
  color: var(--muted);
}

.chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

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

.subject-card {
  position: relative;
  padding: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 42px rgba(15, 23, 42, 0.04);
  transition: transform 180ms ease, border-color 180ms ease;
}

.subject-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--subject-accent);
  content: "";
}

.subject-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--subject-accent) 65%, transparent);
}

.subject-number {
  color: var(--subject-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.topic-count,
.subject-completion {
  margin-left: 9px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.subject-completion {
  margin: 0;
  color: var(--subject-accent);
}

.subject-card h3 {
  margin: 19px 0 7px;
  font-size: 25px;
  letter-spacing: -0.045em;
}

.subject-card > p {
  min-height: 42px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.subject-meter span {
  background: var(--subject-accent);
}

.subject-links {
  margin: 13px 0 18px;
}

.subject-links a,
.resource-sections a,
.text-button {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}

.subject-links a:hover,
.resource-sections a:hover,
.text-button:hover {
  color: var(--subject-accent);
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
}

.resource-drawer {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.resource-drawer summary {
  padding: 11px 13px;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.resource-sections {
  display: grid;
  gap: 13px;
  padding: 0 13px 13px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resource-sections section {
  min-width: 0;
}

.resource-sections h4 {
  margin: 0 0 7px;
  font-size: 10px;
}

.resource-sections h4 span {
  color: var(--muted);
}

.resource-sections ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.resource-sections a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.topic-list li {
  display: flex;
  align-items: center;
  border-radius: 9px;
}

.topic-list li:hover {
  background: var(--surface-soft);
}

.topic-list label {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  flex: 1;
}

.topic-action {
  margin-right: 7px;
  padding: 4px 7px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--subject-accent);
  font-size: 9px;
  font-weight: 800;
  opacity: 0;
  transition: opacity 150ms ease, background 150ms ease;
}

.topic-list li:hover .topic-action,
.topic-action:focus-visible {
  opacity: 1;
}

.topic-action:hover {
  background: var(--surface);
}

.topic-list input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkmark {
  display: grid;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.topic-list input:checked + .checkmark {
  border-color: var(--subject-accent);
  background: var(--subject-accent);
}

.topic-list input:checked + .checkmark::after {
  color: #fff;
  content: "✓";
  font-size: 10px;
  font-weight: 900;
}

.topic-list input:checked ~ span:last-child {
  color: var(--text);
  text-decoration: line-through;
  text-decoration-color: var(--subject-accent);
}

.empty-state {
  padding: 80px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  color: var(--text);
  font-size: 18px;
}

.empty-state p {
  font-size: 11px;
}

.cta-section {
  margin: 0 clamp(28px, 6vw, 92px) 90px;
  padding: clamp(32px, 6vw, 72px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(circle at 90% 0%, var(--accent-soft), transparent 36%),
    var(--surface);
  box-shadow: var(--shadow);
}

.cta-section p {
  max-width: 620px;
  margin: 14px 0 25px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 25px clamp(28px, 6vw, 92px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}

footer a {
  font-weight: 750;
  text-decoration: none;
}

.presentation {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  min-width: 320px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 12%, var(--accent-soft), transparent 28%),
    radial-gradient(circle at 88% 82%, color-mix(in srgb, var(--cyan) 12%, transparent), transparent 30%),
    var(--bg);
}

.presentation-toolbar,
.presentation-footer {
  position: relative;
  z-index: 4;
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(20px);
}

.presentation-actions,
.presentation-footer {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.presentation-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-soft);
}

.presentation-tab {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.presentation-tab.active {
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--text) 8%, transparent);
}

.presentation-stage {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 0;
  width: 100%;
  place-items: start center;
  padding: clamp(22px, 4vw, 64px);
  overflow: auto;
}

.study-slide {
  display: grid;
  width: min(1180px, 100%);
  min-width: 0;
  min-height: min(680px, calc(100vh - 170px));
  grid-template-columns: minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.overall-map-panel {
  width: min(1500px, 100%);
  min-width: 0;
  padding: clamp(24px, 4vw, 54px);
  border: 1px solid var(--line);
  border-radius: 32px;
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.overall-map-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.overall-map-heading h2 {
  margin: 10px 0 8px;
  font-size: clamp(34px, 5vw, 64px);
  letter-spacing: -0.06em;
}

.overall-map-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.map-tools {
  display: flex;
  gap: 6px;
}

.map-tools .icon-button {
  width: 34px;
  min-height: 34px;
  font-size: 13px;
}

.map-tools .button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 9px;
}

#map-reset {
  width: auto;
  padding: 0 11px;
  font-size: 9px;
}

.map-node-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(220px, 1.3fr) auto auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-soft);
}

.map-node-form[hidden] {
  display: none;
}

.map-node-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.map-node-form input,
.map-node-form select {
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.map-node-form input:focus,
.map-node-form select:focus {
  border-color: var(--accent);
}

.map-save-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 9px;
}

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

.map-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.root-key {
  background: #8b5cf6;
}

.subject-key {
  background: linear-gradient(135deg, #8b5cf6 0 25%, #06b6d4 25% 50%, #f59e0b 50% 75%, #22c55e 75%);
}

.topic-key {
  border: 1px solid #8b5cf6;
  background: #ede9fe;
}

.overall-map {
  min-height: 600px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
}

.overall-map svg {
  min-width: 1500px;
  height: auto;
}

.radial-memory-map {
  width: 100%;
  min-width: 1500px;
  height: auto;
  cursor: grab;
  font-family: inherit;
  touch-action: none;
  user-select: none;
}

.radial-memory-map.interacting {
  cursor: grabbing;
}

.radial-edges line {
  stroke-linecap: round;
}

.radial-edges .root-edge {
  stroke-width: 12px;
  opacity: 0.76;
}

.radial-edges .topic-edge {
  stroke-width: 4px;
  opacity: 0.58;
}

.radial-node rect {
  stroke-width: 2px;
  transition: filter 160ms ease, stroke-width 160ms ease;
}

.radial-node {
  cursor: grab;
}

.radial-node.dragging {
  cursor: grabbing;
}

.radial-node.dragging rect {
  filter: brightness(0.95) saturate(1.12);
  stroke-width: 4px;
}

.radial-node.custom-node rect {
  stroke-dasharray: 6 3;
}

.radial-node.custom-node.selected rect {
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 60%, transparent));
  stroke: var(--accent);
  stroke-dasharray: none;
  stroke-width: 5px;
}

.radial-node text {
  font-size: 12px;
  font-weight: 700;
  pointer-events: none;
}

.radial-node.subject-node text,
.radial-node.root-node text {
  font-weight: 850;
}

.overall-map .map-link {
  cursor: pointer;
  outline: none;
}

.overall-map .map-link .node-bkg,
.overall-map .map-link rect {
  transition: filter 160ms ease, stroke-width 160ms ease;
}

.overall-map .map-link:hover .node-bkg,
.overall-map .map-link:focus-visible .node-bkg,
.overall-map .map-link:hover rect,
.overall-map .map-link:focus-visible rect {
  filter: brightness(0.96) saturate(1.08);
  stroke-width: 3px !important;
}

.overall-map-fallback {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 16px;
}

.overall-map-fallback section {
  padding: 18px;
  border: 1px solid var(--map-color);
  border-radius: 16px;
  background: var(--map-soft-color);
}

.overall-map-fallback h3 {
  margin: 0 0 12px;
  color: var(--map-color);
}

.overall-map-fallback ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
}

.slide-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: flex-start;
  padding: clamp(30px, 6vw, 82px);
}

.slide-copy h2 {
  max-width: 820px;
  margin: 13px 0 16px;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 1;
  letter-spacing: -0.065em;
  overflow-wrap: anywhere;
}

.slide-copy > p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.slide-prompts {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.slide-prompts ol {
  display: grid;
  gap: 10px;
  margin: 13px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.resource-map-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.resource-map-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 9px;
}

.resource-map {
  display: grid;
  min-height: 280px;
  place-items: center;
  margin-top: 13px;
  padding: 14px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
}

.resource-map svg {
  width: 100%;
  min-width: 720px;
  height: auto;
  max-height: 520px;
}

.resource-map .node {
  cursor: pointer;
}

.resource-map .edgePath path {
  stroke: var(--muted) !important;
}

.concept-branch,
.resource-branch {
  position: relative;
  display: grid;
  align-content: center;
  gap: 9px;
}

.concept-branch::after,
.resource-branch::before {
  position: absolute;
  top: 50%;
  width: 28px;
  height: 1px;
  background: var(--line);
  content: "";
}

.concept-branch::after {
  right: -28px;
}

.resource-branch::before {
  left: -28px;
}

.concept-node,
.resource-node {
  position: relative;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.concept-node {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  text-align: left;
}

.concept-node:not(.current)::before,
.resource-node::before {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 1px;
  background: var(--line);
  content: "";
}

.concept-node:not(.current)::before {
  right: -15px;
}

.concept-node.current {
  border-color: var(--map-text-color, var(--accent));
  background: var(--map-color, var(--accent-soft));
  color: var(--map-foreground-color, var(--text));
  font-size: 11px;
}

.concept-node:not(.current) {
  border-color: var(--map-color, var(--line));
  background: var(--map-soft-color, var(--surface-soft));
  color: var(--map-text-color, var(--text));
}

.concept-node:disabled {
  cursor: default;
}

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

.resource-node {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 16px;
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.resource-node::before {
  left: -15px;
}

.resource-node:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.resource-node strong {
  font-size: 12px;
}

.resource-node span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.resource-node span:last-child {
  margin-top: 2px;
  color: var(--accent);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.resource-node[data-relevance="subject"] {
  opacity: 0.72;
}

.resource-kind {
  color: var(--accent) !important;
  font-size: 8px !important;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.slide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.slide-links a {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.notes-heading h3 {
  margin: 10px 0 6px;
  font-size: 24px;
  letter-spacing: -0.04em;
}

.slide-arrow {
  position: fixed;
  z-index: 2;
  top: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--shadow);
  transform: translateY(-50%);
}

.slide-arrow.previous {
  left: 12px;
}

.slide-arrow.next {
  right: 12px;
}

.slide-arrow:disabled {
  cursor: default;
  opacity: 0.3;
}

.notes-panel {
  position: fixed;
  z-index: 210;
  top: 0;
  right: 0;
  display: grid;
  width: min(440px, 100%);
  height: 100vh;
  grid-template-rows: auto minmax(0, 1fr) auto;
  padding: 22px;
  border-left: 1px solid var(--line);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.notes-heading,
.notes-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.notes-panel textarea {
  width: 100%;
  margin: 20px 0;
  padding: 16px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 12px;
  line-height: 1.7;
}

.notes-panel textarea:focus {
  border-color: var(--accent);
}

.notes-footer {
  color: var(--muted);
  font-size: 9px;
}

.presentation-footer {
  justify-content: center;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.presentation-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

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

  .hero-panel {
    min-height: 330px;
  }

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

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

@media (max-width: 780px) {
  .map-node-form {
    grid-template-columns: 1fr;
  }

  .button-label {
    display: none;
  }

  .mobile-menu,
  .close-menu {
    display: inline-flex;
  }

  .mobile-menu {
    flex-direction: column;
    gap: 3px;
  }

  .mobile-menu span {
    width: 14px;
    height: 1px;
    background: currentColor;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 80;
    top: 0;
    left: 0;
    width: min(88vw, 310px);
    height: 100vh;
    transform: translateX(-105%);
    border-right: 1px solid var(--line);
    background: var(--bg);
    transition: transform 180ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .hero {
    min-height: auto;
    padding-top: 55px;
  }

  .hero h1 {
    font-size: clamp(38px, 13vw, 52px);
    letter-spacing: -0.065em;
  }

  .signal-strip {
    grid-template-columns: 1fr;
  }

  .signal-strip div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section-heading,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-sections {
    grid-template-columns: 1fr;
  }

  .study-slide {
    grid-template-columns: 1fr;
  }

  .overall-map-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .overall-map-fallback {
    grid-template-columns: 1fr;
  }

  .resource-map {
    grid-template-columns: 1fr;
  }

  .concept-branch,
  .resource-branch {
    grid-template-columns: 1fr;
  }

  .concept-branch::after,
  .resource-branch::before,
  .concept-node:not(.current)::before,
  .resource-node::before {
    display: none;
  }

  .slide-arrow {
    top: auto;
    bottom: 54px;
  }

  .presentation-stage {
    display: block;
    padding: 14px;
    overflow-x: hidden;
  }

  .presentation-footer {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 520px) {
  .topbar {
    padding: 0 14px;
  }

  .top-actions .button.primary {
    display: none;
  }

  .hero,
  .curriculum-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-copy > p {
    font-size: 13px;
  }

  .hero-actions {
    gap: 6px;
  }

  .hero-actions .button {
    padding: 0 14px;
    font-size: 10px;
  }

  .signal-strip,
  .cta-section {
    margin-right: 16px;
    margin-left: 16px;
  }

  .hero-panel {
    min-height: 290px;
  }

  .orbit-two {
    width: 290px;
    height: 290px;
  }

  .stat-one {
    top: 25px;
    left: 18px;
  }

  .stat-two {
    top: 30px;
    right: 14px;
  }

  .stat-three {
    right: 30px;
    bottom: 22px;
  }

  .hero-stat {
    min-width: 72px;
    min-height: 72px;
  }

  .main-stat {
    width: 125px;
    height: 125px;
  }

  .subject-card {
    padding: 20px;
  }

  .topic-action {
    opacity: 1;
  }

  .presentation-toolbar {
    width: 100vw;
    max-width: 100vw;
    padding: 10px 12px;
    padding-right: 58px;
    flex-wrap: wrap;
  }

  .presentation-toolbar .brand small,
  #presentation-fullscreen,
  #slide-notes-toggle {
    display: none;
  }

  .presentation-tabs {
    order: 3;
    width: calc(100vw - 24px);
    margin-left: 0;
    justify-content: center;
  }

  .presentation-tab {
    padding: 0 9px;
    font-size: 8px;
  }

  .presentation-actions {
    position: absolute;
    top: 10px;
    right: 12px;
    flex: 0 0 auto;
  }

  .presentation-toolbar .button {
    padding: 0 10px;
    font-size: 9px;
  }

  .study-slide {
    display: block;
    width: calc(100vw - 28px) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 28px) !important;
  }

  .overall-map-panel {
    width: calc(100vw - 28px);
    padding: 22px;
  }

  .overall-map-heading h2 {
    font-size: 32px;
  }

  .overall-map {
    min-height: 520px;
    padding: 10px;
  }

  .slide-copy {
    width: 100%;
    max-width: 100%;
    padding: 28px 22px;
  }

  .slide-copy h2 {
    font-size: clamp(36px, 13vw, 54px);
  }
}
