@media screen {
  .view-clients .content { background: #f5f6f1; }
  .clients-mast { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin: 8px 0 24px; }
  .clients-mast h1 { margin: 0; color: #193f36; font: 400 clamp(38px,4vw,56px)/1.08 "Instrument Serif",Georgia,serif; letter-spacing: -.02em; }
  .clients-mast p { margin: 6px 0 0; color: #4b625b; font-size: .94rem; }
  .directory-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .directory-more { position: relative; }
  .directory-more summary { cursor: pointer; display: flex; gap: 9px; align-items: center; min-height: 44px; padding: 8px 13px; border: 1px solid #bdcfc2; border-radius: 10px; color: #254d40; background: #fff; font: inherit; font-size: .89rem; font-weight: 600; list-style: none; }
  .directory-more summary::-webkit-details-marker { display: none; }
  .directory-more summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: translateY(-2px) rotate(45deg); }
  .directory-more[open] summary::after { transform: translateY(2px) rotate(225deg); }
  .directory-more[open] > div { display: grid; position: absolute; z-index: 4; inset: calc(100% + 4px) 0 auto auto; min-width: 205px; gap: 4px; padding: 7px; background: white; border: 1px solid #cbd8cc; border-radius: 10px; box-shadow: 0 8px 24px #1b39241c; }
  .directory-more .button { justify-content: flex-start; min-height: 42px; color: #254d40; border: 0; background: #fff; box-shadow: none; }
  .directory-more .button:hover { background: #edf3e8; }
  .client-directory { border: 1px solid #ced9ce; border-radius: 16px; background: #fffefa; color: #203d34; }
  .directory-tools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 16px clamp(14px,2vw,26px); background: #20483e; color: #fff; border-radius: 15px 15px 0 0; }
  .view-clients .directory-tools .search { flex: 1 1 240px; max-width: 435px; min-width: 0; min-height: 44px; margin: 0; background: #fffefa; color: #365947; border: 1px solid #b8cdc0; box-shadow: none; }
  .directory-tools .search input { min-width: 0; }
  .directory-results { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .88rem; }
  .directory-clear { cursor: pointer; padding: 5px 0; background: transparent; color: #e2f3df; border: 0; font: inherit; text-decoration: underline; text-underline-offset: 3px; }
  .directory-labels,.directory-row { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1.25fr) minmax(100px,.75fr) minmax(100px,.58fr); align-items: center; column-gap: 16px; padding-inline: clamp(14px,2vw,26px); }
  .directory-labels { background: #f1f4eb; color: #4d6357; font-size: .78rem; font-weight: 600; min-height: 38px; }
  .directory-labels > :last-child { text-align: end; }
  .directory-row { padding-block: 15px; border-top: 1px solid #dce4d9; }
  .directory-row:last-child { border-radius: 0 0 15px 15px; }
  .directory-row:focus-within { background: #f4f7ef; }
  .directory-row > *, .directory-identity > div { min-width: 0; overflow-wrap: anywhere; }
  .directory-identity { display: flex; align-items: center; gap: 12px; }
  .directory-initials { display: grid; flex: none; place-items: center; width: 42px; height: 46px; border: 1px solid #cbd9c8; border-radius: 10px; color: #2a5442; background: #e8efdf; font: 400 1.45rem/1 "Instrument Serif",Georgia,serif; }
  .directory-identity h2 { margin: 0; font: inherit; }
  .directory-open { display: inline; text-align: start; cursor: pointer; padding: 4px 0; min-height: 44px; color: #174b3c; background: transparent; border: 0; font-family: inherit; font-size: 1.02rem; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
  .directory-open:hover { text-decoration: underline; text-underline-offset: 3px; }
  .directory-chevron { margin-inline-start: 5px; color: #538268; font: 400 1.2em/1 Georgia,serif; }
  .directory-identity .crm-client-badge { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
  .directory-contact,.directory-activity,.directory-amount { display: grid; align-content: center; gap: 4px; }
  .directory-contact { justify-items: start; }
  .directory-contact a,.client-contact-block a { color: #23664f; text-decoration: underline; text-decoration-color: #b4cab8; text-underline-offset: 3px; }
  .directory-contact a,.directory-contact strong,.directory-muted,.directory-activity strong { font-size: .87rem; line-height: 1.42; }
  .directory-contact strong,.directory-activity strong,.directory-amount strong { font-weight: 600; }
  .directory-amount { text-align: end; font-variant-numeric: tabular-nums; }
  .directory-muted,.directory-activity small,.directory-amount small { color: #52675b; }
  .directory-activity small,.directory-amount small { font-size: .77rem; }
  .directory-amount.outstanding strong { color: #874b23; }
  .client-directory .empty { border: 0; margin: 0; padding: 28px 15px; background: #fffefa; }
  .client-directory :is(a,button,input):focus-visible,.directory-more summary:focus-visible { outline: 3px solid #328269; outline-offset: 3px; }
  .directory-tools :is(input,button):focus-visible { outline-color: #91c9ae; }

  #modal[data-live-client] { background: #fffefa; }
  #modal[data-live-client] .modal-header { align-items: start; border-bottom: 1px solid #d6e0d4; background: #f4f6ed; }
  #modal[data-live-client] .modal-header h2 { font: 400 clamp(30px,3vw,46px)/1.08 "Instrument Serif",Georgia,serif; color: #183e34; overflow-wrap: anywhere; }
  #modal[data-live-client] .modal-header p { color: #536b5f; }
  .client-dossier .client-dossier-tabs { background: #edf2e6; }
  .client-dossier .client-dossier-tabs [aria-selected=true] { background: #204e42; color: white; }
  .client-section-picker { display: none; }
  .client-dossier .client-contact-block { background: #f0f5eb; border: 1px solid #d5e0d1; border-radius: 13px; margin: 0 0 14px; padding: clamp(14px,2vw,21px); }
  .client-contact-block .section-heading { margin-bottom: 12px; }
  .client-contact-block h3 { color: #224b3e; font: 400 1.65rem/1.12 "Instrument Serif",Georgia,serif; }
  .client-contact-block dt { color: #506759; font-size: .78rem; }
  .client-contact-block dd { color: #223f34; }
  .client-dossier .client-summary { gap: 8px; }
  .client-dossier .client-summary > div { border: 1px solid #d9e2d6; background: #fffefa; border-radius: 10px; }
  .client-dossier .client-summary > div:last-child { background: #eff4e8; }
  .client-dossier .client-summary strong { color: #284a39; }
  .client-dossier .client-notes { background: #f4f4ef; }
  .client-dossier .commerce-row,
  .client-dossier .commerce-row > *,
  .client-dossier .commerce-reference,
  .client-dossier .commerce-row h3 { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
  .client-dossier .commerce-reference { white-space: normal; }
  .client-dossier .client-contact-block .section-heading { margin-top: 0; }
}
@media screen and (min-width:761px) {
  .directory-amount small { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
}
@media screen and (max-width:1000px) {
  .directory-labels,.directory-row { gap: 10px; }
  .directory-row .directory-initials { width: 36px; height: 40px; }
}
@media screen and (max-width:760px) {
  .clients-mast { flex-wrap: wrap; gap: 12px; margin: 4px 0 14px; }
  .clients-mast h1 { font-size: 39px; }
  .clients-mast p { font-size: .87rem; margin-top: 4px; }
  .directory-actions { width: 100%; }
  .directory-actions .button,.directory-more summary { font-size: .85rem; }
  .directory-more[open] > div { min-width: min(205px,calc(100vw - 38px)); }
  .directory-tools { padding: 12px 14px; gap: 6px 12px; }
  .directory-tools .search input { font-size: 16px; }
  .directory-labels { display: none; }
  .directory-row { grid-template-columns: minmax(0,1fr) auto; gap: 7px 10px; padding: 12px 14px; }
  .directory-identity,.directory-contact { grid-column: 1/-1; }
  .directory-identity { gap: 9px; }
  .directory-open { font-size: 1rem; }
  .directory-contact { gap: 2px; }
  .directory-activity,.directory-amount { align-self: end; gap: 2px; padding-top: 5px; }
  .directory-row .directory-amount strong { font-size: .93rem; }
}
@media screen and (max-width:700px) {
  #modal[data-live-client] { width: 100vw; max-width: 100%; border-radius: 0; }
  #modal[data-live-client] .modal-header { padding: 16px 15px 12px; gap: 8px; }
  #modal[data-live-client] .modal-header > div { min-width: 0; }
  #modal .client-dossier { padding: 12px 15px 28px; }
  .client-dossier .commerce-row { grid-template-columns: minmax(0,1fr); }
  .client-section-picker { display: grid; gap: 5px; margin: 12px 0; padding: 8px 10px; min-width: 0; background: #edf2e6; border: 1px solid #d0dccc; border-radius: 11px; color: #294938; font-size: .8rem; font-weight: 600; }
  .client-section-picker select { width: 100%; min-height: 44px; font: inherit; font-size: 1rem; padding: 6px 9px; border: 1px solid #b9cbb9; border-radius: 8px; color: #1f4234; background: #fffefa; }
  .client-dossier .client-contact-block dl { gap: 10px; }
  .client-dossier-actions .ux-more { margin-left: 0; }
  .client-dossier-actions .ux-more[open] { flex: 1 1 100%; }
  .client-dossier-actions .ux-more[open] > div { position: static; display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; padding: 6px 0; box-shadow: none; background: transparent; }
}
