:root {
  --bg: #eff4f9;
  --surface: #ffffff;
  --surface-soft: #f7fbff;
  --border: #d7e1ec;
  --border-strong: #bfd0e1;
  --text: #0f2238;
  --muted: #516579;
  --accent: #0f4c81;
  --accent-soft: #eaf4ff;
  --accent-hero: linear-gradient(135deg, #0f2747, #145d75);
  --success: #15803d;
  --warning: #d97706;
  --danger: #dc2626;
  --neutral: #64748b;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --radius-xl: 24px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(191, 219, 254, 0.35), transparent 28%),
    linear-gradient(180deg, #eef4fa 0%, #f8fbff 100%);
}

.app-shell {
  max-width: 1520px;
  margin: 0 auto;
  padding: 28px 28px 56px;
}

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.hero,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr;
  gap: 24px;
  padding: 28px 32px;
  background: var(--accent-hero);
  border-color: #1e5074;
}

.eyebrow {
  color: #c5ecff;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.hero h1 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: clamp(2.1rem, 3vw, 3.5rem);
  line-height: 1.03;
}

.hero p {
  margin: 0;
  color: #dce8f6;
  line-height: 1.6;
  max-width: 62rem;
}

.hero strong {
  color: #ffffff;
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: #eef6ff;
  font-size: 0.92rem;
}

.hero-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.10);
}

.hero-side label {
  color: #d8efff;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.focus-selector label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hero-side select,
.focus-selector select {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #d4dfeb;
  font: inherit;
  color: var(--text);
  background: #ffffff;
}

.hero-side-note {
  color: #dbeaf8;
  line-height: 1.5;
}

.primary-button,
.ghost-button,
.filter-button,
.media-tab,
.featured-button {
  font: inherit;
}

.primary-button {
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--accent);
  font-weight: 800;
  cursor: pointer;
}

.primary-button:hover {
  background: #f3f8ff;
}

.panel {
  margin-top: 22px;
  padding: 20px 22px 22px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: end;
  margin-bottom: 18px;
}

.panel-head.compact {
  margin-bottom: 16px;
}

