:root {
  --font: "Inter", "SF Pro Display", "Segoe UI", system-ui, sans-serif;
  --radius: 20px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --maxw: 1180px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="light"] {
  --bg: #ffffff;
  --surface: #f6f6f5;
  --surface-2: #efefed;
  --border: #e4e4e2;
  --border-strong: #c9c9c6;
  --text: #0a0a0a;
  --muted: #6d6d6d;
  --faint: #9b9b9b;
  --ok: #1a7f56;
  --ok-bg: #e8f3ee;
  --warn: #8a6116;
  --warn-bg: #f7f0e2;
  --err: #b3384a;
  --err-bg: #faecef;
  --code-bg: #0a0a0a;
  --code-ink: #f2f2f2;
}

html[data-theme="dark"] {
  --bg: #0a0a0a;
  --surface: #141414;
  --surface-2: #1c1c1c;
  --border: #242424;
  --border-strong: #3d3d3d;
  --text: #fafafa;
  --muted: #a0a0a0;
  --faint: #6e6e6e;
  --ok: #4ade9d;
  --ok-bg: rgba(74, 222, 157, .12);
  --warn: #f0b24e;
  --warn-bg: rgba(240, 178, 78, .12);
  --err: #ff7285;
  --err-bg: rgba(255, 114, 133, .12);
  --code-bg: #141414;
  --code-ink: #f2f2f2;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15.5px;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s var(--ease), color .3s var(--ease);
}

main {
  flex: 1 0 auto;
  width: 100%;
}

.page-narrow {
  max-width: 1000px;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 14px;
}

h1 {
  font-size: clamp(42px, 6vw, 72px);
}

h2 {
  font-size: clamp(30px, 4vw, 46px);
}

h3 {
  font-size: 18px;
  font-weight: 550;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 12px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: .92em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 450;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 7px 16px;
  margin-bottom: 26px;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
}

.header {
  position: sticky;
  top: 14px;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  margin-top: 14px;
}

.nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 26px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 9px 12px 9px 22px;
  max-width: 100%;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  place-items: center;
}

.nav-toggle svg {
  width: 20px;
  height: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 16.5px;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 12.5px;
  font-weight: 650;
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 450;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: all .2s var(--ease);
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}

.nav-links a.active {
  color: var(--text);
  background: var(--surface);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 6px;
}

.theme-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .2s var(--ease);
}

.theme-toggle:hover {
  color: var(--text);
  background: var(--surface);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

html[data-theme="light"] .icon-sun {
  display: none;
}

html[data-theme="dark"] .icon-moon {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s var(--ease);
  white-space: nowrap;
  line-height: 1.2;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  opacity: .85;
}

.btn-accent {
  background: var(--text);
  color: var(--bg);
}

.btn-accent:hover {
  opacity: .85;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--surface);
}

.btn-danger {
  background: transparent;
  color: var(--err);
  border-color: transparent;
}

.btn-danger:hover {
  background: var(--err-bg);
}

.btn-sm {
  padding: 7px 15px;
  font-size: 13px;
}

.btn[disabled] {
  opacity: .35;
  cursor: not-allowed;
}

.hero {
  position: relative;
  padding: 130px 0 100px;
  overflow: hidden;
}

.hero-inner {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero h1 {
  margin-bottom: 22px;
}

.hero-sub {
  font-size: 17.5px;
  font-weight: 400;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 36px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin: 80px 0 0;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 32s linear infinite;
}

.marquee-track span {
  font-size: 14.5px;
  font-weight: 450;
  color: var(--faint);
  letter-spacing: .01em;
  white-space: nowrap;
  margin-right: 56px;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

section.block {
  padding: 100px 0;
}

.section-head {
  max-width: 620px;
  margin-bottom: 52px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .25s var(--ease);
}

.card:hover {
  border-color: var(--border-strong);
}

.card h3 {
  margin-bottom: 8px;
}

.card p {
  color: var(--muted);
  margin: 0;
  font-size: 14.5px;
  font-weight: 400;
}

.step-num {
  font-size: 12.5px;
  font-weight: 450;
  color: var(--faint);
  letter-spacing: .02em;
  margin-bottom: 16px;
  display: block;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 14px;
}

.pager-info {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 54px;
  text-align: center;
}

.pager .btn[disabled] {
  opacity: .4;
  cursor: default;
}

.model-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  transition: border-color .2s var(--ease);
  cursor: pointer;
}

.model-chip:hover {
  border-color: var(--border-strong);
}

.model-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text);
  flex: none;
}

