/* Components used inside the school. The public NII styles supply the typefaces,
   logo, glass header, breakpoints, theme control and heading gradients. */
:root {
  --quiet: #4d5871;
  --surface-school: linear-gradient(145deg, rgb(255 255 255 / 92%), rgb(249 252 255 / 83%));
  --card-line: rgb(255 255 255 / 85%);
  --edge: #c9d5e4;
  --rule: #d5deea;
  --field: rgb(255 255 255 / 83%);
  --soft: #e9eff8;
  --action: #203751;
  --action-text: #fff;
  --interactive: #235a92;
  --success: #176552;
  --success-wash: #def6ed;
  --error: #8d302e;
  --error-wash: #ffedeb;
  --elevation: 0 20px 64px -30px #1c39574d;
  --school-field: radial-gradient(ellipse at 5% 12%, #c7d9fd 0%, transparent 46%),
    radial-gradient(ellipse at 88% 14%, #d8d2fa 0%, transparent 43%),
    radial-gradient(ellipse at 78% 100%, #8edbd5 0%, transparent 47%),
    radial-gradient(ellipse at 4% 92%, #c2e7ef 0%, transparent 44%), #eef3fc;
}
:root[data-theme="dark"] {
  --quiet: #bacbdc;
  --surface-school: linear-gradient(145deg, rgb(29 48 68 / 94%), rgb(19 35 53 / 91%));
  --card-line: #98c8de31;
  --edge: #587087;
  --rule: #405469;
  --field: rgb(13 28 43 / 83%);
  --soft: #243b4d;
  --action: #b9e4ee;
  --action-text: #102b3d;
  --interactive: #a3d7ff;
  --success: #a8efd5;
  --success-wash: #193a35;
  --error: #ffd4ce;
  --error-wash: #513236;
  --elevation: 0 20px 60px -28px rgb(1 10 18 / 78%);
  --school-field: radial-gradient(ellipse at 3% 9%, #283352 0%, transparent 43%),
    radial-gradient(ellipse at 86% 12%, #493d6f 0%, transparent 41%),
    radial-gradient(ellipse at 85% 104%, #1c6d70 0%, transparent 42%),
    radial-gradient(ellipse at 0% 83%, #12404c 0%, transparent 50%), #101826;
}
.school {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  font: 400 1rem/1.5 Gilroy, "Helvetica Neue", Arial, sans-serif;
}
.school input, .school textarea, .school select, .school button { font-family: inherit; }
.school button, .school summary { cursor: pointer; }
.school a { text-underline-offset: .22em; }
.school :is(a, button, summary, input, select, textarea):focus-visible {
  outline: 3px solid var(--focus-color, #345cf1);
  outline-offset: 3px;
}
.school .header-glass { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
.school-nav { grid-column: 3; display: flex; justify-self: end; align-items: center; gap: 10px; }
.school-nav form, .role-actions form { margin: 0; }
.header-course-link, .institute-link, .leave {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 42px; font-weight: 500; font-size: .96rem; text-decoration: none;
}
.header-course-link:hover, .institute-link:hover { text-decoration: underline; }
.institute-link { padding: 0 14px; white-space: nowrap; }
.institute-link .icon, .leave .icon { width: 16px; height: 16px; }
.leave { padding: 0 16px; border: 0; border-radius: 40px; background: var(--button-fill, #fff); color: var(--ink); }
.leave:hover { background: var(--button-hover, #e8f0ff); }
.school .skip { z-index: 10; }
.entry-page { background: var(--school-field); }
.entry-main {
  position: relative; isolation: isolate; overflow: hidden; min-height: 100svh;
  background: var(--school-field);
  padding: calc(var(--header-top) + var(--header-height) + clamp(34px,6vh,74px)) max(var(--side), 24px) clamp(45px,7vh,84px);
  display: grid; align-items: center;
}
.entry-main::before {
  content: ""; position: absolute; inset: auto -15vw -39vw auto;
  width: 85vw; height: 64vw; border-radius: 50%; z-index: -1; pointer-events: none;
  transform: rotate(-18deg);
  background: linear-gradient(145deg, #467da809, #92d7ea6b 42%, #e5e8fc2b 66%);
  box-shadow: -4px -13px 45px -27px #668aa878, inset 0 2px 4px #ffffff5e;
}
:root[data-theme="dark"] .entry-main::before {
  background: linear-gradient(150deg, #121c30c4, #182f45b5 36%, #2f698073 75%);
  box-shadow: -4px -13px 45px -26px #4eb9c15b, inset 0 2px 3px #637cb92b;
}
.entry-layout {
  width: min(1140px, 100%); margin-inline: auto; display: grid;
  grid-template-columns: minmax(0,1.18fr) minmax(350px,.82fr);
  align-items: center; column-gap: clamp(30px,6vw,96px);
}
.entry-intro { position: relative; min-height: 530px; display: flex; flex-direction: column; justify-content: space-between; }
.entry-heading { position: relative; z-index: 1; }
.entry-intro h1 {
  margin: 0; font-size: clamp(4.5rem,6.6vw,6.2rem); line-height: .96;
  font-weight: 300; letter-spacing: -.052em;
}
.entry-intro h1 .gradient-text { display: inline-block; padding-right: .06em; }
.entry-heading p { margin: 18px 0 0; max-width: 23em; font-size: clamp(1.1rem,1.5vw,1.38rem); line-height: 1.33; color: var(--quiet); }
.entry-art {
  margin: -20px 0 -14px 16%; width: min(78%, 397px); aspect-ratio: 1.38; position: relative;
  mix-blend-mode: multiply; pointer-events: none;
}
.entry-art img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 50%; display: block;
  mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 65%, #000e 76%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 65%, #000e 76%, transparent 100%);
}
:root[data-theme="dark"] .entry-art { mix-blend-mode: screen; }
:root[data-theme="dark"] .entry-art img { filter: invert(1) grayscale(1) sepia(.85) saturate(2.6) hue-rotate(140deg) brightness(1.28) contrast(1.2); }
.panel, .course-card {
  background: var(--surface-school); border: 1px solid var(--card-line);
  border-radius: var(--radius); box-shadow: var(--elevation);
}
.panel, .card-body { padding: clamp(21px,3vw,36px); }
.auth-panel { padding: clamp(27px,3.3vw,44px); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.auth-panel h2 { font-size: clamp(2rem,3.1vw,3rem); font-weight: 500; line-height: 1.08; letter-spacing: -.042em; margin: 0 0 26px; }
.auth-panel .notice { margin: 0 0 18px; }
.stack { display: grid; gap: 1rem; }
.stack > label, .field-pair > label { display: grid; gap: .35rem; font-weight: 600; }
.stack input:not([type="radio"]):not([type="hidden"]), .stack textarea, .stack select {
  display: block; width: 100%; min-width: 0; min-height: 49px; box-sizing: border-box;
  border: 1px solid var(--edge); border-radius: 14px; padding: 11px 14px;
  background: var(--field); color: var(--ink); font-size: 1rem; line-height: 1.4;
}
.stack textarea { resize: vertical; }
.stack select { width: 100%; }
.stack label small { font-size: .88rem; font-weight: 400; color: var(--quiet); }
.login-fields { gap: 0; }
.login-fields > label { display: block; margin: 0 0 5px; font-size: .94rem; font-weight: 600; }
.login-fields > label:not(:first-of-type) { margin-top: 16px; }
.password-field { position: relative; }
.password-field input { padding-right: 52px !important; }
.field-action {
  position: absolute; inset: 3px 4px 3px auto; width: 43px; display: grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--quiet);
}
.field-action:hover { color: var(--interactive); background: var(--soft); }
.field-action .icon { width: 19px; height: 19px; }
.field-action[aria-pressed="false"] .icon:last-child, .field-action[aria-pressed="true"] .icon:first-child { display: none; }
.button {
  width: fit-content; display: inline-flex; align-items: center; justify-content: center; gap: 11px;
  min-height: 47px; padding: 10px 23px; border: 0; border-radius: 100px;
  background: var(--action); color: var(--action-text);
  font-size: 1rem; line-height: 1.3; font-weight: 600; text-decoration: none;
  transition: box-shadow .18s, transform .18s;
}
.button .icon { width: 18px; height: 18px; }
.button:hover { box-shadow: 0 5px 15px #1e3f622a; transform: translateY(-1px); }
.button:active { transform: translateY(1px); }
.button.secondary { background: var(--soft); color: var(--ink); }
.button.main-action { width: 100%; margin: 24px 0 0; min-height: 50px; }
.access-help { margin-top: 13px; color: var(--interactive); font-size: .94rem; }
.access-help summary, .inline-tool summary, .learner-report summary { padding: 5px 0; }
.access-help p { color: var(--quiet); margin: 7px 0 0; line-height: 1.45; }
.demo-access { border-top: 1px solid var(--rule); margin-top: 21px; padding-top: 17px; }
.demo-access > p { color: var(--quiet); margin: 0 0 8px; font-size: .88rem; }
.role-actions { display: grid; gap: 6px; }
.role-actions .button { padding: 8px 16px; justify-content: space-between; gap: 6px; width: 100%; min-height: 42px; font-size: .94rem; }
.role-actions .icon { width: 14px; }
.workspace {
  background: radial-gradient(ellipse 54% 33% at 8% 0%, #abcaf833, transparent),
    radial-gradient(ellipse 56% 43% at 100% 105%, #61d4c22c, transparent), var(--paper);
}
.wrapper { width: min(1210px, calc(100% - 2 * var(--side))); margin-inline: auto; padding: calc(var(--header-top) + var(--header-height) + 42px) 0 75px; }
.workspace-head, .course-head {
  position: relative; isolation: isolate; overflow: hidden; border-radius: var(--radius);
  background: var(--school-field); padding: clamp(26px,4.2vw,56px);
}
.workspace-head::before, .course-head::before {
  content: ""; position: absolute; pointer-events: none; z-index: -1; inset: 46% -8% auto auto;
  width: 43%; height: 180%; border: 1px solid var(--card-line);
  border-radius: 50%; transform: rotate(-28deg); background: #54bec919;
}
.workspace-head { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin: 0 0 27px; }
.workspace h1, .workspace h2 { margin: 0; overflow-wrap: anywhere; text-wrap: pretty; }
.workspace h1 { font-size: clamp(2.45rem,4.35vw,4.1rem); font-weight: 400; line-height: 1.06; letter-spacing: -.042em; }
.workspace h2 { font-size: clamp(1.53rem,2.5vw,2.18rem); font-weight: 600; line-height: 1.1; letter-spacing: -.033em; }
.eyebrow, .card-meta { font-size: .97rem; font-weight: 500; color: var(--quiet); margin: 0; }
.workspace-head .eyebrow, .page-title .eyebrow { margin: 0 0 8px; }
.work-counts { display: flex; align-self: center; margin: 0; gap: 26px; }
.work-counts div { display: flex; flex-direction: column-reverse; padding-left: 20px; border-left: 1px solid var(--edge); }
.work-counts dt { font-size: .93rem; color: var(--quiet); }
.work-counts dd { margin: 0; font-size: 2.25rem; line-height: 1.1; font-weight: 500; font-variant-numeric: tabular-nums; }
.tool { margin: 0 0 18px; width: fit-content; max-width: 100%; padding: 0; }
.tool[open] { width: min(100%,730px); padding: 0 22px 22px; }
.tool > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 10px 22px; font-weight: 600; }
.tool[open] > summary { padding-inline: 0; }
.tool > summary::-webkit-details-marker { display: none; }
.tool .icon { width: 19px; height: 19px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 325px),1fr)); gap: 20px; align-items: start; }
.course-card { overflow: hidden; }
.card-cover { width: 100%; height: clamp(160px,15vw,220px); display: block; object-fit: cover; }
.card-body { display: grid; align-content: center; gap: 16px; min-width: 0; }
.card-body p:not(.card-meta), .progress-label, .muted { color: var(--quiet); }
.card-body p { margin: 0; }
.card-body h2 a { color: var(--ink); text-decoration: none; }
.card-body h2 a:hover, .lesson-list a:hover strong { text-decoration: underline; }
.card-meta { display: flex; align-items: center; gap: 7px; }
.card-meta .icon { width: 19px; height: 19px; color: var(--interactive); }
.progress-label { font-size: .94rem; max-width: 27rem; }
progress { display: block; appearance: none; width: 100%; height: 7px; margin-top: 8px; border: 0; border-radius: 10px; background: var(--soft); overflow: hidden; }
progress::-webkit-progress-bar { background: var(--soft); }
progress::-webkit-progress-value { border-radius: 8px; background: var(--gradient); }
progress::-moz-progress-bar { background: var(--gradient); }
.crumb { margin: 0 0 18px; font-size: .98rem; }
.crumb a { color: var(--interactive); }
.crumb .icon { width: 15px; height: 15px; vertical-align: -.13em; margin-right: 5px; }
.course-head { display: grid; justify-items: start; gap: 13px; margin-bottom: 24px; }
.course-head h1 { max-width: 24ch; font-size: clamp(2.2rem,3.9vw,3.8rem); }
.intro { max-width: 48rem; font-size: 1.12rem; color: var(--quiet); }
.page-title { margin: 0 0 24px; }
.content-grid, .reader-grid { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(0,1fr); align-items: start; gap: 20px; }
.reader-grid { grid-template-columns: minmax(0,2.1fr) minmax(0,1fr); }
.panel h2:not(:only-child) { margin-bottom: 16px; }
.auth-panel h2:not(:only-child) { margin-bottom: 26px; }
.lesson-list { list-style: none; padding: 0; margin: 0; }
.lesson-list li + li, .learner-report + .learner-report { border-top: 1px solid var(--rule); }
.lesson-list a { display: flex; align-items: center; gap: 14px; padding: 14px 0; color: var(--ink); text-decoration: none; }
.lesson-list strong { font-weight: 600; }
.lesson-list small, .learner-report small { display: block; color: var(--quiet); font-size: .9rem; }
.step { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--soft); color: var(--interactive); font-size: .93rem; font-variant-numeric: tabular-nums; }
.check { margin-left: auto; color: var(--success); font-weight: 700; }
.learner-report { padding-block: 5px; }
.learner-report ul { padding-left: 20px; }
.learner-report li { margin-block: 7px; }
.inline-tool { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--rule); }
.inline-tool, .learner-report summary, .file-link { color: var(--interactive); }
.inline-tool label { color: var(--ink); }
details[open] > .stack { margin-top: 12px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.editor { max-width: 52rem; }
input[type="file"]::file-selector-button { margin-right: 10px; padding: 7px 12px; border: 0; border-radius: 12px; color: var(--ink); background: var(--soft); cursor: pointer; }
.prose { white-space: pre-line; overflow-wrap: anywhere; font-size: 1.1rem; line-height: 1.65; }
.reading #completion:not(:first-child), .material { margin-top: 24px; }
.material video { width: 100%; display: block; border-radius: 14px; background: #101721; }
.pdf-reader { border-radius: 15px; overflow: hidden; background: var(--soft); }
.pdf-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 12px; font-size: .94rem; }
.text-button { min-height: 40px; padding: 3px 7px; background: transparent; color: var(--interactive); border: 0; font: inherit; }
.text-button:disabled { opacity: .48; cursor: default; }
.pdf-sheet { overflow: auto; max-height: min(36rem,65vh); }
.pdf-sheet canvas:not([hidden]) { display: block; width: 100%; height: auto; }
.file-link { display: inline-block; margin: 8px 14px 0 0; overflow-wrap: anywhere; }
.notice, .success { border-radius: 15px; padding: 12px 15px; margin: 0 0 14px; background: var(--success-wash); color: var(--success); }
.notice.error { background: var(--error-wash); color: var(--error); }
.success { width: fit-content; }
.school fieldset { margin: 0; border: 0; padding: 0; }
.school legend { margin-bottom: 10px; font-size: 1.15rem; font-weight: 600; }
.choice { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; cursor: pointer; }
.choice input { accent-color: var(--interactive); }
.syllabus ol { margin: 0; padding-left: 21px; }
.syllabus li { padding: 5px 0; }
.syllabus a { color: var(--interactive); }
.syllabus [aria-current="page"] { color: var(--ink); font-weight: 600; }
.course-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.school [hidden] { display: none !important; }
.content-grid > *, .reader-grid > *, .editor fieldset, .option-row > input { min-width: 0; }
.person-list { list-style: none; margin: 0; padding: 0; }
.person-list > li { display: grid; gap: 4px; padding: 14px 0; overflow-wrap: anywhere; }
.person-list > li + li, .question-editor + .question-editor, .assessment-form fieldset + fieldset { border-top: 1px solid var(--rule); }
.person-list small, .attempt-history small { color: var(--quiet); }
.person-list ul { margin: 0; padding-inline-start: 1.2em; }
.person-list a, .correct-label { color: var(--interactive); }
.admin-courses, .attempt-history { margin-block: 18px; }
.assessment-meta, .option-hint { margin: 0 0 16px; color: var(--quiet); }
.assessment-form fieldset, .school .question-editor { padding-block: 16px; }
.assessment-form .button { justify-self: start; }
.question-list { padding-left: 1.4em; }
.question-list > li + li, .attempt-history li + li { margin-top: 14px; }
.question-list ul { margin: .5em 0; padding-left: 1.2em; }
.attempt-history small { display: block; }
.option-row { display: flex; align-items: center; gap: 8px; }
.option-list { display: grid; gap: 8px; }
.correct-choice { display: grid; place-items: center; width: 32px; min-height: 42px; flex: none; cursor: pointer; }
.correct-choice input { margin: 0; width: 18px; height: 18px; accent-color: var(--interactive); }
.option-row .text-button { flex: none; font-size: 1.3rem; width: 32px; }
.quiz-option-content { flex: 1; min-width: 0; display: grid; gap: .35rem; }
.quiz-option-preview:empty { display: none; }
.quiz-option-preview, .quiz-math { min-width: 0; max-width: 100%; overflow-x: auto; }
.quiz-math { display: inline-block; padding: .24em .12em; vertical-align: middle; font-size: 1.18em; }
.quiz-picture { display: block; width: 100%; max-width: 24rem; height: auto; max-height: 15rem; object-fit: contain; object-position: left center; border-radius: 10px; }
.quiz-key, .quiz-response { overflow-wrap: anywhere; }
.quiz-key li { padding-block: .35rem; }
.quiz-key li > img, .quiz-key li > audio { margin-bottom: .25rem; }
.quiz-media-options { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap: 1rem; margin-block: .6rem; }
.quiz-media-option, .quiz-option-preview { min-width: 0; }
.quiz-media-option audio, .quiz-option-preview audio, .quiz-response audio, .quiz-key audio { display: block; width: min(100%,22rem); }
.quiz-media-option .choice, .question-editor .choice, .assessment-form .choice { display: flex; align-items: center; gap: .6rem; }
.school .question-editor input[type=checkbox], .school .assessment-form input[type=checkbox] { display: inline-block; width: 1.1rem; min-height: 0; height: 1.1rem; padding: 0; flex: none; }
.quiz-image-answer { display: block; cursor: pointer; }
.quiz-image-answer:has(input:checked) .quiz-picture { outline: 2px solid var(--interactive); outline-offset: 2px; }
.quiz-media-option .choice { overflow-wrap: anywhere; }
.quiz-response { display: grid; justify-items: start; gap: .3rem; margin: .3rem 0 .7rem; }
.quiz-response figure { margin: .25rem 0; max-width: 100%; }
.quiz-bound { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) auto; align-items: end; gap: .5rem; }
.quiz-bound label, .quiz-gap-list label { display: grid; gap: .3rem; min-width: 0; }
.question-editor .text-button { justify-self: start; }
.quiz-gap-pair { display: grid; gap: .4rem; }
.quiz-gap-list { display: flex; flex-direction: column; gap: .7rem; }
.quiz-passage { line-height: 2; white-space: pre-wrap; overflow-wrap: anywhere; }
.school .assessment-form .quiz-passage .blank-control { display: inline-block; vertical-align: middle; width: 12ch; max-width: 100%; min-height: 2.4rem; padding: .3rem .45rem; margin: .15rem; }
.school .assessment-form .quiz-passage select.blank-control { width: auto; max-width: min(100%,24ch); }
.quiz-word-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.quiz-word-chips .button { font-size: 1rem; min-height: 2.6rem; }
.blank-control.current-blank { border-color: var(--interactive); }
@media (max-width: 480px) {
  .quiz-bound { grid-template-columns: minmax(0,1fr) auto; }
  .quiz-bound label:first-child { grid-column: 1 / -1; }
}
.workspace-head h1 { overflow-wrap: anywhere; }
.assigned-tests { margin-bottom: 20px; }
.work-status { display: inline-flex; align-items: center; gap: 5px; margin-inline-start: auto; color: var(--interactive); font-size: .93rem; white-space: nowrap; }
.work-status .icon { width: 15px; height: 15px; }
.error-card { display: grid; gap: 22px; }
.error-card h1 { font-size: clamp(1.7rem,3vw,2.4rem); }
@media (min-width:851px) {
  .course-grid:has(> :only-child) .course-card:has(.card-cover) { display: grid; grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); }
  .course-grid:has(> :only-child) .card-cover { height: 100%; min-height: 285px; }
}
@media (max-width:850px) {
  .school .header-glass { display: flex; justify-content: space-between; gap: 8px; }
  .school .header-course-link { display: none; }
  .entry-layout { grid-template-columns: minmax(0,1fr) minmax(320px,1.05fr); gap: 22px; }
  .entry-intro { min-height: 420px; }
  .entry-intro h1 { font-size: clamp(3.4rem,7.4vw,4.6rem); }
  .entry-art { width: 100%; margin-left: 1%; }
  .content-grid, .reader-grid { grid-template-columns: 1fr; }
}
@media (max-width:680px) {
  .entry-main { display: block; padding: calc(var(--header-top) + var(--header-height) + 26px) var(--side) 68px; }
  .entry-layout { display: block; max-width: 490px; }
  .entry-intro { min-height: 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(85px,.54fr); gap: 2px; align-items: center; padding: 6px 0 20px; }
  .entry-intro h1 { font-size: clamp(2.7rem,8.7vw,3.8rem); line-height: 1; }
  .entry-intro h1 br { display: none; }
  .entry-heading p { margin-top: 8px; font-size: 1rem; max-width: 22ch; }
  .entry-art { width: 100%; margin: 0; aspect-ratio: .95; }
  .auth-panel { padding: 22px; border-radius: 26px; }
  .auth-panel h2:not(:only-child) { margin-bottom: 18px; }
  .auth-panel h2 { font-size: 1.83rem; }
  .entry-main::before { width: 130vw; height: 100vw; bottom: -42vw; }
  .wrapper { padding-top: calc(var(--header-top) + var(--header-height) + 25px); }
  .workspace-head { display: grid; gap: 15px; margin-bottom: 16px; }
  .work-counts { gap: 16px; }
  .work-counts div { flex-direction: row; align-items: baseline; gap: 6px; padding-left: 0; border: 0; }
  .work-counts dt { order: 2; }
  .work-counts dd { font-size: 1.32rem; }
  .work-counts dt { font-size: .86rem; }
  .field-pair { grid-template-columns: 1fr; }
}
@media (max-width:480px) {
  .institute-link { font-size: .86rem; padding: 0 8px; gap: 4px; }
  .school-nav { gap: 4px; }
  .leave { width: 38px; padding: 0; }
  .leave span { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
}
@media (max-width:390px) {
  .workspace .institute-link { min-width: 36px; padding: 0; }
  .workspace .institute-link span { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
}
@media (max-width:360px) {
  .entry-heading p { font-size: .95rem; }
  .auth-panel { padding: 18px; }
  .role-actions .button { font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) {
  .school *, .school *::before, .school *::after { scroll-behavior: auto !important; transition-duration: 0s !important; }
}
@media (forced-colors: active) {
  .gradient-text { background: none !important; color: CanvasText; -webkit-text-fill-color: CanvasText; }
  .panel, .button, .course-card { border: 1px solid ButtonText; }
}

.workspace-links { flex-wrap: wrap; margin-block: 1rem 2rem; }
.workspace .panel + .panel { margin-block-start: 1.25rem; }
.workspace .content-grid > .panel + .panel { margin-block-start: 0; }
.workspace .prose { white-space: pre-wrap; overflow-wrap: anywhere; }
.workspace .learner-report:target { scroll-margin-top: 7rem; }

/* Administration, reports and the institute's editable course pages. */
.workspace :is(.course-register,.program-hero) { margin-bottom: clamp(20px,3vw,38px); }
.origin-label { color:var(--interactive); font-weight:600; }
.capabilities, .page-block-editor { min-width:0; margin:0; padding:0; border:0; }
.capabilities legend, .page-block-editor legend { font-weight:600; padding:0; margin-bottom:.7rem; }
.capabilities .choice { margin-block:.45rem; display:flex; align-items:center; gap:.7rem; }
.capabilities input[type=checkbox] { width:1.15rem; height:1.15rem; }
.filter-fields { display:grid; grid-template-columns:minmax(0,1.6fr) repeat(2,minmax(0,1fr)); gap:16px; }
.filter-fields select, .filter-fields input, .page-form :is(select,input,textarea) { max-width:100%; min-width:0; }
.metric-strip { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin:1.25rem 0; }
.metric-strip div { display:flex; flex-direction:column-reverse; gap:5px; }
.metric-strip dt, .data-table small { color:var(--quiet); font-size:1rem; }
.metric-strip dd { color:var(--ink); margin:0; font-weight:500; font-size:clamp(2rem,4vw,3rem); line-height:1; }
.data-scroll { max-width:100%; overflow:auto; }
.data-table { width:100%; border-collapse:collapse; line-height:1.4; }
.data-table :is(th,td) { border-bottom:1px solid var(--rule); text-align:start; vertical-align:top; padding:12px 9px; }
.data-table th { font-weight:600; }
.data-table th:first-child { min-width:13rem; }
.data-table small { display:block; font-weight:400; }
.page-form { max-width:58rem; }
.page-block-editor { border-top:1px solid var(--rule); padding-top:12px; }
.page-block-editor legend { float:left; width:100%; }
.page-block-editor .stack { clear:both; }
.school .text-button { border:0; padding:8px 4px; background:transparent; color:var(--interactive); font-size:1rem; text-decoration:underline; }
.school button:disabled { opacity:.55; cursor:default; }
.cover-preview { width:min(100%,340px); height:auto; border-radius:18px; }
.program-hero { display:grid; align-items:center; grid-template-columns:minmax(0,1.25fr) minmax(0,.75fr); overflow:hidden;
  gap:clamp(16px,3vw,40px); border-radius:var(--radius,28px); background:var(--page-wash); color:var(--ink); padding:clamp(24px,4.5vw,72px); }
.program-hero:has(>div:only-child) { grid-template-columns:1fr; }
.palette-sky { --page-wash:linear-gradient(120deg,#e8f1ff,#d4e9ef); }
.palette-mint { --page-wash:linear-gradient(120deg,#e4f6f0,#d9eff1); }
.palette-violet { --page-wash:linear-gradient(120deg,#edeaff,#e2e8fc); }
:root[data-theme=dark] .palette-sky { --page-wash:linear-gradient(120deg,#1c2f49,#193e4d); }
:root[data-theme=dark] .palette-mint { --page-wash:linear-gradient(120deg,#183c39,#193548); }
:root[data-theme=dark] .palette-violet { --page-wash:linear-gradient(120deg,#302b49,#24344d); }
.program-hero h1 { font-weight:400; font-size:clamp(2.1rem,4.8vw,4.5rem); letter-spacing:-.032em; line-height:1.06; overflow-wrap:anywhere; }
.program-hero img { width:100%; aspect-ratio:16/10; object-fit:cover; border-radius:21px; }
.landing-columns { align-items:start; }
.landing-text,.landing-columns>* { min-width:0; }
.landing-text :is(p,h2,li),.intro,.api-guide dd { overflow-wrap:anywhere; }
.editorial-note { background:var(--page-wash); }
.api-guide dd { margin:0 0 1rem; }
.api-guide dt { font-weight:600; margin-top:.8rem; }
.school .course-actions { flex-wrap:wrap; }
.school .stack label { min-width:0; }
@media (max-width:750px) {
  .program-hero,.filter-fields { grid-template-columns:minmax(0,1fr); }
  .metric-strip { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .program-hero img { max-height:220px; }
  .data-table :is(th,td) { min-width:5.3rem; }
  .school .work-counts { flex-wrap:wrap; }
}
