:root {
  color-scheme: light;
  --industrial-950: #15191f;
  --industrial-900: #1e232a;
  --industrial-800: #2a3038;
  --industrial-700: #444b55;
  --industrial-600: #5d6672;
  --industrial-500: #78828e;
  --industrial-300: #c5cbd2;
  --industrial-200: #dfe3e7;
  --industrial-100: #e8ebee;
  --industrial-050: #f6f7f8;
  --white: #ffffff;
  --ink: #171a1f;
  --orange: #ff5a00;
  --orange-dark: #c94700;
  --orange-soft: #fff1e8;
  --yellow: #ffc107;
  --yellow-soft: #fff8dc;
  --green: #18784b;
  --green-soft: #e9f6ef;
  --red: #bd2f2f;
  --red-soft: #fff0f0;
  --blue: #285f91;
  --blue-soft: #edf5fb;
  --shadow-sm: 0 1px 2px rgba(16, 24, 32, 0.08);
  --shadow-md: 0 8px 24px rgba(16, 24, 32, 0.12);
  --radius: 5px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --topbar-height: calc(64px + env(safe-area-inset-top));
}

* { box-sizing: border-box; }
:where([hidden]) { display: none !important; }

html { min-height: 100%; background: var(--industrial-900); }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--industrial-100);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.48; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

:focus-visible { outline: 3px solid rgba(231, 101, 24, 0.36); outline-offset: 2px; }

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  align-items: center;
  min-height: var(--topbar-height);
  padding: env(safe-area-inset-top) max(var(--space-4), env(safe-area-inset-right)) 0 max(var(--space-4), env(safe-area-inset-left));
  color: var(--white);
  background: var(--industrial-900);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar::after { position: absolute; right: 0; bottom: 0; left: 0; height: 2px; content: ""; background: linear-gradient(90deg, var(--orange) 0 150px, rgba(255,255,255,.12) 150px 100%); }

.back-command, .icon-button {
  display: inline-grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 6px;
  text-decoration: none;
}

.back-command:hover, .icon-button:hover { background: rgba(255, 255, 255, 0.08); }
.icon-button.dark { color: var(--industrial-700); }
.icon-button.dark:hover { background: var(--industrial-100); }

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
}

.brand-logo { width: 138px; height: auto; flex: 0 0 auto; object-fit: contain; }
.brand-module { display: flex; min-width: 0; flex-direction: column; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.2); line-height: 1.1; }

.brand-mark {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  background: var(--orange);
  border-radius: 6px;
}