.model-chip b {
  font-size: 14px;
  font-weight: 550;
  display: block;
}

.model-chip .mono {
  color: var(--faint);
  font-size: 12.5px;
}

.model-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  transition: border-color .2s var(--ease);
}

.model-card:hover {
  border-color: var(--border-strong);
}

.model-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  flex: none;
}

.model-card-icon img {
  width: 18px;
  height: 18px;
}

.model-card-icon svg {
  width: 17px;
  height: 17px;
  color: var(--text);
}

html[data-theme="dark"] .model-card-icon img,
html[data-theme="dark"] .vicon img {
  filter: invert(1);
}

.model-card-body {
  flex: 1;
  min-width: 0;
}

.model-card-body b {
  font-size: 14px;
  font-weight: 550;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-card-body .mono {
  color: var(--faint);
  font-size: 12px;
}

.icon-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
  transition: all .2s var(--ease);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.copied {
  color: #2ecc8f;
  border-color: transparent;
}

.user-status-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.user-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.user-status-row:first-child {
  border-top: none;
}

.user-status-row > .muted {
  min-width: 72px;
}

.user-status-val {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.icon-btn svg {
  width: 14px;
  height: 14px;
}

.limit-ico {
  width: 11px;
  height: 11px;
  vertical-align: -1px;
  margin-right: 3px;
  color: var(--faint);
}

.plans-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.plan-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 2fr 40px;
  align-items: center;
  gap: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  transition: border-color .25s var(--ease);
  position: relative;
}

.plan-row:hover {
  border-color: var(--border-strong);
}

.plan-row.highlight {
  border: 1.5px solid var(--text);
}

.plan-row.highlight::before {
  content: "популярный";
  position: absolute;
  top: -12px;
  left: 32px;
  font-size: 12px;
  font-weight: 500;
  color: var(--bg);
  background: var(--text);
  border-radius: var(--radius-pill);
  padding: 4px 13px;
}

.plan-name {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.plan-name small {
  display: block;
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.45;
}

.plan-price {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.plan-price .old {
  font-size: 14.5px;
  color: var(--faint);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 8px;
}

.plan-price small {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 400;
}

.plan-limits {
  display: flex;
  gap: 26px;
  justify-content: flex-end;
  text-align: right;
}

.plan-limit b {
  display: block;
  font-size: 15.5px;
  font-weight: 550;
}

.plan-limit span {
  font-size: 12px;
  color: var(--faint);
  font-weight: 400;
}

.plan-arrow {
  color: var(--faint);
  transition: all .2s var(--ease);
  text-align: center;
}

.plan-row:hover .plan-arrow {
  color: var(--text);
  transform: translateX(3px);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 36px;
}

.metric {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
}

.metric b {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
  display: block;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 10px;
  transition: border-color .2s var(--ease);
}

.faq details[open] {
  border-color: var(--border-strong);
}

.faq summary {
  cursor: pointer;
  font-weight: 500;
  font-size: 15.5px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  color: var(--faint);
  transition: transform .25s var(--ease);
  flex: none;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 14.5px;
  font-weight: 400;
}

.cta {
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 84px 40px;
}

footer.footer {
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding: 48px 0 60px;
  flex-shrink: 0;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

.auth-wrap {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.auth-card {
  width: 100%;
  max-width: 410px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 40px;
}

.auth-card h1 {
  font-size: 26px;
  margin-bottom: 6px;
}

.auth-card .sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 28px;
  font-weight: 400;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 450;
  color: var(--muted);
  margin-bottom: 7px;
}

.field input, .field select, .field textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 14.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s var(--ease);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--text);
}

.alert {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.alert-err {
  background: var(--err-bg);
  color: var(--err);
}

.alert-warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.code-block {
  position: relative;
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 14px;
  padding: 18px 20px;
  padding-right: 118px;
  font-family: "JetBrains Mono", ui-monospace, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  overflow-x: auto;
  margin: 14px 0;
  white-space: pre;
}

.code-block .copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, .08);
  color: #d0d0d0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 11px;
  cursor: pointer;
  opacity: 1;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}

.code-block .copy-btn:hover {
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

.docs-toc {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-toc a {
  font-size: 13.5px;
  font-weight: 400;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 9px;
}

.docs-toc a:hover {
  color: var(--text);
  background: var(--surface);
}

.docs-body h2 {
  font-size: 27px;
  margin-top: 56px;
  padding-top: 8px;
  scroll-margin-top: 100px;
}

.docs-body h2:first-child {
  margin-top: 0;
}

.docs-body p {
  color: var(--muted);
  font-weight: 400;
}

table.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
  margin: 14px 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

table.table th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--faint);
  padding: 10px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

table.table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

table.table tr:last-child td {
  border-bottom: none;
}

table.table tbody tr {
  transition: background .15s;
}

table.table tbody tr:hover {
  background: var(--surface);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  padding: 4px 11px;
}

.badge-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.badge-warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.badge-err {
  background: var(--err-bg);
  color: var(--err);
}

.badge-mute {
  background: var(--surface-2);
  color: var(--muted);
}

.progress {
  height: 6px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  background: var(--text);
  border-radius: var(--radius-pill);
  transition: width .4s var(--ease);
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 30px;
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.filter-bar button {
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 450;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  cursor: pointer;
  transition: all .2s var(--ease);
}

.filter-bar button:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.filter-bar button.active {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}

.admin-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 36px;
  align-items: start;
  padding: 40px 0 80px;
}

.admin-nav {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-nav .title {
  font-size: 11.5px;
  font-weight: 450;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--faint);
  padding: 0 12px;
  margin: 16px 0 8px;
}

.admin-nav .title:first-child {
  margin-top: 0;
}

.admin-nav a {
  font-size: 14px;
  font-weight: 400;
  color: var(--muted);
  padding: 9px 12px;
  border-radius: 10px;
  transition: all .15s;
}

.admin-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.admin-nav a.active {
  color: var(--text);
  background: var(--surface);
}

.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.admin-head h1 {
  font-size: 30px;
  margin: 0;
}

.panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 20px;
}

.panel h2 {
  font-size: 18px;
  margin-bottom: 18px;
}

.inline-form {
  display: inline;
}

.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.key-reveal {
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
  margin: 12px 0;
}

.key-reveal .small {
  font-family: var(--font);
}

.fade-up {
  animation: fadeUp .5s var(--ease) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 960px) {
  .grid-3 {
    grid-template-columns: minmax(0, 1fr);
  }
  .grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
  .panel {
    min-width: 0;
  }
  .plan-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .plan-limits {
    justify-content: flex-start;
    text-align: left;
  }
  .docs-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .docs-layout > * {
    min-width: 0;
  }
  .docs-toc {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    overflow-x: auto;
  }
  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .admin-layout > * {
    min-width: 0;
  }
  .admin-nav {
    position: static;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding: 4px 2px 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .admin-nav::-webkit-scrollbar {
    display: none;
  }
  .admin-nav .title {
    display: none;
  }
  .admin-nav a {
    white-space: nowrap;
    flex: none;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
  }
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .metrics {
    grid-template-columns: 1fr;
  }
  .nav {
    gap: 10px;
    padding: 8px 14px;
  }
  .logo {
    min-width: 0;
  }
  .nav-right {
    margin-left: auto;
    gap: 6px;
  }
  .nav-toggle {
    display: inline-grid;
  }
  .nav-links {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 2px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .25);
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .18s var(--ease), transform .18s var(--ease);
  }
  .nav.nav-open .nav-links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a {
    padding: 11px 14px;
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .logo span:not(.logo-mark) {
    display: none;
  }
  .header {
    padding: 0 12px;
  }
  input, select, textarea {
    font-size: 16px !important;
  }
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -2px;
}

@media (max-width: 720px) {
  .btn {
    max-width: 100%;
    white-space: normal;
  }
  .admin-head {
    flex-wrap: wrap;
    gap: 12px;
  }
  .admin-head > div {
    flex-wrap: wrap;
  }
  .filter-bar {
    flex-wrap: wrap;
  }
  .log-filter-input {
    flex: 1 1 140px;
    min-width: 0;
  }
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.model-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  transition: border-color .2s var(--ease);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.model-tile:hover { border-color: var(--border-strong); }

.model-tile-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.model-tile-vendor {
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 450;
}

.model-tile .vicon,
.model-card .vicon { width: 20px; height: 20px; overflow: hidden; }

.model-tile .vicon img,
.model-card .vicon img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.model-tile .vicon svg,
.model-card .vicon svg {
  width: 18px;
  height: 18px;
  color: var(--text);
}

.model-tile-icon-big {
  margin-bottom: 12px;
}

.model-tile .vicon,
.model-card .vicon { display: block; }

.model-tile-name {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-tile-id {
  color: var(--faint);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-tile-id-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.model-tile-id-row .mono {
  color: var(--faint);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-tile-vendor-bottom {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--muted);
}

.model-tile-more {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  border-style: dashed;
}

.model-tile-more-count {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.model-tile-more-label {
  color: var(--faint);
  font-size: 13px;
}

.model-tile-more-link {
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  margin-top: 10px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  align-items: stretch;
  max-width: 1020px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  transition: border-color .25s var(--ease);
}

.pricing-card:hover { border-color: var(--border-strong); }

.pricing-card.highlight { border: 1.5px solid var(--text); }

.pricing-name {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.pricing-desc {
  color: var(--muted);
  font-size: 13.5px;
  margin: 4px 0 22px;
  min-height: 40px;
}

.pricing-price {
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.pricing-price .old {
  font-size: 15px;
  color: var(--faint);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 8px;
}

.pricing-period {
  color: var(--muted);
  font-size: 13px;
  margin: 2px 0 24px;
}

.pricing-limits {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.pricing-limits li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
}

.pricing-limits svg {
  width: 13px;
  height: 13px;
  color: var(--faint);
  flex: none;
  align-self: center;
}

.pricing-limits b {
  color: var(--text);
  font-weight: 550;
  font-size: 14.5px;
  min-width: 52px;
}

@media (max-width: 960px) {
  .model-grid, .pricing-grid { grid-template-columns: 1fr; }
}
.log-filter-input {
  font-family: var(--font);
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  outline: none;
  transition: border-color .2s var(--ease);
  color-scheme: inherit;
}

.log-filter-input:focus { border-color: var(--text); }

.log-filter-input::placeholder { color: var(--faint); }
.btn-ico {
  width: 15px;
  height: 15px;
  flex: none;
}

.btn .btn-ico:first-child { margin-left: -3px; }

.modal {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg);
  color: var(--text);
  padding: 26px;
  width: min(720px, calc(100vw - 40px));
  box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.modal::backdrop {
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(4px);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.modal-head h2 {
  margin: 0;
  font-size: 19px;
}
.panel-equal {
  display: flex;
  flex-direction: column;
}

.panel-equal .btn,
.panel-equal form { margin-top: auto; }

.panel-equal form { display: block; }

.panel-equal > form[style*="flex"] { margin-top: auto; }.nowrap { white-space: nowrap; }
