@font-face {
  font-family: Inter;
  src: url('./assets/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Inter;
  src: url('./assets/inter-cyrillic.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0400-052F;
}

:root {
  color-scheme: light;
  --canvas: #f6f5f3;
  --surface: #fff;
  --ink: #30312f;
  --muted: #646b61;
  --line: #e9eae4;
  --accent: #7cd56e;
  --graphite: #424242;
  --green: #3a7331;
  --amber: #92622c;
  --blue: #496b92;
  --red: #a44b40;
  --sidebar-width: 228px;
  --shadow: 0 1px 2px #20251b04, 0 4px 14px #20251b04;
}

.nav-demos { margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.nav-demos > summary { cursor:pointer; padding:10px 12px; color:var(--muted); font-size:12px; }
.nav-demos > summary:focus-visible { outline:2px solid var(--graphite); outline-offset:2px; border-radius:6px; }

@media (max-width: 760px) {
  .sidebar { pointer-events: none; }
  .menu-open .sidebar { pointer-events: auto; }
  .mobile-next-summary { flex-direction: column; gap: 10px; margin-bottom: 20px; padding: 16px; border: 1px solid #e2e8da; border-radius: 13px; background: #fff; }
  .mobile-next-summary > .btn { align-self: flex-start; }
}

* { box-sizing: border-box; }
.project-context {display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 18px;padding:10px 24px;border-bottom:1px solid var(--line);background:var(--surface);}
.project-context strong {font-weight:650;}
.project-context span {font-size:12px;color:var(--muted);}
@media(max-width:760px){.project-context{padding:10px 16px;}}
html { min-width: 320px; }
body.prototype {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font: 14px/1.5 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; text-decoration: none; }
a:hover { color: #386c31; }
button, a, input, select, textarea { transition: background 150ms, border-color 150ms, color 150ms; }
:focus-visible { outline: 3px solid #427847; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 27px; line-height: 1.25; font-weight: 550; letter-spacing: -.85px; }
h2 { font-size: 16px; line-height: 1.4; font-weight: 550; letter-spacing: -.25px; }
h3 { font-size: 14px; line-height: 1.4; font-weight: 550; }
svg { width: 20px; height: 20px; display: inline-block; vertical-align: middle; flex: 0 0 auto; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  border: 1px solid #dcdfd6;
  border-radius: 9px;
  background: var(--surface);
}
input::placeholder, textarea::placeholder { color: #74786f; }
input:hover, select:hover, textarea:hover { border-color: #b9bfb1; }
input:focus, select:focus, textarea:focus { border-color: #6d9d63; }
textarea { resize: vertical; min-height: 112px; line-height: 1.65; }
input[type='checkbox'], input[type='radio'] { width: 16px; height: 16px; min-height: 0; padding: 0; accent-color: #4a7640; flex: 0 0 auto; }
select { padding-right: 26px; }
input[type='date'], input[type='datetime-local'] { min-width: 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
strong { font-weight: 550; }
code { font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; }
.muted { color: var(--muted); }
.small, small { font-size: 12px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mobile-only, .mobile-leads { display: none; }
.app-shell { min-height: 100dvh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 30;
  width: var(--sidebar-width);
  padding: 27px 14px 18px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--canvas);
  border-right: 1px solid #eaeae3;
}
.brand { min-height: 46px; padding: 0 12px; display: flex; align-items: center; gap: 11px; margin-bottom: 33px; }
.brand > div:last-child { font-size: 24px; line-height: 1.05; font-weight: 550; letter-spacing: -1.1px; }
.brand-sub { display: block; margin-top: 6px; font-size: 11px; line-height: 1.3; font-weight: 400; letter-spacing: .15px; color: var(--muted); }
.brand-mark { display: flex; align-items: center; justify-content: center; width: 29px; height: 34px; color: var(--graphite); flex-shrink: 0; }
.brand-mark svg { width: 28px; height: 32px; }
.brand-mark i { display: block; width: 5px; height: 7px; border-radius: 50%; background: var(--graphite); }
.nav { display: grid; gap: 5px; }
.nav a.nav-item { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 10px 12px; border-radius: 9px; font-size: 13px; line-height: 1.4; color: #60655b; }
.nav a.nav-item:hover { background: #eaece5; color: var(--ink); }
.nav a.nav-item.active { background: var(--accent); color: #21371e; font-weight: 550; }
.nav a.nav-item.active:hover { background: #75ce67; }
.nav-icon { width: 20px; height: 20px; color: #74786f; flex-shrink: 0; }
.active .nav-icon { color: #31562a; }
.nav-label { padding: 24px 12px 8px; color: #74786f; font-size: 10px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
.sidebar-footer { margin-top: auto; padding: 36px 12px 0; font-size: 11px; color: #74786f; line-height: 1.7; }
.sidebar-footer strong { color: #5f6858; }
.sidebar-footer p + p { margin-top: 8px; }
.workspace { margin-left: var(--sidebar-width); min-width: 0; }
.topbar { height: 76px; padding: 0 30px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); }
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #74786f; font-size: 12px; min-width: 0; }
.breadcrumb strong { color: #4b5146; font-weight: 500; }
.breadcrumb svg { width: 14px; height: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 15px; margin-left: auto; min-width: 0; }
.global-search { display: flex; align-items: center; gap: 8px; color: #74786f; font-size: 12px; }
.global-search svg { width: 17px; height: 17px; }
.global-search kbd { margin-left: 16px; padding: 1px 5px; border: 1px solid #dedfd8; border-radius: 4px; font: 10px/1.5 Inter, sans-serif; }
.avatar { display: inline-flex; align-items: center; justify-content: center; height: 33px; width: 33px; border-radius: 50%; background: #e4e9dd; color: #536846; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.mobile-menu { display: none; }
.demo-banner { margin: 18px 30px 0; color: #665e4e; background: #eeede6; border: 1px solid #e6e3d8; border-radius: 8px; padding: 8px 12px; font-size: 11px; display: flex; align-items: center; gap: 8px; }
.demo-banner svg { width: 15px; height: 15px; }
main#app { max-width: 1600px; padding: 27px 30px 48px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.eyebrow { font-size: 10px; font-weight: 550; letter-spacing: 1.25px; text-transform: uppercase; color: #74786f; margin-bottom: 8px; }
.page-description { color: var(--muted); font-size: 12px; margin-top: 7px; max-width: 72ch; line-height: 1.65; }
.page-actions, .toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-actions { flex-shrink: 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 14px; border: 1px solid transparent; border-radius: 9px; font-size: 12px; font-weight: 500; line-height: 1.4; background: var(--graphite); color: white; box-shadow: 0 1px 2px #00000009; white-space: nowrap; }
.btn:hover { background: #292b29; color: white; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--graphite); color: #fff; }
.btn.primary:hover { background: #292b29; }
.btn.secondary { color: #50584a; background: #fff; border-color: #dedfd8; }
.btn.secondary:hover { background: #eeefe8; color: #30372b; }
.btn.ghost { color: #66735c; border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: #e9ede3; color: #334b2a; }
.btn.danger { color: #a44b40; background: #fbefed; border-color: #f0d7d2; box-shadow: none; }
.btn.danger:hover { background: #f6dfda; }
.btn.small { padding: 6px 10px; min-height: 34px; font-size: 11px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 8px; background: #fff; border: 1px solid #e3e5dc; border-radius: 9px; color: #727a68; }
.icon-button:hover { background: #edf0e7; color: #354d2c; }
.inline-link { color: #4c7040; text-decoration: underline; text-underline-offset: 3px; font-size: 12px; }
.inline-link:hover { color: #254d1a; }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: 30px; padding: 3px 8px; font-size: 11px; font-weight: 500; line-height: 1.5; white-space: nowrap; background: #eff0eb; color: #58644e; }
.pill.green { background: #edf7e9; color: #4f7941; }
.pill.amber { background: #fcf1df; color: var(--amber); }
.pill.blue { background: #ebf0f7; color: var(--blue); }
.pill.red { background: #faeeeb; color: var(--red); }
.pill.neutral { background: #f1f2ed; color: #727b67; }
.pill svg { width: 12px; height: 12px; }
.status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.notice { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; font-size: 12px; line-height: 1.6; color: #68765d; background: #eef3e9; border: 1px solid #e1e9d9; border-radius: 10px; margin-bottom: 16px; }
.notice svg { width: 17px; height: 17px; margin-top: 1px; }
.notice.success { background: #eef6e9; color: #537648; border-color: #dfecd6; }
.notice.warning { background: #fcf6e9; color: #8b6c3c; border-color: #efe5ce; }
.panel { background: var(--surface); border: 1px solid #e8eae2; border-radius: 16px; box-shadow: var(--shadow); min-width: 0; }
.panel + .panel { margin-top: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 14px; font-weight: 550; }
.panel-head p { margin-top: 4px; font-size: 11px; color: var(--muted); }
.panel-body { padding: 20px; }
.panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding: 13px 20px; font-size: 11px; color: var(--muted); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 13px; font-size: 14px; font-weight: 550; }
.section-title .small { font-weight: 400; }
.tabs, .detail-tabs { display: flex; align-items: center; gap: 19px; border-bottom: 1px solid #e0e3d9; margin-bottom: 18px; overflow-x: auto; overscroll-behavior-inline: contain; }
.tabs button, .detail-tabs button { flex-shrink: 0; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 0 11px; background: none; border: 0; border-bottom: 2px solid transparent; font-size: 12px; color: #74786f; }
.tabs button.active, .detail-tabs button.active { border-bottom-color: #4b7140; color: #394c30; font-weight: 550; }
.tabs button:hover, .detail-tabs button:hover { color: #3f6034; }
.tabs .pill { font-size: 9px; padding: 1px 6px; }
.filters { display: flex; align-items: center; gap: 9px; margin-bottom: 17px; flex-wrap: wrap; }
.search-field { display: flex; align-items: center; position: relative; flex: 1 1 250px; max-width: 390px; }
.search-field svg { position: absolute; left: 12px; width: 17px; height: 17px; color: #74786f; pointer-events: none; }
.search-field input { padding-left: 37px; font-size: 12px; }
.filter-select { width: auto; max-width: 210px; min-width: 125px; font-size: 12px; }
.filters .toolbar { margin-left: auto; }
.view-switch { display: flex; align-items: center; gap: 2px; border: 1px solid #dfe2d8; padding: 3px; border-radius: 9px; background: #fff; }
.view-switch button { display: flex; align-items: center; justify-content: center; height: 31px; min-width: 34px; border: 0; border-radius: 6px; background: transparent; color: #74786f; }
.view-switch button.active { color: #4a6540; background: #eaf0e4; }
.view-switch svg { width: 16px; height: 16px; }
.field { min-width: 0; }
.field label { display: block; margin-bottom: 6px; font-size: 12px; font-weight: 500; color: #56604d; }
.field > label:has(input[type='checkbox']) { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.field .hint { font-size: 11px; line-height: 1.6; color: #74786f; margin-top: 6px; }
.field input, .field select, .field textarea { font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.table-wrap { width: 100%; overflow-x: auto; border-radius: 0 0 16px 16px; }
table.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.data-table th { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.data-table td { padding: 16px; border-bottom: 1px solid #eff0ea; vertical-align: middle; }
.data-table th:first-child, .data-table td:first-child { padding-left: 20px; }
.data-table th:last-child, .data-table td:last-child { padding-right: 20px; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fafbf7; }
.lead-row { cursor: pointer; }
.cell-title { display: block; color: #46523c; font-size: 12px; font-weight: 550; margin-bottom: 4px; }
.cell-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cell-sub { display: block; color: var(--muted); font-size: 11px; line-height: 1.6; }
.cell-sub a { word-break: normal; overflow-wrap: anywhere; }
.check-cell { width: 38px; padding-right: 0 !important; }
.data-table .check-cell + td { padding-left: 10px; }
.data-table .check-cell input { cursor: pointer; }
.selectable-row.selected { background: #f2f7ed; }
.empty-state { display: flex; align-items: center; flex-direction: column; gap: 11px; text-align: center; padding: 48px 24px; color: #74786f; }
.empty-state > svg { width: 32px; height: 32px; margin-bottom: 2px; color: #74786f; }
.empty-state h2, .empty-state h3 { color: #54614a; }
.empty-state p { max-width: 46ch; font-size: 12px; line-height: 1.7; }
.empty-state .btn { margin-top: 5px; }
.selection-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid #d6e5cb; border-radius: 10px; padding: 11px 15px; margin: 12px 0 16px; background: #edf5e6; color: #506b40; font-size: 12px; }
.selection-bar .toolbar { margin-left: auto; }
.metric-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #e8eae2; border-radius: 16px; background: #fff; padding: 22px 0; margin-bottom: 22px; box-shadow: var(--shadow); }
.metric { padding: 0 22px; border-right: 1px solid var(--line); min-width: 0; }
.metric:last-child { border: 0; }
.metric-label { display: block; font-size: 11px; color: #74786f; }
.metric-value { display: block; margin-top: 7px; font-size: 27px; line-height: 1.2; font-weight: 550; font-variant-numeric: tabular-nums; letter-spacing: -.7px; }
.metric .small { display: block; margin-top: 7px; font-size: 10px; color: #74786f; }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.today-grid .panel + .panel { margin-top: 0; }
.work-list { display: grid; }
.work-row { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid #eff0ea; }
.work-row:last-child { border: 0; }
.work-main { flex: 1; min-width: 0; }
.work-main h3 { font-size: 12px; font-weight: 550; }
.work-main p { margin-top: 5px; font-size: 11px; color: #74786f; line-height: 1.6; }
.work-side { display: flex; align-items: flex-end; flex-direction: column; gap: 7px; flex-shrink: 0; font-size: 10px; color: #74786f; }
.priority-dot { height: 7px; width: 7px; border-radius: 50%; background: #b9c9ac; margin-top: 6px; flex-shrink: 0; }
.priority-dot.red { background: #c8897d; }
.priority-dot.amber { background: #c9aa71; }
.priority-dot.green { background: #7eaa68; }
.research-layout { display: grid; grid-template-columns: minmax(310px, .85fr) minmax(0, 1.4fr); gap: 20px; align-items: start; }
.research-form { position: sticky; top: 20px; }
.research-preview { min-width: 0; }
.research-layout .panel + .panel { margin-top: 0; }
.research-form .form-grid { grid-template-columns: 1fr; gap: 16px; }
.research-form .panel-footer { display: block; }
.research-form .panel-footer .btn { width: 100%; }
.research-form .panel-footer .hint { margin-top: 9px; text-align: center; font-size: 10px; }
.candidate-list { display: grid; }
.candidate { padding: 18px 20px; border-bottom: 1px solid #eff0ea; }
.candidate:last-child { border: 0; }
.candidate-top { display: flex; align-items: flex-start; gap: 10px; }
.candidate-top > input { margin-top: 4px; }
.candidate-top > div { min-width: 0; flex: 1; }
.candidate-top h3 { margin-bottom: 4px; font-size: 12px; }
.candidate-top .pill { margin-left: auto; }
.candidate-reason { margin: 11px 0 8px 26px; font-size: 11px; line-height: 1.7; color: #74786f; }
.candidate-evidence { margin-left: 26px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 10px; color: #74786f; }
.candidate-evidence a { text-decoration: underline; text-underline-offset: 2px; }
.progress-steps { display: flex; align-items: center; margin-bottom: 18px; gap: 12px; padding: 14px 16px; background: #eeefe9; border-radius: 10px; }
.progress-steps .step { position: relative; display: flex; align-items: center; gap: 7px; font-size: 10px; color: #74786f; }
.progress-steps .step + .step::before { content: '›'; color: #74786f; margin-right: 4px; }
.progress-steps .step.done { color: #61794e; }
.progress-steps .step.current { color: #4b5e3e; font-weight: 550; }
.progress-steps svg { width: 13px; height: 13px; }
.detail-head { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.detail-head > div { min-width: 0; }
.detail-head h1 { font-size: 25px; }
.detail-head .page-actions { margin-left: auto; }
.detail-head .pill { margin-top: 8px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(270px, 1fr); gap: 20px; align-items: start; }
.detail-main, .detail-aside { min-width: 0; }
.contact-card { border-bottom: 1px solid var(--line); padding-bottom: 16px; margin-bottom: 16px; }
.contact-card:last-child { margin: 0; padding: 0; border: 0; }
.contact-card strong { display: block; font-size: 12px; }
.contact-card .muted { font-size: 11px; margin-top: 2px; }
.contact-card a { display: block; margin-top: 7px; font-size: 12px; color: #5f7a4c; overflow-wrap: anywhere; word-break: normal; }
.contact-card a:hover { text-decoration: underline; }
.contact-card .toolbar { margin-top: 10px; }
.kv-list { display: grid; gap: 11px; }
.kv-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; font-size: 11px; }
.kv-row > :first-child { color: #74786f; }
.kv-row > :last-child { text-align: right; color: #5f6f50; min-width: 0; overflow-wrap: anywhere; }
.timeline { padding: 2px 0; }
.timeline-item { position: relative; display: flex; gap: 13px; padding-bottom: 23px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:not(:last-child)::before { content: ''; position: absolute; left: 6px; top: 16px; bottom: -1px; width: 1px; background: #e5eadd; }
.timeline-dot { position: relative; z-index: 1; height: 13px; width: 13px; margin-top: 3px; background: #eef3e8; border: 3px solid #b6c8a6; border-radius: 50%; flex-shrink: 0; }
.timeline-content { min-width: 0; flex: 1; }
.timeline-content h3 { font-size: 12px; font-weight: 500; }
.timeline-content > p { color: #74786f; font-size: 11px; line-height: 1.7; margin-top: 7px; }
.timeline-meta { margin-top: 4px; color: #74786f; font-size: 10px; }
.message { border-radius: 11px; margin-top: 10px; padding: 13px 15px; font-size: 12px; line-height: 1.8; white-space: pre-line; overflow-wrap: anywhere; }
.message.in { background: #f2f4ee; color: #657259; border: 1px solid #e9ede2; }
.message.out { background: #eff5e9; color: #5a7446; border: 1px solid #e1ead7; }
.message.internal { background: #fcf8ed; color: #74786f; border: 1px solid #f0e8d0; }
.next-action-card { background: #f0f6e9; border: 1px solid #dbe8cd; border-radius: 14px; padding: 18px; margin-bottom: 18px; }
.next-action-card h2 { font-size: 13px; color: #587246; margin-bottom: 9px; }
.next-action-card p { font-size: 12px; line-height: 1.7; color: #74786f; }
.next-action-card .toolbar { margin-top: 13px; }
.next-action-card .small { display: block; margin-top: 8px; }
.evidence-list { display: grid; gap: 9px; }
.evidence-item { border: 1px solid #e6ebdf; border-radius: 9px; padding: 11px 12px; }
.evidence-item summary { font-size: 11px; color: #74786f; cursor: pointer; }
.evidence-item p { margin-top: 10px; font-size: 11px; color: #74786f; line-height: 1.7; }
.evidence-item a { display: inline-block; margin-top: 8px; font-size: 10px; color: #607e4b; text-decoration: underline; overflow-wrap: anywhere; }
.quality-issue { border-left: 1px solid #cfb281; padding: 2px 0 2px 12px; margin-bottom: 18px; }
.quality-issue:last-child { margin: 0; }
.quality-issue h3 { font-size: 12px; color: #796c50; }
.quality-issue p { margin-top: 7px; color: #74786f; font-size: 11px; line-height: 1.7; }
.quality-issue .toolbar { margin-top: 10px; }
.inbox-layout { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.8fr); align-items: stretch; background: #fff; border: 1px solid #e6e9df; border-radius: 16px; overflow: hidden; min-height: 530px; box-shadow: var(--shadow); }
.inbox-list { border-right: 1px solid var(--line); min-width: 0; }
.inbox-list > .panel-head { min-height: 59px; padding: 15px 17px; }
.inbox-row { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #edf0e7; padding: 17px; background: #fff; color: #74786f; }
.inbox-row:hover { background: #f7f9f3; }
.inbox-row.selected { background: #eef4e7; box-shadow: inset 3px 0 #82b66b; }
.inbox-row > div { display: flex; align-items: center; gap: 8px; }
.inbox-row strong { font-size: 12px; color: #5d704e; }
.inbox-row time { margin-left: auto; color: #74786f; font-size: 10px; flex-shrink: 0; }
.inbox-row p { font-size: 11px; margin-top: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row.unread strong::after { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #78a962; margin-left: 6px; vertical-align: 2px; }
.channel-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; color: #74786f; margin-top: 8px; }
.channel-tag svg { width: 12px; height: 12px; }
.inbox-thread { min-width: 0; display: flex; flex-direction: column; }
.thread-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.thread-head > div { min-width: 0; }
.thread-head h2 { font-size: 14px; }
.thread-head p { margin-top: 5px; color: #74786f; font-size: 11px; overflow-wrap: anywhere; }
.thread-head .toolbar { margin-left: auto; }
.thread-messages { padding: 20px 23px; flex: 1; }
.thread-messages .message { margin-bottom: 17px; max-width: 94%; }
.thread-messages .message.out { margin-left: auto; }
.thread-messages .timeline-meta { margin-bottom: 6px; }
.thread-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 16px; }
.reply-composer { padding: 17px 22px 20px; border-top: 1px solid var(--line); }
.reply-composer textarea { border-color: #e0e7d6; font-size: 12px; min-height: 105px; }
.reply-composer .toolbar { justify-content: space-between; margin-top: 10px; }
.reply-composer .small { color: #74786f; font-size: 10px; }
.application-summary { background: #f8faf4; border: 1px solid #e7eedd; border-radius: 10px; padding: 14px; margin-bottom: 17px; }
.application-summary h3 { color: #74786f; font-size: 12px; margin-bottom: 8px; }
.application-summary p { margin-top: 6px; font-size: 11px; line-height: 1.65; color: #74786f; }
.split-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.approval-layout { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.7fr); gap: 20px; align-items: start; }
.approval-list, .approval-editor { min-width: 0; }
.draft-row { width: 100%; padding: 16px 17px; text-align: left; background: #fff; border: 1px solid #e6eade; border-radius: 11px; margin-bottom: 10px; }
.draft-row:hover { background: #f8faf4; }
.draft-row.selected { border-color: #b6cea3; background: #f0f6e9; }
.draft-row strong { display: block; color: #637b50; font-size: 12px; }
.draft-row p { margin-top: 6px; color: #74786f; font-size: 11px; }
.draft-row .pill { margin-top: 10px; }
.draft-preview { font-size: 12px; line-height: 1.9; color: #74786f; }
.draft-preview p + p { margin-top: 16px; }
.draft-preview h3 { margin-bottom: 16px; color: #5f7451; }
.draft-preview textarea { min-height: 310px; font-size: 12px; line-height: 1.85; }
.approval-meta { display: grid; gap: 9px; padding: 14px 0 18px; margin-bottom: 17px; border-bottom: 1px solid var(--line); font-size: 11px; color: #74786f; }
.approval-meta strong { color: #74786f; font-weight: 500; }
.review-note { padding: 13px 15px; border-radius: 10px; background: #f6f8f1; border: 1px solid #e7ecdf; font-size: 11px; line-height: 1.75; color: #74786f; margin-top: 18px; }
.review-note strong { color: #74786f; }
.channel-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 23px; }
.channel-card { background: #fff; border: 1px solid #e6eadd; border-radius: 14px; padding: 19px; min-width: 0; box-shadow: var(--shadow); }
.channel-card > div:first-child { display: flex; align-items: center; gap: 10px; justify-content: space-between; }
.channel-card h2 { font-size: 13px; }
.channel-card p { margin-top: 12px; color: #74786f; font-size: 11px; line-height: 1.7; }
.channel-card .toolbar { margin-top: 16px; }
.channel-card .metric-value { font-size: 24px; margin-top: 18px; }
.channel-card .metric-label { margin-top: 4px; font-size: 10px; }
.funnel-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; padding: 18px 0; }
.funnel-steps > div { background: #f5f8ef; border: 1px solid #e5ecdb; border-radius: 9px; padding: 12px; min-width: 0; }
.funnel-steps strong { display: block; font-size: 20px; font-variant-numeric: tabular-nums; color: #5f7b4a; }
.funnel-steps span { display: block; font-size: 10px; color: #74786f; margin-top: 4px; }
.source-table { width: 100%; }
.source-table td { font-variant-numeric: tabular-nums; }
.link-builder { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.link-builder .span-2 { grid-column: 1 / -1; }
.code-output { padding: 12px 14px; border-radius: 9px; border: 1px solid #e0e8d5; background: #f7faf2; color: #74786f; font: 11px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; word-break: normal; }
.toast { position: fixed; bottom: 24px; right: 28px; z-index: 100; max-width: min(440px, calc(100vw - 32px)); border: 1px solid #dbe8d1; border-radius: 11px; padding: 13px 18px; box-shadow: 0 5px 25px #26391d1a; background: #f4faee; color: #5f7c4b; font-size: 12px; line-height: 1.6; }
dialog#dialog { width: min(570px, calc(100vw - 32px)); max-height: calc(100dvh - 44px); padding: 0; border: 1px solid #fff; border-radius: 19px; box-shadow: 0 24px 80px #20301a26; color: var(--ink); overflow-y: auto; }
dialog#dialog.dialog-wide { width: min(730px, calc(100vw - 32px)); }
dialog#dialog::backdrop { background: #27302066; backdrop-filter: blur(2px); }
.dialog-head { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding: 20px 23px 17px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 17px; }
.dialog-body { padding: 22px 23px; }
.dialog-body > p { margin-bottom: 17px; color: #74786f; font-size: 12px; line-height: 1.75; }
.dialog-footer { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding: 16px 23px 20px; border-top: 1px solid var(--line); }

@media (min-width: 1600px) {
  :root { --sidebar-width: 246px; }
  .topbar { padding-right: 40px; padding-left: 36px; }
  .demo-banner { margin-right: 40px; margin-left: 36px; }
  main#app { padding-right: 40px; padding-left: 36px; }
}
@media (max-width: 1180px) {
  :root { --sidebar-width: 205px; }
  .sidebar { padding-right: 10px; padding-left: 10px; }
  .nav a.nav-item { font-size: 12px; gap: 9px; padding-right: 9px; padding-left: 9px; }
  .topbar { padding: 0 23px; }
  .demo-banner { margin-right: 23px; margin-left: 23px; }
  main#app { padding-right: 23px; padding-left: 23px; }
  .global-search kbd { display: none; }
  .metric { padding: 0 17px; }
  .page-head { gap: 15px; }
  .page-actions .btn { padding-left: 11px; padding-right: 11px; }
  .research-layout { grid-template-columns: minmax(270px, .9fr) minmax(0, 1.3fr); gap: 16px; }
  .data-table td, .data-table th { padding-left: 12px; padding-right: 12px; }
  .detail-layout { grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr); gap: 16px; }
  .approval-layout { grid-template-columns: minmax(240px, .8fr) minmax(0, 1.7fr); gap: 16px; }
  .channel-grid { gap: 12px; }
  .channel-card { padding: 16px; }
}
@media (max-width: 980px) and (min-width: 761px) {
  .page-head { align-items: flex-start; flex-direction: column; gap: 15px; }
  .today-grid { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-aside { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 16px; }
  .detail-aside .panel + .panel { margin-top: 0; }
  .detail-aside .next-action-card { grid-column: 1 / -1; margin: 0; }
  .research-layout { grid-template-columns: 1fr; }
  .research-form { position: static; }
  .research-form .form-grid { grid-template-columns: 1fr 1fr; }
  .research-form .panel-footer { display: flex; }
  .research-form .panel-footer .btn { width: auto; }
  .research-form .panel-footer .hint { text-align: left; margin: 0; }
  .inbox-layout { grid-template-columns: minmax(215px, .9fr) minmax(0, 1.4fr); }
  .thread-head, .thread-messages, .reply-composer { padding-right: 16px; padding-left: 16px; }
  .thread-head { flex-wrap: wrap; }
  .thread-head .toolbar { margin-left: 0; }
  .channel-grid { grid-template-columns: 1fr; }
  .approval-layout { grid-template-columns: 1fr; }
  .approval-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .draft-row { margin: 0; }
}
@media (max-width: 760px) {
  html { overflow-x: clip; }
  body.prototype { font-size: 14px; }
  .desktop-only { display: none !important; }
  .mobile-only { display: flex; }
  .mobile-leads { display: grid; gap: 11px; }
  .sidebar { width: 268px; top: 64px; z-index: 60; transform: translateX(-100%); transition: transform 180ms ease; border-right: 1px solid #dbe1d2; box-shadow: 15px 15px 35px #23351820; padding-top: 22px; }
  .menu-open .sidebar { transform: translateX(0); }
  .menu-open::after { content: ''; position: fixed; inset: 64px 0 0 268px; background: #29382130; z-index: 50; pointer-events: none; }
  .sidebar .brand { margin-bottom: 25px; }
  .nav a.nav-item { font-size: 14px; min-height: 44px; }
  .nav-label { padding-top: 23px; }
  .workspace { margin-left: 0; }
  .topbar { position: relative; z-index: 70; height: 64px; padding: 0 16px; gap: 10px; background: var(--canvas); }
  .mobile-menu { display: inline-flex; min-width: 38px; width: 38px; height: 38px; padding: 8px; background: transparent; border-color: #dfe4d6; }
  .breadcrumb { font-size: 11px; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .breadcrumb > span:first-child, .breadcrumb > svg { display: none; }
  .topbar-actions { gap: 10px; }
  .global-search { display: none; }
  .topbar-actions > .small { display: none; }
  .avatar { width: 30px; height: 30px; font-size: 10px; }
  .demo-banner { margin: 13px 16px 0; font-size: 10px; line-height: 1.6; padding: 8px 10px; align-items: flex-start; }
  .demo-banner svg { margin-top: 1px; }
  main#app { padding: 22px 16px 36px; }
  h1 { font-size: 25px; }
  .eyebrow { font-size: 9px; letter-spacing: 1.05px; margin-bottom: 7px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 17px; margin-bottom: 20px; }
  .page-description { font-size: 12px; line-height: 1.75; margin-top: 8px; }
  .page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
  .page-actions .btn { flex: 1 1 auto; min-height: 42px; }
  .btn { min-height: 42px; font-size: 12px; }
  .btn.small { min-height: 40px; font-size: 11px; }
  .icon-button { min-width: 42px; height: 42px; }
  .panel { border-radius: 14px; }
  .panel-head { padding: 15px 16px; min-height: 60px; gap: 10px; }
  .panel-head h2 { font-size: 14px; }
  .panel-body { padding: 16px; }
  .panel-footer { padding: 13px 16px; flex-wrap: wrap; font-size: 10px; }
  .tabs, .detail-tabs { gap: 20px; max-width: 100%; margin-bottom: 16px; }
  .tabs button, .detail-tabs button { min-height: 44px; font-size: 12px; }
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 16px; }
  .search-field { max-width: none; grid-column: 1 / -1; }
  .search-field input { min-height: 44px; }
  .filter-select { width: 100%; min-width: 0; max-width: none; min-height: 43px; font-size: 11px; }
  .filters > .toolbar { margin: 0; grid-column: 1 / -1; justify-content: flex-end; }
  .filters > .btn { grid-column: 1 / -1; }
  .filters > .view-switch { display: none; }
  .form-grid, .link-builder { grid-template-columns: 1fr; gap: 16px; }
  .form-grid .span-2, .link-builder .span-2 { grid-column: auto; }
  .field input, .field select, .field textarea { min-height: 44px; font-size: 14px; }
  .field label { font-size: 12px; }
  .field .hint { font-size: 11px; }
  .notice { padding: 12px; font-size: 11px; }
  .selection-bar { gap: 10px; padding: 11px 12px; font-size: 11px; }
  .selection-bar .toolbar { width: 100%; margin: 0; }
  .selection-bar .toolbar .btn { flex: 1; }
  .lead-mobile-card { border: 1px solid #e2e8da; border-radius: 13px; padding: 15px; background: #fff; box-shadow: var(--shadow); min-width: 0; }
  .lead-mobile-top { display: flex; align-items: flex-start; gap: 9px; }
  .lead-mobile-top > input { margin-top: 5px; }
  .lead-mobile-top > div { flex: 1; min-width: 0; }
  .lead-mobile-top .cell-title { font-size: 13px; margin-bottom: 5px; }
  .lead-mobile-top .cell-sub { font-size: 11px; }
  .lead-mobile-top .pill { font-size: 9px; padding: 3px 6px; }
  .lead-mobile-contact { margin-top: 14px; padding-top: 12px; border-top: 1px solid #eff2e9; color: #74786f; font-size: 12px; overflow-wrap: anywhere; word-break: normal; }
  .lead-mobile-contact a { display: inline-block; padding: 5px 0; max-width: 100%; overflow-wrap: anywhere; }
  .lead-mobile-next { padding: 11px 12px; margin-top: 12px; background: #f5f8ef; border-radius: 8px; font-size: 11px; color: #74786f; line-height: 1.6; }
  .lead-mobile-next strong { display: block; color: #74786f; font-size: 11px; margin-bottom: 4px; }
  .lead-mobile-card .split-actions { margin-top: 12px; }
  .metric-strip { grid-template-columns: 1fr 1fr; padding: 18px 0; gap: 20px 0; margin-bottom: 18px; border-radius: 14px; }
  .metric { padding: 0 17px; }
  .metric:nth-child(2) { border: 0; }
  .metric-label { font-size: 10px; }
  .metric-value { font-size: 25px; margin-top: 6px; }
  .metric .small { font-size: 9px; line-height: 1.7; }
  .today-grid { grid-template-columns: 1fr; gap: 18px; }
  .work-row { padding: 16px; gap: 10px; flex-wrap: wrap; }
  .work-main h3 { font-size: 12px; }
  .work-side { flex-direction: row; align-items: center; justify-content: space-between; margin-left: 17px; width: calc(100% - 17px); }
  .research-layout { grid-template-columns: 1fr; gap: 18px; }
  .research-form { position: static; }
  .research-form .form-grid { grid-template-columns: 1fr; }
  .candidate { padding: 16px; }
  .candidate-top { flex-wrap: wrap; gap: 9px; }
  .candidate-top > div { min-width: 150px; }
  .candidate-top .pill { margin-left: 25px; }
  .candidate-reason { margin-left: 25px; font-size: 11px; }
  .candidate-evidence { margin-left: 25px; font-size: 10px; line-height: 1.7; }
  .progress-steps { flex-wrap: wrap; gap: 8px 10px; padding: 12px; }
  .progress-steps .step { font-size: 9px; }
  .progress-steps .step + .step::before { margin-right: 0; }
  .detail-head { flex-wrap: wrap; gap: 12px; margin-bottom: 17px; }
  .detail-head h1 { font-size: 24px; }
  .detail-head .page-actions { margin: 0; width: 100%; }
  .detail-head > .icon-button { min-width: 36px; width: 36px; height: 36px; }
  .detail-layout { grid-template-columns: 1fr; gap: 18px; }
  .detail-main .panel + .panel, .detail-aside .panel + .panel { margin-top: 16px; }
  .next-action-card { padding: 16px; margin-bottom: 16px; }
  .timeline-item { gap: 11px; padding-bottom: 23px; }
  .message { padding: 12px; font-size: 12px; }
  .contact-card a { font-size: 13px; padding: 4px 0; }
  .kv-row { font-size: 12px; }
  .quality-issue .toolbar .btn { min-height: 40px; padding-left: 8px; padding-right: 8px; font-size: 10px; }
  .inbox-layout { display: block; min-height: 0; border-radius: 14px; }
  .inbox-list { border-right: 0; }
  .inbox-thread { display: none; }
  .inbox-layout.thread-open .inbox-list { display: none; }
  .inbox-layout.thread-open .inbox-thread { display: flex; }
  .inbox-row { padding: 17px 16px; }
  .inbox-row strong { font-size: 13px; }
  .inbox-row p { font-size: 12px; }
  .thread-head { padding: 16px; flex-wrap: wrap; }
  .thread-head > div { flex: 1; }
  .thread-head .toolbar { margin: 0; width: 100%; }
  .thread-head .toolbar .btn { flex: 1; }
  .thread-messages { padding: 16px; }
  .thread-messages .message { max-width: 100%; }
  .reply-composer { padding: 15px 16px 17px; }
  .reply-composer textarea { font-size: 14px; }
  .reply-composer .toolbar { gap: 10px; }
  .reply-composer .toolbar .btn { width: 100%; }
  .reply-composer .small { font-size: 10px; line-height: 1.7; }
  .application-summary { padding: 13px; }
  .approval-layout { grid-template-columns: 1fr; gap: 15px; }
  .approval-list { display: grid; grid-template-columns: 1fr; gap: 9px; }
  .draft-row { margin: 0; padding: 15px; }
  .draft-preview textarea { min-height: 340px; font-size: 14px; }
  .approval-editor .panel-footer .btn { flex: 1; }
  .channel-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 18px; }
  .channel-card { padding: 17px; }
  .channel-card h2 { font-size: 14px; }
  .channel-card p { font-size: 12px; }
  .channel-card .toolbar .btn { flex: 1; }
  .funnel-steps { grid-template-columns: 1fr 1fr; gap: 9px; padding: 14px 0; }
  .funnel-steps > div { padding: 12px; }
  .funnel-steps span { font-size: 10px; }
  .source-table { min-width: 540px; }
  .code-output { font-size: 11px; padding: 12px; }
  .toast { right: 16px; bottom: 16px; padding: 12px 15px; }
  dialog#dialog { max-height: calc(100dvh - 28px); width: calc(100vw - 28px); border-radius: 16px; }
  .dialog-head { padding: 16px 17px; }
  .dialog-head h2 { font-size: 16px; }
  .dialog-body { padding: 18px 17px; }
  .dialog-footer { padding: 14px 17px 17px; flex-wrap: wrap; }
  .dialog-footer .btn { flex: 1; }
}
@media (max-width: 370px) {
  .topbar { padding-right: 12px; padding-left: 12px; }
  .demo-banner { margin-right: 12px; margin-left: 12px; }
  main#app { padding-right: 12px; padding-left: 12px; }
  .page-actions .btn { font-size: 11px; padding-right: 10px; padding-left: 10px; }
  .metric { padding-right: 13px; padding-left: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Bind the shared components to this stage's actual prototype markup. */
.mobile-menu { display: none; }
.brand > span:last-child { font-size: 25px; line-height: 1.05; font-weight: 550; letter-spacing: -1.1px; }
.brand-mark { position: relative; color: transparent; }
.brand-mark::before { content: ''; position: absolute; left: 3px; top: 9px; width: 4.5px; height: 7px; border-radius: 50%; background: var(--graphite); box-shadow: 0 10px var(--graphite), 8px -5px var(--graphite), 8px 5px var(--graphite), 8px 15px var(--graphite), 16px 0 var(--graphite), 16px 10px var(--graphite); transform: rotate(20deg); }
.nav .nav-label { padding: 0; font: inherit; color: inherit; letter-spacing: 0; text-transform: none; }
.nav-count { margin-left: auto; border-radius: 20px; min-width: 19px; padding: 1px 5px; color: #688158; background: #e8eddf; font-size: 10px; text-align: center; }
.active .nav-count { background: #5da94f; color: #fff; }
.sidebar-footer { display: flex; align-items: flex-start; flex-direction: column; gap: 6px; }
.sidebar-footer > p { margin: 4px 0 5px; }
.sidebar-footer .btn { justify-content: flex-start; padding-left: 0; }
.global-search { gap: 0; position: relative; }
.global-search input { min-height: 34px; width: 255px; padding: 7px 40px 7px 11px; font-size: 11px; background: #eeeee9; border-color: #e4e6dd; border-radius: 8px; }
.global-search .icon-button { position: absolute; right: 1px; top: 1px; min-width: 32px; width: 32px; height: 32px; border: 0; background: transparent; padding: 0; font-size: 23px; font-family: system-ui, sans-serif; line-height: 1; }
.breadcrumb > span { font-size: 14px; color: #a3aa9a; }
.skip-link:focus-visible { position: fixed; left: 16px; top: 12px; z-index: 200; width: auto; height: auto; margin: 0; padding: 10px 15px; border-radius: 8px; clip: auto; overflow: visible; background: white; }
main#app:focus { outline: none; }
.overdue-text { color: #a7674c; }
.metric:hover { background: #fafcf7; color: var(--ink); }
.panel > .filters { padding: 17px 20px 0; }
.panel .search-field:not(:has(svg)) input { padding-left: 12px; }
.panel-body > .field + .field { margin-top: 16px; }
.panel-body > .notice { margin-top: 19px; }
.panel-body > .small, .panel-body > .muted { margin-top: 15px; line-height: 1.75; }
.form-grid + p { margin-top: 17px; }
.field .hint { display: block; }
.today-grid .panel-body:has(> .work-list) { padding: 0; }
.work-row > .muted { flex-shrink: 0; max-width: 90px; line-height: 1.7; font-size: 10px; }
.work-row > .channel-tag { min-width: 56px; margin-top: 0; font-size: 10px; }
.work-row .cell-sub { margin-top: 4px; }
.work-row .work-side { font-size: 11px; line-height: 1.6; max-width: 205px; text-align: right; }
.work-row .work-side .cell-sub { font-size: 10px; }
.research-form .panel-body > .btn { width: 100%; }
.research-preview > .toolbar { justify-content: space-between; align-items: flex-start; }
.research-preview > .toolbar > div { flex: 1; min-width: 160px; }
.research-preview > .toolbar h2 { font-size: 14px; }
.research-preview > .toolbar p { margin-top: 6px; max-width: 43ch; line-height: 1.7; }
#candidate-search { width: 190px; min-height: 38px; font-size: 11px; }
.research-preview .progress-steps { display: grid; gap: 24px; padding: 4px 0; background: transparent; }
.research-preview .progress-steps .step { align-items: flex-start; gap: 14px; color: #6e7b62; font-weight: 400; }
.research-preview .progress-steps .step + .step::before { content: none; }
.research-preview .progress-steps .step > strong { font-size: 11px; line-height: 30px; font-weight: 500; min-width: 30px; height: 30px; border-radius: 9px; text-align: center; background: #eaf0e3; color: #6e865a; }
.research-preview .progress-steps h3 { font-size: 12px; font-weight: 500; margin-top: 3px; }
.research-preview .progress-steps p { font-size: 11px; color: #74786f; margin-top: 7px; max-width: 50ch; line-height: 1.7; }
.candidate-list { border: 1px solid #e8eae2; border-radius: 14px; background: #fff; overflow: hidden; box-shadow: var(--shadow); }
.candidate-top .cell-title { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.candidate-top .cell-title input { margin: 0; }
.candidate-reason, .candidate-evidence { margin-left: 0; }
.candidate-evidence { gap: 7px 15px; overflow-wrap: anywhere; }
.candidate .evidence-item { margin-top: 13px; border-color: #e9ede2; background: #f9fbf6; padding: 9px 12px; }
.candidate .split-actions { margin-top: 12px; }
.candidate-rejected { background: #f9faf6; }
.evidence-list { gap: 16px; }
.evidence-list > div + div { padding-top: 14px; border-top: 1px solid #e9ede3; }
.evidence-list strong { font-size: 11px; color: #66765b; font-weight: 500; }
.evidence-list p { margin-top: 9px; margin-bottom: 6px; color: #74786f; font-size: 11px; line-height: 1.75; }
.evidence-list .cell-sub { font-size: 10px; overflow-wrap: anywhere; }
.detail-head { display: block; }
.detail-head > .inline-link { display: inline-block; margin-bottom: 16px; font-size: 11px; }
.detail-head > .page-head { margin-bottom: 0; }
.detail-head .page-actions { margin-left: 0; align-items: center; }
.detail-head .pill { margin-top: 0; }
.timeline-content.message { margin-top: 0; padding: 11px 14px; }
.timeline-content.message p { margin-top: 7px; color: inherit; font-size: 12px; line-height: 1.75; }
.timeline-dot { margin-top: 14px; }
.timeline-item:not(:last-child)::before { top: 26px; }
#note-form { padding-top: 20px; margin-top: 22px; border-top: 1px solid var(--line); }
#note-form textarea { min-height: 78px; }
#note-form > .btn { margin-top: 10px; }
.kv-list { margin: 14px 0; }
.kv-row { gap: 13px; }
.kv-row dt { flex: 0 0 40%; }
.kv-row dd { margin: 0; flex: 1; }
.contact-card p { margin-top: 9px; font-size: 12px; overflow-wrap: anywhere; word-break: normal; }
.contact-card > .pill { margin-top: 14px; }
.contact-card > .muted.small { margin-top: 14px; font-size: 11px; line-height: 1.75; }
.next-action-card { margin-bottom: 17px; font-size: 12px; line-height: 1.7; color: #61764f; }
.next-action-card > .btn { width: 100%; margin-top: 13px; }
.quality-issue .split-actions { align-items: flex-start; margin-top: 10px; }
.quality-issue .split-actions > strong { font-size: 12px; line-height: 1.7; }
.quality-issue > .cell-sub { margin-top: 9px; }
.inbox-layout > .panel { border: 0; border-radius: 0; box-shadow: none; }
.inbox-layout > .inbox-list { border-right: 1px solid var(--line); }
.inbox-layout > .panel + .panel { margin-top: 0; }
.inbox-row { line-height: 1.7; }
.inbox-row > span { display: block; }
.inbox-row > span.split-actions { display: flex; }
.inbox-row > .split-actions { flex-wrap: nowrap; align-items: flex-start; margin-bottom: 6px; gap: 5px; }
.inbox-row .channel-tag { margin-top: 1px; font-size: 9px; flex-shrink: 0; }
.inbox-row .cell-sub { font-size: 10px; margin-top: 4px; }
.inbox-row > .cell-sub:first-of-type { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.inbox-thread > .panel-body { padding: 18px 21px 21px; }
.thread-head { align-items: center; padding-right: 21px; padding-left: 21px; }
.thread-head > .inline-link { margin-left: auto; white-space: nowrap; font-size: 11px; }
.thread-messages { padding: 0; }
.thread-messages .message { margin-top: 0; }
.reply-composer { margin-top: 22px; padding: 17px 0 0; }
.reply-composer .split-actions { margin-top: 12px; }
.reply-composer .hint { display: block; margin-top: 8px; }
.reply-composer textarea { min-height: 150px; }
.approval-list.panel { padding: 10px; }
.approval-list > .draft-row:last-child { margin-bottom: 0; }
.draft-row > span:not(.pill) { display: block; margin-top: 6px; font-size: 11px; line-height: 1.7; color: #74786f; }
.approval-editor .approval-meta { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 0; }
.approval-editor .panel-body > .split-actions { margin-top: 20px; justify-content: flex-start; gap: 8px; }
.approval-editor .panel-body > .muted.small { font-size: 10px; }
.review-note p { margin-top: 6px; }
.channel-grid { margin-top: 20px; }
.channel-grid > .panel + .panel { margin-top: 0; }
.channel-card.panel { padding: 0; }
.channel-card > .panel-head { display: flex; align-items: flex-start; min-height: 66px; padding: 17px 18px; }
.channel-card .panel-head h2 { font-size: 13px; line-height: 1.6; }
.channel-card .panel-head .pill { font-size: 9px; }
.channel-card .panel-body { padding: 17px 18px; }
.channel-card .panel-body p { margin: 0; font-size: 11px; line-height: 1.75; }
.channel-card .panel-body p + p { margin-top: 9px; }
.channel-card .panel-body > .btn { margin-top: 16px; width: 100%; }
.funnel-steps.panel-body { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) 20px minmax(0, 1fr); gap: 14px; padding: 20px; align-items: center; }
.funnel-steps > div { padding: 15px; align-self: stretch; }
.funnel-steps > span { font-size: 18px; color: #98ab87; text-align: center; }
.funnel-steps strong { font-size: 12px; font-weight: 550; letter-spacing: -.1px; line-height: 1.6; }
.funnel-steps p { margin-top: 9px; color: #74786f; font-size: 11px; line-height: 1.75; }
.source-table { min-width: 0; }
.source-table th, .source-table td { padding: 11px 8px; font-size: 11px; }
.source-table th:first-child, .source-table td:first-child { padding-left: 0; }
.source-table th:last-child, .source-table td:last-child { padding-right: 0; text-align: right; }
.link-builder + .code-output { margin-top: 17px; }
.link-builder > .btn { align-self: end; }
.dialog-body > .field + .form-grid { margin-top: 18px; }
.dialog-body .notice:has(> p) { display: block; }
.dialog-body .notice > p { margin-top: 8px; }
.mobile-only { display: none !important; }
[hidden] { display: none !important; }

@media (max-width: 1180px) {
  .global-search input { width: 210px; }
  .funnel-steps.panel-body { gap: 7px; padding: 17px; grid-template-columns: minmax(0, 1fr) 15px minmax(0, 1fr) 15px minmax(0, 1fr); }
  .funnel-steps > div { padding: 12px; }
  .channel-card > .panel-head { flex-wrap: wrap; gap: 7px; padding: 15px; }
  .channel-card .panel-body { padding: 15px; }
}
@media (max-width: 980px) and (min-width: 761px) {
  .work-row .work-side { max-width: 220px; }
  .channel-card > .panel-head { flex-wrap: nowrap; }
  .inbox-row > .split-actions { flex-wrap: wrap; gap: 0; }
}
@media (max-width: 760px) {
  .mobile-menu { display: inline-flex; }
  .mobile-only { display: flex !important; }
  .mobile-leads.mobile-only { display: grid !important; }
  [hidden] { display: none !important; }
  .breadcrumb > span { display: inline; font-size: 12px; }
  .brand > span:last-child { font-size: 26px; }
  .nav .nav-label { padding: 0; }
  .global-search { display: none; }
  .panel > .filters { padding: 15px 16px 0; }
  .mobile-leads { padding: 0 12px 12px; }
  .lead-mobile-card { box-shadow: none; padding: 14px; }
  .lead-mobile-top { align-items: flex-start; }
  .lead-mobile-top > strong { font-size: 13px; flex: 1; line-height: 1.5; }
  .lead-mobile-top > .pill { margin-left: auto; margin-top: 1px; }
  .lead-mobile-contact { font-size: 12px; line-height: 1.8; margin-top: 10px; padding-top: 9px; }
  .lead-mobile-card > .cell-sub { margin-top: 8px; }
  .lead-mobile-next { color: #6a7e59; }
  .lead-mobile-next .cell-sub { margin-top: 4px; }
  .work-row > .channel-tag { min-width: 43px; font-size: 9px; }
  .work-row > .muted { font-size: 9px; max-width: 72px; }
  .work-row .work-side { max-width: none; text-align: left; }
  .work-row:has(.work-side) { display: grid; grid-template-columns: 1fr auto; }
  .work-row:has(.work-side) .work-main { grid-column: 1; }
  .work-row:has(.work-side) .work-side { grid-row: 2; grid-column: 1 / -1; margin: 0; width: 100%; display: block; }
  .work-row:has(.work-side) > .btn { grid-row: 1; grid-column: 2; }
  .research-preview > .toolbar { display: block; }
  #candidate-search { width: 100%; margin-top: 13px; min-height: 42px; font-size: 12px; }
  .candidate-top { flex-wrap: nowrap; }
  .candidate-top > div { min-width: 0; }
  .candidate-top .pill { margin-left: 0; font-size: 9px; max-width: 106px; white-space: normal; text-align: center; justify-content: center; }
  .candidate-top .cell-title { align-items: flex-start; font-size: 13px; }
  .candidate-top .cell-title input { margin-top: 4px; }
  .candidate-top .cell-sub { margin-top: 5px; line-height: 1.7; }
  .candidate-reason, .candidate-evidence { margin-left: 0; font-size: 11px; }
  .candidate .split-actions { gap: 5px; }
  .candidate .split-actions .btn { font-size: 11px; padding-right: 8px; padding-left: 8px; }
  .detail-head > .page-head { gap: 14px; }
  .detail-head > .inline-link { margin-bottom: 15px; }
  .detail-head .page-actions { width: 100%; }
  .detail-head .page-actions .btn { flex: 1; }
  .detail-head .page-actions .pill { padding: 6px 10px; }
  .kv-row { font-size: 11px; }
  .contact-card p { font-size: 13px; }
  .quality-issue .split-actions { justify-content: flex-start; gap: 8px; }
  .quality-issue .split-actions > .btn { flex: 1; }
  .quality-issue .split-actions > .pill { margin-left: 0; }
  .inbox-layout > .inbox-list { border-right: 0; }
  .inbox-thread > .panel-body { padding: 16px; }
  .thread-head { align-items: flex-start; padding: 16px; }
  .thread-head > div { flex: 1 1 100%; }
  .thread-head > .inline-link { margin-left: 0; }
  .thread-head .mobile-only { margin: -5px 0 9px -10px; justify-content: flex-start; }
  .thread-messages { padding: 0; }
  .reply-composer { padding: 17px 0 0; }
  .reply-composer .split-actions { gap: 10px; }
  .reply-composer .split-actions > .btn { flex: 1 1 100%; }
  .approval-list.panel { padding: 9px; }
  .draft-row { padding: 14px; }
  .approval-editor .panel-body > .split-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .approval-editor .panel-body > .split-actions > .btn:last-child { grid-column: 1 / -1; }
  .channel-grid { margin-top: 17px; }
  .channel-card > .panel-head { flex-wrap: nowrap; padding: 15px 16px; min-height: 57px; }
  .channel-card .panel-head h2 { font-size: 14px; }
  .channel-card .panel-body { padding: 16px; }
  .channel-card .panel-body p { font-size: 12px; }
  .funnel-steps.panel-body { grid-template-columns: 1fr; gap: 8px; padding: 16px; }
  .funnel-steps > div { padding: 14px; }
  .funnel-steps > span { transform: rotate(90deg); line-height: 20px; }
  .funnel-steps strong { font-size: 12px; }
  .funnel-steps p { font-size: 11px; margin-top: 7px; }
  .source-table { min-width: 0; font-size: 10px; }
  .source-table th, .source-table td { padding-right: 5px; padding-left: 5px; font-size: 10px; }
}
