:root {
  --core-ink: #17211b;
  --core-muted: #647068;
  --core-line: #dce3de;
  --core-soft: #f3f6f4;
  --core-paper: #fbfcfb;
  --core-green: #286b4a;
  --core-green-dark: #164a32;
  --core-green-soft: #e8f2ec;
  --core-amber: #a25f0b;
  --core-red: #a43b36;
  --core-blue: #35617c;
}

#workspace-root {
  min-height: 100dvh;
  color: var(--core-ink);
  background: var(--core-soft);
}

#workspace-root button,
#workspace-root input,
#workspace-root textarea,
#workspace-root select {
  font: inherit;
  letter-spacing: 0;
}

#workspace-root button { color: inherit; }
#workspace-root svg { width: 19px; height: 19px; flex: 0 0 auto; }

.core-shell {
  display: grid;
  grid-template-columns: 216px minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--core-soft);
}

.core-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px 14px 18px;
  color: #eef5f0;
  background: #153b2b;
  border-right: 1px solid #0f2f22;
}

.core-brand,
.core-mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.core-brand { height: 44px; padding: 0 10px; font-size: 17px; }
.core-brand .brand-mark,
.core-mobile-brand .brand-mark { width: 30px; height: 30px; font-size: 14px; }

.core-nav {
  display: grid;
  gap: 4px;
  margin-top: 30px;
}

.core-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  color: #bdd0c4;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease, color 150ms ease;
}

