:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --panel: rgba(255, 255, 255, 0.88);
  --panel-solid: #ffffff;
  --ink: #0f1117;
  --muted: #5b6170;
  --line: #e4e7ef;
  --line-strong: #cfd5e3;
  --accent: #6d28d9;
  --accent-bright: #7c3aed;
  --accent-soft: #ede9fe;
  --action-ink: #ffffff;
  --warn: #be123c;
  --ok: #059669;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1018;
  --bg-soft: #191b29;
  --panel: rgba(24, 25, 38, 0.92);
  --panel-solid: #1b1d2c;
  --ink: #f1effb;
  --muted: #b2b2c9;
  --line: #333549;
  --line-strong: #494b63;
  --accent: #c7b2ff;
  --accent-bright: #b59aff;
  --accent-soft: #32274c;
  --action-ink: #181126;
  --warn: #ff9fb4;
  --ok: #78e4b7;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* Дымчато-облачный светлый фон как на первом экране OpenRouter */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(620px 260px at 52% 9%, rgba(214, 220, 235, 0.62), transparent 70%),
    radial-gradient(540px 260px at 80% 18%, rgba(220, 226, 239, 0.72), transparent 68%),
    radial-gradient(520px 300px at 22% 14%, rgba(235, 238, 246, 0.85), transparent 72%),
    radial-gradient(460px 240px at 64% 48%, rgba(196, 181, 253, 0.18), transparent 70%),
    linear-gradient(180deg, #f7f8fb 0%, #eef1f7 34%, #ffffff 74%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(rgba(148, 163, 184, 0.22) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(95% 65% at 58% 24%, #000 15%, transparent 80%);
}
.shell {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 28px 80px;
}
.demo-ribbon {
  position: relative;
  z-index: 2;
  text-align: center;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--muted);
  padding: 7px 16px;
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

/* ==== Верхняя панель ==== */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 20px;
}
.brand-dot { color: var(--accent-bright); font-weight: 700; }
.brand-glyph {
  width: 26px;
  height: 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 58%, #38bdf8 100%);
  position: relative;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.65);
}
.brand-glyph::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ffffff;
  top: 5.5px;
  left: 6px;
  box-shadow: 7px 0 0 -1px rgba(255,255,255,0.85);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-links a {
  color: #272b36;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 150ms var(--ease-out), background 150ms var(--ease-out);
}
.nav-links a:hover { background: rgba(15, 23, 42, 0.05); color: var(--ink); }
.nav-links a.nav-cta {
  background: var(--accent-bright);
  color: var(--action-ink);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 9px;
  box-shadow: 0 6px 18px -6px rgba(124, 58, 237, 0.65);
}
.nav-links a.nav-cta:hover { background: var(--accent); color: var(--action-ink); }
.nav-user {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
}
.nav-links .theme-select {
  width: auto;
  max-width: 100%;
  padding: 6px 8px;
  font-size: 13px;
}

