:root {
    color-scheme: light;
    --bg: #f5f7f8;
    --panel: #ffffff;
    --text: #172026;
    --muted: #66727a;
    --line: #d9e0e4;
    --primary: #1f6f5b;
    --primary-dark: #174f42;
    --warn: #9a6200;
    --danger: #a73838;
    --success: #267a4d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 28px;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

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

.topbar nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav-badge-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    white-space: nowrap;
}

.nav-badge {
    position: absolute;
    top: -7px;
    right: -13px;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    padding: 0 6px;
    background: #842c2c;
    color: #ffffff;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 10px rgba(132, 44, 44, 0.22);
    font-size: 12px;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
}

.user-greeting {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    border-radius: 999px;
    padding: 0 12px;
    background: #eef6f3;
    color: var(--primary-dark);
    font-weight: 700;
    white-space: nowrap;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 64px;
}

.page.student-portal-page,
.page.admin-portal-page {
    width: min(1740px, calc(100% - 36px));
}

.auth-panel,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 24px;
}

.auth-panel {
    width: min(440px, 100%);
    margin: 64px auto;
}

h1,
h2 {
    margin: 0 0 16px;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 20px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.section-head p,
.muted {
    color: var(--muted);
    margin: 0 0 12px;
}

.form {
    display: grid;
    gap: 16px;
}

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

.plan-entry-form {
    margin-top: 10px;
    border: 1px solid #d8e3e7;
    border-radius: 8px;
    padding: 16px;
    background: #fafcfd;
}

.plan-entry-form button {
    grid-column: 1 / -1;
}

.compact-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.full {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

textarea {
    resize: vertical;
}

button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    padding: 0 16px;
    background: var(--primary);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

button:hover,
.button-link:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

button.secondary,
.button-link.secondary {
    background: #eef2f3;
    color: var(--text);
}

.danger-button {
    background: #a73838;
}

.danger-button:hover {
    background: #842c2c;
}

.button-link.secondary:hover {
    background: #dde5e7;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.week-selector-form select {
    min-width: 260px;
    min-height: 64px;
    border-color: #c7d7df;
    border-radius: 10px;
    padding: 0 18px;
    color: var(--text);
    background: #fff;
    box-shadow: 0 8px 22px rgba(22, 82, 112, 0.08);
    font-size: 20px;
    font-weight: 800;
}

.week-selector-form select:focus {
    outline: 2px solid rgba(30, 117, 92, 0.18);
    border-color: var(--primary);
}

.date-range input {
    min-width: 150px;
}

.flash-list {
    display: grid;
    gap: 10px;
    position: fixed;
    top: 76px;
    right: 24px;
    z-index: 1000;
    width: min(420px, calc(100vw - 32px));
    margin: 0;
}

.flash {
    border-left: 6px solid #2f6f9f;
    border-radius: 8px;
    padding: 14px 16px;
    background: #ffffff;
    color: #0f3355;
    border-top: 1px solid #bfd6e8;
    border-right: 1px solid #bfd6e8;
    border-bottom: 1px solid #bfd6e8;
    box-shadow: 0 10px 28px rgba(24, 76, 122, 0.2);
    font-size: 16px;
    font-weight: 800;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 1.2s ease, transform 1.2s ease;
}

.flash.is-fading {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.flash.error {
    background: #fff0f0;
    color: var(--danger);
    border-color: #f0c7c7;
    border-left-color: var(--danger);
}

.review-notice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    border: 1px solid #e6c56b;
    border-radius: 8px;
    padding: 16px 18px;
    background: #fff7e3;
}

.review-notice strong {
    display: block;
    margin-bottom: 4px;
    color: var(--warn);
}

.review-notice span {
    color: var(--muted);
}

.continuity-alert span {
    display: block;
    margin-top: 3px;
}

.head-actions,
.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-footer-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
    background: var(--panel);
}

.stat-card span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
}

.stat-card strong {
    color: var(--text);
    font-size: 28px;
}

.login-agent {
    max-width: 340px;
    color: var(--muted);
    font-size: 13px;
    word-break: break-word;
}

.login-detail-actions {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.text-link {
    font-weight: 700;
    white-space: nowrap;
}

.student-name-inner {
    display: flex;
    align-items: center;
    gap: 9px;
}

.student-status-bar {
    display: inline-grid;
    grid-template-columns: 26px 22px 22px;
    align-items: center;
    justify-items: center;
    gap: 7px;
    flex-shrink: 0;
}

.status-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px 12px;
    margin: -4px 0 14px;
    color: var(--muted);
    font-size: 12px;
}

