:root {
  color: #1e293b;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

body {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
}

.account-expiry-banner {
  padding: 0.4rem 1rem;
  background: #f97316;
  color: #431407;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.account-expiry-banner a {
  color: inherit;
  font-weight: 700;
}

.alert-list {
  display: grid;
  gap: .75rem;
  max-width: 72rem;
  margin: 1rem auto;
  padding: 0;
  list-style: none;
}

.alert {
  padding: .75rem 1rem;
  border: 1px solid;
  border-radius: .5rem;
  font-weight: 500;
}

.alert--success { border-color: #86efac; background: #f0fdf4; color: #166534; }
.alert--warning { border-color: #fdba74; background: #fff7ed; color: #9a3412; }
.alert--error { border-color: #fca5a5; background: #fef2f2; color: #991b1b; }
.alert--info { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }

.errorlist {
  margin: 0;
  padding-left: 1.25rem;
  color: #b91c1c;
  font-size: .875rem;
  font-weight: 600;
}

main form > p:has(.errorlist) input:not([type="checkbox"]):not([type="radio"]),
main form > p:has(.errorlist) select,
main form > p:has(.errorlist) textarea {
  border-color: #dc2626;
  background: #fffafa;
}

#markdown-preview-error:not(:empty) {
  display: block;
  margin-top: .35rem;
  color: #b91c1c;
  font-weight: 600;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #0f172a;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.2;
}

h1 { font-size: clamp(1.65rem, 1.25rem + 1vw, 2rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.12rem; }

small {
  color: #475569;
}

main form {
  margin: 1rem 0;
}

main form > p {
  display: grid;
  gap: 0.35rem;
  margin: 0.85rem 0;
}

main form label {
  color: #334155;
  font-weight: 500;
}

main form .checkbox-field {
  display: inline-flex;
  grid-column: 1 / -1;
  align-items: center;
  gap: 0.45rem;
}

main form .checkbox-field input[type="checkbox"] {
  flex: 0 0 auto;
  min-height: auto;
  margin: 0;
}

main form .checkbox-field label {
  font-weight: 700;
}

main form .field-help {
  display: block;
  grid-column: 1 / -1;
  margin-left: 1.7rem;
}

main form > p:has(> input[type="checkbox"]) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.45rem;
  row-gap: 0.35rem;
}

main form > p:has(> input[type="checkbox"]) > input[type="checkbox"] {
  order: 1;
  flex: 0 0 auto;
  min-height: auto;
  margin: 0;
}

main form > p:has(> input[type="checkbox"]) > label {
  order: 2;
  font-weight: 700;
}

main form > p:has(> input[type="checkbox"]) > small {
  order: 3;
  flex-basis: 100%;
  margin-left: 1.7rem;
}

main form input:not([type="checkbox"]):not([type="radio"]),
main form select,
main form textarea {
  box-sizing: border-box;
  max-width: 100%;
  min-height: 2.4rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.35rem;
  background: #fff;
  color: inherit;
}

main form > p input:not([type="checkbox"]):not([type="radio"]),
main form > p select,
main form > p textarea {
  width: min(100%, 42rem);
}

main form textarea {
  min-height: 7rem;
  resize: vertical;
}

.file-upload {
  display: grid;
  gap: .5rem;
  width: min(100%, 42rem);
}

.file-upload__dropzone {
  display: grid;
  min-height: 8rem;
  place-content: center;
  gap: .3rem;
  padding: 1rem;
  border: 2px dashed #94a3b8;
  border-radius: .6rem;
  background: #f8fafc;
  color: #334155;
  text-align: center;
  cursor: pointer;
}

.file-upload__dropzone-title { color: #0f172a; font-weight: 700; }
.file-upload--dragging .file-upload__dropzone,
.file-upload__dropzone:hover,
.file-upload__dropzone:focus-visible { border-color: #2563eb; background: #eff6ff; outline: none; }
.file-upload__dropzone--selected { border-style: solid; border-color: #86efac; background: #f0fdf4; }
.file-upload__selection { display: flex; align-items: center; gap: .6rem; margin: 0; color: #334155; font-weight: 600; }
.file-upload__selection[hidden],
.file-upload__progress[hidden] { display: none; }
.file-upload__selection button { padding: .2rem .5rem; font-size: .875rem; }
.file-upload__progress { display: grid; gap: .35rem; }
.file-upload__progress progress { width: 100%; accent-color: #2563eb; }
.file-upload__help { margin: 0; color: #475569; font-size: .875rem; }
.file-upload--enhanced .file-upload__native { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Assignment authoring involves several long-form fields. Give them enough
   room to write and review a complete brief without making every form in the
   application excessively wide. */
.assignment-authoring__form {
  max-width: 84rem;
}

.assignment-authoring__form > p:has(textarea) {
  max-width: 76rem;
}

.assignment-authoring__form > p textarea {
  width: 100%;
  min-height: 12rem;
  line-height: 1.55;
}

.assignment-authoring__form #id_instructions {
  min-height: 22rem;
}

.assignment-authoring__form #id_assignment_definition {
  min-height: 15rem;
}

.assignment-authoring-guide {
  max-width: 76rem;
  margin: 1.25rem 0 1.75rem;
  padding: 1rem 1.15rem;
  border: 1px solid #ddd6fe;
  border-radius: .6rem;
  background: #fafaff;
}

.assignment-authoring-guide > summary {
  cursor: pointer;
  color: #312e81;
}

.assignment-authoring-guide > section {
  display: inline-block;
  box-sizing: border-box;
  width: calc(50% - .45rem);
  margin: .75rem .65rem 0 0;
  padding: .85rem;
  border: 1px solid #e2e8f0;
  border-radius: .45rem;
  background: #fff;
  vertical-align: top;
}

.assignment-authoring-guide > section:nth-of-type(even) {
  margin-right: 0;
}

.assignment-authoring-guide > section:only-of-type {
  width: 100%;
  margin-right: 0;
}

.assignment-authoring-guide section h3,
.assignment-authoring-guide section p {
  margin-top: 0;
}

.assignment-authoring-guide section textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 13rem;
  padding: .6rem .7rem;
  border: 1px solid #cbd5e1;
  border-radius: .35rem;
  background: #f8fafc;
  color: #334155;
  line-height: 1.45;
  resize: vertical;
}

.assignment-wizard__steps { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding: 0; list-style: none; }
.assignment-wizard__steps li { color: #64748b; }
.assignment-wizard__steps [aria-current="step"] { color: #312e81; font-weight: 700; }
.assignment-wizard__preview { max-width: 76rem; }
.assignment-wizard__preview--instructions { padding: 1rem; border: 1px solid #fed7aa; border-left: .35rem solid #f97316; border-radius: .45rem; background: #fff7ed; }
.assignment-wizard__preview--definition { padding: 1rem; border: 1px solid #e9d5ff; border-left: .35rem solid #7c3aed; border-radius: .45rem; background: #faf5ff; }
.assignment-wizard__preview .markdown-preview { min-height: 5rem; }
.assignment-wizard__review { max-width: 76rem; }
.assignment-wizard__review > h2 { margin-bottom: .25rem; }
.assignment-wizard__review-description { margin: 0 0 1rem; color: #475569; }
.assignment-detail, .learner-assignment-detail { max-width: 70rem; }
.test-configuration-card, .assignment-definition-card, .assignment-instructions-card { margin: 1.25rem 0; padding: 1.1rem; border: 1px solid; border-radius: .6rem; box-shadow: 0 1px 2px rgb(15 23 42 / 6%); }
.test-configuration-card { border-color: #86efac; border-left: .35rem solid #16a34a; background: #f0fdf4; }
.assignment-definition-card { border-color: #ddd6fe; border-left: .35rem solid #7c3aed; background: #faf5ff; }
.assignment-instructions-card { border-color: #fed7aa; border-left: .35rem solid #f97316; background: #fff7ed; }
.test-configuration-card h2, .assignment-definition-card h2, .assignment-instructions-card h2, .assignment-wizard__review-metadata > h3, .assignment-wizard__review-definition h3, .assignment-wizard__review-instructions h3 { margin-top: 0; font-size: 1.35rem; }
.test-configuration-card p:last-child, .assignment-definition-card > :last-child, .assignment-instructions-card > :last-child { margin-bottom: 0; }
.assignment-text { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.assignment-markdown { line-height: 1.6; }
.assignment-markdown pre { overflow: auto; padding: .75rem; border-radius: .3rem; background: #f8fafc; }
.assignment-markdown :not(pre) > code, .study-markdown :not(pre) > code, .markdown-preview :not(pre) > code { padding: .1rem .32rem; border-radius: .25rem; background: #ede9fe; color: #4c1d95; font-size: .9em; }
.assignment-markdown table { border-collapse: collapse; }
.assignment-markdown th, .assignment-markdown td { padding: .4rem; border: 1px solid #cbd5e1; }
.assignment-markdown img, .study-markdown img, .markdown-preview img { display: block; max-width: 100%; height: auto; margin: 1rem auto; border-radius: .35rem; }
.markdown-image-placeholder { display: block; margin: 1rem 0; padding: .8rem 1rem; border: 1px solid #fed7aa; border-left: .35rem solid #f97316; border-radius: .45rem; background: #fff7ed; color: #7c2d12; }
.markdown-image-placeholder strong { color: #9a3412; }
.markdown-image-help { display: block; margin-top: .35rem; }
.test-configuration-grid, .assignment-wizard__review-question-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.assignment-wizard__review-question-grid { margin: 1.25rem 0; }
.test-configuration-grid > div, .assignment-wizard__review-question-grid > div { padding: .75rem; border-radius: .4rem; background: #fff; }
.test-configuration-grid strong, .test-configuration-grid span, .assignment-wizard__review-question-grid strong, .assignment-wizard__review-question-grid span { display: block; }
.test-configuration-grid span, .assignment-wizard__review-question-grid span { margin-top: .2rem; color: #475569; }
.assignment-wizard__review-metadata, .assignment-wizard__review-definition, .assignment-wizard__review-instructions { margin-top: 1rem; }
.assignment-wizard__review-definition header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; }
.assignment-wizard__review-definition header p { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; }
.assignment-wizard__review-tag { display: inline-block; padding: .2rem .55rem; border-radius: 999px; background: #4c1d95; color: #fff; font-size: .85rem; font-weight: 600; }
.assignment-wizard__review h3 { margin-bottom: .4rem; }
@media (max-width: 42rem) { .test-configuration-grid, .assignment-wizard__review-question-grid { grid-template-columns: 1fr; } }
@media (min-width: 60rem) { .assignment-authoring__form:has(#id_instructions), .assignment-authoring__form:has(#id_assignment_definition) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(20rem, .8fr); gap: 1rem 2rem; } .assignment-authoring__form:has(#id_instructions) > .assignment-wizard__preview--instructions, .assignment-authoring__form:has(#id_assignment_definition) > .assignment-wizard__preview--definition { grid-column: 2; grid-row: 1 / span 8; } }

.classroom-form-page { max-width: 46rem; }
.classroom-form-card { padding: clamp(1.25rem, 4vw, 2.25rem); border: 1px solid #e2e8f0; border-radius: .75rem; background: #fff; box-shadow: 0 1px 3px rgb(15 23 42 / .08); }
.classroom-form-card__header { max-width: 38rem; margin-bottom: 1.5rem; }
.classroom-form-card__header h1 { margin: .15rem 0 .5rem; }
.classroom-form-card__header p:last-child { margin: 0; color: #475569; }
.classroom-form-card__eyebrow { margin: 0; color: #4f46e5; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.classroom-form { margin-bottom: 0; }
.classroom-form textarea { min-height: 10rem; }
.classroom-form-card__actions { display: flex; align-items: center; gap: 1rem; margin-top: 1.5rem; }

.learner-class-list { max-width: 70rem; }
.learner-class-section { margin: 2rem 0; }
.learner-class-section > h2 { margin-bottom: .25rem; }
.learner-class-section > p { margin-top: 0; color: #475569; }
.learner-class-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.learner-class-card { padding: 1.1rem 1.2rem; border: 1px solid #ddd6fe; border-left: .35rem solid #7c3aed; border-radius: .65rem; background: #faf5ff; box-shadow: 0 1px 2px rgb(15 23 42 / 6%); }
.learner-class-card__header { display: flex; align-items: start; justify-content: space-between; gap: .75rem; }
.learner-class-card__header h2 { margin: 0; font-size: 1.35rem; }
.learner-class-card__header p { flex: 0 0 auto; margin: .15rem 0 0; color: #5b21b6; font-size: .85rem; font-weight: 600; text-align: right; }
.learner-class-card__description { margin: 0; color: #475569; }
.learner-class-card__details { margin-top: .8rem; }
.learner-class-card__details > summary { cursor: pointer; color: #5b21b6; font-weight: 700; }
.learner-class-card__details[open] > summary { margin-bottom: .9rem; }
.learner-class-card__work { padding-top: .85rem; border-top: 1px solid #ddd6fe; }
.learner-class-card__work h3 { display: flex; justify-content: space-between; margin: 0 0 .5rem; font-size: 1rem; }
.learner-class-card__work h3 span { color: #6b7280; font-size: .875rem; font-weight: 500; }
.learner-class-card__work ul { margin: 0; padding-left: 1.2rem; }
.learner-class-card__work li + li { margin-top: .7rem; }
.learner-class-card .assignment-description { overflow-wrap: anywhere; }
.learner-class-card--past { border-color: #d7dde5; border-left-color: #94a3b8; background: #f8fafc; }
.learner-class-card--past .learner-class-card__details > summary { color: #475569; }
.learner-class-card--past .learner-class-card__work { border-top-color: #e2e8f0; }

.instructor-assignment-drafts { margin: 1.5rem 0; padding: 1rem 1.1rem; border: 1px solid #ddd6fe; border-left: .35rem solid #7c3aed; border-radius: .6rem; background: #faf5ff; }
.instructor-assignment-drafts h3 { margin-top: 0; }
.instructor-assignment-drafts ul { margin-bottom: 0; padding-left: 1.2rem; }
.instructor-assignment-drafts form { display: inline; margin: 0 0 0 .5rem; }

.learner-submission-form { max-width: 70rem; }
.learner-submission-form__card { margin-top: 1rem; }
.learner-submission-form__card h1 { margin-top: 0; }
.learner-submission-form__summary { margin-bottom: 1.5rem; color: #475569; }
.learner-submission-form__card #submission-word-count { display: block; margin-top: .35rem; color: #5b21b6; font-weight: 600; }
.learner-submission-preview { margin: 1.25rem 0; padding: 1rem 1.1rem; border: 1px solid #c4b5fd; border-left: .35rem solid #7c3aed; border-radius: .6rem; background: #f3e8ff; }
.learner-submission-preview h2 { margin-top: 0; font-size: 1.2rem; }
.learner-submission-preview .markdown-preview { min-height: 2rem; }
#submission-preview-error:not(:empty) { color: #b91c1c; font-weight: 600; }
.ai-action-sparkle { display: inline-block; width: 1em; height: 1em; margin-right: .2rem; color: #6d28d9; vertical-align: -.1em; }

@media (max-width: 48rem) {
  .assignment-authoring-guide > section {
    display: block;
    width: 100%;
    margin-right: 0;
  }
}

main form input:focus,
main form select:focus,
main form textarea:focus {
  border-color: #7c3aed;
  outline: 3px solid rgb(124 58 237 / 0.15);
  outline-offset: 1px;
}

main button {
  min-height: 2.35rem;
  padding: 0.42rem 0.8rem;
  border: 1px solid #94a3b8;
  border-radius: 0.35rem;
  background: #fff;
  color: #1e293b;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

main button:hover {
  background: #f8fafc;
}

main td form,
main .question-card__actions form {
  display: inline;
  margin: 0;
}

.passage-content {
  margin: 1rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid #e9d5ff;
  border-radius: 0.6rem;
  background: #faf5ff;
}

.passage-content > :first-child {
  margin-top: 0;
}

.passage-content > :last-child {
  margin-bottom: 0;
}

.reading-start-message {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reading-start-message .study-markdown {
  line-height: 1.6;
  min-width: 0;
  overflow-x: auto;
}

.reading-start-message pre {
  max-width: 100%;
  overflow: auto;
  padding: .75rem;
  border-radius: .3rem;
  background: #f8fafc;
}

.reading-start-message table {
  border-collapse: collapse;
}

.reading-start-message th,
.reading-start-message td {
  padding: .4rem;
  border: 1px solid #cbd5e1;
}

/* Study document detail */
.study-detail-summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.25rem 5.75rem;
  border: 1px solid #86efac;
  border-radius: .75rem;
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.study-detail-summary__title { margin: 0; }
.study-detail-summary__rename { display: inline-block; margin-top: .3rem; color: #166534; }
.study-detail-summary__metadata { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; margin: 1rem 0; color: #166534; }
.study-detail-summary__metadata strong { display: block; color: #14532d; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; }
.study-detail-summary__actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.study-detail-summary__actions form { margin: 0; }
.study-detail-summary__footer {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  left: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.study-detail-summary__footer .study-detail-summary__actions,
.study-detail-summary__footer .study-detail-summary__suggestion { flex-wrap: nowrap; }
.study-detail-summary__actions a,
.study-detail-summary__actions button {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  box-sizing: border-box;
  min-height: 2.35rem;
  padding: .42rem .8rem;
  border: 1px solid #15803d;
  border-radius: .35rem;
  background: #15803d;
  color: #fff;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
}
.study-detail-summary__actions a:hover,
.study-detail-summary__actions button:hover { background: #166534; }
.study-detail-summary__actions .ai-action-sparkle { color: #fff; }
.study-detail-summary__actions .study-detail-summary__delete { border-color: #b91c1c; background: #fff; color: #b91c1c; }
.study-detail-summary__actions .study-detail-summary__delete:hover { background: #fef2f2; }
.study-detail-summary__suggestion {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem .7rem;
  max-width: 28rem;
  margin: 0;
  padding: .65rem .75rem;
  border: 1px solid #86efac;
  border-radius: .45rem;
  background: rgb(255 255 255 / .55);
  color: #166534;
}
.study-detail-summary__suggestion strong { font-size: .8rem; letter-spacing: .02em; }
.study-detail-summary__suggestion form { margin: 0; }
.study-detail-summary__suggestion a,
.study-detail-summary__suggestion button {
  display: inline-flex;
  align-items: center;
  min-height: 2.1rem;
  padding: .35rem .65rem;
  border: 1px solid #16a34a;
  border-radius: .35rem;
  background: #fff;
  color: #166534;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.study-detail-summary__suggestion a:hover,
.study-detail-summary__suggestion button:hover { background: #dcfce7; }
.study-detail-summary__status { margin: 0; }
.study-detail-summary__coverage-wrap { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.study-detail-summary__metric { width: 8rem; }
.study-detail-summary__ring { display: grid; place-items: center; align-self: center; width: 8rem; height: 8rem; border-radius: 50%; background: conic-gradient(#16a34a var(--coverage), #bbf7d0 0); }
.study-detail-summary__ring--coverage-low { background: conic-gradient(#dc2626 var(--coverage), #fee2e2 0); }
.study-detail-summary__ring--coverage-developing { background: conic-gradient(#d97706 var(--coverage), #fef3c7 0); }
.study-detail-summary__ring--coverage-strong { background: conic-gradient(#16a34a var(--coverage), #bbf7d0 0); }
.study-detail-summary__ring--performance-low { background: conic-gradient(#dc2626 var(--coverage), #fee2e2 0); }
.study-detail-summary__ring--performance-developing { background: conic-gradient(#ea580c var(--coverage), #ffedd5 0); }
.study-detail-summary__ring--performance-strong { background: conic-gradient(#16a34a var(--coverage), #bbf7d0 0); }
.study-detail-summary__ring--performance-unassessed { background: conic-gradient(#94a3b8 0, #e2e8f0 0); }
.study-detail-summary__ring--performance-low .study-detail-summary__ring-label,
.study-detail-summary__ring--performance-low .study-detail-summary__ring-label small { color: #b91c1c; }
.study-detail-summary__ring--performance-developing .study-detail-summary__ring-label,
.study-detail-summary__ring--performance-developing .study-detail-summary__ring-label small { color: #c2410c; }
.study-detail-summary__ring--performance-strong .study-detail-summary__ring-label,
.study-detail-summary__ring--performance-strong .study-detail-summary__ring-label small { color: #166534; }
.study-detail-summary__ring--performance-unassessed .study-detail-summary__ring-label,
.study-detail-summary__ring--performance-unassessed .study-detail-summary__ring-label small { color: #475569; }
.study-detail-summary__ring--flashcards { background: conic-gradient(#7c3aed var(--coverage), #ede9fe 0); }
.study-detail-summary__ring--flashcards.study-detail-summary__ring--performance-low { background: conic-gradient(#dc2626 var(--coverage), #fee2e2 0); }
.study-detail-summary__ring--flashcards.study-detail-summary__ring--performance-developing { background: conic-gradient(#ea580c var(--coverage), #ffedd5 0); }
.study-detail-summary__ring--flashcards.study-detail-summary__ring--performance-strong { background: conic-gradient(#16a34a var(--coverage), #bbf7d0 0); }
.study-detail-summary__ring--coverage-low .study-detail-summary__ring-label,
.study-detail-summary__ring--coverage-low .study-detail-summary__ring-label small { color: #b91c1c; }
.study-detail-summary__ring--coverage-developing .study-detail-summary__ring-label,
.study-detail-summary__ring--coverage-developing .study-detail-summary__ring-label small { color: #b45309; }
.study-detail-summary__ring--coverage-strong .study-detail-summary__ring-label,
.study-detail-summary__ring--coverage-strong .study-detail-summary__ring-label small { color: #166534; }
.study-detail-summary__ring::before { grid-area: 1 / 1; width: 6.35rem; height: 6.35rem; border-radius: 50%; background: #f7fff8; content: ""; }
.study-detail-summary__ring-label { z-index: 1; grid-area: 1 / 1; color: #166534; font-size: 1.5rem; font-weight: 700; text-align: center; }
.study-detail-summary__ring-label small { display: block; color: #166534; font-size: .7rem; font-weight: 600; }
.study-detail-summary__coverage { margin: .65rem 0 0; color: #166534; font-size: .85rem; text-align: center; }

.flashcard-summary { max-width: 68rem; }
.flashcard-summary__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; margin: 1rem 0 1.5rem; padding: 1.25rem; border: 1px solid #ddd6fe; border-radius: .75rem; background: #faf5ff; }
.flashcard-summary__header h1 { margin: 0; color: #4c1d95; }
.flashcard-summary__header p { max-width: 42rem; margin-bottom: 0; color: #5b21b6; }
.flashcard-summary__totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0 1.75rem; }
.flashcard-summary__totals div { display: grid; gap: .2rem; padding: .9rem 1rem; border: 1px solid #d9e1ea; border-radius: .6rem; background: #fff; }
.flashcard-summary__totals strong { color: #4c1d95; font-size: 1.5rem; }
.flashcard-summary__totals span { color: #475569; font-size: .85rem; }
.flashcard-summary__section { margin: 1.75rem 0; }
.flashcard-summary__section > h2 { margin-bottom: .25rem; }
.flashcard-summary__section > p { margin-top: 0; color: #475569; }
.flashcard-summary__concept-table { min-width: 40rem; }
.flashcard-summary__claims { display: grid; gap: .8rem; }
.flashcard-summary__claim { padding: 1rem; border: 1px solid #d9e1ea; border-left: .3rem solid #94a3b8; border-radius: .6rem; background: #fff; }
.flashcard-summary__claim--got-it { border-left-color: #16a34a; }
.flashcard-summary__claim--needs-review { border-left-color: #dc2626; }
.flashcard-summary__claim > header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.flashcard-summary__concept, .flashcard-summary__outcome { border-radius: 999px; padding: .2rem .55rem; font-size: .8rem; font-weight: 700; }
.flashcard-summary__concept { background: #ede9fe; color: #5b21b6; }
.flashcard-summary__claim--got-it .flashcard-summary__outcome { background: #dcfce7; color: #166534; }
.flashcard-summary__claim--needs-review .flashcard-summary__outcome { background: #fee2e2; color: #991b1b; }
.flashcard-summary__claim h3 { margin: .75rem 0 .5rem; font-size: 1rem; }
.flashcard-summary__claim p { margin: .5rem 0; }
.flashcard-summary__claim summary { cursor: pointer; color: #5b21b6; font-weight: 700; }
.flashcard-summary__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0; }
.flashcard-summary__actions form, .flashcard-history__actions form { margin: 0; }
.flashcard-history__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; min-width: max-content; }
.flashcard-history__action { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 2.25rem; margin: 0; padding: .4rem .7rem; border: 1px solid #c4b5fd; border-radius: .4rem; background: #fff; color: #5b21b6; font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.flashcard-history__action:hover { border-color: #8b5cf6; background: #f5f3ff; }
.flashcard-history__action:focus-visible { outline: 3px solid rgb(124 58 237 / .25); outline-offset: 2px; }
.flashcard-history__action--primary { border-color: #6d28d9; background: #6d28d9; color: #fff; }
.flashcard-history__action--primary:hover { border-color: #5b21b6; background: #5b21b6; }

.study-detail-tabs { margin-top: 1.25rem; }
.study-detail-tabs__list { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0; border-bottom: 1px solid #cbd5e1; }
.study-detail-tabs__tab { margin: 0; padding: .6rem .9rem; border: 0; border-bottom: 3px solid transparent; border-radius: .35rem .35rem 0 0; background: transparent; color: #475569; font-weight: 700; cursor: pointer; }
.study-detail-tabs__tab:hover { background: #f0fdf4; color: #166534; }
.study-detail-tabs__tab[aria-selected="true"] { border-bottom-color: #16a34a; color: #166534; }
.study-detail-tabs__tab:focus-visible { outline: 3px solid rgb(22 163 74 / .25); outline-offset: -2px; }
.study-detail-tabs__panel { padding-top: 1rem; }
.study-detail-tabs[data-tabs-enhanced] .study-detail-tabs__panel[hidden] { display: none; }
.study-detail-tabs__empty { color: #475569; }
.study-detail .concept-mastery { margin: 0; padding: 1.1rem; border: 1px solid #d9e1ea; border-radius: .6rem; background: #fff; }
.study-detail .concept-mastery > p { color: #475569; max-width: 62rem; }
.study-detail .concept-mastery-list { display: grid; gap: .3rem; margin: 0; padding: 0; list-style: none; }
.study-detail .concept-row { display: grid; grid-template-columns: minmax(16rem, 22rem) 1fr; gap: .7rem; align-items: center; padding: .2rem 0; }
.study-detail .concept-row__label { overflow-wrap: anywhere; }
.study-detail .concept-row__outcomes { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: .25rem; min-width: 0; }
.study-detail .concept-outcome { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 999px; font-size: .9rem; font-weight: 800; }
.study-detail .concept-outcome--correct { color: #166534; background: #dcfce7; }
.study-detail .concept-outcome--incorrect { color: #991b1b; background: #fee2e2; }
.study-detail .concept-row__empty { color: #475569; font-size: .9rem; }
.study-document-list__test-me { display: inline-flex; align-items: center; min-height: 1.7rem; padding: .16rem .45rem; border: 1px solid #000; border-radius: .3rem; background: #fff; color: #6d28d9; font-size: .8rem; font-weight: 700; line-height: 1.2; text-decoration: none; }
.study-document-list__test-me:hover { border-color: #000; background: #f5f3ff; color: #5b21b6; }
.study-document-list__test-me .ai-action-sparkle { color: #6d28d9; }

@media (max-width: 40rem) {
  .study-detail-summary { grid-template-columns: 1fr; padding: 1.25rem; }
  .study-detail-summary__footer { position: static; flex-direction: column; align-items: stretch; margin-top: 1rem; }
  .study-detail-summary__footer .study-detail-summary__actions,
  .study-detail-summary__footer .study-detail-summary__suggestion { flex-wrap: wrap; }
  .study-detail-summary__suggestion { max-width: none; }
  .study-detail-summary__coverage-wrap { justify-content: flex-start; }
  .study-detail .concept-row { grid-template-columns: 1fr; gap: .25rem; }
  .flashcard-summary__totals { grid-template-columns: 1fr; }
}

.question-cards { display: grid; gap: 1rem; margin: 1rem 0; padding: 0; list-style: none; }
.question-card { padding: 1.1rem; border: 1px solid #d7dde5; border-radius: .6rem; background: #fff; box-shadow: 0 1px 2px rgb(15 23 42 / 6%); }
.question-card__header { display: flex; align-items: center; gap: .65rem; margin-bottom: .75rem; }
.question-card__number { margin: 0; font-weight: 700; }
.question-card__type { padding: .15rem .5rem; border-radius: 999px; background: #edf2f7; color: #334155; font-size: .78rem; font-weight: 600; }
.question-card__text { margin: 0 0 .85rem; font-weight: 600; }
.question-card__choices { margin: .75rem 0; padding-left: 1.4rem; }
.question-card__answer { margin: .85rem 0 0; padding-top: .75rem; border-top: 1px solid #e5e7eb; }
.question-card__actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin-top: .85rem; }


.data-table,
.table-scroll > table,
.page-shell div[style*="overflow:auto"] > table {
  border-collapse: collapse;
  color: #1e293b;
  font-size: 0.9375rem;
  line-height: 1.4;
}

.table-scroll > .data-table {
  min-width: 48rem;
}

.page-shell div[style*="overflow:auto"] > table {
  min-width: 48rem;
}

.data-table thead,
.table-scroll > table thead,
.page-shell div[style*="overflow:auto"] > table thead {
  background: #f8fafc;
}

.data-table th,
.data-table td,
.table-scroll > table th,
.table-scroll > table td,
.page-shell div[style*="overflow:auto"] > table th,
.page-shell div[style*="overflow:auto"] > table td {
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
}

.data-table th,
.table-scroll > table th,
.page-shell div[style*="overflow:auto"] > table th {
  border-bottom: 1px solid #cbd5e1;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.data-table td,
.table-scroll > table td,
.page-shell div[style*="overflow:auto"] > table td {
  border-bottom: 1px solid #e2e8f0;
}

.data-table tbody tr:last-child td,
.data-table tbody tr:last-child th,
.table-scroll > table tbody tr:last-child td,
.table-scroll > table tbody tr:last-child th,
.page-shell div[style*="overflow:auto"] > table tbody tr:last-child td,
.page-shell div[style*="overflow:auto"] > table tbody tr:last-child th {
  border-bottom: 0;
}

@media (hover: hover) {
  .data-table tbody tr:hover > *,
  .table-scroll > table tbody tr:hover > *,
  .page-shell div[style*="overflow:auto"] > table tbody tr:hover > * {
    background: #f8fafc;
  }
}

.data-table tbody tr:focus-within > *,
.table-scroll > table tbody tr:focus-within > *,
.page-shell div[style*="overflow:auto"] > table tbody tr:focus-within > * {
  background: #eff6ff;
}

table.dataTable.data-table > thead > tr > th,
table.dataTable.data-table > thead > tr > td {
  border-bottom-color: #cbd5e1;
}

table.dataTable.data-table > tbody > tr > th,
table.dataTable.data-table > tbody > tr > td {
  padding: 0.7rem 0.9rem;
}

.instructor-class-table { table-layout: fixed; }
.instructor-class-table__class-column { width: 16%; }
.instructor-class-table__active-column { width: 4.5rem; }
.instructor-class-table__modified-column { width: 17%; }
.instructor-class-table__activities-column { width: 26%; }

.instructor-class-description > summary {
  overflow: hidden;
  cursor: pointer;
  color: inherit;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.instructor-class-description__content {
  max-width: 32rem;
  margin-top: .55rem;
  overflow-wrap: anywhere;
}

.password-field {
  position: relative;
  display: block;
  width: min(100%, 42rem);
  max-width: 100%;
}

.password-field > input {
  width: 100%;
  padding-right: 3rem;
}

.password-field__toggle {
  position: absolute;
  top: 50%;
  right: 0;
  display: inline-grid;
  width: 2.25rem;
  height: 2.25rem;
  padding: .35rem;
  place-items: center;
  border: 0;
  border-radius: .35rem;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-field__toggle:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.password-field__toggle:focus-visible {
  outline: 3px solid #93c5fd;
  outline-offset: 1px;
}

.password-field__toggle svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.results-privacy__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  margin: 1rem 0;
  color: #475569;
  font-size: .9rem;
}

.results-privacy__toggle {
  min-height: 2.25rem;
  padding: .4rem .7rem;
  border: 1px solid #94a3b8;
  border-radius: .35rem;
  background: #fff;
  color: #1e293b;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.results-privacy__toggle:hover { background: #f8fafc; }
.results-privacy__toggle:focus-visible { outline: 3px solid rgb(124 58 237 / .25); outline-offset: 2px; }

.results-privacy--blurred .results-privacy__email-local,
.results-privacy--blurred [data-results-username] {
  display: inline-block;
  filter: blur(.35rem);
  user-select: none;
}

/* Class sequence and independent work */
.class-timeline-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; margin: 1rem 0; }
.class-timeline-layout section { min-width: 0; }
.class-timeline, .class-independent-work { list-style: none; margin: 0; padding: 0; }
.class-timeline__step { position: relative; padding: 0 0 1rem 3.25rem; }
.class-timeline__step:not(:last-child)::before { content: ''; position: absolute; left: 1.19rem; top: 2rem; bottom: -1rem; border-left: 2px solid #cbd5e1; }
.class-timeline__bubble { position: absolute; left: 0; top: 1rem; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 2px solid #64748b; border-radius: 50%; background: #e2e8f0; box-sizing: border-box; color: #1e293b; font-size: .9rem; font-weight: 700; line-height: 1; }
.class-timeline--instructor .class-timeline__bubble { border-color: #6d28d9; background: #6d28d9; color: #fff; }
.class-timeline__bubble--complete { background: #16a34a; border-color: #15803d; color: #fff; }
.class-timeline__bubble--passed { background: #f59e0b; border-color: #b45309; color: #1e293b; }
.class-timeline__bubble--failed { background: #dc2626; border-color: #b91c1c; color: #fff; }
.class-timeline__bubble--pending { background: #cbd5e1; border-color: #64748b; color: #1e293b; }
.class-timeline__card { padding: .85rem 1rem; border: 1px solid #cbd5e1; border-radius: .6rem; background: white; }
.class-timeline__card--locked { background: #f1f5f9; color: #475569; }
.class-timeline--instructor .class-timeline__card--published,
.class-timeline--instructor .class-timeline__card--closing-soon { background: #f5f3ff; border-color: #ddd6fe; }
.class-timeline--instructor .class-timeline__card--closed { background: #f1f5f9; border-color: #cbd5e1; }
.class-timeline__card h4 { margin: .2rem 0; font-size: 1rem; }
.class-timeline__card p { margin: .35rem 0 0; font-size: .875rem; }
.class-timeline__type { color: #475569; font-weight: 600; }
.class-independent-work { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.class-independent-work__card {
  box-sizing: border-box;
  width: 100%;
  padding: .85rem 1rem;
  border-color: #d8e0ea;
  border-radius: .7rem;
  box-shadow: 0 1px 2px rgb(15 23 42 / 5%);
}
.class-independent-work__card--published, .class-independent-work__card--closing-soon { background: #f5f3ff; border-color: #ddd6fe; }
.class-independent-work__card--closed { background: #f1f5f9; border-color: #cbd5e1; }
.class-independent-work__header { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.class-independent-work__header > div { min-width: 0; }
.class-independent-work__status { flex: 0 0 auto; padding: .15rem .5rem; border-radius: 999px; background: #eef2f7; color: #475569; font-size: .8rem; white-space: nowrap; }
.class-independent-work__status--published { background: #dcfce7; color: #166534; }
.class-independent-work__status--closing-soon { background: #ffedd5; color: #9a3412; }
.class-independent-work__status--closed { background: #fee2e2; color: #991b1b; }
.class-independent-work__status .class-work-card__status-icon { margin-right: .2rem; font-weight: 800; }
.class-independent-work__status .class-work-card__status-dot { display: inline-block; width: .55rem; height: .55rem; margin-right: .35rem; border-radius: 50%; background: #f97316; }
@media (max-width: 48rem) { .class-timeline-layout { grid-template-columns: 1fr; gap: 1rem; } }
