:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #fff;
  --ink: #17212f;
  --ink-2: #4b5a6d;
  --ink-3: #7a8797;
  --line: #e2e7ee;
  --line-2: #eef1f5;
  --brand: #1c5fd0;
  --brand-dark: #154aa6;
  --brand-soft: #eaf1fd;
  --navy: #0f2238;
  --navy-2: #1a3250;
  --green: #0c7a54; --green-soft: #e4f5ed;
  --amber: #8f5607; --amber-soft: #fff2d9;
  --red: #b23039; --red-soft: #fdebec;
  --violet: #5a3fb0; --violet-soft: #efebfd;
  --radius: 8px;
  --sans: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --serif: "SimSun", "Songti SC", "Noto Serif CJK SC", serif;
  font: 14px/1.55 var(--sans);
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; min-width: 320px; }
h1, h2, h3, h4, p, ul, ol, dl, dd, blockquote, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { flex: none; vertical-align: -3px; }
small { display: block; font-size: 12px; color: var(--ink-3); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #4b93f0; outline-offset: 2px; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.pad { padding: 14px 16px; }
.mono { font-family: Consolas, "Cascadia Mono", monospace; font-variant-numeric: tabular-nums; }

/* 基础部件 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid transparent; border-radius: 6px; font-weight: 600; white-space: nowrap; background: none; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); }
.btn.secondary { background: #fff; border-color: #cfd8e3; }
.btn.secondary:hover { border-color: #9db9e6; background: #f6f9fe; }
.btn.ghost { color: var(--ink-2); }
.btn.ghost:hover { background: #e9eef5; }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn.large { height: 42px; font-size: 15px; }
.btn.block { display: flex; width: 100%; }
.btn.danger { color: var(--red); }
.link { display: inline-flex; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: var(--brand); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon-btn { display: inline-grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 6px; background: none; color: var(--ink-3); }
.icon-btn:hover { background: #e9eef5; color: var(--ink); }
.icon-btn.small { width: 22px; height: 22px; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 4px; font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; }
.tag.slate, .dot.slate { background: #e9edf2; color: #4d5c6f; }
.tag.blue { background: var(--brand-soft); color: var(--brand-dark); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.violet { background: var(--violet-soft); color: var(--violet); }
.tag.red { background: var(--red-soft); color: var(--red); }
.dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; }
.dot.blue { background: #5b9bf5; } .dot.green { background: #35b885; } .dot.amber { background: #e9a23b; } .dot.violet { background: #9a84ee; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: 13px; }
.avatar.violet { background: var(--violet-soft); color: var(--violet); }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.kv { display: grid; gap: 8px; margin: 0 0 14px; }
.kv div { display: grid; grid-template-columns: 76px 1fr; gap: 10px; }
.kv dt { color: var(--ink-3); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.panel { margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 46px; padding: 0 16px; border-bottom: 1px solid var(--line-2); }
.panel-head h2 { font-size: 15px; }
.panel-head em { margin-left: 4px; font-style: normal; color: var(--ink-3); font-weight: 500; }
.panel > .kv, .panel > .timeline, .panel > .plain-list, .panel > .measures, .panel > .clause, .panel > .rule-diff { margin: 14px 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 9px 16px; text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; border-bottom: 1px solid var(--line-2); }
td { padding: 11px 16px; vertical-align: top; border-bottom: 1px solid var(--line-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfd; }
.empty-cell { padding: 26px 16px; text-align: center; color: var(--ink-3); }
.empty { padding: 30px 20px; text-align: center; }
.empty p { max-width: 440px; margin: 6px auto 12px; color: var(--ink-3); }

/* 表单与对话框 */
.form { display: grid; gap: 6px; }
.form label, .fix label { margin-top: 8px; font-weight: 600; font-size: 13px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 34px; padding: 6px 10px; border: 1px solid #cfd8e3; border-radius: 6px; background: #fff; }
textarea { resize: vertical; line-height: 1.6; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9cc0f5; outline-offset: 0; border-color: var(--brand); }
.form .btn { margin-top: 10px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 400 !important; }
.check input { margin-top: 4px; accent-color: var(--brand); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.form-actions .btn { margin-top: 0; }
.callout { display: flex; gap: 8px; padding: 10px 12px; margin-bottom: 12px; border-radius: 6px; background: var(--brand-soft); color: #173f82; }
.clause { padding: 12px 14px; border-left: 3px solid var(--brand); background: #f6f9fe; border-radius: 0 6px 6px 0; font-size: 15px; line-height: 1.7; }
.demo-option { margin-top: 10px; color: var(--ink-3); font-size: 13px; }
.margin-fields { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.margin-fields legend { margin-bottom: 4px; font-weight: 600; font-size: 13px; }
.margin-fields label { margin: 0; font-weight: 400; color: var(--ink-3); }
dialog { width: min(480px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 10px; box-shadow: 0 18px 50px #0b1f3a40; color: var(--ink); }
dialog::backdrop { background: #0f223866; }
dialog > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
dialog h2 { font-size: 16px; }
.modal-body { padding: 16px 18px 18px; max-height: calc(100vh - 140px); overflow-y: auto; }
.modal-feedback { margin-top: 10px; padding: 8px 10px; border-radius: 6px; background: var(--red-soft); color: var(--red); }
dialog.drawer { margin: 0 0 0 auto; width: min(400px, 100vw); height: 100vh; max-height: none; border-radius: 0; }
dialog.drawer .modal-body { max-height: calc(100vh - 56px); }
.drawer h3 { margin: 16px 0 8px; font-size: 13px; color: var(--ink-3); }
.guide button { display: flex; gap: 10px; align-items: flex-start; width: 100%; padding: 10px; border: 0; border-radius: 6px; background: none; text-align: left; }
.guide button:hover { background: #f1f5fb; }
.guide i { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); font-style: normal; font-weight: 700; font-size: 12px; }
.guide div { flex: 1; }
.guide p { margin-top: 3px; color: var(--ink-2); font-size: 13px; }
.guide svg { margin-top: 4px; color: var(--ink-3); }
.drawer-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.role-list { display: grid; gap: 4px; }
.role-row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid transparent; border-radius: 6px; background: none; text-align: left; }
.role-row div { flex: 1; }
.role-row:hover { background: #f1f5fb; }
.role-row.on { border-color: #b9d1f5; background: var(--brand-soft); }
#feedback { position: fixed; left: 50%; bottom: 28px; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 20px; background: var(--navy); color: #fff; box-shadow: 0 8px 24px #0b1f3a40; opacity: 0; transform: translate(-50%, 10px); pointer-events: none; transition: .2s; }
#feedback.visible { opacity: 1; transform: translate(-50%, 0); }

/* 登录 */
.login { display: grid; grid-template-columns: 1.15fr 1fr; min-height: 100vh; background: #fff; }
.login-visual { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.login-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .82; }
.login-visual::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, #081422b3); }
.login-caption { position: absolute; inset-inline: clamp(24px, 4vw, 64px); bottom: clamp(26px, 5vh, 56px); z-index: 1; }
.login-visual h1 { margin: 0 0 10px; font-size: clamp(28px, 2.65vw, 38px); line-height: 1.27; text-wrap: balance; }
.login-visual p { font-size: 14px; color: #e3eaf4; }
.login-main { display: grid; place-items: center; padding: 32px; }
.login-main form { width: min(364px, 100%); }
.login-heading { display: flex; align-items: center; gap: 12px; }
.login-heading h2 { font-size: 24px; line-height: 1.35; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand b { display: block; font-size: 15px; }
.brand small { color: inherit; opacity: .7; }
.logo { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--brand); color: #fff; }
.login-fields { display: grid; gap: 17px; margin: 28px 0 21px; }
.login-fields label { display: block; margin-bottom: 6px; font-weight: 600; }
.login-fields input { width: 100%; height: 44px; }
.review-login .btn { min-height: 44px; }
.login-error { color: #a12628; margin: 0 0 12px; }
.review-account-note { margin: 0 0 12px; color: var(--ink-2); }
.login-note { margin-top: 16px; color: var(--ink-3); font-size: 13px; }

/* 外壳 */
.shell { display: grid; grid-template-columns: 224px minmax(0, 1fr); height: 100vh; }
.sidebar { display: flex; flex-direction: column; padding: 16px 12px; background: var(--navy); color: #c9d5e4; overflow-y: auto; }
.sidebar .brand { padding: 2px 6px 18px; color: #fff; }
.nav-item { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 6px; font-weight: 600; }
.nav-item span { flex: 1; white-space: nowrap; }
.nav-item b { min-width: 20px; padding: 0 6px; border-radius: 10px; background: #e9a23b; color: #2b1a00; font-size: 12px; text-align: center; }
.nav-item:hover, .nav-doc:hover { background: var(--navy-2); color: #fff; }
.nav-item.on { background: var(--brand); color: #fff; }
.nav-label { margin: 22px 10px 6px; font-size: 12px; color: #7f93ab; }
.nav-doc { display: block; padding: 7px 10px; border-radius: 6px; }
.nav-doc span { display: block; color: #e6edf5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-doc small { color: #8ea1b8; }
.nav-doc.on { background: var(--navy-2); box-shadow: inset 2px 0 0 #5b9bf5; }
.nav-empty { padding: 0 10px; color: #7f93ab; }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; font-size: 12px; color: #7f93ab; }
.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar { display: flex; align-items: center; justify-content: space-between; flex: none; height: 52px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 6px; color: var(--ink-3); min-width: 0; white-space: nowrap; }
.crumbs a:hover { color: var(--brand); }
.crumbs > :last-child { color: var(--ink); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.account { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border: 0; border-radius: 6px; background: none; text-align: left; line-height: 1.25; }
.account:hover { background: #eef2f7; }
.account b { display: block; font-size: 13px; }
.content { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 28px 40px; }
.content > * { max-width: 1280px; margin-left: auto; margin-right: auto; }
.content.full { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.content.full > * { max-width: none; margin: 0; }

/* 列表页 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.page-head h1 { display: flex; align-items: center; gap: 10px; font-size: 22px; line-height: 1.3; }
.page-head p { margin-top: 2px; color: var(--ink-2); }
.today { color: var(--ink-3); }
.home-grid, .face-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.task { display: grid; grid-template-columns: 96px minmax(0, 1fr) 124px auto; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.task:last-child { border-bottom: 0; }
.task:hover { background: #f7f9fc; }
.task .tag { justify-self: start; }
.task time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.task time.late { color: var(--red); font-weight: 600; }
.pending-line { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 10px; border-radius: 6px; background: var(--amber-soft); color: #5e3a05; font-size: 13px; }
.hint { font-size: 12px; }
.hint.ok { color: var(--green); }
.hint.warn { color: var(--amber); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair label { display: block; margin-bottom: 6px; }
.task-verb { display: inline-flex; align-items: center; gap: 4px; color: var(--brand); font-weight: 600; }
.plain-list li { display: flex; justify-content: space-between; padding: 5px 0; }
.timeline li { position: relative; padding: 0 0 12px 16px; }
.timeline li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: #b5c2d2; }
.timeline li::after { content: ""; position: absolute; left: 4.5px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.life { display: flex; align-items: center; }
.life li { display: flex; align-items: center; gap: 6px; color: var(--ink-3); white-space: nowrap; }
.life li + li::before { content: ""; width: 28px; height: 1px; margin: 0 4px 0 2px; background: #cfd8e3; }
.life i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #c3cedb; font-style: normal; font-size: 11px; font-weight: 700; background: #fff; }
.life .done { color: var(--ink-2); }
.life .done i { border-color: var(--green); background: var(--green); color: #fff; }
.life .done + li::before { background: var(--green); }
.life .now { color: var(--brand-dark); font-weight: 700; }
.life .now i { border-color: var(--brand); background: var(--brand); color: #fff; box-shadow: 0 0 0 3px #1c5fd026; }
.life.compact li + li::before { width: 12px; }
.life.compact li:not(.now) span { display: none; }
.filters { display: flex; gap: 10px; margin-bottom: 12px; }
.filters select { width: 150px; }
.search { position: relative; width: 320px; }
.search svg { position: absolute; left: 10px; top: 9px; color: var(--ink-3); }
.search input { padding-left: 32px !important; }
td small { margin-top: 2px; }
td small .link { font-weight: 400; font-size: 12px; }
.nowrap, td .link, td .tag { white-space: nowrap; }

/* 工作面 */
.version-cards { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; margin-bottom: 16px; }
.version-card { padding: 18px 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.version-card.work { border-top: 3px solid var(--brand); }
.version-card .label { font-size: 12px; color: var(--ink-3); }
.version-no { display: flex; align-items: center; gap: 10px; margin: 2px 0; }
.version-no strong { font: 700 30px/1.2 Consolas, monospace; }
.version-card h3 { margin-bottom: 12px; font-size: 15px; }
.version-card .life { margin: 4px 0 12px; }
.version-card .muted { margin-bottom: 12px; }
.version-card .actions .muted { margin: 0; }
.version-none { padding: 14px 0 4px; }
.version-none strong { font-size: 18px; color: var(--ink-2); }
.version-none p { margin: 4px 0 14px; color: var(--ink-3); }
.due-line { display: flex; align-items: center; gap: 6px; padding: 10px 16px; background: #fafbfd; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.measures li { padding: 0 0 12px; }
.measures li + li { padding-top: 12px; border-top: 1px solid var(--line-2); }
.measures .tag { margin: 4px 0; }
.measures .link { text-align: left; }
.measures p { color: var(--ink-2); font-size: 13px; }

/* 规程办理工作区 */
.work-head { display: flex; align-items: center; gap: 24px; flex: none; padding: 12px 24px; background: #fff; border-bottom: 1px solid var(--line); }
.work-title { flex: 1; min-width: 0; }
.work-title h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.work-title p { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.save { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 12px; }
.gate { display: flex; align-items: center; gap: 10px; flex: none; padding: 8px 24px; background: var(--amber-soft); color: #5e3a05; border-bottom: 1px solid #f1dcae; }
.gate span { flex: 1; }
.work-body { display: grid; grid-template-columns: minmax(0, 1fr) 360px; flex: 1; min-height: 0; }
.doc { display: grid; grid-template-columns: 196px minmax(0, 1fr); min-height: 0; }
.outline { padding: 14px 8px; background: #fff; border-right: 1px solid var(--line); overflow-y: auto; }
.outline h3 { padding: 0 8px 8px; font-size: 12px; color: var(--ink-3); }
.outline-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 6px; background: none; text-align: left; line-height: 1.35; }
.outline-item i { flex: none; width: 16px; font-style: normal; color: var(--ink-3); font-size: 12px; text-align: center; }
.outline-item span { flex: 1; }
.outline-item b { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--amber-soft); color: var(--amber); font-size: 11px; text-align: center; }
.outline-item:hover { background: #f1f5fb; }
.outline-item.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; }
.outline-foot { display: flex; align-items: center; gap: 6px; margin: 14px 8px 0; padding-top: 12px; border-top: 1px solid var(--line-2); color: var(--ink-3); font-size: 12px; }
.doc-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.toolbar { flex: none; padding: 6px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.format-ribbon { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; }
.format-group, .page-tools { display: flex; align-items: center; gap: 2px; }
.format-group + .format-group, .page-tools { padding-left: 10px; border-left: 1px solid var(--line); }
.page-tools { margin-left: auto; gap: 6px; color: var(--ink-3); font-size: 12px; }
.format-tool { display: inline-flex; align-items: center; gap: 4px; min-width: 28px; height: 28px; padding: 0 6px; border: 0; border-radius: 5px; background: none; justify-content: center; font-size: 13px; }
.format-tool:hover { background: #e9eef5; }
.format-ribbon select { width: auto; min-height: 28px; height: 28px; padding: 0 6px; font-size: 13px; }
.paper-scroll, .diff-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 24px; background: #e9edf2; }
.paper { width: min(100%, var(--paper-width, 210mm)); margin: 0 auto; background: #fff; box-shadow: 0 1px 3px #0f223826, 0 8px 24px #0f223814; container-type: inline-size; }
.paper-inner { padding: var(--margin-top-scale, 12cqw) var(--margin-end, 12%) var(--margin-bottom-scale, 12cqw) var(--margin-start, 12%); font-family: var(--serif); font-size: 16px; color: #111; }
.paper-title { font: 700 26px/1.4 "SimHei", "Heiti SC", var(--sans); text-align: center; }
.paper-sub { margin: 8px 0 30px; text-align: center; color: #555; font-size: 14px; }
.manuscript { outline: none; }
.chapter { margin-bottom: 26px; scroll-margin-top: 16px; }
.chapter h2 { margin-bottom: 10px; font: 700 19px/1.5 "SimHei", "Heiti SC", var(--sans); }
.doc-rich p, .doc-rich div { margin: 0 0 .5em; line-height: calc(var(--document-spacing, 1.375) * 1.3); text-indent: var(--document-indent, 2em); text-align: justify; }
.doc-rich h5 { margin: .8em 0 .4em; font: 700 16px "SimHei", var(--sans); }
.doc-rich ul, .doc-rich ol { margin: 0 0 .5em 2em; list-style: revert; }
.chapter.attachments { font-family: var(--sans); font-size: 14px; }
mark.hit { padding: 1px 0; background: #ffe9b3; border-bottom: 2px solid #e9a23b; cursor: pointer; }
mark.hit.on { background: #ffd66e; box-shadow: 0 0 0 3px #ffd66e80; }
mark.hit.settled { background: #e6f1e9; border-bottom-color: #8fc7a6; }
.files li { display: flex; align-items: center; gap: 8px; padding: 7px 2px; border-bottom: 1px solid var(--line-2); color: var(--ink-3); }
.files .file-name { flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files .file-name:hover { color: var(--brand); text-decoration: underline; }
.files .mono { font-size: 12px; }

/* 右侧办理面板 */
.side-panel { display: flex; flex-direction: column; min-height: 0; background: #fff; border-left: 1px solid var(--line); }
.tabs { display: flex; flex: none; padding: 0 8px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 12px 10px 10px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--ink-2); font-weight: 600; white-space: nowrap; }
.tabs button.on { color: var(--brand-dark); border-bottom-color: var(--brand); }
.side-title { flex: none; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 700; }
.side-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; }
.side-scroll > * + * { margin-top: 12px; }
.side-scroll h4 { margin-top: 18px; font-size: 12px; color: var(--ink-3); }
.side-foot { flex: none; padding: 12px 16px; border-top: 1px solid var(--line); background: #fafbfd; }
.foot-note { margin-bottom: 8px; color: var(--ink-2); font-size: 13px; }
.foot-pair { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.note { padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.note header { display: flex; align-items: center; gap: 8px; }
.note .avatar { width: 24px; height: 24px; font-size: 12px; }
.note time { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.note-where { margin: 6px 0 2px; padding: 0; border: 0; background: none; color: var(--brand); font-size: 12px; }
.people li { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.issue { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.issue.on { border-color: #e9c070; box-shadow: 0 0 0 2px #ffe9b380; }
.issue-head { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; width: 100%; padding: 10px 12px; border: 0; background: none; text-align: left; }
.issue-head .mono { color: var(--ink-3); font-size: 12px; line-height: 21px; }
.issue-body { padding: 0 12px 12px; display: grid; gap: 8px; }
.issue-type { color: var(--ink-3); font-size: 12px; }
.issue-body blockquote, .fix blockquote { padding: 6px 10px; border-left: 3px solid #e9a23b; background: #fff8e6; font-family: var(--serif); }
.basis { font-size: 13px; color: var(--ink-2); }
.reason { padding: 8px 10px; border-radius: 6px; background: #f5f7fa; font-size: 13px; }
.opinions li { padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.opinions li:last-child { border-bottom: 0; }
.opinions header { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.opinions header .tag { margin-left: auto; }
.opinions p { color: var(--ink-2); font-size: 13px; }
.ai-line { display: flex; gap: 6px; padding: 8px 10px; border-radius: 6px; background: var(--violet-soft); color: #43308a; font-size: 13px; }
.ai-line.down { background: var(--amber-soft); color: #5e3a05; }
.fix { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.fix header { display: flex; gap: 8px; }
.fix header .mono { color: var(--ink-3); font-size: 12px; line-height: 21px; }
.fix > p { color: var(--ink-2); font-size: 13px; }
.fix .link { justify-self: start; font-size: 13px; }
.waiting { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 6px; background: #f5f7fa; color: var(--ink-2); }
.record { border-bottom: 1px solid var(--line-2); margin: 0 !important; }
.record summary { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; font-weight: 700; list-style: none; }
.record summary::-webkit-details-marker { display: none; }
.record[open] summary svg { transform: rotate(180deg); }
.record > div { padding-bottom: 12px; }
.record .kv { margin: 0; }

/* 版本对比 */
.diff { max-width: 1100px; margin: 0 auto; background: #fff; border-radius: 8px; box-shadow: 0 1px 3px #0f223826; overflow: hidden; }
.diff-head, .diff-row { display: grid; grid-template-columns: 1fr 1fr; }
.diff-head { position: sticky; top: -24px; z-index: 1; background: var(--navy); color: #fff; font-weight: 700; }
.diff-head span { padding: 9px 18px; }
.diff section { border-top: 1px solid var(--line); }
.diff h3 { padding: 12px 18px 6px; font-size: 14px; }
.diff-row p { padding: 6px 18px; font-family: var(--serif); font-size: 15px; line-height: 1.8; }
.diff-row p + p { border-left: 1px solid var(--line-2); }
.diff-row.same p { color: var(--ink-3); }
.diff-row.mod, .diff-row.add, .diff-row.del { background: #fffcf3; }
del { background: #fbd9db; color: #8c1f28; text-decoration: line-through; }
ins { background: #cdeedd; color: #0a5c3f; text-decoration: none; }
.rule-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rule-diff p { margin-top: 6px; padding: 12px 14px; border-radius: 6px; background: #f6f8fb; font-size: 15px; line-height: 1.7; }

/* 演示辅助页 */
.confirm-list { max-width: 820px; margin-left: 0; }
.question-intro { padding: 12px 16px; background: #f7f9fc; border-bottom: 1px solid var(--line-2); color: var(--ink-2); display: grid; gap: 4px; }
.question-intro b { color: var(--ink); }
.question { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.question:last-child { border-bottom: 0; }
.question label { display: flex; gap: 10px; margin-bottom: 8px; font-weight: 600; }
.question label .mono { color: var(--brand); flex: none; }
.confirm summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; list-style: none; }
.confirm summary::-webkit-details-marker { display: none; }
.confirm .form { padding: 0 16px 16px; }
.confirm .btn { justify-self: start; }
.phone-stage { display: grid; grid-template-columns: 340px minmax(0, 420px); gap: 40px; align-items: start; }
.phone { display: flex; flex-direction: column; height: 640px; border: 10px solid #18212d; border-radius: 36px; background: #f3f5f8; overflow: hidden; }
.phone-status { display: flex; justify-content: space-between; padding: 8px 20px 4px; font-size: 12px; font-weight: 700; background: #fff; }
.phone-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px 12px; background: #fff; border-bottom: 1px solid var(--line); }
.phone-bar button { border: 0; background: none; padding: 0; }
.phone-bar span { margin-left: auto; color: var(--ink-3); font-size: 12px; }
.phone-body { flex: 1; overflow-y: auto; padding: 14px; }
.phone-label { margin-bottom: 8px; color: var(--ink-3); font-size: 12px; }
.phone-card { display: grid; gap: 4px; width: 100%; margin-bottom: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; }
.phone-card span { display: flex; align-items: center; justify-content: space-between; }
.phone-text { margin-top: 12px; padding: 14px; border-radius: 10px; background: #fff; font-family: var(--serif); font-size: 15px; }
.phone-foot { padding: 12px 14px; background: #fff; border-top: 1px solid var(--line); }
.phone-foot .btn { height: 42px; }

/* 窄屏 */
@media (max-width: 1180px) {
  .work-body { grid-template-columns: minmax(0, 1fr) 320px; }
  .doc { grid-template-columns: 1fr; }
  .outline { display: none; }
  .work-head .life li:not(.now) span { display: none; }
  .work-head .life li + li::before { width: 12px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; height: auto; }
  .sidebar { flex-direction: row; align-items: center; gap: 4px; padding: 8px 12px; overflow-x: auto; }
  .sidebar .brand { padding: 0 8px 0 0; }
  .sidebar .brand div, .nav-label, .nav-doc, .nav-empty, .sidebar-foot { display: none; }
  .sidebar nav { display: flex; gap: 4px; }
  .main { height: auto; min-height: 100vh; }
  .topbar { padding: 0 14px; }
  .account span { display: none; }
  .crumbs { overflow: hidden; }
  .crumbs > :not(:last-child) { display: none; }
  .top-actions .btn span { display: none; }
  .content { padding: 16px 14px 32px; overflow: visible; }
  .content.full { overflow: visible; }
  .home-grid, .face-grid, .version-cards, .work-body, .phone-stage, .rule-diff, .login { grid-template-columns: 1fr; }
  .login-visual { min-height: 200px; }
  .login-visual h1 { font-size: clamp(22px, 6vw, 28px); }
  .login-main { padding: 28px 24px 36px; }
  .work-head { flex-wrap: wrap; gap: 10px; padding: 12px 14px; }
  .paper-scroll { padding: 12px; overflow: visible; }
  .side-panel { border-left: 0; border-top: 1px solid var(--line); }
  .side-scroll { overflow: visible; }
  .task { grid-template-columns: auto 1fr; }
  .task time { display: none; }
  .task-verb { grid-column: 2; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .search { width: 100%; }
}

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .work-head, .gate, .outline, .toolbar, .side-panel, #feedback, dialog { display: none !important; }
  .shell, .main, .content, .work-body, .doc, .doc-main, .paper-scroll { display: block !important; height: auto !important; overflow: visible !important; padding: 0 !important; background: #fff !important; }
  .paper { width: auto; box-shadow: none; }
  .paper-inner { padding: 0; font-size: 12pt; }
  .chapter { break-inside: auto; }
  .chapter h2 { break-after: avoid; }
  mark.hit { background: none; border: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
