/* Proposal-Gen web UI. Color language mirrors the desktop GUI:
   email-summary cells #fdf6e3, Vantagepoint cells #e8f0fe, and
   red/yellow/green severity borders on review rows. */

* { box-sizing: border-box; }

:root {
  --ac-charcoal: #50545a;
  --ac-charcoal-deep: #42464c;
  --ac-blue: #1376a5;
  --ac-blue-bright: #3b93c4;
  --ac-blue-pale: #edf7fc;
  --ac-orange: #f27421;
  --ac-orange-pale: #fff3e9;
  --ac-ink: #101828;
  --ac-muted: #60718a;
  --ac-canvas: #f6f8fb;
  --ac-surface: #ffffff;
  --ac-border: #dce3ec;
  --ac-border-strong: #c7d1dd;
  --ac-shadow: 0 6px 22px rgba(33, 49, 71, 0.08);
  --ac-radius: 12px;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ac-ink);
  background: var(--ac-canvas);
  min-height: 100vh;
}

/* ---- chrome ---- */

.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 60px;
  background: var(--ac-charcoal);
  color: #fff;
  padding: 0 28px 0 38px;
  box-shadow: 0 3px 9px rgba(21, 27, 34, 0.16);
  position: relative;
  z-index: 40;
}
.topbar .brand {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.brand-logo { display: block; width: auto; object-fit: contain; flex: none; }
.brand-logo-header { height: 42px; }
.brand-logo-light { width: 172px; height: auto; }
.brand-app-name {
  border-left: 1px solid rgba(255, 255, 255, 0.38);
  padding-left: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.topbar nav { display: flex; align-self: stretch; gap: 2px; }
.topbar nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #f1f3f5;
  text-decoration: none;
  padding: 0 12px;
  border-bottom: 3px solid transparent;
  font-size: 15px;
  transition: background 120ms ease, border-color 120ms ease;
}
.topbar nav a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.topbar nav a.active { background: rgba(255, 255, 255, 0.12); border-bottom-color: var(--ac-blue-bright); color: #fff; }
.nav-icon, .icon-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.topbar .userbox {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  white-space: nowrap;
}
.logout-form { margin: 0; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}
.icon-button:hover { background: rgba(255, 255, 255, 0.12); }

.login-card {
  max-width: 460px;
  margin: 13vh auto 0;
  background: #fff;
  border: 2px solid var(--ac-border);
  border-radius: 22px;
  padding: 34px 42px 38px;
  text-align: center;
  box-shadow: var(--ac-shadow);
}
.login-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ac-charcoal-deep); margin-bottom: 22px; }
.login-brand .brand-app-name { border-left-color: var(--ac-border-strong); font-size: 20px; }
.login-card h1 { margin: 2px 0 8px; font-size: 30px; letter-spacing: -0.025em; }
.login-eyebrow, .landing-eyebrow { margin: 0; color: var(--ac-blue); font-size: 12px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase; }
.login-card .btn { margin-top: 10px; min-width: 180px; }
.login-button { width: 100%; min-height: 44px; }

main { padding: 24px 28px 56px; }

