:root {
  --bg: #090d18;
  --surface: #111726;
  --surface-raised: #171e30;
  --surface-soft: #0d1321;
  --line: #27314a;
  --line-strong: #394765;
  --text: #f4f1e9;
  --muted: #a0a9bd;
  --faint: #69748d;
  --accent: #f0b564;
  --accent-strong: #d9953e;
  --teal: #65cfc7;
  --success: #72d6a0;
  --danger: #ef806d;
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, .42);
}

body {
  background:
    radial-gradient(900px 620px at 76% -12%, rgba(101, 207, 199, .075), transparent 62%),
    radial-gradient(760px 560px at 5% 110%, rgba(240, 181, 100, .06), transparent 60%),
    var(--bg);
}

.app-shell { grid-template-columns: 218px minmax(0, 1fr); }
.app-sidebar {
  background: rgba(10, 15, 27, .94);
  box-shadow: 14px 0 50px rgba(0, 0, 0, .16);
}
.app-brand {
  padding: 0 5px 18px;
  border-bottom: 1px solid rgba(39, 49, 74, .72);
}
.app-nav-item { min-height: 42px; border-radius: 11px; }
.app-nav-item.active {
  background: linear-gradient(135deg, rgba(240, 181, 100, .14), rgba(101, 207, 199, .07));
  border-color: rgba(240, 181, 100, .22);
  color: var(--text);
}
.app-topbar { min-height: 72px; background: rgba(9, 13, 24, .8); }
.app-content { width: min(1540px, 100%); margin: 0 auto; }
.app-btn { min-height: 38px; border-radius: 10px; letter-spacing: -.01em; }
.app-btn-primary { box-shadow: 0 8px 22px rgba(217, 149, 62, .16); }
.app-btn-ghost { color: var(--muted); }
.danger-action {
  border-color: rgba(239, 128, 109, .35);
  background: rgba(239, 128, 109, .12);
  color: #ffab9c;
}
.app-panel { box-shadow: 0 14px 40px rgba(0, 0, 0, .12); }

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--teal);
  font: 650 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.section-title {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.025em;
}
.section-copy, .panel-help {
  margin: 5px 0 0;
  color: var(--faint);
  font-size: 13px;
  line-height: 1.55;
}

.research-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 30px 32px;
  overflow: hidden;
  border: 1px solid rgba(240, 181, 100, .18);
  border-radius: 20px;
  background:
    linear-gradient(115deg, rgba(240, 181, 100, .105), transparent 48%),
    linear-gradient(135deg, var(--surface-raised), var(--surface-soft));
  box-shadow: var(--shadow-lg);
}
.research-hero h1 {
  max-width: 780px;
  margin: 0;
  color: var(--text);
  font-size: clamp(27px, 3vw, 42px);
  font-weight: 760;
  line-height: 1.08;
  letter-spacing: -.045em;
}
.research-hero p {
  max-width: 740px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.template-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.template-card {
  display: flex;
  min-height: 92px;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(17, 23, 38, .72);
  color: var(--text);
  text-align: left;
  transition: border-color .16s ease, transform .16s ease, background .16s ease;
}
.template-card:hover {
  transform: translateY(-2px);
  border-color: rgba(101, 207, 199, .45);
  background: var(--surface-raised);
}
.template-card strong { font-size: 13px; }
.template-card span { color: var(--faint); font-size: 12px; line-height: 1.45; }

.research-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
  margin-top: 15px;
}
.research-card {
  display: flex;
  min-height: 235px;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(23, 30, 48, .96), rgba(14, 19, 33, .96));
  box-shadow: 0 16px 44px rgba(0, 0, 0, .16);
  transition: border-color .16s ease, transform .16s ease;
}
.research-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.research-card-top, .research-card-actions, .research-card-metrics {
  display: flex;
  align-items: center;
  gap: 8px;
}
.research-card-top { justify-content: space-between; }
.research-card h3 {
  margin: 20px 0 7px;
  color: var(--text);
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -.025em;
}
.research-card > p {
  flex: 1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.research-card-metrics {
  flex-wrap: wrap;
  margin: 18px 0 14px;
  color: var(--faint);
  font-size: 11px;
}
.research-card-metrics span { padding-right: 8px; border-right: 1px solid var(--line); }
.research-card-metrics span:last-child { border-right: 0; }
.research-card-metrics .is-stale { color: var(--accent); }
.research-card-metrics .is-current { color: var(--success); }
.research-card-actions { justify-content: space-between; }

.template-pill, .change-pill {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font: 650 10px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.template-pill {
  border: 1px solid rgba(101, 207, 199, .24);
  background: rgba(101, 207, 199, .08);
  color: var(--teal);
}
.change-pill {
  border: 1px solid rgba(240, 181, 100, .25);
  background: rgba(240, 181, 100, .09);
  color: var(--accent);
}

.research-empty {
  grid-column: 1 / -1;
  padding: 54px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  color: var(--muted);
  text-align: center;
}
.research-empty svg { width: 50px; margin: 0 auto 14px; opacity: .42; }
.research-empty h3 { margin: 0 0 7px; color: var(--text); font-size: 18px; }
.research-empty p { max-width: 520px; margin: 0 auto 18px; color: var(--faint); }

.research-header {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 18px;
  margin-bottom: 14px;
}
.back-link {
  grid-column: 1 / -1;
  width: max-content;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 12px;
}
.research-title-block { display: contents; }
.research-title-block h1 {
  margin: 9px 0 4px;
  color: var(--text);
  font-size: 28px;
  font-weight: 760;
  letter-spacing: -.04em;
}
.research-title-block p {
  max-width: 820px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}
.research-header-actions, .toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.research-stepbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}
.research-stepbar span {
  padding: 9px 12px;
  background: var(--surface-soft);
  color: var(--faint);
  font-size: 11px;
  text-align: center;
}
.research-stepbar .is-complete { color: var(--success); }
.research-stepbar .has-change { color: var(--accent); }

.research-workbench {
  display: grid;
  min-height: calc(100vh - 220px);
  grid-template-columns: minmax(250px, .78fr) minmax(430px, 1.5fr) minmax(270px, .82fr);
  gap: 12px;
  align-items: start;
}
.workbench-panel, .inspector-panel {
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(17, 23, 38, .9);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .14);
}
.workbench-panel { min-height: calc(100vh - 240px); padding: 16px; }
.sources-panel, .inspector-stack {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow: auto;
}
.structure-panel { min-width: 0; }
.inspector-stack { display: grid; gap: 12px; }
.inspector-panel { padding: 16px; }
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.panel-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.source-list { display: grid; gap: 9px; margin-top: 15px; }
.source-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
}
.source-card.warning { border-color: rgba(240, 181, 100, .45); }
.source-card.blocked { border-color: rgba(239, 128, 109, .5); }
.source-quality-note {
  color: var(--accent) !important;
  -webkit-line-clamp: unset !important;
}
.source-card.blocked .source-quality-note { color: var(--danger) !important; }
.source-card-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}
.source-card-head strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-card-head div span { display: block; margin-top: 2px; color: var(--faint); font-size: 10px; }
.source-kind, .source-thumb {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(101, 207, 199, .2);
  border-radius: 9px;
  background: rgba(101, 207, 199, .07);
  color: var(--teal);
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  object-fit: cover;
}
.source-card > p {
  display: -webkit-box;
  margin: 10px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.source-anchor-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
  color: var(--teal);
  font: 600 10px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.source-anchor-meta span + span::before {
  margin-right: 7px;
  color: var(--line-strong);
  content: "·";
}
.source-card-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}
.source-card-actions a, .source-card-actions button, .suggestion-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 10px;
  font-weight: 650;
}
.source-card-actions button, .suggestion-actions button:first-child { color: var(--faint); }

.mini-empty, .outline-empty {
  padding: 34px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  color: var(--faint);
  text-align: center;
}
.mini-empty strong, .outline-empty h3 { display: block; margin: 0 0 5px; color: var(--text); }
.mini-empty p, .outline-empty p { margin: 0; font-size: 12px; line-height: 1.5; }
.outline-empty svg { width: 44px; margin: 0 auto 12px; opacity: .4; }
.outline-empty .app-btn { margin-top: 16px; }

.outline-status {
  margin: 0 -16px 13px;
  padding: 0 16px 13px;
  border-bottom: 1px solid var(--line);
}
.metric-row { display: flex; flex-wrap: wrap; gap: 10px 16px; color: var(--faint); font-size: 10px; }
.stale-banner, .current-banner {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  font-size: 11px;
}
.stale-banner {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(240, 181, 100, .24);
  background: rgba(240, 181, 100, .07);
  color: var(--muted);
}
.stale-banner strong { color: var(--accent); }
.current-banner {
  border: 1px solid rgba(114, 214, 160, .18);
  background: rgba(114, 214, 160, .06);
  color: var(--success);
}

.outline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--faint);
  font-size: 10px;
}
.editable-tree, .tree-node { display: grid; gap: 6px; }
.tree-node > .editable-tree {
  margin-left: 25px;
  padding-left: 14px;
  border-left: 1px solid var(--line);
}
.tree-row {
  display: grid;
  grid-template-columns: 18px 8px minmax(0, 1fr) auto 28px 28px;
  align-items: center;
  gap: 7px;
  min-height: 45px;
  padding: 6px 7px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(13, 19, 33, .72);
  transition: border-color .14s ease, background .14s ease;
}
.tree-row:hover, .tree-row.selected { border-color: var(--line-strong); background: var(--surface-raised); }
.tree-row.selected { box-shadow: inset 3px 0 var(--accent); }
.tree-row.drag-target { border-color: var(--teal); }
.drag-handle { color: var(--faint); cursor: grab; font-size: 12px; letter-spacing: -3px; }
.node-type-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(240, 181, 100, .08);
}
.node-title {
  min-width: 0;
  padding: 5px 6px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 620;
  outline: none;
}
.node-title:focus { border-bottom: 1px solid var(--teal); }
.evidence-count { color: var(--teal); font: 650 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.icon-button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--faint);
  font-size: 15px;
}
.icon-button:hover { border-color: var(--line-strong); color: var(--text); }
.node-claim { margin: -2px 42px 3px 40px; color: var(--faint); font-size: 11px; line-height: 1.5; }

