/* ===========================================================================
   NT STS API: блок на главной странице (#sts-api) и отдельная страница /api/.
   Выдержано в единой палитре и типографике theme-nt.css.
   =========================================================================== */

html.theme-nt .nt-code,
html.theme-nt .nt-code *,
html.theme-nt pre,
html.theme-nt pre *,
html.theme-nt code,
html.theme-nt code * {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "JetBrains Mono", monospace !important;
}

html.theme-nt .nt-api-section {
  padding-top: clamp(48px, 5vw, 68px);
  padding-bottom: clamp(48px, 5vw, 68px);
}

/* --- Главная страница: секция #sts-api ---------------------------------- */

html.theme-nt .nt-api-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 20px 48px;
  align-items: end;
  margin-bottom: 24px;
}

html.theme-nt .nt-api-head-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

html.theme-nt .nt-api-h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.6vw, 38px);
  font-weight: var(--w-halbfett);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--nt-text);
  margin: 0;
}

html.theme-nt .nt-api-lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--nt-text-secondary);
  max-width: 520px;
}

@media (max-width: 960px) {
  html.theme-nt .nt-api-head {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 22px;
  }
  html.theme-nt .nt-api-lead {
    max-width: none;
  }
}

html.theme-nt .nt-api-showcase {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 18px;
  align-items: stretch;
}

@media (max-width: 1024px) {
  html.theme-nt .nt-api-showcase {
    grid-template-columns: 1fr;
  }
}

/* --- Интерактивная тёмная консоль STS-конвейера ------------------------- */

html.theme-nt .nt-api-console {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 70% at 15% 0%, rgba(154, 163, 184, 0.14) 0%, rgba(20, 24, 32, 0) 58%),
    #141820;
  color: #f3f5f8;
  box-shadow: 0 24px 56px -24px rgba(12, 16, 24, 0.45);
  overflow: hidden;
}

html.theme-nt .nt-api-console-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

html.theme-nt .nt-api-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: rgba(243, 245, 248, 0.88);
  letter-spacing: 0.01em;
}

html.theme-nt .nt-api-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--nt-ok);
  box-shadow: 0 0 0 4px rgba(89, 212, 153, 0.18);
  animation: nt-pulse 2.2s ease-out infinite;
}

