:root {
  color-scheme: light;
  --bg: #f2f3ef;
  --surface: #fbfcf8;
  --surface-strong: #ffffff;
  --ink: #171b18;
  --muted: #69736d;
  --muted-2: #8b948f;
  --line: #cfd5d0;
  --line-strong: #9ba69f;
  --green: #0f5d45;
  --green-2: #18765a;
  --green-soft: #dcebe4;
  --orange: #e35b2b;
  --orange-soft: #f8e2d8;
  --blue: #2f6fed;
  --yellow: #f0bf42;
  --black: #0d110f;
  --radius: 4px;
  --header-h: 72px;
  --rail-w: 232px;
  --content-max: 1480px;
  --shadow: 0 18px 50px rgba(17, 26, 21, 0.12);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  min-width: 320px;
  background:
    repeating-linear-gradient(90deg, rgba(15, 93, 69, 0.022) 0, rgba(15, 93, 69, 0.022) 1px, transparent 1px, transparent 80px),
    var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
input {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

.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;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  transform: translateY(-160%);
  background: var(--black);
  color: white;
  padding: 10px 14px;
  border-radius: var(--radius);
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.topbar {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: grid;
  grid-template-columns: var(--rail-w) minmax(280px, 680px) 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 28px 0 20px;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(242, 243, 239, 0.96);
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  background: var(--green);
  color: white;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 19px;
  line-height: 1;
  border-radius: 2px;
  box-shadow: 5px 5px 0 var(--yellow);
}

.brand-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 9px;
}

.global-search {
  position: relative;
  display: flex;
  height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 10px 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-strong);
  transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.global-search:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(15, 93, 69, 0.12);
}

.global-search svg {
  width: 18px;
  color: var(--green);
}

.global-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}

.global-search kbd {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-strong);
  cursor: pointer;
  transition: background 180ms var(--ease), color 180ms var(--ease), transform 180ms var(--ease);
}

.icon-button:hover {
  transform: translateY(-2px);
  background: var(--green);
  color: white;
}

.icon-button svg {
  width: 18px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  min-height: 100vh;
  padding-top: var(--header-h);
}

.side-rail {
  position: fixed;
  z-index: 70;
  top: var(--header-h);
  bottom: 0;
  left: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line-strong);
  background: #e9ebe6;
}

.account-stamp {
  display: flex;
  flex-direction: column;
  padding: 22px 20px 20px;
  border-bottom: 1px solid var(--line);
}

.stamp-index,
.section-coordinate,
.subheading > span,
.panel-heading span,
.structure-code span,
.detail-header span,
.transcript-toolbar span,
.control-label,
.method-label {
  color: var(--muted);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 10px;
  line-height: 1.3;
  text-transform: uppercase;
}

.account-stamp strong {
  margin-top: 10px;
  font-size: 16px;
}

.account-stamp > span:last-child {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.section-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
}

.nav-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr auto;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border-radius: 3px;
  color: #47514b;
  font-size: 13px;
  transition: background 180ms var(--ease), color 180ms var(--ease);
}

.nav-item::before {
  position: absolute;
  inset: 8px auto 8px -10px;
  width: 3px;
  background: transparent;
  content: "";
}

.nav-item svg {
  width: 17px;
}

.nav-item b {
  color: var(--muted-2);
  font-family: Consolas, monospace;
  font-size: 9px;
  font-weight: 400;
}

.nav-item:hover,
.nav-item.is-active {
  background: var(--surface-strong);
  color: var(--green);
}

.nav-item.is-active::before {
  background: var(--orange);
}

.sample-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: auto 16px 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green-2);
  box-shadow: 0 0 0 5px rgba(24, 118, 90, 0.12);
}

.sample-status div {
  display: flex;
  flex-direction: column;
}

.sample-status strong {
  font-size: 12px;
}

.sample-status span:last-child {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 10px;
}

main {
  grid-column: 2;
  min-width: 0;
}

.section {
  position: relative;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 86px 56px 88px;
  border-bottom: 1px solid var(--line-strong);
}

.section::before,
.section::after {
  position: absolute;
  top: 40px;
  width: 14px;
  height: 14px;
  border-top: 1px solid var(--line-strong);
  content: "";
}

