:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #f1f5f9;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #eff6ff;
  --brand-line: #bfdbfe;
  --red: #b91c1c;
  --red-bg: #fef2f2;
  --red-line: #fecaca;
  --amber: #92400e;
  --amber-bg: #fffbeb;
  --amber-line: #fde68a;
  --green: #047857;
  --green-bg: #ecfdf5;
  --green-line: #a7f3d0;
  --violet: #6d28d9;
  --violet-bg: #f5f3ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.6 Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

h1, h2, h3 { margin: 0; line-height: 1.35; color: var(--ink); }
h1 { font-size: 18px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
::selection { background: var(--brand); color: #fff; }

.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 8px 24px;
  background: var(--amber-bg);
  border-bottom: 1px solid var(--amber-line);
  color: #78350f;
  font-size: 13px;
}
.notice i { color: #d97706; }
.notice-human {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 10px;
  border: 1px solid var(--green-line);
  border-radius: 999px;
  background: var(--green-bg);
  color: var(--green);
  font-weight: 600;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
.narrow-only { display: none; }

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

.sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  width: 200px;
  height: 100vh;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  background: var(--surface);
  border-right: 1px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 8px; padding: 14px 10px; border-bottom: 1px solid var(--line-soft); }
.logo-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .1);
}
.logo strong { display: block; color: var(--ink); font-size: 13.5px; line-height: 1.35; }
.logo-sub { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted); line-height: 1.4; }
.proto {
  padding: 0 5px;
  border: 1px solid var(--brand-line);
  border-radius: 4px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.nav { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  padding: 0 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #475569;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.nav-btn i { width: 18px; text-align: center; }
.nav-btn:hover:not(.active):not(:disabled) { background: var(--line-soft); color: var(--ink); }
.nav-btn.active { background: var(--brand-soft); border-color: #dbeafe; color: var(--brand-dark); font-weight: 600; }

.sidebar-foot { display: grid; gap: 10px; padding: 12px; }
.lang-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 3px; background: var(--line-soft); border: 1px solid var(--line); border-radius: 10px; }
.lang-switch button { padding: 4px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; }
.lang-switch button:hover:not(:disabled) { background: transparent; color: var(--ink); }
.lang-switch button[aria-pressed="true"], .lang-switch button[aria-pressed="true"]:hover:not(:disabled) { background: var(--surface); color: var(--brand-dark); box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }

.language-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 14px; border: 1px solid var(--brand-line); border-radius: 12px; background: var(--brand-soft); color: var(--brand-dark); font-size: 14px; }
.table-scroll { overflow-x: auto; }

.run-panel { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 12px; }
.run-title { margin-bottom: 6px; color: var(--muted); font-weight: 600; }
.run-panel dl { margin: 0; display: grid; gap: 4px; }
.run-panel dl div { display: flex; justify-content: space-between; gap: 10px; }
.run-panel dt { color: var(--muted); flex: none; }
.run-panel dd { margin: 0; color: var(--ink); font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main { flex: 1; min-width: 0; padding: 20px 24px 48px; }

.overview-head { display: flex; align-items: center; gap: 10px; max-width: 1500px; margin: 0 auto 10px; }
.overview-head h2 { font-size: 17px; }
#new-case { margin-left: auto; padding: 5px 12px; font-size: 13.5px; }

.card, .block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .03);
}

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; max-width: 1500px; margin: 0 auto 20px; }
.stat { display: flex; align-items: flex-start; gap: 12px; padding: 16px; min-width: 0; }
.stat > div { min-width: 0; }
.stat span { display: block; color: var(--ink); font-size: 14px; font-weight: 600; }
.stat-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; font-size: 16px; }
.stat-icon.blue { background: var(--brand-soft); color: var(--brand); }
.stat-icon.rose { background: #fff1f2; color: #e11d48; }
.stat-icon.violet { background: var(--violet-bg); color: #7c3aed; }
.stat-icon.amber { background: var(--amber-bg); color: #d97706; }
.stat-icon.green { background: var(--green-bg); color: var(--green); }
.stat strong { display: block; margin: 4px 0; color: var(--ink); font-size: 24px; line-height: 1.35; font-weight: 700; }
.stat small { display: block; color: var(--muted); font-size: 13px; }
.stat.attention strong { color: #b45309; }
.stat.waiting strong { color: #475569; font-size: 20px; font-weight: 600; line-height: 1.6; }

.state-dot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 50%; background: #94a3b8; vertical-align: 1px; }
.state-dot.busy { background: var(--brand); }
.state-dot.wait { background: #f59e0b; }
.state-dot.ok { background: #10b981; }
.state-dot.bad { background: #dc2626; }

.workbench {
  display: grid;
  grid-template-columns: minmax(340px, 5fr) minmax(0, 7fr);
  gap: 20px;
  align-items: start;
  max-width: 1500px;
  margin: 0 auto;
}

.intake { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-head h1 i, .page-head h1 i { margin-right: 8px; color: var(--brand); }
.tag { padding: 1px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface-2); color: #475569; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.required { color: #dc2626; }
.note { margin-top: 4px; color: var(--muted); font-size: 14px; }

label, .field-label { display: block; margin: 14px 0 6px; color: var(--ink); font-size: 14px; font-weight: 600; }

input, select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font: inherit;
}
::placeholder { color: #94a3b8; }
input.invalid, textarea.invalid { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }

.select { position: relative; }
.select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border-color: #cbd5e1;
  background: var(--surface);
  font-weight: 400;
  text-align: left;
}
.select-button i { flex: none; color: var(--muted); font-size: 12px; transition: transform .15s; }
.select-button[aria-expanded="true"] { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.select-button[aria-expanded="true"] i { transform: rotate(180deg); }
.select-button:disabled { background: var(--surface-2); opacity: .7; }
.select-text.placeholder { color: #94a3b8; }
.select-list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  margin: 0;
  padding: 6px;
  overflow-y: auto;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}
.select.up .select-list { top: auto; bottom: calc(100% + 6px); }
.select-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink); cursor: pointer; }
.select-list li i { display: none; color: var(--brand); font-size: 12px; }
.select-list li.active { background: var(--brand-soft); color: var(--brand-dark); }
.select-list li[aria-selected="true"] { font-weight: 600; }
.select-list li[aria-selected="true"] i { display: inline; }
input:focus, select:focus, textarea:focus { background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); outline: none; }
textarea { resize: vertical; line-height: 1.6; }
input:disabled, select:disabled, textarea:disabled { opacity: .7; }
.count { margin-top: 2px; text-align: right; color: var(--muted); font-size: 12px; }

button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
button:hover:not(:disabled) { background: var(--surface-2); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
button.primary:hover:not(:disabled) { background: var(--brand-dark); }
#analyse { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; margin-top: 16px; font-size: 16px; box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }

.samples { display: flex; flex-wrap: wrap; gap: 6px; }
.sample-btn {
  padding: 6px 11px;
  border-color: #cbd5e1;
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}
.sample-btn:hover:not(:disabled) { background: var(--brand-soft); border-color: #93c5fd; color: var(--brand-dark); }
.sample-btn.selected { background: var(--brand); border-color: var(--brand); color: #fff; }
.sample-btn.selected::before { content: "\2713\00a0"; }
.sample-btn.selected:hover:not(:disabled) { background: var(--brand-dark); }

.status { min-height: 22px; margin-top: 8px; font-size: 13.5px; color: var(--muted); text-align: center; }
.status.error { color: var(--red); font-weight: 600; }

.results { display: grid; gap: 20px; min-width: 0; }

.workflow { padding: 18px 22px 20px; }
.workflow h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.workflow h2 i { color: var(--brand); }
.wf { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 0; }
.wf-step { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 8px; text-align: center; min-width: 0; }
.wf-step:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 24px); right: calc(-50% + 24px); height: 2px; border-radius: 1px; background: var(--line); }
.wf-step.done:not(:last-child)::after { background: var(--brand); }
.wf-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
}
.wf-step strong { display: block; color: var(--ink); font-size: 14.5px; line-height: 1.4; }
.wf-step small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.wf-step.current .wf-mark, .wf-step.active .wf-mark { background: var(--brand); color: #fff; }
.wf-step.done .wf-mark { background: var(--green-bg); color: var(--green); }
.wf-step.active small, .has-result .wf-step.current small { color: var(--brand-dark); font-weight: 600; }
.wf-step.failed .wf-mark { background: var(--red-bg); color: var(--red); }
.wf-step.failed small { color: var(--red); font-weight: 600; }

.empty { display: flex; flex-direction: column; align-items: center; padding: 26px 24px 24px; text-align: center; }
.empty-art { width: 180px; max-width: 100%; height: auto; margin-bottom: 8px; }
.art-glow { fill: var(--brand-soft); }
.art-sheet { fill: var(--surface); stroke: var(--brand-line); stroke-width: 1.500; }
.art-brand { fill: #93c5fd; }
.art-line { fill: #e2e8f0; }
.art-lens { fill: rgba(239, 246, 255, .8); stroke: var(--brand); stroke-width: 4; }
.art-handle { fill: none; stroke: var(--brand); stroke-width: 5; stroke-linecap: round; }
.empty h2 { font-size: 18px; }
.empty-text { max-width: 500px; margin-top: 6px; color: var(--muted); }
.features { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; margin: 20px 0 0; padding: 16px 8px; border-radius: 12px; background: var(--brand-soft); }
.features li { display: flex; flex-direction: column; align-items: center; padding: 0 10px; min-width: 0; }
.features li + li { border-left: 1px solid var(--brand-line); }
.features i { margin-bottom: 8px; color: var(--brand); font-size: 20px; }
.features strong { color: var(--ink); font-size: 14px; }
.features span { color: var(--muted); font-size: 12.5px; }

#output { display: grid; gap: 14px; }

.draft-banner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding: 10px 14px;
  border: 1px solid var(--amber-line);
  border-radius: 12px;
  background: var(--amber-bg);
  color: var(--amber);
  font-weight: 600;
}
.draft-banner.done { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.draft-banner small { font-weight: 400; font-size: 12.5px; }

.specialist { padding: 10px 14px; border: 1px solid var(--red-line); border-radius: 12px; background: var(--red-bg); color: var(--red); }

.block { padding: 18px 20px; }
.block > h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.block > h2 i { color: var(--brand); }

.workbench.has-result { grid-template-columns: minmax(0, 1fr); }
.workbench.has-result .intake { display: none; }

.case-strip { padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.case-strip summary { font-size: 14px; }
.case-strip p { margin: 8px 0 10px; white-space: pre-wrap; font-size: 14px; }

.result-tabs {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, .05);
}
.result-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  white-space: nowrap;
}
.result-tab i { font-size: 14px; color: var(--muted); }
.result-tab em { padding: 0 7px; border-radius: 99px; background: var(--amber-bg); color: var(--amber); font-size: 12px; font-style: normal; line-height: 1.6; }
.result-tab[aria-selected="true"], .result-tab[aria-selected="true"]:hover:not(:disabled) { background: var(--brand); color: #fff; }
.result-tab[aria-selected="true"] i { color: #fff; }
.result-tab[aria-selected="true"] em { background: rgba(255, 255, 255, .25); color: #fff; }

.result-panel { scroll-margin-top: 62px; }
.pager { display: flex; justify-content: space-between; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.review-attention { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--amber-line); border-radius: 10px; background: var(--amber-bg); font-size: 14px; }
.review-attention strong { color: var(--amber); }

.has-result .workflow { padding: 10px 16px; }
.has-result .workflow h2, .has-result .wf-step small { display: none; }
.has-result .wf-step { gap: 3px; }
.has-result .wf-mark { width: 26px; height: 26px; font-size: 12px; }
.has-result .wf-step:not(:last-child)::after { top: 12px; left: calc(50% + 20px); right: calc(-50% + 20px); }
.has-result .wf-step strong { font-size: 13.5px; }
.sub { margin: 16px 0 6px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.sub.first { margin-top: 12px; }

.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.reported { background: var(--green-bg); color: var(--green); }
.pill.uncertain { background: var(--amber-bg); color: var(--amber); }
.pill.unknown { background: var(--line-soft); color: var(--muted); }
.pill.conflicting { background: var(--red-bg); color: var(--red); }
.pill.inferred { background: var(--violet-bg); color: var(--violet); }
.pill.concern { background: #fff7ed; color: #c2410c; }
.pill.plain { background: var(--line-soft); color: var(--muted); }

.checks { padding: 10px 16px; border-color: var(--amber-line); background: #fffdf5; font-size: 14px; }
.block.checks > h2 { margin-bottom: 2px; font-size: 14px; }
.checks ul, .plain-list { margin: 6px 0 0; padding-left: 18px; }
.checks li, .plain-list li { margin-bottom: 4px; }

.indicator { margin-top: 10px; padding-left: 10px; border-left: 3px solid #fdba74; }
.indicator strong { display: block; color: var(--ink); font-weight: 600; }
.indicator small, .gap small { display: block; color: var(--muted); font-size: 12.5px; }
.indicator .pill { margin-top: 3px; }
.quote { display: block; color: var(--muted); font-size: 12.5px; }
.quote::before { content: "Source: \201C"; }
.quote::after { content: "\201D"; }
:lang(zh) .quote::before { content: "原文：\201C"; }
.unverified { display: block; color: var(--red); font-size: 12px; font-weight: 600; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
tr:last-child th, tr:last-child td { border-bottom: 0; }
th { width: 22%; color: var(--ink); font-weight: 600; }
td.state { width: 76px; padding-right: 0; text-align: right; }

.gap { padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.gap:last-child { border-bottom: 0; }
.gap em { display: block; font-style: normal; color: var(--brand-dark); font-weight: 600; font-size: 13px; }

.flag { display: flex; gap: 8px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.flag:last-child { border-bottom: 0; }
.flag small { display: block; color: var(--muted); font-size: 12.5px; }

.supplement { margin-top: 12px; padding: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; }
.supplement label { margin-top: 0; }
.supplement textarea { background: var(--surface); }
.supplement button { margin-top: 8px; }

.pathway-name { color: var(--ink); font-size: 15px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.space { margin-top: 8px; }

ol.referrals { margin: 6px 0 0; padding-left: 20px; }
ol.referrals li { margin-bottom: 8px; }
ol.referrals small { display: block; color: var(--muted); font-size: 12.5px; }

details { margin-top: 6px; }
summary { cursor: pointer; color: var(--ink); font-weight: 600; font-size: 13px; }
details p { margin: 4px 0 0 16px; font-size: 12.5px; color: var(--muted); }

.review { border: 1px solid var(--amber-line); box-shadow: inset 0 3px 0 #f59e0b; }
.decision { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 4px; }
.radio, .check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 13.5px; margin: 0; color: var(--text); }
.check { margin: 8px 0; }
.radio input, .check input { width: auto; margin-top: 4px; flex: none; box-shadow: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

.meta { font-size: 12px; color: var(--muted); }

.page { max-width: 1200px; margin: 0 auto; padding: 26px; }
.page-head { padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.page-head h1 { font-size: 18px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 18px 0 0; padding: 0; }
.step { padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.step.ai { background: #f5f8ff; border-color: var(--brand-line); }
.step.human { background: #fffdf5; border-color: var(--amber-line); }
.step-top { display: flex; align-items: center; justify-content: space-between; }
.step-no { color: #94a3b8; font-size: 12px; font-weight: 700; }
.step h2 { margin: 8px 0 4px; font-size: 14px; }
.step p { font-size: 12.5px; color: #475569; }
.step-tag { display: inline-block; padding: 0 7px; border-radius: 5px; font-size: 11px; font-weight: 700; }
.step-tag.code { background: #e2e8f0; color: #1e293b; }
.step-tag.ai { background: #dbeafe; color: #1e40af; }
.step-tag.human { background: #fef3c7; color: #78350f; }
.why { margin-top: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.why h2 { font-size: 14px; }
.why h2 i { margin-right: 8px; color: #f59e0b; }
.matrix { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.matrix-item { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.matrix-item h2 { margin-bottom: 6px; font-size: 14px; }
.matrix-item h2 i { margin-right: 8px; color: var(--brand); }
.matrix-item.no { background: #fff8f8; border-color: var(--red-line); }
.matrix-item.no h2, .matrix-item.no h2 i { color: var(--red); }
.matrix-item.yes { background: #f6fdf9; border-color: var(--green-line); }
.matrix-item.yes h2, .matrix-item.yes h2 i { color: var(--green); }

@media (max-width: 1280px) {
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:last-child { grid-column: 1 / -1; }
  .matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .shell { flex-direction: column; }
  .sidebar { position: relative; width: 100%; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-foot { position: absolute; top: 12px; right: 16px; padding: 0; }
  .lang-switch button { padding: 3px 10px; }
  .logo { padding: 12px 16px; }
  .nav { flex-direction: row; overflow-x: auto; padding: 8px 12px; scrollbar-width: none; }
  .nav-btn { width: auto; flex: none; }
  .run-panel { display: none; }
  .main { padding: 14px 16px 40px; }
  .notice { padding: 8px 16px; }
  .wide-only { display: none; }
  .narrow-only { display: inline; }
  .notice { flex-wrap: nowrap; font-size: 12px; white-space: nowrap; }
  .notice-human { padding: 0 8px; gap: 4px; font-size: 11.5px; }
  .result-tabs { scrollbar-width: none; }
  #new-case { padding: 3px 10px; white-space: nowrap; }
  .overview-head { margin-bottom: 12px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
  .overview-head h2 { font-size: 15px; white-space: nowrap; }
  .overview-head .tag { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  .stats.is-waiting { display: none; }
  .stat { padding: 10px 12px; border-radius: 12px; }
  .stat-icon, .stat small { display: none; }
  .stat span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
  .stat strong { margin: 0; font-size: 16px; line-height: 1.4; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .features li:nth-child(3) { border-left: 0; }
  .wf-step { padding: 0 2px; }
  .wf-step small { display: none; }
  .wf-step.active small, .wf-step.failed small, .wf-step.current small { display: block; }
  .wf-step strong { font-size: 13px; }
  .wf-step:not(:last-child)::after { left: calc(50% + 20px); right: calc(-50% + 20px); }
  .two-col, .matrix, .steps { grid-template-columns: minmax(0, 1fr); }
  th { width: 30%; }
}
