@media screen {
  :root { --workspace-accent:#237d59; --workspace-depth:0 8px 24px rgba(20,48,37,.07); }
  :root[data-theme=dark] { --workspace-accent:#83deb1; --workspace-depth:0 8px 24px rgba(0,0,0,.16); }
  .shell > main { min-width:0; }
  .shell > main > .content { min-width:0; }
  .shell > main > header { box-shadow:0 1px 0 var(--line); }
  .shell > aside .brand { min-width:0; }
  #workspace-nav a { transition:background-color .16s,border-color .16s; }
  #workspace-nav a:hover { border-color:var(--line); background:color-mix(in srgb,var(--workspace-accent) 13%,transparent); }
  .workspace-context .workspace-context-pages a[aria-current=page] { border-color:color-mix(in srgb,var(--workspace-accent) 56%,var(--line)); }
  .shell :is(button,a,input,select,textarea,summary):focus-visible { outline:2px solid var(--workspace-accent); outline-offset:3px; }
  .shell > main .content :is(h1,h2,h3) { overflow-wrap:anywhere; }
  .home-actions a,.chart-card,.client-summary,.traffic-settings-card { box-shadow:var(--workspace-depth); }
  .home-actions a,.client-directory .client-card,.workspace-context a { transition:border-color .16s,background-color .16s; }
  .home-actions a:hover,.client-directory .client-card:hover { border-color:var(--workspace-accent); }
  .overview-charts > *,.client-workspace > *,.ops-fields > * { min-width:0; }
  .content .workrow { min-width:0; }
  .content .workrow :is(strong,small,p) { overflow-wrap:anywhere; }
  .content :is(.ops-dialog,.pb-project-comments-dialog) { max-width:min(680px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow:auto; }
  #traffic-settings .traffic-tutorial { margin:12px 0 0; padding:0; border:1px solid var(--line); border-radius:10px; background:color-mix(in srgb,var(--white) 80%,var(--paper)); }
  #traffic-settings .traffic-tutorial > summary { display:flex; align-items:center; gap:8px; padding:10px 12px; min-height:43px; list-style:none; font-weight:700; }
  #traffic-settings .traffic-tutorial > summary::-webkit-details-marker { display:none; }
  #traffic-settings .traffic-tutorial > summary::before { content:""; width:7px; height:7px; flex:0 0 7px; border-bottom:2px solid var(--workspace-accent); border-right:2px solid var(--workspace-accent); transform:rotate(-45deg); transition:transform .16s; }
  #traffic-settings .traffic-tutorial[open] > summary::before { transform:rotate(45deg); }
  #traffic-settings .traffic-tutorial[open] > summary { border-bottom:1px solid var(--line); }
  #traffic-settings .traffic-tutorial > :not(summary) { margin-inline:12px; }
  #traffic-settings .traffic-tutorial > :last-child { margin-bottom:12px; }
  .token-journey { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr)); gap:8px; padding:0; list-style:none; }
  .token-journey li { position:relative; margin:0; padding:10px; border:1px solid var(--line); border-inline-start:3px solid var(--workspace-accent); border-radius:8px; background:var(--paper); }
  .token-journey strong,.token-journey span { display:block; }
  .token-journey strong { color:var(--text); }
  .token-journey span { margin-top:4px; color:var(--muted); font-size:12px; }
  .token-example { padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--paper); }
  .token-example dt { font-weight:700; }
  .token-example dd { margin:0 0 7px; color:var(--muted); }
  .token-example div:last-child dd { margin-bottom:0; }
  .traffic-frames iframe { scroll-margin-top:12px; }
}
@media screen and (max-width:900px) {
  .overview-charts { grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); }
}
@media screen and (max-width:650px) {
  .shell > main > header .session-actions { min-width:0; flex-wrap:wrap; }
  .shell > main > header .active-lead-control { min-width:0; max-width:100%; }
  .shell > main .content .workrow { flex-wrap:wrap; }
  .shell > main .content .workrow > div { flex-basis:100%; min-width:0; }
  .home-actions a { min-height:76px; }
}
@media screen and (prefers-reduced-motion:reduce) {
  .shell :is(a,button,summary),#traffic-settings .traffic-tutorial > summary::before { transition:none!important; }
}
.finance-filter-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,165px),1fr)); align-items:end; gap:10px; margin:12px 0; }
.finance-filter-grid label { min-width:0; margin:0; }
.finance-filter-grid button { min-height:42px; }
.finance-period-note { margin:0 0 14px; }
.finance-due-row { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px; }
.finance-due-row .finance-entry { min-width:0; text-align:left; overflow-wrap:anywhere; }
@media(max-width:580px){
 .finance-due-row { grid-template-columns:minmax(0,1fr); }
 .finance-due-row > .secondary { justify-self:start; }
}
