:root {
  color-scheme: light;
  --ink: #172f32;
  --muted: #51666b;
  --paper: #f3f6f5;
  --surface: #fff;
  --line: #dce5e2;
  --emphasis: #0c6557;
  --emphasis-hover: #06483d;
  --soft: #e8f5ef;
  --alert: #8d3527;
  --alert-bg: #fbeee9;
  --warning: #69440c;
  --warning-bg: #fff0cd;
  font: 16px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
h1, h2, h3, p, dl { margin: 0; }
h1, h2, h3 { line-height: 1.18; letter-spacing: -.025em; }
h1 { font-size: clamp(2rem, 3.8vw, 3rem); overflow-wrap: anywhere; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.06rem; }
a { color: var(--emphasis); text-underline-offset: .15em; }
a:hover { color: var(--emphasis-hover); }
input, select, textarea, button { font: inherit; }
input, select, textarea { min-width: 0; width: 100%; color: var(--ink); }
input, select, textarea {
  border: 1px solid #bacbc5;
  border-radius: .55rem;
  padding: .48rem .7rem;
  background: white;
  min-height: 2.65rem;
}
textarea { resize: vertical; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #008378; outline-offset: 3px; }
.skip-link {
  position: absolute;
  z-index: 1;
  top: .7rem;
  left: .7rem;
  transform: translateY(-180%);
  padding: .5rem .75rem;
  border-radius: .55rem;
  color: var(--ink);
  background: var(--surface);
}
.skip-link:focus { transform: none; }
.topbar { background: white; border-bottom: 1px solid var(--line); }
.topbar-inner {
  max-width: 1280px;
  margin-inline: auto;
  padding: .8rem clamp(.8rem, 3vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.5rem;
  align-items: center;
}
.brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--ink);
  font-weight: 760;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: .6rem;
  display: grid;
  place-items: center;
  color: white;
  background: var(--emphasis);
  font-size: 1.05rem;
}
.topbar nav, .account { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; font-size: .9rem; }
.topbar nav a { text-decoration: none; padding: .35rem .55rem; border-radius: .5rem; }
.topbar nav a[aria-current] { background: var(--soft); font-weight: 650; }
.account { margin-left: auto; color: var(--muted); }
.link-button { border: 0; background: transparent; padding: 0; color: var(--emphasis); text-decoration: underline; }
.topbar .account .link-button { min-height: 2rem; padding-inline: .35rem; }
.shell { max-width: 1280px; margin-inline: auto; padding: clamp(1.05rem,3vw,2rem); display: grid; gap: 1.15rem; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-heading .eyebrow, .back { margin-bottom: .35rem; }
.back { display: inline-block; font-size: .9rem; }
.eyebrow { font-weight: 720; font-size: .77rem; letter-spacing: .075em; text-transform: uppercase; }
.subtle, small { color: var(--muted); }
.page-heading .subtle { margin-top: .35rem; }
.panel, .login-panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .9rem;
  padding: clamp(.85rem,2vw,1.3rem);
}
.login-panel { width: min(100%, 28rem); margin: clamp(1.5rem,9vh,6rem) auto; }
.login-panel .form-stack { margin-top: 1.25rem; }
.login-panel .notice { margin-top: .8rem; }
.next-step {
  background: #e0f2e9;
  border: 1px solid #b7decb;
  border-radius: .9rem;
  padding: clamp(.85rem,2.4vw,1.4rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .7rem 1.2rem;
  overflow-wrap: anywhere;
}
.next-step h2 { margin-block: .25rem; }
.next-step a { color: #0b493d; }
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(9rem,1fr));
  gap: .65rem;
}
.stats > div { background: white; border: 1px solid var(--line); border-radius: .75rem; padding: .7rem .8rem; }
.stats dt { color: var(--muted); font-size: .85rem; }
.stats dd { margin: .2rem 0 0; font-size: 1.55rem; font-weight: 720; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.deal-stats dd { font-size: 1rem; }
.section-heading { display: flex; gap: .5rem 1rem; align-items: baseline; flex-wrap: wrap; margin-bottom: .8rem; }
.button, .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: .38rem .8rem;
  border: 1px solid #bdcdc6;
  border-radius: .55rem;
  color: var(--ink);
  background: white;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 650;
  white-space: nowrap;
}
.primary { color: white; background: var(--emphasis); border-color: var(--emphasis); }
.button:hover { background: var(--soft); color: var(--ink); }
.primary:hover { color: white; background: var(--emphasis-hover); }
.filter-form, .form-grid {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: .7rem;
}
.filter-form label, .form-grid label { flex: 1 1 8rem; min-width: 0; }
.filter-form .search, .form-grid .span-two { flex-basis: 14rem; }
.form-stack { display: grid; gap: .75rem; }
.form-stack .primary { justify-self: start; }
label { display: grid; gap: .25rem; color: var(--muted); font-size: .88rem; font-weight: 650; }
input, select, textarea { font-weight: 450; }
.quick-create { margin: .85rem 0; padding: .65rem .85rem; border: 1px solid var(--line); border-radius: .65rem; }
.quick-create summary { color: var(--emphasis); font-weight: 680; }
.quick-create form { margin-top: .75rem; }
.table-wrap { margin-top: .7rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .92rem; }
thead { color: var(--muted); background: #f4f8f6; }
th, td { padding: .62rem .64rem; vertical-align: middle; border-bottom: 1px solid var(--line); }
tbody th { font-weight: 640; min-width: 9.5rem; overflow-wrap: anywhere; }
tbody tr:hover { background: #f8fbf9; }
td { overflow-wrap: anywhere; }
small { display: block; font-size: .82rem; font-weight: 450; }
.numeric { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill {
  display: inline-block;
  background: #eaf0ee;
  color: #344d4a;
  border-radius: 2rem;
  padding: .13rem .5rem;
  font-size: .81rem;
  font-weight: 620;
  white-space: nowrap;
}
.pill.overdue { background: var(--alert-bg); color: var(--alert); }
.pill.soon { background: var(--warning-bg); color: var(--warning); }
.pill.positive { background: var(--soft); color: var(--emphasis-hover); }
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: .65rem; margin-top: .75rem; }
.pagination span { color: var(--muted); font-size: .9rem; }
.empty { padding: .55rem 0; color: var(--muted); }
.notice {
  padding: .65rem .85rem;
  color: #184834;
  background: var(--soft);
  border: 1px solid #b7decb;
  border-radius: .55rem;
}
.notice.error { color: var(--alert); background: var(--alert-bg); border-color: #efc7b9; }
.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}
.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,18rem),1fr));
  gap: .85rem;
}
.channel-card { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .65rem; }
.channel-card p { overflow-wrap: anywhere; }
.channel-card .form-stack, .channel-card .quick-create { width: 100%; }
.channel-card .quick-create { margin: 0; }
.channel-heading {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: .45rem;
}
.deal-channels .channel-card { padding: .85rem; border: 1px solid var(--line); border-radius: .7rem; }
.calling-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .65rem 1rem;
  border: 1px solid #b7decb;
  border-radius: .9rem;
  background: #e0f2e9;
  padding: clamp(.85rem,2.4vw,1.4rem);
}
.calling-band p { margin-top: .25rem; color: var(--muted); }
.phone-lines th, .phone-lines td { padding-block: .48rem; }
.phone-lines .line-number { white-space: nowrap; }
.tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .65rem; }
.tabs a { padding: .34rem .68rem; border-radius: .45rem; text-decoration: none; font-weight: 650; }
.tabs a[aria-current] { background: var(--soft); color: var(--emphasis-hover); }
.pipeline-heading, .deal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .8rem;
}
.pipeline-heading { margin-bottom: 1rem; }
.pipeline-heading .view-switch, .deal-toolbar .tabs { margin-bottom: 0; }
.pipeline-heading > .subtle, .deal-toolbar .subtle { font-size: .88rem; }
.pipeline-heading .view-switch {
  background: #f0f4f2;
  border: 1px solid var(--line);
  border-radius: .6rem;
  padding: .14rem;
  gap: .15rem;
}
.pipeline-heading .view-switch a[aria-current] {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 3px #1c3e3426;
}
.deal-toolbar { margin-top: .9rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.stage-summary { margin-top: 1.15rem; }
.stage-summary .section-heading { align-items: center; justify-content: space-between; margin-bottom: .6rem; }
.stage-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(min(100%,9.75rem),1fr));
  gap: .5rem;
}
.stage-summary-item {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-content: start;
  align-items: start;
  gap: .3rem .5rem;
  padding: .6rem .65rem;
  color: var(--ink);
  background: #f5f8f6;
  border: 1px solid var(--line);
  border-radius: .56rem;
  text-decoration: none;
  font-size: .87rem;
}
a.stage-summary-item:hover, .stage-summary-item[aria-current] { background: var(--soft); border-color: #9dc6b5; }
.stage-summary-item[aria-current] { box-shadow: inset 0 2px var(--emphasis); }
.stage-summary-item strong { overflow-wrap: anywhere; }
.stage-summary-item small { grid-column: 1 / -1; }
.stage-count {
  display: inline-flex;
  justify-content: center;
  min-width: 1.35rem;
  padding-inline: .33rem;
  border-radius: .35rem;
  color: #355852;
  background: #e4efea;
  font-size: .82rem;
  font-weight: 720;
  font-variant-numeric: tabular-nums;
}
.flag-overdue { color: var(--alert); font-weight: 610; }
.pipeline-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(min(82vw,13.75rem),1fr);
  gap: .7rem;
  margin-top: .8rem;
  padding: .12rem .1rem .6rem;
  overflow: auto;
}
.pipeline-lane {
  min-width: 0;
  min-height: 7rem;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: .7rem;
  background: #eef4f0;
}
.pipeline-lane h3 { display: flex; justify-content: space-between; align-items: start; gap: .45rem; font-size: 1rem; }
.pipeline-lane > a { display: inline-block; margin-top: .6rem; font-size: .82rem; }
.deal-cards { display: grid; gap: .5rem; list-style: none; padding: 0; margin: .55rem 0 0; }
.deal-card {
  background: #fff;
  border: 1px solid #d5e0dc;
  border-radius: .58rem;
  padding: .62rem;
  display: grid;
  justify-items: start;
  gap: .35rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.deal-card h4 { margin: 0; font-size: .93rem; line-height: 1.3; }
.deal-card h4 a { color: var(--ink); }
.deal-card p, .deal-card-meta { color: var(--muted); font-size: .83rem; }
.deal-card-meta { display: flex; justify-content: space-between; flex-wrap: wrap; width: 100%; gap: .2rem .4rem; }
#pipeline { scroll-margin-top: 1rem; }
.history { border-top: 1px solid var(--line); padding-block: .62rem; }
.history summary { font-weight: 650; color: var(--emphasis); }
.history .table-wrap { margin-top: .5rem; }
#deal-communications, #calls { scroll-margin-top: 1rem; }
#email { scroll-margin-top: 1rem; }
.comms-mobile-label { display: none; }
@media (max-width: 820px) {
  .table-wrap.comms-table { overflow: visible; box-shadow: none; }
  .comms-table table, .comms-table tbody { display: block; }
  .comms-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .comms-table tbody tr {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem .85rem;
    margin-bottom: .65rem;
    padding: .8rem;
    border: 1px solid var(--line);
    border-radius: .65rem;
  }
  .comms-table tbody :is(th,td) { min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
  .comms-table tbody th, .comms-table .call-actions { grid-column: 1 / -1; }
  .call-actions:empty { display: none; }
  .call-actions .action-row { justify-content: flex-start; }
  .call-actions :is(.button,.primary) { min-height: 2.75rem; }
  .comms-table .comms-mobile-label { display: block; color: var(--muted); font-size: .79rem; }
}
#deal-contracts { scroll-margin-top: 1rem; }
.contract-panel tbody th { min-width: 13rem; }
.contract-panel td:last-child { white-space: nowrap; }
.contract-panel .section-heading a { font-size: .9rem; }
.contract-panel .contract-review-row > td { white-space: normal; }
.contract-review-row .quick-create { margin: .15rem 0; }
.contract-review fieldset {
  min-width: 0;
  margin: 0;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
}
.contract-review legend { padding-inline: .35rem; font-weight: 650; }
.contract-files { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap: .75rem; }
.contract-checks { display: grid; gap: .55rem; margin-top: .8rem; }
.contract-check { display: flex; align-items: flex-start; gap: .5rem; }
.contract-check input { flex: 0 0 auto; width: 1.15rem; min-height: 0; height: 1.15rem; margin: .12rem 0 0; }
.contract-check span { color: var(--ink); }
.log-heading { margin-top: 1rem; }
.contact-list { margin: 0; padding-left: 1.3rem; color: var(--muted); }
.note { padding: .75rem 0; border-top: 1px solid var(--line); }
.note-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.service-list { display: grid; gap: .5rem; margin: .75rem 0; }
.service-list div { display: flex; gap: .75rem; justify-content: space-between; max-width: 35rem; }
.service-list dd { color: var(--muted); margin: 0; text-align: right; }
@media (max-width: 575px) {
  .account { margin-left: 0; }
  th, td { padding-inline: .5rem; }
  .table-wrap { box-shadow: inset -.2rem 0 .25rem -.25rem #708982; }
}

.workday-head .workday-search { flex: 0 1 32rem; margin: 0; }
.workday-reviews { margin-top: .75rem; }
.workday-search label { flex: 1 1 14rem; }
.workday-hero { padding: clamp(1.05rem,3vw,1.7rem); }
.workday-hero .eyebrow { color: #295e51; }
.workday-hero h2 { font-size: clamp(1.4rem,3.8vw,2rem); }
.workday-hero-actions .primary { color: white; }
.workday-hero-actions .primary:hover { color: white; }
.workday-filters {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: .65rem;
}
.workday-filter {
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .4rem;
  padding: .65rem .85rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .7rem;
  text-decoration: none;
  color: var(--ink);
  font-weight: 640;
}
.workday-filter[aria-current] { background: var(--soft); border-color: #9ac9b8; color: var(--emphasis-hover); }
.workday-filter:hover { background: var(--soft); }
.workday-filter-count { font-size: 1.22rem; font-variant-numeric: tabular-nums; }
.workday-filter[data-bucket=overdue] .workday-filter-count { color: var(--alert); }
.workday-queue { scroll-margin-top: 1rem; }
.workday-queue .section-heading { align-items: center; justify-content: space-between; }
.workday-alert { font-size: .9rem; }
.workday-alert strong { margin-left: .2rem; }
.workday-tasks { list-style: none; padding: 0; margin: 0; display: grid; }
.workday-task {
  display: grid;
  grid-template-columns: minmax(0,1fr) max-content minmax(14rem,auto);
  align-items: start;
  gap: .6rem 1rem;
  border-top: 1px solid var(--line);
  padding: .8rem 0;
  scroll-margin-top: 1rem;
}
.workday-task:target { background: var(--soft); }
.workday-task-main { min-width: 0; overflow-wrap: anywhere; }
.workday-task-main h3 a { text-decoration: none; }
.workday-task-main h3 a:hover { text-decoration: underline; }
.workday-task-main p { font-size: .88rem; margin-top: .22rem; }
.workday-task-meta { padding-top: .15rem; }
.workday-task > .activity-actions { justify-content: flex-end; }
.activity-actions { align-items: flex-start; }
.activity-actions summary { list-style: none; }
.activity-actions summary::-webkit-details-marker { display: none; }
.activity-actions .button, .activity-actions .primary, .workday-hero .primary { min-height: 2.75rem; }
.activity-actions details[open] > summary { background: var(--soft); border-color: #9ac9b8; }
.activity-action-form {
  display: grid;
  gap: .65rem;
  margin-top: .45rem;
  padding: .7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: .6rem;
  width: min(100%,17rem);
}
.activity-action-form .primary { justify-self: start; }
@media (max-width: 760px) {
  .workday-task { grid-template-columns: minmax(0,1fr) max-content; }
  .workday-task > .activity-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 575px) {
  .topbar-inner { gap: .4rem .8rem; }
  .topbar nav { order: 3; width: 100%; gap: .25rem; flex-wrap: nowrap; overflow-x: auto; }
  .topbar nav a { flex: 0 0 auto; display: grid; place-items: center; min-height: 2.75rem; }
  .topbar .account { margin-left: auto; }
  .topbar .account .link-button { min-height: 2.75rem; }
  .workday-head .workday-search { width: 100%; }
  .workday-search label { flex-basis: 10rem; }
  .workday-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; }
  .workday-filter { padding: .55rem .65rem; }
  .workday-task-main { grid-column: 1 / -1; }
  .workday-task > .activity-actions { grid-column: 1 / -1; }
}
