:root {
  color-scheme: dark;
  --bg: #080a0f;
  --bg-raised: #0b0e14;
  --surface: #0f131b;
  --surface-2: #141923;
  --surface-3: #191f2b;
  --line: #242b38;
  --line-soft: #1b212c;
  --text: #f2f5f7;
  --text-2: #b2bac7;
  --text-3: #747e8d;
  --accent: #8ef0c9;
  --accent-strong: #55ddb0;
  --accent-dim: rgba(142, 240, 201, 0.1);
  --violet: #a8a1ff;
  --blue: #7cb9ff;
  --warning: #f5c76f;
  --danger: #ff8b8b;
  --success: #7ee2b8;
  --sidebar: 248px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 80% -10%, rgba(100, 110, 255, 0.07), transparent 28rem),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

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

button {
  border: 0;
}

button:not(:disabled),
[role="button"]:not([aria-disabled="true"]) {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

::selection {
  color: #07110d;
  background: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 10px;
  left: 10px;
  padding: 9px 13px;
  border-radius: 7px;
  color: #07110d;
  background: var(--accent);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.boot-screen {
  display: grid;
  min-height: 100vh;
  place-content: center;
  place-items: center;
  gap: 18px;
}

.boot-label {
  margin: 0;
  color: var(--text-3);
  font-size: 13px;
  letter-spacing: 0.05em;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border: 1px solid #2b3340;
  border-radius: 8px;
  background: #11151d;
  place-items: center;
}

.brand-mark::before {
  width: 9px;
  height: 9px;
  border: 2px solid var(--accent);
  border-radius: 2px;
  content: "";
  transform: rotate(45deg);
}

.brand-mark span {
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--accent);
}

.brand-mark span:nth-child(1) { top: 5px; right: 5px; }
.brand-mark span:nth-child(2) { bottom: 5px; left: 5px; opacity: 0.7; }
.brand-mark span:nth-child(3) { top: 5px; left: 5px; opacity: 0.35; }

.brand-mark--large {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  animation: breathe 1.8s ease-in-out infinite;
}

.brand-mark--large::before {
  width: 13px;
  height: 13px;
}

@keyframes breathe {
  50% { box-shadow: 0 0 28px rgba(142, 240, 201, 0.15); }
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  font-weight: 630;
  letter-spacing: -0.02em;
}

.brand__name {
  white-space: nowrap;
}

.brand__tag {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text-3);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Public site */
.landing {
  min-height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 54px 54px;
}

.landing::before {
  position: absolute;
  z-index: -1;
  top: -18rem;
  left: 50%;
  width: 54rem;
  height: 38rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(112, 124, 255, 0.12), rgba(142, 240, 201, 0.03) 45%, transparent 70%);
  content: "";
  filter: blur(16px);
  transform: translateX(-50%);
}

.landing-nav {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  height: 78px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.landing-nav__right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.system-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-2);
  font-size: 12px;
}

.pulse-dot,
.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text-3);
}

