:root {
  --ink: #13243b;
  --ink-soft: #40516a;
  --navy: #0e2037;
  --navy-2: #172f4d;
  --paper: #f6f2e9;
  --surface: #fffdf8;
  --line: #d9d2c3;
  --line-strong: #b8ad9a;
  --blue: #2f66d7;
  --blue-soft: #e8effe;
  --teal: #0f7772;
  --teal-soft: #e1f3ef;
  --amber: #d89119;
  --amber-soft: #fff1cc;
  --coral: #b84c38;
  --coral-soft: #f9e5df;
  --green: #2c7557;
  --green-soft: #e7f2eb;
  --shadow: 0 14px 38px rgba(33, 43, 56, .09);
  --radius: 18px;
  --body-font: "Microsoft YaHei", "PingFang SC", sans-serif;
  --display-font: "STZhongsong", "Songti SC", "SimSun", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 8%, rgba(47, 102, 215, .08), transparent 25rem),
    linear-gradient(135deg, #ebe5d9 0%, #f5f1e8 42%, #e9e3d8 100%);
  font-family: var(--body-font);
  line-height: 1.55;
  min-width: 1180px;
}

button, textarea, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:focus-visible, textarea:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid rgba(47, 102, 215, .42);
  outline-offset: 3px;
}
button.is-pressed, button:not(:disabled):active {
  transform: translateY(1px) scale(.985) !important;
  filter: brightness(.94);
  box-shadow: inset 0 2px 8px rgba(14, 32, 55, .16);
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  padding: .7rem 1rem;
  color: white;
  background: var(--navy);
}
.skip-link:focus { top: 1rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  width: min(1680px, calc(100vw - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: hidden;
  border: 1px solid rgba(14, 32, 55, .22);
  background: var(--paper);
  box-shadow: 0 24px 70px rgba(32, 39, 48, .18);
}

.sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 32px);
  padding: 24px 20px;
  color: #eef5ff;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    var(--navy);
  background-size: 32px 32px;
}

.sidebar::after {
  content: "∑  △  f′";
  position: absolute;
  right: 12px;
  top: 76px;
  color: rgba(255,255,255,.035);
  font: 700 56px/1 var(--display-font);
  letter-spacing: .08em;
  pointer-events: none;
}

.brand-block {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(145deg, #21476f, #0a192b);
  box-shadow: inset 0 0 0 4px rgba(255,255,255,.035);
}

.brand-mark span { font: 700 23px/1 var(--display-font); }
.brand-mark i {
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 14px;
  height: 14px;
  border: 3px solid var(--navy);
  border-radius: 50%;
  background: #66d1bb;
}

.brand-name { margin: 0; font: 700 20px/1.2 var(--display-font); letter-spacing: .08em; }
.brand-sub { margin: 4px 0 0; color: #9db1c7; font-size: 12px; }

.simulation-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 8px;
  margin: 22px 0 26px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,.13);
  color: #bfd2e5;
  font-size: 12px;
  letter-spacing: .08em;
}
.simulation-badge span { width: 7px; height: 7px; border-radius: 50%; background: #66d1bb; box-shadow: 0 0 0 5px rgba(102,209,187,.12); }
.simulation-badge.online { border-color: rgba(102,209,187,.45); color: #8fe6d2; }
.simulation-badge.online span { animation: badge-pulse 2s ease-in-out infinite; }
@keyframes badge-pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(102,209,187,.10); } 50% { box-shadow: 0 0 0 7px rgba(102,209,187,.22); } }

