:root {
  color-scheme: light;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #211a36;
  background: #f7f6fb;
  font-synthesis: none;
  font-weight: 400;
  --ink: #211a36;
  --muted: #625b73;
  --line: #e8e4f0;
  --white: #fff;
  --accent: #5934c1;
  --accent-dark: #48239f;
  --violet: #efe9ff;
  --radius: 18px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; line-height: 1.45; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #744ce0; outline-offset: 3px; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(30px, 4vw, 48px); letter-spacing: -.045em; }
h2 { font-size: 21px; letter-spacing: -.024em; }
h3 { font-size: 16px; letter-spacing: -.012em; }
small { font-size: 12px; }
.icon { display: inline-block; width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }

.syllabus-screen { max-width: 1120px; margin: 0 auto; }
.syllabus-screen, .syllabus-content { display: grid; gap: 24px; }
.syllabus-screen h2, .syllabus-content h2 { margin-bottom: 12px; }
.panel.syllabus-header { padding: clamp(20px, 5vw, 44px); background: var(--violet); }
.syllabus-header > p { color: var(--muted); margin: 8px 0 22px; }
.syllabus-search { max-width: 620px; display: grid; gap: 6px; }
.syllabus-search label { font-weight: 650; }
.syllabus-search > div { display: flex; gap: 8px; }
.syllabus-search input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: inherit; }
.syllabus-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.syllabus-card { display: flex; align-items: center; gap: 12px; padding: 14px; min-height: 74px; }
.syllabus-card:hover { border-color: var(--accent); }
.syllabus-card > span:nth-child(2) { flex: 1; min-width: 0; }
.syllabus-card strong, .syllabus-card small { display: block; }
.syllabus-card small { color: var(--muted); margin-top: 4px; }
.syllabus-breadcrumbs, .syllabus-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.syllabus-breadcrumbs a { text-decoration: underline; text-underline-offset: 3px; }
.syllabus-breadcrumbs .syllabus-back { min-height: 40px; padding: 6px 12px; margin-right: 6px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; }
.syllabus-breadcrumbs .syllabus-back:hover { background: var(--violet); }
.course-main > .syllabus-breadcrumbs { margin-bottom: 12px; }
.academic-row[id^="exam-"] { scroll-margin-top: 110px; }
.academic-row[id^="exam-"]:target { border-color: var(--accent); }
.syllabus-questions { display: grid; gap: 8px; }
.syllabus-question { padding: 0 16px; }
.syllabus-question summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; font-weight: 650; padding: 13px 0; }
.syllabus-question summary::-webkit-details-marker { display: none; }
.syllabus-question[open] summary .icon { transform: rotate(90deg); }
.syllabus-question p { padding-bottom: 10px; }
.syllabus-question .text-link { margin-bottom: 14px; }
.syllabus-info, .syllabus-empty { padding: clamp(16px, 3vw, 26px); }
.syllabus-info h3 { margin: 16px 0 8px; }
.syllabus-info ol { margin-bottom: 0; padding-left: 22px; }
.syllabus-info li + li { margin-top: 5px; }
.syllabus-info .text-link, .syllabus-empty .text-link { margin-top: 10px; }
.syllabus-weights { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 135px), 1fr)); gap: 8px; margin-bottom: 8px; }
.syllabus-weights > div { border: 1px solid var(--line); border-radius: 10px; padding: 10px; }
.syllabus-weights dd { font-size: 20px; font-weight: 700; }
.skip-link { position: absolute; transform: translateY(-160%); z-index: 10; top: 0; left: 16px; background: var(--white); padding: 12px; }
.skip-link:focus { transform: none; }
.muted { color: var(--muted); }
.brand { display: inline-flex; gap: 11px; align-items: center; width: fit-content; color: var(--ink); }
.brand strong { display: block; font-size: 21px; line-height: 1.1; letter-spacing: -.04em; }
.brand small { display: block; color: var(--muted); margin-top: 3px; white-space: nowrap; }
.mark { width: 39px; height: 39px; flex: 0 0 auto; border-radius: 12px; background: #6339d4; display: grid; grid-template: repeat(2, 6px) / repeat(2, 6px); gap: 3px; place-content: center; }
.mark i { width: 6px; height: 6px; background: #fff; border-radius: 1.5px; }
.mark i:nth-child(2) { background: #d4c2ff; transform: translate(1px, -1px) rotate(24deg); }
.primary-nav { display: grid; gap: 6px; }
.primary-nav a { display: flex; gap: 12px; align-items: center; min-height: 47px; padding: 0 13px; color: #514961; border-radius: 10px; font-weight: 600; }
.primary-nav a:hover, .primary-nav a[aria-current] { background: var(--violet); color: var(--accent-dark); }
.nav-group summary { display: flex; gap: 11px; align-items: center; min-height: 47px; padding: 0 13px; border-radius: 10px; font-weight: 650; list-style: none; cursor: pointer; }
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:hover { background: var(--home-soft); }
.nav-chevron { margin-left: auto; }
.nav-chevron .icon { width: 15px; height: 15px; }
.nav-group[open] .nav-chevron .icon { transform: rotate(90deg); }
.nav-group > div { margin-left: 22px; }
.nav-group > div a { min-height: 39px; font-size: 13px; }
.concept { display: inline-flex; gap: 7px; align-items: center; font-size: 12px; font-weight: 650; color: #4d3682; }
.concept i { width: 7px; height: 7px; border-radius: 50%; background: #936bf6; }
.topbar { background: var(--white); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1320px; min-height: 72px; margin: auto; padding: 0 40px; display: flex; gap: 16px; justify-content: space-between; align-items: center; }
.topbar-shortcuts { display: flex; align-items: center; gap: 8px; }
.topbar-shortcuts a { display: inline-flex; align-items: center; min-height: 44px; gap: 7px; padding: 0 10px; border-radius: 8px; font-weight: 650; }
.topbar-shortcuts a:hover, .topbar-shortcuts a[aria-current] { background: var(--home-soft); }
.topbar-shortcuts .icon { width: 17px; height: 17px; }
.mobile-foot { display: none; }
.account { display: inline-flex; gap: 9px; align-items: center; border-radius: 9px; color: var(--ink); }
.account:hover, .account[aria-current] { color: var(--accent); }
.account .icon { width: 16px; height: 16px; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--accent-dark); background: var(--violet); flex: 0 0 auto; font-weight: 700; font-size: 12px; }
.account-name { font-size: 13px; font-weight: 650; }
.account-name small { display: block; color: var(--muted); font-weight: 400; }
.content { max-width: 1320px; padding: 30px 40px 60px; margin: auto; }
.standalone { max-width: 720px; }
.page-intro { margin-bottom: 24px; overflow-wrap: anywhere; }
.page-intro p { color: var(--muted); margin-top: 9px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); min-width: 0; }
.badge { display: inline-flex; gap: 5px; align-items: center; border-radius: 100px; font-size: 11px; line-height: 1.25; font-weight: 700; padding: 5px 9px; width: fit-content; }
.badge.amber, .icon-tile.amber { background: #fff2d8; color: #855000; }
.badge.blue, .icon-tile.blue { background: #eaf1ff; color: #265095; }
.badge.mint, .icon-tile.mint { background: #e2f5ee; color: #166149; }
.badge.violet, .icon-tile.violet { background: var(--violet); color: var(--accent-dark); }
.badge.neutral { background: #f0eef4; color: #544c65; }
.icon-tile { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto; }
.button, .button-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 10px 16px; background: var(--accent); color: #fff; border: 1px solid transparent; border-radius: 10px; font-weight: 650; text-align: center; width: fit-content; }
.button:hover { background: var(--accent-dark); }
.button-secondary { background: #fff; color: var(--accent-dark); border-color: var(--line); }
.button-secondary:hover { background: var(--violet); }
.button .icon, .button-secondary .icon, .text-link .icon, .back-link .icon { width: 17px; height: 17px; }
.text-link, .back-link { display: inline-flex; align-items: center; gap: 7px; color: var(--accent-dark); font-weight: 650; width: fit-content; }
.text-link:hover, .back-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.back-link { min-height: 40px; margin: 0 0 12px; }
.tabs { display: inline-flex; gap: 4px; background: #eeeaf5; border-radius: 11px; padding: 4px; max-width: 100%; }
.tabs a { display: grid; place-items: center; padding: 7px 17px; border-radius: 8px; font-weight: 650; color: var(--muted); text-align: center; min-height: 38px; }
.tabs a:hover { color: var(--accent-dark); }
.tabs a[aria-current] { color: var(--accent-dark); background: #fff; box-shadow: 0 1px 4px #32235216; }

.zone { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.zone .icon { width: 15px; height: 15px; }
.feed-item > .icon:last-child { width: 15px; height: 15px; color: #787087; }
.empty { display: flex; align-items: center; gap: 11px; padding: 14px; }
.empty p { color: var(--muted); font-size: 13px; }
.detail { max-width: 790px; }
.detail-heading { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0 14px; margin-bottom: 17px; }
.detail-heading .page-intro { margin-bottom: 0; }
.detail-heading > .badge { margin-top: 8px; }
.detail-panel, .change-panel { padding: 20px; margin: 0 0 14px; }
.change-panel { background: #fffaf0; border-color: #ead6b6; }
.update-intro { display: flex; gap: 10px; align-items: center; }
.change-grid, .facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.change-grid dt, .facts dt { color: var(--muted); font-size: 13px; }
.change-grid dd, .facts dd { margin-top: 3px; }
.change-grid dd > * { display: block; }
.change-grid s { color: #6c6175; }
.detail-footer { margin-top: 16px; }
.feed { display: grid; gap: 9px; max-width: 820px; }
.feed-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 15px; align-items: center; }
.feed-item .icon-tile { align-self: start; }
.feed-caption { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; font-size: 12px; }
.feed-item h2 { font-size: 17px; }
.feed-item p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.feed-item p strong { color: var(--ink); }

.login-frame { --ink: #191a1b; --muted: #595a5d; --line: #dddeda; --accent: #222325; --accent-dark: #191a1b; --violet: #efefed; color: var(--ink); min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.03fr); }
.login-frame:has(.login-main:only-child) { grid-template-columns: minmax(0, 1fr); }
.login-frame :focus-visible { outline-color: #55565a; }
.login-form > .text-link { display: inline-block; margin-top: 12px; }
.login-main { display: grid; grid-template-rows: auto 1fr auto; gap: 30px; padding: 28px clamp(20px, 4.5vw, 64px); background: #fff; }
.login-main footer { color: var(--muted); font-size: 12px; }
.login-form { align-self: center; width: min(100%, 360px); margin: 0 auto; }
.login-form h1 { margin: 10px 0 7px; }
.login-form > p { color: var(--muted); }
form label:not(.choice) { display: grid; gap: 6px; font-weight: 650; }
form input:not([type=hidden]) { display: block; width: 100%; border: 1px solid #d9d3e6; border-radius: 9px; padding: 10px 12px; min-height: 46px; background: #fff; color: var(--ink); }
.login-form form { display: grid; gap: 14px; margin-top: 22px; }
.login-form .button { width: 100%; justify-content: space-between; margin-top: 4px; }
.form-error, .login-form .form-error { background: #fff0ef; color: #8e2425; border-radius: 9px; padding: 8px 12px; margin-top: 12px; }
.login-art { position: relative; isolation: isolate; display: flex; justify-content: end; flex-direction: column; overflow: hidden; color: #fff; padding: 9%; min-height: 450px; background: radial-gradient(#ffffff33 1px, transparent 1px) center / 20px 20px, linear-gradient(145deg, #1b1c1d, #363738); }
.login-orbit { position: absolute; width: min(80%, 420px); aspect-ratio: 1; top: 42%; left: 50%; transform: translate(-50%, -50%); border: 1px solid #ffffff80; border-radius: 50%; box-shadow: 0 0 0 30px #ffffff24, inset 0 0 0 29px #ffffff25; }
.login-symbol { display: grid; position: absolute; top: 42%; left: 50%; transform: translate(-50%, -50%) rotate(-9deg); place-items: center; width: 140px; height: 140px; border: 1px solid #fff9; border-radius: 32px; background: #ffffff24; box-shadow: 0 10px 26px #0006; }
.login-symbol .icon { height: 77px; width: 77px; stroke-width: 1.2; }
.login-art-text { position: relative; margin-top: 250px; }
.login-art-text h2 { font-size: clamp(29px, 4.4vw, 64px); letter-spacing: -.045em; }
.login-art-text p { color: #ebebeb; margin-top: 8px; }

@media (max-width: 1120px) {
  .topbar-inner, .content { padding-left: 25px; padding-right: 25px; }
}
@media (max-width: 740px) {
  .primary-nav .icon { width: 21px; height: 21px; }
  .topbar-shortcuts { gap: 2px; }
  .topbar-shortcuts a { padding-inline: 6px; }
  .topbar-shortcuts .icon { display: none; }
  .topbar-inner { min-height: 61px; padding: 0 16px; }
  .mobile-foot { display: block; }
  .mobile-foot { margin-top: 27px; font-size: 11px; color: var(--muted); }
  .mobile-foot .concept { font-size: inherit; }
  .brand strong { font-size: 19px; }
  .brand small { font-size: 11px; }
  .mark { width: 36px; height: 36px; }
  .account-name { display: none; }
  .content { padding: 18px 16px calc(85px + env(safe-area-inset-bottom)); }
  .zone { font-size: 11px; }
  .zone .icon { display: none; }
  .detail-panel, .change-panel { padding: 14px; }
  .login-frame { grid-template-columns: minmax(0, 1fr); }
  .login-art { display: none; }
  .login-main { padding: 23px 20px; }
}

.topbar-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.topbar-notices { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: inherit; }
.notice-popover { position: fixed; inset: 64px clamp(16px, 4vw, 40px) auto auto; margin: 0; width: min(384px, calc(100vw - 32px)); max-height: calc(100dvh - 80px); overflow: auto; padding: 10px; border: 1px solid var(--home-rule); border-radius: 16px; color: var(--home-text); background: var(--home-paper); box-shadow: 0 12px 34px #17181722; }
.notice-popover header { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-left: 8px; }
.notice-popover h2 { font-size: 17px; }
.notice-popover ul { list-style: none; margin: 4px 0 8px; padding: 0; }
.notice-popover li + li { border-top: 1px solid var(--home-rule); }
.notice-popover li a, .notice-all { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px; border-radius: 8px; }
.notice-popover a:hover { background: var(--home-soft); }
.notice-icon { display: grid; place-items: center; flex: none; width: 32px; aspect-ratio: 1; border-radius: 6px; background: var(--home-soft); }
.notice-icon .icon { width: 16px; height: 16px; }
.notice-text { overflow-wrap: anywhere; font-size: 14px; }
.notice-text small { display: block; margin-top: 1px; color: var(--home-muted); }
.notice-all { justify-content: space-between; border: 1px solid var(--home-rule); font-size: 13px; font-weight: 650; }
.notice-all .icon { width: 16px; height: 16px; }

.app-frame {
  --home-paper: #fff;
  --home-bg: #f6f6f4;
  --home-text: #191a1b;
  --home-muted: #595a5d;
  --home-rule: #dddeda;
  --home-soft: #ebebe8;
  min-height: 100dvh;
  background: var(--home-bg);
  color: var(--home-text);
}
.app-frame .student-sidebar, .app-frame .topbar { border-color: var(--home-rule); }
.app-frame .brand, .app-frame .account:hover { color: var(--home-text); }
.app-frame .brand small, .app-frame .account-name small, .app-frame .concept { color: var(--home-muted); }
.app-frame .mark, .app-frame .concept i { background: var(--home-text); }
.app-frame .mark i:nth-child(2) { background: #ababac; }
.app-frame .primary-nav a { color: var(--home-muted); }
.app-frame .primary-nav > a { color: var(--home-text); font-weight: 650; }
.app-frame .primary-nav a:hover, .app-frame .topbar-notices:hover, .app-frame .topbar-actions:has(.notice-popover:popover-open) > .topbar-notices, .app-frame .avatar { background: var(--home-soft); color: var(--home-text); }
.app-frame .primary-nav a[aria-current] { background: var(--home-text); color: #fff; }
.app-frame :focus-visible { outline-color: #55565a; }
.app-frame .content { padding-top: 34px; }
.home-heading { display: flex; justify-content: space-between; align-items: end; gap: 14px; margin-bottom: 26px; }
.home-heading h1 { font-size: clamp(36px, 4.3vw, 60px); letter-spacing: -.065em; }
.home-date { font-size: 14px; color: var(--home-muted); margin-bottom: 4px; }
.home-grid { display: grid; gap: 24px; }
.home-announcements { margin-bottom: 24px; }
.home-announcement-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 10px; }
.home-announcement-grid strong, .home-announcement-grid small { display: block; overflow-wrap: anywhere; }
.home-announcement-grid small { color: var(--muted); }
.home-courses { min-width: 0; }
.home-agenda { min-width: 0; background: var(--home-paper); border-radius: 19px; border: 1px solid var(--home-rule); overflow: clip; }
.home-agenda-heading, .home-form-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.home-courses-heading { margin-bottom: 12px; }
.course-list-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 7px; }
.course-list-heading .home-courses-heading { margin: 0; }
.course-list-heading .home-link { min-height: 40px; font-size: 13px; }
.home-courses > .tabs { margin-bottom: 11px; }
.home-courses-heading, .home-agenda-heading h2 { font-size: clamp(17px, 1.8vw, 22px); }
.home-agenda-heading { padding: 14px 16px 11px; }
.home-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 7px 12px; color: #fff; background: var(--home-text); border-radius: 9px; border: 1px solid transparent; font-size: 13px; font-weight: 650; }
.home-button-outline { background: var(--home-paper); border-color: var(--home-rule); color: var(--home-text); }
.home-button:hover { filter: brightness(.94); }
.home-button .icon, .home-link .icon { width: 16px; height: 16px; }
.home-add { flex: none; padding-inline: 8px; }
.home-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.home-course { border: 1px solid var(--home-rule); border-radius: 17px; background: var(--home-paper); overflow-wrap: anywhere; }
.home-course-tile { display: flex; justify-content: space-between; align-items: center; gap: 11px; padding: 12px 13px; min-height: 86px; border-radius: 16px; font-size: 14px; font-weight: 700; }
a.home-course-tile:hover { background: #f1f1ef; border-color: #b9bab7; }
.home-course:target { outline: 2px solid #676867; outline-offset: 3px; }
.home-course-symbol { flex: none; display: grid; place-items: center; width: 48px; aspect-ratio: 1; border-radius: 5px; background: var(--home-soft); }
.home-course-symbol .icon { width: 25px; height: 25px; }
.home-course-name { flex: 1; }
.home-course-chevron { flex: 0 0 auto; }
.home-course-chevron .icon { width: 16px; height: 16px; }
.course-view { max-width: 960px; margin-inline: auto; padding: clamp(20px, 4vw, 48px) clamp(14px, 4vw, 40px) 40px; }
.course-view > .back-link { min-height: 44px; margin-bottom: 16px; }
.course-heading { display: flex; align-items: center; gap: clamp(10px, 2vw, 18px); margin-bottom: clamp(18px, 3vw, 28px); }
.course-heading-icon { display: grid; place-items: center; flex: none; width: clamp(44px, 6vw, 62px); aspect-ratio: 1; border-radius: 9px; background: var(--home-soft); }
.course-heading-icon .icon { width: 26px; height: 26px; }
.course-heading h1 { font-size: clamp(26px, 5vw, 46px); overflow-wrap: anywhere; }
.course-heading p { margin-top: 5px; color: var(--home-muted); font-size: 14px; }
.course-content { display: grid; gap: 16px; padding: clamp(14px, 2.5vw, 24px); border: 1px solid var(--home-rule); border-radius: 17px; background: var(--home-paper); }
.course-content h2 { font-size: 16px; }
.course-overview, .course-overview dl { display: grid; gap: 10px; }
.course-overview dt { color: var(--home-muted); }
.course-overview dd { font-weight: 650; }
.course-entries { display: grid; gap: 8px; }
.course-entries > h2 { margin-top: 8px; }
.course-entry { border: 1px solid var(--home-rule); border-radius: 10px; }
.course-entry summary, .course-results li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 12px; font-size: 14px; }
.course-entry summary { min-height: 54px; list-style: none; cursor: pointer; border-radius: 10px; }
.course-entry summary::-webkit-details-marker { display: none; }
.course-entry summary:hover { background: var(--home-soft); }
.course-entry summary .icon { flex: none; width: 16px; height: 16px; }
.course-entry[open] summary .icon { transform: rotate(90deg); }
.course-entry small, .course-results small { display: block; color: var(--home-muted); font-size: 12px; }
.course-entry-body { display: grid; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--home-rule); font-size: 14px; }
.course-entry-body > * { max-width: 70ch; }
.course-entry-body ol { margin: 0; padding-left: 20px; }
.course-results { list-style: none; padding: 0; margin: 0; }
.course-results li { min-height: 54px; border-top: 1px solid var(--home-rule); }
.course-result-value { flex: none; padding: 4px 9px; border-radius: 6px; background: var(--home-soft); font-size: 13px; font-weight: 700; white-space: nowrap; }
.homework-list { padding: 0; margin: 0; list-style: none; }
.homework-list li + li { border-top: 1px solid var(--home-rule); }
.homework-list li > :is(a, div), .homework-columns { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.25fr) 95px; gap: 9px; align-items: center; min-height: 54px; padding: 10px 14px; font-size: 14px; overflow-wrap: anywhere; }
.homework-columns { min-height: 0; font-size: 12px; color: var(--muted); }
.homework-columns > :last-child { text-align: right; }
.homework-list li > div { grid-template-columns: minmax(0, 1fr) 95px; }
.homework-course { color: var(--home-muted); }
.homework-list a:hover strong:first-child { text-decoration: underline; }
.homework-list small { display: block; margin-top: 2px; color: var(--home-muted); }
.homework-meta { text-align: right; font-size: 12px; }
.homework-list .icon { width: 15px; height: 15px; }
.catalog-list { overflow: hidden; }
.catalog-list table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.catalog-list th, .catalog-list td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.catalog-list thead { background: var(--home-soft); font-size: 13px; }
.catalog-list tr > :last-child { width: min(34%, 185px); text-align: right; }
.catalog-list tbody tr:last-child > * { border-bottom: 0; }
.catalog-list a { display: flex; align-items: center; gap: 8px; }
.catalog-list a:hover { text-decoration: underline; }
.catalog-list a .icon { width: 18px; height: 18px; }
@media (max-width: 520px) {
  .homework-list li > a, .homework-columns { grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) 63px; font-size: 12px; padding-inline: 9px; }
  .homework-meta { font-size: 11px; }
}
.home-link { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; width: fit-content; text-underline-offset: 3px; }
.home-link:hover { text-decoration: underline; }
.home-agenda-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: end; gap: 4px 14px; }
.home-agenda-more { min-height: 34px; font-size: 12px; }
.home-activity-list, .home-completed ul { list-style: none; padding: 0; margin: 0; }
.home-activity { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; padding: 7px 15px; align-items: center; border-top: 1px solid var(--home-rule); }
.home-activity:has(.home-mark) { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.home-activity-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--home-soft); }
.home-activity-icon .icon { width: 16px; height: 16px; }
.home-activity-test .home-activity-icon { background: #232426; color: #fff; }
.home-activity-copy { min-width: 0; overflow-wrap: anywhere; }
.home-activity h3 { font-size: 14px; line-height: 1.25; }
.home-activity h3 a { display: inline-flex; align-items: center; gap: 3px; }
.home-activity h3 a:hover { text-decoration: underline; }
.home-activity h3 .icon { width: 12px; height: 12px; }
.home-activity p, .home-activity-date span { font-size: 12px; color: var(--home-muted); }
.home-activity-date { display: grid; justify-items: end; line-height: 1.25; font-variant-numeric: tabular-nums; }
.home-activity-date strong { font-size: 13px; }
.home-mark button { display: grid; place-items: center; min-width: 44px; min-height: 44px; border-radius: 9px; background: var(--home-paper); border: 1px solid var(--home-rule); color: var(--home-text); }
.home-mark button:hover { background: var(--home-soft); }
.home-mark .icon { width: 17px; height: 17px; }
.home-agenda-empty { padding: 10px 16px 15px; color: var(--home-muted); }
.home-completed { border-top: 1px solid var(--home-rule); padding: 11px 16px; font-size: 13px; }
.home-completed summary { font-weight: 650; cursor: pointer; }
.home-completed li { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; overflow-wrap: anywhere; }
.home-completed p { color: var(--home-muted); font-size: 12px; }
.home-reminder { margin: 0 14px 12px; padding: 13px; border-radius: 12px; border: 1px solid var(--home-rule); background: #f9f9f7; scroll-margin: 10px; }
.home-reminder form, .home-form-datetime { display: grid; gap: 9px; }
.home-reminder form { margin-top: 9px; font-size: 13px; }
.home-form-datetime { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.home-reminder input:not([type=hidden]), .home-reminder select { width: 100%; min-width: 0; border-radius: 8px; padding: 7px 6px; min-height: 42px; border: 1px solid #c4c5c3; color: var(--home-text); background: #fff; }
.home-reminder .home-link { font-size: 12px; }
@media (max-width: 960px) {
  .home-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 740px) {
  .topbar-actions { gap: 5px; }
  .notice-popover { top: 56px; right: 16px; }
  .app-frame .content { padding-top: 21px; }
  .home-heading { margin-bottom: 17px; align-items: end; gap: 7px; }
  .home-heading h1 { font-size: clamp(28px, 9vw, 46px); }
  .home-heading .home-button { gap: 4px; padding-inline: 8px; font-size: 12px; }
  .home-agenda-heading { padding-top: 9px; padding-bottom: 8px; }
  .home-cards { gap: 8px; }
  .home-course-tile { min-height: 84px; gap: 5px; padding: 8px; font-size: 13px; }
  .home-course-symbol { width: 34px; }
  .home-course-symbol .icon { width: 20px; height: 20px; }
  .home-course-chevron .icon { width: 12px; height: 12px; }
  .home-agenda-heading { gap: 4px; padding-inline: 10px; }
  .home-agenda-actions { flex: none; flex-wrap: nowrap; gap: 3px 8px; }
  .home-agenda-more { min-height: 28px; }
  .home-add { width: 36px; min-height: 36px; padding: 0; }
  .home-add span { display: none; }
  .home-activity, .home-activity:has(.home-mark) { grid-template-columns: auto minmax(0, 1fr) auto; padding-inline: 10px; gap: 1px 7px; }
  .home-activity-icon { grid-row: 1 / span 2; }
  .home-activity-date { grid-column: 2; justify-items: start; display: flex; flex-wrap: wrap; gap: 0 6px; }
  .home-activity-date strong { font-size: 12px; }
  .home-activity .home-mark { grid-column: 3; grid-row: 1 / span 2; }
}

.section-toolbar { margin-bottom: 23px; }
.service-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 12px; }
.service-catalog .service-card { max-width: none; display: flex; flex-direction: column; align-items: start; }
.service-catalog .service-card > p { flex: 1; }
.service-message textarea { width: 100%; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 10px; color: var(--ink); }
.service-message > p { color: var(--muted); }
.service-body { white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 10px; }
.service-card { max-width: 475px; padding: 22px; }
.service-card h2 { margin-top: 12px; }
.service-card p { color: var(--muted); margin-top: 7px; }
.service-meta { display: flex; align-items: center; gap: 6px; margin: 15px 0; color: var(--muted); font-size: 13px; }
.service-meta .icon { width: 16px; height: 16px; }
.record-list { display: grid; gap: 9px; max-width: 820px; }
.record-row, .academic-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 11px; padding: 13px 15px; }
.record-row:hover { border-color: #baaaeb; }
.record-row > .icon { width: 16px; height: 16px; color: #787087; }
.record-name h2, .record-name h3 { font-size: 16px; }
.record-name p { color: var(--muted); font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.academic-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.academic-row .badge { max-width: 190px; }
.study-content + .study-content { margin-top: 24px; }
.grade-table-panel { overflow: hidden; }
.grade-table { width: 100%; table-layout: fixed; border-collapse: collapse; font-size: clamp(12px, 2vw, 14px); font-variant-numeric: tabular-nums; }
.grade-table th, .grade-table td { padding: 11px clamp(8px, 1.5vw, 16px); text-align: left; vertical-align: middle; overflow-wrap: anywhere; }
.grade-table thead { color: var(--home-muted); background: #f5f5f3; }
.grade-table thead th { width: 24%; font-weight: 650; }
.grade-table thead th:first-child { width: 52%; }
.grade-table tbody tr { border-top: 1px solid var(--home-rule); }
.grade-table th:has(a) { padding-block: 0; }
.grade-table th a { display: flex; align-items: center; justify-content: space-between; min-height: 48px; gap: 4px; padding-block: 8px; }
.grade-table th a:hover { text-decoration: underline; text-underline-offset: 3px; }
.grade-table th a .icon { width: 14px; height: 14px; color: var(--home-muted); }
.grade-table th small { display: block; color: var(--home-muted); font-weight: 400; }
.grade-table td { font-weight: 600; }
.grade-empty { padding: 16px; color: var(--home-muted); }
.grade-note { margin-top: 8px; color: var(--home-muted); font-size: 12px; }
.staff-frame { display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.staff-sidebar { padding: 26px 14px; background: #fff; border-right: 1px solid var(--line); }
.staff-brand { display: block; margin: 0 8px 25px; font-size: 19px; font-weight: 760; letter-spacing: -.03em; }
.staff-nav { display: grid; gap: 5px; }
.staff-nav a { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; border-radius: 8px; font-weight: 650; }
.staff-nav a:hover { background: var(--home-soft); }
.staff-nav a[aria-current] { color: #fff; background: #202122; }
.staff-workspace { min-width: 0; }
.staff-topbar { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); background: #fff; padding: 10px clamp(14px, 4vw, 36px); }
.staff-topbar small { display: block; color: var(--muted); }
.staff-topbar a:hover { text-decoration: underline; text-underline-offset: 3px; }
.staff-topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.staff-identity { min-width: 0; overflow-wrap: anywhere; }
.staff-bell { display: grid; place-items: center; position: relative; width: 40px; min-height: 40px; border-radius: 8px; }
.staff-bell:hover, .staff-bell[aria-current], .staff-profile-button[aria-current] { background: var(--home-soft); }
.staff-bell span { position: absolute; top: 0; right: 0; min-width: 16px; border-radius: 99px; padding: 1px 4px; color: #fff; background: var(--ink); font-size: 10px; text-align: center; }
.staff-profile-button { gap: 6px; }
.staff-profile-button .icon { width: 16px; height: 16px; }
.staff-signout { margin-top: 18px; }
.staff-signout .button-secondary { font-size: 13px; }
.staff-main { max-width: 1070px; margin: 0 auto; padding: clamp(16px, 4vw, 42px); }
.staff-section { margin-top: 12px; padding: clamp(13px, 3vw, 21px); }
.staff-section > h2 { margin-bottom: 8px; }
.staff-dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 12px; }
.staff-dashboard .staff-section { margin: 0; min-width: 0; }
.dashboard-section-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.staff-dashboard h3 { margin-block: 12px 6px; font-size: 15px; }
.staff-form button:disabled { opacity: .5; cursor: default; }
@media (max-width: 820px) { .staff-dashboard { grid-template-columns: minmax(0, 1fr); } }
.staff-section > .tabs { margin-bottom: 10px; flex-wrap: wrap; }
.grade-filters .tabs { flex-wrap: wrap; }
.staff-profile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin: 0; }
.staff-profile dt { color: var(--muted); font-size: 13px; }
.staff-profile dd { margin: 3px 0 0; font-weight: 650; overflow-wrap: anywhere; }
.staff-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 12px; }
.staff-form { display: grid; gap: 12px; max-width: 575px; margin-top: 12px; }
.staff-form label, .staff-date label { display: grid; gap: 5px; min-width: 0; font-size: 13px; font-weight: 650; }
.staff-form label small { color: var(--muted); font-weight: 400; }
.staff-form :is(input:not([type=hidden]), select, textarea), .staff-date :is(input, select) { width: 100%; min-width: 0; min-height: 42px; padding: 8px; border: 1px solid #bfc0bc; border-radius: 8px; color: var(--ink); background: #fff; }
.staff-form textarea { resize: vertical; }
.staff-form .button { justify-self: start; }
.staff-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.staff-date { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.staff-records, .chat-history { list-style: none; margin: 4px 0 0; padding: 0; }
.staff-records li, .chat-history li { border-top: 1px solid var(--line); padding: 10px 0; overflow-wrap: anywhere; }
.staff-records a { display: block; }
.staff-records a:hover strong { text-decoration: underline; }
.staff-records small { display: block; color: var(--muted); }
.staff-topic-list a { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 12px; }
.staff-topic-list .icon { width: 16px; height: 16px; flex: none; }
.staff-publication-topics { display: grid; gap: 8px; margin-top: 12px; }
.staff-publication-topic { scroll-margin-top: calc(var(--header-height) + 12px); }
.staff-publication-topic .staff-actions { margin-bottom: 0; }
.staff-records .home-link { display: inline-flex; margin-top: 6px; }
.publication-description { margin-top: 5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.staff-form.grading-row { margin: 0; grid-template-columns: minmax(140px, 1fr) minmax(150px, 180px) auto; align-items: end; max-width: none; }
.grading-row > div:first-of-type { align-self: center; }
.course-chat > h2 { margin-bottom: 10px; }
.chat-history li header { display: flex; flex-wrap: wrap; align-items: start; justify-content: space-between; gap: 4px 12px; }
.chat-history time { font-size: 12px; color: var(--muted); }
.chat-history li p { margin-top: 4px; white-space: pre-wrap; }
@media (max-width: 740px) {
  .staff-frame { display: block; }
  .staff-sidebar { padding: 12px 12px 7px; border-right: 0; border-bottom: 1px solid var(--line); }
  .staff-brand { margin: 0 5px 5px; font-size: 17px; }
  .staff-nav { display: flex; flex-wrap: wrap; gap: 3px; }
  .staff-nav a { min-height: 38px; padding: 6px 7px; font-size: 12px; }
  .staff-nav .icon { width: 15px; height: 15px; }
  .staff-topbar { min-height: 58px; }
  .staff-topbar .button-secondary { min-height: 38px; padding-inline: 8px; }
  .staff-section > .tabs a, .grade-filters .tabs a { padding-inline: 9px; }
  .staff-form.grading-row { grid-template-columns: minmax(0, 1fr) auto; }
  .grading-row > div:first-of-type { grid-column: 1 / -1; }
}
@media (max-width: 460px) { .staff-profile { grid-template-columns: minmax(0, 1fr); } }
.request-form fieldset { display: grid; gap: 9px; border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.request-form legend { font-size: 17px; font-weight: 700; padding: 0; margin-bottom: 11px; }
.request-form .choice { display: flex; gap: 11px; align-items: flex-start; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.request-form .choice:has(:checked) { border-color: #c3acef; background: #f7f2ff; }
.request-form .choice input[type=radio] { appearance: auto; accent-color: var(--accent); width: 18px; height: 18px; min-height: auto; padding: 0; margin: 3px 0 0; flex: 0 0 auto; }
.choice small { display: block; margin-top: 3px; color: var(--muted); }
.request-form .form-error { margin: 0 0 13px; }
.status-steps { display: grid; position: relative; isolation: isolate; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 16px 0 0; padding: 0; }
.status-steps::before { content: ""; position: absolute; left: calc(100% / 6); right: calc(100% / 6); top: 13px; height: 2px; background: var(--line); z-index: -1; }
.status-steps li { list-style: none; display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--muted); font-size: 13px; }
.status-steps li[aria-current] { font-weight: 700; color: var(--accent-dark); }
.step-dot { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--line); background: #fff; }
.step-dot:has(.icon) { background: #e2f5ee; border-color: #cde8dd; color: #166149; }
.step-dot .icon { width: 15px; height: 15px; }
.status-steps [aria-current] .step-dot { border: 8px solid var(--accent); }
.status-explanation { color: var(--muted); margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 14px; }
.profile-intro { display: flex; gap: 12px; align-items: center; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.profile-intro .avatar { width: 57px; height: 57px; font-size: 19px; }
.profile-intro p { color: var(--muted); margin-top: 4px; }
.profile-panel .facts { row-gap: 17px; }
.student-profile .profile-intro + h2 { margin-top: 16px; }
.student-profile .profile-panel h3 { margin-top: 20px; }
.student-profile .profile-panel dd { overflow-wrap: anywhere; }
@media (max-width: 480px) {
  .student-profile .facts { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .academic-row, .record-row { padding: 11px 9px; gap: 8px; }
  .academic-row .icon-tile, .record-row .icon-tile { width: 30px; height: 30px; }
  .academic-row .icon-tile .icon, .record-row .icon-tile .icon { width: 16px; height: 16px; }
  .academic-row .badge { max-width: 103px; }
  .record-name h2, .record-name h3 { font-size: 15px; }
  .record-name p { font-size: 12px; }
  .service-card { padding: 15px; }
}

/* Shared student portal */
.app-frame {
  --ink: #191a1b;
  --muted: #595a5d;
  --line: #dddeda;
  --accent: #222325;
  --accent-dark: #191a1b;
  --violet: #efefed;
}
.app-frame .brand { color: var(--ink); }
.app-frame .tabs { background: #eaeae7; }
.app-frame .button-secondary { color: var(--ink); }
.app-frame .icon-tile.violet, .app-frame .icon-tile.blue, .app-frame .icon-tile.mint {
  background: #efefed; color: #303234;
}
.app-frame .badge.violet, .app-frame .badge.blue, .app-frame .badge.mint,
.app-frame .badge.neutral { background: #efefed; color: #333536; }
.app-frame .badge.amber { background: #242527; color: #fff; }
.app-frame .change-panel { border-color: #bfc0bc; background: #f1f1ee; }
.app-frame .lesson-row:hover, .app-frame .feed-item:hover, .app-frame .updates-link:hover { border-color: #818380; }
.portal-heading { margin-bottom: 20px; }
.portal-heading p.portal-context { margin: 0 0 4px; font-size: 14px; }
.week-heading, .week-controls { display: flex; gap: 10px; align-items: center; }
.week-heading { justify-content: space-between; flex-wrap: wrap; margin: 0 0 14px; }
.week-controls .button-secondary { padding: 8px; width: 44px; flex: none; }
.week-controls h2 { font-size: clamp(15px, 2vw, 21px); }
.week-day-picker { display: none; }
.week-table-panel { overflow: hidden; }
.week-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.week-table th, .week-table td { padding: 8px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.week-table tr > :first-child { border-left: 0; }
.week-table tr > :last-child { border-right: 0; }
.week-table thead th, .week-table .week-time { border-top: 0; background: #f2f2ef; }
.week-table tbody tr:last-child > * { border-bottom: 0; }
.week-table .week-time { width: 66px; font-size: 12px; font-variant-numeric: tabular-nums; }
.week-time time { display: block; }
.week-time time + time { color: var(--muted); font-weight: 400; }
.week-table tbody th, .week-table td { height: 62px; }
.week-table tfoot td, .week-table tfoot th { height: auto; background: #f7f7f5; border-top: 1px solid var(--line); }
.week-table tfoot th { font-size: 10px; overflow-wrap: anywhere; }
.week-deadline-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.week-deadline-list li { border-left: 2px solid #494a49; padding-left: 4px; font-size: 11px; overflow-wrap: anywhere; }
.week-deadline-list li > * { display: block; }
.week-deadline-list li > a { font-weight: 700; text-decoration: underline; }
.week-deadline-list time, .week-deadline-list small { color: var(--muted); font-size: 10px; }
.week-table tfoot summary { margin-top: 4px; font-size: 11px; cursor: pointer; }
.week-table th strong, .week-table th span, .week-table th small { display: block; }
.week-table th span, .week-table th small { font-size: 12px; font-weight: 600; }
.week-table th strong { font-size: 13px; }
.week-table th.week-today { background: #242527; color: #fff; }
.week-lesson { display: grid; gap: 3px; padding: 7px; border-radius: 8px; border: 1px solid var(--line); line-height: 1.25; overflow-wrap: anywhere; }
.week-lesson:hover { background: #efefed; }
.week-lesson strong { font-size: 13px; }
.week-lesson-meta { font-size: 12px; color: var(--muted); }
.week-lesson.lesson-moved { border-color: #81827e; background: #f1f1ee; }
.week-change { display: flex; gap: 9px; align-items: center; padding: 10px 12px; margin-top: 12px; width: fit-content; }
.week-change:hover { border-color: #81827e; }
.week-change strong { font-size: 13px; }
.week-change small { display: block; margin-top: 2px; color: var(--muted); }
@media (max-width: 980px) {
  .week-day-picker { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: 9px; }
  .week-day-picker a { display: grid; place-items: center; align-content: center; min-height: 49px; padding: 3px 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
  .week-day-picker a[aria-current] { background: #242527; color: #fff; }
  .week-day-picker span { font-size: 11px; text-transform: uppercase; }
  .week-table .week-day { display: none; }
  .week-table .week-day.week-selected { display: table-cell; padding: 7px 9px; }
  .week-table th.week-selected span, .week-table th.week-selected strong, .week-table th.week-selected small { display: inline; margin-right: 6px; }
  .week-change { width: 100%; }
  .week-change span { flex: 1; }
}
.study-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 820px; margin: 0 0 24px; }
.study-metrics div { padding: 12px 15px; }
.study-metrics dt { font-weight: 600; font-size: 13px; color: var(--muted); }
.study-metrics dd { font-weight: 750; font-size: 30px; font-variant-numeric: tabular-nums; }
.record-name .exam-time { color: var(--ink); font-weight: 650; }
@media (max-width: 740px) {
  .study-metrics div { padding-inline: 10px; }
}

.toolbar-icon { display: inline-grid; place-items: center; position: relative; flex: none; width: 40px; height: 40px; color: inherit; background: transparent; border: 0; border-radius: 8px; padding: 0; }
.toolbar-icon:hover, .toolbar-icon[aria-current], .toolbar-icon[aria-expanded="false"] { background: var(--home-soft, var(--violet)); }
.login-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.staff-identity { margin-right: auto; }
.theme-sun, :root[data-theme="dark"] .theme-moon { display: none; }
:root[data-theme="dark"] .theme-sun { display: inline; }
.notice-count { position: absolute; top: 1px; right: 1px; min-width: 16px; padding: 1px 3px; border-radius: 20px; background: var(--ink); color: var(--white); font-size: 10px; text-align: center; }
.notice-empty { padding: 8px; }
.notice-read-form { margin-bottom: 12px; }
.assignment-answer { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.assignment-answer textarea, .assignment-answer input[type=file] { font: inherit; }
.answer-files { display: grid; gap: 4px; margin-block: 5px; }
.answer-files a { overflow-wrap: anywhere; }
.grading-answer { margin-block: 8px 2px; }




@media (max-width: 740px) {
  .topbar-inner { gap: 4px; padding-inline: 8px; }
  .topbar-shortcuts { margin-right: auto; }
  .topbar-shortcuts a { min-height: 40px; }
  .topbar-actions, .staff-topbar-actions { gap: 3px; }
  .toolbar-icon { width: 35px; height: 40px; }
  .topbar-actions .account > .icon { display: none; }
  .staff-topbar { gap: 6px; padding-inline: 8px; }
}
@media (max-width: 420px) {
  .staff-profile-button { font-size: 0; }
  .staff-profile-button .icon { width: 19px; height: 19px; }
}

:root[data-theme="dark"] { color-scheme: dark; --white: #202124; background: #151617; color: #f0f0f1; }
:root[data-theme="dark"] :is(.app-frame,.login-frame) {
  --home-paper: #202124;
  --home-bg: #151617;
  --home-text: #f0f0f1;
  --home-muted: #b8b9be;
  --home-rule: #393b40;
  --home-soft: #2c2e33;
  --ink: var(--home-text);
  --muted: var(--home-muted);
  --line: var(--home-rule);
  --accent: #e2e3e6;
  --accent-dark: #f5f5f6;
  --violet: var(--home-soft);
  --control-border: #575a61;
}
:root[data-theme="dark"] :is(.student-sidebar,.topbar,.staff-sidebar,.staff-topbar,.login-main,.tabs a[aria-current],.button-secondary,.home-reminder,.step-dot,.week-day-picker a) { background: var(--home-paper); }
:root[data-theme="dark"] :is(.app-frame .tabs,.grade-table thead,.week-table thead th,.week-table .week-time,.week-table tfoot td,
  .week-table tfoot th,.week-lesson.lesson-moved,.request-form .choice:has(:checked),.app-frame .change-panel,.home-course-tile:hover,
  .week-lesson:hover,.app-frame .badge:not(.amber),.app-frame .icon-tile:not(.amber)) { background: var(--home-soft); color: var(--ink); }
:root[data-theme="dark"] :is(.button,.home-button:not(.home-button-outline),.app-frame .primary-nav a[aria-current],
  .staff-nav a[aria-current],.week-table th.week-today,.week-day-picker a[aria-current],.app-frame .badge.amber,.home-activity-test .home-activity-icon) {
  background: var(--accent); color: #171819;
}
:root[data-theme="dark"] :is(.button:hover,.home-button:not(.home-button-outline):hover) { background: var(--accent-dark); }
:root[data-theme="dark"] :is(.staff-form,.staff-date,.home-reminder,.login-form,.service-message) :is(input:not([type=hidden]),textarea,select) {
  border-color: var(--control-border); background: var(--home-bg); color: var(--ink);
}
:root[data-theme="dark"] :is(.form-error,.login-form .form-error) { background: #422729; color: #ffd0d0; }
:root[data-theme="dark"] :is(.change-grid s,.concept,.zone) { color: var(--muted); }
:root[data-theme="dark"] :is(.app-frame,.login-frame) :focus-visible { outline-color: #c7d7ff; }
:root[data-theme="dark"] .app-frame .mark i { background: #2c2e33; }
:root[data-theme="dark"] .app-frame .mark i:nth-child(2) { background: #6c6f78; }
:root[data-theme="dark"] .notice-popover { box-shadow: 0 12px 34px #0008; }


.sidebar-toggle .icon { transform: rotate(180deg); }
:root[data-sidebar="collapsed"] .sidebar-toggle .icon { transform: none; }
@media (min-width: 741px) {
  .staff-topbar > .sidebar-toggle { display: none; }
  .staff-sidebar > .sidebar-toggle { margin-bottom: 12px; }
  :root[data-sidebar="collapsed"] .staff-frame { grid-template-columns: 72px minmax(0, 1fr); }
  :root[data-sidebar="collapsed"] .staff-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-inline: 10px;
  }
  :root[data-sidebar="collapsed"] .staff-brand { display: none; }
  :root[data-sidebar="collapsed"] .staff-nav { width: 100%; }
  :root[data-sidebar="collapsed"] .staff-nav a { justify-content: center; padding-inline: 0; }
  :root[data-sidebar="collapsed"] .staff-nav a > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

}
@media (max-width: 740px) {
  .staff-sidebar > .sidebar-toggle,
  :root[data-sidebar="collapsed"] .staff-brand { display: none; }
  :root[data-sidebar="collapsed"] .staff-nav a > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  :root[data-sidebar="collapsed"] .staff-nav a { min-width: 40px; justify-content: center; }
}
.week-current.button-secondary { width: auto; padding-inline: 12px; white-space: nowrap; }
.staff-week { overflow-x: auto; margin-top: 12px; }
.staff-week .week-table .week-day { display: table-cell; }
.staff-week .week-table { min-width: 790px; }
.teacher-lesson-links { display: flex; flex-wrap: wrap; gap: 6px 12px; padding-bottom: 6px; }
.staff-week .week-day > .text-link { display: inline-block; margin: 2px 5px 5px; font-size: 12px; }

@media (min-width: 741px) {
  .staff-sidebar { position: relative; }
  .staff-sidebar > .sidebar-toggle {
    position: absolute;
    top: 86px;
    left: 15px;
    margin: 0;
  }
  .staff-sidebar > .staff-nav { margin-top: 112px; }
}
.course-workspace .course-view { max-width: 1200px; padding-inline: 0; margin-inline: 0; padding-top: 0; }
.office-dashboard { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.office-dashboard .staff-section { margin: 0; }
.office-queue { grid-column: 1 / -1; }
.office-search { margin-block: 6px 10px; }
.office-request-list a { display: grid; grid-template-columns: minmax(0, 1fr) 90px 80px auto; align-items: center; gap: 12px; }
.office-request-list .icon { width: 16px; }
.office-request-date { font-size: 13px; color: var(--muted); }
.schedule-shortcuts { margin-bottom: 8px; }
.course-topic { padding: 16px; margin-bottom: 12px; }
.course-topic h2 { margin-bottom: 10px; }
.course-topic h3 { margin: 12px 0 6px; font-size: 15px; }
.grade-discussion { margin-top: 8px; }
.grade-discussion summary { cursor: pointer; color: var(--ink); }
.grade-discussion form { margin-top: 7px; }
.grade-discussion ul { list-style: none; padding: 0; }
.grade-discussion li { margin-block: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 820px) { .office-dashboard { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 540px) {
  .office-request-list a { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; }
}


.student-frame {
  --header-height: 72px;
  --rail-compact: 72px;
  --student-rail: 225px;
}
:root[data-sidebar="collapsed"] .student-frame { --student-rail: var(--rail-compact); }
.student-frame .topbar { position: sticky; top: 0; z-index: 5; }
.student-frame .topbar-inner {
  max-width: none;
  min-height: calc(var(--header-height) - 1px);
  padding-inline: clamp(12px, 2vw, 28px);
  justify-content: flex-start;
}
.student-frame .topbar-actions { margin-left: auto; }
.student-frame .topbar-shortcuts a { white-space: nowrap; }
.student-sidebar {
  position: fixed;
  inset: var(--header-height) auto 0 0;
  z-index: 4;
  width: var(--student-rail);
  background: var(--home-paper);
  border-right: 1px solid var(--home-rule);
  padding: 12px 11px;
}
.student-frame .workspace { margin-left: var(--student-rail); min-width: 0; }
.student-sidebar > .sidebar-toggle { margin-left: 2px; margin-bottom: 8px; }
.student-sidebar .primary-nav { gap: 4px; }
.student-sidebar .primary-nav > a, .student-sidebar .nav-group summary { min-height: 44px; }
.student-sidebar .nav-group[data-current] > summary { background: var(--home-soft); color: var(--home-text); }
:root[data-sidebar="collapsed"] .student-sidebar :is(.primary-nav > a, .nav-group summary) {
  justify-content: center;
  padding-inline: 0;
}
:root[data-sidebar="collapsed"] .student-sidebar :is(.primary-nav > a, .nav-group summary) > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
:root[data-sidebar="collapsed"] .student-sidebar .nav-group { position: relative; }
:root[data-sidebar="collapsed"] .student-sidebar .nav-group > div {
  position: absolute;
  z-index: 1;
  top: 0;
  left: calc(100% + 8px);
  width: 146px;
  margin: 0;
  padding: 5px;
  background: var(--home-paper);
  border: 1px solid var(--home-rule);
  border-radius: 10px;
  box-shadow: 0 5px 14px #0002;
}
@media (max-width: 740px) {
  .student-frame { --header-height: 62px; --rail-compact: 52px; }
  .student-frame .topbar-inner { padding-inline: 8px; }
  .student-frame .topbar-inner .brand > span:not(.mark) { display: none; }
  .student-frame .topbar-inner .mark { width: 32px; height: 32px; }
  .student-frame .workspace { margin-left: var(--rail-compact); }
  .student-frame .content { padding-inline: 12px; padding-bottom: 36px; }
  .student-sidebar { padding: 8px 5px; }
  .student-sidebar > .sidebar-toggle { margin-left: 2px; }
}

@media (max-width: 570px) {
  .student-frame .topbar-shortcuts a { padding-inline: 3px; }
  .student-frame .topbar-shortcuts :is(a[href="/"], a[href="/schedule"]) { display: none; }
}


.course-layout:has(.course-side) {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  gap: clamp(14px, 3vw, 36px);
  align-items: start;
}
.course-main { min-width: 0; }
.course-topic-row { padding: 0; }
.course-topic-row > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 12px 15px;
  cursor: pointer;
  list-style: none;
  overflow-wrap: anywhere;
}
.course-topic-row > summary::-webkit-details-marker { display: none; }
.course-topic-row > summary:hover { background: var(--home-soft); border-radius: var(--radius); }
.course-topic-row > summary .icon { width: 19px; height: 19px; }
.course-topic-row[open] > summary .icon:last-child { transform: rotate(90deg); }
.course-topic-row > .course-entries { padding: 0 12px 12px; }
.course-topic-row .course-entry { scroll-margin-top: calc(var(--header-height) + 12px); }
.course-side { display: grid; gap: 12px; }
.course-side-link {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 12px 14px;
}
.course-side-link .icon { width: 18px; height: 18px; }
.course-side-link:hover, .course-side-link[aria-current] { background: var(--home-soft); }
.course-deadline { padding: 14px; }
.course-deadline h2 { margin-bottom: 8px; font-size: 16px; }
.course-deadline p, .course-deadline time, .course-deadline small { font-size: 13px; }
.course-deadline-item {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  margin-block: 8px;
  border-left: 2px solid var(--home-muted);
  background: var(--home-soft);
  overflow-wrap: anywhere;
}
.course-deadline-item time, .course-deadline-item small { color: var(--home-muted); }
@media (max-width: 850px) {
  .course-layout:has(.course-side) { grid-template-columns: minmax(0, 1fr); }
}

.service-catalog .service-category {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 1fr;
  align-items: start;
  gap: 10px;
  min-height: 150px;
}
.service-category > :first-child { grid-column: 1 / -1; }
.service-category > .icon { align-self: start; margin-top: 4px; width: 18px; height: 18px; }
.service-category:hover { border-color: var(--home-muted); background: var(--home-soft); }
.service-catalog .service-category h2 { margin: 0; font-size: 18px; }
.service-catalog .service-category p { margin-top: 4px; font-size: 14px; }
.service-category-form { max-width: none; }
.service-category-form > .muted { font-size: 13px; }
.certificate-study-fields, .certificate-formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.service-category-form fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.service-category-form legend { margin-bottom: 8px; font-weight: 650; }
.certificate-formats label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--home-rule);
  border-radius: 8px;
  cursor: pointer;
}
.service-category-form .certificate-formats input { width: 16px; min-height: 16px; margin: 0; flex: none; accent-color: var(--accent); }
.certificate-formats label:has(:checked), .request-category-filter a[aria-current] { background: var(--home-soft); border-color: var(--home-muted); }
.request-category-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 12px; }
.request-category-filter a { font-size: 13px; min-height: 36px; padding: 6px 10px; }
.staff-queue-records a { grid-template-columns: minmax(0, 1fr) minmax(100px, 155px) 80px auto; }
@media (max-width: 600px) {
  .services-toolbar .tabs { flex-wrap: wrap; }
  .services-toolbar .tabs a { padding-inline: 8px; }
  .certificate-study-fields, .certificate-formats { grid-template-columns: minmax(0, 1fr); }
  .staff-queue-records a { grid-template-columns: minmax(0, 1fr) auto; }
}

.request-status-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.submitted-request-fields dd { white-space: pre-wrap; overflow-wrap: anywhere; }
.submitted-request-fields > :last-child { grid-column: 1 / -1; }
.request-comments { list-style: none; display: grid; gap: 10px; margin: 12px 0; padding: 0; }
.request-comments li { padding: 12px; border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.request-comments header { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: space-between; }
.request-comments :is(time, small) { font-size: 12px; color: var(--muted); }
.request-comments p { margin: 6px 0 0; }
.status-steps:has(li:nth-child(4)) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.status-steps:has(li:nth-child(4))::before { inset-inline: 12.5%; }
.staff-main > .tabs[aria-label="Статус"] { flex-wrap: wrap; }

.event-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block: 12px; }
.event-list { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); }
.event-card { display: grid; align-content: start; overflow: hidden; }
.event-card-content { display: grid; gap: 8px; padding: 16px; }
.event-cover { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.event-detail > .event-cover { border-radius: 8px; margin-bottom: 14px; }
.event-detail > .markdown-content { margin-block: 12px; }
.event-gallery { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.event-gallery img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.event-photo-references { margin: 0; padding-left: 20px; overflow-wrap: anywhere; }
.event-card:hover { background: var(--home-soft); }
.event-card h2 { font-size: 18px; overflow-wrap: anywhere; }
.event-card p, .event-card small, .event-card-date { color: var(--muted); overflow-wrap: anywhere; }
.event-card-date { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.event-card-date .icon { width: 16px; height: 16px; }
.event-detail > p { margin-bottom: 12px; }
.event-confirmation { font-weight: 650; }
.event-time-fields { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.week-event { margin-bottom: 4px; border-left: 3px solid var(--accent); }
@media (max-width: 640px) { .event-time-fields { grid-template-columns: minmax(0, 1fr); } }


.markdown-content { overflow-wrap: anywhere; white-space: normal; }
.markdown-content > * { margin-block: 0 8px; }
.markdown-content > :last-child { margin-bottom: 0; }
.markdown-content :is(h1, h2, h3, h4, h5, h6) { font-size: 1.08em; }
.markdown-content :is(ul, ol) { padding-left: 1.35em; }
.markdown-content img { display: block; max-width: 100%; height: auto; border-radius: 8px; }
.markdown-content a { text-decoration: underline; }
.markdown-content blockquote { border-left: 2px solid var(--line); padding-left: 12px; }
.markdown-content code { background: var(--home-soft); }
.markdown-content pre { overflow-x: auto; padding: 10px; background: var(--home-soft); border-radius: 6px; }
.chat-history .markdown-content, .grade-discussion .markdown-content { margin-top: 4px; }
.markdown-preview { overflow-wrap: anywhere; padding: clamp(16px, 4vw, 40px); max-width: 880px; margin: auto; }
