:root {
  color-scheme: light;
  --navy: #003057;
  --ink: #14213d;
  --wordmark: #263a52;
  --paper: #fafaf6;
  --white: #ffffff;
  --rule: #e5e7eb;
  --rule-strong: #cbd2da;
  --coral: #f47b55;
  --coral-dark: #a93b1f;
  --muted: #59677a;
  --focus: #246bfe;
  --success: #146c43;
  --warning: #8a5a00;
  --error: #b3261e;
  --max-width: 1240px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans SC", "Source Han Sans CN", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

button, input, select { font: inherit; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 999;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--white);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.portal-header {
  min-height: 78px;
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--rule);
}

.brand { display: inline-flex; width: 304px; }
.brand img { width: 100%; display: block; }

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.security-label {
  color: var(--success);
  font-size: 13px;
  font-weight: 750;
}

.text-link {
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  text-underline-offset: 4px;
}

.unlock-shell,
.workspace {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.unlock-shell {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.75fr);
  gap: 80px;
  align-items: center;
  padding: 72px 0;
}

.unlock-copy { max-width: 720px; }

.eyebrow,
.section-index {
  margin: 0 0 18px;
  color: var(--coral-dark);
  font-family: Inter, Arial, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { margin-top: 0; line-height: 1.18; }

.unlock-copy h1,
.workspace-heading h2 {
  margin-bottom: 24px;
  font-size: clamp(40px, 6vw, 72px);
  letter-spacing: -.045em;
}

.unlock-copy > p:not(.eyebrow),
.workspace-heading > div > p:last-child {
  color: var(--wordmark);
  font-size: 19px;
}

.security-points {
  margin: 32px 0 0;
  padding: 24px 24px 24px 44px;
  border-left: 5px solid var(--coral);
  background: var(--white);
}

.security-points li { margin: 7px 0; color: var(--muted); }

.unlock-form {
  padding: 34px;
  background: var(--white);
  border: 1px solid var(--rule);
  box-shadow: 0 24px 70px rgba(0, 48, 87, .11);
}

.unlock-form label,
.filters label {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
}

input:hover, select:hover { border-color: var(--navy); }

.form-help {
  margin: 10px 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border: 1px solid var(--navy);
  border-radius: 0;
  cursor: pointer;
  font-weight: 750;
}

.button-primary {
  width: 100%;
  background: var(--navy);
  color: var(--white);
}

.button-primary:hover { background: var(--ink); }

.button-quiet {
  background: var(--white);
  color: var(--navy);
}

.button-quiet:hover { border-color: var(--coral); color: var(--coral-dark); }
.button:disabled { opacity: .58; cursor: wait; }

.status { min-height: 1.6em; margin: 16px 0 0; font-size: 14px; }
.status[data-tone="error"] { color: var(--error); }
.status[data-tone="success"] { color: var(--success); }

.workspace { padding: 64px 0 96px; }

.workspace-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 48px;
  align-items: end;
  padding-bottom: 46px;
}

.workspace-heading > div { max-width: 820px; }
.lock-note { margin: 0; color: var(--success); font-size: 13px; font-weight: 750; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--rule-strong);
  border-left: 1px solid var(--rule-strong);
}

.summary-grid article {
  min-height: 132px;
  padding: 24px;
  background: var(--white);
  border-right: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule-strong);
}

.summary-grid strong,
.summary-grid span { display: block; }

.summary-grid strong {
  color: var(--navy);
  font-family: Inter, Arial, sans-serif;
  font-size: clamp(30px, 4vw, 46px);
  font-variant-numeric: tabular-nums;
}

.summary-grid span { margin-top: 8px; color: var(--muted); font-size: 14px; }

.directory { padding-top: 88px; }

.directory-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 32px;
}

.directory-heading h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); letter-spacing: -.03em; }
.directory-heading > p { margin: 0; color: var(--muted); font-size: 14px; }

.filters {
  display: grid;
  grid-template-columns: 1.35fr .72fr 1fr auto;
  gap: 16px;
  align-items: end;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--rule);
}

.filter-reset { white-space: nowrap; }

.student-groups { margin-top: 48px; }

.grade-group { margin-top: 54px; }
.grade-group:first-child { margin-top: 0; }

.grade-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--navy);
}

.grade-title h3 { margin: 0; font-size: 28px; }
.grade-title span { color: var(--muted); font-size: 14px; }

.school-group { margin-top: 34px; }
.school-title { margin-bottom: 10px; color: var(--wordmark); font-size: 17px; }

.student-list {
  border-top: 1px solid var(--rule);
}