.section::before {
  left: 24px;
  border-left: 1px solid var(--line-strong);
}

.section::after {
  right: 24px;
  border-right: 1px solid var(--line-strong);
}

.section-coordinate {
  position: absolute;
  top: 34px;
  left: 56px;
}

.overview-section {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  gap: 44px;
  align-items: stretch;
}

.verdict-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 22px 0 12px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--orange);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 11px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin-top: 0;
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 22px;
  font-family: "Arial Black", "Microsoft YaHei", sans-serif;
  font-size: 58px;
  font-weight: 900;
}

h1 span {
  color: var(--green);
}

h2 {
  margin-bottom: 0;
  font-size: 34px;
}

h3 {
  margin-bottom: 0;
  font-size: 20px;
}

.verdict-copy {
  max-width: 660px;
  margin: 0;
  color: #465049;
  font-size: 17px;
  line-height: 1.9;
}

.verdict-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
}

.command-button,
.text-button,
.compare-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: var(--radius);
  cursor: pointer;
}

.command-button {
  padding: 0 17px;
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 5px 5px 0 var(--yellow);
  transition: transform 180ms var(--ease), box-shadow 180ms var(--ease);
}

.command-button:hover {
  transform: translate(2px, 2px);
  box-shadow: 3px 3px 0 var(--yellow);
}

.command-button svg,
.text-button svg,
.compare-button svg {
  width: 17px;
}

.text-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--green);
  font-size: 13px;
}

.text-button:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.mechanism-board {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line-strong);
  background: var(--black);
  color: white;
}

.mechanism-board::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(135deg, transparent 0, transparent 13px, rgba(240, 191, 66, 0.035) 13px, rgba(240, 191, 66, 0.035) 14px);
  content: "";
}

.board-heading,
.mechanism-flow,
.board-note {
  position: relative;
  z-index: 1;
}

.board-heading {
  display: flex;
  flex-direction: column;
  padding-bottom: 17px;
  border-bottom: 1px solid #3a413d;
}

.board-heading span {
  color: var(--yellow);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.board-heading strong {
  margin-top: 5px;
  font-size: 18px;
}

.mechanism-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: mechanism;
}

.mechanism-flow li {
  position: relative;
  min-height: 68px;
  padding: 12px 12px 12px 39px;
  border-bottom: 1px solid #343a36;
  counter-increment: mechanism;
}

.mechanism-flow li:nth-child(odd) {
  border-right: 1px solid #343a36;
}

.mechanism-flow li::before {
  position: absolute;
  top: 14px;
  left: 8px;
  color: var(--yellow);
  content: counter(mechanism, decimal-leading-zero);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.mechanism-flow strong {
  display: block;
  font-size: 12px;
}

.mechanism-flow span {
  display: block;
  margin-top: 3px;
  color: #aab4ae;
  font-size: 10px;
}

.board-note {
  margin: 18px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--orange);
  color: #dce3de;
  font-size: 12px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 42px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.metric-item {
  min-width: 0;
  padding: 16px 15px;
  border-right: 1px solid var(--line);
}

.metric-item:last-child {
  border-right: 0;
}

.metric-item span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric-item strong {
  display: block;
  margin-top: 4px;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 22px;
  line-height: 1.2;
}

.metric-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 9px;
}

.profile-band {
  display: grid;
  grid-template-columns: 160px minmax(220px, 0.7fr) minmax(360px, 1.3fr);
  align-items: center;
  gap: 22px;
  margin-top: 22px;
  padding: 18px 20px;
  border-left: 4px solid var(--green);
  background: var(--surface-strong);
}

.profile-label {
  color: var(--green);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.profile-band blockquote {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.profile-analysis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 18px;
  color: var(--muted);
  font-size: 11px;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
  gap: 40px;
  align-items: end;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}

.section-heading > p {
  max-width: 520px;
  justify-self: end;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.funnel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 26px;
  border: 1px solid var(--line-strong);
}

.funnel-step {
  position: relative;
  min-height: 220px;
  padding: 22px;
  border-right: 1px solid var(--line-strong);
  background: var(--surface-strong);
}

.funnel-step:last-child {
  border-right: 0;
}

.funnel-step::before {
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--step-color, var(--green));
  content: "";
}