.pulse-dot--ok,
.status-dot--ok { background: var(--success); box-shadow: 0 0 0 4px rgba(126, 226, 184, 0.08); }
.status-dot--warn { background: var(--warning); }
.status-dot--danger { background: var(--danger); }
.status-dot--idle { background: #657083; }

.landing-main {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 88px 0 76px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.82fr);
  align-items: center;
  gap: clamp(54px, 8vw, 120px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 24px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 22px;
  height: 1px;
  background: currentColor;
  content: "";
}

.hero h1 {
  max-width: 750px;
  margin: 0;
  color: #f7f8fa;
  font-size: clamp(46px, 6.5vw, 78px);
  font-weight: 560;
  letter-spacing: -0.065em;
  line-height: 0.99;
}

.hero h1 em {
  color: var(--text-3);
  font-style: normal;
}

.hero__copy {
  max-width: 600px;
  margin: 28px 0 0;
  color: var(--text-2);
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.65;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.btn {
  display: inline-flex;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn--primary { color: #07110d; background: var(--accent); }
.btn--primary:hover:not(:disabled) { background: #a5f7d7; }
.btn--secondary { border-color: var(--line); color: var(--text); background: var(--surface-2); }
.btn--secondary:hover:not(:disabled) { border-color: #394354; background: var(--surface-3); }
.btn--ghost { color: var(--text-2); background: transparent; }
.btn--ghost:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.btn--danger { border-color: rgba(255, 139, 139, 0.25); color: var(--danger); background: rgba(255, 139, 139, 0.07); }
.btn--danger:hover:not(:disabled) { border-color: rgba(255, 139, 139, 0.48); background: rgba(255, 139, 139, 0.11); }
.btn--large { min-height: 46px; padding: 0 19px; border-radius: 10px; font-size: 14px; }
.btn--small { min-height: 31px; padding: 0 10px; font-size: 12px; }
.btn--icon { width: 36px; height: 36px; min-height: 36px; padding: 0; }

.icon {
  display: inline-flex;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
}

.icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.capacity-panel {
  position: relative;
  padding: 1px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(142, 240, 201, 0.4), rgba(168, 161, 255, 0.12) 38%, rgba(255, 255, 255, 0.04) 70%);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.36);
}

.capacity-panel::before {
  position: absolute;
  z-index: -1;
  inset: 16% 12%;
  background: rgba(142, 240, 201, 0.08);
  content: "";
  filter: blur(50px);
}

.capacity-panel__inner {
  padding: 24px;
  border-radius: 17px;
  background: rgba(13, 17, 24, 0.94);
  backdrop-filter: blur(15px);
}

.capacity-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.capacity-panel__title {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.live-tag,
.badge {
  display: inline-flex;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.02);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.badge--success { border-color: rgba(126, 226, 184, 0.2); color: var(--success); background: rgba(126, 226, 184, 0.07); }
.badge--warn { border-color: rgba(245, 199, 111, 0.22); color: var(--warning); background: rgba(245, 199, 111, 0.07); }
.badge--danger { border-color: rgba(255, 139, 139, 0.22); color: var(--danger); background: rgba(255, 139, 139, 0.07); }
.badge--neutral { color: var(--text-3); }
.badge--violet { border-color: rgba(168, 161, 255, 0.25); color: var(--violet); background: rgba(168, 161, 255, 0.07); }

.capacity-number {
  margin-top: 30px;
  font-size: 54px;
  font-weight: 560;
  letter-spacing: -0.06em;
}

.capacity-number span {
  margin-left: 7px;
  color: var(--text-3);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
}

.capacity-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin: 20px 0 24px;
}

.capacity-track span {
  height: 6px;
  border-radius: 99px;
  background: #252c38;
}

.capacity-track span.expected {
  background: repeating-linear-gradient(90deg, #4c5866 0 5px, transparent 5px 8px);
}

.capacity-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line-soft);
}

.capacity-spec {
  padding: 18px 0 0;
}

.capacity-spec + .capacity-spec {
  padding-left: 20px;
  border-left: 1px solid var(--line-soft);
}

.capacity-spec small { display: block; margin-bottom: 6px; color: var(--text-3); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; }
.capacity-spec strong { font-size: 13px; font-weight: 560; }

.landing-divider {
  height: 1px;
  margin: 112px 0 54px;
  background: linear-gradient(90deg, transparent, var(--line) 8%, var(--line) 92%, transparent);
}

.modality-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--line-soft);
}

.modality {
  min-height: 155px;
  padding: 24px;
  background: rgba(11, 14, 20, 0.92);
}

.modality .icon {
  width: 21px;
  height: 21px;
  margin-bottom: 29px;
  color: var(--accent);
}

.modality h2 { margin: 0 0 8px; font-size: 14px; font-weight: 620; }
.modality p { margin: 0; color: var(--text-3); font-size: 12px; line-height: 1.5; }

.landing-footer {
  display: flex;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 30px 0;
  border-top: 1px solid var(--line-soft);
  align-items: center;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 11px;
}

/* Portal shell */
.preview-banner {
  position: fixed;
  z-index: 100;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: 31px;
  padding: 0 14px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 1px solid rgba(245, 199, 111, 0.18);
  color: #e8ca8f;
  background: #17150f;
  font-size: 10px;
  letter-spacing: 0.035em;
}

.preview-banner strong { color: var(--warning); font-weight: 680; text-transform: uppercase; letter-spacing: 0.1em; }

.portal-shell {
  display: grid;
  min-height: 100vh;
  padding-top: 31px;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
}

.sidebar {
  position: fixed;
  z-index: 50;
  top: 31px;
  bottom: 0;
  left: 0;
  display: flex;
  width: var(--sidebar);
  padding: 20px 14px 14px;
  border-right: 1px solid var(--line-soft);
  flex-direction: column;
  background: rgba(10, 13, 18, 0.96);
  backdrop-filter: blur(18px);
}

.sidebar__top {
  display: flex;
  min-height: 37px;
  padding: 0 8px;
  align-items: center;
  justify-content: space-between;
}

.mobile-close { display: none; }

.sidebar-nav {
  overflow-y: auto;
  margin: 25px -4px 12px;
  padding: 0 4px;
  scrollbar-width: thin;
}

.nav-group + .nav-group { margin-top: 21px; }

.nav-label {
  display: block;
  margin: 0 9px 7px;
  color: #626d7c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.nav-link {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  align-items: center;
  gap: 10px;
  color: #8f99a8;
  font-size: 12px;
  font-weight: 510;
  transition: color 130ms ease, background-color 130ms ease;
}

.nav-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.035); }
.nav-link.active { color: var(--text); background: #171c25; }
.nav-link.active::before { position: absolute; top: 11px; bottom: 11px; left: 0; width: 2px; border-radius: 2px; background: var(--accent); content: ""; }
.nav-link .icon { width: 16px; height: 16px; color: #7d8796; }
.nav-link.active .icon { color: var(--accent); }

.sidebar__bottom {
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.role-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0c0f15;
}

.role-switch button {
  min-height: 29px;
  border-radius: 5px;
  color: var(--text-3);
  background: transparent;
  font-size: 10px;
  font-weight: 620;
}

.role-switch button[aria-pressed="true"] { color: var(--text); background: var(--surface-3); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }

.identity {
  display: flex;
  margin-top: 10px;
  padding: 8px 7px;
  border-radius: 8px;
  align-items: center;
  gap: 10px;
}

.identity__avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid #303948;
  border-radius: 8px;
  color: var(--accent);
  background: #192027;
  place-items: center;
  font-size: 10px;
  font-weight: 720;
}

.identity__copy { min-width: 0; flex: 1; }
.identity__copy strong,
.identity__copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity__copy strong { font-size: 11px; font-weight: 600; }
.identity__copy span { margin-top: 3px; color: var(--text-3); font-size: 9px; }

.portal {
  min-width: 0;
  margin-left: var(--sidebar);
  grid-column: 2;
}

.mobile-header {
  display: none;
}

.page-wrap {
  width: min(1420px, 100%);
  margin: 0 auto;
  padding: 38px clamp(24px, 4vw, 58px) 68px;
}

.page-header {
  display: flex;
  min-height: 57px;
  margin-bottom: 28px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.page-header__copy { min-width: 0; }
.page-kicker { display: block; margin-bottom: 8px; color: var(--text-3); font-size: 10px; font-weight: 650; letter-spacing: 0.1em; text-transform: uppercase; }
.page-header h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 570; letter-spacing: -0.04em; }
.page-header p { max-width: 700px; margin: 9px 0 0; color: var(--text-3); font-size: 12px; line-height: 1.55; }
.page-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; }