.health-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.metric-tile, .inspector-metric {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}
.metric-tile strong, .inspector-metric strong { display: block; color: var(--text); font-size: 18px; }
.metric-tile span, .inspector-metric span { color: var(--faint); font-size: 10px; }
.evidence-stack, .suggestion-list, .version-list { display: grid; gap: 7px; margin-top: 10px; }
.evidence-chip {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  border-radius: 9px;
  background: var(--surface-soft);
}
.evidence-chip span { color: var(--teal); font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.evidence-chip strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.evidence-chip small {
  display: block;
  max-width: 230px;
  overflow: hidden;
  margin-top: 3px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestion-card {
  padding: 11px;
  border: 1px solid var(--line);
  border-left-width: 3px;
  border-radius: 10px;
  background: var(--surface-soft);
}
.suggestion-card.addition { border-left-color: var(--success); }
.suggestion-card.stale { border-left-color: var(--danger); }
.suggestion-card.add, .suggestion-card.merge { border-left-color: var(--success); }
.suggestion-card.update, .suggestion-card.link { border-left-color: var(--accent); }
.suggestion-card.challenge { border-left-color: var(--danger); }
.suggestion-card.ignore { border-left-color: var(--faint); opacity: .82; }
.proposal-heading { display: grid; grid-template-columns: 16px auto minmax(0, 1fr) auto; align-items: center; gap: 7px; }
.proposal-heading input { width: 14px; height: 14px; padding: 0; }
.proposal-heading span { color: var(--success); font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.suggestion-card.challenge .proposal-heading span { color: var(--danger); }
.suggestion-card.update .proposal-heading span,
.suggestion-card.link .proposal-heading span { color: var(--accent); }
.proposal-heading small { color: var(--faint); font-size: 9px; }
.suggestion-card > div:first-child { align-items: center; }
.suggestion-card > div:first-child span { color: var(--success); font: 700 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.suggestion-card.stale > div:first-child span { color: var(--danger); }
.suggestion-card strong { color: var(--text); font-size: 11px; }
.suggestion-card p { margin: 7px 0; color: var(--faint); font-size: 10px; line-height: 1.45; }
.proposal-claim {
  margin: 8px 0 10px;
  padding-left: 9px;
  border-left: 2px solid rgba(101, 207, 199, .35);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.proposal-claim.before { border-left-color: rgba(239, 128, 109, .38); }
.proposal-claim.after { border-left-color: rgba(114, 214, 160, .4); }
.proposal-diff small, .proposal-evidence small {
  display: block;
  margin-top: 7px;
  color: var(--faint);
  font: 650 8px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-transform: uppercase;
}
.proposal-evidence q {
  display: block;
  max-height: 78px;
  overflow: auto;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}
.suggestion-actions { display: flex; justify-content: space-between; gap: 8px; }

.version-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 2px 7px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.version-row strong { grid-row: 1 / 3; color: var(--accent); font-size: 10px; }
.version-row span, .version-row time { color: var(--faint); font-size: 9px; }
.version-row button {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--teal);
  font-size: 9px;
}
.version-detail { display: grid; gap: 12px; }
.version-summary { margin: 0; color: var(--accent); font-size: 11px; }
.version-claim-list { display: grid; gap: 8px; }
.version-claim-list > div {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}
.version-claim-list strong { color: var(--text); font-size: 11px; }
.version-claim-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.modal-backdrop {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 6, 13, .72);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.modal-card {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.modal-head, .modal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 19px;
}
.modal-head { border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; color: var(--text); font-size: 18px; letter-spacing: -.025em; }
.modal-head p { margin: 4px 0 0; color: var(--faint); font-size: 12px; }
.modal-body { padding: 19px; }
.modal-actions { align-items: center; justify-content: flex-end; border-top: 1px solid var(--line); }
.form-stack { display: grid; gap: 13px; }
.form-stack .field { margin: 0; }
.dialog-copy { margin: 0; color: var(--muted); line-height: 1.65; }
.or-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--faint);
  font-size: 10px;
  text-transform: uppercase;
}
.or-divider::before, .or-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }

.project-choice-list { display: grid; gap: 8px; }
.project-choice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  cursor: pointer;
}
.project-choice input { width: auto; }
.project-choice strong, .project-choice span { display: block; }
.project-choice strong { color: var(--text); font-size: 12px; }
.project-choice span { margin-top: 3px; color: var(--faint); font-size: 10px; }

@media (max-width: 1180px) {
  .research-workbench { grid-template-columns: minmax(230px, .78fr) minmax(420px, 1.4fr); }
  .inspector-stack {
    position: static;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
    max-height: none;
    overflow: visible;
  }
}
@media (max-width: 860px) {
  .template-strip { grid-template-columns: 1fr 1fr; }
  .research-header, .research-workbench { grid-template-columns: 1fr; }
  .research-title-block { display: block; }
  .research-header-actions { justify-content: flex-start; }
  .sources-panel, .inspector-stack { position: static; max-height: none; overflow: visible; }
  .inspector-stack { grid-column: auto; grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    height: auto;
    padding: 9px 10px;
    gap: 5px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .app-brand, .app-userchip { display: none; }
  .app-nav-item {
    width: auto;
    min-height: 42px;
    justify-content: center;
    gap: 5px;
    padding: 8px 4px;
    font-size: 11px;
    text-align: center;
  }
  .app-nav-item svg { width: 15px; height: 15px; }
  .app-topbar { position: static; padding: 12px 18px; }
  .research-hero { align-items: flex-start; flex-direction: column; padding: 24px; }
  .research-hero h1 { font-size: 29px; }
  .research-stepbar { grid-template-columns: 1fr 1fr; }
  .workbench-panel { min-height: auto; }
}
@media (max-width: 520px) {
  .template-strip, .research-list { grid-template-columns: 1fr; }
  .tree-row { grid-template-columns: 14px 7px minmax(0, 1fr) 25px 25px; }
  .evidence-count { display: none; }
}

/* ---------------------------------------------------------------- light field workspace */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-raised: #f8fafb;
  --surface-soft: #f1f4f6;
  --line: #dce2e7;
  --line-strong: #b9c3cb;
  --text: #182126;
  --muted: #52616b;
  --faint: #74838c;
  --accent: #b96f17;
  --accent-strong: #94550e;
  --teal: #137f78;
  --success: #26784b;
  --danger: #b84635;
  --shadow-lg: 0 22px 60px rgba(35, 50, 58, .12);
  --star: #d58a2e;
  --star-dim: #b96f17;
  --orbit: #168d84;
}

html { color-scheme: light; }
body {
  background: #f4f6f8;
  color: var(--text);
}
::selection { background: rgba(19, 127, 120, .18); }
:focus-visible { outline-color: var(--teal); }

.app-sidebar {
  border-color: var(--line) !important;
  background: #ffffff !important;
  box-shadow: 8px 0 30px rgba(35, 50, 58, .05);
}
.app-brand { border-color: var(--line); }
.app-brand .font-sans { color: var(--text) !important; }
.app-nav-item {
  color: var(--muted) !important;
  background: transparent !important;
}
.app-nav-item:hover {
  background: #f1f5f5 !important;
  color: var(--text) !important;
}
.app-nav-item.active {
  border-color: #c7dedb !important;
  background: #e9f4f2 !important;
  color: #125f5a !important;
}
.app-userchip {
  border-color: var(--line) !important;
  background: #f8fafb !important;
  color: var(--text);
}
.app-userchip small { color: var(--faint) !important; }
.app-topbar {
  border-color: var(--line) !important;
  background: rgba(255, 255, 255, .88) !important;
}
.app-content { max-width: 1440px; }

