:root {
  --ink: #152028; --ink-soft: #3a4a56; --muted: #6b7c88; --line: #d5dde3;
  --panel: rgba(255,255,255,.92); --brand: #0b6e6e; --brand-deep: #085555;
  --brand-mid: #128484; --brand-soft: #d7efef; --accent: #c45c26; --accent-soft: #f8e6db;
  --danger: #b42318; --danger-soft: #fdecea; --warn: #b54708; --warn-soft: #fff4e5;
  --ok: #067647; --ok-soft: #e8f7ef; --hl-t: #fff3c4; --hl-b: #c8f0e8;
  --font: "Noto Sans SC", "PingFang SC", sans-serif;
  --display: "Outfit", "Noto Sans SC", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--ink);
  background: #eef3f5;
}
.app {
  max-width: none; width: 100%; margin: 0; padding: 0;
  height: 100vh; display: flex; flex-direction: column; min-height: 0;
}
.topbar {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  margin: 0; flex-wrap: nowrap; flex: 0 0 auto;
  padding: 10px 18px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  position: relative; z-index: 40;
}
body[data-work-mode="write"] .topbar { padding: 6px 14px; }
.project-switch {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  z-index: 30;
}
.proj-switch-btn {
  width: 100%; appearance: none; cursor: pointer; font: inherit;
  display: flex; align-items: center; gap: 8px;
  padding: 4px 8px;
  min-height: 32px;
  border: 1px solid var(--line); border-radius: 8px;
  background: #fff; color: var(--ink);
  text-align: left;
}
.proj-switch-btn:hover { border-color: rgba(11,110,110,.45); }
.proj-switch-btn[aria-expanded="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11,110,110,.12);
}
.proj-switch-text { flex: 1; min-width: 0; }
.proj-switch-label {
  display: block; font-size: .82rem; font-weight: 650; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.proj-switch-meta { display: none; }
.proj-switch-caret {
  flex: 0 0 auto; width: 8px; height: 8px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg); margin-top: -3px; opacity: .7;
}
.proj-switch-btn[aria-expanded="true"] .proj-switch-caret {
  transform: rotate(-135deg); margin-top: 3px;
}
.proj-switch-menu {
  position: absolute; top: calc(100% + 6px); left: 0;
  min-width: 100%; width: max(100%, 280px); max-width: min(420px, 70vw);
  max-height: min(420px, 70vh); overflow: auto;
  padding: 6px; border-radius: 12px;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(21, 32, 40, .16);
  z-index: 40;
}
.proj-item {
  width: 100%; appearance: none; border: 0; background: transparent;
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 8px 10px; border-radius: 10px; cursor: pointer; font: inherit;
  text-align: left; color: var(--ink);
}
.proj-item:hover { background: #f3fbfb; }
.proj-item.active {
  background: linear-gradient(145deg, var(--brand), var(--brand-mid)); color: #fff;
}
.proj-item-name {
  font-size: .8rem; font-weight: 650; line-height: 1.35;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%;
}
.proj-item-meta { font-size: .68rem; opacity: .72; }
.proj-empty { font-size: .76rem; color: var(--muted); padding: 10px 8px; }
.brand { display: flex; gap: 10px; align-items: center; }
.mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(145deg, var(--brand), var(--brand-mid)); color: #fff;
  display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: .8rem;
  box-shadow: 0 8px 20px rgba(11,110,110,.28);
}
.brand h1 { margin: 0; font-size: 1.25rem; }
.brand p { margin: 2px 0 0; font-size: .74rem; color: var(--muted); }
body[data-work-mode="write"] .meta-review,
body[data-work-mode="write"] .ph-radar,
body[data-work-mode="write"] #scoreLive,
body[data-work-mode="write"] #needBidBar,
body[data-work-mode="write"] #needBidBarCk,
body[data-work-mode="write"] #missingBidDlg,
body[data-work-mode="write"] #contentChangeHint { display: none !important; }
.top-actions, .anchor-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ready-live {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px 5px 6px;
  border-radius: 999px; background: rgba(255,255,255,.85); border: 1px solid var(--line);
}
.ready-live.hidden { display: none; }
.ready-seal {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; padding: 3px 8px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
}
.ready-seal.tone-mute { background: #eef2f4; color: var(--muted); }
.ready-seal.tone-low { background: #eef2f4; color: #5a6a78; }
.ready-seal.tone-mid { background: #e8f3ff; color: #2a6f97; }
.ready-seal.tone-good { background: #e5f6ef; color: #1b7a4a; }
.ready-seal.tone-great { background: #d8f3e8; color: #0f6b40; }
.ready-seal.tone-best { background: #c8f0d8; color: #0a5c36; }
.ready-seal.tone-risk { background: #fdecea; color: #b42318; }
.ready-pips { display: inline-flex; gap: 4px; align-items: center; }
.ready-pips i {
  width: 7px; height: 7px; border-radius: 50%; background: #d5dee3;
  display: inline-block;
}
.ready-pips i.on { background: var(--brand-deep); }
.ready-count { font-size: .78rem; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.ready-delta { font-size: .78rem; font-weight: 700; color: var(--ok); opacity: 0; transition: .3s; }
.ready-delta.show { opacity: 1; }
.btn {
  appearance: none; border: 0; cursor: pointer; font: inherit;
  border-radius: 10px; padding: 8px 12px; font-size: .82rem; font-weight: 600;
}
.btn:disabled {
  opacity: .45; cursor: not-allowed; pointer-events: none;
  filter: grayscale(.15);
}
.btn-ghost { background: rgba(255,255,255,.85); border: 1px solid var(--line); color: var(--ink-soft); }
.btn-primary { background: linear-gradient(145deg, var(--brand), var(--brand-mid)); color: #fff; }
.btn-primary.is-dirty { box-shadow: 0 0 0 2px rgba(208, 102, 44, .45); }
.btn-accent { background: linear-gradient(145deg, #d0662c, var(--accent)); color: #fff; }
.btn.danger { color: var(--danger); border-color: #f0c7c3; }
.btn.danger:hover:not(:disabled) { background: var(--danger-soft); }
.btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.dlg-overlay {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: center;
  background: rgba(18, 28, 34, .36);
  backdrop-filter: blur(4px);
}
.dlg-overlay.hidden { display: none; }
.dlg-card {
  width: min(420px, calc(100vw - 32px));
  padding: 20px 20px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 20px 48px rgba(18,28,34,.22);
}
.dlg-card h3 { margin: 0 0 12px; font-size: 1rem; }
.dlg-copy { margin: 0; font-size: .84rem; color: var(--ink-soft); line-height: 1.55; }
.dlg-input {
  width: 100%; box-sizing: border-box;
  padding: 9px 11px; border-radius: 10px;
  border: 1px solid var(--line); font: inherit; font-size: .88rem;
  outline: none; background: #fff;
}
.dlg-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(11,110,110,.15); }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  align-items: stretch;
}
.side-nav {
  background: #f6fafb;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: visible;
  z-index: 20;
}
.side-proj {
  position: relative;
  flex: 0 0 auto;
  padding: 8px 12px 10px;
  border-bottom: 1px solid var(--line);
  background: #f6fafb;
}
.side-proj-row { display: flex; align-items: center; gap: 6px; position: relative; }
.btn-icon {
  appearance: none; border: 1px solid var(--line); background: #fff;
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 8px; cursor: pointer;
  font: inherit; font-size: 1.05rem; line-height: 1; color: var(--ink-soft);
}
.btn-icon:hover { border-color: rgba(11,110,110,.45); color: var(--ink); }
.btn-icon[aria-expanded="true"] {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(11,110,110,.12);
}
.proj-more-menu {
  position: absolute; top: 42px; right: 12px;
  min-width: 148px; padding: 6px;
  border-radius: 10px; background: #fff; border: 1px solid var(--line);
  box-shadow: 0 14px 32px rgba(21,32,40,.16);
  z-index: 42;
}
.proj-more-menu button {
  width: 100%; appearance: none; border: 0; background: transparent;
  text-align: left; font: inherit; font-size: .82rem; padding: 8px 10px;
  border-radius: 8px; cursor: pointer; color: var(--ink);
}
.proj-more-menu button:hover { background: #f3fbfb; }
.proj-more-menu button.danger { color: var(--danger); }
.proj-more-menu button.danger:hover { background: var(--danger-soft); }
.proj-more-menu button:disabled { opacity: .4; cursor: not-allowed; }
.side-new {
  width: 100%; margin-top: 8px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #fff;
  color: var(--brand-deep);
  border: 1px dashed rgba(11, 110, 110, .42);
  box-shadow: none;
}
.side-new:hover:not(:disabled) {
  background: var(--brand-soft);
  border-style: solid;
  border-color: var(--brand);
  color: var(--brand-deep);
}
.side-new-plus { font-size: 1.05rem; font-weight: 700; line-height: 1; }
.side-nav-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 12px 12px 20px;
}
.side-nav-label {
  margin: 0 10px 10px;
  font-size: .68rem; font-weight: 700; letter-spacing: .14em;
  color: #8a9aa5; text-transform: uppercase;
}
.side-group { padding: 2px 0 12px; }
.side-group + .side-group { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 14px; }
.side-group-title {
  width: 100%; appearance: none; border: 0; background: transparent;
  font: inherit; font-size: .82rem; font-weight: 650; letter-spacing: 0;
  color: var(--ink); text-align: left; padding: 7px 8px 8px; cursor: pointer;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  line-height: 1.35;
}
.side-group-title::after {
  content: "";
  width: 0; height: 0;
  flex: 0 0 auto;
  border: 5px solid transparent;
  border-top-color: currentColor;
  margin-top: .45em;
  opacity: .45;
  transform-origin: 50% 35%;
  transition: transform .2s ease;
}
.side-group.is-folded .side-group-title::after {
  transform: rotate(-90deg);
}
.side-group.is-folded .side-item { display: none; }
.side-group.on .side-group-title { color: var(--brand-deep); }
.side-item {
  width: 100%; appearance: none; border: 0; background: transparent; cursor: pointer;
  font: inherit; font-size: .8rem; color: var(--ink-soft); text-align: left;
  padding: 7px 12px 7px 14px; border-radius: 9px; margin-bottom: 2px;
}
.side-item:hover { background: #fff; color: var(--ink); }
.side-item.on {
  background: linear-gradient(145deg, var(--brand), var(--brand-mid));
  color: #fff;
  box-shadow: 0 8px 16px rgba(11,110,110,.18);
}
.side-group:not(.on) .side-item { opacity: .78; }
.guide-pane {
  padding: 0; min-height: 0; overflow: auto;
  display: flex; flex-direction: column;
  flex: 1 1 auto;
}
.guide-hero {
  padding: 24px 28px 18px;
  background: linear-gradient(165deg, #e7f4f3 0%, #fff 72%);
  border-bottom: 1px solid var(--line);
}
.guide-kicker {
  margin: 0 0 8px; font-size: .82rem; font-weight: 700; letter-spacing: 0;
  color: var(--brand-deep);
}
.guide-pane h2 { margin: 0 0 10px; font-size: 1.42rem; line-height: 1.35; }
.guide-lead { margin: 0; font-size: .92rem; line-height: 1.75; color: var(--ink-soft); max-width: 46em; }
.guide-start {
  padding: 20px 28px 8px;
  max-width: 460px;
}
.guide-start.hidden { display: none !important; }
.guide-aside-lead {
  margin: 0 0 12px; font-size: .84rem; line-height: 1.6; color: var(--ink-soft);
}
.guide-aside-lead:empty, .guide-aside-lead.hidden { display: none; }
.guide-drop { min-height: 148px; margin-bottom: 12px; }
.guide-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.guide-tour {
  padding: 8px 28px 28px;
}
.guide-tour h3 {
  margin: 0 0 14px; font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; color: var(--muted);
}
.guide-shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.guide-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  min-width: 0;
}
.guide-card-n {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-deep);
  font-size: .7rem; font-weight: 700; margin-bottom: 8px;
}
.guide-card h4 { margin: 10px 0 4px; font-size: .86rem; }
.guide-card p { margin: 0; font-size: .76rem; line-height: 1.5; color: var(--muted); }
.shot-frame {
  border: 1px solid #d8e2e6; border-radius: 10px; overflow: hidden;
  background: #f4f8f8; box-shadow: 0 8px 18px rgba(21,32,40,.06);
}
.shot-bar {
  height: 18px; background: #e8eef0; border-bottom: 1px solid #dde6e9;
  display: flex; align-items: center; gap: 4px; padding: 0 8px;
}
.shot-bar i {
  width: 6px; height: 6px; border-radius: 50%; background: #c9d5d8; display: block;
}
.shot-bar i:nth-child(1) { background: #ef9a9a; }
.shot-bar i:nth-child(2) { background: #f6c77a; }
.shot-bar i:nth-child(3) { background: #8dcfb3; }
.shot-body { padding: 10px; min-height: 92px; }
.shot-drop {
  border: 1.5px dashed #b7c8cd; border-radius: 8px; padding: 12px 8px;
  text-align: center; background: #fff;
}
.shot-drop b { display: block; font-size: .68rem; color: var(--brand-deep); }
.shot-drop span { display: block; margin-top: 3px; font-size: .6rem; color: var(--muted); }
.shot-files { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.shot-files em {
  font-style: normal; font-size: .6rem; padding: 2px 7px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep);
}
.shot-row {
  display: flex; align-items: center; gap: 6px;
  font-size: .62rem; padding: 5px 6px; border-radius: 6px; background: #fff;
  margin-bottom: 4px; color: var(--ink-soft);
}
.shot-row .tag {
  font-size: .55rem; padding: 1px 5px; border-radius: 999px;
  background: var(--danger-soft); color: var(--danger);
}
.shot-row .tag.score { background: var(--warn-soft); color: var(--warn); }
.shot-split { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.shot-col { background: #fff; border-radius: 6px; padding: 6px; min-height: 72px; }
.shot-hl { height: 8px; border-radius: 3px; margin: 4px 0; }
.shot-hl.t { background: var(--hl-t); width: 78%; }
.shot-hl.b { background: var(--hl-b); width: 64%; }
.shot-line { height: 5px; border-radius: 3px; background: #e2eaee; margin: 5px 0; }
.shot-line.w2 { width: 70%; }
.shot-line.w3 { width: 52%; }
.shot-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px; margin-bottom: 8px; }
.shot-stat {
  background: #fff; border-radius: 6px; padding: 6px 4px; text-align: center;
  font-size: .58rem; color: var(--muted);
}
.shot-stat b { display: block; font-size: .78rem; color: var(--ink); }
.shot-tree { display: grid; grid-template-columns: 72px 1fr; gap: 6px; }
.shot-leaf {
  font-size: .58rem; padding: 3px 5px; border-radius: 4px; background: #fff;
  color: var(--ink-soft); margin-bottom: 3px;
}
.shot-leaf.on { background: var(--brand-soft); color: var(--brand-deep); }
.guide-note { margin: 14px 0 0; font-size: .8rem; color: var(--muted); line-height: 1.55; }
.work-pane { display: flex; flex-direction: column; gap: 12px; flex: 1 1 auto; min-height: 0; }
.work-pane.hidden, .guide-pane.hidden, #projectHead.hidden { display: none !important; }
@media (max-width: 900px) {
  .app { height: auto; min-height: 100vh; }
  .app:has(#tab-write:not(.hidden)) {
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }
  .layout { grid-template-columns: 1fr; }
  .side-nav { overflow: visible; }
  .side-nav-body {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 10px 12px;
  }
  .side-nav-label { grid-column: 1 / -1; margin-bottom: 0; }
  .side-group + .side-group { border-top: 0; margin-top: 0; padding-top: 4px; border-left: 1px solid var(--line); padding-left: 8px; }
  .guide-start, .guide-tour, .guide-hero { padding-left: 18px; padding-right: 18px; }
}
.panel {
  background: var(--panel); border: 1px solid rgba(213,221,227,.95);
  border-radius: 14px; backdrop-filter: blur(10px);
  box-shadow: 0 16px 40px rgba(21,32,40,.07);
}
.panel-h { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.panel-h h2 { margin: 0; font-size: .95rem; }
.panel-h .sub, .muted, .sub { color: var(--muted); font-size: .74rem; margin: 3px 0 0; }
.list { overflow: auto; padding: 8px; flex: 1; }
.list .item, .task-item {
  width: 100%; text-align: left; border: 1px solid transparent; background: #fff;
  border-radius: 10px; padding: 10px; margin-bottom: 6px; cursor: pointer; font: inherit;
}
.list .item:hover, .list .item.active, .task-item.active {
  border-color: rgba(11,110,110,.4); background: linear-gradient(180deg, #f3fbfb, #fff);
}
.list .item b { display: block; font-size: .84rem; }
.list .item span { font-size: .72rem; color: var(--muted); }
.main {
  min-width: 0; min-height: 0;
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px 18px 20px;
  overflow: auto;
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(207,232,230,.55) 0%, transparent 55%),
    radial-gradient(700px 360px at 100% 0%, rgba(243,217,200,.4) 0%, transparent 50%),
    #eef3f5;
}
.workspace {
  position: relative; min-height: 0;
  display: flex; flex-direction: column; flex: 1 1 auto; gap: 12px;
}
.workspace.is-switching { pointer-events: none; }
.workspace.is-switching > *:not(.switch-banner) {
  opacity: .42;
  filter: saturate(.85);
}
.switch-banner {
  position: absolute; z-index: 24; left: 50%; top: 22%;
  transform: translateX(-50%);
  padding: 12px 18px; border-radius: 12px;
  background: rgba(21, 32, 40, .9); color: #fff;
  font-weight: 650; font-size: .86rem; letter-spacing: .02em;
  box-shadow: 0 14px 36px rgba(21, 32, 40, .28);
  pointer-events: none; white-space: nowrap;
}
.switch-banner.hidden { display: none !important; }
.empty { padding: 48px 24px; text-align: center; color: var(--ink-soft); background: var(--panel); border-radius: 14px; border: 1px solid var(--line); }
.hidden { display: none !important; }
.project-head {
  padding: 14px 16px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px 16px;
  align-items: start;
}
.crumbs { font-size: .74rem; color: var(--muted); margin-bottom: 6px; line-height: 1.4; }
.project-head h2 { margin: 0 0 6px; font-size: 1.05rem; line-height: 1.35; }
.meta { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: .8rem; color: var(--muted); align-items: baseline; }
.meta b { color: var(--ink-soft); }
.head-notice {
  flex: 1 1 10rem;
  min-width: 8rem;
  min-height: 1.2em;
  color: var(--ink-soft);
  font-weight: 500;
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}
.head-notice.is-on { opacity: 1; }
.head-notice:not(.is-on):empty {
  flex: 0 0 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.workspace-notice {
  flex: none;
  margin: 0 0 8px;
  padding: 0 2px;
  font-size: .8rem;
  line-height: 1.4;
}
.workspace-notice:not(.is-on) { display: none !important; }
.ph-cta {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  padding-top: 2px;
}
.ph-cta-slot { display: flex; flex-direction: column; align-items: flex-end; }
.btn-run {
  padding: 10px 18px; font-size: .88rem; letter-spacing: .02em;
  box-shadow: 0 8px 18px rgba(196, 92, 38, .28);
}
.btn-run:disabled { box-shadow: none; }
.ph-cta-hint {
  margin: 0; max-width: 200px; text-align: right;
  font-size: .68rem; color: var(--muted); line-height: 1.35;
}
.head-nav {
  grid-column: 1 / -1;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px 16px;
  padding-top: 10px; margin-top: 2px;
  border-top: 1px solid var(--line);
}
.head-nav-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.head-nav .btn { padding: 6px 11px; font-size: .78rem; }
.head-nav-hint {
  margin: 0 0 0 auto;
  flex: 1 1 12rem;
  text-align: right;
  font-size: .78rem;
  line-height: 1.45;
  color: #b45309;
  font-weight: 500;
}
.head-nav-hint.hidden { display: none !important; }
.ph-radar { align-self: center; }
.ph-radar.hidden { display: none; }
.radar-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.radar-svg { display: block; overflow: visible; }
.radar-band.even { fill: #f2f4f6; stroke: none; }
.radar-band.odd { fill: #ffffff; stroke: none; }
.radar-ring { fill: none; stroke: #e6eaee; stroke-width: .9; }
.radar-axis { stroke: #e6eaee; stroke-width: .9; }
.radar-req { fill: none; stroke: #7eb6e0; stroke-width: 1.5; stroke-linejoin: round; }
.radar-resp { fill: none; stroke: #e8a07a; stroke-width: 1.5; stroke-linejoin: round; }
.radar-mark { fill: #fff; stroke-width: 1.5; }
.radar-mark.req { stroke: #7eb6e0; }
.radar-mark.resp { stroke: #e8a07a; }
.radar-lab { font-size: 11px; fill: #4a5560; font-family: inherit; }
.radar-legend {
  display: flex; gap: 16px; font-size: .7rem; color: #5a6570; font-weight: 500;
}
.radar-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.radar-legend .lg i {
  display: inline-block; width: 20px; height: 8px; position: relative;
  border-top: 1.5px solid currentColor; flex: 0 0 20px;
}
.radar-legend .lg i::after {
  content: ""; position: absolute; left: 50%; top: -5px;
  width: 7px; height: 7px; margin-left: -4.5px; border-radius: 50%;
  background: #fff; border: 1.5px solid currentColor; box-sizing: border-box;
}
.radar-legend .req { color: #7eb6e0; }
.radar-legend .resp { color: #e8a07a; }
.ready-live .radar-wrap { display: inline-flex; }
.ready-live .radar-svg { width: 36px; height: 36px; }
.score-box .ready-pips { margin: 8px 0 4px; justify-content: center; }
@media (max-width: 720px) {
  .project-head { grid-template-columns: 1fr; }
  .ph-cta, .ph-cta-slot { align-items: stretch; }
  .ph-cta-hint { text-align: left; max-width: none; }
  .btn-run { width: 100%; }
  .ph-radar { justify-self: center; }
  .head-nav-hint { text-align: left; margin-left: 0; }
}
.alert {
  margin-top: 10px; padding: 10px 12px; border-radius: 10px;
  background: linear-gradient(90deg, #fff6ef, #fff); border: 1px solid #f0d2bc;
  font-size: .8rem; color: var(--ink-soft); line-height: 1.45;
}
.tab { padding: 14px 16px 18px; }
#tab-anchor.tab { padding: 10px 8px 12px; }
.upload-grid { align-items: stretch; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upload-card { min-width: 0; position: relative; }
.col-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.col-head h3, .pane-h h3 { margin: 0; font-size: .92rem; }
.tag { font-size: .7rem; padding: 3px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-deep); font-weight: 600; }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bid { background: var(--accent-soft); color: var(--accent); }
.drop {
  display: flex; flex-direction: column; gap: 6px; justify-content: center;
  border: 1.5px dashed #b7c8cd; border-radius: 12px; min-height: 140px;
  padding: 22px 16px; text-align: center; color: var(--muted); cursor: pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.75), rgba(247,250,251,.95));
  margin-bottom: 10px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.drop:hover { border-color: #8eb3b6; }
.drop.need-drop {
  border-color: #d08850;
  background: linear-gradient(180deg, #fffaf4, #fff);
  box-shadow: 0 0 0 3px rgba(196, 92, 38, .12);
}
.drop strong { color: var(--brand-deep); font-size: .92rem; }
.drop span { font-size: .74rem; }
.drop-links {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 8px 0 0; font-size: .8rem;
}
.drop-link {
  appearance: none; background: none; border: 0; padding: 0;
  color: var(--brand-deep); font: inherit; font-weight: 650;
  cursor: pointer; border-bottom: 1px solid transparent;
}
.drop-link:hover { border-bottom-color: currentColor; }
.drop-sep { color: #c5d0d4; user-select: none; }
.sr-file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.need-bid {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 0 0 14px; padding: 12px 14px; border-radius: 10px;
  background: var(--brand-soft); border: 1px solid var(--line);
}
.need-bid b { display: block; font-size: .86rem; color: var(--brand-deep); margin-bottom: 4px; }
.need-bid p { margin: 0; font-size: .76rem; color: var(--ink-soft); line-height: 1.45; }
.need-bid .btn { flex: 0 0 auto; align-self: center; }
.need-bid-slim {
  align-items: center; margin: 0 12px 10px; padding: 10px 12px;
}
.need-bid-slim span { font-size: .78rem; color: var(--ink-soft); line-height: 1.4; }
.file-list { list-style: none; padding: 0; margin: 0 0 12px; font-size: .78rem; color: var(--ink-soft); }
.file-list li { padding: 7px 0; border-bottom: 1px dashed var(--line); display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.file-list li span:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.file-list li em { font-style: normal; font-size: .68rem; color: var(--brand-deep); }
.file-list li.skipped { color: var(--muted); }
.file-list li.skipped em { color: var(--muted); }
.disclaimer {
  margin-top: 14px; padding: 0;
  background: none; color: var(--muted); font-size: .72rem; line-height: 1.5;
}
.report-disc {
  margin: 0 0 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

/* checklist — 左→右树形展开 */
#tab-checklist.tab {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 120px);
}
#tab-checklist .ck-panel-h { padding: 10px 12px; flex: 0 0 auto; }
.parse-meta {
  display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center;
  margin: 0 0 8px; padding: 6px 10px; border-radius: 8px;
  background: #f4f7f8; border: 1px solid var(--line);
  font-size: .72rem; color: var(--ink-soft);
  flex: 0 0 auto;
}
.parse-meta .tag {
  font-weight: 700; color: var(--brand-deep); background: #fff;
  border: 1px solid rgba(11,110,110,.22); padding: 2px 8px; border-radius: 999px;
  font-size: .68rem;
}
.parse-meta select {
  width: auto; min-width: 120px; padding: 3px 6px; font-size: .72rem;
}
.ck-meta-muted { color: var(--muted); }
.ck-level-summary {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin: 0 0 8px; font-size: .72rem; color: var(--muted);
  flex: 0 0 auto;
}
.ck-sum { display: inline-flex; align-items: baseline; gap: 3px; padding: 2px 8px; border-radius: 6px; background: #fff; border: 1px solid var(--line); }
.ck-sum b { font-family: var(--display); font-size: .9rem; }
.ck-sum.reject { color: var(--danger); border-color: #f0c7c3; background: var(--danger-soft); }
.ck-sum.deduct { color: var(--warn); border-color: #f0d9b8; background: var(--warn-soft); }
.ck-sum.tip { color: #274b8a; border-color: #c9d8f5; background: #eef4ff; }
.ck-sum.total { margin-left: auto; background: transparent; border: 0; }

.ck-tree {
  flex: 1 1 auto;
  min-height: 420px;
  display: grid;
  grid-template-columns: 168px minmax(220px, 1fr) minmax(280px, 1.1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.ck-tree-col {
  display: flex; flex-direction: column; min-height: 0; min-width: 0;
  border-right: 1px solid var(--line);
  background: #fff;
}
.ck-tree-col:last-child { border-right: 0; }
.ck-tree-col.mods { background: #f6f9fa; }
.ck-tree-col.detail { background: #fcfdfe; }
.ck-tree-col-h {
  flex: 0 0 auto;
  padding: 8px 12px;
  font-size: .72rem; font-weight: 700; color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f8fbfb, #f1f5f6);
  letter-spacing: .02em;
}
.ck-tree-col-h.with-filter {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 8px 10px;
}
.resp-filter {
  display: flex;
  align-items: stretch;
  gap: 4px;
}
.resp-filter-btn {
  appearance: none;
  flex: 1;
  font: inherit;
  font-size: .66rem;
  font-weight: 650;
  line-height: 1.2;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  cursor: pointer;
  white-space: nowrap;
}
.resp-filter-btn.on {
  background: var(--brand-soft);
  border-color: rgba(11,110,110,.35);
  color: var(--brand-deep);
}
.resp-filter-split {
  position: relative;
  flex: 1.35;
  display: flex;
  min-width: 0;
}
.resp-filter-split .resp-filter-btn {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.resp-filter-caret {
  appearance: none;
  flex: 0 0 22px;
  width: 22px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: #fff;
  cursor: pointer;
  position: relative;
}
.resp-filter-caret::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -2px 0 0 -4px;
  border: 4px solid transparent;
  border-top-color: var(--ink-soft);
}
.resp-filter-caret.on,
.resp-filter-split .resp-filter-btn.on + .resp-filter-caret {
  background: var(--brand-soft);
  border-color: rgba(11,110,110,.35);
}
.resp-filter-caret:disabled {
  opacity: .4;
  cursor: not-allowed;
}
.resp-filter-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 8;
  min-width: 148px;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 10px 28px rgba(21,32,40,.14);
}
.resp-filter-opt {
  appearance: none;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: inherit;
  font-size: .72rem;
  padding: 6px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.resp-filter-opt:hover { background: rgba(11,110,110,.08); }
.resp-filter-opt.on { background: var(--brand-soft); color: var(--brand-deep); font-weight: 650; }
.resp-filter-opt em { font-style: normal; color: var(--muted); font-size: .66rem; }
.ck-tree-col-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 6px;
  -webkit-overflow-scrolling: touch;
}
.ck-tree-mod, .ck-tree-item {
  appearance: none; font: inherit; width: 100%;
  display: flex; align-items: center; gap: 8px;
  text-align: left; cursor: pointer;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--ink);
  padding: 7px 8px; margin: 0 0 2px;
  transition: background .12s, border-color .12s;
}
.ck-tree-mod:hover, .ck-tree-item:hover {
  background: rgba(11,110,110,.06); border-color: rgba(11,110,110,.12);
}
.ck-tree-mod.on {
  background: #fff;
  border-color: rgba(11,110,110,.28);
  box-shadow: inset 3px 0 0 var(--brand);
}
.ck-tree-mod-name { flex: 1; font-weight: 650; font-size: .8rem; }
.ck-tree-mod-meta { font-size: .68rem; color: var(--muted); }
.ck-tree-mod-meta i { font-style: normal; color: var(--danger); font-weight: 700; }
.ck-tree-item.on {
  background: rgba(11,110,110,.1);
  border-color: rgba(11,110,110,.22);
  box-shadow: inset 3px 0 0 #2ec4c4;
}
.ck-tree-item .ck-tree-lv { flex: 0 0 auto; }
.ck-tree-id {
  flex: 0 0 auto; font-size: .64rem; color: var(--muted); min-width: 52px;
}
.ck-tree-title {
  flex: 1; min-width: 0; font-size: .78rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ck-tree-item.lv-reject { border-left: 2px solid var(--danger); }
.ck-tree-item.lv-deduct, .ck-tree-item.lv-warn { border-left: 2px solid var(--warn); }
.ck-tree-item.lv-tip { border-left: 2px solid #5b8fd4; }
.ck-tree-empty, .ck-tree-detail-empty, .ck-empty {
  padding: 24px 12px; text-align: center; font-size: .78rem;
}

.ck-detail { padding: 4px 6px 12px; border: 0; background: transparent; }
.ck-detail-h {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--line);
}
.ck-detail-mod { font-size: .72rem; color: var(--muted); font-weight: 650; }
.ck-field {
  display: grid; grid-template-columns: 72px minmax(0, 1fr);
  gap: 6px 10px; align-items: start; margin: 0 0 8px;
  font-size: .72rem; color: var(--muted);
}
.ck-field > span { padding-top: 6px; font-weight: 650; }
.ck-field.tall { align-items: stretch; }
.ck-field input, .ck-field select, .ck-field textarea {
  width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 8px; background: #fff; color: var(--ink); font-size: .78rem;
}
.ck-field textarea { resize: vertical; line-height: 1.45; min-height: 64px; }
.ck-lv {
  font-size: .62rem !important;
  padding: 1px 5px !important;
  border-radius: 4px !important;
  white-space: nowrap;
}
.ck-scope {
  font-size: .6rem; font-weight: 650; padding: 1px 5px; border-radius: 4px;
  white-space: nowrap;
}
.ck-scope.platform { background: #eef2f5; color: #5a6a78; }
.ck-scope.external { background: #f3eef8; color: #6b4f8a; }
.ck-scope.tpl { background: var(--brand-soft); color: var(--brand-deep); }

@media (max-width: 980px) {
  .ck-tree {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .ck-tree-col {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: 280px;
  }
  .ck-tree-col.detail { max-height: none; }
}
.badge {
  font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
}
.badge.mod { background: #eef2f5; color: var(--ink-soft); }
.badge.reject { background: var(--danger-soft); color: var(--danger); }
.badge.deduct { background: var(--warn-soft); color: var(--warn); }
.badge.ok { background: #e7f6ee; color: #1e7a46; }
.badge.pending { background: #eef2f5; color: #5b6b78; }
.badge.tip { background: #e8f0ff; color: #274b8a; }

select, textarea, #editDraft, #calibrateNote, .doc-edit {
  width: 100%; font: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
  background: #fbfcfd; color: var(--ink);
}
#editDraft, #calibrateNote, .doc-edit, textarea:not(.ck textarea) { min-height: 72px; resize: vertical; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.filter {
  padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; font-size: .74rem; cursor: pointer;
}
.filter.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.rows { display: grid; gap: 6px; }
.row {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px;
  padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
}
.row-main h4 { margin: 0 0 2px; font-size: .82rem; line-height: 1.35; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 2px; }
.row .consequence-hint {
  margin: 2px 0 0; font-size: .72rem; color: var(--muted); line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.row-sug { margin: 3px 0 0; font-size: .72rem; color: var(--ink-soft); }
.mod-empty { padding: 14px 8px; }
.lvl { font-size: .68rem; font-weight: 700; text-align: center; padding: 4px 0; border-radius: 6px; height: fit-content; }
.lvl.reject { background: var(--danger-soft); color: var(--danger); }
.lvl.warn { background: var(--warn-soft); color: var(--warn); }
.lvl.ok { background: var(--ok-soft); color: var(--ok); }
.lvl.tip { background: #e8f0ff; color: #274b8a; }
.row p { margin: 0; font-size: .74rem; color: var(--muted); line-height: 1.4; }
.scoring { margin-top: 14px; padding: 12px; border-radius: 12px; background: #eef4ff; border: 1px solid #c9d8f5; }
.scoring h4 { margin: 0 0 8px; color: #274b8a; }

/* ========== IDE 式双链锚定 ========== */
.btn-sm { padding: 5px 10px; font-size: .74rem; border-radius: 8px; }
.anchor-toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; align-items: end; }
.anchor-toolbar h2 { margin: 0; font-size: 1rem; }
.anchor-diff {
  display: grid; grid-template-columns: minmax(0, 1fr) 240px minmax(0, 1fr); gap: 0;
  min-height: min(76vh, 780px); height: calc(100vh - 168px);
  border: 1px solid #2a3540; border-radius: 10px; overflow: hidden;
  background: #1e252c; box-shadow: 0 12px 40px rgba(21,32,40,.18);
  width: 100%;
  position: relative;
}
.anchor-link-layer {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 20; overflow: visible;
}
.anchor-link-layer path {
  fill: none; stroke-width: 2; stroke-dasharray: 5 4;
  stroke-linecap: round; opacity: 0.95;
}
.anchor-link-layer path.link-tender { stroke: #e8b84a; }
.anchor-link-layer path.link-bid { stroke: #3ecfcf; }
.anchor-link-layer path.link-insert { stroke: #e07a3a; stroke-dasharray: 3 4; }
.anchor-link-layer circle {
  stroke-width: 1.5; fill: #1a2229;
}
.anchor-link-layer circle.dot-tender { stroke: #e8b84a; fill: #e8b84a; }
.anchor-link-layer circle.dot-bid { stroke: #3ecfcf; fill: #3ecfcf; }
.anchor-link-layer circle.dot-insert { stroke: #e07a3a; fill: #e07a3a; }
.anchor-link-layer text.link-cap {
  font-size: 10px; fill: #9ab0be; font-family: var(--font);
  pointer-events: none;
}
.diff-pane {
  display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background: #232b33; border-right: 1px solid #2f3a45;
  overflow: hidden; /* 防止 Word 预览溢出盖住中间栏 */
  position: relative;
  z-index: 1;
}
.diff-pane:last-child { border-right: 0; }
.diff-pane.mid {
  background: #1a2229;
  z-index: 5; /* 中间栏始终可点 */
  overflow: hidden;
}
.diff-pane-h {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid #2f3a45;
  background: #1a2229; color: #c5d0d8; flex-shrink: 0;
}
.diff-pane-h h3 { margin: 0; font-size: .78rem; font-weight: 650; letter-spacing: .02em; color: #e8eef2; }
.diff-pane-h .tag {
  font-size: .66rem; color: #8aa0b0; background: #2a3540;
  padding: 2px 8px; border-radius: 999px;
}
.anchor-filters {
  display: flex; flex-wrap: wrap; gap: 5px;
  padding: 8px 8px 6px;
  border-bottom: 1px solid #2f3a45;
  background: #161d23;
  flex-shrink: 0;
}
.anchor-filter {
  appearance: none; border: 1px solid #3a4654; background: #232b33;
  color: #9aadb8; font: inherit; font-size: .66rem; font-weight: 600;
  padding: 3px 8px; border-radius: 999px; cursor: pointer;
  line-height: 1.3; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.anchor-filter:hover { color: #e8eef2; border-color: #5a6a78; }
.anchor-filter.on {
  background: linear-gradient(145deg, var(--brand), var(--brand-mid));
  border-color: transparent; color: #fff;
}
.anchor-item.pass .anchor-item-title { color: #c8e8d6; }
.anchor-item.tone-pass { border-left: 2px solid #2f9e6a; }
.anchor-item.tone-reject { border-left: 2px solid #d45b4a; }
.anchor-item.tone-warn { border-left: 2px solid #c48a2a; }
.anchor-item.tone-muted { border-left: 2px solid #4a5866; }
.anchor-item.ignored-row { opacity: .72; }
.anchor-item.verify-row { border-left: 2px solid #6b7c8d; }
.anchor-item.readonly-row .anchor-item-title { color: #b8c4ce; }
.bubble-hl-gap { margin: 8px 0 0; color: #8a6d1a; font-size: 13px; line-height: 1.45; }
.docx-host .atb-suspect,
[data-atb-id].atb-suspect {
  outline: 2px dashed #c9a227;
  outline-offset: 1px;
  background: rgba(201, 162, 39, 0.14);
}
.anchor-item.readonly-row .anchor-item-title { color: #b8c4ce; }
.bid-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.doc-viewport {
  flex: 1; overflow: auto; min-height: 0;
  background: #525964;
  padding: 10px 8px 16px;
}
/* Word / PDF 原生预览：保持页宽，用缩放铺满可视区 */
.docx-host {
  max-width: none; margin: 0; min-height: 200px;
  background: transparent; overflow: visible;
  position: relative;
}
.docx-host > .atb-hl-layer {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
}
.atb-hl-frag {
  position: absolute;
  box-sizing: border-box;
  background: rgba(255, 224, 138, 0.42);
  outline: 1.5px solid #d4a017;
  pointer-events: none;
}
.atb-hl-frag.bid {
  background: rgba(255, 180, 120, 0.38);
  outline-color: #c45c26;
}
.atb-hl-frag.atb-done,
.atb-hl-frag.atb-pass {
  background: rgba(6, 118, 71, 0.18);
  outline-color: #067647;
}
.docx-scale-inner {
  transform-origin: top left;
  display: inline-block;
  vertical-align: top;
}
.docx-host .docx-wrapper {
  background: #fff; padding: 0; box-shadow: 0 2px 12px rgba(0,0,0,.28);
  max-width: none !important;
  width: max-content;
}
.docx-host .docx {
  background: #fff;
  max-width: none !important;
}
.docx-host .docx-wrapper > section.docx,
.docx-host section.docx {
  /* 保留 Word 页宽，由 JS scale 适配视口 */
  min-height: auto !important;
  margin: 0 auto 12px !important;
  box-sizing: border-box !important;
  overflow: visible;
}
.docx-host mark.atb-hl,
.docx-host .atb-hl {
  background: linear-gradient(90deg, #fff4c2, #ffe08a) !important;
  outline: 2px solid #d4a017;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  scroll-margin: 100px;
}
.docx-host mark.atb-hl-bid,
.docx-host .atb-hl-bid {
  background: #ffe8d6 !important;
  outline: 2px solid #c45c26;
  box-shadow: 0 0 0 3px rgba(196,92,38,.18);
  scroll-margin: 100px;
}
.docx-host img.atb-hl-bid {
  background: transparent !important;
  outline: 3px solid #c45c26;
  box-shadow: 0 0 0 4px rgba(196,92,38,.22);
  border-radius: 2px;
}
.docx-host tr.atb-hl-bid > td,
.docx-host tr.atb-hl-bid > th,
.docx-host td.atb-hl-bid,
.docx-host th.atb-hl-bid {
  background: #ffe8d6 !important;
  outline: 2px solid #c45c26;
  box-shadow: inset 0 0 0 2px rgba(196,92,38,.28);
}
.anchor-link-layer rect.box-tender {
  fill: rgba(232, 184, 74, 0.18);
  stroke: #e8b84a;
  stroke-width: 2;
  pointer-events: none;
}
.anchor-link-layer rect.box-bid {
  fill: rgba(62, 207, 207, 0.14);
  stroke: #3ecfcf;
  stroke-width: 2.2;
  pointer-events: none;
}
.docx-host .atb-hl-bid.atb-done,
.docx-host .atb-hl-bid.atb-pass {
  outline-color: #067647;
  background: #dff5e8 !important;
  box-shadow: 0 0 0 3px rgba(6,118,71,.15);
}
.docx-native-html {
  background: #fff; max-width: none; width: max-content; min-width: 640px; margin: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.28);
  padding: 8px 12px 24px; overflow: visible;
}
.docx-native-html img { max-width: 100%; height: auto; }
.docx-native-html table { border-collapse: collapse; }
.docx-native-html td, .docx-native-html th { border: 1px solid #ccc; padding: 4px 8px; }
.docx-fallback {
  background: #fff; color: #222; padding: 28px 32px; max-width: none; min-width: 520px; margin: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.28); font-size: 14px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.docx-fallback .doc-empty { color: #888; font-style: italic; }
.docx-fallback .fb-cap {
  font-size: 12px; color: #6a7a88; margin: 0 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid #e2e8ee; font-style: normal;
}
.docx-fallback.atb-bid-fallback p { margin: 0 0 .7em; }
.docx-fallback.atb-layout-fallback { white-space: normal; }
.docx-fallback.atb-layout-fallback p[data-atb-id] { margin: 0 0 .55em; }
.atb-layout-table {
  border-collapse: collapse;
  margin: 0 0 1em;
  width: 100%;
}
.atb-layout-table td, .atb-layout-table th {
  border: 1px solid #d0d7de;
  padding: 4px 8px;
  vertical-align: top;
}
.pdf-frame {
  width: 100%; height: 100%; min-height: 560px; border: 0; background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.28);
}
.atb-pdf-page {
  margin: 1.1em 0 .35em;
  font-size: 13px;
  color: #5a6a78;
  font-weight: 600;
}
.docx-host figure.atb-scan {
  margin: 8px 0 16px;
  padding: 0;
  max-width: 720px;
  min-height: 120px;
  scroll-margin: 100px;
}
.docx-host figure.atb-pdf-sheet {
  max-width: none;
  position: relative;
}
.docx-host .atb-pdf-hit {
  position: absolute;
  display: block;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.docx-host .docx img,
.docx-host .docx-wrapper img {
  max-width: 100%;
  height: auto;
}
.docx-host .atb-float-host,
.docx-host .atb-float-host td,
.docx-host table.atb-float-host,
.docx-host section.docx.atb-float-host {
  position: relative;
  overflow: visible !important;
}
.docx-host img.atb-float-img {
  position: absolute;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 4;
  max-width: none;
}
.docx-host figure.atb-scan img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid #d8e0e8;
  border-radius: 4px;
  background: #f4f7fa;
}
.docx-host figure.atb-scan.atb-hl-bid,
.docx-host figure.atb-scan.atb-hl-bid img {
  outline: 3px solid #c45c26;
  box-shadow: 0 0 0 4px rgba(196, 92, 38, 0.22);
}
/* 未提及：建议插入槽位（虚线框，可点击） */
.atb-insert-slot {
  margin: 10px 0 14px;
  border: 1.5px dashed #e07a3a;
  border-radius: 8px;
  background: rgba(224,122,58,.08);
  cursor: pointer;
  scroll-margin: 90px;
  transition: background .15s, border-color .15s, box-shadow .15s;
  animation: slotPulse 1.8s ease-in-out infinite;
}
.atb-insert-slot:hover {
  background: rgba(224,122,58,.16);
  border-color: #c45c26;
  box-shadow: 0 0 0 3px rgba(196,92,38,.18);
  animation: none;
}
.atb-insert-slot-inner {
  padding: 10px 12px;
  font-family: var(--font);
  display: flex; flex-direction: column; gap: 4px;
}
.atb-insert-slot-label {
  font-size: 11px; font-weight: 700; color: #c45c26; letter-spacing: .02em;
}
.atb-insert-slot-hint {
  font-size: 12px; color: #5a4a40; line-height: 1.45;
}
.atb-insert-slot-cta {
  font-size: 12px; font-weight: 650; color: #a24a1a; margin-top: 2px;
}
@keyframes slotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(224,122,58,.0); }
  50% { box-shadow: 0 0 0 4px rgba(224,122,58,.18); }
}
/* 文档内 Word 版式编辑（非独立输入框） */
.atb-doc-insert {
  margin: 8px 0 12px;
  padding: 0;
  border-left: 3px solid #c45c26;
  background: transparent;
  scroll-margin: 90px;
}
.atb-doc-insert-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 2px 8px 4px; margin: 0 0 4px;
  font-size: 11px; font-weight: 650; color: #a24a1a;
  font-family: var(--font); user-select: none;
}
.atb-doc-insert .atb-doc-edit {
  outline: none;
  min-height: 1.4em;
  caret-color: #c45c26;
  background: rgba(255, 244, 230, .55);
  box-shadow: inset 0 0 0 1px rgba(196,92,38,.25);
  border-radius: 2px;
}
.atb-doc-insert .atb-doc-edit:focus {
  background: rgba(255, 248, 236, .9);
  box-shadow: inset 0 0 0 1.5px rgba(196,92,38,.45);
}
.atb-doc-inplace.atb-doc-edit {
  background: rgba(255, 244, 230, .55) !important;
  box-shadow: inset 0 0 0 1.5px rgba(196,92,38,.4);
  outline: none;
  caret-color: #c45c26;
}
.atb-doc-committed {
  border-left-color: #067647;
}
.atb-doc-committed .atb-doc-insert-bar { color: #067647; }
.atb-doc-committed-p {
  background: rgba(232, 247, 239, .45);
}

/* 兼容旧插入块样式 */
.atb-insert-block {
  margin: 12px 0 16px;
  border: 2px solid #c45c26;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff8f2, #fff);
  box-shadow: 0 0 0 3px rgba(196,92,38,.16), 0 8px 20px rgba(0,0,0,.08);
  overflow: hidden;
  scroll-margin: 80px;
}
.atb-insert-h {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 10px; background: #fff0e6; border-bottom: 1px solid #f0d0b8;
  font-size: 12px; font-weight: 700; color: #a24a1a; font-family: var(--font);
}
.atb-insert-body {
  padding: 12px 14px; min-height: 72px; outline: none;
  font-size: 14px; line-height: 1.7; color: #1c1c1c; white-space: pre-wrap;
  font-family: "PingFang SC", "Noto Sans SC", sans-serif;
}
.atb-insert-body:focus { background: #fffefb; }
.icon-btn {
  appearance: none; border: 1px solid #e0c4ae; background: #fff; color: #a24a1a;
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  cursor: pointer; padding: 0; flex-shrink: 0;
}
.icon-btn:hover { background: #fff7f0; border-color: #c45c26; }
.icon-btn.copied { color: #067647; border-color: #8fd4ad; background: #eefaf3; }
.bid-edit-dock {
  flex-shrink: 0; border-top: 1px solid #2f3a45; background: #151c22; padding: 8px 12px;
}
.bid-edit-dock-h {
  font-size: .72rem; color: #8aa0b0; margin-bottom: 0; font-family: var(--font);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.bid-edit-dock .icon-btn {
  border-color: #3a4654; background: #232b33; color: #c5d0d8;
}
.bid-edit-dock .icon-btn:hover { background: #2a3540; border-color: #5a6a78; color: #fff; }
.bid-edit-dock .icon-btn.copied { color: #5dcea0; border-color: #2d5a45; background: #1a2e26; }
.bid-edit-dock .bid-edit-area {
  min-height: 100px; background: #fffef8; color: #1c1c1c;
  font-family: ui-sans-serif, system-ui, "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 13px; line-height: 1.6;
}
/* 待处理列表：点选后在该项下方展开气泡说明 */
.anchor-list {
  overflow-x: hidden;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 8px 16px;
  -webkit-overflow-scrolling: touch;
}
.anchor-block {
  margin: 0 0 8px;
  position: relative;
}
.anchor-block:has(.anchor-item.active) {
  border-radius: 10px;
  background: rgba(11,110,110,.1);
  box-shadow: 0 0 0 1px rgba(56,180,180,.35);
  overflow: hidden;
}
.anchor-item {
  display: block;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: #d5dee6;
  border-radius: 8px;
  padding: 9px 10px;
  margin: 0;
  cursor: pointer;
  font: inherit;
  position: relative;
  z-index: 1;
  transition: background .15s, border-color .15s;
  user-select: none;
}
.anchor-item:hover { background: rgba(255,255,255,.04); border-color: #3a4654; }
.anchor-item:focus { outline: none; border-color: rgba(56,180,180,.55); }
.anchor-item.active {
  background: rgba(11,110,110,.18);
  border-color: transparent;
  box-shadow: inset 3px 0 0 #2ec4c4;
  border-radius: 0;
}
.anchor-block:has(.anchor-item.active) .anchor-item.active {
  border-bottom: 1px dashed rgba(56,180,180,.28);
}
.anchor-item.done { background: rgba(6,118,71,.12); }
.anchor-item.done::after {
  content: "✓ 已处理";
  position: absolute; top: 8px; right: 8px;
  font-size: .62rem; font-weight: 700; color: #5dcea0;
  letter-spacing: .02em;
  pointer-events: none;
}
.anchor-item.done.active::after { color: #8eebc0; }
.anchor-item-tags {
  display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 4px;
}
.anchor-item .lvl {
  display: inline-block; padding: 1px 7px;
  font-size: .66rem; border-radius: 4px;
}
.anchor-item-title {
  font-size: .78rem; color: #eef3f7; font-weight: 650;
  padding-right: 52px; line-height: 1.35; margin-bottom: 3px;
}
.anchor-item-mod { font-size: .68rem; color: #8aa0b0; }
.anchor-item .badge { margin: 0; pointer-events: none; }

/* 选中项下方展开的说明：从属于上方条目 */
.anchor-bubble {
  position: relative;
  margin: 0;
  padding: 8px 12px 12px 18px;
  background: rgba(8,12,16,.55);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: .74rem;
  color: #b8c6d0;
  line-height: 1.5;
  animation: bubbleIn .18s ease;
}
.anchor-bubble::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 10px;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, rgba(46,196,196,.7), rgba(46,196,196,.15));
  border-radius: 2px;
  transform: none;
}
.anchor-bubble::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ec4c4;
  box-shadow: 0 0 0 3px rgba(46,196,196,.18);
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.anchor-bubble .bubble-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 0 8px;
}
.anchor-bubble .bubble-head-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: #7ec8c8;
  text-transform: none;
}
.anchor-bubble .bubble-head-done {
  font-size: .64rem;
  font-weight: 700;
  color: #5dcea0;
}
.anchor-bubble .bubble-section {
  display: grid;
  grid-template-columns: 2.2em 1fr;
  gap: 6px 8px;
  margin: 6px 0;
  align-items: start;
}
.anchor-bubble .bubble-k {
  color: #8aa0b0;
  font-weight: 650;
  font-size: .7rem;
  padding-top: 1px;
}
.anchor-bubble .bubble-v {
  color: #c5d0d8;
}
.anchor-bubble .insert-hint {
  margin: 6px 0;
  color: #e8a070;
}
.anchor-bubble .bubble-tip {
  margin: 4px 0 0;
  color: #8aa0b0;
  font-size: .7rem;
}
.anchor-bubble p { margin: 4px 0; }
.anchor-bubble .bubble-actions {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(56,180,180,.2);
}
.anchor-bubble .bubble-actions .btn { padding: 4px 8px; font-size: .7rem; }
.anchor-bubble .bubble-actions [data-bubble-act="ignore"] {
  margin-left: auto;
  color: #9aa8b4;
  border-color: #3a4654;
}

/* 已忽略区 */
.anchor-ignored-wrap {
  flex: 0 0 auto;
  border-top: 1px solid #2f3a45;
  background: #151c22;
}
.anchor-ignored-toggle {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #8aa0b0;
  font: inherit;
  font-size: .74rem;
  font-weight: 650;
  padding: 8px 12px;
  cursor: pointer;
}
.anchor-ignored-toggle:hover { color: #c5d0d8; background: rgba(255,255,255,.03); }
.anchor-ignored-toggle::after {
  content: " ▸";
  font-size: .7rem;
}
.anchor-ignored-toggle.open::after { content: " ▾"; }
.anchor-ignored-list {
  max-height: 180px;
  overflow: auto;
  padding: 0 8px 10px;
}
.anchor-ignored-item {
  border: 1px dashed #3a4654;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  cursor: pointer;
  opacity: .78;
  transition: .15s;
}
.anchor-ignored-item:hover {
  opacity: 1;
  border-color: rgba(56,180,180,.45);
  background: rgba(11,110,110,.12);
}
.anchor-ignored-item .anchor-item-title { color: #b8c6d0; }
.consequence-hint {
  margin: 4px 0 6px !important;
  font-size: .72rem !important;
  color: var(--ink-soft);
  line-height: 1.45;
}
.omit-means {
  margin: 4px 0 !important;
  font-size: .72rem !important;
  color: #e8a070;
  font-weight: 600;
}
.anchor-bubble .consequence-hint { color: #c5d0d8; }
.anchor-bubble .omit-means { color: #e8a070; }
.anchor-bubble .bubble-fix-text {
  display: block;
  margin-top: 4px;
  padding: 8px 10px;
  background: rgba(224, 122, 58, .12);
  border-left: 3px solid #e07a3a;
  border-radius: 4px;
  color: #f0e6dc;
  font-size: .78rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.suggest-box {
  border-top: 1px solid #2f3a45; padding: 8px 12px; background: #1a2229;
  font-size: .74rem; color: #b8c6d0; line-height: 1.45; max-height: 100px; overflow: auto;
  flex-shrink: 0; font-family: var(--font);
}
.suggest-box b { color: #e8a070; }

@media (max-width: 1200px) {
  .anchor-diff { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .diff-pane { min-height: 320px; border-right: 0; border-bottom: 1px solid #2f3a45; }
  .doc-viewport { max-height: 420px; }
}

/* calibrate */
.calibrate-layout { display: grid; grid-template-columns: 260px 1fr 240px; gap: 12px; min-height: 480px; }
.cal-items { display: grid; gap: 8px; max-height: 520px; overflow: auto; }
.cal-card {
  text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 10px; cursor: pointer; font: inherit;
}
.cal-card.active { border-color: rgba(11,110,110,.45); background: #f3fbfb; }
.cal-card b { display: block; font-size: .82rem; margin-bottom: 4px; }
.cal-card span { font-size: .72rem; color: var(--muted); }
.cal-thread {
  min-height: 240px; max-height: 320px; overflow: auto; padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: #f7fafb; margin-bottom: 10px;
}
.msg { max-width: 92%; padding: 10px 12px; border-radius: 12px; font-size: .82rem; line-height: 1.55; margin-bottom: 10px; }
.msg.sys { background: #fff; border: 1px solid var(--line); color: var(--ink-soft); }
.msg.user { margin-left: auto; background: linear-gradient(145deg, var(--brand), var(--brand-mid)); color: #fff; }
.msg.ai { background: #fff; border: 1px solid #c5e4e2; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.quick button {
  font: inherit; font-size: .72rem; padding: 5px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: #f7fafb; cursor: pointer;
}
.score-box { padding: 14px; border-radius: 12px; background: #fff; border: 1px solid var(--line); margin-bottom: 10px; }
.score-label { font-size: .72rem; color: var(--muted); font-family: var(--display); }
.score-value { font-family: var(--display); font-size: 1.8rem; font-weight: 700; line-height: 1.15; }
.state-cards { display: grid; gap: 8px; margin-bottom: 10px; }
.state-card { padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: .74rem; }
.state-card b { display: block; margin-bottom: 3px; }
.state-card.ok { background: var(--ok-soft); border-color: #b7e4c7; }
.state-card.warn { background: var(--warn-soft); border-color: #f0d2a8; }
.state-card.brand { background: var(--brand-soft); border-color: #9fd4d4; }
.result-box { padding: 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: .8rem; line-height: 1.5; white-space: pre-wrap; }
.grid-edit { display: grid; grid-template-columns: 220px 1fr 240px; gap: 12px; }
.diff { font-size: .78rem; color: var(--ink-soft); line-height: 1.5; }
.report-cover { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; align-items: stretch; }
.report-card { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); min-width: 0; }
.report-cover .report-card { height: 100%; min-height: 0; }
.report-card.danger { background: var(--danger-soft); border-color: #f0b4ae; }
.report-card.warn { background: var(--warn-soft); border-color: #f0d2a8; }
.report-card.tip { background: #eef4ff; border-color: #c9d8f5; }
.report-card-h {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-bottom: 6px; font-size: .82rem;
}
.report-card-h em { font-style: normal; font-weight: 700; font-size: .95rem; }
.report-card-body { display: flex; flex-direction: column; gap: 0; overflow-x: hidden; overflow-y: auto; min-height: 0; }
.report-cover .report-card-body { flex: 1 1 auto; height: 260px; min-height: 260px; max-height: 260px; }
.report-cover-line {
  flex: 0 0 auto;
  min-height: 1.55em;
  font-size: .76rem; line-height: 1.45; padding: 5px 0;
  border-top: 1px dashed rgba(0,0,0,.06);
  white-space: normal; overflow: visible; word-break: break-word;
}
.report-cover-line:first-child { border-top: 0; }
.report-mods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; align-items: start; }
.report-mod-list { display: flex; flex-direction: column; max-height: 280px; overflow: auto; min-height: 0; }
.toast {
  display: none !important;
}
.celebrate {
  position: fixed; left: 50%; top: 18%; transform: translateX(-50%) scale(.9);
  z-index: 60; padding: 14px 18px; border-radius: 14px;
  background: linear-gradient(145deg, var(--brand), var(--brand-mid)); color: #fff;
  font-weight: 700; box-shadow: 0 16px 40px rgba(11,110,110,.35);
  opacity: 0; pointer-events: none; transition: .35s ease;
}
.celebrate.show { opacity: 1; transform: translateX(-50%) scale(1); }

/* —— 分析进度动效（简约正式） —— */
.analyze-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: grid; place-items: center;
  background:
    radial-gradient(600px 320px at 50% 35%, rgba(11,110,110,.12), transparent 70%),
    rgba(18, 28, 34, .42);
  backdrop-filter: blur(6px);
  animation: ao-in .28s ease;
}
.analyze-overlay.hidden { display: none; }
@keyframes ao-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.analyze-card {
  width: min(420px, calc(100vw - 32px));
  padding: 28px 28px 24px;
  border-radius: 16px;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(213,221,227,.95);
  box-shadow: 0 24px 60px rgba(18,28,34,.22);
  text-align: center;
}
.analyze-orb {
  position: relative; width: 72px; height: 72px; margin: 0 auto 14px;
}
.analyze-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1.5px solid transparent;
  border-top-color: var(--brand);
  border-right-color: rgba(11,110,110,.25);
  animation: ao-spin 1.25s linear infinite;
}
.analyze-ring.delay {
  inset: 8px;
  border-top-color: rgba(196,92,38,.85);
  border-right-color: rgba(196,92,38,.2);
  animation-duration: 1.8s;
  animation-direction: reverse;
}
.analyze-core {
  position: absolute; inset: 16px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--brand), var(--brand-mid));
  color: #fff; font-family: var(--display); font-weight: 700; font-size: .72rem;
  letter-spacing: .04em;
  box-shadow: 0 6px 16px rgba(11,110,110,.28);
}
@keyframes ao-spin { to { transform: rotate(360deg); } }
.analyze-brand {
  font-family: var(--display); font-size: .72rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--brand-deep);
  margin-bottom: 6px;
}
.analyze-title {
  margin: 0 0 6px; font-size: 1.05rem; font-weight: 700; color: var(--ink);
}
.analyze-msg {
  margin: 0 0 16px; min-height: 1.35em;
  font-size: .8rem; color: var(--muted); line-height: 1.45;
}
.analyze-track {
  position: relative; height: 3px; border-radius: 999px;
  background: #e6eef0; overflow: hidden; margin-bottom: 6px;
}
.analyze-bar {
  height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-deep), var(--brand), #2a9a9a);
  background-size: 200% 100%;
  transition: width .55s cubic-bezier(.22,.8,.28,1);
  animation: ao-shimmer 2.2s ease-in-out infinite;
}
@keyframes ao-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.analyze-pct {
  font-family: var(--display); font-size: .78rem; font-weight: 600;
  color: var(--brand-deep); margin-bottom: 16px;
}
.analyze-steps {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0;
  text-align: left; border-top: 1px solid var(--line);
}
.analyze-steps li {
  display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: center;
  padding: 10px 2px; font-size: .78rem; color: var(--muted);
  border-bottom: 1px solid #eef2f4;
}
.analyze-steps li:last-child { border-bottom: 0; }
.analyze-steps .dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid #c5d0d6; background: #fff; justify-self: center;
}
.analyze-steps li.done { color: var(--ink-soft); }
.analyze-steps li.done .dot {
  border-color: var(--brand); background: var(--brand);
  box-shadow: inset 0 0 0 2px #fff;
}
.analyze-steps li.active {
  color: var(--ink); font-weight: 600;
}
.analyze-steps li.active .dot {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11,110,110,.18);
  animation: ao-pulse 1.4s ease-in-out infinite;
}
@keyframes ao-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(11,110,110,.14); }
  50% { box-shadow: 0 0 0 5px rgba(11,110,110,.08); }
}
.analyze-stale {
  margin: 12px 0 0; padding: 8px 10px; border-radius: 8px;
  background: var(--warn-soft); border: 1px solid #f0d2a8;
  color: var(--warn); font-size: .74rem; line-height: 1.45; text-align: left;
}
.analyze-actions {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
}
.analyze-overlay.is-error .analyze-ring { animation: none; border-color: #e8b4ae; border-top-color: var(--danger); }
.analyze-overlay.is-error .analyze-core {
  background: linear-gradient(145deg, #b42318, #d4453a);
  box-shadow: 0 6px 16px rgba(180,35,24,.28);
}
.analyze-overlay.is-error .analyze-bar {
  background: linear-gradient(90deg, #b42318, #d4453a);
  animation: none;
}
.analyze-overlay.is-error .analyze-pct { color: var(--danger); }
.analyze-overlay.is-error .analyze-title { color: var(--danger); }
.analyze-overlay .analyze-orb .analyze-ring { pointer-events: none; }
.ck-sum.full {
  color: var(--brand-deep); border-color: rgba(11,110,110,.28); background: var(--brand-soft);
}
/* 响应对照：招标原文 / 投标响应 / 澄清 */
.ck-tree-col.detail .ck-tree-col-body {
  padding: 0;
  background: #f3f6f7;
}
.resp-detail {
  padding: 14px 16px 18px;
}
.resp-detail .ck-detail-h {
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding-bottom: 12px;
}
.resp-detail .lvl {
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.resp-detail h4 {
  margin: 0 0 14px;
  font-size: 1.05rem;
  line-height: 1.45;
  font-weight: 700;
  color: var(--ink);
}
.resp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 12px;
}
.resp-pane {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px 12px;
  min-width: 0;
}
.resp-pane.tender { border-left: 3px solid var(--brand); }
.resp-pane.bid { border-left: 3px solid var(--accent); }
.resp-label {
  font-size: .68rem;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 650;
  letter-spacing: .04em;
}
.resp-loc {
  font-size: .7rem;
  color: var(--brand-deep);
  margin: 0 0 6px;
  line-height: 1.4;
}
.resp-text {
  font-size: .8rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin: 0;
  white-space: pre-wrap;
}
.resp-block {
  margin: 0 0 10px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.resp-block.sug {
  background: var(--accent-soft);
  border-color: #f0d4c4;
}
.resp-block.sug .resp-label { color: var(--accent); }
.resp-block .resp-text { color: var(--ink); }
.resp-clarify { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
.clar-input {
  width: 100%; margin: 4px 0 8px; min-height: 52px; font-size: .78rem;
  border-radius: 8px; border: 1px solid var(--line); padding: 8px;
}
.resp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.atb-corpus-fallback {
  margin-top: 8px; padding: 10px; border: 1px dashed #e8b84a; border-radius: 8px;
  background: #fffbeb; font-size: .78rem; line-height: 1.45;
}
.atb-corpus-fallback .fb-cap {
  font-size: .68rem; color: var(--muted); margin-bottom: 6px; font-weight: 600;
}
.src-file-select {
  max-width: 160px; font-size: .7rem; padding: 2px 6px;
  border-radius: 6px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-soft);
}
.src-file-select.hidden { display: none; }
.diff-pane-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.report-dl { display: flex; gap: 8px; flex-wrap: wrap; }
.report-summary { margin-bottom: 8px; }
.report-doc {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.report-mast {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--line);
  background: #f4faf8;
}
.report-mast-kicker {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--brand-deep);
  text-transform: uppercase;
}
.report-mast-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin-top: 6px;
}
.report-mast h3 { margin: 0; font-size: 1.15rem; line-height: 1.35; }
.report-grade {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
  flex: 0 0 auto;
}
.report-grade strong {
  font-size: 1.5rem;
  line-height: 1;
  color: var(--brand-deep);
}
.report-kicker { font-size: .68rem; color: var(--muted); letter-spacing: .04em; }
.report-verdict {
  margin: 14px 16px 0;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  border-left-width: 4px;
}
.report-verdict.stop { background: var(--danger-soft); border-color: #f0b4ae; border-left-color: var(--danger); }
.report-verdict.caution { background: var(--warn-soft); border-color: #f0d2a8; border-left-color: var(--warn); }
.report-verdict.go { background: var(--ok-soft); border-color: #b7e4c7; border-left-color: var(--ok); }
.report-verdict.mute { background: #f6f8f9; }
.report-verdict-h { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.report-verdict p { margin: 0; font-size: .82rem; line-height: 1.55; color: var(--ink-soft); }
.report-overview { margin: 8px 0 0 !important; font-size: .8rem; line-height: 1.5; color: var(--ink-soft); }
.report-doc .report-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 14px 16px 0;
}
.report-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 4px;
  text-align: center;
}
.report-stat b { display: block; font-size: 1.15rem; color: var(--ink); }
.report-stat span { font-size: .65rem; color: var(--muted); }
.report-stat.ok b { color: var(--ok); }
.report-stat.reject b { color: var(--danger); }
.report-stat.warn b { color: var(--warn); }
.report-section { margin: 16px 16px 0; }
.report-section-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.report-section-h b { font-size: .82rem; }
.pub-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
}
.pub-id strong { display: block; font-size: .95rem; }
.pub-st { display: inline-block; margin-top: 4px; font-size: .75rem; color: var(--brand-deep); }
.pub-id p, .pub-tax, .pub-quals, .pub-scope { margin: 6px 0 0; font-size: .78rem; line-height: 1.5; color: var(--ink-soft); }
.pub-risks { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.pub-risks li {
  display: flex; gap: 8px; align-items: baseline;
  border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: .75rem;
}
.pub-risks .ok { color: var(--ok); }
.pub-risks .warn { color: var(--warn); }
.pub-scan { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .75rem; }
.pub-scan th, .pub-scan td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: top; }
.pub-scan th { color: var(--muted); font-weight: 600; }
.pub-ok { color: var(--ok); font-weight: 650; }
.pub-bad { color: var(--danger); font-weight: 650; }
.pub-wait { color: var(--muted); }
.pub-disc { margin-top: 10px !important; }
.report-finding-pub { margin: 6px 0 0; font-size: .78rem; color: #5a4a78; }
.report-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.report-mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
}
.report-mod {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.report-mod:hover { border-color: rgba(11,110,110,.4); }
.report-mod-h { display: flex; justify-content: space-between; font-size: .78rem; font-weight: 650; }
.report-mod-bar {
  height: 6px;
  margin: 8px 0 6px;
  border-radius: 999px;
  background: #eef2f4;
  overflow: hidden;
}
.report-mod-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.report-mod.reject .report-mod-bar i { background: var(--danger); }
.report-mod.warn .report-mod-bar i { background: var(--warn); }
.report-mod.ok .report-mod-bar i { background: var(--ok); }
.report-findings { display: grid; gap: 10px; }
.report-finding {
  appearance: none;
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}
.report-finding.reject {
  background: var(--danger-soft);
  border-color: #f0b4ae;
  box-shadow: inset 4px 0 0 var(--danger);
}
.report-finding.warn {
  background: var(--warn-soft);
  border-color: #f0d2a8;
  box-shadow: inset 4px 0 0 var(--warn);
}
.report-finding:hover { filter: brightness(.99); }
.report-finding-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 6px; }
.report-finding h4 { margin: 0 0 6px; font-size: .95rem; line-height: 1.4; }
.report-finding-keys { margin: 0 0 6px; font-size: .72rem; color: var(--muted); line-height: 1.45; }
.report-finding-why { margin: 0 0 6px; font-size: .8rem; line-height: 1.55; color: var(--ink-soft); }
.report-finding-do { margin: 0 0 4px; font-size: .8rem; line-height: 1.5; }
.report-finding-do b { margin-right: 6px; color: var(--accent); font-size: .72rem; }
.report-finding-loc { margin: 0; font-size: .7rem; color: var(--brand-deep); }
.report-panes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}
.report-panes.one { grid-template-columns: 1fr; }
.report-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.report-pane.reject { border-color: #f0b4ae; }
.report-pane.warn { border-color: #efd2a6; }
.report-pane.ok { border-color: #cfe6d8; }
.report-pane.flash { box-shadow: 0 0 0 3px rgba(11,110,110,.22); }
.report-pane-h {
  flex: 0 0 auto;
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
  background: #f6f9fa;
}
.report-pane.reject .report-pane-h { background: #fdf6f5; }
.report-pane.warn .report-pane-h { background: #fffaf3; }
.report-pane.ok .report-pane-h { background: #f6fbf8; }
.report-pane-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}
.report-pane-title b { font-size: .88rem; }
.report-pane-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.report-pane-filter .resp-filter-btn { padding: 3px 8px; font-size: .7rem; }
.report-pane-body {
  flex: 1 1 auto;
  max-height: 280px;
  min-height: 132px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.report-pane-body .report-item {
  grid-template-columns: auto auto minmax(0, 1fr);
  padding: 8px 12px;
}
.report-pane-body .report-list-empty { padding: 18px 12px; text-align: center; }
.report-list {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.report-list-empty { padding: 14px 4px; }
.report-item {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.report-item:first-child { border-top: 0; }
.report-item:hover { background: #f4fbfb; }
.report-item.reject { background: var(--danger-soft); }
.report-item.warn { background: var(--warn-soft); }
.report-item.ok { background: #fff; }
.report-item .lvl { padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.report-flag {
  font-size: .66rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: #eef2f5;
  color: var(--ink-soft);
}
.report-flag.reject { background: var(--danger); color: #fff; }
.report-flag.warn { background: var(--warn); color: #fff; }
.report-flag.ok { background: var(--ok-soft); color: var(--ok); }
.report-item-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.report-item-title { font-size: .82rem; font-weight: 650; line-height: 1.4; color: var(--ink); }
.report-item.reject .report-item-title,
.report-item.warn .report-item-title { font-weight: 700; }
.report-item-meta { font-size: .68rem; color: var(--muted); line-height: 1.4; }
.report-item-sug { font-size: .72rem; color: var(--ink-soft); line-height: 1.45; }
.report-legend {
  margin: 16px 16px 16px;
  padding: 10px 12px;
  border-top: 1px dashed var(--line);
  font-size: .72rem;
  line-height: 1.55;
  color: var(--muted);
  display: grid;
  gap: 4px;
}
.report-legend b { margin-right: 6px; color: var(--ink-soft); }

@media (max-width: 900px) {
  .resp-grid { grid-template-columns: 1fr; }
  .report-mast-row, .report-grade { align-items: flex-start; text-align: left; }
  .report-doc .report-stats { grid-template-columns: repeat(3, 1fr); }
  .report-panes { grid-template-columns: 1fr; }
  .report-cover .report-card-body { height: auto; min-height: 0; max-height: 260px; }
}

@media (max-width: 1200px) {
  .topbar { flex-wrap: wrap; }
  .grid-2, .grid-edit, .calibrate-layout { grid-template-columns: 1fr; }
  .anchor-diff { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .diff-pane { min-height: 42vh; }
  .diff-pane.mid { min-height: 28vh; order: -1; }
  .row { grid-template-columns: 64px 1fr; }
}

.upload-single { max-width: 760px; }
.file-list li { align-items: center; }
.file-list li span:first-child { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .file-name { min-width: 0; }
.file-list .file-meta {
  display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto;
  font-size: .7rem; color: var(--muted);
}
.kind-tag {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-deep);
  font-size: .66rem; font-weight: 650; letter-spacing: .02em;
}
.kind-tag[data-kind="招标文件"] { background: #d7efef; color: #085555; }
.kind-tag[data-kind="补遗答疑"] { background: #e0e7ff; color: #3730a3; }
.kind-tag[data-kind="商务标"] { background: #f8e6db; color: #c45c26; }
.kind-tag[data-kind="技术标"] { background: #e8f0ff; color: #274b8a; }
.kind-tag[data-kind="资质材料"] { background: #f3e8ff; color: #6d28d9; }
.kind-tag[data-kind="报价清单"] { background: #e8f7ef; color: #067647; }
.kind-tag[data-kind="证照或附图"] { background: #fff4e5; color: #b54708; }
.kind-tag[data-kind="不纳入"] { background: #eef1f3; color: #6b7c88; }
.file-list li.skipped .kind-tag { background: #eef1f3; color: var(--muted); }
.ck-panel-h { align-items: flex-start; }
.ck-panel-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }
#tab-modules.tab {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 120px);
}
#tab-modules .ck-tree { flex: 1 1 auto; }
.source-view-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
}
.source-view-bar.hidden { display: none !important; }
.source-view-bar h2 { margin: 0; font-size: 1rem; }
.source-view-bar .sub { margin: 0; }
.workspace.source-focus > .project-head { display: none !important; }
.workspace.source-focus .anchor-toolbar,
.workspace.source-focus #anchorSuggest { display: none !important; }
.workspace.source-focus #tab-anchor {
  min-height: calc(100vh - 96px);
  padding-top: 8px;
}
.workspace.source-focus .anchor-diff {
  height: calc(100vh - 118px);
  min-height: 520px;
}
.report-overview { margin: 8px 0 0; font-size: .8rem; line-height: 1.5; color: var(--ink-soft); }
#tab-report .disclaimer {
  margin-top: 12px;
  padding: 8px 12px;
  font-size: .7rem;
}

.main:has(#tab-write:not(.hidden)),
.workspace:has(#tab-write:not(.hidden)),
.work-pane:has(#tab-write:not(.hidden)) {
  overflow: hidden;
  min-height: 0;
}
.main:has(#tab-write:not(.hidden)) {
  padding: 8px 12px 0;
  gap: 8px;
}
.workspace:has(#tab-write:not(.hidden)) {
  gap: 8px;
}
.workspace:has(#tab-write:not(.hidden)) .project-head {
  padding: 8px 12px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 12px;
}
.workspace:has(#tab-write:not(.hidden)) .project-head h2 { display: none; }
.workspace:has(#tab-write:not(.hidden)) .crumbs { margin-bottom: 0; }
.workspace:has(#tab-write:not(.hidden)) .meta {
  font-size: .72rem;
  gap: 4px 12px;
}
.workspace:has(#tab-write:not(.hidden)) .head-notice {
  font-size: .72rem;
}
.workspace:has(#tab-write:not(.hidden)) .meta-review { display: none; }
.workspace:has(#tab-write:not(.hidden)) .ph-radar { display: none !important; }
.workspace:has(#tab-write:not(.hidden)) .btn-run {
  padding: 7px 14px;
  font-size: .8rem;
  box-shadow: 0 4px 10px rgba(196, 92, 38, .2);
}
.workspace:has(#tab-write:not(.hidden)) .ph-cta-hint { display: none; }
.workspace:has(.write-wizard[data-phase="write"]) #phCtaWrite { display: none !important; }
#tab-write:not(.hidden) {
  display: flex; flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 8px 12px 0;
}
#tab-library:not(.hidden) {
  display: flex; flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}
#tab-library .panel-h { flex: 0 0 auto; }
.write-wizard {
  display: flex; flex-direction: column; gap: 8px;
  flex: 1 1 auto; min-height: 0; overflow: hidden;
}
.write-vol-bar {
  flex: 0 0 auto;
  margin: -8px -12px 2px;
  padding: 0 8px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.write-vols {
  display: flex;
  width: 100%;
}
.write-vols.is-busy { pointer-events: none; opacity: .55; }
.write-vol {
  flex: 1 1 0;
  min-width: 0;
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin: 0;
  padding: 10px 6px 8px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: .86rem;
  font-weight: 650;
  line-height: 1.25;
  color: var(--muted);
  cursor: pointer;
}
.write-vol:hover {
  color: var(--ink);
  background: rgba(11, 110, 110, .05);
}
.write-vol.on {
  color: var(--brand-deep);
  background: var(--brand-soft);
  border-bottom-color: var(--brand);
  border-bottom-width: 3px;
  box-shadow: inset 0 -3px 0 var(--brand);
}
.write-vol-name {
  text-align: center;
}
.write-vol-st {
  font-size: .64rem;
  font-weight: 500;
  color: var(--muted);
}
.write-vol.on .write-vol-st { color: var(--brand-deep); font-weight: 650; }
.write-vol:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}
.write-steps {
  display: flex; gap: 8px; list-style: none; margin: 0; padding: 0;
}
.write-steps li {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 6px; border-radius: 999px;
  font-size: .8rem; color: var(--muted); cursor: pointer;
  background: rgba(255,255,255,.7); border: 1px solid var(--line);
}
.write-steps li span {
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: #e8eef0; color: var(--ink-soft);
  font-size: .7rem; font-weight: 700;
}
.write-steps li.on {
  color: #fff;
  border-color: var(--brand);
  background: linear-gradient(145deg, var(--brand), var(--brand-mid));
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(11,110,110,.28);
}
.write-steps li.on span { background: #fff; color: var(--brand-deep); }
.write-steps li.done:not(.on) {
  color: var(--brand-deep);
  border-color: rgba(11,110,110,.28);
  background: #fff;
}
.write-steps li.done:not(.on) span { background: #c8f0d8; color: #0a5c36; }
.write-steps li.is-locked {
  opacity: .4;
  cursor: not-allowed;
}
.write-steps, .write-step-lead { flex: 0 0 auto; }
.write-steps.is-busy { pointer-events: none; opacity: .55; }
.write-tree-actions.is-busy { pointer-events: none; opacity: .45; }
.write-tree-actions label.btn.is-disabled {
  opacity: .45; pointer-events: none; cursor: not-allowed;
}
.write-step-lead { margin: 0; font-size: .82rem; color: var(--ink-soft); line-height: 1.55; }
.write-setup {
  display: flex; flex-direction: column;
  flex: 1 1 auto; min-height: 0;
  max-width: 640px; width: 100%;
}
.write-setup-dots {
  display: flex; gap: 6px; list-style: none; margin: 0 0 10px; padding: 0;
  flex: 0 0 auto;
}
.write-setup-dots li {
  font-size: .72rem; color: var(--muted); padding: 2px 8px; border-radius: 999px;
  cursor: pointer;
}
.write-setup-dots li.on { color: var(--brand-deep); background: var(--brand-soft); font-weight: 650; }
.write-setup-pane { display: none; }
.write-setup[data-setup="volume"] .write-setup-pane[data-setup="volume"],
.write-setup[data-setup="refs"] .write-setup-pane[data-setup="refs"],
.write-setup[data-setup="source"] .write-setup-pane[data-setup="source"] {
  display: block;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.write-path-matrix {
  display: grid;
  gap: 0;
  margin: 12px 0 14px;
}
.write-path-matrix--refs {
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
  grid-template-rows: auto 32px auto;
  grid-template-areas:
    "a link1 b"
    "v1  .   v2"
    "c link2 d";
}
.write-path-matrix--refs .write-path-node:nth-child(1) { grid-area: a; }
.write-path-matrix--refs .write-path-conn:nth-child(2) { grid-area: link1; }
.write-path-matrix--refs .write-path-node:nth-child(3) { grid-area: b; }
.write-path-matrix--refs .write-path-conn:nth-child(4) { grid-area: v1; }
.write-path-matrix--refs .write-path-conn:nth-child(5) { grid-area: v2; }
.write-path-matrix--refs .write-path-node:nth-child(6) { grid-area: c; }
.write-path-matrix--refs .write-path-conn:nth-child(7) { grid-area: link2; }
.write-path-matrix--refs .write-path-node:nth-child(8) { grid-area: d; }

.write-path-matrix--source {
  grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr) 32px minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "gen link1 reuse link2 import"
    "keep keep keep keep keep";
  align-items: stretch;
}
.write-path-matrix--source > .write-path-node:nth-child(1) { grid-area: gen; }
.write-path-matrix--source > .write-path-conn:nth-child(2) { grid-area: link1; }
.write-path-matrix--source > .write-path-node:nth-child(3) { grid-area: reuse; }
.write-path-matrix--source > .write-path-conn:nth-child(4) { grid-area: link2; }
.write-path-matrix--source > .write-path-node:nth-child(5) { grid-area: import; }
.write-path-matrix--source > .write-path-node--wide { grid-area: keep; margin-top: 10px; }
.write-path-matrix--source > .write-path-node--wide.hidden { display: none; }

.write-path-node {
  position: relative;
  display: grid;
  gap: 6px;
  align-content: start;
  text-align: left;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  min-height: 100%;
  box-sizing: border-box;
}
.write-path-step {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px dashed var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 650;
  color: var(--ink-soft);
  background: #fafbfc;
}
.write-path-node b {
  font-size: .86rem;
  font-weight: 650;
  padding-right: 24px;
}
.write-path-desc,
.write-path-node > .write-path-desc {
  font-size: .76rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.write-tmpl-hint {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line, #e3e8ef);
  border-left: 3px solid #2f6fed;
  border-radius: 8px;
  background: #f7f9fc;
  font-size: .76rem;
  line-height: 1.55;
  color: var(--ink, #1f2937);
}
.write-tmpl-hint > b {
  display: block;
  font-size: .8rem;
  font-weight: 650;
}
.write-tmpl-hint ul {
  margin: 4px 0 0;
  padding-left: 16px;
}
.write-tmpl-hint li {
  margin: 2px 0;
}
.write-tmpl-hint > span {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft, #5b6b7c);
}
.write-tmpl-hint.warn {
  border-left-color: #d98200;
  background: #fff8ec;
}
.write-tmpl-hint.err {
  border-left-color: #c8452f;
  background: #fdf1ef;
}
.write-material-hint {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line, #e3e8ef);
  border-left: 3px solid #1f9d76;
  border-radius: 8px;
  background: #f4fbf8;
  font-size: .76rem;
  line-height: 1.55;
  color: var(--ink, #1f2937);
}
.write-material-hint.warn {
  border-left-color: #d98200;
  background: #fff8ec;
}
.write-material-hint .write-mat-title {
  display: block;
  font-size: .8rem;
  font-weight: 650;
}
.write-material-hint ul {
  margin: 4px 0 0;
  padding-left: 16px;
}
.write-material-hint li {
  margin: 2px 0;
}
.write-material-hint li.miss > b {
  color: #c8452f;
}
.write-material-hint li.own > b {
  color: #1f9d76;
}
.write-material-hint .write-mat-advice {
  display: block;
  margin-top: 6px;
  color: var(--ink-soft, #5b6b7c);
}
.write-material-hint .write-mat-go {
  margin-top: 8px;
}
.write-path-conn--h {
  align-self: center;
  justify-self: stretch;
  height: 0;
  border-top: 2px dashed #c8d4dc;
}
.write-path-conn--v {
  align-self: stretch;
  justify-self: center;
  width: 0;
  border-left: 2px dashed #c8d4dc;
}
.write-source-card {
  cursor: pointer;
  font: inherit;
  color: inherit;
}
button.write-source-card { width: 100%; }
.write-source-card:hover { border-color: var(--brand); background: #f7fbfb; }
.write-source-card.on {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}
.write-source-card.on .write-path-step {
  border-color: var(--brand);
  color: var(--brand);
  background: #fff;
}
.write-source-card.hidden { display: none; }
.write-source-extra {
  display: grid;
  gap: 6px;
  margin-top: 2px;
}
.write-source-extra .btn { margin: 0; justify-self: start; }
.write-source-hint {
  margin: 0;
  font-size: .72rem;
  line-height: 1.4;
}
.write-import-name {
  font-size: .76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.write-picker { position: relative; width: 100%; }
.write-picker-trigger {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: .8rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.write-picker-trigger:disabled {
  opacity: .55;
  cursor: not-allowed;
}
.write-source-card.on .write-picker-trigger {
  border-color: var(--brand);
}
.write-picker-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.write-picker-caret {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg) translateY(-2px);
}
.write-picker-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 40;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .12);
  padding: 4px;
}
.write-picker-item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: .8rem;
  text-align: left;
  cursor: pointer;
  color: var(--ink);
}
.write-picker-item:hover,
.write-picker-item.on { background: var(--brand-soft); }
.write-picker-item b {
  font-weight: 650;
  font-size: .8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.write-picker-item span {
  font-size: .72rem;
  color: var(--ink-soft);
}

.write-ref-slots { margin: 10px 0 14px; }
.write-ref-slot {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff;
  min-height: 100%;
  box-sizing: border-box;
}
.write-ref-slot-h {
  display: grid;
  gap: 2px;
  margin-bottom: 8px;
}
.write-ref-slot-h b { font-size: .86rem; font-weight: 650; }
.write-ref-slot-h .muted { font-size: .72rem; line-height: 1.35; }
.write-ref-list { list-style: none; margin: 0 0 8px; padding: 0; }
.write-ref-list li {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px;
  margin-bottom: 4px; font-size: .78rem; background: #fafbfc;
}
.write-ref-list b { flex: 1; min-width: 0; font-weight: 650; font-size: .78rem; }
.write-ref-list .muted { font-size: .7rem; }
.write-ref-list .write-ref-src {
  font-size: .68rem; color: var(--brand); white-space: nowrap;
}
.write-ref-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.write-ref-actions .btn { font-size: .76rem; padding: 4px 8px; }
.write-ref-actions label.btn,
.write-tree-actions label.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

@media (max-width: 860px) {
  .write-path-matrix--refs,
  .write-path-matrix--source {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas: none;
    gap: 8px;
  }
  .write-path-matrix--refs .write-path-node,
  .write-path-matrix--refs .write-path-conn,
  .write-path-matrix--source > .write-path-node,
  .write-path-matrix--source > .write-path-conn {
    grid-area: auto;
  }
  .write-path-conn { display: none; }
  .write-path-matrix--source > .write-path-node--wide { margin-top: 0; }
}
.write-kit-picks {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 12px;
}
.write-kit-pick {
  display: grid; gap: 2px; text-align: left;
  min-width: 7.5em; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fff; font: inherit; color: inherit; cursor: pointer;
}
.write-kit-pick b { font-size: .8rem; }
.write-kit-pick .write-stars {
  font-size: .72rem; letter-spacing: .04em; color: #c9a227; line-height: 1.3;
}
.write-kit-pick .write-kit-sub { font-size: .68rem; color: var(--ink-soft); }
.write-kit-pick .write-kit-badge {
  display: inline-block;
  margin-left: .28rem;
  padding: .02rem .28rem;
  border-radius: 3px;
  font-size: .62rem;
  font-weight: 500;
  color: var(--ink-soft);
  background: #f0f2f5;
  vertical-align: middle;
}
.write-kit-pick.is-rec { border-color: #e6c45a; background: #fffdf6; }
.write-kit-pick.on { border-color: var(--brand); background: var(--brand-soft); }
.write-kit-pick:hover { border-color: var(--brand); }
.write-wizard[data-phase="outline"] .write-setup,
.write-wizard[data-phase="write"] .write-setup { display: none; }
.write-wizard[data-phase="setup"] .write-stage,
.write-wizard[data-phase="setup"] #writeFootOutline,
.write-wizard[data-phase="setup"] #writeFootWrite { display: none; }
.write-wizard[data-phase="outline"] #writeFootWrite,
.write-wizard[data-phase="write"] #writeFootOutline { display: none; }
.write-wizard[data-phase="write"] #writeTreeActions { display: none; }
.write-wizard[data-phase="outline"] #writeNodeEdit { display: none; }
.write-wizard[data-phase="outline"] #writeLiveBoard,
.write-wizard[data-phase="outline"] #writePreview,
.write-wizard[data-phase="outline"] .write-live-note,
.write-wizard[data-phase="outline"] #writeDocxView { display: none; }
.write-wizard[data-phase="write"] .write-step-lead { display: none; }
.write-wizard[data-phase="write"] .write-live-note { display: none; }
.write-wizard[data-phase="write"] .write-live-h { margin-bottom: 6px; grid-area: live-h; }
.write-wizard[data-phase="write"] .write-live-col {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "live-h" "live-main";
}
.write-wizard[data-phase="write"] #writeLiveBoard { grid-area: live-main; min-height: 0; }
.write-wizard[data-phase="write"] #writeTenderView { display: none; grid-area: live-main; min-height: 0; }
.write-wizard[data-phase="write"] #writeTenderView.is-open {
  display: flex;
  flex-direction: column;
  z-index: 12;
  max-height: none;
  min-height: 0;
  margin: 0;
}
.write-preset-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px;
}
.write-span2 { grid-column: 1 / -1; }
.write-more { margin-top: 12px; }
.write-more summary {
  cursor: pointer; font-size: .8rem; color: var(--muted); font-weight: 650;
}
.write-card { background: rgba(255,255,255,.86); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.write-card h3 { margin: 0 0 8px; font-size: .86rem; }
.write-refs { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.write-refs > .muted { margin: 0 0 8px; font-size: .76rem; }
.write-tree-actions label.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.write-smart-pick {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 4px; font-size: .84rem; cursor: pointer; user-select: none;
}
.write-smart-pick input { margin: 0; }
.write-tip-q {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  font-size: .72rem; line-height: 1; padding: 0; cursor: help;
}
.write-tip-q:hover, .write-tip-q:focus { border-color: var(--brand); color: var(--brand); }
.write-tip-pop {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 30;
  margin: 0; padding: 8px 10px; max-width: 260px;
  font-size: .76rem; color: var(--ink); line-height: 1.4; font-weight: 400;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  white-space: normal;
}
.write-ref-lib-list { max-height: 280px; overflow: auto; margin: 8px 0; display: grid; gap: 4px; }
.write-ref-lib-item {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 8px; border-radius: 8px; font-size: .82rem; cursor: pointer;
}
.write-ref-lib-item:hover { background: #f4f8f8; }
.write-ref-lib-item b {
  font-weight: 650;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-all;
  line-height: 1.35;
}
.write-ref-lib-item .write-ref-lib-meta {
  display: block; margin-top: 2px; font-size: .72rem; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.write-tree-actions .btn { font-size: .76rem; }
.dlg-card-wide { width: min(520px, calc(100vw - 32px)); }
.dlg-card-need-project { text-align: center; }
.dlg-card-need-project .dlg-actions { justify-content: center; }
.need-project-cta { animation: need-project-pulse 1.6s ease-in-out infinite; }
@keyframes need-project-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(11, 110, 110, .35); }
  50% { box-shadow: 0 0 0 10px rgba(11, 110, 110, 0); }
}
.write-wizard.is-writing #writeFootWrite,
.write-wizard.is-writing #writeFootOutline { display: none !important; }
.write-field { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; color: var(--ink-soft); margin: 8px 0; }
.write-pages-hint { font-size: .7rem; color: var(--muted); font-weight: 400; line-height: 1.4; }
.write-pages-hint.is-warn { color: #b45309; font-weight: 600; }
.write-field input, .write-field select, .write-field textarea {
  font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px;
}
.write-dict { font-size: .72rem; white-space: pre-wrap; max-height: 160px; overflow: auto; background: #f7fafb; padding: 8px; border-radius: 8px; }
.write-miss { margin: 0; padding-left: 16px; font-size: .78rem; }
.write-step-bar {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
  flex: 0 0 auto;
}
.write-setup > .write-step-bar {
  padding: 10px 0 12px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.92) 28%);
}
.write-wizard > .write-step-bar {
  z-index: 6;
  margin: 0 -12px;
  padding: 8px 12px 10px;
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 -8px 18px rgba(21, 32, 40, .05);
}
.write-stage {
  display: grid;
  grid-template-columns: minmax(300px, 336px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 12px; flex: 1 1 auto; min-height: 0; overflow: hidden;
}
.write-wizard[data-phase="write"] .write-stage {
  grid-template-columns: minmax(300px, 336px) minmax(0, 1fr);
}
.write-toc-col, .write-live-col {
  min-height: 0; display: flex; flex-direction: column;
  overflow: hidden;
  background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 10px;
}
.write-toc-h, .write-live-h {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-bottom: 8px;
  flex: 0 0 auto; flex-wrap: wrap;
}
.write-toc-heading { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.write-toc-h h3, .write-live-h h3 { margin: 0; font-size: .86rem; }
.write-wizard[data-phase="write"] #writeLiveTitle { cursor: pointer; }
.write-save-hint { font-size: .72rem; color: var(--muted); font-weight: 650; }
.write-save-hint[data-st="busy"] { color: var(--brand-deep); }
.write-save-hint[data-st="ok"] { color: var(--ok); }
.write-tree-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.write-tree {
  position: relative;
  border: 1px solid var(--line); border-radius: 10px;
  flex: 1 1 auto; min-height: 0; overflow: auto; background: #fbfcfd;
  padding: 6px 4px 10px;
}
.write-tree.is-sorting { cursor: grabbing; }
.write-tree.is-sorting .write-node-ops { opacity: 0 !important; pointer-events: none !important; }
.write-node { font-size: .74rem; }
.write-node.is-dragging { opacity: .38; }
.write-kids { }
.write-node-row {
  position: relative;
  display: flex; align-items: flex-start; gap: 4px;
  min-height: 30px;
  padding: 4px 52px 4px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s ease, box-shadow .12s ease;
}
.write-wizard[data-phase="write"] .write-node-row { padding-right: 64px; }
.write-node-num {
  flex: none;
  min-width: 2.6em;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1.35;
}
.write-node[data-depth="0"] > .write-node-row .write-node-num { min-width: 3.4em; }
.write-node-row:hover { background: #f2f6f8; }
.write-node.has-pending > .write-node-row .write-node-title { color: #8a1f16; }
.write-node.st-run > .write-node-row { background: #fff6d8; }
.write-node.st-done > .write-node-row { background: #e7f6ee; }
.write-node.on > .write-node-row {
  background: linear-gradient(90deg, #d5efef 0%, #eef8f8 72%);
  box-shadow: inset 3px 0 0 var(--brand);
}
.write-node.on > .write-node-row:hover {
  background: linear-gradient(90deg, #c8eaea 0%, #e8f4f4 72%);
}
.write-node.on.st-run > .write-node-row,
.write-node.on.st-run > .write-node-row:hover { background: #ffe9b8; }
.write-node.on.st-done > .write-node-row,
.write-node.on.st-done > .write-node-row:hover { background: #d6f3e4; }
.write-node.just-in { animation: writeIn .32s ease; }
.write-node[data-depth="0"] > .write-node-row { padding-left: 4px; }
.write-node[data-depth="1"] > .write-node-row { padding-left: 22px; }
.write-node[data-depth="2"] > .write-node-row { padding-left: 40px; }
.write-node[data-depth="3"] > .write-node-row,
.write-node[data-depth="4"] > .write-node-row { padding-left: 56px; }
.write-node[data-depth="0"] > .write-node-row .write-node-title {
  font-size: 13px; font-weight: 650; letter-spacing: 0;
}
.write-node[data-depth="1"] > .write-node-row .write-node-title {
  font-size: 12.5px; font-weight: 600;
}
.write-node[data-depth="2"] > .write-node-row .write-node-title {
  font-size: 12px; font-weight: 550; color: var(--ink-soft);
}
.write-node[data-depth="3"] > .write-node-row .write-node-title,
.write-node[data-depth="4"] > .write-node-row .write-node-title {
  font-size: 11.5px; font-weight: 500; color: var(--muted);
}
.write-handle {
  flex: none; align-self: center;
  width: 14px; height: 18px;
  cursor: grab;
  user-select: none;
  background-image: radial-gradient(circle, #8a9aa4 1.15px, transparent 1.35px);
  background-size: 6px 6px;
  background-position: 1px 1px;
  opacity: .38;
  border-radius: 3px;
}
.write-handle:hover, .write-node-row:hover .write-handle { opacity: .9; background-color: rgba(11,110,110,.06); }
.write-handle:active { cursor: grabbing; }
.write-handle.is-off { visibility: hidden; cursor: default; }
.write-node-title {
  flex: 1 1 auto;
  min-width: 4.5em;
  max-width: none;
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
  user-select: none;
}
.write-node-title.is-edit {
  max-width: none;
  white-space: normal;
  overflow: visible;
  background: #fff;
  outline: 2px solid var(--brand);
  border-radius: 4px;
  padding: 1px 6px;
  user-select: text;
}
.write-leader {
  flex: 0 1 12px;
  min-width: 0;
  align-self: flex-start;
  margin: .7em 4px 0 2px;
  height: 0;
  border-bottom: 1.5px dotted #b7c4cc;
}
.write-node-page {
  flex: none;
  min-width: 1.5em;
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-size: .78em;
  color: var(--ink-soft);
  font-weight: 650;
  line-height: 1.35;
}
.write-wizard[data-phase="outline"] .write-leader,
.write-wizard[data-phase="outline"] .write-node-page,
.write-wizard[data-phase="setup"] .write-leader,
.write-wizard[data-phase="setup"] .write-node-page { visibility: hidden; }
.write-node-ops {
  position: absolute;
  right: 6px; top: 50%;
  transform: translateY(-50%);
  display: flex; gap: 3px;
  padding-left: 16px;
  background: linear-gradient(90deg, transparent, #fbfcfd 14px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease;
}
.write-node-row:hover .write-node-ops {
  opacity: 1;
  pointer-events: auto;
  background: linear-gradient(90deg, transparent, #f2f6f8 14px);
}
.write-node.on > .write-node-row .write-node-ops {
  opacity: 1;
  pointer-events: auto;
  background: linear-gradient(90deg, transparent, #eef8f8 14px);
}
.write-node-row:focus-within .write-node-ops {
  opacity: 1;
  pointer-events: auto;
}
.write-node.st-run > .write-node-row .write-node-ops {
  background: linear-gradient(90deg, transparent, #fff6d8 14px);
}
.write-node.st-done > .write-node-row .write-node-ops {
  background: linear-gradient(90deg, transparent, #e7f6ee 14px);
}
.write-node.on.st-run > .write-node-row .write-node-ops {
  background: linear-gradient(90deg, transparent, #ffe9b8 14px);
}
.write-node.on.st-done > .write-node-row .write-node-ops {
  background: linear-gradient(90deg, transparent, #d6f3e4 14px);
}
.write-op {
  appearance: none;
  position: relative;
  width: 24px; height: 24px;
  padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  color: var(--ink-soft);
  cursor: pointer;
}
.write-op svg {
  width: 14px; height: 14px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.write-op:hover { border-color: var(--brand); color: var(--brand-deep); background: #fff; }
.write-op.danger:hover { border-color: var(--danger); color: var(--danger); }
.write-op-tip {
  position: fixed;
  z-index: 80;
  padding: 4px 8px;
  border-radius: 6px;
  background: #1c2a32;
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  pointer-events: none;
  box-shadow: 0 6px 16px rgba(21,32,40,.2);
  white-space: nowrap;
}
.write-op-tip[hidden] { display: none !important; }
.write-node-row.drop-into {
  background: var(--brand-soft) !important;
  box-shadow: inset 0 0 0 2px var(--brand);
}
.write-node-row.drop-into::after {
  content: "放到本章下面";
  margin-left: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-deep);
  background: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  flex: none;
  box-shadow: 0 1px 2px rgba(11,110,110,.12);
}
.write-drop-ind {
  position: absolute;
  left: 18px; right: 12px;
  height: 2px;
  background: var(--brand);
  pointer-events: none;
  z-index: 6;
  border-radius: 2px;
  box-shadow: 0 0 0 3px rgba(11,110,110,.12);
}
.write-drop-ind::before {
  content: "";
  position: absolute;
  left: -6px; top: 50%;
  width: 9px; height: 9px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--brand);
}
.write-caret {
  display: inline-block; width: 6px; height: 12px; margin-left: 4px;
  background: var(--brand); animation: writeBlink 1s steps(1) infinite;
  vertical-align: -1px;
}
@keyframes writeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes writeBlink {
  50% { opacity: 0; }
}
.write-pending-tag {
  font-size: 11px; color: #b42318; background: #fdecea;
  border-radius: 999px; padding: 0 7px; line-height: 18px; font-weight: 600;
  flex: none; align-self: center;
}
.write-cover-tag {
  font-size: 11px; border-radius: 999px; padding: 0 7px; line-height: 18px; font-weight: 600;
  flex: none; align-self: center;
}
.write-cover-tag.is-ok { color: var(--ok); background: var(--ok-soft); }
.write-cover-tag.is-partial { color: var(--warn); background: var(--warn-soft); }
.write-coverage {
  margin: 8px 0 12px; font-size: .78rem; max-height: 220px; overflow: auto;
  border-top: 1px solid var(--line); padding-top: 8px;
}
.write-cov-h { font-weight: 650; margin-bottom: 6px; color: var(--ink-soft); display: flex; gap: 8px; flex-wrap: wrap; }
.write-cov-h span { font-weight: 500; }
.write-cov-table { width: 100%; border-collapse: collapse; }
.write-cov-table th, .write-cov-table td { padding: 4px 6px; text-align: left; border-bottom: 1px solid var(--line); }
.write-cov-table tr { cursor: pointer; }
.write-cov-table tr.is-gap td { color: var(--danger); }
.write-ready-bar {
  margin: 0 0 8px; padding: 8px 12px; border-radius: 8px; font-size: .82rem;
  background: var(--warn-soft); color: var(--ink);
}
.write-ready-bar.is-ok { background: var(--ok-soft); }
.write-ready-bar .write-ready-hint {
  display: block;
  margin-top: 4px;
  font-size: .76rem;
  color: var(--ink-soft);
  font-weight: 400;
}
.write-ready-bar ul { margin: 4px 0 0; padding-left: 18px; }
.ck-surface {
  font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 6px; margin-left: 4px; flex: none;
}
.ck-surface.is-addendum { color: var(--brand); border-color: var(--brand-soft); }
.report-scope, .report-selfcheck ul { margin: 0; padding-left: 18px; font-size: .82rem; }
.report-selfcheck { display: grid; gap: 10px; }
.report-sc-g h4 { margin: 0 0 4px; font-size: .8rem; }
.report-selfcheck li.st-fail { color: var(--danger); }
.report-selfcheck li.st-human { color: var(--muted); }
.write-node-edit { margin-top: 8px; flex: 0 0 auto; }
.write-outline-load {
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px 8px 12px; color: var(--ink-soft); font-size: .82rem;
}
.write-outline-load.hidden { display: none !important; }
.write-outline-load b { color: var(--ink); }
.write-outline-load .write-spinner { align-self: center; margin-bottom: 4px; }
.write-spinner {
  display: inline-block;
  box-sizing: border-box;
  flex: none;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid #d5e3e4; border-top-color: var(--brand);
  animation: writeSpin .8s linear infinite;
}
@keyframes writeSpin { to { transform: rotate(360deg); } }
.write-skel { display: grid; gap: 8px; margin-top: 8px; }
.write-skel i {
  display: block; height: 28px; border-radius: 8px;
  background: linear-gradient(90deg, #eef3f4 0%, #f7fbfb 50%, #eef3f4 100%);
  background-size: 200% 100%;
  animation: writeShimmer 1.2s ease infinite;
}
.write-skel i:nth-child(2) { width: 86%; }
.write-skel i:nth-child(3) { width: 74%; }
.write-skel i:nth-child(4) { width: 90%; }
.write-skel i:nth-child(5) { width: 62%; }
@keyframes writeShimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
.write-tender-view {
  flex: 1 1 auto; min-height: 0; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px;
  display: flex; flex-direction: column;
}
.write-tender-bar {
  display: none;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}
.write-tender-bar b { font-size: .82rem; font-weight: 650; color: var(--ink); }
.write-wizard[data-phase="write"] #writeTenderView.is-open .write-tender-bar { display: flex; }
.write-tender-close {
  appearance: none; cursor: pointer; font: inherit;
  font-size: .76rem; font-weight: 650;
  padding: 4px 10px; border-radius: 999px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
}
.write-tender-close:hover { color: var(--brand-deep); border-color: rgba(11,110,110,.4); }
.write-tender-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.write-tender-h { margin: 0 0 10px; font-size: .82rem; color: var(--ink-soft); }
.write-tender-card {
  margin: 0 0 12px; padding: 10px 12px;
  background: #f7fbfb; border-radius: 8px;
  border-left: 3px solid var(--brand);
}
.write-tender-card .src { font-size: .7rem; color: var(--muted); font-weight: 650; }
.write-tender-card p { margin: 6px 0 0; font-size: .84rem; line-height: 1.7; color: var(--ink); }
.write-tender-view mark {
  background: #fff3c4; padding: 0 2px; border-radius: 2px;
}
.write-preview {
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 10px 8px 12px;
  flex: 1 1 auto; min-height: 0; overflow: auto;
  caret-color: transparent;
  user-select: text;
  -webkit-user-select: text;
}
.write-live-board {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.write-preview-shell {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #c5cdd2;
}
.write-preview-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}
.write-todo-rail {
  position: absolute;
  top: 48px;
  z-index: 7;
  width: 168px;
  max-height: calc(100% - 56px);
  pointer-events: none;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity .25s ease, transform .25s ease;
  /* 灰底预览区上的待办列表：整体垫一张浅卡片，保证节点可读 */
  background: rgba(255, 255, 255, .68);
  border: 1px solid rgba(178, 62, 40, .2);
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(20, 32, 42, .1);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 6px 4px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(35, 52, 66, .26) transparent;
}
.write-todo-rail.is-compact { background: rgba(255, 255, 255, .94); }
.write-todo-rail::-webkit-scrollbar { width: 6px; }
.write-todo-rail::-webkit-scrollbar-track { background: transparent; }
.write-todo-rail::-webkit-scrollbar-thumb {
  background: rgba(35, 52, 66, .22);
  border-radius: 3px;
}
.write-todo-rail::-webkit-scrollbar-thumb:hover { background: rgba(35, 52, 66, .34); }
.write-todo-rail:not(.hidden) {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
}
.write-todo-rail.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.write-todo-rail-h {
  display: flex;
  align-items: center;
  padding: 0 4px 6px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #8a3320;
}
/* 待办卡片：一眼看到「缺什么」，展开看「补什么 / 为什么」 */
.write-todo-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 2px 2px 4px;
}
.write-todo-card {
  position: relative;
  border: 1px solid rgba(178, 62, 40, .28);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff8f5 0%, #ffeae1 100%);
  box-shadow: 0 2px 6px rgba(122, 42, 26, .12);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.write-todo-card:hover {
  border-color: rgba(178, 62, 40, .5);
  box-shadow: 0 4px 10px rgba(122, 42, 26, .18);
}
.write-todo-card.is-on {
  border-color: #b23e28;
  background: linear-gradient(180deg, #fde3d9 0%, #f8c4b1 100%);
  box-shadow: 0 4px 12px rgba(140, 48, 28, .22);
}
.write-todo-card.is-dragging { opacity: .7; }
.write-todo-card.is-drop { border-style: dashed; border-color: #b23e28; }
/* 废标风险卡：招标写死的否决条款，不满足直接废标，视觉上必须压过普通待办 */
.write-todo-card.is-risk {
  border-color: #b23e28;
  background: linear-gradient(180deg, #fdeae2 0%, #f7cdb6 100%);
  box-shadow: 0 3px 9px rgba(122, 42, 26, .2);
}
.write-todo-card.is-risk .write-todo-card-label { color: #6d1f0c; }
.write-todo-card-lv {
  flex: 0 0 auto;
  padding: 1px 5px;
  border-radius: 999px;
  background: #b23e28;
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
}
.write-todo-card.is-risk .write-todo-card-row b { color: #a02c14; }
.write-todo-risk-tag {
  margin-left: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #b23e28;
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
}
/* 评分风险：不废标，但目录里没有＝评标人找不到＝丢分，用琥珀色与废标区分 */
.write-todo-card.is-score {
  border-color: #a86a1f;
  background: linear-gradient(180deg, #fdf1dc 0%, #f6dfae 100%);
  box-shadow: 0 3px 9px rgba(122, 84, 26, .18);
}
.write-todo-card.is-score .write-todo-card-label { color: #6b4310; }
.write-todo-card.is-score .write-todo-card-lv { background: #a86a1f; }
.write-todo-card.is-score .write-todo-card-row b { color: #8a5613; }
.write-todo-card-hit {
  display: block;
  width: 100%;
  padding: 7px 10px 6px;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  color: #7a2a18;
  user-select: none;
  -webkit-user-select: none;
}
.write-todo-card-head {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.write-todo-card-label {
  flex: 1 1 auto;
  min-width: 0;
  font-size: .76rem;
  font-weight: 700;
  line-height: 1.35;
  color: #6d2413;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
.write-todo-card-count {
  flex: 0 0 auto;
  font-style: normal;
  font-size: .66rem;
  font-weight: 700;
  color: #a4442c;
}
.write-todo-card-sec {
  display: block;
  margin-top: 3px;
  font-size: .64rem;
  color: #9a6c5d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.write-todo-card-more {
  display: none;
  padding: 0 10px 2px;
}
.write-todo-card.is-open .write-todo-card-more { display: block; }
.write-todo-card-row {
  display: flex;
  gap: 6px;
  font-size: .68rem;
  line-height: 1.5;
  color: #5f3a2e;
}
.write-todo-card-row + .write-todo-card-row { margin-top: 4px; }
.write-todo-card-row b {
  flex: 0 0 auto;
  font-weight: 700;
  color: #8a3320;
}
.write-todo-card-row span {
  min-width: 0;
  word-break: break-word;
}
.write-todo-card-row q {
  font-style: normal;
  color: #6b3a2b;
}
.write-todo-card-row b + span { flex: 1 1 auto; }
.write-todo-card-where {
  display: block;
  margin-top: 2px;
  font-size: .62rem;
  font-style: normal;
  color: #9a7263;
}
.write-todo-card-toggle {
  display: block;
  width: 100%;
  padding: 4px 10px 6px;
  border: 0;
  background: none;
  text-align: left;
  font: inherit;
  font-size: .64rem;
  font-weight: 700;
  color: #a4442c;
  cursor: pointer;
}
.write-todo-card-toggle:hover {
  color: #7a2a18;
  text-decoration: underline;
}
.write-paper .write-todo.write-todo-flash,
.write-paper p.write-pending.write-todo-flash,
.write-paper td.write-pending.write-todo-flash {
  outline: 2px solid rgba(180, 35, 24, .55);
  outline-offset: 2px;
  background: rgba(254, 243, 242, .85);
  border-radius: 2px;
  transition: outline-color .2s ease, background .2s ease;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.write-ready-decl {
  flex: 1 1 240px;
  margin: 0;
  font-size: .72rem;
  line-height: 1.45;
  color: var(--ink-soft);
}
.write-ready-decl.is-warn { color: #9a3412; }
.write-ready-decl.hidden { display: none !important; }
@media (max-width: 760px) {
  .write-todo-rail {
    top: auto;
    bottom: 8px;
    left: 8px !important;
    right: 8px !important;
    width: auto !important;
    max-height: 34%;
  }
}
.write-live-board.is-waiting .write-preview-shell { visibility: hidden; }
.write-live-board.is-waiting .write-preview-nav { display: none !important; }
.write-preview-nav {
  position: absolute; top: 10px; right: 12px; z-index: 5;
  display: flex; gap: 6px; pointer-events: none;
}
.write-preview-nav.hidden { display: none !important; }
.write-nav-btn {
  pointer-events: auto;
  appearance: none; cursor: pointer; font: inherit;
  font-size: .72rem; font-weight: 650;
  padding: 5px 10px; border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.96);
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(21,32,40,.12);
}
.write-nav-btn:hover { color: var(--brand-deep); border-color: rgba(11,110,110,.4); }
.write-nav-btn.on {
  color: var(--brand-deep);
  border-color: rgba(11,110,110,.45);
  background: #f3fbfb;
}
.write-nav-btn.hidden { display: none !important; }
.write-preview-mask {
  position: absolute; inset: 0;
  z-index: 4;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(420px 220px at 50% 38%, rgba(11,110,110,.14), transparent 70%),
    #c5cdd2;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.write-preview-mask.hidden { display: none !important; }
.write-mask-card {
  width: min(420px, calc(100% - 32px));
  padding: 22px 22px 18px;
  border-radius: 14px;
  background: rgba(255,255,255,.97);
  border: 1px solid var(--line);
  box-shadow: 0 16px 36px rgba(21,32,40,.14);
  text-align: center;
}
.write-mask-card b {
  display: block; font-size: .92rem; color: var(--ink);
}
.write-mask-card p {
  margin: 8px 0 0; font-size: .8rem; color: var(--ink-soft); line-height: 1.5;
}
.write-mask-track {
  height: 6px; border-radius: 999px; background: #e7eef0;
  margin: 14px 0 0; overflow: hidden;
}
.write-mask-track i {
  display: block; height: 100%; width: 8%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-mid));
  transition: width .35s ease;
}
.write-mask-log {
  list-style: none; margin: 12px 0 0; padding: 0;
  text-align: left; max-height: 7.5rem; overflow: auto;
}
.write-mask-log li {
  font-size: .72rem; color: var(--muted); line-height: 1.45;
  padding: 3px 0 3px 12px; position: relative;
}
.write-mask-log li::before {
  content: "";
  position: absolute; left: 0; top: .55em;
  width: 5px; height: 5px; border-radius: 50%;
  background: #c5d4d6;
}
.write-mask-log li:last-child { color: var(--brand-deep); font-weight: 650; }
.write-mask-log li:last-child::before { background: var(--brand); }
.write-paper-fit {
  margin: 0 auto;
  overflow: hidden;
}
.write-paper-stage {
  display: flex; flex-direction: column; align-items: center;
}
.write-paper {
  position: relative;
  height: auto;
  overflow: hidden;
  background: #fff;
  color: #000;
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(21,32,40,.12), 0 10px 28px rgba(21,32,40,.12);
  font-family: "Songti SC", "STSong", SimSun, "Noto Serif SC", "Times New Roman", serif;
  font-size: var(--write-body-pt, 12pt);
  line-height: var(--write-line, 1.5);
  user-select: text;
  -webkit-user-select: text;
  pointer-events: auto;
}
.write-paper-body { overflow: hidden; }
.write-paper-foot {
  position: absolute; left: 0; right: 0;
  bottom: 3.8%;
  text-align: center;
  font-size: .88em;
  line-height: 1;
  color: #000;
  pointer-events: none;
}
.write-paper h1, .write-paper h2, .write-paper h3,
.write-paper h4, .write-paper h5 {
  margin: 1em 0;
  text-align: center;
  text-indent: 0;
  font-weight: 700;
  font-size: 1.333em;
  line-height: 1.5;
  font-family: "Songti SC", SimSun, "Noto Serif SC", serif;
}
.write-paper-body > :first-child {
  margin-top: 0;
}
.write-paper p {
  margin: 0;
  text-align: justify;
  text-justify: inter-ideograph;
  text-indent: 2em;
  font-size: inherit;
  line-height: inherit;
  font-weight: 400;
}
.write-paper p.write-hnum { font-weight: 400; }
.write-paper p.cap, .write-paper p.fig, .write-paper p.write-pending {
  text-indent: 0;
  text-align: center;
  font-size: .88em;
  margin: .5em 0;
}
.write-paper p.write-pending, .write-paper td.write-pending {
  color: #9a3412;
  font-weight: 650;
  background: linear-gradient(180deg, rgba(254, 242, 242, .55), rgba(254, 226, 226, .42));
  border-radius: 4px;
}
.write-paper .write-gap,
.write-paper .write-todo {
  color: #9a3412;
  font-weight: 650;
  font-size: .92em;
  padding: 1px 5px;
  margin: 0 1px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(254, 242, 242, .96), rgba(254, 226, 226, .88));
  border: 1px solid rgba(180, 35, 24, .22);
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}
.write-paper .write-todo:hover {
  background: rgba(254, 226, 226, .98);
  box-shadow: 0 0 0 2px rgba(180, 35, 24, .16);
}
.write-paper p.write-wait-line {
  text-indent: 0;
  color: #8a9aa4;
  font-family: var(--font);
  font-size: .88em;
  animation: writePulse 1.2s ease-in-out infinite;
}
.write-paper p.write-wait-line .write-caret {
  margin-left: 6px;
  vertical-align: -.05em;
}
.write-paper p.write-typing-line { min-height: 1.5em; }
.write-paper p.write-typing-line:empty { display: none; }
@keyframes writePulse {
  0%, 100% { opacity: .42; }
  50% { opacity: .9; }
}
.write-paper table {
  width: 100%; border-collapse: collapse;
  font-size: .88em; margin: .6em 0;
  text-indent: 0;
}
.write-paper th, .write-paper td {
  border: 1px solid #000; padding: 3px 6px;
  text-align: center; vertical-align: middle;
}
.write-paper th { font-weight: 700; }
.write-paper ol, .write-paper ul {
  margin: 0; padding: 0; list-style: none;
}
.write-paper li {
  text-align: justify;
  text-indent: 2em;
  font-size: inherit;
  line-height: inherit;
}
.write-paper .write-caret {
  display: inline-block; width: 2px; height: .9em; margin-left: 1px;
  background: #000; animation: writeBlink 1s steps(1) infinite;
  vertical-align: -.1em;
}
.write-paper figure.write-fig {
  margin: .7em 0 .5em;
  text-indent: 0;
}
.write-paper .write-fig-frame {
  min-height: 6.5em;
  border: 1px solid #000;
  background:
    repeating-linear-gradient(-45deg, #f5f7f8, #f5f7f8 7px, #eef1f3 7px, #eef1f3 14px);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.write-paper .write-fig.is-empty .write-fig-frame::after {
  content: "示意图";
  color: #6b7c86;
  font-family: var(--font);
  font-size: .82em;
  letter-spacing: .08em;
}
.write-paper .write-fig-frame img {
  display: block; max-width: 100%; max-height: 12em; object-fit: contain;
  background: #fff;
}
.write-paper .write-fig figcaption {
  text-align: center;
  font-size: .88em;
  margin: .35em 0 0;
  line-height: 1.4;
}
.write-fig-menu {
  position: fixed; z-index: 80;
  min-width: 148px;
  padding: 6px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(21,32,40,.16);
  display: flex; flex-direction: column; gap: 4px;
}
.write-fig-menu.hidden { display: none !important; }
.write-fig-menu button {
  appearance: none; border: 0; background: transparent;
  text-align: left; padding: 8px 10px; border-radius: 8px;
  font: inherit; font-size: .82rem; color: var(--ink); cursor: pointer;
}
.write-fig-menu button:hover { background: #f3f7f7; }
.write-paper .write-cover {
  display: flex; flex-direction: column; align-items: center;
  padding-top: 18%;
}
.write-paper .write-cover h1,
.write-paper .write-cover h2 {
  margin: 0 0 .75em;
  text-indent: 0;
}
.write-paper table tbody tr.write-row-in td {
  animation: writeIn .16s ease-out;
}
.write-paper .write-cover h1 { font-size: 1.45em; }
.write-paper .write-cover h2 { font-size: 1.22em; }
.write-paper .write-cover p {
  text-indent: 0; text-align: center; margin: .28em 0;
}
.write-paper p.write-toc-title {
  text-align: center; text-indent: 0; font-weight: 700;
  font-size: 1.15em; margin: .25em 0 1em;
}
.write-paper p.write-toc-title--cont {
  font-size: .95em;
  margin-bottom: .6em;
  opacity: .85;
}
.write-paper p.write-toc-row {
  display: flex; align-items: baseline; gap: 6px;
  text-indent: 0; text-align: left; margin: .1em 0;
  cursor: pointer;
}
.write-paper p.write-toc-row.d1 { padding-left: 1.1em; }
.write-paper p.write-toc-row.d2 { padding-left: 2.2em; }
.write-paper p.write-toc-row .n { flex: none; min-width: 4.2em; }
.write-paper p.write-toc-row .t {
  flex: none; max-width: 66%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.write-paper p.write-toc-row i {
  flex: 1 1 auto; border-bottom: 1px dotted #000;
  min-width: 10px; height: 0; margin: 0 4px .32em;
}
.write-paper p.write-toc-row .p {
  flex: none; min-width: 1.6em; text-align: right;
  font-variant-numeric: tabular-nums;
}
.write-jump { outline: 2px solid #b42318; background: #fff3f0; }
.write-live-note { margin: 8px 0 0; flex: 0 0 auto; }
.write-docx { margin-top: 8px; background: #fff; min-height: 80px; max-height: 280px; overflow: auto; }
.write-docx .write-jump { outline: 2px solid #b42318; background: #fff3f0; }
.write-wizard[data-phase="write"] .write-docx { display: none; }
.write-ai-pop {
  position: fixed;
  z-index: 90;
  width: min(360px, calc(100vw - 24px));
  padding: 12px 12px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(21, 32, 40, .16);
}
.write-ai-pop.hidden, .write-ai-pop[hidden] { display: none !important; }
.write-ai-pop-h {
  margin: 0 0 8px;
  font-size: .82rem;
  font-weight: 650;
  color: var(--ink);
}
.write-ai-pop textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 88px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  resize: vertical;
  font: inherit;
  line-height: 1.55;
  color: var(--ink);
  background: #fff;
}
.write-ai-pop textarea::placeholder { color: #9aa7ae; }
.write-ai-pop-btns {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.lib-layout {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
}
.lib-files, .lib-people {
  min-width: 0;
  padding: 12px 14px 16px;
}
.lib-people { border-bottom: 1px solid var(--line); }
.lib-sec-h {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 12px; margin-bottom: 10px; flex-wrap: wrap;
}
.lib-sec-h h3 { margin: 0; font-size: .86rem; }
.lib-sec-h .muted { margin: 4px 0 0; }
.lib-filter {
  display: flex; flex-direction: column; gap: 4px;
  font-size: .72rem; color: var(--ink-soft); font-weight: 650;
}
.lib-filter select {
  font: inherit; padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 8px; background: #fff; min-width: 132px; font-weight: 500; color: var(--ink);
}
.lib-table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.lib-table { width: 100%; border-collapse: collapse; font-size: .8rem; table-layout: auto; }
.lib-table th, .lib-table td {
  padding: 8px 10px; text-align: left; vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.lib-table th {
  font-size: .72rem; font-weight: 650; color: var(--muted);
  background: #f7fafb; white-space: nowrap;
}
.lib-table th:nth-child(2), .lib-table td:nth-child(2) { white-space: nowrap; width: 7.5em; }
.lib-table th:nth-child(3), .lib-table td:nth-child(3) { white-space: nowrap; width: 4.5em; }
.lib-table th:nth-child(4), .lib-table td:nth-child(4) { white-space: nowrap; width: 12.5em; }
.lib-table tbody tr:last-child td { border-bottom: 0; }
.lib-table tbody tr:hover td { background: #f8fbfb; }
.lib-cats { display: grid; gap: 16px; }
.lib-cat h4 {
  margin: 0 0 8px; font-size: .8rem; font-weight: 650; color: var(--ink);
}
.lib-cat .lib-table-wrap { margin: 0; }
.lib-file-name {
  display: block; max-width: 36em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-weight: 650; color: var(--ink);
}
.lib-card-note {
  display: block; max-width: 36em; margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: .72rem; color: var(--ink-soft); line-height: 1.4;
}
.lib-file-card {
  margin: 0 0 10px;
  font-size: .8rem;
  line-height: 1.5;
  color: var(--ink-soft);
}
.lib-fmt, .lib-kind {
  display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: #eef3f5; color: var(--ink-soft); font-size: .72rem; font-weight: 650;
  white-space: nowrap;
}
.lib-kind { color: var(--ink); background: #eef4f8; }
.lib-file-dlg-name {
  display: block;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f7fafb;
  color: var(--ink);
  font-size: .88rem;
  line-height: 1.45;
  word-break: break-all;
}
.lib-empty { color: var(--muted); font-size: .8rem; line-height: 1.55; padding: 18px 12px; }
.lib-h-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lib-item, .peo-item { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 8px; border-bottom: 1px solid var(--line); font-size: .8rem; }
.peo-item .pill, .lib-table .pill, .peo-card .pill { font-size: .7rem; background: var(--warn-soft); color: var(--warn); padding: 2px 6px; border-radius: 6px; }
.lib-table .pill.ok, .peo-card .pill.ok { background: var(--ok-soft); color: var(--ok); }
.peo-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.peo-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}
.peo-card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.peo-card-h b { font-size: .86rem; }
.peo-meta { font-size: .72rem; color: var(--ink-soft); line-height: 1.5; margin: 6px 0 8px; }
.peo-ops { display: flex; gap: 6px; flex-wrap: wrap; }
.dlg-card-peo {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 32px);
  overflow: auto;
}
.peo-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}
.peo-cred-h {
  display: flex; justify-content: space-between; align-items: center;
  margin: 10px 0 6px;
}
.peo-cred-h b { font-size: .82rem; }
.peo-cred-list { display: grid; gap: 8px; }
.peo-cred-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr auto auto;
  gap: 6px;
  align-items: end;
  padding: 8px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #f8fbfb;
}
.peo-cred-row .write-field { margin: 0; }
@media (max-width: 720px) {
  .peo-form-grid, .peo-cred-row { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .write-stage { grid-template-columns: 1fr; }
  .write-stage { overflow: auto; grid-template-rows: minmax(180px, .42fr) minmax(180px, 1fr); }
  .write-preset-grid { grid-template-columns: 1fr; }
  .write-span2 { grid-column: auto; }
  .write-vol { font-size: .76rem; padding: 8px 4px 6px; }
}

/* 店铺会员中心嵌入：配色 + 点击/悬停/过渡对齐 AI 寻源 */
html.portal-embed,
html.portal-embed body {
  --ink: #0f172a;
  --ink-soft: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --panel: #fff;
  --brand: #2563eb;
  --brand-deep: #1d4ed8;
  --brand-mid: #3b82f6;
  --brand-soft: #dbeafe;
  --accent: #2563eb;
  --accent-soft: #eff6ff;
  --hover: #f5f8fd;
  --active: #edf3ff;
  --ring: rgba(37, 99, 235, .16);
  --dur: .15s;
  --ease: ease;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --display: var(--font);
  height: 100%;
  background: #f8fafc;
}
html.portal-embed body { margin: 0; }
html.portal-embed .app { height: 100%; max-width: none; }
html.portal-embed .topbar { display: none; }
html.portal-embed .layout { height: 100%; }
html.portal-embed .side-nav,
html.portal-embed .side-proj {
  background: #fff;
  border-right-color: #e8edf5;
}
html.portal-embed .side-proj { border-bottom-color: #edf1f7; }
html.portal-embed .analyze-brand { color: var(--brand-deep); }
html.portal-embed .need-bid {
  background: #eff6ff;
  border-color: #dbeafe;
}

html.portal-embed button,
html.portal-embed .btn,
html.portal-embed .btn-icon,
html.portal-embed .icon-btn,
html.portal-embed .side-item,
html.portal-embed .side-group-title,
html.portal-embed .side-new,
html.portal-embed .proj-switch-btn,
html.portal-embed .proj-item,
html.portal-embed .proj-more-menu button,
html.portal-embed .write-vol,
html.portal-embed .write-steps li,
html.portal-embed .write-setup-dots li,
html.portal-embed .write-source-card,
html.portal-embed .write-op,
html.portal-embed .write-node-row,
html.portal-embed .write-nav-btn,
html.portal-embed .drop,
html.portal-embed .drop-link,
html.portal-embed .ck-tree-mod,
html.portal-embed .ck-tree-item,
html.portal-embed .resp-filter-opt,
html.portal-embed .anchor-filter,
html.portal-embed .list .item,
html.portal-embed .report-item,
html.portal-embed .write-ref-lib-item,
html.portal-embed .write-fig-menu button {
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease),
    border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
    opacity var(--dur) var(--ease);
}
html.portal-embed .btn,
html.portal-embed .btn-icon,
html.portal-embed .icon-btn,
html.portal-embed .side-new {
  border-radius: 8px;
  font-weight: 500;
  box-shadow: none;
}
html.portal-embed .btn:active:not(:disabled),
html.portal-embed .btn-icon:active:not(:disabled),
html.portal-embed .icon-btn:active:not(:disabled),
html.portal-embed .side-item:active,
html.portal-embed .write-vol:active,
html.portal-embed .write-steps li:active,
html.portal-embed .write-source-card:active,
html.portal-embed .proj-item:active,
html.portal-embed .drop:active {
  filter: brightness(.97);
}
html.portal-embed .btn-primary,
html.portal-embed .btn-accent {
  background: var(--brand);
  color: #fff;
  box-shadow: none;
}
html.portal-embed .btn-primary:hover:not(:disabled),
html.portal-embed .btn-accent:hover:not(:disabled) {
  background: var(--brand-deep);
}
html.portal-embed .btn-primary:active:not(:disabled),
html.portal-embed .btn-accent:active:not(:disabled) {
  background: #1e40af;
}
html.portal-embed .btn-ghost {
  background: #fff;
  border: 1px solid #d8e0ef;
  color: #4a5568;
}
html.portal-embed .btn-ghost:hover:not(:disabled) {
  color: #3f7cff;
  border-color: #3f7cff;
  background: #eef4ff;
}
html.portal-embed .btn.active {
  background: #eef4ff;
  color: #2b5cd9;
  border: 1px solid #3f7cff;
}
html.portal-embed .btn.danger:hover:not(:disabled) {
  background: #fef2f2;
  border-color: #fca5a5;
}
html.portal-embed .btn-icon:hover,
html.portal-embed .icon-btn:hover {
  color: #409eff;
  border-color: #c6e2ff;
  background: #ecf5ff;
}
html.portal-embed .btn-icon[aria-expanded="true"],
html.portal-embed .dlg-input:focus,
html.portal-embed .proj-switch-btn[aria-expanded="true"],
html.portal-embed input:focus,
html.portal-embed select:focus,
html.portal-embed textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
  outline: none;
}

html.portal-embed .side-item {
  border-radius: 8px;
  border: 1px solid transparent;
}
html.portal-embed .side-item:hover {
  background: var(--hover);
  color: #1f2d3d;
}
html.portal-embed .side-item.on {
  background: var(--active);
  color: #1d4ed8;
  border-color: #bfd4ff;
  box-shadow: none;
  font-weight: 600;
}
html.portal-embed .side-group.on .side-group-title { color: #1d4ed8; }
html.portal-embed .side-new {
  background: #fff;
  color: #2563eb;
  border: 1px dashed #93c5fd;
  box-shadow: none;
}
html.portal-embed .side-new:hover:not(:disabled) {
  background: #eff6ff;
  border-style: solid;
  border-color: #3b82f6;
  color: #1d4ed8;
}

html.portal-embed .proj-switch-btn:hover { border-color: #93c5fd; }
html.portal-embed .proj-item:hover,
html.portal-embed .proj-more-menu button:hover { background: var(--hover); }
html.portal-embed .proj-item.active {
  background: var(--active);
  color: #1d4ed8;
  box-shadow: none;
}
html.portal-embed .proj-switch-menu,
html.portal-embed .proj-more-menu,
html.portal-embed .write-fig-menu,
html.portal-embed .dlg-card {
  animation: portalPop var(--dur) var(--ease);
  box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
  border-color: #e2e8f0;
  border-radius: 10px;
}
@keyframes portalPop {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

html.portal-embed .drop {
  border-color: #c9d8f5;
  background: #f8fafc;
  border-radius: 10px;
}
html.portal-embed .drop:hover {
  border-color: #3f7cff;
  background: #f7faff;
  box-shadow: 0 0 0 3px var(--ring);
}
html.portal-embed .guide-hero {
  background: linear-gradient(180deg, #eff6ff 0%, #fff 72%);
}

html.portal-embed .write-vol:hover {
  color: #1e293b;
  background: var(--hover);
}
html.portal-embed .write-vol.on {
  color: #1d4ed8;
  background: #eef4ff;
  border-bottom-color: #2563eb;
  box-shadow: none;
}
html.portal-embed .write-steps li {
  border-radius: 16px;
  font-weight: 500;
}
html.portal-embed .write-steps li:hover:not(.is-locked) {
  border-color: #3f7cff;
  color: #3f7cff;
  background: #fff;
}
html.portal-embed .write-steps li.on {
  border-color: #3f7cff;
  background: #eef4ff;
  color: #2b5cd9;
  box-shadow: none;
}
html.portal-embed .write-steps li.on span { background: #dbeafe; color: #1d4ed8; }
html.portal-embed .write-steps li.done:not(.on) {
  color: #2563eb;
  border-color: #bfd4ff;
  background: #fff;
}
html.portal-embed .write-setup-dots li:hover { background: var(--hover); color: #1d4ed8; }
html.portal-embed .write-source-card:hover,
html.portal-embed .write-ref-lib-item:hover,
html.portal-embed .report-item:hover,
html.portal-embed .report-mod:hover {
  border-color: #bfd4ff;
  background: #f7faff;
}
html.portal-embed .write-source-card.on {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}
html.portal-embed .write-path-node.on {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}
html.portal-embed .write-path-node:hover,
html.portal-embed .write-node-row:hover { background: var(--hover); }
html.portal-embed .write-op:hover,
html.portal-embed .write-nav-btn:hover,
html.portal-embed .write-tender-close:hover {
  color: #3f7cff;
  border-color: #3f7cff;
  background: #eef4ff;
}
html.portal-embed .write-op.danger:hover {
  color: #f56c6c;
  border-color: #fca5a5;
  background: rgba(245, 108, 108, .08);
}
html.portal-embed .ck-tree-mod:hover,
html.portal-embed .ck-tree-item:hover,
html.portal-embed .resp-filter-opt:hover,
html.portal-embed .list .item:hover {
  background: var(--hover);
}
html.portal-embed .anchor-filter:hover { color: #e8eef2; border-color: #64748b; }
html.portal-embed .anchor-filter.on {
  background: #2563eb;
  border-color: transparent;
  color: #fff;
  box-shadow: none;
}

html.portal-embed .layout {
  grid-template-columns: 196px minmax(0, 1fr);
}
html.portal-embed .side-nav {
  border-right: 1px solid #edf1f7;
}
html.portal-embed .side-nav-body { padding: 8px 8px 14px; }
html.portal-embed .side-proj { padding: 8px 10px 10px; }
html.portal-embed .side-nav-label { font-size: .62rem; margin: 0 8px 6px; }
html.portal-embed .side-group-title {
  font-size: .78rem;
  font-weight: 600;
  padding: 6px 8px 8px;
  letter-spacing: 0;
}
html.portal-embed .side-item {
  font-size: .74rem;
  padding: 6px 10px 6px 12px;
  border-radius: 8px;
}
html.portal-embed .side-new { font-size: .78rem; margin-top: 6px; padding: 7px 10px; }
html.portal-embed .proj-switch-label { font-size: .76rem; font-weight: 600; }

html.portal-embed .write-stage,
html.portal-embed .write-wizard[data-phase="write"] .write-stage {
  grid-template-columns: minmax(300px, 336px) minmax(0, 1fr);
  gap: 8px;
}
html.portal-embed .write-toc-col,
html.portal-embed .write-live-col { padding: 6px 8px; border-radius: 10px; }
html.portal-embed .write-toc-h h3,
html.portal-embed .write-live-h h3 { font-size: .78rem; }
html.portal-embed .write-node { font-size: .72rem; }
html.portal-embed .write-node-row {
  min-height: 28px;
  padding: 3px 46px 3px 2px;
}
html.portal-embed .write-node[data-depth="0"] > .write-node-row .write-node-title {
  font-size: 12.5px;
  font-weight: 650;
}
html.portal-embed .write-node[data-depth="1"] > .write-node-row .write-node-title { font-size: 12px; }
html.portal-embed .write-node[data-depth="2"] > .write-node-row .write-node-title { font-size: 11.5px; }
html.portal-embed .write-node[data-depth="3"] > .write-node-row .write-node-title,
html.portal-embed .write-node[data-depth="4"] > .write-node-row .write-node-title { font-size: 11px; }
html.portal-embed .write-node[data-depth="1"] > .write-node-row { padding-left: 16px; }
html.portal-embed .write-node[data-depth="2"] > .write-node-row { padding-left: 28px; }
html.portal-embed .write-node[data-depth="3"] > .write-node-row,
html.portal-embed .write-node[data-depth="4"] > .write-node-row { padding-left: 40px; }

