:root {
  --ink: #17211d;
  --muted: #5f6f67;
  --line: #d7dfda;
  --panel: #ffffff;
  --bg: #f4f6f4;
  --green: #1f7a5a;
  --green-dark: #12513b;
  --blue: #2767b1;
  --red: #b83a4b;
  --gold: #c99225;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.skip-link {
  background: var(--ink);
  border-radius: 0 0 8px 8px;
  color: #fff;
  font-weight: 800;
  left: 16px;
  padding: 10px 14px;
  position: fixed;
  top: -60px;
  z-index: 200;
}
.skip-link:focus { top: 0; }
.sr-only {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  min-height: 64px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand { color: var(--ink); font-size: 1.35rem; font-weight: 800; letter-spacing: 0; }
.topbar-primary { align-items: center; display: flex; flex: 0 0 auto; }
.topbar-menu { align-items: center; display: flex; flex: 1; gap: 24px; margin-left: 24px; }
.topbar nav { display: flex; gap: 6px; margin-right: auto; }
.topbar nav a {
  border-radius: 7px;
  color: var(--muted);
  font-weight: 700;
  padding: 8px 10px;
}
.topbar nav a:hover { background: #f0f4f1; color: var(--ink); text-decoration: none; }
.topbar nav a[aria-current="page"] { background: #e5f0eb; color: var(--green-dark); }
.account-menu { align-items: center; display: flex; gap: 12px; }
.user-greeting { color: var(--muted); font-weight: 750; white-space: nowrap; }
.menu-toggle {
  align-items: center;
  background: #e7eeea;
  border: 0;
  border-radius: 8px;
  color: var(--green-dark);
  cursor: pointer;
  display: none;
  font: inherit;
  font-weight: 800;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
}
.menu-toggle-icon,
.menu-toggle-icon::before,
.menu-toggle-icon::after {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 2px;
  position: relative;
  width: 18px;
}
.menu-toggle-icon::before,
.menu-toggle-icon::after { content: ""; position: absolute; }
.menu-toggle-icon::before { top: -6px; }
.menu-toggle-icon::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::after { top: 0; transform: rotate(-45deg); }
.shell { margin: 0 auto; max-width: 1440px; padding: 28px; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }

.page-heading, .panel-heading {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}
h1, h2 { line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: 1.15rem; }
.eyebrow {
  color: var(--gold);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin: 0 0 6px;
  text-transform: uppercase;
}
.muted, .empty { color: var(--muted); }
.empty { margin: 0; }

.messages { display: grid; gap: 8px; margin-bottom: 18px; }
.message { background: #e8f5ee; border: 1px solid #b8dac9; border-radius: 8px; padding: 10px 12px; }
.message.error { background: #fae8eb; border-color: #edb8c0; }

.primary-button, .secondary-button, .ghost-button, .icon-button, .trash-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-weight: 750;
  min-height: 42px;
  padding: 0 16px;
  white-space: nowrap;
}
.primary-button { background: var(--green); color: #fff; }
.secondary-button { background: #e7eeea; color: var(--green-dark); }
.ghost-button { background: transparent; color: var(--muted); }
.primary-button:hover, .icon-button:hover { background: var(--green-dark); color: #fff; text-decoration: none; }
.secondary-button:hover, .ghost-button:hover { background: #dce7e1; color: var(--green-dark); text-decoration: none; }
.danger-button:hover { background: #912d3c; }
.danger-button {
  background: var(--red);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 750;
  min-height: 42px;
  padding: 0 16px;
}
.button-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.compact { min-height: 34px; padding: 0 12px; }
.icon-button {
  background: var(--green);
  color: #fff;
  font-size: 1.4rem;
  height: 42px;
  padding: 0;
  width: 42px;
}
.icon-button.small { font-size: 1.1rem; height: 34px; width: 34px; }
.trash-button {
  background: #fae8eb;
  color: var(--red);
  font-size: 1rem;
  height: 34px;
  min-height: 34px;
  padding: 0;
  width: 34px;
}
button[disabled] { cursor: not-allowed; opacity: .6; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid rgba(39, 103, 177, .42);
  outline-offset: 3px;
}

.loading-dialog-backdrop {
  align-items: center;
  background: rgba(23, 33, 29, .34);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 24px;
  position: fixed;
  z-index: 100;
}
.loading-dialog {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 20px 45px rgba(23, 33, 29, .18);
  max-width: 420px;
  padding: 22px;
  width: min(100%, 420px);
}
.loading-dialog h2 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.loading-dialog p {
  color: var(--muted);
  margin: 0 0 18px;
}
.loading-bar {
  background: #e7eeea;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}
.loading-bar span {
  animation: loading-slide 1.1s ease-in-out infinite;
  background: var(--green);
  border-radius: inherit;
  display: block;
  height: 100%;
  width: 42%;
}
.loading-bar.determinate span {
  animation: none;
  transition: width .35s ease;
}

.ai-recorder { border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; margin-top: 16px; padding: 14px; }
.ai-recorder form { display: grid; gap: 8px; }
.ai-recording-consent, .ai-draft-label { color: var(--muted); font-size: .82rem; }
.ai-recorder-monitor { background: #edf5f1; border: 1px solid #c8ddd2; border-radius: 9px; overflow: hidden; position: relative; }
.ai-recorder-monitor canvas { display: block; height: 72px; width: 100%; }
.ai-recorder-monitor-label { background: rgba(255, 255, 255, .86); border-radius: 999px; bottom: 7px; color: var(--muted); font-size: .72rem; font-weight: 750; left: 8px; padding: 2px 8px; position: absolute; }
.ai-job-status { max-width: 680px; }
.ai-job-status .loading-bar { margin: 18px 0; }
.ai-job-timing { font-size: .85rem; }
.ai-job-hud {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  bottom: 18px;
  box-shadow: 0 14px 38px rgba(23, 33, 29, .2);
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 14px;
  position: fixed;
  right: 18px;
  width: min(390px, calc(100vw - 32px));
  z-index: 90;
}
.ai-job-hud-heading, .ai-job-hud-item-heading, .ai-job-hud-item-footer { align-items: center; display: flex; justify-content: space-between; }
.ai-job-hud-heading { gap: 12px; }
.ai-job-hud-heading h2 { font-size: 1rem; }
.ai-job-hud-list { display: grid; gap: 10px; margin-top: 12px; }
.ai-job-hud-item { background: #f7faf8; border: 1px solid var(--line); border-radius: 9px; display: grid; gap: 8px; padding: 11px; }
.ai-job-hud-item.is-delayed { background: #fff9e9; border-color: #e6cd91; }
.ai-job-hud-item.is-failed { background: #fff3f5; border-color: #edb8c0; }
.ai-job-hud-item p { color: var(--muted); font-size: .86rem; line-height: 1.35; margin: 0; }
.ai-job-hud-item .loading-bar { height: 7px; }
.ai-job-hud-item-footer { color: var(--muted); gap: 10px; }
.ai-job-hud-item-footer > span { align-items: center; display: flex; gap: 10px; }
.ai-job-hud-item-footer a, .ai-job-dismiss { color: var(--green-dark); font-size: .78rem; font-weight: 800; }
.ai-job-dismiss { background: transparent; border: 0; cursor: pointer; padding: 0; }
.ai-job-state { background: #e7eeea; border-radius: 999px; color: var(--green-dark); font-size: .7rem; font-weight: 850; padding: 3px 8px; text-transform: uppercase; }
.ai-job-state.succeeded { background: #dff2e7; }
.ai-job-state.failed { background: #fae8eb; color: var(--red); }
.transcript-box { background: var(--surface-soft, #f5f7fa); border-radius: 10px; min-height: 180px; padding: 14px; white-space: pre-wrap; }
.ai-skill-list, .ai-action-list { display: grid; gap: 12px; }
.ai-choice, .ai-action-row { background: var(--surface-soft, #f5f7fa); border: 1px solid var(--line); border-radius: 10px; display: grid; gap: 5px; padding: 12px; }
.ai-choice span, .ai-action-row > span { color: var(--muted); font-size: .9rem; }
.ai-action-row blockquote { border-left: 3px solid var(--accent, #174ea6); color: var(--muted); margin: 4px 0; padding-left: 10px; }
.worksheet-problem { border-top: 1px solid var(--line); padding: 18px 0; }
.difficulty-tag { color: var(--muted); font-size: .75rem; text-transform: uppercase; }
.code-editor { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .85rem; }
.notice { border-radius: 10px; margin: 12px 0 18px; padding: 12px 14px; }
.notice.warning { background: #fff5d6; color: #6b4d00; }
.notice.success { background: #e5f5e9; color: #195d2a; }

@keyframes loading-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(250%); }
}

@media (prefers-reduced-motion: reduce) {
  .loading-bar span { animation-duration: 2.5s; }
  .loading-bar.determinate span { transition: none; }
}

.panel, .form-card, .module-tile, .metric, .callout {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(20, 33, 28, .04);
}
.panel { margin-bottom: 20px; padding: 20px; }
.callout { margin: 16px 0; padding: 14px 16px; }

.login-panel {
  align-items: center;
  display: grid;
  gap: 48px;
  grid-template-columns: minmax(260px, 440px) minmax(280px, 380px);
  width: min(920px, 100%);
}
.login-panel h1 { font-size: clamp(4rem, 12vw, 7rem); }
.form-card { display: grid; gap: 16px; padding: 24px; }

.form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
label { color: var(--muted); display: grid; font-weight: 700; gap: 6px; }
input, select, textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 42px;
  padding: 9px 11px;
  width: 100%;
}
input[type="checkbox"] {
  min-height: auto;
  width: auto;
}
textarea { min-height: 120px; resize: vertical; }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; gap: 10px; }
.errorlist { color: var(--red); list-style: none; margin: 0; padding: 0; }
[hidden] { display: none !important; }

.score-form-shell {
  display: grid;
  gap: 18px;
}
.score-form-card {
  padding: 22px;
}
.score-form-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.score-section-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}
.score-section-card {
  padding: 22px;
  position: relative;
}
.score-section-card[hidden] {
  display: none !important;
}
.score-section-card::after {
  border: 1px solid transparent;
  border-radius: 12px;
  content: "";
  inset: 10px;
  pointer-events: none;
  position: absolute;
}
.score-section-card.is-active::after {
  border-color: rgba(23, 33, 29, .12);
}
.score-section-card-sat {
  background: linear-gradient(180deg, #f5f9ff 0%, #ffffff 100%);
}
.score-section-card-act {
  background: linear-gradient(180deg, #fff6f7 0%, #ffffff 100%);
}
.score-section-heading {
  margin-bottom: 16px;
}
.score-section-heading h2 {
  font-size: 1.1rem;
}

.search-row { display: grid; gap: 10px; grid-template-columns: 1fr auto; margin-bottom: 18px; }
.student-list { display: grid; gap: 8px; }
.student-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  padding: 14px;
}
.student-row span { color: var(--muted); }
.student-row:hover {
  background: #f7faf8;
  border-color: #abc5b8;
  box-shadow: 0 4px 12px rgba(20, 33, 28, .07);
  text-decoration: none;
}
.list-summary {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 0 14px;
}
.list-summary p { color: var(--muted); margin: 0; }
.list-summary strong { color: var(--ink); }

.metric-grid, .module-grid, .widget-grid, .two-column {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}
.metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.widget-grid { grid-template-columns: 1.2fr 1fr 1fr; align-items: stretch; }
.two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.one-column { grid-template-columns: 1fr; }
.metric-grid > *, .module-grid > *, .widget-grid > *, .two-column > * { min-width: 0; }
.metric { padding: 18px; }
.metric span { color: var(--muted); display: block; font-weight: 700; }
.metric strong { display: block; font-size: 2.1rem; margin-top: 4px; }
.metric small { color: var(--muted); display: block; font-weight: 700; margin-top: 4px; }
.module-tile { color: var(--ink); display: grid; gap: 8px; min-height: 135px; padding: 20px; }
.module-tile span { color: var(--gold); font-weight: 800; text-transform: uppercase; }
.module-tile strong { font-size: 1.2rem; }
.module-tile:hover {
  border-color: #abc5b8;
  box-shadow: 0 8px 20px rgba(20, 33, 28, .08);
  text-decoration: none;
}
.current-session-panel {
  border-color: #b8dac9;
}
.current-session-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.current-session-form {
  display: grid;
  margin: 0;
}
.current-session-button {
  background: var(--green);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 6px;
  min-height: 132px;
  padding: 20px;
  text-align: left;
  width: 100%;
}
.current-session-button:hover {
  text-decoration: none;
}
.current-session-button.create-student {
  background: var(--blue);
}
.current-session-button span {
  color: #dceee6;
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
}
.current-session-button strong {
  font-size: 1.65rem;
  line-height: 1.1;
}
.current-session-button small {
  color: #dceee6;
  font-weight: 700;
}

.record-list { display: grid; gap: 10px; margin: 0; }
.record-list div { display: grid; gap: 4px; grid-template-columns: 140px 1fr; }
dt { color: var(--muted); font-weight: 800; }
dd { margin: 0; }
.today-focus-panel {
  border-color: #b8dac9;
}
.today-focus-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.collapsible-panel summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  list-style: none;
}
.collapsible-panel summary::-webkit-details-marker {
  display: none;
}
.collapsible-panel summary::after {
  color: var(--green-dark);
  content: "+";
  font-size: 1.3rem;
  font-weight: 850;
}
.collapsible-panel[open] summary {
  margin-bottom: 18px;
}
.collapsible-panel[open] summary::after {
  content: "-";
}
.summary-row { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.summary-row span { background: #eef5f1; border-radius: 8px; padding: 8px 10px; }
.compact-list { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.compact-list li { border-top: 1px solid var(--line); display: grid; gap: 2px; padding-top: 10px; }
.compact-list span { color: var(--muted); }
.compact-list.spaced { margin-top: 14px; }
.large-number { font-size: 1.35rem; font-weight: 800; margin: 0 0 4px; }
.profile-module {
  display: flex;
  flex-direction: column;
  min-height: 400px;
  overflow: hidden;
  position: relative;
}
.skills-overview-row { display: grid; margin-bottom: 20px; }
.skills-overview-row > * { min-width: 0; }
.skills-overview-module { min-height: 0; }
.skills-overview-summary { align-items: baseline; display: flex; gap: 8px 10px; margin-bottom: 14px; }
.skills-overview-summary strong { color: var(--green-dark); font-size: 1.55rem; }
.skills-overview-summary span { color: var(--muted); margin-right: 12px; }
.skill-pill-list { display: flex; flex-wrap: wrap; gap: 7px; }
.skill-pill { background: #e8f3ed; border: 1px solid #c9e2d4; border-radius: 999px; color: var(--green-dark); font-size: .82rem; font-weight: 750; padding: 5px 9px; }
.planned-skill-actions { background: #fff8e7; border: 1px solid #eed9a1; border-radius: 8px; display: grid; gap: 8px; margin-top: 16px; padding: 12px; }
.planned-skill-actions .eyebrow { margin: 0; }
.planned-skill-action { border-top: 1px solid #f0dfb6; display: grid; gap: 1px; padding-top: 8px; }
.planned-skill-action:first-of-type { border-top: 0; padding-top: 0; }
.planned-skill-action span { color: #756039; font-size: .84rem; }
.profile-module .module-footer-link { margin-top: auto; }
.module-footer-link {
  align-items: center;
  border-top: 1px solid var(--line);
  display: flex;
  font-weight: 800;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 14px;
}
.module-footer-link:hover { text-decoration: none; }
.module-footer-link:hover span { transform: translateX(3px); }
.module-footer-link span { transition: transform .15s ease; }
.student-nav {
  backdrop-filter: blur(8px);
  background: rgba(232, 238, 234, .94);
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  gap: 4px;
  margin: -2px 0 22px;
  overflow-x: auto;
  padding: 5px;
  scrollbar-width: thin;
}
.student-nav a {
  border-radius: 7px;
  color: var(--muted);
  flex: 0 0 auto;
  font-weight: 800;
  padding: 9px 14px;
}
.student-nav a:hover { background: rgba(255, 255, 255, .7); text-decoration: none; }
.student-nav a[aria-current="page"] {
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 33, 28, .10);
  color: var(--green-dark);
}
.student-subnav {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  margin: -10px 4px 22px;
  padding: 0 8px;
}
.student-subnav a {
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 800;
  padding: 8px 2px 9px;
}
.student-subnav a:hover { color: var(--green-dark); text-decoration: none; }
.student-subnav a[aria-current="page"] { border-bottom-color: var(--green); color: var(--green-dark); }
.session-report-list { display: grid; gap: 12px; }
.session-report-row {
  align-items: center;
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 16px;
}
.session-report-row h3, .session-report-row p { margin: 0 0 7px; }
.session-report-worksheets { align-items: flex-end; display: flex; flex-direction: column; gap: 7px; }
.session-report-actions { align-items: center; display: flex; gap: 7px; margin-top: 5px; }
.profile-module::before {
  content: "";
  height: 4px;
  inset: 0 0 auto;
  position: absolute;
}
.profile-module-scores::before { background: linear-gradient(90deg, #174ea6, #00897b, #ef6c00); }
.profile-module-plan::before { background: linear-gradient(90deg, var(--green), var(--gold)); }
.profile-module-sessions::before { background: linear-gradient(90deg, #9c2442, #1976d2); }
.profile-sparkline {
  background: linear-gradient(180deg, #f5f8fc, rgba(245, 248, 252, .2));
  border: 1px solid #dce4ee;
  border-radius: 8px;
  height: 92px;
  margin: 4px 0 16px;
  padding: 8px;
}
.profile-sparkline canvas {
  height: 100% !important;
  width: 100% !important;
}
.module-visual {
  align-items: center;
  background: #f7f9f7;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
  padding: 12px;
}
.module-visual > div > strong,
.module-visual > div > span { display: block; }
.module-visual > div > span { color: var(--muted); font-size: .84rem; }
.progress-ring {
  align-items: center;
  background: conic-gradient(var(--green) calc(var(--progress) * 1%), #dfe8e3 0);
  border-radius: 50%;
  display: flex;
  flex: 0 0 64px;
  height: 64px;
  justify-content: center;
  position: relative;
}
.progress-ring::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  inset: 7px;
  position: absolute;
}
.progress-ring span {
  color: var(--green-dark);
  font-size: .8rem;
  font-weight: 850;
  position: relative;
  z-index: 1;
}
.session-status-visual {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
}
.session-stat {
  padding: 12px 8px;
  text-align: center;
}
.session-stat + .session-stat { border-left: 1px solid var(--line); }
.session-stat strong { font-size: 1.35rem; }
.session-stat.completed strong { color: var(--green); }
.session-stat.planned strong { color: #1976d2; }
.session-stat.total strong { color: #9c2442; }

.table-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}
table { border-collapse: collapse; min-width: 720px; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 10px; text-align: left; }
th { color: var(--muted); font-size: .82rem; text-transform: uppercase; }
.score-table-groups {
  display: grid;
  gap: 14px;
}
.score-table-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.score-table-group summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: 800;
  gap: 10px;
  justify-content: space-between;
  list-style: none;
  padding: 14px 16px;
}
.score-table-group summary::-webkit-details-marker {
  display: none;
}
.score-table-group summary::before {
  content: "+";
  color: var(--green-dark);
  font-size: 1.2rem;
  width: 18px;
}
.score-table-group[open] summary::before {
  content: "-";
}
.score-table-group summary span {
  background: #eef5f1;
  border-radius: 999px;
  color: var(--muted);
  font-size: .78rem;
  padding: 3px 8px;
}
.score-table-group .empty {
  border-top: 1px solid var(--line);
  padding: 14px 16px;
}
.table-actions { align-items: center; display: flex; gap: 8px; white-space: nowrap; }
.inline-form { display: inline-flex; margin: 0; }
.report-filter-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}
.report-filter-grid label {
  min-width: 0;
}
.report-filter-grid .wide-field {
  grid-column: span 2;
}
.report-filter-actions {
  align-items: end;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  min-width: 0;
}
.report-table { min-width: 1320px; }
.report-table th a {
  color: var(--muted);
  display: inline-flex;
  gap: 4px;
  white-space: nowrap;
}
.report-table th a.active-sort {
  color: var(--green-dark);
}
.report-table th a.active-sort::after {
  content: "asc";
  font-size: .7rem;
}
.report-table th a.active-sort.desc::after {
  content: "desc";
}
.pagination {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}
.pagination-group { align-items: center; display: flex; gap: 8px; min-width: 120px; }
.pagination-group:last-child { justify-content: flex-end; }
.chart-wrap { height: 360px; position: relative; width: 100%; }
.chart-wrap canvas {
  cursor: grab;
  display: block;
  height: 100% !important;
  touch-action: none;
  width: 100% !important;
}
.chart-wrap canvas.is-panning {
  cursor: grabbing;
}
.chart-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.chart-mode-control {
  align-items: center;
  display: flex;
  gap: 8px;
  margin-right: auto;
}
.chart-mode-control span {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}
.chart-mode-control select {
  min-width: 210px;
  padding: 7px 30px 7px 10px;
}
.chart-help {
  color: var(--muted);
  font-size: .85rem;
  margin: -2px 0 10px;
}
.diagnostic-score-group {
  background: linear-gradient(90deg, rgba(201, 146, 37, .08), #fff 24%);
  border-color: #d8c18c;
}
.sat-score-group {
  background: linear-gradient(90deg, rgba(23, 78, 166, .10), #fff 24%);
  border-color: #adc4e8;
}
.psat-score-group {
  background: linear-gradient(90deg, rgba(25, 55, 109, .12), #fff 24%);
  border-color: #9eafd0;
}
.act-score-group {
  background: linear-gradient(90deg, rgba(156, 36, 66, .10), #fff 24%);
  border-color: #dfacb8;
}
.date-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.date-chip-grid span {
  background: #eef5f1;
  border: 1px solid #cfe0d8;
  border-radius: 8px;
  color: var(--green-dark);
  font-weight: 750;
  padding: 7px 10px;
}
.calendar-grid {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  overflow: hidden;
}
.calendar-agenda { display: none; }
.calendar-agenda-event {
  align-items: start;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 12px;
  grid-template-columns: 100px 1fr;
  padding: 12px;
  text-align: left;
  width: 100%;
}
.calendar-agenda-event time { color: var(--muted); font-size: .84rem; font-weight: 800; }
.calendar-agenda-event span, .calendar-agenda-event small { display: block; }
.calendar-agenda-event small { color: var(--muted); margin-top: 2px; }
.calendar-agenda-event.exam { border-left-color: var(--gold); }
.calendar-agenda-event.score { border-left-color: var(--blue); }
.calendar-agenda-event.plan { border-left-color: var(--red); }
.calendar-agenda-event.completed { opacity: .6; }
.calendar-agenda-event:hover { background: #f7faf8; border-color: #abc5b8; }
.empty-state {
  align-items: center;
  background: #f7f9f7;
  border: 1px dashed #bfcac4;
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 30px 18px;
  text-align: center;
}
.empty-state strong { color: var(--ink); }
.compact-empty-state { padding: 20px 16px; }
.compact-empty-state .button-row { justify-content: center; margin-top: 6px; }
.calendar-weekday {
  background: #eef5f1;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  padding: 8px;
  text-align: center;
  text-transform: uppercase;
}
.calendar-day {
  background: #fff;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  min-height: 132px;
  padding: 8px;
}
.calendar-day:nth-child(7n) {
  border-right: 0;
}
.calendar-day time {
  color: var(--muted);
  display: block;
  font-size: .84rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.calendar-day.outside-month {
  background: #f8faf8;
}
.calendar-day.outside-month time {
  opacity: .45;
}
.calendar-event-list {
  display: grid;
  gap: 5px;
}
.calendar-event {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 1px;
  min-height: 40px;
  padding: 6px 7px;
  text-align: left;
  width: 100%;
}
.calendar-event strong {
  font-size: .82rem;
  line-height: 1.2;
}
.calendar-event span {
  color: var(--muted);
  font-size: .74rem;
  line-height: 1.25;
}
.calendar-event.exam { border-left-color: var(--gold); }
.calendar-event.score { border-left-color: var(--blue); }
.calendar-event.plan { border-left-color: var(--red); }
.calendar-event.bts-start { border-left-color: var(--green); background: #e7f2ec; }
.calendar-event.completed { opacity: .55; }
.event-dialog {
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 22px 55px rgba(23, 33, 29, .24);
  color: var(--ink);
  max-width: 640px;
  padding: 22px;
  width: min(640px, calc(100vw - 32px));
}
.event-dialog::backdrop {
  background: rgba(23, 33, 29, .34);
}
.event-dialog-heading {
  align-items: flex-start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin-bottom: 18px;
}
.compact-form {
  gap: 14px;
}
.dialog-readout {
  display: grid;
  gap: 14px;
}
.session-card-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.session-card-shell {
  position: relative;
}
.session-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 4px;
  min-height: 130px;
  padding: 14px 54px 48px 14px;
}
.session-card span { color: var(--gold); font-weight: 800; }
.session-card p { color: var(--muted); margin: 0; }
.session-card-complete {
  background: #e7eeea;
  border: 0;
  border-radius: 8px;
  bottom: 10px;
  color: var(--green-dark);
  cursor: pointer;
  font: inherit;
  font-size: .85rem;
  font-weight: 800;
  min-height: 30px;
  padding: 0 10px;
  position: absolute;
  right: 10px;
}
.session-card-delete {
  margin: 0;
  position: absolute;
  right: 10px;
  top: 10px;
}
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 18px;
  position: relative;
}
.timeline::before {
  background: var(--line);
  bottom: 8px;
  content: "";
  left: 4px;
  position: absolute;
  top: 8px;
  width: 2px;
}
.timeline-event {
  display: grid;
  gap: 6px;
  grid-template-columns: 120px 1fr;
  padding: 0 0 18px 18px;
  position: relative;
}
.timeline-event::before {
  background: var(--green);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line);
  content: "";
  height: 14px;
  left: -20px;
  position: absolute;
  top: 4px;
  width: 14px;
}
.timeline-event.exam::before { background: var(--gold); }
.timeline-event.score::before { background: var(--blue); }
.timeline-event.session::before { background: var(--green); }
.timeline-event.plan::before { background: var(--red); }
.timeline-event.bts-start::before { background: var(--green-dark); }
.timeline-event.completed { opacity: .55; }
.timeline-event time { color: var(--muted); font-weight: 800; }
.timeline-event span { color: var(--muted); display: block; }
.weekday-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.checkbox-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 8px;
  justify-content: center;
  min-height: 52px;
  padding: 10px;
}
.danger-panel { border-color: #edb8c0; }
.quick-skill-form { align-items: center; display: flex; gap: 8px; }
.quick-skill-form select, .quick-skill-form input { min-width: 230px; }
.skills-intro { align-items: center; display: flex; gap: 20px; justify-content: space-between; }
.active-lesson-grid { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin-bottom: 16px; }
.lesson-action-card { background: #f7faf8; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 10px; padding: 16px; }
.lesson-action-card form { display: grid; gap: 6px; }
.skills-intro p { margin: 4px 0 0; }
.skill-set-panel { padding-left: 0; padding-right: 0; }
.skill-set-panel > .panel-heading { padding: 0 20px; }
.skills-table { border-collapse: collapse; min-width: 1120px; width: 100%; }
.skills-table th, .skills-table td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: middle; }
.skills-table thead th { background: #eef3f0; color: var(--muted); font-size: .72rem; letter-spacing: .04em; position: sticky; text-transform: uppercase; top: 64px; z-index: 2; }
.skills-sticky-header {
  background: #eef3f0;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 5px rgba(20, 33, 28, .10);
  overflow: hidden;
  pointer-events: none;
  position: fixed;
  z-index: 9;
}
.skills-sticky-header .skills-table { margin: 0; }
.skills-sticky-header .skills-table thead th { position: static; }
.skills-table input[type="date"], .skills-table select { min-width: 126px; padding: 7px; }
.skills-table textarea { min-width: 230px; resize: vertical; width: 100%; }
.skill-group-row th { background: #f6f8f6; }
.skill-tree-toggle { align-items: center; background: none; border: 0; color: var(--ink); cursor: pointer; display: flex; font: inherit; font-weight: 850; gap: 7px; padding: 3px; }
.skill-tree-toggle span::before { content: "\25BC"; color: var(--green); display: inline-block; font-size: .72rem; width: 12px; }
.skill-tree-toggle[aria-expanded="false"] span::before { content: "\25B6"; }
.skill-category-actions { align-items: center; display: flex; gap: 10px; justify-content: space-between; }
.skill-remove {
  background: transparent;
  border: 0;
  border-radius: 3px;
  color: #b8c1bb;
  cursor: pointer;
  font: inherit;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1;
  opacity: .7;
  padding: 2px 4px;
}
.skill-remove:hover { background: transparent; color: var(--red); opacity: 1; }
.skill-remove:focus-visible { outline: 2px solid #a7c7b8; outline-offset: 2px; }
.skill-check { align-items: flex-start; display: flex; font-weight: 700; gap: 8px; min-width: 220px; }
.skill-check input { margin-top: 4px; }
.live-score-layout {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
}
.qr-panel {
  align-content: start;
  display: grid;
  gap: 14px;
  justify-items: center;
  min-height: min(76vh, 820px);
  text-align: center;
}
.qr-panel img {
  aspect-ratio: 1 / 1;
  background: #fff;
  height: auto;
  max-height: min(70vh, 760px);
  max-width: min(100%, 760px);
  object-fit: contain;
  width: min(100%, 760px);
}
.live-score-queue {
  max-height: min(76vh, 820px);
  min-width: 0;
  overflow: auto;
}
.live-score-queue .panel-heading { margin-bottom: 12px; }
.live-score-received-list { display: grid; gap: 8px; }
.live-score-received {
  background: #f7faf8;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px 10px;
}
.live-score-received strong { overflow-wrap: anywhere; }
.live-score-received span { color: var(--muted); font-size: .82rem; }
.live-score-url { overflow-wrap: anywhere; }
.public-score-shell { margin: 0 auto; max-width: 780px; width: 100%; }
.public-score-heading { margin-bottom: 22px; text-align: center; }
.public-score-heading h1 { font-size: clamp(1.8rem, 6vw, 3rem); }
.public-score-submit { min-height: 52px; width: 100%; }
.public-score-success { min-height: 260px; }

@media (max-width: 820px) {
  .live-score-layout { grid-template-columns: 1fr; }
  .qr-panel { min-height: 0; }
  .qr-panel img { max-height: 62vh; max-width: min(100%, 560px); width: 100%; }
  .live-score-queue { max-height: none; }
  .active-lesson-grid { grid-template-columns: 1fr; }
  .skills-intro { align-items: stretch; flex-direction: column; }
  .skills-table thead th { top: 58px; }
  .session-report-row { align-items: stretch; grid-template-columns: 1fr; }
  .session-report-worksheets { align-items: flex-start; }
  .topbar { align-items: stretch; display: block; min-height: 58px; padding: 8px 16px; }
  .topbar-primary { justify-content: space-between; min-height: 42px; }
  .menu-toggle { display: inline-flex; }
  .topbar-menu {
    align-items: stretch;
    display: none;
    gap: 8px;
    margin: 6px 0 4px;
  }
  .topbar-menu.is-open { display: grid; }
  .topbar nav { display: grid; gap: 2px; margin: 0; }
  .topbar nav a { padding: 10px 12px; }
  .account-menu {
    border-top: 1px solid var(--line);
    justify-content: space-between;
    padding: 8px 4px 0 12px;
  }
  .user-greeting { white-space: normal; }
  .shell { padding: 20px; }
  .report-filter-grid .wide-field { grid-column: span 1; }
  .report-filter-actions { justify-content: flex-start; }
  .login-panel, .form-grid, .metric-grid, .module-grid, .widget-grid, .two-column, .weekday-grid, .score-form-grid, .score-section-grid, .report-filter-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .page-heading { align-items: flex-start; margin-bottom: 16px; }
  .page-heading h1 { font-size: clamp(2rem, 9vw, 2.8rem); overflow-wrap: anywhere; }
  .page-heading .button-row { justify-content: flex-end; }
  .search-row { grid-template-columns: 1fr; }
  .student-row { align-items: flex-start; flex-direction: column; }
  .record-list div { grid-template-columns: 1fr; }
  .timeline-event { grid-template-columns: 1fr; }
  .calendar-grid { display: none; }
  .calendar-agenda { display: grid; gap: 8px; }
  .profile-module { min-height: 0; }
  .student-nav { margin-bottom: 18px; }
  .configuration-table { min-width: 0; }
  .configuration-table thead { display: none; }
  .configuration-table, .configuration-table tbody, .configuration-table tr, .configuration-table td { display: block; width: 100%; }
  .configuration-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .configuration-table tr:last-child { border-bottom: 0; }
  .configuration-table td {
    border: 0;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(110px, 42%) 1fr;
    overflow-wrap: anywhere;
    padding: 5px 0;
  }
  .configuration-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
  }
  .pagination { justify-content: space-between; }
  .pagination-group { min-width: 0; }
  .list-summary { align-items: flex-start; gap: 8px; }
}

@media (max-width: 520px) {
  .shell { padding: 16px; }
  .page-heading { flex-direction: column; gap: 12px; }
  .page-heading .button-row { justify-content: flex-start; width: 100%; }
  .page-heading .primary-button, .page-heading .secondary-button { min-height: 40px; padding: 0 12px; }
  .panel { padding: 16px; }
  .calendar-agenda-event { grid-template-columns: 82px 1fr; }
  .pagination { display: grid; grid-template-columns: 1fr auto 1fr; }
  .pagination .ghost-button { display: none; }
  .chart-mode-control { align-items: stretch; flex: 1 0 100%; }
  .chart-mode-control select { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