.status-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #eef1f5;
  border-top: 1px solid #d4d9e0;
  padding: 6px 16px;
  font-size: 13px;
  color: #444;
  min-height: 30px;
  z-index: 30;
}
.status-bar.status-error { color: #a94442; background: #fdf2f2; }
.status-bar:empty { display: none; }

/* ---- landing ---- */

.landing { max-width: 1180px; margin: 0 auto; padding: 11vh 0 40px; text-align: center; }
.landing h1 { margin: 6px 0 2px; font-size: clamp(30px, 3vw, 42px); line-height: 1.2; letter-spacing: -0.035em; }
.landing-lede { margin: 0; color: var(--ac-muted); font-size: 20px; }
.landing-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; margin-top: 48px; }
.landing-card {
  display: flex;
  min-height: 310px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 2px solid var(--ac-border);
  border-radius: 36px;
  padding: 34px 32px 28px;
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}
.landing-card:hover { transform: translateY(-3px); border-color: #a9cfe2; box-shadow: var(--ac-shadow); }
.landing-card:focus-visible { outline: 3px solid rgba(59, 147, 196, 0.3); outline-offset: 3px; }
.landing-card h2 { margin: 17px 0 8px; font-size: 23px; letter-spacing: -0.02em; }
.landing-card p { max-width: 330px; min-height: 46px; margin: 0; color: #5a6d89; font-size: 16px; }
.landing-icon { display: grid; width: 64px; height: 64px; place-items: center; }
.landing-icon svg { width: 54px; height: 54px; fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.landing-icon-blue { color: var(--ac-blue); }
.landing-icon-orange { color: var(--ac-orange); }
.card-link { margin-top: 20px; color: var(--ac-blue); font-size: 13px; font-weight: 700; opacity: 0; transform: translateY(3px); transition: opacity 140ms ease, transform 140ms ease; }
.landing-card:hover .card-link, .landing-card:focus-visible .card-link { opacity: 1; transform: translateY(0); }

/* ---- two-pane layout ---- */

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 20px;
  align-items: start;
}
.inbox-panel {
  background: #fff;
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius);
  padding: 14px;
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  box-shadow: 0 2px 10px rgba(33, 49, 71, 0.04);
}
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.panel-head:not(:first-child) { border-top: 1px solid #edf0f4; margin-top: 12px; padding-top: 12px; }
.panel-head h2 { font-size: 15px; margin: 4px 0; letter-spacing: -0.01em; }
.workflow-board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.workflow-lane + .workflow-lane { border-top: 1px solid #edf0f4; margin-top: 12px; padding-top: 12px; }
.proposal-workflow-layout.is-board-open { display: block; }
.proposal-workflow-layout.is-board-open .inbox-panel {
  position: fixed;
  z-index: 60;
  inset: 70px 12px 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(230px, 1fr));
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  max-height: none;
  overflow: auto;
  background: var(--ac-canvas);
  box-shadow: 0 12px 40px rgba(28, 42, 61, .24);
}
.proposal-workflow-layout.is-board-open .workflow-board-toolbar { grid-column: 1 / -1; margin: 0; }
.proposal-workflow-layout.is-board-open .workflow-lane {
  min-width: 0;
  overflow-y: auto;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--ac-border);
  border-radius: 10px;
  background: #fff;
}
.proposal-workflow-layout.is-board-open .workflow-lane + .workflow-lane { margin: 0; }
.proposal-workflow-layout.is-board-open .review-pane { display: none; }
body.workflow-board-open { overflow: hidden; }

.record-list { list-style: none; margin: 8px 0 0; padding: 0; }
.record-list li { margin-bottom: 4px; }
.record-item {
  display: block;
  width: 100%;
  text-align: left;
  background: #fafbfd;
  border: 1px solid var(--ac-border);
  border-radius: 8px;
  padding: 9px 10px;
  cursor: pointer;
  font: inherit;
}
.record-item:hover { border-color: #9bc8dd; background: var(--ac-blue-pale); }
.project-card-blue { box-shadow: inset 4px 0 0 var(--ac-blue); background: var(--ac-blue-pale); }
.project-card-orange { box-shadow: inset 4px 0 0 var(--ac-orange); background: var(--ac-orange-pale); }
.project-card-grey { box-shadow: inset 4px 0 0 var(--ac-charcoal); background: #f1f3f5; }
.record-title-row { display: flex; align-items: flex-start; gap: 8px; }
.record-title-row .record-name { flex: 1; min-width: 0; }
.hot-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #bf982c;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  padding: 4px 7px;
  text-transform: uppercase;
}
.deadline-badge-urgent { background: #d87525; }
.deadline-badge-critical { background: #cf3d32; }
.deadline-badge-overdue { background: #962b27; font-weight: 900; }
.record-when { color: #777; font-size: 12px; display: block; }
.record-name { font-weight: 600; display: block; word-break: break-all; }
.record-subject { color: #555; font-size: 12px; display: block; margin-top: 2px; }
.record-deadline { color: var(--ac-muted); display: block; font-size: 12px; margin-top: 2px; }
.deadline-text-safe { color: #377447; }
.deadline-text-approaching { color: #8d701b; font-weight: 600; }
.deadline-text-urgent { color: #af541b; font-weight: 700; }
.deadline-text-critical { color: #b63128; font-weight: 700; }
.deadline-text-overdue { color: #8d211e; font-weight: 900; }
.count-line { margin: 8px 2px 2px; }

.review-pane {
  background: #fff;
  border: 1px solid var(--ac-border);
  border-radius: var(--ac-radius);
  padding: 18px;
  min-height: 320px;
  box-shadow: 0 2px 10px rgba(33, 49, 71, 0.04);
}
.placeholder { color: #888; text-align: center; padding: 80px 20px; }
.placeholder.success { color: #2e7d32; font-size: 15px; }
.pane-error { padding: 24px; }

/* ---- buttons / misc ---- */

.btn {
  font: inherit;
  padding: 7px 14px;
  border: 1px solid var(--ac-border-strong);
  border-radius: 7px;
  background: #fff;
  color: #26364a;
  cursor: pointer;
  font-weight: 600;
  transition: background 100ms ease, border-color 100ms ease, box-shadow 100ms ease;
}
.btn:hover { background: #f5f8fb; border-color: #91afc2; }
.btn:focus-visible { outline: 3px solid rgba(59, 147, 196, 0.24); outline-offset: 1px; }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-primary { background: var(--ac-blue); border-color: var(--ac-blue); color: #fff; }
.btn-primary:hover { background: #0e638b; border-color: #0e638b; }
.btn-small { padding: 3px 8px; font-size: 12px; }

.muted { color: var(--ac-muted); }
.italic { font-style: italic; }
.prewrap { white-space: pre-wrap; }
.error-box {
  background: #fdf2f2;
  border: 1px solid #e6b8b8;
  color: #a94442;
  border-radius: 4px;
  padding: 8px 10px;
  white-space: pre-wrap;
}
.success-box {
  background: #f1f9f1;
  border: 1px solid #b7dcb7;
  color: #2e7d32;
  border-radius: 4px;
  padding: 10px 12px;
}
.success-box .path { font-family: Consolas, monospace; font-size: 12px; color: #444; word-break: break-all; }
.caution {
  background: #fcf8e3;
  border: 1px solid #e8dcae;
  color: #8a6d3b;
  border-radius: 4px;
  padding: 8px 10px;
  margin: 8px 0;
}
.warn-box { color: #8a6d3b; }
.warn-list { color: #8a6d3b; font-size: 12px; }
.warn-badge { color: #b8860b; font-weight: 700; cursor: help; }

/* ---- match bar ---- */

.match-bar {
  display: flex;
  gap: 12px;
  border: 1px solid var(--ac-border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
  background: #f9fbfd;
}
.match-block { flex: 1; min-width: 0; }
.match-title { font-weight: 700; }
.match-text { margin: 4px 0 6px; word-break: break-word; }

/* ---- target bar ---- */

.target-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border: 1px solid var(--ac-border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 14px;
  background: #f9fbfd;
}
.target-heading { font-weight: 700; }
.target-field { display: inline-flex; align-items: center; gap: 6px; }
.target-bar input[type="text"], .target-bar select { font: inherit; padding: 7px 9px; }

/* ---- tabs ---- */

.tab-buttons { display: flex; gap: 4px; border-bottom: 1px solid var(--ac-border); margin-bottom: 10px; flex-wrap: wrap; }
.tab-btn {
  font: inherit;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-bottom: none;
  background: none;
  cursor: pointer;
  border-radius: 4px 4px 0 0;
  color: #555;
}
.tab-btn:hover { color: var(--ac-blue); background: var(--ac-blue-pale); }
.tab-btn.active {
  background: #fff;
  border-color: var(--ac-border);
  color: #222;
  font-weight: 600;
  margin-bottom: -1px;
  box-shadow: inset 0 3px 0 var(--ac-blue);
}
.tab-page { display: none; padding-top: 4px; }
.tab-page.active { display: block; }

/* ---- delta rows ---- */

.delta-header, .delta-row {
  display: grid;
  grid-template-columns: 170px 1fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  padding: 3px 6px;
}
.delta-header { font-weight: 700; }
.delta-header .col-json {
  background: #fdf6e3; color: #555; border-radius: 3px; padding: 4px; text-align: center;
}
.delta-header .col-vp {
  background: #e8f0fe; color: #1a3a70; border-radius: 3px; padding: 4px; text-align: center;
}
.field-label { font-weight: 600; }

.delta-row { border-left: 4px solid transparent; margin: 1px 0; }
.delta-row.sev-material { border-left-color: #d9534f; }
.delta-row.sev-minor { border-left-color: #f0ad4e; }
.delta-row.sev-clean { border-left-color: #5cb85c; }

.cell {
  font: inherit;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 4px 6px;
  cursor: pointer;
  word-break: break-word;
  white-space: pre-wrap;
}
.cell-json { background: #fdf6e3; color: #555; }
.cell-vp { background: #e8f0fe; color: #1a3a70; font-weight: 500; }
.cell:hover { border-color: #4a90e2; }

.col-final .editor { width: 100%; font: inherit; padding: 4px 6px; }
.col-final textarea.editor { resize: vertical; }
.autocomplete-field { display: block; position: relative; }
.autocomplete-results { display: block; position: relative; z-index: 20; }
.autocomplete-menu {
  position: absolute; left: 0; right: 0; top: 2px; display: grid;
  background: #fff; border: 1px solid #aeb9c8; border-radius: 5px;
  box-shadow: 0 5px 16px rgba(31, 52, 82, 0.18); overflow: hidden;
}
.autocomplete-heading {
  padding: 6px 9px; background: #f3f6fa; color: #526174;
  font-size: 12px; font-weight: 600;
}
.autocomplete-option {
  display: grid; gap: 2px; width: 100%; padding: 8px 10px; border: 0;
  border-top: 1px solid #e3e7ed; background: #fff; text-align: left;
  color: inherit; cursor: pointer;
}
.autocomplete-option:hover, .autocomplete-option:focus { background: #edf4ff; outline: none; }
.autocomplete-option.cross-firm { border-left: 4px solid #d9822b; }
.autocomplete-primary { font-weight: 700; }
.autocomplete-secondary { color: #526174; font-size: 12px; }
.autocomplete-warning { color: #8a4d00; font-size: 12px; font-weight: 600; }
.autocomplete-error { display: block; padding: 5px 7px; color: #8a4d00; font-size: 12px; }

/* ---- group boxes / grids ---- */

.group-box {
  border: 1px solid var(--ac-border);
  border-radius: 10px;
  margin: 12px 0;
  padding: 12px 16px 16px;
}
.group-box legend { font-weight: 700; padding: 0 8px; color: #26364a; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
.check-item { display: flex; align-items: center; gap: 6px; }
.author-grid {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 6px 12px;
  align-items: center;
}
.author-select { font: inherit; padding: 4px 6px; min-width: 260px; }
.author-status { margin-left: 8px; }

/* ---- action bar ---- */

.action-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid #e1e5ea;
  margin-top: 12px;
  padding-top: 10px;
}
.details-check { margin-left: 8px; }

/* ---- modal ---- */

.modal { position: fixed; inset: 0; z-index: 50; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(20, 30, 45, 0.45); }
.modal-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--ac-border);
  border-radius: 14px;
  max-width: 560px;
  margin: 8vh auto 0;
  padding: 16px 20px;
  box-shadow: 0 16px 48px rgba(24, 35, 49, 0.25);
  max-height: 80vh;
  overflow-y: auto;
}
.modal-wide { max-width: 720px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.pick-list { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.pick {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid #e1e5ea; border-radius: 4px;
  padding: 6px 8px; cursor: pointer;
}
.pick:hover { border-color: #4a90e2; }
.preview-list { display: grid; grid-template-columns: 140px 1fr; gap: 4px 10px; margin: 10px 0; }
.preview-list dt { font-weight: 600; }
.preview-list dd { margin: 0; word-break: break-word; }
.create-firm-extra { border-top: 1px solid #e1e5ea; margin-top: 10px; padding-top: 10px; }
pre { background: #f6f7f9; border: 1px solid #e1e5ea; border-radius: 4px; padding: 8px; overflow: auto; font-size: 12px; }

/* ---- consultant form ---- */

.detail-title { margin: 4px 0 2px; }
.form-grid {
  display: grid;
  grid-template-columns: 160px minmax(240px, 420px);
  gap: 8px 12px;
  align-items: center;
}
.form-grid input[type="text"],
.form-grid input[type="number"] { font: inherit; padding: 5px 7px; width: 100%; }
.proposal-detail-value {
  align-self: center;
  color: var(--ac-ink);
  font-weight: 600;
  min-width: 0;
}
.coauthor-field { margin: 4px 0 10px; }
.coauthor-field input { font: inherit; padding: 5px 7px; min-width: 260px; }
.leader-transfer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.leader-transfer #leader-result p { margin: 0; }
.discipline-block { margin: 6px 0 10px; }
.phase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(200px, 260px));
  gap: 2px 20px;
  margin: 4px 0 4px 26px;
}
.phase-grid .check-item input:disabled + span { color: #aaa; }
.section-fee-field { margin: 8px 0 12px; }
.section-fee-field input { font: inherit; padding: 5px 7px; width: 180px; }
.phase-editor {
  border: 1px solid var(--ac-border);
  border-radius: 8px;
  background: #fff;
  min-width: 0;
}
.phase-editor:not([open]) { align-self: start; }
.proposal-number-display { color: var(--ac-blue); font-size: 18px; font-weight: 800; letter-spacing: .02em; }
.section-author-note { margin: 8px 0 12px; padding: 8px 10px; border-left: 3px solid var(--ac-orange); background: #fff8ef; }
.leader-scope-summary .chip-row { margin-top: 8px; }
.phase-fee-table-wrap { overflow-x: auto; }
.phase-fee-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.phase-fee-table th, .phase-fee-table td { padding: 8px; border-bottom: 1px solid var(--ac-border); text-align: left; vertical-align: top; }
.phase-fee-table th { color: var(--ac-muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.phase-fee-table td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.phase-proposal-fee { width: 130px; }
.fee-source-button {
  border: 0;
  border-bottom: 1px dashed currentColor;
  padding: 2px 1px;
  background: transparent;
  color: var(--ac-blue);
  cursor: pointer;
  font: inherit;
  font-variant-numeric: tabular-nums;
}
.fee-source-button:hover, .fee-source-button:focus-visible { background: var(--ac-blue-pale); }
.fee-source-button.is-applied { border-radius: 4px; background: #dff1e4; color: #246b38; }
.section-phase-pricing + .section-phase-pricing { margin-top: 18px; }
.phase-editor > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  list-style: none;
}
.phase-editor > summary::-webkit-details-marker { display: none; }
.phase-editor > summary::after { content: "›"; color: var(--ac-muted); font-size: 18px; transform: rotate(90deg); }
.phase-editor[open] > summary::after { transform: rotate(-90deg); }
.phase-edit-hint { margin-left: auto; color: var(--ac-muted); font-size: 11px; }
.phase-effort-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(58px, 1fr));
  gap: 6px;
  padding: 0 8px 8px;
}
.phase-effort-grid label { color: var(--ac-muted); font-size: 10px; }
.phase-effort-grid input { width: 100%; margin-top: 3px; padding: 4px; }
input[readonly] { background: #eef1f5; color: var(--ac-charcoal-deep); cursor: not-allowed; }

/* ---- comps & pricing tab ---- */

.proposal-pricing-layout {
  display: grid;
  grid-template-columns: minmax(230px, 275px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.proposal-pricing-sidebar {
  position: sticky;
  top: 76px;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--ac-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(33, 49, 71, 0.04);
}
.pricing-sidebar-heading h3 { margin: 0; font-size: 16px; }
.pricing-sidebar-heading p { margin: 4px 0 0; color: var(--ac-muted); font-size: 12px; line-height: 1.45; }
.pricing-control { display: grid; gap: 5px; color: #334155; font-size: 12px; font-weight: 700; }
.pricing-control input,
.pricing-control select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid var(--ac-border);
  border-radius: 7px;
  background: #fff;
  color: var(--ac-ink);
  font: inherit;
  font-weight: 400;
}
.pricing-control input:focus,
.pricing-control select:focus { border-color: var(--ac-blue); outline: 2px solid rgba(15, 114, 156, 0.14); }
.pricing-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #334155; font-size: 12px; }
.pricing-switch span { display: grid; gap: 2px; }
.pricing-switch small { color: var(--ac-muted); font-weight: 400; }
.pricing-switch input[type="checkbox"] { width: 18px; height: 18px; flex: none; accent-color: var(--ac-blue); }
.pricing-status-filter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin: 0; padding: 0; border: 0; }
.pricing-status-filter legend { grid-column: 1 / -1; margin-bottom: 5px; color: #334155; font-size: 12px; font-weight: 700; }
.pricing-status-filter .check-item { gap: 5px; font-size: 12px; }
.pricing-sidebar-stats { display: grid; gap: 4px; padding: 10px; border-radius: 8px; background: var(--ac-canvas); color: #475569; font-size: 12px; }
.pricing-sidebar-stats strong { color: var(--ac-ink); font-variant-numeric: tabular-nums; }
.pricing-context-card { display: grid; gap: 3px; padding: 10px; border-radius: 8px; background: var(--ac-canvas); }
.pricing-context-card strong { color: var(--ac-ink); font-size: 18px; font-variant-numeric: tabular-nums; }
.pricing-rollup { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--ac-border); }
.pricing-rollup h3 { margin: 0; font-size: 14px; }
.pricing-rollup-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.pricing-rollup-line > span { display: grid; gap: 2px; min-width: 0; }
.pricing-rollup-line small { color: var(--ac-muted); font-size: 10px; line-height: 1.3; }
.pricing-rollup-line > b { font-variant-numeric: tabular-nums; }
.pricing-rollup-total { display: flex; justify-content: space-between; gap: 8px; padding-top: 9px; border-top: 2px solid var(--ac-border-strong); }
.pricing-rollup-total strong { color: var(--ac-blue); font-size: 16px; font-variant-numeric: tabular-nums; }
.pricing-method-note { margin: 0; color: var(--ac-muted); font-size: 11px; line-height: 1.45; }
.proposal-pricing-sidebar .btn { width: 100%; }
.proposal-pricing-workspace { min-width: 0; }
.comp-table-wrap { overflow: auto; max-height: min(56vh, 420px); border: 1px solid var(--ac-border); border-radius: 8px; background: #fff; }
.comp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.comp-table th { position: sticky; top: 0; z-index: 1; padding: 8px; background: #f4f6f8; color: var(--ac-muted); text-align: left; white-space: nowrap; }
.comp-table td { padding: 8px; border-top: 1px solid var(--ac-border); vertical-align: top; }
.comp-table tr.is-selected { background: var(--ac-blue-pale); }
.comp-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pricing-curve-details { margin-top: 12px; border: 1px solid var(--ac-border); border-radius: 8px; background: #fff; }
.pricing-curve-details > summary { padding: 10px 12px; cursor: pointer; color: var(--ac-blue); font-weight: 700; }
.pricing-curve-details[open] > summary { border-bottom: 1px solid var(--ac-border); }
.pricing-curve-details > .chart-wrap, .pricing-curve-details > p { margin: 10px; }
.pricing-workspace-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 0 2px 10px; }
.pricing-workspace-heading h3 { margin: 0; font-size: 17px; }
.pricing-workspace-heading p { margin: 3px 0 0; color: var(--ac-muted); font-size: 12px; }
.pricing-workspace-heading > p { max-width: 380px; text-align: right; }
.pricing-model-chart > svg { min-height: 420px; }
.pricing-model-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.pricing-empty-inline { padding: 56px 24px; border: 1px dashed var(--ac-border-strong); border-radius: 10px; background: var(--ac-canvas); text-align: center; }
.pricing-empty-inline h3 { margin: 0 0 6px; }
.pricing-empty-inline p { margin: 0; color: var(--ac-muted); }
.pricing-coverage-note, .pricing-discipline-body > .info-notice { margin: 0 0 12px; padding: 10px 12px; border-left: 4px solid var(--ac-blue); border-radius: 6px; background: #edf7fb; color: #334155; font-size: 12px; }
.pricing-discipline { margin-bottom: 14px; border: 1px solid var(--ac-border); border-radius: 12px; background: #fff; overflow: hidden; }
.pricing-discipline > summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 16px; cursor: pointer; background: var(--ac-canvas); }
.pricing-discipline > summary > span { display: grid; gap: 3px; }
.pricing-discipline > summary small { color: var(--ac-muted); font-size: 11px; }
.pricing-summary-fee { text-align: right; }
.pricing-summary-fee b { color: var(--ac-blue); font-size: 17px; font-variant-numeric: tabular-nums; }
.pricing-discipline-body { padding: 16px; }
.status-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.awarded-dot { background: var(--ac-blue); }
.pending-dot { background: var(--ac-orange); transform: rotate(45deg); border-radius: 1px; }
.status-ring { display: inline-block; width: 10px; height: 10px; border: 2px solid #687386; border-radius: 50%; }
.draft-size-key { width: 3px; height: 15px; border-left: 3px dashed var(--ac-orange); }
.axis-note { margin: 6px 2px 0; }
.provenance { margin-top: 14px; padding-top: 8px; border-top: 1px solid #e1e0d9; }
.synthetic-banner {
  margin: 0 0 8px;
  padding: 6px 10px;
  border: 1px solid #fab219;
  border-left-width: 4px;
  border-radius: 4px;
  background: #fdf6e6;
  font-size: 13px;
}
.chart-wrap {
  position: relative;
  border: 1px solid #e1e0d9;
  border-radius: 6px;
  background: #fcfcfb;
  padding: 6px 6px 2px;
}
/* Direct child only — the legend's inline glyph SVGs keep their own size. */
.chart-wrap > svg { display: block; width: 100%; height: auto; }
.chart-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 4px 8px 8px;
  font-size: 12px;
  color: #52514e;
}
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.best-fit-key { width: 20px; height: 3px; border-radius: 2px; background: var(--ac-blue); }
.fitted-curve-key { width: 20px; height: 0; border-top: 2px dashed #8aa4bd; }
.comp-point { cursor: pointer; }
.comp-point .comp-glyph {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 80ms ease-out;
}
.comp-point:hover .comp-glyph,
.comp-point:focus-visible .comp-glyph { transform: scale(1.4); }
.comp-point:focus { outline: none; }
.comp-point:focus-visible .comp-glyph { filter: drop-shadow(0 0 2px #2b62a7); }
.comp-point.is-unselected { opacity: 0.38; }

/* hover layer: one pre-rendered card per point, positioned by app.js */
.hovercard-layer { position: absolute; inset: 0; pointer-events: none; }
.comp-hovercard {
  position: absolute;
  z-index: 20;
  width: 320px;
  max-width: 92%;
  padding: 8px 10px;
  border: 1px solid #c3c2b7;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(11, 11, 11, 0.16);
  font-size: 12px;
  line-height: 1.42;
  color: #0b0b0b;
}
.comp-hovercard[hidden] { display: none; }
.hc-title { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.hc-head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.hc-fee { font-weight: 700; font-variant-numeric: tabular-nums; }
.hc-meta { color: #52514e; }
.hc-row { display: flex; gap: 8px; margin-top: 3px; }
.hc-key { color: #898781; min-width: 46px; flex: none; }
.hc-excerpt {
  margin: 6px 0 0;
  padding-top: 6px;
  border-top: 1px solid #e1e0d9;
  color: #52514e;
}
.chip-row { display: flex; gap: 4px; flex-wrap: wrap; }
.chip {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid #e1e0d9;
  border-radius: 9px;
  background: #f6f5f1;
  color: #52514e;
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

.pricing-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.pricing-panel { margin: 0; }
.panel-title { margin: 2px 0 8px; font-size: 14px; }
.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
}
.stat-label { color: #52514e; }
.stat-value { font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-value.flagged { color: #d03b3b; }
.small { font-size: 12px; }
.memory-table { border-collapse: collapse; width: 100%; margin-top: 6px; font-size: 12px; }
.memory-table th { text-align: left; color: #898781; font-weight: 600; padding: 2px 8px 2px 0; }
.memory-table td { padding: 2px 8px 2px 0; border-top: 1px solid #e1e0d9; }
.memory-table .num, .comp-card .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Proposal Administrator extracted-comp review */
.comp-review-page { max-width: 1080px; margin: 0 auto; padding: 20px; }
.comp-review-page h1 { margin: 4px 0; }
.comp-review-list { display: grid; gap: 14px; margin-top: 16px; }
.comp-review-card { border: 1px solid #e1e0d9; border-radius: 8px; padding: 16px; background: #fcfcfb; }
.comp-review-card h2 { margin: 0; font-size: 18px; }
.comp-review-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 18px; margin: 14px 0; }
.comp-review-facts div { min-width: 0; }
.comp-review-facts dt { color: #898781; font-size: 12px; font-weight: 600; }
.comp-review-facts dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.comp-review-scope { padding: 10px; background: #f3f2ed; border-radius: 4px; }
.comp-review-form label { display: grid; gap: 4px; font-weight: 600; }
.comp-review-form textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.comp-review-form .action-row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.status-ok { padding: 10px 12px; background: #eaf7e8; border: 1px solid #9bc895; border-radius: 4px; }

.comp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.comp-card {
  display: block;
  border: 1px solid #e1e0d9;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
  background: #fff;
}
.comp-card:hover { border-color: #4a90e2; }
.comp-card.is-selected { border-color: #2b62a7; box-shadow: inset 0 0 0 1px #2b62a7; }
.comp-card input[type="checkbox"] { float: right; margin-left: 8px; }
.comp-line { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.comp-line .num { margin-left: auto; font-weight: 600; }
.status-chip { font-weight: 700; font-size: 12px; }

/* htmx request indicator */
.htmx-request.btn, .btn.htmx-request { opacity: 0.6; pointer-events: none; }

/* Private author profile */
.profile-page { max-width: 820px; margin: 0 auto; padding: 30px; background: #fff; border: 1px solid var(--ac-border); border-radius: var(--ac-radius); box-shadow: 0 2px 10px rgba(33, 49, 71, 0.04); }
.profile-page h1 { margin-bottom: 4px; }
.profile-form { display: grid; gap: 14px; margin-top: 18px; }
.profile-form input[type="text"], .profile-form input[type="file"] {
  width: 100%; box-sizing: border-box; padding: 7px; font: inherit;
}
.signature-preview { margin: 10px 0; padding: 10px; background: #fff; border: 1px solid #e1e0d9; }
.signature-preview img { display: block; max-width: 260px; max-height: 110px; object-fit: contain; }

/* Authenticated Vantagepoint directory search */
.vp-search-page { max-width: 1120px; margin: 0 auto; padding: 30px; background: #fff; border: 1px solid var(--ac-border); border-radius: var(--ac-radius); box-shadow: 0 2px 10px rgba(33, 49, 71, 0.04); }
.vp-search-page h1 { margin-bottom: 4px; }
.vp-search-form { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; margin: 20px 0; }
.vp-search-form label { display: grid; gap: 4px; font-weight: 600; }
.vp-search-form select, .vp-search-form input { box-sizing: border-box; padding: 7px; font: inherit; }
.vp-search-query { flex: 1 1 360px; }
.vp-result-list { display: grid; gap: 10px; }
.vp-result-card { border: 1px solid var(--ac-border); border-radius: 10px; padding: 14px 16px; background: #fff; transition: border-color 100ms ease, box-shadow 100ms ease; }
.vp-result-card:hover { border-color: #9bc8dd; box-shadow: 0 3px 12px rgba(33, 49, 71, 0.06); }
.vp-result-card h2 { margin: 0 0 4px; font-size: 17px; }
.vp-result-card p { margin: 3px 0; overflow-wrap: anywhere; }

/* ---- shared Acentech form language ---- */

input[type="text"], input[type="search"], input[type="date"], input[type="email"],
input[type="number"], input[type="file"], textarea, select {
  border: 1px solid var(--ac-border-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--ac-ink);
  min-height: 36px;
}
input[type="text"]:focus, input[type="search"]:focus, input[type="date"]:focus,
input[type="email"]:focus, input[type="number"]:focus, textarea:focus, select:focus {
  border-color: var(--ac-blue-bright);
  outline: 3px solid rgba(59, 147, 196, 0.16);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--ac-blue); }

.ai-intake-page { max-width: 900px; margin: 0 auto; }
.ai-status { margin: 18px 0; padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.ai-status-ready { color: #155d39; background: #e8f6ee; border: 1px solid #aad6bc; }
.ai-status-error { color: #8b2a24; background: #fff0ee; border: 1px solid #e6b8b3; }
.ai-upload-form { display: grid; gap: 12px; padding: 20px; background: var(--surface, #fff); border: 1px solid var(--border, #d9dee5); border-radius: 10px; }
.ai-upload-form button { justify-self: start; }
.ai-result { margin-top: 24px; }
.ai-scope-review { display: grid; gap: 8px; margin: 18px 0; padding: 16px; }
.ai-json { overflow: auto; max-height: 600px; padding: 16px; color: #e9edf2; background: #17212b; border-radius: 8px; white-space: pre-wrap; }
a { color: #086fa4; }
h1, h2, h3 { color: #101828; }

@media (max-width: 1050px) {
  .topbar { padding-left: 20px; padding-right: 18px; gap: 10px; }
  .brand-logo-header { height: 38px; }
  .brand-app-name { font-size: 16px; }
  .topbar nav a { padding: 0 9px; }
  .topbar nav a span { display: none; }
  .topbar nav a .nav-icon { width: 22px; height: 22px; }
  .landing { padding-top: 7vh; }
  .landing-cards { margin-top: 34px; }
  .proposal-pricing-layout { grid-template-columns: 1fr; }
  .proposal-pricing-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pricing-sidebar-heading, .pricing-status-filter, .pricing-sidebar-stats,
  .pricing-method-note, .proposal-pricing-sidebar .btn { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; min-height: auto; padding: 7px 12px 0; }
  .topbar .brand { height: 44px; }
  .brand-logo-header { height: 36px; }
  .topbar .brand .brand-app-name { font-size: 15px; padding-left: 7px; }
  .topbar .userbox { margin-left: auto; }
  .topbar nav { order: 3; width: 100%; height: 46px; justify-content: space-around; }
  .topbar nav a { flex: 1; justify-content: center; padding: 0 5px; }
  main { padding: 14px 12px 40px; }
  .admin-layout { grid-template-columns: 1fr; gap: 12px; }
  .inbox-panel { position: static; max-height: none; }
  .landing { padding-top: 5vh; }
  .landing-cards { grid-template-columns: 1fr; margin-top: 28px; }
  .landing-card { min-height: 260px; border-radius: 24px; }
  .card-link { opacity: 1; transform: none; }
  .match-bar { flex-direction: column; }
  .delta-header, .delta-row { grid-template-columns: 120px minmax(160px, 1fr); }
  .delta-header > :nth-child(n+3), .delta-row > :nth-child(n+3) { grid-column: 2; }
  .form-grid, .author-grid { grid-template-columns: 1fr; }
  .phase-grid, .check-grid, .pricing-panels, .pricing-model-panels, .proposal-pricing-layout { grid-template-columns: 1fr; }
  .proposal-pricing-sidebar { position: static; grid-template-columns: 1fr; }
  .proposal-pricing-sidebar > * { grid-column: 1; }
  .pricing-workspace-heading { display: grid; }
  .pricing-workspace-heading > p { text-align: left; }
  .profile-page, .vp-search-page { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.checkout-workspace {
  border: 0;
  margin: 0;
  min-width: 0;
  padding: 0;
}

.checkout-workspace:disabled { opacity: .72; }

.checkout-banner {
  align-items: center;
  background: #eef7fb;
  border: 1px solid #b9dce9;
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.checkout-banner div,
.checkout-banner span { display: block; }

.checkout-banner-locked {
  background: #fff6e8;
  border-color: #e6c584;
}

.record-checkout {
  color: #96551c;
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 3px;
}

.source-material {
  background: #fff;
  border: 1px solid var(--ac-border);
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
}

.source-material > summary {
  cursor: pointer;
  font-weight: 750;
}

.source-message-meta {
  display: grid;
  gap: 4px;
  margin: 10px 0;
}

.source-email-body {
  background: #f6f8fa;
  border: 1px solid var(--ac-border);
  border-radius: 6px;
  font-family: inherit;
  max-height: 260px;
  overflow: auto;
  padding: 10px;
  white-space: pre-wrap;
}

.source-artifact-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.source-artifact-list li {
  align-items: center;
  border-top: 1px solid var(--ac-border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 0;
}

.source-artifact-list small {
  color: var(--ac-muted);
  display: block;
}

.source-artifact-actions { display: flex; gap: 6px; }
.demo-mode-banner {
  background: #8b1e1e;
  color: white;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 7px 16px;
  text-align: center;
}
.demo-login-banner {
  background: #8b1e1e;
  border-radius: 4px;
  color: white;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 18px;
  padding: 8px 12px;
  text-align: center;
}
.demo-personas { display: grid; gap: 10px; margin: 20px 0; }
.demo-persona { display: flex; justify-content: space-between; text-align: left; width: 100%; }
.demo-persona span { font-weight: 400; opacity: .82; }

.leader-scope-toggle { padding: 10px 12px; }
.section-author-tabs > .tab-buttons { margin-bottom: 14px; }
.record-progress-summary {
  color: var(--ac-ink);
  display: block;
  font-size: 12px;
  margin-top: 3px;
}
.progress-stage-chip {
  background: #e9eef3;
  border-radius: 999px;
  color: #344054;
  flex: none;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  text-transform: uppercase;
}
.team-progress-detail { display: grid; gap: 18px; }
.progress-detail-heading {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}
.progress-detail-heading h2 { margin: 2px 0 4px; }
.progress-detail-heading p { margin: 0; }
.progress-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.eyebrow {
  color: var(--ac-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.progress-stage-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.progress-stage {
  align-items: center;
  background: #f2f4f7;
  border: 1px solid var(--ac-border);
  border-radius: 8px;
  color: var(--ac-muted);
  display: flex;
  font-size: 12px;
  gap: 7px;
  padding: 9px;
}
.progress-stage span {
  align-items: center;
  background: #d0d5dd;
  border-radius: 50%;
  color: #344054;
  display: inline-flex;
  flex: 0 0 22px;
  font-weight: 800;
  height: 22px;
  justify-content: center;
}
.progress-stage.is-current { background: #eef7fb; border-color: #78b9d7; color: #145b79; }
.progress-stage.is-current span { background: var(--ac-blue); color: #fff; }
.progress-stage.is-complete { background: #edf7f2; border-color: #8bc5aa; color: #176448; }
.progress-stage.is-complete span { background: #168765; color: #fff; }
.progress-blocker {
  align-items: baseline;
  background: #fff6e8;
  border-left: 5px solid #e36f1e;
  border-radius: 7px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: space-between;
  padding: 11px 13px;
}
.progress-table-wrap { border: 1px solid var(--ac-border); border-radius: 8px; overflow-x: auto; }
.progress-table { border-collapse: collapse; min-width: 760px; width: 100%; }
.progress-table th, .progress-table td { border-bottom: 1px solid var(--ac-border); padding: 10px 12px; text-align: left; }
.progress-table thead th { background: #f7f8fa; color: var(--ac-muted); font-size: 11px; text-transform: uppercase; }
.progress-table tbody tr:last-child th, .progress-table tbody tr:last-child td { border-bottom: 0; }
.progress-status { border-radius: 999px; display: inline-block; font-size: 11px; font-weight: 800; padding: 4px 8px; }
.progress-status.is-complete { background: #e4f4eb; color: #176448; }
.progress-status.is-pending { background: #fff0dc; color: #8a4b08; }
.main-review-progress {
  align-items: center;
  border: 1px solid var(--ac-border);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px;
}
.main-review-progress div { display: grid; gap: 3px; }
.final-publish-date { margin-bottom: 16px; }
.final-publish-date h3 { margin-top: 0; }
.inline-controls {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.inline-controls label { font-weight: 700; }
.inline-controls input { min-width: 180px; }
.call-client-card {
  align-items: center;
  background: var(--panel, #fff);
  border: 1px solid #c8d3df;
  border-left: 5px solid #e36f1e;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  margin: 1rem 0;
  padding: 0.9rem 1rem;
}

.call-client-card h3,
.call-client-card p {
  margin: 0;
}

.call-client-button.disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 760px) {
  .progress-detail-heading { display: grid; }
  .progress-detail-actions { justify-content: flex-start; }
  .progress-stage-strip { grid-template-columns: 1fr 1fr; }
}
/* Forwarding-consultant intake confirmation: editable extract beside source. */
.quality-page { max-width: 1180px; margin: 0 auto; padding: 24px; }
.quality-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; }
.quality-heading h1 { margin: 2px 0 6px; }
.quality-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.quality-metrics article { background: #fff; border: 1px solid var(--ac-border); border-radius: 10px; padding: 18px; display: grid; gap: 6px; }
.quality-metrics strong { color: var(--ac-blue); font-size: 28px; font-variant-numeric: tabular-nums; }
.quality-metrics span { color: var(--ac-muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.quality-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.quality-section { margin-top: 16px; }
.quality-privacy-note { color: var(--ac-muted); font-size: 12px; margin: 18px 2px; }
.quality-refinement-summary { margin: -6px 0 18px; padding: 12px 14px; border-left: 4px solid var(--ac-blue); background: var(--ac-blue-pale); }
.quality-review-form { display: flex; align-items: center; gap: 6px; min-width: 300px; }
.quality-review-form select { min-width: 210px; }
@media (max-width: 800px) {
  .quality-metrics, .quality-grid { grid-template-columns: 1fr; }
}
.intake-review-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.intake-review-layout {
  display: grid;
  grid-template-columns: minmax(22rem, 0.9fr) minmax(28rem, 1.1fr);
  gap: 1.25rem;
  align-items: start;
}

.intake-extract-panel,
.intake-source-panel {
  min-width: 0;
}

.intake-source-panel {
  position: sticky;
  top: 1rem;
}

.intake-form-grid {
  grid-template-columns: minmax(8rem, 0.38fr) minmax(12rem, 1fr);
}

.stacked-field {
  display: block;
  margin: 1rem 0 0.35rem;
  font-weight: 600;
}

.intake-extract-panel textarea {
  width: 100%;
  resize: vertical;
}

.intake-source-tabs {
  margin-top: 0.75rem;
}

.intake-source-page {
  min-height: 34rem;
}

.intake-source-frame {
  display: block;
  width: 100%;
  height: min(68vh, 52rem);
  min-height: 34rem;
  border: 1px solid var(--border, #d4d8df);
  border-radius: 0.4rem;
  background: white;
}

.intake-source-email {
  max-height: min(68vh, 52rem);
  min-height: 30rem;
  overflow: auto;
  white-space: pre-wrap;
}

.intake-review-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: var(--surface, white);
  border-top: 1px solid var(--border, #d4d8df);
  padding-block: 0.85rem;
}

@media (max-width: 1050px) {
  .intake-review-layout {
    grid-template-columns: 1fr;
  }

  .intake-source-panel {
    position: static;
  }
}

/* Compact N&V scope rows and the peer RMS discipline tab. */
.nv-inline { margin-top: 12px; }
.nv-inline-intro { margin: 6px 0 12px; color: var(--ac-muted); font-size: 13px; }
.nv-inline-row { border: 1px solid var(--ac-border); border-radius: 8px; margin: 0 0 10px; overflow: hidden; }
.nv-inline-row > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px; padding: 12px 15px; cursor: pointer; background: var(--ac-canvas); font-size: 13px; }
.nv-inline-row > summary::before { content: '\25B8'; color: var(--ac-blue); }
.nv-inline-row[open] > summary::before { content: '\25BE'; }
.nv-inline-row > summary strong { min-width: 185px; font-size: 14px; }
.nv-inline-row > summary span { color: var(--ac-muted); }
.nv-inline-row > summary small { margin-left: auto; color: var(--ac-muted); }
.nv-inline-row.has-selection > summary small { color: var(--ac-blue); font-weight: 700; }
.nv-inline-body { padding: 10px 16px; }
.nv-inline select, .nv-inline input:not([type=checkbox]):not([type=radio]), .nv-inline textarea { border: 1px solid var(--ac-border-strong); border-radius: 6px; padding: 7px 9px; font: inherit; background: white; max-width: 100%; }
.nv-inline-service { padding: 5px 0; }
.nv-inline .check-item { font-size: 13px; margin: 5px 0; display: inline-flex; align-items: center; gap: 7px; }
.nv-inline input[type=checkbox] { accent-color: var(--ac-blue); }
.nv-inline-options { margin: 8px 0 10px 23px; padding: 10px 14px; border-left: 2px solid #c9e0ed; background: #f8fbfd; }
.nv-inline-options[hidden] { display: none; }
.nv-inline-tasks { display: flex; flex-wrap: wrap; gap: 0 24px; }
.nv-inline-fields { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: end; margin: 10px 0 4px; }
.nv-inline-fields > label { display: grid; gap: 5px; font-size: 12px; color: var(--ac-muted); }
.nv-inline-fields > label.check-item { display: flex; align-self: center; }
.nv-inline-fields input[type=number] { width: 90px; }
.nv-inline-template { color: var(--ac-muted); font-size: 12px; margin: 4px 0 8px; }
.nv-inline-footnote { font-size: 12px; color: var(--ac-muted); margin: 12px 0 0; }
.nv-inline-design .leader-scope-toggle { padding: 0; margin: 3px 0; }
.nv-inline textarea { display: block; width: 100%; margin-top: 6px; }
.nv-inline-assignments { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.nv-inline .nv-work-classes { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.nv-work-classes legend { font-size: 14px; font-weight: 650; padding: 0; }
.nv-work-class-options { display: flex; flex-wrap: wrap; gap: 12px; }
.nv-work-class-options > label { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border: 1px solid var(--ac-border); border-radius: 8px; cursor: pointer; min-width: 190px; background: white; }
.nv-work-class-options > label:has(input:checked) { border-color: var(--ac-blue); background: var(--ac-blue-pale); }
.nv-work-class-options input[type=radio] { margin: 3px 0 0; accent-color: var(--ac-blue); flex-shrink: 0; }
.nv-work-class-options strong { display: block; font-size: 14px; line-height: 1.5; }
.nv-work-class-options small { display: block; margin-top: 4px; color: var(--ac-muted); font-size: 12px; }
.nv-inline .nv-inline-panel { margin: 0; padding: 0; border: 1px solid var(--ac-border); border-radius: 8px; min-width: 0; background: white; }
.nv-inline-panel[hidden] { display: none; }
.nv-inline-service > .check-item, .nv-inline-design .discipline-check { gap: 10px; line-height: 1.6; }
@media(max-width:700px) { .nv-inline-row > summary strong { min-width: 0; } .nv-inline-row > summary span { display: none; } .nv-inline-options { margin-left: 6px; } }