.status-legend span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.status-overview-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.small-toggle {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

.status-legend i {
    font-style: normal;
}

.status-legend .quest-exclamation,
.status-legend .quest-question {
    width: 18px;
    height: 20px;
    font-size: 23px;
    transform: translateY(-1px);
}

.status-legend .read-bubble,
.status-legend .checked {
    width: 19px;
    height: 19px;
    border-width: 2px;
}

.status-legend .read-bubble::before {
    width: 2.5px;
    height: 2.5px;
    box-shadow: -4px 0 0 #2f6f9f, 4px 0 0 #2f6f9f;
}

.status-legend .checked::before {
    font-size: 15px;
}

.status-legend .completion-dial {
    width: 16px;
    height: 16px;
}

.status-legend .completion-dial::after {
    inset: 6px;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 24px;
    flex: 0 0 21px;
    font-style: normal;
    line-height: 1;
}

.quest-exclamation,
.quest-question {
    width: 26px;
    height: 24px;
    color: #f4bd43;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 26px;
    font-weight: 900;
    text-shadow:
        -1px -1px 0 #3b2406,
        1px -1px 0 #3b2406,
        -1px 1px 0 #3b2406,
        1px 1px 0 #3b2406,
        0 0 7px rgba(244, 189, 67, 0.72);
}

.quest-exclamation.primary-attention,
.quest-question.primary-attention {
    transform: translateY(-2px);
}

.read-bubble {
    width: 24px;
    height: 24px;
    border: 2px solid #4f8fc9;
    border-radius: 50%;
    background: #eaf4ff;
    position: relative;
}

.read-bubble::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #2f6f9f;
    box-shadow: -5px 0 0 #2f6f9f, 5px 0 0 #2f6f9f;
    transform: translate(-50%, -50%);
}

.read-bubble::after {
    content: none;
}

.checked {
    width: 24px;
    height: 24px;
    border: 2px solid #2e9560;
    border-radius: 50%;
    background: #e7f6ed;
    position: relative;
}

.checked::before {
    content: "✓";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1f6f45;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
}

.idle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #c4cdd2;
}

.completion-dial {
    --dial-fill: #408bd9;
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 1px solid #a9b6bd;
    border-radius: 50%;
    background: conic-gradient(var(--dial-fill) var(--progress), #fff var(--progress));
    position: relative;
}

.completion-dial::after {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: #77848c;
}

.completion-dial.empty {
    background: #edf0f2;
    border-color: #c4cdd2;
}

.completion-dial.complete {
    --dial-fill: #2e9560;
}

.summary-document {
    display: inline-block;
    width: 14px;
    height: 18px;
    border: 1.5px solid #aeb9bf;
    border-radius: 2px;
    background: #edf0f2;
    position: relative;
}

.summary-document::before,
.summary-document::after {
    content: "";
    position: absolute;
    left: 3px;
    height: 1.5px;
    background: currentColor;
    width: 7px;
}

.summary-document::before {
    top: 7px;
}

.summary-document::after {
    top: 11px;
}

.summary-document {
    color: #aeb9bf;
}

.summary-document.submitted {
    border-color: #2e9560;
    background: #e7f6ed;
    color: #2e9560;
}

.summary-document.late {
    border-color: #c47a13;
    background: #fff3d8;
    color: #c47a13;
}

.question-panel {
    border-color: #c9d9e8;
    background: linear-gradient(180deg, #fff, #f8fbff);
}

.student-question-panel {
    margin-bottom: 20px;
}

.question-form {
    grid-template-columns: minmax(0, 1fr) minmax(200px, 280px) auto;
    align-items: end;
}

.question-form label {
    min-width: 0;
}

.question-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.question-existing-images,
.question-new-images {
    grid-column: 1 / -1;
    display: grid;
    gap: 10px;
}

.question-existing-images.is-resetting {
    border-radius: 8px;
    padding: 10px;
    background: #fff7e3;
}

.question-existing-images.is-resetting::after {
    content: "新增问题模式：旧图片会在提交新问题时删除。";
    color: #7c5000;
    font-size: 13px;
    font-weight: 700;
}

.paste-hint {
    color: #5f6e76;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.summary-upload-state {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: 0 0 14px;
    border-radius: 999px;
    padding: 0 12px;
    background: #fff3d8;
    color: #8a5b07;
    font-weight: 700;
}

.issue-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: 2px solid #b9c6ce;
    border-radius: 50%;
    background: #edf1f3;
    color: #68757c;
    font-size: 13px;
    font-weight: 900;
    line-height: 1;
    flex: 0 0 24px;
}

.issue-status-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    border-radius: 999px;
    padding: 2px 10px 2px 3px;
    background: #f3f7f9;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.issue-status-label.awaiting-reply {
    background: #fff4cf;
    color: #7c5000;
}

.issue-status-label.replied {
    background: #eaf4ff;
    color: #245a84;
}

.issue-status.awaiting-reply {
    border-color: #8a5b07;
    background: #fff3c4;
    color: #f0ad23;
    text-shadow:
        -1px -1px 0 #3b2406,
        1px -1px 0 #3b2406,
        -1px 1px 0 #3b2406,
        1px 1px 0 #3b2406;
}

.issue-status.awaiting-reply::before {
    content: "!";
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
}

.issue-status.replied {
    border-color: #4f8fc9;
    background: #eaf4ff;
    color: #2f6f9f;
}

