/* Dark compute-market visual system inspired by the supplied reference. */
:root {
  --radius-sm: 5px;
  --radius: 8px;
  --radius-lg: 8px;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .18);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, .22);
  --shadow-md: 0 18px 48px rgba(0, 0, 0, .3);
  --shadow-lg: 0 28px 80px rgba(0, 0, 0, .42);
  --font: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", Consolas, monospace;
}

.home-page,
.model-market-page,
.docs-page,
.user-console-page,
.admin-page {
  --bg: #07090b;
  --bg-grad: none;
  --surface: #101214;
  --surface-2: #15181a;
  --surface-3: #0b0d0f;
  --surface-hover: #191d1f;
  --line: #292e31;
  --line-soft: #202427;
  --text: #d7dcda;
  --text-strong: #ffffff;
  --muted: #939b98;
  --muted-2: #66706c;
  --primary: #00e58a;
  --primary-strong: #19f29a;
  --primary-soft: rgba(0, 229, 138, .12);
  --primary-ink: #03130c;
  --warning: #ffb84d;
  --danger: #ff626b;
  --danger-soft: rgba(255, 98, 107, .12);
  --success: #00e58a;
  --info: #74b7ff;
  color: var(--text);
}

html { background: #07090b; }
body {
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}
button,
input,
select,
textarea { letter-spacing: 0; }
::selection { color: #06140e; background: #00e58a; }

button,
.primary-action,
.secondary-action,
.ghost-button,
.ghost-light-button,
.inline-form button,
.inline-model-form button,
.form-panel button,
.home-auth-form button,
.settings-form button,
.modal-form button,
.task-primary-btn,
.task-reset-btn,
.copy-key-button,
.table-action,
.task-link-btn,
.nav-item,
.nav-link,
.home-auth-tabs button,
.center-tabs button,
.category-tabs button,
.admin-model-tabs button,
.docs-aside a,
.docs-titlebar a,
.market-actions a,
.row-actions button,
.admin-card-actions button,
.table-pagination button,
.nav-auth,
.grid-toggle,
#model-search-btn,
#model-reset-btn {
  border-radius: 5px;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: none;
}

.primary-action,
.form-panel button,
.home-auth-form button,
.inline-form button,
.inline-model-form button,
.settings-form button,
.modal-form button,
.wallet-recharge-panel > button,
.task-primary-btn,
#model-search-btn,
.grid-toggle,
.docs-titlebar a,
.home-auth-tabs button.active,
.center-tabs button.active,
.copy-row button {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}

.primary-action:hover,
.form-panel button:hover,
.home-auth-form button:hover,
.inline-form button:hover,
.inline-model-form button:hover,
.settings-form button:hover,
.modal-form button:hover,
.wallet-recharge-panel > button:hover,
.task-primary-btn:hover,
#model-search-btn:hover,
.grid-toggle:hover,
.docs-titlebar a:hover,
.copy-row button:hover {
  border-color: var(--primary-strong);
  background: var(--primary-strong);
  box-shadow: 0 0 24px rgba(0, 229, 138, .16);
}

.secondary-action,
.ghost-button,
.ghost-light-button,
.task-reset-btn,
#model-reset-btn,
.docs-aside a,
.home-auth-tabs button,
.center-tabs button,
.category-tabs button,
.admin-model-tabs button,
.nav-auth {
  border-color: var(--line);
  background: var(--surface);
  color: var(--text);
}

.secondary-action:hover,
.ghost-button:hover,
.ghost-light-button:hover,
.task-reset-btn:hover,
#model-reset-btn:hover,
.docs-aside a:hover,
.nav-auth:hover {
  border-color: rgba(0, 229, 138, .55);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

input,
select,
textarea {
  height: 42px;
  border-color: var(--line);
  border-radius: 5px;
  background: #0d0f11;
  color: var(--text-strong);
}
input::placeholder,
textarea::placeholder { color: var(--muted-2); }
input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 229, 138, .1);
}
.home-page input,
.home-page select,
.home-page textarea,
.user-console-page input,
.user-console-page select,
.user-console-page textarea,
.model-market-page input,
.model-market-page select,
.docs-page input,
.docs-page select { color-scheme: dark; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  margin: 0 0 18px;
  padding: 0 16px;
  border: 1px solid rgba(0, 229, 138, .38);
  border-radius: 999px;
  background: rgba(0, 229, 138, .07);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand { gap: 10px; color: #fff; }
.brand-mark,
.market-logo-mark {
  border-radius: 50%;
  background: var(--primary);
  color: #03130c;
  box-shadow: 0 0 24px rgba(0, 229, 138, .16);
}
.brand-name { color: #fff; font-weight: 700; }

/* Shared public navigation */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  width: 100%;
  height: 74px;
  margin: 0;
  padding: 0 max(48px, calc((100% - 1344px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, .035);
  background: rgba(5, 8, 10, .84);
  backdrop-filter: blur(18px);
}
.site-header .brand,
.docs-header .brand { color: #fff; }
.site-header nav { gap: 10px; }
.site-header nav a,
.site-header nav button {
  position: relative;
  height: 40px;
  padding: 0 14px;
  color: #b8c0bd;
  font-size: 14px;
  font-weight: 500;
}
.site-header nav a::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -8px;
  height: 2px;
  background: transparent;
}
.site-header nav a:hover,
.site-header nav button:hover,
.site-header nav a.active { color: #fff; }
.site-header nav a:hover::after,
.site-header nav a.active::after { background: var(--primary); }
.site-header .nav-auth {
  margin-left: 12px;
  min-width: 104px;
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}
.site-header .nav-auth:hover {
  border-color: var(--primary-strong);
  background: var(--primary-strong);
  color: var(--primary-ink);
}

/* Immersive home */
.home-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: #07090b;
  color: var(--text);
}
#compute-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: #07090b;
}
.home-page main { position: relative; z-index: 1; }
.hero {
  width: min(1180px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  padding: 122px 0 120px;
  text-align: center;
}
.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 920px;
}
.hero h1 {
  margin: 0;
  max-width: 1000px;
  color: #fff;
  font-size: 64px;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: 0;
  text-shadow: 0 10px 50px rgba(0, 0, 0, .6);
}
.headline-char {
  display: inline-block;
  transform-origin: 50% 85%;
  animation-name: headline-enter, headline-hop;
  animation-duration: .7s, 4.8s;
  animation-delay: calc(var(--char-index) * 55ms), calc(1.5s + var(--char-index) * 95ms);
  animation-timing-function: cubic-bezier(.2, .8, .2, 1), ease-in-out;
  animation-iteration-count: 1, infinite;
  animation-fill-mode: both, both;
}
.headline-char.accent { color: var(--primary); }
@keyframes headline-enter {
  0% { opacity: 0; transform: translateY(26px) scale(.9); filter: blur(5px); }
  65% { opacity: 1; transform: translateY(-4px) scale(1.03); filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes headline-hop {
  0%, 84%, 100% { transform: translateY(0) scale(1); }
  89% { transform: translateY(-9px) scale(1.02); }
  94% { transform: translateY(2px) scale(.99); }
}
.hero-dynamic-line {
  margin: 18px 0 0;
  color: #f4f7f5;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
}
.hero-dynamic-line strong {
  display: inline-block;
  min-width: 112px;
  color: var(--primary);
  transition: opacity .22s ease, transform .22s ease, filter .22s ease;
}
.hero-dynamic-line strong.is-leaving {
  opacity: 0;
  transform: translateY(-10px);
  filter: blur(4px);
}
.hero-dynamic-line strong.is-entering { animation: rotating-word-in .42s cubic-bezier(.2,.8,.2,1); }
@keyframes rotating-word-in {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
.hero-text {
  max-width: 760px;
  margin: 26px 0 0;
  color: #b2bbb7;
  font-size: 17px;
  line-height: 1.9;
}
.hero-actions {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}
.hero-actions .primary-action {
  min-width: 164px;
  height: 54px;
  padding: 0 30px;
  border-radius: 8px;
  font-size: 16px;
}
.hero-actions .primary-action::after { content: "  →"; }
.hero-actions .secondary-action { display: none; }
.terminal-panel { display: none; }

.metrics-band {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: 58px;
  margin: -58px 0 0;
  padding: 0 max(48px, calc((100% - 1240px) / 2));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-width: 1px 0;
  border-radius: 0;
  border-color: #22272a;
  background: rgba(16, 18, 20, .96);
  backdrop-filter: blur(14px);
}
.metrics-band div {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border-right-color: #24292c;
}
.metrics-band strong { color: #fff; font-size: 16px; font-weight: 700; }
.metrics-band span { color: #858e8a; font-size: 12px; }

.content-section {
  position: relative;
  z-index: 1;
  width: min(1392px, calc(100% - 48px));
  margin: 0 auto;
  padding: 100px 0 120px;
}
.section-heading { text-align: center; }
.section-heading .eyebrow { margin-bottom: 18px; }
.section-heading h2 {
  margin: 0;
  color: #fff;
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 0;
}
.model-grid {
  margin-top: 46px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.model-card {
  min-height: 210px;
  padding: 26px;
  border: 1px solid #2a2f32;
  border-radius: 8px;
  background: rgba(16, 18, 20, .93);
  transition: border-color .18s ease, background .18s ease;
}
.model-card:hover {
  transform: none;
  border-color: rgba(0, 229, 138, .45);
  background: #121618;
}
.model-card h3 { color: #fff; font-size: 17px; }
.model-card p { color: #abb3b0; }
.model-card code { color: #8ab8df; }
.price-lines strong { color: var(--primary); }
.site-footer {
  width: min(1344px, calc(100% - 48px));
  color: var(--muted);
  border-top-color: var(--line);
}

/* Homepage continuation */
.access-route-section {
  position: relative;
  z-index: 2;
  padding: 118px max(48px, calc((100% - 1120px) / 2)) 126px;
  border-bottom: 1px solid #191d1f;
  background: #07090b;
}
.route-heading,
.ecosystem-heading {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}
.route-heading > span,
.ecosystem-heading > span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(0, 229, 138, .1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}
.route-heading h2,
.ecosystem-heading h2 {
  margin: 24px 0 0;
  color: #fff;
  font-size: 38px;
  line-height: 1.2;
  letter-spacing: 0;
}
.route-heading p,
.ecosystem-heading p {
  margin: 16px 0 0;
  color: #a8b0ad;
  font-size: 15px;
}
.route-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
  margin-top: 56px;
}
.route-grid article {
  grid-column: span 2;
  min-height: 228px;
  padding: 28px 30px;
  border: 1px solid #2a2f32;
  border-radius: 8px;
  background: #101214;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
.route-grid article:nth-child(4),
.route-grid article:nth-child(5) { grid-column: span 3; }
.route-grid article:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 229, 138, .48);
  background: #121618;
}
.route-grid article > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(0, 229, 138, .14);
  color: var(--primary);
  font-weight: 800;
}
.route-grid h3 {
  margin: 22px 0 0;
  color: #fff;
  font-size: 18px;
}
.route-grid p {
  min-height: 48px;
  margin: 12px 0 0;
  color: #b2bab6;
  line-height: 1.7;
}
.route-grid a {
  display: inline-flex;
  margin-top: 18px;
  color: var(--primary);
  font-weight: 700;
}
.route-grid a:hover { color: var(--primary-strong); }

.model-ecosystem-section {
  width: 100%;
  margin: 0;
  padding: 120px max(48px, calc((100% - 1120px) / 2)) 132px;
  background: #17191b;
  text-align: center;
}
.model-ecosystem-section .section-heading { display: none; }
.model-ecosystem-section .model-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  max-width: 1100px;
  margin: 54px auto 0;
}
.model-pill {
  min-width: 130px;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid rgba(0, 229, 138, .12);
  border-radius: 7px;
  background: rgba(0, 229, 138, .14);
  color: #e5fbf1;
  font-size: 14px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.model-pill:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 229, 138, .55);
  background: rgba(0, 229, 138, .22);
}
.ecosystem-link {
  min-width: 166px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 42px;
  border: 1px solid var(--primary);
  border-radius: 8px;
  color: var(--primary);
  font-weight: 700;
}
.ecosystem-link:hover { background: var(--primary); color: var(--primary-ink); }

.route-heading,
.route-grid article,
.ecosystem-heading,
.model-pill {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1);
}
.route-grid article:nth-child(2) { transition-delay: 80ms; }
.route-grid article:nth-child(3) { transition-delay: 160ms; }
.route-grid article:nth-child(4) { transition-delay: 80ms; }
.route-grid article:nth-child(5) { transition-delay: 160ms; }
.model-pill { transition-delay: calc(var(--pill-index) * 45ms); }
.route-heading.is-visible,
.route-grid article.is-visible,
.ecosystem-heading.is-visible,
.model-pill.is-visible { opacity: 1; transform: translateY(0); }

.modal-backdrop {
  background: rgba(0, 0, 0, .78);
  backdrop-filter: blur(8px);
}
.modal-card {
  border-color: var(--line);
  background: #101214;
  color: var(--text);
}
.modal-close { border-color: var(--line); background: #171a1c; color: #fff; }
.home-auth-form h2 { color: #fff; }
.home-auth-form input { border-color: var(--line); background: #090b0d; color: #fff; }

/* Model directory uses the same top navigation language */
.model-market-page {
  display: block;
  min-height: 100vh;
  padding-top: 74px;
  background: #07090b;
}
.market-sidebar {
  display: block;
  position: fixed;
  inset: 0 0 auto;
  z-index: 22;
  width: 100%;
  min-height: 74px;
  height: 74px;
  border: 0;
  background: transparent;
  pointer-events: none;
}
.market-logo {
  position: absolute;
  left: max(48px, calc((100% - 1344px) / 2));
  top: 0;
  height: 74px;
  padding: 0;
  border: 0;
  color: #fff;
  pointer-events: auto;
}
.market-logo-mark {
  width: 36px;
  height: 36px;
  min-width: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  font-size: 13px;
}
.market-sidebar > nav { display: none; }
.market-main { min-width: 0; }
.market-topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  width: 100%;
  height: 74px;
  padding: 0 max(48px, calc((100% - 1344px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, .035);
  background: rgba(5, 8, 10, .9);
  backdrop-filter: blur(18px);
}
.market-topbar nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  gap: 32px;
}
.market-topbar a { color: #b8c0bd; }
.market-topbar a.active,
.market-topbar a:hover { color: #fff; }
.market-topbar a.active { box-shadow: inset 0 -2px var(--primary); }
.market-actions a {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}
.market-content {
  width: min(1392px, calc(100% - 48px));
  margin: 0 auto;
  padding: 46px 0 80px;
}
.market-hero {
  display: block;
  padding: 20px 0 42px;
  text-align: center;
  border: 0;
  background: transparent;
}
.market-kicker {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(0, 229, 138, .1);
  color: var(--primary);
}
.market-title h1 {
  margin-top: 24px;
  color: #fff;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 0;
}
.market-title p {
  max-width: 740px;
  margin: 16px auto 0;
  color: #aeb6b3;
}
.market-stats { display: none; }
.category-tabs {
  justify-content: center;
  margin: 4px 0 20px;
}
.category-tabs button {
  border-color: #2b3033;
  background: #101214;
  color: #aeb6b3;
}
.category-tabs button.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-ink);
}
.market-filter {
  border: 1px solid #292e31;
  border-radius: 8px;
  background: #101214;
}
.search-box { border-color: #292e31; background: #0b0d0f; }
.market-model-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.market-model-card {
  min-height: 340px;
  border-color: #2b3033;
  border-radius: 8px;
  background: #101214;
  box-shadow: none;
}
.market-model-card:hover {
  transform: none;
  border-color: rgba(0, 229, 138, .45);
  box-shadow: 0 0 30px rgba(0, 229, 138, .05);
}
.market-model-card h2 { color: #fff; }
.market-model-card p { color: #afb7b4; }
.model-icon { border-radius: 5px; background: var(--primary-soft); color: var(--primary); }
.price-board { border-color: #292e31; background: #0b0d0f; }

/* App shells */
.console-page { background: #090b0d; }
.console-page.console-authed,
.admin-page.console-authed,
.user-console-page.console-authed { grid-template-columns: 240px minmax(0, 1fr); }
.console-sidebar {
  background: #0b0d0f;
  border-right-color: #24292c;
}
.console-sidebar .brand {
  height: 66px;
  padding: 0 18px;
  border-bottom-color: #24292c;
  color: #fff;
}
.console-sidebar nav { gap: 4px; padding: 18px 12px; }
.nav-group { color: #59625e; letter-spacing: .06em; }
.nav-item,
.nav-link {
  position: relative;
  height: 42px;
  color: #89928e;
}
.nav-item:hover,
.nav-link:hover { background: #141719; color: #fff; }
.nav-item.active { background: rgba(0, 229, 138, .1); color: var(--primary); }
.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background: var(--primary);
}
.console-sidebar small { border-top: 1px solid #202427; color: #59625e; }
.console-main { background: #090b0d; }
.console-topbar {
  height: 66px;
  padding: 0 32px;
  border-bottom-color: #24292c;
  background: rgba(11, 13, 15, .94);
  backdrop-filter: blur(14px);
}
.console-topbar a,
.console-topbar span { color: #8f9894; }
.console-topbar a:hover,
.console-topbar span { color: #fff; }
.dashboard-header {
  padding: 30px 32px 24px;
  border-bottom: 0;
  background: transparent;
}
.dashboard-header h1 { color: #fff; font-size: 30px; letter-spacing: 0; }
.dashboard-header .eyebrow {
  min-height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.panel { padding: 12px 32px 44px; }
.panel-heading {
  min-height: 64px;
  margin-bottom: 18px;
  padding: 0 0 18px;
  border-width: 0 0 1px;
  border-radius: 0;
  border-color: #282d30;
  background: transparent;
}
.admin-page .panel-heading { border-color: #282d30; background: transparent; }
.panel-heading h2 { color: #fff; }
.panel-heading p { color: #8f9894; }
.stat-grid { gap: 14px; }
.stat-grid > div {
  min-height: 132px;
  padding: 22px;
  border-color: #2a2f32;
  border-radius: 8px;
  background: #101214;
  box-shadow: none;
}
.stat-grid strong { color: #fff; }
.table-shell {
  margin-top: 0;
  border-color: #292e31;
  border-radius: 8px;
  background: #101214;
}
th,
td { border-bottom-color: #22272a; }
th { background: #15181a; color: #8d9692; }
td { color: #d5dbd8; }
tbody tr:hover { background: #141719; }
.admin-page .table-shell,
.admin-page .settings-form,
.admin-page .admin-price-card,
.admin-page .admin-model-toolbar { box-shadow: none; }
.form-panel,
.settings-form {
  border-color: #292e31;
  border-radius: 8px;
  background: #101214;
  box-shadow: none;
}
.form-panel { padding: 28px; }
.form-panel h2 { color: #fff; }
.settings-form { padding: 24px; }
.settings-hint { border-color: #292e31; background: #0b0d0f; }
.notice { border-color: rgba(0, 229, 138, .35); background: var(--primary-soft); color: var(--primary); }
.balance-pill { border-color: #292e31; background: #101214; }

/* Auth pages */
.console-page:not(.console-authed) .console-main {
  position: relative;
  overflow: hidden;
  background: #07090b;
}
.console-page:not(.console-authed) .console-main::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-size: 48px 48px;
  background-image: linear-gradient(#28302c 1px, transparent 1px), linear-gradient(90deg, #28302c 1px, transparent 1px);
  mask-image: linear-gradient(to bottom, transparent, #000 34%, #000 66%, transparent);
}
.auth-layout,
.admin-login-layout {
  position: relative;
  z-index: 1;
  gap: 60px;
}
.auth-layout h1,
.admin-login-copy h1 {
  color: #fff;
  font-size: 50px;
  line-height: 1.15;
  letter-spacing: 0;
}
.auth-layout p,
.admin-login-copy p { color: #98a19d; }
.auth-forms { gap: 16px; }
.admin-login-form { min-height: 300px; align-content: center; }

/* Documentation */
.docs-page { padding-top: 74px; background: #090b0d; }
.docs-header { background: rgba(5, 8, 10, .9); border-bottom-color: rgba(255,255,255,.04); }
.docs-header nav a { color: #a9b1ae; }
.docs-header nav a.active,
.docs-header nav a:hover { color: #fff; }
.docs-shell {
  width: min(1480px, calc(100vw - 48px));
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
  padding-top: 28px;
}
.docs-aside {
  top: 96px;
  border-color: #292e31;
  background: #101214;
}
.docs-aside > span,
.docs-titlebar span { color: var(--primary); }
.docs-aside h1 { color: #fff; }
.docs-aside p { color: #939c98; }
.docs-auth-card { border-color: rgba(0,229,138,.3); background: var(--primary-soft); }
.docs-auth-card code { color: var(--primary); }
.docs-aside a { background: #15181a; color: #d9dfdc; }
.docs-nav-panel { border-top-color: #282d30; }
.docs-nav-panel > strong { color: #fff; }
.docs-nav-list a { border-color: #292e31; background: #15181a; }
.docs-nav-list a span { background: var(--primary-soft); color: var(--primary); }
.docs-nav-list a strong { color: #fff; }
.docs-nav-list a:hover { border-color: rgba(0,229,138,.45); background: var(--primary-soft); }
.docs-content { border-color: #292e31; background: #101214; }
.docs-titlebar { border-bottom-color: #292e31; background: #15181a; }
.docs-titlebar h2 { color: #fff; }
.docs-section-list { background: #0b0d0f; }
.docs-section { border-color: #292e31; background: #101214; }
.docs-section header { border-bottom-color: #292e31; background: #15181a; }
.docs-section h2 { color: #fff; }
.docs-section header span { color: var(--primary); }
.docs-section h2 small { border-color: rgba(0,229,138,.3); background: var(--primary-soft); color: var(--primary); }
.docs-section header code { border-color: #292e31; background: #0b0d0f; color: #74b7ff; }
.docs-section pre,
.docs-pre { background: #0b0d0f; color: #d0d7d3; }

.docs-nav-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.docs-nav-panel { grid-template-rows: auto auto minmax(0, 1fr); }
.docs-nav-heading strong { color: #fff; font-size: 14px; }
.docs-nav-heading span {
  min-width: 28px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid rgba(0,229,138,.26);
  border-radius: 4px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 800;
}
.docs-search {
  height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid #292e31;
  border-radius: 5px;
  background: #0b0d0f;
}
.docs-search > span { color: #68716d; font-size: 12px; }
.docs-search input {
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font: inherit;
  font-size: 13px;
}
.docs-search input::placeholder { color: #5f6864; }
.docs-nav-list { gap: 12px; }
.docs-nav-group { display: grid; gap: 7px; }
.docs-nav-group > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 3px;
}
.docs-nav-group > header strong { color: #939c98; font-size: 12px; font-weight: 700; }
.docs-nav-group > header span { color: #626a67; font-size: 11px; }
.docs-nav-group > div { display: grid; gap: 6px; }
.docs-nav-group .docs-nav-list a,
.docs-nav-group a { min-height: 42px; grid-template-columns: 30px minmax(0, 1fr); grid-template-areas: "num name"; }
.docs-nav-group a span { width: 28px; height: 28px; }
.docs-nav-group a.active { border-color: rgba(0,229,138,.45); background: var(--primary-soft); }
.docs-section[hidden],
.docs-nav-group[hidden],
.docs-nav-group a[hidden] { display: none !important; }
.docs-section { content-visibility: auto; contain-intrinsic-size: 760px; }
.docs-section > summary { list-style: none; cursor: pointer; }
.docs-section > summary::-webkit-details-marker { display: none; }
.docs-section-header {
  position: relative;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 20px;
  border-bottom: 1px solid #292e31;
  background: #15181a;
}
.docs-section-header > div { min-width: 0; }
.docs-section-header > div > span { color: var(--primary); font-size: 12px; font-weight: 800; }
.docs-section-header > code {
  flex: 0 1 440px;
  max-width: 44%;
  overflow: hidden;
  padding: 8px 10px;
  border: 1px solid #292e31;
  border-radius: 4px;
  color: #74b7ff;
  background: #0b0d0f;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}
.docs-section-header::after {
  content: "+";
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #303638;
  border-radius: 4px;
  color: #9ca6a1;
  background: #0b0d0f;
  font-size: 18px;
  line-height: 1;
}
.docs-section[open] .docs-section-header::after { content: "−"; color: var(--primary); }
.docs-section-header > code { margin-left: auto; }
.docs-markdown {
  padding: 26px 28px 30px;
  color: #c7cfcb;
  background: #0d0f11;
  font-size: 14px;
  line-height: 1.78;
}
.docs-markdown h2,
.docs-markdown h3,
.docs-markdown h4 {
  margin: 30px 0 12px;
  color: #fff;
  letter-spacing: 0;
}
.docs-markdown h2:first-child,
.docs-markdown h3:first-child { margin-top: 0; }
.docs-markdown h2 { padding-bottom: 10px; border-bottom: 1px solid #292e31; font-size: 19px; }
.docs-markdown h3 { font-size: 16px; }
.docs-markdown h4 { color: #dce3df; font-size: 14px; }
.docs-markdown p { margin: 10px 0; color: #adb6b1; }
.docs-markdown strong { color: #fff; }
.docs-markdown a { color: #74b7ff; text-decoration: underline; text-underline-offset: 3px; }
.docs-markdown code {
  padding: 2px 6px;
  border: 1px solid #303638;
  border-radius: 3px;
  color: #8ed7ff;
  background: #15191b;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: .9em;
}
.docs-markdown ul,
.docs-markdown ol { margin: 12px 0; padding-left: 22px; color: #adb6b1; }
.docs-markdown li { margin: 6px 0; }
.docs-markdown blockquote {
  margin: 16px 0;
  padding: 12px 14px;
  border-left: 3px solid var(--primary);
  color: #b9c2bd;
  background: rgba(0,229,138,.06);
}
.docs-table-wrap {
  margin: 14px 0 22px;
  overflow-x: auto;
  border: 1px solid #292e31;
  border-radius: 5px;
}
.docs-markdown table { width: 100%; min-width: 680px; border-collapse: collapse; }
.docs-markdown th,
.docs-markdown td {
  padding: 11px 13px;
  border-right: 1px solid #292e31;
  border-bottom: 1px solid #292e31;
  text-align: left;
  vertical-align: top;
}
.docs-markdown th:last-child,
.docs-markdown td:last-child { border-right: 0; }
.docs-markdown tr:last-child td { border-bottom: 0; }
.docs-markdown th { color: #fff; background: #171a1c; font-size: 12px; white-space: nowrap; }
.docs-markdown td { color: #acb5b0; background: #101315; font-size: 13px; }
.docs-code-block {
  position: relative;
  margin: 14px 0 22px;
  overflow: hidden;
  border: 1px solid #292e31;
  border-radius: 5px;
  background: #080a0c;
}
.docs-code-block > span {
  position: absolute;
  top: 10px;
  right: 12px;
  color: #5f6964;
  font-size: 10px;
  font-weight: 800;
}
.docs-code-block pre { margin: 0; padding: 40px 18px 18px; overflow: auto; color: #d5ddd9; background: transparent; }
.docs-code-block code { padding: 0; border: 0; color: inherit; background: transparent; font-size: 12px; line-height: 1.7; }
.docs-legacy-pre {
  margin: 0;
  padding: 0;
  white-space: pre-wrap;
  word-break: break-word;
  color: #c7cfcb;
  background: transparent !important;
  font-size: 13px;
  line-height: 1.8;
}

@media (max-width: 720px) {
  .docs-nav-list { grid-template-columns: 1fr !important; max-height: 420px; }
  .docs-nav-group { min-width: 0; }
  .docs-section-header { align-items: flex-start; flex-direction: column; padding: 16px; }
  .docs-section-header > code { width: calc(100% - 42px); max-width: none; margin-left: 0; }
  .docs-markdown { padding: 20px 16px 24px; }
  .docs-section-header::after { position: absolute; top: 16px; right: 16px; }
  .docs-section-header > code { padding-right: 42px; }
  .docs-markdown table { min-width: 620px; }
}

/* Generated content */
.model-row,
.admin-price-card,
.recharge-package-card,
.payment-method-card,
.console-model-stats div,
.wallet-recharge-panel,
.wallet-record-panel {
  border-color: #292e31;
  border-radius: 8px;
  background: #101214;
  box-shadow: none;
}
.model-row:hover,
.admin-price-card:hover { border-color: rgba(0,229,138,.45); transform: none; }
.admin-model-toolbar,
.admin-model-summary div,
.console-model-filter {
  border-color: #292e31;
  border-radius: 8px;
  background: #101214;
}
.recharge-package-card:hover,
.recharge-package-card.active,
.payment-method-card:hover,
.payment-method-card.active { border-color: var(--primary); background: var(--primary-soft); }
.payment-modal-card,
.admin-modal-card { border-color: #292e31; background: #101214; }
.admin-modal-card header,
.payment-modal-card header { border-bottom-color: #292e31; background: #15181a; }

@media (max-width: 1100px) {
  .site-header { padding-inline: 28px; }
  .site-header nav { gap: 2px; }
  .site-header nav a,
  .site-header nav button { padding-inline: 10px; }
  .model-grid,
  .market-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .site-header { position: sticky; }
  .hero { min-height: calc(100vh - 74px); padding-top: 80px; }
  .console-page.console-authed,
  .admin-page.console-authed,
  .user-console-page.console-authed { grid-template-columns: 1fr; }
  .console-sidebar { border-right: 0; border-bottom: 1px solid #24292c; }
  .console-sidebar .brand { display: none; }
  .console-sidebar nav { padding: 10px 16px; }
  .nav-item.active::before { display: none; }
  .docs-shell { grid-template-columns: 1fr; }
  .docs-aside { position: static; }
  .route-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-grid article,
  .route-grid article:nth-child(4),
  .route-grid article:nth-child(5) { grid-column: span 1; }
  .route-grid article:last-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .site-header {
    height: 64px;
    padding: 0 18px;
    flex-direction: row;
    align-items: center;
    gap: 0;
  }
  .site-header nav a:nth-child(3),
  .site-header nav a:nth-child(4),
  .site-header nav a:nth-child(5) { display: none; }
  .hero {
    width: calc(100% - 36px);
    min-height: calc(100vh - 64px);
    padding: 80px 0 110px;
  }
  .hero h1 { font-size: 44px; }
  .hero-dynamic-line { font-size: 20px; }
  .hero-text { font-size: 15px; }
  .metrics-band {
    grid-template-columns: repeat(2, 1fr);
    margin-top: -100px;
    padding: 0;
  }
  .metrics-band div { min-height: 50px; }
  .content-section { width: calc(100% - 32px); padding-top: 80px; }
  .section-heading h2 { font-size: 34px; }
  .access-route-section,
  .model-ecosystem-section { padding: 82px 16px 92px; }
  .route-heading h2,
  .ecosystem-heading h2 { font-size: 30px; }
  .route-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 38px; }
  .route-grid article,
  .route-grid article:nth-child(4),
  .route-grid article:nth-child(5),
  .route-grid article:last-child { grid-column: auto; min-height: 0; }
  .route-grid p { min-height: 0; }
  .model-ecosystem-section .model-grid { gap: 10px; margin-top: 38px; }
  .model-pill { min-width: 0; min-height: 40px; padding-inline: 16px; }
  .model-grid,
  .market-model-grid { grid-template-columns: 1fr; }
  .model-market-page { padding-top: 64px; }
  .market-sidebar { display: block; height: 64px; min-height: 64px; }
  .market-logo { left: 18px; height: 64px; }
  .market-logo .brand-name { display: none; }
  .market-topbar { height: 64px; padding: 0 16px 0 68px; }
  .market-topbar nav { position: static; transform: none; gap: 14px; }
  .market-topbar nav a:first-child { display: none; }
  .market-actions a { padding-inline: 10px; }
  .market-content { width: calc(100% - 32px); padding-top: 28px; }
  .market-title h1 { font-size: 36px; }
  .market-filter { grid-template-columns: 1fr; }
  .dashboard-header { padding: 24px 18px 18px; }
  .panel { padding: 10px 18px 34px; }
  .console-topbar { padding: 0 18px; }
  .auth-layout,
  .admin-login-layout { gap: 34px; }
  .auth-layout h1,
  .admin-login-copy h1 { font-size: 38px; }
  .docs-shell,
  .docs-footer { width: calc(100% - 32px); }
  .docs-nav-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 260px; }
}

@media (max-width: 480px) {
  .home-page .site-header nav a { display: none; }
  .home-page .site-header nav .nav-auth { display: inline-flex; }
  .site-header .brand-name { max-width: 118px; overflow: hidden; text-overflow: ellipsis; }
  .site-header .nav-auth { min-width: 88px; margin-left: 0; }
  .hero h1 { font-size: 40px; }
  .metrics-band strong { font-size: 14px; }
  .metrics-band span { font-size: 11px; }
  .docs-page .site-header nav a:nth-child(1),
  .docs-page .site-header nav a:nth-child(2) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
