/* Shared cabinet palette. The previous theme uses the existing switch. */
html[data-nt-refresh][data-neurotag-design="studio"]:has(#root) {
  color-scheme: dark;
  --bg:#091221; --paper:#101e32; --card:#122239; --line:#30435c;
  --ink:#f3f7ff; --muted:#b4c3d8; --blue:#3968ef; --blue-h:#305edc;
  --blue-l:#243e63; --sky:#80aeff; --ok:#78d9b5; --warn:#ffcb80; --bad:#ff9dab;
  --surface-fill:#14253b; --surface-edge:#30435c;
  --text-primary:var(--ink); --text-secondary:var(--muted);
  scrollbar-color:#435776 #0b1423;

  & body:has(#root) {
    background:#091221; color:var(--ink); accent-color:var(--blue);
    font-family:Inter,"Segoe UI",Arial,sans-serif;
    & .nt-content, & .login {
      background-color:#0a1220;
      background-image:radial-gradient(ellipse at 12% 0%,#142a45,transparent 54%),linear-gradient(150deg,#0c1729,#0a1120 70%)!important;
      background-attachment:fixed;
    }
    & #content, & .head, & .nt-overview, & .nt-footer {background:transparent;color:var(--ink)}
    & .nt-topbar, & .nt-mobile-nav {background:#0b1525;border-color:#25364e;color:var(--muted)}
    & .nt-sidebar {background:linear-gradient(170deg,#101e31,#091321 72%);border-color:#24364e}
    & .nt-sidebar :is(nav a,.nt-workspace,.nt-task-navigation summary,.nt-sidebar-profile){color:#ccdaed}
    & .nt-sidebar :is(nav a.on,nav a:hover,.nt-workspace[aria-current],.nt-task-navigation[open]>summary){color:#fff;background:#203857;border-color:#35547b}
    & :is(.nt-avatar,.nt-menu-tile-icon,.nt-account-stat-icon,.nt-mark,.nt-sidebar nav svg,.nt-workspace::before){background:#223e65;color:#b9d7ff;border-color:#39567a;box-shadow:none}
    & .nt-mark{background:linear-gradient(145deg,#659aff,#315ef0)}
    & .nt-mark i{background:#fff}
    & :is(.nt-breadcrumb b,.nt-brand,.nt-sidebar b){color:#f4f7ff}
    & :is(.nt-breadcrumb a,.nt-sidebar small,.nt-footer a){color:#b5c6dc}
    & :is(.nt-design-toggle,.ux-search-open,.nt-sidebar-profile,.nt-workspace){background:#15253b;border-color:#30435c;color:#d5e4f8}
    & :is(.nt-mobile-nav a[aria-current],.nt-mobile-nav a.on){background:#233e64;color:#e9f4ff}
    & :is(.nt-mobile-nav svg,.nt-top-actions svg,.nt-menu-tile-icon svg,.nt-account-stat-icon svg,.nt-sidebar svg){color:#b5d5ff;filter:none}
    & :is(.card,.box,.log,.nt-profile-note,.nt-material-drop,.nt-collector-row,.nt-collector-funnel,.collector-cost,.ux-start-step,.ux-help-steps li,.ux-summary>div,.ux-guide-links>a,.ux-diagnostic,.nt-attention-clear,.nt-account-drop,.nt-material-card,.nt-template-row){
      background:linear-gradient(125deg,#15263c,#101e32);border:1px solid var(--line);color:var(--ink);
      border-radius:14px;box-shadow:inset 0 1px 0 #ffffff06;
    }
    & :is(h1,h2,h3,h4,strong,b,summary,legend,label,.num,.item,.nt-breadcrumb){color:var(--ink);text-shadow:none}
    & :is(.muted,small,p,.hint,.sub,.ui-note,.lead,.nt-login-hint,.nt-nav-label,.nt-profile-identity small){color:var(--muted)}
    & a {color:#9ac6ff}
    & :is(.head h1,.head h2){font-size:clamp(26px,3vw,40px);line-height:1.14;letter-spacing:-.04em}
    & .head .sub{margin-top:7px}
    & :is(.ui-task-tabs,.nt-profile-tabs,.nt-material-tabs,.nt-compose-types,.nt-task-status-filters,.tabs){background:#0e1a2d;border:1px solid var(--line);padding:5px;border-radius:12px;gap:4px}
    & :is(.tabs a,.ui-task-tabs a,.nt-profile-tabs a,.nt-material-tabs a,.nt-compose-types a,.nt-task-status-filters button){background:transparent;color:#c2d2e7;border-color:transparent;border-radius:8px}
    & :is(.tabs .on,.ui-task-tabs a.on,.nt-profile-tabs a.on,.nt-material-tabs a.on,.nt-compose-types a.on,.nt-task-status-filters button[aria-pressed=true],#section-search-results a.on){background:#284368;color:#fff;border-color:#41628c}
    & :is(.inp,textarea,select,input:not([type=checkbox],[type=radio],[type=file],[type=range],[type=submit],[type=button])){background:#0b1729;color:#f4f7ff;border-color:#3a506d;box-shadow:none}
    & :is(input,textarea)::placeholder{color:#9aadca;opacity:1}
    & select option{background:#102039;color:#eef5ff}
    & :is(.btn,button[type=submit]){background:#3263de;color:#fff;border-color:#527de7;border-radius:8px;box-shadow:none}
    & .btn:hover{background:#2958c9;color:white}
    & :is(.btn.line,.btn.quiet,.nt-format-help,.metric-help summary,.account-help summary){background:#182a43;color:#d8e7fb;border-color:#38516e}
    & .btn.danger{background:#462333;color:#ffbbca;border-color:#754255}
    & :is(.btn,.inp):disabled{opacity:.6}
    & :focus-visible{outline:2px solid #93c2ff;outline-offset:2px}
    & th{background:#192b43;color:#c3d4eb;border-color:var(--line)}
    & td{background:transparent;color:#e0ebfb;border-color:var(--line)}
    & tr:hover td, & .item:hover, & .nt-menu-tile-link:hover{background:#1b304b}
    & .item{border-color:#2b405b}
    & .state{color:#bdcde0}
    & :is(.state.okk,.state.run){color:#88dcbc}
    & :is(.note,.state.pau,.nt-attention-count,.nt-attention-symbol){color:#ffd499;background-color:#382f27}
    & :is(.errbox,.state.err,.ux-error){color:#ffb3c2;background-color:#372635}
    & :is(.nt-badge,.nt-draft-status,.ux-start-status,#start-count,.nt-attention-symbol[data-tone],.nt-menu-arrow){background:#203956;color:#b9d8ff}
    & :is(.metric-help-text,.account-help>div,.modal,dialog,.login .box,.nt-material-dialog,.nt-video-dialog){background:#16263b;color:#eff5ff;border-color:#3b536d;box-shadow:0 16px 42px #03091566}
    & :is(.modal-bg,dialog::backdrop){background:#040a16bd}
    & :is(.metric-help-text,.modal,.login,dialog) :is(label,p,small,.muted){color:#c6d7ea}
    & .nt-profile-cover{background:linear-gradient(120deg,#193e71,#162b47)}
    & .nt-overview{display:flex;flex-direction:column;gap:16px}
    & .nt-overview>.nt-menu-layout{order:-2;margin:0}
    & .nt-overview>.ui-note{order:-1}
    & .nt-menu-column>h3{font-size:13px;font-weight:650;letter-spacing:.025em;color:#b7cde9;background:transparent}
    & .nt-overview .nt-menu-column .stat:first-of-type{background:linear-gradient(115deg,#214980,#152c50);border-color:#3a5d88}
    & :is(.traffic-track,.nt-account-progress-track,.ux-progress){background:#293c55}
    & :is(.traffic-track>div,.nt-account-progress-track>span,.ux-progress>span,.bars .b .p){background:#5c89fa}
    & .bars .b i{background:#294269}
    & .nt-overview :is(.nt-menu-tile,.stat) {min-width:0}
    & :is(.nt-overview>.ui-note,#body>p:not(:empty),.head .sub,.nt-format-picker){background:transparent}
    & :is(.card p,.card small,.stat>span,.nt-menu-tile small,.card .muted){color:#bfcee1}
    & :is(.card strong,.card.stat b,.card h3,.nt-account-stat strong){color:#f3f7ff}
  }
}
html[data-nt-refresh][data-neurotag-design="studio"]:has(#root) body #root {
  & #content :is(.head .sub,#body>p,.nt-profile-note p,.nt-format-picker label,.nt-help-collapse>div,.stat small,.stat>span,.nt-overview .ui-note){color:#bdcfe6}
  & #content .head .btn, & #content .btn.lg, & .login .btn[type=submit]{background:#3466ea;color:white;border-color:#5583fc;box-shadow:0 3px 12px #102e6a4d}
  & #content .head .btn.line, & #content .head .btn.quiet{background:#192b43;color:#d9e8fc;border-color:#38516e;box-shadow:none}
  & #content .nt-menu-arrow{background:transparent;color:#8bb8ff}
  & #content .nt-menu-tile:hover {border-color:#59759c}
  & .nt-sidebar nav>a.on::after,& .nt-sidebar .nt-workspace[aria-current]::after{background:#81acff}
  & .nt-workspace::before{background:#244778;color:#d1e5ff}
  & .nt-topbar{border-bottom:1px solid #273951;box-shadow:none}
  & #content .nt-menu-column .stat:first-of-type{
    background:radial-gradient(ellipse at 108% -20%,#4479db55,transparent 60%),linear-gradient(115deg,#1d4172,#152942);
  }
  & #content :is(.nt-attention-list,.list) .item{border-color:#2e425c}
  & #content .note{padding:10px 14px;border-radius:8px}
}
@media(min-width:1180px){
  html[data-nt-refresh][data-neurotag-design="studio"]:has(#root) body #root .nt-app {
    display:block;
    & .nt-sidebar{
      position:relative;inset:auto;display:grid;grid-template-columns:auto minmax(0,1fr) auto;
      align-items:start;gap:22px;width:100%;height:auto;max-height:none;overflow:visible;
      padding:12px max(24px,calc((100% - 1360px)/2));background:#0b1525;border:0;border-bottom:1px solid #28384f;
    }
    & .nt-sidebar .nt-brand{margin:4px 0;padding:0}
    & .nt-sidebar :is(.nt-workspace,.nt-nav-label,.sp){display:none}
    & .nt-sidebar nav{display:grid;grid-template-columns:repeat(7,max-content);justify-content:center;align-items:center;gap:4px;padding:0;margin:0}
    & .nt-sidebar nav>a,& .nt-sidebar .nt-task-navigation>summary{min-height:38px;padding:6px 9px;gap:5px;font-size:12px}
    & .nt-sidebar nav>a svg,& .nt-sidebar .nt-task-navigation>summary svg{width:15px;height:15px;background:none;padding:0;border:0;color:#b4c9e7;box-shadow:none}
    & .nt-sidebar nav>a.on::after{display:none}
    & .nt-sidebar-profile{margin:0;padding:4px 10px;border:1px solid #344960;border-radius:9px}
    & .nt-topbar, & #content, & .nt-footer{width:100%;max-width:1360px;margin-inline:auto;padding-inline:clamp(24px,3vw,44px)}
    & .nt-topbar{height:48px;background:transparent}
    & .nt-content {min-height:calc(100vh - 64px)}
  }
}
/* The surface and its edge carry the depth; type stays on the native pixel grid. */
html[data-nt-refresh][data-neurotag-design="studio"]:has(#root) body:has(#root) {
  filter:none;
  & #root .nt-content {
    background-color:#09111e;
    background-image:linear-gradient(155deg,#11213a 0%,#0b1424 36%,#09111e 78%)!important;
  }
  & #root :is(.nt-topbar,.nt-sidebar,.nt-mobile-nav,.card,.btn,.nt-design-toggle) {
    filter:none; backdrop-filter:none; -webkit-backdrop-filter:none; text-shadow:none;
  }
  & #root .nt-content #content .card {
    background:linear-gradient(125deg,#15263c,#112034 70%);
    border-color:#354b68;box-shadow:inset 0 1px 0 #ffffff08,0 3px 9px #02071124;
  }
  & #root .nt-content #content .nt-overview .nt-menu-column .stat:first-of-type {
    background:linear-gradient(108deg,#234e85,#182e50);border-color:#5179a9;
  }
  & #root #content .head :is(h1,h2){font-weight:700;letter-spacing:-.035em;color:#f6f9ff}
  & #root #content .head .sub{font-size:14px;line-height:1.5;color:#c1cfe1}
  & #root #content :is(.card .muted,.card small,.card>p){line-height:1.55}
  & #root #content .head .btn:not(.line,.quiet,.danger), & #root .login button[type=submit] {
    background:linear-gradient(180deg,#4178f6,#305fd7);border-color:#709cfe;
    box-shadow:inset 0 1px 0 #ffffff25,0 2px 6px #030a1755;
  }
  & #root :is(.btn,.nt-design-toggle,.nt-sidebar nav a,.nt-task-navigation>summary,.nt-menu-tile,.inp) {
    transition:background-color .16s ease,color .16s ease,border-color .16s ease,box-shadow .16s ease;
  }
  & #root :is(.btn,.nt-design-toggle):active:not(:disabled){transform:none;box-shadow:inset 0 2px 4px #06122e55}
  & #root .nt-content .nt-menu-tile:focus-within{border-color:#86adff}
  & #root .nt-content .rise{animation:none}
  & #root .nt-sidebar .nt-mark{background:linear-gradient(145deg,#518dfb,#244faf);box-shadow:inset 0 1px 0 #bed6ff77}
}
@media(min-width:1180px){
  html[data-nt-refresh][data-neurotag-design="studio"]:has(#root) body #root .nt-app .nt-sidebar {
    z-index:35;align-items:center;
    & nav{overflow:visible;min-width:0}
    & nav>a,& .nt-task-navigation>summary{font-size:13px}
    & .nt-task-navigation{display:block;position:relative;min-width:0}
    & .nt-task-navigation>summary{cursor:pointer;list-style:none}
    & .nt-task-navigation>summary::after{content:"";width:6px;height:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg);margin:-3px 1px 0 4px;transition:transform .16s ease}
    & .nt-task-navigation[open]>summary::after{transform:rotate(225deg);margin-top:3px}
    & .nt-task-navigation[open]>div{
      position:absolute;inset:calc(100% + 10px) auto auto 0;z-index:1;
      display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px;
      width:460px;max-height:calc(100dvh - 96px);overflow:auto;padding:10px;margin:0;
      background:#122136;border:1px solid #405a7b;border-top:2px solid #739fff;
      border-radius:12px;box-shadow:0 16px 40px #02071380;
    }
    & .nt-task-navigation>div>a{
      display:flex;align-items:center;min-height:40px;margin:0;padding:8px 12px;line-height:1.35;
      color:#e2edfc;font-size:13px;font-weight:560;letter-spacing:0;border:1px solid transparent;border-radius:7px;
    }
    & .nt-task-navigation>div>a:is(:hover,:focus-visible){background:#233c5d;border-color:#405e86;color:#fff}
    & .nt-task-navigation>div>a[href="#/campaigns"], & .nt-task-navigation>div>a[href="#/drafts"]{background:#192e49;color:#bdd8ff}
    & .nt-task-navigation>div>a[href="#/campaigns"]{grid-column:1}
    & .nt-task-navigation>div>a[aria-current="page"]{color:#fff;background:#29476c}
  }
}
@media(prefers-reduced-motion:no-preference){
  @keyframes nt-disclose{from{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:none}}
  @keyframes nt-arrive{from{opacity:.85}to{opacity:1}}
  html[data-nt-refresh] .nt-task-navigation[open]>div{animation:nt-disclose .17s cubic-bezier(.2,.7,.3,1)}
  html[data-nt-refresh] #content>.head{animation:nt-arrive .18s ease-out}
}
@media(prefers-reduced-motion:reduce){
  html[data-nt-refresh] #root :is(.btn,.nt-design-toggle,.nt-sidebar nav a,.nt-task-navigation>summary,.nt-task-navigation>summary::after,.nt-menu-tile,.inp){transition:none}
}
