:root {
  --bg: #eff5f8;
  --panel: #ffffff;
  --text: #182c3d;
  --muted: #5f6b7a;
  --line: #dfe4ea;
  --primary: #206faf;
  --primary-dark: #155489;
  --success: #147a4b;
  --danger: #b42318;
  --shadow: 0 2px 4px rgba(24, 49, 66, 0.10), 0 8px 24px rgba(24, 49, 66, 0.03);
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

body:not(.home-page) {
  background: linear-gradient(180deg, #edf4f8 0%, #f3f7fa 100%);
}

body:not(.home-page) .site-header {
  background: rgba(255, 255, 255, 0.79);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31, 58, 79, 0.12);
}

body:not(.home-page) .nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  gap: 24px;
}

body:not(.home-page) .brand {
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text);
  font-size: 1.7rem;
}

body:not(.home-page) .nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 18px;
  flex: 1;
  flex-wrap: wrap;
}

body:not(.home-page) .nav-links a,
body:not(.home-page) .account-link,
body:not(.home-page) a {
  color: var(--text);
}

body:not(.home-page) .panel,
body:not(.home-page) .card,
body:not(.home-page) .question,
body:not(.home-page) .stat,
body:not(.home-page) .table-wrap {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(31, 58, 79, 0.12);
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(24, 49, 66, 0.06);
}

body:not(.home-page) .button,
body:not(.home-page) button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, #2d7bbd 0%, #1f6aa7 100%);
  color: #fff;
  font-weight: 800;
  border: none;
  box-shadow: 0 8px 18px rgba(29, 102, 165, 0.24);
}

body:not(.home-page) .button:hover,
body:not(.home-page) button:hover {
  background: linear-gradient(180deg, #266fa9 0%, #1c5f9b 100%);
  text-decoration: none;
}

body:not(.home-page) .button.secondary,
body:not(.home-page) .secondary {
  background: rgba(232, 240, 248, 0.9);
  border: 1px solid rgba(31, 58, 79, 0.12);
  color: var(--text);
  box-shadow: none;
}

body:not(.home-page) main {
  padding-top: 32px;
}

a {
  text-decoration: none;
  color: #464feb;
}
a:hover { text-decoration: underline; }

tr th, tr td {
  border: 1px solid #e6e6e6;
}

tr th {
  background-color: #f5f5f5;
}

.container { width: min(1080px, calc(100% - 32px)); margin: 0 auto; }

.site-header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}

.nav {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand { font-weight: 800; color: var(--text); letter-spacing: -0.02em; }
.nav-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: var(--text); }

main { padding: 48px 0 72px; }
.hero { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 28px; align-items: stretch; }
.hero-copy, .panel, .card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.hero-copy { padding: clamp(28px, 5vw, 56px); }
.hero-copy h1 { font-size: clamp(2.2rem, 6vw, 4.6rem); line-height: 1.02; margin: 0 0 18px; letter-spacing: -0.04em; }
.hero-copy p { font-size: 1.1rem; color: var(--muted); max-width: 65ch; }
.hero-side { padding: 28px; }

