/* Polaris-Mist API & Workspace Console — native extension of mist-model.css and polaris-unified.css */
.mist-api-page{background:#fafbf9;color:#182832;font-family:'DM Sans',Arial,sans-serif;--cp-ink:#21343f;--cp-muted:#647681;--cp-line:#dce3e5}
.mist-api-page *{box-sizing:border-box}
.mist-api-shell{max-width:1320px;margin:0 auto;padding:0 56px}
.mist-api-top{max-width:1320px;margin:0 auto;padding:22px 56px 20px;display:flex;justify-content:space-between;align-items:center;gap:24px;border-bottom:1px solid var(--cp-line)}
.mist-api-top nav{display:flex;gap:11px;align-items:center;font-size:12px;color:#7a8992}
.mist-api-top nav a{color:#526b79;text-decoration:none}
.mist-api-top nav a:hover{color:#2447ef}
.mist-api-top strong{font-weight:500;color:#21343f}
.mist-api-top>span{font:500 10px/1.5 'IBM Plex Mono',monospace;letter-spacing:.07em;color:#526c80}

.mist-api-hero{max-width:1320px;margin:0 auto;padding:54px 56px 42px;display:grid;grid-template-columns:1.2fr .8fr;gap:56px;align-items:end}
.mist-api-eyebrow{font:500 10px/1.6 'IBM Plex Mono',monospace;letter-spacing:.08em;text-transform:uppercase;color:#4538c4;margin:0 0 16px;display:flex;align-items:center;gap:9px}
.mist-api-eyebrow span{font-size:20px;line-height:1}
.mist-api-hero h1{font-size:clamp(42px,4.6vw,64px);line-height:1.06;letter-spacing:-.05em;font-weight:500;color:#1d313d;margin:0}
.mist-api-hero h1 em{font-style:normal;color:#4538c4}
.mist-api-lead{font-size:17px;line-height:1.68;color:#587084;margin:0 0 22px}
.mist-api-hero-meta{display:flex;flex-wrap:wrap;gap:10px}
.mist-api-pill{font:500 11px/1.4 'IBM Plex Mono',monospace;padding:7px 11px;border-radius:5px;background:#eef2f6;border:1px solid #d5dfe6;color:#2c4657}

.mist-api-subnav{max-width:1320px;margin:0 auto;padding:0 56px;border-block:1px solid var(--cp-line);display:flex;justify-content:space-between;align-items:center;min-height:60px;gap:24px;background:#f4f7f8}
.mist-api-subnav-links{display:flex;gap:28px;flex-wrap:wrap}
.mist-api-subnav a{font-size:13px;color:#526b79;text-decoration:none;padding:10px 0;font-weight:500}
.mist-api-subnav a:hover{color:#2447ef}
.mist-api-endpoint-badge{font:11px/1.4 'IBM Plex Mono',monospace;color:#34536b;background:#fff;border:1px solid #d3dde4;padding:6px 12px;border-radius:5px}

/* Playground */
.mist-pg-section{padding:48px 0 68px}
.mist-pg-bar{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap;margin-bottom:14px}
.mist-pg-presets{display:flex;gap:8px;flex-wrap:wrap}
.mist-pg-preset{background:#fff;border:1px solid #cfd9e0;color:#34536b;border-radius:6px;padding:9px 14px;font:500 13px/1.3 'DM Sans',Arial,sans-serif;cursor:pointer;transition:border-color .15s,background .15s}
.mist-pg-preset:hover{border-color:#4538c4;color:#4538c4}
.mist-pg-preset[aria-pressed="true"]{background:#4538c4;border-color:#4538c4;color:#fff}
.mist-pg-preset--live{border-color:#b7aee8;background:#f5f3ff;color:#3628a8}
.mist-pg-mode{display:flex;align-items:center;gap:10px;font:11px/1.4 'IBM Plex Mono',monospace;color:#587084}
.mist-pg-dot{width:8px;height:8px;border-radius:50%;background:#1e9e6a;display:inline-block}
.mist-pg-dot.is-busy{background:#d9822b}
.mist-pg-dot.is-error{background:#c93b2b}

.mist-pg-authbar{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;padding:11px 16px;margin-bottom:18px;border-radius:7px;background:#f1f5f8;border:1px solid #d6e0e7}
.mist-pg-authbar-status{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13px;color:#334c5d}
.mist-pg-auth-label{font:500 10px/1.3 'IBM Plex Mono',monospace;letter-spacing:.06em;padding:4px 8px;border-radius:4px;background:#e3ebf2;color:#274256}
.mist-pg-authbar-status code{font:12px 'IBM Plex Mono',monospace;color:#3628a8}
.mist-pg-authbar-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.mist-pg-key-input{width:240px;height:34px;padding:0 10px;border-radius:5px;border:1px solid #c7d4dd;background:#fff;font:12px 'IBM Plex Mono',monospace;color:#182832}
.mist-pg-key-input:focus{outline:2px solid #4538c4;border-color:#4538c4}
.mist-pg-account-link{display:inline-flex;align-items:center;height:34px;padding:0 12px;border-radius:5px;background:#fff;border:1px solid #c7d4dd;color:#21343f;text-decoration:none;font:500 12px 'DM Sans',Arial,sans-serif}
.mist-pg-account-link:hover{border-color:#4538c4;color:#4538c4}

.mist-pg-workbench{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;align-items:stretch}
.mist-pg-card{background:#fff;border:1px solid #d4dee4;border-radius:8px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 10px 26px #18283208}
.mist-pg-card--llm{background:#f7f9fc;border-color:#ccd8ec}
.mist-pg-card-head{padding:14px 18px;border-bottom:1px solid #e3eaee;display:flex;justify-content:space-between;align-items:center;gap:10px}
.mist-pg-step{font:500 10px/1.4 'IBM Plex Mono',monospace;letter-spacing:.06em;text-transform:uppercase;color:#526c80}
.mist-pg-card--llm .mist-pg-step{color:#2447ef}
.mist-pg-tag{font:10px/1.3 'IBM Plex Mono',monospace;padding:4px 8px;border-radius:4px;background:#eef3f7;color:#415a6b}
.mist-pg-card-body{padding:18px;flex:1;display:flex;flex-direction:column;gap:14px}
.mist-pg-textarea{width:100%;min-height:195px;resize:vertical;border:1px solid #d7e0e6;border-radius:6px;padding:13px;font:13.5px/1.65 'IBM Plex Mono',monospace;color:#182832;background:#fcfdfd}
.mist-pg-textarea:focus{outline:2px solid #4538c4;border-color:#4538c4}
.mist-pg-output{min-height:195px;padding:13px;border-radius:6px;background:#fff;border:1px solid #dce5ec;font:13px/1.7 'IBM Plex Mono',monospace;color:#21343f;white-space:pre-wrap;word-break:break-word;flex:1}
.mist-token{display:inline-block;padding:1px 6px;margin:1px 0;border-radius:4px;font-size:11.5px;background:#e8edff;color:#2447ef;border:1px solid #c5d2ff}
.mist-token--cred{background:#ffeae6;color:#b43424;border-color:#f5bfb6}
.mist-restored{background:#e7f7ef;color:#146c47;padding:1px 5px;border-radius:4px;font-weight:500}
.mist-pg-card-foot{padding:12px 18px;border-top:1px solid #e3eaee;background:#fafcfd;display:flex;justify-content:space-between;align-items:center;gap:12px;font:11px/1.4 'IBM Plex Mono',monospace;color:#647681}
.mist-pg-btn{background:#4538c4;color:#fff;border:0;border-radius:5px;padding:9px 15px;font:500 12.5px/1.2 'DM Sans',Arial,sans-serif;cursor:pointer}
.mist-pg-btn:hover{background:#3325ab}
.mist-pg-btn:disabled{opacity:.6;cursor:wait}

/* Self-Serve Tenant Workspace Console (#111327 Mist signature dark band) */
.mist-keys-band{background:#111327;color:#f4f3ff;padding:74px 0;position:relative;overflow:hidden}
.mist-keys-grid{display:grid;grid-template-columns:.95fr 1.13fr;gap:68px;align-items:start}
.mist-keys-story h2{font-size:clamp(34px,3.6vw,48px);line-height:1.1;letter-spacing:-.045em;font-weight:500;margin:16px 0 20px;color:#fff}
.mist-keys-story p{font-size:15.5px;line-height:1.7;color:#b6bad4;margin:0 0 24px}
.mist-keys-story p strong{color:#fff;font-weight:500}
.mist-keys-story code{font:12.5px 'IBM Plex Mono',monospace;color:#d6ceff}
.mist-keys-rules{list-style:none;padding:0;margin:26px 0 0;border-top:1px solid #292e52}
.mist-keys-rules li{padding:13px 0;border-bottom:1px solid #292e52;display:grid;grid-template-columns:142px 1fr;gap:16px;font-size:13.5px;color:#d6d8ec}
.mist-keys-rules strong{font:500 11px/1.6 'IBM Plex Mono',monospace;color:#a99fff;text-transform:uppercase}

.mist-keys-console{background:#181c36;border:1px solid #343b64;border-radius:10px;padding:28px 30px;box-shadow:0 18px 42px #05061152}
.mist-console-banner{padding:11px 14px;border-radius:6px;margin-bottom:18px;font-size:13px;line-height:1.5;border:1px solid #495287;background:#12162d;color:#e6e8f8}
.mist-console-banner[data-tone="error"]{border-color:#9e3c3c;background:#2b141b;color:#ffd8d8}
.mist-console-banner[data-tone="ok"]{border-color:#2b7a5b;background:#112923;color:#c9f7e3}

.mist-auth-tabs{display:flex;gap:6px;padding:4px;background:#101326;border:1px solid #2c3359;border-radius:7px;margin-bottom:20px}
.mist-auth-tab{flex:1;background:transparent;border:0;color:#9ea5ca;padding:9px 10px;border-radius:5px;font:500 13px 'DM Sans',Arial,sans-serif;cursor:pointer}
.mist-auth-tab[aria-selected="true"]{background:#282f57;color:#fff}

.mist-auth-form{display:flex;flex-direction:column;gap:15px}
.mist-keys-field label{display:block;font-size:12.5px;color:#cfd3ec;margin-bottom:7px}
.mist-field-hint{color:#8c93b8;font-size:11.5px}
.mist-keys-field input{width:100%;height:44px;padding:0 13px;border-radius:6px;border:1px solid #434b78;background:#101326;color:#fff;font:14px 'DM Sans',Arial,sans-serif}
.mist-keys-field input:focus{outline:2px solid #b6a8ff;border-color:#b6a8ff}
.mist-auth-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:4px}
.mist-keys-generate{height:44px;padding:0 20px;border-radius:6px;border:1px solid #b6a8ff;background:#c1b4ff;color:#19153e;font:600 13.5px 'DM Sans',Arial,sans-serif;cursor:pointer;white-space:nowrap}
.mist-keys-generate:hover{background:#d5cbff}
.mist-keys-generate:disabled{opacity:.6;cursor:wait}
.mist-google-btn{height:44px;padding:0 18px;border-radius:6px;border:1px solid #4b5485;background:#202648;color:#fff;font:500 13.5px 'DM Sans',Arial,sans-serif;cursor:pointer}
.mist-google-btn:hover{background:#2b335f}
.mist-auth-footnote{margin:4px 0 0;font-size:12px;line-height:1.55;color:#8c94bc}

.mist-ws-header{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:18px;border-bottom:1px solid #2b3157;margin-bottom:18px}
.mist-ws-badges{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:6px}
.mist-ws-badge{display:inline-block;padding:3px 8px;border-radius:4px;font:500 10.5px/1.3 'IBM Plex Mono',monospace;text-transform:uppercase;letter-spacing:.05em}
.mist-ws-badge--ok{background:#15382c;color:#7ce8b7;border:1px solid #28664f}
.mist-ws-badge--warn{background:#3c2c13;color:#ffd089;border:1px solid #755524;margin-bottom:6px}
.mist-ws-tenant{font:11.5px 'IBM Plex Mono',monospace;color:#c5bcff;background:#101326;border:1px solid #323965;padding:2px 8px;border-radius:4px}
.mist-ws-email{font-size:18px;font-weight:500;color:#fff;margin:0;word-break:break-all}
.mist-ws-signout{background:transparent;border:1px solid #3f4775;color:#bfc5e4;height:34px;padding:0 12px;border-radius:5px;font:500 12px 'DM Sans',Arial,sans-serif;cursor:pointer}
.mist-ws-signout:hover{border-color:#8b94cc;color:#fff}
.mist-ws-copy{font-size:14px;line-height:1.65;color:#c2c7e4;margin:0 0 18px}
.mist-unv-actions{display:flex;gap:10px;flex-wrap:wrap}

.mist-quota-box{background:#11152b;border:1px solid #2d355e;border-radius:7px;padding:13px 15px;margin-bottom:18px}
.mist-quota-top{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12.5px;color:#b8bedd;margin-bottom:9px}
.mist-quota-top strong{font:500 12px 'IBM Plex Mono',monospace;color:#fff}
.mist-quota-top code{font:11.5px 'IBM Plex Mono',monospace;color:#b7acff}
.mist-quota-track{height:7px;border-radius:999px;background:#22284a;overflow:hidden}
.mist-quota-fill{height:100%;background:linear-gradient(90deg,#7f6cff,#37c994);border-radius:999px;transition:width .25s ease}

.mist-create-key-form{display:grid;grid-template-columns:1fr auto;gap:12px;align-items:end;margin-bottom:18px}

.mist-key-result{margin-bottom:18px;padding:16px;border-radius:7px;background:#0e1122;border:1px solid #5964a3}
.mist-key-result-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;font:11px 'IBM Plex Mono',monospace;color:#b5bce0;flex-wrap:wrap}
.mist-key-secret-row{display:flex;gap:10px;align-items:center}
.mist-key-secret{flex:1;padding:10px 12px;background:#161a33;border:1px solid #303761;border-radius:5px;font:12.5px/1.4 'IBM Plex Mono',monospace;color:#e6e2ff;overflow-x:auto;white-space:nowrap}
.mist-key-copy{height:38px;padding:0 14px;border-radius:5px;border:1px solid #566099;background:#23294d;color:#fff;font:500 12px 'DM Sans',Arial,sans-serif;cursor:pointer;white-space:nowrap}
.mist-key-copy:hover{background:#323b6e}

.mist-key-list-wrap{border-top:1px solid #2b3157;padding-top:16px}
.mist-key-list-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font:500 11px 'IBM Plex Mono',monospace;text-transform:uppercase;letter-spacing:.05em;color:#959dc4}
.mist-key-list{display:flex;flex-direction:column;gap:8px}
.mist-key-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;border-radius:6px;background:#11152b;border:1px solid #283056;flex-wrap:wrap}
.mist-key-row.is-revoked{opacity:.55}
.mist-key-row-main{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.mist-key-row-label{font-size:13.5px;font-weight:500;color:#fff}
.mist-key-row-prefix{font:11.5px 'IBM Plex Mono',monospace;color:#a8b0d6}
.mist-key-row-meta{display:flex;align-items:center;gap:10px;font:11px 'IBM Plex Mono',monospace;color:#8991b8}
.mist-key-revoke{background:transparent;border:1px solid #6b3b4b;color:#f3a8b8;padding:4px 10px;border-radius:4px;font:500 11.5px 'DM Sans',Arial,sans-serif;cursor:pointer}
.mist-key-revoke:hover{background:#3b1c28;color:#ffd4dd}
.mist-key-empty{padding:14px;border-radius:6px;background:#11152b;border:1px dashed #303864;font-size:13px;color:#939bc2;text-align:center}

/* API Reference */
.mist-docs-section{padding:74px 0;border-bottom:1px solid var(--cp-line)}
.mist-docs-grid{display:grid;grid-template-columns:1fr 1.05fr;gap:64px;align-items:start}
.mist-docs-spec h2{font-size:clamp(32px,3.2vw,44px);line-height:1.1;letter-spacing:-.04em;font-weight:500;margin:14px 0 18px;color:#1d313d}
.mist-docs-spec>p{font-size:15.5px;line-height:1.7;color:#587084;margin:0 0 28px}
.mist-endpoint-card{background:#fff;border:1px solid #d5dfe5;border-radius:8px;padding:20px 22px;margin-bottom:16px}
.mist-endpoint-head{display:flex;align-items:center;gap:10px;margin-bottom:10px;font:500 13px 'IBM Plex Mono',monospace}
.mist-method{background:#e7ecff;color:#2447ef;padding:3px 8px;border-radius:4px;font-size:11px}
.mist-endpoint-card p{font-size:14px;line-height:1.65;color:#526b79;margin:0 0 12px}
.mist-field-list{margin:0;padding:0;list-style:none;border-top:1px solid #e7eef2}
.mist-field-list li{padding:9px 0;border-bottom:1px solid #eef3f6;font-size:13px;color:#4a606d;display:grid;grid-template-columns:130px 1fr;gap:12px}
.mist-field-list li:last-child{border-bottom:0;padding-bottom:0}
.mist-field-list code{font:500 12px 'IBM Plex Mono',monospace;color:#1d313d}

.mist-code-panel{background:#141923;color:#e6edf3;border-radius:9px;overflow:hidden;border:1px solid #283242;position:sticky;top:108px}
.mist-code-bar{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;background:#1c2331;border-bottom:1px solid #2c3648;gap:10px;flex-wrap:wrap}
.mist-code-tabs{display:flex;gap:6px;flex-wrap:wrap}
.mist-code-tab{background:transparent;border:0;color:#93a1b5;padding:7px 12px;border-radius:5px;font:500 12px 'IBM Plex Mono',monospace;cursor:pointer}
.mist-code-tab[aria-selected="true"]{background:#2c3850;color:#fff}
.mist-code-copy{background:#263145;border:1px solid #3c4b66;color:#dce5f2;padding:6px 12px;border-radius:5px;font:500 11.5px 'DM Sans',Arial,sans-serif;cursor:pointer}
.mist-code-pre{margin:0;padding:20px;overflow-x:auto;font:12.5px/1.68 'IBM Plex Mono',monospace;color:#d9e3ee}

@media(max-width:1024px){
  .mist-api-shell,.mist-api-top,.mist-api-hero,.mist-api-subnav{padding-inline:32px}
  .mist-api-hero,.mist-pg-workbench,.mist-keys-grid,.mist-docs-grid{grid-template-columns:1fr;gap:32px}
  .mist-create-key-form{grid-template-columns:1fr}
}