.funnel-step .step-no {
  color: var(--step-color, var(--green));
  font-family: Consolas, monospace;
  font-size: 12px;
}

.funnel-step h3 {
  margin-top: 22px;
  font-size: 20px;
}

.funnel-step p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.funnel-step small {
  position: absolute;
  right: 22px;
  bottom: 18px;
  left: 22px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 10px;
}

.system-split {
  display: grid;
  grid-template-columns: minmax(0, 1.16fr) minmax(360px, 0.84fr);
  gap: 34px;
  margin-top: 42px;
}

.principle-panel,
.evidence-panel {
  min-width: 0;
}

.subheading {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-strong);
}

.subheading h3 {
  margin-top: 5px;
}

.principle-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.principle-item {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  min-height: 112px;
  padding: 17px 14px 17px 0;
  border-bottom: 1px solid var(--line);
}

.principle-item:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.principle-item:nth-child(even) {
  padding-left: 14px;
}

.principle-index {
  color: var(--orange);
  font-family: Consolas, monospace;
  font-size: 11px;
}

.principle-item strong {
  display: block;
  font-size: 13px;
}

.principle-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.evidence-levels {
  margin-top: 8px;
}

.evidence-row {
  display: grid;
  grid-template-columns: 36px 120px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 59px;
  border-bottom: 1px solid var(--line);
}

.evidence-grade {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--grade-color, var(--green));
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.evidence-row strong {
  font-size: 11px;
}

.evidence-row span:last-child {
  color: var(--muted);
  font-size: 10px;
}

.counter-claim {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid var(--orange);
  background: var(--orange-soft);
}

.counter-claim span {
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
}

.counter-claim p {
  margin: 7px 0 0;
  font-size: 12px;
}

.works-heading {
  align-items: end;
}

