:root {
  color-scheme: dark;
  --paper: #fffaf1;
  --ink: #101415;
  --muted: #687678;
  --line: rgba(16, 20, 21, .16);
  --line-dark: rgba(255, 250, 241, .12);
  --copper: #b56a3b;
  --green: #0f7a5a;
  --blue: #2b6f9f;
  --red: #a33d35;
  --gold: #9f7b2d;
  --steel: #20343a;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px) 0 0 / 72px 72px,
    radial-gradient(circle at 18% 12%, rgba(181, 106, 59, .20), transparent 24rem),
    linear-gradient(135deg, #071015, #141d20 45%, #201915);
  letter-spacing: 0;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(43, 111, 159, .35); outline-offset: 2px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 392px) minmax(0, 1fr); width: 100%; }
.command-rail { min-width: 0; padding: 20px; color: var(--paper); background: rgba(9, 13, 16, .88); border-right: 1px solid var(--line-dark); display: flex; flex-direction: column; gap: 16px; }
.brand-lockup { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid rgba(255, 250, 241, .2); background: linear-gradient(135deg, #1d2a2e, #0d1215); border-radius: 8px; font-weight: 900; }
h1, h2, h3, h4, h5, p { margin: 0; }
h1 { font-size: 20px; line-height: 1.08; }
h2 { font-size: clamp(24px, 3vw, 42px); line-height: 1.02; max-width: 980px; }
h3 { font-size: 17px; line-height: 1.2; }
h4 { font-size: 12px; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.brand-lockup p, .overline { color: rgba(255, 250, 241, .62); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }

.operator-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.operator-strip div, .control-panel, .receipt-panel { border: 1px solid var(--line-dark); background: rgba(255, 250, 241, .055); border-radius: 8px; }
.operator-strip div { padding: 10px; }
.operator-strip strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.control-panel, .receipt-panel { padding: 15px; }
.section-title, .surface-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; min-width: 0; }
.section-title span, .surface-head span { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.section-title b { max-width: 170px; color: #b7ead8; font-size: 12px; overflow-wrap: anywhere; }

label { display: grid; gap: 7px; color: rgba(255, 250, 241, .72); font-size: 12px; margin-bottom: 12px; }
input, select, textarea { width: 100%; min-width: 0; min-height: 42px; border: 1px solid rgba(255, 250, 241, .18); border-radius: 8px; background: rgba(255, 250, 241, .92); color: var(--ink); padding: 10px 11px; }
textarea { resize: vertical; overflow-wrap: anywhere; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
button { width: 100%; min-height: 46px; border: 0; border-radius: 8px; font-weight: 900; cursor: pointer; }
.primary-action { color: #06100d; background: linear-gradient(135deg, #d2a15e, #7bd0af); }
.secondary-action { color: var(--paper); background: linear-gradient(135deg, #13232a, #0f7a5a); }
button:disabled { opacity: .6; cursor: wait; }
.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.receipt-panel dl { display: grid; gap: 8px; margin: 0; }
.receipt-panel div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-dark); }
dt { color: rgba(255, 250, 241, .58); }
dd { margin: 0; font-weight: 800; overflow-wrap: anywhere; text-align: right; }

.mission-board { min-width: 0; padding: 22px; background: linear-gradient(180deg, rgba(247, 244, 236, .96), rgba(226, 219, 207, .96)); overflow-x: hidden; }
.run-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.mission-board .overline { color: var(--copper); }
.run-token { flex: 0 1 270px; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 10px 12px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.signal-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.signal-bar div, .surface { border: 1px solid var(--line); background: rgba(255, 250, 241, .78); border-radius: 8px; box-shadow: 0 16px 40px rgba(10, 14, 15, .08); }
.signal-bar div { padding: 11px; }
.signal-bar span, .offer-grid span { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.signal-bar strong, .offer-grid strong { display: block; margin-top: 5px; overflow-wrap: anywhere; }
.board-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1.08fr) minmax(280px, .84fr); gap: 16px; }
.surface { min-width: 0; padding: 16px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.deal-command {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .86fr);
  gap: 18px;
  padding: 18px;
  color: var(--paper);
  border-radius: 8px;
  border: 1px solid rgba(255, 250, 241, .18);
  background:
    linear-gradient(135deg, rgba(10, 18, 20, .96), rgba(32, 52, 58, .94)),
    url("data:image/svg+xml,%3Csvg width='120' height='120' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 60h120M60 0v120' stroke='%23fffaf1' stroke-opacity='.06'/%3E%3C/svg%3E");
  box-shadow: 0 24px 70px rgba(10, 14, 15, .20);
}
.deal-command h3 { max-width: 860px; font-size: clamp(28px, 4vw, 58px); line-height: .96; letter-spacing: 0; }
.deal-command p { margin-top: 12px; max-width: 760px; color: rgba(255, 250, 241, .72); line-height: 1.45; }
.deal-metrics { display: grid; grid-template-columns: 1fr; gap: 10px; align-self: stretch; }
.deal-metrics div {
  border: 1px solid rgba(255, 250, 241, .14);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 250, 241, .07);
}
.deal-metrics span, .lead-rank span, .lead-facts span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.deal-metrics strong { display: block; margin-top: 6px; font-size: 24px; }
.deal-feed {
  min-width: 0;
  border: 1px solid rgba(16, 20, 21, .2);
  border-radius: 8px;
  background: rgba(255, 250, 241, .64);
  padding: 14px;
}
.lead-list { display: grid; gap: 12px; }
.lead-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(16, 20, 21, .14);
  box-shadow: 0 14px 36px rgba(10, 14, 15, .08);
}
.lead-rank {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 118px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0f2f34, #152025);
  color: var(--paper);
}
.lead-rank span { color: rgba(255, 250, 241, .58); }
.lead-rank strong { margin-top: 4px; font-size: 38px; line-height: 1; }
.lead-rank em { margin-top: 7px; font-style: normal; color: #f3c782; font-size: 12px; }
.lead-main { min-width: 0; display: grid; gap: 12px; }
.lead-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
}
.lead-title p { color: #647073; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 5px; }
.lead-title h4 {
  color: var(--ink);
  font-size: clamp(19px, 2vw, 28px);
  line-height: 1.05;
  text-transform: none;
  overflow-wrap: anywhere;
}
.lead-title > strong {
  flex: 0 0 auto;
  color: #0f5f48;
  font-size: clamp(21px, 2.6vw, 34px);
  line-height: 1;
  white-space: nowrap;
}
.lead-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.lead-facts div {
  min-width: 0;
  border: 1px solid rgba(16, 20, 21, .11);
  border-radius: 8px;
  background: rgba(255, 250, 241, .72);
  padding: 9px;
}
.lead-facts strong { display: block; margin-top: 4px; font-size: 13px; overflow-wrap: anywhere; }
.lead-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.lead-grid section { min-width: 0; }
.lead-grid h5 {
  color: #596568;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 7px;
}
.lead-grid p, .lead-grid li span {
  color: #596568;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.lead-grid ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.lead-grid li { border-left: 3px solid var(--blue); padding-left: 8px; }
.lead-grid li strong { display: block; font-size: 12px; color: var(--ink); }
.pill-stack { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-stack span {
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 8px;
  background: rgba(15, 122, 90, .12);
  color: #0f5f48;
  font-size: 11px;
  overflow-wrap: anywhere;
}
.pill-stack.danger span { background: rgba(163, 61, 53, .11); color: #8d332d; }
.empty-deals {
  border: 1px dashed rgba(16, 20, 21, .25);
  border-radius: 8px;
  padding: 22px;
  display: grid;
  gap: 8px;
}
.empty-deals span { color: #596568; }
.compact-offer { background: rgba(255, 250, 241, .9); }
.offer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.offer-grid div { border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .56); padding: 11px; min-width: 0; }
.offer-grid strong { font-size: 20px; color: #0f4f3f; }
.model-note { margin-top: 11px; color: #596568; font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }

.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.timeline li, .source, .signal, .evidence, .stage, .qiyas-row, .trace { border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 255, 255, .54); padding: 10px; min-width: 0; }
.timeline strong, .source strong, .signal strong, .qiyas-row strong, .trace strong { display: block; font-size: 13px; margin-bottom: 4px; overflow-wrap: anywhere; }
.timeline span, .source span, .signal span, .evidence, .stage, .qiyas-row, .trace span, .trace em { color: #596568; font-size: 12px; line-height: 1.45; }
.trace em { display: block; margin-top: 7px; font-style: normal; color: #2b6f9f; }
.source-list, .stack, .evidence-list, .stage-list, .qiyas-panel, .owner-trace { display: grid; gap: 10px; }
.matrix, .court-grid, .feedback-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-width: 0; }
.matrix > *, .court-grid > *, .feedback-grid > *, .board-grid > *, .app-shell > * { min-width: 0; }
.signal.good { border-left: 4px solid var(--green); }
.signal.risk { border-left: 4px solid var(--red); }
.stage { border-left: 4px solid var(--blue); }
.qiyas-row { border-left: 4px solid var(--gold); }
.qa-probe { position: fixed; left: -9999px; top: -9999px; }

@media (max-width: 1160px) {
  .app-shell { grid-template-columns: 1fr; }
  .command-rail { border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .board-grid { grid-template-columns: 1fr 1fr; }
  .deal-command, .lead-grid { grid-template-columns: 1fr 1fr; }
  .lead-facts { grid-template-columns: 1fr 1fr; }
  .span-3 { grid-column: span 2; }
}

@media (max-width: 760px) {
  .mission-board, .command-rail { padding: 14px; }
  .run-header, .section-title, .surface-head { align-items: flex-start; flex-direction: column; }
  .signal-bar, .board-grid, .matrix, .court-grid, .feedback-grid, .field-grid, .operator-strip, .offer-grid, .deal-command, .lead-card, .lead-facts, .lead-grid, .action-row { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
  .timeline { grid-template-columns: 1fr; }
  .lead-title { flex-direction: column; }
  .lead-title > strong { white-space: normal; }
}

/* Institutional deal terminal override: light, dense, clickable, and source-readable. */
:root {
  color-scheme: light;
  --paper: #fffdf8;
  --ink: #17201f;
  --muted: #62706d;
  --line: rgba(23, 32, 31, .14);
  --wash: #f2efe7;
  --mint: #dcefe5;
  --teal: #0e6d61;
  --brick: #944234;
  --navy: #183b56;
  --saffron: #b7832f;
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, #fbfaf5 0, #ede8db 100%);
}

.app-shell {
  display: block;
  min-height: 100vh;
}

.command-rail {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, .82fr) minmax(360px, 1fr) minmax(360px, 1.05fr);
  align-items: start;
  gap: 14px;
  padding: 14px 18px;
  color: var(--ink);
  background: rgba(255, 253, 248, .94);
  border-right: 0;
  border-bottom: 1px solid rgba(23, 32, 31, .14);
  box-shadow: 0 10px 26px rgba(21, 29, 28, .08);
  backdrop-filter: blur(14px);
}

.brand-lockup { grid-column: 1; }
.operator-strip { grid-column: 2; }
.control-panel { grid-column: 3; grid-row: 1 / span 2; }
.receipt-panel { grid-column: 1 / span 2; }

.brand-mark {
  color: var(--paper);
  background: linear-gradient(135deg, #17342f, #c08a42);
  border-color: rgba(23, 32, 31, .16);
}

.brand-lockup p,
.overline,
.command-rail label,
.command-rail .section-title span {
  color: #5c6a68;
}

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

.operator-strip div,
.control-panel,
.receipt-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
}

.operator-strip div {
  padding: 0 10px;
  border-left: 1px solid var(--line);
}

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

.control-panel .section-title {
  grid-column: 1 / -1;
  margin: 0;
}

.control-panel label:nth-of-type(3),
.control-panel .action-row {
  grid-column: 1 / -1;
}

.control-panel label,
.field-grid,
.action-row {
  margin: 0;
}

.field-grid,
.action-row {
  grid-template-columns: 1fr 1fr;
}

.primary-action,
.secondary-action {
  min-height: 42px;
  color: #fffdf8;
  background: #17342f;
  border: 1px solid rgba(23, 32, 31, .16);
  box-shadow: none;
}

.secondary-action {
  color: #17342f;
  background: #e6ddd0;
}

input,
select,
textarea {
  background: #fffdf8;
  border-color: rgba(23, 32, 31, .18);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}

.receipt-panel {
  padding: 0;
}

.receipt-panel div {
  border-top-color: rgba(23, 32, 31, .12);
}

.mission-board {
  padding: 22px clamp(16px, 3vw, 42px) 42px;
  background: transparent;
}

.run-header {
  align-items: end;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(23, 32, 31, .12);
}

h2 {
  font-size: clamp(30px, 4.2vw, 64px);
  max-width: 1120px;
  color: #16211f;
  overflow-wrap: anywhere;
}

.run-token,
.signal-bar div,
.surface,
.deal-feed,
.deal-command,
.deal-workspace,
.source-lane-arsenal {
  border-radius: 0;
  box-shadow: none;
}

.signal-bar div {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  padding: 6px 12px;
}

.signal-bar strong {
  font-size: 22px;
}

.board-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(340px, .82fr);
  gap: 18px;
}

.deal-command {
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  color: var(--ink);
  background: linear-gradient(135deg, #fffdf8 0, #e7f1eb 48%, #f2e5d2 100%);
  border: 1px solid rgba(23, 32, 31, .16);
}

.deal-command h3 {
  font-size: clamp(34px, 5vw, 76px);
  color: #14211f;
}

.deal-command p {
  color: #475653;
}

.deal-metrics div {
  background: rgba(255, 253, 248, .72);
  border-color: rgba(23, 32, 31, .13);
}

.deal-metrics span,
.lead-rank span,
.lead-facts span,
.value-ledger span,
.record-strip dt {
  color: #64716f;
}

.deal-workspace,
.source-lane-arsenal,
.deal-feed,
.surface {
  background: rgba(255, 253, 248, .82);
  border: 1px solid rgba(23, 32, 31, .13);
}

.deal-workspace {
  min-width: 0;
  padding: 18px;
}

.workspace-head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 18px;
  align-items: start;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(23, 32, 31, .12);
}

.workspace-head h3 {
  margin-top: 4px;
  font-size: clamp(26px, 3.2vw, 48px);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.workspace-head span {
  display: block;
  margin-top: 8px;
  color: #5c6866;
}

.record-strip {
  display: grid;
  gap: 8px;
  margin: 0;
}

.record-strip div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(23, 32, 31, .1);
}

.record-strip dd {
  color: var(--ink);
}

.value-ledger {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  margin-top: 16px;
  border: 1px solid rgba(23, 32, 31, .12);
  background: #fffdf8;
}

.value-ledger div {
  min-width: 0;
  padding: 13px;
  border-right: 1px solid rgba(23, 32, 31, .1);
}

.value-ledger div:last-child {
  border-right: 0;
}

.value-ledger strong {
  display: block;
  margin-top: 5px;
  color: #0e6d61;
  font-size: clamp(20px, 2.5vw, 32px);
  line-height: 1;
}

.value-ledger p,
.value-boundary {
  margin-top: 7px;
  color: #5f6b69;
  font-size: 12px;
  line-height: 1.45;
}

.value-boundary {
  padding: 11px 0 0;
}

.deal-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, .8fr);
  gap: 14px;
  margin-top: 17px;
}

.deal-detail-grid section {
  min-width: 0;
}

.selected-trace {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.selected-trace li {
  padding-left: 10px;
  border-left: 3px solid var(--teal);
}

.selected-trace strong,
.selected-trace span,
.selected-trace p,
.selected-evidence span {
  display: block;
  overflow-wrap: anywhere;
}

.selected-trace span,
.selected-trace p,
.selected-evidence span {
  margin-top: 3px;
  color: #596764;
  font-size: 12px;
  line-height: 1.45;
}

.lead-list {
  gap: 0;
  border-top: 1px solid rgba(23, 32, 31, .12);
}

.lead-row {
  width: 100%;
  min-height: unset;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 13px 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(23, 32, 31, .12);
  border-radius: 0;
}

.lead-row:hover,
.lead-row.selected {
  background: linear-gradient(90deg, rgba(14, 109, 97, .08), transparent 55%);
}

.lead-row.selected {
  box-shadow: inset 4px 0 0 var(--teal);
}

.lead-rank {
  min-height: 96px;
  color: #fffdf8;
  border-radius: 0;
  background: #17342f;
}

.lead-title > strong {
  display: grid;
  gap: 4px;
  color: #0e6d61;
}

.lead-title > strong span {
  color: #64716f;
  font-size: 10px;
  text-transform: uppercase;
}

.lead-facts div,
.timeline li,
.source,
.signal,
.evidence,
.stage,
.qiyas-row,
.trace {
  border-radius: 0;
  background: rgba(255, 255, 255, .48);
}

.lead-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.05fr) minmax(0, .75fr) minmax(0, 1.2fr);
}

.pill-stack span {
  border-radius: 2px;
  background: #dcefe5;
}

.pill-stack.danger span {
  background: #f1ddd6;
}

.source-lane-arsenal {
  padding: 16px;
}

.lane-list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(23, 32, 31, .12);
}

.lane-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.1fr) minmax(260px, 1fr) minmax(260px, 1fr) 132px;
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid rgba(23, 32, 31, .11);
}

.lane-row h4 {
  color: var(--ink);
  font-size: 16px;
  text-transform: none;
  margin: 4px 0;
}

.lane-row p,
.lane-row span,
.lane-row a {
  color: #596764;
  font-size: 12px;
  line-height: 1.45;
}

.lane-row strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
}

.lane-row a {
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
}

@media (max-width: 1240px) {
  .command-rail,
  .control-panel,
  .workspace-head,
  .deal-command,
  .value-ledger,
  .deal-detail-grid,
  .lane-row {
    grid-template-columns: 1fr 1fr;
  }

  .command-rail {
    position: static;
  }

  .brand-lockup,
  .operator-strip,
  .control-panel,
  .receipt-panel {
    grid-column: auto;
    grid-row: auto;
  }

  .control-panel .section-title,
  .control-panel label:nth-of-type(3),
  .control-panel .action-row,
  .span-3 {
    grid-column: span 2;
  }
}

@media (max-width: 780px) {
  html,
  body,
  .app-shell,
  .command-rail,
  .mission-board {
    max-width: 100%;
    overflow-x: hidden;
  }

  .command-rail,
  .control-panel,
  .field-grid,
  .action-row,
  .workspace-head,
  .deal-command,
  .value-ledger,
  .deal-detail-grid,
  .lane-row,
  .lead-row,
  .lead-grid,
  .lead-facts,
  .signal-bar,
  .board-grid {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3,
  .control-panel label:nth-of-type(3),
  .control-panel .action-row,
  .control-panel .section-title {
    grid-column: span 1;
  }

  .mission-board {
    width: 100%;
    padding: 18px;
  }

  .run-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .run-header > div,
  .deal-command-copy,
  .workspace-head > div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .run-token {
    width: 100%;
    flex: auto;
  }

  h2 {
    width: 100%;
    max-width: min(100%, 22rem);
    font-size: 28px;
    line-height: 1.04;
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .deal-command h3 {
    max-width: min(100%, 22rem);
    font-size: 38px;
    line-height: .98;
    overflow-wrap: anywhere;
  }

  .receipt-panel div {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 4px;
  }

  .receipt-panel dd {
    text-align: left;
  }

  button,
  select,
  textarea,
  input {
    max-width: 100%;
  }

  button {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .lead-title {
    flex-direction: column;
  }

  .value-ledger div {
    border-right: 0;
    border-bottom: 1px solid rgba(23, 32, 31, .1);
  }
}