.app-btn {
  border-color: var(--line-strong) !important;
  background: #ffffff !important;
  color: var(--text) !important;
  box-shadow: 0 1px 2px rgba(35, 50, 58, .05);
}
.app-btn:hover { background: #f5f7f8 !important; }
.app-btn-primary {
  border-color: #a76012 !important;
  background: #b96f17 !important;
  color: #ffffff !important;
  box-shadow: 0 7px 18px rgba(185, 111, 23, .2);
}
.app-btn-primary:hover { background: #a76012 !important; }
.app-btn:disabled { opacity: .48; }
.danger-action {
  border-color: #d9aaa2 !important;
  background: #fff2f0 !important;
  color: var(--danger) !important;
}
.app-panel, .auth-card {
  border-color: var(--line) !important;
  background: #ffffff !important;
  color: var(--text);
  box-shadow: var(--shadow-lg) !important;
}
.page-title { color: var(--text) !important; }
.page-sub, .auth-tag, .auth-switch { color: var(--muted) !important; }
.hint-box {
  border-color: var(--line-strong) !important;
  background: var(--surface-soft) !important;
  color: var(--faint) !important;
}
.toast {
  border-color: var(--line) !important;
  background: #ffffff !important;
  color: var(--text) !important;
  box-shadow: var(--shadow-lg) !important;
}

input, select, textarea {
  border-color: var(--line-strong) !important;
  background: #ffffff !important;
  color: var(--text) !important;
}
input::placeholder, textarea::placeholder { color: #929da4; }
label { color: var(--muted) !important; }
input:focus, select:focus, textarea:focus {
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 3px rgba(19, 127, 120, .11) !important;
}
input[readonly], textarea[readonly], select:disabled {
  border-color: var(--line) !important;
  background: var(--surface-soft) !important;
  color: var(--muted) !important;
  box-shadow: none !important;
}

.eyebrow { color: var(--teal); }
.section-title, .research-header h1 { color: var(--text); }
.section-copy, .panel-help, .research-header p { color: var(--muted); }
.back-link { color: var(--teal); }

.research-hero {
  border-color: #d7dedf;
  background: #ffffff;
  box-shadow: 0 16px 48px rgba(35, 50, 58, .08);
}
.research-hero::after {
  position: absolute;
  width: 150px;
  height: 5px;
  background: linear-gradient(90deg, var(--teal), var(--accent));
  content: "";
  inset: 0 auto auto 0;
}
.research-hero { position: relative; }
.research-hero h1 { color: var(--text); letter-spacing: -.035em; }
.research-hero p { color: var(--muted); }
.research-card {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(35, 50, 58, .06);
}
.research-card:hover {
  border-color: #aebbc3;
  box-shadow: 0 14px 34px rgba(35, 50, 58, .09);
}
.research-card h3 { color: var(--text); }
.research-card > p { color: var(--muted); }
.template-pill {
  border-color: #bcded9;
  background: #e9f5f3;
  color: #126d67;
}
.change-pill {
  border-color: #e6c99f;
  background: #fff5e6;
  color: var(--accent-strong);
}

.field-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 16px 0 12px;
  padding: 17px 19px;
  border: 1px solid #d8e2e1;
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(35, 50, 58, .045);
}
.field-command .eyebrow { margin-bottom: 3px; }
.field-command h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 720;
}
.field-command p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.field-command-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.field-tabs {
  display: flex;
  gap: 4px;
  max-width: 100%;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e9edef;
  overflow-x: auto;
}
.field-tab {
  display: flex;
  min-width: 0;
  min-height: 38px;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.field-tab strong {
  display: grid;
  min-width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 999px;
  background: rgba(82, 97, 107, .1);
  color: var(--faint);
  font-size: 10px;
}
.field-tab:hover { color: var(--text); }
.field-tab.is-active {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 2px 7px rgba(35, 50, 58, .08);
}
.field-tab.is-active strong {
  background: #e5f3f1;
  color: var(--teal);
}
.field-view { min-width: 0; }

.takeaways-workspace {
  display: grid;
  gap: 14px;
}
.decision-brief {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, .72fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(35, 50, 58, .055);
}
.current-answer {
  min-width: 0;
  padding: 22px;
}
.change-pulse {
  min-width: 0;
  padding: 22px;
  border-left: 1px solid var(--line);
  background: #f8faf9;
}
.change-pulse h2 {
  margin: 4px 0 7px;
  color: var(--text);
  font-size: 18px;
}
.change-pulse > p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.judgment-lead-list {
  display: grid;
}
.judgment-lead-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--text);
  text-align: left;
}
.judgment-lead-row:first-child { border-top: 0; }
.judgment-lead-row > span {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
}
.judgment-lead-row div { min-width: 0; }
.judgment-lead-row div strong,
.judgment-lead-row div small { display: block; }
.judgment-lead-row div strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
.judgment-lead-row div small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 10px;
}
.judgment-lead-row em {
  color: var(--teal);
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  text-align: right;
}
.judgment-lead-row em.needs-decision { color: var(--danger); }
.tension-alert {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  margin: 0 0 12px;
  padding: 11px;
  border: 1px solid #e4b4aa;
  border-radius: 6px;
  background: #fff7f5;
  color: var(--danger);
  text-align: left;
}
.tension-alert strong {
  font-size: 20px;
  text-align: center;
}
.tension-alert span {
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}
.change-clear {
  margin: 0 0 12px;
  padding: 11px 12px;
  border: 1px solid #c8ddd4;
  border-radius: 6px;
  background: #f1f8f4;
  color: var(--success);
  font-size: 11px;
}
.change-pulse-list {
  display: grid;
  gap: 6px;
  margin-bottom: 13px;
}
.change-pulse-list button,
.accepted-change-list button {
  min-width: 0;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  text-align: left;
}
.change-pulse-list span,
.change-pulse-list strong,
.accepted-change-list span,
.accepted-change-list strong { display: block; }
.change-pulse-list span,
.accepted-change-list span {
  margin-bottom: 3px;
  color: var(--teal);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}
.change-pulse-list span.challenged,
.accepted-change-list span.challenged { color: var(--danger); }
.change-pulse-list strong,
.accepted-change-list strong {
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
}
.knowledge-path-strip {
  display: grid;
  grid-template-columns: minmax(190px, .45fr) minmax(0, 1.8fr);
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}
.knowledge-path-intro strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}
.knowledge-path-steps {
  display: flex;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}
.knowledge-path-step {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(110px, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 165px;
  padding: 7px 18px 7px 0;
  color: var(--muted);
  text-align: left;
}
.knowledge-path-step + .knowledge-path-step {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}
.knowledge-path-step > span {
  color: var(--teal);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 750;
}
.knowledge-path-step div { min-width: 0; }
.knowledge-path-step strong,
.knowledge-path-step small { display: block; }
.knowledge-path-step strong {
  color: var(--text);
  font-size: 11px;
  line-height: 1.3;
}
.knowledge-path-step small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 9px;
}
.knowledge-path-step em {
  grid-column: 2;
  margin-top: 3px;
  color: var(--danger);
  font-size: 9px;
  font-style: normal;
  font-weight: 650;
}
.knowledge-path-step.is-active strong { color: var(--teal); }
.tension-workspace {
  padding: 22px;
  border: 1px solid #e4b4aa;
  border-radius: 8px;
  background: #fffaf8;
}
.tension-workspace-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eed4ce;
}
.tension-workspace-heading h2 {
  margin: 3px 0 5px;
  color: var(--text);
  font-size: 18px;
}
.tension-workspace-heading p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.tension-workspace-heading > strong {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #f5ded8;
  color: var(--danger);
}
.tension-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.tension-card {
  padding: 15px;
  border: 1px solid #ead1cb;
  border-left: 4px solid var(--danger);
  border-radius: 7px;
  background: #ffffff;
}
.tension-card-heading,
.tension-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.tension-card-heading span {
  color: var(--danger);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}
.tension-card-heading h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 14px;
}
.tension-card-heading > strong {
  color: var(--danger);
  font-size: 10px;
  white-space: nowrap;
}
.tension-reason {
  margin: 8px 0 12px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.tension-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.tension-compare > div {
  padding: 11px;
  border-radius: 5px;
  background: var(--surface-soft);
}
.tension-compare > div:last-child { background: #fff5f2; }
.tension-compare small {
  color: var(--faint);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}
.tension-compare p {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.5;
}
.tension-footer {
  align-items: center;
  margin-top: 11px;
}
.tension-footer > span { color: var(--faint); font-size: 10px; }
.narrative-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}
.narrative-list {
  min-width: 0;
  padding: 18px;
}
.narrative-list + .narrative-list { border-left: 1px solid var(--line); }
.narrative-list-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.narrative-list-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}
.narrative-list-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
}
.narrative-list-heading > strong {
  color: var(--teal);
  font-size: 11px;
}
.narrative-list > div:last-child { display: grid; }
.narrative-list button {
  min-width: 0;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  text-align: left;
}
.narrative-list button strong,
.narrative-list button span { display: block; }
.narrative-list button strong {
  color: var(--text);
  font-size: 11px;
  line-height: 1.4;
}
.narrative-list button span {
  margin-top: 4px;
  color: var(--faint);
  font-size: 9px;
}
.takeaways-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(35, 50, 58, .055);
}
.takeaways-header h2 {
  margin: 3px 0 5px;
  color: var(--text);
  font-size: 21px;
}
.takeaways-header p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.takeaway-revision {
  min-width: 150px;
  padding-left: 20px;
  border-left: 1px solid var(--line);
  text-align: right;
}
.takeaway-revision strong,
.takeaway-revision span {
  display: block;
}
.takeaway-revision strong { color: var(--text); font-size: 13px; }
.takeaway-revision span { margin-top: 4px; color: var(--faint); font-size: 11px; }
.takeaways-pending {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border: 1px solid #e2c693;
  border-radius: 7px;
  background: #fff8eb;
}
.takeaways-pending strong,
.takeaways-pending span { display: block; }
.takeaways-pending strong { color: var(--text); font-size: 12px; }
.takeaways-pending span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.takeaway-lead-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, .72fr);
  gap: 14px;
  align-items: start;
}
.takeaway-lead,
.takeaway-change-panel,
.takeaway-module {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(35, 50, 58, .055);
}
.takeaway-lead { padding: 22px; }
.takeaway-section-heading,
.takeaway-module-heading,
.takeaway-item-head,
.takeaway-item-meta,
.takeaway-item-actions {
  display: flex;
  align-items: center;
}
.takeaway-section-heading,
.takeaway-module-heading {
  justify-content: space-between;
  gap: 16px;
}
.takeaway-section-heading {
  margin-bottom: 14px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--line);
}
.takeaway-section-heading h2,
.takeaway-module-heading h2,
.takeaway-change-panel h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 17px;
}
.takeaway-section-heading > span {
  color: var(--faint);
  font-size: 11px;
}
.takeaway-primary-list,
.takeaway-module-list {
  display: grid;
  gap: 10px;
}
.takeaway-item {
  padding: 15px;
  border: 1px solid var(--line);
  border-left: 4px solid #92aaa9;
  border-radius: 7px;
  background: #fafbfb;
}
.takeaway-item.new { border-left-color: var(--teal); }
.takeaway-item.strengthened { border-left-color: var(--success); }
.takeaway-item.challenged { border-left-color: var(--danger); background: #fff9f7; }
.takeaway-item.unanchored { border-left-color: var(--accent); background: #fffbf3; }
.takeaway-item-head {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
}
.takeaway-topic,
.takeaway-status {
  color: var(--faint);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}
.takeaway-status { color: var(--teal); text-align: right; }
.takeaway-item.challenged .takeaway-status { color: var(--danger); }
.takeaway-item.unanchored .takeaway-status { color: var(--accent-strong); }
.takeaway-item h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
}
.takeaway-item > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.takeaway-item-meta {
  flex-wrap: wrap;
  gap: 5px 12px;
  margin-top: 11px;
  color: var(--faint);
  font-size: 10px;
}
.takeaway-item-meta span + span {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}
.takeaway-item-actions {
  justify-content: flex-end;
  gap: 7px;
  margin-top: 10px;
}
.takeaway-item-actions .app-btn {
  padding: 6px 9px !important;
  color: var(--teal) !important;
  font-size: 10px !important;
}
.takeaway-item.compact { padding: 12px; }
.takeaway-item.compact h3 { font-size: 12px; }
.takeaway-item.compact > p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.takeaway-item.compact .takeaway-item-actions { display: none; }
.takeaway-change-panel {
  position: sticky;
  top: 88px;
  padding: 20px;
}
.takeaway-change-panel > p {
  margin: 6px 0 15px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.takeaway-change-list {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}
.takeaway-change-list button {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  text-align: left;
}
.takeaway-change-list button:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}
.takeaway-change-list span,
.takeaway-change-list strong { display: block; }
.takeaway-change-list span {
  margin-bottom: 4px;
  color: var(--teal);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}
.takeaway-change-list span.challenged { color: var(--danger); }
.takeaway-change-list strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.takeaway-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.takeaway-module { padding: 18px; }
.takeaway-module-heading {
  align-items: flex-start;
  margin-bottom: 12px;
}
.takeaway-module-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.takeaway-module-heading > strong {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 999px;
  background: #e9f5f3;
  color: var(--teal);
  font-size: 10px;
}
.takeaway-module-empty {
  margin: 0;
  padding: 18px 0;
  color: var(--faint);
  font-size: 11px;
  line-height: 1.5;
}
.takeaways-empty {
  padding: 80px 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--muted);
  text-align: center;
}
.takeaways-empty svg {
  width: 46px;
  margin-bottom: 11px;
  opacity: .38;
}
.takeaways-empty h2 { margin: 0 0 6px; color: var(--text); font-size: 19px; }
.takeaways-empty p {
  max-width: 560px;
  margin: 0 auto 17px;
  font-size: 12px;
  line-height: 1.55;
}
.source-card.is-focused {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(38, 139, 132, .13);
}