.connection-alert {
  display: flex;
  margin-bottom: 20px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 139, 139, 0.18);
  border-radius: 9px;
  align-items: center;
  gap: 10px;
  color: #d9a1a1;
  background: rgba(255, 139, 139, 0.045);
  font-size: 11px;
}

.connection-alert .icon { color: var(--danger); }
.connection-alert button { margin-left: auto; }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.metric-card,
.card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(15, 19, 27, 0.76);
}

.metric-card {
  min-height: 139px;
  padding: 18px;
}

.metric-card__head {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: space-between;
}

.metric-card__label { color: var(--text-3); font-size: 10px; font-weight: 630; letter-spacing: 0.05em; text-transform: uppercase; }
.metric-card__icon { display: grid; width: 25px; height: 25px; border-radius: 7px; color: var(--text-3); background: var(--surface-2); place-items: center; }
.metric-card__icon .icon { width: 13px; height: 13px; }
.metric-card__value { margin-top: 19px; font-size: 26px; font-weight: 580; letter-spacing: -0.045em; }
.metric-card__foot { margin-top: 8px; color: var(--text-3); font-size: 10px; }
.metric-card__foot strong { color: var(--text-2); font-weight: 580; }

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 12px;
}

.content-grid--equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-grid--wide { grid-template-columns: minmax(0, 2fr) minmax(280px, 0.7fr); }

.card {
  min-width: 0;
  overflow: hidden;
}

.card--padded { padding: 20px; }
.card--span { grid-column: 1 / -1; }
.card__header { display: flex; min-height: 58px; padding: 0 18px; border-bottom: 1px solid var(--line-soft); align-items: center; justify-content: space-between; gap: 14px; }
.card__title { min-width: 0; }
.card__title h2 { margin: 0; font-size: 12px; font-weight: 620; letter-spacing: -0.01em; }
.card__title p { margin: 4px 0 0; color: var(--text-3); font-size: 10px; }
.card__actions { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.card__body { padding: 18px; }
.card__body--flush { padding: 0; }

.empty-state {
  display: grid;
  min-height: 260px;
  padding: 32px 20px;
  text-align: center;
  place-content: center;
  justify-items: center;
}

.empty-state--compact { min-height: 190px; }
.empty-state__icon { display: grid; width: 42px; height: 42px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--text-3); background: var(--surface-2); place-items: center; }
.empty-state__icon .icon { width: 19px; height: 19px; }
.empty-state h3 { margin: 0; font-size: 13px; font-weight: 610; }
.empty-state p { max-width: 360px; margin: 8px 0 0; color: var(--text-3); font-size: 11px; line-height: 1.55; }
.empty-state .btn { margin-top: 17px; }

.chart-empty {
  position: relative;
  min-height: 230px;
  overflow: hidden;
}

.chart-grid {
  position: absolute;
  inset: 16px 18px 34px 48px;
  border-bottom: 1px solid var(--line-soft);
  border-left: 1px solid var(--line-soft);
  background: repeating-linear-gradient(to bottom, transparent 0 calc(25% - 1px), var(--line-soft) 25%);
}

.chart-grid::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(142, 240, 201, 0.4), transparent);
  content: "";
}

.chart-message { position: absolute; inset: 0; display: grid; color: var(--text-3); font-size: 10px; place-content: center; }