.issue-status.replied::before {
    content: "✓";
    font-size: 17px;
}

.question-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: -4px 0 14px;
    color: var(--muted);
    font-size: 13px;
}

.question-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.question-list {
    display: grid;
    gap: 12px;
}

.question-toggle {
    margin-top: 14px;
    justify-self: start;
}

.question-card,
.question-detail-box,
.question-reply {
    border: 1px solid #d8e4ec;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
}

.question-card.awaiting-reply,
.question-detail-box.awaiting-reply {
    border-color: #e5c46d;
    background: #fffaf0;
}

.question-card.replied,
.question-detail-box.replied {
    border-color: #bfdbef;
    background: #f2f8ff;
}

.question-card-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.question-card-head strong,
.question-card-head small {
    display: block;
}

.question-card-head small,
.question-detail-box small,
.question-reply small {
    color: var(--muted);
}

.question-card p,
.question-detail-box p,
.question-reply p {
    margin: 0;
}

.question-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.65;
}

.question-reply,
.question-reply-inline {
    margin-top: 10px;
    background: #edf6ff;
    color: #173b5b;
}

.question-image-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    border: 1px solid #d8e4ec;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
}

.question-image-preview img {
    display: block;
    width: 96px;
    height: 72px;
    border-radius: 6px;
    object-fit: cover;
    background: #f1f5f7;
}

.question-image-preview span,
.question-image-link {
    color: #245a84;
    font-size: 13px;
    font-weight: 700;
}

.question-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 160px));
    gap: 10px;
}

.question-image-card {
    display: grid;
    gap: 6px;
    min-width: 0;
    border: 1px solid #d8e4ec;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
}

.question-image-card:hover {
    text-decoration: none;
}

.question-image-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 6px;
    object-fit: cover;
    background: #f1f5f7;
}

.question-image-card span {
    overflow: hidden;
    color: #245a84;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.question-image-card em {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #7f3f2a;
    font-style: normal;
}

.question-image-card input {
    width: auto;
}

.question-image-card.pending {
    background: #f2f8ff;
}

.small-remove {
    min-height: 30px;
    padding: 0 10px;
    background: #eef2f3;
    color: var(--text);
    font-size: 12px;
}

.small-remove:hover {
    background: #dde5e7;
}

.question-paste-preview {
    border-color: #b9d2e8;
    background: #f2f8ff;
}

.question-paste-preview[hidden],
.question-paste-preview img[hidden],
.question-new-images[hidden],
.completion-new-images[hidden] {
    display: none;
}

.question-image-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.question-image-link {
    display: inline-flex;
}

.rule-strip,
.stats-row,
.score-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.rule-strip span,
.rule-strip strong,
.stat,
.score-grid div {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

.stat {
    color: var(--text);
}

.stat span,
.score-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.stat strong,
.score-grid strong {
    display: block;
    margin-top: 8px;
    font-size: 22px;
}

.summary-download-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 8px 0 20px;
    border: 1px solid #b7d8cf;
    border-left: 8px solid var(--primary);
    border-radius: 10px;
    padding: 18px 20px;
    background: #f4fbf8;
}

.summary-download-card.is-missing {
    border-color: #ead4d4;
    border-left-color: #8f3a3a;
    background: #fff8f8;
}

.summary-download-main {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.summary-download-kicker {
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
}

.summary-download-main strong {
    font-size: 24px;
}

.summary-file-name {
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.summary-download-button {
    min-width: 180px;
    min-height: 54px;
    font-size: 18px;
    white-space: nowrap;
}

.summary-missing-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 46px;
    border-radius: 999px;
    background: #f8dede;
    color: #8f1f1f;
    font-weight: 800;
}

.panel + .panel,
.panel + .stats-row,
.stats-row + .panel,
.panel + .review-notice {
    margin-top: 20px;
}

.item-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.work-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: 18px;
    align-items: stretch;
    border: 1px solid #cddbe0;
    border-radius: 8px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 1px 0 rgba(15, 61, 102, 0.03);
}

.work-item.readonly {
    display: block;
}

.item-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.work-item p {
    margin: 0 0 10px;
}