.workbench-panel, .inspector-panel, .review-workspace, .version-workspace {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(35, 50, 58, .055);
}
.workbench-panel { min-height: 0; padding: 20px; }
.panel-heading h2 { color: var(--text); font-size: 17px; }
.sources-panel {
  position: static;
  max-height: none;
  overflow: visible;
}
.sources-panel .source-list {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}
.source-card {
  border-color: var(--line);
  border-radius: 7px;
  background: #f9fafb;
}
.source-card.warning { border-color: #dfbd87; background: #fffaf2; }
.source-card.blocked { border-color: #dda49b; background: #fff7f5; }
.source-card-head strong { color: var(--text); font-size: 13px; }
.source-card-head div span, .source-card > p { color: var(--muted); }
.source-kind, .source-thumb {
  border-color: #c3dfdc;
  background: #eaf5f3;
  color: var(--teal);
}
.source-card-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}
.source-card-actions a:first-child { margin-right: auto; }
.source-card-actions a, .source-card-actions button {
  color: var(--teal);
  font-size: 11px;
}
.source-card-actions button:last-child { color: var(--danger); }

.structure-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, .72fr);
  gap: 12px;
  align-items: start;
}
.claim-inspector {
  position: sticky;
  top: 88px;
  min-width: 0;
  padding: 18px;
}
.claim-inspector > .panel-heading { margin-bottom: 14px; }
.readonly-note {
  margin: 0 0 14px;
  padding: 9px 11px;
  border: 1px solid #d5e3e1;
  border-radius: 6px;
  background: #f1f8f7;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.outline-status { border-color: var(--line); }
.metric-row { color: var(--faint); font-size: 11px; }
.stale-banner {
  border-color: #e3c89f;
  background: #fff8ed;
  color: var(--muted);
}
.current-banner {
  border-color: #bdd9c9;
  background: #eff8f2;
  color: var(--success);
}
.outline-toolbar { color: var(--faint); font-size: 11px; }
.outline-canvas > .knowledge-path-strip {
  margin-bottom: 14px;
  padding: 14px 0;
  border-width: 1px 0;
  border-radius: 0;
  box-shadow: none;
}
.knowledge-path-workspace { display: grid; gap: 16px; }
.knowledge-path-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.knowledge-path-toolbar strong,
.knowledge-path-toolbar span { display: block; }
.knowledge-path-toolbar strong { color: var(--text); font-size: 13px; }
.knowledge-path-toolbar span { margin-top: 3px; color: var(--faint); font-size: 10px; }
.knowledge-path-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.knowledge-path-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f6f8f8;
}
.knowledge-path-group-heading span,
.knowledge-path-group-heading strong { display: block; }
.knowledge-path-group-heading span {
  color: var(--teal);
  font-size: 9px;
  font-weight: 750;
  text-transform: uppercase;
}
.knowledge-path-group-heading strong {
  margin-top: 3px;
  color: var(--text);
  font-size: 12px;
}
.knowledge-path-group-heading em {
  color: var(--danger);
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
}
.knowledge-path-group-heading em.resolved { color: var(--success); }
.knowledge-claim-list { display: grid; }
.knowledge-claim-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: start;
  width: 100%;
  padding: 13px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
}
.knowledge-claim-row:first-child { border-top: 0; }
.knowledge-claim-row:hover,
.knowledge-claim-row.is-selected { background: #f7fbfa; }
.knowledge-claim-row.is-selected { box-shadow: inset 3px 0 var(--teal); }
.knowledge-claim-row.needs-decision { box-shadow: inset 3px 0 var(--danger); }
.knowledge-claim-state {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: #e8f4f2;
  color: var(--teal);
  font-size: 10px;
  font-weight: 750;
}
.knowledge-claim-row.needs-decision .knowledge-claim-state {
  background: #f9e5e0;
  color: var(--danger);
}
.knowledge-claim-row > div { min-width: 0; }
.knowledge-claim-row > div > strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
}
.knowledge-claim-row > div > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.knowledge-claim-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  min-width: 88px;
}
.knowledge-claim-meta span {
  color: var(--teal);
  font-size: 9px;
  font-weight: 700;
}
.knowledge-claim-row.needs-decision .knowledge-claim-meta span { color: var(--danger); }
.knowledge-claim-meta small { color: var(--faint); font-size: 9px; }
.tree-node > .editable-tree { border-color: var(--line); }
.structure-layout.is-editing {
  grid-template-columns: minmax(0, 1fr) minmax(270px, .33fr);
  gap: 12px;
}
.structure-layout.is-editing .structure-panel {
  overflow: hidden;
  padding: 0;
}
.structure-layout.is-editing .structure-panel > .panel-heading {
  padding: 18px 20px 12px;
}
.structure-layout.is-editing .outline-status {
  margin: 0;
  padding: 0 20px 14px;
}
.structure-layout.is-editing .outline-canvas { border-top: 1px solid var(--line); }
.path-editor-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  min-height: 600px;
}
.path-directory {
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: #fafbfb;
}
.path-directory-heading {
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.path-directory-heading strong,
.path-directory-heading span {
  display: block;
}
.path-directory-heading strong { color: var(--text); font-size: 13px; }
.path-directory-heading span {
  margin-top: 4px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.45;
}
.path-directory-list { display: grid; padding: 7px 0; }
.path-directory-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 24px;
  gap: 8px;
  align-items: center;
  min-height: 58px;
  padding: 10px 12px;
  border-left: 3px solid transparent;
  color: var(--muted);
  text-align: left;
}
.path-directory-item:hover { background: #f2f7f6; }
.path-directory-item.is-active {
  border-left-color: var(--teal);
  background: #edf7f5;
  color: var(--text);
}
.path-directory-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #bddbd7;
  border-radius: 50%;
  color: var(--teal);
  font-size: 10px;
  font-weight: 750;
}
.path-directory-item strong,
.path-directory-item small {
  display: block;
  min-width: 0;
}
.path-directory-item strong {
  overflow: hidden;
  color: inherit;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.path-directory-item small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 9px;
}
.path-directory-item em {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #edf1f2;
  color: var(--faint);
  font-size: 9px;
  font-style: normal;
}
.path-directory-item em.needs-decision {
  background: #fff0e6;
  color: var(--danger);
}
.path-directory-legend {
  display: grid;
  gap: 7px;
  margin-top: auto;
  padding: 13px 15px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 9px;
}
.path-directory-legend .needs-decision { color: var(--danger); }
.path-editor-main {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  padding: 16px;
}
.path-editor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.path-editor-heading h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
}
.path-editor-heading p {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 10px;
}
.edit-claim-list { display: grid; gap: 8px; }
.edit-claim-row {
  display: grid;
  grid-template-columns: 16px 24px minmax(0, 1fr) 30px 30px;
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}
.edit-claim-row:hover,
.edit-claim-row.is-selected {
  border-color: #aebdc5;
  background: #fbfdfd;
}
.edit-claim-row.is-selected { box-shadow: inset 3px 0 var(--teal); }
.edit-claim-row.drag-target { border-color: var(--teal); }
.edit-claim-state {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid #bddbd7;
  border-radius: 50%;
  color: var(--teal);
  font-size: 10px;
  font-weight: 750;
}
.edit-claim-state.disputed {
  border-color: #e7b8a8;
  color: var(--danger);
}
.edit-claim-main { min-width: 0; }
.edit-claim-input {
  display: block;
  width: 100%;
  min-height: 38px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
  outline: 0;
}
.edit-claim-input:focus { box-shadow: inset 0 -1px var(--teal); }
.edit-claim-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  color: var(--faint);
  font-size: 9px;
}
.applicability-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
.applicability-chips span {
  padding: 3px 6px;
  border: 1px solid #c7dcd8;
  border-radius: 4px;
  background: #f2f8f7;
  color: var(--teal);
  font-size: 8px;
  font-weight: 650;
  line-height: 1.2;
}
.applicability-chips.compact {
  margin-top: 5px;
}
.applicability-chips.compact span {
  padding: 2px 5px;
  font-size: 8px;
}
.applicability-empty {
  display: block;
  margin-top: 6px;
  color: var(--faint);
  font-size: 9px;
}
.delete-node-button:hover { color: var(--danger); }
.edit-tension-card {
  position: relative;
  display: grid;
  gap: 11px;
  padding: 14px;
  border: 1px solid #e8a277;
  border-radius: 7px;
  background: #fffaf6;
}
.edit-tension-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--danger);
  font-size: 10px;
  font-weight: 750;
}
.edit-tension-label strong {
  padding: 4px 7px;
  border-radius: 4px;
  background: #fff0e7;
  color: var(--danger);
  font-size: 9px;
}
.tension-diagnosis {
  display: grid;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid #ead5c9;
  border-radius: 6px;
  background: #ffffff;
}
.tension-diagnosis p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.tension-diagnosis > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.tension-diagnosis span {
  margin-right: 3px;
  color: var(--faint);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}
