:root {
  --bg: #fff6f1;
  --bg-2: #fef8f4;
  --orange: #fd6c39;
  --orange-hover: #f95c27;
  --red: #f95327;
  --gold: #feb651;
  --amber: #fd9e60;
  --teal: #73c8ce;
  --blue: #5c979b;
  --ink: #1f1a17;
  --muted: #8d8378;
  --line: #f0e6de;
  --card: #ffffff;
  --shadow: 0 8px 30px rgba(180, 120, 80, 0.10);
  --high: #f95327;
  --mid: #fd9e60;
  --lang: #5c979b;
  --high-bg: #feeae3;
  --mid-bg: #fff1e4;
  --lang-bg: #e7f1f2;
  --sidebar: 264px;
  --right: 400px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  overflow: hidden;
}

.app { display: flex; height: 100vh; }

/* Island shell — shrink + expand pages only */
html:has(body.chat-page),
html:has(body[data-v="1"]) {
  background: #fff8f3;
}
body.chat-page,
body[data-v="1"] {
  background-color: #fff8f3;
  background-image: url("assets/bg-v1.png?v=3");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
body.chat-page .app,
body[data-v="1"] .app {
  padding: 16px;
  gap: 14px;
  box-sizing: border-box;
}
body.chat-page .sidebar,
body[data-v="1"] .sidebar {
  border-right: none;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(180, 120, 80, 0.10);
  overflow: hidden;
}
body.chat-page .main,
body[data-v="1"] .main {
  border-radius: 20px;
  overflow: hidden;
  min-height: 0;
  background: transparent;
  box-shadow: 0 8px 30px rgba(180, 120, 80, 0.08);
}
body.chat-page .main { height: auto; }
body.chat-page .composer-sticky { background: transparent; }
body[data-v="1"] .doc-pane { background: transparent; }
body.chat-page .logo,
body[data-v="1"] .logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}
body.chat-page .brand-name,
body[data-v="1"] .brand-name {
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: -0.03em;
}
body.chat-page .brand-name em,
body[data-v="1"] .brand-name em {
  font-style: normal;
  color: var(--orange);
}
body.chat-page .icon-btn,
body[data-v="1"] .icon-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #e7ddd6;
  border-radius: 8px;
  color: #b4a89e;
}
body.chat-page .ico-rail,
body[data-v="1"] .ico-rail {
  width: 15px;
  height: 15px;
}
body.chat-page .new-task-btn,
body[data-v="1"] .new-task-btn {
  border-radius: 999px;
  background: linear-gradient(90deg, #ff8a52 0%, #fd6c39 58%, #f95c27 100%);
  box-shadow: 0 8px 18px rgba(253, 108, 57, 0.32);
  gap: 8px;
  padding: 11px 14px;
}
body.chat-page .new-task-btn .plus,
body[data-v="1"] .new-task-btn .plus {
  display: none;
}
body.chat-page .new-task-btn .nt-ico,
body[data-v="1"] .new-task-btn .nt-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
body.chat-page .tasklog-head,
body[data-v="1"] .tasklog-head {
  align-items: center;
  color: #6d6259;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  padding: 0 4px 10px;
}
body.chat-page .tasklog-label,
body[data-v="1"] .tasklog-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
body.chat-page .tasklog-ico,
body[data-v="1"] .tasklog-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
body.chat-page .tasklog-list li,
body[data-v="1"] .tasklog-list li {
  background: #fff;
  border: 1px solid #f1e8e1;
  border-radius: 12px;
  border-left: 3px solid transparent;
  margin-bottom: 8px;
  padding: 10px 12px;
  color: #5a524b;
  font-weight: 500;
  box-shadow: 0 1px 4px rgba(180, 120, 80, 0.04);
}
body.chat-page .tasklog-list li.active,
body[data-v="1"] .tasklog-list li.active {
  background: #fff;
  border-left-color: var(--orange);
  color: var(--ink);
  font-weight: 650;
  box-shadow: 0 2px 8px rgba(180, 120, 80, 0.08);
}
body.chat-page .tasklog-list li .t-ico,
body[data-v="1"] .tasklog-list li .t-ico {
  color: #8d8378;
  opacity: 1;
}
body.chat-page .tasklog-list li.active .t-ico,
body[data-v="1"] .tasklog-list li.active .t-ico {
  color: var(--orange);
}
body.chat-page .tasklog-list li .t-time,
body[data-v="1"] .tasklog-list li .t-time { display: none; }
body.chat-page .kb-pill,
body[data-v="1"] .kb-pill { display: none; }
body.chat-page .logout-btn,
body[data-v="1"] .logout-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
body.chat-page .logout-btn:hover,
body[data-v="1"] .logout-btn:hover {
  background: #fdf0e9;
  color: var(--ink);
}

/* ---- sidebar ---- */
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}
.brand { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.brand img { width: 28px; height: 28px; }
.brand span { font-weight: 800; font-size: 13.5px; letter-spacing: -0.02em; }
.sidebar-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 4px 16px;
}
.logo { width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0; }
.brand-name { font-weight: 700; font-size: 15px; flex: 1; white-space: nowrap; }
.icon-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: default;
  border-radius: 8px;
  padding: 4px 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ico-rail { width: 16px; height: 16px; display: block; }
