:root {
  color-scheme: dark;
  --color-background-primary: #0b0f0e;
  --color-background-secondary: #121917;
  --color-background-tertiary: #1d2a26;
  --color-border-tertiary: #2d3f3a;
  --color-border-secondary: #4a625b;
  --color-text-primary: #ffffff;
  --color-text-secondary: #d7e1de;
  --color-text-tertiary: #91a39e;
  --purple: #6fc7b5;
  --purple-soft: #102e28;
  --green: #7bd88f;
  --green-soft: #122a1a;
  --gold: #f2c166;
  --gold-soft: #332714;
  --red: #6fc7b5;
  --red-soft: #102e28;
  --start-background: #000000;
  --page-background: #050706;
  --input-background: #0e1412;
  --highlight-background: rgba(111, 199, 181, 0.18);
  --brand-subtitle-color: #d7e1de;
  --theme-progress-gradient: linear-gradient(90deg, #6fc7b5, #7bd88f);
  --theme-progress-soft-gradient: linear-gradient(135deg, rgba(111, 199, 181, 0.14), rgba(123, 216, 143, 0.08) 58%, transparent);
  --theme-progress-step-start: #6fc7b5;
  --theme-progress-step-details: #70cfa5;
  --theme-progress-step-verify: #72d79a;
  --theme-progress-step-feedback: #75dc91;
  --theme-progress-step-export: #7bd88f;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
}

:root[data-theme="light"],
body[data-theme="light"] {
  color-scheme: light;
  --color-background-primary: #fbfdfb;
  --color-background-secondary: #f1f7f4;
  --color-background-tertiary: #e2eee9;
  --color-border-tertiary: #cbdad4;
  --color-border-secondary: #9db6ae;
  --color-text-primary: #101815;
  --color-text-secondary: #33443f;
  --color-text-tertiary: #6d827b;
  --purple: #357f70;
  --purple-soft: #dcefe9;
  --green: #237b48;
  --green-soft: #dff3e5;
  --gold: #9b6a20;
  --gold-soft: #f7ead3;
  --red: #357f70;
  --red-soft: #dcefe9;
  --start-background: #f6fbf8;
  --page-background: #eef5f1;
  --input-background: #ffffff;
  --highlight-background: #e0f2ec;
  --brand-subtitle-color: #33443f;
  --theme-progress-gradient: linear-gradient(90deg, #357f70, #237b48);
  --theme-progress-soft-gradient: linear-gradient(135deg, rgba(53, 127, 112, 0.16), rgba(35, 123, 72, 0.08) 58%, transparent);
  --theme-progress-step-start: #357f70;
  --theme-progress-step-details: #2f7e64;
  --theme-progress-step-verify: #2b7d5a;
  --theme-progress-step-feedback: #277c51;
  --theme-progress-step-export: #237b48;
}

:root[data-theme="monet_light"],
body[data-theme="monet_light"] {
  color-scheme: light;
  --color-background-primary: #fbfcff;
  --color-background-secondary: #eef6fb;
  --color-background-tertiary: #dfeefa;
  --color-border-tertiary: #c7d9e9;
  --color-border-secondary: #8fb0cb;
  --color-text-primary: #162238;
  --color-text-secondary: #354b69;
  --color-text-tertiary: #7186a4;
  --purple: #476fb6;
  --purple-soft: #dfe8fa;
  --green: #2c7f75;
  --green-soft: #d8f0ed;
  --gold: #a1742b;
  --gold-soft: #f4ead4;
  --red: #b45b91;
  --red-soft: #f3ddeb;
  --start-background: #f4f9ff;
  --page-background: #eaf4fb;
  --input-background: #ffffff;
  --highlight-background: #dbeeff;
  --brand-subtitle-color: #354b69;
  --theme-progress-gradient: linear-gradient(90deg, #476fb6, #2c7f75 52%, #b45b91);
  --theme-progress-soft-gradient: linear-gradient(135deg, rgba(71, 111, 182, 0.17), rgba(180, 91, 145, 0.10) 58%, transparent);
  --theme-progress-step-start: #476fb6;
  --theme-progress-step-details: #3c79a8;
  --theme-progress-step-verify: #2c7f75;
  --theme-progress-step-feedback: #7a739e;
  --theme-progress-step-export: #b45b91;
}

:root[data-theme="socrates_dark"],
body[data-theme="socrates_dark"] {
  color-scheme: dark;
  --color-background-primary: #171512;
  --color-background-secondary: #211d18;
  --color-background-tertiary: #302a22;
  --color-border-tertiary: #51473a;
  --color-border-secondary: #7a6651;
  --color-text-primary: #fff8ec;
  --color-text-secondary: #e6d8c3;
  --color-text-tertiary: #b8a58e;
  --purple: #d1a35c;
  --purple-soft: #372713;
  --green: #8aa38d;
  --green-soft: #1d2a20;
  --gold: #e2b862;
  --gold-soft: #3b2b13;
  --red: #b75b3e;
  --red-soft: #351b14;
  --start-background: #0d0b09;
  --page-background: #100e0c;
  --input-background: #1c1814;
  --highlight-background: rgba(209, 163, 92, 0.22);
  --brand-subtitle-color: #e6d8c3;
  --theme-progress-gradient: linear-gradient(90deg, #d1a35c, #b75b3e 52%, #8aa38d);
  --theme-progress-soft-gradient: linear-gradient(135deg, rgba(209, 163, 92, 0.16), rgba(183, 91, 62, 0.10) 60%, transparent);
  --theme-progress-step-start: #d1a35c;
  --theme-progress-step-details: #c9834d;
  --theme-progress-step-verify: #b75b3e;
  --theme-progress-step-feedback: #a07958;
  --theme-progress-step-export: #8aa38d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--page-background);
  color: var(--color-text-primary);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}
html.mode-app .marketing-page {
  display: none;
}

html.mode-marketing,
html:not(.mode-app) {
  scroll-padding-top: 0;
}

html.mode-marketing .auth-landing,
html.mode-marketing .scholar-shell,
html.mode-marketing .sidebar-file-tab,
html:not(.mode-app) body.is-marketing-site .auth-landing,
html:not(.mode-app) body.is-marketing-site .scholar-shell,
html:not(.mode-app) body.is-marketing-site .sidebar-file-tab {
  display: none !important;
}

html.mode-marketing body,
html:not(.mode-app) body.is-marketing-site {
  overflow: auto;
  background: #f5faf7;
  color: #13211d;
  scroll-padding-top: 0;
}

.marketing-page {
  min-height: 100vh;
  background: #f5faf7;
  color: #13211d;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.marketing-page a {
  color: inherit;
  text-decoration: none;
}

.marketing-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px clamp(20px, 4vw, 40px);
  background: rgba(245, 250, 247, 0.9);
  backdrop-filter: blur(16px);
}

.marketing-logo {
  font-family: CenturyGothicWeb, "Century Gothic", AppleGothic, sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 0;
}

.marketing-links {
  display: flex;
  justify-content: center;
  gap: 22px;
  color: #52645f;
  font-size: 0.95rem;
  font-weight: 700;
}

.marketing-nav-cta,
.marketing-primary,
.marketing-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
}

.marketing-nav-cta,
.marketing-primary {
  background: #357f70;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(53, 127, 112, 0.22);
}

.marketing-secondary {
  border: 1px solid #c8d8d1;
  color: #214039;
  background: #ffffff;
}

.marketing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: clamp(34px, 6vw, 78px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(56px, 8vw, 108px) clamp(20px, 4vw, 40px) 72px;
}

.marketing-eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: #357f70;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.marketing-hero h1,
.marketing-section h2,
.marketing-band h2,
.marketing-cta h2 {
  margin: 0;
  color: #101815;
  letter-spacing: 0;
  line-height: 1.02;
}

.marketing-hero h1 {
  max-width: 760px;
  font-size: clamp(46px, 6.7vw, 82px);
}

.marketing-lede {
  max-width: 700px;
  margin: 22px 0 0;
  color: #425650;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.marketing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.marketing-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 660px;
  margin: 34px 0 0;
}

.marketing-proof div {
  padding: 16px;
  border: 1px solid #d7e5df;
  border-radius: 8px;
  background: #ffffff;
}

.marketing-proof dt {
  color: #102e28;
  font-size: 1.25rem;
  font-weight: 900;
}

.marketing-proof dd {
  margin: 4px 0 0;
  color: #60736e;
  font-size: 0.92rem;
}

.marketing-product-shot {
  border: 1px solid #cadbd4;
  border-radius: 12px;
  background: #0b0f0e;
  box-shadow: 0 28px 80px rgba(18, 34, 29, 0.24);
  overflow: hidden;
}

.product-topline {
  display: flex;
  gap: 7px;
  padding: 14px 16px;
  border-bottom: 1px solid #20332e;
}

.product-topline span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #6fc7b5;
  opacity: 0.65;
}

.product-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 12px;
  padding: 16px;
}