.student-row {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(120px, .65fr) minmax(210px, 1.2fr) minmax(120px, .7fr) 98px 28px;
  gap: 20px;
  align-items: center;
  padding: 16px 18px;
  border: 0;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.student-row:hover { background: var(--white); }
.student-name { font-size: 17px; font-weight: 780; }
.student-major, .student-meta { color: var(--muted); font-size: 14px; }
.student-files { color: var(--navy); font-size: 13px; font-weight: 750; text-align: right; }
.student-arrow { color: var(--coral-dark); font-size: 22px; text-align: right; }

.empty-state {
  margin-top: 40px;
  padding: 42px;
  border: 1px dashed var(--rule-strong);
  text-align: center;
}

.empty-state h3 { margin-bottom: 8px; }
.empty-state p { margin: 0; color: var(--muted); }

.student-dialog {
  width: min(1000px, calc(100% - 32px));
  max-height: min(880px, calc(100vh - 32px));
  padding: 0;
  border: 1px solid var(--rule-strong);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 32px 100px rgba(0, 24, 48, .28);
}

.student-dialog::backdrop { background: rgba(0, 24, 48, .64); }

.dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 32px 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.dialog-header h2 { margin-bottom: 8px; font-size: 38px; letter-spacing: -.03em; }
.dialog-header p:last-child { margin: 0; color: var(--muted); }

.icon-button {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid var(--rule-strong);
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
}

.dialog-body { padding: 0 32px 36px; }

.detail-tabs {
  position: sticky;
  top: 137px;
  z-index: 1;
  display: flex;
  gap: 24px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.detail-tabs button {
  min-height: 54px;
  padding: 0;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 750;
}

.detail-tabs button[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--coral); }
.detail-panel { padding-top: 28px; }

.record-section { margin-top: 38px; }
.record-section:first-child { margin-top: 0; }
.record-section h3 { margin-bottom: 14px; font-size: 22px; }

.record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.record-item {
  min-height: 96px;
  padding: 16px;
  background: var(--white);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.record-item dt { margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 750; }
.record-item dd { margin: 0; white-space: pre-wrap; }
.record-item.is-empty dd { color: var(--muted); font-style: italic; }

.document-notice {
  margin: 0 0 24px;
  padding: 15px 18px;
  border-left: 4px solid var(--warning);
  background: #fff8e8;
  color: #5c4300;
  font-size: 14px;
}

.document-category { margin-top: 34px; }
.document-category:first-of-type { margin-top: 0; }
.document-category h3 { margin-bottom: 10px; font-size: 20px; }

.document-list { border-top: 1px solid var(--rule); }

.document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 18px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}

.document-name { font-weight: 700; }
.document-path { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
.document-meta { color: var(--muted); font-size: 12px; white-space: nowrap; }

.sensitivity {
  display: inline-flex;
  padding: 2px 7px;
  border: 1px solid var(--rule-strong);
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.sensitivity[data-level="敏感"] { color: var(--warning); border-color: #c79a36; }
.sensitivity[data-level="高度敏感"] { color: var(--error); border-color: #d5837d; }

.download-button {
  min-height: 40px;
  padding: 7px 12px;
  border: 1px solid var(--navy);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.download-button:hover { background: var(--navy); color: var(--white); }
.download-button:disabled { opacity: .58; cursor: wait; }

@media (max-width: 900px) {
  .portal-header { width: min(calc(100% - 32px), var(--max-width)); }
  .brand { width: 250px; }
  .security-label { display: none; }
  .unlock-shell { grid-template-columns: 1fr; gap: 40px; align-items: start; }
  .unlock-form { max-width: 600px; }
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .filters { grid-template-columns: 1fr 1fr; }
  .filter-reset { width: 100%; }
  .student-row { grid-template-columns: minmax(120px, .8fr) minmax(180px, 1.2fr) 86px 24px; }
  .student-meta { display: none; }
}

@media (max-width: 620px) {
  .portal-header { min-height: 68px; gap: 12px; }
  .brand { width: 214px; }
  .header-actions .text-link { display: none; }
  .unlock-shell, .workspace { width: min(calc(100% - 32px), var(--max-width)); }
  .unlock-shell { min-height: calc(100vh - 68px); padding: 48px 0; }
  .unlock-copy h1, .workspace-heading h2 { font-size: 42px; }
  .unlock-copy > p:not(.eyebrow), .workspace-heading > div > p:last-child { font-size: 17px; }
  .unlock-form { padding: 24px; }
  .workspace { padding-top: 46px; }
  .workspace-heading { grid-template-columns: 1fr; gap: 10px; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-grid article { min-height: 110px; padding: 18px; }
  .directory { padding-top: 64px; }
  .directory-heading { align-items: start; flex-direction: column; gap: 12px; }
  .filters { grid-template-columns: 1fr; padding: 18px; }
  .student-row { grid-template-columns: 1fr auto 20px; gap: 12px; padding: 16px 6px; }
  .student-major { grid-column: 1 / 2; }
  .student-files { grid-column: 2 / 3; grid-row: 1 / 3; align-self: center; }
  .student-arrow { grid-column: 3 / 4; grid-row: 1 / 3; align-self: center; }
  .student-dialog { width: 100%; max-height: 100vh; height: 100vh; border: 0; }
  .dialog-header { padding: 22px 18px 18px; }
  .dialog-header h2 { font-size: 30px; }
  .dialog-body { padding: 0 18px 28px; }
  .detail-tabs { top: 118px; }
  .record-grid { grid-template-columns: 1fr; }
  .document-row { grid-template-columns: 1fr auto; }
  .document-meta { grid-column: 1 / 2; }
  .download-button { grid-column: 2 / 3; grid-row: 1 / 3; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

@media print {
  body > * { display: none !important; }
  body::before {
    content: "内部受限资料不可直接打印。";
    display: block;
    padding: 40px;
    color: #14213d;
    font-size: 18pt;
  }
}
/* Warm information-station theme: mirrors the public Karry homepage. */
:root{--paper:#fffaf3;--peach:#ffdcd0;--lav:#e9e5ff;--mint:#ddf3ec;--butter:#fff1b8;--coral:#f47b55;--navy:#263a52;--rule:#e8ddd1}
body{background:var(--paper)!important;color:var(--navy)!important}.portal-header{background:var(--paper)!important;border-color:var(--rule)!important}.unlock-shell{background:var(--paper)!important}.unlock-copy h1,.workspace-heading h2,.directory-heading h2{color:var(--navy)!important}.unlock-form,.summary-grid article,.filters,.grade-group,.student-dialog{border-color:var(--rule)!important;background:#fff!important}.unlock-form{border-radius:24px!important;box-shadow:none!important}.button-primary{background:var(--coral)!important;border-color:var(--coral)!important}.summary-grid{gap:14px!important;border:0!important}.summary-grid article{border-radius:20px!important;padding:24px!important}.summary-grid article:nth-child(1){background:var(--lav)!important}.summary-grid article:nth-child(2){background:var(--mint)!important}.summary-grid article:nth-child(3){background:var(--butter)!important}.summary-grid article:nth-child(4){background:var(--peach)!important}.workspace-heading,.directory-heading{border-color:var(--rule)!important}.filters{border-radius:22px!important;padding:20px!important}.student-groups{display:block!important}.directory:after{display:none!important}.grade-group,.school-group{border-color:var(--rule)!important}.lock-note,.security-label{color:#7d5470!important}

/* Folder browser: group cards are deliberately not table rows. */
.student-groups { display: grid !important; gap: 24px !important; margin-top: 28px !important; }
.grade-group {
  position: relative;
  margin: 0 !important;
  padding: 28px 20px 20px !important;
  border: 1px solid #e6d9cb !important;
  border-radius: 0 22px 22px 22px !important;
  background: #fffdf9 !important;
}
.grade-group::before {
  content: "";
  position: absolute;
  top: -12px;
  left: -1px;
  width: 132px;
  height: 13px;
  border: 1px solid #e6d9cb;
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
  background: #e9e5ff;
}
.grade-title {
  position: relative;
  z-index: 1;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin: 0 0 18px !important;
  padding: 0 2px 13px !important;
  border: 0 !important;
  border-bottom: 1px dashed #dfd3c7 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.grade-title h3 { display: flex; align-items: center; gap: 9px; font-size: 23px !important; }
.grade-title h3::before { content: "▰"; color: #f47b55; font-size: 18px; }
.grade-title span { padding: 5px 10px; border-radius: 999px; background: #f5f0ff; color: #604c86 !important; }
.school-group { margin: 14px 0 0 !important; padding: 15px !important; border: 1px solid #eee4da !important; border-radius: 16px !important; background: #fff !important; }
.school-title { display: flex; align-items: center; gap: 8px; margin: 0 0 12px !important; color: #263a52 !important; font-size: 14px !important; font-weight: 750; }
.school-title::before { content: "▸"; color: #f47b55; }
.student-list { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important; gap: 10px !important; border: 0 !important; }
.student-row {
  width: 100% !important;
  min-height: 116px !important;
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) auto !important;
  grid-template-rows: auto auto auto !important;
  align-content: center !important;
  column-gap: 8px !important;
  row-gap: 4px !important;
  padding: 14px !important;
  border: 1px solid #eadfd4 !important;
  border-radius: 14px !important;
  background: #fffaf3 !important;
  box-shadow: none !important;
}
.student-row::before { content: "▰"; grid-column: 1; grid-row: 1 / span 3; color: #f47b55; font-size: 18px; align-self: start; }
.student-row:hover, .student-row:focus-visible { border-color: #f47b55 !important; background: #fff5e8 !important; outline: 3px solid rgba(244,123,85,.22); outline-offset: 2px; }
.student-name { grid-column: 2; grid-row: 1; font-size: 16px !important; line-height: 1.25; }
.student-major { grid-column: 2; grid-row: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-meta { grid-column: 2; grid-row: 3; }
.student-files { grid-column: 3; grid-row: 1 / span 3; align-self: center; color: #604c86 !important; text-align: right; font-size: 12px !important; }
.student-arrow { display: none !important; }
@media (max-width: 620px) {
  .grade-group { padding: 25px 13px 13px !important; }
  .school-group { padding: 12px !important; }
  .student-list { grid-template-columns: 1fr !important; }
  .student-row { padding: 14px !important; }
}

/* Desktop: each grade folder holds two school folders side by side. */
@media (min-width: 760px) {
  .grade-group {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    column-gap: 16px !important;
    align-items: start !important;
  }
  .grade-title { grid-column: 1 / -1; }
  .school-group { min-width: 0; }
}

.workspace-nav{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 30px}.workspace-nav a{padding:9px 13px;border:1px solid var(--rule);border-radius:999px;color:var(--wordmark);font-size:14px;font-weight:700;text-decoration:none;background:#fff}.workspace-nav a[aria-current="page"]{background:var(--navy);border-color:var(--navy);color:#fff}.workbench-panel{max-width:820px;padding:32px;border:1px solid #e6d9cb;border-radius:24px;background:#fffdf9}.workbench-panel h2{margin:8px 0 12px;color:var(--navy);font-size:clamp(28px,4vw,45px)}.workbench-panel>p{max-width:630px;font-size:17px;line-height:1.7}.workbench-note{display:grid;gap:5px;margin:24px 0;padding:18px;border-radius:16px;background:#f4f0ff;color:#604c86}.workbench-note span{font-size:14px;line-height:1.6}
.task-composer{display:grid;grid-template-columns:1fr 180px;gap:14px;margin:26px 0 10px;padding:20px;border:1px solid var(--rule);border-radius:19px;background:#fffaf3}.task-composer div{display:grid;gap:7px}.task-composer label{font-size:13px;font-weight:700}.task-composer input[type="text"],.task-composer input:not([type]) ,.task-composer input[type="date"]{width:100%;min-height:46px;padding:10px 12px;border:1px solid #d7cabc;border-radius:11px;background:#fff;color:var(--navy);font:inherit}.task-composer .task-public{display:flex;align-items:center;gap:8px;font-weight:500;grid-column:1/-1}.task-composer button{min-height:44px;padding:0 18px;border:0;border-radius:12px;background:var(--coral);color:#fff;font-weight:700;justify-self:start}.task-status{min-height:22px;color:#7d5470;font-size:13px}.personal-tasks{margin:20px 0 28px}.personal-tasks h3{font-size:18px}.task-item{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid var(--rule)}.task-check,.task-remove{border:0;background:transparent;cursor:pointer}.task-check{font-size:25px;color:var(--coral)}.task-remove{color:#8c6577}.task-item div{display:grid;gap:3px}.task-item small{color:#718096}.task-item.is-done strong{text-decoration:line-through;color:#8992a0}.task-empty{color:#718096;font-size:14px}@media(max-width:620px){.task-composer{grid-template-columns:1fr}.task-composer .task-public{grid-column:auto}}
.mentor-summary{margin-top:22px;padding:20px;border-radius:18px;background:#fff6f0}.mentor-name{display:block;color:var(--navy);font-size:22px}.mentor-meta{color:#7d5470;font-size:13px;line-height:1.6}.mentor-intro{white-space:pre-line;line-height:1.75}.mentor-unmatched{padding:14px;border-radius:12px;background:#fff1b8;color:#6c4b00}.mentor-documents{display:flex;flex-wrap:wrap;gap:9px;margin-top:16px}.mentor-documents .download-button{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mentor-public-link{display:inline-flex;margin:14px 0;color:var(--navy);font-size:14px;font-weight:750;text-underline-offset:4px}
.document-columns{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;align-items:start;margin-top:20px;max-width:100%;overflow:hidden}.document-column{min-width:0;max-width:100%;margin-top:0!important;padding:16px;border:1px solid var(--rule);border-radius:18px;background:#fff;overflow:hidden}.document-column[data-tone="plan"]{background:#f4f1ff}.document-column[data-tone="feedback"]{background:#f1faf7}.document-column[data-tone="application"]{background:#fff8f1}.document-column h3{margin:0 0 12px!important;color:var(--navy);font-size:16px!important}.document-column .document-list{display:grid;gap:9px;min-width:0;border-top:0}.document-column .document-row{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px;min-width:0;max-width:100%;padding:11px;border:1px solid rgba(0,48,87,.12);border-radius:12px;background:#fff;overflow:hidden}.document-column .document-name,.document-column .document-path{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word}.document-column .document-path{display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:2}.document-column .document-meta{min-width:0;font-size:11px}.document-column .download-button{grid-column:auto!important;grid-row:auto!important;width:100%;max-width:100%;min-width:0;min-height:38px}.document-column-empty{margin:0;padding:24px 8px;text-align:center;color:var(--muted);font-size:13px}@media(max-width:1280px){.document-columns{grid-template-columns:1fr}}@media(min-width:1281px) and (max-width:1500px){.document-columns{grid-template-columns:repeat(2,minmax(0,1fr))}.document-column:last-child{grid-column:1/-1}}
.workbench-panel{max-width:none}.work-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:24px}.work-card{display:flex;flex-direction:column;gap:7px;min-height:150px;padding:18px;border:1px solid #e8ddd1;border-radius:18px;background:#fff;text-align:left;color:var(--ink);cursor:pointer;text-decoration:none}.work-card:hover,.work-card:focus-visible{border-color:var(--coral);outline:3px solid rgba(244,123,85,.18)}.work-card strong{font-size:17px}.work-card span,.work-card small{color:var(--muted);font-size:12px}.work-card em{align-self:flex-start;padding:4px 8px;border-radius:999px;background:var(--lav);color:#604c86;font-size:11px;font-style:normal;font-weight:700}.work-card p{margin:2px 0 0;display:-webkit-box;overflow:hidden;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-height:1.55;font-size:13px}@media(max-width:900px){.work-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:620px){.work-grid{grid-template-columns:1fr}.workbench-panel{padding:22px 16px}}

/* v8: student master-detail workspace. These rules must stay in this external
   stylesheet because the portal CSP intentionally blocks inline styles. */
.workspace {
  width: min(calc(100% - 40px), 1560px) !important;
  padding-top: 34px !important;
}
.workspace-heading { padding-bottom: 22px !important; }
.workspace-heading h2 { font-size: clamp(34px, 4vw, 52px) !important; }
.archive-summary { display: none !important; }
.student-browser:not([hidden]) {
  width: 100%;
  display: grid !important;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr) !important;
  grid-template-rows: auto;
  gap: 22px;
  align-items: start;
}
.student-browser > .directory {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  padding: 12px !important;
  border: 1px solid #e8ddd1 !important;
  border-radius: 22px !important;
  background: #fff !important;
}
.directory-heading {
  display: flex !important;
  align-items: end !important;
  margin-bottom: 12px !important;
}
.directory-heading h2 { font-size: 27px !important; }
.directory-heading .section-index { margin-bottom: 5px; }
.filters {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 9px !important;
  padding: 14px !important;
  border-radius: 18px !important;
  background: #fff !important;
}
.filters::before {
  content: "快速查找学生";
  display: block;
  grid-column: 1 / -1;
  color: #7d5470;
  font-size: 13px;
  font-weight: 700;
}
.filters > div { min-width: 0; }
.filters > div:first-of-type { grid-column: 1 / -1; }
.filters input,
.filters select { min-width: 0; max-width: 100%; }
.filter-reset { grid-column: 1 / -1; }
.student-groups {
  display: grid !important;
  gap: 7px;
  max-height: 62vh;
  overflow: auto;
  margin-top: 12px !important;
  padding-right: 6px;
  scrollbar-color: #d8c7b8 transparent;
}
.directory::after { display: none !important; }
.student-row {
  min-height: 58px;
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-content: start;
  gap: 3px !important;
  padding: 8px 9px !important;
  border: 1px solid #e8ddd1 !important;
  border-radius: 13px !important;
  background: #fffaf3 !important;
  text-align: right;
}
.student-row[aria-current="true"] {
  border-color: #f47b55 !important;
  box-shadow: 0 0 0 2px #ffdcd0;
  background: #fff !important;
}
.student-name { grid-column: 2; font-size: 14px !important; font-weight: 700; }
.student-major,
.student-meta,
.student-files { grid-column: 2; color: #657085; font-size: 10.5px; text-align: right !important; }
.student-files {
  grid-column: 2 !important;
  grid-row: auto !important;
  text-align: right !important;
}
.student-arrow {
  display: block !important;
  grid-column: 1 !important;
  grid-row: 1 / span 4 !important;
  align-self: center;
  color: #f47b55;
}
.student-detail {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 610px;
  max-height: 82vh;
  position: sticky;
  top: 92px;
  overflow-x: hidden;
  overflow-y: auto;
  container-type: inline-size;
  padding: 28px;
  border: 1px solid #e8ddd1;
  border-radius: 24px;
  background: #fff;
}
@container (max-width: 920px) {
  .student-detail .document-columns { grid-template-columns: 1fr; }
  .student-detail .document-column:last-child { grid-column: auto; }
}
.student-detail-placeholder {
  min-height: 540px;
  display: grid;
  place-content: center;
  color: #718096;
  text-align: center;
}
.student-detail-placeholder strong {
  display: block;
  margin-bottom: 8px;
  color: #263a52;
  font-size: 22px;
}
.student-detail[hidden],
.student-detail-placeholder[hidden],
[data-student-content][hidden] { display: none !important; }
.student-detail .dialog-header { position: static; }
.student-detail .dialog-body { padding: 0; }
.student-detail.has-student { border-color: #e1d2c3; }
.student-detail.has-student .dialog-header {
  padding-bottom: 18px;
  border-bottom: 1px solid #e8ddd1;
}
.student-detail.has-student .eyebrow { margin-bottom: 8px; }
.student-detail.has-student h2 {
  margin-bottom: 8px;
  color: #003057;
  font-size: clamp(32px, 4vw, 48px);
}
@media (max-width: 760px) {
  .student-browser:not([hidden]) { grid-template-columns: 1fr !important; }
  .student-browser > .directory,
  .student-detail { grid-column: 1; grid-row: auto; }
  .student-groups { max-height: 46vh; }
  .student-detail { position: static; max-height: none; }
  .filters { grid-template-columns: 1fr !important; }
  .filters > div:first-of-type,
  .filter-reset { grid-column: auto; }
}

/* v9: the tabs belong to the selected student card and must scroll away with
   the card content instead of floating over the information below. */
.student-detail .detail-tabs {
  position: static !important;
  top: auto !important;
  z-index: auto !important;
}
.record-item-wide { grid-column: 1 / -1; }
.record-item-wide dd { white-space: pre-line; line-height: 1.7; }
.record-item-notice {
  border-color: #f1c9b8;
  background: #fff5ee;
}
.record-item-notice dt { color: #a43d20; }
.record-subgroup { margin-top: 18px; }
.record-subgroup h4 {
  margin: 0 0 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid #eadfd3;
  color: #7d5470;
  font-size: 14px;
}
.record-item-focus { border-color: #d9d0f4; background: #f8f6ff; }
.record-item-risk { border-color: #efb6a3; background: #fff0e9; }
.record-focus-badge {
  display: inline-flex;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e9e5ff;
  color: #604c86;
  font-size: 10px;
  font-weight: 750;
  vertical-align: middle;
}
.record-item-risk .record-focus-badge,
.record-item-notice .record-focus-badge { background: #ffd9cc; color: #8c321b; }
.mobile-detail-back { display: none; }

/* Mobile option C: selecting a student opens a focused full-screen detail
   view, with an explicit route back to the searchable student list. */
@media (max-width: 760px) {
  body.student-detail-open { overflow: hidden; }
  .student-browser:not(.is-mobile-detail) .student-detail { display: none; }
  .student-browser.is-mobile-detail > .directory { display: none !important; }
  .student-browser.is-mobile-detail .student-detail {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    max-height: none;
    overflow: auto;
    padding: 18px 16px 42px;
    border: 0;
    border-radius: 0;
    background: #fffaf3;
  }
  .mobile-detail-back {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    margin: 0 0 18px;
    padding: 0 14px;
    border: 1px solid #e1d2c3;
    border-radius: 999px;
    background: #fff;
    color: var(--navy);
    font: inherit;
    font-size: 14px;
    font-weight: 750;
  }
  .record-grid { grid-template-columns: 1fr; }
  .record-item-wide { grid-column: auto; }
}

/* v9: mentor profiles live inside the same unlocked workbench shell. */
.internal-mentor-browser {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  gap: 22px;
  margin-top: 26px;
  align-items: start;
}
.internal-mentor-directory,
.internal-mentor-detail {
  min-width: 0;
  border: 1px solid #e8ddd1;
  border-radius: 22px;
  background: #fff;
}
.internal-mentor-directory { padding: 15px; }
.internal-mentor-filters { display: grid; gap: 10px; }
.internal-mentor-filters label { display: grid; gap: 6px; color: #263a52; font-size: 12px; font-weight: 750; }
.internal-mentor-filters input,
.internal-mentor-filters select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #d7cabc;
  border-radius: 11px;
  background: #fffaf3;
  color: var(--navy);
  font: inherit;
}
.internal-mentor-count { margin: 12px 2px 8px; color: var(--muted); font-size: 12px; }
.internal-mentor-list { display: grid; gap: 7px; max-height: 62vh; overflow: auto; padding-right: 4px; }
.internal-mentor-list button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #e8ddd1;
  border-radius: 13px;
  background: #fffaf3;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
}
.internal-mentor-list button[aria-current="true"] { border-color: var(--coral); box-shadow: 0 0 0 2px #ffdcd0; background: #fff; }
.internal-mentor-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.internal-mentor-list span { grid-column: 1; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.internal-mentor-list em { grid-column: 2; grid-row: 1 / span 2; align-self: center; padding: 3px 7px; border-radius: 999px; background: #f4f0ff; color: #604c86; font-size: 10px; font-style: normal; }
.internal-mentor-detail { min-height: 520px; padding: 30px; }
.internal-mentor-placeholder { display: grid; min-height: 450px; place-content: center; gap: 7px; color: var(--muted); text-align: center; }
.internal-mentor-placeholder strong { color: var(--navy); font-size: 22px; }
.internal-mentor-detail h3 { margin: 7px 0 24px; color: var(--navy); font-size: clamp(32px, 4vw, 50px); }
.internal-mentor-detail h4 { margin: 22px 0 7px; color: #7d5470; font-size: 14px; }
.mentor-detail-copy { margin: 0; white-space: pre-line; line-height: 1.8; }
.internal-resume-badge { display: inline-flex; margin-top: 22px; padding: 7px 11px; border-radius: 999px; background: #f4f0ff; color: #604c86; font-size: 12px; font-weight: 750; }
@media (max-width: 760px) {
  .internal-mentor-browser { grid-template-columns: 1fr; }
  .internal-mentor-list { max-height: 42vh; }
  .internal-mentor-detail { min-height: 380px; padding: 22px 18px; }
}

/* v10: option A follow-up states, option 3 missing-field disclosure, and
   encrypted previews for academic images embedded in the monthly workbook. */
.detail-panel.hide-empty .record-item.is-empty { display: none; }
.missing-toggle { display:inline-flex;min-height:40px;align-items:center;margin:0 0 18px;padding:0 13px;border:1px solid #d7cabc;border-radius:999px;background:#fffaf3;color:var(--navy);font:inherit;font-size:13px;font-weight:750;cursor:pointer }
.record-asset-actions { display:flex;flex-wrap:wrap;gap:7px;margin-top:12px }
.record-asset-actions button { min-height:36px;padding:0 11px;border:1px solid #d7cabc;border-radius:999px;background:#fff;color:var(--navy);font:inherit;font-size:12px;font-weight:750;cursor:pointer }
.record-asset-preview:empty { display:none }
.record-asset-preview { display:grid;gap:7px;margin-top:13px }
.record-asset-preview img { display:block;width:min(100%,760px);max-height:620px;object-fit:contain;border:1px solid var(--rule);border-radius:12px;background:#fff }
.record-asset-preview span { color:var(--muted);font-size:11px }
.followup-toolbar { display:flex;align-items:end;justify-content:space-between;gap:14px;margin:22px 0 12px }
.followup-toolbar label { display:grid;gap:6px;color:var(--navy);font-size:12px;font-weight:750 }
.followup-toolbar select { min-height:42px;padding:7px 38px 7px 11px;border:1px solid #d7cabc;border-radius:11px;background:#fff;color:var(--navy);font:inherit }
.followup-toolbar span { color:var(--muted);font-size:12px }
.followup-list { display:grid;gap:12px }
.followup-card { padding:18px;border:1px solid #e8ddd1;border-radius:18px;background:#fff }
.followup-card[data-status="paused"] { background:#fff8e8 }
.followup-card[data-status="done"] { background:#f1faf7 }
.followup-heading { display:flex;align-items:center;justify-content:space-between;gap:12px }
.followup-heading a { color:var(--navy);font-size:18px;font-weight:800 }
.followup-heading span { padding:4px 9px;border-radius:999px;background:#f4f0ff;color:#604c86;font-size:11px;font-weight:750 }
.followup-card>p { white-space:pre-line;line-height:1.65 }
.followup-controls { display:grid;grid-template-columns:160px 190px auto;gap:10px;align-items:end;margin-top:14px }
.followup-controls label { display:grid;gap:5px;color:var(--muted);font-size:11px;font-weight:700 }
.followup-controls select,.followup-controls input { width:100%;min-height:42px;padding:7px 10px;border:1px solid #d7cabc;border-radius:10px;background:#fff;color:var(--navy);font:inherit }
.followup-controls button { min-height:42px;padding:0 14px;border:0;border-radius:11px;background:var(--coral);color:#fff;font-weight:750;cursor:pointer }
.followup-card details { margin-top:14px;padding-top:12px;border-top:1px solid var(--rule);color:var(--muted);font-size:12px }
.followup-card summary { cursor:pointer;color:#7d5470;font-weight:750 }
.followup-card ul { display:grid;gap:5px;margin:10px 0 0;padding-left:20px }
@media(max-width:680px){.followup-toolbar{align-items:stretch;flex-direction:column}.followup-controls{grid-template-columns:1fr}.followup-controls button{justify-self:start}}

/* v15: W3 personal operations dashboard. */
.dashboard-heading{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:20px}.dashboard-heading>div>p:last-child{max-width:760px;line-height:1.65}.dashboard-sync{max-width:280px!important;margin:0!important;padding:10px 13px;border-radius:12px;background:#f4f0ff;color:#604c86;font-size:12px!important;line-height:1.5!important}.dashboard-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:20px}.dashboard-metrics article{display:grid;gap:5px;min-height:92px;padding:17px 19px;border:1px solid #e8ddd1;border-radius:17px;background:#fff}.dashboard-metrics strong{color:var(--navy);font-size:31px;font-variant-numeric:tabular-nums}.dashboard-metrics span{color:var(--muted);font-size:12px}.dashboard-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin-top:18px}.dashboard-section{min-width:0;padding:22px;border:1px solid #e8ddd1;border-radius:22px;background:#fff}.dashboard-primary{background:#fffdf9}.dashboard-section-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:15px}.dashboard-section-heading>div{display:flex;align-items:center;gap:9px}.dashboard-section-heading>div>span{display:grid;width:27px;height:27px;place-items:center;border-radius:9px;background:#e9e5ff;color:#604c86;font-size:10px;font-weight:800}.dashboard-section h3{margin:0;color:var(--navy);font-size:20px}.dashboard-section h4{margin:0;color:var(--navy);font-size:15px}.dashboard-section-heading small,.dashboard-section-heading a,.dashboard-subheading span{color:var(--muted);font-size:11px}.dashboard-section-heading a{font-weight:700}.dashboard-task-form{grid-template-columns:minmax(260px,2fr) repeat(4,minmax(120px,1fr));padding:16px}.dashboard-task-form .task-title-field{grid-column:auto}.dashboard-task-form select,.quick-record select,.quick-record input{width:100%;min-width:0;min-height:44px;padding:8px 10px;border:1px solid #d7cabc;border-radius:10px;background:#fff;color:var(--navy);font:inherit}.dashboard-task-form button{align-self:end}.dashboard-subheading{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.attention-list{display:grid;gap:8px}.attention-list>a{display:grid;gap:3px;padding:11px 12px;border:1px solid #eadfd3;border-radius:13px;background:#fffaf3;color:var(--navy);text-decoration:none}.attention-list>a:hover,.attention-list>a:focus-visible{border-color:var(--coral);outline:3px solid rgba(244,123,85,.18)}.attention-list strong{font-size:14px}.attention-list span{color:var(--muted);font-size:11px;line-height:1.5}.dashboard-empty,.dashboard-more{margin:8px 0;color:var(--muted);font-size:12px;line-height:1.6}.quick-record{margin:0 0 14px;border:1px solid #e8ddd1;border-radius:14px;background:#fffaf3}.quick-record>summary{padding:11px 13px;cursor:pointer;color:#7d5470;font-size:12px;font-weight:750}.quick-record form{display:grid;grid-template-columns:minmax(180px,1.5fr) minmax(150px,1fr) repeat(2,minmax(110px,.7fr)) auto;gap:10px;align-items:end;padding:0 13px 13px}.quick-record label{display:grid;gap:5px;color:var(--muted);font-size:10px;font-weight:700}.quick-record button{min-height:44px;padding:0 14px;border:0;border-radius:10px;background:var(--coral);color:#fff;font-weight:750}.quick-record [role="status"]{grid-column:1/-1;min-height:16px;color:#7d5470;font-size:11px}.work-record-list{display:grid;gap:8px}.work-record{display:grid;grid-template-columns:minmax(0,1fr) 112px auto;gap:9px;align-items:center;padding:11px 0;border-bottom:1px solid var(--rule)}.work-record>div{display:grid;gap:3px;min-width:0}.work-record strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--navy);font-size:13px}.work-record span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:10px}.work-record select{min-width:0;min-height:38px;padding:6px;border:1px solid #d7cabc;border-radius:9px;background:#fff;color:var(--navy);font-size:11px}.work-record>button{border:0;background:transparent;color:#8c6577;font-size:11px}.legacy-followups{margin-top:18px;padding-top:12px;border-top:1px solid var(--rule)}.legacy-followups>summary{cursor:pointer;color:#7d5470;font-size:12px;font-weight:750}.activity-grid{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(260px,.6fr);gap:24px}.activity-list{display:grid;gap:8px;margin-top:12px}.activity-list p{display:grid;gap:2px;margin:0;padding:9px 0;border-bottom:1px solid var(--rule)}.activity-list strong{color:var(--navy);font-size:12px}.activity-list span{color:var(--muted);font-size:10px}.data-health{padding:16px;border-radius:16px;background:#f4f0ff}.data-health dl{display:grid;gap:9px;margin:12px 0 0}.data-health dl>div{display:flex;justify-content:space-between;gap:14px}.data-health dt{color:#604c86;font-size:11px}.data-health dd{margin:0;color:var(--navy);font-size:11px;font-weight:750;text-align:right}.task-item.is-priority{border-left:3px solid var(--coral);padding-left:10px}
@media(max-width:1180px){.dashboard-task-form{grid-template-columns:repeat(2,minmax(0,1fr))}.dashboard-task-form .task-title-field{grid-column:1/-1}.quick-record form{grid-template-columns:repeat(2,minmax(0,1fr))}.quick-record button{justify-self:start}.dashboard-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:820px){.dashboard-heading{align-items:start;flex-direction:column}.dashboard-sync{max-width:none!important}.dashboard-layout,.activity-grid{grid-template-columns:1fr}.dashboard-section{padding:18px}.work-record{grid-template-columns:minmax(0,1fr) 110px}.work-record>button{grid-column:2}}
@media(max-width:560px){.dashboard-metrics,.dashboard-task-form,.quick-record form{grid-template-columns:1fr}.dashboard-task-form .task-title-field{grid-column:auto}.dashboard-section-heading{align-items:flex-start}.work-record{grid-template-columns:1fr}.work-record>button{grid-column:auto;justify-self:start}}
.dashboard-layout>.dashboard-section:only-child{grid-column:1/-1}.dashboard-collapsible{padding:14px 18px}.dashboard-collapsible .dashboard-section-heading{margin:0}.dashboard-collapse-toggle{min-height:38px;padding:0 12px;border:1px solid #d7cabc;border-radius:999px;background:#fff;color:var(--navy);font:inherit;font-size:11px;font-weight:750;cursor:pointer}.dashboard-collapsible .attention-list:not([hidden]){margin-top:14px}

/* v18: align the complete internal header with the 1560px work area. */
.portal-header { width: min(calc(100% - 40px), 1560px) !important; }
@media (max-width: 620px) { .portal-header { width: min(calc(100% - 40px), 1560px) !important; } }
