:root {
  --brand: #e64932;
  --brand-hover: #c93826;
  --brand-soft: #fff0ec;
  --ink: #171b26;
  --text: #424957;
  --muted: #7d8593;
  --line: #dfe3e9;
  --line-soft: #eceff3;
  --line-strong: #cfd5de;
  --surface: #ffffff;
  --surface-soft: #f8f9fb;
  --canvas: #f4f6f8;
  --success: #00a870;
  --success-soft: #e8f8f2;
  --warning: #e96b10;
  --warning-soft: #fff3e8;
  --danger: #e5484d;
  --danger-soft: #ffeded;
  --radius: 8px;
  --shadow: 0 8px 28px rgba(27, 35, 52, 0.07);
  --font: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Code", "Roboto Mono", monospace;
}

/* Professional product shell */
.announcement-bar {
  position: relative;
  z-index: 30;
  display: flex;
  min-height: 34px;
  padding: 7px 52px;
  align-items: center;
  justify-content: center;
  color: #f8fafc;
  background: #15181d;
  font-size: 12px;
  text-align: center;
}

.announcement-bar::before {
  width: 6px;
  height: 6px;
  margin-right: 9px;
  background: #ff765f;
  border-radius: 50%;
  content: "";
}

.announcement-bar button {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 28px;
  height: 28px;
  padding: 0;
  color: #c8cdd5;
  background: transparent;
  border: 0;
  transform: translateY(-50%);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
}

#announcement-bar:not(.hide) ~ .console-app {
  height: calc(100vh - 34px);
}

.model-detail-page {
  min-height: calc(100vh - 148px);
  background: var(--surface);
}

.detail-loading {
  padding: 100px 24px;
  color: var(--muted);
  text-align: center;
}

.model-detail-hero {
  padding: 24px max(24px, calc((100vw - 1240px) / 2));
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-flex;
  padding: 0;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 12px;
}

.back-link svg {
  transform: rotate(180deg);
}

