/* The AutoSpec portal: one stylesheet, no build step.
   The shared portal shell, the dark developer theme, the documentation layout
   and the usage chart, in that order. The public pages are in showcase.css,
   and AutoSpec's own additions follow in app.css. */

/* ---- buttons ---- */
:is(.portal-root, .enterprise-admin) .op-btn {
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--biz-border);
  background: var(--biz-surface);
  color: var(--biz-text);
  font: inherit;
  font-size: 0.93rem;
  cursor: pointer;
}

:is(.portal-root, .enterprise-admin) .op-btn:hover:not(:disabled) {
  border-color: var(--biz-accent);
}

:is(.portal-root, .enterprise-admin) .op-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

:is(.portal-root, .enterprise-admin) .op-btn-primary {
  background: var(--biz-accent);
  border-color: var(--biz-accent);
  color: #fff;
}

:is(.portal-root, .enterprise-admin) .op-btn-primary:hover:not(:disabled) {
  background: var(--biz-accent-hover);
  border-color: var(--biz-accent-hover);
}

:is(.portal-root, .enterprise-admin) .op-btn-danger {
  color: var(--biz-bad);
  border-color: var(--biz-bad);
}

/* ---- portal shell ---- */
/* Shared portal controls and light defaults. Public globals are never imported. */
.portal-root {
  --biz-bg: #fff;
  --biz-surface: #fff;
  --biz-bar: #f5f5f7;
  --biz-text: #1d1d1f;
  --biz-text-secondary: #6e6e73;
  --biz-text-muted: #76767b;
  --biz-border: #e5e5e7;
  --biz-accent: #0071e3;
  --biz-accent-hover: #005bb5;
  --portal-menu-hover: #eaf4fb;
  --biz-navy: #02204d;
  --biz-good: #24823d;
  --biz-good-wash: #edf7ef;
  --biz-bad: #b42318;
  --biz-bad-wash: #fff1f0;
  --biz-attention: #ffcc00;
  --biz-attention-text: #1d1d1f;
  --biz-shadow: 0 6px 24px rgb(0 0 0 / 14%);
  min-height: 100vh;
  background: var(--biz-bg);
  color: var(--biz-text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body:has(.portal-root) { margin: 0; background: #fff; }
/* The page grows and the footer sits under it, so a short page still puts it at the bottom. */
.portal-root { display: flex; flex-direction: column; }
.portal-page { flex: 1 0 auto; }
.portal-footer { flex-shrink: 0; border-top: 1px solid var(--biz-border); font-size: 12px; color: var(--biz-text-muted); }
.portal-footer-inner { max-width: 1280px; margin: 0 auto; padding: 20px 32px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.portal-footer nav { display: flex; gap: 20px; }
.portal-root .portal-footer a { color: var(--biz-text-muted); }
.portal-root .portal-footer a:hover { color: var(--biz-text); }
@media (max-width: 480px) { .portal-footer-inner { padding: 18px 20px; } }
.portal-root *, .portal-root *::before, .portal-root *::after { box-sizing: border-box; }
.portal-root button, .portal-root input, .portal-root select, .portal-root textarea { font-family: inherit; }
.portal-root button { cursor: pointer; }
.portal-root button:disabled { cursor: default; opacity: .55; }
.portal-root a { color: var(--biz-accent); text-decoration: none; }
.portal-root :focus-visible { outline: 2px solid var(--biz-accent); outline-offset: 4px; }
.business-header { background: var(--biz-bar); border-bottom: 1px solid var(--biz-border); }
.business-bar { max-width: 1280px; min-height: 62px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 56px; }
.portal-root .business-brand { display: flex; align-items: center; gap: 9px; color: var(--biz-navy); white-space: nowrap; font-size: 17px; letter-spacing: -.5px; font-weight: 600; }
.business-brand img { display: block; }
.business-brand strong { font-weight: 400; }
.business-tabs { display: flex; align-self: stretch; gap: 40px; }
.portal-root .business-tab { display: flex; align-items: center; position: relative; color: var(--biz-text); font-size: 14px; }
.portal-root .business-tab:hover { color: var(--biz-accent); }
.business-tab.is-active { font-weight: 600; }
.portal-root .business-tab-attention { display: inline-block; box-sizing: border-box; width: 16px; height: 16px; margin-left: 6px; border-radius: 50%; background: var(--biz-attention); color: var(--biz-attention-text); font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.business-identity { position: relative; justify-self: end; min-width: 0; }
.business-user { display: flex; align-items: flex-start; gap: 9px; padding: 10px 0 10px 12px; background: none; border: none; color: inherit; text-align: right; font: inherit; }
.business-user svg { margin-top: 3px; flex-shrink: 0; }
.business-user-name, .business-company { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 230px; }
.business-user-name { font-size: 13px; line-height: 18px; }
.business-company { font-size: 11px; line-height: 16px; color: var(--biz-text-secondary); }
.business-menu { position: absolute; top: calc(100% + 8px); right: 0; width: 300px; max-width: calc(100vw - 32px); background: var(--biz-surface); border: 1px solid var(--biz-border); border-radius: 5px; box-shadow: var(--biz-shadow); z-index: 50; }
.business-menu::before { content: ""; position: absolute; right: 20px; top: -7px; width: 12px; height: 12px; background: var(--biz-surface); border-left: 1px solid var(--biz-border); border-top: 1px solid var(--biz-border); transform: rotate(45deg); }
.business-menu-profile { display: flex; gap: 12px; align-items: center; padding: 22px; }
.business-menu-profile > div { min-width: 0; }
.business-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--biz-bar); color: var(--biz-text-secondary); font-size: 16px; }
.business-email { display: block; overflow-wrap: anywhere; margin-bottom: 5px; font-size: 12px; }
.business-menu a { font-size: 13px; }
.business-menu a:hover { text-decoration: underline; }
.business-menu-company { display: flex; gap: 10px; padding: 13px 22px; border-top: 1px solid var(--biz-border); font-size: 12px; }
.business-signout { display: block; width: 100%; text-align: left; padding: 19px 22px; border: none; border-top: 1px solid var(--biz-border); background: none; color: inherit; font: inherit; font-size: 13px; }
.business-menu-error { padding: 0 22px 14px; color: var(--biz-bad); font-size: 12px; }
.business-main { max-width: 1180px; margin: 0 auto; padding: 42px 32px 80px; }
.biz-page { margin: 0; padding: 0; }
.biz-section { border: 1px solid var(--biz-border); border-radius: 5px; margin-bottom: 24px; padding: 24px; }
.biz-section h2 { font-size: 18px; font-weight: 500; margin: 0 0 20px; }
.biz-info { display: flex; justify-content: space-between; gap: 24px; padding: 14px 0; border-bottom: 1px solid var(--biz-border); }
.biz-info:last-child { border-bottom: 0; }
.biz-label { color: var(--biz-text-secondary); }
.biz-value { text-align: right; overflow-wrap: anywhere; }
.biz-select { appearance: none; border: 1px solid var(--biz-border); border-radius: 5px; background: var(--biz-surface); padding: 10px 30px 10px 12px; color: var(--biz-text); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%236e6e73'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.biz-breadcrumb ol { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0 0 24px; padding: 0; font-size: 13px; color: var(--biz-text-secondary); }
.biz-breadcrumb li + li::before { content: "›"; margin-right: 10px; }
.business-skip { position: absolute; top: -100px; left: 16px; z-index: 100; padding: 12px; background: var(--biz-surface); }
.business-skip:focus { top: 8px; }
/* Collapse before the desktop tabs and identity compete for space. */
.business-navigation-toggle, .business-user-avatar { display: none; }
.business-identity { grid-column: 3; }
.business-menu-name { display: block; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.business-menu-company { overflow-wrap: anywhere; }
@media (max-width: 1000px) {
  .business-bar { position: relative; gap: 0; padding: 0 12px; grid-template-columns: 44px minmax(0, 1fr) 44px; min-height: 56px; }
  .business-navigation-toggle { display: grid; place-items: center; grid-column: 1; grid-row: 1; width: 44px; height: 56px; padding: 0; border: 0; background: none; color: var(--biz-text); }
  .portal-root .business-brand { grid-column: 2; grid-row: 1; justify-self: center; gap: 7px; font-size: 16px; }
  .business-brand img { width: 26px; height: 26px; }
  .business-tabs { display: none; }
  .business-header[data-navigation-open=true] .business-tabs { display: flex; grid-row: 2; grid-column: 1 / -1; flex-direction: column; gap: 0; padding: 16px 24px 40px; min-height: calc(100dvh - 56px); }
  .portal-root .business-tab { min-height: 48px; padding: 12px 0; border-bottom: 1px solid var(--biz-border); }
  .business-identity { position: static; grid-column: 3; grid-row: 1; }
  .business-user { align-items: center; justify-content: center; width: 44px; height: 56px; padding: 0; }
  .business-user > span:not(.business-user-avatar), .business-user > svg { display: none; }
  .business-user-avatar { display: grid; width: 28px; height: 28px; border: 1px solid var(--biz-text-muted); font-size: 14px; }
  .business-menu { top: 56px; right: 0; width: 100%; max-width: none; border-radius: 0; border-left: 0; border-right: 0; max-height: calc(100dvh - 56px); overflow-y: auto; }
  .business-menu::before { display: none; }
  .business-menu-profile, .business-menu-company, .business-signout { padding: 18px 28px; }
  .business-main { padding: 30px 20px 60px; }
}
@media (max-width: 480px) {
  .business-bar { padding: 0 8px; }
  .portal-root .business-brand { gap: 6px; font-size: 14px; }
  .business-brand img { width: 25px; height: 25px; }
  .business-user-name, .business-company { max-width: 120px; }
  .business-user-name { font-size: 12px; }
  .business-main { padding: 26px 16px 48px; }
  .biz-section { padding: 18px; }
}

.portal-root .op-toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); width: min(460px, calc(100vw - 32px)); z-index: 1000; display: grid; gap: 10px; pointer-events: none; }
.portal-root .op-toast { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 14px; border: 1px solid; border-radius: 8px; box-shadow: 0 6px 24px #152b4626; font-size: 14px; line-height: 1.5; pointer-events: auto; animation: business-toast-in 180ms ease-out both; }
.portal-root .op-toast-ok { color: #18603a; border-color: #b6d9c5; background: #f0faf4; }
.portal-root .op-toast-bad { color: #a02424; border-color: #e9baba; background: #fff4f4; }
.portal-root .op-toast button { flex-shrink: 0; border: 0; background: none; color: inherit; font: inherit; font-size: 20px; line-height: 1; padding: 2px; cursor: pointer; }
.portal-root .op-toast[data-leaving=true] { animation: business-toast-out 180ms ease-in both; }
@keyframes business-toast-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes business-toast-out { to { opacity: 0; transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .portal-root .op-toast, .portal-root .op-toast[data-leaving=true] { animation-duration: 1ms; } }


.portal-root .portal-menu-link { display: block; padding: 16px 22px; border-top: 1px solid var(--biz-border); color: var(--biz-text); }
.portal-root .portal-menu-link:hover { text-decoration: none; }
/* Keep the full row clickable, with breathing room around its highlight. */
.portal-root :is(.portal-menu-link, .business-signout, .business-organization-option) { position: relative; isolation: isolate; }
.portal-root :is(.portal-menu-link, .business-signout, .business-organization-option)::after { content: ""; position: absolute; inset: 8px 0; z-index: -1; pointer-events: none; background: var(--portal-menu-hover); opacity: 0; }
.portal-root :is(.portal-menu-link, .business-signout, .business-organization-option):not(:disabled):is(:hover, :focus-visible)::after { opacity: 1; }
@media (min-width:1001px) and (max-width:1200px) { .business-bar { gap:24px; } .business-tabs { gap:24px; } }
.portal-page-head { margin-bottom: 32px; }
.portal-page-head h1 { margin: 0 0 8px; font-size: 28px; letter-spacing: -.65px; font-weight: 600; }
.portal-page-head p { margin: 0; color: var(--biz-text-secondary); }
.portal-root .portal-signin { grid-column: 3; justify-self: end; white-space: nowrap; font-size: 13px; }
.portal-button { display: inline-flex; justify-content: center; align-items: center; padding: 10px 16px; min-height: 40px; border: 1px solid var(--biz-border); border-radius: 5px; background: var(--biz-surface); color: var(--biz-accent); font: inherit; cursor: pointer; }
.portal-button:hover:not(:disabled) { background: var(--biz-bar); }
.portal-billing-current { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.portal-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--biz-text-muted); }
.portal-billing-current h2 { margin: 10px 0 4px; font-size: 24px; }
.portal-billing-current p { margin: 0; color: var(--biz-text-secondary); }
.portal-billing-note { margin: 0 0 28px; color: var(--biz-text-secondary); font-size: 13px; }
.portal-section-title { font-size: 18px; font-weight: 500; margin: 30px 0 18px; }
.portal-plan-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.portal-plan { display: flex; flex-direction: column; padding: 22px; }
.portal-plan[data-current=true] { border-color: var(--biz-accent); }
.portal-plan h3 { margin: 0; font-size: 16px; font-weight: 500; }
.portal-plan-price { font-size: 25px; margin: 18px 0 8px; letter-spacing: -.5px; }
.portal-plan-price small { font-size: 12px; color: var(--biz-text-muted); }
.portal-plan-quota { margin: 0 0 24px; font-size: 13px; color: var(--biz-text-secondary); flex: 1; }
.portal-empty { padding: 32px 0; text-align: center; color: var(--biz-text-secondary); }
.portal-empty > span { font-size: 28px; color: var(--biz-text-muted); }
.portal-empty h3 { font-size: 15px; color: var(--biz-text); font-weight: 500; margin: 12px 0 6px; }
.portal-empty p { margin: 0; font-size: 13px; }
.portal-error { color: var(--biz-bad); }
.portal-table-scroll { overflow-x: auto; }
.portal-invoices { width: 100%; text-align: left; border-collapse: collapse; font-size: 13px; }
.portal-invoices th { color: var(--biz-text-secondary); font-weight: 500; }
.portal-invoices th,.portal-invoices td { padding: 14px 12px; border-bottom: 1px solid var(--biz-border); white-space: nowrap; }
.portal-invoices th:first-child,.portal-invoices td:first-child { padding-left: 0; }
.portal-sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
@media(max-width:900px) { .portal-plan-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:480px) { .portal-plan-grid { grid-template-columns:minmax(0,1fr); } .portal-billing-current { align-items:flex-start; flex-direction:column; } .portal-page-head h1 { font-size:24px; } }

.portal-credit-table th:not(:first-child), .portal-credit-table td:not(:first-child) { text-align: right; }
.portal-credit-dot { display: inline-block; width: 8px; height: 8px; margin-right: 10px; border-radius: 50%; }
.portal-credit-promo { background: #d65e9b; }
.portal-credit-purchase { background: #4595ef; }
.portal-usage-export { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 20px 0; }
.portal-usage-export label { display: grid; gap: 6px; font-size: 13px; }
.portal-usage-export input { min-width: 0; padding: 9px 12px; min-height: 40px; border: 1px solid var(--biz-border); border-radius: 5px; background: var(--biz-surface); color: var(--biz-text); font: inherit; color-scheme: dark; }

.portal-credit-history th:nth-child(2), .portal-credit-history td:nth-child(2) { text-align: left; }

.portal-credit-summary-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.portal-credit-summary-head h2 { margin-bottom: 0; }
.portal-root .portal-button-primary { min-height: 44px; padding: 11px 24px; background: #147ce5; border-color: #147ce5; color: #fff; font-weight: 600; text-decoration: none; }
.portal-root .portal-button-primary:hover { background: #0969cb; border-color: #0969cb; }

.portal-billing-details form { margin-top: 20px; }
.portal-billing-details fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.portal-billing-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; max-width: 800px; }
.portal-billing-fields label, .portal-billing-field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.portal-billing-fields input, .portal-billing-fields select { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; padding: 10px 12px; border: 1px solid var(--biz-border); border-radius: 5px; background-color: var(--biz-surface); color: var(--biz-text); font: inherit; }
.portal-billing-fields select { padding-right: 32px; }
.portal-billing-fields input:focus, .portal-billing-fields select:focus { outline: 2px solid var(--biz-blue, #147ce5); outline-offset: 1px; }
.portal-billing-fields small { color: var(--biz-muted); font-size: 12px; line-height: 1.5; }
.portal-billing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
@media (max-width: 600px) { .portal-billing-fields { grid-template-columns: 1fr; } }
.business-user { position: relative; }
.portal-support-dot { position: absolute; top: 3px; right: 0; width: 7px; height: 7px; border-radius: 50%; background: #147ce5; }
.portal-support-count { float: right; border-radius: 8px; padding: 0 6px; background: #147ce5; color: white; font-size: 11px; }

.portal-root .business-organization-option { width:100%; border:0; background:none; text-align:left; cursor:pointer; color:inherit; font:inherit; }
.portal-root .business-organization-option:disabled { opacity:1; cursor:default; }

.portal-billing-fields .portal-required { color: var(--biz-bad); }
.portal-billing-fields [aria-invalid="true"] { border-color: var(--biz-bad); box-shadow: 0 0 0 1px var(--biz-bad); }
.portal-billing-fields .portal-field-error { color: var(--biz-bad); font-size: 12px; line-height: 1.5; }


.portal-card-header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:16px; }
.portal-card-header h2 { margin-bottom:0; }
.portal-card-header-actions { display:flex; flex-direction:column; align-items:flex-end; gap:10px; flex-shrink:0; }
.portal-root .portal-card-action { box-sizing:border-box; height:44px; min-height:44px; padding:0 24px; font-size:14px; line-height:20px; flex-shrink:0; white-space:nowrap; }

.portal-modal { color:var(--biz-text); background:var(--biz-surface); border:1px solid var(--biz-border); border-radius:12px; padding:24px; width:min(520px, calc(100vw - 32px)); max-height:calc(100vh - 48px); overflow:auto; box-sizing:border-box; }
.portal-modal::backdrop { background:rgb(0 0 0 / 55%); }
.portal-modal header { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.portal-modal header h2 { margin:0; font-size:20px; }
.portal-modal p { line-height:1.6; }
.portal-modal-close { border:0; background:none; color:inherit; font-size:26px; cursor:pointer; padding:4px 8px; }

/* ---- developer theme ---- */
.developer-root {
.dev-lead {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--site-text-secondary);
  margin: 0 0 20px;
}

.dev-link {
  color: var(--site-accent);
  font-weight: 500;
  text-decoration: none;
}
.dev-link:hover { text-decoration: underline; }

.dev-field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--site-text-secondary);
  margin-bottom: -4px;
}

/* Application: state pill, the reviewer's note, per-field errors */
.dev-status-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin: 0 0 14px;
}
.dev-status-pending { background: rgba(245, 158, 11, 0.15); color: #b45309; }
.dev-status-rejected { background: rgba(239, 68, 68, 0.15); color: #b91c1c; }

.dev-note {
  border: 1px solid var(--site-border);
  border-radius: 8px;
  background: var(--site-bg);
  padding: 12px 16px;
  margin: 0 0 20px;
}
.dev-note-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--site-text-muted);
  margin-bottom: 4px;
}
.dev-note p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--site-text);
  white-space: pre-wrap;
}

.dev-field-error {
  margin: -8px 0 0;
  font-size: 0.8125rem;
  color: #b91c1c;
}

.dev-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--site-text-secondary);
}
.dev-checkbox input { margin-top: 3px; }

/* Buttons */
.dev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background 120ms ease, border-color 120ms ease, opacity 120ms ease;
}
.dev-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.dev-btn-primary { background: var(--site-accent); color: #fff; }
.dev-btn-primary:hover:not(:disabled) { background: var(--site-accent-hover); }
.dev-btn-outline {
  background: transparent;
  border-color: var(--site-border);
  color: var(--site-text);
}
.dev-btn-outline:hover:not(:disabled) { border-color: var(--site-accent); }
.dev-btn-danger {
  background: transparent;
  border-color: var(--site-border);
  color: #e5484d;
}
.dev-btn-danger:hover:not(:disabled) { border-color: #e5484d; background: rgba(229, 72, 77, 0.08); }

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

.dev-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  vertical-align: middle;
}
.dev-badge-warn { background: rgba(245, 158, 11, 0.15); color: #b45309; }

/* Plan tier badges */
.dev-badge-plan { font-size: 0.8125rem; padding: 3px 10px; }
.dev-badge-free { background: var(--chip-bg); color: var(--site-text-secondary); }
.dev-badge-starter { background: rgba(74, 158, 255, 0.15); color: var(--site-accent); }
.dev-badge-pro { background: rgba(139, 92, 246, 0.18); color: #a78bfa; }
.dev-badge-enterprise { background: rgba(34, 197, 94, 0.15); color: #22c55e; }

/* Plan section header */
.dev-plan-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
.dev-plan-eyebrow {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--site-text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.dev-plan-name-row { display: flex; align-items: center; gap: 8px; }
.dev-plan-header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dev-plan-header-actions .dev-btn { text-decoration: none; }

/* Stat grid */
/* Usage card: today's budget as one filled bar, the way Claude Code shows a
   session. Replaced the three stat tiles (quota / used / credentials). */
.dev-usage-card {
  padding: 18px;
  background: var(--site-bg);
  border: 1px solid var(--site-border);
  border-radius: 10px;
}
.dev-usage-card-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dev-usage-card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--site-text);
}
.dev-usage-card-reset {
  font-size: 0.75rem;
  color: var(--site-text-muted);
}
.dev-usage-card-pct {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--site-text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dev-usage-card-track {
  height: 8px;
  border-radius: 999px;
  background: var(--site-border);
  overflow: hidden;
}
.dev-usage-card-fill {
  height: 100%;
  background: var(--site-accent);
  border-radius: 999px;
  transition: width 240ms ease;
}
.dev-usage-card-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.8125rem;
  color: var(--site-text-secondary);
  font-variant-numeric: tabular-nums;
}
.dev-usage-card-foot strong { color: var(--site-text); font-weight: 700; }
.dev-usage-card-remaining { color: var(--site-text-muted); white-space: nowrap; }

.dev-hint {
  font-size: 0.8125rem;
  color: var(--site-text-secondary);
  margin: 12px 0 0;
}

/* Key list */
.dev-key-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.dev-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--site-border);
  border-radius: 10px;
}
.dev-key-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dev-key-name { font-weight: 600; font-size: 0.9375rem; }
.dev-key-meta {
  font-size: 0.8125rem;
  color: var(--site-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dev-key-name { display: flex; align-items: center; gap: 8px; }
/* A revoked v2 key stays in the list, because it is still the answer to "what
   happened to the key I made". It is a neutral tag and NOT the danger red:
   revoking is the thing the reader asked for, so colouring it as a fault would
   report their own successful action back to them as a problem. */
.dev-key-tag {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: 999px;
  color: var(--site-text-secondary);
  background: color-mix(in srgb, var(--site-text) 8%, transparent);
}

.dev-key-create {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}
/* The label goes ABOVE its input. Dropped straight into the flex row it became
   a third item squeezed against the field, which read as a prefix inside it. */
.dev-key-create-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 200px;
}
.dev-key-create-field .dev-field-label { margin-bottom: 0; }
.dev-key-create-field input { width: 100%; }
.dev-key-create input {
  flex: 1;
  min-width: 200px;
  padding: 9px 12px;
  border: 1px solid var(--site-border);
  border-radius: 8px;
  background: var(--site-bg);
  color: var(--site-text);
  font-size: 0.875rem;
  font-family: inherit;
}

/* App (App Attest) registration */
.dev-app-create {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}
.dev-app-fields {
  flex: 1;
  min-width: 240px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.dev-app-fields input {
  padding: 9px 12px;
  border: 1px solid var(--site-border);
  border-radius: 8px;
  background: var(--site-bg);
  color: var(--site-text);
  font-size: 0.875rem;
  font-family: inherit;
}
.dev-app-fields input:first-child {
  grid-column: 1 / -1; /* bundle id spans the row */
}
@media (max-width: 560px) {
  .dev-app-fields { grid-template-columns: 1fr; }
  .dev-app-fields input:first-child { grid-column: auto; }
}
.dev-badge-platform {
  background: var(--chip-bg);
  color: var(--site-text-secondary);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Usage chart
   One column per day for thirty days, including the days with nothing in them:
   a sparse series rendered five bars across a month-wide chart, which said
   neither when the traffic happened nor how long the gaps were. */
/* One-time key reveal modal */
.dev-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.dev-modal {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: 14px;
  padding: 24px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.dev-modal h3 { margin: 0 0 8px; }
.dev-key-reveal {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 14px 0;
}
.dev-key-reveal code {
  flex: 1;
  padding: 10px 12px;
  background: var(--site-bg);
  border: 1px solid var(--site-border);
  border-radius: 8px;
  font-size: 0.8125rem;
  word-break: break-all;
}

/* One-time key reveal.
   Only a hash is stored, so this box is the single moment the secret is
   readable anywhere. The warning is therefore a banner rather than another
   grey hint line beside the others. */
.dev-reveal-warning {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--site-text);
  background: color-mix(in srgb, #e5484d 9%, transparent);
  border: 1px solid color-mix(in srgb, #e5484d 32%, transparent);
}
.dev-reveal-done { margin-top: 16px; width: 100%; }
.dev-agreement-due { margin: 0 0 24px; }
.dev-key-reveal code { user-select: all; }

/* A section heading with an action on the right (e.g. the docs link). */
.dev-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.dev-section-head h2 { margin-bottom: 0; }
.dev-section-head .dev-btn { text-decoration: none; white-space: nowrap; }

}
/* Independent portal theme: never imports the public website stylesheet. */
.portal-root.developer-root {
  color-scheme: dark;
  --biz-bg: #111317; --biz-surface: #181b20; --biz-bar: #1d2026;
  --portal-menu-hover: #222c38;
  --biz-text: #eff0f3; --biz-text-secondary: #a9afb9; --biz-text-muted: #9299a6;
  --biz-border: #30343d; --biz-accent: #70b3ff; --biz-accent-hover: #a2ceff;
  --biz-navy: #f1f2f5; --biz-good: #78d5a4; --biz-good-wash: #162b23;
  --biz-bad: #ffa6a6; --biz-bad-wash: #321f25; --biz-shadow: 0 8px 32px #0006;
  --site-bg: var(--biz-bg); --site-surface: var(--biz-surface); --site-border: var(--biz-border);
  --site-text: var(--biz-text); --site-text-secondary: var(--biz-text-secondary); --site-text-muted: var(--biz-text-muted);
  --site-accent: var(--biz-accent); --site-accent-hover: var(--biz-accent-hover);
  --code-key: #94c6ff; --code-str: #9fdbad; --code-num: #ebc38e; --code-lit: #c5b2f0; --code-com: #929ca9;
}
body:has(.developer-root) { background: #111317; }
.developer-root .account-page { margin: 0; padding: 0; max-width: none; }
.developer-root .account-section { background: var(--biz-surface); border: 1px solid var(--biz-border); border-radius: 5px; padding: 24px; margin: 0 0 24px; }
.developer-root .account-section h2 { font-size: 18px; font-weight: 500; margin: 0 0 20px; }
.developer-root .dev-btn-primary { background: #147ce5; border-color: #147ce5; color: #fff; }
.developer-root .dev-btn-danger,.developer-root .dev-field-error,.developer-root .dev-status-rejected { color: var(--biz-bad); }
.developer-root .dev-status-pending { color: #e7bd7b; }
.developer-root .dev-usage-card { margin: 0; }
.developer-root .op-toast-ok { color: var(--biz-good); background: var(--biz-good-wash); border-color: #385e4b; }
.developer-root .op-toast-bad { color: var(--biz-bad); background: var(--biz-bad-wash); border-color: #70414b; }
.developer-root .dev-key-meta { overflow-wrap: anywhere; }
.developer-root .dev-key-create input { background: var(--biz-bg); color: var(--biz-text); }
.developer-root .biz-section { background: var(--biz-surface); }
.developer-main:has(.docs-shell) { max-width: 1480px; padding-top: 0; }
@media(max-width:480px) { .developer-root .account-section { padding:18px; } }
.developer-root .account-form { display: grid; gap: 14px; max-width: 680px; }
.developer-root .account-form input:not([type=checkbox]),.developer-root .account-form textarea { width:100%; background:var(--biz-bg); color:var(--biz-text); border:1px solid var(--biz-border); border-radius:5px; padding:12px; font:inherit; }
.developer-root .account-form > button { justify-self:start; background:#147ce5; color:white; border:0; border-radius:5px; padding:11px 18px; font:inherit; }
.developer-root .account-form p { margin:0; }
.developer-root .dev-btn-primary:hover:not(:disabled) { background: #0969cb; }
.developer-root .dev-key-tag,.developer-root .dev-badge-free { background:var(--biz-bar); }
.developer-root .dev-modal { max-height:calc(100dvh - 40px); overflow-y:auto; }
.developer-root .dev-usage-card { border:0; border-radius:0; background:none; padding:0; }

/* ---- documentation ---- */
/* ===========================================================================
   API documentation. A full-width, three-column reference:
   left navigation, the article, and an "on this page" rail.
   =========================================================================== */

.docs-page-main {
  flex: 1;
  width: 100%;
  padding: 0 clamp(20px, 3vw, 48px);
  font-family: var(--docs-font), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  color: var(--site-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

.docs-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr) 200px;
  gap: 48px;
  padding: 36px 0 88px;
  align-items: start;
}

/* ── Left navigation ─────────────────────────────────────────────────────── */
.docs-nav {
  position: sticky;
  top: 84px;
  align-self: start;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  padding-bottom: 24px;
}
.docs-nav-group + .docs-nav-group { margin-top: 22px; }
.docs-nav-group-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
  color: var(--site-text-muted);
  padding: 0 0 8px 12px;
}
.docs-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.docs-nav a {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  color: var(--site-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.35;
}
.docs-nav a:hover { color: var(--site-text); background: color-mix(in srgb, var(--site-text) 5%, transparent); }
.docs-nav a.is-active {
  color: var(--site-accent);
  background: color-mix(in srgb, var(--site-accent) 12%, transparent);
  font-weight: 600;
}

/* ── The article ─────────────────────────────────────────────────────────── */
.docs-main { min-width: 0; }
.docs-article { min-width: 0; }

.docs-page-head { margin-bottom: 36px; }
.docs-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  font-weight: 700;
  color: var(--site-accent);
  margin: 0 0 12px;
}
.docs-page-head h1 {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--site-text);
  margin: 0;
  line-height: 1.08;
}
.docs-lead {
  font-size: 1.2rem;
  line-height: 1.6;
  letter-spacing: -0.011em;
  color: var(--site-text-secondary);
  margin: 16px 0 0;
}

.docs-article p {
  color: var(--site-text-secondary);
  line-height: 1.75;
  letter-spacing: -0.006em;
  margin: 0 0 18px;
  font-size: 1rem;
}
.docs-article ul {
  color: var(--site-text-secondary);
  line-height: 1.75;
  letter-spacing: -0.006em;
  margin: 0 0 18px;
  padding-left: 22px;
  font-size: 1rem;
}
.docs-article li { margin: 6px 0; }
.docs-article strong { color: var(--site-text); font-weight: 600; }
.docs-article a { color: var(--site-accent); text-decoration: none; }
.docs-article a:hover { text-decoration: underline; }

/* Section headings, with a hover anchor. */
.docs-h2 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.25;
  color: var(--site-text);
  margin: 56px 0 18px;
  scroll-margin-top: 84px;
  position: relative;
}
.docs-article > :first-child.docs-h2,
.docs-h2:first-child { margin-top: 8px; }
.docs-anchor {
  position: absolute;
  left: -22px;
  color: var(--site-text-muted);
  text-decoration: none;
  opacity: 0;
  font-weight: 400;
}
.docs-h2:hover .docs-anchor { opacity: 0.6; }
.docs-anchor:hover { opacity: 1 !important; text-decoration: none; }

/* Inline code. */
.docs-article code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.84em;
  background: color-mix(in srgb, var(--site-text) 6%, transparent);
  border: 1px solid var(--site-border);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--site-text);
  white-space: nowrap;
}

/* Code blocks with an optional label bar. */
.docs-codeblock {
  margin: 0 0 22px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #1c3151;
  box-shadow: 0 1px 2px rgba(4, 12, 24, 0.4);
}
.docs-codeblock-label {
  background: #0a1626;
  color: #8aa0bd;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  padding: 9px 18px;
  border-bottom: 1px solid #1c3151;
}
.docs-code {
  background: #0d1b2e;
  color: #d6deeb;
  padding: 18px 20px;
  overflow-x: auto;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.75;
  tab-size: 2;
}
.docs-code code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  white-space: pre;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  font-variant-ligatures: none;
}

/* Syntax tokens (server-highlighted in _highlight.tsx). A Night-Owl-ish theme. */
.docs-code .tok-key { color: #7fdbca; }
.docs-code .tok-str { color: #ecc48d; }
.docs-code .tok-num { color: #f78c6c; }
.docs-code .tok-bool,
.docs-code .tok-null { color: #ff6b8b; }
.docs-code .tok-punct { color: #7c8bab; }
.docs-code .tok-method { color: #82aaff; font-weight: 600; }
.docs-code .tok-kw { color: #c792ea; }
.docs-code .tok-flag { color: #addb67; }

/* Endpoint line. */
.docs-endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid var(--site-border);
  border-radius: 10px;
  background: var(--site-bg);
}
.docs-endpoint code {
  white-space: nowrap;
  font-size: 0.95rem;
  background: none;
  border: none;
  padding: 0;
  color: var(--site-text);
  font-weight: 600;
}
.docs-method {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  padding: 4px 9px;
  border-radius: 5px;
  color: #fff;
  flex-shrink: 0;
}
.docs-method-get { background: #1b6ac9; }
.docs-method-post { background: #2e9e5b; }

/* Tables. */
.docs-table-wrap {
  margin: 0 0 18px;
  border: 1px solid var(--site-border);
  border-radius: 10px;
  overflow: hidden;
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.docs-table th,
.docs-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--site-border);
  vertical-align: top;
  color: var(--site-text-secondary);
}
.docs-table tbody tr:last-child td { border-bottom: none; }
.docs-table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--site-text-muted);
  font-weight: 700;
  background: var(--site-bg);
}
.docs-table td code { white-space: nowrap; }
.docs-table .docs-type {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.8rem;
  color: var(--site-text-muted);
  white-space: nowrap;
}
.docs-req { color: var(--site-accent); font-weight: 600; font-size: 0.8rem; }

.docs-countries .docs-country-name { white-space: nowrap; color: var(--site-text); font-weight: 500; }
.docs-countries .docs-ttl { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--site-text); font-weight: 500; }
.docs-countries .docs-note { color: var(--site-text-muted); }
.docs-flag { margin-right: 4px; }

.docs-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
  background: color-mix(in srgb, var(--site-text) 8%, transparent);
  color: var(--site-text-secondary);
}
.docs-pill-on {
  background: color-mix(in srgb, var(--site-accent) 14%, transparent);
  color: var(--site-accent);
}

/* Callout. */
.docs-callout {
  margin: 0 0 18px;
  padding: 14px 18px;
  border: 1px solid var(--site-border);
  border-left: 3px solid var(--site-accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--site-accent) 5%, transparent);
}
.docs-callout-title {
  font-weight: 700;
  color: var(--site-text);
  margin: 0 0 6px !important;
  font-size: 0.9rem;
}
.docs-callout-body p:last-child { margin-bottom: 0; }
.docs-callout-body p { margin-bottom: 8px; }

/* Prev / next pager. */
.docs-pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--site-border);
}
.docs-pager-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--site-border);
  border-radius: 10px;
  text-decoration: none;
  max-width: 48%;
  transition: border-color 120ms ease, background 120ms ease;
}
.docs-pager-link:hover {
  border-color: var(--site-accent);
  background: color-mix(in srgb, var(--site-accent) 4%, transparent);
  text-decoration: none;
}
.docs-pager-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.docs-pager-chevron { color: var(--site-accent); flex-shrink: 0; }
.docs-pager-next { text-align: right; margin-left: auto; }
.docs-pager-dir { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--site-text-muted); font-weight: 700; }
.docs-pager-title { font-size: 0.95rem; font-weight: 600; color: var(--site-accent); }

/* ── Right rail: on this page ─────────────────────────────────────────────── */
.docs-aside {
  position: sticky;
  top: 84px;
  align-self: start;
  font-size: 0.82rem;
}
.docs-aside-title {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 700;
  color: var(--site-text-muted);
  margin-bottom: 10px;
}
.docs-aside ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-left: 1px solid var(--site-border);
}
.docs-aside a {
  display: block;
  padding: 4px 12px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--site-text-muted);
  text-decoration: none;
  line-height: 1.3;
}
.docs-aside a:hover { color: var(--site-text); }
.docs-aside a.is-active { color: var(--site-accent); border-left-color: var(--site-accent); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .docs-shell { grid-template-columns: 220px minmax(0, 1fr); gap: 40px; }
  .docs-aside { display: none; }
}
@media (max-width: 760px) {
  .docs-shell { grid-template-columns: 1fr; gap: 8px; }
  .docs-nav {
    position: static;
    max-height: none;
    border-bottom: 1px solid var(--site-border);
    padding-bottom: 16px;
    margin-bottom: 8px;
  }
  .docs-nav-group { display: inline-block; margin-right: 20px; vertical-align: top; }
  .docs-nav-group + .docs-nav-group { margin-top: 0; }
}

.docs-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 0;
}
.docs-actions button, .docs-actions > a {
  padding: 7px 11px;
  border: 1px solid var(--site-border, #30344b);
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
.docs-actions button:hover, .docs-actions > a:hover { color: var(--site-accent, #389bff); }
.docs-actions button:disabled { opacity: .6; cursor: wait; }
.docs-actions button { display: inline-flex; align-items: center; gap: 6px; }
.docs-actions button svg { flex-shrink: 0; }

/* ---- usage chart ---- */
.dev-usage-root { --usage-text: var(--site-text, #eee); --usage-border: var(--biz-border, #333); --usage-accent: var(--site-accent, #6aa1da); }
.dev-usage-chart-container { box-sizing: border-box; width:100%; max-width:720px; margin-top:16px; padding:16px; border:1px solid var(--usage-border); border-radius:5px; background:var(--biz-bg, transparent); }
.dev-hint { opacity: .65; }
.dev-usage-total { font-size: 1.5rem; font-weight: 700; margin: 0 0 4px; }
.dev-usage { margin-top: 8px; }
.dev-usage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--usage-text) 60%, transparent);
  margin-bottom: 6px;
}
/* Reserves its line so the chart does not jump as the pointer moves across it.
   The JSX also renders a non-breaking space at rest; line-height pins the box so
   the reserved height and the hovered height are identical. */
.dev-usage-readout { line-height: 1.4; min-height: 1.4em; text-align: right; }
.dev-usage-chart {
  display: flex;
  align-items: stretch;
  gap: 4px;
  height: 110px;
  border-bottom: 1px solid var(--usage-border);
}
/* The COLUMN is the hit area, full height, so a day with no requests can still
   be inspected. Hovering the bar alone left an empty day unreachable. */
.dev-usage-col {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  padding: 0;
  border: 0;
  justify-content: center;
  background: transparent;
  cursor: pointer;
  border-radius: 2px 2px 0 0;
}
.dev-usage-col:hover,
.dev-usage-col.is-on,
.dev-usage-col:focus-visible {
  background: color-mix(in srgb, var(--usage-accent) 18%, transparent);
  outline: none;
}
.dev-usage-bar {
  width: 100%;
  max-width: 12px;
  background: var(--usage-accent);
  border-radius: 2px 2px 0 0;
  opacity: 0.85;
}
/* A day that spent its whole budget, coloured apart from a day that spent
   almost all of it: amber for "at the cap", not the accent every other bar
   wears. */
.dev-usage-bar.is-full { background: #f59e0b; }
.dev-usage-col:hover .dev-usage-bar,
.dev-usage-col.is-on .dev-usage-bar { opacity: 1; }
.dev-usage-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.75rem;
  color: color-mix(in srgb, var(--usage-text) 55%, transparent);
}

/* ---- AutoSpec additions ---- */
/* The sign-out row is a link here, not a button. */
.portal-root a.business-signout { color: var(--biz-text); text-decoration: none; }
.portal-root .business-menu a.business-signout:hover { text-decoration: none; }
/* A code block whose label is an HTTP status. */
.docs-article h3 { font-size: 1.1rem; font-weight: 650; color: var(--site-text); margin: 34px 0 12px; }
.docs-article h3 code { font-size: 0.95em; }
/* Wide reference tables scroll inside their frame instead of the page. */
.docs-table-wrap { overflow-x: auto; }
/* Developer pages: the keys form sits under the list. */
.developer-root .account-section > p:last-child { margin-bottom: 0; }
.dev-key-actions { display: flex; gap: 8px; flex-shrink: 0; }
.dev-key-actions form { margin: 0; }
.dev-modal p { color: var(--site-text-secondary); line-height: 1.6; }
.dev-modal a.dev-btn { text-decoration: none; }
.dev-empty { color: var(--site-text-secondary); }
