/* The browser theme owns only presentation. Light remains the existing route
   contract; email action tokens and saved semantic text never change here. */
html[data-theme='dark'],
html[data-theme='dark'] body{
 --theme-bg:#080809;--theme-surface:#121214;--theme-raised:#1b1b1f;
 --theme-ink:#eeeef0;--theme-muted:#a1a1ac;--theme-line:#303035;
 --theme-soft-line:#242429;--theme-hover:#19191d;--theme-error:#f4aaa2;
 --theme-error-bg:#30211f;--theme-focus:#a5c1f7;--theme-overlay:#000000a8;
 --paper:var(--theme-bg);--white:var(--theme-surface);--ink:var(--theme-ink);
 --muted:var(--theme-muted);--line:var(--theme-line);--soft-line:var(--theme-soft-line);
 --forest:#a7dac3;--forest-wash:#17241e;--coral:var(--theme-error);
 --focus:var(--theme-focus);--wash:var(--theme-raised);
 --green:#a7dac3;--green-hover:#c0e7d5;--mint:#172a22;
 --accent:#b9d8c9;--accent-text:#b8d7c9;--cobalt:#a5c1f7;--deep-cobalt:#c1d3f7;
 --rose:var(--theme-error);--blush:#30211f;--ivory:var(--theme-surface);--lavender:#2b2438;
 --backdrop:var(--theme-overlay);--overlay:var(--theme-overlay);
 --shadow:0 10px 32px #00000040;--focus-shadow:0 12px 40px #00000030;
 --home-paper:var(--theme-bg);--home-text:var(--theme-ink);
 --home-muted:var(--theme-muted);--home-line:var(--theme-soft-line);

 /* Saturation lives in small marks and actions, leaving the canvas charcoal. */
 --action-white:var(--theme-surface);--action-ink:#eadba1;
 --action-yellow:#332d1a;--action-yellow-hover:#443a21;
 --action-blue:#202c40;--action-blue-hover:#2a3850;--action-blue-ink:#abc7f4;
 --action-purple:#2e253f;--action-purple-hover:#3c3051;--action-purple-ink:#cab6ef;
 --action-green:#203529;--action-green-hover:#2c4436;--action-green-ink:#b5dfc0;
 --action-blue-wash:#171e2a;--action-purple-wash:#221d2c;--action-green-wash:#17241e;
 --action-blue-bg:var(--action-blue-wash);--action-green-bg:var(--action-green-wash);

 /* The six semantic families retain the same roles in every public view. */
 --events-ink:#ecd185;--events-bg:#302a18;
 --creative-ink:#cbb6f1;--creative-bg:#2a2339;
 --home-ink:#f3b89b;--home-bg:#30231d;
 --learning-ink:#adc8f3;--learning-bg:#202b3d;
 --care-ink:#9fd8c8;--care-bg:#193129;
 --technical-ink:#b5c9d5;--technical-bg:#233039;
 --amount-ink:#ebaacf;--amount-bg:#352332;
 --event-mark:var(--events-bg);--creative-mark:var(--creative-bg);--home-mark:var(--home-bg);
 --learning-mark:var(--learning-bg);--care-mark:var(--care-bg);--technical-mark:var(--technical-bg);
 --event-dot:#d6b464;--creative-dot:#ba9fdf;--home-dot:#dc9b81;
 --learning-dot:#88abd9;--care-dot:#81bdab;--technical-dot:#95b8c9;
 --paragraph-service-ink:var(--care-ink);--paragraph-service-bg:var(--care-bg);
 --paragraph-event-ink:var(--events-ink);--paragraph-event-bg:var(--events-bg);
 --paragraph-duration-ink:var(--learning-ink);--paragraph-duration-bg:var(--learning-bg);
 --paragraph-location-ink:var(--home-ink);--paragraph-location-bg:var(--home-bg);
 --paragraph-amount-ink:var(--amount-ink);--paragraph-amount-bg:var(--amount-bg);
 --paragraph-people-ink:var(--creative-ink);--paragraph-people-bg:var(--creative-bg);
 --paragraph-detail-ink:var(--technical-ink);--paragraph-detail-bg:var(--technical-bg);
 --paragraph-neutral-ink:#c4c1b9;--paragraph-neutral-bg:#292823;
 color-scheme:dark;
}
html[data-theme='dark'] [data-detail-tone='cyan']{--detail-bg:#18333a;--detail-ink:#9adddf}
html[data-theme='dark'] [data-detail-tone='gold']{--detail-bg:#332c18;--detail-ink:#f0d58c}
html[data-theme='dark'] [data-detail-tone='rose']{--detail-bg:#362231;--detail-ink:#efb2cf}
html[data-theme='dark'] [data-detail-tone='violet']{--detail-bg:#2c2340;--detail-ink:#c8b4f3}
html[data-theme='dark'] [data-detail-tone='lime']{--detail-bg:#283219;--detail-ink:#c8dfa0}
html[data-theme='dark'] [data-detail-tone='coral']{--detail-bg:#36251f;--detail-ink:#f4baa2}
html[data-theme='dark'] [data-detail-tone='indigo']{--detail-bg:#222b44;--detail-ink:#b4c5f8}

html[data-theme='dark']{background:var(--theme-bg);scrollbar-color:#515159 var(--theme-bg)}
html[data-theme='light']{color-scheme:light}
html[data-theme='dark'] body{background:var(--theme-bg);color:var(--theme-ink)}
html[data-theme='dark'] ::selection{background:var(--action-purple);color:var(--theme-ink)}
html[data-theme='dark'] body :is(input,textarea,select){
 background:var(--theme-surface);color:var(--theme-ink);border-color:var(--theme-line);
 caret-color:var(--theme-ink);
}
html[data-theme='dark'] body :is(input,textarea)::placeholder{color:var(--theme-muted);opacity:1}
html[data-theme='dark'] body :is(select option,optgroup){background:var(--theme-raised);color:var(--theme-ink)}
html[data-theme='dark'] body :is(input,textarea):autofill{
 background:var(--theme-surface);color:var(--theme-ink);
}
html[data-theme='dark'] body :is(input,textarea):-webkit-autofill{
 -webkit-text-fill-color:var(--theme-ink);caret-color:var(--theme-ink);
 box-shadow:0 0 0 1000px var(--theme-surface) inset;
}
html[data-theme='dark'] body :is(button,a,input,textarea,select,summary):focus-visible{
 outline-color:var(--theme-focus);
}
html[data-theme='dark'] body :is(.search-field input,.campus-search input,.sort-control select,#plan){background:transparent}
html[data-theme='dark'] body :is(input[type='range'],input[type='checkbox'],input[type='radio']){accent-color:var(--action-green-ink)}

/* Only the shipped monochrome interface glyphs are recoloured. Photos, images,
   illustrations, and semantic color swatches keep their source rendering. */
html[data-theme='dark'] body img[src*='assets/'][src$='.svg']{filter:brightness(0) invert(.88)}
html[data-theme='dark'] body :is(.marketplace-brand,.wordmark,.campus-logo){color:var(--action-green-ink)}
html[data-theme='dark'] body .marketplace-header-link[aria-current='page']{color:var(--theme-ink)}
html[data-theme='dark'] body .marketplace-header-link[aria-current='page']::after{background:var(--action-green-ink)}

/* Feed cells retain the existing dense grid and the original tap targets. */
html[data-theme='dark'] body :is(.need-tile,.request-row){background:transparent}
html[data-theme='dark'] body :is(.need-tile,.request-row):hover{background:var(--theme-hover)}
html[data-theme='dark'] body :is(.search-bar,.home-search .search-field,.home-search .location-field,.sort-control,.campus-search){
 background:var(--theme-surface);border-color:var(--theme-line);
}
html[data-theme='dark'] body .category-button:hover{background:var(--theme-raised);color:var(--theme-ink)}
html[data-theme='dark'] body :is(.save-button,.icon-button,.saved-utility,.connection-icon):hover{background:var(--theme-raised)}
html[data-theme='dark'] body :is(.save-button,.saved-utility)[aria-pressed='true']{background:var(--action-green);box-shadow:none}
html[data-theme='dark'] body .category-button[aria-pressed='true']{background:var(--action-green-wash);color:var(--action-green-ink)}
html[data-theme='dark'] body .result-tab[aria-pressed='true']{color:var(--action-green-ink)}
html[data-theme='dark'] body .result-tab[aria-pressed='true']::after{background:var(--action-green-ink)}
html[data-theme='dark'] body :is(.tab-count,.saved-count){background:var(--theme-raised);color:var(--theme-muted)}

/* Public drawers, verification, and native campus detail sticky surfaces. */
html[data-theme='dark'] body dialog{background:var(--theme-surface);color:var(--theme-ink);border-color:var(--theme-line);box-shadow:-20px 0 80px #00000055}
html[data-theme='dark'] body dialog::backdrop{background:var(--theme-overlay);opacity:1}
html[data-theme='dark'] body :is(.detail-top,.detail-footer,.campus-detail-header,.campus-detail-actions,#brief-dialog .dialog-heading,.brief-dialog-actions){
 background:var(--theme-surface);border-color:var(--theme-line);
}
html[data-theme='dark'] body :is(.contact-verification,.starter-dialog){background:var(--theme-surface);color:var(--theme-ink)}
html[data-theme='dark'] body .campus-detail{color:var(--theme-ink)}
html[data-theme='dark'] body :is(.campus-card,.campus-panel){background:var(--theme-surface);border-color:var(--theme-line)}
html[data-theme='dark'] body :is(.campus-card-body,.campus-card-location,.campus-detail-body,.campus-field,.campus-own-post){color:var(--theme-ink)}
html[data-theme='dark'] body :is(.campus-header,.campus-shell footer,.campus-thread-list>button,.campus-own-post){border-color:var(--theme-line)}
html[data-theme='dark'] body .campus-card:hover{border-color:var(--action-green-ink)}
html[data-theme='dark'] body .campus-chip{color:var(--action-ink)}
html[data-theme='dark'] body .campus-chip.offer{color:var(--action-green-ink)}
html[data-theme='dark'] body :is(.campus-card-bottom,.campus-field,.campus-message small,.campus-thread-list small){color:var(--theme-muted)}
html[data-theme='dark'] body :is(.campus-panel form>button,.campus-empty a,.campus-empty button,.campus-detail-actions a:first-child,.contact-verification button){color:var(--action-ink)}
html[data-theme='dark'] body .campus-post-actions button{color:var(--action-green-ink)}
html[data-theme='dark'] body .campus-detail-actions button:last-child{color:var(--action-purple-ink)}
html[data-theme='dark'] body .contact-verification .quiet-button{color:var(--action-blue-ink)}
html[data-theme='dark'] body .campus-message{color:var(--theme-ink)}

/* Writing uses open space on the pitch-black canvas, controls on charcoal. */
html[data-theme='dark'] body .canvas-utilities{background:var(--theme-bg)}
html[data-theme='dark'] body :is(.question-open,.question-panel,.thought,.waiting-panel,.shared-node,.service-cluster,.service-node,.canvas-dock){
 background:var(--theme-surface);border-color:var(--theme-line);
}
html[data-theme='dark'] body[data-layout='writing'] :is(.thought,.question-panel,.question-open,.waiting-panel,.canvas-dock){background:transparent}
html[data-theme='dark'] body[data-engine='guide']:not([data-layout='writing']) :is(.thought,.shared-node,.service-cluster,.service-node,.question-panel,.canvas-dock,.waiting-panel){background:var(--theme-surface)}
html[data-theme='dark'] body[data-engine='guide']:not([data-layout='writing']) .service-node.is-active{background:var(--action-green);color:var(--action-green-ink)}
html[data-theme='dark'] body[data-engine='guide']:not([data-layout='writing']) .answer-option::before{background:var(--theme-surface)}
html[data-theme='dark'] body[data-engine='guide']:not([data-layout='writing']) .answer-option[aria-pressed='true']::before{background:var(--action-green-ink)}
html[data-theme='dark'] body[data-engine='guide']:not([data-layout='writing']) .primary-button{background:var(--action-yellow);color:var(--action-ink);border-color:transparent}
html[data-theme='dark'] body[data-engine='guide']:not([data-layout='writing']) .primary-button:hover:not(:disabled){background:var(--action-yellow-hover);color:var(--action-ink);border-color:transparent}
html[data-theme='dark'] body #brief-count{background:var(--theme-raised);color:var(--theme-ink)}
html[data-theme='dark'] body :is(.composition-pill,.composition-fragment)[data-kind='answer']{background:var(--theme-raised)}
html[data-theme='dark'] body :is(.composition-pill,.composition-fragment):is([data-kind='amount'],[data-kind='people'],[data-kind='quantity']){background:var(--creative-bg)}
html[data-theme='dark'] body :is(.composition-pill,.composition-fragment)[data-draft='true']{background:var(--theme-surface);border-color:var(--theme-line)}
html[data-theme='dark'] body :is(.answer-option,.answer-control-step,.starter-choice,.starter-field-input){
 background:var(--theme-surface);color:var(--action-blue-ink);border-color:var(--theme-line);
}
html[data-theme='dark'] body :is(.answer-option,.starter-choice):hover:not(:disabled){background:var(--action-blue-wash);border-color:var(--action-blue-ink)}
html[data-theme='dark'] body #answer-options .answer-option[aria-pressed='true'],
html[data-theme='dark'] body #answer-options .answer-option[aria-pressed='true']:hover{
 background:var(--action-green);color:var(--action-green-ink);border-color:var(--action-green-ink);
}
html[data-theme='dark'] body[data-layout='writing'] #answer-options .interview-choice{
 background:var(--theme-surface);color:var(--theme-ink);border-color:var(--theme-line);
}
@media(hover:hover) and (pointer:fine){
 html[data-theme='dark'] body[data-layout='writing'] #answer-options .interview-choice:hover:not(:disabled):not([aria-pressed='true']){
  background:var(--theme-raised);color:var(--theme-ink);border-color:var(--theme-line);
 }
}
html[data-theme='dark'] body[data-layout='writing'] #answer-options .interview-choice[aria-pressed='true'],
html[data-theme='dark'] body[data-layout='writing'] #answer-options .interview-choice[aria-pressed='true']:hover{
 background:var(--action-green-wash);color:var(--theme-ink);border-color:var(--action-green);
}
html[data-theme='dark'] body .answer-control{
 --ac-white:var(--theme-surface);--ac-ink:var(--theme-ink);--ac-muted:var(--theme-muted);
 --ac-line:var(--theme-line);--ac-coral:var(--theme-focus);
 --ac-coral-soft:var(--action-blue-wash);--ac-error:var(--theme-error);
}
html[data-theme='dark'] body .answer-control .answer-option{background:var(--theme-surface);border-color:var(--theme-line);color:var(--action-blue-ink)}
html[data-theme='dark'] body .answer-control .answer-option:hover:not(:disabled){background:var(--action-blue-wash);border-color:var(--action-blue-ink)}
html[data-theme='dark'] body .answer-control .answer-option[aria-pressed='true']{background:var(--action-blue);color:var(--action-blue-ink);border-color:var(--action-blue-ink)}
html[data-theme='dark'] body .answer-control .answer-control-step:hover:not(:disabled){background:var(--theme-raised);border-color:var(--theme-focus)}
html[data-theme='dark'] body :is(.answer-control-places,.answer-date-trigger,.answer-date-time-input){background:var(--theme-surface);color:var(--theme-ink)}
html[data-theme='dark'] body .budget-suggestion button{background:var(--action-yellow);color:var(--action-ink);border-color:transparent}
html[data-theme='dark'] body .budget-suggestion button:hover:not(:disabled){background:var(--action-yellow-hover);border-color:transparent}
html[data-theme='dark'] body :is(.starter-field-option,.answer-date-time-choice){background:var(--action-blue-wash);color:var(--action-blue-ink)}
html[data-theme='dark'] body .starter-field-option[aria-pressed='true']{background:var(--action-green);color:var(--action-green-ink)}
html[data-theme='dark'] body .answer-date-time-choice[aria-pressed='true']{background:var(--action-blue);border-color:var(--action-blue-ink)}

/* The legacy service inbox has literal colors; all are owned explicitly here. */
html[data-theme='dark'] body :is(.login-panel,.response-card,.message){background:var(--theme-surface);color:var(--theme-ink);border-color:var(--theme-line)}
html[data-theme='dark'] body :is(.connection-sidebar,.side-item,.match-card,.proposal){border-color:var(--theme-line)}
html[data-theme='dark'] body :is(.side-title,.login-help,.login-field-help,.login-access-help,.field,.side-item small,.match-card p,.meta,.privacy,.message small,.empty,.thread-context,.shared-detail small,.shared-title,#status){color:var(--theme-muted)}
html[data-theme='dark'] body .login-actions .quiet:disabled{color:var(--theme-muted)}
html[data-theme='dark'] body .side-item[aria-current='true']{background:var(--action-green-wash);color:var(--theme-ink);border-color:transparent}
html[data-theme='dark'] body :is(.message.mine,.shared-detail){background:var(--action-green-wash);color:var(--theme-ink)}
html[data-theme='dark'] body :is(.shared-detail,.share-audience){border-color:var(--action-green-ink)}
html[data-theme='dark'] body :is(#error,.analysis-error:not(body[data-layout='writing'] .analysis-error)){
 background:var(--theme-error-bg);color:var(--theme-error);
}
html[data-theme='dark'] body :is(.field-error,.compose-error,.feed-status[data-phase='error'],.answer-control-error){color:var(--theme-error)}
html[data-theme='dark'] body [aria-invalid='true']{border-color:var(--theme-error)}

/* The icon-only switch shares the header utility size and does not add a row. */
.marketplace-theme-toggle{
 display:inline-flex;align-items:center;justify-content:center;flex:none;
 width:44px;height:44px;min-height:44px;margin:0;padding:10px;
 border:0;border-radius:var(--action-radius,2px);background:transparent;
 color:var(--muted,var(--action-blue-ink));font:inherit;cursor:pointer;
}
.marketplace-theme-toggle :is(svg,img){display:block;width:18px;height:18px;flex:none}
.marketplace-theme-toggle:hover{background:var(--action-blue-wash);color:var(--action-blue-ink)}
.marketplace-theme-toggle:focus-visible{outline:2px solid var(--action-blue-ink);outline-offset:3px}
html[data-theme='dark'] body .marketplace-theme-toggle{color:var(--theme-muted)}
html[data-theme='dark'] body .marketplace-theme-toggle:hover{background:var(--theme-raised);color:var(--theme-ink)}
.compose-header>.marketplace-theme-toggle{margin-left:auto}
.compose-header:has(>.marketplace-theme-toggle)>#compose-language{margin-left:0}

/* Adding appearance must not squeeze the existing mobile navigation into a
   third row. The plus retains its full localized accessible Create label. */
@media(max-width:390px){
 .marketplace-header .marketplace-header-primary{width:44px;min-width:44px;padding:0;gap:0;font-size:0}
 .marketplace-header .marketplace-header-primary :is(.marketplace-header-label-full,.marketplace-header-label-compact){display:none}
 .marketplace-header .marketplace-header-primary>img{display:block;width:17px;height:17px}
 .marketplace-header .marketplace-header-primary:not(:has(>img))::before{content:'+';font:400 24px/1 var(--action-font)}
 .marketplace-header-actions{gap:2px}
 .marketplace-header .marketplace-brand{font-size:27px}
}
@media(max-width:620px){
 .campus-header nav{font-size:13px;gap:4px;min-width:0;flex-wrap:wrap;justify-content:flex-end}
 .campus-header{height:auto;min-height:58px}
 .campus-header nav :is(#language,#signout){min-height:44px}
 .compose-header{display:grid;grid-template-columns:minmax(0,1fr) 44px 44px;gap:0 4px;min-height:96px;padding-top:4px}
 .compose-header .wordmark{grid-column:1;grid-row:1}
 .compose-header>nav{grid-column:1/-1;grid-row:2;min-height:44px}
 .compose-header>.marketplace-theme-toggle{grid-column:2;grid-row:1;margin-left:0}
 .compose-header>#compose-language{grid-column:3;grid-row:1;min-width:44px;margin-left:0}
}

@media(forced-colors:active){
 html[data-theme='dark'],html[data-theme='dark'] body{color-scheme:light dark;background:Canvas;color:CanvasText}
 html[data-theme='dark'] body :is(dialog,input,textarea,select,.campus-panel,.campus-card,.login-panel,.message,.response-card){background:Canvas;color:CanvasText;border-color:CanvasText}
 html[data-theme='dark'] body :is(button,a):focus-visible{outline-color:Highlight}
 html[data-theme='dark'] body :is(.primary-button,.create-link,.primary,.secondary-button,.secondary,.answer-option,.starter-field-option,.budget-suggestion button){background:ButtonFace;color:ButtonText;border-color:ButtonText}
 html[data-theme='dark'] body img[src*='assets/'][src$='.svg']{filter:none}
 html[data-theme='dark'] body :is(.semantic-mark,.paragraph-value,.starter-value){background:none;color:CanvasText}
 html[data-theme='dark'] body :is(.semantic-label,.paragraph-label,.starter-label){background:Canvas;color:CanvasText;border:1px solid CanvasText}
}