.brand-mark i { width: 11px; height: 16px; border: 3px solid var(--white); border-width: 3px 0; transform: skew(-12deg); }
.brand span:last-child { display: flex; min-width: 0; flex-direction: column; line-height: 1.1; }
.brand small { color: #d5d9de; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.brand strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }

h1, h2, h3, .brand strong { font-family: Montserrat, "Arial Narrow", Arial, sans-serif; }

.identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-2);
  margin-left: auto;
  color: #d5d9de;
  font-size: 12px;
}
.identity > span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.offline-banner {
  position: sticky;
  z-index: 38;
  top: var(--topbar-height);
  padding: 10px var(--space-4);
  color: #332600;
  background: var(--yellow);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.workspace-tabs {
  position: sticky;
  z-index: 35;
  top: var(--topbar-height);
  display: flex;
  min-height: 56px;
  overflow-x: auto;
  align-items: stretch;
  gap: 2px;
  padding: 0 max(var(--space-3), env(safe-area-inset-right)) 0 max(var(--space-3), env(safe-area-inset-left));
  background: var(--white);
  border-bottom: 1px solid var(--industrial-200);
  scrollbar-width: none;
}
.offline-banner:not([hidden]) + .workspace-tabs { top: calc(var(--topbar-height) + 42px); }
.workspace-tabs::-webkit-scrollbar, .section-tabs::-webkit-scrollbar, .domain-filters::-webkit-scrollbar { display: none; }
.workspace-tabs button {
  display: flex;
  min-width: max-content;
  min-height: 56px;
  align-items: center;
  gap: 7px;
  padding: 0 var(--space-4);
  color: var(--industrial-600);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  font-weight: 700;
}
.workspace-tabs button svg { width: 18px; height: 18px; }
.workspace-tabs button b {
  min-width: 22px;
  padding: 2px 6px;
  color: var(--industrial-700);
  background: var(--industrial-100);
  border-radius: 10px;
  font-size: 11px;
}
.workspace-tabs button.active { color: var(--industrial-950); border-bottom-color: var(--orange); }
.workspace-tabs button.active b { color: var(--orange-dark); background: var(--orange-soft); }

.knowledge-shell {
  display: grid;
  min-height: calc(100vh - var(--topbar-height) - 57px);
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  align-items: stretch;
}

.capture-rail {
  position: sticky;
  top: calc(var(--topbar-height) + 57px);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: calc(100vh - var(--topbar-height) - 57px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--space-5);
  background: var(--industrial-050);
  border-right: 1px solid var(--industrial-200);
}

.rail-heading, .dialog-heading, .section-heading, .panel-toolbar, .global-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.rail-heading small, .global-heading small, .section-heading small, .extraction-summary small, .capture-heading__meta, .review-action-bar small {
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.rail-heading h1, .global-heading h1, .capture-header h2, .section-heading h3, .dialog-heading h3 {
  margin: 2px 0 0;
  color: var(--industrial-950);
  line-height: 1.15;
}
.rail-heading h1 { font-size: 22px; }
.rail-summary { margin: var(--space-3) 0; color: var(--industrial-600); font-size: 13px; }

.search-control {
  display: flex;
  min-width: 0;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 var(--space-3);
  color: var(--industrial-500);
  background: var(--white);
  border: 1px solid var(--industrial-300);
  border-radius: 6px;
}
.search-control:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(231, 101, 24, 0.12); }
.search-control svg { width: 19px; height: 19px; flex: 0 0 auto; }
.search-control input { min-width: 0; width: 100%; height: 44px; padding: 0; color: var(--ink); background: transparent; border: 0; outline: 0; }
.search-control.compact { flex: 1 1 280px; }

.site-scope-control {
  display: grid;
  gap: 6px;
  margin-bottom: var(--space-3);
}
.site-scope-control > span {
  color: var(--industrial-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.site-scope-control select {
  width: 100%;
  min-height: 44px;
  padding: 0 var(--space-3);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--industrial-300);
  border-radius: var(--radius);
  font: inherit;
}
.global-site-scope { max-width: 360px; margin: var(--space-4) 0; }

.capture-list { display: grid; width: 100%; max-width: 100%; min-width: 0; gap: var(--space-2); }
.capture-row {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  min-height: 108px;
  gap: 7px;
  padding: var(--space-4);
  color: var(--ink);
  text-align: left;
  background: var(--white);
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.capture-row > * { min-width: 0; max-width: 100%; }
.capture-row:hover { border-color: var(--industrial-300); }
.capture-row.active { border-color: var(--orange); box-shadow: inset 4px 0 0 var(--orange), var(--shadow-sm); }
.capture-row__top, .capture-row__facts { display: flex; min-width: 0; max-width: 100%; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2); }
.capture-row strong { display: -webkit-box; max-width: 100%; min-width: 0; overflow: hidden; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; white-space: normal; word-break: break-word; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.capture-row__facts { color: var(--industrial-600); font-size: 12px; }
.capture-row__facts span { min-width: 0; flex: 1 1 180px; overflow: hidden; overflow-wrap: anywhere; white-space: normal; word-break: break-word; }
.capture-row__facts time { max-width: 100%; flex: 0 0 auto; }
.capture-row__confidence { color: var(--industrial-700); font-variant-numeric: tabular-nums; font-weight: 800; }

.status-chip, .domain-chip, .signal-chip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  min-height: 26px;
  align-items: center;
  padding: 3px 9px;
  color: var(--industrial-700);
  background: var(--industrial-100);
  border: 1px solid var(--industrial-200);
  border-radius: 13px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: normal;
  word-break: break-word;
}
.status-chip.pending, .signal-chip.warning { color: #6a4d00; background: var(--yellow-soft); border-color: #eddc91; }
.status-chip.approved, .signal-chip.success { color: var(--green); background: var(--green-soft); border-color: #b8dfca; }
.status-chip.rejected, .signal-chip.danger { color: var(--red); background: var(--red-soft); border-color: #efc3c3; }
.status-chip.drafts, .signal-chip.info { color: var(--blue); background: var(--blue-soft); border-color: #bfd7e9; }
.status-chip.archived { color: var(--industrial-700); background: var(--industrial-100); border-color: var(--industrial-300); }

.workspace { min-width: 0; background: var(--white); }
.mobile-capture-back { display: none; }
.empty-state {
  display: grid;
  min-height: 540px;
  padding: var(--space-8);
  place-content: center;
  justify-items: center;
  color: var(--industrial-600);
  text-align: center;
}
.empty-state h2 { margin: var(--space-4) 0 var(--space-2); color: var(--ink); font-size: 24px; }
.empty-state p { max-width: 520px; margin: 0; }
.empty-symbol { display: grid; width: 64px; height: 64px; place-items: center; color: var(--orange); background: var(--orange-soft); border-radius: 8px; }
.empty-symbol svg { width: 32px; height: 32px; }

.capture-workspace { padding: 28px clamp(20px, 4vw, 56px) 112px; }
.capture-header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-6); }
.capture-heading { min-width: 0; }
.capture-heading__meta { display: flex; align-items: center; gap: var(--space-3); color: var(--industrial-600); }
.capture-header h2 { max-width: 900px; margin-top: var(--space-2); font-size: 30px; overflow-wrap: anywhere; }
.capture-header p { margin: var(--space-2) 0 0; color: var(--industrial-600); }
.confidence-block { display: flex; min-width: 92px; flex-direction: column; align-items: flex-end; padding-top: 4px; }
.confidence-block strong { color: var(--industrial-950); font-size: 28px; font-variant-numeric: tabular-nums; line-height: 1; }
.confidence-block span { margin-top: 5px; color: var(--industrial-600); font-size: 11px; font-weight: 700; }

.capture-facts {
  display: grid;
  margin-top: var(--space-6);
  padding: var(--space-4) 0;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  border-block: 1px solid var(--industrial-200);
}
.capture-fact { min-width: 0; padding: 0 var(--space-4); border-right: 1px solid var(--industrial-200); }
.capture-fact:first-child { padding-left: 0; }
.capture-fact:last-child { border-right: 0; }
.capture-fact span { display: block; color: var(--industrial-600); font-size: 11px; font-weight: 700; }
.capture-fact strong { display: block; overflow: hidden; margin-top: 4px; color: var(--industrial-900); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }

.capture-archive-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding: var(--space-4);
  background: var(--industrial-050);
  border: 1px solid var(--industrial-300);
  border-left: 4px solid var(--industrial-500);
  border-radius: var(--radius);
}
.capture-archive-control > div { min-width: 0; }
.capture-archive-control small { color: var(--orange-dark); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.capture-archive-control strong { display: block; margin-top: 3px; color: var(--ink); }
.capture-archive-control p { margin: 4px 0 0; color: var(--industrial-600); font-size: 12px; overflow-wrap: anywhere; }
.capture-archive-control button { flex: 0 0 auto; }

.extraction-summary { margin: var(--space-6) 0; padding: var(--space-5); background: var(--industrial-050); border-left: 4px solid var(--orange); }
.extraction-summary > div { display: flex; justify-content: space-between; gap: var(--space-4); }
.extraction-summary span { color: var(--industrial-600); font-size: 12px; font-weight: 700; }
.extraction-summary p { max-width: 1000px; margin: var(--space-3) 0 0; color: var(--industrial-800); line-height: 1.62; }

.section-tabs {
  position: sticky;
  z-index: 20;
  top: calc(var(--topbar-height) + 57px);
  display: flex;
  min-height: 52px;
  overflow-x: auto;
  align-items: stretch;
  gap: var(--space-1);
  margin: 0 calc(clamp(20px, 4vw, 56px) * -1);
  padding: 0 clamp(20px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.97);
  border-block: 1px solid var(--industrial-200);
  scrollbar-width: none;
}
.section-tabs button {
  min-width: max-content;
  padding: 0 var(--space-3);
  color: var(--industrial-600);
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  font-size: 13px;
  font-weight: 800;
}
.section-tabs button b { margin-left: 4px; color: var(--industrial-500); font-size: 11px; }
.section-tabs button.active { color: var(--industrial-950); border-bottom-color: var(--orange); }

.capture-search { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-5) 0 0; }
.capture-search .search-control { flex: 1; }
.capture-search > span { color: var(--industrial-600); font-size: 12px; }
.capture-search-results { margin-top: var(--space-3); padding: 0 var(--space-4); background: var(--industrial-050); border: 1px solid var(--industrial-200); border-radius: var(--radius); }
.section-panel { width: 100%; max-width: 100%; min-width: 0; min-height: 220px; overflow-x: hidden; padding-top: var(--space-6); }
.section-panel:not(.active) { display: none; }
.section-panel :where(p, strong, li, dd, dt) { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
.section-heading { align-items: flex-end; margin: 0 0 var(--space-4); }
.section-heading h3 { font-size: 20px; }
.section-heading > span { max-width: 460px; color: var(--industrial-600); font-size: 12px; text-align: right; }

.review-progress {
  display: grid;
  margin-bottom: var(--space-8);
  grid-template-columns: repeat(3, 1fr);
  background: var(--industrial-100);
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
  overflow: hidden;
}
.review-stage { position: relative; min-height: 82px; padding: var(--space-4) var(--space-5); border-right: 1px solid var(--industrial-200); }
.review-stage:last-child { border-right: 0; }
.review-stage span { display: block; color: var(--industrial-500); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.review-stage strong { display: block; margin-top: 5px; color: var(--industrial-700); }
.review-stage.complete { background: var(--green-soft); }
.review-stage.complete span, .review-stage.complete strong { color: var(--green); }
.review-stage.active { background: var(--orange-soft); box-shadow: inset 0 -4px 0 var(--orange); }
.review-stage.active span { color: var(--orange-dark); }

.domain-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-2); }
.domain-summary {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  color: var(--industrial-700);
  background: var(--industrial-050);
  border: 1px solid var(--industrial-200);
  border-radius: 6px;
}
.domain-summary strong { color: var(--industrial-950); font-size: 18px; }
.next-action { min-height: 78px; padding: var(--space-4) var(--space-5); background: var(--blue-soft); border-left: 4px solid var(--blue); }
.next-action strong { display: block; color: var(--industrial-900); }
.next-action p { margin: 5px 0 0; color: var(--industrial-600); }

.panel-toolbar { flex-wrap: wrap; align-items: stretch; margin-bottom: var(--space-3); }
.review-assist {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  padding: var(--space-4);
  background: var(--orange-soft);
  border: 1px solid #edb38e;
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
}
.review-assist > div { min-width: 0; }
.review-assist small, .review-assist strong, .review-assist span { display: block; }
.review-assist small { color: var(--orange-dark); font-size: 10px; font-weight: 800; letter-spacing: .06em; }
.review-assist strong { margin-top: 3px; color: var(--ink); }
.review-assist span { margin-top: 3px; color: var(--industrial-600); font-size: 12px; }
.review-assist .secondary-button { flex: 0 0 auto; }
.guided-batch-banner {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--orange) 9%, var(--white));
  border: 1px solid color-mix(in srgb, var(--orange) 46%, var(--industrial-200));
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
}
.guided-batch-banner[hidden] { display: none; }
.guided-batch-banner > div { min-width: 0; }
.guided-batch-banner > div:last-child {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.guided-batch-banner small,
.guided-batch-banner strong,
.guided-batch-banner span { display: block; }
.guided-batch-banner small {
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
}
.guided-batch-banner strong { margin-top: 3px; color: var(--ink); }
.guided-batch-banner span {
  max-width: 70ch;
  margin-top: 3px;
  color: var(--industrial-600);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.candidate-view-bar {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
}
.candidate-view-tabs {
  display: inline-flex;
  min-width: 0;
  overflow-x: auto;
  background: var(--industrial-100);
  border: 1px solid var(--industrial-200);
  border-radius: 6px;
  scrollbar-width: none;
}
.candidate-view-tabs::-webkit-scrollbar { display: none; }
.candidate-view-tabs button {
  display: inline-flex;
  min-width: max-content;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  color: var(--industrial-600);
  background: transparent;
  border: 0;
  border-right: 1px solid var(--industrial-200);
  font-size: 12px;
  font-weight: 800;
}
.candidate-view-tabs button:last-child { border-right: 0; }
.candidate-view-tabs button.active { color: var(--orange-dark); background: var(--white); box-shadow: inset 0 -3px 0 var(--orange); }
.candidate-view-tabs b {
  min-width: 22px;
  padding: 3px 6px;
  color: inherit;
  background: var(--industrial-200);
  border-radius: 11px;
  text-align: center;
}
.candidate-progress {
  display: grid;
  min-width: 170px;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 6px;
}
.candidate-progress strong { color: var(--ink); }
.candidate-progress > span { color: var(--industrial-600); font-size: 12px; }
.candidate-progress i {
  display: block;
  height: 5px;
  grid-column: 1 / -1;
  margin-top: 5px;
  overflow: hidden;
  background: var(--industrial-200);
  border-radius: 3px;
}
.candidate-progress i span { display: block; height: 100%; background: var(--orange); }
select, input, textarea {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--industrial-300);
  border-radius: 6px;
}
select { min-height: 48px; padding: 0 38px 0 12px; }
textarea, input { padding: 11px 12px; }
textarea { width: 100%; resize: vertical; }

.primary-button, .secondary-button, .danger-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0 var(--space-4);
  border-radius: 6px;
  font-weight: 800;
}
.primary-button { color: var(--white); background: var(--orange); border: 1px solid var(--orange); }
.primary-button:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.secondary-button { color: var(--industrial-800); background: var(--white); border: 1px solid var(--industrial-300); }
.secondary-button:hover { background: var(--industrial-050); border-color: var(--industrial-500); }
.danger-button { color: var(--red); background: var(--white); border: 1px solid #e2aaaa; }
.icon-label svg { width: 18px; height: 18px; }
.load-more { width: 100%; margin-top: var(--space-3); }

.domain-filters { display: flex; overflow-x: auto; gap: var(--space-2); padding: 2px 0 var(--space-4); scrollbar-width: none; }
.domain-filters button { min-width: max-content; min-height: 38px; padding: 0 13px; color: var(--industrial-600); background: var(--industrial-050); border: 1px solid var(--industrial-200); border-radius: 19px; font-size: 12px; font-weight: 800; }
.domain-filters button.active { color: var(--orange-dark); background: var(--orange-soft); border-color: #edb38e; }

.candidate-list, .issue-list { display: grid; width: 100%; max-width: 100%; min-width: 0; gap: var(--space-2); }
.candidate {
  position: relative;
  display: grid;
  min-height: 92px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--white);
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.candidate[data-decision="Accepted"] { border-left: 4px solid var(--green); }
.candidate[data-decision="Corrected"] { border-left: 4px solid var(--blue); }
.candidate[data-decision="Rejected"] { border-left: 4px solid var(--red); }
.candidate[data-decision="Merged"], .candidate[data-decision="Split"] { border-left: 4px solid var(--yellow); }
.candidate-select { display: grid; width: 44px; height: 44px; place-items: center; }
.candidate-select input { width: 22px; height: 22px; accent-color: var(--orange); }
.candidate-main { min-width: 0; }
.candidate-title { display: flex; min-width: 0; flex-wrap: wrap; align-items: center; gap: 7px; }
.candidate-title strong { max-width: 100%; overflow-wrap: anywhere; font-size: 15px; }
.candidate-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 7px; color: var(--industrial-600); font-size: 12px; }
.candidate-open { display: grid; width: 48px; height: 48px; place-items: center; color: var(--industrial-600); background: transparent; border: 0; border-radius: 6px; }
.candidate-open:hover { color: var(--orange-dark); background: var(--orange-soft); }
.domain-chip { color: var(--blue); background: var(--blue-soft); border-color: #c9ddec; text-transform: capitalize; }
.inference-chip { color: #6a4d00; font-size: 11px; font-weight: 800; }

.evidence-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--space-3); }
.evidence-card {
  display: grid;
  min-height: 144px;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-3);
  padding: var(--space-4);
  color: var(--ink);
  text-align: left;
  background: var(--white);
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.evidence-card:hover { border-color: var(--orange); }
.evidence-card__type { display: flex; align-items: center; justify-content: space-between; color: var(--industrial-600); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.evidence-card strong { overflow-wrap: anywhere; }
.evidence-card__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); color: var(--industrial-600); font-size: 12px; }

.issue {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: var(--space-4) var(--space-5);
  background: var(--yellow-soft);
  border: 1px solid #ead98c;
  border-left: 4px solid var(--yellow);
  border-radius: var(--radius);
}
.issue[data-severity="high"], .issue[data-severity="critical"] { background: var(--red-soft); border-color: #e9bebe; border-left-color: var(--red); }
.issue__heading { display: flex; width: 100%; max-width: 100%; min-width: 0; flex-wrap: wrap; align-items: flex-start; justify-content: flex-start; gap: var(--space-2); }
.issue__heading > * { min-width: 0; }
.issue p { width: 100%; max-width: 100%; min-width: 0; margin: var(--space-2) 0 0; color: var(--industrial-700); overflow-wrap: anywhere; white-space: normal; word-break: break-word; }
.issue-controls { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.issue-rationale {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  flex: 1 1 auto;
  overflow: hidden;
  overflow-wrap: anywhere;
  resize: none;
  text-overflow: ellipsis;
  white-space: pre-wrap;
  word-break: break-word;
}
.issue-rationale:focus,
.issue-rationale.expanded {
  height: auto;
  max-height: none;
  field-sizing: content;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}

.lazy-state, .empty-message { padding: 40px var(--space-5); color: var(--industrial-600); background: var(--industrial-050); text-align: center; }
.preview-summary, .graph-stats, .diff-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: var(--space-2); margin-bottom: var(--space-5); }
.metric {
  min-height: 78px;
  padding: var(--space-3) var(--space-4);
  background: var(--industrial-050);
  border: 1px solid var(--industrial-200);
  border-radius: 6px;
}
.metric span { display: block; color: var(--industrial-600); font-size: 11px; font-weight: 700; }
.metric strong { display: block; margin-top: 4px; color: var(--industrial-950); font-size: 23px; }
.metric--attention { border-color: color-mix(in srgb, var(--yellow) 68%, var(--industrial-200)); }
.metric--attention strong { color: var(--orange-dark); }
.graph-health {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}
.graph-health span {
  min-height: 36px;
  padding: 8px 12px;
  color: var(--industrial-700);
  background: var(--industrial-050);
  border: 1px solid var(--industrial-200);
  border-radius: 999px;
  font-size: 12px;
}
.graph-health strong { color: var(--ink); }
.graph-health .healthy { color: var(--green); }
.graph-health .attention { color: var(--red); }
.graph-browser,
.preview-graph-browser,
.graph-result-layout,
.preview-graph-layout,
.graph-result-list,
.graph-focus-slot,
.graph-entity-list,
.graph-focus,
.graph-local-view,
.graph-expert-view {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.graph-browser,
.preview-graph-browser { overflow-x: hidden; }
.graph-section-heading {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.graph-section-heading > * { min-width: 0; }
.graph-section-heading small {
  display: block;
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.graph-section-heading h2 { margin: 2px 0 0; font-size: 20px; overflow-wrap: anywhere; }
.graph-section-heading > span { color: var(--industrial-600); font-size: 12px; white-space: nowrap; }
.text-button {
  min-height: 44px;
  padding: 0 var(--space-3);
  color: var(--orange-dark);
  background: transparent;
  border: 0;
  font-weight: 800;
}
.graph-category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.graph-category-card {
  display: grid;
  min-width: 0;
  min-height: 108px;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: start;
  gap: var(--space-2);
  padding: var(--space-3);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
  text-align: left;
}
.graph-category-card:hover,
.graph-category-card:focus-visible,
.graph-category-card.active {
  border-color: var(--orange);
  box-shadow: inset 0 3px 0 var(--orange);
}
.graph-category-card__atom {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  background: var(--node-color);
  border: 3px solid color-mix(in srgb, var(--node-color) 45%, white);
  border-radius: 50%;
}
.graph-category-card strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.graph-category-card small { display: block; margin-top: 4px; color: var(--industrial-600); font-size: 11px; line-height: 1.35; }
.graph-category-card b { color: var(--industrial-500); font-size: 13px; }
.graph-result-layout {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  gap: var(--space-5);
  align-items: start;
}
.graph-entity-list { display: grid; gap: var(--space-2); }
.graph-entity-card {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 76px;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
  text-align: left;
}
.graph-entity-card:hover,
.graph-entity-card:focus-visible,
.graph-entity-card.selected { border-color: var(--orange); }
.graph-entity-card.selected { box-shadow: inset 4px 0 0 var(--orange); }
.graph-entity-card__atom,
.graph-focus__atom {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: color-mix(in srgb, var(--node-color) 82%, var(--industrial-950));
  border: 2px solid color-mix(in srgb, var(--node-color) 60%, white);
  border-radius: 50%;
  font: 800 11px/1 Montserrat, Arial, sans-serif;
}
.graph-entity-card__copy { min-width: 0; }
.graph-entity-card__copy small,
.graph-focus__heading small { color: var(--orange-dark); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.graph-entity-card__copy strong { display: block; margin: 2px 0; overflow-wrap: anywhere; }
.graph-entity-card__copy > span { color: var(--industrial-600); font-size: 11px; overflow-wrap: anywhere; }
.graph-entity-card__arrow { color: var(--industrial-500); font-size: 25px; }
.graph-focus {
  min-width: 0;
  overflow: hidden;
  background: var(--industrial-050);
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
}
.graph-focus__heading {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--white);
  border-bottom: 1px solid var(--industrial-200);
}
.graph-focus__atom { width: 56px; height: 56px; font-size: 13px; }
.graph-focus__heading h2 { margin: 3px 0; font-size: 21px; overflow-wrap: anywhere; }
.graph-focus__heading p { margin: 0; color: var(--industrial-600); font-size: 12px; }
.graph-relationship-list { padding: var(--space-4) var(--space-5); }
.graph-relationship-list h3 { margin: 0 0 var(--space-3); font-size: 15px; }
.graph-relationship-list ul { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.graph-relationship-list li {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(100px, 0.65fr) minmax(140px, 1fr) auto;
  gap: var(--space-2);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--industrial-200);
}
.graph-relationship-list li > * { min-width: 0; }
.graph-relationship-list li span { color: var(--orange-dark); font-size: 11px; font-weight: 800; overflow-wrap: anywhere; }
.graph-relationship-list li strong { font-size: 12px; overflow-wrap: anywhere; }
.graph-relationship-list li small { color: var(--industrial-500); font-size: 10px; }
.graph-relationship-list .graph-relationship-empty { display: block; color: var(--industrial-600); }
.graph-expert-view {
  width: 100%;
  min-width: 0;
  padding: 0 var(--space-5) var(--space-5);
  border-top: 1px solid var(--industrial-200);
}
.graph-expert-view > summary {
  min-height: 52px;
  padding-top: 17px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}
.graph-expert-view > p { margin: 0 0 var(--space-3); color: var(--industrial-600); font-size: 12px; }
.graph-expert-view--global {
  margin-top: var(--space-6);
  padding-top: 0;
  background: var(--industrial-050);
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
}
.graph-expert-view--global > summary,
.graph-expert-view--global > p { margin-inline: var(--space-5); }
.preview-graph-browser {
  min-width: 0;
  margin-top: var(--space-6);
  padding: var(--space-5);
  background: var(--industrial-050);
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
}
.preview-graph-search {
  width: 100%;
  margin-bottom: var(--space-3);
  background: var(--white);
}
.preview-graph-filters {
  display: flex;
  width: 100%;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  overflow-x: auto;
  scrollbar-width: none;
}
.preview-graph-filter {
  display: inline-flex;
  min-width: max-content;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  color: var(--industrial-700);
  background: var(--white);
  border: 1px solid var(--industrial-200);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}
.preview-graph-filter.active {
  color: var(--ink);
  border-color: var(--orange);
  box-shadow: inset 0 -3px 0 var(--orange);
}
.preview-graph-filter b { color: var(--industrial-500); font-size: 11px; }
.preview-graph-filter__atom {
  width: 12px;
  height: 12px;
  background: var(--node-color);
  border: 2px solid color-mix(in srgb, var(--node-color) 55%, white);
  border-radius: 50%;
}
.preview-graph-layout {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(280px, 0.8fr) minmax(360px, 1.2fr);
  align-items: start;
  gap: var(--space-5);
}
.preview-graph-focus-slot { min-width: 0; }
.preview-graph-limit {
  margin: var(--space-3) 0 0;
  color: var(--industrial-600);
  font-size: 12px;
}
.preview-graph-back {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin: 0 0 var(--space-3);
  padding: 0 var(--space-2);
  color: var(--orange-dark);
  background: transparent;
  border: 0;
  font-weight: 800;
}
.graph-focus-placeholder {
  display: grid;
  min-height: 280px;
  place-items: center;
  align-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
  color: var(--industrial-600);
  background: var(--white);
  border: 1px dashed var(--industrial-300);
  border-radius: var(--radius);
  text-align: center;
}
.graph-focus-placeholder__atom {
  width: 58px;
  height: 58px;
  background: color-mix(in srgb, var(--orange) 28%, var(--industrial-100));
  border: 3px solid var(--orange);
  border-radius: 50%;
}
.graph-focus-placeholder strong { color: var(--ink); }
.graph-focus-placeholder p { max-width: 340px; margin: 0; font-size: 12px; }
.graph-focus__action { padding: 0 var(--space-5) var(--space-5); }
.graph-local-view {
  width: 100%;
  min-width: 0;
  padding: 0 var(--space-5) var(--space-5);
  border-top: 1px solid var(--industrial-200);
}
.graph-local-view > summary {
  min-height: 52px;
  padding-top: 17px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}
.graph-local-view > p { margin: 0 0 var(--space-3); color: var(--industrial-600); font-size: 12px; }
.local-molecule-slot { width: 100%; min-width: 0; }
.local-molecule {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in srgb, var(--orange) 9%, transparent), transparent 45%),
    radial-gradient(circle, color-mix(in srgb, var(--industrial-500) 15%, transparent) 1px, transparent 1.5px),
    var(--white);
  background-size: auto, 22px 22px, auto;
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
}
.local-molecule__heading {
  display: flex;
  min-width: 0;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: color-mix(in srgb, var(--white) 94%, transparent);
  border-bottom: 1px solid var(--industrial-200);
}
.local-molecule__heading > div { min-width: 0; }
.local-molecule__heading small { display: block; color: var(--orange-dark); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.local-molecule__heading strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.local-molecule__heading > span { min-width: max-content; color: var(--industrial-600); font-size: 11px; }
.local-molecule__canvas {
  display: block;
  width: 100%;
  height: auto;
  min-height: 250px;
  overflow: hidden;
  fill: none;
  stroke: none;
  touch-action: manipulation;
}
.local-molecule__bond {
  opacity: 0.88;
  stroke: var(--orange);
  stroke-width: 5;
  vector-effect: non-scaling-stroke;
}
.local-molecule__bond--approved { stroke: var(--green); }
.local-molecule__node { cursor: pointer; outline: none; }
.local-molecule__hit,
.molecular-node__hit {
  fill: transparent;
  stroke: none;
  pointer-events: all;
}
.local-molecule__atom {
  fill: color-mix(in srgb, var(--node-color) 82%, var(--industrial-950));
  stroke: color-mix(in srgb, var(--node-color) 68%, white);
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
}
.local-molecule__node text {
  fill: #fff;
  stroke: none;
  font: 800 15px/1 Montserrat, Arial, sans-serif;
  letter-spacing: 0.2px;
  pointer-events: none;
}
.local-molecule__node.selected .local-molecule__atom,
.local-molecule__node:hover .local-molecule__atom,
.local-molecule__node:focus-visible .local-molecule__atom {
  stroke: #fff;
  stroke-width: 7;
  filter: drop-shadow(0 0 9px color-mix(in srgb, var(--node-color) 65%, transparent));
}
.local-molecule__attention {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 4;
  stroke-dasharray: 6 4;
  vector-effect: non-scaling-stroke;
}
.local-molecule__legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4);
  color: var(--industrial-600);
  background: var(--white);
  border-top: 1px solid var(--industrial-200);
  font-size: 11px;
}
.local-molecule__legend span { display: inline-flex; align-items: center; gap: 6px; }
.graph-expert-view--preview {
  margin-top: var(--space-5);
  padding-top: 0;
  background: var(--industrial-050);
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
}
.graph-expert-view--preview > summary,
.graph-expert-view--preview > p { margin-inline: var(--space-5); }
.change-section { margin-top: var(--space-5); }
.change-section h4 { margin: 0 0 var(--space-2); font-size: 15px; text-transform: capitalize; }
.change-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-3) 0; border-top: 1px solid var(--industrial-200); }
.change-row > span { color: var(--industrial-600); font-size: 12px; font-weight: 800; text-transform: capitalize; }
.change-row strong, .change-row p { overflow-wrap: anywhere; }
.change-row p { margin: 3px 0 0; color: var(--industrial-600); font-size: 12px; }

