:root {
  color-scheme: light;
  font: 16px/1.55 "Microsoft YaHei UI", "PingFang SC", "Segoe UI", sans-serif;
  --back: #f2f5fb;
  --head: #fbfcff;
  --panel: #fff;
  --field: #f6f8fc;
  --edge: #dce3f0;
  --text: #17223b;
  --dim: #515e78;
  --faint: #67738b;
  --brand: #244edc;
  --brand-on: #fff;
  --brand-hover: #163fc8;
  --brand-soft: #e8eeff;
  --review: #e9eef9;
  --positive: #156344;
  --positive-bg: #e0f4ea;
  --warning: #875400;
  --warning-bg: #fff1d4;
  --danger: #a02c43;
  --danger-bg: #ffe6e9;
  --screen: #11192d;
  --screen-light: #263e75;
  --screen-mark: #9ab6ff;
  --radius: 17px;
  --gap: 19px;
  --shadow: 0 12px 40px #3b507514;
  --wash: transparent;
}

:root[data-theme='midnight'] {
  color-scheme: dark;
  --back: #0a1428;
  --head: #0c172c;
  --panel: #132039;
  --field: #0c192f;
  --edge: #2b4066;
  --text: #edf5ff;
  --dim: #b1c3e0;
  --faint: #98abc7;
  --brand: #7dd6ff;
  --brand-on: #08203a;
  --brand-hover: #a8e8ff;
  --brand-soft: #203c5b;
  --review: #0e1d36;
  --positive: #a1f3ca;
  --positive-bg: #1b4240;
  --warning: #ffe3a8;
  --warning-bg: #403a39;
  --danger: #ffb9ca;
  --danger-bg: #442940;
  --screen: #081528;
  --screen-light: #1b3e66;
  --screen-mark: #8adbff;
  --radius: 20px;
  --gap: 19px;
  --shadow: 0 16px 40px #0209146b;
  --wash: #182f56;
}

:root[data-theme='graphite'] {
  color-scheme: dark;
  --back: #171615;
  --head: #191817;
  --panel: #211f1d;
  --field: #181715;
  --edge: #413d37;
  --text: #fcf4eb;
  --dim: #cabdb0;
  --faint: #b3a596;
  --brand: #ff9e77;
  --brand-on: #33180e;
  --brand-hover: #ffb292;
  --brand-soft: #432e24;
  --review: #23201c;
  --positive: #b2e6bd;
  --positive-bg: #293c2e;
  --warning: #ffd38e;
  --warning-bg: #4b3726;
  --danger: #ffb4ad;
  --danger-bg: #4c2d29;
  --screen: #161411;
  --screen-light: #382821;
  --screen-mark: #ffc0a6;
  --radius: 10px;
  --gap: 14px;
  --shadow: none;
  --wash: transparent;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; color: var(--text); background: radial-gradient(ellipse at 80% 140px, var(--wash), transparent 610px), var(--back); }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
