/* Client identity is an alternate theme; content and status meanings remain unchanged. */
html[data-client-palette=true] .sidebar,
html[data-client-palette=true] .topbar,
html[data-client-palette=true] .mobile-nav,
html[data-client-palette=true] .drawer,
html[data-client-palette=true] .drawer-actions,
html[data-client-palette=true] .modal,
html[data-client-palette=true] .popover,
html[data-client-palette=true] .mobile-more{background:var(--bg-2);color:var(--text);border-color:var(--line)}
html[data-client-palette=true] .surface,
html[data-client-palette=true] .stat,
html[data-client-palette=true] .post-card,
html[data-client-palette=true] .editorial-meta,
html[data-client-palette=true] .editorial-client-actions,
html[data-client-palette=true] .publication-card,
html[data-client-palette=true] .content-context{background:var(--panel);color:var(--text);border-color:var(--line)}
html[data-client-palette=true] .btn{background:var(--lime);color:var(--on-accent);border-color:transparent;box-shadow:none}
html[data-client-palette=true] .btn-secondary,
html[data-client-palette=true] .mini-action,
html[data-client-palette=true] .card-action,
html[data-client-palette=true] .close-btn,
html[data-client-palette=true] .top-icon,
html[data-client-palette=true] .role-pill,
html[data-client-palette=true] .summary-pill,
html[data-client-palette=true] .month-btn,
html[data-client-palette=true] .month-chip,
html[data-client-palette=true] .chip,
html[data-client-palette=true] .nav-btn:hover,
html[data-client-palette=true] .context-select-wrap select{background:var(--panel-2);color:var(--text);border-color:var(--line)}
html[data-client-palette=true] .btn-danger,
html[data-client-palette=true] .mini-action.danger{background:rgba(255,100,100,.1);border-color:rgba(255,100,100,.25);color:var(--danger)}
html[data-client-palette=true] .nav-btn{color:var(--muted)}
html[data-client-palette=true] .nav-btn.active,
html[data-client-palette=true] .chip.active,
html[data-client-palette=true] .month-chip.active{color:var(--lime);background:rgba(var(--accent-rgb),.1);border-color:var(--lime)}
html[data-client-palette=true] .field input,
html[data-client-palette=true] .field textarea,
html[data-client-palette=true] .field select,
html[data-client-palette=true] .search input,
html[data-client-palette=true] .comment-box textarea{color:var(--text);background:var(--bg-2);border-color:var(--line)}
html[data-client-palette=true] .field label,
html[data-client-palette=true] .detail-copy,
html[data-client-palette=true] .editorial-meta span,
html[data-client-palette=true] .editorial-copy>p,
html[data-client-palette=true] .post-client,
html[data-client-palette=true] .post-meta,
html[data-client-palette=true] .popover button,
html[data-client-palette=true] .mobile-more button{color:var(--muted)!important}
html[data-client-palette=true] .section-head h3,
html[data-client-palette=true] .detail-block h4,
html[data-client-palette=true] .editorial-reader .editorial-copy>p{color:var(--text)!important}
html[data-client-palette=true] .editorial-meta a,
html[data-client-palette=true] .link-btn,
html[data-client-palette=true] .editorial-kicker,
html[data-client-palette=true] .eyebrow,
html[data-client-palette=true] .help-icon,
html[data-client-palette=true] .mobile-nav button.active{color:var(--lime)}
html[data-client-palette=true] .cal-head div{background:var(--panel-2);color:var(--muted)}
html[data-client-palette=true] .cal-day{border-color:var(--line)}
html[data-client-palette=true] .cal-ev{background:rgba(var(--accent-rgb),.12);color:var(--text)}
html[data-client-palette=true] .editorial-hero:after{background:rgba(var(--accent-rgb),.06)}
.client-brand-avatar{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.sidebar-client-avatar,.client-logo,.client-context-logo,.feed-avatar{overflow:hidden}
.sidebar-client-avatar .client-brand-avatar{min-width:100%}
.brand-client-actions{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.brand-client-actions button{display:inline-flex;gap:6px;align-items:center}
.brand-client-actions svg{width:14px;height:14px}
.branding-editing .modal{width:min(1040px,calc(100vw - 40px))}
.branding-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(240px,.75fr);gap:28px;align-items:start}
.branding-fields{min-width:0}
.brand-color-grid{display:grid;gap:14px;margin:24px 0 12px}
.brand-color-field>label{display:block;color:var(--muted);font-size:var(--type-label);font-weight:700;margin-bottom:8px}
.brand-color-field>div{display:flex;gap:10px}
.brand-color-field input[type=color]{width:48px;height:43px;padding:3px;border:1px solid var(--line);border-radius:10px;background:var(--bg-2);cursor:pointer}
.brand-color-field input[type=text]{min-width:0;flex:1;padding:10px 13px;color:var(--text);background:var(--bg-2);border:1px solid var(--line);border-radius:10px;font-size:var(--type-body)}
.brand-photo-setting{display:flex;align-items:flex-start;gap:16px;margin:26px 0}
.brand-photo-preview{width:66px;height:66px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;background:var(--panel-3);overflow:hidden;color:var(--lime);font-weight:800}
.brand-photo-setting label{display:block;font-weight:700;font-size:var(--type-label);margin-bottom:8px}
.brand-photo-setting input{display:block;max-width:100%;font-size:var(--type-small)}
.brand-photo-setting small{display:block;margin:8px 0;color:var(--muted);font-size:var(--type-small);line-height:1.7}
.brand-live-preview{border-radius:18px;background:var(--bg);border:1px solid var(--line);padding:24px;position:sticky;top:0;color:var(--text)}
.brand-live-preview>small{font-size:10px;font-weight:800;letter-spacing:.12em;color:var(--muted)}
.brand-preview-identity{display:flex;gap:12px;align-items:center;margin:28px 0}
.brand-preview-identity>span{width:40px;height:40px;display:grid;place-items:center;border:1px solid var(--line);border-radius:50%;overflow:hidden;color:var(--lime);background:var(--panel)}
.brand-preview-identity strong{font-size:var(--type-label)}
.brand-live-preview h3{font-size:22px;line-height:1.5}
.brand-live-preview p{font-size:var(--type-body);line-height:1.8;color:var(--muted);margin-top:14px}
.brand-preview-card{padding:18px;margin-top:28px;border:1px solid var(--line);background:var(--panel);border-radius:12px}
.brand-preview-card strong,.brand-preview-card small{display:block;font-size:var(--type-label);line-height:1.8}
.brand-preview-card small{color:var(--muted);margin-top:5px}
.brand-preview-button{display:flex;align-items:center;justify-content:space-between;background:var(--lime);color:var(--on-accent);border-radius:10px;padding:14px;margin-top:14px;font-size:var(--type-label);font-weight:750}
.brand-preview-button svg{width:16px;height:16px}
.brand-preview-swatches{display:flex;gap:8px;margin-top:24px}
.brand-preview-swatches span{width:24px;height:24px;border-radius:50%;border:1px solid var(--line)}
.portal-appearance-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:22px}
.portal-appearance-choice{text-align:left;border-radius:14px;padding:12px;background:var(--bg-2);border:1px solid var(--line);color:var(--text)}
.portal-appearance-choice.active{border-color:var(--lime)}
.portal-appearance-choice strong,.portal-appearance-choice small{display:block;margin-top:12px}
.portal-appearance-choice strong{font-size:var(--type-body)}
.portal-appearance-choice small{font-size:var(--type-small);line-height:1.7;color:var(--muted)}
.appearance-intro{color:var(--muted);font-size:var(--type-body)}
.appearance-default{display:inline-block;margin-top:12px;color:var(--lime);font-size:10px;font-weight:700}
.appearance-sample{--sample-bg:#10120f;--sample-accent:#adf403;--sample-secondary:#c7ff3b;display:flex;flex-direction:column;gap:8px;min-height:94px;background:var(--sample-bg);border:1px solid rgba(127,127,127,.25);border-radius:9px;padding:14px}
.appearance-sample i{display:block;border-radius:3px;height:6px;background:var(--sample-accent);width:70%}
.appearance-sample i:nth-child(2){width:85%;opacity:.28;background:var(--sample-secondary)}
.appearance-sample i:nth-child(3){margin-top:8px;width:40%;height:16px}
.appearance-light{--sample-bg:#f4f6f0;--sample-accent:#435d00;--sample-secondary:#6f7a5e}
.portal-entry-overlay[hidden]{display:none!important}
.portal-entry-overlay{position:fixed;inset:0;z-index:20000;background:var(--bg);color:var(--text);display:grid;place-items:center;padding:28px;overflow-y:auto;overscroll-behavior:contain}
.entry-intro{max-width:680px;text-align:center;padding:30px;animation:client-entry-arrive .5s ease-out}
.entry-avatar{width:92px;height:92px;border-radius:50%;padding:4px;background:linear-gradient(135deg,var(--lime),var(--brand-secondary));display:grid;place-items:center;margin:0 auto 30px}
.entry-avatar img,.entry-avatar>span{display:grid;place-items:center;width:100%;height:100%;border-radius:50%;object-fit:cover;background:var(--panel);color:var(--text);font-size:28px;font-weight:800}
.entry-intro>small,.entry-question header small{display:block;color:var(--lime);font-size:var(--type-small);letter-spacing:.12em;font-weight:800;margin-bottom:18px}
.entry-intro h2{font-size:clamp(28px,5vw,46px);line-height:1.35;overflow-wrap:anywhere}
.entry-intro p{color:var(--muted);font-size:var(--type-body);margin-top:18px}
.entry-loading-line{width:180px;height:3px;margin:34px auto 0;background:var(--line);overflow:hidden;border-radius:4px}
.entry-loading-line i{display:block;height:100%;width:40%;background:var(--lime);animation:entry-line 1.1s ease-in-out infinite}
.entry-skip{background:transparent;color:var(--muted);font-size:var(--type-small);padding:12px 16px;border-radius:8px}
.entry-intro .entry-skip{margin-top:24px}
.entry-question{width:min(720px,100%);padding:36px;border:1px solid var(--line);background:var(--panel);border-radius:24px;animation:client-entry-arrive .25s ease-out}
.entry-question header{display:flex;align-items:flex-start;gap:20px;justify-content:space-between}
.entry-question header small{margin-bottom:12px;letter-spacing:.08em}
.entry-question h2{font-size:clamp(25px,4vw,32px);line-height:1.4}
.entry-question header p{color:var(--muted);font-size:var(--type-body);line-height:1.8;margin-top:12px}
.entry-close{border:1px solid var(--line);background:var(--panel-2);color:var(--text);width:36px;height:36px;flex-shrink:0;border-radius:10px;font-size:22px}
.entry-shortcuts{display:grid;gap:12px;margin:28px 0}
.entry-shortcuts button{display:flex;align-items:center;text-align:left;gap:16px;border:1px solid var(--line);background:var(--bg-2);color:var(--text);padding:18px;border-radius:14px;transition:border-color .16s,background .16s}
.entry-shortcuts button:hover{border-color:var(--lime);background:var(--panel-2)}
.entry-shortcuts button>span:nth-child(2){flex:1;min-width:0}
.entry-shortcuts strong{display:block;font-size:var(--type-body);line-height:1.5}
.entry-shortcuts small{display:block;font-size:var(--type-small);color:var(--muted);margin-top:5px;line-height:1.6}
.entry-shortcut-icon{color:var(--lime);display:grid;place-items:center;width:38px;height:38px;background:rgba(var(--accent-rgb),.08);border-radius:11px;flex-shrink:0}
.entry-shortcuts svg{width:18px;height:18px;flex-shrink:0}
.entry-question .entry-question-footer{display:grid;gap:5px;justify-items:center;text-align:center}
.entry-dismiss-day{background:transparent;color:var(--lime);font-size:var(--type-label);font-weight:700;padding:12px;line-height:1.7;border-radius:8px}
.entry-preview-note{border-top:1px solid var(--line);margin-top:18px;padding-top:16px;color:var(--muted);font-size:var(--type-small);text-align:center;line-height:1.7}
#entryQuestionStatus{color:var(--danger);font-size:var(--type-small);text-align:center;line-height:1.7}
.portal-entry-overlay button:focus-visible,.brand-live-preview button:focus-visible{outline:2px solid var(--lime);outline-offset:3px}
@keyframes client-entry-arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@keyframes entry-line{from{transform:translateX(-110%)}to{transform:translateX(360%)}}
@media(max-width:760px){
 .branding-editing .modal{width:100%}.branding-layout{grid-template-columns:minmax(0,1fr)}
 .brand-live-preview{position:static;order:-1;padding:20px}
 .brand-live-preview p,.brand-preview-card,.brand-preview-button,.brand-preview-swatches{display:none}
 .brand-preview-identity{margin:16px 0}.brand-live-preview h3{font-size:20px}
 .portal-entry-overlay{padding:18px;align-items:center}
 .entry-question{padding:24px 18px;border-radius:20px}.entry-question header{gap:12px}
 .entry-question header p{font-size:var(--type-small)}
 .entry-shortcuts{margin:22px 0;gap:10px}.entry-shortcuts button{padding:14px;gap:12px}
 .entry-shortcuts strong{font-size:var(--type-label)}.entry-shortcuts small{font-size:11px}
 .entry-shortcut-icon{width:30px;height:34px}.entry-shortcuts>button>svg{width:14px}
 .entry-dismiss-day{font-size:var(--type-small)}
 .portal-appearance-choices{grid-template-columns:minmax(0,1fr)}.portal-appearance-choice{display:grid;grid-template-columns:90px 1fr;column-gap:16px;align-items:center}
 .portal-appearance-choice .appearance-sample{grid-row:1/4;min-height:80px}
 .portal-appearance-choice strong,.portal-appearance-choice small{margin-top:0}
}
@media(prefers-reduced-motion:reduce){.entry-intro,.entry-question,.entry-loading-line i{animation:none}.entry-loading-line i{width:100%}.entry-shortcuts button{transition:none}}


:root{--accent-rgb:173,244,3;--on-accent:#101114}
html[data-client-palette=true] .nav-btn.active{background:linear-gradient(100deg,rgba(var(--accent-rgb),.14),color-mix(in srgb,var(--brand-secondary) 7%,transparent))}
html[data-client-palette=true] .client-welcome:before{content:'';display:block;width:46px;height:3px;border-radius:3px;background:linear-gradient(90deg,var(--lime),var(--brand-secondary));margin-bottom:20px}
/* Appearance is a named control, including on narrow screens. */
#themeToggle{width:auto;min-width:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 12px;flex-shrink:0}
#themeToggle svg{width:18px;height:18px;flex-shrink:0}
.appearance-toggle-label{font-size:var(--type-label);font-weight:700;line-height:1.3;white-space:nowrap}
@media(max-width:600px){#themeToggle{gap:6px;padding:0 9px}.appearance-toggle-label{font-size:var(--type-small)}}

/* Crossfade full identity and monogram without stretching or clipping vectors. */
.sidebar .brand-wrap{position:relative;min-height:92px!important;height:92px;padding:4px 8px!important;display:block!important;overflow:hidden}
.sidebar .brand-logo{position:absolute;left:8px;top:50%;width:218px!important;height:74px!important;max-height:none!important;object-fit:contain!important;object-position:left center!important;transform:translateY(-50%);opacity:1;transition:opacity .2s ease,transform .24s ease}
.sidebar .brand-monogram{position:absolute;left:50%;top:50%;width:52px;height:52px;object-fit:contain;transform:translate(-50%,-50%) scale(.86);opacity:0;transition:opacity .2s ease,transform .24s ease;pointer-events:none}
.app-shell.sidebar-collapsed .sidebar .brand-logo{width:218px!important;height:74px!important;opacity:0;transform:translate(-14px,-50%);pointer-events:none}
.app-shell.sidebar-collapsed .brand-monogram{opacity:1;transform:translate(-50%,-50%) scale(1)}
@media(min-width:841px) and (max-width:1180px){.sidebar .brand-logo{width:218px!important;height:74px!important;opacity:0;pointer-events:none}.sidebar .brand-monogram{opacity:1;transform:translate(-50%,-50%) scale(1)}}
@media(prefers-reduced-motion:reduce){.sidebar .brand-logo,.sidebar .brand-monogram{transition:none}}

/* Keep preview labels readable independently of the client accent. */
html[data-theme="light"] .content-badges .preview-badge,
html[data-theme="light"][data-client-palette="true"] .content-badges .preview-badge{
 color:#3f6200;background:rgba(63,98,0,.10);border-color:rgba(63,98,0,.20)
}
html[data-theme="dark"] .content-badges .preview-badge,
html[data-theme="dark"][data-client-palette="true"] .content-badges .preview-badge{
 color:#adf403;background:rgba(173,244,3,.10);border-color:rgba(173,244,3,.20)
}

/* Light appearance uses a readable accent everywhere, not fluorescent text. */
html[data-theme="light"]{
 --lime:#3f6200;--lime-soft:#334f00;--lime-ink:#3f6200;
 --accent-rgb:63,98,0;--on-accent:#fff;
 --muted:#52604c;--muted-2:#606b5a
}
html[data-theme="light"] h1,html[data-theme="light"] h2,
html[data-theme="light"] h3,html[data-theme="light"] h4,
html[data-theme="light"] .sidebar-client,
html[data-theme="light"] .sidebar-client.active,
html[data-theme="light"] .sidebar-client:hover,
html[data-theme="light"] .sidebar-client-copy strong,
html[data-theme="light"] .month-switcher{color:var(--text)}
html[data-theme="light"] .sidebar-client-copy span,
html[data-theme="light"] .dashboard-card-head small,
html[data-theme="light"] .dashboard-legend span,
html[data-theme="light"] .dashboard-approval-row em,
html[data-theme="light"] .stat .k,
html[data-theme="light"] .stat .trend,
html[data-theme="light"] .hint,
html[data-theme="light"] .post-meta,
html[data-theme="light"] .post-client{color:var(--muted)}
html[data-theme="light"] .stat .trend.good,
html[data-theme="light"] .dashboard-eyebrow,
html[data-theme="light"] .dashboard-rate,
html[data-theme="light"] .stat-icon,
html[data-theme="light"] .editorial-card-cta,
html[data-theme="light"] .period-heading small,
html[data-theme="light"] .feed-profile small{color:var(--lime-ink)}
html[data-theme="light"] .btn:not(.btn-secondary):not(.btn-danger){color:var(--on-accent);background:var(--lime)}
html[data-theme="light"] .priority-total,
html[data-theme="light"] .sidebar-client-avatar,
html[data-theme="light"] .approval-avatar,
html[data-theme="light"] .workload-avatar{background:var(--panel-3);color:var(--lime-ink);border-color:var(--line)}
html[data-theme="light"] .sidebar-client:hover{background:var(--panel-2)}
html[data-theme="light"] .sidebar-client.active{background:rgba(var(--accent-rgb),.09)}
html[data-theme="light"] .dashboard-legend>div,
html[data-theme="light"] .dashboard-approval-row{border-color:var(--line)}
html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder{color:var(--muted-2)}

/* Desktop controls remain available on narrow and portrait monitors. */
@media(min-width:841px) and (max-width:1180px){
 :root{--sidebar:260px}
 .app-shell{grid-template-columns:260px minmax(0,1fr)}
 .app-shell .sidebar{width:260px;overflow-x:hidden}
 .app-shell .sidebar-toggle{display:grid!important}
 .app-shell .brand-wrap{padding-right:42px!important}
 .app-shell:not(.sidebar-collapsed) .sidebar .brand-logo{opacity:1;pointer-events:auto;width:190px!important}
 .app-shell:not(.sidebar-collapsed) .sidebar .brand-monogram{opacity:0}
 .app-shell:not(.sidebar-collapsed) .nav-section{display:block}
 .app-shell:not(.sidebar-collapsed) .nav-btn{justify-content:flex-start;padding:10px 12px;gap:10px}
 .app-shell:not(.sidebar-collapsed) .nav-btn span:not(.nav-badge){display:inline}
 .app-shell:not(.sidebar-collapsed) .nav-btn .nav-badge{position:static;transform:none;margin-left:auto}
 .app-shell:not(.sidebar-collapsed) .profile-mini{justify-content:flex-start}
 .app-shell:not(.sidebar-collapsed) .profile-mini>div:last-child{display:block;min-width:0}
 .app-shell.sidebar-collapsed{grid-template-columns:78px minmax(0,1fr)}
 .app-shell.sidebar-collapsed .sidebar{width:78px}
 .app-shell.sidebar-collapsed .sidebar-clients{display:none!important}
 .app-shell.sidebar-collapsed .brand-wrap{padding:0!important;margin-top:44px}
 .app-shell.sidebar-collapsed .sidebar-toggle{top:12px!important;right:17px!important}
 .page{padding:26px 24px 40px}
 .page-head{display:flex;flex-direction:column;align-items:stretch;gap:18px}
 .page-actions{width:100%;display:flex;flex-wrap:wrap;justify-content:flex-start}
 .page-actions .editorial-action-set{display:flex;flex-wrap:wrap;gap:10px}
 .page-actions .btn{min-height:44px;white-space:normal}
 .view-context-bar{flex-wrap:wrap}
 .view-context-select{flex:1 1 230px;min-width:0}
 .editorial-hero{grid-template-columns:minmax(0,1fr);gap:20px}
 .editorial-status{width:100%;max-width:none}
 .post-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .editorial-month-picker-head{flex-wrap:wrap}
 .editorial-calendar{min-width:980px}
 .editorial-cal-event strong{-webkit-line-clamp:4;line-height:1.5}
 .editorial-calendar-scroll{overscroll-behavior-x:contain;scrollbar-width:auto}
 .topbar{padding-left:20px;padding-right:20px;gap:10px;flex-wrap:wrap;height:auto;min-height:64px}
 .topbar .search{min-width:160px;flex:1 1 180px;width:auto}
}
@media(min-width:841px){
 .sidebar{overflow-x:hidden}
 .sidebar-toggle{display:grid!important}
}