.work-item.unread-change {
    border-color: #e6c56b;
    background: linear-gradient(180deg, #fffdf6, #ffffff);
    box-shadow: inset 4px 0 0 #f2c94c;
}

.unread-change-target {
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff4bf;
}

.work-item small {
    color: var(--muted);
}

.item-main {
    min-width: 0;
    border: 1px solid #d9e7e2;
    border-radius: 8px;
    padding: 14px 16px;
    background: #fbfdfc;
}

.work-panel-label {
    margin-bottom: 12px;
    color: #1f6f5b;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
}

.completion-label {
    color: #245a84;
}

.completion-form {
    display: grid;
    gap: 10px;
    min-width: 0;
    border: 1px solid #d6e5ef;
    border-radius: 8px;
    padding: 14px 16px;
    background: #f7fbff;
}

.completion-form textarea,
.completion-form input[type="file"] {
    border-color: #c9dce8;
}

.completion-form button[type="submit"] {
    margin-top: 4px;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.completion-detail-images {
    margin: 8px 0 12px;
}

.mentor-comments {
    margin-top: 14px;
    border-top: 1px solid #c7dbef;
    padding-top: 12px;
}

.ai-plan-review {
    margin: 10px 0 12px;
    border: 1px solid #c7dbef;
    border-left: 4px solid #2f6f9f;
    border-radius: 8px;
    padding: 10px 12px;
    background: #f5f9fc;
}

.ai-plan-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    color: #0f3d66;
}

.ai-plan-review-list {
    margin: 0;
    padding-left: 20px;
    color: #111827;
}

.ai-plan-review-list li + li {
    margin-top: 4px;
}

.ai-learning-resource {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #bfd3e6;
    list-style-position: outside;
}

.ai-learning-resource strong {
    color: #0b3f66;
}

.ai-learning-resource a {
    color: #0f5f8f;
    font-weight: 700;
    text-decoration: none;
}

.ai-learning-resource a:hover {
    text-decoration: underline;
}

.compact-button {
    min-height: 34px;
    padding: 0 12px;
    font-size: 14px;
}

.mentor-comments h3 {
    margin: 0 0 10px;
    color: #0f3d66;
    font-size: 15px;
}

.mentor-comment {
    margin-bottom: 10px;
    border-left: 4px solid #4f8fc9;
    border-radius: 6px;
    padding: 10px 12px;
    background: #eaf4ff;
    color: #111827;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64);
}

.mentor-comment strong {
    display: block;
    margin-bottom: 4px;
    color: #0f3d66;
}

.mentor-comment p {
    margin: 0;
    color: #111827;
}

.student-comment-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
}

.student-comment-tools .inline-form {
    margin: 0;
}

.student-comment-tools button,
.comment-reply-box summary {
    min-height: 34px;
    border-radius: 7px;
    padding: 0 12px;
    font-size: 13px;
}

.comment-reply-box {
    flex: 1 1 220px;
    min-width: 220px;
}

.comment-reply-box summary {
    display: inline-flex;
    align-items: center;
    border: 1px solid #c7dbef;
    background: #fff;
    color: #0f3d66;
    font-weight: 800;
    cursor: pointer;
}

.comment-reply-box form {
    margin-top: 8px;
}

.comment-student-state {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.comment-read-state.is-unread {
    background: #eef2f3;
    color: #53616a;
}

.student-comment-replies {
    margin-top: 10px;
    border-left: 3px solid #2f6f9f;
    border-radius: 6px;
    padding: 8px 10px;
    background: #f7fbff;
}

.student-comment-replies strong {
    display: block;
    margin-bottom: 4px;
    color: #0f3d66;
}

.student-comment-replies p {
    margin: 0 0 4px;
}

.student-comment-replies small {
    color: var(--muted);
}

.admin-comments {
    margin-top: 16px;
}

.comment-form,
.comment-editor form {
    margin-top: 12px;
}

.comment-form button,
.comment-editor button {
    justify-self: start;
}

.comment-editor-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin-top: 8px;
    border-radius: 6px;
    padding: 0 16px;
    background: #2f6f9f;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.comment-editor-toggle::-webkit-details-marker {
    display: none;
}

.comment-editor-toggle:hover {
    background: #245a84;
}

.comment-editor[open] .comment-editor-toggle {
    margin-bottom: 12px;
}

.comment-edit-action {
    background: #2f6f9f;
}

.comment-edit-action:hover {
    background: #245a84;
}

.checkline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.checkline input {
    width: auto;
}

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 0 9px;
    background: #e9f3ef;
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 700;
}

.tag.warn {
    background: #fff3d8;
    color: var(--warn);
}

.tag.info {
    background: #e7f0fb;
    color: #1e4d7b;
}

.tag.change-tag {
    background: #fff0b8;
    color: #7c5000;
}

.tag.danger {
    background: #ffe7e7;
    color: var(--danger);
}

.tag.success {
    background: #e7f6ed;
    color: var(--success);
}

.activity-note {
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px;
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 8px;
}

.member-archive-form {
    display: flex;
    align-items: end;
    gap: 8px;
}

.member-archive-form label {
    font-size: 13px;
}

.member-archive-form select {
    min-width: 92px;
    padding: 8px 10px;
}

.message-box {
    min-height: 180px;
    font-family: Consolas, "Microsoft YaHei", monospace;
}

.student-portal-layout {
    display: grid;
    grid-template-columns: 280px minmax(660px, 1fr) 292px;
    align-items: start;
    gap: 18px;
}

.panel-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.panel-title-row h2 {
    margin-bottom: 12px;
}

.admin-summary-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.admin-summary-list div {
    border-radius: 6px;
    padding: 10px 8px;
    background: #f4f7f6;
}

.admin-summary-list span {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 12px;
}