img { display: block; max-width: 100%; }
strong { font-weight: 680; }
h1, h2, p, dl, dd, ul, pre { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
code, kbd, input#task-id { font-family: Consolas, "SFMono-Regular", ui-monospace, monospace; }
.container { max-width: 1240px; width: calc(100% - 64px); margin-inline: auto; }

.review { background: var(--review); border-bottom: 1px solid var(--edge); font-size: .8125rem; }
.review-inner { min-height: 43px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.review-inner > a { justify-self: end; color: var(--dim); text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.review-inner > a:hover { color: var(--brand); }
.review-heading { display: flex; align-items: baseline; gap: .6rem; white-space: nowrap; }
.review-heading span { color: var(--faint); }
.theme-switch, .compact-switch { display: flex; align-items: center; gap: 2px; padding: 3px; border: 1px solid var(--edge); border-radius: 9px; background: var(--field); }
.theme-switch button, .compact-switch button { display: inline-flex; align-items: center; gap: .35rem; padding: 1px 7px; min-height: 23px; border: 0; border-radius: 6px; background: transparent; color: var(--dim); white-space: nowrap; font-size: .8125rem; }
.theme-switch button[aria-pressed='true'], .compact-switch button[aria-pressed='true'] { color: var(--brand); background: var(--brand-soft); font-weight: 680; }
.theme-switch i { width: 9px; height: 9px; border-radius: 3px; background: #4366df; }
.theme-switch [data-pick-theme='midnight'] i { background: #318eae; }
.theme-switch [data-pick-theme='graphite'] i { background: #d9724b; }
.site-head { background: var(--head); border-bottom: 1px solid var(--edge); }
.head-inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 70px; gap: 9px; }
.brand { display: inline-flex; width: fit-content; white-space: nowrap; align-items: center; gap: .55rem; font-family: "Segoe UI", sans-serif; font-size: 1.25rem; letter-spacing: -.02em; }
.brand img { flex: none; object-fit: contain; }
.brand > span { color: var(--faint); padding-left: .5rem; margin-left: .1rem; border-left: 1px solid var(--edge); font: 530 .8125rem/1.5 "Microsoft YaHei UI", sans-serif; }
.main-nav { align-self: stretch; display: flex; align-items: stretch; gap: .9rem; }
.main-nav a { display: flex; align-items: center; border-bottom: 2px solid transparent; padding-inline: .65rem; color: var(--dim); font-size: .9375rem; font-weight: 570; white-space: nowrap; }
.main-nav a[aria-current='page'] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 740; }
.main-nav a:hover { color: var(--brand); }
.wallet { justify-self: end; display: flex; align-items: center; gap: .75rem; white-space: nowrap; }
.wallet div { display: flex; align-items: baseline; gap: .5rem; }
.wallet div > span { color: var(--faint); font-size: .8125rem; }
.wallet strong { font: 760 1.08rem/1.25 "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); font-size: .875rem; font-weight: 700; }

.page { padding: 30px 0 54px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 21px; gap: 15px; }
h1 { font-size: clamp(2.02rem, 3.65vw, 2.9rem); font-weight: 770; line-height: 1.15; letter-spacing: -.042em; }
.page-heading p, .gateway-intro p { margin-top: .53rem; color: var(--dim); }
.account-note { display: inline-flex; align-items: center; gap: .55rem; color: var(--positive); font-size: .875rem; white-space: nowrap; }
.account-note::before { content: ""; width: 7px; height: 7px; flex: none; background: currentColor; border-radius: 50%; }
.workspace { display: grid; grid-template-columns: minmax(345px, 410px) minmax(0, 1fr); gap: var(--gap); align-items: start; }
.panel { min-width: 0; background: var(--panel); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow); }
.editor, .gallery { padding: 19px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
h2 { font-size: 1.125rem; font-weight: 715; line-height: 1.35; }
.panel-head p { margin-top: .18rem; color: var(--faint); font-size: .8125rem; }
.plain { min-height: 29px; padding: 0 5px; border: 0; border-radius: 5px; background: transparent; color: var(--dim); font-size: .875rem; white-space: nowrap; }
.plain:hover { background: var(--field); }
.plain.accent { color: var(--brand); }
.prompt-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.prompt-head label { font-size: .9rem; font-weight: 660; }
.prompt-wrap { position: relative; border: 1px solid var(--edge); background: var(--field); border-radius: calc(var(--radius) - 7px); }
.prompt-wrap:focus-within { border-color: var(--brand); outline: 1px solid var(--brand); }
.prompt-wrap textarea { display: block; width: 100%; min-height: 123px; resize: vertical; padding: 10px 11px 24px; background: transparent; border: 0; outline: 0; font-size: .9375rem; line-height: 1.65; }
.prompt-wrap span { position: absolute; right: 13px; bottom: 5px; color: var(--faint); font-size: .75rem; pointer-events: none; font-variant-numeric: tabular-nums; }
.prompt-wrap textarea::placeholder, .lookup input::placeholder { color: var(--faint); }
.field { display: grid; min-width: 0; gap: 5px; margin: 0 0 11px; padding: 0; border: 0; }
.field.compact { margin: 0; }
.field-label, .field legend { color: var(--text); font-size: .875rem; font-weight: 670; }
.field legend { margin-bottom: 5px; padding: 0; }
.field select, .field input:not([type='radio']):not([type='file']), .field textarea {
  width: 100%; min-height: 37px; padding: 5px 8px; border: 1px solid var(--edge); border-radius: max(6px, calc(var(--radius) - 7px));
  background: var(--field); color: var(--text); font: inherit; font-size: .875rem;
}
.field select { padding-right: 22px; cursor: pointer; }
.field select:disabled { opacity: .8; cursor: default; }
.helper { display: block; color: var(--faint); font-size: .8125rem; overflow-wrap: anywhere; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.mode-options label { display: flex; min-width: 0; cursor: pointer; }
.mode-options input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.mode-options span { display: grid; width: 100%; min-height: 34px; padding: 4px; place-items: center; border: 1px solid var(--edge); border-radius: 6px; background: var(--field); color: var(--dim); font-size: .84rem; white-space: nowrap; }
.mode-options input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.mode-options input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.output-options { margin-top: 10px; gap: 7px; }
.output-options .field-pair:has([hidden]) { grid-template-columns: 1fr; }
.attachments { margin-top: 10px; padding: 0 8px; border: 1px solid var(--edge); border-radius: max(6px, calc(var(--radius) - 7px)); }
.attachments > summary, .custom-voice > summary { min-height: 36px; padding: 7px 0; cursor: pointer; font-size: .875rem; font-weight: 640; }
.attachments > summary { display: flex; justify-content: space-between; align-items: baseline; gap: 7px; }
.attachments > summary::after { content: '+'; color: var(--brand); }
.attachments[open] > summary::after { content: '−'; }
.attachments > summary small { flex: 1; color: var(--faint); text-align: right; font-size: .75rem; font-weight: 450; }
.attachments[open], .custom-voice[open] { padding-bottom: 8px; }
.upload { display: block; padding: 7px; border: 1px dashed var(--edge); border-radius: 6px; background: var(--field); color: var(--brand); font-size: .875rem; cursor: pointer; }
.upload.drag-over { border-color: var(--brand); background: var(--brand-soft); }
.upload input { width: 100%; margin-top: 5px; font-size: .8125rem; }
.input-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }
.selection-list { display: grid; gap: 4px; padding: 0; list-style: none; }
.selection-list:empty { display: none; }
.selection-list li { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px; border: 1px solid var(--edge); border-radius: 6px; font-size: .8125rem; }
.selection-list img { flex: none; width: 32px; height: 25px; object-fit: cover; border-radius: 3px; }
.selection-list li > span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.selection-list .plain { min-height: 25px; font-size: .8125rem; }
.voice-actions, .task-next { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.task-next { margin: 0 0 10px; }
.task-next .secondary { min-height: 31px; font-size: .8125rem; }
.custom-voice[open] { display: grid; gap: 5px; }
.request-config { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 5px 8px; gap: 6px; }
.request-config .field-label, .request-config select { font-size: .8125rem; }
.request-note { padding: 0 8px 6px; }
.docs-card .examples { margin: 6px 0 14px; }
.catalog-table { width: 100%; margin-block: 8px 16px; border-collapse: collapse; font-size: .875rem; text-align: left; }
.catalog-table :is(td, th) { border-bottom: 1px solid var(--edge); padding: 5px; overflow-wrap: anywhere; }
.model { display: flex; align-items: center; gap: 9px; min-height: 53px; margin-top: 13px; padding: 7px 10px; background: var(--field); border: 1px solid var(--edge); border-radius: calc(var(--radius) - 7px); }
.model-glyph { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
.model div { flex: 1; }
.model div span, .model div strong { display: block; }
.model div span { color: var(--faint); font-size: .75rem; }
.model div strong { font: 700 1rem/1.2 "Segoe UI", sans-serif; white-space: nowrap; }
.model code { color: var(--faint); font-size: .75rem; white-space: nowrap; }
.specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 13px; padding: 9px 0; border-block: 1px solid var(--edge); }
.specs div { padding-inline: 6px; }
.specs div + div { border-left: 1px solid var(--edge); padding-left: 12px; }
.specs dt { color: var(--faint); font-size: .8125rem; }
.specs dd { font-size: .9rem; font-weight: 690; white-space: nowrap; }
.price { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 11px; gap: 10px; }
.price div strong { font-size: .875rem; }
.price p { color: var(--dim); font-size: .8125rem; }
.price output { color: var(--brand); font: 760 1.52rem/1.3 "Segoe UI", sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: .52rem; white-space: nowrap; border-radius: calc(var(--radius) - 7px); font-weight: 680; }
.primary { position: relative; padding-inline: 1rem; min-height: 46px; border: 1px solid transparent; background: var(--brand); color: var(--brand-on); }
.primary:hover:not(:disabled) { background: var(--brand-hover); }
.primary:disabled { background: var(--brand-soft); color: var(--dim); }
#submit { width: 100%; }
#submit kbd { position: absolute; right: 10px; padding: .18rem .33rem; border: 1px solid currentColor; border-radius: 4px; opacity: .72; font-size: .68rem; font-weight: 520; }
.secondary { min-height: 37px; padding-inline: .64rem; border: 1px solid var(--edge); background: var(--field); color: var(--text); font-size: .875rem; }
.secondary.download { color: var(--brand); background: var(--brand-soft); border-color: transparent; }
.secondary:hover { border-color: var(--brand); }
.form-msg { margin-top: 6px; color: var(--danger); font-size: .875rem; }
.cam, .down { position: relative; display: inline-block; width: 16px; height: 15px; flex: none; }
.cam::before { position: absolute; content: ""; top: 3px; left: 0; width: 11px; height: 9px; border: 1.5px solid currentColor; border-radius: 2px; }
.cam::after { position: absolute; content: ""; top: 4px; right: 0; width: 5px; height: 7px; border: 1.5px solid currentColor; border-left: none; border-radius: 0 1px 1px 0; transform: skewY(-16deg); }
.down { border: 1.5px solid currentColor; border-top: 0; border-radius: 0 0 3px 3px; width: 13px; height: 6px; margin-top: 7px; }
.down::before { position: absolute; content: ""; top: -7px; left: 4.2px; height: 7px; border-left: 1.5px solid currentColor; }
.down::after { position: absolute; content: ""; top: -4px; left: 2.1px; width: 5px; height: 5px; border-bottom: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg); }

.request { margin-top: 12px; border: 1px solid var(--edge); border-radius: calc(var(--radius) - 7px); }
.request summary { list-style: none; display: flex; align-items: center; gap: 7px; min-height: 41px; padding: 7px 10px; color: var(--dim); font-size: .875rem; cursor: pointer; }
.request summary::-webkit-details-marker { display: none; }
.request summary::after { content: "+"; margin-left: auto; font-size: 1.15em; }
.request[open] summary::after { content: "−"; }
.request summary code { color: var(--brand); }
.request .code-panel { margin: 0 7px 7px; }
.code-panel { overflow: hidden; border: 1px solid var(--edge); border-radius: 9px; background: var(--field); }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--edge); color: var(--faint); font-size: .8125rem; }
.code-head .compact-switch { padding: 1px; }
.code-copy { border: 1px solid var(--edge); border-radius: 6px; padding: .22rem .45rem; background: var(--panel); color: var(--brand); font-size: .8125rem; white-space: nowrap; }
.code-copy:hover { border-color: var(--brand); }
.code-panel pre { max-width: 100%; overflow: auto; padding: 10px 12px 14px; line-height: 1.63; font-size: .8125rem; color: var(--text); }

.status { display: inline-flex; align-items: center; gap: 5px; background: var(--brand-soft); color: var(--brand); border-radius: 99px; padding: 4px 9px; white-space: nowrap; font-size: .8125rem; line-height: 1.35; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-sample::before { display: none; }
.status-completed { color: var(--positive); background: var(--positive-bg); }
.status-queued, .status-working { color: var(--warning); background: var(--warning-bg); }
.status-failure { color: var(--danger); background: var(--danger-bg); }
.stage { position: relative; aspect-ratio: 16/9; overflow: hidden; border-radius: calc(var(--radius) - 7px); isolation: isolate; background: var(--screen); }
.stage video { display: block; width: 100%; height: 100%; object-fit: contain; background: var(--screen); }
.play { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 60px; height: 60px; transform: translate(-50%, -50%); border: 1px solid #fff9; border-radius: 50%; background: #111316b3; color: #fff; backdrop-filter: blur(7px); box-shadow: 0 8px 26px #0006; }
.play:hover { background: #111316ed; }
.play i { width: 0; height: 0; margin-left: 4px; border-left: 14px solid currentColor; border-block: 9px solid transparent; }
.timecode { position: absolute; right: 10px; bottom: 10px; padding: 3px 7px; border-radius: 5px; background: #12161cce; color: #fff; font: 540 .78rem/1.35 Consolas, monospace; }
.stage-message { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 5px; padding: 10px; text-align: center; background: radial-gradient(ellipse at center, var(--screen-light), var(--screen) 78%); color: #fff; }
.stage-message > i { width: 32px; height: 32px; margin-bottom: 5px; border: 2px solid #fff4; border-top-color: var(--screen-mark); border-radius: 50%; animation: spin 1s linear infinite; }
.stage-message > i.fail { display: grid; place-items: center; border-color: #ffb2ab; color: #ffb2ab; animation: none; }
.stage-message > i.fail::before { content: "!"; font-weight: 700; }
@keyframes spin { to { transform: rotate(1turn); } }
.stage-message > strong { font-size: 1.18rem; }
.stage-message > p { color: #e5ebf2; font-size: .875rem; }
.progress { display: flex; width: min(80%, 245px); align-items: center; gap: 10px; margin-top: 8px; color: var(--screen-mark); font-family: Consolas, monospace; font-size: .8125rem; }
progress { width: 100%; height: 6px; border: 0; border-radius: 10px; appearance: none; overflow: hidden; background: #ffffff32; }
progress::-webkit-progress-bar { background: #ffffff32; }
progress::-webkit-progress-value { background: var(--screen-mark); }
progress::-moz-progress-bar { background: var(--screen-mark); }
.clip { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0 13px; }
.clip-label { flex: 1; min-width: 0; }
.clip-label strong, .clip-label span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-label span { margin-top: 2px; color: var(--faint); font-size: .8125rem; }
.clip-actions { display: flex; align-items: center; gap: 6px; }
.task-history { border-top: 1px solid var(--edge); padding-top: 12px; }
.lookup { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.lookup input { width: 100%; min-width: 0; padding: 0 9px; border: 1px solid var(--edge); border-radius: calc(var(--radius) - 7px); background: var(--field); font-size: .875rem; }
.lookup input::placeholder { font-family: "Microsoft YaHei UI", sans-serif; }
#task-list { list-style: none; padding: 0; margin-top: 8px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
.task-row { display: flex; align-items: center; width: 100%; min-width: 0; min-height: 51px; gap: 9px; padding: 5px 8px; border: 1px solid transparent; border-radius: calc(var(--radius) - 7px); background: var(--field); text-align: left; }
.task-row:hover, .task-row[aria-pressed='true'] { border-color: var(--edge); background: var(--brand-soft); }
.task-thumb { flex: none; width: 51px; height: 32px; overflow: hidden; display: grid; place-items: center; border-radius: 5px; background: var(--panel); }
.task-thumb img { width: 100%; height: 100%; object-fit: cover; }
.task-thumb i { width: 12px; height: 12px; border: 1px solid var(--faint); border-radius: 3px; }
.task-info { flex: 1; min-width: 0; }
.task-info strong, .task-info small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-info strong { font-size: .875rem; }
.task-info small { color: var(--faint); font-size: .75rem; }

.docs-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: var(--gap); align-items: start; }
.docs-nav { display: grid; gap: 5px; padding: 8px; }
.docs-nav button { min-height: 39px; padding: 5px 10px; border: 0; border-radius: 6px; background: transparent; text-align: left; font-size: .9rem; }
.docs-nav button[aria-current='page'], .docs-nav button:hover { background: var(--brand-soft); color: var(--brand); }
.docs-card { padding: 20px; }
.docs-card p { margin: 9px 0 15px; color: var(--dim); }
.method { display: inline-flex; margin-bottom: 8px; padding: 4px 7px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); font-size: .84rem; }

.gateway-shell { display: grid; grid-template-columns: 205px minmax(0, 1fr); min-height: calc(100vh - 43px); }
.gateway-sidebar { border-right: 1px solid var(--edge); background: var(--head); padding: 18px; }
.gateway-sidebar small { display: block; margin: 35px 0 6px; color: var(--faint); }
.gateway-nav { display: flex; align-items: center; gap: .55rem; padding: 8px 10px; border-radius: calc(var(--radius) - 7px); background: var(--brand-soft); color: var(--brand); font-size: .9375rem; font-weight: 680; }
.gateway-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; padding: 10px 25px; background: var(--head); border-bottom: 1px solid var(--edge); }
.gateway-intro { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: 20px; margin: 25px; }
.gateway-intro img { border: 1px solid var(--edge); border-radius: var(--radius); height: auto; box-shadow: var(--shadow); }
.gateway-intro .primary { margin-top: 14px; }
.login-dialog { width: min(355px, calc(100% - 32px)); padding: 19px; color: var(--text); }
.login-dialog::backdrop { background: #090807aa; }
.login-dialog p.helper { margin: 6px 0 12px; }
.login-dialog .voice-actions { margin-top: 9px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; padding: 0; margin: -1px; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; z-index: 9; top: 7px; left: 7px; transform: translateY(-200%); padding: 5px 9px; border-radius: 6px; background: var(--brand); color: var(--brand-on); }
.skip-link:focus { transform: none; }

@media (max-width: 1050px) {
  .container { width: calc(100% - 42px); }
  .workspace { grid-template-columns: minmax(318px, .7fr) minmax(0, 1fr); }
  .model code { display: none; }
  .gateway-shell { grid-template-columns: 166px minmax(0, 1fr); }
}
@media (max-width: 740px) {
  .container { width: calc(100% - 32px); }
  .review-inner { grid-template-columns: auto 1fr auto; }
  .review-heading span { display: none; }
  .theme-switch { justify-self: center; }
  .head-inner { grid-template-columns: 1fr 1fr; min-height: auto; }
  .brand, .wallet { padding-block: 10px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; gap: .75rem; }
  .main-nav a { min-height: 36px; padding-inline: .55rem; }
  .wallet { grid-column: 2; grid-row: 1; }
  .main-nav a { font-size: .875rem; }
  .page { padding-block: 22px 38px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 7px; margin-bottom: 16px; }
  .workspace { grid-template-columns: 1fr; gap: 14px; }
  .editor, .gallery { padding: 14px; }
  .gallery { scroll-margin-top: 12px; }
  .play { width: 49px; height: 49px; }
  .docs-layout { grid-template-columns: 1fr; gap: 12px; }
  .docs-nav { display: flex; flex-wrap: wrap; }
  .docs-card { padding: 14px; }
  .gateway-shell { grid-template-columns: 1fr; }
  .gateway-sidebar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 16px; border: 0; border-bottom: 1px solid var(--edge); }
  .gateway-sidebar small { display: none; }
  .gateway-head { display: none; }
  .gateway-intro { grid-template-columns: 1fr; margin: 16px; }
}
@media (max-width: 410px) {
  .container { width: calc(100% - 24px); }
  .review-inner { gap: 5px; grid-template-columns: 1fr auto; padding-block: 4px; }
  .review-inner .theme-switch { grid-row: 2; grid-column: 1 / -1; justify-self: start; }
  .review-inner > a { grid-column: 2; grid-row: 1; }
  .brand > span, #submit kbd { display: none; }
  .wallet div { flex-direction: column; align-items: end; gap: 0; }
  .clip-actions { gap: 3px; }
  .clip-actions .secondary { padding-inline: 6px; }
  .model code { display: none; }
  .request-config { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .stage-message > i { animation: none; } }