.core-nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.core-nav-item.is-active { color: #fff; background: #286b4a; }
.core-nav-item span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.core-org {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 14px 10px 2px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.core-org span,
.core-org small { color: #a9bdb0; font-size: 12px; }
.core-org strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }

.core-main {
  position: relative;
  display: grid;
  grid-template-rows: 64px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.core-header {
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
  background: rgba(251,252,251,.96);
  border-bottom: 1px solid var(--core-line);
}

.core-mobile-brand { display: none; border: 0; background: transparent; }
.core-header-context { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.core-header-context span { max-width: 320px; overflow: hidden; color: var(--core-muted); font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.core-header-context strong { font-size: 14px; }

.core-avatar {
  width: 34px;
  height: 34px;
  margin-left: auto;
  border: 1px solid #b8c7bd;
  border-radius: 50%;
  color: var(--core-green-dark) !important;
  background: var(--core-green-soft);
  font-weight: 750;
  cursor: pointer;
}

.core-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 30px 34px 118px;
}

.view-stack,
.detail-page {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.view-stack { display: grid; gap: 26px; }
.view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; min-height: 74px; }
.view-heading h1,
.detail-header h1 { margin: 3px 0 0; font-size: clamp(25px, 2.3vw, 34px); line-height: 1.15; letter-spacing: 0; }
.view-heading p { max-width: 620px; margin: 7px 0 0; color: var(--core-muted); font-size: 14px; line-height: 1.5; }
.eyebrow { color: var(--core-green); font-size: 12px; font-weight: 750; }
.quiet-stat { flex: 0 0 auto; color: var(--core-muted); font-size: 13px; }

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--core-line);
  border-radius: 6px;
  background: var(--core-paper);
  cursor: pointer;
}

.primary-command,
.secondary-command,
.text-command,
.danger-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.primary-command { border: 1px solid var(--core-green); color: #fff !important; background: var(--core-green); }
.primary-command:hover { background: var(--core-green-dark); }
.secondary-command { border: 1px solid #bdc9c1; background: #fff; }
.text-command { min-height: 30px; padding: 4px 0; border: 0; color: var(--core-green) !important; background: transparent; }
.danger-text-button { border: 1px solid #e1c7c5; color: var(--core-red) !important; background: #fff; }
button:disabled { cursor: wait; opacity: .58; }
.is-busy svg { animation: core-spin 900ms linear infinite; }
@keyframes core-spin { to { transform: rotate(360deg); } }

.today-brief {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 21px 22px;
  border: 1px solid #c8d9ce;
  border-left: 4px solid var(--core-green);
  border-radius: 6px;
  background: #fff;
}

.brief-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: var(--core-green);
  background: var(--core-green-soft);
}
.today-brief small { color: var(--core-green); font-weight: 750; }
.today-brief h2 { margin: 5px 0 3px; font-size: 19px; }
.today-brief p { margin: 0; color: var(--core-muted); font-size: 14px; }

.content-section { display: grid; gap: 12px; }
.content-section > header,
.detail-band > header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.content-section h2,
.detail-band h2 { margin: 0; font-size: 16px; }
.content-section > header > small { max-width: 620px; color: var(--core-muted); font-size: 12px; text-align: right; }

.priority-list,
.company-list,
.action-list { overflow: hidden; border: 1px solid var(--core-line); border-radius: 6px; background: #fff; }
.priority-row,
.company-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 62px;
  padding: 10px 15px;
  border: 0;
  border-bottom: 1px solid #e8ece9;
  background: #fff;
  cursor: pointer;
  text-align: left;
}
.priority-row:last-child,
.company-row:last-child { border-bottom: 0; }
.priority-row:hover,
.company-row:hover { background: #f8faf8; }
.priority-row > span:nth-child(2),
.company-row > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.priority-row strong,
.company-row strong { overflow: hidden; font-size: 14px; white-space: nowrap; text-overflow: ellipsis; }
.priority-row small,
.company-row small { overflow: hidden; color: var(--core-muted); font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.priority-icon,
.company-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 5px;
  color: var(--core-green);
  background: var(--core-green-soft);
  font-size: 13px;
  font-weight: 750;
}
.priority-row em { padding: 3px 7px; border-radius: 4px; color: var(--core-muted); background: #eef2ef; font-size: 11px; font-style: normal; }
.priority-row .urgency-overdue { color: var(--core-red); background: #faecea; }
.priority-row .urgency-today { color: var(--core-amber); background: #fff2dc; }

.business-strip,
.business-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.business-card {
  display: grid;
  grid-template-rows: auto auto minmax(42px, auto) auto;
  gap: 10px;
  min-width: 0;
  min-height: 178px;
  padding: 16px;
  border: 1px solid var(--core-line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  text-align: left;
}
.business-card:hover { border-color: #9db4a6; box-shadow: 0 5px 18px rgba(23,55,39,.07); }
.business-card > strong { overflow: hidden; font-size: 16px; white-space: nowrap; text-overflow: ellipsis; }
.business-card > p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--core-muted); font-size: 13px; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.business-card-top,
.business-card-foot { display: flex; align-items: center; gap: 7px; color: var(--core-muted); font-size: 11px; }
.business-card-top em { font-style: normal; }
.business-card-top small { margin-left: auto; }
.business-card-foot { justify-content: space-between; margin-top: auto; }
.business-card-foot > span { display: flex; align-items: center; min-width: 0; gap: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.business-card-foot svg { width: 15px !important; height: 15px !important; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #c18b3e; }
.status-established,
.status-delivering { background: #3a865d; }
.status-paused,
.status-ended { background: #939b96; }
.status-changed { background: #35617c; }

.company-row { grid-template-columns: auto minmax(0,1fr) auto; min-height: 70px; }
.company-symbol { color: #315e77; background: #e9f0f4; }

.action-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  min-height: 66px;
  padding: 8px 14px;
  border-bottom: 1px solid #e8ece9;
}
.action-row:last-child { border-bottom: 0; }
.action-check { display: grid; place-items: center; width: 38px; height: 38px; border: 0; color: var(--core-green); background: transparent; cursor: pointer; }
.action-copy { display: grid; gap: 4px; padding: 8px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.action-copy strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.action-copy span { color: var(--core-muted); font-size: 12px; }
.action-row > em { color: var(--core-muted); font-size: 11px; font-style: normal; }
.action-row.is-done .action-copy strong { color: var(--core-muted); text-decoration: line-through; }

.empty-band {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 120px;
  padding: 22px;
  border: 1px dashed #b9c7be;
  border-radius: 6px;
  background: rgba(255,255,255,.62);
}
.empty-band > svg { width: 34px !important; height: 34px !important; color: var(--core-green); }
.empty-band h2 { margin: 0 0 5px; font-size: 17px; }
.empty-band p,
.section-empty { margin: 0; color: var(--core-muted); font-size: 13px; line-height: 1.55; }

.capture-bar {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 20px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: end;
  gap: 7px;
  width: min(720px, calc(100% - 54px));
  min-height: 58px;
  padding: 7px;
  transform: translateX(-50%);
  border: 1px solid #aabbb0;
  border-radius: 8px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 12px 35px rgba(24,52,37,.17);
  backdrop-filter: blur(12px);
}
.capture-bar textarea {
  align-self: center;
  width: 100%;
  max-height: 132px;
  padding: 10px 4px 8px;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  color: var(--core-ink);
  background: transparent;
  line-height: 1.45;
}
.capture-bar textarea::placeholder { color: #8a948e; }
.capture-bar .icon-button { border: 0; background: transparent; }
.capture-mic.is-recording,
[data-mic].is-recording { color: #fff !important; background: var(--core-red) !important; animation: mic-pulse 1.2s ease-in-out infinite; }
@keyframes mic-pulse { 50% { box-shadow: 0 0 0 6px rgba(164,59,54,.12); } }
.capture-send { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 6px; color: #fff !important; background: var(--core-green); cursor: pointer; }
.core-bottom-nav { display: none; }

.detail-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; margin-bottom: 18px; }
.legacy-note,
.degraded-note,
.model-note {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 5px;
  color: #65502e;
  background: #fff5e5;
  font-size: 12px;
}
.legacy-note { margin-bottom: 16px; }
.legacy-note svg,
.degraded-note svg { color: var(--core-amber); }
.model-note { color: var(--core-green-dark); background: var(--core-green-soft); }
.degraded-note button { margin-left: auto; border: 0; color: var(--core-green); background: transparent; font-weight: 700; cursor: pointer; }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(286px, .8fr); align-items: start; gap: 18px; }
.detail-primary { display: grid; gap: 16px; min-width: 0; }
.detail-form,
.detail-band,
.interpret-panel { padding: 20px; border: 1px solid var(--core-line); border-radius: 6px; background: #fff; }
.detail-section-heading { display: flex; justify-content: space-between; margin: 0 0 14px; }
.detail-section-heading:not(:first-child) { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e7ece8; }
.detail-section-heading small,
.detail-band header small,
.interpret-panel header small { color: var(--core-green); font-size: 11px; font-weight: 750; }
.detail-section-heading h2,
.interpret-panel h2 { margin: 3px 0 0; font-size: 16px; }
.field-grid { display: grid; grid-template-columns: 1.4fr .7fr .7fr; gap: 12px; }
.field-grid .field-summary,
.field-grid .field-goal,
.field-grid .field-next_step { grid-column: span 3; }
.field-grid.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field-grid.three-col > * { grid-column: auto; }
.money-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.money-grid .field-contract_data,
.money-grid .field-notes { grid-column: span 2; }
.detail-field { display: grid; align-content: start; gap: 6px; min-width: 0; color: #435048; font-size: 12px; }
.detail-field > span { display: flex; align-items: center; gap: 5px; min-height: 18px; }
.detail-field > span svg { width: 13px !important; height: 13px !important; color: var(--core-amber); }
.detail-field input,
.detail-field textarea,
.detail-field select,
.participant-form input,
.participant-form select,
.candidate-field input,
.candidate-field textarea,
.candidate-field select,
.company-candidate select {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid #cbd5ce;
  border-radius: 5px;
  color: var(--core-ink);
  background: #fff;
  outline: 0;
}
.detail-field textarea,
.candidate-field textarea { resize: vertical; line-height: 1.45; }
.detail-field :disabled { padding-left: 0; border-color: transparent; color: var(--core-ink); background: transparent; opacity: 1; -webkit-text-fill-color: var(--core-ink); }
.detail-field input:focus,
.detail-field textarea:focus,
.detail-field select:focus,
.candidate-field input:focus,
.candidate-field textarea:focus,
.candidate-field select:focus { border-color: var(--core-green); box-shadow: 0 0 0 3px rgba(40,107,74,.1); }
.edit-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }

.detail-band { display: grid; gap: 14px; }
.participant-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px; }
.participant-list > div { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; padding: 10px; background: var(--core-soft); border-radius: 5px; }
.participant-list > div > span:last-child { display: grid; gap: 3px; min-width: 0; }
.participant-list strong { overflow: hidden; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; }
.participant-list small { color: var(--core-muted); font-size: 11px; }
.participant-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 13px; background: var(--core-soft); border-radius: 5px; }
.participant-form label { display: grid; gap: 5px; color: var(--core-muted); font-size: 11px; }
.participant-form > div { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }

.evidence-list { display: grid; }
.evidence-list > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 11px 0; border-top: 1px solid #e7ece8; }
.evidence-list svg { margin-top: 2px; color: var(--core-muted); }
.evidence-list span { display: grid; gap: 4px; min-width: 0; }
.evidence-list strong { font-size: 13px; line-height: 1.45; }
.evidence-list small { color: var(--core-muted); font-size: 11px; }

.interpret-panel { position: sticky; top: 0; display: grid; gap: 15px; }
.interpret-panel > header { display: flex; align-items: center; justify-content: space-between; }
.judgment { padding: 13px; border-left: 3px solid var(--core-green); background: var(--core-soft); }
.confidence { color: var(--core-green); font-size: 10px; font-weight: 750; }
.judgment h3 { margin: 7px 0 4px; font-size: 15px; line-height: 1.45; }
.judgment p { margin: 0; color: var(--core-muted); font-size: 12px; }
.workstream-list { display: grid; }
.workstream-list > div { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: 8px; padding: 9px 0; border-bottom: 1px solid #e7ece8; }
.workstream-list > div > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.workstream-list strong { font-size: 12px; }
.workstream-list small { display: -webkit-box; overflow: hidden; color: var(--core-muted); font-size: 10px; line-height: 1.4; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.workstream-list em { color: var(--core-muted); font-size: 10px; font-style: normal; }
.stream-state { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #a8b0ab; }
.stream-state:not(.state-unknown) { background: var(--core-green); }
.interpret-empty { display: grid; justify-items: start; gap: 11px; color: var(--core-muted); }
.interpret-empty > svg { width: 28px !important; height: 28px !important; color: var(--core-green); }
.interpret-empty p { margin: 0; font-size: 12px; line-height: 1.55; }
.action-candidate { display: grid; gap: 7px; padding: 13px; border: 1px solid #c7d9ce; border-radius: 5px; background: #f4f8f5; }
.action-candidate > small { color: var(--core-green); font-weight: 750; }
.action-candidate > strong { font-size: 13px; }
.action-candidate > p { margin: 0; color: var(--core-muted); font-size: 11px; line-height: 1.5; }
.action-candidate > div { display: flex; justify-content: flex-end; gap: 7px; margin-top: 5px; }
.candidate-resolved { display: flex; align-items: center; gap: 6px; color: var(--core-green); font-size: 12px; }

.account-scrim,
.overlay-scrim { position: fixed; z-index: 30; inset: 0; background: rgba(10,22,15,.32); backdrop-filter: blur(2px); }
.account-drawer,
.side-sheet {
  position: fixed;
  z-index: 31;
  top: 0;
  right: 0;
  width: min(430px, 100vw);
  height: 100dvh;
  overflow-y: auto;
  padding: 28px;
  border-left: 1px solid var(--core-line);
  background: #fff;
  box-shadow: -18px 0 50px rgba(14,34,22,.18);
}
.account-drawer { display: grid; align-content: start; justify-items: start; gap: 8px; }
.drawer-close { justify-self: end; }
.account-avatar { display: grid; place-items: center; width: 54px; height: 54px; margin-top: 22px; border-radius: 50%; color: var(--core-green-dark); background: var(--core-green-soft); font-size: 20px; font-weight: 800; }
.account-drawer h2 { margin: 8px 0 0; }
.account-drawer > p { margin: 0; color: var(--core-muted); }
.account-drawer dl { display: grid; width: 100%; margin: 22px 0; }
.account-drawer dl > div { display: flex; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--core-line); }
.account-drawer dt { color: var(--core-muted); }
.account-drawer dd { margin: 0; text-align: right; }

.side-sheet { width: min(520px, 100vw); }
.side-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.side-sheet h2,
.confirm-dialog h2 { margin: 3px 0 0; font-size: 22px; }
.capture-source textarea { width: 100%; min-height: 180px; padding: 14px; resize: vertical; border: 1px solid #bcc9c0; border-radius: 6px; outline: 0; line-height: 1.6; }
.capture-source textarea:focus { border-color: var(--core-green); box-shadow: 0 0 0 3px rgba(40,107,74,.1); }
.capture-source p { display: flex; align-items: center; gap: 6px; margin: 9px 0 0; color: var(--core-muted); font-size: 11px; }
.capture-source p svg { color: var(--core-green); }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.sheet-actions.sticky { position: sticky; bottom: -28px; margin: 20px -28px -28px; padding: 13px 28px calc(13px + env(safe-area-inset-bottom)); border-top: 1px solid var(--core-line); background: rgba(255,255,255,.97); }

.capture-candidate { display: grid; gap: 17px; padding-bottom: 30px; }
.decision-segments,
.company-choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3px; border-radius: 6px; background: #edf1ee; }
.decision-segments button,
.company-choice button { min-height: 36px; padding: 5px 7px; border: 0; border-radius: 4px; color: var(--core-muted); background: transparent; font-size: 12px; cursor: pointer; }
.decision-segments button.is-active,
.company-choice button.is-active { color: var(--core-green-dark); background: #fff; box-shadow: 0 1px 5px rgba(24,52,37,.12); font-weight: 750; }
.candidate-section { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--core-line); }
.candidate-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.candidate-section > header > span { font-size: 14px; font-weight: 750; }
.candidate-section > header > small { color: var(--core-muted); font-size: 10px; text-align: right; }
.candidate-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.candidate-field { display: grid; gap: 5px; min-width: 0; color: var(--core-muted); font-size: 11px; }
.candidate-fields .candidate-field:nth-child(2),
.candidate-fields .candidate-field:nth-child(3),
.candidate-fields .candidate-field:nth-child(n+7) { grid-column: span 2; }
.company-candidates,
.record-candidates { display: grid; gap: 8px; }
.company-candidate { display: grid; gap: 9px; padding: 12px; border: 1px solid var(--core-line); border-radius: 5px; }
.company-candidate > header { display: grid; gap: 3px; }
.company-candidate > header small { overflow: hidden; color: var(--core-muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }
.company-candidate > label { display: grid; gap: 5px; color: var(--core-muted); font-size: 10px; }
.record-candidates > div { padding: 10px 11px; border-left: 2px solid #9eb9a8; background: var(--core-soft); }
.record-candidates span { color: var(--core-green); font-size: 10px; font-weight: 750; }
.record-candidates p { margin: 4px 0; font-size: 12px; }
.record-candidates blockquote { margin: 0; color: var(--core-muted); font-size: 10px; }

.company-sheet > p { color: var(--core-muted); font-size: 13px; }
.company-relations { display: grid; margin-top: 20px; border-top: 1px solid var(--core-line); }
.company-relations button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 2px; border: 0; border-bottom: 1px solid var(--core-line); background: transparent; cursor: pointer; text-align: left; }
.company-relations button span { display: grid; gap: 3px; }
.company-relations small { color: var(--core-muted); }

.confirm-dialog {
  position: fixed;
  z-index: 32;
  left: 50%;
  top: 50%;
  width: min(500px, calc(100vw - 32px));
  max-height: min(680px, calc(100dvh - 32px));
  overflow: auto;
  padding: 24px;
  transform: translate(-50%, -50%);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15,30,20,.25);
}
.dialog-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: var(--core-amber); background: #fff3df; }
.confirm-dialog > p { color: var(--core-muted); font-size: 13px; }
.before-after { display: grid; margin: 16px 0; border-top: 1px solid var(--core-line); }
.before-after > div { display: grid; gap: 7px; padding: 12px 0; border-bottom: 1px solid var(--core-line); }
.before-after > div > strong { font-size: 12px; }
.before-after > div > span { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 7px; font-size: 12px; }
.before-after del { overflow-wrap: anywhere; color: var(--core-muted); text-decoration: none; }
.before-after ins { overflow-wrap: anywhere; color: var(--core-green-dark); text-decoration: none; font-weight: 700; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

[hidden] { display: none !important; }

@media (max-width: 980px) {
  .core-shell { grid-template-columns: 178px minmax(0,1fr); }
  .core-sidebar { padding-inline: 10px; }
  .core-scroll { padding-inline: 22px; }
  .business-strip,
  .business-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: minmax(0,1fr); }
  .interpret-panel { position: static; }
}

@media (max-width: 720px) {
  .core-shell { display: block; }
  .core-sidebar { display: none; }
  .core-main { height: 100dvh; grid-template-rows: 54px minmax(0,1fr) 60px; }
  .core-header { padding: 0 14px; }
  .core-mobile-brand { display: flex; padding: 0; }
  .core-mobile-brand strong { display: none; }
  .core-header-context { display: grid; gap: 0; }
  .core-header-context span { max-width: 190px; font-size: 10px; }
  .core-header-context strong { font-size: 13px; }
  .core-avatar { width: 32px; height: 32px; }
  .core-scroll { grid-row: 2; padding: 19px 14px 138px; scrollbar-gutter: auto; }
  .view-stack { gap: 20px; }
  .view-heading { align-items: flex-start; min-height: auto; }
  .view-heading h1,
  .detail-header h1 { font-size: 25px; }
  .view-heading p { font-size: 12px; }
  .view-heading .primary-command { flex: 0 0 auto; padding-inline: 10px; }
  .today-brief { padding: 16px; }
  .brief-icon { width: 34px; height: 34px; }
  .today-brief h2 { font-size: 16px; }
  .content-section > header > small { display: none; }
  .business-strip,
  .business-grid { grid-template-columns: minmax(0,1fr); }
  .business-card { min-height: 156px; }
  .empty-band { grid-template-columns: auto minmax(0,1fr); padding: 17px; }
  .empty-band .primary-command { grid-column: 2; justify-self: start; }
  .capture-bar { position: fixed; bottom: calc(61px + env(safe-area-inset-bottom)); width: calc(100% - 24px); min-height: 52px; grid-template-columns: 38px minmax(0,1fr) 38px; }
  .capture-bar .icon-button,
  .capture-send { width: 38px; height: 38px; }
  .capture-bar textarea { padding-top: 8px; font-size: 13px; }
  .core-bottom-nav { position: fixed; z-index: 7; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); height: calc(61px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--core-line); background: rgba(251,252,251,.98); }
  .core-bottom-nav .core-nav-item { display: grid; justify-items: center; align-content: center; gap: 3px; height: 60px; padding: 3px; border-radius: 0; color: var(--core-muted); font-size: 10px; text-align: center; }
  .core-bottom-nav .core-nav-item.is-active { color: var(--core-green); background: #eef5f0; }
  .core-bottom-nav .core-nav-item svg { width: 20px; height: 20px; }
  .priority-row { grid-template-columns: auto minmax(0,1fr) auto; gap: 9px; padding-inline: 11px; }
  .priority-row > em { display: none; }
  .priority-row > svg { width: 16px !important; height: 16px !important; }
  .detail-header { gap: 9px; }
  .detail-header .secondary-command { width: 38px; padding: 0; font-size: 0; }
  .detail-header .secondary-command { overflow: hidden; white-space: nowrap; font-size: 0 !important; }
  .detail-header .secondary-command svg { margin: 0; }
  .detail-form,
  .detail-band,
  .interpret-panel { padding: 15px; }
  .field-grid,
  .field-grid.three-col,
  .money-grid { grid-template-columns: minmax(0,1fr); }
  .field-grid .field-summary,
  .field-grid .field-goal,
  .field-grid .field-next_step,
  .field-grid.three-col > *,
  .money-grid .field-contract_data,
  .money-grid .field-notes { grid-column: auto; }
  .participant-list { grid-template-columns: minmax(0,1fr); }
  .participant-form { grid-template-columns: minmax(0,1fr); }
  .participant-form > div { grid-column: auto; }
  .account-drawer,
  .side-sheet { top: auto; bottom: 0; width: 100%; height: min(88dvh, 760px); padding: 19px 16px; border-top: 1px solid var(--core-line); border-left: 0; border-radius: 8px 8px 0 0; }
  .side-sheet > header { margin-bottom: 16px; }
  .sheet-actions.sticky { bottom: -19px; margin: 18px -16px -19px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .candidate-fields { grid-template-columns: minmax(0,1fr); }
  .candidate-fields .candidate-field:nth-child(n) { grid-column: auto; }
  .capture-source textarea { min-height: 150px; }
}

@media (max-width: 360px), (max-height: 620px) and (max-width: 720px) {
  .core-main { grid-template-rows: 48px minmax(0,1fr) 54px; }
  .core-header { padding-inline: 10px; }
  .core-mobile-brand .brand-mark { width: 27px; height: 27px; }
  .core-header-context span { max-width: 150px; }
  .core-scroll { padding: 14px 10px 124px; }
  .view-stack { gap: 15px; }
  .view-heading h1,
  .detail-header h1 { font-size: 21px; }
  .view-heading p { display: none; }
  .view-heading .primary-command { min-height: 34px; padding: 6px 8px; font-size: 11px; }
  .today-brief { gap: 10px; padding: 12px; }
  .brief-icon { width: 30px; height: 30px; }
  .today-brief h2 { margin-top: 3px; font-size: 14px; }
  .today-brief p { font-size: 11px; }
  .business-card { min-height: 144px; padding: 13px; }
  .capture-bar { bottom: calc(55px + env(safe-area-inset-bottom)); width: calc(100% - 16px); min-height: 48px; padding: 5px; }
  .core-bottom-nav { height: calc(55px + env(safe-area-inset-bottom)); }
  .core-bottom-nav .core-nav-item { height: 54px; }
  .core-bottom-nav .core-nav-item svg { width: 18px; height: 18px; }
  .detail-form,
  .detail-band,
  .interpret-panel { padding: 12px; }
  .side-sheet { height: 94dvh; padding: 14px 12px; }
  .side-sheet h2 { font-size: 19px; }
  .sheet-actions.sticky { bottom: -14px; margin: 14px -12px -14px; padding-inline: 12px; }
  .decision-segments button { font-size: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