html.theme-nt .nt-api-endpoint-pill {
  font-size: 12px;
  color: rgba(243, 245, 248, 0.65);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

html.theme-nt .nt-api-latency-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(89, 212, 153, 0.12);
  border: 1px solid rgba(89, 212, 153, 0.28);
  color: #8ce9b8;
  font-size: 11.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

html.theme-nt .nt-api-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

html.theme-nt .nt-api-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

html.theme-nt .nt-api-tab {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: rgba(243, 245, 248, 0.72);
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

html.theme-nt .nt-api-tab:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

html.theme-nt .nt-api-tab[aria-selected="true"] {
  background: #ffffff;
  border-color: #ffffff;
  color: #151517;
}

html.theme-nt .nt-api-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(243, 245, 248, 0.84);
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

html.theme-nt .nt-api-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

html.theme-nt .nt-api-copy.is-copied {
  border-color: rgba(89, 212, 153, 0.55);
  background: rgba(89, 212, 153, 0.15);
  color: #9bf0c2;
}

html.theme-nt .nt-api-panels {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

html.theme-nt .nt-api-panel {
  display: none;
  flex: 1;
  padding: 14px 16px;
  min-width: 0;
}

html.theme-nt .nt-api-panel.is-active {
  display: block;
}

html.theme-nt .nt-api-console pre {
  margin: 0;
  padding: 0;
  background: transparent !important;
  color: #e4e7ee !important;
  font-size: 12.5px;
  line-height: 1.58;
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
}

html.theme-nt .nt-api-console .nt-tok-m { color: #8ce9b8; font-weight: 600; }
html.theme-nt .nt-api-console .nt-tok-u { color: #9ec5ff; }
html.theme-nt .nt-api-console .nt-tok-k { color: #a7b8d4; }
html.theme-nt .nt-api-console .nt-tok-s { color: #f6d59b; }
html.theme-nt .nt-api-console .nt-tok-n { color: #a9e9cf; }
html.theme-nt .nt-api-console .nt-tok-c { color: #798192; }

html.theme-nt .nt-api-pipe {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 16px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 14, 0.42);
}

@media (max-width: 640px) {
  html.theme-nt .nt-api-pipe {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

html.theme-nt .nt-api-pipe-step {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  transition: border-color 0.3s ease, background-color 0.3s ease;
}

html.theme-nt .nt-api-pipe-step.is-on {
  border-color: rgba(89, 212, 153, 0.42);
  background: rgba(89, 212, 153, 0.08);
}

html.theme-nt .nt-api-pipe-step small {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(243, 245, 248, 0.55);
}

html.theme-nt .nt-api-pipe-step.is-on small {
  color: #8ce9b8;
}

html.theme-nt .nt-api-pipe-step b {
  font-size: 12.5px;
  font-weight: 500;
  color: #f3f5f8;
  line-height: 1.25;
}

/* --- Правая колонка преимуществ STS API на главной ---------------------- */

html.theme-nt .nt-api-spec {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
  padding: 20px 22px;
  border-radius: 20px;
  border: 1px solid var(--nt-border-strong);
  background: #ffffff;
}

html.theme-nt .nt-api-spec-list {
  margin: 0;
  display: grid;
  gap: 11px;
}

html.theme-nt .nt-api-spec-list > div {
  padding-top: 11px;
  border-top: 1px solid var(--nt-border);
}

html.theme-nt .nt-api-spec-list > div:first-child {
  padding-top: 0;
  border-top: 0;
}

html.theme-nt .nt-api-spec-list dt {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--nt-text);
}

html.theme-nt .nt-api-spec-list dd {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.44;
  color: var(--nt-text-secondary);
}

html.theme-nt .nt-api-spec-foot {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 13px;
  border-top: 1px solid var(--nt-border);
}

html.theme-nt .nt-api-spec-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--nt-text-secondary);
  font-variant-numeric: tabular-nums;
}

html.theme-nt .nt-api-spec-meta b {
  color: var(--nt-text);
  font-weight: 600;
}

html.theme-nt .nt-api-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

html.theme-nt .nt-api-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 640px) {
  html.theme-nt .nt-api-cards {
    grid-template-columns: 1fr;
  }
}

html.theme-nt .nt-api-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--nt-border);
  background: var(--nt-bg-surface);
  min-width: 0;
}

html.theme-nt .nt-api-card-tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--nt-border);
  font-size: 11px;
  font-weight: 500;
  color: var(--nt-text-secondary);
}

html.theme-nt .nt-api-card h3 {
  margin: 4px 0 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: -0.015em;
  color: var(--nt-text);
}

html.theme-nt .nt-api-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--nt-text-secondary);
}

html.theme-nt .nt-api-summary {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: auto;
  padding: 20px 22px;
  border-radius: 16px;
  border: 1px solid var(--nt-border-strong);
  background: #ffffff;
}

html.theme-nt .nt-api-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 520px) {
  html.theme-nt .nt-api-kpis {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

html.theme-nt .nt-api-kpi {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

html.theme-nt .nt-api-kpi b {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--nt-text);
  font-variant-numeric: tabular-nums;
}

html.theme-nt .nt-api-kpi span {
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--nt-text-secondary);
}

html.theme-nt .nt-api-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

html.theme-nt .nt-api-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--nt-border-strong);
  background: #ffffff;
  color: var(--nt-text);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

html.theme-nt .nt-api-btn:hover {
  background: var(--nt-bg-surface);
  border-color: var(--nt-text);
}

html.theme-nt .nt-api-btn--primary {
  background: var(--nt-text);
  border-color: var(--nt-text);
  color: #ffffff !important;
}

html.theme-nt .nt-api-btn--primary:hover {
  background: #2a2c31;
  border-color: #2a2c31;
}

html.theme-nt .nt-api-btn--lg {
  min-height: 52px;
  padding: 0 24px;
  font-size: 15.5px;
}

/* --- Диалог тарифов: строка STS API ------------------------------------ */

html.theme-nt .nt-tariffs-note-link {
  color: var(--nt-text);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--nt-border-strong);
  text-underline-offset: 3px;
}

html.theme-nt .nt-tariffs-note-link:hover {
  text-decoration-color: currentColor;
}

/* ===========================================================================
   Отдельная страница /api/
   =========================================================================== */

