:root {
  color-scheme: light;
  --paper: #fff;
  --canvas: #f4f7fb;
  --ink: #17233b;
  --muted: #53647f;
  --quiet: #65748d;
  --stroke: #dce5f0;
  --blue: #2456d6;
  --blue-dark: #173ba4;
  --blue-wash: #edf3ff;
  --green: #16613f;
  --green-wash: #e9f7f0;
  --amber: #775415;
  --amber-wash: #fff5db;
  --red: #a52b3d;
  --red-wash: #fcecf0;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--canvas); line-height: 1.55; }
[hidden] { display: none !important; }
a { color: var(--blue-dark); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
:focus-visible { outline: 3px solid #6286ee; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 258px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--paper); border-right: 1px solid var(--stroke); padding: 24px 16px 16px; }
.brand { display: flex; gap: 12px; align-items: center; padding: 2px 9px 26px; }
.brand strong, .account strong { display: block; font-size: 15px; }
.brand small, .account small { display: block; color: var(--quiet); font-size: 12px; }
.mark { display: inline-grid; place-content: center; flex: 0 0 40px; height: 40px; width: 40px; border-radius: 11px; background: #163872; color: white; font-size: 14px; font-weight: 750; letter-spacing: .04em; }
.button { display: inline-flex; gap: 8px; align-items: center; justify-content: center; border: 1px solid var(--stroke); min-height: 40px; padding: 8px 14px; border-radius: 8px; color: var(--ink); background: var(--paper); font-weight: 650; text-decoration: none; white-space: nowrap; }
.button:hover:not(:disabled) { border-color: #a8bad7; background: #f8faff; }
.button.primary { background: var(--blue); border-color: var(--blue); color: white; }
.button.primary:hover:not(:disabled) { background: var(--blue-dark); border-color: var(--blue-dark); }
.button.small { min-height: 34px; padding: 5px 10px; font-size: 12px; }
.new-project { margin-bottom: 24px; min-height: 44px; }
.new-project span { font-size: 21px; line-height: 1; }
.side-label { padding: 0 9px 8px; color: var(--quiet); font-size: 12px; font-weight: 700; }
.projects { display: grid; gap: 5px; align-content: start; overflow-y: auto; }
.project-nav { min-width: 0; text-align: left; display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 8px; border: 1px solid transparent; background: none; color: var(--ink); padding: 10px 8px; border-radius: 8px; line-height: 1.4; }
.project-nav span:last-child { min-width: 0; font-size: 13px; font-weight: 650; word-break: break-word; }
.project-nav small { display: block; color: var(--quiet); font-weight: 400; font-size: 11px; margin-top: 5px; }
.project-nav:hover { background: #f4f7fe; }
.project-nav[aria-current="page"] { background: var(--blue-wash); border-color: #dce7ff; color: var(--blue-dark); }
.file-icon { font-family: system-ui, sans-serif; font-weight: 700; color: #4266b5; text-align: center; }
.account { margin-top: auto; padding: 15px 2px 3px; border-top: 1px solid var(--stroke); display: flex; gap: 9px; align-items: center; min-width: 0; }
.account > div:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.account strong { font-size: 13px; }
.avatar { flex: 0 0 34px; display: grid; place-items: center; height: 34px; background: #eaf0fa; border-radius: 50%; color: #2d477e; font-weight: 700; }
.text-button { background: transparent; color: var(--blue-dark); border: 0; padding: 6px; }
.text-button:hover { text-decoration: underline; }
.topbar { min-height: 61px; border-bottom: 1px solid var(--stroke); background: var(--paper); padding: 0 30px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.breadcrumb { font-size: 13px; color: var(--quiet); overflow-wrap: anywhere; }
.breadcrumb #crumb { color: var(--ink); }
.mode { flex-shrink: 0; border: 1px solid #d6e2fb; border-radius: 6px; color: var(--blue-dark); background: var(--blue-wash); padding: 3px 8px; font-size: 12px; font-weight: 650; }
.main-wrap { max-width: 1240px; padding: 25px 30px 46px; margin: auto; }
.announcement { color: var(--blue-dark); background: var(--blue-wash); border: 1px solid #dbe6fe; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.announcement.error { color: var(--red); border-color: #efd4da; background: var(--red-wash); }
.hero { border-radius: 14px; padding: 26px 28px 24px; border: 1px solid #d9e5f8; background: linear-gradient(112deg, #fff 22%, #edf4ff 100%); }
.hero-main, .panel-head, .toolbar, .row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.hero-main { align-items: flex-start; }
.hero h1 { font-size: clamp(23px, 3.1vw, 32px); line-height: 1.36; letter-spacing: -.025em; overflow-wrap: anywhere; }
.metadata { display: flex; flex-wrap: wrap; column-gap: 17px; row-gap: 2px; color: var(--muted); margin-top: 9px; font-size: 13px; }
.pill { display: inline-flex; align-items: center; gap: 7px; min-width: max-content; color: #354e79; background: #e9eff8; border-radius: 20px; padding: 4px 10px; font-size: 12px; font-weight: 700; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 100%; background: currentColor; }
.pill.good { color: var(--green); background: var(--green-wash); }
.pill.warn { color: var(--amber); background: var(--amber-wash); }
.pill.fail { color: var(--red); background: var(--red-wash); }
.process { margin-top: 23px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step { padding: 11px 12px; display: flex; gap: 10px; align-items: center; border: 1px solid #dce6f5; border-radius: 8px; background: #ffffffa9; }
.step strong { display: block; font-size: 13px; }
.step small { display: block; color: var(--quiet); font-size: 11px; overflow-wrap: anywhere; }
.step-no { width: 28px; height: 28px; border-radius: 7px; background: #ebf0f8; color: #4e6488; display: grid; place-items: center; flex-shrink: 0; font-variant-numeric: tabular-nums; font-weight: 700; }
.step.active .step-no { background: var(--blue); color: white; }
.step.complete .step-no { background: #def3e9; color: var(--green); }
.tabs { display: flex; gap: 23px; margin: 16px 0; border-bottom: 1px solid var(--stroke); overflow: auto; }
.tab { color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; min-width: max-content; padding: 10px 3px; font-weight: 650; }
.tab[aria-current="page"] { color: var(--blue-dark); border-bottom-color: var(--blue); }
.tab:hover { color: var(--blue-dark); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(270px, .47fr); gap: 16px; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--stroke); border-radius: 12px; padding: 19px; min-width: 0; }
.panel + .panel { margin-top: 15px; }
.panel h2 { font-size: 17px; line-height: 1.35; }
.panel h3 { font-size: 14px; line-height: 1.45; }
.sub { color: var(--muted); margin: 5px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.counter { color: var(--quiet); font-size: 12px; white-space: nowrap; }
.file-form { margin-top: 14px; }
.form-grid { display: grid; grid-template-columns: minmax(120px, .5fr) minmax(0, 1fr); gap: 11px; margin-bottom: 10px; align-items: stretch; }
label { color: var(--muted); display: grid; font-size: 13px; gap: 5px; align-content: start; }
input, select, textarea { width: 100%; min-width: 0; background: white; border: 1px solid #cbd8ea; border-radius: 7px; min-height: 39px; padding: 8px 9px; color: var(--ink); }
input[type="file"] { padding: 5px; }
input::file-selector-button { background: var(--blue-wash); border: 0; border-radius: 5px; color: var(--blue-dark); padding: 4px 7px; margin-right: 6px; cursor: pointer; }
textarea { min-height: 102px; resize: vertical; }
.toolbar { margin-bottom: 11px; }
.file-list, .versions, .history, .preflight { margin: 0; padding: 0; list-style: none; }
.file-list li, .versions > li, .history > li { display: grid; border-top: 1px solid var(--stroke); padding: 11px 0; }
.file-list li { grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: center; }
.file-type { display: grid; place-content: center; width: 38px; height: 34px; border-radius: 7px; background: var(--blue-wash); color: var(--blue-dark); font-size: 10px; font-weight: 750; }
.file-name { text-decoration: none; font-weight: 650; overflow-wrap: anywhere; }
.file-name:hover { text-decoration: underline; }
.file-list small { display: block; color: var(--quiet); font-size: 11px; font-variant-numeric: tabular-nums; }
.preflight { margin: 12px 0; }
.preflight li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: start; gap: 7px; font-size: 13px; padding: 8px 0; border-bottom: 1px solid #eef2f8; }
.check-icon { color: var(--green); font-weight: 750; }
.waiting-icon { color: var(--amber); font-weight: 750; }
.preflight small { color: var(--quiet); }
.primary-wide { width: 100%; }
.note { padding: 10px 12px; margin: 11px 0; border-radius: 7px; background: var(--amber-wash); color: var(--amber); font-size: 13px; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.versions .actions { margin-top: 10px; }
.versions, .history { margin-top: 13px; }
.versions p, .history p { white-space: pre-wrap; }
.versions time, .history time { color: var(--quiet); font-size: 11px; font-variant-numeric: tabular-nums; }
.feedback { display: grid; gap: 12px; margin-top: 14px; }
details { margin-top: 11px; border-top: 1px solid var(--stroke); padding-top: 10px; }
summary { cursor: pointer; color: var(--blue-dark); font-weight: 650; }
.missing { padding-left: 20px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.missing li { margin: 5px 0; }
.preview { max-height: 34vh; overflow: auto; padding: 7px 0 3px; }
.preview p { margin: 6px 0 12px; overflow-wrap: anywhere; white-space: pre-wrap; }
.empty { padding: 25px 0; color: var(--muted); text-align: center; }
.empty .button { margin-top: 12px; }
.login-frame { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { max-width: 390px; width: 100%; display: grid; gap: 14px; padding: 26px; background: white; border: 1px solid var(--stroke); border-radius: 14px; }
.login-card h1 { font-size: 22px; }
.error { color: var(--red); }
dialog { border: 1px solid var(--stroke); border-radius: 14px; padding: 24px; width: min(94vw, 460px); color: var(--ink); }
dialog::backdrop { background: #152a4a66; }
dialog form { display: grid; gap: 14px; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.dialog-heading h2 { font-size: 20px; }
.dialog-heading button { font-size: 23px; line-height: 1; }
.dialog-actions { justify-content: flex-end; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.help-icon { border: 1px solid currentColor; border-radius: 50%; display: grid; place-items: center; width: 16px; height: 16px; line-height: 1; }
.help-dialog { width: min(94vw, 820px); max-height: 90vh; padding: 0; }
.help-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; position: sticky; top: 0; z-index: 1; background: var(--paper); border-bottom: 1px solid var(--stroke); }
.help-header h2 { font-size: 19px; margin: 0; }
.help-header button { font-size: 23px; line-height: 1; }
.help-body { padding: 18px 22px 24px; }
.help-answer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; background: var(--canvas); border: 1px solid var(--stroke); border-radius: 10px; }
.help-answer h3, .help-steps h3 { font-size: 15px; margin: 0 0 4px; }
.help-answer p, .help-steps p { font-size: 14px; line-height: 1.65; margin: 4px 0 6px; overflow-wrap: anywhere; }
.help-steps { padding-inline-start: 24px; margin: 16px 0 0; }
.help-steps li { padding: 0 0 12px 4px; }
.help-steps li + li { border-top: 1px solid var(--stroke); padding-top: 12px; }
.help-steps li::marker { color: var(--blue-dark); font-weight: 700; }
.help-steps figure { margin: 12px 0 0; }
.help-steps figure a { display: block; border: 1px solid var(--stroke); overflow: hidden; border-radius: 8px; background: var(--canvas); }
.help-steps img { display: block; width: 100%; height: auto; }
.help-steps figcaption { color: var(--quiet); font-size: 12px; margin: 4px 0 0; }
.library-nav { margin: 0 0 16px; }
.library-page { margin-top: 16px; }
.library-options { max-height: 55vh; overflow: auto; }
.file-choice { grid-template-columns: auto minmax(0, 1fr); align-items: start; padding: 9px 0; border-bottom: 1px solid var(--stroke); }
.file-choice input { width: 18px; height: 18px; min-height: 0; }
.file-choice small { display: block; color: var(--quiet); }
.file-choice span, .upload-progress output { overflow-wrap: anywhere; }
.upload-progress { display: grid; gap: 4px; margin-top: 10px; }
.upload-progress progress { width: 100%; }
@media (max-width: 1040px) {
  .shell { grid-template-columns: 217px minmax(0, 1fr); }
  .main-wrap { padding-left: 19px; padding-right: 19px; }
  .topbar { padding: 0 19px; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
  .shell { display: block; }
  .sidebar { height: auto; position: relative; display: grid; grid-template-columns: 1fr auto; gap: 5px 10px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--stroke); }
  .brand { padding: 0; }
  .new-project { margin: 0; }
  .library-nav { grid-column: 1 / -1; margin: 0; }
  .side-label, .projects { grid-column: 1 / -1; }
  .side-label { padding: 3px 0; }
  .projects { display: flex; overflow-x: auto; }
  .project-nav { flex: 0 0 min(220px, 80%); }
  .account { grid-column: 1 / -1; padding: 8px 0 0; }
  .topbar { min-height: 42px; }
  .help-header, .help-body { padding-inline: 13px; }
  .help-answer { align-items: flex-start; flex-direction: column; }
  .main-wrap { padding: 16px 13px 28px; }
  .hero { padding: 15px; }
  .hero-main { flex-wrap: wrap; }
  .process { margin-top: 13px; gap: 5px; }
  .step { gap: 4px; padding: 6px; align-items: flex-start; }
  .step-no { width: 20px; height: 20px; font-size: 11px; border-radius: 5px; }
  .step strong { font-size: 11px; }
  .step small { font-size: 10px; }
  .panel { padding: 13px; }
  .tab { padding-right: 0; padding-left: 0; }
  .tabs { gap: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .small-on-mobile { font-size: 11px; }
}
