/* Shared visual language for the public portal and model directory. */
body.portal-studio {
  --ink: #f0f3ff;
  --muted: #a8b2ca;
  --line: #ffffff16;
  --paper: #151e35;
  --bg: #0a1020;
  --accent: #a4c9ff;
  --accent-dark: #c6dcff;
  --pale: #a8b5ff12;
  --studio-cyan: #8ce9e0;
  --studio-violet: #b8a5f7;
  --studio-ease: cubic-bezier(.16, 1, .3, 1);
  color: var(--ink);
  background: var(--bg);
  font-family: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
.portal-studio ::selection { background: #b8a5f74d; color: #fff; }
.portal-studio .container, .portal-studio .market-container { width: min(1280px, calc(100% - 80px)); margin-inline: auto; }
.portal-studio h1, .portal-studio h2, .portal-studio h3 { text-wrap: balance; }
.portal-studio :is(a, button, input, select, textarea):focus-visible { outline: 2px solid var(--studio-cyan); outline-offset: 5px; }
.portal-studio :is(a, button, select, input[type="checkbox"]) { touch-action: manipulation; }
.portal-studio :is(a, button) { -webkit-tap-highlight-color: transparent; }
.portal-studio :is(.btn, .market-button, .studio-secondary, .studio-model-card, .orbit-chip, .market-types button, .market-account button, .market-provider-tabs button) {
  transition: color 180ms, background 180ms, border-color 180ms, box-shadow 250ms, transform 320ms var(--studio-ease);
}
.portal-studio :is(.btn, .market-button, .studio-secondary, .studio-model-card, .orbit-chip, .market-types button, .market-account button, .market-provider-tabs button):active { filter: brightness(1.09); }
.portal-studio .btn { min-height: 44px; border-radius: 12px; background: #ffffff06; border-color: #ffffff20; color: var(--ink); font-size: 14px; }
.portal-studio .btn:hover { background: #ffffff10; box-shadow: 0 5px 24px #a2bcff12; }
.portal-studio .btn-primary, .portal-studio .market-button {
  background: linear-gradient(115deg, #d7e5ff, #a8c6ff 52%, #bfb5f5);
  border: 1px solid #d9e6ff80;
  color: #14223f;
  box-shadow: inset 0 1px 0 #ffffff80, 0 4px 20px #8ea5ff1a;
}
.portal-studio .btn-primary:hover, .portal-studio .market-button:hover { background: #e3ebff; border-color: #e3ebff; color: #14223f; box-shadow: 0 0 30px #a8c6ff35; transform: translateY(-2px); }
.portal-studio .btn-lg { padding: 16px 25px; min-height: 54px; border-radius: 14px; font-size: 16px; }
.portal-studio .site-header { height: 86px; background: #0a1020dc; border-bottom: 1px solid #ffffff0d; backdrop-filter: blur(18px); box-shadow: none; }
.portal-studio .header-inner { gap: 28px; }
.portal-studio .brand { font-size: 17px; gap: 10px; }
.portal-studio .brand img { border-radius: 10px; }
.portal-studio .brand small { letter-spacing: .06em; font-size: 10px; color: #a8b2ca; }
.portal-studio .main-nav { gap: 24px; margin-left: auto; }
.portal-studio .main-nav a { color: #b3bdd2; font-size: 14px; padding: 14px 0; transition: color 180ms; white-space: nowrap; }
.portal-studio .main-nav a:hover, .portal-studio .main-nav a.active { color: #f1f5ff; }
.portal-studio .main-nav a.active:after { bottom: 2px; left: calc(50% - 9px); right: auto; width: 18px; border-radius: 4px; height: 3px; background: var(--studio-cyan); box-shadow: 0 0 14px #8ce9e080; }
.portal-studio .header-actions { margin-left: 10px; gap: 8px; }
.portal-studio .header-actions .btn-text { border-color: transparent; background: transparent; color: #c9d3e7; }
.portal-studio .header-actions .btn-primary { border-radius: 11px; background: linear-gradient(115deg, #d7e5ff, #a8c6ff 52%, #bfb5f5); border-color: #d9e6ff80; color: #14223f; }
.portal-studio .icon-btn { width: 44px; height: 44px; color: var(--ink); background: #ffffff08; border-color: var(--line); }
.studio-home { overflow: clip; background: radial-gradient(ellipse at 74% 10%, #5e66b518, transparent 32%), radial-gradient(ellipse at 2% 38%, #2d626510, transparent 26%); }
.studio-hero { display: grid; grid-template-columns: 1fr 1.05fr; position: relative; padding-top: 80px; }
.studio-hero-copy { position: relative; z-index: 2; align-self: center; padding-bottom: 36px; }
.studio-announcement { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid #a5b8ed25; border-radius: 24px; color: #c2cee9; font-size: 12px; background: #a9b8f808; margin-bottom: 28px; min-height: 36px; }
.studio-announcement>svg:first-child { color: var(--studio-cyan); }
.studio-announcement:hover { border-color: #8ce9e070; background: #8ce9e012; }
.studio-hero h1 { margin: 0; font-size: clamp(52px, 5.3vw, 78px); font-weight: 650; line-height: 1.22; letter-spacing: -.055em; color: #f1f4ff; }
.studio-lead { margin: 26px 0 30px; font-size: 16px; line-height: 1.95; color: #a8b5cf; max-width: 460px; }
.studio-hero-actions { display: flex; align-items: center; gap: 28px; }
.studio-secondary { display: inline-flex; align-items: center; gap: 10px; color: #d5dff4; font-size: 14px; min-height: 44px; }
.studio-secondary:hover { color: #8ce9e0; transform: translateX(3px); }
.studio-trust { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 30px; color: #a7b4cd; font-size: 12px; }
.studio-trust>span { display: flex; align-items: center; gap: 7px; }
.studio-trust svg { color: #8f9dbb; }
.studio-visual { min-width: 0; position: relative; display: grid; place-items: center; align-self: stretch; min-height: 490px; margin: -48px -20px -6px -15px; }
.studio-visual:before { content: ""; position: absolute; inset: 14% 5% 9%; border-radius: 50%; background-image: radial-gradient(#b8cafa4d .8px, transparent .8px); background-size: 25px 25px; mask-image: radial-gradient(ellipse, #0009, transparent 68%); }
.studio-orbit { width: 100%; transform: rotate(-7deg); transition: transform 800ms var(--studio-ease), filter 650ms; }
.intelligence-ring { display: block; width: 100%; height: auto; overflow: visible; }
.studio-visual[data-mode="image"] .studio-orbit { transform: rotate(16deg) scale(1.03); filter: hue-rotate(38deg); }
.studio-visual[data-mode="video"] .studio-orbit { transform: rotate(-24deg) scale(.96); filter: hue-rotate(-36deg); }
.orbit-caption { position: absolute; top: 13%; left: 23%; display: flex; align-items: center; gap: 8px; font-size: 11px; color: #a8b7d8; }
.orbit-dot { width: 5px; height: 5px; background: var(--studio-cyan); border-radius: 50%; box-shadow: 0 0 10px #8ce9e080; }
.orbit-caption-line { width: 45px; height: 1px; background: #a4b9e947; }
.orbit-chip { position: absolute; display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-radius: 15px; border: 1px solid #b9caff2e; color: #e3eaff; font-size: 13px; background: linear-gradient(125deg, #26324be6, #161f35eb); box-shadow: 0 15px 40px #0003, inset 0 1px 0 #ffffff0c; }
.orbit-chip small { display: block; color: #a7b4cf; font-size: 10px; margin-top: 5px; }
.orbit-chip>svg { color: #b8c5ff; }
.orbit-chip:hover { transform: translateY(-4px); border-color: #b8c5ff80; box-shadow: 0 14px 40px #7d8af022; }
.orbit-chip-top { right: 0; top: 23%; }
.orbit-chip-bottom { left: 2%; bottom: 17%; }
.orbit-chip-symbol { display: grid; place-items: center; width: 38px; height: 38px; color: var(--studio-cyan); border-radius: 11px; background: #8ce9e014; }
.orbit-coordinate { position: absolute; bottom: 12%; right: 10%; font-size: 10px; color: #a5b3ce; letter-spacing: .06em; }
.studio-mode-panel { grid-column: 1 / -1; display: flex; align-items: center; gap: 36px; padding: 22px 24px; border: 1px solid #b2c1f123; border-radius: 20px; background: linear-gradient(100deg, #1c254092, #121b2d80); position: relative; z-index: 2; }
.studio-mode-tabs { display: flex; gap: 6px; padding-right: 26px; border-right: 1px solid var(--line); flex-shrink: 0; }
.studio-mode-tabs button { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 12px 16px; color: #aab8d3; background: transparent; border: 1px solid transparent; border-radius: 12px; font-size: 13px; transition: background 200ms, color 200ms, box-shadow 250ms; }
.studio-mode-tabs button>span { display: none; }
.studio-mode-tabs button:hover { background: #ffffff08; color: #e4eeff; }
.studio-mode-tabs button[aria-pressed="true"] { color: #e1eaff; background: #aebdf019; border-color: #b9cbff30; box-shadow: inset 0 1px 0 #ffffff0b, 0 3px 16px #0001; }
.studio-mode-tabs button[aria-pressed="true"]>svg { color: var(--studio-cyan); }
.studio-mode-copy { flex: 1; min-width: 0; }
.studio-mode-copy strong { font-size: 14px; font-weight: 550; }
.studio-mode-copy p { margin: 7px 0 0; color: #a6b3cd; font-size: 12px; line-height: 1.5; }
.studio-mode-link { font-size: 12px; color: var(--studio-cyan); display: flex; align-items: center; gap: 9px; min-height: 44px; white-space: nowrap; }
.studio-providers { display: flex; gap: 52px; align-items: center; padding-block: 43px; border-bottom: 1px solid var(--line); }
.studio-providers p { flex-shrink: 0; color: #9eacc6; font-size: 12px; line-height: 1.8; margin: 0; }
.studio-providers>div { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px 30px; flex: 1; }
.studio-providers a { display: inline-flex; align-items: center; min-height: 44px; color: #c8d0e3; font-size: 21px; font-weight: 600; letter-spacing: -.04em; transition: color 180ms; }
.studio-providers a:hover { color: #8ce9e0; }
.studio-discover { padding-block: 80px 60px; }
.studio-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.studio-section-heading h2 { font-size: 32px; font-weight: 550; margin: 0 0 12px; }
.studio-section-heading p { color: #a8b5cf; font-size: 14px; margin: 0; }
.studio-model-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.studio-model-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid #a9b9eb24; border-radius: 20px; padding: 24px; background: linear-gradient(145deg, #1d294071, #121b2d65); }
.studio-model-card:hover { transform: translateY(-5px); border-color: #b2caff66; background: #1e2c4580; box-shadow: 0 14px 38px #03061144; }
.studio-model-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.studio-model-symbol { width: 46px; height: 46px; display: grid; place-items: center; background: #c0b5ff16; color: #c3b7ff; border: 1px solid #c0b5ff24; border-radius: 14px; }
.studio-symbol-1 { color: #91dfd8; background: #91dfd811; border-color: #91dfd824; }
.studio-symbol-2 { color: #c2d8ff; background: #c2d8ff11; border-color: #c2d8ff24; }
.studio-symbol-3 { color: #f4c8dd; background: #f4c8dd11; border-color: #f4c8dd24; }
.studio-model-status { display: flex; align-items: center; gap: 5px; color: #b9c5da; font-size: 11px; }
.studio-model-status i { width: 5px; height: 5px; border-radius: 50%; background: #a2adc1; }
.studio-model-status i.is-online { background: #8ce9c8; }
.studio-model-card>p { margin: 24px 0 6px; font-size: 12px; color: #a8b5cf; }
.studio-model-card h3 { font-size: 18px; letter-spacing: -.02em; overflow-wrap: anywhere; margin: 0 0 12px; line-height: 1.45; }
.studio-model-description { color: #a8b5cf; font-size: 12px; line-height: 1.85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.studio-model-bottom { border-top: 1px solid var(--line); margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #c7d5ef; font-size: 11px; }
.studio-model-description+.studio-model-bottom { margin-top: 24px; }
.studio-model-bottom>span>span { color: #a6b4ce; margin-left: 12px; }
.studio-data-note { display: flex; align-items: baseline; gap: 7px; color: #a5b3cf; font-size: 11px; line-height: 1.8; margin: 20px 0 0; }
.studio-data-note svg { align-self: center; }
.studio-build { padding-block: 48px 90px; display: grid; grid-template-columns: .85fr 1fr; gap: 96px; align-items: center; }
.studio-build-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: #b9c5ff0c; border: 1px solid #b9c5ff25; color: #b9c5ff; margin-bottom: 25px; }
.studio-build h2 { font-size: 34px; line-height: 1.5; font-weight: 550; margin-bottom: 18px; }
.studio-build-copy>p { font-size: 14px; color: #a8b5cf; max-width: 380px; margin-bottom: 25px; }
.studio-inline-link { display: inline-flex; align-items: center; gap: 8px; margin-left: 20px; font-size: 12px; color: #c0cee9; min-height: 44px; }
.portal-studio .studio-build .code-panel { background: #10182a; border: 1px solid #b0bfe72b; border-radius: 20px; box-shadow: 0 20px 70px #0003; overflow: hidden; min-width: 0; }
.portal-studio .code-toolbar { background: #ffffff03; border-bottom-color: #ffffff10; padding: 12px 16px; }
.portal-studio .code-tabs button { border-radius: 8px; min-height: 40px; color: #a7b4d0; }
.portal-studio .code-tabs button.active { background: #bccaff15; color: #e2ebff; }
.portal-studio .copy-btn { min-height: 40px; color: #c1cee7; border-radius: 8px; }
.portal-studio .code-panel pre { color: #bcd8ee; font-size: 12px; padding: 24px; line-height: 1.85; }
.portal-studio .code-note { color: #a7b5cf; background: #b9c9ff05; border-top-color: #ffffff10; font-size: 11px; }
.studio-closing { position: relative; padding: 60px 20px 72px; border-top: 1px solid var(--line); text-align: center; }
.studio-closing>span { display: block; color: var(--studio-cyan); margin-bottom: 17px; }
.studio-closing h2 { font-size: 34px; font-weight: 550; margin-bottom: 10px; }
.studio-closing p { color: #a8b5cf; font-size: 14px; margin-bottom: 26px; }
.portal-studio .site-footer { background: #090f1d; border-top-color: var(--line); color: #a8b5cf; }
.portal-studio .footer-inner { flex-wrap: wrap; gap: 20px; padding-block: 28px; font-size: 12px; }
.portal-studio .footer-links a { color: #a8b5cf; min-height: 30px; display: inline-flex; align-items: center; }
.studio-touch-surface { position: fixed; z-index: 9999; pointer-events: none; overflow: hidden; background: radial-gradient(120px circle at var(--touch-x) var(--touch-y), #d7edff20, transparent 90%); box-shadow: inset 0 0 0 1px #b7d6ff45; }
.studio-touch-wave { pointer-events: none; position: absolute; border-radius: 50%; background: radial-gradient(circle, #e0f4ff15 24%, #9fd4fa21 48%, #ccbdff4a 51%, transparent 56%); }
.studio-selection-trail { position: fixed; z-index: 9998; pointer-events: none; transform-origin: top left; background: linear-gradient(110deg, #a3dfff24, #b7adff24); box-shadow: inset 0 0 0 1px #c8daff66, 0 0 22px #a3dfff18; }

/* The directory keeps its working data table and shares the portal palette. */
.portal-studio .market-page { background: radial-gradient(ellipse at 75% 0%, #6672c316, transparent 40%), var(--bg); color: var(--ink); min-height: 80vh; padding-bottom: 50px; }
.portal-studio .market-hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 60px; padding: 56px 0 34px; border: 0; }
.portal-studio .market-eyebrow { display: inline-flex; align-items: center; gap: 8px; text-transform: none; font-size: 12px; letter-spacing: 0; color: var(--studio-cyan); margin-bottom: 16px; }
.portal-studio .market-eyebrow:before { content: ""; width: 6px; height: 6px; background: var(--studio-cyan); border-radius: 50%; box-shadow: 0 0 16px #8ce9e066; }
.portal-studio .market-hero h1 { font-size: clamp(32px, 3.3vw, 45px); color: #f1f4ff; letter-spacing: -.04em; line-height: 1.4; font-weight: 550; margin: 0; }
.portal-studio .market-live-pricing { margin-top: 20px; max-width: 630px; }
.portal-studio .market-live-pricing h2 { color: #d4dff4; font-size: 15px; font-weight: 500; letter-spacing: 0; line-height: 1.8; }
.portal-studio .market-live-pricing h2 span { color: var(--studio-cyan); }
.portal-studio .market-live-pricing p { color: #a6b4ce; font-size: 12px; }
.portal-studio .market-hero-copy { align-self: center; text-align: left; }
.portal-studio .market-hero-copy p { color: #a8b5cf; font-size: 14px; line-height: 1.9; max-width: 365px; margin: 0 0 22px; }
.portal-studio .market-hero-copy>div { display: flex; gap: 12px; justify-content: flex-start; flex-wrap: wrap; }
.portal-studio .market-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; min-height: 46px; padding: 12px 17px; font-size: 13px; font-weight: 600; }
.portal-studio .market-button-outline { color: #d0ddf6; border: 1px solid #ffffff25; background: #ffffff04; box-shadow: none; }
.portal-studio .market-button-outline:hover { background: #ffffff10; color: #e2edff; border-color: #b1c7f066; }
.portal-studio .market-toolbar { display: flex; flex-wrap: wrap; align-items: center; padding: 18px; gap: 14px; border: 1px solid #b0c2f227; border-radius: 18px; background: #14203990; }
.portal-studio .market-search { display: flex; align-items: center; gap: 10px; width: auto; min-width: 240px; flex: 1; min-height: 46px; border: 1px solid #b0c2f233; border-radius: 11px; padding: 0 13px; color: #adbeda; background: #080f2066; }
.portal-studio .market-search:focus-within { border-color: #8ce9e080; box-shadow: 0 0 0 3px #8ce9e010; }
.portal-studio .market-search input { width: 100%; min-width: 0; font-size: 14px; color: #e4edff; background: transparent; outline: none; border: 0; min-height: 44px; }
.portal-studio .market-search input::placeholder { color: #9baccb; }
.portal-studio .market-types, .portal-studio .market-account { display: inline-flex; align-items: center; gap: 4px; padding: 4px; background: #070e1e73; border: 1px solid #b0c2f21c; border-radius: 12px; }
.portal-studio .market-types button, .portal-studio .market-account button { min-height: 38px; padding: 9px 14px; background: transparent; border: 1px solid transparent; border-radius: 8px; color: #abbad5; font-size: 12px; white-space: nowrap; }
.portal-studio .market-types button[aria-pressed="true"], .portal-studio .market-account button[aria-pressed="true"] { background: #b7caff1a; color: #e5efff; border-color: #b7caff30; box-shadow: 0 2px 10px #0002, inset 0 1px 0 #ffffff09; }
.portal-studio .market-types button:hover, .portal-studio .market-account button:hover { color: var(--studio-cyan); background: #8ce9e00e; }
.portal-studio .market-selects { display: flex; gap: 8px; margin: 0; }
.portal-studio .market-selects select { min-height: 46px; max-width: 170px; padding: 10px 12px; border: 1px solid #b0c2f230; border-radius: 11px; color: #c5d3ef; background: #101a2c; font-size: 12px; color-scheme: dark; }
.portal-studio .market-selects select:disabled { color: #aabbd5; opacity: .7; }
.portal-studio .market-ratebar { padding: 20px 0; gap: 18px; flex-wrap: wrap; border: 0; }
.portal-studio .market-refresh { color: #a3b2cd; font-size: 11px; display: flex; align-items: center; gap: 16px; min-width: 0; }
.portal-studio [data-market-freshness] { overflow-wrap: anywhere; }
.portal-studio .market-refresh button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; flex-shrink: 0; border: 1px solid #b0c2f227; border-radius: 10px; color: #d2def3; background: #ffffff04; padding: 9px 12px; }
.portal-studio .market-refresh button:disabled svg { animation: studio-refresh 1s linear infinite; }
.portal-studio .market-provider-tabs { gap: 8px; border: 0; padding: 18px 0 0; flex-wrap: wrap; }
.portal-studio .market-provider-tabs button { color: #b4c3dc; border: 1px solid #b0c2f227; border-radius: 10px; background: #ffffff03; min-height: 40px; padding: 10px 14px; }
.portal-studio .market-provider-tabs button[aria-pressed="true"] { color: var(--studio-cyan); background: #8ce9e012; border-color: #8ce9e066; }
.portal-studio .market-result-info { padding: 0 0 16px; color: #aab8d2; font-size: 12px; }
.portal-studio .market-result-info strong { color: #eff4ff; }
.portal-studio .market-table-scroll { border: 1px solid #b0c2f227; border-radius: 16px; background: #111b2d80; scrollbar-color: #465777 #111b2d; }
.portal-studio .market-table { color: #cad5e9; border-collapse: separate; border-spacing: 0; font-size: 12px; margin: 0; }
.portal-studio .market-table th { background: #1a263d; color: #b1c1de; border-bottom: 1px solid #b0c2f227; padding: 18px 16px; font-size: 12px; font-weight: 500; }
.portal-studio .market-table th span { color: #a2b5d6; font-size: 10px; }
.portal-studio .market-table td { border-bottom: 1px solid #b0c2f214; padding: 25px 16px; color: #bac9e1; background: transparent; }
.portal-studio .market-table tbody tr:last-child td { border-bottom: 0; }
.portal-studio .market-table tbody tr { transition: background 170ms; }
.portal-studio .market-table tbody tr:hover { background: #a9c4ff0a; }
.portal-studio .market-table tbody tr:has(input:checked) { background: #8ce9e00b; }
.portal-studio .market-model { gap: 12px; min-width: 230px; }
.portal-studio .market-model>div { min-width: 0; }
.portal-studio .market-model a { color: #e4ecff; font-size: 14px; font-weight: 600; }
.portal-studio .market-model a:hover, .portal-studio .market-table tbody tr:hover .market-model a { color: #a8dedf; }
.portal-studio .market-model small, .portal-studio .market-model code { color: #a5b5d1; font-size: 11px; }
.portal-studio .market-model code { font-size: 10px; }
.portal-studio .market-mark { border: 1px solid #b0c2f227; border-radius: 11px; background: #b0c2f210; color: #c7d8f9; }
.portal-studio .market-price strong { color: #d1e5ff; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.portal-studio .market-price small, .portal-studio .market-price small.market-tier-note { color: #aebcda; font-size: 10px; }
.portal-studio .market-table .market-context { color: #c2d0eb; font-size: 13px; }
.portal-studio .market-vendor { color: #bac9e1; }
.portal-studio .market-state { color: #a8b8d4; }
.portal-studio .market-state.is-live { color: #8ce9c8; }
.portal-studio .market-state.is-live i { background: #8ce9c8; box-shadow: 0 0 8px #8ce9c844; }
.portal-studio .market-date { color: #a7b7d3 !important; font-size: 11px; }
.portal-studio .market-unknown { color: #a7b7d3 !important; }
.portal-studio .market-footnote, .portal-studio .market-metrics-note { color: #a6b5d0; font-size: 12px; margin: 20px 0; }
.portal-studio .market-metrics-note a, .portal-studio .market-price-note a { color: var(--studio-cyan); }
.portal-studio .market-price-table .market-highlight { background: transparent; }
.portal-studio .market-price-table :is(th,td):nth-child(5), .portal-studio .market-price-table :is(th,td):nth-child(6) { background: #9bb9ff0b; color: #dce9ff; }
.portal-studio .market-list-price { color: #aabbd6 !important; }
.portal-studio .market-list-price small { color: #a5b7d4; font-size: 10px; }
.portal-studio .market-discount { color: #a2f0d7; background: #8ce9c816; border: 1px solid #8ce9c835; border-radius: 6px; padding: 3px 5px; font-size: 10px; }
.portal-studio .market-price-note { background: #a8c1ff06; border: 1px solid #b0c2f227; border-radius: 16px; margin: 30px 0 0; }
.portal-studio .market-price-note p { color: #a6b5d0; }
.portal-studio .market-empty { border: 1px solid #b0c2f227; border-radius: 18px; padding: 70px 20px; background: #a8c1ff04; }
.portal-studio .market-empty p { color: #a8b5cf; }
.portal-studio .market-empty button { color: #14223f; background: #c4d7ff; border-radius: 10px; min-height: 44px; }
.portal-studio [data-compare] { width: 24px; height: 24px; accent-color: #8ce9e0; flex: none; }
.portal-studio .compare-bar { color: #e2ebff; background: #18263beF; border: 1px solid #b5c6f247; border-radius: 16px; backdrop-filter: blur(16px); box-shadow: 0 14px 50px #0007; }
.portal-studio #toast { background: #d6e4ff; color: #182a46; border: 1px solid #eef5ff; border-radius: 12px; box-shadow: 0 12px 40px #0005; }
.portal-studio .page-intro { background: radial-gradient(ellipse at 70% 0, #7785c91c, transparent 70%), #10182a; border-bottom: 1px solid var(--line); }
.portal-studio .page-intro h1 { color: var(--ink); overflow-wrap: anywhere; }
.portal-studio .breadcrumb { color: #adbeda; }
.portal-studio .panel { background: #141f33; border: 1px solid #b0c2f227; border-radius: 18px; }
.portal-studio .definition-list>div { border-bottom-color: #b0c2f21c; }
.portal-studio .definition-list dt, .portal-studio .fine-print { color: #a8b7d2; font-size: 12px; }
.portal-studio .definition-list dd { overflow-wrap: anywhere; min-width: 0; }
.portal-studio .providers-table td { color: #d3def3; }
.portal-studio .providers-table { font-size: 12px; }
.portal-studio .compare-table th { background: #18243a; }
.portal-studio .notice { color: #c9d5ee; background: #b7caff09; border-color: #b7caff27; border-radius: 12px; }
.portal-studio .empty-state { background: #141f33; border-color: #b0c2f240; }
.portal-studio .pill { color: #a3edcf; background: #8ce9c80b; border-color: #8ce9c83b; }
.portal-studio .pill-neutral { color: #bcc9e2; background: #b7caff0c; border-color: #b7caff30; }
.portal-studio .provider-icon { background: #b7caff15; color: #c6d8ff; border: 1px solid #b7caff30; border-radius: 12px; }
@keyframes studio-refresh { to { transform: rotate(360deg); } }

@media (min-width: 1800px) { .portal-studio .market-container { max-width: 1280px; } }
@media (max-width: 1200px) {
  .portal-studio .container, .portal-studio .market-container { width: calc(100% - 56px); }
  .portal-studio .header-inner { gap: 16px; }
  .portal-studio .main-nav { gap: 16px; margin-left: auto; }
  .portal-studio .main-nav a { font-size: 12px; }
  .portal-studio .brand { font-size: 15px; }
  .portal-studio .header-actions .btn { font-size: 12px; padding-inline: 12px; }
  .studio-hero { padding-top: 56px; }
  .studio-hero h1 { font-size: 60px; }
  .studio-visual { min-height: 460px; }
  .studio-mode-panel { gap: 22px; padding: 18px; }
  .studio-mode-tabs { padding-right: 16px; }
  .studio-mode-tabs button { padding-inline: 12px; }
  .studio-mode-link { display: none; }
  .studio-providers { gap: 30px; }
  .studio-providers a { font-size: 18px; }
  .studio-model-card { padding: 20px; }
  .studio-model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio-build { gap: 50px; }
  .portal-studio .market-selects { flex: 1; }
  .portal-studio .market-selects select { flex: 1; max-width: none; min-width: 0; }
}
@media (max-width: 980px) {
  .portal-studio .main-nav { display: none; position: absolute; top: 76px; left: 20px; right: 20px; margin: 0; padding: 12px; border: 1px solid #b0c2f239; border-radius: 16px; background: #152138; box-shadow: 0 20px 60px #0008; }
  .portal-studio .main-nav.open { display: grid; }
  .portal-studio .main-nav a { font-size: 14px; padding: 14px 16px; border-radius: 10px; }
  .portal-studio .main-nav a.active { background: #b3c8ff12; }
  .portal-studio .main-nav a.active:after { left: auto; right: 18px; bottom: calc(50% - 2px); width: 5px; height: 5px; }
  .portal-studio .menu-toggle { display: inline-flex; }
  .portal-studio .header-actions { margin-left: auto; }
  .studio-hero h1 { font-size: 54px; }
  .studio-lead { font-size: 14px; }
  .studio-visual { min-height: 410px; margin-right: -15px; }
  .orbit-chip { padding: 12px; font-size: 11px; }
  .orbit-chip-top { top: 20%; }
  .orbit-chip-bottom { bottom: 15%; }
  .orbit-coordinate { bottom: 5%; }
  .studio-mode-panel { align-items: flex-start; flex-wrap: wrap; gap: 20px; }
  .studio-mode-tabs { border: 0; padding: 0; }
  .studio-mode-copy { min-width: 230px; padding-block: 3px; }
  .studio-build { gap: 35px; }
  .studio-build h2 { font-size: 29px; }
  .portal-studio .market-hero { gap: 30px; }
}
@media (max-width: 700px) {
  .portal-studio .container, .portal-studio .market-container { width: calc(100% - 36px); }
  .portal-studio .site-header { height: 72px; }
  .portal-studio .brand { font-size: 14px; gap: 8px; }
  .portal-studio .brand img { width: 30px; height: 30px; }
  .portal-studio .brand small { font-size: 8px; }
  .portal-studio .header-inner { gap: 8px; }
  .portal-studio .header-actions { gap: 8px; }
  .portal-studio .header-actions>.btn-text { display: none; }
  .portal-studio .header-actions>.btn-primary { font-size: 11px; padding-inline: 10px; min-height: 40px; }
  .portal-studio .header-actions>.btn-primary svg { display: none; }
  .portal-studio .main-nav { top: 66px; left: 18px; right: 18px; }
  .studio-hero { grid-template-columns: 1fr; padding-top: 38px; }
  .studio-hero-copy { padding: 0; }
  .studio-announcement { font-size: 11px; margin-bottom: 22px; }
  .studio-hero h1 { font-size: clamp(45px, 10.8vw, 66px); line-height: 1.25; }
  .studio-lead { margin: 22px 0 24px; font-size: 15px; line-height: 1.85; }
  .studio-hero-actions { gap: 24px; }
  .studio-trust { margin-top: 24px; gap: 18px; font-size: 11px; }
  .studio-visual { margin: -15px 0 -25px; min-height: 0; aspect-ratio: 1.2; }
  .studio-orbit { width: min(100%, 490px); }
  .orbit-caption { top: 9%; left: 25%; font-size: 10px; }
  .orbit-chip-top { top: 22%; right: 0; }
  .orbit-chip-bottom { left: 0; bottom: 18%; }
  .orbit-coordinate { bottom: 12%; right: 3%; font-size: 9px; }
  .studio-mode-panel { padding: 13px; border-radius: 16px; gap: 15px; }
  .studio-mode-tabs { width: 100%; gap: 4px; }
  .studio-mode-tabs button { flex: 1; padding: 10px 5px; font-size: 12px; gap: 5px; justify-content: center; min-height: 46px; white-space: nowrap; }
  .studio-mode-tabs button>svg { width: 15px; }
  .studio-mode-copy { padding: 0 5px 7px; min-width: 0; width: 100%; flex-basis: 100%; }
  .studio-mode-copy strong { font-size: 14px; }
  .studio-mode-copy p { font-size: 12px; line-height: 1.7; }
  .studio-mode-link { display: flex; margin: -12px 5px -2px; }
  .studio-providers { padding-block: 30px; display: block; }
  .studio-providers p { margin-bottom: 17px; }
  .studio-providers p br { display: none; }
  .studio-providers>div { justify-content: flex-start; gap: 8px 26px; }
  .studio-providers a { font-size: 19px; }
  .studio-discover { padding-block: 42px; }
  .studio-section-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 20px; }
  .studio-section-heading h2 { font-size: 27px; }
  .studio-section-heading p { font-size: 13px; }
  .studio-model-grid { gap: 12px; }
  .studio-model-card { padding: 17px; border-radius: 15px; }
  .studio-model-top { flex-wrap: wrap; gap: 10px; }
  .studio-model-symbol { width: 40px; height: 40px; border-radius: 12px; }
  .studio-model-status { font-size: 10px; }
  .studio-model-card>p { margin-top: 18px; }
  .studio-model-card h3 { font-size: 16px; }
  .studio-model-description { font-size: 12px; }
  .studio-model-bottom { align-items: flex-end; }
  .studio-model-bottom>span>span { display: block; margin: 5px 0 0; }
  .studio-build { grid-template-columns: 1fr; gap: 28px; padding-block: 5px 48px; }
  .studio-build h2 { font-size: 28px; }
  .portal-studio .code-panel pre { font-size: 11px; padding: 18px; }
  .studio-closing { padding-block: 40px 50px; }
  .studio-closing h2 { font-size: 27px; }
  .portal-studio .footer-inner { align-items: flex-start; flex-direction: column; gap: 14px; }
  .portal-studio .footer-links { flex-wrap: wrap; gap: 16px; }
  .portal-studio .market-hero { grid-template-columns: 1fr; padding: 34px 0 24px; gap: 20px; }
  .portal-studio .market-hero h1 { font-size: 32px; }
  .portal-studio .market-hero-copy p { font-size: 14px; margin-bottom: 16px; max-width: none; }
  .portal-studio .market-live-pricing h2 { font-size: 15px; }
  .portal-studio .market-toolbar { padding: 12px; gap: 12px; border-radius: 16px; }
  .portal-studio .market-search { width: 100%; min-width: 0; flex-basis: 100%; }
  .portal-studio .market-search input { font-size: 16px; }
  .portal-studio .market-types { width: 100%; }
  .portal-studio .market-types button { flex: 1; min-height: 40px; font-size: 13px; }
  .portal-studio .market-selects { width: 100%; gap: 6px; }
  .portal-studio .market-selects select { padding: 10px 6px; font-size: 11px; width: 0; }
  .portal-studio .market-ratebar { padding-block: 16px; gap: 14px; }
  .portal-studio .market-refresh { width: 100%; justify-content: space-between; gap: 12px; font-size: 11px; align-items: center; }
  .portal-studio .market-account button { min-height: 40px; }
  .portal-studio .market-result-info { gap: 10px; align-items: flex-start; font-size: 11px; }
  .portal-studio .market-result-info>span:last-child { max-width: 60%; text-align: right; }
  .portal-studio .market-table th:first-child, .portal-studio .market-table td:first-child { background: #142039; }
  .portal-studio .market-table td { padding: 22px 14px; }
  .portal-studio .market-model { min-width: 185px; gap: 8px; }
  .portal-studio .market-model>.market-mark { display: none; }
  .portal-studio .market-model a { font-size: 14px; }
  .portal-studio .market-table-scroll { border-radius: 13px; }
  .portal-studio .market-footnote { font-size: 12px; }
  .portal-studio .market-metrics-note { display: flex; flex-direction: column; gap: 12px; }
  .portal-studio .market-price-note { margin-top: 24px; padding: 20px; }
  .portal-studio .compare-bar { max-width: calc(100% - 24px); }
}
@media (max-width: 380px) {
  .portal-studio .header-actions>.btn-primary { max-width: 95px; overflow: hidden; }
  .portal-studio .brand { font-size: 12px; }
  .studio-model-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-studio *, .portal-studio *:before, .portal-studio *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .studio-touch-wave, .studio-touch-surface, .studio-selection-trail { display: none; }
}
/* Service status shares the portal's depth and information hierarchy. */
.portal-studio .public-status { background: radial-gradient(ellipse at 85% 3%, #7d8cd91a, transparent 36%), var(--bg); color: var(--ink); padding: 54px 0 76px; }
.portal-studio .status-inner { max-width: 1280px; }
.portal-studio .status-intro { position: relative; padding-bottom: 8px; margin-bottom: 30px; }
.portal-studio .status-intro:after { content: ''; position: absolute; right: 8%; top: 5px; width: 130px; height: 90px; border: 1px solid #a6bdf040; border-radius: 50%; transform: rotate(-26deg); box-shadow: 0 0 0 20px #a6bdf008, 0 0 0 40px #a6bdf005; pointer-events: none; }
.portal-studio .status-eyebrow { display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 500; color: var(--studio-cyan); letter-spacing: 0; margin-bottom: 18px; }
.portal-studio .status-eyebrow:before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--studio-cyan); box-shadow: 0 0 15px #8ce9e066; }
.portal-studio .status-intro h1 { font-size: clamp(34px, 3.4vw, 48px); font-weight: 550; line-height: 1.35; margin-bottom: 20px; }
.portal-studio .status-intro>p { font-size: 14px; }
.portal-studio .status-summary { align-items: center; gap: 24px; padding: 25px 30px; border-radius: 18px; background: linear-gradient(110deg, #29385878, #17263c66); border: 1px solid #b7caff2b; margin-bottom: 38px; }
.portal-studio .status-summary h2 { font-size: 19px; font-weight: 550; }
.portal-studio .status-summary p { font-size: 13px; }
.portal-studio .status-indicator { width: 12px; height: 12px; margin: 0 5px; box-shadow: 0 0 0 7px #a6bdf012, 0 0 0 14px #a6bdf006; }
.portal-studio .status-summary.healthy .status-indicator { background: #8ce9c8; box-shadow: 0 0 0 7px #8ce9c814, 0 0 0 14px #8ce9c806, 0 0 24px #8ce9c833; }
.portal-studio .status-summary.degraded .status-indicator { background: #f0ca91; box-shadow: 0 0 0 7px #f0ca9114, 0 0 0 14px #f0ca9106; }
.portal-studio .status-heading h2 { font-size: 22px; font-weight: 550; }
.portal-studio .status-heading p { font-size: 12px; }
.portal-studio .status-refresh { min-height: 44px; border-radius: 11px; background: #b7caff0b; border-color: #b7caff30; padding: 11px 18px; font-size: 13px; transition: background 180ms, border-color 180ms; }
.portal-studio .status-refresh:hover { background: #b7caff18; border-color: #8ce9e080; }
.portal-studio .status-refresh:disabled { cursor: progress; }
.portal-studio .status-filters { padding: 18px; background: #14203980; border: 1px solid #b7caff23; border-radius: 16px; gap: 16px; margin: 24px 0; }
.portal-studio .status-filters label { gap: 9px; flex: 1; font-size: 12px; }
.portal-studio .status-filters input, .portal-studio .status-filters select { min-height: 46px; width: 100%; min-width: 0; font-size: 14px; border-radius: 10px; background: #0c1526; color: #dce8ff; border-color: #b7caff33; color-scheme: dark; }
.portal-studio .status-filters input::placeholder { color: #a0b1ce; }
.portal-studio .status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.portal-studio .status-model { padding: 23px; border: 1px solid #b7caff24; border-radius: 18px; background: linear-gradient(130deg, #202e4880, #141e3280); transition: border-color 200ms, box-shadow 200ms; }
.portal-studio .status-model:hover { border-color: #b7caff4d; box-shadow: 0 10px 30px #0002; }
.portal-studio .status-model h3 { font-size: 14px; line-height: 1.6; font-weight: 550; }
.portal-studio .status-model-head { gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.portal-studio .status-badge { padding: 5px 8px; background: #a6bdf012; font-size: 10px; }
.portal-studio .status-badge.healthy { color: #a2efd8; background: #8ce9c813; }
.portal-studio .status-badge.degraded { color: #f0ca91; background: #f0ca9114; }
.portal-studio .status-badge.failed { color: #ffa9bc; background: #ff91ad14; }
.portal-studio .status-metrics { margin-bottom: 22px; gap: 10px; }
.portal-studio .status-metrics dd { margin-top: 8px; font-size: 18px; font-weight: 550; }
.portal-studio .status-history { gap: 4px; }
.portal-studio .status-bucket { height: 20px; border-radius: 4px; background: #3c4b65; transition: filter 160ms, transform 160ms; }
.portal-studio .status-bucket.healthy { background: #72cdb9; }
.portal-studio .status-bucket.degraded { background: #dfbb83; }
.portal-studio .status-bucket.failed { background: #e48fa5; }
.portal-studio .status-bucket:hover { filter: brightness(1.3); transform: scaleY(1.2); }
.portal-studio .status-axis { margin-top: 9px; font-size: 10px; }
.portal-studio .status-method { font-size: 12px; margin-top: 24px; }
.portal-studio .status-empty { padding: 48px 24px; grid-column: 1 / -1; text-align: center; border: 1px dashed #b7caff30; border-radius: 16px; }

/* A focused workspace for conversations, prompts, and model connection. */
.portal-studio .playground-page { background: radial-gradient(ellipse at 65% 18%, #767bc414, transparent 52%), var(--bg); min-height: calc(100dvh - 86px); }
.portal-studio .playground-toolbar { background: #14203866; padding: 18px 0; border-color: #b7caff20; }
.portal-studio .playground-title { color: #e7edff; font-size: 15px; gap: 10px; }
.portal-studio .playground-title svg { color: var(--studio-cyan); }
.portal-studio .playground-toolbar .select-field { min-height: 44px; color: #c6d4ed; background: #0c1526; border: 1px solid #b7caff30; border-radius: 10px; font-size: 12px; color-scheme: dark; }
.portal-studio .playground-toolbar .select-field:disabled { opacity: .7; }
.portal-studio .playground-body { width: min(1440px, 100%); margin-inline: auto; grid-template-columns: 238px minmax(0, 1fr); }
.portal-studio .chat-sidebar { background: #111b2a55; border-color: #b7caff19; padding: 35px 22px; }
.portal-studio .chat-sidebar h3 { font-size: 12px; letter-spacing: 0; color: #a8b9d5; margin-bottom: 24px; line-height: 1.6; }
.portal-studio .preset-btn { min-height: 52px; display: flex; gap: 12px; align-items: center; background: #b7caff05; border: 1px solid #b7caff20; border-radius: 12px; padding: 14px; font-size: 13px; color: #cedbf0; transition: background 180ms, border-color 180ms, box-shadow 240ms; }
.portal-studio .preset-btn svg { width: 17px; height: 17px; color: #aebeff; }
.portal-studio .preset-btn:hover { border-color: #b7caff60; background: #b7caff10; box-shadow: 0 5px 20px #0002; }
.portal-studio .preset-btn[aria-pressed="true"] { background: #8ce9e00c; border-color: #8ce9e055; color: #c6f4ed; }
.portal-studio .chat-sidebar p { color: #a2b1cd; font-size: 11px; line-height: 1.9; margin-top: 28px; }
.portal-studio .chat-sidebar .text-link { color: #b9d8ee; font-size: 12px; min-height: 44px; }
.portal-studio .chat-welcome { position: relative; margin: 50px auto 24px; max-width: 660px; padding-inline: 30px; }
.portal-studio .chat-welcome>.provider-icon { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; margin: 10px 0 30px; border: 1px solid #c4c9ff66; border-radius: 25px; color: #cef5ef; background: linear-gradient(140deg, #3d4d7850, #9ba9f51c, #82e2d41c); box-shadow: 0 0 0 10px #b7caff04, 0 0 50px #a4a8ef15, inset 0 1px 0 #fff2; transform: rotate(-8deg); }
.portal-studio .chat-welcome>.provider-icon svg { transform: rotate(8deg); }
.portal-studio .chat-welcome-label { font-size: 12px; color: #a9b6d2; margin-bottom: 14px; }
.portal-studio .chat-welcome h1 { font-size: clamp(27px, 3vw, 38px); font-weight: 550; margin-bottom: 18px; }
.portal-studio .chat-welcome>p { font-size: 14px; color: #aebcd5; line-height: 1.9; max-width: 430px; }
.portal-studio .chat-welcome .notice { margin-top: 24px; text-align: center; padding: 12px 18px; font-size: 12px; }
.portal-studio .chat-feed { max-width: 850px; padding: 24px 32px; }
.portal-studio .chat-feed:empty { padding: 0; }
.portal-studio .chat-message { gap: 16px; margin-bottom: 30px; }
.portal-studio .chat-avatar { width: 36px; height: 36px; border-radius: 12px; background: #b7caff15; border: 1px solid #b7caff25; color: #cbd8ff; }
.portal-studio .chat-message.user .chat-avatar { background: #8ce9e013; color: #b0efe5; border-color: #8ce9e025; }
.portal-studio .chat-message-body>strong { color: #b5c7e4; font-size: 12px; }
.portal-studio .chat-message-content { color: #d9e4fa; font-size: 15px; line-height: 1.95; }
.portal-studio .chat-message.user .chat-message-content { background: #b7caff0c; border: 1px solid #b7caff1a; border-radius: 0 15px 15px; padding: 15px 18px; }
.portal-studio .chat-message-content.error { color: #ffb1bf; }
.portal-studio .chat-message-meta { color: #a3b4d0; font-size: 11px; }
.portal-studio .chat-composer { position: sticky; bottom: 0; padding: 28px 32px 22px; background: linear-gradient(0deg, #0a1020 65%, #0a102000); }
.portal-studio .composer-box { position: relative; max-width: 800px; border: 1px solid #b7caff3d; border-radius: 20px; background: #18243ae6; padding: 20px; box-shadow: 0 8px 36px #03071355, inset 0 1px 0 #ffffff08; transition: border-color 220ms, box-shadow 220ms; }
.portal-studio .composer-box:focus-within { border-color: #9ce5de80; box-shadow: 0 0 0 3px #8ce9e009, 0 12px 44px #050b1f70, 0 0 35px #8ce9e00a; }
.portal-studio .composer-box textarea { color: #e0eaff; min-height: 76px; font-size: 15px; }
.portal-studio .composer-box textarea::placeholder { color: #a0b0cd; }
.portal-studio .composer-bottom { padding-top: 14px; border-top: 1px solid #b7caff13; }
.portal-studio .composer-bottom span { color: #a9b8d3; font-size: 11px; line-height: 1.7; }
.portal-studio .composer-bottom .btn { border-radius: 11px; min-width: 76px; }
.portal-studio .composer-footer { color: #9fafd0; font-size: 11px; margin-top: 14px; }
.portal-studio .chat-error { color: #ffc1c9; background: #75364a33; border-color: #e899ab40; border-radius: 12px; }
.portal-studio .modal-backdrop { background: #050a18b3; backdrop-filter: blur(12px); }
.portal-studio .modal { background: linear-gradient(140deg, #202d47, #131f35); border: 1px solid #b7caff40; border-radius: 24px; padding: 30px; box-shadow: 0 35px 100px #0008; animation: studio-dialog-enter 260ms cubic-bezier(.16,1,.3,1); }
.portal-studio .modal-heading h2 { font-size: 23px; font-weight: 550; }
.portal-studio .modal p { color: #afbdd7; font-size: 13px; }
.portal-studio .modal label { color: #c9d8f2; font-size: 13px; }
.portal-studio .text-input { min-height: 48px; border-radius: 12px; border-color: #b7caff40; background: #0c1526; color: #e4eeff; font-size: 16px; }
.portal-studio .form-error { color: #ffb9c6; font-size: 12px; }
.portal-studio .key-fine-print { font-size: 11px!important; }

/* Developer documentation uses a calm reading surface inside the same shell. */
.portal-studio.docs-page { background: radial-gradient(ellipse at 70% 0, #727cbd14, transparent 45%), var(--bg); }
.portal-studio .docs-page-shell { padding-bottom: 60px; }
.portal-studio .docs-page-shell .docs-layout { grid-template-columns: 252px minmax(0, 900px); gap: 54px; padding-top: 42px; }
.portal-studio .guide-switcher { padding: 18px 16px; border: 1px solid #b7caff24; background: #15203880; border-radius: 18px; top: 110px; }
.portal-studio .guide-switcher-heading { color: #c6d6ef; font-size: 13px; letter-spacing: 0; margin: 0 12px 18px; }
.portal-studio .guide-switcher a { position: relative; padding: 15px 14px; min-height: 76px; gap: 7px; background: transparent; border: 1px solid transparent; border-radius: 12px; transition: color 180ms, background 180ms, border-color 180ms; }
.portal-studio .guide-switcher a:hover { background: #b7caff0a; color: #dce7ff; }
.portal-studio .guide-switcher a[aria-current] { background: linear-gradient(100deg, #a6bbff16, #8ce9e008); border-color: #b7caff30; color: #e0ebff; }
.portal-studio .guide-switcher a[aria-current]:before { content: ''; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 3px; border-radius: 4px; background: var(--studio-cyan); box-shadow: 0 0 13px #8ce9e055; }
.portal-studio .guide-switcher a strong { font-size: 13px; font-weight: 550; line-height: 1.65; }
.portal-studio .guide-switcher a small { font-size: 11px; color: #adbeda; }
.portal-studio .guide-switcher-tip { color: #a5b6d1; font-size: 11px; margin-top: 22px; padding-top: 18px; border-top: 1px solid #b7caff19; }
.portal-studio .docs-content .breadcrumb { font-size: 12px; margin: 0 0 26px; }
.portal-studio .docs-content h1 { font-size: clamp(29px, 3vw, 40px); font-weight: 550; line-height: 1.5; margin-bottom: 14px; }
.portal-studio .docs-content .docs-lead { color: #adbeda; font-size: 15px; line-height: 1.85; margin-bottom: 32px; }
.portal-studio .docs-content .panel { padding: 28px 30px; border-radius: 18px; background: linear-gradient(140deg, #1e2b435e, #15213780); margin-bottom: 20px; }
.portal-studio .docs-content .panel h2 { color: #e2ecff; font-size: 19px; font-weight: 550; margin-bottom: 18px; }
.portal-studio .docs-content .panel p { color: #b0bfd9; font-size: 14px; line-height: 1.95; }
.portal-studio .docs-content .panel p>a:not(.btn) { color: #a9e6e0; text-decoration: underline; text-underline-offset: 4px; }
.portal-studio .docs-content .code-block { background: #0c1526; color: #c8e3f4; border: 1px solid #b7caff24; border-radius: 12px; padding: 17px 20px; font-size: 13px; }
.portal-studio .guide-callout { background: #a4b9ff0c; color: #b7c7e4; border: 1px solid #b7caff2b; border-radius: 14px; padding: 19px 22px; font-size: 13px; margin-bottom: 24px; }
.portal-studio .guide-callout strong { color: #c8d6ff; font-weight: 550; }
.portal-studio .guide-callout-warn { border-color: #edc79830; background: #edc79808; color: #d2c7b7; }
.portal-studio .guide-callout-warn strong { color: #edc798; }
.portal-studio .guide-note { color: #acbcd8!important; font-size: 12px!important; }
.portal-studio .guide-steps { gap: 12px; }
.portal-studio .guide-steps>div { background: #b7caff05; border-color: #b7caff20; border-radius: 12px; padding: 17px 14px; gap: 10px; }
.portal-studio .guide-steps b { background: #a6baff18; color: #c8d6ff; border: 1px solid #a6baff30; width: 27px; height: 27px; font-size: 12px; }
.portal-studio .guide-steps strong { color: #d6e2f9; font-size: 13px; }
.portal-studio .guide-steps span { color: #a8b9d6; font-size: 12px; }
.portal-studio .guide-code { background: #0c1526; border: 1px solid #b7caff28; border-radius: 14px; margin: 20px 0; }
.portal-studio .guide-code>div { background: #b7caff07; border-color: #b7caff20; color: #b2c3de; font-size: 12px; padding: 10px 16px; }
.portal-studio .guide-code button { background: #b7caff0b; border: 1px solid #b7caff30; color: #d1e3ff; border-radius: 9px; min-height: 36px; min-width: 56px; font-size: 12px; }
.portal-studio .guide-code pre { color: #c6e0f5; font-size: 12px; line-height: 1.9; padding: 20px; }
.portal-studio .guide-models code { background: #b7caff08; border-color: #b7caff2b; color: #ccddfa; border-radius: 8px; padding: 9px 11px; font-size: 12px; }
@keyframes studio-dialog-enter { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }

@media (max-width: 1100px) {
  .portal-studio .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-studio .docs-page-shell .docs-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 28px; }
  .portal-studio .guide-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portal-studio .playground-body { grid-template-columns: 205px minmax(0, 1fr); }
}
@media (max-width: 790px) {
  .portal-studio .docs-page-shell .docs-layout { grid-template-columns: 1fr; gap: 28px; padding-top: 26px; }
  .portal-studio .guide-switcher { position: static; display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
  .portal-studio .guide-switcher-heading { width: 100%; margin: 0 0 5px; }
  .portal-studio .guide-switcher a { flex: 1; min-width: 190px; margin: 0; }
  .portal-studio .guide-switcher-tip { display: none; }
  .portal-studio .playground-body { grid-template-columns: 1fr; }
  .portal-studio .chat-sidebar { display: none; }
  .portal-studio .playground-toolbar>.container { flex-wrap: wrap; gap: 10px; }
  .portal-studio .playground-title { width: 100%; margin: 0 0 5px; }
  .portal-studio .playground-toolbar .select-field { min-width: 0; flex: 1; width: 0; max-width: none; }
  .portal-studio .playground-toolbar .btn { margin: 0!important; font-size: 12px; padding: 10px 12px; }
}
@media (max-width: 700px) {
  .portal-studio .playground-page { min-height: calc(100dvh - 72px); }
  .portal-studio .status-grid { grid-template-columns: 1fr; }
  .portal-studio .public-status { padding-top: 34px; }
  .portal-studio .status-intro:after { right: 3%; top: 20px; width: 55px; height: 42px; opacity: .45; box-shadow: 0 0 0 12px #a6bdf008, 0 0 0 24px #a6bdf005; }
  .portal-studio .status-intro h1 { font-size: 32px; }
  .portal-studio .status-intro>p { font-size: 13px; }
  .portal-studio .status-summary { padding: 22px; gap: 18px; }
  .portal-studio .status-summary h2 { font-size: 17px; }
  .portal-studio .status-summary p { font-size: 12px; }
  .portal-studio .status-heading h2 { font-size: 20px; }
  .portal-studio .status-filters { padding: 15px; }
  .portal-studio .status-filters label { min-width: 100%; }
  .portal-studio .status-filters input, .portal-studio .status-filters select { font-size: 16px; }
  .portal-studio .status-model { padding: 20px; }
  .portal-studio .chat-welcome { margin: 28px auto 18px; padding: 0 22px; }
  .portal-studio .chat-welcome>.provider-icon { width: 60px; height: 60px; border-radius: 20px; margin-bottom: 24px; }
  .portal-studio .chat-welcome h1 { font-size: 27px; }
  .portal-studio .chat-welcome>p { font-size: 14px; }
  .portal-studio .chat-welcome .notice { font-size: 12px; }
  .portal-studio .chat-composer { padding: 20px 18px 16px; }
  .portal-studio .composer-box { padding: 16px; border-radius: 17px; }
  .portal-studio .composer-box textarea { font-size: 16px; min-height: 72px; }
  .portal-studio .composer-bottom { align-items: flex-end; gap: 14px; }
  .portal-studio .composer-bottom span { font-size: 10px; }
  .portal-studio .composer-bottom .btn { min-width: 70px; }
  .portal-studio .chat-feed { padding: 22px 18px; }
  .portal-studio .chat-message-content { font-size: 14px; }
  .portal-studio .modal { padding: 24px; border-radius: 20px; }
  .portal-studio .docs-content h1 { font-size: 28px; }
  .portal-studio .docs-content .docs-lead { font-size: 14px; }
  .portal-studio .docs-content .panel { padding: 22px 20px; }
  .portal-studio .docs-content .panel p { font-size: 14px; }
  .portal-studio .guide-switcher a { min-width: 100%; }
  .portal-studio .guide-callout { padding: 17px; }
  .portal-studio .guide-code pre { padding: 16px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .portal-studio .modal { animation: none; }
  .portal-studio .status-bucket:hover { transform: none; }
}
.portal-studio .status-model-name { min-width: 0; }
.portal-studio .status-model-name small { display: block; color: #a6b7d3; margin-top: 5px; font-size: 11px; }
@media (max-width: 790px) {
  .portal-studio .chat-sidebar { display: flex; flex-wrap: wrap; gap: 9px; padding: 18px; border-right: 0; border-bottom: 1px solid #b7caff19; }
  .portal-studio .chat-sidebar h3 { width: 100%; margin: 0 0 3px; }
  .portal-studio .chat-sidebar .preset-btn { flex: 1; min-width: 88px; min-height: 44px; margin: 0; padding: 10px; font-size: 12px; justify-content: center; gap: 7px; }
  .portal-studio .chat-sidebar p, .portal-studio .chat-sidebar>.text-link { display: none; }
}
.portal-studio .docs-content { scroll-margin-top: 112px; }
.portal-studio .chat-main:has(.chat-welcome) .chat-composer { position: static; }
.portal-studio .status-refresh:disabled:before { content: ''; display: inline-block; width: 11px; height: 11px; border: 1.5px solid #b7caff30; border-top-color: #b7caff; border-radius: 50%; margin-right: 8px; vertical-align: -1px; animation: studio-refresh 800ms linear infinite; }
/* A single motion vocabulary, driven by the user's current action. */
@property --studio-edge-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.portal-studio :is(.btn-primary, .market-button:not(.market-button-outline), .status-refresh) { position: relative; isolation: isolate; translate: var(--magnet-x, 0px) var(--magnet-y, 0px); transition: translate 240ms cubic-bezier(.16,1,.3,1), background 180ms, border-color 180ms, box-shadow 250ms, transform 320ms var(--studio-ease); }
.portal-studio :is(.btn-primary, .market-button:not(.market-button-outline), .status-refresh):after { content: ''; position: absolute; pointer-events: none; inset: -2px; border: 2px solid transparent; border-radius: inherit; background: conic-gradient(from var(--studio-edge-angle), transparent 55%, #b3eaff 68%, #fff 74%, #c2aaff 80%, transparent 88%) border-box; mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0); mask-composite: exclude; opacity: 0; }
.portal-studio :is(.btn-primary, .market-button:not(.market-button-outline), .status-refresh):is(:hover,:focus-visible):after { opacity: 1; animation: studio-border-chase 850ms cubic-bezier(.2,.65,.3,1) 1 both; }
.portal-studio :is(.btn-primary, .market-button, .status-refresh):disabled:after { display: none; }
@keyframes studio-border-chase { from { --studio-edge-angle: 0deg; } to { --studio-edge-angle: 360deg; } }
@media (hover: hover) and (pointer: fine) {
  .portal-studio :is(.studio-model-card, .status-model, .guide-steps>div) { transition: transform 320ms var(--studio-ease), box-shadow 320ms, border-color 240ms, background 240ms, backdrop-filter 320ms; backdrop-filter: blur(5px); }
  .portal-studio :is(.studio-model-card, .status-model, .guide-steps>div):hover { transform: translateY(-5px); box-shadow: 0 18px 38px #02071366, inset 0 1px 0 #e4efff0c; border-color: #b7caff60; background-color: #22334a55; backdrop-filter: blur(14px); }
  .portal-studio .orbit-chip { backdrop-filter: blur(7px); transition: backdrop-filter 300ms, background 300ms, border-color 250ms, transform 320ms var(--studio-ease); }
  .portal-studio .orbit-chip:hover { backdrop-filter: blur(18px); background: #21324ba8; }
  .studio-orbit, .orbit-chip-top, .orbit-chip-bottom { translate: 0 var(--parallax-y, 0px); }
}
.portal-studio .studio-model-card:focus-visible { transform: translateY(-4px); box-shadow: 0 16px 38px #02071366; }
.portal-studio .modal { animation: studio-gravity-drop 560ms cubic-bezier(.2,.8,.2,1); transform-origin: 50% 15%; }
@keyframes studio-gravity-drop {
  0% { opacity: 0; transform: translateY(-42px) rotateX(9deg) scale(.97); }
  58% { opacity: 1; transform: translateY(7px) rotateX(-1deg) scale(1.008); }
  80% { transform: translateY(-3px) scale(.998); }
  100% { opacity: 1; transform: translateY(0) rotateX(0) scale(1); }
}
.portal-studio .guide-switcher a[aria-current] { animation: studio-origami 380ms cubic-bezier(.16,1,.3,1); transform-origin: left center; }
@keyframes studio-origami { from { opacity: .65; transform: perspective(800px) rotateY(-14deg); } to { opacity: 1; transform: perspective(800px) rotateY(0); } }
@media (max-width:980px) {
  .portal-studio .main-nav.open { inset: 0 0 0 auto; position: fixed; top: 0; height: 100dvh; width: min(340px, 88vw); margin: 0; padding: 96px 22px 28px; border-radius: 24px 0 0 24px; border: 1px solid #b7caff40; background: #152139fa; box-shadow: -25px 0 90px #020611b0; display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; animation: studio-drawer-in 420ms cubic-bezier(.16,1,.3,1); }
  .portal-studio .main-nav.open a { animation: studio-nav-unfold 430ms cubic-bezier(.16,1,.3,1) both; transform-origin: top right; }
  .portal-studio .main-nav.open a:nth-child(2) { animation-delay: 25ms; }
  .portal-studio .main-nav.open a:nth-child(3) { animation-delay: 50ms; }
  .portal-studio .main-nav.open a:nth-child(4) { animation-delay: 75ms; }
  .portal-studio .main-nav.open a:nth-child(5) { animation-delay: 100ms; }
  .portal-studio .header-actions .menu-toggle { position: relative; z-index: 2; }
}
@keyframes studio-drawer-in { from { opacity: .6; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes studio-nav-unfold { from { opacity: 0; transform: perspective(700px) rotateX(-22deg) translateY(-8px); } to { opacity: 1; transform: perspective(700px) rotateX(0) translateY(0); } }
.studio-particle-layer { position: fixed; inset: 0; z-index: 250; overflow: hidden; pointer-events: none; }
.studio-particle-layer i { position: absolute; width: 5px; height: 8px; border-radius: 2px; box-shadow: 0 0 9px #c3ddff44; }
html:active-view-transition { cursor: progress; }
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 1; }
.studio-loading { min-height: 100dvh; padding: 58px max(24px, calc((100vw - 1180px) / 2)); background: #0a1020; color: #b7c7e4; font: 14px/1.8 'Segoe UI', 'Microsoft YaHei', sans-serif; }
.studio-loading-heading { display: flex; align-items: center; gap: 15px; margin: 65px 0 32px; }
.studio-loading-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.studio-skeleton-card { min-height: 195px; border: 1px solid #b7caff25; border-radius: 18px; padding: 26px; background: #18243a55; }
.studio-skeleton-card i { display: block; height: 15px; width: 68%; margin-bottom: 18px; border-radius: 7px; background: #b7caff16; animation: studio-skeleton-breathe 1600ms ease-in-out infinite alternate; }
.studio-skeleton-card i:first-child { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 30px; }
.studio-skeleton-card i:last-child { width: 88%; }
@keyframes studio-skeleton-breathe { from { opacity: .35; } to { opacity: .95; } }
.studio-liquid { position: relative; display: inline-flex; width: 36px; height: 24px; flex: none; filter: url(#studio-goo); vertical-align: middle; }
.studio-liquid i { position: absolute; top: 6px; left: 12px; width: 12px; height: 12px; background: #b8d8ff; border-radius: 50%; animation: studio-liquid-merge 1100ms ease-in-out infinite alternate; }
.studio-liquid i:last-child { background: #a4e8df; animation-direction: alternate-reverse; }
@keyframes studio-liquid-merge { from { transform: translateX(-11px) scale(.9); } to { transform: translateX(11px) scale(1.08); } }
.portal-studio .studio-busy { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.portal-studio .status-refresh.studio-busy:before { display: none; }
.portal-studio :is(.market-table-scroll,.guide-code pre,.horizontal-scroll,.chat-feed) { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; scroll-behavior: smooth; }
@media(max-width:700px) { .studio-loading-grid { grid-template-columns: 1fr; } .studio-loading { padding-top: 32px; } .studio-loading-heading { margin-top: 36px; } }
@media(prefers-reduced-motion:reduce) {
  .portal-studio :is(.btn-primary,.market-button,.status-refresh), .studio-orbit,.orbit-chip-top,.orbit-chip-bottom { translate: none!important; }
  .portal-studio .modal, .portal-studio .main-nav.open, .portal-studio .main-nav.open a, .portal-studio .guide-switcher a[aria-current], .studio-skeleton-card i, .studio-liquid i { animation: none!important; }
  .portal-studio :is(.studio-model-card,.status-model,.guide-steps>div):hover { transform: none; }
  .studio-liquid { filter: none; }
  .studio-liquid i:first-child { left: 4px; } .studio-liquid i:last-child { left: 20px; }
  ::view-transition-group(root), ::view-transition-new(root), ::view-transition-old(root) { animation: none!important; }
}
@media(max-width:980px) { body.portal-studio:has(.main-nav.open) { overflow: hidden; } body.portal-studio:has(.main-nav.open):before { content: ''; position: fixed; inset: 0; background: #03091699; z-index: 25; } }

::view-transition { pointer-events: none; }
::view-transition-group(studio-detail) { animation-duration: 620ms; animation-timing-function: cubic-bezier(.16,1,.3,1); z-index: 2; }
::view-transition-old(studio-detail) { animation-duration: 200ms; }
::view-transition-new(studio-detail) { animation-duration: 400ms; }
@media(prefers-reduced-motion:reduce) { ::view-transition-group(studio-detail), ::view-transition-new(studio-detail), ::view-transition-old(studio-detail) { animation: none!important; } }
