/* ImageTo / Jarvis violet workbench. Original integration; font licenses live
   alongside their subsets. All prices, models and task states remain API-driven. */
:root {
  --paper: oklch(99.7% .003 290);
  --surface: oklch(98% .009 290);
  --soft: oklch(95.8% .02 290);
  --hover: oklch(93% .033 290);
  --ink: oklch(23% .035 285);
  --secondary: oklch(45% .028 280);
  --muted: oklch(50% .025 280);
  --line: oklch(90% .03 290);
  --line-strong: oklch(78% .05 290);
  --accent: #5719d9;
  --accent-strong: #4513ae;
  --on-accent: oklch(99.7% .003 290);
  --hero-wash: oklch(93% .046 290);
  --grid-dot: oklch(75% .13 290 / .32);
  --shadow-color: oklch(32% .12 290 / .1);
  --footer: #17072c;
  --success: #17633b;
  --success-bg: #edf7f0;
  --danger: #a82222;
  --danger-bg: #fff0f0;
  /* Compatibility aliases for existing component styles, not extra accents. */
  --canvas: var(--surface);
  --green: var(--accent);
  --green-dark: var(--accent-strong);
  --acid: var(--on-accent);
  --navy: var(--footer);
  --radius: 8px;
  --shadow: 0 16px 48px var(--shadow-color);
  /* Native Songti first: no render-blocking font imports or multi-MB downloads. */
  --font-editorial: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  font-family: var(--font-editorial);
  font-size: 14px;
  color-scheme: light;
}
body { line-height: 1.6; }
.list-pagination { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; padding:16px; color:var(--muted); font-size:13px; }
.list-pagination .pagination-actions { display:flex; flex-wrap:wrap; gap:8px; }
.list-pagination button { min-height:36px; padding:6px 12px; border:1px solid var(--line); border-radius:6px; background:var(--paper); color:var(--accent); }
.list-pagination button:disabled { opacity:.45; cursor:default; }
.model-search { width:100%; margin-bottom:12px; }
.selected-model-summary { margin:8px 0; color:var(--accent); overflow-wrap:anywhere; }
.session-recovery { max-width: 600px; margin: 15vh auto; padding: 24px; text-align: center; }
.session-recovery p { color: var(--muted); margin: 16px 0; }
button, input, select, textarea { font-family: inherit; }
button, a { touch-action: manipulation; }
code, pre, .task-id { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
strong, b, h1, h2, h3, h4 { font-weight: 600; }
h1, h2, h3, .brand { letter-spacing: -.025em; }
table, .stat-card, .history-stats, .partner-stats, .model-row-price, .wallet-balance, .balance-panel { font-variant-numeric: tabular-nums; }
::selection { background: var(--accent); color: var(--on-accent); }
:is(button, a, input, textarea, select, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.eyebrow, .kicker { font-size: 10px; font-weight: 600; letter-spacing: .12em; }
.brand { font-size: 22px; font-weight: 600; }
.brand-mark { border-radius: 6px; transform: none; }
.brand-mark i { border-radius: 2px; }
.primary, .secondary, .landing-login-button, .landing-model-action button { border-radius: 6px; min-height: 38px; font-size: 14px; font-weight: 600; }
.primary:hover, .landing-model-action button:hover, .model-row:hover, .ratio-option:hover:not(:disabled), .admin-module-nav button:hover { transform: none; }
.text-button { font-size: 12px; }
.icon-button { border-radius: 6px; }
.mini { min-height: 30px; padding: 5px 9px; font-size: 11px; }
.page.active, .admin-module.active, .landing-model-section > header { animation: none; }
.topbar, .landing-nav { min-height: 60px; padding: 0 20px; background: var(--paper); backdrop-filter: none; }
.topbar { grid-template-columns: 170px 1fr auto; }
.account-menu { grid-column: 3; font-size: 13px; }
.account-menu strong { max-width: 220px; overflow-wrap: anywhere; }
.role-chip { border-radius: 4px; font-size: 11px; font-weight: 500; }
.content, .content.studio-content-wide, .content.admin-content-wide {
  width: calc(100% - 190px); max-width: none; margin: 0 0 0 190px; padding: 24px 24px 64px;
}
.page-heading, .content.admin-content-wide .page-heading { align-items: center; gap: 16px; margin-bottom: 22px; }
.page-heading h1, .partner-heading h1 { font-size: 28px; line-height: 1.4; }
.page-heading p:not(.eyebrow), .partner-heading p:not(.eyebrow) { font-size: 13px; margin-top: 6px; }
.page-heading .eyebrow { margin-bottom: 4px; }

/* Persistent navigation on desktop, horizontal navigation on small screens. */
.topbar #mainNav {
  position: fixed; inset: 60px auto 0 0; width: 190px; height: auto;
  flex-direction: column; gap: 5px; padding: 22px 10px;
  border-right: 1px solid var(--line); background: var(--paper); overflow-y: auto;
}
.topbar #mainNav > button, .topbar #mainNav summary {
  min-height: 42px; padding: 10px 12px; border-radius: 6px; text-align: left; font-size: 14px;
}
.topbar #mainNav > button::after { display: none; }
.topbar #mainNav > button.active { background: var(--accent); color: var(--on-accent); }
.special-models-menu { display: block; }
.special-models-menu summary { justify-content: space-between; }
.special-models-dropdown { position: static; width: 100%; padding: 5px; box-shadow: none; border-radius: 6px; background: var(--paper); }
.special-models-dropdown > a { min-height: 54px; padding: 8px 5px; border-radius: 4px; }
.special-models-dropdown a strong { font-size: 12px; }
.special-models-dropdown a small { font-size: 10px; }
.special-models-dropdown a i { flex-basis: 20px; height: 20px; border-radius: 4px; }
.topbar #mainNav:has(#adminNav:not(.hidden)) { position: static; width: auto; height: 60px; padding: 0; border: 0; flex-direction: row; overflow: visible; align-items: center; }
.topbar #mainNav:has(#adminNav:not(.hidden)) .special-models-dropdown { position: absolute; top: 54px; left: 0; width: 260px; box-shadow: var(--shadow); }
.topbar #mainNav #adminNav.active { background: transparent; color: var(--ink); }
.admin-module-nav {
  position: fixed; inset: 60px auto 0 0; z-index: 40; width: 190px;
  flex-direction: column; gap: 5px; margin: 0; padding: 22px 10px; border: 0;
  border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; background: var(--paper); backdrop-filter: none;
}
.admin-module-nav button { flex: 0 0 auto; grid-template-columns: minmax(0, 1fr) auto; min-height: 58px; border-radius: 6px; padding: 10px; }
.admin-module-nav button > span { font-size: 14px; }
.admin-module-nav button > small { font-size: 10px; opacity: 1; }
.admin-module-nav button > b { font-size: 11px; padding: 3px 5px; border-radius: 4px; }
.admin-module-nav button.active { box-shadow: none; background: var(--accent); color: var(--on-accent); }