.molecular-graph-slot { width: 100%; min-width: 0; margin-top: var(--space-5); }
.molecular-graph {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  background: var(--industrial-050);
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
}
.molecular-toolbar {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--white);
  border-bottom: 1px solid var(--industrial-200);
}
.molecular-toolbar > div:first-child { min-width: 0; }
.molecular-toolbar strong { display: block; color: var(--ink); font-family: Montserrat, Arial, sans-serif; }
.molecular-toolbar span { display: block; margin-top: 2px; color: var(--industrial-600); font-size: 12px; }
.molecular-zoom { display: inline-flex; flex: 0 0 auto; overflow: hidden; border: 1px solid var(--industrial-300); border-radius: 6px; }
.molecular-zoom button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 11px;
  color: var(--ink);
  background: var(--white);
  border: 0;
  border-right: 1px solid var(--industrial-300);
  font-weight: 800;
}
.molecular-zoom button:last-child { border-right: 0; }
.molecular-zoom button:active { color: var(--white); background: var(--orange); }
.molecular-viewport {
  position: relative;
  width: 100%;
  height: clamp(430px, 56vw, 650px);
  overflow: hidden;
  cursor: grab;
  background:
    radial-gradient(circle at 50% 46%, color-mix(in srgb, var(--orange) 7%, transparent), transparent 42%),
    radial-gradient(circle, color-mix(in srgb, var(--industrial-500) 17%, transparent) 1px, transparent 1.5px),
    var(--industrial-050);
  background-size: auto, 24px 24px, auto;
  user-select: none;
}
.molecular-viewport.dragging { cursor: grabbing; }
.molecular-canvas {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  stroke: none;
  touch-action: none;
}
.molecular-edge { vector-effect: non-scaling-stroke; }
.molecular-edge--group {
  opacity: 0.24;
  stroke: var(--edge-color);
  stroke-width: 1.3;
  stroke-dasharray: 3 7;
}
.molecular-edge--proposed,
.molecular-edge--approved {
  opacity: 0.9;
  stroke: var(--orange);
  stroke-width: 3;
}
.molecular-edge--approved { stroke: var(--green); }
.molecular-hub circle {
  fill: color-mix(in srgb, var(--node-color) 72%, var(--industrial-950));
  stroke: color-mix(in srgb, var(--node-color) 80%, white);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.molecular-hub__symbol,
.molecular-node__symbol {
  fill: #ffffff;
  stroke: none;
  font: 800 13px/1 Montserrat, Arial, sans-serif;
  letter-spacing: 0.3px;
  pointer-events: none;
}
.molecular-hub__symbol { font-size: 17px; }
.molecular-hub__label,
.molecular-node__label {
  fill: var(--industrial-700);
  stroke: none;
  font: 800 12px/1 Inter, Arial, sans-serif;
  paint-order: stroke;
  stroke: var(--industrial-050);
  stroke-width: 4px;
  stroke-linejoin: round;
  pointer-events: none;
}
.molecular-node { cursor: pointer; outline: none; }
.molecular-node__atom {
  fill: color-mix(in srgb, var(--node-color) 82%, var(--industrial-950));
  stroke: color-mix(in srgb, var(--node-color) 88%, white);
  stroke-width: 2;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.2));
  vector-effect: non-scaling-stroke;
  transition: filter 140ms ease, stroke-width 140ms ease;
}
.molecular-node__issue {
  fill: none;
  stroke: var(--yellow);
  stroke-width: 3;
  stroke-dasharray: 4 3;
  vector-effect: non-scaling-stroke;
}
.molecular-node:hover .molecular-node__atom,
.molecular-node:focus-visible .molecular-node__atom,
.molecular-node.selected .molecular-node__atom {
  stroke: #ffffff;
  stroke-width: 5;
  filter: drop-shadow(0 0 10px color-mix(in srgb, var(--node-color) 72%, transparent));
}
.molecular-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4);
  color: var(--industrial-600);
  background: var(--white);
  border-top: 1px solid var(--industrial-200);
  border-bottom: 1px solid var(--industrial-200);
  font-size: 11px;
}
.molecular-legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-atom { width: 11px; height: 11px; background: var(--orange); border: 2px solid color-mix(in srgb, var(--orange) 60%, white); border-radius: 50%; }
.legend-line { width: 25px; height: 0; border-top: 3px solid var(--orange); }
.legend-line--approved { border-top-color: var(--green); }
.legend-line--group { opacity: 0.7; border-top: 2px dashed var(--industrial-500); }
.legend-review { width: 13px; height: 13px; border: 2px dashed var(--yellow); border-radius: 50%; }
.molecular-detail {
  min-height: 118px;
  padding: var(--space-4);
  color: var(--industrial-700);
  background: var(--white);
}
.molecular-detail > div { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-bottom: var(--space-2); }
.molecular-detail .domain-chip { border-left: 3px solid var(--chip-color); }
.molecular-detail > strong { display: block; color: var(--ink); font-size: 17px; overflow-wrap: anywhere; }
.molecular-detail p { margin: 5px 0 0; color: var(--industrial-600); }
.molecular-detail ul { display: grid; gap: 4px; margin: var(--space-2) 0 0; padding: 0; list-style: none; }
.molecular-detail li { color: var(--industrial-700); font-size: 12px; overflow-wrap: anywhere; }
.molecular-detail li span { margin-right: 5px; color: var(--orange-dark); font-weight: 800; }
.graph-change-details {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: var(--space-4);
  overflow: hidden;
  padding: 0 var(--space-4) var(--space-4);
  background: var(--industrial-050);
  border: 1px solid var(--industrial-200);
  border-radius: var(--radius);
}
.graph-change-details summary {
  min-height: 52px;
  padding-top: 16px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.activity-timeline { position: relative; display: grid; gap: 0; margin-bottom: var(--space-8); }
.activity-entry { position: relative; display: grid; min-height: 72px; grid-template-columns: 112px 18px minmax(0, 1fr); gap: var(--space-3); padding: var(--space-3) 0; }
.activity-entry time { color: var(--industrial-600); font-size: 11px; }
.activity-entry i { position: relative; width: 12px; height: 12px; margin-top: 3px; background: var(--orange); border: 3px solid var(--orange-soft); border-radius: 50%; }
.activity-entry i::after { content: ""; position: absolute; top: 10px; left: 2px; width: 2px; height: 55px; background: var(--industrial-200); }
.activity-entry:last-child i::after { display: none; }
.activity-entry strong { display: block; text-transform: capitalize; }
.activity-entry p { margin: 4px 0 0; color: var(--industrial-600); }

.comments-list { display: grid; gap: var(--space-2); }
.review-comment-entry { padding: var(--space-3) var(--space-4); background: var(--industrial-050); border-left: 3px solid var(--industrial-300); }
.review-comment-entry span, .review-comment-entry small { color: var(--industrial-600); font-size: 11px; }
.review-comment-entry p { margin: 5px 0; }
.comment-composer { display: flex; align-items: stretch; gap: var(--space-2); margin-top: var(--space-3); }
.comment-composer label { flex: 1; }
.technical-details { width: 100%; max-width: 100%; min-width: 0; margin-top: var(--space-6); overflow: hidden; padding: var(--space-3) var(--space-4); color: var(--industrial-600); background: var(--industrial-050); border: 1px solid var(--industrial-200); }
.technical-details summary { min-height: 40px; padding-top: 9px; cursor: pointer; font-weight: 700; }
.technical-details pre {
  width: 100%;
  max-width: 100%;
  margin: var(--space-2) 0 0;
  overflow-x: hidden;
  padding: var(--space-3);
  color: var(--industrial-700);
  background: var(--white);
  border: 1px solid var(--industrial-200);
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  word-break: break-word;
}
.technical-details dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; }
.technical-details dt { font-weight: 700; }
.technical-details dd { margin: 0; overflow-wrap: anywhere; }

