:root {
  color-scheme: light dark;
  --background: #ffffff;
  --surface: #fafafa;
  --control: #f4f4f5;
  --foreground: #1a1a1e;
  --muted: #71717a;
  --faint: #a1a1aa;
  --border: #e4e4e7;
  --rule: #eeeeef;
  --accent: #5251c2;
  --accent-soft: #5251c20d;
  --primary: #1a1a1e;
  --on-primary: #ffffff;
  --danger: #b04138;
  --danger-soft: #b041380d;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #18181b;
    --surface: #1f1f22;
    --control: #27272a;
    --foreground: #fafafa;
    --muted: #a1a1aa;
    --faint: #71717a;
    --border: #303036;
    --rule: #27272a;
    --accent: #a1a7e8;
    --accent-soft: #9299d514;
    --primary: #e4e4e7;
    --on-primary: #18181b;
    --danger: #ed9999;
    --danger-soft: #ed99990d;
  }
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.5;
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button,
input,
select,
textarea {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
a {
  color: inherit;
}
svg {
  flex-shrink: 0;
}
h1,
h2,
h3,
p,
dd {
  margin: 0;
}
h1 {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 400;
  letter-spacing: -0.9px;
}
h2 {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
h3 {
  font-size: 15px;
  font-weight: 500;
}
code,
pre {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}
code {
  overflow-wrap: anywhere;
}
code:not(pre code) {
  color: var(--foreground);
}
label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin: 18px 0 7px;
}
input,
textarea,
select {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
}
input,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
}
input::placeholder {
  color: var(--faint);
}
select {
  min-height: 38px;
  padding: 7px 30px 7px 10px;
}
.page {
  max-width: 1248px;
  margin: auto;
  padding: 0 36px;
}
.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--border);
}
.brand {
  display: inline-flex;
  gap: 11px;
  align-items: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.brand-divider {
  color: var(--faint);
  margin: 0 1px;
  font-weight: 400;
}
.brand-section {
  font-weight: 400;
}
.account-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.account-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}
.lab-link {
  font-size: 12px;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;
}
.lab-link:hover,
.text-link:hover {
  color: var(--foreground);
}
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms;
}
.button:hover:not(:disabled) {
  background: var(--control);
}
.button-primary {
  border-color: var(--primary);
  color: var(--on-primary);
  background: var(--primary);
}
.button-primary:hover:not(:disabled) {
  background: var(--primary);
  opacity: 0.88;
}
.button-quiet {
  border-color: transparent;
}
.button-wide {
  width: 100%;
  min-height: 44px;
  margin-top: 18px;
}
.button-destructive {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--background);
}
.button-destructive:hover:not(:disabled) {
  background: var(--danger);
  opacity: 0.9;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.small-label,
.eyebrow,
.dialog-eyebrow {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.1px;
}
.eyebrow {
  display: block;
  margin-bottom: 13px;
}
.text-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 344px;
  gap: 96px;
  max-width: 884px;
  margin: 100px auto 112px;
  align-items: center;
}
.auth-intro h1 {
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -1.2px;
}
.intro {
  color: var(--muted);
  margin-top: 18px;
  max-width: 350px;
  line-height: 1.75;
}
.auth-features {
  margin: 34px 0;
  display: grid;
  gap: 16px;
  font-size: 13px;
}
.auth-features > div {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.feature-number {
  color: var(--faint);
  font-size: 10px;
  line-height: 20px;
  font-variant-numeric: tabular-nums;
}
.auth-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 30px;
}
.auth-card h2 {
  font-size: 19px;
  letter-spacing: -0.3px;
  margin-bottom: 7px;
}
.auth-card > p {
  font-size: 13px;
}
.auth-footnote {
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 12px;
}
.portal {
  display: grid;
  grid-template-columns: 174px minmax(0, 1fr);
  gap: 44px;
  min-height: 650px;
}
.portal-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 34px;
  align-self: start;
  position: sticky;
  top: 0;
}
.portal-nav > a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.portal-nav > a:hover {
  color: var(--foreground);
  background: var(--surface);
}
.portal-nav > a[aria-current="page"] {
  color: var(--foreground);
  background: var(--control);
}
.nav-note {
  margin: 34px 12px 0;
  display: grid;
  gap: 7px;
}
.nav-note code {
  font-size: 10px;
  color: var(--muted);
}
.portal-content {
  min-width: 0;
  padding-bottom: 50px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 42px 0 28px;
}
.page-heading .muted {
  margin-top: 9px;
  font-size: 13px;
}
.page-heading > .button {
  align-self: flex-end;
  margin-bottom: 1px;
}
.concurrency-strip {
  display: flex;
  align-items: center;
  gap: 17px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.concurrency-strip h2 {
  font-size: 13px;
}
.concurrency-strip p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  max-width: 460px;
  margin-top: 4px;
}
.concurrency-mark {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 25px;
  flex-shrink: 0;
}
.concurrency-mark span {
  display: block;
  width: 4px;
  height: 12px;
  border-radius: 2px;
  background: var(--border);
}
.concurrency-mark span:nth-child(2) {
  height: 18px;
}
.concurrency-mark span:nth-child(3) {
  height: 25px;
}
.concurrency-mark span.active {
  background: var(--accent);
}
.live-count {
  flex-shrink: 0;
  margin-left: auto;
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
}
.key-section {
  margin-top: 23px;
}
.count {
  font-size: 11px;
  font-weight: 400;
  background: var(--control);
  padding: 2px 6px;
  border-radius: 5px;
  margin-left: 5px;
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
}
th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  padding: 11px 10px;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 18px 10px;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
th:first-child,
td:first-child {
  padding-left: 0;
}
th:last-child,
td:last-child {
  padding-right: 0;
  text-align: right;
}
.key-name {
  font-weight: 500;
  overflow-wrap: anywhere;
}
.key-created {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.key-prefix {
  font-size: 11px;
  white-space: nowrap;
}
.key-status {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.key-last-used {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.key-revoked {
  color: var(--muted);
}
.key-revoked .key-name {
  font-weight: 400;
}
.key-table td:last-child .button {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 12px;
}
.empty-state {
  padding: 46px 16px 48px;
  text-align: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--rule);
}
.empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--control);
  border-radius: 11px;
  font-size: 20px;
  color: var(--muted);
  margin-bottom: 13px;
}
.empty-state p {
  font-size: 12px;
  margin-top: 7px;
}
.next-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 32px;
  padding-top: 25px;
  border-top: 1px solid var(--border);
}
.next-step p {
  font-size: 12px;
  margin-top: 4px;
}
.notice {
  padding: 12px 15px;
  border-radius: 8px;
  background: var(--accent-soft);
  font-size: 13px;
  margin-top: 20px;
}
.notice.error {
  background: var(--danger-soft);
  color: var(--danger);
}
.status-page {
  max-width: 440px;
  margin: 90px auto 110px;
  text-align: center;
}
.status-page h1 {
  font-size: 26px;
}
.status-page > p {
  margin: 16px 0 23px;
  line-height: 1.7;
}
.status-page > a {
  display: block;
  margin-top: 24px;
}
.status-symbol {
  display: inline-flex;
  color: var(--accent);
  font-size: 42px;
  margin-bottom: 20px;
}
.window-control {
  display: flex;
  align-items: center;
  gap: 4px;
}
.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 17px 0 24px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.metric-strip > div {
  padding: 0 24px;
  border-left: 1px solid var(--border);
}
.metric-strip > div:first-child {
  padding-left: 0;
  border-left: 0;
}
.metric-strip h2 {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.metric-value {
  margin-top: 8px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.8px;
  font-variant-numeric: tabular-nums;
}
.metric-value.unavailable {
  font-size: 18px;
  color: var(--muted);
}
.detail-list {
  margin: 0;
}
.detail-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 13px;
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  font-variant-numeric: tabular-nums;
}
.footnote {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 24px;
  max-width: 690px;
}
.protocol-tabs {
  display: inline-flex;
  border-radius: 8px;
  padding: 4px;
  gap: 4px;
  background: var(--control);
  margin-bottom: 24px;
}
.protocol-tabs button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  min-height: 36px;
  padding: 8px 12px;
  font-size: 12px;
}
.protocol-tabs button[aria-selected="true"] {
  background: var(--background);
  color: var(--foreground);
}
.endpoint-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  padding: 16px;
  border-radius: 8px;
}
.endpoint-block > div {
  min-width: 0;
  display: grid;
  gap: 7px;
}
.endpoint-block code {
  font-size: 13px;
  overflow-wrap: anywhere;
}
.guide-intro {
  color: var(--muted);
  font-size: 13px;
  margin: 16px 0 20px;
  line-height: 1.75;
}
.code-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.code-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  padding: 4px 8px;
}
.example-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow-x: auto;
}
.example-tabs button {
  border: 0;
  color: var(--muted);
  background: transparent;
  border-radius: 5px;
  white-space: nowrap;
  min-height: 32px;
  padding: 6px 8px;
  font-size: 11px;
}
.example-tabs button[aria-selected="true"] {
  color: var(--foreground);
  background: var(--control);
}
.copy-button {
  font-size: 11px;
  min-height: 30px;
  padding: 5px 8px;
}
pre {
  margin: 0;
  padding: 21px 18px;
  overflow-x: auto;
  line-height: 1.85;
  tab-size: 4;
  background: var(--background);
}
pre code {
  white-space: pre;
  overflow-wrap: normal;
}
.code-caption {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  margin-top: 9px;
}
.guide-section {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.guide-section > h2 {
  margin-bottom: 15px;
}
.guide-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
  margin-top: 14px;
}
.model-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 4px;
}
.model-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 6px;
  background: var(--control);
  font-size: 11px;
}
.model-tag span {
  color: var(--muted);
  font-size: 10px;
}
.reasoning-list {
  margin-top: 13px;
}
.reasoning-list > div {
  flex-wrap: wrap;
  gap: 8px;
}
.reasoning-list code {
  font-size: 11px;
}
.troubleshooting {
  margin: 0;
}
.troubleshooting > div {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--rule);
}
.troubleshooting > div:first-child {
  border-top: 0;
}
.troubleshooting dt {
  font-size: 12px;
  font-weight: 500;
}
.troubleshooting dd {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}
.reference-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  margin-top: 22px;
}
.reference-links a {
  font-size: 11px;
  text-decoration: none;
  color: var(--muted);
}
.reference-links a:hover {
  color: var(--foreground);
}
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}
dialog {
  padding: 0;
  background: var(--background);
  color: var(--foreground);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
}
dialog::backdrop {
  background: #0007;
}
.dialog-content {
  padding: 26px;
}
.dialog-eyebrow {
  display: block;
  margin-bottom: 9px;
}
.dialog-content h2 {
  font-size: 21px;
  line-height: 1.3;
  letter-spacing: -0.45px;
  margin-bottom: 12px;
}
.dialog-content p {
  font-size: 13px;
  line-height: 1.7;
}
.dialog-content > .small,
.dialog-content .small {
  font-size: 12px;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 24px;
}
.dialog-actions .button {
  min-height: 40px;
}
#new-key-secret {
  margin: 18px 0 10px;
  resize: none;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.7;
  background: var(--surface);
}
.toast {
  position: fixed;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 17px;
  background: var(--foreground);
  color: var(--background);
  border-radius: 8px;
  font-size: 12px;
  z-index: 10;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  padding: 10px;
  background: var(--background);
  z-index: 20;
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: translateY(0);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
@media (max-width: 1000px) {
  .page {
    padding: 0 25px;
  }
  .portal {
    grid-template-columns: 145px minmax(0, 1fr);
    gap: 26px;
  }
  .auth-layout {
    gap: 45px;
  }
  .concurrency-strip {
    flex-wrap: wrap;
  }
  .concurrency-strip > div:nth-child(2) {
    flex: 1;
  }
  .live-count {
    margin-left: 28px;
  }
}
@media (max-width: 720px) {
  .page {
    padding: 0 20px;
  }
  .button {
    min-height: 44px;
  }
  .site-header {
    min-height: 66px;
    gap: 10px;
  }
  .brand {
    gap: 8px;
    font-size: 13px;
  }
  .brand svg {
    width: 22px;
    height: 22px;
  }
  .account-actions {
    gap: 3px;
  }
  .account-name,
  .lab-link {
    display: none;
  }
  .account-actions .button {
    font-size: 12px;
    padding: 8px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 44px auto 48px;
    max-width: 400px;
  }
  .auth-intro h1 {
    font-size: 29px;
    letter-spacing: -0.8px;
  }
  .intro {
    font-size: 13px;
    margin-top: 12px;
  }
  .auth-features {
    gap: 11px;
    margin: 22px 0;
  }
  .auth-card {
    padding: 24px;
  }
  .portal {
    display: block;
    min-height: 600px;
  }
  .portal-nav {
    flex-direction: row;
    gap: 8px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
    position: static;
    overflow-x: auto;
  }
  .portal-nav > a {
    min-height: 38px;
    padding: 8px 11px;
    font-size: 12px;
    white-space: nowrap;
  }
  .nav-note {
    display: none;
  }
  .page-heading {
    padding: 28px 0 23px;
    gap: 12px;
    flex-wrap: wrap;
  }
  .page-heading .eyebrow {
    font-size: 9px;
    margin-bottom: 10px;
  }
  h1 {
    font-size: 27px;
  }
  .page-heading .muted {
    font-size: 12px;
  }
  .page-heading > .button {
    margin-top: 2px;
    align-self: flex-start;
  }
  .concurrency-strip {
    padding: 15px;
    gap: 12px;
  }
  .concurrency-strip h2 {
    font-size: 12px;
  }
  .concurrency-strip p {
    font-size: 11px;
  }
  .live-count {
    margin-left: 24px;
  }
  .key-table th,
  .key-table td {
    padding-left: 6px;
    padding-right: 6px;
  }
  .key-table th:first-child,
  .key-table td:first-child {
    padding-left: 0;
  }
  .key-table th:last-child,
  .key-table td:last-child {
    padding-right: 0;
  }
  .key-table td {
    padding-top: 15px;
    padding-bottom: 15px;
  }
  .key-name {
    font-size: 12px;
  }
  .key-created {
    font-size: 10px;
  }
  .key-prefix,
  .key-status {
    font-size: 10px;
  }
  .key-table th:nth-child(3),
  .key-table td:nth-child(3) {
    display: none;
  }
  .key-last-mobile {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    color: var(--muted);
  }
  .key-table td:last-child .button {
    min-height: 44px;
  }
  .next-step {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }
  .metric-strip > div {
    padding: 0 12px;
  }
  .metric-strip h2 {
    font-size: 10px;
  }
  .metric-value {
    font-size: 22px;
  }
  .metric-value.unavailable {
    font-size: 13px;
  }
  .window-control {
    width: 100%;
    margin-top: 6px;
    justify-content: space-between;
  }
  .protocol-tabs {
    width: 100%;
  }
  .protocol-tabs button {
    flex: 1;
    padding: 8px 7px;
    font-size: 11px;
    min-height: 40px;
  }
  .endpoint-block {
    padding: 13px;
  }
  .endpoint-block code {
    font-size: 11px;
  }
  .small-label {
    font-size: 9px;
  }
  .code-toolbar {
    padding: 4px;
    gap: 1px;
  }
  .example-tabs {
    gap: 0;
  }
  .example-tabs button {
    padding: 7px 6px;
    font-size: 10px;
    min-height: 40px;
  }
  .copy-button {
    min-height: 40px;
    padding: 6px;
    font-size: 10px;
  }
  pre {
    padding: 15px 13px;
    font-size: 11px;
  }
  pre code {
    font-size: 11px;
  }
  .troubleshooting > div {
    display: block;
  }
  .troubleshooting dd {
    margin-top: 6px;
  }
  .site-footer {
    flex-direction: column;
    gap: 5px;
    padding: 20px 0;
    font-size: 10px;
  }
  .dialog-content {
    padding: 23px;
  }
}
@media (min-width: 721px) {
  .key-last-mobile {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

#usage-status[data-state="delayed"] {
  color: var(--danger);
}
