/* v29 shell: a focused accessibility and hierarchy layer over the v27 components.
   Existing route-specific layouts and revenue modules remain authoritative. */
:root{--s29-muted:#5f6e61;--s29-accent:#a98c51;--s29-surface:#fffefb}
html body:not(.auth){font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.6}
.s27-page-content{max-width:1600px}
html body:not(.auth) .s27-navigation{margin-top:0;padding-top:20px}
html body:not(.auth) .s27-brand{padding:16px 24px 18px;background:var(--s29-surface)}
.s27-brand img{width:178px;height:82px;object-fit:contain}
.s27-brand>span{color:#5f6e61;letter-spacing:2px}
html body:not(.auth) .s27-nav-group>h2{color:#62705e!important;letter-spacing:1.2px}
html body:not(.auth) aside .s27-nav-link{min-height:42px!important;border-radius:7px!important}
html body:not(.auth) aside .s27-nav-link.active{box-shadow:inset 3px 0 var(--s29-accent);background:#254535!important}
.s27-nav-footer{padding-bottom:max(16px,env(safe-area-inset-bottom))}
.s27-person b{font-size:12px}.s27-person small{font-size:11px}
.s27-person>a{display:grid;place-items:center;min-width:40px;min-height:40px}
.s27-breadcrumb{font-size:12px;min-width:0}.s27-breadcrumb b{font-size:13px}.s27-breadcrumb>a{width:36px;height:36px;flex-shrink:0}
html body:not(.auth) .s27-search{position:relative;display:flex;align-items:center;min-width:160px}
html body:not(.auth) .s27-search input{padding-right:75px!important;min-height:42px!important;font-size:13px!important;background:#f6f7f1}
html body:not(.auth) .s29-search-submit{position:absolute;right:4px;top:4px;width:34px;height:34px;min-height:34px;padding:8px;background:transparent;color:#35513d;border:0}
.s29-search-submit svg{width:18px;height:18px;display:block}
.s29-search-shortcut{position:absolute;right:44px;color:#64715d;border:1px solid #dce2d5;border-radius:4px;padding:0 5px;line-height:21px;font:12px/21px inherit;pointer-events:none}
html body:not(.auth) h1{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-weight:600}
html body:not(.auth) h2,html body:not(.auth) h3{font-family:inherit;font-weight:600}
html body:not(.auth) .g-kicker,html body:not(.auth) .eyebrow{color:#667353!important;font-size:10px!important}
html body:not(.auth) .g-card,html body:not(.auth) .panel,html body:not(.auth) .settings-card{box-shadow:0 2px 8px #28453705!important}
html body:not(.auth) label{color:#51614c;font-size:13px}
html body:not(.auth) .g-filters label{min-width:min(140px,100%)}
html body:not(.auth) .empty,html body:not(.auth) .s25-empty{color:#5e6d54;font-size:13px}
html body:not(.auth) table th{color:#53634c;font-size:11px}
html body:not(.auth) table td small{color:#617158;font-size:11px}
.s27-welcome p{color:#607153;font-size:14px}.s27-welcome{margin-bottom:24px}
html body:not(.auth) .s25-metrics a{font-size:12px;color:#58684e}
html body:not(.auth) .s25-metrics a small,.s27-stream small,.s25-item small{color:#617153;font-size:11px}
.s27-stream{background:var(--s29-surface)}.s27-stream svg{color:#7c713f}.s27-stream b{font-size:14px}
.s27-panel-heading a{color:#4e6940;font-size:12px;text-decoration:underline;text-underline-offset:3px}
.s29-crm-overview{margin-bottom:28px}.s29-crm-overview h2{margin:0 0 6px}
.s29-crm-overview>p{color:#5f6e61;margin:0;font-size:13px}
.s29-crm-overview .c28-mini{margin:14px 0 0}.s29-crm-overview .c28-mini a{display:flex;flex-direction:column;position:relative;padding:20px 22px;border-top:3px solid #b39862}
.s29-crm-overview .c28-mini a:hover{border-color:#7b906e;background:#fafbf6}
.s29-crm-overview .c28-mini a>span{font-size:13px;font-weight:600}
.s29-crm-overview .c28-mini a>small{color:#617158;font-size:12px}
.s29-crm-overview .c28-mini strong{font-size:30px;line-height:1.3;margin:10px 0;font-variant-numeric:tabular-nums}
.s29-scroll-region:focus-visible{outline:3px solid #b39862;outline-offset:3px}
html body:not(.auth) [hidden]{display:none!important}
@media(min-width:901px){.s27-sidebar .mobile-menu-close,.mobile-backdrop{display:none!important}}
@media(max-width:1200px){html body:not(.auth) .s27-workspace>.s27-header{gap:14px;padding-left:24px!important;padding-right:24px!important}.s27-breadcrumb>span{font-size:0}.s27-breadcrumb b{font-size:13px}.s27-breadcrumb i{display:none}}
@media(max-width:900px){
 html body:not(.auth)>aside.s27-sidebar{width:min(300px,calc(100vw - 48px))!important;visibility:hidden;transition:transform .18s ease,visibility .18s}
 html body.menu-open>aside.s27-sidebar{visibility:visible}
 html body:not(.auth) .s27-workspace>.s27-header{display:grid!important;grid-template-columns:44px minmax(0,1fr) auto;gap:10px;padding:12px 16px!important;padding-top:max(12px,env(safe-area-inset-top))!important}
 html body:not(.auth) .s27-header .mobile-menu{grid-column:1;grid-row:1;width:44px;height:44px;padding:8px;min-height:44px}
 .s27-header .s27-breadcrumb{display:flex;grid-column:2;grid-row:1;font-size:13px;overflow:hidden}
 .s27-breadcrumb>a{display:none}.s27-breadcrumb>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.s27-breadcrumb b{font-size:14px}
 html body:not(.auth) .s27-search{grid-column:1/-1;grid-row:2;max-width:none;width:100%!important;margin:0!important}
 html body:not(.auth) .s27-search input{font-size:16px!important;min-height:44px!important}
 .s27-header .l28-status{grid-column:3;grid-row:1;font-size:10px;max-width:120px}
 .s29-search-shortcut{display:none}
 html body:not(.auth) .s27-sidebar .mobile-menu-close{min-height:44px;margin:12px 14px 0}
 .s27-navigation{overscroll-behavior:contain}
 html body:not(.auth) :is(button,.g-button,.btn){min-height:44px}
 .s27-welcome .s25-language{display:flex;max-width:220px;flex-wrap:wrap}
 .s27-welcome{flex-wrap:wrap}
 .s27-skip{left:12px}
}
@media(max-width:650px){
 .s27-page-content{padding:24px 16px 40px}.s27-welcome .s25-language{max-width:none;gap:8px}
 html body:not(.auth) .s27-welcome .s25-language select{width:auto}
 .s27-revenue-grid strong{overflow-wrap:anywhere}
 .s27-streams{grid-template-columns:repeat(2,minmax(0,1fr))}.s27-stream{padding:16px}
 .s29-crm-overview .c28-mini{grid-template-columns:1fr}
 .s29-crm-overview .c28-mini a{display:grid;grid-template-columns:1fr auto;gap:4px 16px;padding:16px 18px}
 .s29-crm-overview .c28-mini strong{grid-column:2;grid-row:1/3;align-self:center;margin:0}.s29-crm-overview .c28-mini small{grid-column:1}
 html body:not(.auth) .g-card-head{flex-wrap:wrap;gap:10px}
 .s27-workspace .g-filters{flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){html body:not(.auth) *,html body:not(.auth) *::before,html body:not(.auth) *::after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
.s29-sync{position:relative;flex-shrink:0;font-size:12px;color:#52664c}
.s29-sync summary{cursor:pointer;min-height:36px;display:flex;align-items:center;gap:6px;list-style:none;border:1px solid #dfe4dc;padding:6px 10px;border-radius:7px;background:#fff}
.s29-sync summary:after{content:'⌄'}.s29-sync[open] summary:after{content:'⌃'}
.s29-sync [data-live-sources]{position:absolute;right:0;top:calc(100% + 8px);width:320px;max-width:calc(100vw - 32px);padding:16px;background:#fff;border:1px solid #dfe4dc;border-radius:10px;box-shadow:0 12px 30px #25362e20;line-height:1.6;z-index:45;overflow-wrap:anywhere}
.s29-sync [data-live-sources]>div+div{border-top:1px solid #e4e9df;margin-top:10px;padding-top:10px}
@media(min-width:901px) and (max-width:1250px){.s27-header-date{display:none}.s27-header .l28-status{max-width:130px;white-space:normal;font-size:10px}}
@media(max-width:900px){.s29-sync{grid-column:3;grid-row:2;font-size:11px}.s29-sync summary{min-height:44px;padding:8px}.s29-sync [data-live-sources]{right:0}.s27-header .l28-status{max-width:150px}html body:not(.auth) .s27-header .s27-search{grid-column:1/3}}
@media(max-width:900px){.s27-breadcrumb>span{display:block}.s27-header .l28-status{white-space:normal;line-height:1.35;min-width:0}.s27-workspace .l28-notice{flex-wrap:wrap}.s27-workspace .s29-search-submit{min-height:34px}}
/* Keep the primary focus action legible across legacy theme overrides. */
html body:not(.auth) .s27-workspace .s27-focus .g-button,
html body:not(.auth) .s27-workspace .s27-focus .g-button:visited{background:#e9f0db!important;color:#233129!important;border:1px solid #e9f0db!important}
html body:not(.auth) .s27-workspace .s27-focus .g-button:hover{background:#fff!important;color:#233129!important}
html body:not(.auth) .s27-workspace .s27-focus .g-button:focus-visible{outline:3px solid #fff;outline-offset:4px}