.review-action-bar {
  position: fixed;
  z-index: 30;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  display: flex;
  min-width: min(520px, calc(100vw - 380px));
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  color: var(--white);
  background: var(--industrial-900);
  border: 1px solid var(--industrial-700);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.review-action-bar small { color: #d9a27f; }
.review-action-bar strong { display: block; margin-top: 2px; }

.global-workspace { padding: 36px clamp(20px, 5vw, 72px); grid-column: 1 / -1; }
.global-heading h1 { font-size: 30px; }
.global-heading p { max-width: 700px; margin: var(--space-2) 0 0; color: var(--industrial-600); }
.global-search { width: min(720px, 100%); margin: var(--space-6) 0; }
.global-search-row { justify-content: flex-start; align-items: stretch; }
.global-search-row .global-search { margin: var(--space-6) 0; }
.global-search-row select { align-self: center; }
.global-content { max-width: 1100px; }
.search-result {
  display: grid;
  gap: 6px;
  padding: var(--space-4) 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--industrial-200);
}
.search-result__top { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.search-result p { margin: 0; color: var(--industrial-600); }
.search-result small { color: var(--industrial-500); }

dialog {
  max-width: 100vw;
  padding: 0;
  color: var(--ink);
  background: var(--white);
  border: 0;
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
}
dialog::backdrop { background: rgba(16, 19, 23, 0.68); backdrop-filter: blur(2px); }
.side-dialog { width: min(680px, 100vw); height: 100vh; max-height: 100vh; margin: 0 0 0 auto; border-radius: 0; }
.evidence-dialog { width: min(1120px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.action-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); }
.dialog-heading { position: sticky; z-index: 2; top: 0; min-height: calc(72px + env(safe-area-inset-top)); padding: calc(var(--space-3) + env(safe-area-inset-top)) var(--space-5) var(--space-3); background: var(--white); border-bottom: 1px solid var(--industrial-200); }
.dialog-heading small { color: var(--orange-dark); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.dialog-heading h3 { font-size: 20px; }
.dialog-body, .action-dialog form { max-width: 100%; min-width: 0; padding: var(--space-5); overflow-x: hidden; }
.action-dialog form { max-height: calc(100vh - 24px); overflow-y: auto; }
.action-dialog .dialog-heading { margin: calc(var(--space-5) * -1) calc(var(--space-5) * -1) var(--space-4); }
.action-dialog label { display: grid; gap: 6px; margin-top: var(--space-4); }
.action-dialog label > span, .action-dialog legend { color: var(--industrial-700); font-size: 12px; font-weight: 800; }
.action-dialog input, .action-dialog select { width: 100%; min-height: 48px; }
.action-dialog fieldset { margin: var(--space-4) 0 0; padding: 0; border: 0; }
.compact-dialog { width: min(520px, calc(100vw - 24px)); }
.archive-guarantees { display: grid; gap: 6px; margin: var(--space-4) 0 0; padding-left: 20px; color: var(--industrial-700); font-size: 13px; }
.duplicate-consolidation-action {
  margin-bottom: var(--space-5);
  padding: var(--space-4);
  background: color-mix(in srgb, var(--orange) 9%, var(--white));
  border: 1px solid color-mix(in srgb, var(--orange) 48%, var(--industrial-200));
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
}
.duplicate-consolidation-heading {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.duplicate-consolidation-heading > div { min-width: 0; }
.duplicate-consolidation-heading small {
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
}
.duplicate-consolidation-heading h4 {
  margin-top: 4px;
  color: var(--ink);
  font-size: 18px;
  overflow-wrap: anywhere;
}
.duplicate-consolidation-heading > strong {
  flex: 0 0 auto;
  color: var(--orange-dark);
  font-size: 28px;
  line-height: 1;
}
.duplicate-consolidation-action > p {
  margin: var(--space-3) 0;
  color: var(--industrial-700);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.duplicate-consolidation-action ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 19px;
  color: var(--industrial-700);
  font-size: 12px;
}
.duplicate-consolidation-action .dialog-action {
  width: 100%;
  margin-top: var(--space-4);
}
.dialog-status {
  margin-top: var(--space-3);
  padding: var(--space-3);
  color: var(--industrial-800);
  background: var(--industrial-100);
  border-left: 3px solid var(--blue);
  font-size: 12px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.dialog-status.error {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 8%, var(--white));
  border-left-color: var(--red);
}
.dialog-status.processing { border-left-color: var(--orange); }
.suggestion-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-2);
}
.suggestion-summary > div {
  min-width: 0;
  padding: var(--space-3);
  background: var(--industrial-100);
  border: 1px solid var(--industrial-200);
  border-radius: 6px;
}
.suggestion-summary span { display: block; color: var(--industrial-600); font-size: 11px; }
.suggestion-summary strong { display: block; margin-top: 4px; color: var(--ink); font-size: 24px; }
.suggestion-explainer { color: var(--industrial-600); font-size: 13px; }
.review-batches {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--industrial-200);
}
.review-batch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-3);
}
.review-batch-card {
  display: flex;
  min-width: 0;
  min-height: 280px;
  flex-direction: column;
  padding: var(--space-4);
  background: var(--industrial-050);
  border: 1px solid var(--industrial-200);
  border-top: 3px solid var(--industrial-400);
  border-radius: var(--radius);
}
.review-batch-card[data-batch="ready_for_confirmation"] { border-top-color: var(--green); }
.review-batch-card[data-batch="needs_correction"] { border-top-color: var(--orange); }
.review-batch-card[data-batch="manual_review"] { border-top-color: var(--yellow); }
.review-batch-card > div:first-child {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}
.review-batch-card small {
  color: var(--industrial-600);
  font-size: 11px;
  font-weight: 800;
}
.review-batch-card > div > strong {
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
}
.review-batch-card > p {
  min-height: 54px;
  color: var(--industrial-700);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.review-batch-card ul {
  display: grid;
  gap: 6px;
  margin: 0 0 var(--space-4);
  padding: 0;
  list-style: none;
}
.review-batch-card li {
  min-width: 0;
  color: var(--industrial-700);
  font-size: 11px;
  overflow-wrap: anywhere;
}
.review-batch-card li span {
  display: inline-block;
  margin-right: 6px;
  color: var(--orange-dark);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.review-batch-card li small { white-space: nowrap; }
.review-batch-card > button {
  width: 100%;
  margin-top: auto;
}
.classification-suggestions { margin-top: var(--space-4); }
.classification-suggestions h4 { margin-bottom: var(--space-2); }
.classification-suggestions article {
  padding: var(--space-3);
  background: var(--yellow-soft);
  border-left: 3px solid var(--yellow);
}
.classification-suggestions article + article { margin-top: var(--space-2); }
.classification-suggestions article p { margin: 4px 0; color: var(--industrial-700); }
.classification-suggestions article span { color: var(--industrial-600); font-size: 12px; }
.classification-suggestions article > div { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-3); }
.classification-suggestions article .secondary-button { min-height: 44px; }
.dialog-action { width: 100%; margin-top: var(--space-5); }
.dialog-section { padding: var(--space-5) 0; border-bottom: 1px solid var(--industrial-200); }
.dialog-section:first-child { padding-top: 0; }
.dialog-section h4 { margin: 0 0 var(--space-3); font-size: 15px; }
.dialog-section p { color: var(--industrial-700); overflow-wrap: anywhere; }
.dialog-section pre { max-height: 300px; overflow: auto; padding: var(--space-3); background: var(--industrial-950); color: #e7eaee; border-radius: 6px; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.trace-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.trace-list li { padding: var(--space-2) var(--space-3); background: var(--industrial-050); border-left: 3px solid var(--orange); }
.trace-list button { min-height: 44px; padding: 0; color: var(--blue); background: transparent; border: 0; font-weight: 700; text-align: left; }
.trace-evidence button { display: flex; width: 100%; min-width: 0; align-items: center; gap: var(--space-3); }
.trace-evidence__thumbnail { display: block; width: 76px; height: 58px; flex: 0 0 auto; object-fit: cover; background: var(--industrial-200); border: 1px solid var(--industrial-300); border-radius: 4px; }
.trace-evidence__label { min-width: 0; overflow-wrap: anywhere; }
.trace-evidence > p { margin: var(--space-2) 0 0; }
.decision-controls { display: grid; gap: var(--space-3); }
.decision-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.decision-buttons button { min-height: 48px; padding: 0 var(--space-2); background: var(--white); border: 1px solid var(--industrial-300); border-radius: 6px; font-weight: 800; }
.decision-buttons button[data-choice="accept"] { color: var(--green); }
.decision-buttons button[data-choice="reject"] { color: var(--red); }
.correction-fields { display: grid; gap: var(--space-3); }
.correction-fields label { display: grid; gap: 5px; }
.correction-fields span { color: var(--industrial-600); font-size: 12px; font-weight: 700; text-transform: capitalize; }
.evidence-viewer-body img, .evidence-viewer-body video { display: block; max-width: 100%; max-height: 68vh; margin: 0 auto; object-fit: contain; background: var(--industrial-950); }
.evidence-viewer-body audio { width: 100%; }
.evidence-viewer-body iframe { width: 100%; min-height: 70vh; border: 0; }
.evidence-context-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: var(--space-5); }
.derived-text { max-height: 340px; overflow: auto; padding: var(--space-3); color: var(--industrial-800); background: var(--industrial-050); border: 1px solid var(--industrial-200); white-space: pre-wrap; }
.evidence-choices { display: grid; max-height: 190px; overflow-y: auto; gap: var(--space-1); padding: var(--space-2); background: var(--industrial-050); border: 1px solid var(--industrial-200); border-radius: 6px; }
.evidence-choices label { display: flex; min-height: 44px; align-items: center; gap: var(--space-2); margin: 0; }
.evidence-choices input { width: 20px; min-height: 20px; accent-color: var(--orange); }
.decision-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-2); margin-top: var(--space-5); }
.decision-actions .primary-button:last-child:nth-child(odd) { grid-column: 1 / -1; }

