:root {
  color-scheme: light;
  --canvas: #f3f7fe;
  --paper: #f7faff;
  --ink: #173354;
  --muted: #49627f;
  --line: #d6e2f2;
  --quiet: #edf3fc;
  --navy: #0b2a5b;
  --soft: #edf3fc;
  --round: 12px;
  font-family: "Aptos", "Segoe UI", sans-serif;
  font-size: 15px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); line-height: 1.45; }
button, textarea, input, select { font: inherit; }
[hidden] { display: none !important; }
button, summary { cursor: pointer; }
a { color: var(--navy); }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid #326bb4; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.13; letter-spacing: -.035em; }
h1 { font-size: clamp(2rem, 3.8vw, 3.3rem); font-weight: 500; }
h2 { font-size: 1.24rem; }
h3 { font-size: 1rem; }
small { font-size: .82rem; }
.masthead { border-bottom: 1px solid var(--line); background: var(--paper); }
.masthead-inner {
  max-width: 1440px;
  padding: 0 clamp(18px, 4vw, 58px);
  margin: auto;
  min-height: 65px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand { display: flex; align-items: center; flex: none; color: var(--navy); font-size: 1.25rem; letter-spacing: .07em; }
.masthead-role { border-left: 1px solid var(--line); padding-left: 20px; color: var(--muted); font-size: .88rem; }
.masthead-status { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: .81rem; white-space: nowrap; color: var(--muted); }
.status-dot { width: 8px; height: 8px; background: #a45a37; border-radius: 50%; }
.status-dot[data-online="true"] { background: #326bb4; }
.notice { max-width: 1320px; margin: 12px auto 0; padding: 10px 16px; background: #fff0e7; border: 1px solid #ab5d3c; color: #65321f; border-radius: 8px; }
.loading { padding: 30px clamp(18px, 4vw, 58px); color: var(--muted); }
.room-wrap, .manager-wrap { max-width: 1440px; margin: 0 auto; padding: 26px clamp(18px, 4vw, 58px) 46px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--round); min-width: 0; }
.eyebrow { color: var(--navy); font-size: .79rem; font-weight: 700; letter-spacing: .095em; text-transform: uppercase; }
.quiet { color: var(--muted); font-size: .83rem; }
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 100px;
  padding: 3px 9px;
  font-size: .75rem;
  font-weight: 700;
  width: fit-content;
  line-height: 1.35;
}
.tag-quiet { color: var(--muted); background: var(--quiet); }
.tag-live { color: var(--navy); background: #e0ebfb; }
.tag-approved { color: var(--navy); background: #dceafb; }
.button, .secondary-button {
  min-height: 50px;
  border: 1px solid var(--navy);
  border-radius: 5px;
  padding: 10px 18px;
  text-decoration: none;
  font-weight: 500;
  font-size: .87rem;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.button { background: var(--navy); color: #fff; }
.button:hover { background: var(--ink); }
button:disabled { opacity: .62; cursor: default; }
.secondary-button { background: transparent; color: var(--navy); border-color: #9eafc4; }
.secondary-button:hover { background: var(--soft); }
.button-icon { color: var(--navy); font-size: 1.25rem; line-height: 1; }
.project-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px 26px; margin: 1px 0 19px; }
.project-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; margin-bottom: 7px; }
.project-location { color: var(--muted); margin-top: 6px; font-size: .95rem; }
.project-state { display: flex; flex: none; flex-direction: column; align-items: flex-end; gap: 6px; padding-top: 3px; }
.version-text { color: var(--muted); font-size: .76rem; }
.offer-overview {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1.05fr auto;
  align-items: center;
  gap: 16px 0;
  padding: 16px 20px;
  margin-bottom: 14px;
  border-radius: var(--round);
  background: var(--navy);
  color: #fff;
}
.offer-metric { padding: 0 18px; display: flex; flex-direction: column; min-width: 0; }
.offer-metric:first-child { padding-left: 0; }
.offer-metric + .offer-metric { border-left: 1px solid #687e9b; }
.offer-metric span, .offer-metric small { color: #c1cfe2; font-size: .83rem; }
.offer-metric strong { font-size: clamp(1.35rem, 2.9vw, 2.45rem); line-height: 1.12; letter-spacing: -.035em; }
.offer-metric small { margin-top: 3px; }
.approval-action { justify-self: end; display: flex; align-items: stretch; flex-direction: column; gap: 5px; }
.approval-action button { min-height: 37px; padding: 5px 10px; line-height: 1.25; }
.approval-action .secondary-button { border-color: #8fa6cc; color: #fff; }
.approval-action .secondary-button:hover { background: var(--ink); }
.offer-overview .room-approve { background: var(--paper); color: var(--navy); border-color: var(--paper); }
.room-approve:focus-visible { outline-color: #afc1da; }
.approval-confirm { display: inline-block; color: #fff; padding: 7px 9px; border: 1px solid #8fa6cc; border-radius: 8px; font-weight: 700; font-size: .87rem; }
.room-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; align-items: stretch; }
.room-grid .panel { padding: 15px 18px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 12px; }
.timeline { --labels: minmax(137px, 30%); min-width: 0; }
.timeline-axis { position: relative; height: 23px; margin-left: calc(30% + 12px); color: var(--muted); font-size: .76rem; }
.timeline-axis span { position: absolute; left: var(--left); transform: translateX(-50%); white-space: nowrap; }
.timeline-axis .tick-start { transform: none; }
.timeline-axis .tick-end { transform: translateX(-100%); }
.timeline-row { display: grid; grid-template-columns: var(--labels) minmax(0, 1fr); align-items: center; gap: 12px; min-height: 34px; margin-bottom: 4px; }
.timeline-row:last-child { margin-bottom: 0; }
.stage-name { font-weight: 700; line-height: 1.16; font-size: .88rem; }
.stage-name small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; font-size: .74rem; }
.track {
  position: relative;
  min-width: 0;
  height: 12px;
  border-radius: 4px;
  background: repeating-linear-gradient(to right, #edf3fc, #edf3fc calc(100% / var(--day-count) - 1px), #f7faff calc(100% / var(--day-count) - 1px), #f7faff calc(100% / var(--day-count)));
}
.bar { position: absolute; top: 0; left: var(--left); width: var(--span); height: 100%; border-radius: 4px; background: #326bb4; }
.bar-1 { background: #5680b3; }
.bar-2 { background: #0b2a5b; }
.bar-3 { background: #7a98c4; }
.pay-list { list-style: none; padding: 0; margin: 0; }
.pay-list li { display: grid; grid-template-columns: minmax(82px, .37fr) 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.pay-list li:first-child { padding-top: 0; border-top: 0; }
.pay-list li:last-child { padding-bottom: 0; }
.pay-date { color: var(--navy); font-weight: 700; font-size: .86rem; }
.pay-item { display: grid; grid-template-columns: 1fr auto; gap: 1px 9px; font-size: .87rem; align-items: baseline; }
.pay-item strong { text-align: right; white-space: nowrap; }
.pay-item small { grid-column: 1 / -1; color: var(--muted); line-height: 1.22; }
.terms { margin: 0; display: grid; gap: 8px; }
.terms div { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.terms dt { font-weight: 700; }
.terms dd { margin: 0; color: var(--muted); font-size: .87rem; }
.conversation { padding: 15px 18px; }
.message-list { max-height: 127px; min-height: 70px; overflow: auto; padding: 0 4px 4px 0; scrollbar-width: thin; }
.message { background: #e7effc; padding: 7px 10px; border-radius: 7px; margin-bottom: 5px; overflow-wrap: anywhere; }
.message-system { background: #f3f7fe; }
.message-client { background: #e0ebfb; }
.message-meta { display: flex; justify-content: space-between; gap: 5px; color: var(--muted); font-size: .72rem; }
.message p { margin-top: 2px; white-space: pre-wrap; font-size: .83rem; }
.message-form { display: flex; align-items: end; gap: 6px; margin-top: 6px; }
.message-form textarea { flex: 1 1 auto; min-width: 0; resize: vertical; min-height: 37px; max-height: 160px; border: 1px solid #9eafc4; border-radius: 7px; background: #fff; padding: 7px 9px; color: var(--ink); font-size: .87rem; }
.button-small { min-height: 37px; flex: none; font-size: .82rem; padding: 6px 9px; }
.attachments { margin-top: 14px; padding: 16px 18px; }
.attachments h2 { margin-bottom: 10px; }
.document-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 14px; }
.document {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 7px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-size: .85rem;
  overflow-wrap: anywhere;
}
.document:hover strong { text-decoration: underline; }
.file-type { background: var(--quiet); color: var(--muted); border-radius: 4px; padding: 3px 4px; font-size: .62rem; font-weight: 700; }
.document small { display: block; color: var(--muted); font-size: .72rem; }
.document-arrow { font-size: 1.06rem; }
.empty-room, .room-pending { padding: clamp(18px, 4vw, 33px); }
.empty-room h1 { margin: 7px 0 9px; }
.empty-room .tag { margin-top: 20px; }
.empty-room p + p, .room-pending p { color: var(--muted); }
.room-pending h2 { margin-bottom: 6px; }
.room-pending .stepper { margin-top: 22px; }
.stepper { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 0; margin: 0; list-style: none; }
.stepper li { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 7px; color: var(--muted); font-size: .76rem; padding-right: 8px; min-width: 0; }
.stepper li:not(:last-child)::after { position: absolute; content: ""; top: 11px; left: 27px; right: 6px; height: 1px; background: var(--line); }
.stepper .current { font-weight: 700; color: var(--navy); }
.stepper .complete::after { background: #8fa6cc !important; }
.step-number { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--quiet); font-size: .72rem; font-weight: 700; }
.current .step-number { background: var(--navy); color: var(--paper); }
.complete .step-number { color: var(--navy); background: #dceafb; }
.manager-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px 24px; margin-bottom: 20px; }
.incoming-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.manager-header .eyebrow { margin-bottom: 4px; }
.manager-header h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
.manager-grid { display: grid; grid-template-columns: minmax(215px, 25%) minmax(0, 1fr); gap: 15px; align-items: start; }
.inbox { overflow: hidden; }
.inbox-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.inbox-head > span { color: var(--muted); font-size: .81rem; font-weight: 700; }
.lead-list { padding: 8px; display: grid; gap: 6px; }
.lead-row { text-align: left; width: 100%; border: 1px solid transparent; border-radius: 8px; background: var(--paper); padding: 8px 9px; color: var(--ink); }
.lead-row:hover { background: var(--quiet); }
.lead-current { background: var(--soft); border-color: #a7bad4; }
.lead-row-top { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; margin-bottom: 3px; }
.lead-id { color: var(--navy); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.lead-row strong { display: block; font-size: .91rem; }
.lead-row small { display: block; color: var(--muted); font-size: .76rem; margin-top: 1px; }
.inbox-empty { color: var(--muted); font-size: .87rem; padding: 5px 8px 7px; }
.empty-lead { padding: 23px; }
.empty-lead p { color: var(--muted); margin-top: 7px; }
.lead-card { min-width: 0; display: grid; gap: 13px; }
.lead-head, .manager-panel { padding: 15px 18px; }
.lead-head-row { align-items: flex-start; margin-bottom: 13px; }
.lead-head-row h2 { font-size: clamp(1.45rem, 2.7vw, 2.1rem); margin-bottom: 3px; }
.room-link { min-height: 33px; padding: 5px 8px; font-size: .78rem; }
.action-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.manager-approved { margin-top: 13px; border-radius: 7px; border: 1px solid #b6c8de; background: #edf3fc; padding: 8px 10px; color: var(--navy); font-weight: 700; }
.mail-sender { font-weight: 700; margin-bottom: 4px; }
.incoming p, .source-link { font-size: .9rem; }
.source-link { display: inline-block; margin-top: 8px; font-weight: 700; }
.manager-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 10px 8px; gap: 5px; border-radius: 8px; background: var(--soft); }
.manager-metrics > div { padding: 0 4px; display: flex; flex-direction: column; }
.manager-metrics span, .manager-metrics small { color: var(--muted); font-size: .77rem; }
.manager-metrics strong { font-size: clamp(1rem, 2.05vw, 1.8rem); line-height: 1.16; }
.calculation-note { margin: 8px 0 10px; color: var(--muted); font-size: .84rem; }
.manager-panel details { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 10px; }
summary { color: var(--navy); font-weight: 700; }
.detail-list { margin: 7px 0; padding-left: 19px; color: var(--muted); font-size: .84rem; }
.detail-list li + li { margin-top: 4px; }
.detail-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 16px; }
.manager-docs { margin: 0; border: 1px solid var(--line); background: var(--paper); border-radius: var(--round); }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 1040px) {
  .offer-metric { padding: 0 12px; }
  .room-grid { grid-template-columns: 1.15fr 1fr; }
  .timeline-axis { margin-left: max(calc(30% + 12px), 149px); }
  .terms div { grid-template-columns: 90px 1fr; }
  .document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1041px) {
  .timeline-axis { margin-left: max(calc(30% + 12px), 149px); }
}
@media (max-width: 820px) {
  .room-wrap, .manager-wrap { padding-top: 18px; }
  .offer-overview { padding: 13px 14px; }
  .offer-metric span, .offer-metric small { font-size: .73rem; }
  .room-approve { font-size: .8rem; min-height: 37px; padding: 6px 8px; }
  .approval-confirm { font-size: .76rem; }
  .room-grid { gap: 9px; }
  .room-grid .panel { padding: 11px 12px; }
  .timeline { --labels: 118px; }
  .timeline-axis { margin-left: 126px; }
  .timeline-row { gap: 8px; }
  .terms div { grid-template-columns: 76px 1fr; }
  .terms dt { font-size: .8rem; }
  .terms dd { font-size: .8rem; }
  .pay-list li { gap: 4px; grid-template-columns: 72px 1fr; }
  .pay-date { font-size: .77rem; }
  .pay-item { font-size: .8rem; }
  .pay-item small { font-size: .74rem; }
  .manager-grid { grid-template-columns: minmax(180px, 27%) minmax(0, 1fr); gap: 9px; }
  .manager-panel, .lead-head { padding: 12px; }
  .manager-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stepper li { font-size: .69rem; }
}
@media (max-width: 650px) {
  .masthead-inner { min-height: 55px; gap: 8px; }
  .masthead-role { padding-left: 8px; font-size: .73rem; }
  .masthead-status { font-size: .7rem; gap: 3px; white-space: normal; text-align: right; }
  .project-header { flex-direction: column; gap: 7px; margin-bottom: 12px; }
  .project-state { flex-direction: row; align-items: center; }
  .offer-overview { grid-template-columns: 1fr 1fr; gap: 9px 0; }
  .offer-metric:nth-child(3) { padding-left: 0; border: 0; }
  .approval-action { justify-self: start; padding-left: 12px; }
  .room-grid { grid-template-columns: 1fr; }
  .document-grid { grid-template-columns: 1fr; }
  .manager-header { align-items: flex-start; flex-direction: column; margin-bottom: 12px; }
  .manager-grid { grid-template-columns: 1fr; }
  .lead-list { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
  .lead-head-row { flex-direction: column; }
  .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 8px; }
  .stepper li:nth-child(4)::after { display: none; }
}
@media (max-width: 360px) {
  .masthead-role { display: none; }
  .manager-wrap, .room-wrap { padding-left: 12px; padding-right: 12px; }
}
.incoming-history { padding: 12px 18px; }
.incoming-history .mail-sender { margin-top: 10px; }

.commerce, .manager-cabinet { min-width: 0; }
.inbox-filters { display: grid; gap: 8px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.inbox-filters label, .inline-form label, .edit-form label { display: grid; gap: 3px; min-width: 0; font-size: .81rem; color: var(--ink); }
.inbox-filters .check-label { display: flex; align-items: center; gap: 6px; }
.check-label input { margin: 0; width: 16px; height: 16px; accent-color: var(--navy); }
input:not([type="checkbox"]), select, .edit-form textarea { width: 100%; min-width: 0; min-height: 38px; border: 1px solid #9eafc4; border-radius: 5px; padding: 6px 8px; background: #fff; color: var(--ink); }
input[type="file"] { overflow: hidden; }
.lead-row time { font-size: .72rem; color: var(--muted); }
.lead-row .tag { margin-top: 6px; }
.inline-form { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: end; margin-top: 10px; }
.inline-form label { flex: 1 1 195px; max-width: 400px; }
.inline-control { margin-top: 12px; font-size: .87rem; }
.handoff { padding: 10px 18px; color: var(--navy); font-weight: 600; }
.message .text-button { padding: 4px 0 0; }
.text-button { background: transparent; border: 0; padding: 3px 0; color: var(--navy); font-size: .81rem; text-decoration: underline; text-underline-offset: 2px; }
.version-panel, .cabinet-panel { padding: 15px 18px; }
.room-wrap > .version-panel { margin-top: 14px; }
.version-list { display: grid; gap: 6px; }
.version-row { border: 1px solid var(--line); border-radius: 5px; padding: 8px; min-width: 0; }
.version-line { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: center; }
.version-line .tag { margin-left: 7px; }
.version-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.version-actions button[aria-pressed="true"] { background: var(--soft); border-color: var(--navy); }
.version-row details { margin-top: 8px; font-size: .87rem; }
.change-details p { margin-top: 6px; overflow-wrap: anywhere; }
.change-values { margin: 8px 0 0; font-size: .82rem; }
.change-values div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; padding: 4px 0; border-top: 1px solid var(--line); }
.change-values dd { margin: 0; color: var(--navy); font-weight: 600; }
.comparison-hint { margin-top: 9px; }
.comparison-scroll { overflow: auto; margin-top: 12px; border: 1px solid var(--line); border-radius: 5px; }
.comparison { width: 100%; border-collapse: collapse; text-align: left; font-size: .86rem; }
.comparison th, .comparison td { min-width: 130px; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.comparison td { min-width: 185px; }
.comparison tr > :first-child { position: sticky; left: 0; background: var(--paper); box-shadow: 1px 0 var(--line); }
.comparison span, .comparison small { display: block; }
.comparison span + span { margin-top: 5px; }
.comparison .comp-changed > * { background: #e1ecfc; }
.comparison .comp-changed small { color: var(--navy); font-size: .69rem; margin-top: 4px; }
.quoted-message { margin: 0 0 10px; padding: 8px 10px; border-left: 3px solid #8fa6cc; background: var(--soft); overflow-wrap: anywhere; }
.edit-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.edit-form small { color: var(--muted); font-size: .76rem; }
.edit-form .action-row { margin-top: 0; }
.form-wide { grid-column: 1 / -1; }
.cabinet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.manager-cabinet { display: grid; gap: 12px; }
.cabinet-panel details, .cabinet-panel .edit-form, .cabinet-stub { margin-top: 12px; }
.participant-list { list-style: none; padding: 0; margin: 0; }
.participant-list li { display: flex; flex-wrap: wrap; gap: 3px 10px; border-top: 1px solid var(--line); padding: 6px 0; overflow-wrap: anywhere; }
.participant-list span, .guest-role { color: var(--muted); }
.guest-role { margin-bottom: 8px; }
#copy-status { font-size: .81rem; }
@media (max-width: 1100px) {
  .manager-metrics strong { font-size: clamp(.95rem, 1.89vw, 1.5rem); }
}
@media (max-width: 950px) {
}
@media (max-width: 650px) {
  .approval-action { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; padding-left: 0; }
  .approval-action button { flex: 1 1 135px; }
  .cabinet-grid, .edit-form { grid-template-columns: minmax(0, 1fr); }
  .version-panel, .cabinet-panel { padding: 12px; }
  .comparison th, .comparison td { min-width: 102px; padding: 7px; }
  .comparison td { min-width: 151px; }
}
.timeline-relative .timeline-axis span { font-size: .72rem; }
.timeline-relative .timeline-row { min-height: 39px; }
.attachments .missing-docs { margin-top: 12px; }
.attachments .missing-docs .document-grid { margin-top: 10px; }
.current-version { color: var(--navy); background: #dceafb; }
.advance-metric .unknown-advance { font-size: clamp(.9rem, 1.55vw, 1.25rem); }

.customer-stages { margin-bottom: 16px; }
.stepper li small { display: block; margin-top: .25rem; font-weight: 400; }
.stepper li.skipped { opacity: .8; }

.bw-logo{display:block;height:auto;max-width:100%}
.v8-company-brand .bw-logo{width:150px;height:auto}
.masthead .brand .bw-logo{width:150px}
.v8-wordmark .bw-logo{width:140px;height:auto}
.v8-company-brand{padding:8px 0}
@media (max-width:640px){.v8-wordmark .bw-logo{width:112px}}