html.theme-nt .nt-api-page :is(h1, h2, h3) {
  -webkit-hyphens: manual;
  hyphens: manual;
}

html.theme-nt .nt-api-hero {
  padding-top: 0;
  padding-bottom: clamp(16px, 2.5vw, 28px);
}

html.theme-nt .nt-api-stage-wrap {
  max-width: min(1440px, 100%);
  margin: 0 auto;
  padding: 10px clamp(12px, 2vw, 24px) 0;
}

html.theme-nt .nt-api-stage {
  --mx: 0px;
  --my: 0px;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  contain: layout paint;
  min-height: clamp(500px, 68vh, 640px);
  padding: clamp(24px, 3vw, 34px) clamp(20px, 4vw, 48px) clamp(26px, 3.2vw, 36px);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #05070c;
  color: #ffffff;
  box-shadow: 0 32px 72px -28px rgba(5, 8, 16, 0.62);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  text-align: center;
}

html.theme-nt .nt-api-stage-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

html.theme-nt .nt-api-stage-aurora {
  position: absolute;
  inset: -18%;
  background:
    radial-gradient(40% 38% at 50% 48%, rgba(92, 122, 178, 0.38) 0%, rgba(44, 62, 104, 0.18) 52%, transparent 84%),
    radial-gradient(32% 30% at 38% 38%, rgba(138, 158, 196, 0.22) 0%, transparent 74%),
    radial-gradient(34% 32% at 64% 60%, rgba(58, 86, 148, 0.26) 0%, transparent 76%);
  transform: translate3d(calc(var(--mx) * 0.6), calc(var(--my) * 0.6), 0) rotate(-12deg) scale(1.08);
  transition: opacity 0.5s ease;
}

html.theme-nt .nt-api-stage-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(620px, 78vw, 1020px);
  aspect-ratio: 1;
  transform: translate3d(calc(-50% + var(--mx)), calc(-50% + var(--my)), 0) rotate(-18deg) scale(1.22, 1.02);
  -webkit-mask-image: radial-gradient(closest-side, #000 30%, rgba(0, 0, 0, 0.82) 52%, rgba(0, 0, 0, 0.22) 72%, transparent 84%);
  mask-image: radial-gradient(closest-side, #000 30%, rgba(0, 0, 0, 0.82) 52%, rgba(0, 0, 0, 0.22) 72%, transparent 84%);
  opacity: 0.92;
  transition: opacity 0.45s ease, filter 0.45s ease;
}

html.theme-nt .nt-api-stage.is-energized .nt-api-stage-orb {
  opacity: 1;
  filter: brightness(1.12) saturate(1.15);
}

html.theme-nt .nt-api-stage-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  filter: contrast(1.85) brightness(0.86) saturate(1.12);
}

