/* nt-system-v1.css — единая система поверх старых слоёв; подключается последним. */

/* Этап 1. Токены: те же имена, что у nt-workspace-minimal, тот же селектор — выигрывает порядок подключения. */
html[data-nt-interface="minimal"][data-nt-layout="current"][data-nt-edition="console"][data-nt-refresh]:has(#root) {
  --canvas:#18191b;
  --rail:#141517;
  --surface:#1f2123;
  --raised:#2a2d30;
  --field:#18191b;
  --hair:#2e3134;
  --edge:#3d4246;
  --column-rule:#2e3134;
  --paper-ink:#eceef0;
  --secondary:#b9bec3;
  --dim:#868d94;
  --accent:#a9c2f5;
  --action-fill:#8aa8ff;
  --action-hover:#a0b9ff;
  --action-pressed:#7a98f0;
  --action-ink:#0f1a33;
  --choice-ink:#b3c6ff;
  --choice-surface:#262f45;
  --link-ink:#a9c2f5;
  --selected-ink:#eceef0;
  --selected-surface:#2a2d30;
  --button:#e3e6e9;
  --button-ink:#18191b;

  /* Новые токены системы. */
  --nt-ok:#7fd4b0;
  --nt-warn:#f2c47a;
  --nt-bad:#f59aa6;
  --nt-run:#8aa8ff;
  --nt-r-sm:6px;
  --nt-r-md:10px;
  --nt-r-lg:14px;
  --nt-ease:cubic-bezier(0.23,1,0.32,1);

  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  scrollbar-color:#3d4246 var(--rail);
}

/* Старые слои держат селекторы до трёх id; :is(#root,#_#_#_#_) даёт четыре и при этом совпадает только с #root. */

/* Толщины: вместо 480/520/550/570/610/620/700 — три ступени. */
html[data-nt-refresh] body :is(#root,#_#_#_#_) :is(h1,h2) {font-weight:600; letter-spacing:-0.01em;}
html[data-nt-refresh] body :is(#root,#_#_#_#_) :is(h3,h4,strong,b,summary,.btn,button,.nt-count-heading,.nt-report-label,.nt-recent-all) {font-weight:500;}
html[data-nt-refresh] body :is(#root,#_#_#_#_) :is(small,.nt-count-reading small) {font-weight:400;}

/* Скругления: карточки 14, контролы 10, дорожки и пилюли — круглые. */
html[data-nt-refresh] body :is(#root,#_#_#_#_) :is(.card,.nt-home-count,.nt-focus-reports,.nt-home-disclosure,.nt-task-filters) {border-radius:var(--nt-r-lg);}
html[data-nt-refresh] body :is(#root,#_#_#_#_) :is(.btn,button:not([class*="chip"]):not(.nt-avatar),summary,input,select,textarea) {border-radius:var(--nt-r-md);}
html[data-nt-refresh] body :is(#root,#_#_#_#_) :is(.nt-quota-track,.nt-quota-track > i) {border-radius:999px;}

/* Нажатие: кнопка отвечает сразу. */
html[data-nt-refresh] body :is(#root,#_#_#_#_) :is(.btn,button) {transition:transform 140ms var(--nt-ease),background-color 150ms ease,color 150ms ease;}
html[data-nt-refresh] body :is(#root,#_#_#_#_) :is(.btn,button):active:not(:disabled) {transform:scale(0.97);}
@media (prefers-reduced-motion:reduce) {
  html[data-nt-refresh] body :is(#root,#_#_#_#_) :is(.btn,button):active {transform:none;}
}

/* Скелетон загрузки был белыми полосами — теперь тон поверхности. */
html[data-nt-refresh] body :is(#root,#_#_#_#_) [aria-busy="true"] [aria-hidden="true"] > div {background:var(--raised); border-radius:var(--nt-r-sm);}

/* Этап 2. Меню: рабочие разделы сверху, «Сервис» отдельной группой, «Подписка» не выглядит выбранной. */
html[data-nt-refresh] body :is(#root,#_#_#_#_) .nt-sidebar > nav > a:not([aria-current]):not(.on) {background:transparent;}
html[data-nt-refresh] body :is(#root,#_#_#_#_) .nt-sidebar > nav > a[href="#/subscription"] {position:relative; margin-top:30px;}
html[data-nt-refresh] body :is(#root,#_#_#_#_) .nt-sidebar > nav > a[href="#/subscription"]::before {
  content:"Сервис"; position:absolute; left:12px; top:-21px;
  font-size:11px; font-weight:400; letter-spacing:0.02em; color:var(--dim); pointer-events:none;
}
html[data-nt-refresh] body :is(#root,#_#_#_#_) .nt-sidebar > nav > a svg {color:var(--dim); transition:color 150ms ease;}
html[data-nt-refresh] body :is(#root,#_#_#_#_) .nt-sidebar > nav > a:is([aria-current],.on) svg {color:var(--paper-ink);}
html[data-nt-refresh] body :is(#root,#_#_#_#_) .nt-sidebar > nav > a[href="#/help"] {color:var(--dim);}
html[data-nt-refresh] body :is(#root,#_#_#_#_) .nt-nav-plan {font-size:11px; font-weight:400; color:var(--nt-warn); background:transparent;}

/* Цифры одной ширины: счётчики не прыгают при обновлении. */
html[data-nt-refresh] body #root :is(.num,strong,b,td,small,.nt-count-reading,time) {
  font-variant-numeric:tabular-nums;
}
