:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1c2330;
  --muted: #66707e;
  --line: #dde2e9;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --ok: #15803d;
  --bad: #b91c1c;
  --warn-bg: #fff7e0;
  --warn-line: #e7c65a;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 20px 16px 64px; }
h1 { font-size: 22px; margin: 8px 0 4px; }
h2 { font-size: 17px; margin: 24px 0 8px; }
.sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 14px 0;
}
button {
  font: inherit;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 9px;
  padding: 8px 16px;
  cursor: pointer;
}
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button:disabled { opacity: .45; cursor: not-allowed; }
input[type="password"], input[type="text"], textarea {
  font: inherit;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 12px;
  background: #fff;
}
textarea { min-height: 64px; resize: vertical; }
.msg { font-size: 14px; margin: 10px 0; min-height: 20px; }
.msg.error { color: var(--bad); }
.msg.ok { color: var(--ok); }
.hidden { display: none !important; }

/* 进度条 */
.progress-outer { background: #e8ecf1; border-radius: 999px; height: 12px; overflow: hidden; }
.progress-inner { background: var(--accent); height: 100%; width: 0%; transition: width .3s; }
.progress-text { font-size: 14px; color: var(--muted); margin: 6px 0 0; }

/* 断言卡 */
.assertion-grid { display: flex; flex-wrap: wrap; gap: 18px 34px; }
.assertion-grid .cell .k { font-size: 13px; color: var(--muted); }
.assertion-grid .cell .v { font-size: 20px; font-weight: 600; word-break: break-all; }

/* 摘录 */
.excerpt {
  border-left: 3px solid var(--line);
  padding: 8px 12px;
  margin: 10px 0;
  background: #fbfcfd;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 15px;
}
.excerpt .pos { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }

/* 提示框 */
.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 12px 0;
  font-size: 14px;
}

/* 图片 */
.figure-box { margin: 12px 0; }
.figure-box img { max-width: 100%; border: 1px solid var(--line); border-radius: 8px; }
.figure-placeholder {
  border: 1.5px dashed var(--warn-line);
  background: var(--warn-bg);
  border-radius: 8px;
  padding: 22px;
  text-align: center;
  color: #7a5b00;
  font-size: 15px;
}
.figure-tag { display: inline-block; font-size: 13px; background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 999px; padding: 1px 10px; margin-bottom: 8px; }

/* 判词 */
.dim { margin: 16px 0; }
.dim .dim-title { font-weight: 600; margin-bottom: 8px; }
.choices { display: flex; gap: 10px; flex-wrap: wrap; }
.choices button { flex: 1 1 120px; padding: 10px 8px; font-size: 16px; }
.choices button.selected[data-v="supported"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.choices button.selected[data-v="unsupported"] { background: var(--bad); border-color: var(--bad); color: #fff; }
.choices button.selected[data-v="unsure"] { background: #b45309; border-color: #b45309; color: #fff; }

.navrow { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0; }
.navrow .spacer { flex: 1; }
.saved-note { font-size: 13px; color: var(--ok); align-self: center; }

/* 看板 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { font-size: 13px; color: var(--muted); }
.stat .v { font-size: 28px; font-weight: 700; }
table { border-collapse: collapse; width: 100%; background: var(--card); }
th, td { border: 1px solid var(--line); padding: 8px 12px; text-align: center; font-size: 15px; }
th { background: #f0f3f7; }
td.rowhead { text-align: left; font-weight: 600; }
