:root {
  --bg: #f5f8ff;
  --surface: rgba(255, 255, 255, 0.68);
  --surface-strong: rgba(255, 255, 255, 0.9);
  --surface-dark: #111111;
  --text: #0d1830;
  --muted: #566786;
  --line: rgba(13, 24, 48, 0.12);
  --line-strong: rgba(13, 24, 48, 0.18);
  --accent: #0d1830;
  --accent-soft: rgba(255, 255, 255, 0.72);
  --shadow: 0 18px 60px rgba(13, 24, 48, 0.1);
}

body.model-card-body {
  background:
    radial-gradient(58% 62% at 10% 10%, rgba(66, 140, 255, 0.18) 0%, rgba(66, 140, 255, 0) 72%),
    radial-gradient(48% 56% at 88% 14%, rgba(255, 123, 56, 0.16) 0%, rgba(255, 123, 56, 0) 72%),
    linear-gradient(180deg, #f7f9fd 0%, #ffffff 26%, #f8fbff 100%);
}

.model-card-page {
  padding-bottom: 84px;
}

.model-hero {
  padding-top: 92px;
  padding-bottom: 20px;
}

.model-hero-copy {
  max-width: 860px;
}

.model-meta-line {
  margin: 18px 0 0;
  color: rgba(13, 24, 48, 0.54);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.model-hero-kicker {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: clamp(1.3rem, 2vw, 1.9rem);
  line-height: 1.2;
  letter-spacing: -0.04em;
  color: rgba(13, 24, 48, 0.76);
}

.model-hero-lede {
  max-width: 760px;
  margin: 22px 0 0;
  font-size: 1.12rem;
  line-height: 1.82;
  color: var(--muted);
}

.model-hero-grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.model-stat-card,
.model-aside-card,
.model-callout,
.model-compare-card {
  border: 1px solid rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(13, 24, 48, 0.08);
}

.model-stat-card {
  padding: 24px;
  border-radius: 24px;
}

.model-stat-value {
  margin: 14px 0 0;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1;
  letter-spacing: -0.06em;
  font-weight: 800;
}

.model-stat-copy {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.model-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.8fr);
  gap: 34px;
  align-items: start;
}

.model-article {
  min-width: 0;
}

.model-section + .model-section {
  margin-top: 58px;
  padding-top: 34px;
  border-top: 1px solid rgba(13, 24, 48, 0.08);
}

.model-section h2 {
  margin: 14px 0 0;
  max-width: 860px;
  font-size: clamp(2rem, 3vw, 3.1rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.model-section h3 {
  margin: 12px 0 0;
  font-size: 1.3rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.model-section p {
  max-width: 760px;
  margin: 18px 0 0;
  color: rgba(13, 24, 48, 0.82);
  font-size: 1.04rem;
  line-height: 1.85;
}

.model-callout {
  margin-top: 24px;
  padding: 24px 26px;
  border-radius: 24px;
}

.model-table-wrap {
  margin-top: 24px;
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(13, 24, 48, 0.08);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 18px 60px rgba(13, 24, 48, 0.07);
}

.model-card-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.model-card-table th,
.model-card-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(13, 24, 48, 0.08);
  text-align: left;
  vertical-align: top;
}

.model-card-table th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(13, 24, 48, 0.56);
  background: rgba(247, 249, 253, 0.96);
}

.model-card-table tbody tr:last-child td {
  border-bottom: 0;
}

.model-card-table tbody tr.is-highlight {
  background:
    linear-gradient(135deg, rgba(66, 140, 255, 0.12), rgba(255, 123, 56, 0.08)),
    rgba(255, 255, 255, 0.92);
}

.model-card-table tbody tr.is-highlight td {
  font-weight: 700;
}

.model-footnote {
  margin-top: 14px;
  color: rgba(13, 24, 48, 0.56);
  font-size: 0.92rem;
}

.model-compare-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.model-compare-card {
  padding: 24px;
  border-radius: 24px;
}

.model-compare-card p {
  margin-top: 14px;
  font-size: 0.98rem;
  line-height: 1.76;
}

.model-aside {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 18px;
}

.model-aside-card {
  padding: 22px 22px 24px;
  border-radius: 24px;
}

.model-aside-card p {
  margin: 14px 0 0;
  color: rgba(13, 24, 48, 0.78);
  line-height: 1.74;
}

.model-facts {
  margin: 18px 0 0;
  display: grid;
  gap: 14px;
}

.model-facts div {
  display: grid;
  grid-template-columns: minmax(0, 92px) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.model-facts dt {
  color: rgba(13, 24, 48, 0.52);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.model-facts dd {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
  font-weight: 600;
}

.model-aside .btn {
  margin-top: 18px;
  width: 100%;
}

@media (max-width: 1120px) {
  .model-hero-grid,
  .model-compare-grid,
  .model-layout {
    grid-template-columns: 1fr;
  }

  .model-aside {
    position: static;
  }
}

@media (max-width: 720px) {
  .model-hero {
    padding-top: 64px;
  }

  .model-stat-card,
  .model-compare-card,
  .model-aside-card {
    padding: 20px;
  }

  .model-card-table th,
  .model-card-table td {
    padding: 14px 16px;
  }
}

.api-shell {
  display: grid;
  gap: 20px;
}

.api-hero-panel {
  padding: 32px;
  border-radius: 34px;
}

.api-hero-copy {
  max-width: 880px;
}

.api-hero-stats {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.api-hero-stat,
.api-price-card,
.api-usage-card,
.api-topup-card {
  border: 1px solid rgba(13, 24, 48, 0.08);
  background: rgba(255, 255, 255, 0.84);
  border-radius: 22px;
}

.api-hero-stat {
  min-height: 138px;
  padding: 20px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.api-hero-stat strong {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.api-hero-stat span,
.api-price-card span {
  color: var(--muted);
  line-height: 1.6;
}

.api-wallet-card[data-wallet-state="reached_limitations"] {
  border-color: rgba(176, 45, 45, 0.18);
  background: rgba(255, 241, 241, 0.9);
}

.api-wallet-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(29, 173, 97, 0.1);
  color: #157547;
  font-size: 0.88rem;
  font-weight: 700;
}

.api-wallet-card[data-wallet-state="reached_limitations"] .api-wallet-status {
  background: rgba(176, 45, 45, 0.1);
  color: #b42318;
}

.api-pricing-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.api-price-card {
  padding: 18px 20px;
  display: grid;
  gap: 10px;
}

.api-price-card strong {
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.api-account-panel {
  display: grid;
  gap: 18px;
}

.api-account-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.api-account-head h2 {
  margin-top: 10px;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.api-usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.api-usage-card {
  padding: 20px;
}

.api-usage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.api-usage-head h3 {
  margin-top: 10px;
  font-size: 1.14rem;
}

.api-usage-badge,
.api-topup-note {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(13, 24, 48, 0.06);
  color: rgba(13, 24, 48, 0.6);
  font-size: 0.86rem;
  white-space: nowrap;
}

.api-usage-list {
  margin: 16px 0 0;
  display: grid;
  gap: 12px;
}

.api-usage-list div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
}

.api-usage-list dt {
  color: var(--muted);
}

.api-usage-list dd {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.96rem;
}

.api-topup-card {
  padding: 20px;
}

.api-topup-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.api-topup-head h3 {
  margin-top: 10px;
  font-size: 1.2rem;
}

.api-topup-actions {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.api-topup-button {
  border: 0;
  cursor: pointer;
}

@media (max-width: 1120px) {
  .api-hero-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .api-pricing-grid,
  .api-usage-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .api-hero-panel {
    padding: 24px;
    border-radius: 28px;
  }

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

  .api-account-head,
  .api-topup-head,
  .api-usage-head {
    flex-direction: column;
  }
}

* {
  box-sizing: border-box;
}

.hidden {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(65% 75% at 8% 12%, rgba(66, 140, 255, 0.34) 0%, rgba(66, 140, 255, 0) 68%),
    radial-gradient(58% 62% at 88% 14%, rgba(255, 123, 56, 0.28) 0%, rgba(255, 123, 56, 0) 72%),
    radial-gradient(70% 75% at 56% 78%, rgba(27, 215, 216, 0.22) 0%, rgba(27, 215, 216, 0) 70%),
    linear-gradient(180deg, #f4f7ff 0%, #ffffff 62%, #f8fbff 100%);
  overflow-x: hidden;
}

body.chat-body {
  height: 100vh;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.14) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 26%, black 35%, transparent 88%);
  -webkit-mask-image: radial-gradient(circle at 50% 26%, black 35%, transparent 88%);
}

img {
  display: block;
}

.page-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.chat-body .page-shell-chat {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 30;
  margin-top: 16px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(17, 17, 17, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 34px;
  height: 34px;
}

.brand-wordmark {
  width: 152px;
  height: auto;
}

nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

nav a {
  color: rgba(13, 24, 48, 0.8);
  text-decoration: none;
  font-size: 0.95rem;
}

nav a:hover {
  color: var(--text);
}

.nav-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid rgba(13, 24, 48, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.nav-auth-btn:hover {
  background: rgba(255, 255, 255, 0.92);
}

.nav-auth-secondary {
  background: rgba(13, 24, 48, 0.06);
}

main {
  padding-bottom: 40px;
}

.section {
  padding: 44px 0;
}

.hero {
  min-height: calc(82vh - 112px);
  padding-top: 118px;
  display: block;
}

.announce,
.eyebrow,
.mono-label {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.announce {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(13, 24, 48, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 0.76rem;
}

.announce::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #1f7bff;
}

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

h1 {
  margin: 22px 0 0;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  line-height: 1.02;
  letter-spacing: -0.06em;
  font-weight: 800;
}

h1 span {
  display: inline-block;
  color: rgba(13, 24, 48, 0.56);
}

.subtitle {
  max-width: 720px;
  margin: 24px auto 0;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.64);
  color: var(--text);
  border: 1px solid rgba(13, 24, 48, 0.08);
}

.prompt-shell {
  max-width: 760px;
  margin: 92px auto 0;
  padding: 14px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 70px rgba(13, 24, 48, 0.11);
}

.prompt-input {
  min-height: 72px;
  padding: 18px 18px 18px 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(13, 24, 48, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.prompt-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1.08rem;
}

.prompt-input input::placeholder {
  color: rgba(13, 24, 48, 0.52);
}

.prompt-send {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
}

.prompt-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.prompt-actions a,
.prompt-actions button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(13, 24, 48, 0.08);
  font-size: 0.92rem;
  font: inherit;
  cursor: pointer;
}

.prompt-actions a:hover,
.prompt-actions button:hover {
  background: rgba(255, 255, 255, 0.92);
}

.contact,
.hero-metrics,
.metric-card,
.launch-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.contact p,
.metric-text,
.launch-card p {
  color: var(--muted);
  line-height: 1.7;
}

.hero-metrics {
  margin-top: 8px;
  padding: 0;
  border-radius: 30px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.metric-card {
  padding: 22px 22px 24px;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  cursor: pointer;
}

.metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 70px rgba(13, 24, 48, 0.14);
}

.metric-number {
  margin: 10px 0 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.metric-text {
  margin: 10px 0 0;
}

.mono-label,
.eyebrow {
  color: rgba(17, 17, 17, 0.48);
  font-size: 0.74rem;
}

h2 {
  margin: 10px 0 0;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

h3 {
  margin: 12px 0 0;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
}

.contact {
  border-radius: 28px;
  padding: 28px;
}

.launch-section {
  padding-top: 56px;
}

.launch-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto;
  gap: 24px;
  align-items: end;
  padding: 30px;
  border-radius: 32px;
  text-decoration: none;
  color: inherit;
  background:
    linear-gradient(135deg, rgba(31, 123, 255, 0.18), rgba(255, 61, 129, 0.14)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.58));
}

.launch-copy p:last-child {
  margin-bottom: 0;
  max-width: 700px;
}

.launch-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.launch-pill,
.launch-arrow {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(13, 24, 48, 0.08);
  font-size: 0.92rem;
}

.launch-arrow {
  background: var(--accent);
  color: white;
}

.contact {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.contact h2,
.contact p {
  margin: 0;
}

.contact a {
  color: inherit;
}

.contact .btn-primary {
  color: #ffffff;
}

.api-page-main {
  padding: 54px 0 56px;
}

.api-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.16fr);
  gap: 18px;
  align-items: start;
}

.api-panel {
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.api-overview-panel,
.api-manager-panel {
  padding: 28px;
  border-radius: 30px;
}

.api-page-title {
  max-width: none;
  margin: 12px 0 0;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.02;
  text-align: left;
}

.api-copy {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.api-highlight-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.api-highlight-card,
.api-note,
.api-snippet-card,
.api-key-card,
.api-key-empty,
.api-secret-card {
  border: 1px solid rgba(13, 24, 48, 0.08);
  background: rgba(255, 255, 255, 0.82);
  border-radius: 22px;
}

.api-highlight-card {
  min-height: 118px;
  padding: 18px;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.api-highlight-card strong {
  font-size: 1.04rem;
  line-height: 1.45;
}

.api-note-stack {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.api-note {
  padding: 16px 18px;
}

.api-note p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.api-snippet-card {
  margin-top: 16px;
  padding: 18px;
}

.api-snippet-head,
.api-manager-head,
.api-secret-head,
.api-key-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.api-manager-head h2,
.api-snippet-head h2 {
  margin-top: 10px;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
}

.api-manager-meta {
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(13, 24, 48, 0.06);
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.api-snippet {
  margin: 16px 0 0;
  padding: 16px 18px;
  border-radius: 18px;
  background: #0d1830;
  color: #f4f7ff;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.83rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  overflow: auto;
}

.api-create-form {
  margin-top: 22px;
}

.api-create-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.api-create-row .btn {
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.api-key-list {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.api-key-empty {
  padding: 24px;
}

.api-key-empty p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.api-key-card {
  padding: 20px;
}

.api-key-card h3 {
  margin-top: 8px;
  font-size: 1.12rem;
}

.api-key-state {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(29, 173, 97, 0.1);
  color: #157547;
  font-size: 0.86rem;
  font-weight: 700;
}

.api-key-state.is-revoked {
  background: rgba(200, 50, 50, 0.1);
  color: #a22e2e;
}

.api-key-meta-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.api-key-meta {
  padding: 14px;
  border-radius: 18px;
  background: rgba(13, 24, 48, 0.04);
  display: grid;
  gap: 8px;
}

.api-key-meta span {
  color: var(--muted);
  font-size: 0.8rem;
}

.api-key-meta strong {
  font-size: 0.92rem;
  line-height: 1.5;
  word-break: break-word;
}

.api-key-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.api-secret-card {
  margin-top: 18px;
  padding: 20px;
}

.api-secret-copy {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.api-secret-field {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.api-secret-input {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.88rem;
}

.api-secret-command {
  min-height: 152px;
  resize: vertical;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
}

.auth-page-main {
  min-height: calc(100vh - 220px);
  display: grid;
  place-items: center;
  padding: 60px 0 40px;
}

.auth-page-card {
  width: min(460px, 100%);
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 30px 80px rgba(13, 24, 48, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.auth-page-title {
  max-width: none;
  margin: 12px 0 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.04;
  text-align: left;
}

.auth-copy {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-form {
  margin-top: 22px;
}

.auth-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.auth-field {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(13, 24, 48, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  font: inherit;
}

.auth-field:focus {
  outline: 2px solid rgba(31, 123, 255, 0.22);
  border-color: rgba(31, 123, 255, 0.42);
}

.auth-submit {
  width: 100%;
  margin-top: 14px;
}

.auth-code-block {
  margin-top: 18px;
}

.auth-rules {
  margin: 14px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

.auth-field[readonly] {
  color: rgba(13, 24, 48, 0.58);
  background: rgba(248, 250, 255, 0.92);
}

.auth-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.auth-status.is-error {
  color: #b42318;
}

.auth-status.is-success {
  color: #067647;
}

.auth-switch {
  margin: 18px 0 0;
  color: var(--muted);
}

.auth-switch a {
  color: var(--text);
  text-decoration: underline;
}

.chat-page {
  padding: 14px 0 20px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.page-shell-chat {
  width: min(100vw - 24px, 1580px);
}

.topbar-chat {
  margin-bottom: 10px;
}

.chat-shell {
  position: relative;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr) 0;
  gap: 12px;
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

.chat-shell.history-open {
  grid-template-columns: 286px minmax(0, 1fr) 312px;
}

.workspace-panel,
.chat-panel,
.history-panel {
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 60px rgba(13, 24, 48, 0.08);
  border-radius: 26px;
  min-height: 0;
}

/* Keep the chat layout inside the viewport so the inner panes own scrolling. */
.chat-sidebar,
.history-panel {
  position: sticky;
  top: 0;
  height: 100%;
}

.workspace-panel {
  padding: 16px 12px 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.workspace-head-tight,
.chat-stage-head,
.history-head {
  padding: 6px 10px 12px;
}

.workspace-head h2,
.chat-stage-head h2,
.history-head h2 {
  margin-top: 8px;
  font-size: 1.35rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.workspace-usage,
.chat-limit {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.workspace-tree {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(13, 24, 48, 0.06);
  background: rgba(255, 255, 255, 0.46);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.workspace-tree.dragover {
  background: rgba(13, 24, 48, 0.06);
  border-color: rgba(13, 24, 48, 0.14);
}

.workspace-tree-scroll {
  height: 100%;
  overflow: auto;
  padding: 10px 8px 14px;
}

.workspace-empty {
  padding: 12px 10px;
  color: rgba(13, 24, 48, 0.44);
  font-size: 0.92rem;
}

.tree-node {
  user-select: none;
}

.tree-node.folder {
  margin-left: 12px;
}

.tree-node.folder:first-child {
  margin-left: 0;
}

.tree-folder-label,
.tree-file-label {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
  text-align: left;
}

.tree-folder-label {
  cursor: pointer;
}

.tree-file-label {
  cursor: grab;
}

.tree-folder-label[draggable="true"] {
  cursor: grab;
}

.tree-folder-label:hover,
.tree-file-label:hover {
  background: rgba(13, 24, 48, 0.055);
}

.tree-node.is-drag-source > .tree-folder-label,
.tree-node.is-drag-source > .tree-file-label {
  opacity: 0.55;
}

.tree-node.folder.is-drop-target > .tree-folder-label {
  background: rgba(13, 24, 48, 0.1);
  outline: 1px solid rgba(13, 24, 48, 0.14);
}

.tree-chevron {
  width: 12px;
  color: rgba(13, 24, 48, 0.52);
  transform: rotate(0deg);
  transition: transform 0.16s ease;
}

.tree-chevron.expanded {
  transform: rotate(90deg);
}

.tree-folder-name,
.tree-file-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-file-icon {
  width: 16px;
  color: rgba(13, 24, 48, 0.62);
  text-align: center;
  font-size: 0.8rem;
}

.tree-children {
  margin-left: 12px;
}

.tree-children.collapsed {
  display: none;
}

.tree-context-menu {
  position: fixed;
  z-index: 200;
  min-width: 150px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(13, 24, 48, 0.08);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 40px rgba(13, 24, 48, 0.18);
}

.tree-context-menu.hidden {
  display: none;
}

.tree-context-menu button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
  font: inherit;
  font-size: 0.93rem;
  padding: 0 10px;
  cursor: pointer;
}

.tree-context-menu button:hover {
  background: rgba(13, 24, 48, 0.06);
}

.chat-main {
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 0 18px;
  overflow: hidden;
}

.chat-stage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.chat-stage-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-toggle,
.history-new {
  border-radius: 999px;
  min-height: 36px;
  padding: 0 14px;
  font: inherit;
  font-size: 0.93rem;
  cursor: pointer;
}

.history-toggle {
  border: 1px solid rgba(13, 24, 48, 0.08);
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
}

.history-new {
  border: 0;
  background: var(--accent);
  color: white;
}

.chat-stream {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 0 18px;
}

.chat-stream.hidden,
.chat-composer.hidden {
  display: none;
}

.file-preview {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 12px 18px 18px;
}

.file-preview.hidden {
  display: none;
}

.file-preview-head {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 0 0 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.file-preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-preview-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.file-preview-head h2 {
  font-size: 1.1rem;
  line-height: 1.2;
  word-break: break-word;
}

.file-preview-body {
  width: min(100%, 980px);
  margin: 0 auto;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(13, 24, 48, 0.08);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.file-preview-editor {
  resize: none;
  outline: 0;
  font: inherit;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
}

.file-preview-render {
  white-space: normal;
}

.file-preview-render img {
  max-width: 100%;
  height: auto;
}

.file-preview-render table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 22px;
  font-size: 0.94rem;
}

.file-preview-render th,
.file-preview-render td {
  padding: 10px 12px;
  border: 1px solid rgba(13, 24, 48, 0.1);
  text-align: left;
  vertical-align: top;
}

.file-preview-render h1,
.file-preview-render h2,
.file-preview-render h3,
.file-preview-render h4,
.file-preview-render p,
.file-preview-render ul,
.file-preview-render ol,
.file-preview-render .markdown-ordered-list {
  margin: 0 0 14px;
}

.file-preview-render .sheet-preview + .sheet-preview {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(13, 24, 48, 0.08);
}

.file-preview-frame {
  border: 0;
  background: rgba(255, 255, 255, 0.92);
}

.chat-empty-state,
.message-row {
  width: min(100%, 980px);
  margin: 0 auto;
}

.chat-empty-state {
  padding: 120px 16px 0;
  text-align: center;
  color: rgba(13, 24, 48, 0.48);
  font-size: 1rem;
}

.message-row {
  padding: 18px 18px 14px;
}

.message-inner {
  display: grid;
  gap: 10px;
}

.message-role {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: rgba(13, 24, 48, 0.52);
}

.message-body {
  width: min(100%, 820px);
  line-height: 1.78;
  font-size: 1rem;
}

.message-row.user .message-inner {
  justify-items: end;
}

.message-row.user .message-body {
  padding: 14px 16px;
  border-radius: 22px;
  background: rgba(13, 24, 48, 0.06);
  border: 1px solid rgba(13, 24, 48, 0.06);
}

.message-row.assistant .message-body {
  color: rgba(13, 24, 48, 0.94);
}

.message-row.assistant.is-thinking .message-body,
.message-row.assistant.is-thinking .message-body * {
  animation: none !important;
  transition: none !important;
  background-image: none !important;
}

.message-row.assistant.is-thinking .message-body {
  color: rgba(13, 24, 48, 0.62);
  font-style: normal;
}

.message-body p,
.message-body ul,
.message-body ol,
.message-body pre,
.message-body blockquote,
.message-body h1,
.message-body h2,
.message-body h3,
.message-body h4,
.message-body h5,
.message-body h6,
.message-body .markdown-table-wrap,
.message-body .markdown-ordered-list,
.message-body hr {
  margin: 0 0 14px;
}

.message-body ul,
.message-body ol {
  padding-left: 24px;
}

.message-body .markdown-ordered-list,
.file-preview-render .markdown-ordered-list {
  display: grid;
  gap: 10px;
}

.message-body .markdown-ordered-item,
.file-preview-render .markdown-ordered-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.message-body .markdown-ordered-marker,
.file-preview-render .markdown-ordered-marker {
  min-width: 2.5ch;
  color: rgba(13, 24, 48, 0.68);
  font-variant-numeric: tabular-nums;
}

.message-body .markdown-ordered-content,
.file-preview-render .markdown-ordered-content {
  min-width: 0;
}

.message-body h1,
.message-body h2,
.message-body h3,
.message-body h4,
.message-body h5,
.message-body h6 {
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.message-body h1 {
  font-size: 1.45rem;
}

.message-body h2 {
  font-size: 1.22rem;
}

.message-body h3 {
  font-size: 1.06rem;
}

.message-body h4 {
  font-size: 1rem;
}

.message-body h5,
.message-body h6 {
  font-size: 0.94rem;
}

.message-body code {
  padding: 0.12rem 0.42rem;
  border-radius: 8px;
  background: rgba(13, 24, 48, 0.07);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9em;
}

.message-body pre {
  position: relative;
  padding: 16px 18px;
  border-radius: 16px;
  overflow: auto;
  background: #0f1728;
  color: #f8fbff;
}

.message-body pre[data-lang] {
  padding-top: 34px;
}

.message-body pre[data-lang]::before {
  content: attr(data-lang);
  position: absolute;
  top: 10px;
  right: 14px;
  color: rgba(248, 251, 255, 0.58);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.message-body pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.message-body blockquote {
  padding-left: 14px;
  border-left: 3px solid rgba(13, 24, 48, 0.14);
  color: rgba(13, 24, 48, 0.7);
}

.message-body hr {
  border: 0;
  border-top: 1px solid rgba(13, 24, 48, 0.12);
}

.markdown-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(13, 24, 48, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.message-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.message-body th,
.message-body td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(13, 24, 48, 0.08);
  text-align: left;
  vertical-align: top;
}

.message-body thead th {
  background: rgba(13, 24, 48, 0.05);
  font-weight: 700;
}

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

.chat-composer {
  padding: 0 18px 4px;
}

.composer-shell {
  width: min(100%, 980px);
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  border-radius: 26px;
  border: 1px solid rgba(13, 24, 48, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(13, 24, 48, 0.08);
}

.chat-composer textarea {
  width: 100%;
  min-height: 24px;
  max-height: 220px;
  resize: none;
  overflow: auto;
  padding: 8px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.6;
}

.chat-composer textarea::placeholder {
  color: rgba(13, 24, 48, 0.48);
}

.composer-send {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #111111;
  color: #ffffff;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 10px 18px rgba(17, 17, 17, 0.16);
}

.composer-send span {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.48rem;
  font-weight: 900;
  line-height: 1;
}

.composer-send:not(.is-stop) span {
  -webkit-text-stroke: 0.7px currentColor;
  text-shadow:
    0.55px 0 0 currentColor,
    -0.55px 0 0 currentColor,
    0 0 0.25px currentColor;
  transform: translateY(-1px);
}

.composer-send.is-stop {
  background: #b42318;
  box-shadow: 0 10px 18px rgba(180, 35, 24, 0.18);
}

.composer-send.is-stop span {
  width: 15px;
  height: 15px;
  font-size: 0;
  line-height: 0;
  color: transparent;
  background: #ffffff;
  border-radius: 2px;
}

.composer-send:hover {
  transform: translateY(-1px);
}

.history-panel {
  padding: 16px 12px 12px;
  overflow: auto;
  transition: transform 0.22s ease, opacity 0.22s ease;
  min-width: 0;
}

.history-panel.collapsed {
  transform: translateX(104%);
  opacity: 0;
  pointer-events: none;
}

.history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.history-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.history-list {
  display: grid;
  gap: 8px;
  padding: 0 8px 12px;
}

.history-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
}

.history-item:hover,
.history-item.active {
  background: rgba(13, 24, 48, 0.055);
}

.history-item strong,
.history-item span {
  display: block;
}

.history-item strong {
  font-size: 0.94rem;
  font-weight: 700;
}

.history-item span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
}

footer {
  padding: 18px 0 44px;
  color: rgba(17, 17, 17, 0.5);
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .launch-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 20px, 1240px);
  }

  .topbar {
    padding: 14px 16px;
    border-radius: 24px;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  nav {
    gap: 14px;
    flex-wrap: wrap;
  }

  .hero {
    padding-top: 34px;
    min-height: auto;
  }

  h1 {
    font-size: clamp(2.2rem, 11vw, 3.6rem);
  }

  h2 {
    font-size: clamp(1.7rem, 9vw, 2.5rem);
  }

  .subtitle {
    font-size: 1rem;
  }

  .prompt-shell {
    margin-top: 52px;
    padding: 12px;
    border-radius: 22px;
  }

  .prompt-input {
    min-height: 62px;
    padding: 14px 14px 14px 16px;
    border-radius: 18px;
  }

  .prompt-input input {
    font-size: 0.98rem;
  }

  .contact,
  .metric-card {
    padding: 22px;
    border-radius: 22px;
  }

  .launch-card {
    padding: 22px;
    border-radius: 24px;
  }

  .auth-page-card {
    padding: 22px;
    border-radius: 24px;
  }

  .api-page-main {
    padding: 34px 0 42px;
  }

  .api-page-grid {
    grid-template-columns: 1fr;
  }

  .api-overview-panel,
  .api-manager-panel {
    padding: 24px;
    border-radius: 24px;
  }

  .api-highlight-grid,
  .api-key-meta-grid {
    grid-template-columns: 1fr;
  }

  .api-create-row,
  .api-secret-field {
    grid-template-columns: 1fr;
  }

  .api-manager-head,
  .api-snippet-head,
  .api-secret-head,
  .api-key-card-head {
    flex-direction: column;
  }

  .api-manager-meta {
    white-space: normal;
  }

  .api-create-row .btn,
  .api-secret-field .history-toggle,
  .api-key-actions .history-toggle {
    width: 100%;
  }

  .chat-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .chat-sidebar,
  .history-panel {
    position: static;
    height: auto;
  }

  .history-panel.collapsed {
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }

  .workspace-panel,
  .chat-main,
  .history-panel {
    min-height: auto;
  }

  .chat-stage-head,
  .history-head {
    flex-direction: column;
  }

  .chat-stage-meta,
  .history-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .message-row,
  .chat-empty-state,
  .composer-shell {
    width: 100%;
  }
}

/* API page cleanup overrides */
.api-page-grid {
  grid-template-columns: 1fr;
  gap: 20px;
}

.api-account-panel,
.api-manager-panel {
  padding: 30px;
  border-radius: 30px;
}

.api-account-panel {
  display: grid;
  gap: 18px;
}

.api-manager-head {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(13, 24, 48, 0.08);
}

.api-create-form {
  margin-top: 4px;
}

.api-hero-panel .api-copy {
  max-width: 780px;
}

.api-key-card {
  display: grid;
  gap: 16px;
}

.api-key-actions {
  display: flex;
  justify-content: flex-end;
}

.api-example-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.api-example-tabs .history-toggle.is-active {
  background: var(--accent);
  color: #ffffff;
  border-color: transparent;
}

.api-example-toolbar {
  margin-top: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.api-example-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.api-topup-custom {
  margin-top: 14px;
}

.api-topup-custom-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.api-topup-custom-row .btn,
.api-topup-button {
  min-height: 52px;
  border: 0;
  cursor: pointer;
}

.api-topup-button {
  padding: 0 18px;
}

.api-key-meta-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1120px) {
  .api-page-grid,
  .api-hero-stats,
  .api-pricing-grid,
  .api-usage-grid,
  .api-key-meta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .api-account-panel,
  .api-manager-panel,
  .api-hero-panel {
    padding: 24px;
  }

  .api-account-head,
  .api-topup-head,
  .api-usage-head,
  .api-example-toolbar {
    flex-direction: column;
  }

  .api-topup-custom-row {
    grid-template-columns: 1fr;
  }
}

.auth-consent {
  margin-top: 16px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
  line-height: 1.65;
  font-size: 0.94rem;
}

.auth-consent input {
  margin-top: 4px;
}

.auth-consent a,
footer a {
  color: var(--text);
  text-decoration: underline;
}

.legal-page-main {
  padding: 56px 0 64px;
}

.legal-page-card {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 32px;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 30px 80px rgba(13, 24, 48, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.legal-page-title {
  max-width: none;
  margin: 12px 0 0;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.03;
  text-align: left;
}

.legal-copy {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.legal-section + .legal-section {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid rgba(13, 24, 48, 0.08);
}

.legal-section h2 {
  font-size: clamp(1.45rem, 2.8vw, 2rem);
}

.legal-section p {
  margin: 14px 0 0;
  color: rgba(13, 24, 48, 0.82);
  line-height: 1.82;
}

.legal-list {
  margin: 14px 0 0;
  padding-left: 20px;
  color: rgba(13, 24, 48, 0.82);
  line-height: 1.82;
}

@media (max-width: 720px) {
  .legal-page-card {
    padding: 24px;
    border-radius: 26px;
  }
}