html.theme-nt .nt-api-stage-louvers {
  position: absolute;
  inset: -12%;
  background:
    repeating-linear-gradient(
      -38deg,
      rgba(4, 6, 11, 0.84) 0px,
      rgba(4, 6, 11, 0.52) 9px,
      rgba(4, 6, 11, 0.08) 36px,
      rgba(214, 228, 255, 0.085) 66px,
      rgba(4, 6, 11, 0.84) 70px
    );
  -webkit-mask-image: radial-gradient(64% 62% at 50% 50%, #000 34%, rgba(0, 0, 0, 0.55) 70%, transparent 96%);
  mask-image: radial-gradient(64% 62% at 50% 50%, #000 34%, rgba(0, 0, 0, 0.55) 70%, transparent 96%);
  transform: translate3d(calc(var(--mx) * -0.35), calc(var(--my) * -0.35), 0);
}

html.theme-nt .nt-api-stage-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(44% 36% at 50% 48%, rgba(5, 7, 12, 0.34) 0%, transparent 100%),
    radial-gradient(68% 64% at 50% 50%, transparent 26%, rgba(5, 7, 12, 0.72) 74%, #05070c 100%);
}

html.theme-nt .nt-api-stage-top,
html.theme-nt .nt-api-stage-center,
html.theme-nt .nt-api-stage-bottom {
  position: relative;
  z-index: 1;
}

html.theme-nt .nt-api-stage-top {
  width: 100%;
  display: flex;
  justify-content: center;
}

html.theme-nt .nt-api-stage-crumbs {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.3;
  color: rgba(226, 232, 242, 0.56);
}

html.theme-nt .nt-api-stage-crumbs a {
  color: rgba(243, 246, 252, 0.76);
  text-decoration: none;
  transition: color 0.16s ease;
}

html.theme-nt .nt-api-stage-crumbs a:hover {
  color: #ffffff;
}

html.theme-nt .nt-api-stage-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  max-width: 780px;
  margin: auto 0;
}

html.theme-nt .nt-api-stage-kicker {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(235, 240, 250, 0.88);
}

html.theme-nt .nt-api-stage-title {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-display);
  font-size: clamp(36px, 5.2vw, 68px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.036em;
  filter: drop-shadow(0 10px 30px rgba(4, 6, 12, 0.65));
}

html.theme-nt .nt-api-stage-line-wrap {
  display: block;
}

html.theme-nt .nt-api-stage-line {
  display: block;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 56%, rgba(202, 214, 236, 0.82) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html.theme-nt .nt-api-stage-lead {
  margin: 0;
  max-width: 600px;
  font-size: clamp(15px, 1.3vw, 17.5px);
  line-height: 1.54;
  color: rgba(224, 231, 243, 0.78);
}

html.theme-nt .nt-api-stage-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

html.theme-nt .nt-api-stage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
}

html.theme-nt .nt-api-stage-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 12px;
  background: #ffffff;
  color: #0b0e14 !important;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

html.theme-nt .nt-api-stage-cta:hover {
  background: #f2f5fa;
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.48);
}

html.theme-nt .nt-api-stage-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #f3f6fc !important;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

html.theme-nt .nt-api-stage-ghost:hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

html.theme-nt .nt-api-stage-caption {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.4;
  color: rgba(206, 215, 230, 0.52);
  font-variant-numeric: tabular-nums;
}

html.theme-nt .nt-api-subnav-wrap {
  margin-top: 18px;
}

@media (max-width: 640px) {
  html.theme-nt .nt-api-stage {
    min-height: 460px;
    border-radius: 20px;
    padding: 22px 18px 24px;
    gap: 22px;
  }

  html.theme-nt .nt-api-stage-actions {
    width: 100%;
  }

  html.theme-nt .nt-api-stage-cta,
  html.theme-nt .nt-api-stage-ghost {
    width: 100%;
  }
}

html.theme-nt .nt-api-hero-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}

@media (min-width: 960px) {
  html.theme-nt .nt-api-hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(40px, 5vw, 72px);
  }
}

html.theme-nt .nt-api-hero-title {
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 58px);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.032em;
  color: var(--nt-text);
}

html.theme-nt .nt-api-hero-lead {
  margin: 20px 0 0;
  max-width: 560px;
  font-size: clamp(16.5px, 1.35vw, 18.5px);
  line-height: 1.55;
  color: var(--nt-text-secondary);
}

html.theme-nt .nt-api-metrics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(32px, 4vw, 48px);
}

@media (max-width: 900px) {
  html.theme-nt .nt-api-metrics-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  html.theme-nt .nt-api-metrics-strip {
    grid-template-columns: 1fr;
  }
}

html.theme-nt .nt-api-metric-tile {
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--nt-bg-surface);
  border: 1px solid var(--nt-border);
}

html.theme-nt .nt-api-metric-tile b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--nt-text);
  font-variant-numeric: tabular-nums;
}

html.theme-nt .nt-api-metric-tile span {
  display: block;
  margin-top: 4px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--nt-text-secondary);
}

/* Поднавигация по разделам страницы /api/ */
html.theme-nt .nt-api-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0 22px;
  border-bottom: 1px solid var(--nt-border);
}

html.theme-nt .nt-api-subnav a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--nt-bg-surface);
  border: 1px solid var(--nt-border);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--nt-text-secondary);
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

html.theme-nt .nt-api-subnav a:hover {
  background: var(--nt-bg-active);
  color: var(--nt-text);
  border-color: var(--nt-border-strong);
}

/* Архитектурная схема справа в Hero /api/ */
html.theme-nt .nt-api-arch {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--nt-border-strong);
  background:
    radial-gradient(circle at 1px 1px, rgba(21, 21, 23, 0.055) 1px, transparent 1px) 0 0 / 14px 14px,
    var(--nt-bg-surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

html.theme-nt .nt-api-arch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--nt-text-secondary);
}