/* ==== Первый экран (OpenRouter style) ==== */
.hero {
  position: relative;
  min-height: 540px;
  display: grid;
  grid-template-columns: minmax(300px, 470px) minmax(0, 1fr);
  align-items: center;
  padding: 36px 0 28px;
}
.hero-copy {
  position: relative;
  z-index: 3;
}
.hero h1 {
  margin: 0;
  color: #0b0d13;
  font-size: clamp(46px, 6.2vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.045em;
  font-weight: 800;
  white-space: pre-line;
}
.hero-lead {
  margin: 22px 0 28px;
  font-size: 18px;
  line-height: 1.5;
  color: #4b5262;
  max-width: 40ch;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-action,
.hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  padding: 13px 22px;
  border-radius: 10px;
  transition: transform 150ms var(--ease-out), box-shadow 180ms var(--ease-out), background 150ms var(--ease-out);
}
.hero-action {
  background: var(--accent-bright);
  color: var(--action-ink);
  box-shadow: 0 12px 26px -10px rgba(124, 58, 237, 0.75);
}
.hero-action:hover { background: var(--accent); transform: translateY(-1px); }
.hero-secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
}
.hero-secondary:hover { background: #ffffff; border-color: #94a3b8; }
.hero-action:active,
.hero-secondary:active { transform: scale(0.97); }

.hero-stats {
  margin-top: 34px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.hero-stats div {
  display: flex;
  flex-direction: column;
}
.hero-stats strong {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hero-stats span {
  font-size: 13px;
  color: var(--muted);
}
.home-section { max-width: 1120px; margin: 0 auto; padding: 92px 0; }
.home-logo-strip { max-width: 1120px; margin: 18px auto 0; padding: 28px 0 34px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #64748b; }
.home-logo { display: inline-flex; align-items: center; gap: 8px; color: #64748b; font-weight: 800; font-size: 17px; letter-spacing: -.04em; opacity: .78; }
.home-logo b { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: #fff; background: #64748b; font-size: 10px; }
.home-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.home-section h2 { margin: 0; font-size: clamp(28px, 3.7vw, 48px); line-height: 1.06; letter-spacing: -.045em; font-weight: 800; color: var(--ink); }
.home-section-head p, .home-product-copy p, .home-policy-copy p { margin: 8px 0 0; max-width: 62ch; color: var(--muted); font-size: 16px; line-height: 1.55; }
.home-text-link { color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.home-text-link:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.home-category-tabs { display: flex; gap: 24px; overflow-x: auto; padding: 0 0 12px; border-bottom: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.home-category-tabs span { padding: 8px 2px; font-size: 14px; font-weight: 600; }
.home-category-tabs span.is-active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.home-model-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 20px; }
.home-model-tile { min-height: 80px; display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); text-decoration: none; background: rgba(255,255,255,.7); transition: border-color 160ms var(--ease-out), transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.home-model-tile:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 14px 28px -22px rgba(15,23,42,.24); }
.home-tile-icon { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: #eef2ff; color: #4f46e5; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.home-model-tile div { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.home-model-tile strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.home-model-tile small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-family: ui-monospace, monospace; font-size: 11px; }
.home-model-tile > b { color: var(--ok); font-size: 11px; font-weight: 700; }
.home-product { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.home-product.is-reverse { grid-template-columns: 7fr 5fr; }
.home-product.is-reverse .home-product-copy { order: 2; }
.home-product-copy { max-width: 420px; }
.home-product-copy .home-text-link { display: inline-block; margin-top: 18px; }
.home-product-visual { min-width: 0; }
.home-routing-card, .home-failover-card, .home-dashboard-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 20px 46px -28px rgba(15,23,42,.22); }
.home-terminal-head { padding: 13px 16px; border-bottom: 1px solid var(--line); background: #f8fafc; color: #64748b; font: 12px ui-monospace, monospace; }
.home-route-row { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 17px 18px 10px; color: #334155; font-size: 13px; }
.home-route-row b { color: var(--accent); font-size: 12px; }
.home-route-row i { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: linear-gradient(90deg, #8b5cf6, #c4b5fd); display: block; }
.home-status-row { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; padding: 17px 20px; border-bottom: 1px solid var(--line); color: #334155; font-size: 13px; }
.home-status-row:last-child { border-bottom: 0; }
.home-status-row b { font-size: 12px; color: var(--ok); }
.home-status-row .wait + span + b { color: #d97706; }
.home-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px #d1fae5; }
.home-status-dot.wait { background: #f59e0b; box-shadow: 0 0 0 4px #fef3c7; }
.home-dashboard-top, .home-dashboard-stats { display: flex; justify-content: space-between; gap: 12px; padding: 15px 18px; color: var(--muted); font-size: 12px; }
.home-dashboard-top b { color: var(--ink); }
.home-bars { height: 180px; padding: 22px 20px; display: flex; align-items: end; gap: 8px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0, transparent 43px, #eef2f7 44px); }
.home-bars i { flex: 1; min-height: 12px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #a78bfa, #6366f1); }
.home-dashboard-stats b { color: var(--ink); margin-left: 4px; }
.home-policy { display: grid; grid-template-columns: 5fr 7fr; gap: 64px; align-items: center; }
.home-policy-copy { max-width: 440px; }
.home-policy-copy .home-text-link { display: inline-block; margin-top: 18px; }
.home-policy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }
.home-policy-grid div { display: flex; align-items: center; gap: 9px; color: #334155; font-size: 14px; }
.home-policy-grid span { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%; color: #fff; background: var(--ok); font-size: 12px; }
.home-build { border-top: 1px solid var(--line); }
.home-app-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.home-app-grid article { padding: 22px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.7); }
.home-app-grid article > span { color: var(--accent); font-size: 22px; font-weight: 800; }
.home-app-grid h3 { margin: 18px 0 5px; font-size: 17px; }
.home-app-grid p { margin: 0; color: var(--muted); font-size: 14px; }
.home-cta { max-width: 1120px; margin: 20px auto 0; padding: 54px 60px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: 18px; background: #0b0e14; color: #fff; }
.home-cta h2 { color: #fff; font-size: clamp(28px, 4vw, 46px); }
.home-cta p { margin: 10px 0 0; color: #94a3b8; }
.home-cta .hero-action { flex-shrink: 0; }

/* ==== Орбитальная сцена и хромированный 3D-знак ==== */
.hero-stage {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.orbits-svg {
  width: 100%;
  max-width: 980px;
  height: auto;
  margin-left: 0;
  overflow: visible;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,0.8));
}
.r3d-scene {
  position: absolute;
  left: 53%;
  top: 49%;
  transform: translate(-50%, -50%);
  perspective: 760px;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.r3d-floor-shadow {
  position: absolute;
  width: 190px;
  height: 46px;
  bottom: 24px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(71, 85, 105, 0.28), rgba(124, 58, 237, 0.12) 58%, transparent 100%);
  filter: blur(8px);
  pointer-events: none;
}
.r3d-rotor {
  position: relative;
  width: 236px;
  height: 194px;
  transform-style: preserve-3d;
  cursor: grab;
  touch-action: none;
}
.r3d-rotor.is-dragging {
  cursor: grabbing;
}
.r3d-rotor:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 8px;
  border-radius: 18px;
}
.r3d-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transform-style: preserve-3d;
}
.r3d-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.r3d-hint {
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #64748b;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(203, 213, 225, 0.85);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
  pointer-events: none;
}
.orbit-planets-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.orbit-planet {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 4px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  color: var(--ink);
  transition: transform 180ms var(--ease-out);
}
.orbit-planet:hover,
.orbit-planet:focus-visible {
  background: transparent;
  transform: translate(-50%, -50%) scale(1.08);
  z-index: 20;
  outline: none;
}
.planet-sat-svg {
  width: 54px;
  height: 54px;
  overflow: visible;
  filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.10));
}
.planet-label {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(203, 213, 225, 0.95);
  font-size: 11.5px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);
}
.planet-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(6px) scale(0.96);
  transform-origin: bottom center;
  width: 228px;
  padding: 11px 13px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.28);
  box-shadow: 0 20px 42px -14px rgba(15, 23, 42, 0.45);
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}
.orbit-planet:hover .planet-tooltip,
.orbit-planet:focus-visible .planet-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}
.planet-tip-head {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  margin-bottom: 5px;
}
.planet-tip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.planet-tip-price {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #c4b5fd;
}
.planet-tip-sub {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 5px;
}
.planet-tip-list {
  margin: 0;
  padding-left: 15px;
  font-size: 12px;
  line-height: 1.45;
  color: #e2e8f0;
}
.floating-model-card {
  position: absolute;
  right: 0%;
  top: 48%;
  z-index: 6;
  width: 232px;
  padding: 15px 17px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(203, 213, 225, 0.9);
  box-shadow:
    0 22px 48px -18px rgba(15, 23, 42, 0.16),
    0 2px 6px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(12px);
}
.fmc-top {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}
.fmc-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.floating-model-card > strong {
  display: block;
  font-size: 16px;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}
.fmc-flagships {
  font-size: 11.5px;
  color: #64748b;
  margin-bottom: 10px;
  line-height: 1.35;
}
.fmc-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}
.fmc-meta b {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ==== Каталог и карточки ==== */
.hero-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-bright);
}
.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 18px 0 22px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.catalog-head h2 {
  margin: 0;
  font-size: clamp(24px, 2.8vw, 34px);
  letter-spacing: -0.03em;
}
.catalog-buy {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.catalog-search {
  width: 280px;
  max-width: 100%;
}
.model-id {
  margin-top: 4px;
  font-size: 12px;
  color: #64748b;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  margin-top: 18px;
}
.model-grid { margin-top: 0; }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  min-width: 0;
  overflow-wrap: anywhere;
  box-shadow: 0 10px 26px -18px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(8px);
}
.model-card {
  transition: transform 180ms var(--ease-out), border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .model-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: 0 18px 36px -18px rgba(15, 23, 42, 0.16);
  }
}
.model-desc { color: var(--muted); font-size: 14px; min-height: 42px; }
h2 { margin: 0 0 12px; font-size: 20px; letter-spacing: -0.02em; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.links { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 5px; color: var(--muted); }
input, select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--panel-solid);
  color: var(--ink);
}
input[type="checkbox"] { width: auto; }
input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.16);
}
button {
  padding: 10px 16px;
  border: 1px solid var(--accent-bright);
  border-radius: 9px;
  background: var(--accent-bright);
  color: var(--action-ink);
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 8px 20px -10px rgba(124, 58, 237, 0.75);
  transition: transform 150ms var(--ease-out), background 150ms var(--ease-out);
}
button:hover { background: var(--accent); }
button.ghost, .nav-logout {
  background: var(--panel-solid);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
button.ghost:hover, .nav-logout:hover { background: var(--bg-soft); }
button:active { transform: scale(0.97); }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent-bright); outline-offset: 2px; }
.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-soft);
}
.tag-ok {
  color: var(--ok);
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.price { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.mono, code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--muted); }
pre {
  background: #0f172a;
  border: 1px solid #1e293b;
  color: #e2e8f0;
  padding: 14px;
  border-radius: 10px;
  overflow-x: auto;
}
progress { width: 100%; height: 10px; accent-color: var(--accent-bright); }
fieldset { border: 1px solid var(--line); border-radius: 10px; margin: 14px 0; min-width: 0; }
legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0 6px; }
.status { min-height: 22px; color: var(--warn); font-weight: 600; margin: 8px 0 0; }