.detail-title-row {
  display: flex;
  margin-top: 26px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.detail-title-row .detail-model {
  align-items: flex-start;
}

.detail-title-row .vendor-mark {
  width: 52px;
  height: 52px;
}

.detail-title-row h1 {
  margin: 7px 0 2px;
  font-family: var(--mono);
  font-size: 28px;
  letter-spacing: 0;
}

.detail-badges {
  display: flex;
  min-height: 20px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.detail-actions {
  display: flex;
  gap: 10px;
}

.detail-actions .button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.detail-tabs {
  display: flex;
  gap: 4px;
  margin-top: 30px;
  overflow-x: auto;
}

.detail-tabs button {
  min-width: max-content;
  padding: 10px 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
}

.detail-tabs button:first-child,
.detail-tabs button:hover {
  color: var(--ink);
  border-bottom-color: var(--brand);
}

.detail-page-body {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

.detail-section {
  padding: 48px 0;
  scroll-margin-top: 72px;
  border-bottom: 1px solid var(--line);
}

.detail-section h2 {
  margin: 6px 0 0;
  font-size: 22px;
}

.detail-section > p,
.detail-lead {
  max-width: 860px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.85;
}

.detail-section-head,
.compact-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.detail-section-head a {
  color: var(--brand);
  text-decoration: none;
}

.model-facts,
.detail-price-grid,
.billing-summary,
.analytics-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: var(--surface);
}

.model-facts {
  margin-top: 26px;
}

.model-facts > div,
.billing-summary > article,
.analytics-kpis > article {
  min-width: 0;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.model-facts > div:last-child,
.billing-summary > article:last-child,
.analytics-kpis > article:last-child {
  border-right: 0;
}

.model-facts span,
.model-facts b,
.billing-summary span,
.billing-summary strong,
.billing-summary small,
.analytics-kpis span,
.analytics-kpis strong,
.analytics-kpis small {
  display: block;
}

.model-facts span,
.billing-summary span,
.analytics-kpis span {
  color: var(--muted);
  font-size: 12px;
}

.model-facts b {
  margin-top: 7px;
}

.detail-tags {
  margin-top: 20px;
}

.detail-price-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 22px;
}

.detail-price-grid .model-price {
  min-height: 118px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.detail-price-grid .model-price:last-child {
  border-right: 0;
}

.detail-price-grid .model-price b {
  margin-top: 10px;
  font-size: 26px;
}

.trend-chart {
  display: block;
  width: 100%;
  height: 210px;
  margin-top: 18px;
}

.chart-empty,
.table-empty {
  display: flex;
  min-height: 180px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.split-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  align-items: center;
}

.large-stat {
  padding-left: 30px;
  border-left: 2px solid var(--brand);
}

.large-stat span,
.large-stat small {
  display: block;
  color: var(--muted);
}

.large-stat b {
  display: block;
  margin: 8px 0;
  font-size: 34px;
}

.limit-list {
  margin: 0;
}

.limit-list div,
.detail-list div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.limit-list dt,
.detail-list dt {
  color: var(--muted);
}

.limit-list dd,
.detail-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.filter-toolbar {
  display: flex;
  width: min(100%, 1480px);
  margin: 0 auto 14px;
  padding: 12px 14px;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.filter-toolbar label {
  display: flex;
  min-width: 150px;
  flex: 1 1 160px;
  color: var(--muted);
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
}

.filter-toolbar select,
.filter-toolbar input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.filter-toolbar select:hover,
.filter-toolbar input:hover {
  border-color: var(--line-strong);
}

.filter-toolbar select:focus-visible,
.filter-toolbar input:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.filter-toolbar .filter-search {
  flex-basis: 220px;
}

.data-source {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

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

.analytics-kpis,
.billing-summary {
  width: min(100%, 1480px);
  margin: 0 auto 14px;
}

.analytics-kpis {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.analytics-kpis strong,
.billing-summary strong {
  margin: 9px 0 3px;
  font-size: 24px;
  font-weight: 650;
}

.analytics-kpis small,
.billing-summary small {
  color: var(--muted);
  font-size: 11px;
}

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

.analytics-grid,
.account-layout {
  display: grid;
  width: min(100%, 1480px);
  margin: 0 auto 14px;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.7fr);
  gap: 14px;
}

.trend-panel,
.distribution-panel,
.data-panel {
  margin-bottom: 0;
}

.chart-legend {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.chart-legend i {
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 7px;
  vertical-align: middle;
  background: var(--brand);
}

.distribution-list > div {
  position: relative;
  display: grid;
  padding: 12px 0 15px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}

.distribution-list > div > i {
  position: absolute;
  bottom: 7px;
  left: 0;
  height: 2px;
  background: var(--brand);
}

.table-scroll {
  overflow: auto;
  overscroll-behavior-inline: contain;
}

.inline-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 9px;
}

.pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.log-detail-panel {
  width: min(620px, calc(100vw - 32px));
}

.payment-notice {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.payment-notice h2 {
  margin: 5px 0 4px;
}

.payment-notice p {
  margin: 0;
  color: var(--muted);
}

.money-in {
  color: var(--success);
}

.money-out {
  color: var(--text);
}

.account-identity {
  display: flex;
  padding-bottom: 22px;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.account-identity .status {
  margin-left: auto;
}

.account-identity h2,
.account-identity p {
  margin: 0;
}

.account-identity p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.account-avatar {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--ink);
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
}

.security-list > div,
.security-guidance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.security-list > div:last-child {
  border-bottom: 0;
}

.security-list span,
.security-list b,
.security-list small,
.security-guidance div,
.security-guidance b,
.security-guidance span {
  display: block;
}

.security-list small,
.security-guidance span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.security-guidance {
  align-items: stretch;
  border: 0;
}

.security-guidance > div {
  flex: 1;
  padding: 4px 20px;
  border-right: 1px solid var(--line);
}

.security-guidance > div:last-child {
  border-right: 0;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f2f4f7;
  --text: #c8cdd5;
  --muted: #8d96a3;
  --line: #30343a;
  --line-soft: #25282d;
  --line-strong: #3a3f47;
  --surface: #181a1e;
  --surface-soft: #202328;
  --canvas: #111315;
  --brand-soft: #3a211d;
  --success-soft: #12342a;
  --warning-soft: #3b2817;
  --danger-soft: #3b1d20;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .public-header,
html[data-theme="dark"] .public-footer,
html[data-theme="dark"] .filter-sidebar,
html[data-theme="dark"] .catalog-toolbar,
html[data-theme="dark"] .model-card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .setup-panel,
html[data-theme="dark"] .quick-panel,
html[data-theme="dark"] .metrics-panel,
html[data-theme="dark"] .console-header,
html[data-theme="dark"] .console-sidebar,
html[data-theme="dark"] .auth-panel,
html[data-theme="dark"] .editor-panel,
html[data-theme="dark"] .key-drawer,
html[data-theme="dark"] .docs-nav,
html[data-theme="dark"] .model-facts,
html[data-theme="dark"] .detail-price-grid,
html[data-theme="dark"] .billing-summary,
html[data-theme="dark"] .analytics-kpis,
html[data-theme="dark"] .filter-toolbar {
  background: var(--surface);
}

html[data-theme="dark"] .console-shell,
html[data-theme="dark"] .model-hero,
html[data-theme="dark"] .model-detail-hero,
html[data-theme="dark"] .model-card.upcoming {
  background: var(--canvas);
}

html[data-theme="dark"] .key-toolbar,
html[data-theme="dark"] .key-search,
html[data-theme="dark"] .request-preview,
html[data-theme="dark"] .model-price,
html[data-theme="dark"] .endpoint-line,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .drawer-footer,
html[data-theme="dark"] .detail-drawer,
html[data-theme="dark"] .quick-actions button > span:first-child,
html[data-theme="dark"] tbody tr:hover {
  background: var(--surface-soft);
}

html[data-theme="dark"] .tag {
  color: var(--text);
}

html[data-theme="dark"] .discount-badge {
  color: #3a2600;
  background: linear-gradient(135deg, #ffdf8a, #f5b73c);
  border-color: #d99a1a;
}

html[data-theme="dark"] .discount-badge svg {
  stroke: #3a2600;
}

html[data-theme="dark"] th,
html[data-theme="dark"] .doc-note {
  color: var(--muted) !important;
  background: #202328;
}

html[data-theme="dark"] .doc-note {
  border-left-color: var(--brand);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .button.ghost,
html[data-theme="dark"] .segmented button.active {
  color: var(--text);
  background: #202328;
}

@media (max-width: 1080px) {
  .analytics-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .analytics-kpis > article:nth-child(3) {
    border-right: 0;
  }

  .analytics-grid,
  .account-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .announcement-bar {
    padding: 7px 44px 7px 14px;
    text-align: left;
  }

  #announcement-bar:not(.hide) ~ .console-app {
    height: calc(100vh - 48px);
  }

  .public-actions .theme-toggle {
    display: inline-flex;
  }

  .public-header {
    display: flex;
    justify-content: space-between;
  }

  .public-actions {
    min-width: 0;
    gap: 6px;
  }

  .public-actions .button.primary {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .model-detail-hero {
    padding: 20px 18px 0;
  }

  .detail-model,
  .detail-model > div {
    min-width: 0;
  }

  .detail-title-row h1 {
    overflow-wrap: anywhere;
    font-size: 22px;
  }

  .detail-title-row,
  .payment-notice {
    align-items: flex-start;
    flex-direction: column;
  }

  .detail-actions {
    width: 100%;
  }

  .detail-actions .button {
    flex: 1;
  }

  .detail-page-body {
    width: calc(100% - 36px);
  }

  .model-facts,
  .detail-price-grid,
  .billing-summary,
  .analytics-kpis {
    grid-template-columns: 1fr 1fr;
  }

  .model-facts > div:nth-child(2n),
  .detail-price-grid .model-price:nth-child(2n),
  .billing-summary > article:nth-child(2n),
  .analytics-kpis > article:nth-child(2n) {
    border-right: 0;
  }

  .split-detail {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .large-stat {
    padding: 18px 0 0;
    border-top: 2px solid var(--brand);
    border-left: 0;
  }

  .filter-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-toolbar label {
    min-width: 0;
  }

  .security-guidance {
    align-items: flex-start;
    flex-direction: column;
  }

  .security-guidance > div {
    width: 100%;
    padding: 10px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

* {
  box-sizing: border-box;
}

button,
a,
select {
  touch-action: manipulation;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: rgba(229, 78, 55, 0.16);
}

h1,
h2,
h3 {
  text-wrap: balance;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  color: #fff;
  background: var(--ink);
  border-radius: 4px;
  transform: translateY(-160%);
}

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

.legal-page {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 80px;
}

.legal-page > .brand {
  margin-bottom: 36px;
}

.legal-page h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

.legal-page h2 {
  margin: 30px 0 8px;
  font-size: 17px;
}

.legal-page p {
  color: var(--text);
  line-height: 1.85;
}

.legal-page a {
  color: var(--brand);
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.hide {
  display: none !important;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.brand span {
  font-size: 17px;
  font-weight: 750;
}

.brand small {
  margin-left: 3px;
  padding-left: 12px;
  color: var(--muted);
  border-left: 1px solid var(--line-strong);
  font-size: 12px;
  font-weight: 500;
}

.brand.compact img {
  width: 24px;
  height: 24px;
}

.button {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 650;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.button.primary {
  color: #fff;
  background: var(--brand);
}

.button.primary:hover {
  background: var(--brand-hover);
  box-shadow: 0 5px 14px rgba(230, 73, 50, 0.22);
}

.button:active {
  transform: translateY(1px);
}

.button.ghost {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

.button.ghost:hover {
  color: var(--brand);
  border-color: #f0a092;
}

.button.inverse {
  color: var(--brand);
  background: #fff;
}

.button.large {
  min-height: 42px;
  padding: 0 20px;
}

.button.small {
  min-height: 30px;
  padding: 0 11px;
  font-size: 12px;
}

.button.wide {
  width: 100%;
  min-height: 42px;
}

.icon-button {
  width: 30px;
  height: 30px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
}

.icon-button:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.text-button,
.plain-button {
  padding: 0;
  color: var(--brand);
  background: transparent;
  border: 0;
}

.text-button:hover {
  color: var(--brand-hover);
}

/* Public site */
.public-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 68px;
  padding: 0 clamp(24px, 5vw, 76px);
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.public-nav {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 28px;
}

.public-nav a {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 560;
}

.public-nav a:hover,
.public-nav a.active {
  color: var(--brand);
}

.public-nav a.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--brand);
  content: "";
}

.public-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.public-actions .button,
.public-actions .theme-toggle {
  height: 38px;
  min-height: 38px;
  box-sizing: border-box;
}

.public-actions .theme-toggle {
  width: 38px;
}

.model-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 72px;
  align-items: center;
  max-width: 1280px;
  min-height: 338px;
  margin: 0 auto;
  padding: 48px clamp(24px, 4vw, 52px) 42px;
}

.eyebrow,
.section-kicker {
  color: var(--brand);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.model-hero h1 {
  max-width: 760px;
  margin: 13px 0 16px;
  font-size: 44px;
  line-height: 1.18;
  font-weight: 760;
}

.model-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 26px;
}

.endpoint-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  margin-top: 24px;
  padding: 7px 8px 7px 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 3px 12px rgba(22, 33, 55, 0.04);
}

.endpoint-line code {
  overflow: hidden;
  color: var(--ink);
  font-family: var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 14px 36px rgba(27, 35, 52, 0.08);
}

.hero-status div {
  min-height: 104px;
  padding: 21px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-status div:nth-child(2n) {
  border-right: 0;
}

.hero-status div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.hero-status b,
.hero-status span {
  display: block;
}

.hero-status b {
  margin-bottom: 8px;
  font-size: 23px;
}

.hero-status span {
  color: var(--muted);
  font-size: 12px;
}

.model-square {
  max-width: 1500px;
  margin: 0 auto;
  padding: 38px clamp(24px, 4vw, 52px) 70px;
}

.access-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 44px clamp(24px, 4vw, 52px) 70px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2,
.pricing-band h2 {
  margin: 7px 0 5px;
  font-size: 27px;
  line-height: 1.3;
}

.section-heading p,
.pricing-band p {
  margin: 0;
  color: var(--muted);
}

.model-total {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.filter-sidebar {
  position: sticky;
  top: 82px;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.filter-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 17px;
  border-bottom: 1px solid var(--line);
}

.filter-title b,
.filter-title span {
  display: block;
}

.filter-title b {
  font-size: 15px;
}

.filter-title span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.filter-section {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.filter-section:last-child {
  border-bottom: 0;
}

.filter-section h3 {
  margin: 0 5px 9px;
  font-size: 12px;
}

.vertical-filters {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 5px;
  text-align: left;
}

.filter-row:hover {
  background: var(--line-soft);
}

.filter-row.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 650;
}

.filter-row .filter-label {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 8px;
}

.filter-row .filter-label .vendor-mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  font-size: 9px;
}

.filter-row em {
  min-width: 22px;
  padding: 1px 6px;
  color: var(--muted);
  background: #f0f2f6;
  border-radius: 10px;
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.filter-row.active em {
  color: var(--brand);
  background: #ffe0d8;
}

.vertical-filters.compact {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.catalog-main {
  min-width: 0;
}

.catalog-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin-bottom: 14px;
  padding: 9px 10px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.catalog-toolbar .search-box {
  flex: 1;
}

.catalog-toolbar select {
  height: 36px;
  padding: 0 32px 0 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  background: #f1f3f6;
  border-radius: 6px;
}

.segmented button {
  min-width: 52px;
  height: 30px;
  padding: 0 9px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 11px;
}

.segmented button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 4px rgba(20, 30, 50, 0.1);
  font-weight: 700;
}

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

.model-card {
  position: relative;
  display: flex;
  min-height: 486px;
  padding: 22px;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(27, 35, 52, 0.025);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.model-card::before {
  position: absolute;
  inset: -1px;
  z-index: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(230, 73, 50, 0.55), rgba(255, 138, 101, 0.15) 55%, transparent);
  opacity: 0;
  transition: opacity 180ms ease;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  content: "";
}

.model-card > * {
  position: relative;
  z-index: 1;
}

.model-card:hover {
  border-color: transparent;
  box-shadow: 0 18px 40px rgba(27, 35, 52, 0.12);
  transform: translateY(-3px);
}

.model-card:hover::before {
  opacity: 1;
}

.model-card.upcoming {
  background: #fcfcfd;
  border-style: dashed;
}

.model-card.upcoming .model-card-actions .icon-button {
  display: none;
}

.model-card-head {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

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

.model-card-title h3 {
  display: -webkit-box;
  min-height: 22px;
  overflow: hidden;
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.model-card-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.model-card-actions {
  display: flex;
  gap: 4px;
}

.model-card-actions .icon-button {
  border: 1px solid var(--line);
}

.model-card-meta {
  display: flex;
  min-height: 26px;
  margin-top: 16px;
  align-items: center;
  gap: 8px;
}

.availability-line {
  display: inline-flex;
  align-items: center;
  color: var(--text);
  font-size: 11px;
}

.recommended-label {
  padding-left: 8px;
  color: var(--muted);
  border-left: 1px solid var(--line);
  font-size: 11px;
}

.discount-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 22px;
  margin-left: auto;
  padding: 0 8px;
  color: #915100;
  background: linear-gradient(135deg, #ffe8a3, #ffd06b);
  border: 1px solid #f0b429;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(240, 180, 41, 0.35);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
}

.discount-badge svg {
  flex: 0 0 auto;
  stroke: #915100;
}

.model-prices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.model-price {
  min-width: 0;
  padding: 14px 12px;
  background: transparent;
  border-right: 1px solid var(--line);
}

.model-price:last-child {
  border-right: 0;
}

.model-price span,
.model-price b,
.model-price del {
  display: block;
}

.model-price span {
  color: var(--muted);
  font-size: 10px;
}

.model-price b {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 16px;
  overflow-wrap: anywhere;
}

.model-price del {
  min-height: 17px;
  color: #a8b0bd;
  font-family: var(--mono);
  font-size: 10px;
}

.model-card-description {
  display: -webkit-box;
  min-height: 44px;
  margin: 16px 0 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.model-card-tags {
  min-height: 26px;
  margin-top: 15px;
}

.endpoint-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.endpoint-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.modality-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.modality-group {
  min-width: 0;
}

.modality-group > small {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
}

.modality-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modality-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 11px;
}

.modality-chip svg {
  color: var(--muted);
}

.uptime-block {
  margin-top: 16px;
}

.uptime-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 7px;
}

.uptime-head small {
  color: var(--muted);
  font-size: 11px;
}

.uptime-head b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
}

.uptime-track {
  display: flex;
  gap: 2px;
  height: 22px;
}

.uptime-cell {
  flex: 1;
  border-radius: 2px;
  background: var(--line);
}

.uptime-cell.ok {
  background: var(--success);
}

.uptime-cell.error {
  background: var(--danger);
}

.uptime-cell.none {
  background: #e3e7ec;
}

html[data-theme="dark"] .uptime-cell.none {
  background: #2b2f36;
}

.model-card-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-top: auto;
  padding-top: 16px;
  color: var(--muted);
  border-top: 1px solid var(--line-soft);
  font-size: 10px;
}

.model-card-specs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.model-card-specs span,
.model-card-specs small,
.model-card-specs b {
  display: block;
}

.model-card-specs small {
  margin-bottom: 3px;
  color: var(--muted);
}

.model-card-specs b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.spec-link {
  color: var(--brand);
  font-size: 11px;
  text-decoration: none;
}

.spec-link:hover {
  text-decoration: underline;
}

.model-card-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.model-card-links .button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  white-space: nowrap;
}

.model-card-links .button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.model-card-links a {
  color: var(--brand);
  text-decoration: none;
}

.model-card-links a:hover {
  text-decoration: underline;
}

.editor-panel.curl-panel {
  width: min(720px, calc(100vw - 32px));
}

.curl-panel .code-block {
  width: 100%;
  max-width: 100%;
  margin-top: 16px;
  min-height: 0;
  overflow-x: auto;
  white-space: pre;
  overflow-wrap: normal;
  word-break: normal;
}

.model-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 270px;
  height: 36px;
  padding: 0 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.search-box:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.search-box input {
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
}

.filter-group {
  display: flex;
  flex: 1;
  gap: 4px;
  overflow-x: auto;
}

.filter-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 0 11px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 12px;
}

.filter-button:hover {
  background: var(--line-soft);
}

.filter-button.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 650;
}

.model-toolbar select {
  height: 36px;
  padding: 0 30px 0 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
}

.model-table-wrap {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  background: #fafbfc;
  font-size: 12px;
  font-weight: 600;
}

tbody tr {
  transition: background-color 120ms ease;
}

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

tbody tr:last-child td {
  border-bottom: 0;
}

.model-table tbody tr {
  transition: background 120ms ease;
}

.model-table tbody tr:hover {
  background: #f9fbff;
}

.model-name-cell {
  min-width: 210px;
}

.model-name {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vendor-mark {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 1px 3px rgba(27, 35, 52, 0.12);
}

.model-card-head .vendor-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.vendor-mark img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 5px;
}

.vendor-mark .vendor-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #fff;
}

.vendor-mark.has-image {
  background: #fff !important;
}

.vendor-mark.has-image .vendor-fallback {
  visibility: hidden;
}

html[data-theme="dark"] .vendor-mark.has-image {
  background: #f4f6f8 !important;
}

.model-name b,
.model-name small {
  display: block;
}

.model-name b {
  font-family: var(--mono);
  font-size: 13px;
}

.model-name small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.tag {
  display: inline-block;
  margin: 2px 3px 2px 0;
  padding: 2px 7px;
  color: #41516a;
  background: #f0f3f8;
  border-radius: 4px;
  font-size: 11px;
}

.tag.recommended {
  color: #a53f00;
  background: #fff1df;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  background: var(--success);
  border-radius: 50%;
}

.price-value {
  font-family: var(--mono);
  font-size: 12px;
}

.empty-state {
  padding: 52px 20px;
  color: var(--muted);
  text-align: center;
}

.pricing-band {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 42px;
  align-items: center;
  max-width: 1176px;
  margin: 4px auto 30px;
  padding: 31px 36px;
  color: #fff;
  background: #162a57;
}

.pricing-band .section-kicker,
.pricing-band p {
  color: #b9c9ea;
}

.pricing-facts {
  display: flex;
  gap: 34px;
}

.pricing-facts b,
.pricing-facts span {
  display: block;
}

.pricing-facts b {
  font-size: 18px;
}

.pricing-facts span {
  color: #b9c9ea;
  font-size: 11px;
}

.access-grid {
  display: grid;
  grid-template-columns: 0.75fr 1.25fr;
  gap: 54px;
  align-items: center;
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: flex;
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid var(--line);
}

.steps li > span {
  color: var(--brand);
  font-family: var(--mono);
  font-size: 12px;
}

.steps b {
  display: block;
  margin-bottom: 3px;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.code-block {
  min-height: 260px;
  margin: 0;
  padding: 25px 27px;
  overflow: auto;
  color: #c9d7ef;
  background: #111c32;
  border-left: 3px solid var(--brand);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.8;
}

.code-block span {
  color: #8cc8ff;
}

.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  padding: 0 clamp(24px, 5vw, 76px);
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

/* Modal and drawer */
.modal-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  overscroll-behavior: contain;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  background: rgba(12, 22, 42, 0.5);
  border: 0;
  backdrop-filter: blur(3px);
}

.auth-panel {
  position: relative;
  z-index: 1;
  width: min(410px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 30px;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 70px rgba(16, 30, 58, 0.24);
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 24px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.auth-brand b,
.auth-brand span {
  display: block;
}

.auth-brand span {
  color: var(--muted);
  font-size: 11px;
}

.auth-panel h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

.auth-panel > p {
  margin: 0 0 24px;
  color: var(--muted);
}

.auth-panel label {
  display: block;
  margin: 14px 0 0;
  color: var(--text);
  font-size: 13px;
}

.auth-panel input {
  width: 100%;
  height: 42px;
  margin-top: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
}

.auth-panel input:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: end;
  gap: 10px;
}

.auth-code-row label {
  min-width: 0;
}

.auth-code-row .button {
  height: 42px;
  margin-bottom: 0;
  padding: 0 10px;
  white-space: nowrap;
}

.human-check {
  min-height: 36px;
  margin-top: 14px;
  padding: 8px 10px;
  color: var(--muted);
  background: #f7f8fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 12px;
}

.human-check.verified {
  color: #087a53;
  background: var(--success-soft);
  border-color: #bce8d7;
}

.auth-panel .auth-agreement {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
}

.auth-panel .auth-agreement input {
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  flex: 0 0 16px;
  box-shadow: none;
}

.auth-agreement a {
  color: var(--brand);
}

.form-error {
  min-height: 28px;
  padding-top: 7px;
  color: var(--danger);
  font-size: 12px;
}

.auth-links {
  display: flex;
  margin-top: 15px;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.auth-panel .auth-links .text-button {
  display: block;
  margin: 0;
}

.editor-panel {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 30px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 20px 70px rgba(16, 30, 58, 0.24);
}

.editor-panel > .section-kicker {
  display: block;
  margin-bottom: 8px;
}

.editor-panel > h2 {
  margin: 0 36px 8px 0;
  overflow-wrap: anywhere;
  font-size: 22px;
  line-height: 1.35;
}

.danger-confirm-panel {
  width: min(480px, calc(100vw - 32px));
}

.danger-confirm-panel .secret-output {
  margin: 16px 0;
}

.danger-confirm-panel label {
  margin-top: 0;
}

.editor-content {
  margin-top: 22px;
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.editor-grid label {
  margin: 0;
}

.editor-grid input:not([type="checkbox"]),
.editor-grid select,
.editor-grid textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
}

.editor-grid textarea {
  min-height: 90px;
  resize: vertical;
}

.editor-grid select[multiple] {
  min-height: 110px;
}

.editor-grid input:focus-visible,
.editor-grid select:focus-visible,
.editor-grid textarea:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.editor-full {
  grid-column: 1 / -1;
}

.editor-field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 13px;
}

.channel-map-options {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.channel-map-row {
  display: grid;
  min-height: 58px;
  padding: 9px 10px;
  grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.channel-map-row:last-child {
  border-bottom: 0;
}

.channel-map-row .check-row {
  margin: 0;
}

.channel-map-row input[type="text"] {
  margin: 0;
}

.channel-map-row input:disabled {
  color: var(--muted);
  background: #f5f6f8;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  color: var(--text);
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.detail-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: min(520px, 100vw);
  padding: 30px;
  overflow-y: auto;
  background: #fff;
  box-shadow: -18px 0 50px rgba(16, 30, 58, 0.18);
}

.detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 30px;
}

.detail-model {
  display: flex;
  align-items: center;
  gap: 13px;
}

.detail-model .vendor-mark {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.detail-model h2 {
  margin: 0;
  font-family: var(--mono);
  font-size: 19px;
}

.detail-model p {
  margin: 4px 0 0;
  color: var(--muted);
}

.detail-description {
  margin: 0 0 24px;
  color: var(--text);
  line-height: 1.8;
}

.detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
}

.detail-stats div {
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-stats div:nth-child(2n) {
  border-right: 0;
}

.detail-stats div:nth-last-child(-n+2) {
  border-bottom: 0;
}

.detail-stats span,
.detail-stats b {
  display: block;
}

.detail-stats span {
  color: var(--muted);
  font-size: 11px;
}

.detail-stats b {
  margin-top: 5px;
  font-family: var(--mono);
}

/* Console */
.console-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.console-header {
  display: flex;
  flex: 0 0 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.console-user {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: 12px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
  font-weight: 700;
}

.console-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  background: var(--canvas);
}

.console-sidebar {
  flex: 0 0 218px;
  padding: 16px 12px;
  overflow-y: auto;
  background: #fff;
  border-right: 1px solid var(--line);
}

.console-sidebar nav {
  display: flex;
  flex-direction: column;
}

.nav-section {
  padding: 20px 12px 8px;
  color: #a1aab7;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.console-sidebar button {
  position: relative;
  display: flex;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 5px;
  text-align: left;
}

.console-sidebar button:hover {
  background: var(--line-soft);
}

.console-sidebar button.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 700;
}

.console-sidebar button.active::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  background: var(--brand);
  border-radius: 0 2px 2px 0;
  content: "";
}

.nav-icon {
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
}

.nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.console-main {
  flex: 1;
  min-width: 0;
  padding: 28px 32px 52px;
  overflow: auto;
}

.console-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: min(100%, 1480px);
  margin: 0 auto 22px;
}

.console-title h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.console-title p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

#console-content {
  width: min(100%, 1480px);
  margin: 0 auto;
}

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

.kpi {
  min-height: 112px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(27, 35, 52, 0.025);
}

.kpi span {
  color: var(--muted);
  font-size: 12px;
}

.kpi strong {
  display: block;
  margin-top: 13px;
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.kpi strong small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.panel {
  margin-bottom: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(27, 35, 52, 0.025);
}

.section-label {
  color: var(--brand);
  font-size: 11px;
  font-weight: 750;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 0.85fr);
  gap: 16px;
  margin-bottom: 16px;
}

.setup-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  min-height: 418px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.setup-main {
  padding: 26px;
}

.setup-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.setup-heading h2,
.quick-panel h2,
.metrics-heading h2 {
  margin: 6px 0 5px;
  font-size: 19px;
  line-height: 1.35;
}

.setup-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.setup-count {
  flex: 0 0 auto;
  padding: 3px 8px;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.setup-progress {
  height: 4px;
  margin: 22px 0 10px;
  overflow: hidden;
  background: #eef0f3;
  border-radius: 2px;
}

.setup-progress span {
  display: block;
  height: 100%;
  background: var(--brand);
  transition: width 240ms ease;
}

.setup-steps {
  border-top: 1px solid var(--line);
}

.setup-step {
  display: grid;
  width: 100%;
  min-height: 82px;
  padding: 14px 4px;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 12px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.setup-step:hover,
.setup-step.current {
  background: #fff9f7;
}

.step-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--muted);
  background: #f4f5f7;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
}

.setup-step.current .step-state {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
}

.setup-step.done .step-state {
  color: var(--success);
  background: var(--success-soft);
  border-color: #c7ede0;
}

.step-copy b,
.step-copy small {
  display: block;
}

.step-copy b {
  color: var(--ink);
  font-size: 13px;
}

.step-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.step-arrow {
  display: inline-flex;
  color: #a5adba;
}

.setup-step:hover .step-arrow {
  color: var(--brand);
  transform: translateX(2px);
}

.request-preview {
  min-width: 0;
  padding: 26px 22px;
  background: #fafbfc;
  border-left: 1px solid var(--line);
}

.request-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.request-preview-head > span {
  display: flex;
  gap: 5px;
}

.request-preview-head i {
  width: 7px;
  height: 7px;
  background: #d6dae1;
  border-radius: 50%;
}

.request-preview-head i:first-child {
  background: var(--brand);
}

.request-preview-head b {
  font-size: 12px;
}

.request-preview pre {
  min-height: 190px;
  margin: 18px 0;
  padding: 16px;
  overflow: auto;
  color: #d7e0ef;
  background: #172033;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.request-status {
  margin: 0;
}

.request-status div {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.request-status dt,
.request-status dd {
  margin: 0;
  font-size: 10px;
}

.request-status dt {
  color: var(--muted);
}

.request-status dd {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-panel {
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.quick-actions {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.quick-actions button {
  display: grid;
  width: 100%;
  min-height: 78px;
  padding: 14px 2px;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.quick-actions button:hover {
  color: var(--brand);
}

.quick-actions button > span:first-child {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--ink);
  background: #f4f5f7;
  border-radius: 6px;
}

.quick-actions b,
.quick-actions small {
  display: block;
}

.quick-actions b {
  color: var(--ink);
  font-size: 12px;
}

.quick-actions small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.metrics-panel {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.metrics-heading,
.key-page-header {
  display: flex;
  min-height: 72px;
  padding: 16px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.metric-strip > div {
  min-width: 0;
  min-height: 108px;
  padding: 20px;
  border-right: 1px solid var(--line);
}

.metric-strip > div:last-child {
  border-right: 0;
}

.metric-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.metric-strip strong {
  display: inline-block;
  max-width: 100%;
  margin-top: 10px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 23px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-strip small {
  margin-left: 5px;
  color: var(--muted);
  font-size: 10px;
}

.account-summary {
  display: flex;
  min-height: 62px;
  padding: 12px 20px;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-size: 11px;
}

.account-summary b {
  margin-left: 5px;
  color: var(--text);
}

.account-summary > div {
  display: flex;
  margin-left: auto;
  align-items: center;
  gap: 14px;
}

.metrics-panel .doc-note {
  margin: 0 20px 18px;
}

.key-management {
  min-height: calc(100vh - 154px);
  padding: 0;
  overflow: hidden;
}

.key-page-header h2 {
  margin: 0;
  font-size: 17px;
}

.key-page-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.key-page-header .button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.key-toolbar {
  display: flex;
  min-height: 58px;
  padding: 10px 20px;
  align-items: center;
  gap: 10px;
  background: #fafbfc;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.key-search {
  display: flex;
  width: min(360px, 100%);
  height: 36px;
  padding: 0 10px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.key-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
}

.key-toolbar select {
  height: 36px;
  padding: 0 28px 0 10px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.key-toolbar > span {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}

.key-table-wrap {
  min-height: 430px;
  overflow: auto;
}

.key-table {
  min-width: 1280px;
}

.key-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.key-name-cell {
  display: flex;
  min-width: 140px;
  align-items: center;
  gap: 9px;
}

.key-name-cell > span {
  display: inline-flex;
  color: var(--muted);
}

.key-name-cell b {
  font-size: 12px;
}

.key-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.key-status i {
  width: 7px;
  height: 7px;
  background: var(--muted);
  border-radius: 50%;
}

.key-status.active i {
  background: var(--success);
}

.key-actions {
  white-space: nowrap;
}

.text-button.danger {
  margin-left: 8px;
  color: var(--danger);
}

.key-empty {
  display: flex;
  min-height: 330px;
  padding: 40px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
}

.key-empty > span {
  display: inline-flex;
  margin-bottom: 14px;
  color: var(--text);
}

.key-empty b {
  color: var(--ink);
}

.key-empty p {
  margin: 5px 0 16px;
  font-size: 12px;
}

.table-footer {
  display: flex;
  min-height: 50px;
  padding: 0 20px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

.key-drawer {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: flex;
  width: min(560px, 100vw);
  flex-direction: column;
  background: #fff;
  box-shadow: 18px 0 54px rgba(16, 30, 58, 0.18);
  animation: key-drawer-in 180ms ease-out;
}

@keyframes key-drawer-in {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.drawer-header {
  position: relative;
  flex: 0 0 auto;
  min-height: 88px;
  padding: 20px 64px 18px 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h2 {
  margin: 0;
  font-size: 18px;
}

.drawer-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.drawer-body {
  flex: 1;
  padding: 22px 24px;
  overflow-y: auto;
}

.drawer-section {
  padding: 0 0 24px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.drawer-section:last-child {
  margin-bottom: 0;
}

.drawer-section-title {
  display: flex;
  margin-bottom: 20px;
  align-items: center;
  gap: 11px;
}

.drawer-section-title > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--text);
  background: #f3f4f6;
  border-radius: 6px;
}

.drawer-section-title b,
.drawer-section-title small {
  display: block;
}

.drawer-section-title b {
  font-size: 13px;
}

.drawer-section-title small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.drawer-field {
  display: block;
  margin-top: 16px;
  color: var(--text);
  font-size: 12px;
  font-weight: 650;
}

.drawer-field input {
  display: block;
  width: 100%;
  height: 40px;
  margin-top: 6px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
}

.drawer-field input:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.drawer-field small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.key-model-options {
  border-top: 1px solid var(--line);
}

.model-option {
  display: grid;
  min-height: 62px;
  padding: 10px 4px;
  grid-template-columns: 18px 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.model-option:hover {
  background: #fafbfc;
}

.model-option input {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
}

.model-option b,
.model-option small {
  display: block;
}

.model-option b {
  overflow: hidden;
  font-family: var(--mono);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.model-option small,
.selection-note {
  color: var(--muted);
  font-size: 10px;
}

.selection-note {
  margin: 10px 0 0;
}

.drawer-footer {
  display: flex;
  flex: 0 0 68px;
  padding: 12px 24px;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.key-created {
  padding: 42px 0;
  text-align: center;
}

.success-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  color: var(--success);
  background: var(--success-soft);
  border-radius: 50%;
}

.key-created h3 {
  margin: 18px 0 6px;
  font-size: 18px;
}

.key-created > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.created-secret {
  display: flex;
  margin-top: 24px;
  padding: 14px;
  align-items: center;
  gap: 8px;
  color: #dbe7f7;
  background: #172033;
  border-radius: 6px;
  text-align: left;
}

.created-secret code {
  min-width: 0;
  flex: 1;
  font-family: var(--mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.created-secret .icon-button {
  flex: 0 0 32px;
  color: #fff;
  border: 1px solid #42506a;
}

.secret-warning {
  margin-top: 12px;
  padding: 11px 12px;
  color: #8a4a20;
  background: #fff5ec;
  border-left: 3px solid var(--warning);
  font-size: 10px;
  text-align: left;
}

.docs-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.docs-hero {
  width: min(100%, 1480px);
  margin: 0 auto 20px;
  padding: 26px 28px;
  background: linear-gradient(180deg, var(--surface), var(--surface-soft));
  border: 1px solid var(--line);
  border-radius: 12px;
}

.docs-breadcrumb {
  color: var(--muted);
  font-size: 12px;
}

.docs-breadcrumb span {
  margin: 0 6px;
  color: var(--line-strong);
}

.docs-hero h1 {
  margin: 12px 0 8px;
  font-size: 24px;
}

.docs-hero > p {
  max-width: 720px;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.8;
}

.docs-hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.docs-hero-facts span,
.docs-hero-facts b {
  display: block;
}

.docs-hero-facts span {
  color: var(--muted);
  font-size: 11px;
}

.docs-hero-facts b {
  margin-top: 4px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.docs-layout {
  display: grid;
  width: min(100%, 1480px);
  margin: 0 auto;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.docs-nav {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.docs-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav-group b {
  padding: 4px 10px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.docs-nav a {
  position: relative;
  padding: 8px 10px;
  color: var(--text);
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
}

.docs-nav a:hover {
  background: var(--line-soft);
}

.docs-nav a.active {
  color: var(--brand);
  background: var(--brand-soft);
  font-weight: 600;
}

.docs-content {
  min-width: 0;
}

.doc-section {
  scroll-margin-top: 20px;
}

.doc-section h3 {
  margin: 22px 0 8px;
  font-size: 13px;
}

.doc-section .code-block {
  min-height: 0;
}

.doc-section p {
  color: var(--text);
}

.doc-section code:not(pre code) {
  padding: 2px 5px;
  color: #9e2f21;
  background: #fff0ec;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 11px;
}

.doc-note {
  padding: 10px 12px;
  color: #5f6f84 !important;
  background: #f5f7fa;
  border-left: 3px solid #f0a092;
  font-size: 12px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-header h2 {
  margin: 0;
  font-size: 14px;
}

.panel-note {
  margin: -4px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.form-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.form-row label {
  display: block;
  color: var(--text);
  font-size: 12px;
}

.form-row input {
  display: block;
  height: 36px;
  margin-top: 5px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
}

.secret-output {
  margin-top: 13px;
  padding: 13px;
  color: #8be9b4;
  background: #111c32;
  border-left: 3px solid var(--success);
  font-family: var(--mono);
  word-break: break-all;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 650;
}

.status.ok {
  color: var(--success);
  background: var(--success-soft);
}

.status.warn {
  color: var(--warning);
  background: var(--warning-soft);
}

.status.error {
  color: var(--danger);
  background: var(--danger-soft);
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.tier-card {
  position: relative;
  padding: 18px 12px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.tier-card:hover {
  border-color: #f0a092;
  box-shadow: 0 8px 22px rgba(230, 73, 50, 0.1);
  transform: translateY(-2px);
}

.tier-card strong {
  display: block;
  margin: 8px 0 2px;
  color: var(--brand);
  font-size: 22px;
}

.tier-card small {
  color: var(--muted);
}

.discount {
  position: absolute;
  top: -8px;
  right: 10px;
  padding: 2px 7px;
  color: #fff;
  background: var(--warning);
  border-radius: 4px;
  font-size: 10px;
}

.toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 120;
  padding: 10px 18px;
  color: #fff;
  background: #183a2f;
  border-radius: 6px;
  box-shadow: var(--shadow);
  transform: translateX(-50%);
}

.load-error {
  padding: 44px;
  color: var(--muted);
  text-align: center;
}

.load-error h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 18px;
}

.load-error p {
  margin: 0 0 18px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

table {
  font-variant-numeric: tabular-nums;
}

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

@media (max-width: 1280px) {
  .overview-layout {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-actions button {
    border-right: 1px solid var(--line);
  }

  .quick-actions button:last-child {
    border-right: 0;
  }
}

@media (max-width: 1080px) {
  .public-header {
    grid-template-columns: 1fr auto;
  }

  .public-nav {
    display: none;
  }

  .model-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .hero-status {
    grid-template-columns: repeat(4, 1fr);
  }

  .hero-status div,
  .hero-status div:nth-child(2n),
  .hero-status div:nth-last-child(-n+2) {
    min-height: 88px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .hero-status div:last-child {
    border-right: 0;
  }

  .model-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .catalog-layout {
    grid-template-columns: 210px minmax(0, 1fr);
  }

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

  .search-box {
    flex: 1 1 300px;
  }

  .filter-group {
    order: 3;
    flex-basis: 100%;
  }

  .model-table-wrap {
    overflow-x: auto;
  }

  .pricing-band {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .access-grid {
    grid-template-columns: 1fr;
  }

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

  .setup-panel {
    grid-template-columns: 1fr;
  }

  .request-preview {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .request-preview pre {
    min-height: 0;
  }

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

  .metric-strip > div:nth-child(3) {
    border-right: 0;
  }

  .metric-strip > div:nth-child(n+4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .catalog-layout {
    display: block;
  }

  .filter-sidebar {
    position: static;
    margin-bottom: 14px;
  }

  .filter-section {
    padding: 12px;
  }

  .vertical-filters,
  .vertical-filters.compact {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
  }

  .filter-row {
    width: auto;
    min-width: max-content;
    border: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .auth-panel,
  .editor-panel {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
    padding: 24px 20px;
  }

  .curl-panel .code-block {
    padding: 18px;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .curl-panel .editor-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .curl-panel .editor-actions .button {
    width: 100%;
  }

  .auth-code-row {
    grid-template-columns: 1fr;
  }

  .auth-code-row .button {
    width: 100%;
  }

  .public-header {
    height: 58px;
    padding: 0 14px;
  }

  .brand small,
  .public-actions .ghost {
    display: none;
  }

  .model-hero {
    width: 100%;
    min-height: auto;
    padding: 38px 18px 30px;
  }

  .hero-copy,
  .hero-status {
    min-width: 0;
  }

  .model-hero h1 {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 32px;
  }

  .model-hero p {
    font-size: 14px;
  }

  .hero-status {
    grid-template-columns: 1fr 1fr;
  }

  .hero-status div {
    min-width: 0;
    padding: 18px 14px;
    overflow: hidden;
  }

  .hero-status b {
    overflow-wrap: anywhere;
    font-size: 20px;
  }

  .hero-status div:nth-child(2) {
    border-right: 0;
  }

  .hero-status div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .model-square,
  .access-section {
    padding: 35px 18px 52px;
  }

  .catalog-layout {
    display: block;
  }

  .filter-sidebar {
    position: static;
    margin-bottom: 12px;
  }

  .filter-section {
    padding: 12px;
  }

  .vertical-filters {
    flex-direction: row;
    overflow-x: auto;
  }

  .vertical-filters.compact {
    display: flex;
  }

  .filter-row {
    width: auto;
    min-width: max-content;
    border: 1px solid var(--line);
  }

  .catalog-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .catalog-toolbar .search-box,
  .catalog-toolbar select {
    width: 100%;
  }

  .segmented {
    width: fit-content;
  }

  .model-grid {
    grid-template-columns: 1fr;
  }

  .model-card {
    min-height: 0;
    padding: 18px;
  }

  .model-card-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .model-card-links {
    justify-content: space-between;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .model-toolbar select {
    width: 100%;
  }

  .pricing-band {
    margin: 0 18px 24px;
    padding: 26px 22px;
  }

  .pricing-facts {
    gap: 22px;
    overflow-x: auto;
  }

  .public-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
  }

  .console-sidebar {
    flex-basis: 62px;
    padding: 10px 6px;
  }

  .console-sidebar button {
    height: 44px;
    padding: 0;
    justify-content: center;
  }

  .console-sidebar .nav-section,
  .console-sidebar .nav-label {
    display: none;
  }

  .console-main {
    padding: 18px 12px 36px;
  }

  .kpi-grid,
  .tier-grid {
    grid-template-columns: 1fr;
  }

  .console-user #whoami,
  .console-user .text-button {
    display: none;
  }

  .console-header {
    padding: 0 12px;
  }

  .console-title {
    margin-bottom: 16px;
  }

  .console-title p {
    display: none;
  }

  .setup-main,
  .request-preview,
  .quick-panel {
    padding: 18px;
  }

  .setup-heading {
    gap: 12px;
  }

  .setup-heading h2,
  .quick-panel h2,
  .metrics-heading h2 {
    font-size: 16px;
  }

  .setup-step {
    min-height: 76px;
  }

  .quick-actions {
    display: block;
  }

  .quick-actions button {
    border-right: 0;
  }

  .metrics-heading,
  .key-page-header {
    min-height: 0;
    padding: 16px;
    align-items: stretch;
    flex-direction: column;
  }

  .metric-strip {
    grid-template-columns: 1fr 1fr;
  }

  .metric-strip > div {
    min-height: 96px;
    padding: 16px;
    border-top: 1px solid var(--line);
  }

  .metric-strip > div:nth-child(2n) {
    border-right: 0;
  }

  .metric-strip > div:nth-child(-n+2) {
    border-top: 0;
  }

  .account-summary {
    padding: 14px 16px;
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .account-summary > div {
    width: 100%;
    margin: 4px 0 0;
    justify-content: space-between;
  }

  .key-page-header .button {
    width: 100%;
  }

  .key-toolbar {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .key-search {
    width: 100%;
  }

  .key-toolbar > span {
    margin-left: auto;
  }

  .key-table-wrap {
    min-height: 360px;
  }

  .table-footer {
    padding: 0 16px;
  }

  .table-footer span:first-child {
    display: none;
  }

  .key-drawer {
    width: 100vw;
  }

  .drawer-header {
    padding-left: 18px;
  }

  .drawer-body {
    padding: 18px;
  }

  .drawer-footer {
    padding: 12px 18px;
  }

  .editor-grid {
    grid-template-columns: 1fr;
  }

  .editor-full {
    grid-column: auto;
  }

  .channel-map-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .docs-layout {
    display: block;
  }

  .docs-nav {
    position: static;
    margin-bottom: 12px;
    flex-direction: row;
    overflow-x: auto;
  }

  .docs-nav b,
  .docs-nav a {
    flex: 0 0 auto;
  }
}

.drawer-field textarea {
  width: 100%;
  min-height: 92px;
  padding: 10px 12px;
  resize: vertical;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  font-family: var(--mono);
  font-size: 12px;
}

.drawer-field textarea:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.announcement-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comparison-panel {
  width: min(880px, calc(100vw - 32px));
}

@media (min-width: 841px) and (max-width: 1080px) {
  .public-header {
    grid-template-columns: 1fr auto 1fr;
  }

  .public-nav {
    display: flex;
    gap: 18px;
  }
}

@media (max-width: 720px) {
  .public-header {
    display: flex;
    justify-content: space-between;
  }

  .public-actions {
    min-width: 0;
    gap: 6px;
  }

  .public-actions .button.primary {
    min-height: 34px;
    padding: 0 10px;
    font-size: 12px;
  }

  .filter-toolbar label {
    width: 100%;
    min-width: 0;
    flex: 0 0 auto;
  }

  .filter-toolbar .data-source {
    width: 100%;
    margin-left: 0;
  }
}
