@charset "UTF-8";

/* Modeling studio in the research homepage's Figure 3 style: white cards with light-blue
   outlines on a pale page, navy accents, Nunito text and JetBrains Mono for data and code. */

:root {
  --bg: #f5f8fc;
  --bg-rgb: 245 248 252;
  --surface: #ffffff;
  --ink: #1b2435;
  --ink-2: #3d495d;
  --mute: #6a778b;
  --line: #a9cbea;
  --line-soft: #dde7f2;
  --navy: #1e3f78;
  --blue: #3f7fd0;
  --red: #d63b2b;
  --green: #79c983;
  --tint: color-mix(in srgb, var(--blue) 7%, var(--surface));
  --success: #2f8a4c;
  --error: #d63b2b;
  --dim: #a3afc0;
  --code-bg: #1b2331;
  --code-ink: #e6edf6;
  --code-mute: #8b98ab;
  --shadow: 0 1px 0 rgba(255 255 255 / .9) inset, 0 14px 32px -18px rgba(29 53 87 / .32), 0 2px 6px -2px rgba(29 53 87 / .1);
  --shadow-lift: 0 1px 0 rgba(255 255 255 / .9) inset, 0 22px 40px -20px rgba(29 53 87 / .38), 0 3px 8px -2px rgba(29 53 87 / .12);
  --shadow-float: 0 30px 80px -28px rgba(29 53 87 / .45), 0 4px 14px -6px rgba(29 53 87 / .16);
  --solid-shadow: 0 14px 26px -14px rgba(30 63 120 / .8);
  --backdrop: rgba(27 36 53 / .3);
  --sans: Nunito, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --serif: "Times New Roman", "STIX Two Text", Times, serif;
  --radius: 22px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%233f7fd0' stroke-width='2'/%3E%3C/svg%3E");
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b1220;
  --bg-rgb: 11 18 32;
  --surface: #15223a;
  --ink: #e3ebf6;
  --ink-2: #b8c5d8;
  --mute: #8d9bb0;
  --line: #3f6797;
  --line-soft: #22324b;
  --navy: #a6c8ef;
  --blue: #6aa5ee;
  --red: #ff7a6b;
  --green: #4f9f62;
  --success: #7fd08f;
  --error: #ff7a6b;
  --dim: #56647a;
  --code-bg: #0e1627;
  --shadow: 0 1px 0 rgba(255 255 255 / .05) inset, 0 16px 36px -18px rgba(0 0 0 / .6);
  --shadow-lift: 0 1px 0 rgba(255 255 255 / .06) inset, 0 22px 44px -20px rgba(0 0 0 / .7);
  --shadow-float: 0 30px 80px -24px rgba(0 0 0 / .75);
  --solid-shadow: 0 14px 26px -16px rgba(0 0 0 / .8);
  --backdrop: rgba(3 7 15 / .62);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 500 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; color: inherit; }
button, a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: default; opacity: .42; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, dl, dd { margin: 0; }
input, select, textarea { outline: none; }
[hidden] { display: none !important; }
::selection { background: var(--blue); color: #fff; }
:focus-visible, summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
* { scrollbar-width: thin; scrollbar-color: var(--line-soft) transparent; }

.mono { font-family: var(--mono); }
.eyebrow { display: block; font: 500 11px/1.5 var(--mono); letter-spacing: .14em; color: var(--blue); }
.sr-only, .skip-link { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.skip-link:focus { z-index: 90; left: 12px; top: 12px; width: auto; height: auto; clip: auto; padding: 8px 14px; border-radius: 10px; background: var(--navy); color: var(--bg); font-weight: 800; }

/* Buttons shared across panels */
.icon-button {
  width: 38px; height: 38px; flex: none;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: inset 0 0 0 1.5px var(--line-soft);
  font-size: 18px; font-weight: 700; line-height: 1;
}
.icon-button:hover:not(:disabled) { color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line); }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.text-button {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 800; line-height: 1.5; color: var(--navy);
  text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1.5px; text-underline-offset: .3em;
  transition: text-decoration-color .2s;
}
.text-button:hover:not(:disabled) { text-decoration-color: var(--navy); }
.text-button[aria-disabled="true"] { pointer-events: none; opacity: .45; }
.setup-primary, .send-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  height: 44px; padding: 0 22px;
  border-radius: 14px;
  background: var(--navy); color: var(--bg);
  font-size: 14.5px; font-weight: 900;
  box-shadow: var(--solid-shadow);
}
.setup-primary:hover:not(:disabled), .send-button:hover:not(:disabled) { transform: translateY(-2px); }
.local-launch-button, .artifact-open-button, .key-configure, .setup-download,
#examples-toggle, #results-open, .setup-actions button:not(.setup-primary), .personal-key-input button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: 99px;
  background: var(--surface); color: var(--navy);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 13.5px; font-weight: 800; line-height: 1.2; white-space: nowrap;
  text-decoration: none;
}
.local-launch-button:hover:not(:disabled), .artifact-open-button:hover:not(:disabled), .key-configure:hover, .setup-download:hover,
#examples-toggle:hover, #results-open:hover, .setup-actions button:not(.setup-primary):hover:not(:disabled), .personal-key-input button:hover:not(:disabled) {
  box-shadow: inset 0 0 0 1.5px var(--navy);
}