.product-panel {
  min-height: 150px;
  padding: 16px;
  border: 1px solid #243a34;
  border-radius: 8px;
  background: #121917;
}

.product-panel-main {
  grid-row: span 2;
}

.product-panel-wide {
  min-height: 110px;
}

.product-panel p {
  margin: 0 0 14px;
  color: #d7e1de;
  font-size: 0.82rem;
  font-weight: 900;
}

.draft-line,
.note-line {
  height: 12px;
  margin-top: 12px;
  border-radius: 999px;
  background: #2d3f3a;
}

.draft-line.long { width: 92%; }
.draft-line.medium { width: 72%; }
.draft-line.short { width: 48%; }
.draft-line.flagged-ai { width: 82%; background: rgb(54 128 114); }
.draft-line.flagged-tutor { width: 68%; background: rgb(187 107 18); }
.note-line { width: 86%; background: #6fc7b5; }
.note-line.small { width: 58%; opacity: 0.65; }

.score-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid #243a34;
  color: #d7e1de;
}

.score-row strong {
  color: #ffffff;
}

.marketing-section,
.marketing-band,
.marketing-cta {
  scroll-margin-top: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 78px clamp(20px, 4vw, 40px);
}

.marketing-section h2,
.marketing-band h2,
.marketing-cta h2 {
  max-width: 820px;
  font-size: clamp(34px, 4.2vw, 58px);
}

.marketing-feature-grid,
.marketing-ops-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 30px;
}

.marketing-feature-grid article,
.marketing-ops-grid article {
  padding: 24px;
  border: 1px solid #d7e5df;
  border-radius: 8px;
  background: #ffffff;
}

.marketing-feature-grid h3,
.marketing-ops-grid span {
  display: block;
  margin: 0 0 10px;
  color: #102e28;
  font-size: 1.08rem;
  font-weight: 900;
}

.marketing-feature-grid p,
.marketing-ops-grid p,
.marketing-cta p,
.workflow-list span {
  margin: 0;
  color: #536762;
  line-height: 1.55;
}

.marketing-band {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 32px;
  border-top: 1px solid #dbe8e2;
  border-bottom: 1px solid #dbe8e2;
}

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

.workflow-list li {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 18px;
  padding: 18px;
  border: 1px solid #d7e5df;
  border-radius: 8px;
  background: #ffffff;
}

.workflow-list strong {
  color: #102e28;
}

.marketing-ops-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.marketing-cta {
  margin-bottom: 40px;
  border-radius: 12px;
  background: #102e28;
  color: #ffffff;
}

.marketing-cta h2,
.marketing-cta p {
  color: #ffffff;
}

.marketing-cta p {
  max-width: 760px;
  margin: 18px 0 28px;
  color: #c8d8d1;
}

@media (max-width: 900px) {
  .marketing-nav {
    grid-template-columns: 1fr auto;
  }

  .marketing-links {
    display: none;
  }

  .marketing-hero,
  .marketing-band {
    grid-template-columns: 1fr;
  }

  .marketing-feature-grid,
  .marketing-ops-grid,
  .marketing-proof {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .workflow-list li {
    grid-template-columns: 1fr;
  }
}

.auth-landing {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(320px, 440px);
  align-items: center;
  gap: clamp(28px, 6vw, 88px);
  width: 100vw;
  height: 100vh;
  padding: clamp(24px, 7vw, 92px);
  background:
    linear-gradient(135deg, rgba(111, 199, 181, 0.14), transparent 42%),
    var(--page-background);
}

body.is-authenticated .auth-landing {
  display: none;
}

body.is-auth-checking .auth-card {
  display: none;
}

.auth-check-card {
  display: none;
  gap: 18px;
  align-items: center;
  padding: 28px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-lg);
  background: var(--color-background-secondary);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

body.is-auth-checking .auth-check-card {
  display: grid;
}

.auth-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--color-border-tertiary);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: auth-spin 0.9s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

body.is-auth-gated .scholar-shell,
body.is-auth-gated .sidebar-file-tab {
  display: none;
}

.auth-brand {
  display: grid;
  align-content: center;
  gap: 10px;
  max-width: 580px;
}

.auth-brand .brand {
  font-size: clamp(54px, 9vw, 118px);
  letter-spacing: 0;
}

.auth-brand p {
  margin: 0;
  color: var(--brand-subtitle-color);
  font-size: clamp(18px, 3vw, 30px);
  font-weight: 700;
}

.auth-card {
  display: grid;
  gap: 20px;
  padding: 28px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-lg);
  background: var(--color-background-secondary);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.auth-card h1 {
  margin: 4px 0 0;
  font-size: 32px;
  line-height: 1.05;
}

