/* Shared visual language for the public site and customer workspace. */
:root {
  --lab-ink: #142b4c;
  --lab-blue: #204dc5;
  --lab-paper: #f5f7fa;
  --lab-rule: #cdd8e7;
  --lab-tint: #edf3ff;
  --lab-radius: 14px;
  --lab-elevation: 0 2px 3px #132b4c06, 0 12px 30px -20px #132b4c35;
}
body, body.docs-page, body.dashboard-body { background-color: var(--lab-paper); color: var(--lab-ink); }
:where(h1, h2, h3) { text-wrap: balance; }
body :focus-visible { outline: 3px solid #426bd5; outline-offset: 3px; }
.header, .resource-header, .dashboard-top { border-bottom: 1px solid var(--lab-rule); }
.header, .resource-header { box-shadow: 0 4px 20px -14px #142b4c55; }
.button-primary, .auth-panel .primary, .docs-key-button, .setup-controls #next-step {
  background: var(--lab-blue); border-color: var(--lab-blue); border-radius: 9px;
  box-shadow: inset 0 1px 0 #ffffff26, 0 3px 8px #204dc51a;
}
/* Agent workflows: routing panel, protocol list and sample receipt. */
.benefits { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1rem; padding-bottom: 1rem; }
.benefits-heading { padding-right: 0; display: grid; grid-template-columns: 1.2fr 1fr; gap: .8rem 3rem; align-items: end; margin-bottom: 1rem; }
.benefits-heading .eyebrow { grid-column: 1/-1; margin: 0; }
.benefits-heading h2 { font-size: clamp(2rem, 3.8vw, 3.55rem); line-height: 1.05; letter-spacing: -.055em; }
.benefits-heading > p:not(.eyebrow) { font-size: 1rem; margin: 0; max-width: 43ch; }
.benefits .planned-label { position: static; grid-column: 2; justify-self: start; margin: 0; font: 600 .65rem/1.5 'DM Sans', sans-serif; }
.benefits article { padding: clamp(1.3rem, 3vw, 2.5rem); border-radius: 1.15rem; }
.benefits .benefit-models { background: radial-gradient(ellipse at top right, #ffffff1a, transparent 60%), radial-gradient(#ffffff26 1px, transparent 1px) 0 0 / 16px 16px, #173b85; }
.benefits .benefit-caption { font-size: .68rem; font-weight: 700; letter-spacing: .12em; }
.benefits .benefit-models h3 { font-size: clamp(2rem, 3.5vw, 3.25rem); letter-spacing: -.055em; }
.benefits article p:not(.eyebrow) { font-size: .88rem; line-height: 1.65; }
.benefits .model-chips { max-width: 34rem; margin: 1.4rem 0; padding: 1rem; background: #102b61; border: 1px solid #6888bf; border-radius: .75rem; gap: .45rem; }
.benefits .model-chips code { background: #25467b; color: #fff; border: 1px solid #607fae; font-size: .75rem; }
.benefits .benefit-models .text-button { display: inline-flex; align-items: center; min-height: 44px; gap: 1rem; background: white; color: #173b85; border-radius: .55rem; padding: .55rem 1rem; margin: 0; font-weight: 700; }
.benefits .benefit-models .text-button:hover { background: #e3edff; }
.benefits .format-row { flex-wrap: wrap; padding: .95rem .8rem; background: #f1f5fb; border: 0; border-left: 3px solid #7094cf; margin-bottom: .4rem; }
.benefits .format-row strong { font-weight: 700; }
.benefits .format-row span { font: .78rem/1.5 Consolas, monospace; text-align: start; }
.benefits .benefit-cache { flex-direction: column; align-items: start; justify-content: center; gap: 1.2rem; background: #edf4f1; border: 1px solid #c7dad2; }
.benefits .cache-mark { width: 3.3rem; height: 3.3rem; background: #d4e9df; color: #215b46; font-size: 2.4rem; }
.benefits .benefit-receipt { background: #edf2fa; border: 1px solid var(--lab-rule); align-items: center; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); }
.benefits .benefit-receipt .eyebrow { font-size: .62rem; }
.benefits .receipt-preview { transform: none; width: 100%; padding: 1rem; border-top: 3px solid #46689e; box-shadow: var(--lab-elevation); }
.benefits .receipt-heading, .benefits .receipt-preview dl { font-size: .73rem; }
.benefits .receipt-heading span:last-child { font-size: .58rem; }
#discord .discord-card { background: #eaeefb; border-color: #cbd5ed; border-radius: 1.15rem; padding: clamp(1.3rem, 3vw, 2.5rem); }
#discord .discord-badge { color: #334972; background: #fff; border-color: #cbd5ed; }
@media (max-width: 760px) {
  .benefits, .benefits-heading { grid-template-columns: minmax(0, 1fr); }
  .benefits-heading .planned-label { grid-column: 1; }
  .benefits-heading h2 br { display: initial; }
  .benefits .benefit-receipt h3 br { display: initial; }
}
/* Marketing: group the tools used to compare prices into a single surface. */
.hero .hero-heading h1 { letter-spacing: -.06em; }
.catalogue-toolbar, .models-filters, .status-controls {
  border: 1px solid var(--lab-rule); border-radius: var(--lab-radius);
  background: white; padding: clamp(.9rem, 2vw, 1.4rem); box-shadow: var(--lab-elevation);
}
.catalogue-toolbar .catalogue-filters { padding-top: .75rem; border-top: 1px solid var(--lab-rule); }
.model-grid .model-card, .faq-list details, .docs-help-grid article, .models-catalogue,
.setup-side, .setup-workspace, .dashboard-body .panel, .dashboard-body .metric, .service-card {
  border-radius: var(--lab-radius); border-color: var(--lab-rule); box-shadow: var(--lab-elevation);
}
.faq-list details[open] { border-left: 3px solid var(--lab-blue); background: #fafcff; }
/* Guides and service status: a common heading and a clear reading column. */
.docs-intro, .models-intro, .status-hero {
  max-width: none; border-bottom: 1px solid var(--lab-rule);
  padding-bottom: clamp(1.4rem, 3vw, 2.5rem); margin-bottom: clamp(1.4rem, 3vw, 2.5rem);
}
.docs-intro h1, .models-intro h1, .status-hero h1 { max-width: 20ch; color: var(--lab-ink); }
.setup-workspace-head { background: var(--lab-tint); border-radius: 10px; padding: clamp(1rem, 3vw, 1.7rem); }
.guide-step > p { max-width: 65ch; line-height: 1.75; }
.models-list .model-id-card { background: white; border-color: var(--lab-rule); border-radius: 10px; }
.model-id-card:focus-within { border-color: var(--lab-blue); }
.models-list .model-id-info code { background: var(--lab-tint); padding: .25rem .45rem; border-radius: 4px; width: fit-content; }
.status-overview .status-stat, .status-grid .service-card { border-radius: var(--lab-radius); }
.status-stat:first-child { background: var(--lab-ink); }
.status-grid .service-meta { border-top: 1px solid var(--lab-rule); padding-top: .75rem; font-variant-numeric: tabular-nums; }
/* A quiet form surface against the brand-coloured entry panel. */
.auth-story { background-color: var(--lab-ink); }
.auth-panel { background: var(--lab-paper); }
.auth-form-wrap { box-sizing: border-box; max-width: 470px; padding: clamp(1.25rem, 3vw, 2.25rem); margin-block: auto; background: white; border: 1px solid var(--lab-rule); border-radius: 18px; box-shadow: var(--lab-elevation); }
.auth-tabs { background: var(--lab-tint); }
.auth-form-wrap input { background: white; border-color: #afbed2; }
#setup-tools { list-style: none; margin: 0 0 .45rem .95rem; padding: 0 0 0 .55rem; border-left: 2px solid var(--lab-rule); }
#setup-tools a { display: flex; align-items: center; gap: .65rem; min-height: 34px; padding: .3rem .55rem; font-size: .8rem; }
#setup-tools img { width: 18px; height: 18px; object-fit: contain; }
#dashboard-nav [aria-controls="setup-tools"] { align-items: center; }
#dashboard-nav [aria-controls="setup-tools"]::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; margin-left: auto; transform: rotate(45deg); }
#dashboard-nav [aria-expanded="true"]::after { transform: rotate(225deg); }
@media (max-width: 760px) {
  #dashboard-nav:has(#setup-tools:not([hidden])) { display: grid; grid-template-columns: minmax(0,1fr); }
  #setup-tools { display: grid; grid-template-columns: repeat(auto-fit,minmax(9rem,1fr)); }
}
/* Dashboard directories share the brand marks used on the homepage. */
.guide-links { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap: .7rem; margin-top: 1.25rem; }
.guide-links a { display: flex; gap: .75rem; align-items: center; min-height: 5rem; padding: .85rem; background: #f8faff; border: 1px solid #d4deed; border-radius: 12px; }
.guide-links a:is(:hover,:focus-visible) { background: #ecf2ff; border-color: #7898da; color: var(--lab-blue); }
.guide-links strong { font: 600 1rem/1.3 'Space Grotesk',sans-serif; }
.guide-marks, .dashboard-family img { background: white; border: 1px solid #dbe4f0; border-radius: 10px; }
.guide-marks { flex: none; display: inline-flex; gap: 4px; padding: .55rem; }
.guide-marks img { width: 26px; height: 26px; object-fit: contain; }
.guide-arrow { margin-left: auto; color: #456082; }
.brand-mark-image {width:36px;height:36px;object-fit:contain;vertical-align:middle;margin-right:.35rem}.resource-header img {width:34px;height:34px;object-fit:contain;vertical-align:middle;margin-right:.4rem}
.catalogue-panel .model-card .dashboard-family { display: inline-flex; align-items: center; gap: .55rem; background: transparent; padding: 0; font: 600 .85rem 'DM Sans',sans-serif; color: var(--lab-ink); }
.dashboard-family img { width: 36px; height: 36px; object-fit: contain; padding: 6px; }
.catalogue-panel .model-card { border-radius: var(--lab-radius); box-shadow: var(--lab-elevation); }
.catalogue-panel .model-card .discount-badge { background: #e7f6ef; color: #105d44; border: 1px solid #b6dfce; border-left: 3px solid #218361; border-radius: 4px 9px 9px 4px; font-variant-numeric: tabular-nums; }
/* Partner links and private admin console */
.partner-panel { max-width: 760px; background: linear-gradient(140deg,#fff,#f0f5ff); }
.partner-link-row { display: flex; align-items: end; gap: .65rem; }
.partner-link-row input { font-family: Consolas,monospace; }
.partner-count { margin-top: 1.2rem; color: #536780; }
.partner-count strong { color: #1c4bb9; font: 700 1.7rem 'Space Grotesk',sans-serif; }
.management { max-width: 1160px; margin: 2rem auto; padding: 0 1rem 4rem; color:#142b4c; }
.desk-stats,.desk-nav,.pager {display:flex;gap:.75rem;flex-wrap:wrap}.desk-stats>div {flex:1 1 10rem;background:#edf3fb;border-radius:14px;padding:1rem 1.25rem}.desk-stats strong,.desk-stats small,.ledger small {display:block}.desk-stats strong {font:700 2rem/1.3 'Space Grotesk',sans-serif;font-variant-numeric:tabular-nums}.desk-nav {margin:1.5rem 0;gap:.35rem;border-bottom:1px solid #bdcce0;padding-bottom:.65rem}.desk-nav a,.management button {padding:.65rem 1rem;border-radius:8px;font-weight:650}.desk-nav a {text-decoration:none;color:#224579}.desk-nav a[aria-current=page],.management button {background:#173e72;color:white}.desk-nav b {font-size:.76rem}.desk-card {border:1px solid #cbd6e3;border-radius:16px;background:white;padding:clamp(.9rem,3vw,2rem);margin:1rem 0}.desk-card h2 {margin:0 0 1rem}.desk-card form {display:flex;flex-wrap:wrap;align-items:end;gap:.75rem;margin:1rem 0}.desk-card label {display:grid;gap:.35rem}.desk-card input {padding:.65rem;border:1px solid #899cb3;border-radius:7px;max-width:100%;min-width:0}.management button {border:0;cursor:pointer}.management button:disabled {background:#e4e9ee;color:#526274;cursor:default}.ledger {overflow-x:auto}.ledger table {width:100%;border-collapse:collapse;text-align:left;font-variant-numeric:tabular-nums}.ledger th,.ledger td {padding:.72rem .85rem;border-bottom:1px solid #dbe3ec;vertical-align:top}.ledger th {background:#f1f5fa;font-size:.82rem;color:#405570}.ledger td {overflow-wrap:anywhere;min-width:6rem}.ledger tbody tr:hover {background:#f5f8fc}.ledger small,.quiet {color:#526274}.ledger a {font-weight:650;color:#174b91}.desk-card summary {cursor:pointer;color:#174b91;font-weight:650;padding:.85rem 0}.pager:not(:empty){padding:1rem 0}.management :focus-visible {outline:3px solid #276baf;outline-offset:2px}
.management > h1 { margin: 1rem 0 2rem; font: 700 clamp(2rem,5vw,3rem) 'Space Grotesk',sans-serif; color: #142b4c; }
.management .panel { background: #fff; border: 1px solid #cdd8e7; border-radius: 14px; padding: clamp(1rem,3vw,1.75rem); margin: 1rem 0; box-shadow: 0 8px 24px -20px #142b4c55; }
.management .panel h2 { margin: 0 0 1rem; font: 600 1.2rem 'Space Grotesk',sans-serif; }
.management label { display: block; margin: .8rem 0; font-weight: 600; }
.management input { display: block; max-width: 40rem; margin-top: .35rem; padding: .7rem; border: 1px solid #b8c6d9; border-radius: 8px; }
.management button { min-height: 42px; padding: .6rem 1rem; border: 0; border-radius: 8px; background: #204dc5; color: white; font-weight: 700; cursor: pointer; }
.management ul { padding-left: 1.2rem; }
.management li { margin: .55rem 0; line-height: 1.6; overflow-wrap: anywhere; }
.admin-hero { background: linear-gradient(110deg,#142b4c,#204dc5); padding: 2rem; border-radius: 16px; color: white; }
.admin-hero > p { color: #bdcff8; font-size: .72rem; letter-spacing: .14em; font-weight: 700; }
.admin-hero h2 { margin: .6rem 0; font: 700 2rem 'Space Grotesk',sans-serif; }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(10rem,1fr)); gap: .75rem; margin: 1rem 0; }
.admin-stats article { background: white; border: 1px solid #cdd8e7; border-radius: 12px; padding: 1rem; }
.admin-stats span, .admin-stats strong { display: block; }
.admin-stats span { color: #536780; font-size: .8rem; }
.admin-stats strong { margin-top: .45rem; font: 700 1.8rem 'Space Grotesk',sans-serif; color: #204dc5; }
@media(max-width:600px){.partner-link-row{align-items:stretch;flex-direction:column}.partner-link-row button{width:100%}.management{margin-top:1.2rem}}
/* Customer workspace */
.dashboard-body .page-heading { border-radius: 18px; padding: clamp(1.25rem, 3vw, 2.4rem); background: linear-gradient(105deg,#e4edff,#f4f7fc 75%); border: 1px solid #d2def1; }
.dashboard-body .page-heading h1 { line-height: 1.12; }
.dashboard-body .metric-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,13rem),1fr)); }
.dashboard-body .metric-grid .metric { display: flex; flex-direction: column; min-height: 10.5rem; }
.dashboard-body .metric strong { font-size: clamp(1.75rem,3vw,2.9rem); line-height: 1.15; overflow-wrap: anywhere; }
.dashboard-body .metric .balance-cta { margin-top: auto; }
.dashboard-body .spend-ranking ol { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,13rem),1fr)); gap: 1rem; list-style: none; padding: 0; margin: 1.25rem 0 0; }
.spend-ranking li { background: #f5f8fd; border: 1px solid #dce5f1; padding: 1rem; border-radius: 12px; }
.spend-ranking li strong, .spend-ranking li span { display: block; overflow-wrap: anywhere; }
.spend-ranking li strong { font: 600 1.05rem 'Space Grotesk',sans-serif; }
.spend-ranking li span { margin: .35rem 0 .65rem; color: #425875; font-variant-numeric: tabular-nums; }
.spend-ranking meter { display: block; width: 100%; height: .55rem; border: 0; background: #dce5f3; border-radius: 1rem; }
.spend-ranking meter::-webkit-meter-bar { background: #dce5f3; border: none; border-radius: 1rem; }
.spend-ranking meter::-webkit-meter-optimum-value { background: #3460cc; border-radius: 1rem; }
.spend-ranking meter::-moz-meter-bar { background: #3460cc; border-radius: 1rem; }
.dashboard-body .usage-details dd { font-size: clamp(1.15rem,2vw,1.65rem); }
.dashboard-body .onboarding-grid>a:focus-visible, .dashboard-body .onboarding-grid>a:hover { border-color: #829ed9; background: #edf3ff; }
.dashboard-body .model-usage-panel td { text-align: right; }
.dashboard-body .model-usage-panel thead th:not(:first-child) { text-align: right; }
.dashboard-body .sidebar nav a[aria-current=page] { background: var(--lab-tint); color: var(--lab-blue); }
.dashboard-body .page-heading { padding-bottom: 1rem; border-bottom: 1px solid var(--lab-rule); }
.dashboard-body .metric.featured { background: linear-gradient(120deg, #17378d, var(--lab-blue)); border-color: #17378d; }
.dashboard-body .panel-heading { padding-bottom: .75rem; border-bottom: 1px solid var(--lab-rule); }
.dashboard-body table { font-variant-numeric: tabular-nums; }
.dashboard-body th { background: #f2f5fa; color: #455b79; }
.dashboard-body tbody tr:hover { background: #f6f9ff; }
@media (max-width: 600px) {
  .auth-panel { padding-inline: 1rem; }
  .auth-form-wrap { margin-block: 1rem; width: 100%; }
  .catalogue-toolbar, .models-filters, .status-controls { padding: .85rem; }
  .setup-workspace-head { flex-wrap: wrap; }
}