html.theme-nt .nt-api-arch-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--nt-border);
  color: var(--nt-text);
  font-size: 11.5px;
  font-weight: 500;
}

html.theme-nt .nt-api-arch-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nt-ok);
}

html.theme-nt .nt-api-arch-nodes {
  display: grid;
  gap: 10px;
}

html.theme-nt .nt-api-arch-node {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1px solid var(--nt-border);
  background: #ffffff;
}

html.theme-nt .nt-api-arch-node.is-core {
  background: #141820;
  border-color: #141820;
  color: #ffffff;
}

html.theme-nt .nt-api-arch-num {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--nt-bg-surface);
  color: var(--nt-text);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

html.theme-nt .nt-api-arch-node.is-core .nt-api-arch-num {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

html.theme-nt .nt-api-arch-node b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.25;
}

html.theme-nt .nt-api-arch-node small {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--nt-text-secondary);
}

html.theme-nt .nt-api-arch-node.is-core small {
  color: rgba(255, 255, 255, 0.72);
}

html.theme-nt .nt-api-arch-tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--nt-bg-surface);
  color: var(--nt-text-secondary);
  white-space: nowrap;
}

html.theme-nt .nt-api-arch-node.is-core .nt-api-arch-tag {
  background: rgba(89, 212, 153, 0.16);
  color: #8ce9b8;
}

/* Два формата работы с API */
html.theme-nt .nt-api-formats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 860px) {
  html.theme-nt .nt-api-formats {
    grid-template-columns: 1fr;
  }
}

html.theme-nt .nt-api-format-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: 20px;
  border: 1px solid var(--nt-border-strong);
  background: #ffffff;
}

html.theme-nt .nt-api-format-card.is-accent {
  background: var(--nt-bg-surface);
  border-color: var(--nt-border);
}

html.theme-nt .nt-api-format-card h3 {
  margin: 0;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.2;
  color: var(--nt-text);
}

html.theme-nt .nt-api-format-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--nt-text-secondary);
}

html.theme-nt .nt-api-check-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

html.theme-nt .nt-api-check-list li {
  position: relative;
  padding-left: 28px;
  font-size: 14.5px;
  line-height: 1.48;
  color: #2f3137;
}

html.theme-nt .nt-api-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--nt-text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 10.5l2.6 2.5L14 7.5'/%3E%3C/svg%3E") center / 18px no-repeat;
}

/* 4 карточки применения */
html.theme-nt .nt-api-usecases {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 780px) {
  html.theme-nt .nt-api-usecases {
    grid-template-columns: 1fr;
  }
}

html.theme-nt .nt-api-usecase {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--nt-border-strong);
  background: #ffffff;
}

html.theme-nt .nt-api-usecase h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.25;
  color: var(--nt-text);
}

html.theme-nt .nt-api-usecase p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--nt-text-secondary);
}

html.theme-nt .nt-api-usecase-foot {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--nt-border);
  font-size: 13px;
  color: var(--nt-text);
}

/* Блок быстрого старта: 5 шагов слева + консоль справа */
html.theme-nt .nt-api-quickstart {
  display: grid;
  gap: 32px;
  align-items: start;
}

@media (min-width: 980px) {
  html.theme-nt .nt-api-quickstart {
    grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
    gap: 36px;
  }
  html.theme-nt .nt-api-quickstart-console {
    position: sticky;
    top: calc(var(--nav-height) + var(--announcement-height) + 24px);
  }
}

html.theme-nt .nt-api-warn {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--nt-bg-surface);
  border: 1px solid var(--nt-border);
  font-size: 14px;
  line-height: 1.5;
  color: var(--nt-text-secondary);
}

html.theme-nt .nt-api-warn b {
  color: var(--nt-text);
}

/* Таблица эндпоинтов */
html.theme-nt .nt-api-table-wrap {
  border: 1px solid var(--nt-border-strong);
  border-radius: 18px;
  background: #ffffff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

html.theme-nt .nt-api-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  text-align: left;
}

html.theme-nt .nt-api-table th {
  padding: 13px 18px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nt-text-tertiary);
  background: var(--nt-bg-sidebar);
  border-bottom: 1px solid var(--nt-border);
}

