:root {
  color-scheme: light;
  --bg: #f6f5f0;
  --paper: #fff;
  --ink: #152822;
  --muted: #54675f;
  --line: #dce3db;
  --accent: #12634f;
  --accent-hover: #0d503f;
  --tint: #edf5ef;
  --warn: #6f440f;
  --warn-bg: #fff1d8;
  --error: #8c312a;
  --error-bg: #fcefeb;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--bg); font: 15px/1.6 var(--sans); }
h1, h2, h3, p, ul { margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw, 2.65rem); letter-spacing: -.055em; line-height: 1.14; }
h2 { font-size: 1.15rem; line-height: 1.4; overflow-wrap: anywhere; }
h3 { font-size: 1rem; }
a { color: var(--accent); text-underline-offset: .17em; }
a:hover { color: var(--accent-hover); }
button, input, textarea, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 3px solid #21826a; outline-offset: 3px; }
.skip { position: fixed; z-index: 9; padding: 8px 16px; top: -80px; background: var(--paper); }
.skip:focus { top: 10px; left: 10px; }
input:not([type=checkbox], [type=file]), select, textarea {
  border: 1px solid #bfcfc5; border-radius: 7px; background: var(--paper);
  padding: .59rem .7rem; width: 100%; min-height: 42px;
}
textarea { resize: vertical; }
input[type=checkbox] { accent-color: var(--accent); width: 17px; height: 17px; flex: 0 0 auto; }
label { display: block; margin-bottom: .27rem; font-weight: 620; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; min-inline-size: 0; }
legend { font-weight: 650; padding: 0 6px; }
summary { cursor: pointer; color: var(--accent); }
.shell { display: grid; grid-template-columns: 218px minmax(0, 1fr); min-height: 100vh; }
.sidebar { height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; gap: 28px; padding: 27px 17px 20px; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 760; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; background: var(--accent); color: white; font-weight: 700; border-radius: 9px; }
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a { padding: 8px 12px; border-radius: 7px; text-decoration: none; color: var(--muted); font-weight: 620; }
.sidebar nav a:hover, .sidebar nav a[aria-current] { background: #e5eee5; color: var(--accent); }
.sidebar-foot { margin-top: auto; display: grid; gap: 12px; }
.workspace { width: min(100%, 1510px); margin-inline: auto; padding: 39px clamp(18px, 3.8vw, 60px) 60px; display: grid; align-content: start; gap: 18px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 7px; }
.page-head p { color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.button { border: 1px solid #bfcfc5; border-radius: 7px; background: white; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); text-decoration: none; min-height: 42px; padding: 7px 13px; font-weight: 630; text-align: center; }
.button:hover { background: var(--tint); }
.primary { background: var(--accent); border-color: var(--accent); color: white; }
.primary:hover { background: var(--accent-hover); color: white; }
.quiet { background: transparent; border: 0; color: var(--muted); padding: 5px 8px; min-height: 36px; }
.quiet:hover { text-decoration: underline; }
.panel { border: 1px solid var(--line); border-radius: 12px; background: var(--paper); padding: clamp(14px, 2.35vw, 25px); min-width: 0; }
.spotlight { display: flex; justify-content: space-between; align-items: center; gap: 18px; background: var(--tint); padding: clamp(19px, 3vw, 35px); }
.spotlight h2 { font-size: clamp(1.23rem, 2.6vw, 1.9rem); margin: 3px 0 7px; }
.spotlight p { max-width: 67ch; color: var(--muted); margin-bottom: 8px; }
.spotlight-actions { display: grid; flex-shrink: 0; gap: 12px; }
.spotlight-actions form { display: flex; flex-wrap: wrap; max-width: 260px; gap: 5px; }
.eyebrow, .muted, .hint { color: var(--muted); }
.eyebrow { font-size: .83rem; font-weight: 700; }
.hint { font-size: .87rem; margin-top: 4px; }
.two-grid, .library-grid, .editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.library-grid { grid-template-columns: minmax(220px, .74fr) minmax(0, 1.75fr); align-items: start; }
.editor-grid { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
.section-head, .draft-heading, .row-actions, .job-actions, .curator-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.row-actions, .job-actions { justify-content: flex-start; }
.section-head a { font-size: .88rem; }
.detail-head { align-items: start; margin-bottom: 11px; }
.detail-head > div { min-width: 0; }
.detail-head h2 { font-size: clamp(1.2rem, 3vw, 1.7rem); }
.compact-list, .document-list ul { padding: 0; list-style: none; margin-top: 14px; }
.compact-list li { display: flex; gap: 10px 16px; align-items: center; justify-content: space-between; padding: 11px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.compact-list li > * { min-width: 0; }
.badge { display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; border-radius: 999px; background: var(--tint); color: #2e584a; padding: 2px 8px; font-size: .8rem; font-weight: 650; }
.badge.warning { background: var(--warn-bg); color: var(--warn); }
.badge.success { background: #e4f2e4; color: #24553b; }
.form { display: grid; gap: 15px; }
.form .errorlist { color: var(--error); margin: 6px 0; }
.login { display: grid; min-height: 100vh; place-items: center; padding: 18px; }
.login-card { width: min(440px, 100%); display: grid; gap: 16px; padding: clamp(22px, 4.75vw, 40px); background: white; border: 1px solid var(--line); border-radius: 15px; }
.login-card form button { width: 100%; }
.import-form { max-width: 760px; }
.dropzone { display: grid; justify-items: center; gap: 6px; border: 1.5px dashed #86ac98; border-radius: 9px; background: var(--tint); padding: 18px 10px; cursor: pointer; }
.dropzone:hover, .dropzone.over { background: #dcece0; }
.dropzone span { color: var(--muted); font-size: .85rem; }
.dropzone input { inline-size: min(100%, 260px); margin-top: 5px; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; padding: 13px 15px; }
.search-field { flex: 1 1 240px; }
.document-list { padding: 15px; }
.document-list li a { display: grid; gap: 4px; padding: 8px 10px; border-radius: 7px; text-decoration: none; color: var(--ink); }
.document-list li a:hover, .document-list li a[aria-current] { background: var(--tint); }
.document-list strong { font-size: .91rem; overflow-wrap: anywhere; }
.document-list li span { display: flex; gap: 12px; color: var(--muted); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 4px 0 14px; }
.tabs a, .tabs button { text-decoration: none; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); min-height: 42px; padding: 8px 10px; }
.tabs [aria-current], .tabs [aria-pressed=true] { border-bottom-color: var(--accent); color: var(--accent); font-weight: 720; }
.empty { padding: 20px 3px; color: var(--muted); }
.claim-list article { border-top: 1px solid var(--line); padding-block: 14px; overflow-wrap: anywhere; }
.claim-list article:first-child { margin-top: 10px; }
blockquote { margin: 7px 0; padding: 6px 9px; border-left: 3px solid var(--line); color: var(--muted); font-family: Georgia, "Noto Serif CJK SC", serif; overflow-wrap: anywhere; }
.source-label { display: flex; gap: 8px; align-items: center; }
.embedded-reader { width: 100%; height: min(73vh, 790px); min-height: 370px; margin-top: 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.evidence-pane .embedded-reader { min-height: 330px; height: 54vh; }
.check { display: flex; gap: 8px; align-items: start; padding-block: 5px; font-weight: 450; overflow-wrap: anywhere; }
.task-form { margin-top: 12px; }
.material-choice details { margin-top: 7px; }
.mobile-pane { display: none; }
.cm-editor { max-height: min(72vh, 710px); border: 1px solid #bfcfc5; border-radius: 7px; }
.cm-editor .cm-content { font: 14px/1.65 ui-monospace, Menlo, "PingFang SC", monospace; }
.cm-mergeView { margin-block: 13px; }
.prewrap, .path, .path-list, .source-lines code { white-space: pre-wrap; overflow-wrap: anywhere; font-family: ui-monospace, Menlo, monospace; }
.path, .path-list { color: var(--muted); font-size: .87rem; }
.review-grid .prewrap { background: var(--bg); padding: 12px; border-radius: 7px; }
.source-lines > div { display: grid; grid-template-columns: 4ch minmax(0,1fr); gap: 10px; }
.source-lines a { text-align: right; }
.source-lines > :target { background: var(--warn-bg); }
.activity-list { margin-top: 8px; }
.job-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 9px; padding: 12px 0; border-top: 1px solid var(--line); }
.job-main { min-width: 0; flex: 1 1 270px; overflow-wrap: anywhere; }
.curator-info { display: grid; justify-items: start; gap: 4px; }
#activity-feed { display: grid; gap: 14px; }
.message { color: var(--accent-hover); border-radius: 7px; padding: 10px 12px; margin-block: 5px; background: var(--tint); }
.message.error { color: var(--error); background: var(--error-bg); }
.pdf-body { margin: 0; color: var(--ink); background: #e6e9e5; min-height: 100vh; }
.pdf-controls { position: absolute; z-index: 2; inset: 0 0 auto; display: flex; flex-wrap: wrap; align-items: center; gap: 3px; background: white; border-bottom: 1px solid var(--line); padding: 4px; height: 72px; }
.pdf-controls .button { padding: 2px 7px; min-height: 32px; }
.pdf-controls input:not([type=checkbox]) { padding: 2px 4px; min-height: 31px; width: 4ch; }
.pdf-controls input[type=search] { width: min(17vw, 110px); min-width: 64px; }
.pdf-controls form { display: flex; gap: 3px; }
.pdf-controls label { margin: 0; }
#viewerContainer { position: absolute; overflow: auto; inset: 72px 0 0; }
.pdf-status { position: absolute; z-index: 2; inset: 85px 10px auto; background: white; border-radius: 6px; padding: 9px; }
@media (max-width: 1050px) { .shell { grid-template-columns: 162px minmax(0, 1fr); } .sidebar { padding-inline: 11px; } }
@media (max-width: 850px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; display: grid; grid-template-columns: minmax(0,1fr) auto; height: auto; gap: 8px; padding: 10px 15px 5px; border-right: none; border-bottom: 1px solid var(--line); }
  .sidebar nav { grid-column: 1 / -1; grid-row: 2; grid-template-columns: repeat(4, minmax(0,1fr)); text-align: center; }
  .sidebar nav a { padding: 8px 3px; }
  .sidebar-foot { display: flex; align-items: center; gap: 3px; }
  .sidebar-foot .button { padding-inline: 8px; min-height: 35px; }
  .sidebar-foot .quiet { padding-inline: 5px; }
  .workspace { padding: 20px 12px 32px; gap: 12px; }
  .mobile-pane { display: flex; margin-bottom: 0; }
  .editor-grid { display: block; }
  [data-active-pane=edit] .evidence-pane, [data-active-pane=evidence] .edit-pane { display: none; }
}
@media (max-width: 620px) {
  .library-grid, .two-grid { grid-template-columns: 1fr; }
  .spotlight { align-items: start; flex-direction: column; }
  .page-head { flex-wrap: wrap; }
  .panel { border-radius: 9px; }
  .document-list ul { max-height: 245px; overflow: auto; }
}