/* ==== Карточка выданного ключа ==== */
.key-banner {
  margin: 14px 0 26px;
  padding: 22px 24px;
  border-radius: 18px;
  background:
    radial-gradient(420px 180px at 96% 0%, rgba(124, 58, 237, 0.14), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 255, 0.94));
  border: 1px solid rgba(124, 58, 237, 0.28);
  box-shadow:
    0 20px 44px -22px rgba(109, 40, 217, 0.28),
    0 2px 8px rgba(15, 23, 42, 0.05);
}
.key-banner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.key-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}
.key-banner h2 {
  margin: 0 0 6px;
  font-size: 21px;
}
.key-banner-sub {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 68ch;
}
.key-close {
  padding: 7px 12px;
  font-size: 13px;
}
.key-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0f172a;
  border: 1px solid #1e293b;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.key-box-compact {
  margin: 10px 0 14px;
}
.key-code {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 4px 6px;
  user-select: all;
}
.key-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.key-copy-btn {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 8px;
}
.key-cabinet-link {
  padding: 8px 13px;
  font-size: 13px;
  border-radius: 8px;
}
.key-masked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  margin: 8px 0 14px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.key-masked {
  color: var(--ink);
  font-weight: 600;
}

/* ==== Страница /models в стиле OpenRouter ==== */
.or-models-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
  padding-top: 18px;
}
.or-sidebar {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}
.or-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.or-filter-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  padding: 4px 10px 6px;
  letter-spacing: -0.01em;
}
.or-side-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: none;
}
.or-side-item:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--ink);
}
.or-side-item.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  border-color: rgba(124, 58, 237, 0.22);
}
.or-side-count {
  font-size: 12px;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.or-reset-btn {
  width: 100%;
  font-size: 13px;
  padding: 8px 12px;
}
.or-main {
  min-width: 0;
}
.or-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.or-page-title {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.or-page-sub {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}
.or-checkout-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 8px 10px 8px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line-strong);
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.14);
}
.or-checkout-bar .or-period-select {
  width: auto;
  max-width: 100%;
}
.or-checkout-sum {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.or-checkout-sum span {
  font-size: 11.5px;
  color: var(--muted);
}
.or-checkout-sum strong {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.or-checkout-bar button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}
.or-controls-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 210px auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}
.or-search-input {
  height: 40px;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.94);
}
.or-sort-select {
  height: 40px;
  font-size: 13.5px;
  border-radius: 9px;
}
.or-view-toggle {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
}
.or-view-btn {
  background: transparent;
  color: var(--muted);
  border: 0;
  box-shadow: none;
  padding: 6px 11px;
  font-size: 13px;
  border-radius: 6px;
}
.or-view-btn:hover {
  background: transparent;
  color: var(--ink);
}
.or-view-btn.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}
.or-tabs-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.or-tab {
  background: transparent;
  color: var(--muted);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  box-shadow: none;
  padding: 9px 13px;
  font-size: 13.5px;
  font-weight: 600;
}
.or-tab:hover {
  background: transparent;
  color: var(--ink);
}
.or-tab.is-active {
  color: var(--accent-bright);
  border-bottom-color: var(--accent-bright);
}
.or-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.or-model-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.or-model-card:hover {
  border-color: var(--line-strong);
  box-shadow: 0 14px 32px -20px rgba(15, 23, 42, 0.16);
}
.or-model-card.is-selected {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.or-model-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.or-model-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}
.or-provider-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.or-title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.or-model-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.or-mod-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}
.or-tags-line {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 7px;
}
.or-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
}
.or-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.or-model-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.or-price-badge {
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.or-price-badge span {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
}
.or-period-select {
  width: 220px;
  height: 36px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
}
.or-period-select.is-picked {
  border-color: var(--accent-bright);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.or-model-desc {
  margin: 12px 0;
  font-size: 14px;
  line-height: 1.55;
  color: #475569;
}
.or-model-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: #64748b;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
}
.or-model-meta b {
  color: #334155;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.or-model-meta code {
  font-size: 12px;
  color: #334155;
  background: var(--bg-soft);
  padding: 1px 6px;
  border-radius: 5px;
}

/* ==== Экран входа и регистрации ==== */
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 460px);
  gap: 36px;
  align-items: stretch;
  margin-top: 22px;
}
.auth-showcase {
  position: relative;
  padding: 34px 36px;
  border-radius: 22px;
  background:
    radial-gradient(520px 260px at 90% 6%, rgba(124, 58, 237, 0.13), transparent 72%),
    radial-gradient(420px 240px at 6% 94%, rgba(56, 189, 248, 0.12), transparent 72%),
    rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  box-shadow: 0 22px 48px -28px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}