/* Header */
.studio-header {
  position: relative; z-index: 10;
  height: 68px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 24px;
}
.studio-brand { display: inline-flex; align-items: center; gap: 10px; margin-left: 4px; white-space: nowrap; font-size: 16px; font-weight: 900; letter-spacing: .01em; color: var(--navy); }
.studio-brand svg { width: 28px; height: 28px; flex: none; }
.studio-brand rect { fill: var(--navy); }
.studio-brand path { fill: none; stroke: var(--bg); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.connection-state {
  display: inline-flex; align-items: center; gap: 9px;
  height: 34px; padding: 0 14px 0 12px; margin-right: 4px;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1.5px var(--line-soft);
  font-size: 12.5px; font-weight: 800; color: var(--mute); white-space: nowrap;
}
.connection-state i { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--dim); }
.connection-state.online i { background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 18%, transparent); }
.connection-state.offline i { background: var(--error); box-shadow: 0 0 0 4px color-mix(in srgb, var(--error) 16%, transparent); }
.research-home {
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 18px; margin-left: 4px;
  border-radius: 99px;
  background: var(--navy); color: var(--bg);
  font-size: 14px; font-weight: 900; white-space: nowrap;
  box-shadow: 0 8px 18px -10px rgba(30 63 120 / .7);
  transition: transform .35s var(--spring);
}
.research-home:hover { transform: translateY(-2px); }
.mobile-only, .mobile-view-tabs { display: none; }

/* Workspace */
.workspace {
  height: calc(100% - 68px);
  max-width: 1760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 20px;
  min-height: 0;
  padding: 0 24px 24px;
  overflow: hidden;
}
.settings-panel, .conversation-panel {
  min-height: 0;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Sidebar */
.settings-panel { display: flex; flex-direction: column; padding: 22px 20px 20px; overflow-y: auto; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.setting-field { margin-bottom: 14px; }
.setting-field label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 800; color: var(--ink-2); }
select, input {
  width: 100%; max-width: 100%;
  height: 44px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink);
  font-size: 14px; font-weight: 700;
  transition: border-color .2s, box-shadow .2s;
}
select { padding-right: 38px; appearance: none; -webkit-appearance: none; background: var(--surface) var(--chevron) no-repeat right 14px center; cursor: pointer; }
select:focus-visible, input:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 16%, transparent); }
select option { color: var(--ink); background: var(--surface); }
input[readonly] { color: var(--mute); }
.model-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1.5px dashed var(--line-soft); }
.model-facts dt { font-size: 13px; font-weight: 700; color: var(--mute); }
.model-facts dd { display: flex; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 800; color: var(--ink); }
#model { font: 600 12.5px var(--mono); color: var(--navy); }
#key-status { padding: 1px 9px; border-radius: 99px; background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); font-size: 12px; font-weight: 800; }
.key-field .key-edit { font-size: 13px; }
.field-hint { margin-top: 8px; font-size: 12.5px; font-weight: 600; line-height: 1.65; color: var(--mute); }
.setup-link { width: fit-content; margin-top: 8px; text-align: left; }
.section-rule { flex: none; height: 0; margin: 18px 0; border-top: 1.5px dashed var(--line-soft); }
.files-heading { display: flex; align-items: center; justify-content: space-between; }
.files-heading h2, .sidebar-title { font-size: 15px; font-weight: 900; color: var(--navy); text-decoration: underline; text-decoration-thickness: .085em; text-underline-offset: .22em; }
.small-icon {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy); color: var(--bg);
  font-size: 17px; font-weight: 900; line-height: 1;
  transition: transform .35s var(--spring);
}
.small-icon:hover:not(:disabled) { transform: rotate(90deg); }
.file-list { display: grid; gap: 8px; margin-top: 12px; }
.file-list:empty { display: none; }
.file-row {
  display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 8px 6px 8px 8px;
  border: 1.5px solid var(--line-soft); border-radius: 14px;
  background: var(--bg);
  transition: border-color .2s;
}
.file-row:hover { border-color: var(--line); }
.file-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; }
.csv-icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); font: 600 10px var(--mono); color: var(--blue); }
.file-row.arriving { animation: arrive .32s cubic-bezier(.2, .75, .25, 1) both; }
.file-row.pending .csv-icon { box-shadow: none; border: 1.5px dashed var(--line); }
.file-info { min-width: 0; }
.file-info strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 12.5px var(--mono); color: var(--ink); }
.file-info small { display: block; font-size: 12px; font-weight: 700; color: var(--mute); }
.file-remove { flex: none; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: var(--mute); font-size: 18px; line-height: 1; }
.file-remove:hover:not(:disabled) { color: var(--red); background: color-mix(in srgb, var(--red) 9%, transparent); }
.drop-zone {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 12px; padding: 16px 12px;
  border: 2px dashed var(--green); border-radius: 18px;
  color: var(--ink-2); font-size: 13.5px; font-weight: 800;
  transition: background .2s, border-color .2s;
}
.drop-zone:hover, .drop-zone.dragging { background: color-mix(in srgb, var(--green) 10%, transparent); }
.sidebar-examples { margin-bottom: 18px; }
.sidebar-examples > summary { position: relative; display: block; padding-right: 28px; list-style: none; cursor: pointer; user-select: none; }
.sidebar-examples > summary::-webkit-details-marker { display: none; }
.sidebar-examples > summary::after { content: "+"; position: absolute; top: -2px; right: 2px; font-size: 20px; font-weight: 800; line-height: 1; color: var(--blue); text-decoration: none; transition: transform .3s var(--ease); }
.sidebar-examples[open] > summary::after { transform: rotate(45deg); }
.example-list { display: grid; gap: 2px; margin-top: 10px; }
.example-list button { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 12px; text-align: left; font-size: 14px; font-weight: 800; color: var(--ink-2); transition: background .2s, color .2s; }
.example-list button:hover:not(:disabled) { background: var(--bg); color: var(--navy); }
.example-symbol { min-width: 34px; font: 600 10.5px var(--mono); letter-spacing: .06em; color: var(--blue); }
.runtime-card { display: flex; align-items: flex-start; gap: 11px; margin-top: auto; padding: 14px 16px; border: 1.5px solid var(--line-soft); border-radius: 16px; background: var(--bg); }
.runtime-card > i { flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--dim); }
.runtime-card strong { display: block; font-size: 13.5px; font-weight: 900; color: var(--navy); }
.runtime-card p { margin-top: 3px; font-size: 12.5px; font-weight: 600; line-height: 1.6; color: var(--mute); overflow-wrap: anywhere; }
.runtime-card .setup-link { margin-top: 8px; font-size: 13px; }
.session-caption { margin-top: 12px; font: 500 11px var(--mono); letter-spacing: .04em; color: var(--mute); }
.session-caption:empty { display: none; }

