:root {
  color-scheme: light;
  --ink: #192c27;
  --muted: #748079;
  --line: #dfe5df;
  --paper: #f6f7f2;
  --white: #fff;
  --forest: #173d35;
  --lime: #c6db8a;
  --coral: #e68168;
  --mono: "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Avenir Next", "Trebuchet MS", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --row-icon: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); font-family: var(--sans); background: var(--paper); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid #e68168; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.wordmark { display: inline-flex; align-items: center; gap: 9px; color: inherit; text-decoration: none; font-weight: 700; font-size: 16px; }
.wordmark > span:last-child { margin-left: 4px; color: #91a098; font: 10px var(--mono); letter-spacing: 0; }
.wordmark-mark { display: inline-grid; width: 26px; height: 26px; place-items: center; background: var(--lime); color: var(--forest); font: 500 15px var(--serif); }
.eyebrow { margin: 0; color: #8a968f; font: 10px var(--mono); letter-spacing: 0; }

.login-page { min-height: 100vh; background: var(--forest); color: #f5f5e9; overflow: hidden; }
.login-shell { position: relative; min-height: 100vh; padding: 30px 5vw; display: flex; flex-direction: column; background: radial-gradient(ellipse at 85% 25%, rgba(198,219,138,.12), transparent 28%), repeating-linear-gradient(135deg, transparent 0 62px, rgba(255,255,255,.025) 63px 64px); }
.login-shell .wordmark-mark { background: var(--coral); color: #203e33; }
.login-content { width: min(620px, 100%); margin: auto; padding: 60px 0 100px 8vw; animation: arrive .65s ease-out both; }
.login-content .eyebrow { color: var(--lime); }
.login-content h1 { margin: 22px 0 20px; font: 400 clamp(50px, 6vw, 78px)/.98 var(--serif); }
.login-copy { max-width: 390px; color: #c2cec4; font-size: 16px; line-height: 1.7; }
.login-form { margin-top: 42px; max-width: 440px; }
.login-form label { display: block; margin-bottom: 9px; color: #d6ded4; font-size: 12px; }
.email-row { display: flex; border-bottom: 1px solid #a9b7aa; }
.email-row input { min-width: 0; flex: 1; padding: 13px 0; border: 0; background: transparent; color: white; font-size: 16px; }
.email-row input::placeholder { color: #84948a; }
.email-row button { display: flex; align-items: center; gap: 22px; border: 0; background: transparent; color: var(--lime); font-size: 13px; }
.email-row button span:last-child { font-size: 20px; }
.email-row button:disabled { opacity: .5; cursor: wait; }
.form-status { min-height: 22px; color: var(--lime); font-size: 12px; }
.privacy-note { margin-top: 46px; color: #aebbb0; font-size: 12px; }
.privacy-note span { margin-right: 8px; color: var(--coral); }
.login-foot { display: flex; justify-content: space-between; color: #82968a; font: 9px var(--mono); }

.workspace-page { height: 100vh; height: 100dvh; overflow: hidden; display: grid; grid-template-rows: 58px minmax(0, 1fr); background: var(--paper); }
.topbar { height: 58px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: 0 var(--space-5); background: var(--forest); color: #f6f5e9; }
.topbar-end { display: flex; align-items: center; gap: var(--space-4); }
.topbar-state { display: flex; align-items: center; gap: 9px; color: #c4d0c6; font-size: 11px; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: #e4a080; }
.connection-dot.is-online { background: var(--lime); }
.topbar-divider { height: 14px; margin: 0 5px; border-left: 1px solid #547068; }
.icon-button { width: 40px; height: 40px; flex: none; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); background: transparent; color: inherit; line-height: 1; }
.icon-button svg { display: block; width: 20px; height: 20px; }
.icon-button:hover:not(:disabled) { background: rgba(255,255,255,.08); }
.icon-button:active:not(:disabled) { transform: translateY(1px); }
.icon-button:disabled { opacity: .45; cursor: not-allowed; }
.topbar .icon-button { border-color: #557169; }
.topbar-start { display: flex; align-items: center; gap: 18px; min-width: 0; }
.back-link { color: #d9e3d7; font-size: 12px; text-decoration: none; padding: 6px 10px; border: 1px solid #557169; }
.back-link:hover { color: #fff; border-color: #8aa596; }
.app-title-block { display: grid; grid-template-columns: minmax(0, auto) auto; align-items: end; column-gap: 8px; min-width: 0; }
.app-title-block .eyebrow { grid-column: 1 / -1; }
.app-title-block h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rename-button { width: 28px; height: 28px; margin-bottom: 2px; border: 1px solid transparent; background: transparent; color: #66736b; font-size: 14px; }
.rename-button:hover { border-color: var(--line); }
.app-title-input { min-width: 0; margin-top: 8px; padding: 2px 6px; border: 1px solid #9aab9f; background: #fff; color: var(--ink); font: 400 24px var(--serif); }
.primary-button { padding: 10px 16px; border: 0; background: var(--forest); color: #fff; font-size: 13px; }
.primary-button:disabled { opacity: .55; cursor: not-allowed; }
.danger-button { padding: 10px 16px; border: 0; background: #a44d3c; color: #fff; font-size: 13px; }
.danger-text { color: #a44d3c; }

.apps-page { min-height: 100vh; background: var(--paper); }
.apps-shell { width: min(1080px, 100%); margin: 0 auto; padding: 40px 24px 60px; }
.apps-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.apps-heading h1 { margin: 8px 0 6px; font: 400 38px var(--serif); }
.apps-intro { max-width: 520px; margin: 0; color: #5d6a62; font-size: 13px; line-height: 1.6; }
.apps-status { margin: 22px 0 14px; color: #66736b; font: 10px var(--mono); }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.app-card { display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--white); animation: arrive .25s ease-out both; }
.app-card-link { flex: 1; display: grid; align-content: start; gap: 8px; padding: 18px 18px 14px; color: inherit; text-decoration: none; }
.app-card-link:hover h2 { text-decoration: underline; text-underline-offset: 3px; }
.app-card h2 { margin: 0; font: 400 22px/1.2 var(--serif); overflow-wrap: anywhere; }
.app-description { margin: 0; color: #5d6a62; font-size: 12px; line-height: 1.55; }
.app-meta { color: #66736b; font: 10px var(--mono); }
.app-state { justify-self: start; padding: 3px 7px; background: #e8ece3; color: #45564e; font: 9px var(--mono); text-transform: uppercase; }
.app-card[data-state="ready"] .app-state { background: #e1ecd0; color: #2f5a2a; }
.app-card[data-state="building"] .app-state { background: #f6e7c4; color: #6e4f10; }
.app-card[data-state="needs_input"] .app-state { background: #f1dccf; color: #7c3d2b; }
.app-card[data-state="failed"] .app-state { background: #f3d4cc; color: #8a3524; }
.app-card-actions { display: flex; gap: 8px; padding: 0 18px 16px; }
.apps-empty { padding: 26px 22px; border-left: 2px solid var(--coral); background: #eef0e8; }
.apps-empty p { max-width: 420px; margin: 14px 0 18px; font: 400 26px/1.2 var(--serif); }
.app-dialog { width: min(420px, calc(100vw - 32px)); padding: 22px; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.app-dialog::backdrop { background: rgba(23, 61, 53, .45); }
.app-dialog h2 { margin: 0 0 12px; font: 400 24px var(--serif); }
.app-dialog p { color: #46564e; font-size: 13px; line-height: 1.6; }
.app-dialog label { display: block; margin-bottom: 6px; font-size: 12px; }
.app-dialog input { width: 100%; padding: 9px 10px; border: 1px solid #9aab9f; }
.app-dialog .dialog-status { margin: 12px 0 0; color: #a44d3c; }
.app-dialog button:disabled { opacity: .55; cursor: wait; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.app-dialog .dialog-list { margin: 0; padding-left: var(--space-4); color: #46564e; font-size: 13px; line-height: 1.6; }
.version-list { display: grid; gap: var(--space-2); max-height: 50vh; margin: var(--space-3) 0 0; padding: 0; overflow-y: auto; border: 0; }
.version-option { display: grid; grid-template-columns: var(--row-icon) minmax(0, 1fr); column-gap: var(--space-2); align-items: start; padding: var(--space-2) var(--space-3); border: 1px solid var(--line); cursor: pointer; }
.version-option:has(input:checked) { border-color: var(--forest); background: #e7eedb; }
.version-option:has(input:disabled) { cursor: default; opacity: .7; }
.app-dialog .version-option input { width: auto; margin: 3px 0 0; padding: 0; }
.version-meta { display: grid; gap: 2px; min-width: 0; font-size: 12px; }
.version-meta strong { font-weight: 600; }
.version-meta span { overflow-wrap: anywhere; color: #5d6a62; }
.workbench { min-height: 0; display: grid; grid-template-columns: minmax(370px, .88fr) minmax(480px, 1.12fr); }
.view-toggle { display: none; }
.conversation { min-height: 0; display: flex; flex-direction: column; padding: 24px clamp(20px, 3.4vw, 54px) 18px; border-right: 1px solid var(--line); }
.conversation-heading { display: flex; align-items: center; justify-content: space-between; }
.conversation-heading h1 { margin: 8px 0 0; font: 400 29px var(--serif); }
.quiet-button { padding: 8px 10px; border: 1px solid var(--line); background: transparent; color: #45564e; font-size: 11px; }
.conversation-meta { display: flex; justify-content: space-between; padding: 16px 0 12px; margin-top: 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.branch-mark { color: #6a8b67; font-size: 9px; }
.branch-mark span { margin-left: 4px; color: #7c8981; font: 9px var(--mono); }
.timeline { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 6px 18px 2px; margin-bottom: 12px; }
.timeline:focus-visible { outline: 3px solid #e68168; outline-offset: -3px; }
.run-steps { margin: var(--space-2) 0; color: #4f6058; font-size: 11px; animation: arrive .2s ease-out both; }
.run-steps > summary, .step { display: grid; grid-template-columns: var(--row-icon) minmax(0, 1fr); column-gap: var(--space-2); align-items: baseline; }
.run-steps > summary { padding: var(--space-2) 0; cursor: pointer; list-style: none; }
.run-steps > summary::-webkit-details-marker { display: none; }
.run-steps > summary:focus-visible { outline: 3px solid #e68168; outline-offset: 2px; }
.run-steps-line, .step-line { display: flex; align-items: baseline; gap: var(--space-2); min-width: 0; }
.run-steps-title { flex: none; font-weight: 600; }
.run-steps-title::after { content: " ▸"; color: #7b877f; font-weight: 400; }
.run-steps[open] .run-steps-title::after { content: " ▾"; }
.run-steps-result, .step-summary { min-width: 0; overflow: hidden; color: #66736b; text-overflow: ellipsis; white-space: nowrap; }
.step-list { margin: 0 0 var(--space-1); padding: 0 0 0 calc(var(--row-icon) + var(--space-2)); border-left: 1px solid var(--line); margin-left: calc(var(--row-icon) / 2 - 1px); list-style: none; }
.step { padding: var(--space-1) 0; }
.step-label { flex: none; max-width: 60%; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.step-count { flex: none; color: #66736b; font: 10px var(--mono); }
.step > .asset-strip, .step > details { grid-column: 2; }
.step > details { margin-top: var(--space-1); color: #7a5a50; }
.step > details ul { margin: var(--space-1) 0 0; padding-left: var(--space-4); }
.row-icon { color: #4f7d43; font: 11px var(--mono); text-align: center; }
[data-status="running"] > .row-icon, [data-status="running"] > summary > .row-icon { color: #8a6514; animation: pulse 1.1s ease-in-out infinite; }
[data-status="failed"] > .row-icon, [data-status="failed"] > summary > .row-icon, [data-status="fail"] > details > summary > .row-icon { color: #a44d3c; }
[data-status="warn"] > details > summary > .row-icon { color: #8a6514; }
.timeline-notice { display: grid; grid-template-columns: var(--row-icon) minmax(0, 1fr); column-gap: var(--space-2); margin: var(--space-3) 0; padding: var(--space-2) var(--space-3); border-left: 2px solid var(--coral); background: #eef0e8; color: #46564e; font-size: 11px; line-height: 1.5; }
.asset-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.asset-strip img { width: 56px; height: 56px; object-fit: cover; border: 1px solid var(--line); background: #fff; }
.asset-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid var(--line); background: #fff; color: #4f6058; font-size: 10px; }
.asset-chip[data-status="failed"] { color: #a44d3c; }
.status-line { margin: 8px 0; color: #7c8981; font: 10px var(--mono); }
.status-line[data-tone="error"] { color: #a44d3c; }
.working-line { display: flex; align-items: center; gap: 9px; margin: 10px 0 4px; color: #42594d; font-size: 11px; }
.working-line::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d29a43; animation: pulse 1.1s ease-in-out infinite; }
.question-form { margin: 10px 0 6px; padding: 14px; border: 1px solid #d4dcd4; background: var(--white); font-size: 12px; }
.question-form fieldset { margin: 0 0 14px; padding: 0; border: 0; }
.question-form legend { margin-bottom: 7px; font-weight: 600; }
.question-options { display: flex; flex-wrap: wrap; gap: 6px; }
.question-options label { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid var(--line); background: #f6f7f2; cursor: pointer; }
.question-options label:has(input:checked) { border-color: var(--forest); background: #e7eedb; }
.question-form input[type="text"] { width: 100%; margin-top: 7px; padding: 7px 8px; border: 1px solid var(--line); background: #fbfbf8; }
.question-form button[type="submit"] { padding: 8px 12px; border: 0; background: var(--forest); color: #fff; font-size: 11px; }
.welcome-note { padding: 20px 18px; border-left: 2px solid var(--coral); background: #eef0e8; animation: arrive .45s ease-out both; }
.welcome-index { color: #89958c; font: 9px var(--mono); }
.welcome-note p { max-width: 330px; margin: 16px 0 8px; font: 400 25px/1.18 var(--serif); }
.welcome-note > span:last-child { color: #77837a; font-size: 11px; line-height: 1.6; }
.message { padding: 14px 0; border-bottom: 1px solid var(--line); animation: arrive .28s ease-out both; }
.message-byline { margin-bottom: 7px; color: #75827a; font: 9px var(--mono); }
.message-body { min-width: 0; overflow-wrap: anywhere; font-size: 13px; line-height: 1.65; }
.message-body > :first-child { margin-top: 0; }
.message-body > :last-child { margin-bottom: 0; }
.message-body p, .message-body ul, .message-body ol, .message-body blockquote, .message-body pre { margin: 0 0 10px; }
.message-body ul, .message-body ol { padding-left: 24px; }
.message-body li > p { margin-bottom: 4px; }
.message-body h1, .message-body h2, .message-body h3, .message-body h4, .message-body h5, .message-body h6 { margin: 14px 0 6px; font-size: 15px; line-height: 1.4; }
.message-body blockquote { padding-left: 12px; border-left: 2px solid var(--line); color: #66736b; }
.message-body code { font-family: var(--mono); font-size: 12px; background: #eef0e8; }
.message-body pre { max-width: 100%; overflow-x: auto; padding: 10px; background: #eef0e8; white-space: pre; overflow-wrap: normal; }
.message-body table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin-bottom: 10px; }
.message-body th, .message-body td { padding: 6px 10px; border: 1px solid var(--line); text-align: left; }
.message-body a { color: var(--forest); text-decoration: underline; }
.message-assistant { padding-left: 14px; border-left: 2px solid var(--lime); }
.message-edit { margin-top: var(--space-2); padding: var(--space-1) var(--space-2); border: 1px solid var(--line); background: var(--white); color: #45564e; font-size: 10px; }
.message-edit:hover { border-color: #9aab9f; }
.message-queued { margin-top: 6px; color: #8a6514; font: 9px var(--mono); }
.message[data-queued="delivered"] .message-queued { color: #66736b; }
.message[data-queued="pending"] p { color: #4f6058; }
.composer { flex: none; padding: 13px 14px 10px; border: 1px solid #d4dcd4; background: var(--white); }
.composer:focus-within { outline: 3px solid #e68168; outline-offset: 2px; }
.composer textarea { display: block; width: 100%; min-height: 64px; max-height: 30vh; resize: vertical; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; line-height: 1.55; }
.composer textarea:disabled { color: #89948b; cursor: not-allowed; }
.composer textarea::placeholder { color: #98a29b; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #66736b; font-size: 10px; }
.composer-bottom > span { min-width: 0; overflow-wrap: anywhere; }
.composer-bottom > div { display: flex; align-items: center; gap: 8px; }
.send-button { width: 32px; height: 32px; border: 0; background: var(--forest); color: white; font-size: 20px; }
.send-button:disabled { opacity: .5; cursor: wait; }
.send-button:disabled { background: #7e8c83; }
.stop-button { color: #a44d3c; }

.preview-column { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: var(--space-4) var(--space-5); }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); min-height: 40px; padding-bottom: var(--space-3); }
.preview-title { display: flex; align-items: center; gap: 9px; font: 10px var(--mono); }
.preview-indicator { width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.version-label { padding-left: 9px; border-left: 1px solid var(--line); color: #8a968f; font-size: 9px; }
.preview-actions { display: flex; gap: 8px; }
.preview-actions .icon-button { color: #617068; }
.preview-frame-shell { position: relative; flex: 1; min-height: 0; }
#preview-frame { display: block; width: 100%; height: 100%; border: 1px solid #dce2da; background: #fff; }
.preview-empty-state { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 24px; color: #66736b; font: 400 18px/1.5 var(--serif); text-align: center; pointer-events: none; }
.preview-empty-state[hidden] { display: none; }
.preview-footer { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; color: #66736b; font-size: 10px; }
.preview-footer > span { min-width: 0; overflow-wrap: anywhere; }
.validation-mark { margin-right: 6px; color: #89958c; }
.preview-footer button:disabled { opacity: .45; cursor: not-allowed; }
.accessibility-icon { display: grid; flex: none; width: 32px; height: 32px; place-items: center; background: var(--lime); font: 14px var(--serif); }
.a11y-panel { border-top: 1px solid var(--line); background: #edf0e9; }
.a11y-panel > summary { display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer; list-style: none; }
.a11y-panel > summary::-webkit-details-marker { display: none; }
.a11y-panel > summary::after { content: "▾"; color: #6d7b72; font-size: 12px; transition: transform .15s ease; }
.a11y-panel[open] > summary::after { transform: rotate(180deg); }
.a11y-panel > summary:focus-visible { outline: 3px solid #e68168; outline-offset: -3px; }
.a11y-panel[data-state="fail"] .accessibility-icon { background: #f1c2b5; }
.a11y-panel[data-state="warn"] .accessibility-icon { background: #f0dc9c; }
.a11y-summary-text { display: grid; gap: 3px; flex: 1; }
.a11y-summary-text strong { font-size: 11px; font-weight: 600; }
.a11y-summary-text span { color: #66736b; font-size: 10px; }
.a11y-status { color: #66736b; font: 10px var(--mono); }
.a11y-body { max-height: 38vh; overflow-y: auto; padding: 0 var(--space-3) var(--space-3); }
.a11y-list { margin: 0; padding: 0; list-style: none; }
.a11y-item { border-top: 1px solid #dde3da; }
.a11y-item summary { display: grid; grid-template-columns: var(--row-icon) minmax(0, 1fr) auto; column-gap: var(--space-2); align-items: baseline; padding: var(--space-2) 0; cursor: pointer; font-size: 11px; list-style: none; }
.a11y-item summary::-webkit-details-marker { display: none; }
.a11y-item summary::after { content: "▸"; color: #7b877f; }
.a11y-item details[open] summary::after { content: "▾"; }
.a11y-item summary:focus-visible { outline: 3px solid #e68168; outline-offset: 1px; }
.a11y-item-text { display: grid; gap: 2px; min-width: 0; }
.a11y-item-label { font-weight: 600; }
.a11y-item-summary { color: #5d6a62; }
.a11y-item-body { padding: 0 0 var(--space-3) calc(var(--row-icon) + var(--space-2)); color: #46564e; font-size: 11px; line-height: 1.55; }
.a11y-item-body p { margin: 0 0 6px; }
.a11y-item-heading { color: #66736b; font: 9px var(--mono); text-transform: uppercase; }
.a11y-evidence { margin: 0 0 8px; padding-left: 16px; font: 10px var(--mono); overflow-wrap: anywhere; }
.a11y-actions { padding-top: 8px; }
.a11y-note { margin: 8px 0 0; color: #66736b; font-size: 10px; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: min(420px, calc(100vw - 40px)); padding: 12px 16px; background: var(--forest); color: white; font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(8px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.player-page { height: 100vh; height: 100dvh; margin: 0; overflow: hidden; background: #fff; }
#app-frame { display: block; width: 100%; height: 100%; border: 0; }
.offline-workspace .workbench { grid-template-columns: minmax(0, 1fr); }
.offline-workspace .conversation { width: min(760px, 100%); margin: 0 auto; border: 0; }
.offline-notice { display: grid; gap: var(--space-2); margin-top: var(--space-5); padding: var(--space-4); border-left: 2px solid var(--coral); background: #eef0e8; color: #46564e; font-size: 13px; line-height: 1.6; }
.offline-notice strong { color: var(--ink); font-size: 16px; }
.offline-draft { display: block; width: 100%; min-height: 120px; margin-top: var(--space-4); padding: var(--space-3); border: 1px solid var(--line); background: var(--white); color: #46564e; font-size: 13px; line-height: 1.6; resize: vertical; }
.offline-draft:disabled { color: #46564e; cursor: not-allowed; opacity: 1; }
.offline-home { min-height: 100vh; }
.offline-home h1 { margin: var(--space-2) 0 var(--space-3); font: 400 38px var(--serif); }

@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 50% { opacity: .35; } }
@media (max-width: 900px) {
  .workbench { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .view-toggle { display: flex; gap: 0; padding: 8px 14px 0; }
  .view-toggle button { min-height: 48px; flex: 1; padding: 8px; border: 1px solid var(--line); background: transparent; color: #45564e; font-size: 12px; }
  .view-toggle button[aria-pressed="true"] { background: var(--forest); border-color: var(--forest); color: #fff; }
  .workbench[data-view="chat"] .preview-column, .workbench[data-view="preview"] .conversation { display: none; }
  .workbench:not([data-view]) { grid-template-rows: minmax(0, 1fr); }
  .workbench:not([data-view]) .preview-column { display: none; }
  .conversation { border-right: 0; padding: 14px 16px 12px; }
  .conversation-heading h1 { font-size: 23px; }
  .preview-column { padding: 12px 14px; }
  .a11y-body { max-height: 45vh; }
  .topbar { padding: 0 14px; }
  .back-link { padding: 5px 8px; }
  .apps-shell { padding: 26px 16px 40px; }
  .apps-heading h1 { font-size: 30px; }
  .topbar-state { font-size: 10px; }
  .icon-button { width: 48px; height: 48px; }
  .preview-toolbar { min-height: 48px; }
}
@media (max-width: 480px) {
  .login-shell { padding: 22px; }
  .login-content { padding: 50px 0 70px; }
  .login-content h1 { font-size: 54px; }
  .login-foot { font-size: 8px; }
  .wordmark > span:last-child { display: none; }
  .conversation-heading h1 { font-size: 25px; }
  .conversation { padding-inline: 16px; }
  .topbar { padding: 0 14px; }
  .topbar, .topbar-end { gap: var(--space-2); }
  .topbar-start { gap: 8px; }
  .back-link { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; }
  .back-link-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  .topbar-state { gap: 6px; }
  .topbar-state #connection-label { white-space: nowrap; }
  .composer-bottom { align-items: flex-end; }
  .composer-bottom > div { flex: none; }
  .preview-footer { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}