/* Optional light appearance. Dark rules remain the default in each component. */
:root[data-theme="light"]{
  color-scheme:light;
  --bg-main:#f5f6f7;--bg-canvas:#edf0f2;--bg-panel:#fff;--bg-panel-raised:#eef0f2;
  --bg-node:#fff;--bg-node-hover:#f4f0ea;--bg-node-header:#f7e5dd;
  --border-muted:#d4d8dd;--border-strong:#64727f;
  --text-main:#18212b;--text-soft:#374350;--text-muted:#455260;
  --accent-active:#196b3d;--accent-changed:#876000;--accent-failed:#a33138;--accent-blocked:#915015;
  --accent-validated:#125a70;--accent-project:#a83e2b;--accent-instruction:#805c00;--accent-routed:#79533d;
  --edge-muted:#64717c;--edge-active:#196b3d;--edge-inferred:#6a6870;--edge-instruction:#805c00;
  --shadow-panel:0 12px 30px #18212b12;
  --bg:var(--bg-main);--panel:var(--bg-panel);--panel-2:var(--bg-panel-raised);--panel-3:#e7ebee;
  --text:var(--text-main);--muted:var(--text-muted);--line:var(--border-muted);
  --ink:#18212b;--paper:#fff;--raised:#eef0f2;--sidebar:#fff;--control:#64727f;--focus:#125a70;--accent:#a83e2b;
}
:root[data-theme="light"] body{background:var(--bg-main);color:var(--text-main)}
:root[data-theme="light"] :focus-visible{outline-color:#125a70}
/* Real workspace surfaces; product illustration and provider marks are not inverted. */
:root[data-theme="light"] :is(.left-sidebar,.right-sidebar,.topbar,.toolbar,.canvas-toolbar,.bottom-dock,.inspector,.workspace-panel,.queue-card,.queue-dialog,.context-menu,.settings-workspace dialog,.graph-list,.graph-list-items>li){background:var(--bg-panel);color:var(--text-main);border-color:var(--border-muted)}
:root[data-theme="light"] :is(.primary-nav button.active,.project-list :is(button,a).active){background:#f8e5df;color:#8e3424}
:root[data-theme="light"] :is(.primary-nav button,.project-list :is(button,a)):hover{background:#e7ebee;color:#18212b}
:root[data-theme="light"] :is(.settings-workspace,.toolbar,.canvas-toolbar,.queue-card-actions,.queue-dialog,.workspace-actions,.graph-list-actions) button{background:#eef0f2;color:#18212b;border-color:#64727f}
:root[data-theme="light"] :is(.settings-workspace,.toolbar,.canvas-toolbar,.queue-card-actions,.queue-dialog,.workspace-actions,.graph-list-actions) button:not(.primary-action):not(.primary):not(.danger):not([data-credit-buy]):not([data-order-confirm]):not(:disabled):hover{background:#dde3e7;color:#18212b;border-color:#59636f}
:root[data-theme="light"] :is(.settings-workspace,.toolbar,.queue-dialog) button.danger{background:#fff0ef;color:#8e2534;border-color:#ad6771}
:root[data-theme="light"] :is(.settings-workspace,.toolbar,.queue-dialog) button.danger:hover:not(:disabled){background:#ffe0de;color:#8e2534;border-color:#8e2534}
:root[data-theme="light"] :is(.settings-workspace,.toolbar,.canvas-toolbar,.queue-card-actions,.queue-dialog,.workspace-actions) button:disabled{background:#e8ebee;color:#616872;border-color:#9aa2ab;box-shadow:none}
:root[data-theme="light"] :is(.settings-workspace,.toolbar,.queue-dialog,.graph-list) :is(input,select,textarea){background:#fff;color:#18212b;border-color:#64727f}
:root[data-theme="light"] :is(.settings-workspace a,.workspace-empty a,.first-value-next .workspace-actions a,#projectHealthLink){color:#125a70}
:root[data-theme="light"] .settings-status{background:var(--bg-main)}
:root[data-theme="light"] .first-value-next p{color:#374350}
:root[data-theme="light"] .loading-overlay{background:#f5f6f7e8}
:root[data-theme="light"] .loading-wordmark{color:#18212b}
:root[data-theme="light"] .edge{stroke:#64717c}
:root[data-theme="light"] .node-header-strip{fill:#f7e5dd}
:root[data-theme="light"] .node-group text{fill:#18212b}
:root[data-theme="light"] .node-row{fill:#edf0f2;stroke:#d4d8dd}
:root[data-theme="light"] :is(.node-group.virtual-node,.node-group.type-project_reference) .node-rect{fill:#edf0f2}
:root[data-theme="light"] .node-rect{stroke:#8a775d;filter:drop-shadow(0 3px 5px #18212b18)}
/* Components mounted independently of the dashboard shell. */
:root[data-theme="light"] [data-credit-panel]{--billing-surface:#fff;--billing-raised:#eef0f2;--billing-ink:#18212b;--billing-soft:#374350;--billing-border:#64727f}
:root[data-theme="light"] [data-credit-panel] :is(button,a.credit-plan-action){box-shadow:inset 0 1px 0 #ffffff70,0 1px 2px #18212b18}
:root[data-theme="light"] [data-credit-panel] button:not(:disabled):hover{background:#dde3e7;color:#18212b}
:root[data-theme="light"] [data-credit-panel] :is([data-credit-buy],[data-order-confirm]):not(:disabled){background:var(--tier-accent,#eb6d56);color:#151618;border-color:#b55443}
:root[data-theme="light"] [data-credit-panel] :is([data-credit-buy],[data-order-confirm]):not(:disabled):hover{background:var(--tier-hover,#f38b77);color:#151618}
:root[data-theme="light"] [data-credit-panel] a{color:#125a70}
:root[data-theme="light"] [data-credit-panel] .credit-plans a.credit-plan-action{color:#151618}
:root[data-theme="light"] [data-credit-panel] a.credit-plan-secondary:hover{background:#dde3e7;color:#18212b}
:root[data-theme="light"] [data-credit-panel] button:disabled{background:#e8ebee;color:#616872;border-color:#9aa2ab;box-shadow:none}
:root[data-theme="light"] .credit-dialog{--cd-surface:#fff;--cd-raised:#eef0f2;--cd-ink:#18212b;--cd-soft:#374350;--cd-focus:#125a70;--cd-border:#64727f}
:root[data-theme="light"] .credit-dialog h2{color:var(--cd-ink)}
:root[data-theme="light"] .credit-dialog a.credit-dialog-primary{color:#151618}
:root[data-theme="light"] .credit-dialog a.credit-dialog-primary:hover{color:#151618}
:root[data-theme="light"] .credit-dialog a.credit-dialog-secondary:hover{background:#dde3e7;color:#18212b}
:root[data-theme="light"] .first-project{background:#fff;color:#18212b;border-color:#64727f}
:root[data-theme="light"] .first-project :is(h2,code){color:#18212b}
:root[data-theme="light"] .first-project p{color:#374350}
:root[data-theme="light"] .first-project :is(input,select,textarea,.fp-endpoint){background:#f5f6f7;color:#18212b;border-color:#64727f}
:root[data-theme="light"] .first-project button{background:#eef0f2;color:#18212b;border-color:#64727f}
:root[data-theme="light"] .first-project button:not(.fp-primary):hover:not(:disabled){background:#dde3e7}
:root[data-theme="light"] .first-project :is(.fp-step,a){color:#125a70}
:root[data-theme="light"] .first-project .fp-primary{background:#eb6d56;color:#151618}
/* Public, account and project-selection shells. */
:root[data-theme="light"] body:is(.story-site,.story-project-picker){--ink:#18212b;--muted:#374350;--line:#d4d8dd;--paper:#fff;--brand:#a83e2b;--brand2:#8e3424;--text:#18212b;--soft:#374350;--panel:#fff;--raised:#eef0f2;--accent:#125a70;background:#f5f6f7;color:#18212b;color-scheme:light}
:root[data-theme="light"] .story-site:not(:has(.bs-story)) :is(h1,h2,h3,h4,strong,.auth-brand):not(:where(.credit-dialog *)){color:#18212b}
:root[data-theme="light"] .story-site:not(:has(.bs-story)) :is(.lede,.muted,.auth-back,.auth-card>.lede,.landing-form label,.legal-page p,.legal-page li){color:#374350}
:root[data-theme="light"] .story-site:not(:has(.bs-story)) :is(.panel,.auth-card,.connect-frontdoor,.connect-now,.connect-setup,.connect-access-card,.connect-help,.connector-permissions,.connect-provider-card,.connect-status-panel,.connect-provider-steps li){background:#fff;border-color:#d4d8dd;color:#18212b}
:root[data-theme="light"] .story-site:not(:has(.bs-story)) :is(input,select,textarea,.landing-form input){background:#fff;color:#18212b;border-color:#64727f}
:root[data-theme="light"] .story-site:not(:has(.bs-story)) a:not(:where(.credit-dialog *)){color:#125a70}
:root[data-theme="light"] .story-site:not(:has(.bs-story)) :is(button.secondary,.copy-command,.provider-signin button:not(.gsi-material-button)){background:#eef0f2;color:#18212b;border-color:#64727f}
:root[data-theme="light"] .story-site:not(:has(.bs-story)) :is(button.secondary,.copy-command,.provider-signin button:not(.gsi-material-button)):hover:not(:disabled){background:#dde3e7;color:#18212b}
:root[data-theme="light"] .story-site:not(:has(.bs-story)) .auth-card button:not(.gsi-material-button):disabled{background:#e8ebee;color:#616872;border-color:#9aa2ab}
:root[data-theme="light"] .story-site :is(.story-shared-brand a,.story-shared-footer a){color:#374350!important}
:root[data-theme="light"] .story-project-picker :is(.proj-card,.project-next-step){background:#fff;border-color:#64727f;color:#18212b}
:root[data-theme="light"] .story-project-picker :is(.project-next-step p,.project-next-note,.proj-meta){color:#374350}
:root[data-theme="light"] .story-site .first-map-panel :is(p,.first-map-prompt){color:#374350}
:root[data-theme="light"] .story-site .first-map-prompt{background:#eef0f2}
:root[data-theme="light"] .cdp-choice :is(p,button){color:#374350}
:root[data-theme="light"] .cdp-choice :is(button,select){background:#eef0f2;color:#18212b;border-color:#64727f}
/* Owner surfaces already use semantic aliases; retain its existing navigation. */
:root[data-theme="light"] .cdp-shell{--bg:#f5f6f7;--panel:#fff;--ink:#18212b;--muted:#374350;--focus:#125a70;--line:#64727f}
:root[data-theme="light"] :is(.cdp-shell,.shell) button:not(.primary):not(:where(.proj-delete)){background:#eef0f2;color:#18212b;border-color:#64727f}
:root[data-theme="light"] :is(.cdp-shell,.shell) button:not(.primary):not(:where(.proj-delete)):hover:not(:disabled){background:#dde3e7}
:root[data-theme="light"] :is(.cdp-shell,.shell) button:disabled{background:#e8ebee;color:#616872;border-color:#9aa2ab}
/* Landing's editable page chrome is light; the labelled product tour stays an illustration. */
:root[data-theme="light"] #product-story{--story-bg:#f5f6f7;--story-surface:#fff;--story-raised:#eef0f2;--story-line:#c8cfd5;--story-text:#18212b;--story-muted:#374350;--story-coral:#a83e2b;--story-cyan:#125a70;background:#f5f6f7;color:#18212b}
:root[data-theme="light"] #product-story :is(.story-lede,.tour-intro p,.story-footer,.story-close p){color:#374350}
:root[data-theme="light"] #product-story .story-button{background:#eb6d56;color:#151618}
:root[data-theme="light"] #product-story .story-button:hover{background:#f38b77;color:#151618}
:root[data-theme="light"] #product-story .story-outline{background:#eef0f2;color:#18212b;border-color:#64727f}
:root[data-theme="light"] #product-story .product-window{--story-bg:#090d10;--story-surface:#12171b;--story-raised:#1b2024;--story-line:#2b3339;--story-text:#f5f3ef;--story-muted:#a9b1b7;--story-coral:#ff826b;--story-cyan:#85d5df;color:#f5f3ef}

/* Graph chrome uses opaque readable surfaces in light appearance. */
:root[data-theme="light"] :is(.drawer-tabs,.graph-legend,.minimap-field){background:#fff;color:#374350;border-color:#64727f;box-shadow:0 3px 10px #18212b12}
:root[data-theme="light"] .drawer-tabs strong{color:#18212b}
:root[data-theme="light"] .mini-node{background:#64717c}
:root[data-theme="light"] .mini-node.anchor{background:#a83e2b}
:root[data-theme="light"] .mini-node.status-active{background:#125a70}
:root[data-theme="light"] .mini-node.status-changed{background:#876000}
:root[data-theme="light"] .mini-node.status-failed{background:#a33138}
:root[data-theme="light"] .mini-node.status-validated{background:#196b3d}
:root[data-theme="light"] .mini-viewport{border-color:#125a70;background:#125a7010;box-shadow:none}

/* Light-only component roles: pale Dark accents are fills, not text on white. */
:root[data-theme="light"] .story-project-picker{--ready:#21623c}
:root[data-theme="light"] .story-project-picker .eyebrow{color:#923b29}
:root[data-theme="light"] .story-project-picker .proj-status{color:#374350;border-color:#64727f;background:#eef0f2}
:root[data-theme="light"] .story-project-picker .proj-status.is-ready{color:#21623c;border-color:#4b7f5f;background:#edf7f0}
:root[data-theme="light"] .story-project-picker :is(.project-next-actions a,.project-next-step>a,.proj-open,.proj-connect){color:#125a70}
:root[data-theme="light"] .story-project-picker .project-next-actions a:not(.project-next-primary){text-decoration:underline;text-underline-offset:3px}
:root[data-theme="light"] .story-project-picker .project-next-actions .project-next-primary{color:#151618}
:root[data-theme="light"] .story-project-picker .proj-delete:hover{background:#ffe0de;color:#8e2534;border-color:#8e2534}
:root[data-theme="light"] .story-project-picker .dialog-actions button.danger{background:#8e2534;color:#fff;border-color:#8e2534}
:root[data-theme="light"] .story-project-picker .dialog-actions button.danger:hover{background:#751e2c;color:#fff}
:root[data-theme="light"] .story-project-picker :is(.delete-error,#projectDeleteDialogStatus){color:#8e2534}
:root[data-theme="light"] [data-credit-tier] .credit-tier-mark{color:#455260;border-color:#64727f}
:root[data-theme="light"] [data-credit-tier="basic"] .credit-tier-mark{color:#923b29;border-color:#923b29}
:root[data-theme="light"] [data-credit-tier="pro"] .credit-tier-mark{color:#125a70;border-color:#125a70}
:root[data-theme="light"] .cdp-shell nav button[aria-current="page"]{background:#e1edf1;color:#18212b;border-color:#125a70}
:root[data-theme="light"] .graph-legend .entry{background:#876000}
:root[data-theme="light"] .graph-legend .core{background:#a83e2b}
:root[data-theme="light"] .graph-legend .support{background:#79533d}
:root[data-theme="light"] .graph-legend .external{background:#805c00}
:root[data-theme="light"] .graph-legend .config{background:#196b3d}
:root[data-theme="light"] :is(.story-site,.story-project-picker,.first-project,[data-credit-panel],.cdp-shell,.app-shell) :is(button,a,input,select,textarea,summary):not(.gsi-material-button):focus-visible{outline-color:#125a70}

/* Comfortable chooser reading sizes; retain the same single-column layout. */
:root[data-theme="light"] body.story-project-picker{background:#e9edf1;font-size:16px;line-height:1.6}
:root[data-theme="light"] .story-project-picker .eyebrow{font-size:13px;font-weight:650;line-height:1.5;letter-spacing:.04em}
:root[data-theme="light"] .story-project-picker :is(.proj-card,.project-next-step,.first-project){background:#fff;box-shadow:0 2px 6px #18212b12}
:root[data-theme="light"] .story-project-picker .proj-card{gap:10px}
:root[data-theme="light"] .story-project-picker :is(.proj-card-link,.proj-card-copy){gap:10px}
:root[data-theme="light"] .story-project-picker .proj-head strong{font-size:19px;line-height:1.4;font-weight:700;letter-spacing:0}
:root[data-theme="light"] .story-project-picker :is(.proj-status,.proj-types i,.proj-open){font-family:inherit;letter-spacing:0}
:root[data-theme="light"] .story-project-picker :is(.proj-status,.proj-types i){font-size:13px;font-weight:600;line-height:1.5}
:root[data-theme="light"] .story-project-picker :is(.proj-meta,.project-next-note,.back){font-size:16px;line-height:1.6}
:root[data-theme="light"] .story-project-picker :is(.proj-open,.proj-connect,.project-next-actions a,.project-next-step>a){font-size:16px;font-weight:600;line-height:1.5}
:root[data-theme="light"] .story-project-picker .proj-open{margin-top:2px}
:root[data-theme="light"] .story-project-picker .first-project :is(button,a){font-size:16px}

:root[data-theme="light"] .story-project-picker :is(.proj-meta,.project-next-note,.back){font-weight:500}
:root[data-theme="light"] .settings-content>p,:root[data-theme="light"] [data-credit-panel] p{font-size:16px;font-weight:500;line-height:1.6}
:root[data-theme="light"] .settings-content>label{font-size:16px;font-weight:500}
:root[data-theme="light"] .settings-workspace button,:root[data-theme="light"] [data-credit-panel] :is(button,.credit-plan-action){font-size:16px}
:root[data-theme="light"] [data-credit-panel] .credit-overview p:first-child{font-size:14px}
:root[data-theme="light"] .credit-dialog p{font-size:16px;font-weight:500;line-height:1.6}
:root[data-theme="light"] .credit-dialog :is(button,a){font-size:16px}
:root[data-theme="light"] .credit-dialog dt,:root[data-theme="light"] .credit-dialog #credit-dialog-reassurance{font-size:14px;font-weight:500;line-height:1.5}

/* Light action finish: clear hierarchy, restrained depth and comfortable corners. */
:root[data-theme="light"] :is(.first-project,.settings-workspace,[data-credit-panel],.cdp-shell) button,
:root[data-theme="light"] :is(.credit-plan-action,.credit-dialog-action,.project-next-primary){border-radius:10px;box-shadow:inset 0 1px 0 #ffffff66,0 2px 3px #18212b14;font-weight:650;transition:background-color 140ms,border-color 140ms,box-shadow 140ms}
:root[data-theme="light"] :is(.first-project,.settings-workspace,[data-credit-panel]) button:not(:where(.fp-primary,.primary,.primary-action,.danger,[data-credit-buy],[data-order-confirm],.fp-quiet)){background:#fff;border-color:#758593;color:#18212b}
:root[data-theme="light"] :is(.first-project,.settings-workspace,[data-credit-panel]) button:not(:where(.fp-primary,.primary,.primary-action,.danger,[data-credit-buy],[data-order-confirm],.fp-quiet)):hover:not(:disabled){background:#edf3f5;border-color:#526777;box-shadow:inset 0 1px 0 #fff,0 3px 6px #18212b1c}
:root[data-theme="light"] body.story-project-picker .first-project .fp-primary:not(:disabled),
:root[data-theme="light"] .first-project :is(button,a).fp-primary:not(:disabled){background:#eb6d56;color:#151618;border:1px solid #a94732;border-radius:10px;box-shadow:inset 0 1px 0 #ffffff66,0 3px 5px #8e342426;font-weight:650;padding:11px 18px}
:root[data-theme="light"] body.story-project-picker .first-project .fp-primary:hover:not(:disabled),
:root[data-theme="light"] .first-project :is(button,a).fp-primary:hover:not(:disabled){background:#f1846e;color:#151618;border-color:#923b29;box-shadow:inset 0 1px 0 #ffffff80,0 4px 8px #8e34242b}
:root[data-theme="light"] .story-project-picker .project-record .project-next-actions{gap:10px}
:root[data-theme="light"] .story-project-picker .project-record .project-next-actions a{padding:10px 14px;border:1px solid #758593;border-radius:10px;background:#fff;color:#125a70;text-decoration:none;box-shadow:inset 0 1px 0 #fff,0 1px 2px #18212b12;transition:background-color 140ms,border-color 140ms,box-shadow 140ms}
:root[data-theme="light"] .story-project-picker .project-record .project-next-actions a+a{background:#eef3f6;border-color:transparent;box-shadow:none}
:root[data-theme="light"] .story-project-picker .project-record .project-next-actions a:hover{background:#e1edf1;border-color:#526777;color:#125a70;box-shadow:0 2px 4px #18212b16}
:root[data-theme="light"] .story-project-picker .proj-delete{font-size:20px;line-height:1;border-radius:10px;background:#f3f5f7;border-color:#758593;box-shadow:inset 0 1px 0 #fff}
:root[data-theme="light"] .story-project-picker .proj-delete:hover{background:#ffe0de;border-color:#8e2534;color:#8e2534}
:root[data-theme="light"] [data-credit-panel] :is([data-credit-buy],[data-order-confirm]),
:root[data-theme="light"] .credit-dialog a.credit-dialog-primary{border-color:#a94732;box-shadow:inset 0 1px 0 #ffffff66,0 3px 5px #8e342426}
:root[data-theme="light"] [data-credit-panel] [data-credit-tier="pro"] [data-credit-buy]{border-color:#31758a;box-shadow:inset 0 1px 0 #ffffff66,0 3px 5px #125a7026}
:root[data-theme="light"] .credit-dialog a.credit-dialog-secondary{background:#fff;border-color:#758593}
:root[data-theme="light"] :is(.first-project,.settings-workspace,[data-credit-panel],.cdp-shell) button:active:not(:disabled),
:root[data-theme="light"] :is(.credit-plan-action,.credit-dialog-action,.project-next-actions a):active{box-shadow:inset 0 2px 3px #18212b24;transform:none}
:root[data-theme="light"] :is(.first-project,.settings-workspace,[data-credit-panel],.cdp-shell) button:disabled{background:#e8ebee;color:#616872;border-color:#9aa2ab;box-shadow:none}
@media(prefers-reduced-motion:reduce){:root[data-theme="light"] :is(button,.credit-plan-action,.credit-dialog-action,.project-next-actions a){transition:none}}

:root[data-theme="light"] .story-project-picker .proj-delete:focus-visible{color:#8e2534;background:#fff0ef;border-color:#8e2534;outline-color:#8e2534}

/* The delete action belongs to the header, with a quiet surface inside its hit target. */
:root[data-theme="light"] .story-project-picker .project-record{padding:16px 18px}
:root[data-theme="light"] .story-project-picker .project-record .proj-head{min-height:44px;padding-right:56px;justify-content:flex-start;align-items:center;gap:10px}
:root[data-theme="light"] .story-project-picker .project-record .proj-head strong{flex:0 1 auto}
:root[data-theme="light"] .story-project-picker .proj-delete{top:16px;right:14px;width:44px;height:44px;border:0;background:transparent;box-shadow:none;color:#455260;border-radius:10px;isolation:isolate}
:root[data-theme="light"] .story-project-picker .proj-delete::before{content:"";position:absolute;inset:6px;border-radius:8px;background:transparent;z-index:-1}
:root[data-theme="light"] .story-project-picker .proj-delete svg{width:20px;height:20px}
:root[data-theme="light"] .story-project-picker .proj-delete:is(:hover,:focus-visible){background:transparent;border:0;box-shadow:none;color:#8e2534}
:root[data-theme="light"] .story-project-picker .proj-delete:is(:hover,:focus-visible)::before{background:#fbe9e8}
