:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #152033;
  --muted: #667085;
  --line: #e5e9f2;
  --brand: #1f3a5f;
  --brand-2: #274d7d;
  --k: #3157b7;
  --k-soft: #edf2ff;
  --a: #0e7a67;
  --a-soft: #eaf8f4;
  --s: #a45d0b;
  --s-soft: #fff5e8;
  --danger: #b42318;
  --danger-soft: #fff0ee;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --shadow: 0 18px 45px rgba(25, 40, 65, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.brand-wrap { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .6px;
}
.brand-title { font-weight: 760; font-size: 17px; }
.brand-subtitle { color: var(--muted); font-size: 12px; margin-top: 1px; }
.top-actions { display: flex; gap: 8px; }

.ghost-btn, .primary-btn, .soft-btn, .answer-choice {
  border: 0;
  border-radius: 11px;
  transition: .18s ease;
}
.ghost-btn {
  background: #f1f4f8;
  color: #344054;
  padding: 9px 13px;
}
.ghost-btn:hover { background: #e8edf4; }
.primary-btn {
  background: var(--brand);
  color: white;
  padding: 11px 18px;
  font-weight: 650;
  box-shadow: 0 7px 18px rgba(31,58,95,.18);
}
.primary-btn:hover { transform: translateY(-1px); background: var(--brand-2); }
.soft-btn { padding: 9px 13px; background: #eef2f6; color: #344054; }
.soft-btn:hover { background: #e3e8ef; }

.layout { display: grid; grid-template-columns: 310px minmax(0, 1fr); }
.sidebar {
  position: sticky;
  top: 72px;
  height: calc(100vh - 72px);
  overflow: auto;
  padding: 24px 20px 34px;
  background: #fff;
  border-right: 1px solid var(--line);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.sidebar h2 { margin: 1px 0 0; font-size: 24px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: #12b76a; box-shadow: 0 0 0 4px #ecfdf3; }
.eyebrow { font-size: 10px; font-weight: 780; letter-spacing: 1.4px; color: #7a8699; }
.filter-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.filter-chip {
  border: 1px solid var(--line);
  background: #fff;
  color: #475467;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
}
.filter-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.question-list { display: grid; gap: 7px; }
.q-nav {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 13px;
  padding: 10px 11px;
  color: #344054;
}
.q-nav:hover { background: #f6f8fb; }
.q-nav.active { background: #eef3f8; border-color: #d7e0eb; }
.q-nav-top { display: flex; align-items: center; gap: 8px; }
.q-num { width: 28px; height: 28px; border-radius: 9px; background: #f0f3f7; display: grid; place-items: center; font-weight: 750; font-size: 12px; }
.q-nav.active .q-num { background: var(--brand); color: #fff; }
.q-nav-title { min-width: 0; font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-structure { margin: 5px 0 0 36px; font-size: 10px; color: #7b8797; letter-spacing: .2px; }
.q-nav.done .q-num::after { content: "✓"; position: absolute; transform: translate(12px,-12px); background: #12b76a; color: #fff; border-radius: 50%; width: 13px; height: 13px; line-height: 13px; text-align: center; font-size: 8px; }

.workspace { padding: 32px clamp(22px, 4vw, 58px) 72px; max-width: 1340px; width: 100%; margin: 0 auto; }
.hero {
  padding: 10px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.hero h1 { margin: 5px 0 10px; font-size: clamp(30px, 4vw, 48px); line-height: 1.18; letter-spacing: -1.2px; max-width: 920px; }
.hero p { margin: 0; max-width: 900px; color: #596579; font-size: 16px; }
.hero-stats { margin-top: 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; }
.stat-card strong { display: block; font-size: 22px; line-height: 1.2; }
.stat-card span { font-size: 11px; color: var(--muted); }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; }
.hidden { display: none !important; }
.overview-panel h2 { margin: 2px 0 6px; }
.overview-panel > p { margin: 0 0 20px; color: var(--muted); }
.force-card {
  margin: 4px 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: linear-gradient(180deg,#fbfcfe 0%,#f7f9fc 100%);
}
.force-toolbar { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:12px; }
.force-toolbar h3 { margin:2px 0 0; font-size:20px; }
.force-controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.force-controls select {
  height: 36px;
  border:1px solid var(--line);
  border-radius:10px;
  padding:0 30px 0 10px;
  background:#fff;
  color:#475467;
  font-size:12px;
}
.segmented { display:inline-flex; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:#fff; }
.segmented button { min-width:42px; height:34px; border:0; border-right:1px solid var(--line); background:#fff; color:#667085; font-size:11px; font-weight:750; }
.segmented button:last-child { border-right:0; }
.segmented button.active { background:#1f2f45; color:#fff; }
.compact { padding:8px 11px; font-size:11px; }
.graph-legend { display:flex; align-items:center; gap:13px; flex-wrap:wrap; margin:8px 0 11px; color:#667085; font-size:11px; }
.graph-legend span { display:inline-flex; align-items:center; gap:6px; }
.legend-dot { width:9px; height:9px; border-radius:50%; display:inline-block; border:1px solid transparent; }
.legend-dot.q { background:#fff; border-color:#6f7d90; }
.legend-dot.k { background:var(--k); }
.legend-dot.a { background:var(--a); }
.legend-dot.s { background:var(--s); }
.legend-note { margin-left:auto; color:#8a94a4; }
.force-stage-wrap { display:grid; grid-template-columns:minmax(0,1fr) 270px; min-height:560px; border:1px solid #e1e6ee; border-radius:15px; overflow:hidden; background:#fff; }
.force-stage { position:relative; min-width:0; min-height:560px; overflow:hidden; background:
  radial-gradient(circle at 18% 50%,rgba(49,87,183,.06),transparent 30%),
  radial-gradient(circle at 50% 50%,rgba(14,122,103,.06),transparent 30%),
  radial-gradient(circle at 82% 50%,rgba(164,93,11,.06),transparent 30%),
  #fcfdff;
}
.force-stage svg { width:100%; height:100%; min-height:560px; display:block; touch-action:none; user-select:none; }
.graph-detail { border-left:1px solid var(--line); padding:18px 16px; background:#fff; overflow:auto; }
.graph-detail h4 { margin:4px 0 8px; font-size:15px; line-height:1.4; }
.graph-detail p { margin:0 0 12px; color:#667085; font-size:12px; }
.graph-caveat { margin-top:10px; color:#7b8797; font-size:10.5px; }
.detail-kas-list { display:grid; gap:8px; margin:12px 0 14px; font-size:11px; color:#526072; }
.detail-kas-list strong { display:inline-block; min-width:18px; }
.detail-stat { display:flex; align-items:baseline; gap:7px; margin:12px 0; padding:10px 11px; background:#f7f9fc; border-radius:11px; }
.detail-stat strong { font-size:22px; }
.detail-stat span { font-size:11px; color:#7b8797; }
.detail-question-links { display:flex; flex-wrap:wrap; gap:6px; }
.detail-question-links button { border:1px solid var(--line); border-radius:999px; padding:5px 9px; background:#fff; color:#475467; font-size:10px; }
.detail-question-links button:hover { border-color:#a9b5c5; }

.graph-link { stroke:#cfd6e1; stroke-width:1; opacity:.56; transition:opacity .12s ease, stroke-width .12s ease; }
.graph-link.type { opacity:.24; stroke-dasharray:2 4; }
.graph-link.require.k { stroke:rgba(49,87,183,.45); }
.graph-link.require.a { stroke:rgba(14,122,103,.45); }
.graph-link.require.s { stroke:rgba(164,93,11,.45); }
.graph-link.focus { opacity:.95; stroke-width:2; }
.graph-link.dim { opacity:.035; }
.graph-node { cursor:pointer; transition:opacity .12s ease; }
.graph-node circle { stroke-width:1.5; }
.graph-node.question circle { fill:#fff; stroke:#68778c; }
.graph-node.question:hover circle,.graph-node.question.focus circle { fill:#1f2f45; stroke:#1f2f45; }
.graph-node.kas.k circle,.graph-node.hub.k circle { fill:var(--k); stroke:#24458f; }
.graph-node.kas.a circle,.graph-node.hub.a circle { fill:var(--a); stroke:#096454; }
.graph-node.kas.s circle,.graph-node.hub.s circle { fill:var(--s); stroke:#874d0b; }
.graph-node.hub circle { stroke-width:3; }
.graph-node.hub.k circle { filter:drop-shadow(0 5px 8px rgba(49,87,183,.25)); }
.graph-node.hub.a circle { filter:drop-shadow(0 5px 8px rgba(14,122,103,.25)); }
.graph-node.hub.s circle { filter:drop-shadow(0 5px 8px rgba(164,93,11,.25)); }
.graph-node.dim { opacity:.09; }
.graph-node-label { pointer-events:none; font-size:10px; font-weight:800; fill:#566174; }
.graph-node.question:hover .graph-node-label,.graph-node.question.focus .graph-node-label { fill:#fff; }
.graph-node.hub .graph-node-label { fill:#fff; font-size:12px; }
.kas-node-label { pointer-events:none; font-size:8.5px; fill:#4d5a6c; paint-order:stroke; stroke:#fff; stroke-width:3px; stroke-linejoin:round; opacity:.52; }
.graph-node.kas:hover .kas-node-label,.graph-node.kas.focus .kas-node-label { opacity:1; font-size:10px; font-weight:700; }
.matrix { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; margin-bottom: 22px; }
.matrix-card { border-radius: 16px; padding: 18px; border: 1px solid var(--line); }
.matrix-card.k { background: var(--k-soft); border-color: #d8e1ff; }
.matrix-card.a { background: var(--a-soft); border-color: #cfefe5; }
.matrix-card.s { background: var(--s-soft); border-color: #f7dfbf; }
.matrix-card .big { font-size: 28px; font-weight: 800; }
.matrix-card p { margin: 5px 0 0; font-size: 12px; color: #5d6879; }
.section-bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 40px; gap: 10px; align-items: center; font-size: 12px; }
.bar-track { height: 9px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--brand); border-radius: inherit; }

.question-panel { padding: 28px; }
.question-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.question-head h2 { margin: 4px 0 0; font-size: 27px; line-height: 1.35; }
.structure-badge { border-radius: 999px; background: #f0f3f7; color: #475467; padding: 7px 11px; font-size: 11px; white-space: nowrap; font-weight: 650; }
.question-prompt { margin: 19px 0; padding: 18px 20px; border-left: 4px solid var(--brand); background: #f7f9fc; border-radius: 0 14px 14px 0; white-space: pre-line; }
.answer-box { border: 1px solid var(--line); border-radius: 13px; background: #fcfcfd; overflow: hidden; }
.answer-box summary { cursor: pointer; padding: 13px 15px; font-weight: 650; font-size: 13px; }
.answer-box > div { border-top: 1px solid var(--line); padding: 14px 15px; color: #475467; white-space: pre-line; }
.section-title-row { margin-top: 30px; display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.section-title-row h3 { margin: 3px 0 0; }
.microcopy { font-size: 11px; color: #8a94a4; }
.kas-grid { margin-top: 13px; display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.kas-card { border-radius: 15px; padding: 16px; border: 1px solid var(--line); min-height: 150px; }
.kas-card.k { background: var(--k-soft); border-color: #dae3ff; }
.kas-card.a { background: var(--a-soft); border-color: #caece2; }
.kas-card.s { background: var(--s-soft); border-color: #f4d9b6; }
.kas-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.kas-letter { font-size: 20px; font-weight: 850; }
.kas-card.k .kas-letter { color: var(--k); }
.kas-card.a .kas-letter { color: var(--a); }
.kas-card.s .kas-letter { color: var(--s); }
.kas-card .kas-name { font-size: 11px; color: var(--muted); }
.node-list { display: grid; gap: 8px; }
.node { font-size: 12px; line-height: 1.45; }
.node strong { display: block; color: #27364e; }
.node span { color: #687386; }
.empty-node { color: #9099a8; font-size: 12px; }

.method-card {
  margin: 18px 0 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: #fbfcfe;
}
.method-principle { display:flex; align-items:flex-start; gap:12px; padding:12px 13px; border-radius:12px; background:#16263b; color:#fff; }
.method-principle span { flex:0 0 auto; font-size:9px; letter-spacing:1px; color:#b8c5d6; font-weight:800; }
.method-principle strong { font-size:13px; line-height:1.6; }
.method-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; margin-top:12px; }
.method-grid > div { border:1px solid var(--line); border-radius:12px; padding:12px; background:#fff; }
.method-grid strong { font-size:12px; margin-left:7px; }
.method-grid p { margin:5px 0 0; font-size:11px; color:var(--muted); }
.method-letter { display:inline-grid; place-items:center; width:24px; height:24px; border-radius:8px; font-size:11px; }
.method-letter.k { color:var(--k); background:var(--k-soft); }
.method-letter.a { color:var(--a); background:var(--a-soft); }
.method-letter.s { color:var(--s); background:var(--s-soft); }
.method-rules { display:flex; flex-wrap:wrap; gap:7px; margin-top:11px; }
.method-rules span { padding:6px 9px; border:1px solid var(--line); border-radius:999px; background:#fff; color:#5f6a7b; font-size:10px; }

.task-model-panel { margin-top:24px; padding-top:22px; border-top:1px solid var(--line); }
.task-model-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; }
.task-model-head h3 { margin:3px 0 0; }
.task-summary-grid { display:grid; grid-template-columns:1.3fr .9fr 1fr; gap:10px; margin-top:13px; }
.task-summary-card { border:1px solid var(--line); border-radius:13px; padding:12px 13px; background:#f9fafc; }
.task-summary-card > span { display:block; font-size:9px; font-weight:800; letter-spacing:.8px; color:#7f8998; margin-bottom:4px; }
.task-summary-card strong { display:block; font-size:12px; line-height:1.55; color:#29384d; }
.task-summary-card p { margin:4px 0 0; font-size:10px; line-height:1.55; color:#7a8595; }
.source-limit { margin-top:10px; border:1px solid #f0d5ad; background:#fff8ee; color:#76501d; border-radius:11px; padding:10px 12px; font-size:11px; line-height:1.55; }
.atom-list { display:grid; gap:9px; margin-top:12px; }
.atom-card { border:1px solid var(--line); border-radius:13px; padding:13px 14px; background:#fff; }
.atom-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.atom-head > div { display:flex; align-items:center; gap:8px; min-width:0; }
.atom-head strong { font-size:12px; color:#27364e; }
.atom-id { display:inline-grid; place-items:center; min-width:28px; height:24px; padding:0 7px; border-radius:8px; background:#eef2f6; color:#465569; font-size:10px; font-weight:800; }
.atom-verdict { flex:0 0 auto; padding:4px 8px; border-radius:999px; background:#f1f4f8; color:#5f6b7e; font-size:9px; font-weight:700; }
.atom-basis { margin:8px 0 9px; color:#5f6b7e; font-size:11px; line-height:1.62; }
.atom-minimal-label { font-size:9px; font-weight:800; letter-spacing:.75px; color:#8791a0; margin-bottom:6px; }
.atom-node-chips { display:flex; flex-wrap:wrap; gap:6px; }
.atom-node-chip { display:inline-flex; align-items:center; gap:5px; border-radius:999px; padding:5px 8px; font-size:10px; border:1px solid var(--line); }
.atom-node-chip b { font-size:9px; }
.atom-node-chip.k { background:var(--k-soft); border-color:#dbe4ff; color:#3157b7; }
.atom-node-chip.a { background:var(--a-soft); border-color:#cfeee5; color:#0e7a67; }
.atom-node-chip.s { background:var(--s-soft); border-color:#f1ddc3; color:#9a5b12; }
.minimality-check { margin-top:9px; font-size:10px; color:#687386; }
.minimality-check summary { cursor:pointer; font-weight:700; color:#506075; }
.minimality-check p { margin:6px 0 0; padding:8px 10px; border-radius:9px; background:#f7f8fa; line-height:1.6; }
.graph-atomic-note { display:flex; align-items:baseline; gap:7px; margin:9px 0 2px; }
.graph-atomic-note strong { font-size:22px; }
.graph-atomic-note span { font-size:10px; color:var(--muted); }

.answer-trace { margin-top: 8px; }
.answer-trace-head { padding-top: 4px; }
.call-order-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px;
  background: #fbfcfe;
}
.call-order-note { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.call-order-note strong { font-size: 13px; }
.call-order-note span { font-size: 11px; color: var(--muted); }
.call-order-strip { margin-top: 12px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.call-order-node {
  min-width: 34px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  border: 1px solid var(--line);
  background: #fff;
}
.call-order-node.k { background: var(--k-soft); color: var(--k); border-color: #dbe4ff; }
.call-order-node.a { background: var(--a-soft); color: var(--a); border-color: #cfeee5; }
.call-order-node.s { background: var(--s-soft); color: var(--s); border-color: #f1ddc3; }
.call-order-node.answer { background: #18283d; color: #fff; border-color: #18283d; }
.call-order-arrow { color: #929dad; font-size: 12px; }
.routine-card {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f7f9fc;
  border: 1px solid var(--line);
}
.routine-card .routine-label { font-size: 9px; font-weight: 800; letter-spacing: 1.1px; color: #7f8998; margin-bottom: 4px; }
.routine-card strong { display: block; font-size: 13px; line-height: 1.65; color: #27364e; }
.routine-card p { margin: 5px 0 0; font-size: 11px; color: #7b8797; }
.trace-flow { margin-top: 14px; display: grid; gap: 7px; }
.trace-step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 15px;
  background: #fff;
}
.trace-step.k { background: linear-gradient(90deg, var(--k-soft), #fff 42%); border-color: #dbe4ff; }
.trace-step.a { background: linear-gradient(90deg, var(--a-soft), #fff 42%); border-color: #cfeee5; }
.trace-step.s { background: linear-gradient(90deg, var(--s-soft), #fff 42%); border-color: #f1ddc3; }
.trace-step.answer { background: #18283d; border-color: #18283d; color: #fff; }
.trace-index {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: #eef2f6;
  color: #344054;
}
.trace-step.k .trace-index { background: #dfe7ff; color: var(--k); }
.trace-step.a .trace-index { background: #d8f1ea; color: var(--a); }
.trace-step.s .trace-index { background: #fce8cb; color: var(--s); }
.trace-step.answer .trace-index { background: rgba(255,255,255,.14); color: #fff; }
.trace-body { min-width: 0; }
.trace-type { font-size: 9px; font-weight: 800; letter-spacing: 1.1px; color: #7f8998; margin-bottom: 2px; }
.trace-step.k .trace-type { color: var(--k); }
.trace-step.a .trace-type { color: var(--a); }
.trace-step.s .trace-type { color: var(--s); }
.trace-step.answer .trace-type { color: #c7d3e2; }
.trace-body strong { display: block; font-size: 14px; line-height: 1.45; }
.trace-body p { margin: 4px 0 0; font-size: 12px; line-height: 1.65; color: #5d6879; }
.trace-step.answer .trace-body p { color: #d8e0ea; }
.trace-operation-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.trace-operation-block { padding: 10px 11px; border-radius: 10px; background: rgba(255,255,255,.76); border: 1px solid rgba(214,220,230,.85); }
.trace-operation-block > span { display:block; font-size: 9px; line-height:1.35; font-weight: 800; letter-spacing:.55px; color:#7a8698; }
.trace-operation-block p { margin-top:4px; }
.trace-operation-block.product { grid-column: 1 / -1; background:#f5f8fc; border-color:#dce4ee; }
.trace-operation-block.product > span { color:#42526a; }
.trace-operation-block.nodes { grid-column: 1 / -1; padding:8px 10px; background:rgba(244,246,249,.72); }
.trace-step.k .trace-operation-block.nodes > span { color:var(--k); }
.trace-step.a .trace-operation-block.nodes > span { color:var(--a); }
.trace-step.s .trace-operation-block.nodes > span { color:var(--s); }
.trace-step.answer .trace-operation-block { background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.12); }
.trace-step.answer .trace-operation-block > span { color:#bfcbd9; }
.trace-step.answer .trace-operation-block.product { background:rgba(255,255,255,.12); }
.trace-arrow { text-align: center; color: #a2adbb; font-size: 16px; line-height: 1; }
.trace-selfcheck { margin-top:12px; padding:12px 14px; border-left:3px solid var(--brand); background:#f8fafc; border-radius:0 10px 10px 0; font-size:12px; color:#5d6879; }
.trace-selfcheck strong { color:#27364e; margin-right:6px; }

.action-strip { margin-top: 24px; border-radius: 15px; background: #19283d; color: #fff; padding: 17px 18px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.action-strip strong { display: block; }
.action-strip span { font-size: 12px; color: #c8d0dc; }
.action-strip .primary-btn { background: #fff; color: #1d2a3d; box-shadow: none; }

.diagnosis-zone, .training-zone { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 22px; }
.step-card { border: 1px solid var(--line); border-radius: 15px; padding: 18px; background: #fff; }
.step-head { display: flex; justify-content: space-between; gap: 15px; align-items: flex-start; }
.step-head h3 { margin: 3px 0 5px; }
.step-head p { color: var(--muted); font-size: 12px; margin: 0; }
.step-tag { font-size: 10px; border-radius: 999px; padding: 6px 9px; background: #f1f4f8; white-space: nowrap; }
.answer-choices { display: grid; gap: 8px; margin-top: 16px; }
.answer-choice { text-align: left; border: 1px solid var(--line); background: #fff; padding: 11px 13px; color: #344054; }
.answer-choice:hover { border-color: #aab7c8; background: #f9fafb; }
.answer-choice.correct { border-color: #72d6aa; background: var(--ok-soft); color: #05603a; }
.answer-choice.wrong { border-color: #f7a59d; background: var(--danger-soft); color: #9e251a; }
.feedback { margin-top: 13px; padding: 11px 13px; border-radius: 11px; background: #f7f8fa; font-size: 12px; color: #586477; }
.button-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 15px; }

.diagnosis-result { display: grid; grid-template-columns: 1.05fr .95fr; gap: 14px; }
.result-card { border: 1px solid var(--line); border-radius: 15px; padding: 18px; }
.result-card h3 { margin: 4px 0 10px; }
.prob-row { display: grid; grid-template-columns: 24px 1fr 42px; align-items: center; gap: 8px; margin: 8px 0; }
.prob-label { font-weight: 800; font-size: 12px; }
.prob-track { height: 9px; border-radius: 99px; background: #eef1f5; overflow: hidden; }
.prob-fill { height: 100%; border-radius: inherit; }
.prob-fill.k { background: var(--k); }
.prob-fill.a { background: var(--a); }
.prob-fill.s { background: var(--s); }
.prob-val { font-size: 11px; color: var(--muted); text-align: right; }
.diagnosis-note { color: #566174; font-size: 12px; }
.weak-node { margin-top: 8px; padding: 10px 12px; border-radius: 11px; background: #f7f8fb; font-size: 12px; }

.training-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.training-card { border: 1px solid var(--line); border-radius: 15px; padding: 17px; background: #fff; }
.training-card h4 { margin: 2px 0 8px; }
.training-card p { margin: 0; color: #5f6b7e; font-size: 12px; white-space: pre-line; }
.drill-box { margin-top: 12px; background: #f7f9fc; border-radius: 11px; padding: 12px; font-size: 12px; white-space: pre-line; }
.variant-actions { margin-top: 12px; }

.toast { position: fixed; right: 24px; bottom: 24px; background: #162235; color: #fff; border-radius: 12px; padding: 11px 14px; font-size: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s ease; z-index: 90; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 18px; }
  .question-list { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .q-nav { padding: 7px; }
  .q-nav-title, .mini-structure { display: none; }
  .q-nav-top { justify-content: center; }
  .hero-stats, .kas-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .matrix { grid-template-columns: 1fr; }
  .method-grid, .task-summary-grid { grid-template-columns: 1fr; }
  .force-stage-wrap { grid-template-columns:1fr; }
  .graph-detail { border-left:0; border-top:1px solid var(--line); min-height:150px; }
}

@media (max-width: 640px) {
  .topbar { height: 64px; padding: 0 14px; }
  .brand-subtitle { display: none; }
  .top-actions .ghost-btn:nth-child(2) { display: none; }
  .workspace { padding: 20px 13px 50px; }
  .hero h1 { font-size: 31px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
  .panel, .question-panel { padding: 18px; border-radius: 15px; }
  .question-head { display: block; }
  .structure-badge { display: inline-block; margin-top: 10px; }
  .kas-grid, .training-grid, .diagnosis-result { grid-template-columns: 1fr; }
  .action-strip { align-items: flex-start; flex-direction: column; }
  .section-title-row { align-items: flex-start; flex-direction: column; }
  .task-model-head { flex-direction:column; }
  .method-principle { flex-direction:column; gap:4px; }
  .microcopy { margin-top: -8px; }
  .question-list { grid-template-columns: repeat(5, minmax(0,1fr)); }
  .bar-row { grid-template-columns: 100px 1fr 32px; }
  .force-card { margin-left:-5px; margin-right:-5px; padding:12px; }
  .force-toolbar { display:block; }
  .force-controls { justify-content:flex-start; margin-top:10px; }
  .force-stage-wrap,.force-stage,.force-stage svg { min-height:500px; }
  .legend-note { width:100%; margin-left:0; }
  .kas-node-label { display:none; }
  .trace-operation-grid { grid-template-columns:1fr; }
  .trace-operation-block.product,.trace-operation-block.nodes { grid-column:auto; }
}