.tension-diagnosis em {
  padding: 3px 6px;
  border-radius: 4px;
  background: #f3f5f5;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
}
.edit-tension-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr);
  gap: 8px;
  align-items: stretch;
}
.edit-tension-pair article {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 7px;
  align-content: start;
  padding: 11px;
  border: 1px solid #efc0a4;
  border-radius: 6px;
  background: #fffdfb;
}
.edit-tension-pair article > span {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  background: #fff0e7;
  color: var(--danger);
  font-size: 11px;
  font-weight: 750;
}
.edit-tension-pair strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}
.edit-tension-pair small {
  grid-column: 2;
  color: var(--faint);
  font-size: 9px;
}
.edit-tension-pair article > .applicability-chips,
.edit-tension-pair article > .applicability-empty {
  grid-column: 2;
}
.edit-tension-pair > em {
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 9px;
  font-style: normal;
}
.edit-tension-reason {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
  text-align: center;
}
.edit-tension-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.edit-tension-actions button {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 34px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  color: var(--muted);
  font-size: 10px;
}
.edit-tension-actions button small {
  display: block;
  color: inherit;
  font-size: 7px;
  line-height: 1.2;
}
.edit-tension-actions button.is-recommended:not(.is-active) {
  border-color: #c9a88f;
  box-shadow: inset 0 -2px #d89265;
}
.edit-tension-actions button:hover,
.edit-tension-actions button.is-active {
  border-color: #dc8557;
  background: #fff1e8;
  color: var(--danger);
}
.tension-input-workspace {
  display: grid;
  gap: 9px;
  padding-top: 11px;
  border-top: 1px solid #efd6c7;
}
.tension-input-heading {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.tension-input-heading strong {
  flex: 0 0 auto;
  color: var(--text);
  font-size: 12px;
}
.tension-input-heading span {
  color: var(--faint);
  font-size: 9px;
  line-height: 1.4;
}
.tension-input-modes {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.tension-input-modes button {
  min-height: 30px;
  border: 1px solid var(--line);
  border-right: 0;
  background: #ffffff;
  color: var(--muted);
  font-size: 10px;
}
.tension-input-modes button:first-child { border-radius: 5px 0 0 5px; }
.tension-input-modes button:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 5px 5px 0;
}
.tension-input-modes button.is-active {
  border-color: var(--teal);
  background: #eff8f7;
  color: var(--teal);
}
.tension-user-input,
.tension-file-input {
  width: 100%;
  min-height: 64px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  color: var(--text);
  font-size: 11px;
  line-height: 1.5;
}
textarea.tension-user-input { resize: vertical; }
input.tension-user-input { min-height: 39px; }
.tension-file-input {
  display: grid;
  min-height: 58px;
  place-items: center;
  border-style: dashed;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
}
.tension-file-input input { display: none; }
.tension-conversation-input {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 8px;
}
.tension-provider {
  align-self: start;
  min-height: 39px;
}
.tension-input-actions,
.tension-preview-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.tension-input-actions > span {
  color: var(--faint);
  font-size: 9px;
}
.tension-impact-preview {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid #b9dcd7;
  border-radius: 6px;
  background: #f0f8f7;
}
.tension-impact-preview > strong {
  color: var(--teal);
  font-size: 11px;
}
.tension-impact-preview > p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.tension-impact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tension-impact-chips span,
.edit-change-summary span {
  padding: 4px 7px;
  border-radius: 4px;
  background: #ffffff;
  color: var(--muted);
  font-size: 9px;
}
.applicability-summary,
.applicability-editor {
  display: grid;
  gap: 11px;
  margin-top: 13px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8faf9;
}
.applicability-summary > strong {
  color: var(--text);
  font-size: 10px;
}
.applicability-editor-heading strong,
.applicability-editor-heading span {
  display: block;
}
.applicability-editor-heading strong {
  color: var(--text);
  font-size: 11px;
}
.applicability-editor-heading span {
  margin-top: 3px;
  color: var(--faint);
  font-size: 9px;
  line-height: 1.4;
}
.applicability-option-group {
  display: grid;
  gap: 6px;
}
.applicability-option-group > strong,
.applicability-text-field label {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}
.applicability-option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.applicability-option-list button {
  min-height: 27px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  color: var(--muted);
  font-size: 9px;
}
.applicability-option-list button.is-active {
  border-color: var(--teal);
  background: #eaf6f4;
  color: var(--teal);
}
.applicability-text-field {
  display: grid;
  gap: 5px;
}
.applicability-text-field textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
  color: var(--text);
  font-size: 10px;
  line-height: 1.45;
}
.pending-delete-list {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px dashed #ddaa9c;
  border-radius: 6px;
  background: #fff8f6;
}
.pending-delete-list > strong {
  color: var(--danger);
  font-size: 10px;
}
.pending-delete-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}
.pending-delete-list button {
  color: var(--teal);
  font-size: 10px;
}
.inspector-impact-preview {
  display: grid;
  gap: 7px;
  margin-top: 13px;
  padding: 11px;
  border: 1px solid #c8dedb;
  border-radius: 6px;
  background: #f2f8f7;
}
.inspector-impact-preview strong {
  color: var(--text);
  font-size: 11px;
}
.inspector-impact-preview span {
  color: var(--muted);
  font-size: 10px;
}
.edit-revision-bar {
  position: sticky;
  z-index: 5;
  bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 30px rgba(35, 50, 58, .13);
  backdrop-filter: blur(10px);
}
.edit-change-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-width: 0;
}
.edit-change-summary > strong {
  color: var(--text);
  font-size: 11px;
}
.edit-change-summary span { background: var(--surface-soft); }
.edit-change-summary span.pending {
  background: #fff0ec;
  color: var(--danger);
}
.edit-change-summary span.resolved {
  background: #eaf6f1;
  color: var(--success);
}
.edit-revision-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}
.cognitive-preview { display: grid; gap: 16px; }
.cognitive-preview-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.cognitive-preview-list {
  display: grid;
  gap: 7px;
}
.cognitive-preview-list > strong {
  color: var(--text);
  font-size: 12px;
}
.cognitive-preview-list > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.cognitive-preview-list em {
  color: var(--teal);
  font-style: normal;
  font-weight: 700;
}
.cognitive-preview-note {
  margin: 0;
  padding: 10px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.tree-row {
  grid-template-columns: 8px minmax(0, 1fr) auto;
  min-height: 50px;
  border-color: var(--line);
  border-radius: 6px;
  background: #fafbfb;
}
.tree-row:has(.drag-handle) {
  grid-template-columns: 18px 8px minmax(0, 1fr) auto 30px 30px;
}
.tree-row:hover, .tree-row.selected {
  border-color: #aebdc5;
  background: #ffffff;
}
.tree-row.selected { box-shadow: inset 3px 0 var(--accent); }
.node-title {
  border: 0 !important;
  background: transparent !important;
  color: var(--text) !important;
  font-size: 14px;
  box-shadow: none !important;
}
.node-title[readonly] { cursor: default; }
.node-claim { color: var(--muted); font-size: 12px; }
.icon-button {
  border-color: var(--line);
  background: #ffffff;
  color: var(--faint);
}
.icon-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
}
.inspector-metric, .metric-tile, .evidence-chip {
  border-color: var(--line);
  background: var(--surface-soft);
}
.evidence-chip strong { color: var(--muted); font-size: 11px; }
.evidence-chip {
  width: 100%;
  color: inherit;
  text-align: left;
}
.evidence-chip:disabled { cursor: default; opacity: 1; }
.evidence-chip q {
  display: block;
  margin: 5px 0;
  color: var(--text);
  font-size: 11px;
  line-height: 1.45;
}
.evidence-chip small {
  color: var(--faint);
  font-size: 10px;
}
.claim-narrative-state {
  margin: 0 0 14px;
  padding: 11px 12px;
  border: 1px solid #c8ddd4;
  border-radius: 6px;
  background: #f1f8f4;
}
.claim-narrative-state strong,
.claim-narrative-state span { display: block; }
.claim-narrative-state strong { color: var(--success); font-size: 12px; }
.claim-narrative-state span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}
.claim-narrative-state.needs-decision {
  border-color: #e4b4aa;
  background: #fff7f5;
}
.claim-narrative-state.needs-decision strong { color: var(--danger); }