.work-controls {
  position: sticky;
  z-index: 40;
  top: var(--header-h);
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 24px;
  margin-top: 22px;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  background: rgba(251, 252, 248, 0.96);
  backdrop-filter: blur(10px);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-group select {
  height: 40px;
  min-width: 150px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
  color: var(--ink);
  font-size: 12px;
}

.segmented-control {
  display: flex;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
}

.segmented-control button {
  min-width: 64px;
  height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.segmented-control button.is-active {
  background: var(--green);
  color: white;
}

.sort-control {
  margin-left: auto;
}

.compare-button {
  min-width: 108px;
  padding: 0 13px;
  border: 1px solid var(--green);
  background: var(--green);
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.compare-button:disabled {
  border-color: var(--line);
  background: #dfe3df;
  color: #88908b;
  cursor: not-allowed;
}

.analysis-canvas {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  margin-top: 20px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
}

.chart-panel {
  min-width: 0;
  padding: 20px 22px 14px;
  border-right: 1px solid var(--line-strong);
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.panel-heading div:first-child {
  display: flex;
  flex-direction: column;
}

.panel-heading strong {
  margin-top: 4px;
  font-size: 14px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.chart-legend i {
  width: 11px;
  height: 11px;
  border: 2px solid var(--green);
  border-radius: 50%;
  background: rgba(15, 93, 69, 0.15);
}

.scatter-wrap {
  height: 270px;
  margin-top: 12px;
}

.scatter-wrap svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.scatter-grid-line {
  stroke: #e1e5e1;
  stroke-width: 1;
}

.scatter-axis-label {
  fill: var(--muted);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 9px;
}

.scatter-point {
  fill: rgba(15, 93, 69, 0.24);
  stroke: var(--green);
  stroke-width: 2;
  cursor: pointer;
  transition: fill 160ms var(--ease), stroke 160ms var(--ease);
}

.scatter-point:hover,
.scatter-point.is-highlighted {
  fill: rgba(227, 91, 43, 0.42);
  stroke: var(--orange);
}

.scatter-label {
  pointer-events: none;
  fill: var(--ink);
  font-family: Consolas, monospace;
  font-size: 8px;
  font-weight: 700;
}

.chart-insight {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 26px;
  background:
    repeating-linear-gradient(135deg, transparent 0, transparent 10px, rgba(15, 93, 69, 0.045) 10px, rgba(15, 93, 69, 0.045) 11px),
    var(--green-soft);
}

.insight-number {
  color: var(--green);
  font-family: "Arial Black", sans-serif;
  font-size: 74px;
  line-height: 1;
}

.chart-insight strong {
  font-size: 17px;
}

.chart-insight p {
  margin: 12px 0 0;
  font-size: 12px;
}

.chart-insight small {
  margin-top: 18px;
  color: var(--muted);
  font-size: 9px;
}

.table-shell {
  overflow-x: auto;
  margin-top: 20px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
}

.works-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}

.works-table th {
  height: 45px;
  padding: 0 11px;
  border-bottom: 1px solid var(--line-strong);
  background: #e8ece8;
  color: #526058;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 9px;
  font-weight: 700;
  text-align: left;
}

.works-table th:nth-child(1) { width: 44px; }
.works-table th:nth-child(2) { width: 94px; }
.works-table th:nth-child(3) { width: 37%; }
.works-table th:nth-child(4) { width: 20%; }
.works-table th:nth-child(5) { width: 68px; }
.works-table th:nth-child(6),
.works-table th:nth-child(7),
.works-table th:nth-child(8) { width: 76px; }
.works-table th:nth-child(9) { width: 48px; }

.works-table td {
  padding: 13px 11px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 11px;
}

.works-table tbody tr {
  transition: background 150ms ease;
}

.works-table tbody tr:hover {
  background: #f0f5f1;
}

.works-table tbody tr.is-selected {
  background: var(--green-soft);
}

.works-table tbody tr:last-child td {
  border-bottom: 0;
}

.work-checkbox {
  width: 17px;
  height: 17px;
  accent-color: var(--green);
  cursor: pointer;
}

.work-date {
  display: flex;
  flex-direction: column;
  font-family: Consolas, monospace;
}

.work-date strong {
  color: var(--green);
  font-size: 12px;
}

.work-date span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.work-main {
  min-width: 0;
}

.work-title-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
  text-align: left;
}

.work-title-button:hover {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-underline-offset: 3px;
}

.work-viewpoint {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.work-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #f6f7f4;
  color: #4a564f;
  font-size: 9px;
}

.tag.is-role {
  border-color: #f0c5b5;
  background: var(--orange-soft);
  color: #9c3a18;
}

.numeric-cell {
  font-family: Consolas, "Microsoft YaHei", monospace;
  white-space: nowrap;
}

.ratio-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ratio-bar i {
  display: block;
  width: 100%;
  height: 3px;
  background: #e0e4e0;
}

.ratio-bar i::after {
  display: block;
  width: var(--ratio, 0%);
  height: 100%;
  background: var(--orange);
  content: "";
}

.row-open-button {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: white;
  cursor: pointer;
}

.row-open-button:hover {
  border-color: var(--green);
  color: var(--green);
}

.row-open-button svg {
  width: 15px;
}

.empty-state {
  display: grid;
  min-height: 240px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: var(--muted);
}

.empty-state[hidden] {
  display: none;
}

.empty-state svg {
  width: 30px;
}

.empty-state strong {
  color: var(--ink);
}

.empty-state span {
  font-size: 11px;
}

.framework-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 40px;
  margin-top: 28px;
}

.framework-rail {
  position: relative;
}

.framework-rail::before {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 23px;
  width: 1px;
  background: var(--line-strong);
  content: "";
}

.framework-item {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 0 0 18px;
}

.framework-index {
  z-index: 1;
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border: 1px solid var(--green);
  border-radius: 50%;
  background: var(--bg);
  color: var(--green);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.framework-copy {
  padding: 7px 0 16px;
  border-bottom: 1px solid var(--line);
}

.framework-copy strong {
  display: block;
  font-size: 13px;
}

.framework-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.explanation-board {
  align-self: start;
  padding: 24px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
}

.explanation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 8px;
}

.explanation-item {
  min-height: 118px;
  padding: 16px 15px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.explanation-item:nth-child(even) {
  border-right: 0;
}

.explanation-item strong {
  color: var(--green);
  font-size: 12px;
}

.explanation-item p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.structure-code {
  margin-top: 22px;
  padding: 18px;
  border-left: 4px solid var(--orange);
  background: var(--black);
  color: white;
}

.structure-code span {
  color: var(--yellow);
}

.structure-code code {
  display: block;
  margin-top: 10px;
  color: #dfe6e1;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 11px;
  line-height: 1.9;
  white-space: normal;
}

.lessons-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.lesson-column {
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
}

.lesson-heading {
  display: flex;
  height: 58px;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line-strong);
  font-size: 15px;
  font-weight: 800;
}

.lesson-heading svg {
  width: 18px;
}

.borrow-column .lesson-heading {
  background: var(--green-soft);
  color: var(--green);
}

.risk-column .lesson-heading {
  background: var(--orange-soft);
  color: #9d3c1b;
}

.lesson-item {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.lesson-item:last-child {
  border-bottom: 0;
}

.lesson-item > span {
  color: var(--muted-2);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.lesson-item strong {
  display: block;
  font-size: 12px;
}

.lesson-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 28px;
  border: 1px solid var(--line-strong);
  background: var(--surface-strong);
}

.method-grid > div {
  padding: 22px;
  border-right: 1px solid var(--line-strong);
}

.method-grid > div:last-child {
  border-right: 0;
}

.method-label {
  display: inline-flex;
  padding: 5px 8px;
  background: var(--green-soft);
  color: var(--green);
}

.method-label.is-medium {
  background: #e5ecfb;
  color: var(--blue);
}

.method-label.is-open {
  background: var(--orange-soft);
  color: #9d3c1b;
}

.method-grid ul {
  margin: 18px 0 0;
  padding-left: 18px;
}

.method-grid li {
  margin-bottom: 9px;
  color: #47524b;
  font-size: 11px;
}

.limitation-band {
  display: flex;
  gap: 14px;
  margin-top: 20px;
  padding: 19px 20px;
  border: 1px solid var(--orange);
  background: var(--orange-soft);
}

.limitation-band svg {
  width: 20px;
  flex: 0 0 auto;
  color: var(--orange);
}

.limitation-band strong {
  font-size: 12px;
}

.limitation-band p {
  margin: 4px 0 0;
  color: #6d4332;
  font-size: 10px;
}

.page-footer {
  display: flex;
  max-width: var(--content-max);
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 0 56px;
  color: var(--muted);
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 9px;
}

dialog {
  width: min(1120px, calc(100vw - 42px));
  max-width: none;
  max-height: calc(100vh - 42px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

dialog::backdrop {
  background: rgba(8, 13, 10, 0.62);
  backdrop-filter: blur(4px);
}

.detail-sheet,
.compare-sheet {
  max-height: calc(100vh - 44px);
  overflow-y: auto;
}

.detail-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-strong);
  background: rgba(251, 252, 248, 0.97);
  backdrop-filter: blur(10px);
}

.detail-header h2 {
  margin-top: 4px;
  font-size: 24px;
}

.detail-meta {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-bottom: 1px solid var(--line-strong);
}

.detail-meta-item {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
}

.detail-meta-item:last-child {
  border-right: 0;
}

.detail-meta-item span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.detail-meta-item strong,
.detail-meta-item a {
  display: block;
  margin-top: 4px;
  font-family: Consolas, "Microsoft YaHei", monospace;
  font-size: 12px;
}

.detail-meta-item a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-insights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 22px;
  border: 1px solid var(--line-strong);
}

.detail-insight {
  min-height: 150px;
  padding: 18px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-insight:nth-child(even) {
  border-right: 0;
}

.detail-insight span {
  color: var(--orange);
  font-family: Consolas, monospace;
  font-size: 9px;
}

.detail-insight strong {
  display: block;
  margin-top: 7px;
  font-size: 13px;
}

.detail-insight p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.transcript-toolbar {
  position: sticky;
  z-index: 8;
  top: 92px;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 22px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  background: #e9ede9;
}

.transcript-toolbar > div {
  display: flex;
  flex-direction: column;
}

.transcript-toolbar strong {
  margin-top: 3px;
  font-size: 14px;
}

.transcript-toolbar label {
  display: flex;
  width: min(340px, 45%);
  height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  background: white;
}

.transcript-toolbar label svg {
  width: 16px;
  color: var(--green);
}

.transcript-toolbar input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.transcript-body {
  padding: 8px 22px 30px;
}

.transcript-segment {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.timestamp-button {
  align-self: start;
  min-height: 28px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #eef1ed;
  color: var(--green);
  cursor: pointer;
  font-family: Consolas, monospace;
  font-size: 9px;
}

.timestamp-button:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.transcript-segment p {
  margin: 0;
  font-size: 12px;
  line-height: 1.85;
}

.transcript-segment mark {
  padding: 0 2px;
  background: #ffdc6b;
  color: inherit;
}

.transcript-empty {
  padding: 32px 0;
  color: var(--muted);
  text-align: center;
}

.compare-dialog {
  width: min(1320px, calc(100vw - 42px));
}

.compare-grid {
  display: grid;
  grid-template-columns: repeat(var(--compare-columns, 2), minmax(0, 1fr));
  gap: 0;
}

.compare-column {
  min-width: 0;
  padding: 22px;
  border-right: 1px solid var(--line-strong);
}

.compare-column:last-child {
  border-right: 0;
}

.compare-column .compare-index {
  color: var(--orange);
  font-family: Consolas, monospace;
  font-size: 10px;
}

.compare-column h3 {
  min-height: 72px;
  margin-top: 8px;
  font-size: 17px;
}

.compare-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 16px 0;
  border: 1px solid var(--line);
}

.compare-stat {
  padding: 11px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.compare-stat:nth-child(even) {
  border-right: 0;
}

.compare-stat span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.compare-stat strong {
  display: block;
  margin-top: 3px;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.compare-field {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.compare-field span {
  color: var(--green);
  font-family: Consolas, monospace;
  font-size: 9px;
}

.compare-field p {
  margin: 5px 0 0;
  color: #48534c;
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 300;
  right: 22px;
  bottom: 22px;
  max-width: 360px;
  padding: 12px 15px;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  background: var(--black);
  color: white;
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 420ms var(--ease), transform 420ms var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  :root {
    --rail-w: 86px;
  }

  .topbar {
    grid-template-columns: var(--rail-w) minmax(260px, 620px) 1fr;
  }

  .brand-copy,
  .account-stamp,
  .sample-status div,
  .nav-item span,
  .nav-item b {
    display: none;
  }

  .brand {
    justify-content: center;
  }

  .section-nav {
    padding: 12px;
  }

  .nav-item {
    display: grid;
    grid-template-columns: 1fr;
    place-items: center;
    padding: 0;
  }

  .nav-item::before {
    left: -12px;
  }

  .sample-status {
    justify-content: center;
    margin-inline: 12px;
  }

  .overview-grid {
    grid-template-columns: 1fr;
  }

  .mechanism-board {
    min-height: 420px;
  }

  .metric-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-item:nth-child(3) {
    border-right: 0;
  }

  .metric-item:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .profile-band {
    grid-template-columns: 140px 1fr;
  }

  .profile-analysis {
    grid-column: 1 / -1;
  }

  .system-split,
  .framework-layout {
    grid-template-columns: 1fr;
  }

  .work-controls {
    flex-wrap: wrap;
  }

  .sort-control {
    margin-left: 0;
  }

  .compare-button {
    margin-left: auto;
  }
}

@media (max-width: 900px) {
  :root {
    --header-h: 62px;
    --rail-w: 0px;
  }

  .topbar {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 0 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
    box-shadow: 3px 3px 0 var(--yellow);
  }

  .global-search {
    min-width: 0;
  }

  .global-search kbd,
  .top-actions .icon-button:first-child {
    display: none;
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: fixed;
    z-index: 75;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: 60px;
    border-top: 1px solid var(--line-strong);
    border-right: 0;
  }

  .section-nav {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    height: 100%;
    padding: 4px 6px;
  }

  .nav-item {
    min-height: 50px;
  }

  .section-nav .nav-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1px;
  }

  .section-nav .nav-item span {
    display: block;
    font-size: 8px;
    line-height: 1.15;
    white-space: nowrap;
  }

  .section-nav .nav-item svg {
    width: 15px;
    height: 15px;
  }

  .nav-item::before,
  .sample-status {
    display: none;
  }

  main {
    grid-column: 1;
    padding-bottom: 60px;
  }

  .section {
    padding: 78px 22px 70px;
  }

  .section::before {
    left: 8px;
  }

  .section::after {
    right: 8px;
  }

  .section-coordinate {
    left: 22px;
  }

  .overview-section {
    min-height: auto;
  }

  h1 {
    font-size: 40px;
  }

  h2 {
    font-size: 27px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .section-heading > p {
    justify-self: start;
  }

  .funnel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .funnel-step:nth-child(2) {
    border-right: 0;
  }

  .funnel-step:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line-strong);
  }

  .analysis-canvas {
    grid-template-columns: 1fr;
  }

  .chart-panel {
    border-right: 0;
  }

  .chart-insight {
    min-height: 190px;
  }

  .insight-number {
    font-size: 56px;
  }

  .lessons-grid,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .method-grid > div {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .method-grid > div:last-child {
    border-bottom: 0;
  }

  .page-footer {
    padding: 0 22px;
  }
}

@media (max-width: 620px) {
  .topbar {
    grid-template-columns: 42px minmax(0, 1fr) 40px;
  }

  .global-search {
    height: 40px;
  }

  .global-search input {
    font-size: 12px;
  }

  .overview-grid {
    gap: 28px;
  }

  h1 {
    font-size: 34px;
  }

  .verdict-copy {
    font-size: 14px;
  }

  .mechanism-board {
    padding: 18px;
  }

  .mechanism-flow {
    grid-template-columns: 1fr;
  }

  .mechanism-flow li:nth-child(odd) {
    border-right: 0;
  }

  .metric-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-item:nth-child(2n) {
    border-right: 0;
  }

  .metric-item:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .metric-item:nth-child(-n + 4) {
    border-bottom: 1px solid var(--line);
  }

  .profile-band {
    grid-template-columns: 1fr;
  }

  .profile-analysis {
    grid-template-columns: 1fr;
  }

  .funnel-grid,
  .principle-list,
  .explanation-grid {
    grid-template-columns: 1fr;
  }

  .funnel-step {
    min-height: 200px;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .funnel-step:last-child {
    border-bottom: 0;
  }

  .principle-item,
  .principle-item:nth-child(odd),
  .principle-item:nth-child(even) {
    padding: 15px 0;
    border-right: 0;
  }

  .evidence-row {
    grid-template-columns: 34px 100px 1fr;
  }

  .work-controls {
    position: static;
    align-items: stretch;
    gap: 12px;
  }

  .control-group {
    width: 100%;
    justify-content: space-between;
  }

  .control-group select {
    width: 66%;
  }

  .segmented-control {
    width: 66%;
  }

  .segmented-control button {
    flex: 1;
    min-width: 0;
  }

  .compare-button {
    width: 100%;
    margin-left: 0;
  }

  .panel-heading {
    flex-direction: column;
  }

  .chart-panel {
    padding-inline: 12px;
  }

  .scatter-wrap {
    height: 240px;
  }

  .explanation-item {
    min-height: 100px;
    border-right: 0;
  }

  .lessons-grid {
    gap: 18px;
  }

  .detail-dialog,
  .compare-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .detail-sheet,
  .compare-sheet {
    max-height: 100dvh;
  }

  .detail-header {
    min-height: 78px;
    padding: 13px 14px;
  }

  .detail-header h2 {
    font-size: 18px;
  }

  .detail-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-meta-item:nth-child(3) {
    border-right: 0;
  }

  .detail-meta-item:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }

  .detail-insights {
    grid-template-columns: 1fr;
    margin: 14px;
  }

  .detail-insight {
    min-height: 0;
    border-right: 0;
  }

  .transcript-toolbar {
    top: 78px;
    align-items: stretch;
    flex-direction: column;
    padding: 12px 14px;
  }

  .transcript-toolbar label {
    width: 100%;
  }

  .transcript-body {
    padding-inline: 14px;
  }

  .transcript-segment {
    grid-template-columns: 54px 1fr;
    gap: 10px;
  }

  .compare-grid {
    grid-template-columns: 1fr;
  }

  .compare-column {
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }

  .compare-column h3 {
    min-height: 0;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .topbar,
  .side-rail,
  .work-controls,
  .compare-button,
  .row-open-button,
  .work-checkbox {
    display: none !important;
  }

  .app-shell {
    display: block;
    padding-top: 0;
  }

  main {
    display: block;
  }

  .section {
    max-width: none;
    padding: 30px 20px;
    break-inside: avoid;
  }

  .works-table {
    min-width: 0;
    font-size: 8px;
  }
}