.auth-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 14px;
}
.auth-hero-title {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: var(--ink);
}
.auth-hero-lead {
  margin: 12px 0 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 56ch;
}
.auth-feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(226, 232, 240, 0.9);
}
.auth-feature-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  flex-shrink: 0;
}
.auth-feature-item strong {
  display: block;
  font-size: 14px;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.auth-feature-item p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}
.auth-code-card {
  border-radius: 14px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #1e293b;
}
.auth-code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #090d16;
  border-bottom: 1px solid #1e293b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: #94a3b8;
}
.auth-code-dots {
  display: inline-flex;
  gap: 6px;
}
.auth-code-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #334155;
  display: inline-block;
}
.auth-code-dots i:first-child { background: #fb7185; }
.auth-code-dots i:nth-child(2) { background: #fbbf24; }
.auth-code-dots i:nth-child(3) { background: #34d399; }
.auth-code-pre {
  margin: 0;
  border: 0;
  border-radius: 0;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #e2e8f0;
}
.auth-family-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.auth-family-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  color: #334155;
}
.auth-family-chip b {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
}

.auth-card {
  padding: 30px 30px 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(203, 213, 225, 0.95);
  box-shadow:
    0 28px 60px -24px rgba(15, 23, 42, 0.18),
    0 2px 8px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
}
.auth-card-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.auth-card-brand strong {
  display: block;
  font-size: 20px;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.auth-card-brand span {
  display: block;
  font-size: 12.5px;
  color: var(--muted);
}
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  margin-bottom: 18px;
}
.auth-tab {
  background: transparent;
  color: var(--muted);
  border: 0;
  box-shadow: none;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
}
.auth-tab:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--ink);
}
.auth-tab.is-active {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.auth-form-body {
  display: flex;
  flex-direction: column;
}
.oauth-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 4px;
}
.oauth-tile {
  height: 46px;
  border-radius: 10px;
  background: #0b0e14;
  border: 1px solid #1e2433;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 12px -4px rgba(15, 23, 42, 0.25);
  transition: transform 150ms var(--ease-out), border-color 150ms var(--ease-out), background 150ms var(--ease-out);
}
.oauth-tile:hover {
  background: #141923;
  border-color: #334155;
  transform: translateY(-1px);
}
.oauth-tile.is-active {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}
.oauth-svg {
  width: 22px;
  height: 22px;
  display: block;
}
.oauth-panel {
  margin: 10px 0 4px;
  padding: 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  border: 1px solid rgba(124, 58, 237, 0.28);
}
.oauth-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13.5px;
}
.auth-divider-top {
  margin: 14px 0 6px;
}
.auth-label {
  margin: 10px 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}