/* Flat, compact panels and legible data, without truncating model names. */
.table-card, .compose-panel, .result-panel, .payment-card, .api-guide, .api-doc-card,
.api-markdown-panel, .quality-guide-card, .quality-showcase-gallery, .balance-panel,
.wallet-balance, .code-card, .agent-api-handoff, .agent-instruction-card,
.partner-share-card, .partner-rule-card, .partner-stats article, dialog {
  border-radius: 8px; box-shadow: none;
}
.compose-panel { padding: 22px; }
.studio-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 18px; }
.balance-panel { min-width: 210px; padding: 12px 16px; }
.balance-panel strong { font-size: 26px; }
.balance-panel small, .balance-panel span { font-size: 11px; }
.section-title > span { border-radius: 5px; }
.section-title h2 { font-size: 17px; }
.section-title p { font-size: 12px; }
.model-row { padding: 12px; border-radius: 6px; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; background: var(--paper); }
.model-row.active { background: var(--soft); }
.model-row-title b { font-size: 14px; font-weight: 600; line-height: 1.65; }
.model-row-title em { font-size: 10px; letter-spacing: 0; }
.model-row-copy > small { font-size: 12px; line-height: 1.65; }
.model-row-price { min-width: 80px; }
.model-row-price small { font-size: 11px; }
.model-row-indicator { width: 16px; height: 16px; }
.model-row-indicator i { width: 8px; height: 8px; }
.field { font-size: 14px; }
.field > small, .upload-zone small, .subhead small { font-size: 12px; }
.field textarea { padding-bottom: 32px; font-size: 15px; }
.field textarea, .field select, .login-card input, .dialog-card input, .custom-amount input { border-radius: 6px; }
.upload-zone, .ratio-option, .count-field, .cost-bar, .package-options button, .payment-methods span { border-radius: 6px; }
.ratio-option b { font-size: 12px; }
.cost-bar { grid-template-columns: 1fr auto; }
.cost-bar > p { grid-column: 1; grid-row: 2; font-size: 11px; }
.cost-bar > button { grid-column: 2; grid-row: 1 / 3; }
.cost-bar small { font-size: 11px; }
.result-panel { top: 78px; min-height: 520px; }
.empty-result { min-height: 460px; }
.empty-art { width: 130px; height: 130px; }
.empty-art i { border-radius: 6px; border-color: oklch(.72 .003 85 / .4); }
.empty-art i:nth-child(2) { inset: 33px; transform: none; }
.empty-art i:nth-child(3) { display: none; }
.empty-art span { font-size: 30px; }
.result-topline, .empty-result p { font-size: 13px; }
.result-frame, .batch-card, .result-metrics div { border-radius: 6px; }
.table-card { border: 1px solid var(--line); }
.card-heading { padding: 16px 18px; }
.card-heading h2 { font-size: 16px; }
.card-heading p { font-size: 12px; line-height: 1.6; }
table { font-size: 13px; }
th { font-size: 12px; letter-spacing: 0; font-weight: 500; padding: 12px; }
td { padding: 13px 12px; line-height: 1.6; }
.stats-grid, .history-stats, .partner-stats { gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stat-card, .history-stats article, .partner-stats article { border: 0; border-right: 1px solid var(--line); border-radius: 0; padding: 18px; }
.partner-stats article { display: block; }
.stat-card:last-child, .history-stats article:last-child, .partner-stats article:last-child { border-right: 0; }
.stat-card small, .history-stats small, .partner-stats small { font-size: 12px; }
.stat-card strong, .history-stats strong { font-size: 28px; letter-spacing: 0; }
.content.admin-content-wide #adminStats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#adminStats .stat-card { min-height: 130px; border-bottom: 1px solid var(--line); }
#adminStats .stat-card strong { font-size: 24px; }
#adminStats .stat-card:nth-child(3n) { border-right: 0; }
#adminStats .stat-card:nth-last-child(-n+3) { border-bottom: 0; }
.stat-card span, .history-stats span, .partner-stats span { font-size: 11px; }
.stat-card:first-child, .history-stats article:first-child { background: var(--navy); color: var(--paper); }
.stat-card:first-child :is(small, span), .history-stats article:first-child :is(small, span) { color: var(--acid); }
.admin-pricing-catalog code, .task-id { font-size: 11px; }
.admin-pricing-catalog td > small, .source-detail, .task-duration small, .task-profit-rate small { font-size: 10px; }
.task-duration strong, .task-profit-rate strong, .pagination-summary strong { font-size: 13px; }
.admin-upstream-route .route-heading strong, .admin-upstream-cell small { font-size: 10px; }
.admin-upstream-route > a, .admin-upstream-route p { font-size: 10px; }
.admin-upstream-route .route-step { width: 18px; height: 18px; }
.route-status, .route-switch { font-size: 10px; border-radius: 4px; }
.pagination-actions button { font-size: 12px; }
.history-table, .payment-history-card, .developer-grid > .table-card { overflow-x: auto; }
.history-table table { min-width: 1380px; }
.landing-model-table { min-width: 1490px; }
.landing-col-timing { width: 128px; }
.model-average-time { display: inline-flex; flex-direction: column; gap: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.model-average-time strong { color: var(--ink); font-size: 14px; }
.model-average-time small { color: var(--muted); font-size: 11px; font-weight: 400; }
.model-average-time.empty { color: var(--muted); font-size: 12px; }
.model-timing-note { margin: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.model-average-pair { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 10px; }
.model-average-pair > span { display: flex; flex-direction: column; gap: 4px; }
.model-average-pair > span > small { color: var(--muted); font-size: 11px; }
.model-average-pair .model-average-time { gap: 2px; }
.model-average-pair .model-average-time strong { font-size: 12px; }
.package-options strong { font-size: 24px; }
.package-options :is(small, span), .payment-methods small { font-size: 12px; }
.package-options .promotion-package, .package-options .discount-package { background: var(--soft); border-color: var(--line-strong); }
.package-options .promotion-package, .package-options .discount-package { padding-top: 36px; }
.package-options .discount-package.active { background: var(--soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.package-discount-badge { background: var(--accent); color: var(--on-accent); border-radius: 4px; font-size: 12px; }
.package-saving, .package-promotion-note { color: var(--ink); font-size: 11px; }
.agent-api-handoff-copy h2 { font-size: 30px; line-height: 1.4; }
.agent-api-handoff-copy > p:not(.eyebrow), .agent-api-handoff-copy li span { font-size: 12px; }
.agent-api-handoff-copy li b { font-size: 14px; }
.api-markdown-panel pre, .agent-instruction-card pre { font-size: 12px; line-height: 1.8; }
.secret-notice, .api-callout, .partner-rule-card, .quality-guide-card.premium { border-color: var(--line-strong); background: var(--soft); }

/* Public pages keep their visual image proof; no cropping, filters or animation
   are applied to customer images. */
.landing-shell { --landing-bg: var(--canvas); --landing-card: var(--paper); --landing-ink: var(--ink); --landing-muted: var(--muted); font-family: var(--font-editorial); }
.landing-nav { padding-inline: 24px; border-color: var(--line); }
.landing-nav nav > a { font-size: 13px; }
.landing-model-section { width: 100%; padding: 46px 28px 64px; }
.landing-model-section > header { max-width: 100%; }
.landing-model-section > header { position: relative; isolation: isolate; }
.landing-model-section > header::after {
  content: ""; position: absolute; z-index: -1; inset: -20px 0 -20px auto; width: 26%;
  pointer-events: none; opacity: .25;
  background: radial-gradient(circle, var(--grid-dot) 1px, transparent 1.5px) 0 0 / 7px 7px;
  mask-image: radial-gradient(ellipse at 100% 45%, black, transparent 72%);
}
.landing-model-section h1 { font-size: clamp(34px, 4vw, 56px); line-height: 1.3; letter-spacing: -.03em; }
.landing-model-section header p { margin-top: 12px; font-size: 15px; }
.landing-model-section header p strong { color: var(--ink); }
.landing-showcase { margin-top: 28px; border-radius: 8px; box-shadow: none; padding: 28px; gap: 28px; }
.landing-showcase-copy { padding: 0; }
.landing-showcase-copy::after { display: none; }
.landing-showcase-copy h2 { font-size: clamp(28px, 2.6vw, 42px); line-height: 1.4; letter-spacing: -.02em; }
.landing-showcase-copy > p:not(.eyebrow) { font-size: 13px; }
.landing-showcase .primary, .quality-hero .primary, .agent-api-handoff .primary { background: var(--paper); color: var(--ink); border: 1px solid var(--paper); }
.landing-showcase .primary span, .quality-hero .primary span, .agent-api-handoff .primary span { color: var(--ink); }
.landing-showcase .primary:hover, .quality-hero .primary:hover, .agent-api-handoff .primary:hover { background: var(--soft); }
.showcase-image { border-radius: 5px; }
.showcase-image > span { font-size: 11px; background: var(--navy); }
.showcase-image > span i { font-size: 10px; }
.landing-model-filters { border-radius: 6px; box-shadow: none; background: var(--paper); margin-block: 24px 16px; border-color: var(--line); }
.landing-model-filters button { border-radius: 4px; font-size: 13px; font-weight: 500; }
.landing-model-filters button.active { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.landing-model-table-shell { position: relative; border-radius: 8px; border-color: var(--line); box-shadow: none; background: var(--paper); }
.landing-model-table th { font-size: 12px; }
.landing-model-name strong { font-size: 16px; line-height: 1.7; }
.landing-model-name .landing-model-description { font-size: 12px; }
.landing-model-name code { font-size: 11px; }
.landing-series-chip { background: var(--soft); color: var(--muted); font-size: 11px; border-radius: 4px; }
.landing-model-capability strong { font-size: 13px; }
.landing-model-capability small, .landing-model-resolution small, .landing-model-price small, .landing-model-offer small { font-size: 11px; }
.landing-model-offer > span, .landing-model-offer > span.special, .landing-model-offer > span.economy, .landing-model-offer > span.quality { background: var(--soft); color: var(--ink); border-radius: 4px; font-size: 11px; }
.landing-model-action button { background: var(--accent); font-size: 13px; }
.landing-model-action button b { color: var(--paper); }
.landing-footer { background: var(--paper); border-color: var(--line); padding-inline: 28px; }
.landing-footer p, .landing-footer > a:last-child { font-size: 12px; }
.quality-hero { border-radius: 8px; padding: 36px; box-shadow: none; }
.quality-hero h1 { font-size: clamp(32px, 4vw, 54px); line-height: 1.3; letter-spacing: -.03em; }
.quality-price-card { border-color: var(--muted); background: transparent; border-radius: 6px; }
.quality-guide-card p { font-size: 13px; }
.auth-tabs, .login-method-tabs { border-radius: 6px; }
.login-card label, .dialog-card label { font-size: 14px; }
.auth-tabs button, .login-method-tabs button { font-size: 14px; border-radius: 4px; }
.login-card h2 { font-size: 32px; line-height: 1.5; }
dialog { box-shadow: var(--shadow); }
.partner-content { width: 100%; max-width: 1800px; padding: 26px 28px 64px; }
.partner-login-brand h1 { line-height: 1.4; letter-spacing: -.025em; }
.partner-topbar { grid-template-columns: 1fr auto; }

/* Status is semantic, not decoration: retain visible success/error/wait states. */
.table-card .status-chip.succeeded, .route-status.succeeded { color: var(--success); background: var(--success-bg); }
.table-card .status-chip.failed, .route-status.failed { color: var(--danger); background: var(--danger-bg); }
.table-card .status-chip.running, .table-card .status-chip.queued, .route-status.running { color: #805515; background: #fbf3df; }
.status-chip { font-size: 11px; border-radius: 4px; white-space: nowrap; }
.provider-health.healthy { background: #f1f7f2; border-color: #c9ddce; }
.model-toggle.enabled { color: #216546; background: #f1f7f2; border-color: #c9ddce; }
.model-toggle.enabled > span { background: #216546; }
.result-panel .status-chip.succeeded { color: #a5d4b6; }
.partner-customer-card .status-chip { color: #216546; }

/* Color-only alignment with 贾维斯网站统一设计规范.
   Existing sizing, typography, navigation and business behavior are unchanged. */
body, .landing-shell { background: var(--paper); }
.brand-mark, .section-title > span, .model-row-title em,
.login-method-tabs button.active, .count-heading output { background: var(--accent); color: var(--on-accent); }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover, .landing-model-action button:hover { background: var(--accent-strong); }
.primary span { color: var(--on-accent); }
.secondary { border-color: var(--line-strong); background: var(--paper); color: var(--accent); }
.secondary:hover { background: var(--soft); border-color: var(--accent); color: var(--accent-strong); }
.landing-shell .secondary { color: var(--accent); }
.topbar #mainNav > button:not(.active):hover, .admin-module-nav button:not(.active):hover,
.special-models-dropdown > a:hover, .landing-model-filters button:not(.active):hover { background: var(--hover); color: var(--accent); }
.landing-model-section h1, .landing-model-name strong, .landing-model-capability strong,
.landing-model-resolution strong { color: var(--ink); }
.landing-model-name code { color: var(--secondary); }
.landing-model-section header p strong, .landing-model-price strong,
.landing-showcase-price strong, .quality-price-card strong { color: var(--accent); }
.landing-model-table th, th, .admin-calls-pagination,
.operations-summary article, .admin-pricing-summary article, .admin-pricing-note { background: var(--surface); color: var(--secondary); }
.landing-model-table td, .landing-model-table th { border-color: var(--line); }
.landing-model-row:hover, tbody tr:hover { background: var(--surface); }
.landing-series-chip, .role-chip, .landing-model-offer > span,
.landing-model-offer > span.special, .landing-model-offer > span.economy, .landing-model-offer > span.quality,
.source-chip.web, .source-chip.api, .admin-recent-calls .source-chip.web, .admin-recent-calls .source-chip.api,
.method.post, .method.get, .channel-chip, .rate-chip.positive, .rate-chip.margin { background: var(--soft); color: var(--accent-strong); }
.model-row, .ratio-option, .package-options button, .payment-methods span,
.count-field, .upload-zone, .api-steps li { background: var(--surface); border-color: var(--line); }
.model-row:hover, .ratio-option:hover:not(:disabled), .upload-zone:hover { background: var(--hover); border-color: var(--line-strong); }
.model-row.active, .ratio-option.active, .package-options button.active,
.payment-methods input:checked + span, .upload-zone.dragging { background: var(--soft); border-color: var(--accent); }
.ratio-shape, .ratio-option.active .ratio-shape { color: var(--accent); background: var(--soft); }
.landing-showcase, .quality-hero { background: var(--hero-wash); border-color: var(--line); color: var(--ink); }
.landing-showcase-copy .eyebrow, .quality-hero .eyebrow { color: var(--accent); }
.landing-showcase-copy > p:not(.eyebrow), .quality-hero > div > p:not(.eyebrow),
.landing-showcase-price :is(span, small), .quality-price-card :is(span, small, p) { color: var(--secondary); }
.landing-showcase-price, .quality-price-card, .quality-price-card p { border-color: var(--line-strong); }
.landing-showcase .primary, .quality-hero .primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.landing-showcase .primary span, .quality-hero .primary span { color: var(--on-accent); }
.landing-showcase .primary:hover, .quality-hero .primary:hover { background: var(--accent-strong); }
.landing-showcase .secondary, .quality-hero .secondary { background: var(--paper); border-color: var(--line-strong); color: var(--accent); }
.landing-showcase .secondary:hover, .quality-hero .secondary:hover { background: var(--soft); border-color: var(--accent); color: var(--accent-strong); }
.landing-showcase .secondary b { color: var(--accent); }
.stat-card:first-child, .history-stats article:first-child,
.partner-stats article.primary, .wallet-balance { background: var(--soft); color: var(--ink); border-color: var(--line); }
.stat-card:first-child :is(small, span), .history-stats article:first-child :is(small, span),
.partner-stats article.primary :is(small, span), .wallet-balance small { color: var(--secondary); }
.stat-card:first-child strong, .history-stats article:first-child strong,
.partner-stats article.primary strong, .wallet-balance strong { color: var(--accent); }
.result-panel { background: var(--surface); color: var(--ink); }
.result-topline { color: var(--secondary); border-color: var(--line); }
.result-topline .text-button, .empty-art span { color: var(--accent); }
.empty-art i { border-color: var(--line-strong); }
.empty-result p, .task-result-head p, .batch-summary span { color: var(--secondary); }
.result-panel .status-chip { background: var(--soft); color: var(--muted); }
.result-panel .status-chip.succeeded { background: var(--success-bg); color: var(--success); }
.result-panel .status-chip.failed { background: var(--danger-bg); color: var(--danger); }
.result-panel .status-chip.running, .result-panel .status-chip.queued { background: #fbf3df; color: #805515; }
.batch-summary span, .result-metrics div { background: var(--soft); }
.batch-summary b, .result-metrics strong { color: var(--ink); }
.result-metrics small { color: var(--secondary); }
.result-actions .secondary, .batch-head .compact { background: var(--paper); border-color: var(--line-strong); color: var(--accent); }
.progress-track { background: var(--line); }
.progress-track i { background: var(--accent); }
/* Image and code frames stay deep violet for contrast, never tint actual media. */
.result-frame, .batch-card, .batch-card-visual, .agent-instruction-card,
.code-card pre, .api-markdown-panel pre { background: var(--footer); }
.batch-card { color: var(--on-accent); }
.cost-bar, .payment-submit-row { background: var(--soft); color: var(--ink); }
.cost-bar :is(small, p), .payment-submit-row small { color: var(--secondary); }
.cost-bar strong, .payment-submit-row strong { color: var(--accent); }
.cost-bar .primary, .payment-submit-row .primary { background: var(--accent); color: var(--on-accent); }
.cost-bar .primary span, .payment-submit-row .primary span { color: var(--on-accent); }
.cost-bar .primary:hover, .payment-submit-row .primary:hover { background: var(--accent-strong); }
.agent-api-handoff { background: var(--accent); }
.agent-api-handoff .primary, .agent-api-handoff .primary span { color: var(--accent); }
.agent-api-handoff-copy > p:not(.eyebrow), .agent-api-handoff-copy li span { color: var(--soft); }
.landing-footer { background: var(--footer); border-color: var(--footer); }
.landing-footer .brand, .landing-footer > a:last-child { color: var(--on-accent); }
.landing-footer p { color: var(--line); }
.landing-footer .brand-mark { background: var(--accent); }
.landing-footer > .brand { display: inline-flex; font-size: 22px; }
.model-toggle.enabled, .partner-customer-card .status-chip { color: var(--success); background: var(--success-bg); }
.model-toggle.enabled > span { background: var(--success); }

@media (min-width: 1700px) {
  .model-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-row { grid-template-columns: 18px minmax(0, 1fr); align-items: start; }
  .model-row-price { grid-column: 2; display: flex; align-items: baseline; gap: 6px; text-align: left; }
  .model-row-price small { margin: 0; }
}
@media (max-width: 1250px) {
  .studio-grid, .wallet-grid, .developer-grid { grid-template-columns: minmax(0, 1fr); }
  .result-panel { position: relative; top: 0; }
  .landing-showcase { grid-template-columns: minmax(0, 1fr); }
  .landing-showcase-copy { max-width: 780px; }
}
@media (max-width: 900px) {
  .topbar { position: sticky; grid-template-columns: 1fr auto; padding: 10px 16px 0; }
  .account-menu { grid-column: 2; }
  .content, .content.studio-content-wide, .content.admin-content-wide { width: 100%; margin: 0; padding: 22px 16px 48px; }
  .topbar #mainNav, .topbar #mainNav:has(#adminNav:not(.hidden)) { position: static; width: auto; height: 50px; flex-direction: row; grid-column: 1 / -1; order: 3; margin: 10px -16px 0; padding: 4px 12px; border: 0; border-top: 1px solid var(--line); overflow-x: auto; }
  .topbar #mainNav > button, .topbar #mainNav summary { white-space: nowrap; min-height: 36px; padding: 6px 12px; }
  .special-models-menu { flex: 0 0 auto; }
  .special-models-dropdown, .topbar #mainNav:has(#adminNav:not(.hidden)) .special-models-dropdown { position: fixed; inset: 114px 12px auto; width: auto; box-shadow: var(--shadow); }
  .special-models-dropdown > a { padding: 10px; }
  .admin-module-nav { position: static; width: auto; flex-direction: row; padding: 5px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 6px; overflow-x: auto; }
  .admin-module-nav button { flex: 0 0 155px; }
  .quality-hero { grid-template-columns: 1fr; padding: 24px; }
  .quality-price-card { max-width: none; }
  .partner-topbar { padding-bottom: 10px; }
}
@media (max-width: 600px) {
  .landing-nav { padding: 10px 16px; }
  .landing-model-section { padding: 28px 16px 42px; }
  .landing-model-section h1 { font-size: 32px; }
  .landing-showcase { margin-inline: 0; padding: 18px; gap: 20px; }
  .landing-showcase-copy h2 { font-size: 28px; }
  .landing-showcase-gallery, .quality-showcase-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .showcase-image > span { padding: 8px; }
  .landing-model-filters { flex-wrap: nowrap; overflow-x: auto; }
  .page-heading, .partner-heading { align-items: stretch; flex-direction: column; }
  .page-heading h1, .partner-heading h1 { font-size: 26px; }
  .heading-actions { justify-content: flex-start; }
  .balance-panel, .wallet-balance { min-width: 0; width: 100%; }
  .compose-panel { padding: 16px; }
  .model-row { grid-template-columns: 16px minmax(0, 1fr); }
  .model-row-price { grid-column: 2; display: flex; align-items: baseline; gap: 6px; text-align: left; }
  .model-row-price small { margin: 0; }
  .ratio-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .cost-bar { grid-template-columns: 1fr; }
  .cost-bar > button, .cost-bar > p { grid-column: 1; grid-row: auto; }
  .cost-bar > button { width: 100%; }
  .stats-grid, .history-stats, .partner-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content.admin-content-wide #adminStats { grid-template-columns: minmax(0, 1fr); }
  #adminStats .stat-card { min-height: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  #adminStats .stat-card:nth-last-child(-n+3) { border-bottom: 1px solid var(--line); }
  #adminStats .stat-card:last-child { border-bottom: 0; }
  .stat-card, .history-stats article, .partner-stats article { border-bottom: 1px solid var(--line); }
  .package-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-api-handoff { padding: 20px; }
  .agent-api-handoff-copy h2 { font-size: 26px; }
  .partner-content { padding: 22px 16px 48px; }
  .empty-result { min-height: 350px; padding: 24px; }
  .result-panel { min-height: 410px; }
  .quality-guide-grid { grid-template-columns: 1fr; }
}