.new-task {
  background: var(--orange);
  color: #fff;
  border: 0;
  border-radius: 12px;
  height: 40px;
  font: inherit;
  font-weight: 700;
  cursor: default;
  margin-bottom: 18px;
}
.new-task-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: default;
  box-shadow: 0 6px 16px rgba(253, 108, 57, 0.28);
  white-space: nowrap;
}
.new-task-btn .plus {
  display: inline-flex;
  width: 20px; height: 20px;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,0.25);
  border-radius: 6px;
  font-size: 13px;
  flex-shrink: 0;
}
.tasklog {
  margin-top: 22px;
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.tasklog-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
  padding: 0 6px 8px;
}
.tasklog-head .caret { font-size: 11px; }
.tasklog-list { list-style: none; overflow-y: auto; flex: 1; min-height: 0; }
.tasklog-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
  color: #4a423c;
  margin-bottom: 2px;
  border-left: 3px solid transparent;
}
.tasklog-list li.active {
  background: #fdf0e9;
  border-left-color: var(--orange);
  font-weight: 600;
  color: var(--ink);
}
.tasklog-list li .t-ico { flex-shrink: 0; opacity: 0.75; }
.tasklog-list li .t-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.tasklog-list li .t-time {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 500;
  color: #b9ada2;
  font-variant-numeric: tabular-nums;
}
.tasklog-list li.active .t-time { color: #c4a48e; }
.kb-pill {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
  background: #faf3ee;
  border: 1px dashed #ecd9cc;
  border-radius: 10px;
  padding: 8px 10px;
  line-height: 1.5;
}
.tasklog-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.task-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 12.5px;
  color: #5a524b;
}
.task-item.active {
  background: #fff4ee;
  border-left: 3px solid var(--orange);
  color: var(--ink);
  font-weight: 650;
}
.dot-file {
  width: 18px; height: 22px; border-radius: 3px;
  background: linear-gradient(160deg, #ff9a6a, var(--orange));
  color: #fff; font-size: 7px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ---- main ---- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,246,241,0.85);
  backdrop-filter: blur(8px);
}
.crumb { font-size: 12.5px; color: var(--muted); }
.crumb b { color: var(--ink); font-weight: 700; }
.top-actions { display: flex; gap: 8px; }
.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: #5a524b;
  border-radius: 9px;
  padding: 6px 12px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ghost:hover { border-color: var(--orange); color: var(--orange); }
.ghost.primary { background: var(--orange); color: #fff; border-color: var(--orange); }
.ghost.primary:hover { background: var(--orange-hover); color: #fff; }

.workspace { flex: 1; display: flex; min-height: 0; }

/* ---- document pane ---- */
.doc-pane {
  flex: 1;
  min-width: 0;
  overflow: auto;
  padding: 22px 28px 48px;
}
.doc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
}
.doc-toolbar .pages { display: flex; align-items: center; gap: 8px; }
.doc-paper {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 36px 44px 48px;
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.85;
  font-size: 14.5px;
  color: #3a332d;
}
.doc-kicker {
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.doc-paper h1 { font-size: 22px; font-weight: 800; margin: 6px 0 4px; letter-spacing: -0.02em; }
.doc-sub { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.doc-paper h2 {
  font-size: 15px;
  margin: 26px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.doc-paper p { margin: 0 0 12px; }
.doc-paper .meta-row {
  display: flex; gap: 16px; flex-wrap: wrap;
  font-size: 12px; color: var(--muted); margin-bottom: 18px;
}

mark[data-ann] {
  background: transparent;
  padding: 1px 0 2px;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s, box-shadow 0.15s;
}
mark.lv-high { background: rgba(249, 83, 39, 0.16); box-shadow: inset 0 -2px 0 var(--high); }
mark.lv-mid { background: rgba(253, 158, 96, 0.22); box-shadow: inset 0 -2px 0 var(--mid); }
mark.lv-lang { background: rgba(92, 151, 155, 0.16); box-shadow: inset 0 -2px 0 var(--lang); }
mark[data-ann].is-active {
  box-shadow: inset 0 -2px 0 currentColor, 0 0 0 3px rgba(253, 108, 57, 0.22);
}
mark[data-ann]::after {
  content: attr(data-n);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  margin-left: 3px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  font-style: normal;
  vertical-align: 2px;
  color: #fff;
  background: var(--high);
}
mark.lv-mid::after { background: var(--mid); }
mark.lv-lang::after { background: var(--lang); }

.legend {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
}
.lg { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #5a524b; }
.lg i {
  width: 12px; height: 8px; border-radius: 2px; display: inline-block;
}
.lg .h { background: var(--high-bg); box-shadow: inset 0 -2px 0 var(--high); }
.lg .m { background: var(--mid-bg); box-shadow: inset 0 -2px 0 var(--mid); }
.lg .l { background: var(--lang-bg); box-shadow: inset 0 -2px 0 var(--lang); }

/* ---- right panel ---- */
.right {
  width: var(--right);
  flex-shrink: 0;
  background: #fff;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.right-scroll { flex: 1; overflow: auto; padding: 16px 16px 28px; }

.summary {
  background: #fffdfc;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 14px 12px;
  margin-bottom: 12px;
}
.summary .label {
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.summary h2 { font-size: 16px; font-weight: 800; margin: 4px 0 0; }
.summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}
.summary-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.report-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 12px;
  font-size: 12.5px;
  color: #5a524b;
  background: #fffaf7;
  white-space: nowrap;
}
.report-file .file-ico {
  width: 22px; height: 26px;
  background: linear-gradient(160deg, #ff9a6a, var(--orange));
  border-radius: 4px;
  color: #fff;
  font-size: 7px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.report-expand {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 8px;
  width: 32px; height: 32px;
  cursor: default;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.findings-title {
  font-size: 14px;
  font-weight: 700;
  margin: 4px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}
.findings-title::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(249, 83, 39, 0.18);
}
body[data-v="1"] .top-actions { display: none; }
body[data-v="1"] .topbar { display: none; }
body[data-v="1"] .report-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
body[data-v="1"] .report-pane .right-scroll { padding: 18px 20px 32px; }
body[data-v="1"] .doc-pane {
  flex: 0 0 42%;
  width: 42%;
  max-width: 560px;
  background: transparent;
  padding: 18px 18px 32px;
}
body[data-v="1"] .doc-paper {
  max-width: none;
  margin: 0;
}
body[data-v="1"] .doc-paper mark[data-ann] {
  padding: 1px 0 2px;
  border-radius: 3px;
  cursor: pointer;
  background: rgba(249, 83, 39, 0.14);
  box-shadow: inset 0 -2px 0 var(--high);
}
body[data-v="1"] .doc-paper mark.lv-mid {
  background: rgba(253, 158, 96, 0.22);
  box-shadow: inset 0 -2px 0 var(--mid);
}
body[data-v="1"] .doc-paper mark.lv-lang {
  background: rgba(92, 151, 155, 0.16);
  box-shadow: inset 0 -2px 0 var(--lang);
}
body[data-v="1"] .doc-paper mark[data-ann].is-active {
  box-shadow: inset 0 -2px 0 currentColor, 0 0 0 3px rgba(253, 108, 57, 0.22);
}
body[data-v="1"] .doc-paper mark::after {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
}
body[data-v="1"] .doc-paper mark.lv-mid::after { background: var(--high); }
body[data-v="1"] .law-fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
}
body[data-v="1"] .law-fold > summary::-webkit-details-marker { display: none; }
body[data-v="1"] .law-fold > summary::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0.55;
  transition: transform .15s;
}
body[data-v="1"] .law-fold[open] > summary::after { transform: rotate(-135deg); }
body[data-v="1"] .law-fold[open] > summary { margin-bottom: 3px; }
.disclaimer {
  font-size: 11.5px;
  line-height: 1.55;
  color: #8a5a3a;
  background: #fff4ee;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
}
.status-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pill {
  background: #f7f1ec;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  color: #6d6259;
  flex: 1;
  min-width: 90px;
}
.pill b { display: block; color: var(--ink); font-size: 12px; margin-top: 2px; }
.pill.bad b { color: var(--red); }
.counts { display: flex; gap: 8px; margin: 8px 0; }
.count {
  flex: 1;
  text-align: center;
  border-radius: 10px;
  padding: 8px 4px 7px;
  font-size: 11px;
  color: #6d6259;
}
.count b { display: block; font-size: 18px; font-weight: 800; line-height: 1.2; }
.count.high { background: var(--high-bg); color: var(--high); }
.count.mid { background: var(--mid-bg); color: #d97a2b; }
.count.lang { background: var(--lang-bg); color: var(--blue); }
body[data-v="1"] .count.comp { background: var(--high-bg); color: var(--high); }
body[data-v="1"] .filters { flex-wrap: wrap; }
body[data-v="1"] .filter[data-filter="comp"] {
  background: var(--high-bg); color: var(--high); border-color: transparent;
}
body[data-v="1"] .filter[data-filter="lang"] {
  background: var(--lang-bg); color: var(--blue); border-color: transparent;
}
body[data-v="1"] .filter[data-filter="comp"].is-on {
  background: var(--high); color: #fff; border-color: var(--high);
}
body[data-v="1"] .filter[data-filter="lang"].is-on {
  background: var(--blue); color: #fff; border-color: var(--blue);
}
body[data-v="1"] .note.lv-high,
body[data-v="1"] .note.lv-mid,
body[data-v="1"] .note.lv-comp { border-left-color: var(--high); }
body[data-v="1"] .note.lv-high .note-n,
body[data-v="1"] .note.lv-mid .note-n { background: var(--high); }
body[data-v="1"] .badge.high,
body[data-v="1"] .badge.mid { background: var(--high-bg); color: var(--high); }
.abstract { font-size: 12.5px; line-height: 1.65; color: #55493f; }

.filters { display: flex; gap: 6px; margin: 12px 0 10px; }
.filter {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  color: #5a524b;
  cursor: pointer;
}
.filter.is-on { background: #1f1a17; color: #fff; border-color: #1f1a17; }

.notes-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-weight: 700;
  margin: 4px 0 10px;
}
.notes-head span { color: var(--muted); font-weight: 500; }

.note {
  border: 1px solid var(--line);
  border-left: 4px solid var(--amber);
  border-radius: 12px;
  padding: 12px 12px 10px;
  margin-bottom: 10px;
  background: #fff;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.note.lv-high { border-left-color: var(--high); }
.note.lv-mid { border-left-color: var(--mid); }
.note.lv-lang { border-left-color: var(--lang); }
.note.is-active {
  box-shadow: 0 0 0 2px rgba(253, 108, 57, 0.28);
  border-color: #ffd0bc;
}
.note-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.note-n {
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--high); color: #fff;
  font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.note.lv-mid .note-n { background: var(--mid); }
.note.lv-lang .note-n { background: var(--lang); }
.note-title { font-size: 13.5px; font-weight: 750; line-height: 1.4; }
.note-domain { font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.badge {
  font-size: 10.5px; font-weight: 800; border-radius: 999px;
  padding: 3px 8px; white-space: nowrap;
}
.badge.high { background: var(--high-bg); color: var(--high); }
.badge.mid { background: var(--mid-bg); color: #d97a2b; }
.badge.lang { background: var(--lang-bg); color: var(--blue); }
.quote {
  margin: 8px 0;
  padding: 8px 10px;
  background: #faf6f2;
  border-radius: 8px;
  font-size: 12px;
  color: #6a5346;
  line-height: 1.55;
}
.quote::before { content: "原文  "; font-weight: 800; color: #9a7b6a; }
.block { margin-top: 8px; border-radius: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.6; }
.block .k { font-weight: 800; margin-bottom: 3px; font-size: 11px; letter-spacing: 0.04em; }
.block.problem { background: #fdf3ee; color: #7c4a33; }
.block.law { background: #f3f7f8; color: #2f5a5e; }
.block.fix { background: #f0f8f2; color: #2f6b46; }
.page-label {
  margin: 22px 0 10px;
  padding: 6px 10px;
  background: #fff4ee;
  color: #b45a32;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.02em;
}
.page-label:first-of-type { margin-top: 8px; }
.slide-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px 18px;
  margin: 14px 0;
  background: #fffaf7;
}
.slide-num {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--orange);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}
.slide-card h3 { font-size: 15px; margin-bottom: 8px; }
.src-switch { display: flex; gap: 6px; }
.src-switch .ghost.is-on {
  background: #1f1a17;
  color: #fff;
  border-color: #1f1a17;
}
.block.loc { background: #f7f1ec; color: #5a463a; position: relative; }
.loc-main { font-weight: 750; margin-bottom: 2px; }
.loc-detail { color: #7a6a5e; }
.loc-quote { margin-top: 8px; }
.loc-quote-text {
  font-size: 12px;
  line-height: 1.6;
  color: #6a5346;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 20;
  overflow: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}
.loc-quote.is-open .loc-quote-text {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
.loc-quote-toggle {
  position: absolute;
  right: 8px;
  bottom: 6px;
  border: none;
  background: transparent;
  color: var(--orange);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 4px;
}
.law-fold > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.law-fold > summary::-webkit-details-marker { display: none; }
.law-fold > summary::after {
  content: "";
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-left: auto;
  flex-shrink: 0;
  opacity: 0.55;
  transition: transform .15s;
}
.law-fold[open] > summary::after { transform: rotate(-135deg); }
.law-fold[open] > summary { margin-bottom: 3px; }
.report-export {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 8px;
  width: 32px; height: 32px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.report-export:hover { border-color: var(--orange); color: var(--orange); }

.hidden { display: none !important; }

/* V2 aligned comments */
body[data-v="2"] { --right: 420px; }
body[data-v="2"] .right { overflow: hidden; }
.v2-sticky {
  flex-shrink: 0;
  z-index: 3;
  background: #fff;
  padding: 14px 16px 8px;
  border-bottom: 1px solid var(--line);
}
.comment-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  position: relative;
}
.comment-stage {
  position: relative;
  padding: 8px 0 80px;
}
.note.float {
  position: absolute;
  left: 16px;
  right: 16px;
  margin: 0;
  width: auto;
}
body[data-v="2"] .summary .abstract { display: none; }
body[data-v="2"] .summary { padding: 12px; }
body[data-v="2"] .disclaimer { margin-bottom: 8px; }
.connector {
  position: absolute;
  pointer-events: none;
  z-index: 2;
}

/* hub */
.hub {
  max-width: 980px;
  margin: 40px auto;
  padding: 0 24px 60px;
  overflow: auto;
  height: 100%;
}
.hub-hero { margin-bottom: 28px; }
.hub-hero h1 { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 8px 0 8px; }
.hub-hero p { color: #5a524b; line-height: 1.7; max-width: 720px; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.choice {
  background: #fff;
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  display: block;
  border: 1px solid transparent;
}
.choice:hover { border-color: #ffd0bc; }
.choice .tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--orange);
  margin-bottom: 6px;
}
.choice h3 { font-size: 18px; margin-bottom: 8px; }
.choice p { font-size: 13.5px; color: #5a524b; line-height: 1.65; }
.choice ul { margin: 12px 0 0 18px; color: #5a524b; font-size: 13px; line-height: 1.7; }
.note-box {
  margin-top: 20px;
  background: #fff;
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 13px;
  color: #5a524b;
  line-height: 1.7;
}
.note-box b { color: var(--ink); }