.toast {
  position: fixed;
  z-index: 100;
  right: var(--space-5);
  bottom: max(var(--space-5), env(safe-area-inset-bottom));
  max-width: min(420px, calc(100vw - 32px));
  padding: var(--space-3) var(--space-4);
  color: var(--white);
  background: var(--industrial-950);
  border-left: 4px solid var(--orange);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
}

@media (max-width: 900px) {
  input, select, textarea { font-size: 16px; }
  .identity > span { display: none; }
  .knowledge-shell { display: block; }
  .capture-rail {
    position: static;
    height: auto;
    max-height: none;
    min-height: calc(100vh - var(--topbar-height) - 57px - var(--apms-global-nav-height) - env(safe-area-inset-bottom));
    padding: var(--space-4) var(--space-4) calc(var(--apms-global-nav-height) + env(safe-area-inset-bottom) + var(--space-5));
    border-right: 0;
    border-bottom: 0;
  }
  #emptyState { display: none !important; }
  body:not(.knowledge-mobile-detail) #captureWorkspace { display: none; }
  body.knowledge-mobile-detail #captureRail { display: none; }
  .mobile-capture-back {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    gap: var(--space-2);
    margin: calc(var(--space-2) * -1) 0 var(--space-4);
    padding: 0 var(--space-2);
    color: var(--industrial-700);
    background: transparent;
    border: 0;
    font-weight: 800;
  }
  .mobile-capture-back svg { width: 20px; height: 20px; }
  .capture-workspace { padding: var(--space-5) var(--space-4) 120px; }
  .capture-header h2 { font-size: 25px; }
  .capture-facts { grid-template-columns: repeat(3, 1fr); }
  .capture-fact { padding: var(--space-3); border-bottom: 1px solid var(--industrial-200); }
  .capture-fact:nth-child(3) { border-right: 0; }
  .capture-archive-control { align-items: stretch; flex-direction: column; }
  .capture-archive-control button { width: 100%; }
  .section-tabs { margin-inline: calc(var(--space-4) * -1); padding-inline: var(--space-4); }
  body:not(.knowledge-mobile-detail) .review-action-bar { display: none !important; }
  .review-action-bar {
    right: max(var(--space-3), env(safe-area-inset-right));
    bottom: calc(var(--apms-global-nav-height) + env(safe-area-inset-bottom) + var(--space-3));
    left: auto;
    min-width: 0;
    gap: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }
  .review-action-bar > div { display: none; }
  .review-action-bar .primary-button {
    min-height: 50px;
    padding-inline: var(--space-4);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
  }
  .toast { bottom: calc(var(--apms-global-nav-height) + env(safe-area-inset-bottom) + var(--space-5)); }
  .global-workspace { padding: var(--space-6) var(--space-4); }
  .graph-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .graph-result-layout { grid-template-columns: minmax(0, 1fr); }
  .graph-expert-view--preview,
  .graph-expert-view--global { display: none; }
}

