/* Shared, opt-in skin for Work and eSocial homolog. Layout/domain controls stay intact. */
html[data-liquid-theme] {
  color-scheme: light;
  --lg-bg:#c8d4e0; --lg-bg-end:#d3dee7;
  --lg-text:#102e57; --lg-heading:#092957; --lg-muted:#496383; --lg-link:#0066b0;
  --lg-glass:linear-gradient(135deg,#f8fcffe0,#e9f2fac7);
  --lg-soft:linear-gradient(135deg,#ffffffa8,#f0f6fc7d);
  --lg-solid:#eff5fa; --lg-field:#ffffffc7; --lg-hover:#ffffffdf;
  --lg-rim:#ffffffed; --lg-line:#a9bed477; --lg-highlight:#ffffffed;
  --lg-shadow:0 10px 26px #2e49661b; --lg-button-shadow:0 2px 7px #203f5c16;
  --lg-modal:linear-gradient(145deg,#f4fafff5,#e5eff8ed); --lg-backdrop:#293f5638;
  --lg-active:linear-gradient(115deg,#a7e7f28f,#d2ebffc9); --lg-active-text:#005584;
  --lg-primary:linear-gradient(135deg,#029cc0,#0069bd); --lg-primary-rim:#008fc7;
  --lg-ok:#087755; --lg-ok-bg:#dff3e9; --lg-bad:#b52c42; --lg-bad-bg:#ffebef;
  --lg-warn:#865709; --lg-warn-bg:#fff0d3; --lg-info:#0064ac; --lg-info-bg:#deefff;
  --lg-focus:#0085c6;
  --navy:var(--lg-heading); --ink:var(--lg-text); --muted:var(--lg-muted); --blue:var(--lg-link);
  --bg:var(--lg-bg); --paper:var(--lg-solid); --line:var(--lg-line); --shadow:var(--lg-shadow);
  --danger:var(--lg-bad); --warn:var(--lg-warn); --ok:var(--lg-ok); --teal:#008d8e;
}
html[data-liquid-theme="pearl"] {
  --lg-bg:#eeeeec; --lg-bg-end:#f6f6f4; --lg-text:#19344e; --lg-heading:#0b2a4e; --lg-muted:#536779;
  --lg-glass:linear-gradient(135deg,#fffffff0,#f9faf9bd); --lg-soft:linear-gradient(135deg,#ffffffc9,#f9faf9a3);
  --lg-solid:#f9faf9; --lg-field:#ffffffe3; --lg-hover:#fff; --lg-line:#b9c8d16b;
  --lg-shadow:0 10px 26px #253a4912; --lg-button-shadow:0 2px 7px #34444f0d;
  --lg-modal:linear-gradient(145deg,#fffffff5,#f4f6f7f0); --lg-backdrop:#5b6c7b30;
}
html[data-liquid-theme="graphite"] {
  color-scheme:dark;
  --lg-bg:#191e26; --lg-bg-end:#202732; --lg-text:#e1ebf5; --lg-heading:#f5f8fc; --lg-muted:#b0c2d5; --lg-link:#79c8ff;
  --lg-glass:linear-gradient(135deg,#333f50de,#25303ee8); --lg-soft:linear-gradient(135deg,#354355b0,#26313f9c);
  --lg-solid:#293443; --lg-field:#152231ba; --lg-hover:#3b4d60;
  --lg-rim:#a7c7e35e; --lg-line:#9eb6cf33; --lg-highlight:#d8edff7d;
  --lg-shadow:0 10px 30px #00000035; --lg-button-shadow:0 2px 8px #00000024;
  --lg-modal:linear-gradient(145deg,#354254f5,#263241f5); --lg-backdrop:#060c1459;
  --lg-active:linear-gradient(115deg,#00578499,#16415d9c); --lg-active-text:#b8e8ff;
  --lg-primary:linear-gradient(135deg,#008eae,#0073d3); --lg-primary-rim:#34bff8;
  --lg-ok:#99edc9; --lg-ok-bg:#1d493d; --lg-bad:#ffb9c2; --lg-bad-bg:#562e38;
  --lg-warn:#f8d68c; --lg-warn-bg:#4a3e25; --lg-info:#98d8ff; --lg-info-bg:#1d405c;
  --lg-focus:#70d7ff; --teal:#6cd3c9;
}
html[data-liquid-theme] body {
  color:var(--lg-text); background:linear-gradient(150deg,var(--lg-bg),var(--lg-bg-end)); background-attachment:fixed;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
}
html[data-liquid-theme] body::before { display:none; }
html[data-liquid-theme] body::after { border-color:var(--lg-rim); box-shadow:inset 0 1px 0 var(--lg-highlight); }
html[data-liquid-theme] :is(h1,h2,h3,h4) { color:var(--lg-heading); }
html[data-liquid-theme] :is(a,.brand h1 span,.brand strong span) { color:var(--lg-link); }
html[data-liquid-theme] :is(.brand h1,.brand strong,.content .hero h2,.page-head h1) { color:var(--lg-heading); }
html[data-liquid-theme] :is(.brand small,.muted,small,.eyebrow,.work-eyebrow,.page-head p,.content .hero p,.side-head small,.side-head strong,.side .nav-label,.side-foot small,.work-side-footer small) { color:var(--lg-muted); }
/* Optical edge highlights sit on translucent surfaces; no decorative wallpaper. */
html[data-liquid-theme] :is(body>header,.top,.shell>aside,.side) {
  background:var(--lg-glass); border:1px solid var(--lg-rim); box-shadow:inset 0 1px 0 var(--lg-highlight),var(--lg-shadow);
  -webkit-backdrop-filter:blur(22px) saturate(125%); backdrop-filter:blur(22px) saturate(125%);
}
html[data-liquid-theme] :is(.top,body>header) { border-radius:24px; }
html[data-liquid-theme] :is(.shell>aside,.side) { border-radius:20px; }
html[data-liquid-theme] .shell { margin-top:12px; }
html[data-liquid-theme] :is(.side-head,.content>.hero) { background:transparent; }
html[data-liquid-theme] :is(.side .nav button,nav button) { color:var(--lg-text); }
html[data-liquid-theme] :is(.side .nav button:hover,nav button:hover) { background:var(--lg-soft); }
html[data-liquid-theme] :is(.side .nav button.active,nav button.active) {
  background:var(--lg-active); color:var(--lg-active-text); border-radius:12px;
  box-shadow:inset 3px 0 #00bddd,inset 0 1px 0 var(--lg-highlight),var(--lg-button-shadow);
}
html[data-liquid-theme] :is(.nav-icon,.side .nav .work-nav-icon,.side .nav button svg,.work-nav-icon svg) { color:var(--lg-link); }
html[data-liquid-theme] :is(.side-foot,.work-side-footer) { border-color:var(--lg-line); }
html[data-liquid-theme] :is(.side a,.work-side-footer a,.side-foot a) { color:var(--lg-link); }
html[data-liquid-theme] :is(.panel,.card,.kpi,.quick,.table-wrap,.compact-list-wrap,.filters,.work-project-section,.day-column,.provider-admin-card,.oauth-card,.jarvis-steps>div,.calendar-option) {
  background:var(--lg-glass); border:1px solid var(--lg-rim); border-radius:18px;
  box-shadow:inset 0 1px 0 var(--lg-highlight),inset 0 -1px 0 var(--lg-rim),var(--lg-shadow);
}
html[data-liquid-theme] .content .filters { padding:12px; }
html[data-liquid-theme] :is(.panel-head,.dialog-head,.day-head,.tabs,.card-foot,.work-project-section>.activity-project-heading) {
  background:transparent; border-color:var(--lg-line); color:var(--lg-heading);
}
html[data-liquid-theme] :is(.content .panel-head h2,.content .panel-head h3,.content .card h3,.content .kpi strong,.steps strong,.work-project-section h3,.timeline strong,.activity-title strong,.content .work-item strong) { color:var(--lg-heading); }
html[data-liquid-theme] :is(.content .card p,.content .kpi>span,.kpi small,.content .work-item small,.activity-title small,.timeline small) { color:var(--lg-muted); }
html[data-liquid-theme] :is(.work-item,.activity-node,.content .empty,.empty,.summary>div,.agenda-entry,.provider-choice,.runtime-separation>div,.search-item:hover,.attachment-chip,.ai-link-card) {
  background:var(--lg-soft); border-color:var(--lg-line); color:var(--lg-text);
}
html[data-liquid-theme] :is(.work-item:hover,.card:hover) { background:var(--lg-hover); border-color:var(--lg-rim); }
html[data-liquid-theme] :is(table,tbody,tr,td) { background:transparent; color:var(--lg-text); }
html[data-liquid-theme] :is(th,.compact-list th) { background:var(--lg-soft); color:var(--lg-muted); border-color:var(--lg-line); }
html[data-liquid-theme] :is(td,th,.compact-list td) { border-color:var(--lg-line); }
html[data-liquid-theme] :is(tbody tr:hover,.compact-list tbody tr:hover) { background:var(--lg-soft); }
html[data-liquid-theme] :is(td strong,.compact-list td strong) { color:var(--lg-heading); }
html[data-liquid-theme] :is(.btn,.content .btn,.top .btn,.header-actions .btn,.work-menu-toggle,.activity-expand,.lg-trigger,.lg-close) {
  color:var(--lg-text); background:var(--lg-soft); border:1px solid var(--lg-rim); border-radius:11px;
  box-shadow:inset 0 1px 0 var(--lg-highlight),var(--lg-button-shadow); font-weight:500;
}
html[data-liquid-theme] :is(.btn:hover,.content .btn:hover,.lg-trigger:hover,.lg-close:hover) { background:var(--lg-hover); border-color:var(--lg-highlight); }
html[data-liquid-theme] :is(.btn.primary,.content .btn.primary,.content .hero-row>.btn,.lg-done) {
  background:var(--lg-primary); color:white; border:1px solid var(--lg-primary-rim);
  box-shadow:inset 0 1px 0 #a6f4ff70,0 3px 9px #007eb52b;
}
html[data-liquid-theme] :is(.btn.primary:hover,.content .hero-row>.btn:hover,.lg-done:hover) { filter:brightness(1.09); }
html[data-liquid-theme] :is(.btn.success,.content .btn.success) { color:var(--lg-ok); background:var(--lg-ok-bg); border-color:var(--lg-line); }
html[data-liquid-theme] :is(.btn.danger,.content .btn.danger) { color:var(--lg-bad); border-color:var(--lg-line); }
html[data-liquid-theme] :is(button:disabled,input:disabled,select:disabled) { opacity:.55; }
html[data-liquid-theme] :is(input,select,textarea,.search input,.field input,.field select,.field textarea,.filters input,.filters select,.check) {
  background:var(--lg-field); color:var(--lg-text); border-color:var(--lg-line); border-radius:10px;
  box-shadow:inset 0 1px 1px #00000006;
}
html[data-liquid-theme] :is(input,select,textarea)::placeholder { color:var(--lg-muted); opacity:1; }
html[data-liquid-theme] :is(select option,select optgroup) { background:var(--lg-solid); color:var(--lg-text); }
html[data-liquid-theme] :is(input[type=checkbox],input[type=radio]) { accent-color:var(--lg-link); box-shadow:none; }
html[data-liquid-theme] :is(input[type=file],.xml) { background:var(--lg-field); color:var(--lg-text); }
html[data-liquid-theme] :is(button,a,input,select,textarea,summary):focus-visible { outline:3px solid var(--lg-focus); outline-offset:3px; }
html[data-liquid-theme] :is(.badge,.content .badge,.work-environment,.environment) { color:var(--lg-info); background:var(--lg-info-bg); border-color:var(--lg-rim); }
html[data-liquid-theme] :is(.badge.green,.badge.done,.content .badge.done) { color:var(--lg-ok); background:var(--lg-ok-bg); }
html[data-liquid-theme] :is(.badge.red,.badge.overdue,.badge.urgent,.content .badge.overdue,.content .badge.urgent) { color:var(--lg-bad); background:var(--lg-bad-bg); }
html[data-liquid-theme] :is(.badge.amber,.badge.waiting,.notice) { color:var(--lg-warn); background:var(--lg-warn-bg); border-color:var(--lg-line); }
html[data-liquid-theme] :is(.green,.kpi strong.green) { color:var(--lg-ok); }
html[data-liquid-theme] :is(.red,.error,.kpi strong.red,.content .kpi.work-overdue.has-items strong) { color:var(--lg-bad); }
html[data-liquid-theme] :is(.amber,.kpi strong.amber) { color:var(--lg-warn); }
html[data-liquid-theme] :is(.work-metric-icon,.provider-mark,.jarvis-steps b) { color:var(--lg-info); background:var(--lg-info-bg); }
html[data-liquid-theme] .work-overdue .work-metric-icon { color:var(--lg-bad); background:var(--lg-bad-bg); }
html[data-liquid-theme] :is(.panel.hero,.productivity-next,.prompt-active-note) { color:var(--lg-text); background:var(--lg-soft); border-color:var(--lg-line); border-left-color:var(--teal); }
html[data-liquid-theme] :is(.hero small,.hero p,.privacy-note,.pagination) { color:var(--lg-muted); }
html[data-liquid-theme] #projectDetail :is(.summary>div,.work-project-section,.work-project-section .activity-node) { color:var(--lg-text); background:var(--lg-soft); border-color:var(--lg-line); }
html[data-liquid-theme] #projectDetail :is(.summary strong,.work-project-section h3,.productivity-next h3,.detail-hero h2) { color:var(--lg-heading); }
html[data-liquid-theme] #projectDetail :is(small,.summary span,.tabs button) { color:var(--lg-muted); }
html[data-liquid-theme] #projectDetail .tabs button.active { color:var(--lg-link); border-color:var(--lg-link); }
html[data-liquid-theme] #projectDetail .productivity-next { background:var(--lg-soft); border-color:var(--lg-line); border-left-color:var(--teal); }
/* Dialogs share the theme, including the existing project editor and Jarvis. */
html[data-liquid-theme] :is(dialog,.dialog,.productivity-dialog,.ai-link-dialog,.jarvis-experience,.work-project-history) {
  color:var(--lg-text); background:var(--lg-modal); border:1px solid var(--lg-highlight); border-radius:24px;
  box-shadow:inset 0 1px 2px var(--lg-highlight),inset 0 -1px 0 var(--lg-rim),0 22px 70px #0b1a3040;
  -webkit-backdrop-filter:blur(24px); backdrop-filter:blur(24px);
}
html[data-liquid-theme] .modal { background:var(--lg-backdrop); -webkit-backdrop-filter:blur(5px); backdrop-filter:blur(5px); }
html[data-liquid-theme] dialog::backdrop { background:var(--lg-backdrop); -webkit-backdrop-filter:blur(5px); backdrop-filter:blur(5px); }
html[data-liquid-theme] :is(.search-results,.work-history-options,.jarvis-local-menu) { color:var(--lg-text); background:var(--lg-solid); border-color:var(--lg-rim); }
html[data-liquid-theme] :is(.jarvis-chat-message,.jarvis-chat-message.user,.jarvis-result,.jarvis-file-tray,.jarvis-composer,.jarvis-bottom,.jarvis-panel-head,.jarvis-message,.jarvis-test-result,.calendar-option,.ai-link-row,.ai-link-form input,.ai-link-form select) { color:var(--lg-text); background:var(--lg-soft); border-color:var(--lg-line); }
html[data-liquid-theme] :is(.jarvis-title h2,.jarvis-result h3,.jarvis-welcome h3,.ai-link-title,.ai-link-row h3) { color:var(--lg-heading); }
html[data-liquid-theme] :is(.jarvis-state,.jarvis-context,.jarvis-input-note,.jarvis-welcome p,.jarvis-result small,.jarvis-listening-label,.jarvis-entity-meta) { color:var(--lg-muted); }
html[data-liquid-theme] :is(.jarvis-result strong,.jarvis-attach) { color:var(--lg-link); }
html[data-liquid-theme] .jarvis-composer textarea { background:transparent; color:var(--lg-text); }
html[data-liquid-theme] .jarvis-mic { background:var(--lg-info-bg); color:var(--lg-info); }
html[data-liquid-theme] .jarvis-mic[aria-pressed=true] { background:var(--lg-ok-bg); color:var(--lg-ok); }
/* Appearance control: native dialog and radios support keyboard and touch. */
html[data-liquid-theme] .lg-trigger { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:42px; padding:8px 13px; cursor:pointer; font-family:inherit; font-size:12px; line-height:1.3; white-space:nowrap; flex-shrink:0; }
.lg-trigger svg { width:19px; height:19px; flex-shrink:0; }
html[data-liquid-theme] .lg-settings { width:min(580px,calc(100vw - 28px)); max-height:calc(100dvh - 32px); margin:auto; padding:25px; overflow:auto; }
.lg-settings-head { display:flex; gap:16px; align-items:center; justify-content:space-between; }
.lg-settings-head small { font-size:10px; letter-spacing:1px; }
.lg-settings-head h2 { margin:6px 0 0; font-size:23px; letter-spacing:-.6px; }
html[data-liquid-theme] .lg-close { width:38px; height:38px; font-size:24px; cursor:pointer; flex-shrink:0; }
.lg-intro { font-size:13px; line-height:1.6; margin:18px 0; color:var(--lg-muted); }
.lg-options { border:0; padding:0; margin:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.lg-options legend { padding:0; margin-bottom:12px; font-size:12px; font-weight:600; }
.lg-option { position:relative; cursor:pointer; display:flex; flex-direction:column; min-width:0; border:1px solid var(--lg-line); border-radius:15px; padding:10px; background:var(--lg-soft); }
.lg-option:has(input:checked) { border-color:var(--lg-focus); box-shadow:0 0 0 2px var(--lg-focus); }
html[data-liquid-theme] .lg-option input { position:absolute; top:17px; right:17px; z-index:1; width:16px; height:16px; margin:0; }
.lg-option:focus-within { outline:2px solid var(--lg-focus); outline-offset:5px; }
.lg-swatch { display:block; height:78px; border-radius:8px; position:relative; overflow:hidden; margin-bottom:10px; border:1px solid #ffffff7d; }
.lg-swatch-pearl { background:#efefec; --swatch:#ffffffc9; }
.lg-swatch-slate { background:#bccddc; --swatch:#eef6ffb3; }
.lg-swatch-graphite { background:#191e26; --swatch:#43566b9c; }
.lg-swatch :is(i,b,em) { position:absolute; background:var(--swatch); border:1px solid #ffffff78; box-shadow:0 2px 5px #0b1e351a; border-radius:5px; }
.lg-swatch i { inset:10px auto 10px 8px; width:21%; }.lg-swatch b { inset:10px 8px auto 34%; height:17px; }.lg-swatch em { inset:34px 8px 10px 34%; }
.lg-option-name { font-size:13px; font-weight:650; margin-bottom:5px; }
.lg-option-note { font-size:11px; color:var(--lg-muted); line-height:1.4; }
.lg-save-note { margin:18px 0 0; font-size:12px; color:var(--lg-muted); }
.lg-settings-footer { display:flex; justify-content:flex-end; margin-top:20px; }
.lg-done { padding:10px 22px; border-radius:11px; min-height:42px; cursor:pointer; font:inherit; }
@media(max-width:1150px) { .lg-trigger span { display:none; } html[data-liquid-theme] .lg-trigger { width:42px; padding:9px; } }
@media(max-width:760px) {
  html[data-liquid-module="work"] .top { grid-template-columns:minmax(0,1fr) 42px; }
  html[data-liquid-module="work"] .lg-trigger { grid-column:2; grid-row:1; }
  html[data-liquid-module="work"] .work-environment { display:none; }
  html[data-liquid-theme] .shell { margin-top:8px; }
  html[data-liquid-theme] :is(.side,.shell>aside) { background:var(--lg-solid); }
  html[data-liquid-theme] .side.work-open { z-index:55; }
  html[data-liquid-theme] :is(.dialog,dialog) { border-radius:19px; }
  html[data-liquid-theme] :is(.field input,.field select,.field textarea) { font-size:16px; }
  html[data-liquid-theme] .lg-settings { padding:20px; }
  .lg-options { gap:9px; }.lg-option { padding:8px; }.lg-option-name { font-size:12px; }.lg-option-note { font-size:10px; }
  .lg-settings-head h2 { font-size:21px; }
}
@media(max-width:360px) { .lg-options { grid-template-columns:1fr; }.lg-option { display:grid; grid-template-columns:90px 1fr; column-gap:12px; }.lg-swatch { grid-row:span 2; margin:0; height:60px; }.lg-option input { left:16px; top:15px; }.lg-option-name { align-self:end; } }
@media(prefers-reduced-transparency:reduce) {
  html[data-liquid-theme] :is(.panel,.card,.kpi,.filters,.table-wrap,.compact-list-wrap,.side,.shell>aside,.top,body>header,dialog,.dialog,.jarvis-experience) { background:var(--lg-solid); -webkit-backdrop-filter:none; backdrop-filter:none; }
}
@media(forced-colors:active) { .lg-option:has(input:checked) { outline:3px solid Highlight; }.lg-swatch { forced-color-adjust:none; } }
@media print { .lg-trigger,.lg-settings { display:none!important; } html[data-liquid-theme] body { background:#fff; color:#000; } }
/* Form labels and secondary editors must keep contrast in all three themes. */
html[data-liquid-theme] :is(.field label,.ai-link-fields label,.ai-link-meta,.ai-link-fields small) { color:var(--lg-muted); }
html[data-liquid-theme] :is(.ai-link-info>strong,.ai-link-dialog header h3) { color:var(--lg-heading); }
html[data-liquid-theme] :is(.ai-link-dialog header,.ai-link-dialog footer) { background:transparent; border-color:var(--lg-line); }
html[data-liquid-theme] .ai-link-remove { color:var(--lg-bad)!important; }
html[data-liquid-theme] .filters label.check { background:transparent; box-shadow:none; }
html[data-liquid-theme] thead { background:var(--lg-soft); }
html[data-liquid-theme] :is(th,.compact-list th) { background:transparent; }
html[data-liquid-theme="graphite"] :is(.dialog,dialog) {
  border-color:#c3dfffa3;
  box-shadow:inset 0 1px 2px #e0f1ff99,inset 0 -1px 1px #b0d2f25c,0 0 3px #d1e8ff38,0 22px 70px #00000059;
}
html[data-liquid-theme="graphite"] :is(.dialog,dialog) :is(input,select,textarea) { border-color:#b0cbea69; }
/* Existing art has a white substrate: reverse luminance and screen it on dark glass. */
html[data-liquid-theme="graphite"] .jarvis-orb-stage canvas { mix-blend-mode:screen; filter:invert(1) hue-rotate(180deg) saturate(1.25); }
/* Work's single-column breakpoint and navigation drawer use the same threshold. */
@media(max-width:1100px) {
  html[data-liquid-module="work"] .work-menu-toggle { display:grid; place-items:center; width:36px; height:38px; padding:0; font-size:22px; flex-shrink:0; }
  html[data-liquid-module="work"] .side { display:none; position:fixed; top:calc(var(--work-header) + 8px); left:8px; bottom:8px; width:258px; height:calc(100dvh - var(--work-header) - 16px); background:var(--lg-solid); z-index:55; }
  html[data-liquid-module="work"] .side.work-open { display:block; }
  html[data-liquid-module="work"] .work-nav-backdrop.work-open { display:block; position:fixed; inset:calc(var(--work-header) + 8px) 0 0; border:0; background:var(--lg-backdrop); z-index:44; }
  html[data-liquid-module="work"] .top-actions>.btn,html[data-liquid-module="work"] .work-environment { display:none; }
}
html[data-liquid-theme] { background:var(--lg-bg); }
html[data-liquid-theme] #projectDetail .productivity-next p { color:var(--lg-muted); }
html[data-liquid-theme] .day-column.today .day-head { color:var(--lg-link); background:var(--lg-info-bg); }
html[data-liquid-theme] :is(.history-record,.activity-inline-edit,.meeting-action-row) { color:var(--lg-text); background:var(--lg-soft); border-color:var(--lg-line); }
html[data-liquid-theme] .dialog-head { background:var(--lg-modal); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); }