.review-workspace, .version-workspace { padding: 22px; }
.review-workspace > .panel-heading {
  align-items: center;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}
.review-safety {
  padding: 7px 10px;
  border: 1px solid #bcd8cc;
  border-radius: 999px;
  background: #eef8f2;
  color: var(--success);
  font-size: 11px;
  font-weight: 650;
}
.starter-review-note {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 16px 0 0;
  padding: 12px 13px;
  border: 1px solid #d5e3e1;
  border-radius: 6px;
  background: #f2f8f7;
}
.starter-review-note strong { color: var(--text); font-size: 12px; }
.starter-review-note span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.review-empty {
  padding: 70px 24px;
  color: var(--muted);
  text-align: center;
}
.review-empty h3 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 19px;
}
.review-empty p {
  max-width: 620px;
  margin: 0 auto 20px;
  line-height: 1.6;
}
.change-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin: 16px 0;
}
.change-summary > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
}
.change-summary strong {
  display: block;
  color: var(--text);
  font-size: 20px;
}
.change-summary span { color: var(--faint); font-size: 11px; }
.review-workspace .suggestion-list { gap: 12px; }
.suggestion-card {
  padding: 17px;
  border-color: var(--line);
  border-left-width: 4px;
  border-radius: 7px;
  background: #ffffff;
}
.suggestion-card.starter-suggestion { border-left-color: var(--teal); }
.starter-suggestion .proposal-heading > span { color: var(--teal); }
.proposal-heading {
  grid-template-columns: 20px auto minmax(0, 1fr) auto;
  gap: 9px;
}
.proposal-heading input { width: 17px; height: 17px; accent-color: var(--teal); }
.proposal-heading span { font-size: 10px; }
.proposal-heading small { color: var(--faint); font-size: 11px; }
.suggestion-card strong { color: var(--text); font-size: 14px; }
.suggestion-card > p {
  margin: 10px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.proposal-claim {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-left: 3px solid #9fc9c5;
  border-radius: 5px;
  background: #f8fafb;
  color: var(--text);
  font-size: 13px;
  line-height: 1.55;
}
.proposal-claim.before {
  border-color: #e4c4be;
  border-left-color: #c56b5d;
  background: #fff8f6;
}
.proposal-claim.after {
  border-color: #bad9c7;
  border-left-color: #4b9b6c;
  background: #f4faf6;
}
.proposal-diff small, .proposal-evidence small {
  color: var(--faint);
  font-size: 10px;
}
.proposal-evidence q {
  max-height: none;
  padding: 11px 12px;
  border-left: 3px solid var(--teal);
  background: #f0f7f6;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}
.suggestion-actions {
  align-items: center;
  justify-content: flex-start;
  margin-top: 12px;
}
.suggestion-actions button {
  color: var(--teal);
  font-size: 11px;
}
.starter-suggestion .suggestion-actions button:first-child { color: var(--teal); }
.starter-suggestion .suggestion-actions button:nth-child(2) { color: var(--danger); }
.suggestion-actions span {
  margin-left: auto;
  color: var(--faint);
  font-size: 10px;
}
.starter-lock-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}
.starter-lock-option input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--teal);
}
.starter-lock-option strong,
.starter-lock-option small { display: block; }
.starter-lock-option strong { color: var(--text); font-size: 12px; }
.starter-lock-option small {
  margin-top: 3px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.4;
}
.hypothesis-badge {
  color: var(--teal);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}
.hypothesis-note {
  display: grid;
  gap: 3px;
  margin: 0 0 14px;
  padding: 10px 11px;
  border: 1px solid #c7dfdc;
  border-radius: 6px;
  background: #f1f8f7;
}
.hypothesis-note strong { color: var(--teal); font-size: 11px; }
.hypothesis-note span { color: var(--muted); font-size: 10px; }
.takeaways-empty-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.review-actionbar {
  position: sticky;
  z-index: 4;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding: 13px 15px;
  border: 1px solid #b9c8cc;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 12px 32px rgba(35, 50, 58, .14);
  backdrop-filter: blur(10px);
}
.review-actionbar strong {
  display: block;
  color: var(--text);
  font-size: 13px;
}
.review-actionbar span { color: var(--faint); font-size: 11px; }

.version-list { gap: 0; }
.version-row {
  grid-template-columns: 54px minmax(0, 1fr) auto;
  gap: 4px 14px;
  min-height: 68px;
  align-items: center;
  padding: 12px 4px;
  border-color: var(--line);
}
.version-row strong { color: var(--accent-strong); font-size: 13px; }
.version-row span { color: var(--text); font-size: 12px; }
.version-row time { color: var(--faint); font-size: 11px; }
.version-row button {
  padding: 7px 11px !important;
  border: 1px solid var(--line-strong) !important;
  color: var(--teal) !important;
  font-size: 11px !important;
}
.version-summary {
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff5e8;
  color: var(--accent-strong);
  font-size: 12px;
}
.version-diff-list { display: grid; gap: 10px; }
.version-diff {
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 6px;
}
.version-diff.add, .version-diff.merge { border-left-color: var(--success); }
.version-diff.challenge { border-left-color: var(--danger); }
.version-diff-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 9px;
}
.version-diff-heading span {
  color: var(--teal);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}