.panel-head h2 {
  margin: 0 0 6px;
  font-size: 1.18rem;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.panel .eyebrow {
  color: var(--accent);
  margin: 0 0 8px;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.featured-button {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
  min-height: 280px;
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.featured-button:hover,
.featured-button:focus-visible {
  transform: translateY(-3px);
  border-color: #8cb5d8;
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
}

.featured-button.is-active {
  border-color: var(--accent);
}

.featured-preview {
  aspect-ratio: 16 / 11;
  background: #eef4f9;
  overflow: hidden;
}

.featured-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f2f7fb;
}

.featured-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.featured-tag {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.featured-title {
  font-size: 1.08rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.featured-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.featured-copy {
  color: var(--muted);
  line-height: 1.48;
  overflow-wrap: anywhere;
}

.filter-group {
  display: grid;
  gap: 8px;
}

.filter-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-button {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f7fbff;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.filter-button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.case-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.case-card:hover,
.case-card:focus-visible {
  transform: translateY(-2px);
  border-color: #8cb5d8;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.07);
}

.case-card.is-active {
  border-color: var(--accent);
  box-shadow: 0 16px 30px rgba(15, 23, 42, 0.10);
}

.case-thumb {
  background: #eef4f9;
  min-height: 170px;
}

.case-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f2f7fb;
}

.case-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.case-title {
  font-size: 1rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.case-meta {
  color: var(--muted);
  line-height: 1.46;
  overflow-wrap: anywhere;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.focus-topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  margin-top: 8px;
}

.ghost-button {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.ghost-button:hover {
  background: #f8fbff;
}

.focus-title-wrap h1 {
  margin: 8px 0 6px;
  font-size: clamp(1.8rem, 2.5vw, 2.7rem);
  overflow-wrap: anywhere;
}

.focus-title-wrap p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.focus-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.focus-selector {
  min-width: 360px;
  display: grid;
  gap: 8px;
}

.workflow-shell {
  margin-top: 18px;
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
}

.workflow-step {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 118px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.workflow-step::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 10px;
  height: 2px;
  background: var(--border-strong);
}

.workflow-step:last-child::after {
  display: none;
}

.workflow-step:hover,
.workflow-step:focus-visible {
  transform: translateY(-2px);
  border-color: #7aa7ce;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
}

.workflow-step.is-active {
  border-color: var(--accent);
  background: #eef7ff;
  box-shadow: 0 18px 34px rgba(15, 76, 129, 0.16);
}

.workflow-step.is-skipped,
.workflow-step.is-stop,
.workflow-step.is-not-applicable {
  background: #f8fafc;
  color: #64748b;
}

.workflow-step-index {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e7eef6;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 900;
}

.workflow-step strong {
  align-self: center;
  margin-top: 10px;
  font-size: 0.98rem;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
}

.workflow-step-status {
  width: fit-content;
  max-width: 100%;
  min-height: 24px;
  padding: 5px 8px;
  border-radius: 999px;
  background: #e7eef6;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.workflow-step.is-done .workflow-step-status,
.workflow-step.is-route .workflow-step-status {
  background: #dcfce7;
  color: #166534;
}

.workflow-step.is-warning .workflow-step-status {
  background: #fef3c7;
  color: #92400e;
}

.workflow-step.is-not-applicable .workflow-step-status {
  background: #e2e8f0;
  color: #475569;
}

.workflow-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 20px;
  margin-top: 18px;
  align-items: start;
}

.workflow-visual-panel,
.workflow-detail-panel {
  min-height: 560px;
}

.workflow-visual {
  min-height: 440px;
  display: grid;
  align-items: center;
}

.workflow-detail {
  display: grid;
  gap: 12px;
}

.acquisition-visual-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(420px, 1.15fr);
  gap: 16px;
  align-items: stretch;
}

.acquisition-method {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 10px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background:
    radial-gradient(circle at 50% 45%, rgba(15, 76, 129, 0.08), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f3f8fd 100%);
}

.acquisition-method svg {
  width: 100%;
  max-height: 470px;
  display: block;
}

.diagram-stage {
  transform-origin: center;
}

.rotation-orbit {
  fill: none;
  stroke: #9ab9d6;
  stroke-width: 2;
  stroke-dasharray: 5 7;
}

.rotation-ticks {
  fill: none;
  stroke: #d8e5f1;
  stroke-width: 10;
  stroke-dasharray: 1.2 8.9;
}

.rotation-arrow {
  fill: none;
  stroke: #0f4c81;
  stroke-width: 4;
  stroke-linecap: round;
}

.diagram-arrow-head {
  fill: #0f4c81;
}

.diagram-title {
  fill: #0f172a;
  font-size: 17px;
  font-weight: 900;
}

.phantom-body {
  fill: #fff8ef;
  stroke: #d6a878;
  stroke-width: 4;
}

.breast-shape {
  fill: #ffe9d1;
  stroke: #c28a57;
  stroke-width: 3;
}

.diagram-tumor {
  fill: #15803d;
  stroke: #ffffff;
  stroke-width: 4;
}

.ghost-pair rect {
  fill: #cbd8e6;
  opacity: 0.52;
}

.antenna-stem {
  stroke: #334155;
  stroke-width: 5;
  stroke-linecap: round;
}

.antenna-box {
  stroke: #ffffff;
  stroke-width: 3;
}

.tx-box {
  fill: #f59e0b;
}

.rx-box {
  fill: #0f4c81;
}

.antenna text {
  fill: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.incident-path,
.s11-return {
  fill: none;
  stroke: #f59e0b;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 8 8;
}

.s21-path {
  fill: none;
  stroke: #0f4c81;
  stroke-width: 4;
  stroke-linecap: round;
}

.s11-arrow-head {
  fill: #f59e0b;
}

.s21-arrow-head {
  fill: #0f4c81;
}

.separation-arc {
  fill: none;
  stroke: #64748b;
  stroke-width: 2;
  stroke-dasharray: 4 5;
}

.diagram-micro-label {
  fill: #64748b;
  font-size: 12px;
  font-weight: 850;
}

.diagram-note {
  fill: #475569;
  font-size: 14px;
  font-weight: 800;
}

.diagram-legend {
  transform: translate(468px, 94px);
}

.legend-panel {
  fill: rgba(255, 255, 255, 0.94);
  stroke: #d7e1ec;
  stroke-width: 1.5;
}

.legend-title {
  fill: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.diagram-legend text {
  fill: #334155;
  font-size: 12.5px;
  font-weight: 760;
}

.legend-footnote {
  fill: #64748b;
  font-size: 11.5px;
  font-weight: 800;
}

.legend-s11,
.legend-s21,
.legend-rotation {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
}

.legend-s11 {
  stroke: #f59e0b;
  stroke-dasharray: 7 7;
}

.legend-s21 {
  stroke: #0f4c81;
}

.legend-rotation {
  stroke: #9ab9d6;
  stroke-dasharray: 5 7;
}

.legend-phantom {
  fill: #fff8ef;
  stroke: #d6a878;
  stroke-width: 2;
}

.legend-tumor {
  fill: #15803d;
  stroke: #ffffff;
  stroke-width: 1.5;
}

.stage-hero-image {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 420px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #f2f7fb;
}

.stage-hero-image.result {
  background: #ffffff;
}

.stage-hero-image img {
  width: 100%;
  height: 100%;
  max-height: 560px;
  object-fit: contain;
  display: block;
}

.raw-plot-frame {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 420px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
}

.raw-plot-frame img {
  width: 100%;
  height: 100%;
  max-height: 620px;
  object-fit: contain;
  display: block;
}

.raw-signal-card {
  display: grid;
  gap: 14px;
  min-height: 420px;
  align-content: center;
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fd 100%);
}

.raw-signal-card svg {
  width: 100%;
  display: block;
}

.raw-signal-frame {
  fill: #ffffff;
  stroke: #cbd8e6;
  stroke-width: 2;
}

.raw-axis {
  stroke: #d7e1ec;
  stroke-width: 2;
  stroke-dasharray: 8 8;
}

.raw-wave {
  fill: none;
  stroke: #0f4c81;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.raw-label {
  fill: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.raw-chip {
  fill: #0f4c81;
  font-size: 16px;
  font-weight: 900;
  text-transform: uppercase;
}

.raw-signal-note {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid #cbd8e6;
  background: #ffffff;
  color: var(--muted);
  line-height: 1.45;
}

.raw-signal-note strong {
  color: var(--text);
}

.raw-signal-note code {
  color: var(--accent);
  font-weight: 800;
}

.synthesis-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(280px, 1.05fr);
  gap: 16px;
  align-items: stretch;
}

.breast-map,
.synthesis-technical {
  display: grid;
  align-content: center;
  overflow: hidden;
  min-height: 420px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
}

.breast-map {
  padding: 18px;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 72%);
}

.breast-map svg {
  width: 100%;
  max-height: 420px;
  display: block;
}

.breast-outline {
  fill: #fffaf3;
  stroke: #d6a878;
  stroke-width: 4;
}

.breast-axis {
  stroke: #e8c9a8;
  stroke-width: 2;
  stroke-dasharray: 8 8;
}

.breast-center {
  fill: #b87945;
}

.tumor {
  stroke: #ffffff;
  stroke-width: 4;
  opacity: 0.92;
}

.tumor.true {
  fill: var(--success);
}

.tumor.pred {
  fill: var(--accent);
}

.tumor-error {
  stroke: #94a3b8;
  stroke-width: 4;
  stroke-linecap: round;
}

.breast-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
}

.breast-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.legend-dot.true {
  background: var(--success);
}

.legend-dot.pred {
  background: var(--accent);
}

.synthesis-technical {
  background: #f2f7fb;
}

.synthesis-technical img {
  width: 100%;
  height: 100%;
  max-height: 460px;
  object-fit: contain;
  display: block;
}

.stage-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
  align-items: stretch;
}

.stage-image-tile {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
}

.stage-image-tile img {
  width: 100%;
  height: 230px;
  object-fit: contain;
  display: block;
  background: #f2f7fb;
}

.stage-image-tile figcaption {
  display: grid;
  gap: 4px;
  padding: 12px;
}

.stage-image-tile figcaption strong {
  color: var(--text);
}

.stage-image-tile figcaption span {
  color: var(--muted);
  line-height: 1.4;
}

.probability-panel {
  display: grid;
  gap: 18px;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, #f4f8fc 100%);
}

.probability-score {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin: 0 auto;
  border-radius: 50%;
  border: 18px solid #cfe4f8;
  background: #ffffff;
  color: var(--accent);
  font-size: 3.2rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px var(--border), 0 14px 30px rgba(15, 23, 42, 0.10);
}

.decision-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  padding: 18px;
  border-radius: var(--radius-md);
  color: #ffffff;
}

.decision-banner.positive {
  background: linear-gradient(135deg, #0f4c81, #0f766e);
}

.decision-banner.negative {
  background: linear-gradient(135deg, #475569, #64748b);
}

.decision-banner span {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.decision-banner strong {
  font-size: 1.8rem;
}

.routing-diagram {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-areas:
    "source check"
    "yes no";
  gap: 16px;
}

.routing-node,
.routing-path {
  min-height: 160px;
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
}

.routing-node span,
.routing-path span {
  color: var(--muted);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.routing-node strong,
.routing-path strong {
  font-size: 1.55rem;
  line-height: 1.2;
}

.routing-node.source {
  grid-area: source;
  border-color: #9bc5e7;
  background: #eef7ff;
}

.routing-node.check {
  grid-area: check;
  border-color: #f1c37a;
  background: #fff7ed;
}

.routing-path.yes {
  grid-area: yes;
}

.routing-path.no {
  grid-area: no;
}

.routing-path.is-active {
  border-color: #86d39a;
  background: #ecfdf3;
  color: #14532d;
  box-shadow: 0 14px 28px rgba(21, 128, 61, 0.10);
}

.routing-path.is-muted {
  opacity: 0.55;
  background: #f8fafc;
}

.model-chip {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #bad3ea;
  background: #eef7ff;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 850;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.summary-strip.is-hidden {
  display: none;
}

.summary-item {
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.summary-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.summary-item strong {
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1.2;
  min-width: 0;
  overflow-wrap: anywhere;
}

.summary-item small {
  color: var(--muted);
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.focus-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 18px;
}

.focus-side {
  display: grid;
  gap: 20px;
}

.media-stage,
.verdict-panel,
.pipeline-panel,
.detail-card {
  background: var(--surface);
}

.media-viewer {
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #eef4f9;
  aspect-ratio: 16 / 10;
}

.media-viewer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f2f7fb;
}

.media-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.media-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #f7fbff;
  color: var(--muted);
  font-weight: 700;
  cursor: pointer;
}

.media-tab.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

.verdict-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.verdict-box {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  text-align: center;
}

.verdict-box span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.verdict-box strong {
  display: block;
  margin-top: 8px;
  font-size: 1.3rem;
}

.callout-text {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--muted);
  line-height: 1.55;
}

.pipeline-cards {
  display: grid;
  gap: 14px;
}

.pipeline-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.pipeline-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}

.pipeline-card-head h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.pipeline-card-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.metric-grid {
  display: grid;
  gap: 10px;
}

.metric-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e6edf5;
}

.metric-row:last-child {
  border-bottom: none;
}

.metric-key {
  flex: 0 1 42%;
  color: var(--muted);
  min-width: 0;
  overflow-wrap: anywhere;
}

.metric-value {
  flex: 1 1 58%;
  font-weight: 700;
  text-align: right;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.badge.success { background: var(--success); }
.badge.warning { background: var(--warning); color: #1f2937; }
.badge.danger { background: var(--danger); }
.badge.neutral { background: var(--neutral); }
.badge.accent { background: var(--accent); }

.inline-meter {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
}

.probability-rail {
  position: relative;
  height: 14px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #dbe3ec, #dbeafe 58%, #bfdbfe);
}

.probability-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f4c81, #0f766e);
}

.threshold-line,
.probability-marker {
  position: absolute;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 3px solid #ffffff;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
}

.threshold-line { background: #f59e0b; }
.probability-marker { background: var(--accent); }

.legend-row {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.location-viz {
  display: grid;
  gap: 12px;
}

.location-viz svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
}

.size-bars {
  display: grid;
  gap: 12px;
}

.size-bar-block {
  display: grid;
  gap: 8px;
}

.size-bar-block span {
  color: var(--muted);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.size-bar-rail {
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.size-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
}

.size-bar.true { background: var(--accent); }
.size-bar.pred { background: #0f766e; }

.characterization-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.characterization-diagram,
.characterization-side {
  min-height: 420px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: #ffffff;
}

.characterization-diagram {
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 16px;
}

.characterization-diagram svg {
  width: 100%;
  max-height: 300px;
  display: block;
}

.characterization-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
  min-width: 0;
}

.characterization-head strong {
  color: var(--text);
  font-size: 1.75rem;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.characterization-head small {
  color: var(--muted);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.direction-chip {
  max-width: 100%;
  padding: 7px 11px;
  border-radius: 999px;
  color: #1f2937;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.direction-chip.under {
  background: #fef3c7;
}

.direction-chip.over {
  background: #dbeafe;
}

.direction-chip.aligned {
  background: #dcfce7;
}

.characterization-side {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 18px;
  background: #f6fafc;
}

.character-tumor.true {
  fill: rgba(21, 128, 61, 0.14);
  stroke: var(--success);
  stroke-width: 4;
}

.character-tumor.pred {
  fill: rgba(15, 76, 129, 0.14);
  stroke: var(--accent);
  stroke-width: 4;
  stroke-dasharray: 8 7;
}

.diameter-line {
  stroke-width: 5;
  stroke-linecap: round;
}

.diameter-line.true {
  stroke: var(--success);
}

.diameter-line.pred {
  stroke: var(--accent);
}

.characterization-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.characterization-legend span {
  min-width: 0;
  overflow-wrap: anywhere;
}

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

.diameter-values div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #f8fbff;
}

.diameter-values span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  overflow-wrap: anywhere;
}

.diameter-values strong {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.direction-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
}

.direction-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  min-width: 0;
  overflow-wrap: anywhere;
}

.direction-card strong {
  color: var(--text);
  font-size: 2rem;
  line-height: 1.1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.direction-card small {
  color: var(--muted);
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.direction-card.under {
  border-color: #f0c77c;
  background: #fff8ec;
}

.direction-card.over {
  border-color: #9bc5e7;
  background: #eef7ff;
}

.direction-card.aligned {
  border-color: #8bd39b;
  background: #effdf4;
}

.empty-state {
  padding: 22px 16px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-strong);
  color: var(--muted);
  text-align: center;
  background: #fbfdff;
}

.empty-state strong,
.empty-state span {
  display: block;
}

.empty-state strong {
  margin-bottom: 6px;
  color: var(--text);
}

@media (max-width: 1360px) {
  .hero,
  .focus-layout,
  .workflow-workspace {
    grid-template-columns: 1fr;
  }

  .focus-selector {
    min-width: 0;
  }

  .workflow-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .workflow-step::after {
    display: none;
  }

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

@media (max-width: 980px) {
  .featured-grid,
  .detail-grid,
  .verdict-strip,
  .workflow-rail,
  .summary-strip,
  .gallery-grid,
  .case-card {
    grid-template-columns: 1fr;
  }

  .case-card {
    display: grid;
  }

  .case-thumb {
    min-height: 210px;
  }

  .stage-image-grid,
  .acquisition-visual-grid,
  .characterization-layout,
  .routing-diagram,
  .synthesis-layout {
    grid-template-columns: 1fr;
  }

  .routing-diagram {
    grid-template-areas:
      "source"
      "check"
      "yes"
      "no";
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 16px 16px 40px;
  }

  .hero,
  .panel {
    padding: 18px;
  }

  .panel-head,
  .featured-strip-header,
  .focus-topbar {
    display: grid;
  }

  .hero-side,
  .focus-selector {
    min-width: 0;
  }

  .workflow-visual-panel,
  .workflow-detail-panel {
    min-height: 0;
  }

  .workflow-visual,
  .stage-hero-image,
  .acquisition-method,
  .raw-plot-frame {
    min-height: 300px;
  }

  .probability-score {
    width: 150px;
    height: 150px;
    font-size: 2.4rem;
  }
}