.admin-summary-list strong {
    color: var(--text);
    font-size: 21px;
}

.management-links .resource-row {
    text-decoration: none;
}

.management-links .resource-row:hover {
    background: #e8f2ef;
}

.admin-stat-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.portal-rail {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 18px;
}

.student-work-main {
    min-width: 0;
}

.identity-card,
.side-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    background: var(--panel);
}

.identity-card {
    overflow: hidden;
    border-color: #cfe2db;
    background:
        radial-gradient(circle at 100% 0%, #dbeee6 0, transparent 45%),
        linear-gradient(150deg, #ffffff, #f1f7f4);
}

.eyebrow {
    margin: 0 0 12px;
    color: #71958a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.identity-card h2 {
    margin-bottom: 14px;
    line-height: 1.45;
}

.direction-tag {
    display: block;
    margin-bottom: 18px;
    border-radius: 7px;
    padding: 8px 10px;
    background: #e8f3ef;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
}

.identity-card blockquote {
    margin: 0;
    border-left: 3px solid #d6aa62;
    padding-left: 12px;
    color: #40504d;
    font-size: 14px;
    line-height: 1.8;
}

.side-card h2 {
    margin-bottom: 14px;
    font-size: 18px;
}

.side-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}

.side-title h2 {
    margin: 0;
}

.achievement-slide.is-hidden {
    display: none;
}

.journal-cover {
    display: grid;
    align-content: space-between;
    height: 126px;
    margin-bottom: 14px;
    border-radius: 8px;
    padding: 12px;
    background:
        linear-gradient(135deg, transparent 30%, rgba(34, 116, 94, 0.12) 30%, rgba(34, 116, 94, 0.12) 58%, transparent 58%),
        #f4f6f5;
    color: #435f59;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
    font-weight: 700;
}

.journal-cover::before {
    content: "";
    height: 4px;
    border-radius: 3px;
    background: #da5a47;
}

.journal-cover i {
    display: block;
    width: 62%;
    height: 22px;
    border-top: 2px solid #1f6f5b;
    border-bottom: 1px solid #bfd5ce;
}

.paper-cover-image {
    display: block;
    width: 100%;
    aspect-ratio: 0.707;
    margin-bottom: 14px;
    border: 1px solid #e1e7e4;
    border-radius: 8px;
    object-fit: contain;
    object-position: top center;
    background: #fff;
}

.achievement-slide strong {
    display: block;
    margin: 12px 0 7px;
    line-height: 1.5;
}

.achievement-slide p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.carousel-button {
    width: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 50%;
    background: #eef4f1;
    color: var(--primary-dark);
    font-size: 23px;
}

.carousel-button:hover {
    background: #dfece7;
}

.carousel-dots {
    display: flex;
    gap: 5px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    min-height: 8px;
    border-radius: 50%;
    padding: 0;
    background: #c6d6d1;
}

.carousel-dot.active {
    width: 20px;
    border-radius: 8px;
    background: var(--primary);
}

.literature-card {
    border-color: #cce0d9;
    background: linear-gradient(180deg, #fff, #f8fbfa);
}

.literature-card h3 {
    margin: 4px 0 10px;
    color: #142924;
    font-size: 16px;
    line-height: 1.45;
}

.brief-title-zh {
    margin: -4px 0 10px;
    color: #1f6f5b;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.citation,
.paper-authors {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 13px;
}

.recommendation {
    margin: 14px 0;
    border-radius: 7px;
    padding: 11px 12px;
    background: #edf6f2;
    color: #36564e;
    font-size: 13px;
}

.reading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 13px;
}

.reading-actions .button-link {
    min-height: 35px;
    padding: 0 12px;
    font-size: 13px;
}

.literature-card small {
    color: var(--muted);
}

.resource-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    border-radius: 7px;
    padding: 11px 12px;
    background: #f5f8f7;
    color: var(--text);
    font-weight: 700;
}

.resource-row em {
    color: #7f8c91;
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
}

.resource-row.disabled {
    color: #43504e;
}

.announcement {
    margin-bottom: 10px;
    border-radius: 8px;
    padding: 11px 12px;
    background: #f4f8f6;
}

.announcement strong {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-dark);
}

.announcement p {
    margin: 0;
    color: #43504e;
    font-size: 13px;
}

.wechat-ready {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 14px 0 0;
    border-top: 1px dashed var(--line);
    padding-top: 12px;
    color: var(--primary);
    font-size: 13px;
}

.wechat-ready span {
    display: inline-block;
    width: 18px;
    height: 15px;
    border: 2px solid #3a936f;
    border-radius: 8px;
    position: relative;
}

.wechat-ready span::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 3px;
    border-width: 4px 4px 0 0;
    border-style: solid;
    border-color: #3a936f transparent transparent transparent;
}

.page.group-home-page {
    width: min(1320px, calc(100% - 36px));
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    align-items: stretch;
    gap: 22px;
    min-height: 460px;
    margin-bottom: 28px;
}

