/* home.css: Home screen.
   Every colour comes from tokens.css (no literals here). Dark mode lives in tokens.css only. */
#home .paper { min-height: 0; }
#crm .paper { min-height: 0; }
.cm-cta { flex-wrap: wrap; gap: 12px 14px; align-items: center; }
.cm-stat .sub b { font-weight: 500; color: var(--white); }
.cm-stat.warn .num::after { content: ""; display: inline-block; width: 10px; height: 10px; background: var(--wait); margin-left: 12px; vertical-align: middle; transform: translateY(-4px); }
#crm div.row { cursor: default; }
@media (max-width: 560px) {
  #crm button.row { flex-wrap: wrap; }
}
.cm-quiet { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cm-quiet .n { font-size: 20px; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.cm-quiet .s { color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }
@media (max-width: 560px) {
  .cm-quiet { grid-template-columns: minmax(0, 1fr) auto; }
  .cm-quiet .gw { grid-column: 1 / -1; order: 3; }
}
.cm-dhead { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.cm-dhead .n { font-size: 19px; font-weight: 500; color: var(--ink); white-space: normal; }
.cm-dhead .s { font-size: 15px; color: var(--muted); white-space: normal; }
.cm-bar { display: flex; gap: 2px; height: 8px; background: var(--field); }
.cm-bar i { display: block; height: 100%; }
.cm-bar i.s1 { background: var(--field-line); }
.cm-bar i.s2 { background: var(--muted); }
.cm-bar i.s4 { background: var(--ok); }
.cm-ev { padding: 16px 0; border-bottom: 1px solid var(--line); display: grid; gap: 0 16px; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; }
.cm-ev .d b { display: block; font: 300 34px/1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.cm-ev .d span { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.cm-ev .n { font-size: 19px; font-weight: 500; color: var(--ink); }
.cm-ev .s { font-size: 15px; color: var(--muted); }
#crm button.row { display: flex; width: 100%; }
#crm div.row.clickable { cursor: pointer; }
#crm div.row.clickable:hover { background: var(--hover); }
#crm div.row.clickable:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.hm-row .m { flex: 1; min-width: 0; }
.hm-rank { width: 22px; }
.hm-ages { margin: 14px 0 4px; display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 4px; }
.hm-age { min-height: 28px; display: inline-flex; gap: 6px; align-items: center; height: 28px; padding: 0 10px; border: 1px solid var(--bd-navy); color: var(--bd-navy); font-size: 13px; white-space: nowrap; background: none; }
.hm-seg { margin-top: 10px; }
.hm-brief { margin: 4px 0 12px; padding: 16px 18px; background: var(--field); border-left: 2px solid var(--ink); }
.hm-briefbtn { font: inherit; }
.cm-bar i.s3 { background: var(--ink); }
button.cm-statlink { font: inherit; cursor: pointer; }
button.cm-statlink:focus-visible { outline: 2px solid var(--white); outline-offset: 4px; }
@media (hover: hover) {
  button.cm-statlink:hover .num { text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 1px; }
}
#crm .display { transition: opacity .4s; }
#crm .display.fade { opacity: 0; }
#cmNotice:empty { display: none; }
.qa-hero { right: 0; top: 16px; z-index: 2; min-height: 40px; font-size: var(--t-body); position: static; display: inline-flex; align-items: center; border: 0; border-radius: 0; background: var(--white); color: var(--navy); box-shadow: none; }
@media (min-width: 641px) {
  .cm-stat .lab{ font-size: 11.5px; }
  .cm-quiet .n, .cm-ev .n, .cm-dhead .n { font-size: 16.5px; }
  .cm-quiet .s, .cm-ev .s, .cm-dhead .s { font-size: 14px; }
  .cm-ev .d b { font-size: 28px; }
  .cm-ev .d span { font-size: 11px; }
}
@media (max-width: 640px) {
  #cmGreet.titled { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .cm-dhead .n, .cm-ev .n, .cm-quiet .n { line-height: 1.2; }
  .cm-dhead .s,.cm-ev .s,.cm-quiet .s{ line-height: 1.25; margin-top: 1px; }
  .mrow .bd-ph-chip .hm-briefbtn { margin: 0; font-size: 13px; }
}
@media (min-width: 641px) {
  #crm > .band { box-sizing: border-box; }
}
#crm .cm-mast .mrow { padding: 0; position: relative; }
#crm .bd-mrow { position: relative; }
#crm .mmain { flex: 1; min-width: 0; }
#crm .mrow:hover { background: var(--row-tint); }
#crm .mmain:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.cm-dhead .n .t { text-decoration: none; padding-bottom: 2px; background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 1px; transition: background-size .38s cubic-bezier(.6, 0, .2, 1); }
@media (prefers-reduced-motion: reduce) {
  .cm-dhead .n .t { transition: none; }
}
#home .cm-navwrap { margin-bottom: 0; }
@media (min-width: 641px) {
  #home .hero { padding-top: 18px; }
}
@media (max-width: 640px) {
  #home .hero { padding-top: 22px; }
}
:where(#crm, #deals, #deal, #firm, #activity, #entry, #contacts, #firms) .cm-dhead .n .t{ font-size: var(--t-row); font-weight: 500; line-height: 1.3; }
:where(#crm, #deals, #deal, #firm, #activity, #entry, #contacts, #firms) .cm-dhead :is(.gp, .sv, .cl){ font-size: var(--t-meta); }
#crm .mmain .when b { font-size: var(--t-body); }
@media (max-width: 640px) {
  #crm .cm-stat .sub{ -webkit-box-orient: vertical; overflow: hidden; }
}
#crm > .band { min-height: 0; }
.screen .cm-dateline { margin: 0 0 6px; font-size: 12.5px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--bd-hero-muted); }
.screen .cm-lede { max-width: none; min-height: 0; margin: 8px 0 0; font-size: 14px; line-height: 19px; color: var(--bd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qa-hero:hover { background: var(--gray-100); }
.qa-hero svg { flex: none; }
@media (max-width: 640px) {
  .qa-hero { width: 100%; justify-content: center; }
}
.screen .cm-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); display: flex; flex-wrap: nowrap; align-items: center; gap: 0; margin: 16px 0 0; padding: 12px 0; border-top: 1px solid var(--bd-line); border-bottom: 1px solid var(--bd-line); overflow: hidden; }
@media (max-width: 640px) {
  .screen .cm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); display: flex; justify-content: space-between; gap: 0; margin: 12px calc(var(--pm) * -1) 0; padding: 12px var(--pm); }
}
.screen .cm-stat { min-width: 0; display: flex; align-items: baseline; gap: 8px; padding: 0; border: 0; background: none; color: var(--bd-ink); white-space: nowrap; flex: none; text-align: left; }
.screen .cm-stat .num { letter-spacing: 0; white-space: nowrap; text-overflow: ellipsis; margin: 0; font: 600 18px/1.2 var(--sans); color: var(--bd-ink); overflow: visible; }
.screen .cm-stat .sub { min-height: 0; font-size: 12.5px; color: var(--bd-hero-muted); -webkit-line-clamp: unset; display: none; }
.screen .cm-stat.warn .num::after { content: none; }
.bd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
@media (max-width: 1024px) {
  .bd-grid { display: flex; flex-direction: column; gap: 32px; }
  .bd-grid > * { width: 100%; }
}
.bd-sec { margin: 0 0 40px; }
@media (max-width: 1024px) {
  .bd-sec { margin-bottom: 32px; }
}
.bd-sec.folded > .bd-body { display: none; }
.bd-brief { margin: 4px 0 10px; padding: 16px 18px; background: var(--bd-rail); border-left: 2px solid var(--bd-ink); }
.bd-brief .bd-bh { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--bd-muted); }
.bd-brief .bd-bh button { border: 0; background: none; padding: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.bd-brief p { margin: 8px 0 12px; font-size: 14.5px; line-height: 1.55; color: var(--bd-text); }
.bd-brief .bd-bg { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; font-size: 13.5px; line-height: 1.5; }
.bd-brief .bd-bc { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--bd-muted); margin-bottom: 6px; }
.bd-brief .bd-bl { white-space: pre-line; }
.bd-brief .bd-ul { margin: 0; padding-left: 1.1em; list-style: disc; }
.bd-brief .bd-ul > li + li { margin-top: 4px; }
.bd-brief .bd-ul > li::marker { color: var(--bd-muted); }
.bd-brief .bd-go { margin-top: 12px; font-size: 13px; }
.hm-age.late { border-color: var(--bd-burg); color: var(--bd-burg); }
.hm-age b { font-weight: 500; }
.bd-aside { background: var(--bd-rail); padding: 22px 22px 8px; display: flex; flex-direction: column; gap: 26px; }
.bd-aside:not(:has(.bd-rail:not([hidden]))) { display: none; }
.bd-sc { display: grid; grid-template-columns: minmax(0, 1fr) 40px 44px; gap: 8px; padding: 9px 0; border-top: 1px solid var(--bd-line2); font-size: 14px; color: var(--bd-ink); }
.bd-sc b { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.bd-sc .d { text-align: right; font-size: 12.5px; color: var(--bd-muted); }
.bd-sc .d.up { color: var(--bd-green); }
.bd-sc .d.down { color: var(--bd-burg); }
@media (min-width: 641px) and (max-width: 1024px) {
  .bd-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 28px; padding: 22px; }
}
@media (max-width: 640px) {
  .bd-aside { padding: 20px; gap: 24px; }
  .bd-brief .bd-bg { grid-template-columns: 1fr; }
}
.bd-grid > .cm-main { display: block; }
.screen .cm-lede b { color: var(--bd-muted); font-weight: 400; }
.screen .cm-stat[hidden] { display: none; }
.screen .cm-stat:not([hidden]) ~ .cm-stat:not([hidden]) { padding-left: 24px; margin-left: 24px; border-left: 1px solid var(--bd-line2); }
@media (max-width: 1024px) {
  .screen .cm-stat:not([hidden]) ~ .cm-stat:not([hidden]) { padding-left: 16px; margin-left: 16px; }
}
.screen .cm-stat .lab { font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--bd-muted); }
@media (max-width: 640px) {
  .screen .cm-lede { white-space: normal; overflow: visible; min-height: 38px; margin-top: 0; font-size: 13.5px; }
  .screen .cm-stat { display: block; min-width: 0; }
  .screen .cm-stat:not([hidden]) ~ .cm-stat:not([hidden]) { padding-left: 10px; margin-left: 10px; }
  .screen .cm-stat .lab { display: block; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
  .screen .cm-stat .num { display: block; margin-top: 2px; font-size: 17px; line-height: 22px; word-spacing: -.22em; }
  .screen .cm-stat.ph-x { display: none; }
  .screen .cm-stats:has(.cm-stat:not([hidden]):not(.ph-x) ~ .cm-stat:not([hidden]):not(.ph-x) ~ .cm-stat:not([hidden]):not(.ph-x) ~ .cm-stat:not([hidden]):not(.ph-x)) .num { font-size: 15px; word-spacing: 0; }
  .screen .cm-stat .lab[data-s] { font-size: 0; letter-spacing: 0; }
  .screen .cm-stat .lab[data-s]::before { content: attr(data-s); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
}
