:root {
  --ink: #dcecff;
  --muted: #7693b8;
  --faint: #4f6c91;
  --page: #020b19;
  --panel: #031328;
  --panel-2: #061b35;
  --line: rgba(29, 126, 224, 0.46);
  --line-soft: rgba(62, 133, 204, 0.2);
  --blue: #2b8cff;
  --cyan: #37d7ff;
  --green: #4ce0ad;
  --lime: #a9e340;
  --amber: #ffbd3f;
  --orange: #ff7b35;
  --violet: #9a7cff;
  --red: #ff666d;
  --font-display: "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --font-mono: "Cascadia Mono", "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --topbar-height: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-snap-type: y mandatory;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 4%, rgba(15, 86, 170, 0.19), transparent 25rem),
    radial-gradient(circle at 87% 21%, rgba(10, 80, 153, 0.13), transparent 30rem),
    linear-gradient(180deg, #020817 0, #031128 48%, #020916 100%);
  font-family: var(--font-display);
  font-size: 14px;
  line-height: 1.55;
  min-width: 320px;
}

button, select { font: inherit; }

.page-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(31, 106, 183, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 106, 183, 0.05) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.topbar {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  padding: 0 max(18px, calc((100vw - 1500px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(37, 123, 220, 0.38);
  background: rgba(2, 11, 25, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
}
.brand strong { display: block; font-size: 20px; letter-spacing: 0.04em; line-height: 1.2; }
.brand small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; white-space: nowrap; }

.brand-mark { position: relative; width: 46px; height: 46px; flex: 0 0 46px; }
.brand-mark i { position: absolute; inset: 10px 2px; border: 1px solid var(--blue); border-radius: 50%; box-shadow: 0 0 14px rgba(43, 140, 255, 0.42); }
.brand-mark i:nth-child(2) { transform: rotate(60deg); }
.brand-mark i:nth-child(3) { transform: rotate(-60deg); }
.brand-mark::after {
  content: ""; position: absolute; top: 20px; left: 20px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
}

.access-state {
  display: flex; gap: 10px; align-items: center; color: #b4c7df;
  padding: 8px 15px; border: 1px solid rgba(35, 117, 212, 0.3);
  border-radius: 7px; background: rgba(5, 24, 48, 0.7); flex-shrink: 0;
}
.lock-icon { position: relative; width: 14px; height: 13px; border: 2px solid #8fb8e7; border-radius: 2px; }
.lock-icon::before {
  content: ""; position: absolute; left: 2px; top: -9px; width: 6px; height: 8px;
  border: 2px solid #8fb8e7; border-bottom: 0; border-radius: 6px 6px 0 0;
}

.page-shell { width: 100%; margin: 0; }

.fullscreen-section {
  position: relative;
  min-height: 100vh;
  scroll-snap-align: start;
  padding: calc(var(--topbar-height) + 20px) max(18px, calc((100vw - 1500px) / 2)) 20px;
  border-bottom: 1px solid rgba(29, 126, 224, 0.22);
  display: flex;
  flex-direction: column;
}

.section-title { padding: 0 0 18px; flex-shrink: 0; }
.section-title span {
  color: #438fe4; font: 700 11px/1.2 var(--font-mono); letter-spacing: 0.18em;
}
.section-title h2 { margin: 6px 0 10px; color: #cfe6ff; font-size: 26px; }
.section-title p { margin: 0; color: #8da8c9; font-size: 14px; max-width: 960px; line-height: 1.65; }

/* Loading */
.loading-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  background: rgba(2, 8, 18, 0.95); backdrop-filter: blur(8px);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.loading-overlay.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-spinner { width: 56px; height: 56px; border: 3px solid rgba(43, 140, 255, 0.25); border-top-color: var(--cyan); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: #8da8c9; font-size: 14px; letter-spacing: 0.05em; }
.loading-error { max-width: 500px; padding: 12px 18px; color: #ffd1d3; border: 1px solid rgba(255, 102, 109, 0.5); border-radius: 6px; background: rgba(91, 21, 31, 0.96); }
html.loading-locked,
html.loading-locked body {
  overflow: hidden !important;
  scroll-snap-type: none !important;
  touch-action: none;
}
html.loading-locked .fullscreen-section,
html.loading-locked .pipeline-step,
html.loading-locked .pipeline-intro {
  pointer-events: none;
}
html.loading-locked .loading-overlay,
html.loading-locked .topbar,
html.loading-locked .allow-scroll-when-locked,
html.loading-locked .allow-scroll-when-locked * {
  pointer-events: auto;
}

/* Hero */
.hero {
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-copy { max-width: 900px; }
.eyebrow { margin: 0 0 8px; color: #438fe4; font: 700 11px/1.2 var(--font-mono); letter-spacing: 0.18em; }
.hero h1 { margin: 0; color: #f1f7ff; font-size: clamp(32px, 4vw, 52px); line-height: 1.2; letter-spacing: 0.02em; text-shadow: 0 0 24px rgba(61, 145, 255, 0.2); }
.hero-subtitle { margin: 14px 0 0; color: var(--cyan); font-size: clamp(18px, 2vw, 24px); font-weight: 500; }
.hero-desc { max-width: 760px; margin: 20px auto 0; color: #8da8c9; font-size: 16px; line-height: 1.7; }
.hero-tags { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.hero-tag { padding: 6px 14px; border: 1px solid rgba(43, 140, 255, 0.4); border-radius: 20px; background: rgba(5, 27, 54, 0.6); color: #8da8c9; font-size: 12px; }
.scroll-hint { position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; color: #5a7fa6; font-size: 12px; letter-spacing: 0.08em; }
.scroll-hint i { width: 18px; height: 28px; border: 2px solid rgba(95, 180, 255, 0.4); border-radius: 9px; position: relative; }
.scroll-hint i::after { content: ""; position: absolute; top: 5px; left: 5px; width: 4px; height: 6px; border-radius: 2px; background: rgba(95, 180, 255, 0.7); animation: scrollHint 1.6s ease-in-out infinite; }
@keyframes scrollHint { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(8px); opacity: 0; } }

/* Workbench (B screen) */
.workbench-section { background: linear-gradient(135deg, rgba(4, 25, 52, 0.96), rgba(2, 15, 32, 0.97)); }
.workbench-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  flex-shrink: 0;
}
.workbench-header .section-title { padding-bottom: 12px; }
.help-button {
  padding: 8px 18px; border: 1px solid rgba(43, 140, 255, 0.5); border-radius: 6px;
  background: rgba(5, 27, 54, 0.7); color: #9fddff; font-size: 12px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s; flex-shrink: 0;
}
.help-button:hover { background: rgba(43, 140, 255, 0.15); border-color: rgba(43, 140, 255, 0.8); }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; padding: 10px;
  border: 1px solid rgba(35, 119, 208, 0.28); border-radius: 6px; background: rgba(5, 27, 54, 0.55); flex-shrink: 0;
}
.filter-bar label { display: flex; align-items: center; gap: 6px; color: #8da8c9; font-size: 12px; }
.filter-bar select { width: 110px; padding: 6px 8px; color: var(--ink); border: 1px solid rgba(45, 125, 210, 0.42); border-radius: 4px; background: #061a34; font-size: 12px; }
.filter-bar button { margin-left: auto; padding: 6px 18px; color: #fff; border: 1px solid #146ad4; border-radius: 4px; background: linear-gradient(180deg, #0f55b3, #0a3d88); cursor: pointer; font-size: 12px; }
.filter-bar button:hover { background: linear-gradient(180deg, #146ad4, #0d4aa0); }

.workbench-body {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: 55% 45%; gap: 14px;
}
.star-map-panel {
  position: relative; min-height: 0;
  border: 1px solid rgba(35, 119, 208, 0.24); border-radius: 8px;
  background: rgba(4, 24, 49, 0.45); overflow: hidden;
}
.universe-chart { width: 100%; height: 100%; min-height: 380px; }
.star-tooltip {
  position: absolute; z-index: 60; pointer-events: none;
  min-width: 220px; max-width: 280px; padding: 12px;
  border: 1px solid rgba(43, 140, 255, 0.5); border-radius: 8px;
  background: rgba(3, 16, 34, 0.96); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  color: #c2d8f3; font-size: 12px; line-height: 1.6;
}
.star-tt-header { padding-left: 10px; border-left: 3px solid var(--blue); margin-bottom: 8px; }
.star-tt-header strong { color: #9fddff; font-size: 13px; }
.star-tt-body { display: grid; gap: 4px; }
.star-tt-row { display: flex; justify-content: space-between; gap: 10px; }
.star-tt-row span { color: #7a9fc4; }
.star-tt-row strong { color: #d5eaff; font-weight: 500; }
.star-tt-footer { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.tt-tag { padding: 2px 6px; border: 1px solid rgba(43, 140, 255, 0.3); border-radius: 3px; color: #8da8c9; font-size: 10px; }

.case-chain-panel {
  display: flex; flex-direction: column; min-height: 0;
  border: 1px solid rgba(35, 119, 208, 0.24); border-radius: 8px;
  background: rgba(4, 24, 49, 0.45); overflow: hidden;
}
.case-chain-header {
  padding: 12px 14px; border-bottom: 1px solid rgba(35, 119, 208, 0.24);
  background: rgba(5, 27, 54, 0.55); flex-shrink: 0;
}
.case-chain-kicker {
  margin-right: 10px; padding: 2px 7px; color: var(--green);
  border: 1px solid rgba(76, 224, 173, 0.3); border-radius: 4px;
  font: 700 10px var(--font-mono);
}
.case-chain-header strong { color: #eef6ff; font-size: 16px; }
.case-chain-header small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }

.case-chain-canvas {
  flex: 1 1 auto; min-height: 0; position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  padding: 14px; overflow: hidden;
}
.chain-column {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  min-height: 0; overflow-y: auto;
}
.chain-column h4 {
  margin: 0 0 4px; padding: 6px 8px; border-radius: 4px;
  background: rgba(5, 27, 54, 0.7); color: #7fb7f1; font-size: 12px; text-align: center;
}
.chain-nodes { display: flex; flex-direction: column; gap: 8px; }
.chain-node {
  padding: 10px; border: 1px solid rgba(35, 119, 208, 0.3); border-radius: 6px;
  background: rgba(5, 27, 54, 0.6); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex; flex-direction: column; gap: 4px;
}
.chain-node:hover { border-color: rgba(43, 140, 255, 0.6); box-shadow: 0 0 12px rgba(43, 140, 255, 0.15); }
.node-type { color: #5a7fa6; font-size: 10px; }
.node-text { color: #d5eaff; font-size: 12px; line-height: 1.5; }
.node-text.small-text { font-size: 11px; color: #a9c4e4; }
.evidence-node { border-left: 3px solid var(--blue); }
.entity-node { border-left: 3px solid var(--violet); }
.kg-node { border-left: 3px solid var(--lime); }
.diagnosis-node { border-left: 3px solid var(--green); }
.validation-node { border-left: 3px solid var(--amber); }

.chain-links {
  position: absolute; inset: 0; pointer-events: none; z-index: 5;
}

.asset-output-panel {
  margin-top: 12px; padding: 12px 14px;
  border: 1px solid rgba(35, 119, 208, 0.24); border-radius: 8px;
  background: rgba(4, 24, 49, 0.45); flex-shrink: 0;
}
.asset-output-title {
  margin-bottom: 10px; color: #7fb7f1; font-size: 12px; letter-spacing: 0.05em;
}
.asset-output-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
}
.asset-card {
  padding: 10px; border-radius: 6px;
  border: 1px solid rgba(35, 119, 208, 0.24);
  background: rgba(5, 27, 54, 0.5);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.asset-card-head { display: flex; align-items: center; gap: 8px; }
.asset-icon {
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 5px; background: rgba(43, 140, 255, 0.15); color: #9fddff;
  font: 700 10px var(--font-mono);
}
.asset-card-head strong { color: #c2d8f3; font-size: 12px; }
.asset-status { padding: 2px 8px; border-radius: 10px; font-size: 10px; white-space: nowrap; }
.status-generated { color: #66dfb8; border: 1px solid rgba(76, 224, 173, 0.3); }
.status-benchmark { color: #63cce6; border: 1px solid rgba(99, 204, 230, 0.3); }
.status-training { color: #a9e340; border: 1px solid rgba(169, 227, 64, 0.3); }
.status-conflict { color: #ff9298; border: 1px solid rgba(255, 102, 109, 0.3); }
.status-none { color: #5a7fa6; border: 1px solid rgba(90, 127, 166, 0.3); }
.asset-active { background: rgba(43, 140, 255, 0.08); }

/* Help modal */
.help-modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; }
.help-modal-backdrop { position: absolute; inset: 0; background: rgba(2, 8, 18, 0.85); backdrop-filter: blur(4px); }
.help-modal-content {
  position: relative; z-index: 1; width: min(560px, calc(100% - 40px));
  padding: 24px; border: 1px solid rgba(43, 140, 255, 0.4); border-radius: 10px;
  background: rgba(4, 24, 49, 0.98); box-shadow: var(--shadow);
}
.help-modal-close {
  position: absolute; top: 12px; right: 14px; width: 28px; height: 28px;
  border: 0; border-radius: 50%; background: transparent; color: #8da8c9;
  font-size: 20px; line-height: 1; cursor: pointer;
}
.help-modal-close:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.help-modal-content h3 { margin: 0 0 16px; color: #cfe6ff; font-size: 18px; }
.help-steps { margin: 0; padding-left: 20px; color: #a9c4e4; }
.help-steps li { margin-bottom: 14px; }
.help-steps strong { color: #9fddff; }
.help-steps p { margin: 4px 0 0; color: #8da8c9; font-size: 12px; line-height: 1.6; }
.help-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(35, 119, 208, 0.24); color: #8da8c9; font-size: 11px; }
.help-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.help-legend .mod-ct { background: #2b8cff; }
.help-legend .mod-mr { background: #9a7cff; }
.help-legend .mod-dr { background: #37d7ff; }
.help-legend .mod-mg { background: #ff7bca; }
.help-legend .ql-a { background: #4ce0ad; box-shadow: 0 0 6px #4ce0ad; }
.help-legend .ql-gx { background: #9aa9bc; opacity: 0.5; }

/* C/D/E sections */
.attribute-section, .validation-section, .asset-section { background: linear-gradient(135deg, rgba(4, 25, 52, 0.96), rgba(2, 15, 32, 0.97)); }
.kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding-bottom: 18px; flex-shrink: 0; }
.kpi-card { min-height: 90px; padding: 14px; border: 1px solid rgba(38, 114, 190, 0.28); border-radius: 6px; background: rgba(5, 26, 51, 0.66); text-align: center; }
.kpi-card span { display: block; color: #607fa3; font-size: 11px; }
.kpi-card strong { display: block; margin-top: 12px; color: #a7ddff; font: 700 30px var(--font-mono); }
.attribute-grid, .stratification-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.chart-panel { padding: 14px; border: 1px solid rgba(38, 114, 190, 0.28); border-radius: 6px; background: rgba(5, 26, 51, 0.66); display: flex; flex-direction: column; min-height: 0; }
.chart-panel h3 { margin: 0 0 10px; color: #7598bd; font-size: 13px; flex-shrink: 0; }
.chart-area { flex: 1 1 auto; width: 100%; min-height: 0; }
.chart-note { margin: 8px 0 0; color: #506f92; font-size: 10px; flex-shrink: 0; }

.scale-estimate { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; flex-shrink: 0; }
.scale-card { padding: 16px; border: 1px solid rgba(38, 114, 190, 0.28); border-radius: 6px; background: rgba(5, 26, 51, 0.66); text-align: center; }
.scale-card span { display: block; color: #607fa3; font-size: 11px; }
.scale-card strong { display: block; margin-top: 10px; color: #a7ddff; font: 700 34px var(--font-mono); }
.scale-card small { display: block; margin-top: 6px; color: #557aa3; font-size: 10px; }
.asset-grid { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; overflow-y: auto; }
.asset-output-card { min-height: 120px; padding: 14px; border: 1px solid rgba(38, 114, 190, 0.28); border-radius: 6px; background: rgba(5, 26, 51, 0.66); }
.asset-output-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; margin-bottom: 10px; }
.asset-output-head strong { color: #9fc1df; font-size: 13px; line-height: 1.3; }
.asset-tag { padding: 2px 6px; color: #6ee0c2; border: 1px solid rgba(76, 224, 173, 0.25); border-radius: 3px; font-size: 9px; white-space: nowrap; }
.asset-output-value { color: #a7ddff; font: 700 34px var(--font-mono); margin: 10px 0; }
.asset-output-card small { display: block; color: #506f92; font-size: 10px; line-height: 1.4; }

/* Errors */
.connection-error {
  position: fixed; z-index: 100; left: 50%; bottom: 20px; transform: translateX(-50%);
  max-width: calc(100% - 30px); padding: 10px 16px; color: #ffd1d3;
  border: 1px solid rgba(255, 102, 109, 0.5); border-radius: 6px;
  background: rgba(91, 21, 31, 0.96); box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
[hidden] { display: none !important; }

/* Pipeline steps */
.pipeline-intro {
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, rgba(4,25,52,0.96), rgba(2,15,32,0.97));
}
.pipeline-intro .section-title { text-align: center; }
.pipeline-overview {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  max-width: 1200px;
  width: 100%;
  margin-top: 10px;
}
.pipeline-step-card {
  padding: 18px 10px;
  border: 1px solid rgba(43, 140, 255, 0.35);
  border-radius: 8px;
  background: rgba(5, 27, 54, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}
.pipeline-step-card:hover {
  background: rgba(43, 140, 255, 0.12);
  border-color: rgba(43, 140, 255, 0.7);
  transform: translateY(-3px);
}
.pipeline-step-card span {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(43, 140, 255, 0.2);
  color: var(--cyan);
  font: 700 14px var(--font-mono);
}
.pipeline-step-card strong { color: #cfe6ff; font-size: 13px; }

.pipeline-references {
  margin-top: 28px;
  max-width: 1000px;
}
.pipeline-references p { color: #607fa3; font-size: 12px; }
.ref-tag {
  display: inline-block;
  margin: 3px 4px;
  padding: 3px 8px;
  border: 1px solid rgba(43, 140, 255, 0.25);
  border-radius: 12px;
  background: rgba(5, 27, 54, 0.5);
  color: #8da8c9;
  font-size: 11px;
}

.pipeline-step {
  background: linear-gradient(135deg, rgba(4,25,52,0.96), rgba(2,15,32,0.97));
}
.step-header {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 18px; flex-shrink: 0;
}
.step-number {
  width: 60px; height: 60px; flex: 0 0 60px;
  display: grid; place-items: center;
  border: 2px solid rgba(43, 140, 255, 0.5);
  border-radius: 12px;
  color: var(--cyan);
  font: 700 24px var(--font-mono);
  background: rgba(5, 27, 54, 0.6);
}
.step-title-block h2 { margin: 0; color: #cfe6ff; font-size: 24px; }
.step-goal { margin: 6px 0 0; color: #8da8c9; font-size: 14px; max-width: 760px; }

.step-body {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 18px;
}
.step-panel {
  min-height: 0;
  border: 1px solid rgba(35, 119, 208, 0.24); border-radius: 8px;
  background: rgba(4, 24, 49, 0.45);
  padding: 16px; overflow: hidden;
}
.step-info h3 { margin: 16px 0 10px; color: #7fb7f1; font-size: 13px; }
.step-info h3:first-child { margin-top: 0; }
.step-info p, .step-info li { color: #a9c4e4; font-size: 12px; line-height: 1.7; }
.step-info ul, .step-info ol { padding-left: 18px; margin: 0; }
.step-info code {
  padding: 2px 5px; border-radius: 3px;
  background: rgba(43, 140, 255, 0.12); color: #9fddff; font-size: 11px;
}

.step-banner {
  margin-bottom: 14px;
  padding: 14px 14px 10px;
  border: 1px solid rgba(43, 140, 255, 0.24);
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 18%, rgba(76, 224, 173, 0.12), transparent 22%),
    radial-gradient(circle at 92% 22%, rgba(43, 140, 255, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(5, 27, 54, 0.86), rgba(5, 27, 54, 0.6));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.step-banner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.step-banner-head strong {
  display: block;
  margin-top: 4px;
  color: #f1f7ff;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.step-banner-head p {
  margin: 0;
  max-width: 310px;
  color: #8da8c9;
  font-size: 11px;
  line-height: 1.6;
  text-align: right;
}

.step-banner-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #4ce0ad;
  font: 700 10px var(--font-mono);
  letter-spacing: 0.14em;
}

.step-banner-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.step-banner-svg {
  width: 100%;
  height: 132px;
  display: block;
}

.banner-svg-label {
  fill: #dcecff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.banner-svg-detail {
  fill: #8da8c9;
  font-size: 9px;
}

.step-highlight {
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(76, 224, 173, 0.15);
  color: #dffbf3;
}

.raw-report-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.report-card {
  width: 100%;
  max-width: none;
}

.report-meta {
  flex-wrap: wrap;
}

.report-block p {
  position: relative;
  padding: 12px 14px 12px 16px;
  border-left: 3px solid rgba(43, 140, 255, 0.75);
  border-radius: 8px;
  background: rgba(3, 16, 34, 0.42);
  color: #dbeaff;
}

.report-block:last-child p {
  border-left-color: rgba(76, 224, 173, 0.75);
}

.split-stages {
  margin-top: 4px;
}

.split-stage {
  position: relative;
  overflow: hidden;
}

.split-stage::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(43, 140, 255, 0.85), transparent);
}

.split-stage h4 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.split-stage h4::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.split-items {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.split-item {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(5, 27, 54, 0.6);
  border-left: 3px solid var(--blue);
  color: #dbeaff;
  font-size: 11px;
  line-height: 1.55;
}

.split-item.merge { border-left-color: var(--green); }
.split-item.type-diag { border-left-color: var(--orange); }

.entity-legend {
  gap: 10px;
}

.entity-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid rgba(35, 119, 208, 0.24);
  border-radius: 999px;
  background: rgba(5, 27, 54, 0.45);
}

.entity-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.ent-anatomy { background: var(--blue); }
.ent-orient { background: var(--violet); }
.ent-finding { background: var(--orange); }
.ent-diagnosis { background: var(--red); }

.entity-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 100%;
  overflow-y: auto;
}

.entity-card {
  padding: 10px 12px;
  border: 1px solid rgba(35, 119, 208, 0.24);
  border-radius: 10px;
  background: rgba(5, 27, 54, 0.58);
  display: flex;
  align-items: center;
  gap: 10px;
}

.entity-card i {
  width: 8px;
  height: 28px;
  border-radius: 999px;
  flex: 0 0 8px;
}

.entity-card strong {
  color: #e8f4ff;
  font-size: 13px;
}

.entity-card small {
  margin-left: auto;
  color: #8da8c9;
  font-size: 10px;
  text-align: right;
}

.anatomy-chains {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.anatomy-chain {
  padding: 8px 10px;
  border: 1px solid rgba(35, 119, 208, 0.22);
  border-radius: 8px;
  background: rgba(5, 27, 54, 0.5);
  color: #dbeaff;
  font-size: 12px;
  line-height: 1.5;
}

.kg-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kg-panel .chart-area {
  min-height: 340px;
  border-radius: 10px;
  border: 1px solid rgba(35, 119, 208, 0.2);
  background: rgba(3, 16, 34, 0.44);
}

.relation-panel,
.validation-examples,
.output-asset-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.relation-example {
  padding: 14px;
  border: 1px solid rgba(35, 119, 208, 0.24);
  border-radius: 10px;
  background: rgba(5, 27, 54, 0.54);
}

.relation-example h4 {
  margin: 0 0 12px;
  color: #9fddff;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.relation-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.relation-arrow {
  color: #4ce0ad;
  font-size: 28px;
  line-height: 1;
  text-align: center;
}

.relation-node {
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(43, 140, 255, 0.22);
  background: rgba(3, 16, 34, 0.42);
  color: #dbeaff;
  font-size: 11px;
  line-height: 1.5;
}

.relation-node.diag {
  border-color: rgba(76, 224, 173, 0.22);
}

.kg-stats,
.relation-counts,
.asset-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kg-stat,
.relation-count,
.asset-mini-stat {
  padding: 12px;
  border: 1px solid rgba(35, 119, 208, 0.22);
  border-radius: 8px;
  background: rgba(5, 27, 54, 0.5);
  text-align: center;
}

.kg-stat strong,
.relation-count strong,
.asset-mini-stat strong {
  display: block;
  color: #e8f4ff;
  font: 700 22px var(--font-mono);
}

.kg-stat span,
.relation-count span,
.asset-mini-stat span {
  display: block;
  margin-top: 4px;
  color: #8da8c9;
  font-size: 11px;
}

.validation-card {
  padding: 12px 14px;
  border-left: 3px solid var(--green);
  border-radius: 8px;
  background: rgba(5, 27, 54, 0.54);
}

.validation-card strong,
.validation-card small,
.validation-card p {
  display: block;
}

.validation-card strong { color: #9fddff; font-size: 12px; }
.validation-card small { margin-top: 4px; color: #8da8c9; font-size: 11px; }
.validation-card p { margin: 8px 0 0; color: #dbeaff; font-size: 11px; line-height: 1.5; }

.quality-radar-wrap {
  min-height: 260px;
  margin-bottom: 12px;
  border: 1px solid rgba(35, 119, 208, 0.2);
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 50%, rgba(76, 224, 173, 0.08), transparent 42%),
    rgba(3, 16, 34, 0.38);
}

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

.validation-examples {
  overflow-y: auto;
}

.step-panel-wide {
  min-width: 0;
}

.split-flow-visual {
  position: relative;
  min-height: 285px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  padding: 10px;
  overflow: hidden;
}

.split-flow-lines,
.relation-map-lines,
.validation-link-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.flow-path {
  fill: none;
  stroke: url(#splitLineGradient);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.flow-path.soft {
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  opacity: .65;
}

.split-flow-col {
  position: relative;
  z-index: 1;
  min-width: 0;
  border: 1px solid rgba(35, 119, 208, 0.24);
  border-radius: 16px;
  background: rgba(3, 16, 34, 0.72);
  box-shadow: inset 0 0 32px rgba(43, 140, 255, 0.05);
  overflow: hidden;
}

.split-flow-col.green { border-color: rgba(76, 224, 173, .28); }
.split-flow-col.orange { border-color: rgba(255, 189, 63, .28); }

.split-flow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(35, 119, 208, 0.18);
}

.split-flow-head strong {
  color: #e8f4ff;
  font-size: 13px;
}

.split-flow-head span {
  color: #8da8c9;
  font-size: 10px;
}

.split-flow-items {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.split-flow-item {
  min-height: 44px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(5, 27, 54, 0.72);
  border: 1px solid rgba(43, 140, 255, .16);
  color: #dbeaff;
  font-size: 11px;
  line-height: 1.45;
}

.split-flow-item b {
  color: #37d7ff;
  font: 700 11px var(--font-mono);
}

.split-flow-item.diag b { color: #ffbd3f; }
.split-flow-item.desc b { color: #4ce0ad; }

.entity-extraction-demo {
  display: grid;
  grid-template-columns: 1.15fr 84px 1.75fr;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.entity-sentence-card {
  padding: 16px;
  border: 1px solid rgba(35, 119, 208, 0.24);
  border-radius: 16px;
  background: radial-gradient(circle at top left, rgba(55, 215, 255, .12), transparent 45%), rgba(3, 16, 34, .68);
}

.entity-input-label,
.process-flow-title {
  display: block;
  color: #8da8c9;
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.entity-sentence-card p {
  margin: 10px 0 0;
  color: #eef8ff;
  font-size: 22px;
  line-height: 1.75;
  font-weight: 800;
}

.entity-sentence-card mark {
  margin: 0 2px;
  padding: 2px 5px;
  border-radius: 7px;
  color: #031226;
}

.mark-orient { background: #9a7cff; }
.mark-anatomy { background: #37d7ff; }
.mark-finding { background: #ffbd3f; }
.mark-diagnosis { background: #ff666d; }

.entity-arrow-stack {
  display: grid;
  gap: 12px;
  justify-items: center;
}

.entity-arrow-stack span {
  width: 58px;
  height: 2px;
  background: linear-gradient(90deg, rgba(55, 215, 255, .2), rgba(76, 224, 173, .95));
  position: relative;
}

.entity-arrow-stack span::after {
  content: "";
  position: absolute;
  right: -1px;
  top: -4px;
  border-left: 8px solid rgba(76, 224, 173, .95);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
}

.entity-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.entity-result-card {
  min-height: 84px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(35, 119, 208, .24);
  background: rgba(5, 27, 54, .62);
}

.entity-result-card i {
  display: block;
  width: 32px;
  height: 4px;
  border-radius: 99px;
  margin-bottom: 8px;
}

.entity-result-card span,
.entity-result-card small {
  display: block;
  color: #8da8c9;
  font-size: 10px;
}

.entity-result-card strong {
  display: block;
  margin: 4px 0;
  color: #e8f4ff;
  font-size: 14px;
}

.entity-process-flow {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(3, 16, 34, .42);
  border: 1px solid rgba(35, 119, 208, .18);
}

.process-flow-track {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.process-node {
  min-height: 58px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(5, 27, 54, .72);
  border: 1px solid rgba(43, 140, 255, .2);
}

.process-node b {
  display: block;
  color: #37d7ff;
  font: 700 11px var(--font-mono);
}

.process-node span {
  display: block;
  margin-top: 4px;
  color: #dbeaff;
  font-size: 10px;
  line-height: 1.35;
}

.process-node.start { background: rgba(55, 215, 255, .14); }
.process-node.end { background: rgba(76, 224, 173, .16); border-color: rgba(76, 224, 173, .34); }
.process-node.decision { background: rgba(255, 189, 63, .14); border-color: rgba(255, 189, 63, .3); }

.kg-normalization-board {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 44px minmax(0, .9fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.synonym-bucket,
.standard-node-card,
.normalization-family > div {
  border: 1px solid rgba(35, 119, 208, .24);
  border-radius: 14px;
  background: rgba(5, 27, 54, .62);
  padding: 12px;
}

.synonym-bucket span,
.standard-node-card span,
.normalization-family span {
  display: block;
  color: #8da8c9;
  font-size: 10px;
  letter-spacing: .08em;
}

.synonym-bucket div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.synonym-bucket b {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(55, 215, 255, .13);
  border: 1px solid rgba(55, 215, 255, .3);
  color: #dff7ff;
  font-size: 12px;
}

.normalization-arrow {
  color: #4ce0ad;
  font-size: 32px;
  text-align: center;
}

.standard-node-card strong {
  display: block;
  margin-top: 8px;
  color: #fff;
  font-size: 20px;
}

.standard-node-card small {
  display: block;
  margin-top: 8px;
  color: #8da8c9;
  font-size: 10px;
}

.normalization-family {
  display: grid;
  gap: 8px;
}

.normalization-family strong {
  display: block;
  margin-top: 6px;
  color: #e8f4ff;
  font-size: 13px;
}

.kg-tree-compact {
  margin-top: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(35, 119, 208, .2);
  background: rgba(3, 16, 34, .42);
}

.kg-tree-title {
  color: #8da8c9;
  font-size: 11px;
  margin-bottom: 10px;
}

.kg-levels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.kg-level {
  min-height: 94px;
  position: relative;
  padding: 10px;
  border-radius: 12px;
  background: rgba(5, 27, 54, .68);
  border: 1px solid rgba(43, 140, 255, .2);
}

.kg-level:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 42px;
  width: 10px;
  height: 2px;
  background: rgba(76, 224, 173, .75);
}

.kg-level span {
  color: #37d7ff;
  font: 700 11px var(--font-mono);
}

.kg-level strong {
  display: block;
  margin: 8px 0;
  color: #e8f4ff;
  font-size: 12px;
}

.kg-level em {
  display: block;
  margin-top: 4px;
  color: #8da8c9;
  font-style: normal;
  font-size: 10px;
}

.relation-mapping-board {
  min-height: 330px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr);
  gap: 14px;
  padding: 8px;
}

.relation-map-path {
  fill: none;
  stroke: url(#relationLineGradient);
  stroke-width: 2;
  stroke-linecap: round;
}

.relation-map-col,
.relation-map-center {
  position: relative;
  z-index: 1;
}

.relation-map-col h4 {
  margin: 0 0 8px;
  color: #9fddff;
  font-size: 12px;
}

.relation-map-node {
  min-height: 52px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(43, 140, 255, .22);
  background: rgba(5, 27, 54, .72);
}

.relation-map-node b,
.relation-map-node span {
  display: inline-block;
  margin-right: 6px;
  color: #37d7ff;
  font: 700 10px var(--font-mono);
}

.relation-map-node span {
  color: #8da8c9;
}

.relation-map-node p {
  margin: 4px 0 0;
  color: #dbeaff;
  font-size: 11px;
  line-height: 1.35;
}

.diag-node {
  border-color: rgba(76, 224, 173, .24);
}

.relation-map-center {
  align-self: center;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(3, 16, 34, .78);
  border: 1px solid rgba(76, 224, 173, .22);
  text-align: center;
}

.relation-map-center strong {
  color: #4ce0ad;
  font-size: 13px;
}

.relation-map-center span {
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(76, 224, 173, .1);
  color: #dffbf3;
  font-size: 10px;
}

.validation-link-board {
  min-height: 285px;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 170px;
  gap: 14px;
  padding: 8px;
}

.validation-link-path {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.validation-link-path.weak {
  stroke-width: 1.6;
  stroke-dasharray: 5 5;
}

.validation-link-col,
.validation-score-node {
  position: relative;
  z-index: 1;
}

.validation-link-col h4 {
  margin: 0 0 10px;
  color: #9fddff;
  font-size: 12px;
}

.validation-link-node {
  min-height: 86px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(43, 140, 255, .22);
  background: rgba(5, 27, 54, .7);
}

.validation-link-node span {
  color: #8da8c9;
  font-size: 10px;
}

.validation-link-node p {
  margin: 8px 0 0;
  color: #dbeaff;
  font-size: 12px;
  line-height: 1.45;
}

.validation-score-node {
  align-self: center;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 189, 63, .32);
  background: radial-gradient(circle at top, rgba(255, 189, 63, .18), rgba(5, 27, 54, .78) 55%);
  text-align: center;
}

.validation-score-node span,
.validation-score-node small {
  display: block;
  color: #8da8c9;
  font-size: 10px;
}

.validation-score-node strong {
  display: block;
  margin: 10px 0;
  color: #ffbd3f;
  font-size: 28px;
}

.quality-metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.quality-pill {
  position: relative;
  overflow: hidden;
  min-height: 58px;
  padding: 10px;
  border: 1px solid rgba(35, 119, 208, .2);
  border-radius: 12px;
  background: rgba(3, 16, 34, .56);
}

.quality-pill span,
.quality-pill b {
  position: relative;
  z-index: 1;
  display: block;
}

.quality-pill span {
  color: #8da8c9;
  font-size: 10px;
}

.quality-pill b {
  margin-top: 6px;
  color: #e8f4ff;
  font: 700 18px var(--font-mono);
}

.quality-pill i {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, #37d7ff, #4ce0ad, #ffbd3f);
}

.output-asset-card {
  padding: 14px;
  border: 1px solid rgba(35, 119, 208, 0.22);
  border-radius: 10px;
  background: rgba(5, 27, 54, 0.54);
}

.output-asset-card h4 {
  margin: 0 0 8px;
  color: #cfe6ff;
  font-size: 13px;
}

.asset-code {
  display: inline-block;
  margin-right: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(43, 140, 255, 0.18);
  color: #9fddff;
  font: 700 10px var(--font-mono);
}

.output-asset-card p {
  margin: 0 0 10px;
  color: #8da8c9;
  font-size: 11px;
  line-height: 1.6;
}

.asset-status-mini {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 10px;
}

/* Step navigation */
.step-navigator {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  z-index: 60;
  display: flex; flex-direction: column; gap: 10px;
}
.step-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid rgba(43, 140, 255, 0.5);
  background: rgba(5, 27, 54, 0.7);
  cursor: pointer; padding: 0;
  transition: background 0.2s, transform 0.2s;
}
.step-dot.active {
  background: var(--cyan);
  border-color: var(--cyan);
  transform: scale(1.3);
  box-shadow: 0 0 10px var(--cyan);
}
.step-progress {
  position: fixed; left: 0; bottom: 0; right: 0; height: 3px;
  z-index: 60; background: rgba(5, 27, 54, 0.8);
}
.step-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--blue), var(--cyan));
  transition: width 0.3s ease;
}

@media (max-width: 1180px) {
  .pipeline-overview { grid-template-columns: repeat(4, 1fr); }
  .step-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .split-stages { grid-template-columns: 1fr; }
  .split-flow-visual,
  .relation-mapping-board,
  .validation-link-board,
  .kg-normalization-board { grid-template-columns: 1fr; }
  .split-flow-lines,
  .relation-map-lines,
  .validation-link-lines { display: none; }
  .entity-extraction-demo { grid-template-columns: 1fr; }
  .entity-arrow-stack { display: none; }
  .kg-levels,
  .quality-metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .process-flow-track { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .entity-grid { grid-template-columns: 1fr; }
  .output-asset-grid { grid-template-columns: 1fr; }
  .step-navigator { display: none; }
}

/* ================= 胸部肺案例演示区 ================= */
.lung-case-section {
  background: linear-gradient(135deg, rgba(4,25,52,0.96), rgba(2,15,32,0.97));
}

.lung-case-section .section-title {
  flex-shrink: 0;
}

.lung-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.lung-kpi-card {
  min-height: 84px;
  padding: 14px;
  border: 1px solid rgba(38, 114, 190, 0.28);
  border-radius: 8px;
  background: rgba(5, 26, 51, 0.66);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.lung-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.lung-kpi-card span {
  display: block;
  color: #607fa3;
  font-size: 11px;
  letter-spacing: 0.04em;
}

.lung-kpi-card strong {
  display: block;
  margin-top: 10px;
  color: #a7ddff;
  font: 700 28px var(--font-mono);
}

.lung-kpi-card small {
  display: block;
  margin-top: 6px;
  color: #557aa3;
  font-size: 10px;
}

.lung-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: 1.1fr 0.9fr;
  gap: 14px;
}

.lung-panel {
  border: 1px solid rgba(38, 114, 190, 0.28);
  border-radius: 8px;
  background: rgba(5, 26, 51, 0.55);
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.lung-panel h3 {
  margin: 0 0 10px;
  color: #7598bd;
  font-size: 13px;
  flex-shrink: 0;
}

.lung-chart {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
}

.lung-detail {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lung-detail-empty {
  color: #5a7fa6;
  font-size: 12px;
  text-align: center;
  margin-top: auto;
  margin-bottom: auto;
}

.lung-detail-cluster {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(3, 16, 34, 0.5);
  border: 1px solid rgba(43, 140, 255, 0.22);
}

.lung-detail-cluster h4 {
  margin: 0 0 6px;
  color: #cfe6ff;
  font-size: 14px;
}

.lung-detail-cluster p {
  margin: 0 0 8px;
  color: #8da8c9;
  font-size: 11px;
}

.lung-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.lung-tag {
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(43, 140, 255, 0.12);
  border: 1px solid rgba(43, 140, 255, 0.25);
  color: #9fddff;
  font-size: 10px;
}

.lung-tag.gold {
  background: rgba(76, 224, 173, 0.12);
  border-color: rgba(76, 224, 173, 0.25);
  color: #66dfb8;
}

.lung-examples {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lung-std-label {
  color: #66dfb8;
  font-size: 12px;
  font-weight: 400;
}

.lung-structured {
  margin-bottom: 8px;
}

.lung-structured h5 {
  margin: 0 0 6px;
  color: #9fddff;
  font-size: 11px;
}

.lung-structured-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.lung-structured-table th,
.lung-structured-table td {
  padding: 4px 6px;
  text-align: left;
  border: 1px solid rgba(43, 140, 255, 0.18);
}

.lung-structured-table th {
  width: 80px;
  color: #7598bd;
  background: rgba(43, 140, 255, 0.08);
}

.lung-structured-table td {
  color: #dcecff;
}

.lung-example {
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(5, 27, 54, 0.6);
  border-left: 3px solid var(--blue);
  font-size: 11px;
  line-height: 1.5;
}

.lung-example strong {
  display: block;
  color: #dcecff;
  margin-bottom: 3px;
}

.lung-example span {
  color: #8da8c9;
}

.lung-chart-full {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  border: 1px solid rgba(38, 114, 190, 0.28);
  border-radius: 8px;
  background: rgba(5, 26, 51, 0.55);
  padding: 10px;
}

.lung-layout-2col {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.lung-heatmap-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 0.8fr;
  gap: 14px;
}

.lung-disease-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.lung-disease-item {
  padding: 10px 12px;
  border: 1px solid rgba(38, 114, 190, 0.28);
  border-radius: 8px;
  background: rgba(5, 26, 51, 0.55);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}

.lung-disease-item:hover,
.lung-disease-item.active {
  background: rgba(43, 140, 255, 0.12);
  border-color: rgba(43, 140, 255, 0.6);
}

.lung-disease-item.active {
  box-shadow: inset 0 0 0 1px rgba(43, 140, 255, 0.35);
}

.lung-disease-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
}

.lung-disease-main strong {
  color: #cfe6ff;
  font-size: 13px;
}

.lung-disease-main span {
  color: #a7ddff;
  font: 700 13px var(--font-mono);
  white-space: nowrap;
}

.lung-disease-meta {
  display: flex;
  gap: 10px;
  font-size: 10px;
}

.lung-disease-rate {
  color: #66dfb8;
}

.lung-disease-verified {
  color: #8da8c9;
}

.lung-detail-cluster h5 {
  margin: 12px 0 8px;
  color: #7598bd;
  font-size: 11px;
  font-weight: 600;
}

.lung-gold-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lung-gold-bar {
  display: grid;
  grid-template-columns: 90px 1fr 90px;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.lung-gold-label {
  color: #8da8c9;
}

.lung-gold-track {
  height: 10px;
  border-radius: 5px;
  background: rgba(5, 26, 51, 0.8);
  overflow: hidden;
}

.lung-gold-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s ease;
}

.lung-gold-value {
  color: #dcecff;
  text-align: right;
  font: 11px var(--font-mono);
}

.lung-example-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 6px;
  color: #8da8c9;
  font-size: 10px;
}

.lung-example-gold {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(3, 16, 34, 0.6);
  border-left: 3px solid var(--green);
  font-size: 11px;
}

.lung-example-gold.pathology {
  border-left-color: var(--green);
}

.lung-example-gold.discharge {
  border-left-color: var(--blue);
}

.lung-example-gold .lung-gold-type {
  display: block;
  margin-bottom: 3px;
  font-weight: 600;
}

.lung-example-gold p {
  margin: 0;
  color: #dcecff;
  line-height: 1.5;
}

@media (max-width: 1180px) {
  .lung-kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lung-grid,
  .lung-layout-2col,
  .lung-heatmap-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .lung-chart-full { min-height: 360px; }
}

@media (max-width: 760px) {
  .lung-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lung-panel { min-height: 280px; }
  .lung-gold-bar { grid-template-columns: 70px 1fr 70px; }
}