.hero-copy,
.hero-achievement,
.home-card,
.resource-card,
.achievement-home-card,
.join-section {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}

.hero-copy {
    display: grid;
    align-content: center;
    padding: 42px;
    background:
        radial-gradient(circle at 100% 0%, #e1f1eb 0, transparent 42%),
        linear-gradient(145deg, #ffffff, #f4f8f6);
}

.hero-copy h1 {
    margin-bottom: 16px;
    font-size: 38px;
    line-height: 1.25;
}

.hero-intro {
    max-width: 780px;
    margin: 18px 0 24px;
    color: #344743;
    font-size: 17px;
    line-height: 1.9;
}

.hero-actions,
.join-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-achievement {
    display: grid;
    align-content: start;
    padding: 22px;
}

.hero-achievement .paper-cover-image {
    max-height: 340px;
}

.hero-achievement strong,
.achievement-home-card strong {
    display: block;
    margin: 12px 0 7px;
}

.hero-achievement p,
.achievement-home-card p,
.home-card p,
.resource-card p,
.resource-library-card p {
    color: var(--muted);
}

.home-section {
    margin-top: 28px;
}

.home-card-grid,
.resource-grid,
.achievement-home-grid,
.updates-grid,
.updates-feature-grid,
.team-showcase-grid,
.resource-library-grid {
    display: grid;
    gap: 16px;
}

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

.home-card-grid.compact,
.resource-grid,
.resource-library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.achievement-home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.updates-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
}

.updates-feature-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    align-items: stretch;
}

.updates-stack {
    display: grid;
    gap: 16px;
}

.home-update-gallery {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--panel);
}

.update-gallery-frame {
    min-height: 410px;
}

.update-gallery-slide {
    margin: 0;
}

.update-gallery-slide.is-hidden {
    display: none;
}

.update-gallery-slide img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: top center;
    background: #eef2f3;
}

.update-gallery-slide figcaption {
    display: grid;
    gap: 6px;
    padding: 16px 18px;
}

.update-gallery-slide figcaption span {
    color: var(--muted);
}

.update-gallery-controls {
    display: flex;
    gap: 8px;
    padding: 0 18px 18px;
}

.update-gallery-dot {
    width: 34px;
    height: 8px;
    min-height: 8px;
    border-radius: 999px;
    padding: 0;
    background: #c6d6d1;
}

.update-gallery-dot.active {
    background: var(--primary);
}

.home-card,
.resource-card,
.achievement-home-card {
    padding: 18px;
}

.home-card h3,
.resource-card h3,
.resource-library-card h2 {
    margin: 12px 0 8px;
}

.resource-card {
    background: #fbfdfc;
    border-color: #cfe2db;
}

.achievement-home-card .journal-cover {
    height: 150px;
}

.paper-intro {
    margin: 14px 0 12px;
    border-left: 4px solid #d6aa62;
    border-radius: 7px;
    padding: 10px 12px;
    background: #fbf6ec;
}

.paper-intro span {
    display: block;
    margin-bottom: 5px;
    color: #7a5620;
    font-size: 12px;
    font-weight: 800;
}

.paper-intro p {
    margin: 0;
    color: #3f4d49;
    font-size: 13px;
}

.update-item {
    margin-top: 14px;
    border-top: 1px solid var(--line);
    padding-top: 14px;
}

.update-item:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.join-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px;
    background: linear-gradient(145deg, #ffffff, #eef6f3);
}

.join-section p {
    max-width: 760px;
    color: var(--muted);
}

.resource-library-card {
    min-height: 220px;
}

.team-showcase-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.team-profile-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    background: var(--panel);
}

.team-photo-placeholder {
    display: grid;
    min-height: 220px;
    place-items: center;
    border: 1px dashed #b9c9c4;
    border-radius: 10px;
    background: #f4f8f6;
    color: var(--primary-dark);
    font-weight: 800;
}

.team-profile-card h3 {
    margin: 14px 0 8px;
}

.team-profile-card p {
    color: var(--muted);
}

.resource-state {
    display: inline-flex;
    margin-top: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    background: #eef6f3;
    color: var(--primary-dark);
    font-size: 13px;
    font-weight: 700;
}

@media (max-width: 1080px) {
    .home-hero,
    .updates-grid,
    .updates-feature-grid {
        grid-template-columns: 1fr;
    }

    .home-card-grid,
    .home-card-grid.compact,
    .resource-grid,
    .achievement-home-grid,
    .team-showcase-grid,
    .resource-library-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .join-section {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 720px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding: 14px 18px;
    }

    .topbar nav {
        flex-wrap: wrap;
        gap: 10px 14px;
    }

    .hero-copy {
        padding: 26px;
    }

    .hero-copy h1 {
        font-size: 30px;
    }

    .home-card-grid,
    .home-card-grid.compact,
    .resource-grid,
    .achievement-home-grid,
    .team-showcase-grid,
    .resource-library-grid {
        grid-template-columns: 1fr;
    }
}