.auth-copy,
.auth-status {
  margin: 8px 0 0;
  color: var(--color-text-tertiary);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.auth-actions .text-button {
  width: 100%;
  justify-content: center;
  min-height: 44px;
}

.auth-secondary {
  border: 1px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
}

.gsi-material-button {
  -moz-user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
  -webkit-appearance: none;
  background-color: white;
  background-image: none;
  border: 1px solid #747775;
  -webkit-border-radius: 20px;
  border-radius: 20px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  color: #1f1f1f;
  cursor: pointer;
  font-family: Roboto, arial, sans-serif;
  font-size: 14px;
  height: 40px;
  letter-spacing: 0.25px;
  outline: none;
  overflow: hidden;
  padding: 0 12px;
  position: relative;
  text-align: center;
  -webkit-transition: background-color 0.218s, border-color 0.218s, box-shadow 0.218s;
  transition: background-color 0.218s, border-color 0.218s, box-shadow 0.218s;
  vertical-align: middle;
  white-space: nowrap;
  width: 100%;
  max-width: 400px;
  min-width: min-content;
  justify-self: center;
}

.gsi-material-button .gsi-material-button-icon {
  height: 20px;
  margin-right: 10px;
  min-width: 20px;
  width: 20px;
}

.gsi-material-button .gsi-material-button-content-wrapper {
  -webkit-align-items: center;
  align-items: center;
  display: flex;
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-flex-wrap: nowrap;
  flex-wrap: nowrap;
  height: 100%;
  justify-content: space-between;
  position: relative;
  width: 100%;
}

.gsi-material-button .gsi-material-button-contents {
  -webkit-flex-grow: 1;
  flex-grow: 1;
  font-family: Roboto, arial, sans-serif;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}

.gsi-material-button .gsi-material-button-state {
  -webkit-transition: opacity 0.218s;
  transition: opacity 0.218s;
  bottom: 0;
  left: 0;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.gsi-material-button:disabled {
  cursor: default;
  background-color: #ffffff61;
  border-color: #1f1f1f1f;
}

.gsi-material-button:disabled .gsi-material-button-contents,
.gsi-material-button:disabled .gsi-material-button-icon {
  opacity: 38%;
}

.gsi-material-button:not(:disabled):active .gsi-material-button-state,
.gsi-material-button:not(:disabled):focus .gsi-material-button-state {
  background-color: #303030;
  opacity: 12%;
}

.gsi-material-button:not(:disabled):hover {
  -webkit-box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.gsi-material-button:not(:disabled):hover .gsi-material-button-state {
  background-color: #303030;
  opacity: 8%;
}

.auth-status.is-connected {
  color: var(--green);
}

.auth-status.is-error {
  color: var(--gold);
}

body.is-auth-signed-out .auth-card {
  border-color: rgba(123, 216, 143, 0.35);
}

body.is-auth-signed-out .auth-card h1 {
  color: var(--green);
}

body.is-auth-signed-out #landingStatus {
  display: none;
}

@media (max-width: 760px) {
  .api-error-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .api-error-banner .text-button {
    width: 100%;
    justify-content: center;
  }

  .auth-landing {
    grid-template-columns: 1fr;
    align-content: center;
    gap: 24px;
    padding: 22px;
    overflow-y: auto;
  }

  .auth-brand .brand {
    font-size: 56px;
  }

  .auth-card {
    padding: 22px;
  }
}

.scholar-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background: var(--color-background-primary);
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  overflow: hidden;
  padding: 0.9rem;
  background: var(--color-background-secondary);
  border-right: 0.5px solid var(--color-border-tertiary);
  transition: transform 180ms ease, opacity 180ms ease, padding 180ms ease;
}

.scholar-shell.is-sidebar-collapsed {
  grid-template-columns: 0 minmax(0, 1fr) !important;
}

.scholar-shell.is-sidebar-collapsed .sidebar {
  padding-right: 0;
  padding-left: 0;
  border-right: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

.sidebar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-file-tab {
  position: fixed;
  z-index: 20;
  left: 230px;
  bottom: 18px;
  width: 36px;
  min-height: 46px;
  padding: 0;
  border: 0.5px solid var(--color-border-tertiary);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  background: var(--color-background-secondary);
  color: var(--color-text-primary);
  font-size: 22px;
  font-weight: 750;
  line-height: 1;
  box-shadow: 6px 8px 22px rgba(0, 0, 0, 0.22);
  transition: left 180ms ease, background 180ms ease;
}

.sidebar-file-tab:hover {
  background: var(--color-background-tertiary);
}

.scholar-shell.is-sidebar-collapsed .sidebar-file-tab {
  left: 0;
}

.brand {
  color: var(--red);
  font-family: CenturyGothicWeb, "Century Gothic", "Avenir Next", Arial, sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.subtle {
  margin: 2px 0 0;
  color: var(--color-text-tertiary);
  font-size: 12px;
}

.brand-subtitle {
  color: var(--brand-subtitle-color);
  font-weight: 700;
}

.side-group {
  display: grid;
  gap: 6px;
}

.side-label,
.eyebrow {
  margin: 0;
  color: var(--color-text-tertiary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.side-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border: 0;
  border-radius: var(--border-radius-md);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 13px;
  text-decoration: none;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  background: var(--color-background-tertiary);
  color: var(--color-text-primary);
}

.nav-item.active {
  font-weight: 600;
}

.profile-card {
  padding: 8px 10px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.student-option {
  width: 100%;
  text-align: left;
  color: inherit;
}

.student-list {
  display: grid;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.student-roster {
  min-height: 0;
  overflow: hidden;
  flex: 1 1 auto;
}

.student-empty {
  margin: 0;
  padding: 8px 10px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  color: var(--color-text-tertiary);
  font-size: 12px;
}

.student-option.active {
  border-color: rgba(111, 199, 181, 0.8);
  background: var(--color-background-tertiary);
}

.student-search {
  position: relative;
}

.student-search input {
  width: 100%;
  min-height: 34px;
  border: 0.5px solid var(--color-border-secondary);
  border-radius: var(--border-radius-md);
  background: var(--input-background);
  color: var(--color-text-primary);
  padding: 8px 10px;
  outline: none;
  font-size: 12px;
}

.student-search input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(111, 199, 181, 0.16);
}

.student-search-results {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  display: none;
  max-height: 190px;
  overflow-y: auto;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.student-search-results.is-open {
  display: block;
}

.student-search-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 0;
  border-bottom: 0.5px solid var(--color-border-tertiary);
  background: transparent;
  color: var(--color-text-primary);
  text-align: left;
}

.student-search-option:last-child {
  border-bottom: 0;
}

.student-search-option:hover {
  background: var(--color-background-tertiary);
}

.profile-row,
.badge-row,
.topbar,
.topbar-actions,
.view-toggle,
.workspace,
.section-heading,
.form-actions,
.summary-band,
.dimension-top,
.dimension-meta,
.override-row,
.review-state,
.feedback-time,
.feedback-save-state,
.toggle,
.score-line,
.student-score,
.check-row,
.score-card-top {
  display: flex;
  align-items: center;
}

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

.profile-row > div {
  min-width: 0;
}

.profile-row strong {
  display: block;
  min-width: 0;
  color: var(--color-text-primary);
  font-size: 13px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.profile-row span {
  display: block;
  min-width: 0;
  margin-top: 1px;
  color: var(--color-text-tertiary);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.profile-row.inset {
  padding: 0 10px;
}

.tutor-profile-button {
  width: 100%;
  min-height: 42px;
  border: 0.5px solid transparent;
  border-radius: var(--border-radius-md);
  background: transparent;
  color: inherit;
  text-align: left;
}

.tutor-profile-button:hover,
.tutor-profile-button:focus-visible,
.tutor-profile-button.active {
  border-color: var(--color-border-tertiary);
  background: var(--color-background-primary);
  outline: none;
}

.avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--purple-soft);
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.avatar.green {
  background: var(--green-soft);
  color: var(--color-text-primary);
}

.avatar.gold {
  background: var(--red-soft);
  color: var(--red);
}

.badge-row {
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 650;
}

.badge.purple {
  background: var(--red-soft);
  color: var(--red);
}

.badge.green {
  background: var(--green-soft);
  color: var(--color-text-primary);
}

.badge.gold {
  background: var(--red-soft);
  color: var(--red);
}

.tutor-profile {
  padding-top: 0.75rem;
  border-top: 0.5px solid var(--color-border-tertiary);
}

.settings-panel {
  padding-top: 0.75rem;
  border-top: 0.5px solid var(--color-border-tertiary);
}

.theme-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 10px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.dev-view-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.dev-view-button {
  min-height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-tertiary);
  font-size: 11px;
  font-weight: 750;
}

.dev-view-button.active {
  background: var(--color-background-tertiary);
  color: var(--color-text-primary);
}

body[data-dev-view="tutor"] .admin-only,
body[data-auth-role="tutor"] .admin-only,
body[data-auth-role="tutor"] .dev-view-button[data-dev-view="admin"],
body[data-dev-view="admin"] .tutor-only,
body[data-dev-view="admin"] .view-toggle,
body[data-dev-view="admin"] .review-state,
body[data-dev-view="admin"] .workflow-progress {
  display: none !important;
}


.settings-signout {
  width: 100%;
  min-height: 34px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
  color: var(--color-text-primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.settings-signout:hover {
  border-color: var(--color-border-secondary);
  background: var(--color-background-tertiary);
}

.theme-select {
  min-width: 128px;
  min-height: 30px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: 6px;
  background: var(--input-background);
  color: var(--color-text-primary);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 8px;
}

.backend-status {
  margin: 0;
  color: var(--color-text-tertiary);
  font-size: 0.78rem;
  line-height: 1.35;
}

.backend-status.is-connected {
  color: var(--green);
}

.backend-status.is-error {
  color: var(--rust);
}

.api-error-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.85rem 1rem 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(187, 107, 18, 0.42);
  border-radius: 8px;
  background: rgba(187, 107, 18, 0.13);
  color: var(--color-text-primary);
}

.api-error-banner[hidden] {
  display: none;
}

.api-error-banner div {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.api-error-banner strong {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.api-error-banner span {
  color: var(--color-text-secondary);
  font-size: 0.88rem;
  line-height: 1.35;
}

.api-error-banner .text-button {
  flex: 0 0 auto;
  border-color: rgba(187, 107, 18, 0.45);
}

.app-shell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.topbar {
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 0.75rem 1rem;
  border-bottom: 0.5px solid var(--color-border-tertiary);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 2px 0 0;
  font-size: 20px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 650;
}

h3 {
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 650;
}

.topbar-actions {
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.view-toggle {
  gap: 2px;
  padding: 3px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

.tab {
  min-height: 29px;
  padding: 5px 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 12px;
  white-space: nowrap;
}

.tab.is-active {
  border: 0.5px solid var(--color-border-tertiary);
  background: var(--color-background-primary);
  color: var(--color-text-primary);
  font-weight: 650;
}

.review-state {
  gap: 8px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.state-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
}

.review-state.is-ready .state-dot {
  background: var(--green);
}

.feedback-time {
  gap: 8px;
  min-height: 28px;
  padding: 4px 10px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: 20px;
  background: var(--color-background-secondary);
  color: var(--color-text-tertiary);
  font-size: 11px;
  font-weight: 650;
}

.feedback-time[hidden],
.feedback-save-state[hidden] {
  display: none;
}

.feedback-time strong {
  color: var(--color-text-primary);
  font-size: 12px;
}

.feedback-save-state {
  min-height: 28px;
  padding: 4px 10px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: 20px;
  background: var(--color-background-secondary);
  color: var(--color-text-tertiary);
  font-size: 11px;
  font-weight: 700;
}

.feedback-save-state.is-saved {
  color: var(--green);
}

.feedback-save-state.is-saving {
  color: var(--gold);
}

.feedback-save-state.is-error {
  color: var(--red);
}

.workflow-progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(46px, 1fr));
  align-items: center;
  gap: 6px;
  min-width: min(420px, 45vw);
  padding: 8px 10px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: 999px;
  background:
    var(--theme-progress-soft-gradient),
    var(--color-background-secondary);
}

.workflow-progress.no-ai-review {
  grid-template-columns: repeat(4, minmax(46px, 1fr));
}

.workflow-progress::before {
  content: "";
  position: absolute;
  left: 32px;
  right: 32px;
  top: 17px;
  height: 2px;
  background: var(--theme-progress-gradient);
  opacity: 0.38;
}

.workflow-step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--color-text-tertiary);
  font-size: 10px;
  font-weight: 700;
}

.workflow-step[hidden] {
  display: none !important;
}

.workflow-step span {
  width: 13px;
  height: 13px;
  border: 2px solid var(--color-border-secondary);
  border-radius: 50%;
  background: var(--color-background-primary);
  box-shadow: 0 0 0 3px var(--color-background-secondary);
}

.workflow-step.is-complete,
.workflow-step.is-active {
  color: var(--color-text-primary);
}

.workflow-step[data-progress-step="start"] {
  --workflow-step-color: var(--theme-progress-step-start);
}

.workflow-step[data-progress-step="details"] {
  --workflow-step-color: var(--theme-progress-step-details);
}

.workflow-step[data-progress-step="review"] {
  --workflow-step-color: var(--theme-progress-step-verify);
}

.workflow-step[data-progress-step="tutor"] {
  --workflow-step-color: var(--theme-progress-step-feedback);
}

.workflow-step[data-progress-step="save"] {
  --workflow-step-color: var(--theme-progress-step-export);
}

.workflow-step.is-complete span {
  border-color: transparent;
  background: var(--workflow-step-color);
}

.workflow-step.is-active span {
  border-color: transparent;
  background: var(--workflow-step-color);
  box-shadow: 0 0 0 3px var(--color-background-secondary), 0 0 18px color-mix(in srgb, var(--workflow-step-color) 42%, transparent);
}

.workspace {
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 1rem;
}

.workspace-view {
  display: none;
}

.workspace-view.is-active {
  display: flex;
  min-width: 0;
  max-width: 100%;
}

.profile-workspace {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem;
  justify-content: center;
  align-items: flex-start;
}

.profile-workspace.is-active {
  display: flex;
}

.panel,
.results-panel {
  min-width: 0;
  max-width: 100%;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

.composer {
  width: clamp(520px, 58vw, 760px);
  min-width: 360px;
  max-height: 100%;
  overflow-y: auto;
  padding: 0.9rem 1rem;
  resize: horizontal;
}

.results-panel {
  flex: 1;
  min-width: 320px;
  max-height: 100%;
  overflow-y: auto;
  padding: 0.9rem 1rem;
  resize: horizontal;
}

.feedback-start {
  display: none;
  flex: 1;
  min-height: 0;
  align-items: center;
  justify-content: center;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--start-background);
}

.feedback-start.is-active {
  display: flex;
}

.start-panel {
  width: min(420px, calc(100% - 32px));
  text-align: center;
}

.start-panel h2 {
  margin: 8px 0;
  font-size: 28px;
  line-height: 1.1;
}

.start-panel p:not(.eyebrow) {
  margin-bottom: 18px;
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.start-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feedback-studio {
  display: none;
  flex: 1;
  --composer-width: clamp(520px, 58vw, 760px);
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  min-width: 0;
  min-height: 0;
  align-items: stretch;
  gap: 12px;
}

.feedback-studio.is-active {
  display: flex;
}

.feedback-studio.is-choosing-essay {
  align-items: center;
  justify-content: center;
}

.feedback-studio.is-choosing-essay .composer {
  width: min(620px, 100%);
  min-width: 0;
  max-height: none;
  overflow: visible;
  resize: none;
  padding: 1.25rem;
}

.feedback-studio.is-choosing-essay .section-heading,
.feedback-studio.is-choosing-essay .essay-selector,
.feedback-studio.is-choosing-essay .tutor-input-sections,
.feedback-studio.is-choosing-essay .form-actions,
.feedback-studio.is-choosing-essay .draft-evidence,
.feedback-studio.is-choosing-essay .results-panel {
  display: none;
}

.feedback-studio.is-choosing-essay .essay-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.feedback-studio.is-choosing-essay .essay-choice.only-new {
  grid-template-columns: minmax(220px, 360px);
  justify-content: center;
}

.feedback-studio.is-choosing-essay .choice-button {
  min-height: 104px;
  padding: 18px;
  border-color: var(--color-border-tertiary);
  background: var(--color-background-primary);
  color: var(--color-text-primary);
  font-size: 17px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.16);
}

.feedback-studio.is-choosing-essay .choice-button:hover {
  border-color: var(--red);
  background: var(--red-soft);
}

.feedback-studio.has-feedback {
  --composer-width: min(480px, 42vw);
}

.feedback-studio.has-feedback .composer button[type="submit"] {
  display: none;
}

.feedback-studio:not(.has-feedback) {
  justify-content: center;
}

.feedback-studio:not(.has-feedback):not(.is-choosing-essay) .composer {
  width: min(760px, 100%);
  min-width: 0;
}

.feedback-studio:not(.has-feedback) .results-panel {
  display: none;
}

.feedback-studio .composer {
  flex: 0 1 var(--composer-width);
}

.feedback-studio .results-panel {
  flex: 1 1 360px;
}

.tutor-input-sections {
  display: grid;
  gap: 8px;
}

.input-section {
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.input-section summary {
  min-height: 36px;
  padding: 9px 12px;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.input-section[open] summary {
  border-bottom: 0.5px solid var(--color-border-tertiary);
}

.input-section .field-body {
  margin: 0;
  padding: 10px 12px 12px;
}

.essay-choice,
.analytics-range {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.choice-button,
.range-button {
  min-height: 32px;
  padding: 0 12px;
  border: 0.5px solid var(--color-border-secondary);
  border-radius: var(--border-radius-md);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.choice-button:hover,
.choice-button.active,
.range-button:hover,
.range-button.active {
  border-color: var(--red);
  background: var(--red-soft);
  color: var(--color-text-primary);
}

.essay-selector {
  margin-bottom: 12px;
  padding: 10px 12px 0;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.pdf-upload {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 78px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px dashed var(--color-border-secondary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
}

.pdf-upload.is-dragging {
  border-color: var(--red);
  background: var(--red-soft);
}

.pdf-upload.has-error {
  border-color: var(--red);
  background: var(--red-soft);
}

.pdf-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pdf-upload strong,
.pdf-upload span {
  display: block;
}

.pdf-upload strong {
  color: var(--color-text-primary);
  font-size: 13px;
}

.pdf-upload span {
  margin-top: 2px;
  font-size: 12px;
}

.pdf-upload .draft-upload-meta {
  width: fit-content;
  margin-top: 7px;
  padding: 3px 7px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-sm);
  color: var(--color-text-primary);
  background: var(--color-background-primary);
  font-size: 11px;
  font-weight: 700;
}

.profile-editor {
  width: min(980px, 100%);
  margin-inline: auto;
  padding: 1.25rem;
}

.past-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  width: min(980px, 100%);
  max-height: 100%;
  min-height: 0;
  margin-inline: auto;
  padding: 1.25rem;
}

.past-workspace {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  overflow-y: auto;
  padding: 1.25rem;
}

.past-workspace.is-active {
  display: grid;
  grid-template-columns: minmax(0, 980px);
  align-content: start;
  align-items: start;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.past-workspace > .past-panel {
  width: 100%;
}

.in-progress-report-panel {
  flex: 0 0 auto;
}

.in-progress-reports-list {
  max-height: min(320px, 34vh);
}

.tutor-portal {
  width: min(1100px, 100%);
  margin-inline: auto;
  padding: 1.25rem;
}

.admin-portal {
  width: min(980px, 100%);
  min-width: 0;
  max-width: 100%;
  margin-inline: auto;
  padding: 1.25rem;
  overflow: hidden;
}

.admin-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.admin-tutor-panel {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.admin-tutor-list {
  display: grid;
  gap: 8px;
}

.admin-tutor-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
  color: var(--color-text-primary);
  text-align: left;
}

.admin-tutor-option:hover,
.admin-tutor-option.active {
  border-color: rgba(111, 199, 181, 0.8);
  background: var(--color-background-tertiary);
}

.admin-tutor-option strong,
.admin-tutor-option span {
  display: block;
}

.admin-tutor-option strong {
  font-size: 13px;
}

.admin-tutor-option span {
  margin-top: 1px;
  color: var(--color-text-tertiary);
  font-size: 11px;
}

.admin-main {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.admin-segment-toggle {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
  max-width: 100%;
}

.admin-roster-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.admin-search,
.admin-filter {
  width: 100%;
  min-height: 34px;
  border: 0.5px solid var(--color-border-secondary);
  border-radius: var(--border-radius-md);
  background: var(--input-background);
  color: var(--color-text-primary);
  padding: 8px 10px;
  outline: none;
  font-size: 12px;
}

.admin-search:focus,
.admin-filter:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(111, 199, 181, 0.16);
}

.admin-student-list {
  min-width: 0;
  max-width: 100%;
  display: grid;
  gap: 10px;
}

.admin-student-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 72px;
  overflow: hidden;
  padding: 12px;
  cursor: pointer;
}

.admin-student-card:hover,
.admin-student-card.active {
  border-color: rgba(111, 199, 181, 0.8);
  background: var(--color-background-tertiary);
}

.admin-student-card.is-inactive {
  border-style: dashed;
  opacity: 0.78;
}

.admin-student-card .admin-tutor-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 220px);
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.admin-student-card .profile-row {
  min-width: 0;
}

.admin-student-card .profile-row > div {
  min-width: 0;
}

.admin-student-card h3,
.admin-student-card .profile-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-student-actions {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  justify-items: end;
}

.admin-student-actions span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-student-action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.admin-student-action-row .text-button {
  max-width: 100%;
  min-height: 26px;
  padding: 4px 8px;
  font-size: 11px;
}

.admin-invite-form {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr) minmax(96px, 0.5fr) auto;
  gap: 8px;
  align-items: center;
}

.admin-invite-form .text-button {
  min-height: 34px;
  white-space: nowrap;
}

.admin-user-card.is-inactive {
  border-style: dashed;
  opacity: 0.78;
}

.admin-user-card p {
  margin: 3px 0 0;
  color: var(--color-text-tertiary);
  font-size: 12px;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 0.5px solid var(--color-border-tertiary);
}

.admin-user-actions .text-button {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 11px;
}

.assignment-selection-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

.selection-count {
  margin-right: auto;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.assignment-selection-toolbar .text-button {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 11px;
}

.assignment-selection-toolbar .text-button:disabled,
.admin-user-actions .text-button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.assignment-select-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.assignment-select-row h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.assignment-select-row input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--red);
}

.assignment-card.is-inactive,
.assignment-history-row {
  opacity: 0.78;
}

.danger-button {
  color: #ff9b9b;
  border-color: rgba(255, 95, 95, 0.55);
  background: rgba(255, 95, 95, 0.12);
}

.danger-button:hover {
  border-color: rgba(255, 120, 120, 0.88);
  background: rgba(255, 95, 95, 0.2);
}

.restore-button {
  color: var(--red);
  border-color: rgba(111, 199, 181, 0.42);
  background: var(--red-soft);
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.admin-metric-card,
.admin-section,
.admin-tutor-card {
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.admin-metric-card {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.admin-metric-card span,
.admin-tutor-summary span,
.admin-report-row span {
  color: var(--color-text-tertiary);
  font-size: 12px;
  font-weight: 650;
}

.admin-metric-card strong {
  color: var(--red);
  font-size: 26px;
  line-height: 1;
}

.admin-section {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: grid;
  gap: 12px;
  padding: 12px;
}

.admin-segment-panel:not(.is-active) {
  display: none;
}

.admin-segment-panel.is-active {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: grid;
  gap: 14px;
}

.admin-tutor-stats {
  display: grid;
  gap: 10px;
}

.admin-tutor-card {
  padding: 14px;
}

.admin-tutor-head,
.admin-report-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.admin-tutor-head h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.admin-tutor-summary {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.admin-tutor-summary strong,
.admin-report-row strong {
  color: var(--red);
  font-size: 13px;
}

.admin-report-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 0.5px solid var(--color-border-tertiary);
}

.approval-toggle {
  width: min(280px, 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 8px 10px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.past-empty {
  margin-bottom: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.past-submissions-list {
  display: grid;
  gap: 14px;
  min-height: 0;
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  padding-right: 4px;
}

.tutor-report-sections {
  display: grid;
  gap: 14px;
}

.tutor-report-section {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

.tutor-report-section h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

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

.essay-thread {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

.essay-thread-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.essay-thread-head h3 {
  margin: 4px 0 0;
  font-size: 15px;
}

.essay-thread-head p {
  margin-bottom: 0;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.revision-count {
  flex: 0 0 auto;
  color: var(--color-text-tertiary);
  font-size: 12px;
  font-weight: 700;
}

.past-submission-card {
  padding: 14px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.tutor-report-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: flex-start;
  padding: 14px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.tutor-report-card h3 {
  margin: 4px 0;
  font-size: 15px;
}

.tutor-report-card p {
  margin: 0 0 6px;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.tutor-report-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.tutor-report-meta {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 0.5px solid var(--color-border-tertiary);
  color: var(--color-text-tertiary);
  font-size: 11px;
  font-weight: 700;
}

.tutor-report-meta span {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--color-background-secondary);
}

.past-submission-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.past-submission-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.past-submission-card h3 {
  margin: 4px 0;
  font-size: 15px;
}

.past-submission-card p {
  margin-bottom: 0;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.past-score {
  flex: 0 0 auto;
  color: var(--red);
  font-size: 24px;
  font-weight: 750;
}

.past-dimensions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}

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

.profile-assignment {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.profile-assignment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.profile-assignment-head .text-button {
  flex: 0 0 auto;
}

.profile-assignment-note {
  margin: 3px 0 0;
  color: var(--color-text-tertiary);
  font-size: 12px;
  line-height: 1.4;
}

.tutor-assignment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tutor-assignment-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 10px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 650;
}

.tutor-assignment-option input {
  accent-color: var(--red);
}

body[data-dev-view="tutor"] .admin-edit-only,
body[data-dev-view="tutor"] #saveProfile,
body[data-dev-view="tutor"] #addStudent {
  display: none;
}

body[data-dev-view="tutor"] .profile-editor input:disabled,
body[data-dev-view="tutor"] .profile-editor textarea:disabled {
  opacity: 1;
  color: var(--color-text-secondary);
}

.profile-preview {
  margin-top: 16px;
  padding: 16px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.profile-preview h3 {
  margin: 6px 0 4px;
  font-size: 18px;
}

.profile-preview p {
  margin-bottom: 14px;
  color: var(--color-text-secondary);
  font-size: 13px;
}

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

.profile-preview-list div {
  padding: 12px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

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

.profile-preview-list strong {
  margin-bottom: 6px;
  font-size: 12px;
}

.profile-preview-list span {
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.section-heading {
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

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

.section-heading.compact {
  margin-top: 4px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 650;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 0.5px solid var(--color-border-secondary);
  border-radius: 6px;
  background: var(--input-background);
  color: var(--color-text-primary);
  padding: 9px 10px;
  outline: none;
  font-size: 13px;
  font-weight: 450;
}

textarea {
  resize: vertical;
  line-height: 1.65;
}

input:focus,
textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(111, 199, 181, 0.16);
}

.essay-box {
  min-height: 320px;
}

.form-actions {
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.report-actions {
  justify-content: flex-start;
}

.primary-button,
.text-button,
.icon-button {
  min-height: 34px;
  border-radius: var(--border-radius-md);
  font-size: 13px;
  font-weight: 650;
}

.primary-button {
  padding: 0 16px;
  border: none;
  background: var(--red);
  color: #ffffff;
}

.primary-button:hover {
  background: #58ae9d;
}

.text-button {
  padding: 0 12px;
  border: 0.5px solid var(--color-border-secondary);
  background: transparent;
  color: var(--color-text-secondary);
}

.text-button:hover {
  background: var(--color-background-tertiary);
}

.danger-button {
  border-color: rgba(242, 193, 102, 0.48);
  color: var(--gold);
}

.danger-button:hover {
  background: var(--gold-soft);
}

.delete-button {
  color: #ffffff;
  border-color: rgba(231, 19, 19, 0.78);
  background: #9f1d1d;
}

.delete-button:hover {
  border-color: #ff6b6b;
  background: #bf2424;
}

.is-hidden {
  display: none !important;
}

.icon-button {
  width: 34px;
  display: inline-grid;
  place-items: center;
  border: 0.5px solid var(--color-border-secondary);
  background: var(--color-background-primary);
  color: var(--red);
  font-size: 20px;
  line-height: 1;
}

.add-student-button {
  width: 24px;
  min-height: 24px;
  height: 24px;
  padding: 0;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
}

.summary-band {
  justify-content: space-between;
  gap: 20px;
  min-height: 130px;
  margin-bottom: 12px;
  padding: 16px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.summary-band h2 {
  margin: 6px 0;
  font-size: 38px;
  line-height: 1;
}

.summary-band p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.score-ring {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--purple) 84%, var(--color-border-tertiary) 0);
}

.score-ring span {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--color-background-primary);
  color: var(--purple);
  font-size: 20px;
  font-weight: 750;
  white-space: nowrap;
}

.draft-evidence {
  display: none;
  margin: 2px 0 14px;
  padding: 10px 12px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--input-background);
}

.feedback-studio.has-feedback .draft-evidence {
  display: block;
}

.draft-evidence-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.draft-evidence-head span {
  color: var(--color-text-tertiary);
  font-size: 11px;
  font-weight: 650;
}

.draft-highlights {
  display: grid;
  gap: 8px;
}

.highlight-sentence {
  padding: 9px 10px;
  border: 0.5px solid rgba(111, 199, 181, 0.38);
  border-left: 3px solid var(--gold);
  border-radius: 6px;
  background: var(--highlight-background);
}

.highlight-sentence p {
  margin-bottom: 0;
  color: var(--color-text-primary);
  font-size: 12px;
  line-height: 1.55;
}

.highlight-labels {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.highlight-empty {
  margin-bottom: 0;
  color: var(--color-text-tertiary);
  font-size: 12px;
}

.inline-draft {
  display: grid;
  gap: 10px;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

.inline-draft p {
  margin-bottom: 0;
}

.inline-flag {
  display: inline;
  padding: 2px 4px;
  border-radius: 5px;
  background: var(--highlight-background);
  box-shadow: inset 0 0 0 1px rgba(111, 199, 181, 0.32);
  color: var(--color-text-primary);
}

.inline-flag.is-manual {
  background: rgba(242, 193, 102, 0.18);
  box-shadow: inset 0 0 0 1px rgba(242, 193, 102, 0.42);
}

.inline-flag.is-overlap {
  background: linear-gradient(90deg, var(--highlight-background), rgba(242, 193, 102, 0.2));
}

.draft-text {
  white-space: pre-wrap;
}

.draft-text.is-selected {
  border-radius: 4px;
  background: rgba(242, 193, 102, 0.2);
  box-shadow: inset 0 0 0 1px rgba(242, 193, 102, 0.45);
}

.inline-flag-labels {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
  margin: 0 4px 3px 0;
  vertical-align: middle;
}

.inline-flag-labels .pill {
  min-height: 18px;
  padding: 1px 6px;
  border: 0;
  cursor: pointer;
  font-size: 10px;
}

.inline-flag-labels button.pill:hover {
  filter: brightness(1.08);
}

.score-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.score-card {
  min-height: 88px;
  padding: 10px 12px;
  border: 0.5px solid transparent;
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
  text-align: left;
  color: inherit;
}

.score-card.has-flags {
  border-color: rgba(242, 193, 102, 0.42);
}

.score-card.is-selected {
  border-color: rgba(111, 199, 181, 0.8);
  background: var(--color-background-tertiary);
}

.score-card-top {
  justify-content: space-between;
  gap: 8px;
}

.score-label {
  min-height: 31px;
  color: var(--color-text-secondary);
  font-size: 11px;
  line-height: 1.35;
}

.score-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--purple);
}

.score-card-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 5px;
  color: var(--color-text-primary);
  font-size: 20px;
  font-weight: 700;
}

.score-card-value span {
  color: var(--color-text-tertiary);
  font-size: 11px;
  font-weight: 550;
}

.score-card-bar {
  height: 3px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--color-border-tertiary);
}

.score-card-bar span {
  display: block;
  width: var(--score-width);
  height: 100%;
  background: var(--card-color);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.dimension-list,
.override-list,
.highlight-list {
  display: grid;
  gap: 10px;
}

.dimension-card,
.override-card,
.student-card {
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
}

.dimension-card {
  padding: 14px;
}

.writing-suggestions {
  margin: 0 0 12px;
}

.suggestions-card {
  border: 1px solid var(--color-border-secondary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
  box-shadow: inset 3px 0 0 var(--purple);
  padding: 14px;
}

.suggestions-head,
.suggestion-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.suggestions-head {
  margin-bottom: 12px;
}

.suggestions-head h3 {
  margin: 3px 0 0;
  font-size: 14px;
}

.suggestions-head p:not(.eyebrow) {
  max-width: 520px;
  margin: 5px 0 0;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.suggestions-list {
  display: grid;
  gap: 9px;
}

.suggestion-row {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-sm);
  background: var(--color-background-secondary);
}

.suggestion-meta {
  color: var(--color-text-secondary);
  font-size: 11px;
}

.suggestion-original,
.suggestion-fix,
.suggestion-explanation {
  margin: 0;
  line-height: 1.45;
}

.suggestion-original {
  color: var(--color-text-primary);
}

.suggestion-fix {
  color: var(--green);
  font-weight: 650;
}

.suggestion-explanation {
  color: var(--color-text-secondary);
}

.dimension-top {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.dimension-title {
  margin-bottom: 5px;
  font-size: 14px;
}

.dimension-meta {
  gap: 7px;
  flex-wrap: wrap;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 650;
}

.pill.warn {
  background: var(--gold-soft);
  color: var(--gold);
}

.pill.override {
  background: var(--red-soft);
  color: var(--red);
}

.score-line {
  gap: 10px;
  min-width: 112px;
  justify-content: flex-end;
}

.score-value {
  font-size: 23px;
  font-weight: 750;
}

.bar {
  width: 74px;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--color-border-tertiary);
}

.bar span {
  display: block;
  height: 100%;
  width: var(--score-width);
  background: var(--purple);
}

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

.ai-checklist {
  display: grid;
  gap: 0;
  margin-top: 12px;
  border-top: 0.5px solid var(--color-border-tertiary);
}

.check-row {
  min-height: 35px;
  padding: 7px 0;
  border-bottom: 0.5px solid var(--color-border-tertiary);
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.check-row:last-child {
  border-bottom: none;
}

.feedback-text {
  margin: 10px 0 0;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.override-card {
  padding: 12px;
}

.override-row {
  justify-content: space-between;
  gap: 12px;
}

.override-row h3 {
  margin-bottom: 0;
  font-size: 13px;
}

.override-controls {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 62px;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  padding: 8px 10px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-secondary);
}

input[type="range"] {
  accent-color: var(--purple);
}

input[type="number"] {
  padding: 6px;
  text-align: center;
  font-weight: 700;
}

.toggle {
  gap: 8px;
  min-width: 118px;
  justify-content: flex-end;
  margin-bottom: 0;
}

.toggle input,
.flag-checkbox {
  accent-color: var(--purple);
}

.toggle input {
  width: 17px;
  height: 17px;
}

.tutor-help {
  margin: -4px 0 12px;
  padding: 8px 12px;
  border: 0.5px solid rgba(111, 199, 181, 0.42);
  border-radius: var(--border-radius-md);
  background: var(--purple-soft);
  color: var(--color-text-primary);
  font-size: 12px;
}

.tutor-checklist {
  display: grid;
  gap: 0;
  margin-top: 12px;
  border-top: 0.5px solid var(--color-border-tertiary);
}

.dimension-note-label {
  margin: 12px 0 0;
}

.dimension-note-title {
  display: flex;
  align-items: center;
  gap: 7px;
}

.note-complete {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.dimension-note {
  min-height: 82px;
  resize: vertical;
}

.dimension-nav {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin-top: 10px;
}

.essay-thread-course {
  margin: 2px 0 4px;
  color: var(--color-text-primary);
  font-size: 17px;
  font-weight: 750;
}

.essay-thread-type {
  margin-bottom: 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 750;
}

.check-row {
  align-items: flex-start;
  gap: 8px;
}

.check-row.is-flagged {
  color: var(--color-text-primary);
}

.check-row.is-flagged .check-text {
  font-weight: 650;
}

.check-icon {
  width: 16px;
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--green);
  text-align: center;
}

.check-row.is-flagged .check-icon {
  color: var(--gold);
}

.check-text {
  flex: 1;
}

.flag-checkbox {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin-top: 2px;
}

.student-card {
  padding: 16px;
}

.student-card > p {
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.student-score {
  justify-content: space-between;
  gap: 12px;
}

.highlight-item {
  min-height: 48px;
  padding: 10px 12px;
  border: 0.5px solid var(--color-border-tertiary);
  border-radius: var(--border-radius-md);
  background: var(--color-background-primary);
  color: var(--color-text-secondary);
  font-size: 12px;
}

.highlight-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--color-text-primary);
  font-weight: 650;
}

.next-steps,
.tutor-note-box {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 0.5px solid var(--color-border-tertiary);
}

.next-steps ol {
  margin: 0;
  padding-left: 22px;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.65;
}

.tutor-note-box p {
  margin-bottom: 0;
  color: var(--color-text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

@media (max-width: 1120px) {
  .scholar-shell {
    grid-template-columns: 220px minmax(0, 1fr);
    grid-template-rows: 1fr;
  }

  .sidebar-file-tab {
    left: 220px;
  }

  .sidebar {
    display: flex;
    align-items: stretch;
    gap: 0.7rem;
    border-right: 0.5px solid var(--color-border-tertiary);
    border-bottom: 0;
  }

  .composer {
    width: min(520px, 48vw);
  }

  .essay-box {
    min-height: 300px;
  }

  .profile-workspace {
    justify-content: flex-start;
    padding: 0.75rem;
  }

  .admin-portal {
    width: 100%;
    padding: 0.9rem;
  }

  .admin-portal .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .admin-segment-toggle,
  .analytics-range {
    width: 100%;
    justify-content: flex-start;
  }

  .admin-segment-toggle .range-button,
  .analytics-range .range-button {
    flex: 1 1 150px;
    min-width: 0;
  }

  .admin-invite-form {
    grid-template-columns: 1fr;
  }

  .admin-student-card .admin-tutor-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .admin-student-card .admin-tutor-summary,
  .admin-student-action-row {
    justify-items: start;
    justify-content: flex-start;
  }

  .admin-student-actions span {
    text-align: left;
  }
}

@media (max-width: 760px) {
  .admin-student-card .admin-tutor-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .admin-student-card .admin-tutor-summary,
  .admin-student-action-row {
    justify-items: start;
    justify-content: flex-start;
  }

  .scholar-shell {
    grid-template-columns: minmax(190px, 34vw) minmax(0, 1fr);
    grid-template-rows: 1fr;
    width: 100vw;
    height: 100vh;
    min-height: 0;
    margin: 0;
  }

  .sidebar-file-tab {
    left: min(34vw, 230px);
    bottom: 12px;
  }

  .sidebar {
    display: flex;
    max-height: none;
    padding: 0.65rem;
    border-right: 0.5px solid var(--color-border-tertiary);
    border-bottom: 0;
  }

  .workspace {
    flex-direction: column;
    overflow: hidden;
    padding: 0.75rem;
  }

  .workspace-view.is-active {
    display: flex;
  }

  .composer {
    width: 100%;
    min-width: 0;
    resize: vertical;
    max-height: 48vh;
  }

  .essay-box {
    min-height: 220px;
  }

  .results-panel {
    min-width: 0;
    resize: vertical;
    max-height: none;
  }

  .feedback-studio {
    flex-direction: column;
  }

  .feedback-studio.is-choosing-essay .essay-choice {
    grid-template-columns: 1fr;
  }

  .topbar,
  .summary-band,
  .dimension-top,
  .override-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .workflow-progress {
    min-width: 100%;
    grid-template-columns: repeat(5, 1fr);
  }

  .workflow-progress.no-ai-review {
    grid-template-columns: repeat(4, 1fr);
  }

  .view-toggle {
    width: 100%;
    overflow-x: auto;
  }

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

  .profile-grid,
  .profile-preview-list,
  .admin-metrics,
  .admin-roster-filters {
    grid-template-columns: 1fr;
  }

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

  .admin-tutor-head,
  .admin-report-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .tutor-report-card {
    grid-template-columns: 1fr;
  }

  .tutor-report-actions,
  .admin-tutor-summary {
    align-items: flex-start;
    justify-items: start;
  }

  .score-line {
    justify-content: flex-start;
  }

  .score-ring {
    width: 82px;
    height: 82px;
  }

  .score-ring span {
    width: 58px;
    height: 58px;
    font-size: 18px;
  }

}
/* Reports workspace uses the same stacked section model as the Tutor Portal. */
#pastWorkspace.workspace-view.is-active {
  display: flex !important;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  padding: 1.25rem;
}

.reports-portal {
  width: min(1100px, 100%);
  max-height: calc(100% - 0.75rem);
  margin-top: 0.75rem;
  overflow-y: auto;
}

.reports-sections {
  grid-template-columns: minmax(0, 1fr);
}

.reports-sections > .tutor-report-section,
.reports-sections .past-submissions-list {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
