/* ============================================================
   评审台 · InfoVis Critique Studio
   ============================================================ */

:root {
  --bg: #0a0b0d;
  --bg-1: #0e1013;
  --bg-2: #121519;
  --bg-3: #171b20;
  --line: #23272d;
  --line-soft: #1a1e23;
  --ink: #eae7e0;
  --ink-2: #b6bac1;
  --muted: #7b818b;
  --accent: #e2603f;
  --accent-dim: rgba(226, 96, 63, 0.13);
  --gold: #d9b26a;
  --teal: #4fb3a5;
  --danger: #e05c5c;
  --warn: #dda23f;
  --ok: #6bbf8a;

  --serif: "Songti SC", "Source Han Serif SC", "Noto Serif SC", "SimSun", Georgia, serif;
  --sans: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --r: 14px;
  --r-sm: 9px;
}

* { box-sizing: border-box; }

/* hidden 属性必须压过任何 display 声明 */
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(900px 500px at 78% -8%, rgba(226, 96, 63, 0.07), transparent 70%),
    radial-gradient(700px 400px at 8% 110%, rgba(79, 179, 165, 0.05), transparent 70%);
  background-attachment: fixed;
}

::selection { background: rgba(226, 96, 63, 0.3); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #262b31; border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #333a42; }

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ---------------- 顶栏 ---------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 11, 13, 0.86);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 27px; height: 27px; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text b {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.14em;
}
.brand-text span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.19em;
  color: var(--muted);
  margin-top: 3px;
}