.version-diff-heading strong { color: var(--text); font-size: 13px; }
.diff-copy {
  margin-top: 7px;
  padding: 9px 10px;
  border-radius: 5px;
  background: var(--surface-soft);
}
.diff-copy.before { background: #fff5f3; }
.diff-copy.after { background: #f1f8f3; }
.diff-copy small { color: var(--faint); font-size: 9px; text-transform: uppercase; }
.diff-copy p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.diff-boundary {
  display: grid;
  gap: 8px;
  margin-top: 9px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}
.diff-boundary > strong {
  color: var(--text);
  font-size: 11px;
}
.diff-boundary > div {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}
.diff-boundary small {
  padding-top: 3px;
  color: var(--faint);
  font-size: 9px;
  text-transform: uppercase;
}
.diff-reason { margin: 9px 0 0; color: var(--faint); font-size: 11px; }
.version-snapshot-title {
  margin: 6px 0 -3px;
  color: var(--text);
  font-size: 14px;
}
.version-claim-list > div {
  border-color: var(--line);
  background: var(--surface-soft);
}
.version-claim-list strong { color: var(--text); font-size: 12px; }
.version-claim-list p { color: var(--muted); font-size: 11px; }

.modal-backdrop { background: rgba(31, 42, 47, .35); }
.modal-card {
  border-color: var(--line-strong);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 28px 70px rgba(35, 50, 58, .22);
}
.modal-head, .modal-actions { border-color: var(--line); }
.modal-head h2 { color: var(--text); }
.modal-head p, .dialog-copy { color: var(--muted); }
.form-section-label {
  display: block;
  margin-bottom: 7px;
  color: var(--faint) !important;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}
.question-examples {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.question-example {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
  color: var(--text);
  text-align: left;
}
.question-example:hover { border-color: var(--teal); background: #f2f8f7; }
.question-example strong { display: block; font-size: 11px; }
.question-example span {
  display: block;
  margin-top: 4px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.35;
}
.accepted-change-story {
  padding-top: 18px;
}
.accepted-change-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.accepted-change-heading h3 {
  margin: 3px 0 5px;
  color: var(--text);
  font-size: 18px;
}
.accepted-change-heading p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.accepted-change-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 18px;
  margin-top: 8px;
}
.accepted-tension-summary {
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.accepted-tension-summary > strong {
  color: var(--danger);
  font-size: 14px;
}
.accepted-tension-summary > p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}
.version-snapshot {
  margin-top: 16px;
  border-top: 1px solid var(--line);
}
.version-snapshot > summary {
  padding: 14px 0;
  color: var(--teal);
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}
.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
}
.segmented-control button {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.segmented-control button.active {
  border-color: var(--line);
  background: #ffffff;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(35, 50, 58, .08);
}
.import-method-host { min-height: 168px; }

@media (max-width: 980px) {
  .decision-brief { grid-template-columns: 1fr; }
  .change-pulse {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .takeaway-lead-layout { grid-template-columns: 1fr; }
  .takeaway-change-panel { position: static; }
  .takeaway-module-grid { grid-template-columns: 1fr 1fr; }
  .narrative-grid { grid-template-columns: 1fr; }
  .narrative-list + .narrative-list {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
  .structure-layout { grid-template-columns: 1fr; }
  .claim-inspector { position: static; }
  .structure-layout.is-editing { grid-template-columns: 1fr; }
  .path-editor-layout { grid-template-columns: 190px minmax(0, 1fr); }
}

@media (max-width: 760px) {
  .app-sidebar {
    display: flex;
    padding: 8px 12px;
  }
  .app-nav-item { width: auto; min-width: 92px; }
  .field-command {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }
  .field-command .app-btn { width: 100%; }
  .field-command-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .field-tabs {
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
  }
  .field-tab { min-width: 98px; }
  .field-tab { scroll-snap-align: start; }
  .takeaways-header,
  .takeaways-pending {
    align-items: stretch;
    flex-direction: column;
  }
  .takeaway-revision {
    padding: 12px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }
  .takeaway-module-grid { grid-template-columns: 1fr; }
  .knowledge-path-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .knowledge-path-step { min-width: 210px; }
  .tension-workspace { padding: 16px; }
  .tension-workspace-heading { flex-direction: column; }
  .tension-compare { grid-template-columns: 1fr; }
  .tension-card-heading,
  .tension-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .judgment-lead-row {
    grid-template-columns: 24px minmax(0, 1fr);
  }
  .judgment-lead-row em {
    grid-column: 2;
    text-align: left;
  }
  .sources-panel .source-list { grid-template-columns: 1fr; }
  .structure-layout { display: flex; flex-direction: column; }
  .structure-panel { order: 1; }
  .claim-inspector { order: 2; }
  .path-editor-layout { grid-template-columns: 1fr; }
  .path-directory {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .path-directory-heading { display: none; }
  .path-directory-list {
    display: flex;
    overflow-x: auto;
    padding: 8px;
    scroll-snap-type: x proximity;
  }
  .path-directory-item {
    min-width: 180px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    scroll-snap-align: start;
  }
  .path-directory-item.is-active { border-bottom-color: var(--teal); }
  .path-directory-legend { display: none; }
  .edit-tension-pair { grid-template-columns: 1fr; }
  .edit-tension-pair > em { min-height: 22px; }
  .edit-tension-actions {
    display: flex;
    overflow-x: auto;
  }
  .edit-tension-actions button {
    min-width: 118px;
    flex: 0 0 auto;
  }
  .tension-input-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .tension-input-modes {
    display: flex;
    overflow-x: auto;
  }
  .tension-input-modes button {
    min-width: 100px;
    flex: 0 0 auto;
  }
  .tension-conversation-input { grid-template-columns: 1fr; }
  .edit-revision-bar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }
  .edit-revision-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .edit-revision-actions .btn { width: 100%; }
  .knowledge-claim-row {
    grid-template-columns: 22px minmax(0, 1fr);
  }
  .knowledge-claim-meta {
    grid-column: 2;
    grid-auto-flow: column;
    justify-content: start;
    justify-items: start;
  }
  .accepted-change-heading {
    flex-direction: column;
  }
  .accepted-change-list { grid-template-columns: 1fr; }
  .review-workspace, .version-workspace, .workbench-panel { padding: 16px; }
  .review-workspace > .panel-heading { align-items: flex-start; }
  .starter-review-note { align-items: flex-start; flex-direction: column; }
  .review-safety { display: none; }
  .review-actionbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
    bottom: 8px;
  }
  .review-actionbar .app-btn { width: 100%; }
  .question-examples { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .proposal-heading {
    grid-template-columns: 20px auto minmax(0, 1fr);
  }
  .proposal-heading small {
    grid-column: 3;
  }
  .tree-row, .tree-row:has(.drag-handle) {
    grid-template-columns: 8px minmax(0, 1fr);
  }
  .tree-row:has(.drag-handle) {
    grid-template-columns: 16px 8px minmax(0, 1fr);
  }
  .tree-row .evidence-count, .tree-row .icon-button {
    grid-column: auto;
  }
  .path-editor-main { padding: 12px; }
  .path-editor-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .edit-claim-row {
    grid-template-columns: 16px 22px minmax(0, 1fr);
  }
  .edit-claim-row > .icon-button {
    grid-column: auto;
  }
  .cognitive-preview-metrics { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------------- editorial intelligence UI */
:root {
  --bg: #f3f5f4;
  --surface: #ffffff;
  --surface-raised: #fafbfa;
  --surface-soft: #f0f3f2;
  --line: #dfe5e3;
  --line-strong: #bec9c6;
  --text: #172023;
  --muted: #526066;
  --faint: #7b898d;
  --accent: #a65f12;
  --accent-strong: #804608;
  --teal: #176d66;
  --success: #28734c;
  --danger: #b44739;
  --info: #315f9d;
  --shadow-lg: 0 18px 46px rgba(25, 40, 43, .08);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "SF Pro Text", "Segoe UI", Arial, sans-serif;
}

.app-shell,
.app-shell * {
  letter-spacing: 0;
}

.app-shell {
  grid-template-columns: 84px minmax(0, 1fr);
}

.app-sidebar {
  width: 84px;
  align-items: center;
  gap: 10px;
  padding: 20px 12px;
  border-color: var(--line) !important;
  background: #ffffff !important;
  box-shadow: none;
}

.app-brand {
  width: 100%;
  justify-content: center;
  margin: 0 0 18px;
  padding: 0 0 20px;
}

.app-brand .mark {
  width: 34px;
  height: 34px;
}

.app-brand .word {
  display: none;
}

.app-brand > span:first-child {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
}

.app-brand > span:last-child {
  display: none;
}

.app-nav-item {
  position: relative;
  width: 48px;
  min-width: 48px;
  min-height: 48px;
  justify-content: center;
  padding: 0;
  border: 0 !important;
  border-radius: 6px;
  color: var(--faint) !important;
  font-size: 0;
}

.app-nav-item svg {
  width: 19px;
  height: 19px;
  opacity: 1;
}

.app-nav-item:hover {
  background: #f0f4f3 !important;
  color: var(--text) !important;
}

.app-nav-item.active {
  background: #e8f2f0 !important;
  color: var(--teal) !important;
  box-shadow: inset 3px 0 var(--teal);
}

.app-nav-item[title]::after {
  position: absolute;
  z-index: 30;
  left: calc(100% + 10px);
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #172023;
  color: #ffffff;
  content: attr(title);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-3px);
  transition: opacity .15s ease, transform .15s ease;
  white-space: nowrap;
}

.app-nav-item[title]:hover::after {
  opacity: 1;
  transform: translateX(0);
}

.app-userchip {
  width: 100%;
  flex-direction: column;
  gap: 6px;
  padding: 10px 4px;
  border: 0 !important;
  background: transparent !important;
}

.app-userchip > div {
  display: none;
}

.app-userchip .avatar {
  width: 32px;
  height: 32px;
  background: #d79842;
  color: #2d1d08;
}

.app-userchip .app-nav-item {
  width: 34px;
  min-width: 34px;
  min-height: 34px;
}

.app-content {
  width: min(1580px, 100%);
  max-width: none;
  padding: 26px 38px 64px;
}

.app-btn {
  min-height: 36px;
  padding: 8px 14px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 12px;
  font-weight: 650;
}

.app-btn-primary {
  border-color: #174f49 !important;
  background: #174f49 !important;
  color: #ffffff !important;
  box-shadow: none;
}

.app-btn-primary:hover {
  border-color: #103e39 !important;
  background: #103e39 !important;
}

.app-btn-ghost {
  border-color: var(--line-strong) !important;
  background: transparent !important;
  color: var(--muted) !important;
}

.app-btn-ghost:hover {
  border-color: #96a5a1 !important;
  background: #ffffff !important;
  color: var(--text) !important;
}

.research-header {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 24px;
  margin-bottom: 0;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.back-link {
  color: var(--faint);
  font-size: 11px;
}

.back-link:hover {
  color: var(--teal);
}

.research-title-block h1 {
  margin: 8px 0 5px;
  font-size: 30px;
  font-weight: 760;
  line-height: 1.12;
}

.research-title-block p {
  max-width: 960px;
  color: var(--muted);
  font-size: 14px;
}

.research-header-actions {
  align-self: end;
}

.research-header-actions .app-btn {
  min-height: 34px;
  padding: 7px 11px;
  border-color: transparent !important;
  color: var(--faint) !important;
}

.research-header-actions .app-btn:hover {
  border-color: var(--line) !important;
}

.template-pill {
  min-height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--teal);
  font-size: 10px;
}

.field-command {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  min-height: 74px;
  margin: 0;
  padding: 12px 0 13px 25px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.field-command::before {
  position: absolute;
  top: 22px;
  left: 1px;
  width: 9px;
  height: 9px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 1px #a8c8b7;
  content: "";
}

.field-command.needs-attention::before {
  background: var(--accent);
  box-shadow: 0 0 0 1px #d7b988;
}

.field-command .eyebrow {
  margin-bottom: 2px;
  color: var(--faint);
  font-size: 9px;
}

.field-command h2 {
  font-size: 14px;
  font-weight: 720;
}

.field-command p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.field-pulse-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 13px;
  margin-top: 6px;
}

.field-pulse-meta span {
  position: relative;
  color: var(--faint);
  font-size: 9px;
}

.field-pulse-meta span + span::before {
  position: absolute;
  left: -8px;
  color: var(--line-strong);
  content: "·";
}

.field-command-actions {
  gap: 7px;
}

.field-command-actions .app-btn {
  min-height: 34px;
  padding: 7px 12px;
}

.field-tabs {
  gap: 28px;
  margin: 0 0 20px;
  padding: 0;
  overflow-x: auto;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.field-tab {
  position: relative;
  min-width: auto;
  min-height: 46px;
  flex: 0 0 auto;
  gap: 7px;
  padding: 0 2px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: var(--faint);
  font-size: 12px;
  font-weight: 650;
}

.field-tab:hover {
  color: var(--text);
}

.field-tab.is-active {
  border-color: var(--teal);
  background: transparent;
  color: var(--text);
  box-shadow: none;
}

.field-tab strong {
  display: none;
  min-width: 19px;
  height: 19px;
  border-radius: 4px;
  background: #e8eeec;
  color: var(--muted);
}

.field-tab.shows-count strong {
  display: grid;
}

.field-tab.has-attention strong {
  background: #f7e8d2;
  color: var(--accent-strong);
}

.takeaways-workspace {
  gap: 20px;
}

.takeaways-header {
  padding: 6px 0 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.takeaways-header h2 {
  margin-top: 5px;
  font-size: 25px;
  font-weight: 730;
}

.takeaways-header p {
  max-width: 760px;
  font-size: 12px;
}

.takeaway-revision {
  min-width: 160px;
  padding-left: 22px;
}

.decision-brief {
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .7fr);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: none;
}

.current-answer {
  padding: 30px 34px;
}

.takeaway-section-heading {
  margin-bottom: 8px;
  padding-bottom: 18px;
}

.takeaway-section-heading h2 {
  max-width: 660px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
}

.judgment-lead-row {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 15px;
  padding: 18px 0;
}

.judgment-lead-row > span {
  color: var(--faint);
  font-size: 9px;
}

.judgment-lead-row div strong {
  font-size: 14px;
  line-height: 1.45;
}

.judgment-lead-row em {
  padding-top: 2px;
  color: var(--success);
}

.judgment-lead-row em.needs-decision {
  color: var(--danger);
}

.change-pulse {
  padding: 30px 26px;
  border-left: 1px solid var(--line);
  background: #f0f4f3;
}

.change-pulse h2 {
  font-size: 17px;
  line-height: 1.35;
}

.change-clear {
  padding: 9px 0;
  border: 0;
  border-top: 1px solid #cadbd3;
  border-bottom: 1px solid #cadbd3;
  border-radius: 0;
  background: transparent;
}

.change-pulse-list button {
  padding: 10px 0;
}

.knowledge-path-strip {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 24px;
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.knowledge-path-step {
  min-width: 180px;
}

.knowledge-path-step strong {
  font-size: 12px;
}

.tension-workspace {
  padding: 24px 28px;
  border: 1px solid #e5c4b9;
  border-left: 4px solid var(--danger);
  border-radius: 4px;
  background: #fffdfc;
}

.tension-card {
  padding: 18px 0 0;
  border: 0;
  border-top: 1px solid #ead6d0;
  border-radius: 0;
  background: transparent;
}

.tension-compare {
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.tension-compare > div,
.tension-compare > div:last-child {
  padding: 14px 16px;
  border-radius: 0;
  background: transparent;
}

.tension-compare > div + div {
  border-left: 1px solid var(--line);
}

.narrative-grid {
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.narrative-list {
  padding: 22px 24px;
}

.narrative-list:first-child {
  padding-left: 0;
}

.narrative-list:last-child {
  padding-right: 0;
}

.narrative-list-heading h2 {
  font-size: 14px;
}

.workbench-panel,
.inspector-panel,
.review-workspace,
.version-workspace {
  border-color: var(--line);
  border-radius: 4px;
  background: #ffffff;
  box-shadow: none;
}

.sources-panel {
  padding: 6px 0 0;
  border: 0;
  background: transparent;
}

.sources-panel > .panel-heading {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.sources-panel .source-list {
  gap: 0 18px;
}

.source-card {
  padding: 18px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.source-card:hover {
  background: transparent;
}

.source-kind,
.source-thumb {
  border-radius: 4px;
  background: #edf3f1;
}

.structure-layout {
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, .65fr);
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
}

.structure-layout > .workbench-panel,
.structure-layout > .inspector-panel {
  border: 0;
  border-radius: 0;
}

.structure-panel {
  min-width: 0;
}

.claim-inspector {
  top: 20px;
  padding: 22px;
  border-left: 1px solid var(--line) !important;
  background: #f7f9f8;
}

.claim-inspector .panel-heading h2 {
  font-size: 16px;
}

.claim-narrative-state,
.hypothesis-note,
.applicability-summary,
.applicability-editor {
  border-radius: 4px;
}

.hypothesis-note {
  border-color: #c9d8e8;
  background: #f1f5fa;
}

.hypothesis-note strong {
  color: var(--info);
}

.outline-canvas > .knowledge-path-strip {
  padding: 18px 0;
}

.knowledge-path-group {
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
}

.knowledge-path-group-heading {
  padding: 14px 4px;
  background: transparent;
}

.knowledge-claim-row {
  padding: 15px 4px;
}

.knowledge-claim-row:hover,
.knowledge-claim-row.is-selected {
  background: #f4f8f7;
}

.structure-layout.is-editing {
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 0;
}

.structure-layout.is-editing .structure-panel > .panel-heading {
  padding: 18px 24px 13px;
}

.structure-layout.is-editing .outline-status {
  padding: 0 24px 15px;
}

.path-editor-layout {
  grid-template-columns: 220px minmax(0, 1fr);
}

.path-directory {
  background: #f3f6f5;
}

.path-directory-heading {
  padding: 18px 17px 14px;
}

.path-directory-item {
  min-height: 54px;
  padding: 9px 13px;
  border-left-width: 2px;
}

.path-directory-item:hover {
  background: #eaf1ef;
}

.path-directory-item.is-active {
  background: #e4efed;
}

.path-editor-main {
  gap: 14px;
  padding: 20px 24px 28px;
}

.path-editor-heading {
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.path-editor-heading h3 {
  font-size: 18px;
}

.edit-claim-list {
  gap: 0;
}

.edit-claim-row {
  grid-template-columns: 14px 24px minmax(0, 1fr) 30px 30px;
  gap: 9px;
  padding: 13px 5px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 2px solid transparent;
  border-radius: 0;
  background: transparent;
}

.edit-claim-row:hover {
  border-color: var(--line);
  background: #f8faf9;
}

.edit-claim-row.is-selected {
  border-left-color: var(--teal);
  background: #f1f7f5;
  box-shadow: none;
}

.edit-claim-input {
  min-height: 42px;
  font-size: 12px;
}

.applicability-chips span {
  border-color: #c8d9d5;
  border-radius: 3px;
  background: transparent;
  color: var(--teal);
}

.edit-tension-card {
  padding: 20px;
  border: 1px solid #e2c0b3;
  border-left: 4px solid var(--danger);
  border-radius: 4px;
  background: #fffdfc;
}

.edit-revision-bar {
  right: 24px;
  bottom: 18px;
  left: 108px;
  border-radius: 6px;
  box-shadow: 0 14px 34px rgba(24, 36, 39, .12);
}

.review-workspace,
.version-workspace {
  padding: 24px 28px;
}

.proposal-card,
.accepted-change-set,
.version-row {
  border-radius: 4px;
  box-shadow: none;
}

.eyebrow,
.takeaway-topic,
.takeaway-status,
.knowledge-path-group-heading span,
.tension-card-heading span {
  letter-spacing: 0;
}

@media (max-width: 980px) {
  .app-content {
    padding-right: 26px;
    padding-left: 26px;
  }

  .decision-brief {
    grid-template-columns: 1fr;
  }

  .change-pulse {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .structure-layout,
  .structure-layout.is-editing {
    grid-template-columns: 1fr;
  }

  .claim-inspector {
    position: static;
    border-top: 1px solid var(--line) !important;
    border-left: 0 !important;
  }
}

@media (max-width: 760px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    z-index: 20;
    width: 100%;
    height: 62px;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding: 8px 14px;
    border-right: 0 !important;
    border-bottom: 1px solid var(--line) !important;
  }

  .app-brand {
    display: flex !important;
    width: auto;
    margin: 0 8px 0 0;
    padding: 0 14px 0 0;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .app-brand .mark {
    width: 30px;
    height: 30px;
  }

  .app-nav-item {
    width: auto;
    min-width: 48px;
    min-height: 42px;
    padding: 0 11px;
    font-size: 12px;
  }

  .app-nav-item[title]::after {
    display: none;
  }

  .app-userchip {
    display: flex !important;
    width: auto;
    flex-direction: row;
    margin-left: auto;
    padding: 0;
  }

  .app-userchip > div {
    display: none;
  }

  .app-userchip .avatar {
    width: 30px;
    height: 30px;
  }

  .app-userchip .app-nav-item {
    width: 34px;
    padding: 0;
    font-size: 0;
  }

  .app-content {
    padding: 20px 18px 48px;
  }

  .research-header {
    grid-template-columns: 1fr;
  }

  .research-title-block h1 {
    font-size: 26px;
  }

  .research-header-actions {
    justify-content: flex-start;
  }

  .field-command {
    grid-template-columns: 1fr;
    gap: 11px;
    padding: 13px 0 14px 22px;
  }

  .field-command-actions {
    display: flex;
  }

  .field-command .app-btn {
    width: auto;
  }

  .field-tabs {
    gap: 22px;
    margin-bottom: 16px;
  }

  .field-tab {
    min-width: auto;
  }

  .takeaways-header {
    gap: 14px;
  }

  .current-answer,
  .change-pulse {
    padding: 24px 20px;
  }

  .takeaway-section-heading h2 {
    font-size: 21px;
  }

  .knowledge-path-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .knowledge-path-steps {
    padding-bottom: 5px;
  }

  .narrative-list,
  .narrative-list:first-child,
  .narrative-list:last-child {
    padding: 18px 0;
  }

  .structure-layout {
    border-right: 0;
    border-left: 0;
  }

  .path-directory {
    border-right: 0;
  }

  .path-editor-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .path-directory {
    min-height: 0;
    border-bottom: 1px solid var(--line);
  }

  .path-directory-list {
    display: flex;
    width: 100%;
    overflow-x: auto;
  }

  .path-directory-item {
    min-width: 166px;
    flex: 0 0 auto;
    border-left: 0;
    border-bottom: 2px solid transparent;
  }

  .path-directory-item.is-active {
    border-bottom-color: var(--teal);
  }

  .path-editor-main {
    padding: 16px 14px 22px;
  }

  .edit-revision-bar {
    right: auto;
    bottom: auto;
    left: auto;
    border-radius: 4px;
    box-shadow: none;
  }

  .sources-panel .source-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .research-header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .research-header-actions .app-btn {
    width: 100%;
  }

  .field-command-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .field-command .app-btn {
    width: 100%;
  }

  .judgment-lead-row {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .judgment-lead-row em {
    grid-column: 2;
  }

  .path-editor-heading {
    align-items: stretch;
  }

  .path-editor-heading .app-btn {
    width: 100%;
  }

  .edit-claim-row {
    grid-template-columns: 14px 22px minmax(0, 1fr);
  }
}