.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.auth-input {
  margin-top: 5px;
  height: 42px;
  padding: 10px 13px;
  border-radius: 10px;
  font-size: 14px;
  border: 1px solid var(--line-strong);
  background: #ffffff;
}
.auth-pwd-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-pwd-wrap .auth-input {
  padding-right: 84px;
}
.auth-eye-btn {
  position: absolute;
  right: 6px;
  top: 9px;
  height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  border: 0;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}
.auth-eye-btn:hover {
  background: #e2e8f0;
  color: var(--ink);
}
.auth-meter-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 16px;
}
.auth-meter-bar {
  flex: 1;
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.auth-meter-fill {
  width: 0%;
  height: 100%;
  background: #f59e0b;
  transition: width 160ms var(--ease-out), background 160ms var(--ease-out);
}
.auth-meter-fill.is-ready {
  background: var(--ok);
}
.auth-meter-text {
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.auth-submit-btn {
  width: 100%;
  height: 44px;
  font-size: 14.5px;
  border-radius: 10px;
  margin-top: 4px;
}
.auth-quick-Action {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}
.auth-inline-link {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  color: var(--accent-bright);
  font-size: 13px;
  font-weight: 600;
}
.auth-inline-link:hover {
  background: transparent;
  color: var(--accent);
  text-decoration: underline;
}
.auth-divider {
  position: relative;
  text-align: center;
  margin: 18px 0 14px;
}
.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid var(--line);
}
.auth-divider span {
  position: relative;
  padding: 0 10px;
  background: #ffffff;
  font-size: 11.5px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-bottom-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-alt-btn,
.auth-alt-link {
  width: 100%;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.auth-reset-note {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
}

/* Тёмная палитра для поверхностей, у которых в светлой теме свой фон. */
[data-theme="dark"] body::before {
  background: radial-gradient(700px 460px at 70% 4%, #292340 0%, transparent 78%), linear-gradient(180deg, #151522, var(--bg) 65%);
}
[data-theme="dark"] :is(.home-model-tile, .home-routing-card, .home-failover-card, .home-dashboard-card, .home-app-grid article,
  .or-checkout-bar, .or-model-card, .or-pill, .or-search-input, .or-view-btn.is-active, .auth-card, .auth-feature-item,
  .auth-tab.is-active, .auth-input, .auth-divider span, .auth-family-chip, .auth-pill-badge, .floating-model-card, .planet-label,
  .r3d-hint, .nav-user, .hero-secondary, .demo-ribbon, .key-banner) {
  background: var(--panel-solid);
  border-color: var(--line);
}
[data-theme="dark"] .auth-showcase {
  background: radial-gradient(520px 260px at 90% 6%, #302447, transparent), var(--panel);
}
[data-theme="dark"] :is(.nav-links a:not(.nav-cta), .hero h1, .planet-label, .auth-label, .or-model-meta :is(b, code)) { color: var(--ink); }
[data-theme="dark"] :is(.hero-copy p:not(.hero-kicker), .home-logo, .home-logo-strip, .home-route-row, .home-status-row, .home-policy-grid div,
  .or-model-desc, .or-model-meta, .or-side-count, .or-pill, .auth-family-chip, .auth-pill-badge, .auth-divider span,
  .model-id, .fmc-flagships, .r3d-hint, .home-terminal-head) { color: var(--muted); }
[data-theme="dark"] :is(.home-terminal-head, .or-mod-badge) { background: var(--bg-soft); }
[data-theme="dark"] .or-mod-badge { color: #a9c4ff; }
[data-theme="dark"] :is(.site-nav, .or-model-meta, .fmc-meta) { border-color: var(--line); }
[data-theme="dark"] .tag-ok { background: #152b27; border-color: #285044; }
[data-theme="dark"] .home-bars { background: repeating-linear-gradient(to bottom, transparent 0, transparent 43px, var(--line) 44px); }
[data-theme="dark"] :is(.hero-secondary:hover, .auth-eye-btn:hover, .or-period-select.is-picked) { background: var(--accent-soft); }
[data-theme="dark"] .or-model-card.is-selected { border-color: var(--accent-bright); }
[data-theme="dark"] .card a:not([class]) { color: var(--accent); }

/* ==== Широкая панель администратора, сетка моделей и модальные окна ==== */
.shell.is-admin-wide {
  max-width: 100%;
  padding: 12px 24px 80px;
}
.admin-wide {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 14px;
}
.admin-top-bar {
  position: sticky;
  top: 8px;
  z-index: 20;
  backdrop-filter: blur(14px);
}
.admin-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-probe-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin: 12px 0;
}
.probe-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  cursor: pointer;
  font-size: 13px;
}
.probe-chip strong { font-size: 17px; }
.probe-chip-ok { border-color: rgba(5, 150, 105, 0.4); }
.probe-chip-ok strong { color: var(--ok); }
.probe-chip-fail { border-color: rgba(190, 18, 60, 0.35); }
.probe-chip-fail strong { color: var(--warn); }
.probe-chip-pub strong { color: var(--accent); }
.admin-filter-bar input {
  flex: 1 1 260px;
  margin: 0;
}
.admin-filter-bar select {
  width: auto;
  min-width: 210px;
  margin: 0;
}
.admin-models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 14px;
  align-items: start;
}
.admin-model-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  margin: 0;
}
.admin-model-card.is-published {
  border-color: var(--accent-bright);
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.admin-model-card.is-dirty {
  border-color: var(--ok);
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.25);
}
.admin-rules-content h3 {
  margin: 14px 0 6px;
  font-size: 15px;
}
.admin-rules-content p {
  margin: 4px 0;
  font-size: 13px;
  line-height: 1.5;
}
.admin-card-head {
  align-items: flex-start;
  gap: 8px;
}
.admin-mass-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  font-size: 15px;
}
.admin-mass-check input { width: auto; margin: 0; }
.admin-card-toggles {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-pub-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.admin-pub-toggle input { width: auto; margin: 0; }
.admin-describe-btn {
  padding: 5px 10px;
  font-size: 12px;
}
.admin-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.admin-field-row label, .admin-model-card > label {
  font-size: 12px;
  margin: 0;
}
.admin-model-card input:not([type="checkbox"]), .admin-model-card textarea {
  width: 100%;
  margin-top: 3px;
  padding: 6px 8px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
}
.admin-sources-details {
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--bg-soft);
}
.admin-sources-details summary {
  cursor: pointer;
  font-weight: 600;
}
.admin-sources-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  max-height: 140px;
  overflow-y: auto;
}
.admin-sources-list label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 12px;
}
.admin-sources-list input { width: auto; margin: 0; }
.src-ok { color: var(--ok); }
.src-fail { color: var(--warn); }
.tag-fail {
  background: rgba(190, 18, 60, 0.12);
  color: var(--warn);
  border: 1px solid rgba(190, 18, 60, 0.3);
}
.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(10, 12, 20, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.admin-modal {
  width: min(760px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  background: var(--panel-solid);
}
.admin-modal-scroll {
  overflow-y: auto;
  max-height: 58vh;
  padding-right: 4px;
}
.guide-page {
  max-width: 1120px;
  margin: 34px auto 90px;
}
.guide-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(30px, 6vw, 72px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: radial-gradient(circle at 88% 18%, rgba(124, 58, 237, .25), transparent 34%), linear-gradient(135deg, var(--panel-solid), var(--bg-soft));
}
.guide-hero::after {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  right: 7%;
  bottom: -150px;
  border: 1px solid rgba(167, 139, 250, .45);
  border-radius: 50%;
  box-shadow: 0 0 0 24px rgba(167, 139, 250, .07), 0 0 0 48px rgba(56, 189, 248, .05);
}
.guide-hero h1 {
  max-width: 620px;
  margin: 10px 0 14px;
  font-size: clamp(42px, 7vw, 78px);
  letter-spacing: 0;
}
.guide-hero p:not(.hero-kicker) {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}
.guide-hero-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.guide-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  margin-top: 28px;
}
.guide-toc {
  position: sticky;
  top: 24px;
  align-self: start;
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}
.guide-toc strong {
  margin-bottom: 8px;
  color: var(--ink);
}
.guide-toc a {
  padding: 7px 8px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.guide-toc a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}
.guide-sections {
  display: grid;
  gap: 14px;
}
.guide-section {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  padding: 28px 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  scroll-margin-top: 24px;
}
.guide-section-number {
  color: var(--accent-bright);
  font: 700 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.guide-section h2 {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 24px;
  letter-spacing: 0;
}
.guide-section p {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.65;
}
.guide-base-url {
  display: block;
  width: fit-content;
  margin: 14px 0;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-soft);
  color: var(--accent);
  font: 600 14px ui-monospace, SFMono-Regular, Menlo, monospace;
}
.guide-code {
  overflow-x: auto;
  margin: 14px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #111827;
  color: #dbeafe;
  font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
}
@media (max-width: 760px) {
  .guide-page { margin: 18px 0 60px; }
  .guide-layout { display: block; }
  .guide-toc { position: static; margin-bottom: 14px; }
  .guide-section { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 22px 18px; }
  .guide-section h2 { font-size: 21px; }
  .guide-hero { padding: 30px 22px; }
}
.promo-row {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
}
.promo-row .mono {
  font-size: 12px;
  word-break: break-all;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chrome-emblem { animation: none; }
  button, .hero-action, .hero-secondary, .model-card { transition: none; }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 24px 0; }
  .hero-stage { min-height: 360px; }
  .orbits-svg { width: 100%; margin-left: 0; }
  .floating-model-card { right: 12px; top: auto; bottom: 12px; }
  .or-models-layout { grid-template-columns: 1fr; gap: 20px; }
  .or-sidebar { position: static; border-right: 0; border-bottom: 1px solid var(--line); padding-right: 0; padding-bottom: 16px; }
  .or-controls-row { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .home-section { padding: 68px 0; }
  .home-product, .home-product.is-reverse, .home-policy { grid-template-columns: 1fr; gap: 28px; }
  .home-product.is-reverse .home-product-copy { order: 0; }
}
@media (max-width: 480px) {
  .shell { padding: 10px 16px 56px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
  .hero-stage { min-height: 270px; overflow: clip; }
  .auth-showcase, .auth-card { padding: 22px 18px; }
  .floating-model-card { position: static; width: 100%; margin-top: -12px; }
  .hero-stage { flex-direction: column; }
  .home-logo-strip { justify-content: center; gap: 14px 20px; }
  .home-logo { font-size: 13px; }
  .home-section-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .home-model-grid, .home-app-grid { grid-template-columns: 1fr; }
  .home-policy-grid { grid-template-columns: 1fr; }
  .home-cta { align-items: flex-start; flex-direction: column; padding: 34px 24px; }
  .home-dashboard-stats { flex-wrap: wrap; }
}