.topbar-meta { display: flex; align-items: center; gap: 8px; margin-left: 8px; }
.dot-live {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 0 rgba(107, 191, 138, 0.5);
}
.dot-live.on { background: var(--ok); animation: pulse 2.4s infinite; }
.dot-live.err { background: var(--danger); }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(107, 191, 138, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(107, 191, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(107, 191, 138, 0); }
}
.model-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  transition: 0.18s ease;
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; flex: none; }
.btn:hover { color: var(--ink); border-color: #333a42; background: rgba(255, 255, 255, 0.03); }
.btn.ghost { background: transparent; }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.btn.primary:hover { background: #ef6c49; border-color: #ef6c49; }
.btn .count {
  font-family: var(--mono);
  font-size: 10px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--bg-3);
  color: var(--ink-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------------- 布局 ---------------- */
.workspace {
  display: grid;
  grid-template-columns: 392px minmax(0, 1fr);
  height: calc(100vh - 62px);
}

.rail {
  border-right: 1px solid var(--line);
  padding: 28px 24px 48px;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 340px);
}

.stage {
  overflow-y: auto;
  padding: 30px 40px 90px;
  position: relative;
}

/* ---------------- 提交栏 ---------------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.rail-head h1 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
}
.rail-sub { margin: 0 0 22px; font-size: 12.5px; color: var(--muted); line-height: 1.65; }

.drop {
  position: relative;
  border: 1px dashed #2f353d;
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.022), transparent);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s ease;
}
.drop:hover, .drop:focus-visible {
  border-color: var(--accent);
  background: var(--accent-dim);
  outline: none;
}
.drop.drag { border-color: var(--accent); background: var(--accent-dim); transform: scale(0.995); }
.drop-icon { width: 26px; height: 26px; color: var(--ink-2); margin-bottom: 4px; }
.drop b { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.drop span { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; }
.drop .drop-hint { font-size: 10.5px; color: #5d636c; margin-top: 2px; }

.sample-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 10.5px;
  color: #565c65;
  justify-content: center;
}
.sample-row button {
  border: none;
  background: none;
  padding: 0;
  color: #a08a74;
  font-size: 10.5px;
  border-bottom: 1px dashed rgba(217, 178, 106, 0.35);
  transition: 0.16s;
}
.sample-row button:hover { color: var(--gold); }

.thumbs {  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}
.thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg-3);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .idx {
  position: absolute; left: 4px; top: 4px;
  font-family: var(--mono); font-size: 9px;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.65); color: #fff;
  backdrop-filter: blur(4px);
}
.thumb .rm {
  position: absolute; right: 3px; top: 3px;
  width: 19px; height: 19px; border-radius: 5px;
  border: none; background: rgba(0, 0, 0, 0.66);
  color: #ddd; display: grid; place-items: center;
  opacity: 0; transition: 0.15s;
}
.thumb:hover .rm { opacity: 1; }
.thumb .rm svg { width: 11px; height: 11px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.field { display: block; margin-top: 14px; }
.field > span {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.field > span em { font-style: normal; color: #565c65; font-size: 10px; }

.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  font-size: 12.5px;
  color: var(--ink);
  transition: 0.16s ease;
  outline: none;
}
.field textarea { resize: vertical; min-height: 62px; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: #4f555e; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #3c444d;
  background: var(--bg-2);
  box-shadow: 0 0 0 3px rgba(226, 96, 63, 0.08);
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.6 6 7.4l3-2.8' stroke='%237b818b' stroke-width='1.2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 12px;
  padding-right: 26px;
}
.field select option { background: #14171b; }

.group { margin-top: 18px; }
.group-label {
  font-size: 11px; color: var(--muted);
  letter-spacing: 0.05em; margin-bottom: 7px;
}

.segment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 3px;
}
.segment button {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  padding: 7px 4px;
  border-radius: 7px;
  transition: 0.18s;
  letter-spacing: 0.02em;
}
.segment button:hover { color: var(--ink-2); }
.segment button.on {
  background: var(--bg-3);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.chips-sm { display: flex; gap: 6px; flex-wrap: wrap; }
.chips-sm button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  padding: 6px 11px;
  border-radius: 20px;
  transition: 0.18s;
}
.chips-sm button:hover { border-color: #333a42; color: var(--ink-2); }
.chips-sm button.on {
  border-color: rgba(226, 96, 63, 0.5);
  background: var(--accent-dim);
  color: #f0a48c;
}

.submit {
  width: 100%;
  margin-top: 22px;
  height: 46px;
  border: none;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: 0.18s ease;
}
.submit svg { width: 17px; height: 17px; transition: transform 0.2s; }
.submit:hover:not(:disabled) { background: #ef6c49; }
.submit:hover:not(:disabled) svg { transform: translateX(3px); }
.submit:disabled { opacity: 0.55; cursor: not-allowed; }

.rail-foot {
  margin: 10px 0 0;
  font-size: 10.5px;
  color: #565c65;
  text-align: center;
  letter-spacing: 0.02em;
}

/* ---------------- 空白态 ---------------- */
.empty {
  min-height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 26px;
  padding-bottom: 40px;
}
.empty-glyph { color: var(--ink); opacity: 0.5; width: 132px; height: 132px; }
.empty-glyph svg { width: 100%; height: 100%; }
.empty-copy { max-width: 520px; }
.empty-copy h2 {
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.34;
  letter-spacing: 0.03em;
  font-weight: 700;
  margin: 0 0 14px;
}
.empty-copy p { color: var(--muted); font-size: 13px; line-height: 1.85; margin: 0; }
.empty-tags {
  display: flex; flex-wrap: wrap; gap: 7px; justify-content: center; margin-top: 20px;
}
.empty-tags span {
  font-size: 10.5px;
  font-family: var(--mono);
  letter-spacing: 0.08em;
  color: #6a7079;
  border: 1px solid var(--line-soft);
  padding: 4px 9px;
  border-radius: 5px;
}

/* ---------------- 加载态 ---------------- */
.loading {
  min-height: calc(100vh - 130px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 50px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}
.load-left h2 {
  font-family: var(--serif);
  font-size: 40px;
  margin: 0 0 10px;
  letter-spacing: 0.05em;
}
.load-note { color: var(--muted); font-size: 13px; margin: 0 0 26px; min-height: 22px; }
.elapsed {
  font-family: var(--mono);
  font-size: 46px;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.elapsed i { font-style: normal; font-size: 15px; color: var(--muted); }
.steps { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  color: #565c65;
  font-size: 12.5px;
  border-bottom: 1px solid var(--line-soft);
  transition: 0.3s;
}
.steps li i {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 1px solid #32383f;
  flex: none;
  position: relative;
  transition: 0.3s;
}
.steps li.active { color: var(--ink); }
.steps li.active i { border-color: var(--accent); }
.steps li.active i::after {
  content: "";
  position: absolute; inset: 3px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 1.1s infinite;
}
.steps li.done { color: var(--ink-2); }
.steps li.done i { border-color: var(--ok); background: var(--ok); }
.steps li.done i::after {
  content: ""; position: absolute; left: 4px; top: 1px;
  width: 4px; height: 7px;
  border: solid #0a0b0d; border-width: 0 1.6px 1.6px 0;
  transform: rotate(42deg);
}
@keyframes blink { 50% { opacity: 0.25; } }

/* ---------------- 结果 ---------------- */
#result { max-width: 1080px; margin: 0 auto; animation: rise 0.5s ease both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.result-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.dial { position: relative; width: 116px; height: 116px; flex: none; }
.dial svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.dial .track { fill: none; stroke: #1e2328; stroke-width: 5; }
.dial .bar {
  fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round;
  transition: stroke-dashoffset 1.1s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dial-num {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0;
}
.dial-num b {
  font-family: var(--mono);
  font-size: 31px;
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 500;
}
.dial-num span { font-size: 9px; color: var(--muted); letter-spacing: 0.16em; margin-top: 5px; }

.head-main h2 {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.32;
  margin: 6px 0 8px;
  letter-spacing: 0.02em;
  font-weight: 700;
}

.head-eyebrow { display: flex; align-items: center; gap: 10px; }
.grade-chip {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--gold);
  border: 1px solid rgba(217, 178, 106, 0.34);
  background: rgba(217, 178, 106, 0.09);
  padding: 3px 10px;
  border-radius: 20px;
}
.grade-chip.low {
  color: #f08a70;
  border-color: rgba(226, 96, 63, 0.4);
  background: var(--accent-dim);
}
.conf { font-family: var(--mono); font-size: 9.5px; color: #6f7680; letter-spacing: 0.08em; }

.verdict-line {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  color: #ece5d8;
  margin: 0 0 8px;
  letter-spacing: 0.02em;
}

.head-main .summary { color: var(--muted); font-size: 12px; margin: 0 0 12px; line-height: 1.7; }
.head-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.head-chips span {
  font-size: 10.5px;
  font-family: var(--mono);
  letter-spacing: 0.05em;
  color: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px 8px;
}
.grade-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  color: var(--gold); border: 1px solid rgba(217, 178, 106, 0.3);
  background: rgba(217, 178, 106, 0.08);
  padding: 4px 10px; border-radius: 20px;
}
.grade-pill.low { color: var(--accent); border-color: rgba(226, 96, 63, 0.3); background: var(--accent-dim); }

.head-actions { display: flex; flex-direction: column; gap: 8px; }

.overall {
  font-size: 13.5px;
  line-height: 2;
  color: var(--ink-2);
  margin: 22px 0 0;
  padding-left: 16px;
  border-left: 2px solid rgba(226, 96, 63, 0.4);
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 34px 0 14px;
}
.section-title h3 {
  font-family: var(--serif);
  font-size: 17px;
  margin: 0;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.section-title .num {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.section-title .hint { font-size: 11px; color: var(--muted); margin-left: auto; }

.grid-2 > .card { display: flex; flex-direction: column; }
.grid-2 { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 18px; align-items: stretch; }

.card {
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 60%);
  padding: 18px 20px;
}
.card-head {
  display: flex; align-items: baseline; gap: 9px;
  margin-bottom: 12px;
}
.card-head h4 {
  font-family: var(--serif); font-size: 14.5px; margin: 0;
  letter-spacing: 0.06em; font-weight: 700;
}
.card-head .sub { font-size: 10.5px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.08em; }

/* 雷达 */
.radar-wrap { display: flex; justify-content: center; align-items: center; flex: 1; padding: 2px 0 4px; }
.radar-wrap svg { width: 100%; max-width: 330px; height: auto; overflow: visible; }
.radar-axis { stroke: #262b31; stroke-width: 0.8; }
.radar-ring { fill: none; stroke: #21262c; stroke-width: 0.8; }
.radar-label { font-family: var(--sans); font-size: 10px; fill: #8f949c; letter-spacing: 0.02em; }
.radar-val { font-family: var(--mono); font-size: 9.5px; fill: #d9b26a; }
.radar-poly { fill: rgba(226, 96, 63, 0.17); stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; }
.radar-dot { fill: var(--accent); }

/* 维度条 */
.dims { display: flex; flex-direction: column; gap: 13px; }
.dim-row { display: grid; grid-template-columns: 116px minmax(0, 1fr) 38px; gap: 12px; align-items: center; }
.dim-name { font-size: 12px; color: var(--ink-2); letter-spacing: 0.02em; }
.dim-name i { font-style: normal; color: #565c65; font-family: var(--mono); font-size: 9.5px; margin-left: 5px; }
.dim-track { height: 5px; background: #1b1f24; border-radius: 3px; overflow: hidden; }
.dim-fill {
  height: 100%; border-radius: 3px; background: var(--gold);
  width: 0; transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.dim-fill.mid { background: #8f949c; }
.dim-fill.low { background: var(--accent); }
.dim-score { font-family: var(--mono); font-size: 12.5px; text-align: right; color: var(--ink); }
.dim-verdicts { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 6px; }
.dv-label {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em;
  color: #5d636c; text-transform: uppercase; margin-bottom: 2px;
}
.dim-verdicts p { margin: 0; font-size: 11px; color: var(--muted); line-height: 1.6; }
.dim-verdicts p b { color: var(--ink-2); font-weight: 500; }

/* 达成度 */
.co-head, .co-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 112px 56px;
  gap: 16px;
}
.co-head {
  padding: 0 2px 9px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: #5d636c;
  text-transform: uppercase;
}
.co-head span:last-child { text-align: right; }
.co-row { padding: 15px 2px; border-bottom: 1px solid var(--line-soft); align-items: start; }
.co-row:last-child { border-bottom: none; }
.co-code { font-family: var(--mono); font-size: 11px; color: var(--accent); letter-spacing: 0.06em; padding-top: 2px; }
.co-title { font-size: 13px; color: var(--ink); font-weight: 500; margin-bottom: 4px; }
.co-evidence { font-size: 11px; color: #838992; line-height: 1.65; }
.co-gap { font-size: 10.5px; color: #6d737c; line-height: 1.6; margin-top: 6px; }
.co-gap b {
  font-family: var(--mono); font-size: 9px; font-weight: 400;
  color: var(--teal); letter-spacing: 0.1em; margin-right: 6px;
}
.co-level { font-size: 12px; color: var(--ink); }
.co-level small { font-family: var(--mono); font-size: 9.5px; color: var(--muted); margin-left: 4px; }
.co-dots { display: flex; gap: 3px; margin-top: 6px; }
.co-dots i { width: 15px; height: 3px; border-radius: 2px; background: #22272d; }
.co-dots i.on { background: var(--gold); }
.co-score {
  font-family: var(--mono);
  font-size: 15px;
  color: var(--ink-2);
  text-align: right;
  padding-top: 1px;
}

/* 优势 */
.strengths { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.strength {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  background: rgba(255, 255, 255, 0.014);
}
.strength b {
  display: flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; margin-bottom: 6px;
  letter-spacing: 0.02em;
}
.strength b::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--teal); flex: none;
}
.strength p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.7; }

/* 问题清单 */
.issue-filters { display: flex; gap: 6px; margin-bottom: 12px; }
.issue-filters button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
}
.issue-filters button.on { background: var(--accent-dim); border-color: rgba(226, 96, 63, 0.45); color: #f0a48c; }

.issues { display: flex; flex-direction: column; gap: 9px; }
.issue {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 14px;
  background: var(--bg-1);
  transition: 0.2s;
}
.issue:hover { border-color: #2c3239; }
.sev {
  font-size: 10.5px;
  text-align: center;
  padding: 3px 0;
  border-radius: 4px;
  height: fit-content;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.sev.fatal { color: #ff9179; background: rgba(224, 92, 92, 0.15); border: 1px solid rgba(224, 92, 92, 0.28); }
.sev.major { color: #e8bc6f; background: rgba(221, 162, 63, 0.12); border: 1px solid rgba(221, 162, 63, 0.24); }
.sev.minor { color: #8f949c; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.issue-body h5 { margin: 0 0 5px; font-size: 13px; font-weight: 600; line-height: 1.6; letter-spacing: 0.01em; }
.issue-meta {
  display: flex; gap: 10px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 9.5px;
  color: #7b818b; letter-spacing: 0.04em; margin-bottom: 8px;
}
.issue-impact { font-size: 11.5px; color: var(--muted); line-height: 1.7; margin: 0 0 9px; }
.issue-fix {
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-2);
  background: rgba(79, 179, 165, 0.06);
  border-left: 2px solid rgba(79, 179, 165, 0.45);
  padding: 8px 11px;
  border-radius: 0 5px 5px 0;
}
.issue-fix b { color: var(--teal); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.12em; margin-right: 6px; }

/* 修改计划 */
.plan { display: flex; flex-direction: column; }
.plan-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px dashed var(--line);
  align-items: start;
}
.plan-item:last-child { border-bottom: none; }
.plan-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  border: 1px solid rgba(226, 96, 63, 0.3);
  border-radius: 50%;
  width: 24px; height: 24px;
  display: grid; place-items: center;
  margin-top: 1px;
}
.plan-item h5 { margin: 0 0 4px; font-size: 12.5px; font-weight: 600; line-height: 1.6; }
.plan-item p { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.6; }
.effort {
  font-size: 10px; font-family: var(--mono);
  color: #8f949c; border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 20px; white-space: nowrap;
  margin-top: 2px;
}

.result-foot {
  margin-top: 30px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 10.5px;
  color: #565c65;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  flex-wrap: wrap;
}

/* ---------------- 抽屉 ---------------- */
.scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  animation: fade 0.2s;
}
@keyframes fade { from { opacity: 0; } }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: 400px; max-width: 92vw;
  background: var(--bg-1);
  border-left: 1px solid var(--line);
  transform: translateX(102%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  padding: 22px 22px 16px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.drawer-head h2 { font-family: var(--serif); font-size: 20px; margin: 0; letter-spacing: 0.05em; }
.drawer-body { overflow-y: auto; padding: 14px; flex: 1; }

.icon-btn {
  width: 30px; height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  display: grid; place-items: center;
}
.icon-btn svg { width: 14px; height: 14px; }
.icon-btn:hover { color: var(--ink); border-color: #333a42; }

.hist-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto 24px;
  gap: 10px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.16s;
  align-items: center;
}
.hist-item:hover { background: var(--bg-2); border-color: var(--line); }
.hist-thumb {
  width: 56px; height: 56px; border-radius: 7px; overflow: hidden;
  background: var(--bg-3); border: 1px solid var(--line);
}
.hist-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hist-main b {
  font-size: 12.5px; font-weight: 600; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hist-main span {
  font-size: 10.5px; color: var(--muted); display: block; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hist-score { font-family: var(--mono); font-size: 15px; color: var(--gold); min-width: 40px; }
.hist-score small { display: block; font-size: 9px; color: var(--muted); text-align: right; letter-spacing: 0.1em; }
.hist-empty { text-align: center; color: var(--muted); font-size: 12px; padding: 60px 20px; }
.hist-del {
  border: none; background: transparent; color: #4f555e;
  padding: 4px; border-radius: 5px; line-height: 0;
}
.hist-del svg { width: 13px; height: 13px; }
.hist-del:hover { color: var(--danger); background: rgba(224, 92, 92, 0.1); }

/* ---------------- 弹窗 ---------------- */
.modal-wrap {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 30px;
  animation: fade 0.2s;
}
.modal {
  width: 720px; max-width: 100%;
  max-height: 84vh;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: rise 0.28s ease both;
}
.modal-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start;
}
.modal-head h2 { font-family: var(--serif); font-size: 20px; margin: 0; letter-spacing: 0.05em; }
.modal-body { padding: 8px 22px 24px; overflow-y: auto; }

.rub-dim { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.rub-dim:last-child { border-bottom: none; }
.rub-dim h4 {
  margin: 0 0 3px; font-size: 13.5px; display: flex; align-items: center; gap: 8px;
}
.rub-dim h4 span {
  font-family: var(--mono); font-size: 9.5px; color: var(--accent);
  border: 1px solid rgba(226, 96, 63, 0.3); border-radius: 4px; padding: 1px 6px;
}
.rub-dim > p { margin: 0 0 10px; font-size: 11.5px; color: var(--muted); }
.rub-anchors { display: flex; flex-direction: column; gap: 5px; }
.rub-anchor { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; font-size: 11.5px; }
.rub-anchor b { font-family: var(--mono); font-size: 10.5px; color: var(--gold); font-weight: 500; }
.rub-anchor span { color: #8f949c; line-height: 1.6; }

/* ---------------- toast ---------------- */
.toast {
  position: fixed;
  left: 50%; bottom: 34px;
  transform: translate(-50%, 20px);
  z-index: 90;
  background: #1c2127;
  border: 1px solid #2e353d;
  color: var(--ink);
  font-size: 12.5px;
  padding: 10px 18px;
  border-radius: 9px;
  opacity: 0;
  pointer-events: none;
  transition: 0.28s ease;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  max-width: 80vw;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(224, 92, 92, 0.5); color: #ffb3a6; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1180px) {
  .grid-2 { grid-template-columns: 1fr; }
  .radar-wrap svg { max-width: 300px; }
}
@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; height: auto; }
  .rail { border-right: none; border-bottom: 1px solid var(--line); }
  .stage { padding: 24px 18px 60px; }
  .result-head { grid-template-columns: auto minmax(0, 1fr); }
  .head-actions { grid-column: 1 / -1; flex-direction: row; }
  .loading { grid-template-columns: 1fr; gap: 26px; }
  .empty-copy h2 { font-size: 26px; }
  .topbar-meta { display: none; }
}

/* ---------------- 打印 ---------------- */
@media print {
  @page { margin: 14mm; }
  body { background: #fff !important; color: #111 !important; }
  .topbar, .rail, .drawer, .scrim, .modal-wrap, .toast, .head-actions, .issue-filters { display: none !important; }
  .workspace { display: block; height: auto; }
  .stage { overflow: visible; padding: 0; }
  #result { max-width: none; }
  .card, .issue, .strength { border-color: #ddd !important; background: #fff !important; }
  .head-main h2, .section-title h3, .card-head h4 { color: #111 !important; }
  .overall, .issue-impact, .strength p, .dim-name, .co-name { color: #333 !important; }
  .dim-fill { background: #555 !important; }
  .radar-poly { stroke: #333 !important; fill: rgba(0, 0, 0, 0.06) !important; }
  .radar-label { fill: #444 !important; }
  .radar-val { fill: #333 !important; }
  .issue-fix { background: #f6f6f6 !important; color: #222 !important; border-left-color: #999 !important; }
  .dial .bar { stroke: #333 !important; }
  .dial-num b { color: #111 !important; }
  #result > * { break-inside: avoid; }
}
