/* Shared, intentional surfaces. Component owners use these tokens for new UI. */
:root{--canvas:#f5f6fa;--surface:#ffffff;--surface-raised:#ffffff;--surface-muted:#eceef5;--ink:#202331;--muted:#616879;--line:#dce0eb;--accent:#5253b8;--accent-ink:#ffffff;--media-bg:#11131d;--danger:#ad3e4c;--success:#3b6d75;--warning:#9b6b26;--cream:#eceef5;--white:var(--surface);color-scheme:light}
:root[data-theme=dark]{--canvas:#11131b;--surface:#1a1d29;--surface-raised:#242838;--surface-muted:#202433;--ink:#eceef7;--muted:#b3b9cd;--line:#353b50;--accent:#a5a8ff;--accent-ink:#15172d;--cream:#242838;--white:var(--surface);--media-bg:#090b12;--danger:#f29286;--success:#8ecad0;--warning:#e7c27c;color-scheme:dark;background:var(--canvas)}
html,body{background:var(--canvas);color:var(--ink)}
[data-theme=dark] :is(.sidebar,.auth-main,.topbar){background:var(--canvas);border-color:var(--line)}
[data-theme=dark] :is(.panel,.integration-card,.content-card,.vault-card,.modal,.modal-head,.modal-body,.evidence-card,.check-row,.upload-drop,.card,.dropdown,.popover){background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(input,select,textarea,.btn){background:var(--surface-raised);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(input,textarea)::placeholder{color:var(--fg-3)}
[data-theme=dark] :is(.btn.primary,.btn.accent){background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
[data-theme=dark] .btn.ghost{background:transparent;color:var(--muted)}
[data-theme=dark] .btn.danger{background:var(--bg-2);border-color:var(--edge-solid);color:var(--bad)}
[data-theme=dark] :is(.nav-item:hover,.nav-item.active,.command-result:hover,.command-result.active,.owner-avatar,.service-icon,.member-dot){background:var(--bg-2);color:var(--fg-1);border-color:var(--edge-solid)}
[data-theme=dark] :is(.brand .brand-monogram,.brand,.plain-title,.section-heading h2,.panel-header h2,.detail-description){color:var(--ink)}
[data-theme=dark] :is(.subtitle,.eyebrow,.fine.muted,.definition dt,.definition dd,.table-wrap td small,.ops-row-meta,.ops-row p,.vault-caption,.vault-count,.breadcrumb,.nav-caption,.topbar-date){color:var(--muted)}
[data-theme=dark] :is(th,.table-wrap th,.data-code,.code-block,.status.neutral,.callout,.vault-selection,.review-navigation,.bulk-preview-list,.ops-batch-metrics,.workspace-marker){background:var(--surface-muted);border-color:var(--line);color:var(--muted)}
[data-theme=dark] :is(td,th,.small-list li,.divider,.section-space,.panel-header,.lineage-destinations article,.content-lineage,.ops-row,.ops-list,.overview-totals,.vault-tabs,.date-divider,.auth-site){border-color:var(--line)}
[data-theme=dark] :is(.status.good,.callout.good){background:var(--bg-2);color:var(--ok)}
[data-theme=dark] :is(.status.warn,.callout.warn){background:var(--bg-2);color:var(--attention)}
[data-theme=dark] :is(.status.bad,.callout.bad,.status.error,.callout.error){background:var(--bg-2);color:var(--bad)}
[data-theme=dark] :is(.media-stage,.detail-media,.vault-visual,.vault-no-media,.overview-media,.evidence-card img,.bulk-preview-list img){background:var(--media-bg)}
[data-theme=dark] :is(.studio-launch,.playground-launch){background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme=dark] :is(.studio-launch p,.studio-launch .eyebrow,.playground-launch p,.playground-launch .eyebrow){color:var(--muted)}
[data-theme=dark] .motion-launch{background:var(--bg-2)}.vault-card.selected{border-color:var(--success)}
[data-theme=dark] .vault-card.selected{box-shadow:0 0 0 2px var(--accent)}
[data-theme=dark] .vault-tabs button{color:var(--muted)}[data-theme=dark] .vault-tabs button.active{color:var(--ink);border-color:var(--accent)}
[data-theme=dark] .modal-overlay{background:var(--backdrop)}[data-theme=dark] .modal-close{color:var(--muted)}
[data-theme=dark] .auth-brand{background:var(--bg-1)}[data-theme=dark] .text-button{color:var(--accent)}


[data-theme=dark] :is(.nav-item,.breadcrumb b,td,.metric-bottom,.metric-icon){color:var(--muted)}
[data-theme=dark] :is(.icon-btn,.metric){background:var(--surface);border-color:var(--line);color:var(--ink)}
[data-theme=dark] .metric-icon{background:var(--surface-muted)}
[data-theme=dark] .nav-item.active{color:var(--fg-1)}
[data-theme=dark] :is(.vault-card-actions,.version-row){border-color:var(--line)}
/* Retained native studio controls use the same accessible surfaces. */
[data-theme=dark] .ns-btn{background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .ns-btn:hover{background:var(--surface-muted);color:var(--ink);border-color:var(--muted)}
[data-theme=dark] .ns-btn:is(.ns-primary,.ns-secondary){background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
[data-theme=dark] .ns-btn.ns-quiet{background:transparent;color:var(--muted);border-color:transparent}
[data-theme=dark] :is(.ns-studio,.ns-dialog) :is(input:not([type=checkbox]),select,textarea){background:var(--surface-raised);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.ns-studio,.ns-dialog) :is(input,textarea)::placeholder{color:var(--muted)}

[data-theme=dark] :is(.ns-dialog,.ns-v3-dialog){background:var(--surface);color:var(--ink);border-color:var(--line)}
[data-theme=dark] :is(.ns-dialog,.ns-v3-dialog)::backdrop{background:var(--backdrop)}
[data-theme=dark] :is(.ns-dialog,.ns-v3-dialog,.ns-studio) :is(form label,.ns-dialog-intro){color:var(--muted)}
[data-theme=dark] .ns-close{background:var(--surface-raised);color:var(--ink);border-color:var(--line)}

/* V5 software typography and neutral accent palette, shared across modules. */
body,button,input,select,textarea{font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
h1,h2,.hero-title,.auth-tagline h1,.page-heading h1,.overview-hero h1,.section-heading h2{font-family:inherit!important;letter-spacing:-.035em}h1,.page-heading h1{font-weight:650;font-size:clamp(28px,3.4vw,43px)}.heading-period{display:none}.brand-monogram{background:var(--ink);color:var(--canvas)}.nav-item.active{background:var(--surface-muted);color:var(--ink);border-color:var(--line)}.nav-dot,.dot{background:var(--accent)}.btn.accent,.btn.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}.motion-launch,.playground-launch,.studio-launch{background:var(--surface);color:var(--ink);border:1px solid var(--line)}.motion-launch p,.playground-launch p,.studio-launch p{color:var(--muted)}.vault-card.selected{border-color:var(--accent)}.auth-brand{background:var(--bg-1)}.auth-tagline h1 em{font-style:normal;color:var(--accent)}.workspace-marker,.owner-avatar{background:var(--surface-muted);color:var(--ink)}
#media-activity-host:empty{display:none}.media-activity-panel{position:fixed;right:20px;top:72px;width:min(500px,calc(100vw - 28px));max-height:calc(100dvh - 100px);overflow:auto;border:1px solid var(--line);border-radius:14px;background:var(--surface);box-shadow:0 20px 70px #0005;z-index:80;padding:18px}.media-activity-head{display:flex;gap:10px;align-items:center;justify-content:space-between}.media-activity-head h2{font-size:18px;margin:0}.media-activity-row{padding:14px 0;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr auto;gap:7px}.media-activity-row strong{font-size:12px;overflow-wrap:anywhere}.media-activity-row p{font-size:11px;margin:0;color:var(--muted);grid-column:1/-1}.media-activity-row .progress{grid-column:1/-1}.media-activity-row .progress span{background:var(--accent)}.media-activity-row small{font-size:10px;color:var(--muted)}.media-activity-actions{display:flex;gap:5px;flex-wrap:wrap;grid-column:1/-1}.media-activity-empty{padding:25px 0;color:var(--muted);font-size:12px}.media-activity-note{font-size:11px;line-height:1.55;color:var(--muted)}
@media(max-width:650px){.topbar{gap:8px;padding-inline:14px}.topbar .breadcrumb,.topbar #global-work,.topbar #global-sync,.topbar .topbar-date{display:none}.top-right{gap:6px;min-width:0;flex:1;justify-content:flex-end}.topbar #global-upload{font-size:0;padding:7px 9px;min-width:35px;max-width:40px}.topbar #global-upload:after{content:'↑';font-size:18px;line-height:1}.topbar .user-menu>div{display:none}.topbar .search-launch{padding:7px}.media-activity-panel{top:65px;right:10px}}

.command-thumbnail{width:38px;height:48px;flex:0 0 38px;object-fit:contain;border:1px solid var(--line);border-radius:6px;background:var(--media-bg)}

@media(max-width:850px){.topbar-date,.topbar .user-menu>div{display:none}.topbar .search-launch>span,.topbar .search-launch>kbd{display:none}.topbar .top-right{gap:7px}}
@media(max-width:500px){.topbar{padding-inline:10px}.topbar .owner-avatar{width:29px;height:29px}.topbar .search-launch{display:none}.topbar .top-right{gap:5px}}

/* Empty states share the same readable text hierarchy as populated panels. */
.empty{color:var(--muted)}.empty strong{color:var(--ink)}.empty-icon{color:var(--accent);background:var(--surface-muted)}
/* Status messages never intercept editing gestures beneath them. */
#toast-root{pointer-events:none}.toast :is(button,a){pointer-events:auto}

/* Frequently used small choice sets stay directly visible. */
.choice-field{border:0;padding:0;min-width:0;margin:0 0 16px}.choice-field legend{padding:0;margin-bottom:8px;font-size:13px;font-weight:600;color:var(--ink)}.choice-options{display:flex;flex-wrap:wrap;gap:8px}.choice-option{position:relative;margin:0;cursor:pointer}.choice-option input{position:absolute;opacity:0;width:1px;height:1px;padding:0}.choice-option span{display:block;border:1px solid var(--line);background:var(--surface-raised);color:var(--ink);padding:9px 12px;border-radius:9px;font-size:13px}.choice-option input:checked+span{border-color:var(--accent);background:var(--surface-muted);color:var(--ink)}.choice-option input:focus-visible+span{outline:2px solid var(--accent);outline-offset:3px}.choice-option input:disabled+span{opacity:.5;cursor:default}