.group-home-link {
    width: 100%;
}

.group-home-link.is-disabled {
    cursor: default;
    color: var(--muted);
}

.portal-admin-panel h3.subsection-title {
    margin: 24px 0 10px;
    font-size: 17px;
}

.achievement-admin-list {
    display: grid;
    gap: 12px;
}

.achievement-admin-form {
    display: grid;
    grid-template-columns: 82px 118px 185px minmax(240px, 1fr) minmax(190px, 1fr) 70px auto auto;
    align-items: end;
    gap: 8px;
    border-radius: 8px;
    padding: 12px;
    background: #f7f9f8;
}

.achievement-admin-form label,
.portal-editor label {
    font-size: 13px;
}

.achievement-admin-form input {
    padding: 8px 9px;
}

.achievement-admin-form .achievement-cover {
    grid-column: 1 / span 2;
}

.achievement-admin-form .achievement-cover input {
    padding: 7px 0;
}

.achievement-admin-form .achievement-cover .text-link {
    display: inline-block;
    margin-top: 5px;
}

.portal-editor {
    grid-template-columns: 210px minmax(220px, 1fr) minmax(220px, 1fr);
    align-items: end;
}

.portal-editor .wide {
    grid-column: span 2;
}

@media (max-width: 1450px) {
    .student-portal-layout {
        grid-template-columns: 252px minmax(610px, 1fr) 270px;
        gap: 14px;
    }

    .work-item {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 1161px) {
    .admin-portal-page .student-portal-layout {
        align-items: stretch;
    }

    .admin-portal-page .portal-rail {
        height: 100%;
        position: static;
    }

    .admin-portal-page .portal-left {
        grid-template-rows: auto 1fr;
    }

    .admin-portal-page .portal-right {
        grid-template-rows: auto auto auto 1fr;
    }

    .admin-portal-page .achievement-showcase,
    .admin-portal-page .notice-card {
        min-height: 100%;
    }
}

@media (max-width: 1160px) {
    .page.student-portal-page,
    .page.admin-portal-page {
        width: min(960px, calc(100% - 32px));
    }

    .student-portal-layout {
        display: flex;
        flex-direction: column;
    }

    .student-work-main {
        order: 1;
        width: 100%;
    }

    .portal-left {
        order: 2;
    }

    .portal-right {
        order: 3;
    }

    .portal-rail {
        width: 100%;
        position: static;
    }
}

.note {
    padding: 12px;
    background: #f7f9fa;
    border-radius: 6px;
}

.assessment-box {
    margin-bottom: 18px;
    border: 1px solid #c7ddd7;
    border-radius: 8px;
    padding: 16px;
    background: #f3f8f6;
}

.assessment-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.assessment-head h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.assessment-total {
    color: var(--primary-dark);
    font-size: 22px;
}

.assessment-parts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.assessment-parts span {
    border: 1px solid #c7ddd7;
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--primary-dark);
    background: #fff;
}

.calibration-summary {
    margin: 14px 0;
    border: 1px solid #c9dceb;
    border-left: 4px solid #2f6f9f;
    border-radius: 8px;
    padding: 12px 14px;
    background: #f7fbff;
}

.calibration-summary strong,
.calibration-form-head strong {
    color: #0f3d66;
}

.calibration-summary p,
.calibration-meta {
    margin: 7px 0 0;
    color: #465963;
    font-size: 14px;
}

.calibration-parts {
    margin: 10px 0 0;
}

.workload-calibration-form {
    grid-template-columns: 150px 130px minmax(0, 1fr) auto;
    align-items: end;
    margin: 12px 0;
    border: 1px solid #c9dceb;
    border-left: 4px solid #2f6f9f;
    border-radius: 8px;
    padding: 12px;
    background: #f7fbff;
}

.calibration-form-head {
    display: grid;
    gap: 2px;
}

.calibration-form-head span {
    color: var(--muted);
    font-size: 12px;
}

.workload-calibration-form button {
    min-width: 130px;
}

.assessment-footnote {
    margin-bottom: 0;
    font-size: 13px;
}

.assessment-note {
    border-left: 3px solid #98c5b8;
    padding: 8px 10px;
    background: #f3f8f6;
    color: var(--primary-dark);
    font-size: 14px;
}

.student-work-description {
    margin: 12px 0 14px;
    border-left: 4px solid #1f6f5b;
    border-radius: 8px;
    padding: 12px 14px;
    background: #edf7f4;
    color: #12352d;
    font-weight: 600;
    line-height: 1.65;
}

.plan-section-frame,
.completion-section-frame {
    border: 1px solid #d4e1df;
    border-radius: 10px;
    padding: 14px 16px;
}

.plan-section-frame {
    border-left: 5px solid #1f7a65;
    background: #fbfdfc;
}

.completion-section-frame {
    margin-top: 14px;
    border-color: #c9dceb;
    border-left: 5px solid #2f6f9f;
    background: #f7fbff;
}

