:root {
    --dev-ink: #17231f;
    --dev-muted: #65706b;
    --dev-line: #d9ded7;
    --dev-pine: #1f6a50;
    --dev-pine-dark: #154a39;
    --dev-amber: #985a1a;
    --dev-red: #a73932;
}

button, input, textarea, select { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible, .docs-index a:focus-visible { outline: 3px solid #e7ab42; outline-offset: 3px; }
[hidden] { display: none !important; }

.developers-heading { background: #fff; border-bottom: 1px solid var(--dev-line); padding: 32px 0 28px; }
.developers-kicker, .section-eyebrow { margin: 0 0 4px; color: var(--dev-pine); font-size: 12px; font-weight: 800; }
.developers-heading h1 { margin: 0; font-size: 32px; line-height: 1.35; }
.developers-layout { padding-top: 24px; padding-bottom: 84px; }
.developers-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--dev-line); margin-bottom: 30px; }
.developers-tabs button { min-height: 44px; padding: 0 3px 11px; color: var(--dev-muted); background: transparent; border: 0; border-bottom: 3px solid transparent; font-size: 15px; font-weight: 700; }
.developers-tabs button[aria-selected="true"] { color: var(--dev-pine-dark); border-color: var(--dev-pine); }
.section-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-title-row h2 { margin: 0; font-size: 22px; line-height: 1.4; }
.section-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.session-state, .subtle-count { color: var(--dev-muted); font-size: 13px; }
.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 17px; border: 1px solid transparent; border-radius: 4px; text-align: center; text-decoration: none; font-size: 14px; font-weight: 700; line-height: 1.35; white-space: normal; }
.button-primary { background: var(--dev-pine); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--dev-pine-dark); color: #fff; }
.button-quiet { background: #fff; border-color: #b9c8bf; color: var(--dev-pine-dark); }
.button-quiet:hover:not(:disabled) { background: #f0f5f1; }
.button-danger { color: var(--dev-red); border-color: #d9b7b4; background: #fff; }
.button-danger:hover:not(:disabled) { background: #fff5f4; }
.notice { margin: 0 0 16px; padding: 11px 14px; border-left: 3px solid var(--dev-pine); background: #eaf3ed; color: #184b35; font-size: 14px; }
.notice[data-tone="error"] { border-color: var(--dev-red); background: #fff1ef; color: #842922; }
.notice[data-tone="warning"] { border-color: var(--dev-amber); background: #fff5e7; color: #754310; }
.login-gate { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 30px 0; border-top: 1px solid var(--dev-line); border-bottom: 1px solid var(--dev-line); }
.login-gate h3 { margin: 0; font-size: 19px; }
.login-gate p { margin: 4px 0 0; color: var(--dev-muted); font-size: 14px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--dev-line); background: #fff; }
.metric { min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 22px 24px; }
.metric + .metric { border-left: 1px solid var(--dev-line); }
.metric span { color: var(--dev-muted); font-size: 13px; }
.metric strong { font-size: 30px; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric strong.metric-status { font-size: 23px; }
.metric small { color: var(--dev-muted); font-size: 12px; }
.recharge-strip { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 18px; padding: 17px 20px; background: #ecf3ee; border-left: 4px solid var(--dev-pine); }
.recharge-strip strong { font-size: 15px; }
.recharge-strip p { margin: 3px 0 0; color: #4e5c54; font-size: 13px; }
.package-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.package-pill { display: inline-flex; flex-wrap: wrap; gap: 3px 8px; padding: 5px 11px; border: 1px solid var(--dev-line); border-radius: 4px; background: #fff; color: #46564e; font-size: 12px; }
.package-pill strong { color: var(--dev-ink); }
.console-section { margin-top: 44px; }
.section-intro, .form-note { margin: -6px 0 16px; color: var(--dev-muted); font-size: 13px; }
.key-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(170px, 220px) auto; align-items: end; gap: 12px; }
.key-form label { display: grid; gap: 6px; min-width: 0; color: #3b4c42; font-size: 13px; font-weight: 700; }
.key-form input, .key-limit-input { height: 42px; min-width: 0; width: 100%; padding: 8px 10px; border: 1px solid #b8c5bb; border-radius: 4px; background: #fff; color: var(--dev-ink); font-size: 14px; }
.key-form input::placeholder { color: #85918a; font-weight: 400; }
.key-form + .form-note { margin: 8px 0 18px; }
.table-scroll { width: 100%; overflow-x: auto; border: 1px solid var(--dev-line); background: #fff; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
.data-table th, .data-table td { padding: 12px 14px; border-bottom: 1px solid #e8ece8; vertical-align: middle; }
.data-table th { background: #f1f4f0; color: #4b5c51; font-size: 12px; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td { color: #334139; font-variant-numeric: tabular-nums; }
.data-table code, .docs-content code { padding: 1px 3px; border-radius: 3px; background: #edf1ed; color: #244d38; font-size: .93em; overflow-wrap: anywhere; }
.data-table .empty-row { padding: 28px 14px; text-align: center; color: var(--dev-muted); }
.key-name { display: block; color: var(--dev-ink); font-weight: 700; overflow-wrap: anywhere; }
.key-prefix { display: block; margin-top: 2px; color: var(--dev-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.key-status { font-weight: 700; color: var(--dev-pine-dark); }
.key-status.is-revoked { color: var(--dev-muted); }
.key-actions { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.key-actions .button { min-height: 36px; padding: 6px 10px; font-size: 12px; }
.key-limit-input { width: 90px; height: 36px; }
.limit-cell { min-width: 105px; }
.docs-heading { margin-bottom: 8px; }
.docs-lead { max-width: 780px; margin: 0 0 26px; color: var(--dev-muted); font-size: 14px; }
.docs-grid { display: grid; grid-template-columns: 174px minmax(0, 1fr); gap: 34px; }
.docs-index { position: sticky; top: 90px; align-self: start; display: grid; gap: 2px; }
.docs-index a { padding: 8px 12px; color: #42564b; text-decoration: none; border-left: 2px solid var(--dev-line); font-size: 13px; font-weight: 700; }
.docs-index a:hover, .docs-index a:focus-visible { border-color: var(--dev-pine); color: var(--dev-pine-dark); }
.docs-content { min-width: 0; }
.docs-section { scroll-margin-top: 100px; padding: 0 0 32px; margin-bottom: 32px; border-bottom: 1px solid var(--dev-line); }
.docs-section:last-child { border-bottom: 0; margin-bottom: 0; }
.docs-section h3 { margin: 0 0 14px; font-size: 20px; }
.docs-section p, .docs-section li { color: #3f4f46; font-size: 14px; line-height: 1.8; }
.docs-section p { margin: 0 0 12px; }
.docs-section ol { padding-left: 22px; margin: 0 0 22px; }
.docs-section a { color: var(--dev-pine-dark); text-decoration: underline; }
.example-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-bottom: 12px; }
.example-model, .example-language { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--dev-line); border-radius: 4px; background: #fff; }
.example-model button, .example-language button { min-height: 34px; padding: 5px 12px; border: 0; border-radius: 3px; color: #4e5b52; background: transparent; font-size: 13px; font-weight: 700; }
.example-model button[aria-pressed="true"], .example-language button[aria-selected="true"] { color: #fff; background: var(--dev-pine-dark); }
.code-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border: 1px solid #34453c; border-bottom: 0; background: #27372f; color: #e4eee6; font-size: 12px; }
.copy-button { min-height: 32px; padding: 3px 10px; border: 1px solid #8da99a; border-radius: 3px; background: transparent; color: #fff; font-size: 12px; font-weight: 700; }
.copy-button:hover { background: #3c5144; }
.code-block { margin: 0; max-height: 430px; padding: 20px; overflow: auto; border: 1px solid #34453c; background: #1a2721; color: #e7f1e8; font: 13px/1.65 ui-monospace, SFMono-Regular, Consolas, monospace; tab-size: 2; }
.code-block code { padding: 0; background: transparent; color: inherit; overflow-wrap: normal; }
.docs-table td:first-child { white-space: nowrap; }
.key-dialog { width: min(520px, calc(100% - 28px)); max-height: min(90vh, 650px); padding: 0; border: 1px solid var(--dev-line); border-radius: 6px; box-shadow: 0 20px 70px rgba(18, 36, 25, .2); }
.key-dialog::backdrop { background: rgba(18, 29, 22, .58); }
.key-dialog-content { padding: 27px; }
.key-dialog h2 { margin: 0 0 8px; font-size: 22px; }
.key-dialog p { margin: 0 0 18px; color: #526056; font-size: 14px; }
.key-dialog label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 700; }
.key-dialog input { width: 100%; height: 44px; padding: 8px 10px; border: 1px solid #bac8be; border-radius: 4px; background: #f5f7f4; font: 13px ui-monospace, SFMono-Regular, Consolas, monospace; }
.key-dialog .notice { margin: 12px 0 0; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.public-footer > .public-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.developers-heading { padding: 44px 0; background: linear-gradient(110deg, #f8fbf6, #fff 70%); }
.developers-hero { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: center; }
.developers-heading h1 { font-size: 34px; letter-spacing: -.6px; }
.developers-lead { max-width: 580px; margin: 14px 0 20px; color: #52635a; font-size: 15px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-caption { margin: 16px 0 0; color: #52635a; font-size: 12px; }
.endpoint-card { padding: 22px; border: 1px solid #cfded3; border-radius: 8px; background: #fff; box-shadow: 0 6px 24px #1f6a5008; }
.endpoint-card > span:first-child { display: block; color: #65706b; font-size: 12px; }
.endpoint-card > code { display: block; margin: 8px 0 12px; color: #154a39; font-size: 14px; overflow-wrap: anywhere; }
.endpoint-models { display: flex; gap: 8px; margin-bottom: 18px; }
.endpoint-models span { padding: 2px 7px; background: #eff5f0; border-radius: 4px; color: #355d47; font: 12px/1.8 ui-monospace, monospace; }
.endpoint-card > a { display: inline-block; margin-left: 10px; font-size: 12px; }
.copy-status { display: block; font-size: 12px; }
.setup-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; list-style: none; padding: 0 0 26px; margin: 0; }
.setup-steps li { display: flex; align-items: flex-start; gap: 12px; }
.step-number { flex-shrink: 0; display: grid; place-items: center; width: 32px; height: 32px; margin-top: 2px; background: #e7eee6; color: #35624a; border-radius: 50%; font: 700 12px ui-monospace, monospace; }
.setup-steps a { font-size: 14px; font-weight: 700; text-decoration: none; }
.setup-steps a:hover { text-decoration: underline; }
.setup-steps p { margin: 1px 0 0; color: #65706b; font-size: 12px; }
.developers-tabs { position: sticky; top: 68px; z-index: 20; padding-top: 12px; background: #f5f6f1; }
[role="tabpanel"], .docs-section { scroll-margin-top: 145px; }
.text-link { flex-shrink: 0; font-size: 13px; text-underline-offset: 4px; }
.playground-intro { font-size: 14px; margin-top: -6px; margin-bottom: 24px; }
.playground-grid { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 24px; align-items: start; }
.playground-form { padding: 24px; border: 1px solid var(--dev-line); background: #fff; border-radius: 8px; }
.playground-form fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.playground-form label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: #334b3e; }
.playground-form input, .playground-form select, .playground-form textarea { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 9px 10px; border: 1px solid #b8c5bb; border-radius: 4px; color: var(--dev-ink); background: #fff; font-size: 14px; }
.playground-form select { margin-bottom: 16px; }
.playground-form textarea { resize: vertical; line-height: 1.7; min-height: 114px; }
.playground-form input:disabled, .playground-form select:disabled { background: #f4f6f2; color: #52635a; }
.playground-form .field-note, .field-note { margin: 7px 0 16px; color: #65706b; font-size: 12px; line-height: 1.65; }
.key-input-row { display: flex; gap: 6px; }
.key-input-row input { flex: 1; width: 0; }
.key-input-row button { flex: 0 0 48px; padding: 0; border: 1px solid #b8c5bb; background: #f5f8f4; color: #355d47; border-radius: 4px; font-size: 13px; }
.birth-fields { display: grid; grid-template-columns: 1.2fr 1fr; gap: 12px; margin-bottom: 16px; }
.label-optional { font-weight: 400; color: #7a837e; font-size: 12px; }
.question-examples { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; }
.question-examples button { min-height: 36px; padding: 3px 9px; border: 1px solid #d9e3d8; border-radius: 4px; color: #355d47; background: #f8faf5; font-size: 12px; }
.question-examples button:hover { background: #eaf3e6; }
.playground-submit { width: 100%; min-height: 46px; }
.playground-form .notice { margin: 14px 0 0; font-size: 13px; }
#playground-retry { margin-top: 10px; width: 100%; }
.playground-results { min-width: 0; min-height: 540px; border: 1px solid var(--dev-line); border-radius: 8px; background: #fff; overflow: hidden; }
.result-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 22px; border-bottom: 1px solid #e5ebe3; }
.result-heading h3 { margin: 0; font-size: 17px; }
.result-heading p { margin: 2px 0 0; color: #65706b; font-size: 12px; }
.result-heading .button { flex-shrink: 0; }
.playground-empty { max-width: 400px; margin: 58px auto; padding: 0 24px; text-align: center; color: #65706b; font-size: 14px; }
.empty-orbit { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border: 1px solid #dbe5d8; border-radius: 50%; background: #f4f8ef; color: #537648; font-size: 30px; }
.playground-empty h4 { margin: 0 0 10px; color: #405c49; font-size: 16px; font-weight: 600; }
.playground-empty p { margin: 0 0 20px; }
.playground-messages { padding: 0 24px; overflow-wrap: anywhere; }
.playground-turn { padding: 24px 0; border-bottom: 1px solid #e5ebe3; }
.playground-turn:last-child { border-bottom: 0; }
.turn-question { padding: 12px 16px; background: #f2f6ee; border-radius: 6px; white-space: pre-wrap; font-size: 14px; }
.answer-author { margin: 18px 0 10px; font-size: 13px; font-weight: 700; color: #35624a; }
.answer-body { color: #34443e; font-size: 14px; line-height: 1.85; white-space: pre-wrap; }
.answer-body.rendered { white-space: normal; }
.answer-body p { margin: 10px 0; white-space: pre-wrap; }
.answer-body h4 { margin: 18px 0 8px; font-size: 16px; }
.answer-body ul, .answer-body ol { padding-left: 24px; }
.answer-body pre { overflow: auto; white-space: pre; background: #f5f7f1; padding: 12px; }
.answer-body code { background: #eff4eb; padding: 2px 3px; }
.answer-references { color: #65706b; font-size: 12px; margin-top: 18px; padding-top: 12px; border-top: 1px dashed #d9ded7; }
.answer-references ul { padding-left: 18px; margin: 5px 0; }
.turn-meta { margin: 16px 0 0; font-size: 12px; color: #65706b; }
.playground-billing { margin: 8px 24px 20px; padding: 14px 16px; background: #eef6ec; color: #35583b; font-size: 13px; border-radius: 4px; }
.playground-billing strong { font-size: 16px; }
.playground-billing p { margin: 3px 0 0; }
.followup-button { margin: 0 24px 20px; }
.response-details { border-top: 1px solid #e5ebe3; font-size: 12px; }
.response-details summary { padding: 14px 24px; cursor: pointer; color: #65706b; }
.response-details pre { max-height: 320px; padding: 18px; margin: 0; overflow: auto; background: #1a2721; color: #e7f1e8; font: 12px/1.7 ui-monospace, monospace; }
.integration-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.docs-section .button { text-decoration: none; }
.docs-section .button-primary { color: #fff; }
.recharge-note { margin: 12px 0 0; }

@media (max-width: 900px) {
    .developers-hero { grid-template-columns: minmax(0,1fr) 280px; gap: 24px; }
    .developers-heading h1 { font-size: 29px; }
    .endpoint-card { padding: 18px; }
    .endpoint-card > a { margin: 10px 0 0; }
    .playground-grid { grid-template-columns: 310px minmax(0,1fr); gap: 18px; }
    .playground-form { padding: 18px; }
    .key-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .key-form .button { grid-column: 1 / -1; justify-self: start; }
    .docs-grid { grid-template-columns: 140px minmax(0, 1fr); gap: 22px; }
}
@media (max-width: 700px) {
    .developers-hero { display: block; }
    .developers-heading h1 { font-size: 28px; }
    .endpoint-card { margin-top: 24px; padding: 16px; }
    .endpoint-card > a { margin: 0 0 0 12px; }
    .endpoint-models { margin-bottom: 12px; }
    .setup-steps { grid-template-columns: 1fr; gap: 14px; padding-bottom: 16px; }
    .setup-steps li { align-items: center; }
    .setup-steps p { font-size: 12px; }
    .developers-tabs { gap: 24px; }
    .public-nav nav a.nav-console { display: inline-flex; }
    .playground-grid { grid-template-columns: minmax(0,1fr); }
    .playground-form input, .playground-form select, .playground-form textarea { font-size: 16px; }
    .playground-results { min-height: 320px; scroll-margin-top: 145px; }
    .playground-empty { margin: 35px auto; }
    .result-heading, .playground-messages { padding-left: 18px; padding-right: 18px; }
    .playground-billing { margin-left: 18px; margin-right: 18px; }
    .playground-intro { margin-bottom: 18px; }
    .playground-grid .notice { scroll-margin-top: 145px; }
    .question-examples button { min-height: 44px; }
    .mobile-cards { min-width: 0 !important; }
    .mobile-cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
    .mobile-cards tbody { display: block; }
    .mobile-cards tr { display: grid; grid-template-columns: 1fr 1fr; padding: 14px; gap: 12px; border-bottom: 1px solid var(--dev-line); }
    .mobile-cards tr:last-child { border-bottom: 0; }
    .mobile-cards td { padding: 0; border: 0; min-width: 0; overflow-wrap: anywhere; }
    .mobile-cards td::before { display: block; content: attr(data-label); margin-bottom: 5px; color: #65706b; font-size: 11px; font-weight: 400; }
    .mobile-cards td:first-child, .mobile-cards .key-actions, .mobile-cards .empty-row { grid-column: 1/-1; }
    .mobile-cards .key-actions::before { display: none; }
    .mobile-cards .key-actions .button { min-height: 44px; }
    .mobile-cards .key-limit-input { height: 44px; font-size: 16px; }
    .public-nav nav a[href="/developers/#docs"] { display: inline-flex; }
    .developers-heading { padding: 24px 0; }
    .developers-heading h1 { font-size: 27px; }
    .developers-layout { padding-top: 18px; padding-bottom: 54px; }
    .section-title-row { align-items: flex-start; }
    .section-title-row h2 { font-size: 20px; }
    .login-gate, .recharge-strip { align-items: flex-start; flex-direction: column; }
    .metrics { grid-template-columns: 1fr; }
    .metric { padding: 16px 18px; }
    .metric + .metric { border-top: 1px solid var(--dev-line); border-left: 0; }
    .metric strong { font-size: 25px; }
    .console-section { margin-top: 34px; }
    .key-form { grid-template-columns: 1fr; }
    .key-form .button { grid-column: auto; justify-self: stretch; }
    .data-table { min-width: 670px; }
    .docs-grid { display: block; }
    .docs-index { position: static; display: flex; gap: 4px; overflow-x: auto; margin-bottom: 26px; }
    .docs-index a { flex: 0 0 auto; border-left: 0; border-bottom: 2px solid var(--dev-line); }
    .docs-table { min-width: 620px; }
    .public-footer > .public-container { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media (max-width: 420px) {
    .public-brand strong { font-size: 14px; }
    .public-nav { gap: 8px; }
    .public-nav nav { gap: 8px; }
    .public-nav nav a { font-size: 12px; }
    .section-actions { justify-content: flex-end; }
    .session-state { flex-basis: 100%; text-align: right; }
    .docs-heading { flex-wrap: wrap; }
    .code-block { padding: 13px; font-size: 12px; }
}