/* Conversation */
.conversation-panel { position: relative; display: flex; flex-direction: column; min-width: 0; height: 100%; overflow: hidden; }
.conversation-heading { flex: none; display: flex; align-items: center; gap: 16px; padding: 20px 28px 16px; border-bottom: 1.5px dashed var(--line-soft); }
.conversation-heading h1 { margin: 6px 0 0; font-size: 24px; font-weight: 900; line-height: 1.2; letter-spacing: -.015em; color: var(--navy); text-decoration: underline; text-decoration-thickness: .075em; text-underline-offset: .22em; }
.conversation-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.conversation {
  flex: 1 1 0; min-height: 0;
  overflow-y: auto;
  padding: 24px clamp(20px, 3vw, 44px) 28px;
  scroll-padding-block: 20px 32px;
  scroll-behavior: auto;
}
.welcome { position: relative; max-width: 1080px; margin: 0 auto 24px; padding: 26px 28px 28px; border: 1.5px solid var(--line-soft); border-radius: var(--radius); background: var(--bg); }
.welcome-graphic { display: flex; align-items: center; margin-bottom: 18px; }
.welcome-graphic span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line), 0 4px 10px -6px rgba(29 53 87 / .3); font: italic 20px var(--serif); color: var(--navy); }
.welcome-graphic span:first-child { color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.welcome-graphic i { width: 26px; height: 2px; margin: 0 6px; border-radius: 2px; background: linear-gradient(90deg, var(--line), var(--blue)); }
.welcome-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.welcome h2 { margin-bottom: 8px; font-size: clamp(24px, 2.3vw, 32px); font-weight: 900; line-height: 1.2; letter-spacing: -.02em; color: var(--navy); }
.welcome > p { max-width: 620px; font-size: 15px; font-weight: 600; line-height: 1.7; color: var(--mute); }
#examples-hide { width: 34px; height: 34px; font-size: 20px; color: var(--navy); }
.example-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.example-card {
  min-width: 0;
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  padding: 14px 16px 15px;
  border: 1.5px solid var(--line); border-radius: 18px;
  background: var(--surface); color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
  transition: transform .4s var(--spring), box-shadow .3s, border-color .2s;
}
.example-card:hover:not(:disabled), .example-card.selected { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.example-card[aria-pressed="true"] { border-color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--navy), var(--shadow-lift); }
.example-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 2px; }
.example-card-badge { min-width: 0; display: flex; align-items: center; gap: 9px; }
.example-card-badge svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--navy); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.example-card-badge strong { font-size: 16.5px; font-weight: 900; line-height: 1.25; color: var(--navy); }
.example-card-top > b { flex: none; font: 600 10.5px var(--mono); letter-spacing: .1em; color: var(--blue); }
.example-card > small { font: 500 11.5px/1.5 var(--mono); color: var(--mute); }
.example-card-description { font-size: 13px; font-weight: 600; line-height: 1.55; color: var(--ink-2); }
.busy .example-card, .busy .example-list button { opacity: .45; pointer-events: none; }
.example-card[aria-pressed="true"]:disabled { opacity: 1; }
.examples-collapsed .welcome { padding: 16px 22px; }
.examples-collapsed .welcome h2 { margin-bottom: 0; font-size: 20px; }
.examples-collapsed .example-grid, .examples-collapsed .welcome-graphic, .examples-collapsed .welcome > p, .examples-collapsed #examples-hide { display: none; }