.section-frame-label {
    margin-bottom: 10px;
    color: #0f3d66;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0;
}

.plan-section-frame .item-title {
    margin-bottom: 8px;
}

.student-completion-note-card {
    margin: 0 0 12px;
    border: 1px solid #c9dceb;
    border-radius: 8px;
    padding: 12px 14px;
    background: #eaf4ff;
    color: #0f2f4a;
}

.student-completion-note-card strong {
    display: block;
    margin-bottom: 6px;
    color: #0f3d66;
    font-size: 15px;
}

.student-completion-note-card p {
    margin: 0;
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.65;
}

.student-completion-note-card.is-empty p {
    color: var(--muted);
    font-weight: 600;
}

.completion-section-frame .assessment-note {
    margin-top: 12px;
}

.completion-section-frame .mentor-comments {
    margin-top: 14px;
    border-top-color: #bfd4e6;
}

.literature-page {
    width: min(1320px, calc(100% - 36px));
}

.literature-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: stretch;
    margin-bottom: 22px;
    border: 1px solid #cfdcda;
    border-radius: 8px;
    padding: 28px;
    background: linear-gradient(135deg, #ffffff 0%, #eef7f4 100%);
}

.literature-hero h1 {
    margin-bottom: 12px;
    color: #10251f;
    font-size: 40px;
    line-height: 1.15;
}

.literature-hero p {
    max-width: 780px;
    color: #40504b;
    font-size: 17px;
    line-height: 1.75;
}

.literature-domain {
    display: inline-flex;
    margin-top: 18px;
    border: 1px solid #bad1ca;
    border-radius: 999px;
    padding: 7px 12px;
    background: #ffffff;
    color: var(--primary-dark);
    font-family: "Segoe UI", sans-serif;
    font-weight: 800;
}

.literature-access-card,
.literature-card,
.literature-flow-grid article {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.literature-access-card {
    padding: 20px;
}

.literature-access-card h2 {
    margin: 14px 0 10px;
    font-size: 24px;
}

.literature-access-card p {
    margin: 8px 0 0;
    font-size: 15px;
}

.literature-section {
    margin-top: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
    background: #ffffff;
}

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

.literature-flow-grid article {
    padding: 16px;
}

.literature-flow-grid span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #e4f2ee;
    color: var(--primary-dark);
    font-weight: 900;
}

.literature-flow-grid h3,
.literature-card h3 {
    margin: 12px 0 8px;
    color: #10251f;
}

.literature-flow-grid p,
.literature-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

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

.literature-card {
    padding: 18px;
}

.mentor-literature-panel {
    border-color: #c8d9e8;
    background: #f7fbff;
}

.mentor-card {
    border-color: #c9dceb;
}

.completion-box {
    background: #f7f9fa;
    border-color: var(--line);
}

.completion-box h3 {
    margin: 0 0 8px;
    font-size: 17px;
}

.continuity-note {
    border-left: 3px solid #d2bf75;
    padding: 8px 10px;
    background: #fff9eb;
    color: var(--text);
    font-size: 14px;
}

.warning-box {
    border: 1px solid #e6c56b;
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff7e3;
    color: var(--warn);
    font-weight: 700;
}

.archive-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.archive-head h2 {
    margin-bottom: 4px;
}

.archive-overview {
    margin: 12px 0 18px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 12px 0 2px;
}

@media (max-width: 820px) {
    .topbar,
    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar nav,
    .inline-form,
    .review-notice,
    .head-actions,
    .table-actions,
    .archive-head {
        flex-wrap: wrap;
    }

    .week-selector-form,
    .week-selector-form select {
        width: 100%;
    }

    .week-selector-form select {
        min-width: 0;
    }

    .grid-form,
    .review-form,
    .compact-form,
    .question-form,
    .workload-calibration-form,
    .rule-strip,
    .stats-row,
    .score-grid,
    .work-item {
        grid-template-columns: 1fr;
    }

    .assessment-head {
        flex-direction: column;
    }

    .literature-hero,
    .literature-flow-grid,
    .literature-card-grid {
        grid-template-columns: 1fr;
    }

    .summary-download-card {
        align-items: stretch;
        flex-direction: column;
    }

    .summary-download-button,
    .summary-missing-badge {
        width: 100%;
    }

    .admin-status-table,
    .admin-status-table tbody,
    .admin-status-table tr {
        display: block;
        width: 100%;
    }

    .admin-status-table thead {
        display: none;
    }

    .admin-status-table tr {
        margin-bottom: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 10px 12px;
    }

    .admin-status-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 0;
        padding: 6px 0;
    }

    .admin-status-table td[data-label]::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 13px;
        font-weight: 700;
    }

    .admin-status-table .student-name-inner {
        padding-bottom: 10px;
        font-weight: 700;
    }

    .admin-status-table .table-actions {
        align-items: center;
    }

    .admin-status-table .table-actions .button-link {
        min-height: 36px;
        white-space: nowrap;
    }
}