@media (max-width: 600px) {
  :root { --topbar-height: calc(60px + env(safe-area-inset-top)); }
  body { font-size: 14px; }
  .topbar { padding-inline: max(var(--space-2), env(safe-area-inset-left)); }
  .brand { gap: 8px; }
  .brand-logo { width: 92px; }
  .brand-module { display: none; }
  .workspace-tabs { padding-inline: var(--space-2); }
  .workspace-tabs button { min-height: 54px; padding: 0 12px; font-size: 12px; }
  .workspace-tabs button svg { display: none; }
  .capture-rail {
    max-height: none;
    padding: var(--space-3) var(--space-3) calc(var(--apms-global-nav-height) + env(safe-area-inset-bottom) + var(--space-5));
  }
  .rail-heading h1 { font-size: 20px; }
  .capture-row { min-height: 96px; padding: var(--space-3); }
  .capture-workspace { padding: var(--space-4) var(--space-3) 128px; }
  .capture-header { gap: var(--space-3); }
  .capture-header h2 { font-size: 22px; }
  .confidence-block { min-width: 70px; }
  .confidence-block strong { font-size: 23px; }
  .capture-facts { grid-template-columns: repeat(2, 1fr); }
  .capture-fact { padding: var(--space-3) var(--space-2); border-right: 1px solid var(--industrial-200); }
  .capture-fact:nth-child(2n) { border-right: 0; }
  .capture-fact:nth-child(3) { border-right: 1px solid var(--industrial-200); }
  .extraction-summary { margin: var(--space-4) 0; padding: var(--space-4); }
  .section-tabs { top: calc(var(--topbar-height) + 55px); margin-inline: calc(var(--space-3) * -1); padding-inline: var(--space-3); }
  .section-tabs button { min-height: 50px; padding: 0 10px; font-size: 12px; }
  .capture-search { align-items: stretch; flex-direction: column; }
  .capture-search > span { text-align: right; }
  .section-panel { padding-top: var(--space-5); }
  .review-progress { grid-template-columns: 1fr; }
  .review-stage { min-height: 64px; border-right: 0; border-bottom: 1px solid var(--industrial-200); }
  .review-stage:last-child { border-bottom: 0; }
  .domain-overview { grid-template-columns: repeat(2, 1fr); }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading > span { text-align: left; }
  .panel-toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .panel-toolbar .search-control { grid-column: 1 / -1; }
  .panel-toolbar select { width: 100%; }
  .review-assist { align-items: stretch; flex-direction: column; }
  .review-assist .secondary-button { width: 100%; }
  .guided-batch-banner { align-items: stretch; flex-direction: column; }
  .guided-batch-banner > div:last-child { display: grid; grid-template-columns: 1fr; }
  .guided-batch-banner button { width: 100%; }
  .candidate-view-bar { align-items: stretch; flex-direction: column; }
  .candidate-view-tabs { width: 100%; }
  .candidate-view-tabs button { flex: 1; justify-content: center; }
  .candidate-progress { width: 100%; min-width: 0; }
  .suggestion-summary { grid-template-columns: 1fr; }
  .review-batch-grid { grid-template-columns: 1fr; }
  .review-batch-card { min-height: 0; }
  .review-batch-card > p { min-height: 0; }
  .candidate { min-height: 96px; padding: var(--space-3); grid-template-columns: auto minmax(0, 1fr) 44px; }
  .candidate-select { width: 36px; }
  .candidate-meta { gap: 4px 10px; }
  .evidence-list { grid-template-columns: 1fr; }
  .issue { padding: var(--space-3); }
  .issue__heading { align-items: flex-start; flex-direction: column; }
  .issue__heading .status-chip,
  .issue__heading .domain-chip { align-self: flex-start; }
  .issue-controls { flex-direction: column; }
  .change-row { grid-template-columns: minmax(0, 1fr); }
  .change-row > span { overflow-wrap: anywhere; word-break: break-word; }
  .preview-summary, .graph-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .graph-health { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .graph-health span { border-radius: var(--radius); }
  .graph-category-grid { grid-template-columns: minmax(0, 1fr); }
  .graph-category-card {
    min-height: 76px;
    grid-template-columns: 18px minmax(0, 1fr) auto;
  }
  .graph-section-heading { align-items: flex-start; }
  .graph-result-layout,
  .preview-graph-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .preview-graph-browser { margin-top: var(--space-4); padding: var(--space-3); }
  .preview-graph-browser--detail { padding: 0; background: transparent; border: 0; }
  .preview-graph-filters {
    margin-inline: calc(var(--space-3) * -1);
    padding-inline: var(--space-3);
  }
  .preview-graph-focus-slot:empty { display: none; }
  .preview-graph-back { margin-bottom: var(--space-2); }
  .graph-focus__heading { padding: var(--space-4); }
  .graph-relationship-list { padding: var(--space-4); }
  .graph-relationship-list li { grid-template-columns: minmax(100px, 0.65fr) minmax(0, 1fr); }
  .graph-relationship-list li small { grid-column: 2; }
  .graph-expert-view,
  .graph-local-view { padding-inline: var(--space-4); }
  .local-molecule__heading strong { max-width: 220px; }
  .local-molecule__canvas { min-height: 220px; }
  .molecular-toolbar { align-items: flex-start; flex-direction: column; }
  .molecular-toolbar > div:first-child { width: 100%; }
  .molecular-zoom { align-self: stretch; }
  .molecular-zoom button { flex: 1; }
  .molecular-viewport { height: 470px; }
  .molecular-legend { display: grid; grid-template-columns: 1fr 1fr; }
  .molecular-detail { min-height: 144px; }
  .graph-change-details { padding-inline: var(--space-3); }
  .activity-entry { grid-template-columns: 78px 14px minmax(0, 1fr); gap: var(--space-2); }
  .comment-composer { flex-direction: column; }
  .global-heading h1 { font-size: 24px; }
  .global-search-row { align-items: stretch; flex-direction: column; }
  .global-search-row .global-search { margin-bottom: 0; }
  .side-dialog, .evidence-dialog, .action-dialog { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; margin: 0; border-radius: 0; }
  .action-dialog form { max-height: 100vh; }
  .dialog-heading { padding-inline: var(--space-4); }
  .dialog-body, .action-dialog form { padding: var(--space-4); }
  .action-dialog .dialog-heading { margin: calc(var(--space-4) * -1) calc(var(--space-4) * -1) var(--space-4); }
  .decision-buttons { grid-template-columns: repeat(2, 1fr); }
  .evidence-context-layout { grid-template-columns: 1fr; }
  .trace-evidence__thumbnail { width: 88px; height: 66px; }
}

@media (orientation: landscape) and (max-height: 520px) {
  .capture-rail { max-height: none; }
  .side-dialog, .evidence-dialog, .action-dialog { max-height: 100vh; }
  .dialog-heading { min-height: calc(58px + env(safe-area-inset-top)); }
}

@media (prefers-reduced-motion: no-preference) {
  .capture-row, .candidate, .evidence-card, .primary-button, .secondary-button { transition: border-color 140ms ease, background-color 140ms ease, transform 120ms ease, box-shadow 140ms ease; }
  .capture-row:active, .candidate-open:active, .evidence-card:active, .primary-button:active, .secondary-button:active { transform: scale(0.985); }
}

@media (prefers-contrast: more) {
  :root { --industrial-200: #aeb5be; --industrial-300: #7a838e; }
  .status-chip, .domain-chip, .signal-chip { border-width: 2px; }
}