.side-section { position: relative; z-index: 1; margin-bottom: 26px; }
.side-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 10px; }
.side-heading h2 { margin: 0; color: #8da6bf; font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.side-heading > span { color: #6c89a7; font-size: 11px; }

.case-list { display: grid; gap: 8px; }
.case-button {
  position: relative;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 10px;
  border: 1px solid transparent;
  color: #c2d0df;
  background: transparent;
  text-align: left;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.case-button:hover { transform: translateX(3px); background: rgba(255,255,255,.055); }
.case-button.active { color: white; border-color: rgba(107,168,255,.34); background: linear-gradient(90deg, rgba(47,102,215,.28), rgba(47,102,215,.07)); }
.case-index { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.18); color: #86a5c5; font-size: 11px; }
.case-button.active .case-index { color: white; border-color: #5f91ef; background: var(--blue); }
.case-copy b { display: block; font-size: 13px; font-weight: 700; }
.case-copy small { display: block; margin-top: 3px; color: #8299b1; font-size: 10px; }
.case-arrow { color: #5d7690; font-size: 17px; }

.pain-shortcuts { margin-bottom: 20px; }
.pain-nav { display: grid; gap: 6px; }
.pain-nav button {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.1);
  color: #9fb3ca;
  background: rgba(255,255,255,.025);
  text-align: left;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.pain-nav button:hover { transform: translateX(3px); border-color: rgba(102,209,187,.38); background: rgba(102,209,187,.07); }
.pain-nav button.active { color: #ecfffa; border-color: rgba(102,209,187,.52); background: rgba(15,119,114,.24); }
.pain-nav b { color: #67d5c2; font-size: 13px; }
.pain-nav span { font-size: 13px; }

.workflow-mini ol { display: grid; gap: 0; margin: 0; padding: 0 0 0 3px; list-style: none; }
.workflow-mini li { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 8px; padding: 7px 0; color: #96aac0; font-size: 11px; }
.workflow-mini li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 29px; width: 1px; height: 10px; background: #3d5773; }
.workflow-mini b { color: #5e81a3; font-size: 10px; }

.privacy-card {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(102,209,187,.25);
  background: rgba(28,92,87,.22);
}
.privacy-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #aee5d9; background: rgba(102,209,187,.12); font-size: 11px; }
.privacy-card strong { color: #d9f4ef; font-size: 12px; }
.privacy-card p { margin: 4px 0 0; color: #94bdb5; font-size: 10px; line-height: 1.6; }

.main-stage { min-width: 0; background: #f7f4ed; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,253,248,.88);
  backdrop-filter: blur(12px);
}
.breadcrumb { display: flex; align-items: center; gap: 9px; color: #7c8794; font-size: 12px; }
.breadcrumb b { color: #b5ab9c; font-weight: 400; }
.breadcrumb strong { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 9px; }
.data-pill { padding: 6px 10px; border: 1px solid #d5b76e; color: #7b5711; background: #fff4d6; font-size: 11px; }
.ghost-button, .primary-small, .lock-button { border: 1px solid var(--line-strong); background: transparent; color: var(--ink); }
.ghost-button { padding: 7px 11px; font-size: 11px; }
.ghost-button:hover { border-color: var(--blue); color: var(--blue); }
.avatar-button { width: 38px; height: 38px; border: 0; border-radius: 50%; color: white; background: var(--navy-2); font-size: 11px; }

.case-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 32px;
  padding: 27px 30px 24px;
  color: white;
  background:
    linear-gradient(125deg, rgba(13,34,58,.98), rgba(24,57,92,.95)),
    url("assets/场景5_AI协同核验.png") center/cover;
}
.hero-tags { display: flex; gap: 8px; margin-bottom: 10px; }
.hero-tags span { padding: 4px 8px; border: 1px solid rgba(255,255,255,.2); color: #b9cbe0; font-size: 10px; }
.hero-copy h1 { margin: 0; font: 700 31px/1.3 var(--display-font); letter-spacing: .025em; }
.hero-copy p { max-width: 850px; margin: 9px 0 0; color: #bdcad8; font-size: 13px; }
.hero-control { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 11px; }
.agent-presence { display: flex; align-items: center; gap: 8px; color: #a9c4dd; font-size: 11px; }
.agent-presence i { width: 8px; height: 8px; border-radius: 50%; background: #6ce1c7; box-shadow: 0 0 0 6px rgba(108,225,199,.1); animation: breathe 2.4s ease-in-out infinite; }
.run-button { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 10px 15px; border: 1px solid rgba(255,255,255,.18); color: white; background: linear-gradient(135deg, #326bd9, #1c4da8); text-align: left; box-shadow: 0 12px 26px rgba(0,0,0,.18); }
.run-button:hover { filter: brightness(1.08); }
.run-button:disabled { cursor: wait; opacity: .72; }
.run-icon { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; font-size: 11px; }
.run-button b, .run-button small { display: block; }
.run-button b { font-size: 13px; }
.run-button small { margin-top: 2px; color: #c7d7ee; font-size: 10px; font-weight: 400; }

.evidence-ribbon {
  display: grid;
  grid-template-columns: 1.15fr 1.25fr 1.25fr 1fr;
  border-bottom: 1px solid var(--line);
  background: #fffdf8;
}
.evidence-ribbon > div { min-width: 0; padding: 13px 18px; border-right: 1px solid var(--line); }
.evidence-ribbon > div:last-child { border-right: 0; }
.evidence-ribbon span, .evidence-ribbon strong { display: block; }
.evidence-ribbon span { color: #918678; font-size: 9px; letter-spacing: .13em; }
.evidence-ribbon strong { margin-top: 3px; overflow: hidden; color: #37485e; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.evidence-ribbon .ribbon-warning { background: var(--amber-soft); }
.ribbon-warning strong { color: #754d08; }

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(300px, .78fr);
  gap: 16px;
  padding: 18px;
}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 5px 18px rgba(37, 45, 56, .045);
}
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 70px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-heading.compact { min-height: 64px; }
.panel-heading h2 { margin: 1px 0 0; font: 700 18px/1.35 var(--display-font); }
.eyebrow { margin: 0; color: var(--coral); font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.round-counter { padding: 5px 9px; border: 1px solid var(--line); color: #687689; font-size: 10px; }
.round-counter span { color: var(--blue); font-weight: 700; }
.dialogue-meta { display: flex; align-items: center; gap: 8px; }
.dialogue-state { padding: 5px 9px; color: #315f59; border: 1px solid #a8c9c0; background: var(--teal-soft); font-size: 12px; white-space: nowrap; }
.dialogue-state.playing { color: #2e58a1; border-color: #b3c7ee; background: var(--blue-soft); }
.dialogue-state.teacher-typing { color: #2e58a1; border-color: #b3c7ee; background: var(--blue-soft); }
.dialogue-state.agent-thinking { color: #315f59; border-color: #a8c9c0; background: var(--teal-soft); }
.dialogue-state.teacher-typing::before,
.dialogue-state.agent-thinking::before { content: "●"; display: inline-block; margin-right: 5px; animation: breathe 1.1s ease-in-out infinite; }
.dialogue-state.ready::before { content: "●"; margin-right: 5px; color: var(--teal); }

.chat-thread { height: 388px; overflow-y: auto; padding: 16px 18px 6px; scrollbar-width: thin; scrollbar-color: #c4bbaa transparent; }
.message,
.message-preview { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; margin-bottom: 16px; animation: rise .32s ease both; }
.message.teacher,
.message-preview.teacher { grid-template-columns: minmax(0, 1fr) 34px; }
.message.teacher .message-avatar,
.message-preview.teacher .message-avatar { grid-column: 2; }
.message.teacher .message-body,
.message-preview.teacher .message-body { grid-column: 1; grid-row: 1; justify-self: end; max-width: 82%; background: var(--blue-soft); border-color: #b9cbf2; }
.message-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: white; background: var(--navy); font-size: 10px; }
.message.agent .message-avatar,
.message-preview.agent .message-avatar { background: var(--teal); box-shadow: 0 0 0 4px var(--teal-soft); }
.message-body { max-width: 92%; padding: 11px 13px; border: 1px solid var(--line); background: #faf8f2; }
.message-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; color: #8c8174; font-size: 9px; }
.message-meta b { color: #425168; }
.message-body p { margin: 0; color: #314158; font-size: 12px; line-height: 1.65; white-space: pre-line; }
.message-preview .message-body { box-shadow: 0 8px 22px rgba(41, 62, 91, .08); }
.teacher-draft-text { min-width: 42px; min-height: 1.65em; }
.teacher-draft-text::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 3px; vertical-align: -2px; background: var(--blue); animation: cursor-blink .75s steps(1, end) infinite; }
.message-note { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 9px; padding: 8px 9px; border-left: 3px solid var(--teal); background: var(--teal-soft); color: #325b57; font-size: 10px; }
.typing { display: inline-flex; gap: 4px; align-items: center; height: 16px; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: #72908d; animation: typing 1s infinite alternate; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }

.quick-prompts { display: flex; gap: 7px; overflow-x: auto; padding: 8px 18px 12px; }
.quick-prompts button { flex: 0 0 auto; padding: 6px 9px; border: 1px solid #cdd8e7; color: #3d5f88; background: #f4f8fe; font-size: 10px; }
.quick-prompts button:hover { border-color: var(--blue); color: var(--blue); }

.composer { margin: 0 18px 18px; border: 1px solid var(--line-strong); background: white; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.composer textarea { width: 100%; min-height: 62px; resize: vertical; padding: 11px 12px 4px; border: 0; outline: none; color: var(--ink); background: transparent; font-size: 12px; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px 8px 12px; }
.composer-footer span { color: #9b9082; font-size: 9px; }
.composer-footer button { padding: 7px 11px; border: 0; color: white; background: var(--navy-2); font-size: 10px; }
.composer-footer i { margin-left: 4px; font-style: normal; }

.state-chip, .review-status { padding: 5px 8px; border: 1px solid #d3c7b6; color: #73695c; background: #f4efe5; font-size: 9px; }
.state-chip.running { border-color: #adc2ed; color: #2958aa; background: #eaf1ff; }
.state-chip.done { border-color: #a5cebc; color: #286146; background: var(--green-soft); }
.progress-track { height: 3px; background: #eee8dc; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--blue), var(--teal)); transition: width .4s ease; }

.task-queue { display: grid; gap: 0; margin: 0; padding: 10px 16px 6px; list-style: none; }
.task-item { position: relative; display: grid; grid-template-columns: 25px 1fr auto; align-items: start; gap: 9px; padding: 9px 0; border-bottom: 1px solid #ece6da; }
.task-item:last-child { border-bottom: 0; }
.task-icon { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #d5cbbd; border-radius: 50%; color: #998c7c; font-size: 9px; }
.task-item.running .task-icon { color: white; border-color: var(--blue); background: var(--blue); animation: breathe 1s infinite; }
.task-item.done .task-icon { color: white; border-color: var(--green); background: var(--green); }
.task-copy b { display: block; color: #34445a; font-size: 11px; }
.task-copy small { display: block; margin-top: 2px; color: #908576; font-size: 9px; }
.task-status { color: #998c7c; font-size: 9px; }
.task-item.running .task-status { color: var(--blue); }
.task-item.done .task-status { color: var(--green); }

.pause-card { display: grid; grid-template-columns: 30px 1fr; gap: 9px; margin: 7px 16px 16px; padding: 10px; border: 1px solid #e1bd6d; background: var(--amber-soft); }
.pause-symbol { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: white; background: var(--amber); font-weight: 700; }
.pause-card strong { color: #6f4d10; font-size: 10px; }
.pause-card p { margin: 2px 0 0; color: #806530; font-size: 9px; line-height: 1.55; }

.artifact-panel { min-height: 480px; }
.artifact-heading { align-items: center; }
.artifact-actions { display: flex; gap: 7px; }
.primary-small { padding: 7px 10px; color: white; border-color: var(--navy); background: var(--navy); font-size: 10px; }
.artifact-tabs { display: flex; overflow-x: auto; padding: 0 18px; border-bottom: 1px solid var(--line); background: #f7f3ea; }
.artifact-tab { flex: 0 0 auto; padding: 12px 13px 10px; border: 0; border-bottom: 3px solid transparent; color: #817568; background: transparent; font-size: 10px; }
.artifact-tab:hover { color: var(--blue); }
.artifact-tab.active { color: var(--ink); border-bottom-color: var(--blue); font-weight: 700; }
.artifact-content { padding: 16px 18px 20px; animation: fade .25s ease both; }
.artifact-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 13px; }
.artifact-intro h3 { margin: 0; font: 700 16px/1.4 var(--display-font); }
.artifact-intro p { margin: 4px 0 0; color: #6e7885; font-size: 10px; }
.artifact-kicker { padding: 4px 7px; border: 1px solid #a9c5bd; color: #31695f; background: var(--teal-soft); font-size: 9px; white-space: nowrap; }
.artifact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.artifact-card { position: relative; min-height: 108px; padding: 12px; border: 1px solid #ded6ca; background: #fcfaf5; }
.artifact-card.wide { grid-column: 1 / -1; min-height: auto; }
.artifact-card::before { content: ""; position: absolute; left: -1px; top: 12px; bottom: 12px; width: 3px; background: var(--blue); }
.artifact-card.teal::before { background: var(--teal); }
.artifact-card.amber::before { background: var(--amber); }
.artifact-card.coral::before { background: var(--coral); }
.artifact-card b { display: block; margin-left: 3px; color: #28394f; font-size: 11px; }
.artifact-card p { margin: 6px 0 0 3px; color: #566578; font-size: 10px; line-height: 1.65; white-space: pre-line; }
.artifact-meta { display: flex; gap: 6px; margin: 8px 0 0 3px; }
.artifact-meta span { padding: 3px 6px; color: #667483; background: #eeeae1; font-size: 8px; }
.board-preview { margin-top: 8px; padding: 13px; color: #edf6e8; background: #213c35; font-family: "KaiTi", "STKaiti", serif; font-size: 11px; line-height: 1.85; white-space: pre-line; box-shadow: inset 0 0 28px rgba(0,0,0,.18); }

.source-stack { display: grid; gap: 7px; padding: 13px 15px; }
.source-item { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; padding: 8px 0; border-bottom: 1px solid #ece6db; }
.source-item:last-child { border-bottom: 0; }
.source-number { display: grid; place-items: center; width: 20px; height: 20px; color: #5e7189; background: #edf1f5; font-size: 9px; }
.source-item b { display: block; color: #3e4d61; font-size: 10px; }
.source-item small { display: block; margin-top: 2px; color: #8d8275; font-size: 8px; line-height: 1.5; }
.source-state { padding: 3px 5px; color: #3d6f58; background: var(--green-soft); font-size: 8px; white-space: nowrap; }
.source-state.pending { color: #855e15; background: var(--amber-soft); }

.review-checks { display: grid; gap: 0; margin: 0 15px 13px; padding: 0; border: 1px solid var(--line); }
.review-checks legend { margin-left: 9px; padding: 0 5px; color: #7d6f60; font-size: 9px; }
.review-checks label { display: grid; grid-template-columns: 16px 1fr; gap: 8px; align-items: start; padding: 9px 10px; border-bottom: 1px solid #eee7dc; color: #4f5f72; font-size: 9px; }
.review-checks label:last-child { border-bottom: 0; }
.review-checks label { cursor: pointer; transition: background .18s ease; }
.review-checks label:hover { background: #f5f9f7; }
.review-checks input { accent-color: var(--teal); }
.lock-button { width: calc(100% - 30px); margin: 0 15px; padding: 10px; color: white; border-color: var(--navy); background: var(--navy); font-size: 11px; }
.lock-button:disabled { cursor: not-allowed; color: #a2998c; border-color: #d6cec2; background: #ece7de; }
.review-status.locked { color: #286146; border-color: #9fc5b4; background: var(--green-soft); }
.review-footnote { margin: 11px 15px 15px; color: #8b8174; font-size: 8px; line-height: 1.6; }

.toast {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 50;
  max-width: 360px;
  padding: 11px 14px;
  color: white;
  background: var(--navy);
  box-shadow: var(--shadow);
  font-size: 11px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.warning { background: #8a5a0c; }

.pain-lab {
  margin: 0 18px 18px;
  scroll-margin-top: 18px;
  overflow: hidden;
}
.pain-lab-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 20px 22px;
  color: white;
  background:
    linear-gradient(118deg, rgba(14,32,55,.98), rgba(27,63,91,.95)),
    radial-gradient(circle at 85% 20%, rgba(102,209,187,.2), transparent 18rem);
}
.pain-lab-heading h2 { margin: 2px 0 4px; font: 700 26px/1.3 var(--display-font); }
.pain-lab-heading > div > p:last-child { max-width: 850px; margin: 0; color: #b8c8d8; font-size: 15px; line-height: 1.7; }
.pain-summary { display: grid; grid-template-columns: repeat(3, 110px); gap: 7px; }
.pain-summary span { padding: 9px 8px; border: 1px solid rgba(255,255,255,.15); color: #b6c9db; background: rgba(255,255,255,.05); font-size: 12px; text-align: center; }
.pain-summary b { display: block; color: #71ddc9; font-size: 20px; white-space: nowrap; }
.pain-tabs { display: flex; gap: 4px; padding: 10px 18px 0; border-bottom: 1px solid var(--line); background: #f7f3ea; }
.pain-tab { padding: 11px 14px; border: 1px solid transparent; border-bottom: 3px solid transparent; color: #6d6257; background: transparent; font-size: 14px; }
.pain-tab:hover { color: var(--blue); background: #eef3fc; }
.pain-tab.active { color: var(--ink); border-color: #d8d0c3; border-bottom-color: var(--teal); background: var(--surface); font-weight: 700; }
.pain-demo-content { padding: 18px 20px 22px; background: var(--surface); }
.pain-demo-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; margin-bottom: 14px; }
.pain-demo-heading span { color: var(--coral); font-size: 13px; font-weight: 700; letter-spacing: .08em; }
.pain-demo-heading h3 { margin: 4px 0; font: 700 22px/1.4 var(--display-font); }
.pain-demo-heading p { max-width: 970px; margin: 0; color: #59687a; font-size: 15px; line-height: 1.7; }
.pain-demo-heading > strong { padding: 6px 9px; color: #315f59; border: 1px solid #a8c9c0; background: var(--teal-soft); font-size: 13px; white-space: nowrap; }
.pain-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 13px 0; }
.pain-metric { padding: 10px 12px; border: 1px solid #d9d3c8; background: #f8f5ee; }
.pain-metric b { display: block; color: #2c405a; font: 700 23px/1.1 var(--display-font); }
.pain-metric small { display: block; margin-top: 4px; color: #7a7064; font-size: 13px; }
.pain-metric.good { border-color: #a7cdbd; background: var(--green-soft); }
.pain-metric.bad { border-color: #e2aaa0; background: var(--coral-soft); }
.pain-metric.accent { border-color: #b5c9ee; background: var(--blue-soft); }
.pain-action-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 12px 0; padding: 10px 12px; border-left: 4px solid var(--blue); background: #f1f5fc; }
.pain-action-row p { margin: 0; color: #4c5d73; font-size: 14px; line-height: 1.65; }
.pain-action-buttons { display: flex; gap: 7px; flex: 0 0 auto; }
.pain-run-button { flex: 0 0 auto; padding: 9px 13px; border: 1px solid var(--navy); color: white; background: var(--navy); font-size: 14px; font-weight: 700; }
.pain-run-button:hover { background: var(--blue); border-color: var(--blue); }
.pain-run-button.danger { color: #fff; border-color: #9b3d2d; background: #a94432; }
.pain-run-button.restore { border-color: var(--green); background: var(--green); }

.resource-demo-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
.resource-demo-card { display: block; width: 100%; padding: 11px 12px; border: 1px solid #d9d3c8; color: var(--ink); background: #fbf9f4; text-align: left; }
.resource-demo-card:hover { border-color: #9ab0ce; background: #f6f9fd; }
.resource-demo-card.kept { border-left: 5px solid var(--green); background: #f1f8f4; }
.resource-demo-card.rejected { border-left: 5px solid var(--coral); background: #fcf2ef; }
.resource-card-head { display: grid; grid-template-columns: 40px 1fr auto; gap: 9px; align-items: center; }
.resource-id { color: #58708e; font-size: 13px; font-weight: 700; }
.resource-card-head b { display: block; color: #283b53; font-size: 15px; }
.resource-card-head small { display: block; margin-top: 2px; color: #83796d; font-size: 12px; }
.resource-card-head em { padding: 4px 7px; color: #675e54; background: #eee9df; font-size: 12px; font-style: normal; white-space: nowrap; }
.resource-demo-card.kept .resource-card-head em { color: #285f47; background: #dcefe4; }
.resource-demo-card.rejected .resource-card-head em { color: #8d382a; background: #f7ded8; }
.resource-card-brief { display: block; margin: 8px 0 0 49px; color: #596a7d; font-size: 13px; line-height: 1.55; }
.resource-card-detail { display: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 10px 0 0 49px; padding-top: 9px; border-top: 1px dashed #d2c9bc; }
.resource-demo-card.expanded .resource-card-detail { display: grid; animation: fade .2s ease both; }
.resource-card-detail span { color: #576779; font-size: 12px; line-height: 1.5; }
.resource-card-detail b { display: block; color: #847767; font-size: 11px; }

.verification-pause, .alignment-gap { display: flex; align-items: center; gap: 10px; margin: 10px 0; padding: 10px 12px; border: 1px solid #dfa79d; color: #81392c; background: var(--coral-soft); font-size: 14px; }
.verification-pause b, .alignment-gap b { flex: 0 0 auto; }
.verification-list { display: grid; gap: 7px; }
.verification-row { display: grid; grid-template-columns: minmax(250px, 1.4fr) minmax(450px, 1fr); gap: 12px; width: 100%; padding: 9px 11px; border: 1px solid #ddd5c9; color: var(--ink); background: #fbf9f5; text-align: left; }
.verification-row:hover { border-color: #9baec7; }
.verification-row.blocked { border-left: 5px solid var(--coral); background: #fff5f2; }
.verification-row.pass { border-left: 5px solid var(--green); }
.verification-main { display: grid; grid-template-columns: 38px 1fr auto; gap: 8px; align-items: center; }
.verification-main > b { color: #60738b; font-size: 13px; }
.verification-main > span { color: #33465e; font-size: 14px; line-height: 1.55; }
.verification-main em { padding: 3px 6px; color: #6c6256; background: #ece7de; font-size: 12px; font-style: normal; }
.verification-row.blocked .verification-main em { color: #8d382a; background: #f5d9d3; }
.verification-row.pass .verification-main em { color: #286047; background: #dceee4; }
.dimension-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
.dimension-badge { padding: 5px 6px; color: #71685e; border: 1px solid #ddd6ca; background: #f1eee8; font-size: 12px; text-align: center; }
.dimension-badge b { display: block; margin-bottom: 2px; color: #44546a; font-size: 11px; }
.dimension-badge.ok { color: #296047; border-color: #b8d3c6; background: #e6f2eb; }
.dimension-badge.problem { color: #8a3b2e; border-color: #e2b0a7; background: #f9e6e1; }
.verification-reason { grid-column: 1 / -1; padding: 8px 10px; color: #7d3b31; border-left: 3px solid var(--coral); background: #fbe5e0; font-size: 13px; line-height: 1.6; }
.verification-reason b { display: block; margin-bottom: 2px; }

.alignment-sequence { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; color: #41556d; border: 1px solid #c6d3e6; background: #edf3fd; font-size: 13px; }
.alignment-sequence span { display: flex; align-items: center; gap: 6px; }
.alignment-sequence b { color: var(--blue); }
.alignment-sequence i { color: #7f92aa; font-style: normal; }
.alignment-board { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.goal-column, .activity-column { display: grid; align-content: start; gap: 7px; padding: 11px; border: 1px solid #ddd5c9; background: #f8f5ee; }
.goal-column h3, .activity-column h3 { margin: 0 0 2px; color: #34465d; font: 700 17px/1.4 var(--display-font); }
.mapping-node { position: relative; display: grid; grid-template-columns: 54px 1fr auto; gap: 7px; width: 100%; padding: 9px 10px; border: 1px solid #d7d0c4; color: var(--ink); background: white; text-align: left; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.mapping-node:hover { border-color: var(--blue); transform: translateY(-1px); }
.mapping-node > span { grid-row: 1 / span 2; color: #526c8c; font-size: 12px; font-weight: 700; }
.mapping-node > b { color: #31445c; font-size: 14px; }
.mapping-node > small { grid-column: 2 / 3; color: #68788b; font-size: 12px; line-height: 1.55; }
.mapping-node > em { grid-column: 3; grid-row: 1 / span 2; align-self: center; padding: 4px 6px; color: #2e654c; background: #e2f0e8; font-size: 11px; font-style: normal; white-space: nowrap; }
.mapping-node.mapping-focus { border-color: var(--blue); background: #edf3ff; box-shadow: 0 0 0 2px rgba(47,102,215,.12); }
.mapping-node.gap, .mapping-node.removed { border-color: #dc9e92; background: #fbe6e1; opacity: .92; }
.mapping-node.gap > em, .mapping-node.removed > em { color: #8e392b; background: #f3ccc3; }
.evidence-missing { color: #9a3e30 !important; text-decoration: line-through; }

/* 录屏可读性：在原基准上统一提升 2px；布局同步允许换行。 */
body { font-size: 18px; min-width: 1280px; }
.app-shell { grid-template-columns: 306px minmax(0, 1fr); }
.brand-mark span { font-size: 25px; }
.brand-name { font-size: 22px; }
.brand-sub, .simulation-badge, .privacy-card strong, .breadcrumb, .message-body p, .composer textarea { font-size: 14px; }
.side-heading h2, .side-heading > span, .case-index, .workflow-mini li, .privacy-icon, .data-pill, .ghost-button, .avatar-button, .agent-presence, .run-icon, .evidence-ribbon strong, .task-copy b, .artifact-card b, .board-preview, .lock-button, .toast { font-size: 13px; }
.case-copy small, .workflow-mini b, .privacy-card p, .hero-tags span, .run-button small, .round-counter, .message-avatar, .message-note, .quick-prompts button, .composer-footer button, .pause-card strong, .primary-small, .artifact-tab, .artifact-intro p, .artifact-card p, .source-item b { font-size: 12px; }
.evidence-ribbon span, .eyebrow, .message-meta, .composer-footer span, .state-chip, .review-status, .task-icon, .task-copy small, .task-status, .pause-card p, .artifact-kicker, .source-number, .review-checks legend, .review-checks label { font-size: 11px; }
.artifact-meta span, .source-item small, .source-state, .review-footnote { font-size: 10px; }
.case-copy b, .hero-copy p, .run-button b { font-size: 15px; }
.case-arrow { font-size: 19px; }
.hero-copy h1 { font-size: 33px; }
.panel-heading h2 { font-size: 20px; }
.artifact-intro h3 { font-size: 18px; }
.sidebar::after { font-size: 58px; }
.top-actions, .hero-tags, .composer-footer, .artifact-meta, .pain-summary { flex-wrap: wrap; }
.evidence-ribbon strong { white-space: normal; overflow-wrap: anywhere; }
.chat-thread { height: 430px; }

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes typing { from { transform: translateY(0); opacity: .5; } to { transform: translateY(-3px); opacity: 1; } }
@keyframes cursor-blink { 0%, 48% { opacity: 1; } 49%, 100% { opacity: 0; } }
@keyframes breathe { 0%, 100% { transform: scale(1); opacity: .75; } 50% { transform: scale(1.16); opacity: 1; } }

@media (max-width: 1300px) {
  .app-shell { grid-template-columns: 250px minmax(0, 1fr); }
  .sidebar { padding-inline: 16px; }
  .case-hero { grid-template-columns: 1fr 245px; }
  .workspace-grid { grid-template-columns: minmax(0, 1.48fr) minmax(280px, .8fr); }
}

@media print {
  body { min-width: 0; background: white; }
  .app-shell { display: block; width: 100%; margin: 0; border: 0; box-shadow: none; }
  .sidebar, .topbar, .hero-control, .conversation-panel, .agent-panel, .review-panel, .artifact-actions { display: none !important; }
  .case-hero { display: block; color: var(--ink); background: white; }
  .workspace-grid { display: block; padding: 0; }
  .artifact-panel { border: 0; box-shadow: none; }
}