.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 800; color: var(--primary); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.button, button {
  appearance: none;
  border: 0;
  border-radius: 10px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--primary);
  color: white;
}
.button:hover, button:hover { background: var(--primary-dark); text-decoration: none; }
.button.secondary { background: #eef2ff; color: var(--primary-dark); }
.button.secondary:hover { background: #dde5ff; }
.button.ghost { background: transparent; color: var(--primary); border: 1px solid var(--line); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.card { padding: 22px; }
.card h2, .card h3 { margin-top: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.panel { padding: 26px; }
.stack { display: grid; gap: 16px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

label { display: grid; gap: 6px; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cbd3dc;
  border-radius: 9px;
  padding: 11px 12px;
  font: inherit;
  background: white;
  color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(36, 87, 214, 0.15); border-color: var(--primary); }

.notice { border-radius: 10px; padding: 12px 14px; background: #eef2ff; color: #263b73; }
.notice.error { background: #fff0ee; color: var(--danger); }
.notice.success { background: #e9f8f0; color: var(--success); }
.notice.warning { background: #fff7e6; color: #8a5a00; }
.validation-issue { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.hidden { display: none !important; }

.test-shell { max-width: 820px; margin: 0 auto; }
.test-header { margin-bottom: 22px; }
.question {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin: 14px 0;
}
.question-number { color: var(--muted); font-size: 0.88rem; font-weight: 800; }
.question-prompt { font-size: 1.15rem; margin: 8px 0 14px; }
.sample-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 0;
  margin: 0;
  padding: 0;
}

.sample-options label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px;
  width: 100%;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid #d7dbe3;
  border-radius: 10px;
  text-align: left;
}

.sample-options input[type="radio"] {
  flex: 0 0 auto !important;
  margin: 0 !important;
  width: 18px;
  height: 18px;
}

.sample-options label > span {
  flex: 0 1 auto;
  margin: 0 !important;
}

.choice-list { display: grid; gap: 9px; }
.choice-list label {
  display: flex;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  font-weight: 500;
}
.choice-list input { width: auto; }
.question.correct { border-color: #62b98e; background: #f4fbf7; }
.question.incorrect { border-color: #ef8e86; background: #fff7f6; }
.result-box { font-size: 1.1rem; }
.result-score { font-size: 2.4rem; font-weight: 850; letter-spacing: -0.03em; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 26px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.stat strong { display: block; font-size: 1.8rem; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
tr:last-child td { border-bottom: 0; }

footer { padding: 24px 0 44px; color: var(--muted); text-align: center; }

@media (max-width: 760px) {
  .hero, .split, .grid, .stats { grid-template-columns: 1fr; }
  .nav { align-items: flex-start; padding: 14px 0; }
  .nav-links { justify-content: flex-end; gap: 10px; }
  main { padding-top: 28px; }
}

body.home-page {
  background: #e7eef4;
}

body.home-page .site-header {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31, 58, 79, 0.12);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 100;
  transition: top .2s ease;
}

.skip-link:focus {
  top: 12px;
}

.site-header {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31, 58, 79, 0.12);
}

.brand,
.footer-brand {
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text);
  font-size: 2rem;
}

.nav {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 72px;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex: 1;
}

.nav-links a,
.account-link,
.progress-panel a,
.subject-panel a,
.home-footer a {
  color: var(--text);
  text-decoration: none;
}

.account-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
}

.account-avatar {
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(24, 44, 61, 0.8);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  line-height: 1;
  color: rgba(24, 44, 61, 0.9);
}

.account-caption {
  display: inline-block;
  font-weight: 600;
  color: rgba(24, 44, 61, 0.75);
  margin-left: 6px;
}

.practice-hero {
  padding-top: 24px;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.hero-intro {
  padding: 12px 0 0;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  font-weight: 900;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 18px;
}

.hero-intro h1 {
  margin: 0;
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 0.96;
  letter-spacing: -0.06em;
  color: #1b2c3e;
}

.hero-intro p {
  max-width: 600px;
  margin: 22px 0 28px;
  font-size: 1.2rem;
  line-height: 1.45;
  color: rgba(24, 44, 61, 0.78);
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 12px;
  background: linear-gradient(180deg, #2d7bbd 0%, #1f6aa7 100%);
  color: #fff;
  font-weight: 800;
  border: none;
  box-shadow: 0 8px 18px rgba(29, 102, 165, 0.24);
}

.button:hover,
button:hover {
  background: linear-gradient(180deg, #266fa9 0%, #1c5f9b 100%);
  text-decoration: none;
}

.button.ghost {
  background: transparent;
  border: 2px solid rgba(31, 58, 79, 0.18);
  color: var(--text);
  box-shadow: none;
}

.hero-illustration {
  display: block;
  width: min(100%, 520px);
  height: auto;
  object-fit: contain;
  margin-left: auto;
  border-radius: 22px;
  background: #f3f6ff;
  border: 1px solid rgba(31, 58, 79, 0.12);
  box-shadow: 0 22px 60px rgba(19, 40, 59, 0.10);
}

.home-content {
  margin-top: 30px;
  padding-bottom: 10px;
}

.home-section-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.home-section-heading .eyebrow {
  margin: 0;
  font-size: 0.8rem;
}

.home-section-heading .small {
  font-size: 1rem;
  color: rgba(24, 44, 61, 0.72);
}

.practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(250px, 0.7fr);
  gap: 24px;
  align-items: start;
}

.challenge-card,
.panel,
.discovery-strip,
.home-footer .container {
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(31, 58, 79, 0.12);
  border-radius: 22px;
  box-shadow: 0 15px 32px rgba(24, 49, 66, 0.08);
}

.challenge-card {
  padding: 28px 28px 18px;
}

.challenge-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.challenge-heading h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  color: #1b2c3e;
}

.challenge-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(31, 58, 79, 0.12);
  background: rgba(240, 248, 255, 0.8);
  color: rgba(24, 44, 61, 0.8);
  font-weight: 700;
  font-size: 0.82rem;
}

.challenge-body {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
  gap: 22px;
  align-items: center;
  margin-top: 16px;
}

.challenge-art {
  display: grid;
  gap: 12px;
  padding: 16px 14px 12px;
  border: 1px solid rgba(31, 58, 79, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, #f8f1d8 0%, #f9f6ee 100%);
}

.math-scribble {
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: rgba(33, 43, 58, 0.75);
  text-align: center;
}

.challenge-art img {
  width: 100%;
  max-width: 290px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 14px;
}

.challenge-art strong {
  font-size: 1.15rem;
  line-height: 1.25;
  color: #1b2c3e;
}

.challenge-art span {
  color: rgba(24, 44, 61, 0.75);
  font-weight: 600;
}

.challenge-work {
  display: grid;
  gap: 12px;
}

.challenge-meta {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(24, 44, 61, 0.72);
}

.challenge-work h3 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
  color: #1b2c3e;
}

.sample-options {
  display: grid;
  gap: 10px;
  border: none;
  padding: 0;
  margin: 4px 0 0;
}

.sample-options .option-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1.5px solid rgba(31, 58, 79, 0.16);
  border-radius: 12px;
  background: rgba(248, 250, 253, 0.8);
  cursor: pointer;
}

.sample-options .option-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.sample-options .option-row span {
  font-weight: 700;
  color: rgba(24, 44, 61, 0.9);
}

.sample-feedback {
  min-height: 24px;
  margin: 0;
  color: rgba(24, 44, 61, 0.7);
  font-weight: 600;
}

.challenge-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.sample-solution {
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(22, 153, 92, 0.2);
  background: rgba(234, 247, 240, 0.85);
  color: #1c6243;
  font-weight: 600;
}

.practice-progress {
  display: grid;
  gap: 8px;
  margin-top: 6px;
  color: rgba(24, 44, 61, 0.7);
}

.practice-progress progress {
  width: 100%;
  height: 12px;
  accent-color: var(--primary);
}

.home-sidebar {
  display: grid;
  gap: 22px;
}

.panel {
  padding: 22px 20px;
}

.subject-panel {
  display: grid;
  gap: 12px;
}

.subject-panel h2,
.progress-panel h2,
.discovery-strip h2 {
  margin: 0 0 10px;
  color: #1b2c3e;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.04em;
}

.subject-panel a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(31, 58, 79, 0.12);
  background: rgba(247, 250, 252, 0.8);
  transition: transform .15s ease, border-color .15s ease;
}

.subject-panel a:hover,
.progress-panel a:hover,
.discovery-strip a:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.subject-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(180deg, #edf6ff 0%, #dfeeff 100%);
  font-weight: 800;
  color: var(--primary);
  font-size: 1.5rem;
}

.subject-panel a span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 800;
  color: #1b2c3e;
}

.subject-panel a small {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(24, 44, 61, 0.7);
}

.subject-arrow {
  color: var(--primary);
  font-size: 1.2rem;
  font-weight: 900;
}

.progress-panel {
  display: grid;
  gap: 10px;
}

.progress-panel p {
  margin: 0;
  color: rgba(24, 44, 61, 0.72);
}

.progress-panel a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 800;
}

.discovery-strip {
  margin-top: 28px;
  padding: 20px 20px 10px;
}

.discovery-strip h2 {
  margin-bottom: 16px;
}

.discovery-strip a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(31, 58, 79, 0.12);
  background: rgba(247, 250, 252, 0.7);
  color: var(--text);
  text-decoration: none;
  margin-bottom: 10px;
}

.discovery-strip a > span:first-child {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

.discovery-strip a span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 800;
}

.discovery-strip a small {
  font-weight: 600;
  color: rgba(24, 44, 61, 0.7);
}

.home-footer {
  padding: 18px 0 36px;
}

.home-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
}

.footer-brand {
  font-size: 1.4rem;
}

.home-footer span {
  color: rgba(24, 44, 61, 0.72);
}

.home-footer a {
  color: var(--primary);
  font-weight: 800;
}

@media (max-width: 980px) {
  .hero-layout,
  .practice-layout,
  .challenge-body,
  .home-footer .container {
    grid-template-columns: 1fr;
  }

  .hero-layout,
  .practice-layout {
    display: grid;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 14px 0;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-bottom: 4px;
  }

  .home-footer .container {
    display: grid;
    justify-content: stretch;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .hero-intro h1 {
    font-size: 2.7rem;
  }

  .challenge-heading {
    flex-direction: column;
    align-items: flex-start;
  }

  .challenge-card,
  .panel,
  .discovery-strip {
    padding-left: 16px;
    padding-right: 16px;
  }

  .account-link {
    padding-left: 8px;
    padding-right: 8px;
  }

  .account-caption {
    display: none;
  }
}

.admin-tabs,.row-actions,.section-head{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.admin-tabs{margin:20px 0}.section-head{justify-content:space-between}.admin-section{margin-top:18px}.small-btn{padding:7px 10px;font-size:.85rem}.danger{background:#b42318!important;color:white!important}.badge{display:inline-block;padding:3px 8px;border-radius:999px;font-size:.78rem;font-weight:800;background:#eef2ff}.badge.approved{background:#e9f8f0;color:#147a4b}.badge.pending{background:#fff7d6;color:#7a5b00}.badge.blocked{background:#fff0ee;color:#b42318}.question-editor{box-shadow:none;background:#fbfcfe}.inline-check{display:flex;align-items:center;gap:8px}.inline-check input{width:auto}.user-action-group{display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-start;align-items:center;margin:2px 0}.user-action-group button{flex:1 1 122px;min-width:122px;max-width:170px;justify-content:center}.stats:has(.stat:nth-child(4)){grid-template-columns:repeat(4,1fr)}
@media(max-width:760px){.stats:has(.stat:nth-child(4)){grid-template-columns:1fr 1fr}.user-action-group{flex-direction:column;align-items:stretch}.user-action-group button{max-width:none;flex-basis:auto;width:100%}}
.source-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}.source-panel{margin-top:10px}.code-input{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.88rem;line-height:1.5;tab-size:2;min-height:360px}.editor-check{align-self:end;min-height:44px}.question-prompt p:first-child{margin-top:0}.question-prompt p:last-child{margin-bottom:0}.question-prompt img{max-width:100%;height:auto}
.question-formula { margin-top: 8px; }
.math-render-error { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95em; }

/* --- Application header: one navigation on every page (rendered by assets/js/ui.js) --- */
.site-header .container.nav { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-height: 64px; }
.workspace-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.workspace-nav a { padding: 8px 12px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.2; }
.workspace-nav a:hover { background: #eef2ff; }
.workspace-nav a[aria-current="page"] { background: var(--primary); color: #fff; }
.workspace-nav .account-link { border: 1px solid var(--line); }
.workspace-nav button { padding: 8px 12px; }
/* Specific enough to beat `body:not(.home-page) button`, which sets display: inline-flex. */
.site-header .menu-toggle { display: none; margin-left: auto; }

/* Tabbed workspaces: only the active section is shown (see classes.js). */
.workspace-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0; }
.workspace-tabs button { background: #eef2ff; color: var(--text); padding: 9px 14px; }
.workspace-tabs button[aria-current="page"] { background: var(--primary); color: #fff; }

/* Assignment forms and the student's lifecycle cards. */
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.form-actions strong { margin-right: auto; }
.assignment-status { color: var(--muted); }
#student-assignments .view h2 { margin-top: 0; }
#student-assignments .view article h3 { margin: 0 0 4px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin: 0; }
.settings-grid legend { font-weight: 800; padding: 0 6px; }
.settings-grid label { display: flex; flex-direction: column; gap: 6px; }
.settings-grid p { grid-column: 1 / -1; margin: 0; }

@media (max-width: 860px) {
  .site-header .menu-toggle { display: inline-flex; }
  .workspace-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; margin-left: 0; }
  .workspace-nav.is-open { display: flex; }
  .workspace-nav a { padding: 12px 10px; border-radius: 10px; }
  .settings-grid { grid-template-columns: 1fr; }
}