html.theme-nt .nt-api-table td {
  padding: 14px 18px;
  font-size: 14.5px;
  line-height: 1.48;
  color: var(--nt-text-secondary);
  border-bottom: 1px solid var(--nt-border);
  vertical-align: top;
}

html.theme-nt .nt-api-table tr:last-child td {
  border-bottom: 0;
}

html.theme-nt .nt-api-table td:nth-child(2) {
  color: var(--nt-text);
  font-weight: 500;
  white-space: nowrap;
}

html.theme-nt .nt-http-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

html.theme-nt .nt-http-post {
  background: #141820;
  color: #ffffff;
}

html.theme-nt .nt-http-get {
  background: rgba(89, 212, 153, 0.16);
  color: #0e6b3f;
}

/* Параметры разговора (2 колонки карточек) */
html.theme-nt .nt-api-params-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 880px) {
  html.theme-nt .nt-api-params-grid {
    grid-template-columns: 1fr;
  }
}

html.theme-nt .nt-api-param-box {
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--nt-border-strong);
  background: #ffffff;
}

html.theme-nt .nt-api-param-box.is-soft {
  background: var(--nt-bg-surface);
  border-color: var(--nt-border);
}

html.theme-nt .nt-api-param-box h3 {
  margin: 6px 0 14px;
  font-size: 20px;
  color: var(--nt-text);
}

html.theme-nt .nt-api-param-list {
  margin: 0;
  display: grid;
  gap: 12px;
}

html.theme-nt .nt-api-param-list > div {
  padding-top: 12px;
  border-top: 1px solid var(--nt-border);
}

html.theme-nt .nt-api-param-list > div:first-child {
  padding-top: 0;
  border-top: 0;
}

html.theme-nt .nt-api-param-list dt {
  font-size: 14px;
  font-weight: 600;
  color: var(--nt-text);
  margin-bottom: 4px;
}

html.theme-nt .nt-api-param-list dt code {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(21, 21, 23, 0.06);
  font-size: 12.5px;
  font-weight: 500;
}

html.theme-nt .nt-api-param-list dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--nt-text-secondary);
}

/* Раскрывающиеся справочники (ошибки и статусы) */
html.theme-nt .nt-api-folds {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

html.theme-nt .nt-api-fold {
  border: 1px solid var(--nt-border-strong);
  border-radius: 16px;
  background: #ffffff;
  overflow: hidden;
}

html.theme-nt .nt-api-fold summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--nt-text);
  list-style: none;
  cursor: pointer;
}

html.theme-nt .nt-api-fold summary::-webkit-details-marker {
  display: none;
}

html.theme-nt .nt-api-fold summary::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

html.theme-nt .nt-api-fold[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

html.theme-nt .nt-api-fold-body {
  padding: 0 22px 22px;
  border-top: 1px solid var(--nt-border);
}

html.theme-nt .nt-api-fold-body .nt-api-table-wrap {
  margin-top: 16px;
}

/* Тарифы и личный кабинет API-ключа */
html.theme-nt .nt-api-pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 860px) {
  html.theme-nt .nt-api-pricing-grid {
    grid-template-columns: 1fr;
  }
}

html.theme-nt .nt-api-price-card {
  padding: 26px;
  border-radius: 20px;
  border: 1px solid var(--nt-border-strong);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

html.theme-nt .nt-api-price-card.is-dark {
  background: #141820;
  border-color: #141820;
  color: #ffffff;
}

html.theme-nt .nt-api-price-card h3 {
  margin: 0;
  font-size: 21px;
  color: inherit;
}

html.theme-nt .nt-api-price-card.is-dark .nt-eyebrow {
  color: rgba(255, 255, 255, 0.56);
}

html.theme-nt .nt-api-price-card.is-dark p {
  color: rgba(255, 255, 255, 0.78);
}

html.theme-nt .nt-api-price-rows {
  margin: 4px 0 0;
  border-top: 1px solid var(--nt-border);
}

html.theme-nt .nt-api-price-card.is-dark .nt-api-price-rows {
  border-top-color: rgba(255, 255, 255, 0.12);
}

html.theme-nt .nt-api-price-rows > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--nt-border);
  font-size: 14.5px;
}