.quick-list { display: grid; }
.quick-row { display: flex; min-height: 58px; padding: 0 18px; border-bottom: 1px solid var(--line-soft); align-items: center; gap: 11px; }
.quick-row:last-child { border-bottom: 0; }
.quick-row__icon { display: grid; width: 28px; height: 28px; flex: 0 0 auto; border: 1px solid var(--line-soft); border-radius: 7px; color: var(--text-3); background: var(--surface-2); place-items: center; }
.quick-row__icon .icon { width: 14px; height: 14px; }
.quick-row__copy { min-width: 0; flex: 1; }
.quick-row__copy strong { display: block; font-size: 11px; font-weight: 580; }
.quick-row__copy span { display: block; margin-top: 4px; overflow: hidden; color: var(--text-3); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table th { height: 42px; padding: 0 16px; border-bottom: 1px solid var(--line-soft); color: var(--text-3); font-size: 9px; font-weight: 650; letter-spacing: 0.08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table td { height: 59px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); color: var(--text-2); white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: rgba(255, 255, 255, 0.018); }
.data-table strong { color: var(--text); font-weight: 570; }
.data-table code { color: var(--text-2); }
.cell-main { display: flex; align-items: center; gap: 10px; }
.cell-icon { display: grid; width: 28px; height: 28px; border: 1px solid var(--line-soft); border-radius: 7px; color: var(--text-3); background: var(--surface-2); place-items: center; }
.cell-icon .icon { width: 14px; height: 14px; }
.cell-subtitle { display: block; max-width: 260px; margin-top: 4px; overflow: hidden; color: var(--text-3); font-size: 9px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.align-right { text-align: right !important; }
.usage-table { min-width: 780px; }
.request-table { min-width: 920px; }
.admin-models-table { min-width: 1120px; }
.provider-table { min-width: 1080px; }

.provider-pill { display: inline-flex; min-width: 0; align-items: center; gap: 7px; color: var(--text-2); font-size: 10px; white-space: nowrap; }
.provider-pill > .icon { width: 14px; height: 14px; color: var(--text-3); }
.provider-pill > span { display: block; min-width: 0; }
.provider-pill strong,
.provider-pill small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provider-pill strong { color: var(--text); font-size: 10px; font-weight: 590; }
.provider-pill small { margin-top: 3px; color: var(--text-3); font-size: 8px; }
.provider-pill--remote > .icon { color: var(--violet); }
.provider-pill--idle { color: var(--text-3); }
.provider-chain { display: inline-flex; min-width: max-content; align-items: center; gap: 9px; }
.provider-chain__arrow { color: var(--text-3); font-size: 12px; }
.target-chain { display: inline-flex; min-width: max-content; align-items: center; gap: 9px; }
.target-chip { display: inline-flex; min-width: 210px; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 8px; align-items: center; justify-content: space-between; gap: 14px; background: var(--surface-2); }
.target-chip__model { display: block; max-width: 180px; text-align: right; }
.target-chip__model code,
.target-chip__model small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.target-chip__model code { color: var(--text-2); font-size: 9px; }
.target-chip__model small { margin-top: 3px; color: var(--text-3); font-size: 8px; }

.toolbar {
  display: flex;
  min-height: 54px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
  align-items: center;
  gap: 8px;
}

.search-box {
  position: relative;
  display: flex;
  min-width: 180px;
  max-width: 300px;
  flex: 1;
  align-items: center;
}

.search-box .icon { position: absolute; left: 10px; width: 14px; height: 14px; color: var(--text-3); pointer-events: none; }
.search-box input { width: 100%; min-height: 34px; padding: 0 10px 0 32px; border: 1px solid var(--line-soft); border-radius: 7px; outline: 0; color: var(--text); background: #0b0e14; font-size: 11px; }
.search-box input::placeholder { color: #596271; }
.search-box input:focus { border-color: rgba(142, 240, 201, 0.48); box-shadow: 0 0 0 3px rgba(142, 240, 201, 0.06); }

.select {
  min-height: 34px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  outline: 0;
  color: var(--text-2);
  background-color: #0b0e14;
  font-size: 11px;
}

.select:focus { border-color: rgba(142, 240, 201, 0.48); }

/* Playground */
.tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; min-width: max-content; min-height: 46px; padding: 0 18px; color: var(--text-3); background: transparent; font-size: 11px; font-weight: 570; }
.tab:hover { color: var(--text-2); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { position: absolute; right: 18px; bottom: -1px; left: 18px; height: 2px; border-radius: 2px; background: var(--accent); content: ""; }

.playground {
  display: grid;
  min-height: 610px;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.7fr);
}

.playground__main { display: flex; min-width: 0; min-height: 610px; flex-direction: column; }
.playground__settings { border-left: 1px solid var(--line-soft); background: rgba(8, 10, 15, 0.35); }
.playground-titlebar { display: flex; min-height: 50px; padding: 0 17px; border-bottom: 1px solid var(--line-soft); align-items: center; justify-content: space-between; }
.playground-titlebar strong { font-size: 11px; font-weight: 590; }
.playground-titlebar span { color: var(--text-3); font-size: 9px; }
.conversation { display: flex; min-height: 360px; padding: 22px; flex: 1; flex-direction: column; gap: 18px; }
.message { display: grid; grid-template-columns: 27px minmax(0, 1fr); gap: 11px; }
.message__avatar { display: grid; width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 7px; color: var(--text-3); background: var(--surface-2); place-items: center; font-size: 8px; font-weight: 700; }
.message__avatar--user { color: var(--violet); }
.message__body { min-width: 0; padding-top: 5px; color: var(--text-2); font-size: 12px; line-height: 1.6; }
.message__body strong { display: block; margin-bottom: 5px; color: var(--text); font-size: 10px; font-weight: 620; }
.composer { margin: 0 18px 18px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: #0b0f15; transition: border-color 140ms ease, box-shadow 140ms ease; }
.composer:focus-within { border-color: rgba(142, 240, 201, 0.42); box-shadow: 0 0 0 3px rgba(142, 240, 201, 0.04); }
.composer textarea { display: block; width: 100%; min-height: 72px; max-height: 190px; padding: 3px 4px; resize: vertical; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; line-height: 1.55; }
.composer textarea::placeholder { color: #56606e; }
.composer__foot { display: flex; margin-top: 8px; align-items: center; justify-content: space-between; gap: 10px; }
.composer__hint { color: var(--text-3); font-size: 9px; }

.settings-section { padding: 17px; border-bottom: 1px solid var(--line-soft); }
.settings-section h3 { margin: 0 0 14px; color: var(--text-3); font-size: 9px; font-weight: 680; letter-spacing: 0.1em; text-transform: uppercase; }
.field { display: grid; gap: 7px; }
.field + .field { margin-top: 14px; }
.field__label { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); font-size: 10px; }
.field__label output { color: var(--text-3); font-variant-numeric: tabular-nums; }
.field-note { margin: 8px 0 14px; color: var(--text-3); font-size: 9px; line-height: 1.5; }
.input { width: 100%; min-height: 38px; padding: 0 11px; border: 1px solid var(--line-soft); border-radius: 7px; outline: 0; color: var(--text); background: #0a0d13; font-size: 11px; }
.input::placeholder { color: #56606e; }
.input:focus { border-color: rgba(142, 240, 201, 0.48); box-shadow: 0 0 0 3px rgba(142, 240, 201, 0.05); }
textarea.input { min-height: 90px; padding: 10px 11px; resize: vertical; line-height: 1.5; }
input[type="range"] { width: 100%; height: 3px; accent-color: var(--accent); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.toggle-row__copy strong { display: block; font-size: 10px; font-weight: 570; }
.toggle-row__copy span { display: block; margin-top: 3px; color: var(--text-3); font-size: 9px; }
.switch { position: relative; width: 32px; height: 18px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; background: #161b23; }
.switch::after { position: absolute; top: 3px; left: 3px; width: 10px; height: 10px; border-radius: 50%; background: #697483; content: ""; transition: transform 140ms ease, background-color 140ms ease; }
.switch[aria-checked="true"] { border-color: rgba(142, 240, 201, 0.3); background: rgba(142, 240, 201, 0.1); }
.switch[aria-checked="true"]::after { background: var(--accent); transform: translateX(14px); }

.generation-empty { display: grid; min-height: 500px; padding: 30px; place-content: center; justify-items: center; text-align: center; }
.generation-preview { display: grid; width: 122px; height: 122px; margin-bottom: 20px; border: 1px dashed #323a47; border-radius: 14px; color: #657080; background: repeating-linear-gradient(45deg, rgba(255,255,255,.012) 0 8px, transparent 8px 16px); place-items: center; }
.generation-preview .icon { width: 26px; height: 26px; }
.generation-empty h3 { margin: 0; font-size: 13px; font-weight: 600; }
.generation-empty p { max-width: 330px; margin: 9px 0 0; color: var(--text-3); font-size: 11px; line-height: 1.55; }
.playground-result { min-height: 420px; overflow: hidden; flex: 1; background: rgba(8, 10, 15, 0.28); }
.playground-result--error { color: var(--danger); }
.playground-result pre { max-height: 500px; margin: 0; padding: 20px; overflow: auto; color: var(--text-2); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.audio-result { width: min(430px, 100%); margin-top: 22px; accent-color: var(--accent); }

/* Docs */
.docs-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 32px; }
.docs-toc { position: sticky; top: 32px; align-self: start; }
.docs-toc a { display: block; padding: 7px 10px; border-left: 1px solid var(--line); color: var(--text-3); font-size: 10px; }
.docs-toc a:hover,
.docs-toc a.active { border-left-color: var(--accent); color: var(--text); }
.docs-content { min-width: 0; max-width: 890px; }
.docs-section { padding: 0 0 38px; scroll-margin-top: 20px; }
.docs-section + .docs-section { padding-top: 38px; border-top: 1px solid var(--line-soft); }
.docs-section h2 { margin: 0 0 12px; font-size: 22px; font-weight: 580; letter-spacing: -0.03em; }
.docs-section h3 { margin: 26px 0 10px; font-size: 13px; font-weight: 620; }
.docs-section p { max-width: 710px; margin: 0 0 13px; color: var(--text-2); font-size: 12px; line-height: 1.7; }
.docs-section code:not(.code-block code) { padding: 2px 5px; border: 1px solid var(--line-soft); border-radius: 4px; color: var(--accent); background: var(--surface-2); font-size: 0.92em; }
.endpoint-row { display: flex; min-height: 43px; margin: 12px 0; padding: 0 12px; border: 1px solid var(--line-soft); border-radius: 8px; align-items: center; gap: 11px; background: var(--surface); }
.method { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 9px; font-weight: 750; }
.endpoint-row code { color: var(--text-2); font-size: 10px; }
.code-block { position: relative; overflow: hidden; margin: 14px 0; border: 1px solid var(--line); border-radius: 10px; background: #090c11; }
.code-block__head { display: flex; min-height: 38px; padding: 0 11px; border-bottom: 1px solid var(--line-soft); align-items: center; justify-content: space-between; color: var(--text-3); font-size: 9px; }
.code-block pre { overflow: auto; margin: 0; padding: 17px; color: #c6ced8; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10px; line-height: 1.7; tab-size: 2; }
.code-block .token-key { color: var(--violet); }
.code-block .token-string { color: var(--accent); }
.code-block .token-comment { color: #576170; }

/* Admin details */
.gpu-array { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 18px; }
.gpu-slot { min-width: 0; min-height: 118px; padding: 13px; border: 1px dashed #313946; border-radius: 9px; background: rgba(255, 255, 255, 0.012); }
.gpu-slot__head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.gpu-slot__head strong { font-size: 9px; font-weight: 620; }
.gpu-slot__body { display: grid; height: 65px; color: var(--text-3); font-size: 9px; place-content: center; }
.routing-flow { display: grid; grid-template-columns: minmax(100px, 1fr) 38px minmax(100px, 1fr) 38px minmax(100px, 1fr); padding: 30px 22px; align-items: center; gap: 5px; }
.routing-node { min-height: 102px; padding: 17px; border: 1px solid var(--line); border-radius: 10px; text-align: center; background: var(--surface-2); }
.routing-node .icon { margin-bottom: 11px; color: var(--accent); }
.routing-node strong { display: block; font-size: 10px; font-weight: 610; }
.routing-node span { display: block; margin-top: 5px; color: var(--text-3); font-size: 9px; }
.routing-arrow { height: 1px; background: var(--line); }

.detail-list { display: grid; }
.detail-row { display: flex; min-height: 47px; padding: 0 17px; border-bottom: 1px solid var(--line-soft); align-items: center; justify-content: space-between; gap: 16px; }
.detail-row:last-child { border-bottom: 0; }
.detail-row span { color: var(--text-3); font-size: 10px; }
.detail-row strong { color: var(--text-2); font-size: 10px; font-weight: 550; text-align: right; }

.route-map { display: grid; }
.route-map__row { display: grid; min-height: 76px; padding: 12px 17px; border-bottom: 1px solid var(--line-soft); grid-template-columns: 28px minmax(155px, .8fr) minmax(330px, 1.5fr) auto; align-items: center; gap: 12px; }
.route-map__row:last-child { border-bottom: 0; }
.route-map__endpoint { display: grid; min-width: 0; gap: 5px; }
.route-map__endpoint strong { font-size: 10px; font-weight: 590; }
.route-map__endpoint code { overflow: hidden; color: var(--text-3); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.route-map__providers { min-width: 0; overflow-x: auto; scrollbar-width: thin; }

.callout { display: flex; padding: 13px 14px; border: 1px solid rgba(124, 185, 255, 0.18); border-radius: 9px; gap: 11px; color: #aabed4; background: rgba(124, 185, 255, 0.045); font-size: 10px; line-height: 1.55; }
.callout .icon { margin-top: 1px; color: var(--blue); }
.callout--warn { border-color: rgba(245, 199, 111, 0.18); color: #cbb88f; background: rgba(245, 199, 111, 0.045); }
.callout--warn .icon { color: var(--warning); }

/* Dialogs and feedback */
.dialog-backdrop {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  padding: 20px;
  overflow-y: auto;
  background: rgba(2, 4, 7, 0.74);
  backdrop-filter: blur(5px);
  place-items: center;
  animation: fade-in 120ms ease-out;
}

.dialog {
  width: min(460px, 100%);
  overflow: hidden;
  border: 1px solid #2c3442;
  border-radius: 14px;
  background: #11151d;
  box-shadow: var(--shadow);
  animation: dialog-in 150ms ease-out;
}

.dialog--wide { width: min(680px, 100%); }
.dialog--catalog { display: flex; width: min(1180px, calc(100vw - 40px)); max-height: calc(100vh - 40px); flex-direction: column; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .field + .field { margin-top: 0; }
.form-grid__wide { grid-column: 1 / -1; }
.form-divider { display: flex; margin: 2px 0 -2px; align-items: center; gap: 10px; color: var(--text-3); font-size: 9px; font-weight: 680; letter-spacing: .1em; text-transform: uppercase; }
.form-divider::after { height: 1px; flex: 1; background: var(--line-soft); content: ""; }
.capability-picker { display: grid; margin: 0; padding: 13px; border: 1px solid var(--line-soft); border-radius: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.capability-picker legend { padding: 0 5px; color: var(--text-2); font-size: 10px; }
.capability-picker label { display: flex; min-height: 30px; padding: 0 8px; border-radius: 6px; align-items: center; gap: 8px; color: var(--text-2); background: rgba(255,255,255,.018); font-size: 9px; }
.capability-picker input,
.check-field input { accent-color: var(--accent); }
.capability-warning { display: flex; margin-top: -2px; padding: 11px 12px; border: 1px solid rgba(245, 181, 81, .24); border-radius: 8px; align-items: flex-start; gap: 9px; color: #f5b551; background: rgba(245, 181, 81, .055); }
.capability-warning > .icon { width: 15px; height: 15px; flex: 0 0 auto; }
.capability-warning > span,
.capability-warning strong,
.capability-warning small { display: block; }
.capability-warning strong { color: #f1c47d; font-size: 10px; font-weight: 620; }
.capability-warning small { margin-top: 3px; color: #bca77f; font-size: 9px; line-height: 1.45; }
.check-field { display: flex; padding: 11px 12px; border: 1px solid var(--line-soft); border-radius: 8px; align-items: flex-start; gap: 10px; background: rgba(255,255,255,.012); }
.check-field input { margin-top: 2px; }
.check-field strong,
.check-field small { display: block; }
.check-field strong { color: var(--text); font-size: 10px; font-weight: 580; }
.check-field small { margin-top: 4px; color: var(--text-3); font-size: 9px; line-height: 1.45; }

.catalog-dialog__title { display: block; min-width: 0; }
.catalog-dialog__title h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-dialog__title code { display: block; margin-top: 4px; overflow: hidden; color: var(--text-3); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-dialog__actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.catalog-warning { display: flex; padding: 10px 18px; border-bottom: 1px solid rgba(245, 199, 111, 0.14); align-items: center; gap: 9px; color: #cbb88f; background: rgba(245, 199, 111, 0.045); font-size: 9px; line-height: 1.5; }
.catalog-warning .icon { width: 14px; height: 14px; flex: 0 0 auto; color: var(--warning); }
.catalog-dialog__body { min-height: 340px; overflow-y: auto; flex: 1; background: rgba(5, 7, 11, .32); }
.catalog-toolbar { position: sticky; z-index: 2; top: 0; display: flex; min-height: 57px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); align-items: center; justify-content: space-between; gap: 10px; background: rgba(13, 17, 24, .96); backdrop-filter: blur(12px); }
.catalog-toolbar .search-box { max-width: 520px; }
.catalog-grid { display: grid; padding: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.catalog-model { display: grid; min-width: 0; padding: 15px; border: 1px solid var(--line-soft); border-radius: 10px; align-content: start; gap: 12px; background: rgba(17, 21, 29, .74); }
.catalog-model[hidden] { display: none; }
.catalog-model__header { display: flex; min-width: 0; align-items: flex-start; justify-content: space-between; gap: 12px; }
.catalog-model__identity { display: block; min-width: 0; }
.catalog-model__identity strong,
.catalog-model__identity code,
.catalog-model__identity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.catalog-model__identity strong { color: var(--text); font-size: 11px; font-weight: 610; }
.catalog-model__identity code { margin-top: 4px; color: var(--accent); font-size: 9px; }
.catalog-model__identity small { margin-top: 5px; color: var(--text-3); font-size: 8px; }
.catalog-model__badges { display: flex; min-height: 20px; flex-wrap: wrap; gap: 5px; }
.catalog-modalities { display: grid; padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 8px; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; background: rgba(255,255,255,.012); }
.catalog-modalities > span:not(.catalog-modalities__arrow) { min-width: 0; }
.catalog-modalities small,
.catalog-model__metadata small { display: block; margin-bottom: 6px; color: var(--text-3); font-size: 8px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.catalog-modalities__arrow { color: var(--text-3); font-size: 11px; }
.catalog-chips { display: flex; min-width: 0; flex-wrap: wrap; gap: 4px; }
.catalog-chip { display: inline-block; max-width: 150px; padding: 3px 6px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 5px; color: var(--text-2); background: rgba(255,255,255,.018); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-facts { display: grid; margin: 0; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line-soft); border-radius: 8px; overflow: hidden; background: var(--line-soft); }
.catalog-facts div { min-width: 0; padding: 8px 9px; background: #10141b; }
.catalog-facts dt { color: var(--text-3); font-size: 8px; }
.catalog-facts dd { margin: 4px 0 0; overflow: hidden; color: var(--text-2); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-model__metadata { display: grid; gap: 9px; }
.catalog-model__metadata > span { min-width: 0; }
.catalog-model__linked { padding-top: 9px; border-top: 1px solid var(--line-soft); }
.catalog-loading,
.catalog-state { display: grid; min-height: 390px; padding: 36px; place-content: center; justify-items: center; text-align: center; }
.catalog-loading > strong,
.catalog-state h3 { margin: 13px 0 0; color: var(--text); font-size: 13px; font-weight: 610; }
.catalog-loading > p,
.catalog-state p { max-width: 430px; margin: 8px 0 0; color: var(--text-3); font-size: 10px; line-height: 1.55; }
.catalog-state > .icon { width: 24px; height: 24px; color: var(--text-3); }
.catalog-state .btn { margin-top: 17px; }
.catalog-spinner { color: var(--accent); animation: catalog-spin 900ms linear infinite; }
.catalog-spinner .icon { width: 25px; height: 25px; }
.catalog-loading__rows { display: grid; width: min(440px, 68vw); margin-top: 24px; gap: 8px; }
.catalog-loading__rows .skeleton { height: 44px; }
.catalog-privacy { display: inline-flex; margin-right: auto; align-items: center; gap: 7px; color: var(--text-3); font-size: 8px; }
.catalog-privacy .icon { width: 13px; height: 13px; }
.import-review { display: flex; margin-bottom: 17px; padding: 13px; border: 1px solid rgba(124, 185, 255, .18); border-radius: 9px; align-items: flex-start; gap: 10px; color: #aabed4; background: rgba(124, 185, 255, .045); }
.import-review > .icon { width: 16px; height: 16px; flex: 0 0 auto; color: var(--blue); }
.import-review > span { display: block; min-width: 0; }
.import-review strong,
.import-review small { display: block; }
.import-review strong { color: var(--text); font-size: 10px; font-weight: 610; }
.import-review small { margin-top: 5px; overflow-wrap: anywhere; color: var(--text-3); font-size: 9px; line-height: 1.5; }
.import-review code { color: var(--accent); }
.import-review__modalities { display: flex; margin-top: 9px; align-items: center; gap: 7px; }
.import-review__modalities b { color: var(--text-3); font-size: 9px; font-weight: 400; }
@keyframes catalog-spin { to { transform: rotate(360deg); } }

@keyframes fade-in { from { opacity: 0; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(7px) scale(0.99); } }
.dialog__header { display: flex; min-height: 61px; padding: 0 18px; border-bottom: 1px solid var(--line-soft); align-items: center; justify-content: space-between; }
.dialog__header h2 { margin: 0; font-size: 13px; font-weight: 620; }
.dialog__body { padding: 19px; }
.dialog__body > p { margin: 0 0 17px; color: var(--text-3); font-size: 11px; line-height: 1.55; }
.dialog__footer { display: flex; padding: 13px 18px; border-top: 1px solid var(--line-soft); justify-content: flex-end; gap: 8px; background: rgba(0,0,0,.12); }
.secret-box { position: relative; display: flex; margin: 15px 0; padding: 14px; border: 1px solid rgba(142, 240, 201, 0.2); border-radius: 9px; align-items: center; gap: 9px; background: rgba(142, 240, 201, 0.045); }
.secret-box code { min-width: 0; overflow: hidden; flex: 1; color: var(--accent); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.form-error { margin-top: 10px; color: var(--danger); font-size: 10px; }

.toast-region { position: fixed; z-index: 500; right: 18px; bottom: 18px; display: grid; width: min(350px, calc(100vw - 36px)); gap: 8px; pointer-events: none; }
.toast { display: flex; min-height: 48px; padding: 11px 13px; border: 1px solid #303846; border-radius: 9px; align-items: center; gap: 10px; color: var(--text-2); background: #161b24; box-shadow: 0 12px 35px rgba(0,0,0,.36); font-size: 10px; animation: toast-in 180ms ease-out; }
.toast .icon { color: var(--success); }
.toast--error .icon { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } }

.skeleton { position: relative; overflow: hidden; min-height: 15px; border-radius: 5px; background: var(--surface-2); }
.skeleton::after { position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent); content: ""; animation: shimmer 1.4s linear infinite; transform: translateX(-100%); }
@keyframes shimmer { to { transform: translateX(100%); } }

.muted { color: var(--text-3); }
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.noscript { position: fixed; z-index: 999; right: 16px; bottom: 16px; left: 16px; padding: 14px; border: 1px solid var(--danger); border-radius: 9px; color: var(--danger); background: #1a1013; text-align: center; }

@media (max-width: 1100px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid,
  .content-grid--wide { grid-template-columns: minmax(0, 1fr); }
  .playground { grid-template-columns: minmax(0, 1.4fr) minmax(265px, 0.65fr); }
  .gpu-array { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  :root { --sidebar: 264px; }
  .hero { grid-template-columns: 1fr; }
  .capacity-panel { width: min(520px, 100%); }
  .landing-main { padding-top: 65px; }
  .landing-divider { margin-top: 78px; }
  .modality-row { grid-template-columns: repeat(2, 1fr); }
  .portal-shell { display: block; }
  .sidebar { top: 31px; transform: translateX(-102%); transition: transform 180ms ease; box-shadow: 22px 0 50px rgba(0,0,0,.4); }
  .sidebar.open { transform: translateX(0); }
  .mobile-close { display: inline-flex; }
  .sidebar-overlay { position: fixed; z-index: 40; inset: 31px 0 0; background: rgba(1,3,5,.64); backdrop-filter: blur(3px); }
  .portal { margin-left: 0; }
  .mobile-header { position: sticky; z-index: 35; top: 31px; display: flex; height: 57px; padding: 0 18px; border-bottom: 1px solid var(--line-soft); align-items: center; justify-content: space-between; background: rgba(9,12,17,.92); backdrop-filter: blur(15px); }
  .page-wrap { padding-top: 27px; }
  .playground { grid-template-columns: 1fr; }
  .playground__settings { border-top: 1px solid var(--line-soft); border-left: 0; }
  .route-map__row { grid-template-columns: 28px minmax(0, 1fr); }
  .route-map__providers,
  .route-map__row > :last-child { grid-column: 2; }
  .catalog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .landing-nav { width: min(100% - 28px, 1180px); height: 66px; }
  .landing-nav .system-state { display: none; }
  .landing-main { width: min(100% - 28px, 1180px); padding-top: 46px; }
  .hero { gap: 49px; }
  .hero h1 { font-size: clamp(43px, 14vw, 62px); }
  .hero__copy { font-size: 16px; }
  .hero__actions .btn { flex: 1; }
  .modality-row { grid-template-columns: 1fr; }
  .modality { min-height: 132px; }
  .modality .icon { margin-bottom: 20px; }
  .landing-footer { width: min(100% - 28px, 1180px); align-items: flex-start; flex-direction: column; gap: 8px; }
  .preview-banner { padding: 0 8px; font-size: 9px; }
  .preview-banner span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-wrap { padding: 22px 14px 50px; }
  .page-header { margin-bottom: 20px; align-items: stretch; flex-direction: column; gap: 16px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { min-height: 125px; padding: 14px; }
  .metric-card__value { font-size: 23px; }
  .content-grid--equal { grid-template-columns: 1fr; }
  .toolbar { align-items: stretch; flex-wrap: wrap; }
  .search-box { width: 100%; max-width: none; flex-basis: 100%; }
  .data-table th,
  .data-table td { padding-right: 12px; padding-left: 12px; }
  .playground__main { min-height: 540px; }
  .composer__hint { display: none; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-toc { position: static; display: flex; overflow-x: auto; border-bottom: 1px solid var(--line-soft); }
  .docs-toc a { min-width: max-content; border-bottom: 2px solid transparent; border-left: 0; }
  .docs-toc a.active { border-bottom-color: var(--accent); border-left: 0; }
  .routing-flow { grid-template-columns: 1fr; }
  .routing-arrow { width: 1px; height: 22px; margin: 0 auto; }
  .gpu-array { grid-template-columns: 1fr; }
  .form-grid,
  .capability-picker { grid-template-columns: 1fr; }
  .dialog-backdrop { padding: 8px; }
  .dialog--catalog { width: 100%; max-height: calc(100vh - 16px); }
  .catalog-dialog__actions .badge { display: none; }
  .catalog-warning { padding-right: 12px; padding-left: 12px; }
  .catalog-toolbar { align-items: stretch; flex-wrap: wrap; }
  .catalog-toolbar .search-box { width: 100%; max-width: none; flex-basis: 100%; }
  .catalog-grid { padding: 9px; }
  .catalog-model { padding: 12px; }
  .catalog-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-privacy { display: none; }
}

@media (max-width: 500px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .page-actions { display: grid; width: 100%; grid-template-columns: 1fr; }
  .page-actions .btn { width: 100%; }
  .quick-row .badge { max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .provider-chain { align-items: flex-start; flex-direction: column; gap: 5px; }
  .provider-chain__arrow { margin-left: 7px; transform: rotate(90deg); }
  .target-chain { align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media (max-width: 390px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 112px; }
  .capacity-panel__inner { padding: 19px; }
  .page-actions { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