/* Messages and run progress */
.message { max-width: 1100px; margin: 0 auto 24px; overflow-wrap: anywhere; animation: arrive .25s ease both; }
.message-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font: 500 11px var(--mono); letter-spacing: .1em; color: var(--mute); }
.message-header i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; background: var(--navy); color: var(--bg); font: normal 800 11px var(--sans); }
.message-header i svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.message-user { max-width: min(820px, 92%); margin-right: 0; }
.message-user .message-header { justify-content: flex-end; }
.message-user .message-header i { background: var(--red); color: #fff; }
.message-body { min-width: 0; max-width: 100%; font-size: 15px; line-height: 1.8; color: var(--ink); overflow-wrap: anywhere; }
.message-user .message-body { padding: 14px 18px; border: 1.5px solid var(--line-soft); border-radius: 18px 6px 18px 18px; background: var(--tint); font-weight: 600; }
.message-assistant .message-body { padding-left: 2px; }
.message-body p + p { margin-top: 10px; }
.message-body ul, .message-body ol { margin: 8px 0; padding-left: 22px; }
.message-body code, .markdown code { padding: 1px 6px; border-radius: 6px; background: var(--tint); color: var(--navy); font: 500 .88em var(--mono); }
.message-body pre code, .markdown pre code { padding: 0; background: none; color: inherit; font-size: inherit; }
.run-process { max-width: 1100px; margin: 0 auto 26px; padding-left: 18px; border-left: 2px solid var(--line-soft); }
.stage-card { animation: arrive .25s ease both; }
.stage-heading { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 4px; border-radius: 12px; text-align: left; font-size: 14px; color: var(--ink); transition: background .2s; }
.stage-heading:hover { background: var(--tint); }
.stage-icon { flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line); font: 900 13px var(--sans); }
.stage-heading strong { font-weight: 800; color: var(--ink); }
.stage-state { font-size: 12.5px; font-weight: 800; color: var(--mute); white-space: nowrap; }
.stage-state.breath { color: var(--blue); }
.stage-state.breath b { display: inline-block; font-weight: inherit; transform-origin: 50% 80%; animation: letter-breathe 1.6s cubic-bezier(.45, 0, .3, 1) infinite; animation-delay: calc(var(--i) * .08s); }
.stage-toggle { margin-left: auto; font: 600 14px var(--mono); color: var(--blue); }
.stage-card:not(:has(.stage-more > :not(:empty))) .stage-toggle { visibility: hidden; }
.stage-card.running .stage-icon { animation: breathe 1.6s infinite; }
.stage-card.completed .stage-icon { box-shadow: none; color: var(--success); }
.stage-card.error .stage-icon { box-shadow: none; background: var(--error); color: #fff; font-size: 12px; }
.stage-card.error .stage-state { color: var(--error); }
.stage-more { margin: 0 0 6px 34px; }
.stage-detail, .stage-tools, .stage-token { white-space: pre-wrap; overflow-wrap: anywhere; }
.stage-detail { font-size: 12.5px; font-weight: 600; line-height: 1.65; color: var(--ink-2); }
.stage-tools { margin-top: 2px; font: 500 11px/1.7 var(--mono); color: var(--mute); }
.stage-token { margin-top: 4px; max-height: 180px; overflow: auto; font-size: 12.5px; line-height: 1.7; color: var(--mute); }
.stage-detail:empty, .stage-tools:empty, .stage-token:empty { display: none; }
.stage-output { margin: 6px 0 14px 34px; border: 1.5px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; animation: arrive .3s ease both; }
.output-heading { display: flex; align-items: center; gap: 12px; padding: 9px 12px 9px 16px; border-bottom: 1.5px solid var(--line-soft); }
.stage-output.collapsed .output-heading { border-bottom: 0; }
.stage-output.collapsed .output-body { display: none; }
.output-kind { font: 600 11px var(--mono); letter-spacing: .12em; color: var(--blue); }
.output-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.output-actions .text-button { font-size: 12.5px; }
.output-toggle { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font: 600 15px var(--mono); color: var(--navy); transition: background .2s; }
.output-toggle:hover { background: var(--tint); }
.output-body { padding: 14px 18px 16px; font-size: 14.5px; line-height: 1.75; }
.output-body .katex-display { overflow: auto hidden; padding: 6px 0; }
.output-body .code-view { max-height: 420px; margin: -14px -18px -16px; border-radius: 0; overflow: auto; }
.output-body .objective-value { font-size: clamp(30px, 3vw, 40px); margin-bottom: 14px; }

/* Composer */
.error-notice { flex: none; margin: 0 28px 12px; padding: 12px 16px; border: 1.5px solid color-mix(in srgb, var(--error) 45%, transparent); border-radius: 14px; background: color-mix(in srgb, var(--error) 7%, var(--surface)); color: var(--error); font-size: 13.5px; font-weight: 700; overflow-wrap: anywhere; }
.composer { position: relative; flex: none; margin: 0 28px 22px; padding: 14px 16px 12px 18px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 14%, transparent), var(--shadow); }
.composer textarea { display: block; width: 100%; min-height: 52px; max-height: 170px; padding: 0; border: 0; background: none; resize: none; outline: none; font-size: 15px; font-weight: 600; line-height: 1.7; }
.composer textarea::placeholder { color: var(--mute); opacity: .85; }
.composer-bottom { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.composer-hint { margin-right: auto; font-size: 12px; font-weight: 700; color: var(--mute); }
.send-button { height: 42px; padding: 0 18px; }
.send-button.is-pressed { transform: translateY(1px) scale(.95); filter: brightness(.9); }
.python-setup { width: min(470px, calc(100vw - 32px)); }
.python-setup::backdrop { background: color-mix(in srgb, var(--bg) 42%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.python-setup-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.python-setup-status { min-height: 1.7em; font: 600 12px/1.7 var(--mono); color: var(--mute); overflow-wrap: anywhere; }
.python-setup-status.loading { color: var(--blue); }
.python-setup-status.loading b { display: inline-block; font-weight: inherit; transform-origin: 50% 80%; animation: letter-breathe 1.6s cubic-bezier(.45, 0, .3, 1) infinite; animation-delay: calc(var(--i) * .08s); }
.python-setup-status.ready { color: var(--success); }
.python-setup-status.failed { color: var(--error); }
.message-ghost { position: fixed; z-index: 40; margin: 0; pointer-events: none; animation: none; }
.cancel-button { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 14px; background: var(--surface); color: var(--error); box-shadow: inset 0 0 0 1.5px var(--error); font-size: 14px; font-weight: 800; }

/* Results drawer */
.inspector-panel {
  position: fixed; z-index: 45; inset: 16px 16px 16px auto;
  width: min(660px, 56vw);
  display: none; flex-direction: column;
  min-width: 0; min-height: 0; overflow: hidden;
  padding: 24px 26px 0;
  border: 1.5px solid var(--line); border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-float);
}
.inspector-heading { flex: none; display: flex; align-items: flex-start; gap: 12px; }
.inspector-heading h2 { margin-top: 6px; font-size: 24px; font-weight: 900; line-height: 1.2; color: var(--navy); text-decoration: underline; text-decoration-thickness: .075em; text-underline-offset: .22em; }
.artifact-indicator { margin: 4px 0 0 auto; padding: 4px 11px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--line); font: 600 11.5px var(--mono); color: var(--blue); }
.version-label { flex: none; margin: 20px 0 8px; font-size: 12.5px; font-weight: 800; color: var(--mute); }
.inspector-panel select { flex: none; font: 500 13px var(--mono); }
.artifact-tabs, .setup-provider-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.artifact-tabs { flex: none; margin-top: 16px; }
.artifact-tabs button, .setup-provider-tabs button, .mobile-view-tabs button {
  height: 38px; padding: 0 16px;
  border-radius: 99px;
  background: var(--surface); color: var(--mute);
  box-shadow: inset 0 0 0 1.5px var(--line-soft);
  font-size: 14px; font-weight: 800;
  transition: color .2s, background .2s, box-shadow .2s;
}
.artifact-tabs button:hover, .setup-provider-tabs button:hover, .mobile-view-tabs button:hover { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.artifact-tabs button.selected, .setup-provider-tabs button[aria-pressed="true"], .mobile-view-tabs button.selected { background: var(--navy); color: var(--bg); box-shadow: 0 10px 20px -12px rgba(30 63 120 / .7); }
.artifact-toolbar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 0 12px; }
.artifact-toolbar > span { font: 500 11px var(--mono); letter-spacing: .14em; color: var(--blue); }
.artifact-toolbar > div { display: flex; gap: 16px; }
.artifact-content { flex: 1; min-width: 0; min-height: 0; overflow: auto; padding-bottom: 26px; font-size: 15px; line-height: 1.8; color: var(--ink); overflow-wrap: anywhere; }
.artifact-content .markdown > p + p { margin-top: 12px; }
.artifact-content .katex-display { overflow: auto; padding: 9px 0; font-size: 1em; }
.artifact-content .katex { font-size: 1.05em; }
.artifact-empty { min-height: 280px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px; text-align: center; font-size: 14px; font-weight: 600; color: var(--mute); }
.empty-symbol { margin-bottom: 14px; font: italic 44px var(--serif); color: var(--navy); opacity: .45; }
.artifact-empty p { max-width: 260px; line-height: 1.8; }
.code-view, .markdown pre, .message-body pre, .setup-command {
  max-width: 100%;
  margin: 6px 0 16px;
  overflow: auto; overscroll-behavior-x: contain;
  border-radius: 18px;
  background: var(--code-bg); color: var(--code-ink);
  font: 400 12.5px/1.8 var(--mono);
  white-space: pre;
}
.code-view, .markdown pre, .message-body pre { padding: 18px 20px; }
.code-view { min-height: 150px; margin: 0; }
.result-status-grid { margin: 0 0 6px; padding: 2px 16px; border: 1.5px solid var(--line-soft); border-radius: 16px; background: var(--bg); }
.result-status-row { display: grid; grid-template-columns: minmax(82px, .85fr) minmax(0, 1.4fr); align-items: center; gap: 12px; padding: 10px 0; }
.result-status-row + .result-status-row { border-top: 1.5px dashed var(--line-soft); }
.result-status-row dt { font-size: 13px; font-weight: 700; color: var(--mute); }
.result-status-row dd { text-align: right; font-size: 13px; font-weight: 800; line-height: 1.6; color: var(--ink); }
.result-status { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 99px; background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); font-size: 12.5px; font-weight: 800; }
.result-status.bad { background: color-mix(in srgb, var(--error) 11%, transparent); color: var(--error); }
.objective-label { margin-top: 22px; font: 500 11.5px var(--mono); letter-spacing: .1em; color: var(--mute); }
.objective-value { margin: 6px 0 22px; font-size: clamp(36px, 4vw, 52px); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; color: var(--red); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result-section { margin-top: 20px; padding-top: 16px; border-top: 1.5px dashed var(--line-soft); }
.result-section h3, .result-section > summary { margin-bottom: 10px; font: 500 11.5px var(--mono); letter-spacing: .12em; color: var(--blue); cursor: pointer; }
.result-scroll { max-height: 320px; overflow: auto; border: 1.5px solid var(--line-soft); border-radius: 14px; background: var(--bg); }
.result-table, .preview-table table, .markdown > table, .markdown-table { border-collapse: collapse; font: 500 12.5px/1.6 var(--mono); color: var(--ink); }
.result-table { width: 100%; }
.result-table th, .result-table td, .preview-table th, .preview-table td { padding: 8px 12px; border-bottom: 1px solid var(--line-soft); text-align: left; white-space: nowrap; }
.result-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.result-table th, .preview-table th { position: sticky; top: 0; background: var(--surface); color: var(--navy); font: 900 12.5px var(--sans); }
.result-log { max-height: 300px; overflow: auto; padding: 14px 16px; border: 1.5px solid var(--line-soft); border-radius: 14px; background: var(--bg); color: var(--ink-2); font: 400 12px/1.7 var(--mono); white-space: pre-wrap; }
.result-error { padding: 12px 16px; border-left: 3px solid var(--error); border-radius: 0 12px 12px 0; background: color-mix(in srgb, var(--error) 8%, transparent); color: var(--error); font-size: 13.5px; font-weight: 700; white-space: pre-wrap; }
.artifact-downloads { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.artifact-downloads a { padding: 7px 12px; border-radius: 99px; box-shadow: inset 0 0 0 1.5px var(--line); font: 500 12px var(--mono); color: var(--navy); }
.artifact-downloads a:hover { box-shadow: inset 0 0 0 1.5px var(--navy); }
#artifact-backdrop { position: fixed; z-index: 40; inset: 0; display: none; width: 100%; height: 100%; background: var(--backdrop); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.artifacts-open #artifact-backdrop:not([hidden]) { display: block; }
.artifacts-open .inspector-panel { display: flex; }

/* Markdown in messages and artifacts */
.markdown, .artifact-content { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6 { max-width: 100%; margin: 1.4em 0 .55em; font-weight: 900; line-height: 1.35; color: var(--navy); overflow-wrap: anywhere; }
.markdown h1 { font-size: 24px; letter-spacing: -.02em; }
.markdown h2 { font-size: 21px; letter-spacing: -.015em; }
.markdown h3 { font-size: 18px; }
.markdown h4 { font-size: 16px; }
.markdown h5 { font-size: 15px; }
.markdown h6 { font-size: 14px; color: var(--mute); }
.markdown > :is(h1, h2, h3, h4, h5, h6):first-child { margin-top: 0; }
.markdown ul, .markdown ol { padding-left: 22px; }
.markdown blockquote { max-width: 100%; margin: 16px 0; padding: 12px 16px; border-left: 3px solid var(--blue); border-radius: 0 12px 12px 0; background: var(--tint); color: var(--ink-2); overflow-wrap: anywhere; }
.markdown blockquote > :first-child { margin-top: 0; }
.markdown blockquote > :last-child { margin-bottom: 0; }
.markdown a { color: var(--navy); font-weight: 800; text-decoration: underline; text-decoration-color: var(--line); text-decoration-thickness: 1.5px; text-underline-offset: .25em; overflow-wrap: anywhere; }
.markdown a:hover { text-decoration-color: var(--navy); }
.markdown hr { height: 0; margin: 22px 0; border: 0; border-top: 1.5px dashed var(--line-soft); }
.markdown > table { display: block; width: max-content; min-width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.markdown > table th, .markdown > table td, .markdown-table th, .markdown-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; text-align: left; }
.markdown > table th, .markdown-table th { background: var(--bg); color: var(--navy); font: 900 12.5px var(--sans); }
.markdown-table-scroll { min-width: 0; max-width: 100%; overflow-x: auto; margin: 14px 0 20px; border: 1.5px solid var(--line-soft); border-radius: 14px; overscroll-behavior-x: contain; }
.markdown-table { margin: 0; min-width: 100%; width: max-content; }
.markdown-table tr:last-child td { border-bottom: 0; }
.markdown-table .katex { font-size: 1.05em; }
.message-body .markdown-table code { white-space: pre; }
.markdown .math-inline { min-width: 0; max-width: 100%; padding-block: 2px 3px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
.markdown .math-display, .markdown .katex-display { min-width: 0; max-width: 100%; margin-block: 12px; padding-block: 8px; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
.markdown .math-display > .katex-display { margin-block: 0; }
.markdown .katex-display > .katex { min-width: min-content; }
.math-error { color: var(--error); font-family: var(--mono); }

/* Dialogs */
dialog {
  width: min(820px, calc(100% - 40px));
  max-height: 86svh;
  margin: auto;
  padding: 28px;
  overflow: auto;
  border: 1.5px solid var(--line); border-radius: 24px;
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-float);
}
dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.preview-heading { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.preview-heading h2 { margin-top: 6px; font-size: 22px; font-weight: 900; line-height: 1.3; color: var(--navy); text-decoration: underline; text-decoration-thickness: .075em; text-underline-offset: .22em; overflow-wrap: anywhere; }
.preview-heading p:last-child:not(.eyebrow) { margin-top: 6px; font-size: 12.5px; font-weight: 700; color: var(--mute); }
.preview-table { max-height: 52vh; overflow: auto; border: 1.5px solid var(--line-soft); border-radius: 16px; background: var(--bg); }
.preview-table table { width: 100%; }
.personal-settings { width: min(540px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); }
.personal-settings .preview-heading { margin-bottom: 14px; }
.personal-key-field { margin-top: 20px; }
.personal-key-input { display: flex; align-items: stretch; gap: 8px; }
.personal-key-input input { flex: 1; min-width: 0; font: 500 13px var(--mono); }
.personal-key-input button { flex: none; height: 44px; min-width: 64px; border-radius: 12px; }
.personal-handoff-note { margin-top: 12px; padding: 11px 14px; border-left: 3px solid var(--blue); border-radius: 0 12px 12px 0; background: var(--tint); color: var(--ink-2); }
.personal-key-status { min-height: 1.7em; margin-top: 12px; font-size: 13px; font-weight: 700; line-height: 1.7; color: var(--mute); }
.personal-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 16px; border-top: 1.5px dashed var(--line-soft); }
.local-setup { width: min(660px, calc(100% - 28px)); max-height: 90svh; }
.local-setup .preview-heading { margin-bottom: 14px; }
.setup-provider-tabs { margin-bottom: 14px; }
.setup-summary { font-size: 15px; font-weight: 600; line-height: 1.75; color: var(--ink-2); overflow-wrap: anywhere; }
.setup-example { margin-top: 14px; padding: 11px 14px; border-left: 3px solid var(--red); border-radius: 0 12px 12px 0; background: var(--tint); font: 500 12.5px/1.7 var(--mono); color: var(--navy); }
.setup-steps { margin: 18px 0 0; padding-left: 22px; }
.setup-steps li { margin: 16px 0; padding-left: 4px; }
.setup-steps li::marker { font-weight: 900; color: var(--blue); }
.setup-steps strong, .setup-step > strong { font-size: 15px; font-weight: 900; color: var(--navy); }
.setup-steps p, .setup-step > p, .setup-execution p { margin: 6px 0; font-size: 13.5px; font-weight: 600; line-height: 1.75; color: var(--mute); }
.setup-steps a:not(.field-hint) { font-weight: 800; color: var(--navy); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: .25em; }
.setup-steps a.field-hint { display: inline-block; text-decoration: underline; text-decoration-color: var(--line-soft); text-underline-offset: .25em; }
.setup-command { position: relative; margin: 10px 0; }
.setup-command pre { margin: 0; padding: 14px 84px 14px 16px; white-space: pre-wrap; overflow-wrap: anywhere; font: 400 12.5px/1.9 var(--mono); }
.setup-command button { position: absolute; top: 10px; right: 10px; padding: 4px 12px; border-radius: 99px; background: rgba(255 255 255 / .1); color: var(--code-ink); font-size: 12px; font-weight: 800; }
.setup-command button:hover { background: rgba(255 255 255 / .18); }
.setup-step { margin-top: 18px; padding-top: 16px; border-top: 1.5px dashed var(--line-soft); }
.setup-download { margin: 8px 0 2px; height: 40px; border-radius: 12px; }
.key-configure { width: 100%; height: 46px; margin-top: 14px; justify-content: space-between; border-radius: 14px; }
.setup-status { margin-top: 18px; padding: 12px 14px; border: 1.5px solid var(--line-soft); border-radius: 14px; background: var(--bg); font-size: 13.5px; font-weight: 600; line-height: 1.75; color: var(--ink-2); white-space: pre-wrap; }
.setup-status:empty { display: none; }
.setup-status[data-ready="true"] { border-color: color-mix(in srgb, var(--success) 55%, transparent); color: var(--success); }
.setup-status[data-error="true"] { border-color: color-mix(in srgb, var(--error) 55%, transparent); color: var(--error); }
.setup-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 18px 0; }
.setup-actions button { height: 44px; border-radius: 14px; }
.setup-execution { margin: 16px 0 0; padding-top: 14px; border-top: 1.5px dashed var(--line-soft); }
.setup-execution summary { width: fit-content; font-size: 13.5px; font-weight: 800; color: var(--navy); cursor: pointer; }

/* Conversation history */
.history-drawer {
  position: fixed; inset: 0 auto 0 0;
  width: min(360px, 88vw); max-width: 88vw;
  height: 100dvh; max-height: 100dvh;
  margin: 0; padding: 24px 20px 18px;
  overflow: hidden;
  border-width: 0 1.5px 0 0; border-radius: 0 24px 24px 0;
}
.history-drawer[open] { display: flex; flex-direction: column; }
.history-drawer .preview-heading { flex: none; align-items: flex-start; gap: 14px; }
.history-drawer h2 { font-size: 24px; }
.new-session { flex: none; display: flex; align-items: center; gap: 10px; width: 100%; height: 48px; margin-bottom: 14px; padding: 0 18px; border-radius: 14px; background: var(--navy); color: var(--bg); font-size: 14.5px; font-weight: 900; text-align: left; box-shadow: var(--solid-shadow); }
.new-session > span:first-child { font-size: 18px; line-height: 1; }
#history-list { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding: 3px 3px 8px 1px; overscroll-behavior: contain; }
.history-item { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 14px; border: 1.5px solid var(--line-soft); border-radius: 14px; background: var(--bg); color: var(--ink); text-align: left; transition: border-color .2s, background .2s; }
.history-item:hover:not(:disabled) { border-color: var(--line); }
.history-item[aria-current="true"], .history-item[aria-pressed="true"], .history-item.selected { border-color: var(--navy); background: var(--surface); }
.history-title { grid-column: 1 / -1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 14px; font-weight: 800; line-height: 1.6; }
.history-date { font: 500 11px/1.7 var(--mono); color: var(--mute); }
.history-meta { font-size: 12.5px; font-weight: 600; line-height: 1.7; color: var(--mute); overflow-wrap: anywhere; }
.history-meta:empty { display: none; }
.history-empty { padding: 22px 12px; font-size: 13.5px; font-weight: 600; line-height: 1.8; color: var(--mute); }
#history-status { flex: none; padding-top: 12px; }
.history-footer { flex: none; margin-top: 12px; padding-top: 12px; border-top: 1.5px dashed var(--line-soft); }
#history-close, #inspector-close { flex: none; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 55; background: var(--backdrop); }
.toast { position: fixed; z-index: 90; left: 50%; bottom: 28px; max-width: min(90vw, 640px); padding: 11px 18px; border-radius: 16px; background: var(--navy); color: var(--bg); font-size: 13.5px; font-weight: 700; opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .3s, transform .4s var(--spring); }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* Motion: short, interruptible overlays; JavaScript owns the matching modal lifecycle. */
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes breathe { 50% { opacity: .35; } }
@keyframes letter-breathe {
  0%, 58%, 100% { transform: none; opacity: 1; }
  18% { transform: translateY(-2px) scale(1.14); opacity: .75; }
  32% { transform: translateY(.5px) scale(.97); }
  42% { transform: translateY(-.5px) scale(1.02); }
}
[data-motion] { will-change: opacity, transform; }
dialog[data-motion="closing"] { pointer-events: none; }
dialog[data-motion="opening"]::backdrop { animation: dialog-backdrop-in 180ms ease-out both; }
dialog[data-motion="closing"]::backdrop { animation: dialog-backdrop-out 140ms ease-in both; }
@keyframes dialog-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
.icon-button, .text-button, .send-button, .cancel-button, .setup-primary, .history-item, .local-launch-button, .artifact-open-button,
#examples-toggle, #results-open, .key-configure, .setup-download, .setup-actions button, .personal-key-input button {
  transition: background-color 140ms ease, box-shadow 140ms ease, color 140ms ease, opacity 140ms ease, transform .35s var(--spring), text-decoration-color .2s;
}
.icon-button:active:not(:disabled), .send-button:active:not(:disabled), .setup-primary:active:not(:disabled), .artifact-open-button:active:not(:disabled) { transform: translateY(1px); }

@media (min-width: 1600px) {
  .conversation-heading { padding-inline: 38px; }
  .conversation { padding-inline: 50px; }
  .composer, .error-notice { margin-inline: 38px; }
}
@media (max-width: 1180px) {
  .studio-header { padding-inline: 20px; }
  .workspace { gap: 16px; padding-inline: 16px; padding-bottom: 16px; grid-template-columns: 280px minmax(0, 1fr); }
  .conversation-heading { padding: 18px 22px 14px; }
  .conversation { padding: 22px 22px 28px; }
  .welcome { padding: 22px 22px 24px; }
  .example-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .composer, .error-notice { margin-inline: 22px; }
}
@media (max-width: 950px) {
  .studio-header { height: 60px; gap: 8px; padding-inline: 14px; }
  .connection-state { display: none; }
  .mobile-only { display: inline-grid; }
  .mobile-view-tabs { display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px 10px; }
  .mobile-view-tabs button { height: 36px; padding: 0 14px; font-size: 13.5px; }
  .workspace { display: block; height: calc(100% - 108px); padding: 0 12px 12px; }
  .conversation-panel { height: 100%; border-radius: 20px; }
  .conversation-heading { gap: 10px; padding: 16px 20px 12px; }
  .conversation-heading h1 { font-size: 21px; }
  .conversation { padding: 20px 20px 28px; }
  .settings-panel { position: fixed; z-index: 60; inset: 10px auto 10px 10px; display: none; width: min(330px, 88vw); padding: 22px 20px; border-radius: 22px; box-shadow: var(--shadow-float); }
  .settings-open .settings-panel { display: flex; }
  .inspector-panel { inset: 0; width: 100%; padding: 20px 22px 0; border: 0; border-radius: 0; }
  .composer, .error-notice { margin-inline: 16px; }
  .composer { margin-bottom: 16px; }
  #results-open { display: none; }
}
@media (max-width: 760px) {
  .research-home { display: none; }
}
@media (max-width: 600px) {
  .studio-header { gap: 6px; padding-inline: 10px; }
  .studio-header .icon-button { width: 34px; height: 34px; }
  .studio-brand { font-size: 15px; margin-left: 2px; }
  .studio-brand svg { width: 26px; height: 26px; }
  .header-actions { gap: 6px; }
  .local-launch-button { height: 34px; padding: 0 12px; font-size: 12.5px; }
  .workspace { padding: 0 8px 8px; }
  .conversation-panel { border-radius: 18px; }
  .conversation-heading { flex-wrap: wrap; padding: 14px 16px 12px; }
  .conversation-heading h1 { font-size: 19px; }
  #examples-toggle, #results-open { height: 34px; padding: 0 12px; font-size: 12.5px; }
  .conversation { padding: 16px 14px 28px; }
  .welcome { padding: 18px 16px 20px; border-radius: 18px; }
  .welcome h2 { font-size: 23px; }
  .welcome-heading { align-items: flex-start; gap: 10px; }
  .welcome-graphic { margin-bottom: 14px; }
  .example-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 18px; }
  .example-card { padding: 13px 14px; }
  .examples-collapsed .welcome { padding: 14px 16px; }
  .examples-collapsed .welcome h2 { font-size: 19px; }
  .composer { margin: 0 10px 12px; padding: 12px 12px 10px 14px; border-radius: 17px; }
  .composer-hint { visibility: hidden; }
  .error-notice { margin-inline: 10px; }
  .message-user { max-width: 96%; }
  .message-user .message-body { padding: 12px 15px; }
  .run-process { padding-left: 10px; }
  .stage-heading { gap: 8px; }
  .stage-more { margin-left: 30px; }
  .stage-output { margin-left: 0; border-radius: 16px; }
  .output-heading { padding-left: 13px; }
  .output-actions { gap: 10px; }
  .output-body { padding: 12px 14px 14px; }
  .output-body .code-view { margin: -12px -14px -14px; }
  .inspector-panel { padding: 18px 16px 0; }
  .inspector-heading h2 { font-size: 22px; }
  dialog { width: calc(100% - 20px); padding: 20px; border-radius: 20px; }
  .personal-settings { width: calc(100vw - 20px); }
  .preview-heading h2 { font-size: 20px; }
  .setup-actions { flex-wrap: wrap; }
  .setup-actions button { flex: 1; }
}
@media (max-width: 480px) {
  .studio-brand span { display: none; }
}
@media (max-width: 360px) {
  .studio-header .icon-button { width: 32px; height: 32px; }
  .local-launch-button { padding: 0 10px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  [data-motion] { will-change: auto; }
  dialog::backdrop { animation: none !important; }
  .example-card:hover, .example-card.selected, .icon-button:active, .send-button:active, .setup-primary:active, .artifact-open-button:active,
  .research-home:hover, .setup-primary:hover, .send-button:hover, .small-icon:hover { transform: none; }
}