html.theme-nt .nt-api-price-card.is-dark .nt-api-price-rows > div {
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

html.theme-nt .nt-api-price-rows > div:last-child {
  border-bottom: 0;
}

html.theme-nt .nt-api-price-rows dt {
  color: var(--nt-text-secondary);
}

html.theme-nt .nt-api-price-card.is-dark .nt-api-price-rows dt {
  color: rgba(255, 255, 255, 0.72);
}

html.theme-nt .nt-api-price-rows dd {
  margin: 0;
  font-weight: 600;
  color: var(--nt-text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

html.theme-nt .nt-api-price-card.is-dark .nt-api-price-rows dd {
  color: #ffffff;
}

@media (prefers-reduced-motion: no-preference) {
  html.theme-nt .nt-api-stage {
    animation: ntStageFrameIn 0.92s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  html.theme-nt .nt-api-stage-aurora {
    animation: ntStageFadeIn 1.3s cubic-bezier(0.16, 1, 0.3, 1) 0.05s both;
  }

  html.theme-nt .nt-api-stage-louvers {
    animation: ntStageFadeIn 1.15s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
  }

  html.theme-nt .nt-api-stage-canvas {
    opacity: 0;
    transition: opacity 1.05s cubic-bezier(0.16, 1, 0.3, 1);
  }

  html.theme-nt .nt-api-stage-canvas[data-ready="1"] {
    opacity: 1;
  }

  html.theme-nt .nt-api-stage-top {
    animation: ntStageTopIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
  }

  html.theme-nt .nt-api-stage-kicker {
    animation: ntStageCleanRise 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
  }

  html.theme-nt .nt-api-stage-line-wrap--1 {
    animation: ntStageTitleRise 1.02s cubic-bezier(0.16, 1, 0.3, 1) 0.22s both;
  }

  html.theme-nt .nt-api-stage-line-wrap--2 {
    animation: ntStageTitleRise 1.06s cubic-bezier(0.16, 1, 0.3, 1) 0.34s both;
  }

  html.theme-nt .nt-api-stage-lead {
    animation: ntStageLeadRise 0.94s cubic-bezier(0.16, 1, 0.3, 1) 0.46s both;
  }

  html.theme-nt .nt-api-stage-actions {
    animation: ntStageCleanRise 0.88s cubic-bezier(0.16, 1, 0.3, 1) 0.56s both;
  }

  html.theme-nt .nt-api-subnav-wrap {
    animation: ntStageCleanRise 0.88s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both;
  }

  html.theme-nt .nt-api-stage-caption {
    animation: ntStageCleanRise 0.84s cubic-bezier(0.16, 1, 0.3, 1) 0.64s both;
  }

  html.theme-nt [data-api-reveal=""] {
    opacity: 0;
    transform: translate3d(0, 22px, 0);
  }

  html.theme-nt [data-api-reveal="in"] {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.78s cubic-bezier(0.16, 1, 0.3, 1) var(--api-reveal-delay, 0ms),
      transform 0.78s cubic-bezier(0.16, 1, 0.3, 1) var(--api-reveal-delay, 0ms);
  }

  @keyframes ntStageFrameIn {
    from {
      opacity: 0;
      transform: translate3d(0, 14px, 0) scale(0.986);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes ntStageFadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }

  @keyframes ntStageTopIn {
    from {
      opacity: 0;
      transform: translate3d(0, -8px, 0);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes ntStageCleanRise {
    from {
      opacity: 0;
      transform: translate3d(0, 16px, 0);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }

  @keyframes ntStageTitleRise {
    from {
      opacity: 0;
      transform: translate3d(0, 26px, 0) scale(0.975);
      filter: blur(10px);
    }
    to {
      opacity: 1;
      transform: none;
      filter: none;
    }
  }

  @keyframes ntStageLeadRise {
    from {
      opacity: 0;
      transform: translate3d(0, 18px, 0);
      filter: blur(6px);
    }
    to {
      opacity: 1;
      transform: none;
      filter: none;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html.theme-nt .nt-api-status i {
    animation: none;
  }

  html.theme-nt .nt-api-stage-aurora,
  html.theme-nt .nt-api-stage-orb,
  html.theme-nt .nt-api-stage-cta,
  html.theme-nt .nt-api-stage-ghost {
    transition: none;
  }
}
