:root {
    color-scheme: dark;
    --bg-root: #0f0f10;
    --bg-sidebar: #0c0c0d;
    --bg-main: #111112;
    --bg-hover: #181819;
    --bg-active: #202021;
    --border: #272729;
    --border-soft: #1c1c1e;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a3;
    --text-muted: #6f6f73;
    --accent: #c7ff5e;
    scrollbar-width: thin;
    scrollbar-color: #313133 transparent;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--bg-root);
    color: var(--text-primary);
    font-family: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 13px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #313133; border-radius: 4px; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 500; }
ul { padding: 0; margin: 0; list-style: none; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 10; padding: 8px 12px; background: var(--text-primary); color: var(--bg-root); border-radius: 6px; }
.skip-link:focus { top: 10px; }

.workspace { min-height: 100vh; }
.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 232px;
    padding: 18px 12px 12px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; min-height: 28px; }
.brand-symbol { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid #333335; border-radius: 6px; font-size: 10px; font-weight: 500; letter-spacing: -.04em; }
.brand-name { font-size: 13px; color: #d0d0d2; }
.nav-caption { margin: 32px 10px 8px; color: var(--text-muted); font-size: 10px; letter-spacing: .07em; text-transform: uppercase; }
.navigation { display: grid; gap: 2px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 7px 11px; color: var(--text-secondary); border-radius: 6px; font-size: 13px; transition: background 110ms ease-out, color 110ms ease-out; }
.nav-link:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-link.active { background: #1e1e1f; color: var(--text-primary); }
.nav-link.active::before { content: ""; position: absolute; left: 0; top: 10px; width: 2px; height: 16px; border-radius: 2px; background: var(--accent); }
.nav-icon { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.sidebar-bottom { margin-top: auto; padding: 24px 5px 0; }
.profile { display: flex; align-items: center; gap: 9px; padding: 13px 4px 1px; border-top: 1px solid var(--border); }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; background: #242426; color: #bfbfc2; border-radius: 6px; font-size: 10px; }
.profile-info { min-width: 0; }
.profile-name { font-size: 12px; overflow-wrap: anywhere; }
.profile-subject { margin-top: 1px; font-size: 11px; color: var(--text-muted); }

.page { min-width: 0; min-height: 100vh; margin-left: 232px; background: var(--bg-main); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 10px 32px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 11px; }
.breadcrumb-separator { padding-inline: 10px; color: #4e4e52; }
.topbar-current { color: var(--text-secondary); }
.demo-label { flex-shrink: 0; color: var(--text-muted); font-size: 11px; }
.main { padding: 28px 32px 40px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 28px; }
h1 { font-size: 26px; letter-spacing: -.035em; line-height: 1.25; }
.page-subtitle { margin-top: 6px; color: var(--text-secondary); font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; gap: 7px; min-height: 32px; padding: 5px 12px; background: #e9e9e9; border: 1px solid #e9e9e9; border-radius: 6px; color: #111111; font-size: 12px; font-weight: 500; transition: background 110ms ease-out, border-color 110ms ease-out; }
.button:hover { background: #ffffff; border-color: #ffffff; }
.plus-sign { font-size: 17px; font-weight: 400; line-height: 1; }
.section-title { font-size: 16px; line-height: 1.4; letter-spacing: -.015em; }

.next-lesson { padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.next-lesson-body { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; align-items: center; gap: 20px; margin-top: 17px; }
.next-time { align-self: start; color: var(--text-primary); font-size: 24px; line-height: 1.2; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.next-time > span { display: block; margin-top: 6px; font-size: 12px; color: var(--text-muted); letter-spacing: 0; }
.next-info { min-width: 0; }
.next-info h3 { font-size: 15px; line-height: 1.4; }
.lesson-topic { margin-top: 4px; font-size: 13px; color: #cdcdcf; }
.lesson-meta { margin-top: 5px; color: var(--text-secondary); font-size: 12px; }
.lesson-meta > span { color: var(--text-muted); padding-inline: 3px; }
.text-link { color: var(--text-secondary); font-size: 12px; white-space: nowrap; transition: color 110ms ease-out; }
.text-link > span { margin-left: 5px; }
.text-link:hover { color: var(--text-primary); }

.section { margin-top: 28px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.schedule-head, .schedule-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 142px 14px; align-items: center; gap: 20px; }
.schedule-head { min-height: 28px; padding: 0 8px 7px; color: var(--text-muted); border-bottom: 1px solid var(--border); font-size: 11px; }
.schedule-row { min-height: 62px; padding: 10px 8px; border-bottom: 1px solid var(--border-soft); transition: background 110ms ease-out; }
.schedule-row:hover, .attention-row:hover { background: var(--bg-hover); }
.schedule-time { align-self: start; font-size: 13px; font-variant-numeric: tabular-nums; }
.schedule-time > span { display: block; margin-top: 3px; color: var(--text-muted); font-size: 11px; }
.schedule-details { min-width: 0; }
.schedule-details h3 { font-size: 13px; }
.schedule-details p { margin-top: 3px; color: var(--text-secondary); font-size: 12px; overflow-wrap: anywhere; }
.schedule-details p > span { color: var(--text-muted); padding-inline: 3px; }
.lesson-status { display: inline-flex; align-items: center; gap: 7px; color: var(--text-secondary); font-size: 11px; white-space: nowrap; }
.status-dot { width: 4px; height: 4px; flex-shrink: 0; border-radius: 50%; background: #5b5b60; }
.status-next .status-dot { background: var(--accent); }
.finished .schedule-time, .finished .schedule-details h3 { color: var(--text-secondary); }
.finished .lesson-status { color: var(--text-muted); }
.row-arrow { color: var(--text-muted); font-size: 14px; text-align: right; }
.attention-list { border-top: 1px solid var(--border); }
.attention-row { display: grid; grid-template-columns: minmax(220px, auto) minmax(0, 1fr) 28px 14px; align-items: center; gap: 20px; min-height: 44px; padding: 10px 8px; border-bottom: 1px solid var(--border-soft); transition: background 110ms ease-out; }
.attention-title { font-size: 13px; }
.attention-description { color: var(--text-muted); font-size: 12px; text-align: right; }
.attention-count { color: #ceced0; font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
.empty-state { padding: 16px 8px; color: var(--text-secondary); font-size: 13px; }

@media (max-width: 1000px) {
    .schedule-head, .schedule-row { grid-template-columns: 64px minmax(0, 1fr) 118px 12px; gap: 12px; }
    .attention-row { grid-template-columns: minmax(0, 1fr) 28px 12px; gap: 12px; }
    .attention-description { display: none; }
}

@media (max-width: 760px) {
    .sidebar { position: static; width: auto; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--border); overflow-y: visible; }
    .brand { padding-inline: 0; }
    .nav-caption { margin: 20px 0 8px; }
    .navigation { display: flex; flex-wrap: wrap; gap: 3px; }
    .nav-link { gap: 7px; padding-inline: 9px; font-size: 12px; }
    .nav-icon { width: 14px; height: 14px; }
    .sidebar-bottom { padding: 12px 0 0; }
    .profile { padding-top: 12px; }
    .page { margin-left: 0; min-height: auto; }
    .topbar { padding: 9px 20px; flex-wrap: wrap; gap: 5px 16px; }
    .main { padding: 24px 20px 32px; }
    .page-heading { gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
    h1 { font-size: 24px; }
    .next-lesson-body { grid-template-columns: 62px minmax(0, 1fr); gap: 14px; }
    .next-lesson-body > .text-link { grid-column: 2; justify-self: start; }
    .next-time { font-size: 22px; }
    .section { margin-top: 24px; }
    .schedule-head { display: none; }
    .schedule { border-top: 1px solid var(--border); }
    .schedule-row { grid-template-columns: 48px minmax(0, 1fr) 12px; gap: 5px 12px; padding-block: 11px; }
    .schedule-time { grid-row: 1 / 3; }
    .lesson-status { grid-column: 2; }
    .schedule-row .row-arrow { grid-column: 3; grid-row: 1; }
    .attention-row { padding-inline: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .nav-link, .button, .text-link, .schedule-row, .attention-row { transition: none; }
}

/* Lists and detail panels share the same teacher workspace. */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.heading-count { margin-left: 7px; color: var(--text-muted); font-size: 17px; font-weight: 400; vertical-align: middle; }
.pending-action { display: grid; justify-items: end; gap: 6px; }
.pending-action > span { color: var(--text-muted); font-size: 11px; }
.button:disabled, .button:disabled:hover { background: #202021; border-color: #303032; color: #88888c; cursor: not-allowed; }
.search-form { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 21px; }
.search-field { display: flex; align-items: center; gap: 8px; width: min(380px, 100%); min-height: 34px; padding: 0 10px; background: #171718; border: 1px solid var(--border); border-radius: 6px; }
.search-field:focus-within { border-color: #77777d; }
.search-field > svg { width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: var(--text-muted); stroke-width: 1.5; stroke-linecap: round; }
.search-field > input { width: 100%; min-width: 0; padding: 7px 0; background: transparent; border: 0; outline: 0; color: var(--text-primary); font: inherit; font-size: 12px; }
.search-field > input::placeholder { color: var(--text-muted); }
.secondary-button { min-height: 34px; padding: 0 12px; background: transparent; border: 1px solid #303032; border-radius: 6px; color: #d0d0d0; font: inherit; font-size: 12px; cursor: pointer; }
.secondary-button:hover { background: var(--bg-hover); }
.secondary-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.filter-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; border-bottom: 1px solid var(--border); margin-bottom: 17px; }
.filter-tab { display: inline-flex; align-items: center; gap: 8px; padding: 0 0 11px; margin-bottom: -1px; border-bottom: 1px solid transparent; color: var(--text-secondary); font-size: 12px; }
.filter-tab > span { color: var(--text-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.filter-tab:hover { color: var(--text-primary); }
.filter-tab.active { color: var(--text-primary); border-bottom-color: #d0d0d3; }
.collection-layout { min-width: 0; }
.collection-layout.with-inspector { display: grid; grid-template-columns: minmax(0, 1fr) 304px; gap: 25px; align-items: start; }
.collection-main, .table-scroll { min-width: 0; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; min-width: 620px; border-collapse: collapse; text-align: left; }
.data-table th { padding: 0 9px 10px; border-bottom: 1px solid var(--border); color: var(--text-muted); font-size: 11px; font-weight: 400; white-space: nowrap; }
.data-table td { padding: 12px 9px; border-bottom: 1px solid var(--border-soft); font-size: 13px; vertical-align: middle; }
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table tbody tr.selected-row { background: #1d1d1f; }
.data-table td:first-child { width: 42%; }
.data-table .table-action { width: 26px; padding-right: 4px; text-align: right; }
.table-action a { display: inline-block; padding: 5px; color: var(--text-muted); }
.table-action a:hover { color: var(--text-primary); }
.person-link { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.person-link:hover .cell-title, .group-link:hover .cell-title { text-decoration: underline; text-underline-offset: 3px; }
.small-avatar { display: grid; place-items: center; width: 29px; height: 29px; flex-shrink: 0; border: 1px solid #303034; border-radius: 6px; color: #bcbcc0; font-size: 10px; }
.cell-title { display: block; color: #e1e1e4; font-size: 13px; }
.cell-secondary { display: block; margin-top: 4px; color: var(--text-muted); font-size: 11px; line-height: 1.6; }
.secondary-cell { color: var(--text-secondary); font-size: 12px !important; white-space: nowrap; }
.result-value, .member-count { font-variant-numeric: tabular-nums; color: #c7c7cb; }
.entity-status { display: inline-flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: 11px; white-space: nowrap; }
.entity-status > span { width: 4px; height: 4px; border-radius: 50%; background: #707076; }
.attention-status > span { background: #c0ab7c; }
.group-link { display: block; min-width: 210px; }
.list-caption { margin-top: 15px; color: var(--text-muted); font-size: 11px; }
.data-table td.table-empty { padding: 42px 16px; text-align: center; }
.table-empty h2 { font-size: 15px; }
.table-empty p { margin: 8px 0 14px; color: var(--text-secondary); font-size: 12px; }
.inspector { min-width: 0; padding-left: 24px; border-left: 1px solid var(--border); }
.inspector-heading { display: flex; justify-content: space-between; align-items: center; min-height: 23px; margin-bottom: 22px; color: var(--text-muted); font-size: 11px; }
.close-link { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; color: var(--text-secondary); font-size: 20px; line-height: 1; }
.close-link:hover { color: var(--text-primary); background: var(--bg-hover); }
.inspector-identity { margin-bottom: 23px; }
.detail-avatar { display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 12px; border: 1px solid #363639; border-radius: 7px; color: #c3c3c7; font-size: 12px; }
.inspector-identity h2, .group-identity h2 { font-size: 18px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.inspector-identity > p, .group-identity > p { margin-top: 5px; color: var(--text-secondary); font-size: 12px; }
.group-identity { margin-bottom: 23px; }
.detail-list { display: grid; gap: 12px; margin: 0; }
.detail-list > div { display: grid; gap: 4px; }
.detail-list dt { color: var(--text-muted); font-size: 11px; }
.detail-list dd { margin: 0; color: #c6c6ca; font-size: 12px; overflow-wrap: anywhere; }
.inspector-section { padding-top: 19px; margin-top: 20px; border-top: 1px solid var(--border); }
.inspector-section > h3 { margin-bottom: 11px; font-size: 12px; }
.detail-note { color: var(--text-secondary); font-size: 12px; line-height: 1.75; }
.detail-assignment { padding-block: 10px; border-bottom: 1px solid var(--border-soft); }
.detail-assignment > p { font-size: 12px; }
.detail-assignment > span { display: block; margin-top: 5px; color: var(--text-muted); font-size: 11px; }
.inspector-link { display: inline-block; margin-top: 20px; }
.member-row { display: flex; align-items: center; gap: 9px; padding-block: 9px; border-bottom: 1px solid var(--border-soft); font-size: 12px; }
.member-row > .row-arrow { margin-left: auto; }
.member-row:hover { color: var(--text-primary); background: var(--bg-hover); }

@media (max-width: 1250px) {
    .collection-layout.with-inspector { grid-template-columns: minmax(0, 1fr); }
    .inspector { padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--border); }
    .detail-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .pending-action { justify-items: start; }
    .search-form { gap: 8px; }
    .search-field { width: min(100%, 380px); }
    .filter-tabs { gap: 16px; }
    .filter-tab { font-size: 11px; }
    .data-table { min-width: 600px; }
    .detail-list { grid-template-columns: minmax(0, 1fr); }
}

/* Shared controls for the remaining prototype pages. */
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
.secondary-button:disabled { color: var(--text-muted); opacity: .6; }
.secondary-button:disabled:hover { background: transparent; }
.button-link { display: inline-flex; align-items: center; justify-content: center; }
.full-width { width: 100%; }
.field-label { display: block; margin: 16px 0 7px; color: #c5c5ca; font-size: 12px; }
.text-input { display: block; width: 100%; min-width: 0; padding: 9px 10px; background: #171718; border: 1px solid #303032; border-radius: 6px; color: var(--text-primary); font-size: 13px; line-height: 1.6; }
.text-input:focus { outline: 1px solid #8c8c91; outline-offset: 0; }
.text-input::placeholder { color: var(--text-muted); }
textarea.text-input { resize: vertical; }
.field-hint { margin-top: 6px; color: var(--text-muted); font-size: 11px; }
.compact-select { min-height: 34px; padding: 5px 26px 5px 9px; background: #171718; border: 1px solid #303032; border-radius: 6px; color: #d0d0d4; font-size: 12px; }
.compact-select:focus-visible { outline: 2px solid #8c8c91; outline-offset: 2px; }
.prototype-note { margin: 15px 0; color: var(--text-muted); font-size: 11px; line-height: 1.8; }
.panel-label { color: var(--text-secondary); font-size: 12px; font-weight: 500; }
.eyebrow { margin-bottom: 10px; color: var(--text-secondary); font-size: 12px; }
.detail-title { font-size: 18px; font-weight: 500; }
.inline-result { margin-top: 16px; padding: 12px 0; border-top: 1px solid var(--border); color: #c7c7cd; font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }

.review-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr) 250px; align-items: start; }
.review-queue { padding-right: 18px; border-right: 1px solid var(--border); }
.review-queue > h2 { margin-bottom: 14px; }
.queue-item { display: block; padding: 12px 9px; border-bottom: 1px solid var(--border-soft); }
.queue-item:hover { background: var(--bg-hover); }
.queue-item.selected-row { background: var(--bg-active); border-radius: 5px; }
.queue-date { display: block; margin-top: 7px; color: var(--text-muted); font-size: 10px; }
.review-answer { min-width: 0; padding: 0 24px; }
.review-answer > h2 { font-size: 19px; }
.task-condition { margin: 18px 0 24px; color: #d2d2d7; font-size: 15px; line-height: 1.9; overflow-wrap: anywhere; }
.answer-section { margin-top: 25px; border-top: 1px solid var(--border); padding-top: 18px; }
.answer-section > h3 { font-size: 13px; margin-bottom: 13px; }
.written-answer { font-size: 14px; color: #d0d0d5; line-height: 1.9; white-space: pre-wrap; }
.grading-panel { padding-left: 20px; border-left: 1px solid var(--border); }
.score-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin: 17px 0; }
.score-shortcuts .secondary-button { min-height: 29px; padding: 0 8px; font-size: 11px; }
.score-input { width: 90px; }
#review-preview-button { margin-top: 17px; padding-inline: 7px; font-size: 11px; }

.builder-layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 28px; margin-top: 22px; }
.task-bank { border-right: 1px solid var(--border); padding-right: 22px; }
.bank-search { width: 100%; margin: 16px 0 8px; }
.bank-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
.bank-item h3 { font-size: 12px; }
.bank-item p, .bank-item span { display: block; margin-top: 4px; color: var(--text-muted); font-size: 11px; }
.bank-item button { min-height: 28px; padding: 0 8px; font-size: 10px; }
.variant-editor { min-width: 0; }
.variant-editor > .field-label { margin-top: 0; }
.editor-heading { margin-top: 27px; }
.selected-task { display: flex; align-items: start; gap: 15px; padding: 18px 0; border-top: 1px solid var(--border); }
.task-number { color: var(--text-muted); min-width: 18px; font-variant-numeric: tabular-nums; }
.selected-task h3 { font-size: 14px; }
.selected-task p { color: var(--text-secondary); font-size: 12px; margin-top: 5px; }
.task-controls { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.task-controls button { min-height: 28px; padding-inline: 8px; font-size: 11px; }
.editor-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; margin-top: 20px; border-top: 1px solid var(--border); padding-top: 20px; }
.save-status { color: var(--text-secondary); font-size: 12px; line-height: 1.7; }

.calendar-toolbar { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.segmented-control { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; padding: 3px; }
.segmented-control a { padding: 5px 12px; border-radius: 4px; color: var(--text-secondary); font-size: 12px; }
.segmented-control a.selected { background: var(--bg-active); color: var(--text-primary); }
.segmented-control a:hover { color: var(--text-primary); }
.date-picker { display: flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 12px; }
.calendar-scroll { overflow-x: auto; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); min-width: 740px; min-height: 390px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.week-day { padding: 11px 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.week-day > h2 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; color: var(--text-secondary); font-size: 11px; }
.week-day > h2 > span { color: var(--text-primary); font-size: 13px; }
.today-column { background: #161618; }
.calendar-event { display: block; padding: 0 0 0 7px; border-left: 2px solid #6a6a71; margin-bottom: 20px; }
.calendar-event:hover { background: var(--bg-hover); }
.deadline-event { border-left-color: #a19578; }
.event-time, .event-title, .event-topic { display: block; }
.event-time { color: var(--text-secondary); font-size: 10px; font-variant-numeric: tabular-nums; }
.event-title { margin-top: 5px; font-size: 12px; }
.event-topic { margin-top: 5px; color: var(--text-muted); font-size: 10px; }
.day-empty { color: #4c4c50; font-size: 11px; }
.month-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); min-width: 740px; border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.month-weekday { padding: 9px; color: var(--text-muted); font-size: 11px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.month-day { min-height: 92px; padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.month-number { color: var(--text-secondary); font-size: 11px; }
.month-event { display: block; margin-top: 8px; padding-left: 5px; border-left: 2px solid #5a5a61; font-size: 10px; }
.month-event:hover { color: #ffffff; }
.event-details { margin-top: 20px; }
.day-agenda { border-top: 1px solid var(--border); }
.calendar-agenda-row { min-height: 65px; }

.assignment-list { border-top: 1px solid var(--border); }
.assignment-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 15px; align-items: center; gap: 20px; padding: 15px 8px; border-bottom: 1px solid var(--border-soft); }
.assignment-row:hover { background: var(--bg-hover); }
.assignment-row h3 { font-size: 14px; }
.assignment-row p { margin-top: 4px; color: var(--text-secondary); font-size: 12px; }
.assignment-row > span:not(.row-arrow) { color: var(--text-secondary); font-size: 12px; }
.feedback-item { padding: 23px 0; border-top: 1px solid var(--border); }
.feedback-date { margin-bottom: 14px; color: var(--text-muted); font-size: 11px; }
.feedback-item > h2 { font-size: 16px; margin-bottom: 7px; }
.feedback-meta { color: var(--text-secondary); font-size: 12px; }
.feedback-item blockquote { margin: 15px 0; max-width: 850px; color: #dedee2; font-size: 15px; line-height: 1.9; }
.result-score { font-size: 22px; color: #dedee2; font-variant-numeric: tabular-nums; }
.period-form { margin: 0; }
.statistics-layout { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(240px, 1fr); gap: 42px; }
.score-chart { margin: 25px 0 20px; }
.score-chart svg { display: block; width: 100%; max-height: 290px; }
.chart-grid { stroke: #303034; stroke-width: 1; }
.chart-label { fill: #8b8b92; font-size: 11px; dominant-baseline: middle; }
.chart-line { fill: none; stroke: #c8c8d0; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart-point { fill: #e4e4ea; }
.score-table { min-width: 0; }
.topic-list { margin-top: 22px; border-top: 1px solid var(--border); }
.topic-row { padding: 17px 0; border-bottom: 1px solid var(--border-soft); }
.topic-row > div:first-child { display: flex; justify-content: space-between; gap: 15px; font-size: 13px; }
.topic-row h3 { font-size: 13px; }
.topic-row p { margin-top: 8px; color: var(--text-muted); font-size: 11px; }
.topic-track { height: 3px; margin-top: 12px; background: #242427; }
.topic-track span { display: block; height: 100%; background: #8d8d96; }

.public-brand { display: inline-block; margin-bottom: 38px; font-size: 18px; font-weight: 500; letter-spacing: -.05em; }
.prototype-index { width: min(760px, calc(100% - 40px)); margin: 8vh auto; }
.prototype-index h1 { font-size: 28px; }
.prototype-links { margin-top: 35px; border-top: 1px solid var(--border); }
.prototype-links > a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 19px 3px; border-bottom: 1px solid var(--border); }
.prototype-links > a:hover { background: var(--bg-hover); }
.prototype-links strong { font-size: 14px; font-weight: 500; }
.prototype-links small { display: block; color: var(--text-secondary); font-size: 12px; margin-top: 5px; }
.registration-page { width: min(420px, calc(100% - 40px)); margin: 7vh auto; }
.registration-page h1 { font-size: 26px; }
.registration-form { margin-top: 27px; }
.role-choice { border: 0; margin: 23px 0; padding: 0; }
.role-choice legend { color: var(--text-secondary); font-size: 12px; margin-bottom: 11px; }
.role-choice label { display: inline-flex; align-items: center; gap: 5px; margin-right: 18px; font-size: 13px; }
.role-choice input { accent-color: #d0d0d7; }

.solve-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 70px; padding: 15px 28px; background: var(--bg-sidebar); border-bottom: 1px solid var(--border); }
.solve-header h1 { font-size: 16px; letter-spacing: -.015em; }
.solve-header p { margin-top: 4px; color: var(--text-muted); font-size: 11px; }
.solve-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); min-height: calc(100vh - 70px); }
.task-navigator { padding: 25px 15px; border-right: 1px solid var(--border); background: var(--bg-sidebar); }
.task-navigator > .panel-label { margin-bottom: 17px; }
.task-nav-button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px; margin-bottom: 3px; background: transparent; border: 1px solid transparent; border-radius: 5px; color: var(--text-secondary); text-align: left; }
.task-nav-button.current { background: var(--bg-active); color: var(--text-primary); }
.task-nav-button.answered > span:first-child { color: var(--accent); }
.task-nav-state { font-size: 10px; }
.solve-content { min-width: 0; width: min(100%, 1500px); padding: 36px 32px 56px; }
.solve-workspace { display: grid; gap: 26px; }
.solve-task-details { min-width: 0; }
.solve-task-details > h2 { font-size: 23px; letter-spacing: -.025em; }
.solve-board { min-width: 0; border: 1px solid var(--border); border-radius: 12px; padding: 16px; }
.solve-board > h2 { font-size: 16px; margin-bottom: 10px; }
.solve-board-canvas { height: clamp(360px, 64vh, 760px); position: relative; margin-top: 12px; border-radius: 8px; overflow: hidden; }
@media (min-width: 1200px) {
    .solve-workspace { grid-template-columns: minmax(285px, 0.85fr) minmax(480px, 1.4fr); align-items: start; }
}
.solve-answer { min-height: 170px; }
.solve-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin: 20px 0 15px; }
.confirm-dialog { width: min(480px, calc(100% - 32px)); padding: 25px; background: #151516; border: 1px solid #36363a; border-radius: 10px; color: var(--text-primary); }
.confirm-dialog::backdrop { background: #00000099; }
.confirm-dialog h2 { margin-bottom: 16px; font-size: 20px; }
.confirm-dialog p { line-height: 1.8; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; margin-top: 20px; }

@media (max-width: 1100px) {
    .review-layout { grid-template-columns: 170px minmax(0, 1fr); }
    .grading-panel { grid-column: 2; margin: 25px 0 0 24px; padding: 22px 0 0; border-left: 0; border-top: 1px solid var(--border); }
    .review-answer { padding-right: 0; }
    .builder-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 20px; }
    .bank-item { align-items: start; flex-direction: column; }
    .statistics-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
}
@media (max-width: 760px) {
    .review-layout, .builder-layout { grid-template-columns: minmax(0, 1fr); }
    .review-queue { border-right: 0; padding-right: 0; margin-bottom: 24px; }
    .queue-item { display: inline-block; vertical-align: top; min-width: 170px; max-width: 100%; margin: 3px 5px 3px 0; }
    .review-answer { padding: 0; }
    .grading-panel { grid-column: auto; margin-left: 0; }
    .task-bank { padding: 0 0 20px; border-right: 0; border-bottom: 1px solid var(--border); }
    .bank-item { flex-direction: row; align-items: center; }
    .bank-item button { flex-shrink: 0; }
    .date-picker { flex-wrap: wrap; }
    .assignment-row { grid-template-columns: minmax(0, 1fr) 15px; gap: 8px 12px; }
    .assignment-row > span:not(.row-arrow) { grid-column: 1; }
    .assignment-row > .row-arrow { grid-column: 2; grid-row: 1; }
    .solve-header { flex-wrap: wrap; gap: 10px 18px; padding: 12px 16px; }
    .solve-header > div { order: -1; width: 100%; }
    .solve-layout { grid-template-columns: minmax(0, 1fr); }
    .task-navigator { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 15px 16px; border-right: 0; border-bottom: 1px solid var(--border); }
    .task-navigator > .panel-label { width: 100%; margin-bottom: 6px; }
    .task-navigator .prototype-note { width: 100%; margin: 5px 0 0; }
    .task-nav-button { width: auto; min-width: 38px; margin: 0; padding: 8px 10px; }
    .task-nav-state { display: none; }
    .solve-content { padding: 28px 20px 40px; }
    .solve-task-details > h2 { font-size: 20px; }
}
