/* Workspace enhancements are scoped to the existing chat; site branding/layout remain intact. */
#view-chat .chat { height: min(780px, calc(100dvh - 130px)); min-height: 620px; }
#view-chat .convo { grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.workspace-header { padding: 18px 24px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.workspace-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.workspace-name { font-weight: 600; font-size: 15px; }
.model-status { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.model-status::before { content: ''; width: 6px; height: 6px; background: var(--muted); border-radius: 50%; }
.model-status[data-state="available"]::before { background: var(--good); }
.workspace-tabs { display: flex; gap: 20px; margin-top: 12px; }
.workspace-tabs button { border: 0; border-bottom: 2px solid transparent; background: none; padding: 10px 0; font-size: 13px; color: var(--muted); cursor: pointer; }
.workspace-tabs button[aria-selected="true"] { color: var(--fg); border-bottom-color: var(--accent); }
.workspace-account { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 12px; cursor: pointer; font-size: 12px; }
.workspace-notice { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.workspace-notice:empty { display: none; }
.workspace-notice button { background: none; border: 0; color: var(--accent); cursor: pointer; }
.session-search { width: 100%; min-width: 0; border: 1px solid var(--line); padding: 9px 10px; border-radius: 10px; background: var(--raise); color: var(--fg); font: inherit; font-size: 12px; }
.session-archive-toggle { border: 0; background: none; color: var(--muted); cursor: pointer; text-align: left; font-size: 12px; padding: 10px; }
.workspace-branches, .workspace-voice { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); padding-block: 8px; flex-wrap: wrap; }
.workspace-branches select, .workspace-voice select { max-width: 240px; min-width: 0; background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: 6px; font: inherit; }
.workspace-voice button { border: 0; background: none; color: var(--muted); cursor: pointer; min-height: 32px; }
.workspace-dialog { width: min(440px, calc(100% - 32px)); padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--raise); color: var(--fg); box-shadow: var(--shadow); }
.workspace-dialog::backdrop { background: rgba(0,0,0,.3); backdrop-filter: blur(3px); }
.workspace-dialog form, .workspace-dialog[open] { gap: 12px; }
.workspace-dialog form { display: grid; }
.workspace-dialog > * + * { margin-top: 12px; }
.workspace-dialog p { color: var(--body); font-size: 13px; }
.workspace-dialog input, .workspace-dialog select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--surface); color: var(--fg); font: inherit; }
.workspace-dialog button { padding: 10px; min-height: 40px; cursor: pointer; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); }
.workspace-dialog button.btn-primary { background: var(--fg); color: var(--bg); }
.message-actions { flex-wrap: wrap; }
.message-actions button { min-height: 36px; }
.workspace-panel { min-width: 0; overflow-y: auto; padding: 26px clamp(16px, 4vw, 48px); }
#view-chat .msgs { padding: 26px clamp(16px, 4vw, 48px); }
#view-chat .composer { padding-inline: clamp(16px, 4vw, 48px); }
.workspace-welcome { align-self: center; justify-self: center; width: 100%; max-width: 560px; display: grid; gap: 18px; padding-block: 30px; }
.workspace-welcome h2 { font-size: clamp(24px, 3vw, 34px); }
.workspace-welcome p { color: var(--body); }
.workspace-prompts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.workspace-prompts button { text-align: left; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 14px; cursor: pointer; font-size: 13px; }
.workspace-prompts button:hover { border-color: var(--accent); }
.workspace-empty { color: var(--muted); padding: 24px 0; }
.session-list { display: grid; gap: 4px; min-width: 0; }
.session-list button { width: 100%; }
.session-note { margin-top: 16px; padding: 0 10px; color: var(--muted); font-size: 11px; }
.session-actions { display: flex; gap: 8px; margin-top: 14px; padding: 0 10px; }
.session-actions button, .mobile-new { border: 0; background: none; color: var(--body); cursor: pointer; font-size: 12px; min-height: 36px; padding: 0; }
.session-actions button:disabled { opacity: .5; cursor: default; }
.session-mobile { display: none; gap: 8px; align-items: center; margin-top: 10px; }
.session-mobile select { min-width: 0; flex: 1; border: 1px solid var(--line); background: var(--surface); color: var(--fg); padding: 8px; border-radius: 8px; font: inherit; font-size: 12px; }
.message-error { border-left: 2px solid var(--bad); padding-left: 12px; }
.message-state { color: var(--muted); font-size: 11px; }
.message-actions { display: flex; gap: 12px; }
.message-actions button { border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 4px 0; }
.activity-group { display: grid; gap: 10px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.activity-group h3 { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.workspace-waitlist { font-size: 12px; color: var(--muted); }
.workspace-waitlist summary { cursor: pointer; }
.workspace-waitlist form { margin-top: 12px; }
#view-chat .msg { min-width: 0; width: 100%; }
#view-chat .msg.user { width: auto; }
#view-chat .body { overflow-wrap: anywhere; }
#view-chat .body ul, #view-chat .body ol { margin: 0; padding-left: 24px; }
#view-chat .body h2 { font-size: 20px; margin: 8px 0; }
#view-chat .body h3 { font-size: 17px; margin: 8px 0; }
@media (max-width: 760px) {
  #view-chat .chat { min-height: 610px; height: min(760px, calc(100dvh - 110px)); }
  .workspace-header { padding: 14px 16px 0; }
  .session-mobile { display: flex; }
  .workspace-prompts { grid-template-columns: 1fr; }
  .workspace-welcome { padding-block: 16px; }
  .workspace-top { gap: 6px; }
  .workspace-tabs { margin-top: 4px; }
}

/* Additions stay scoped; the existing homepage and moving themes remain intact. */
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: 64px; }
.product-card, .auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: grid; gap: 18px; }
.product-card h2 { font-size: 25px; }
.product-card p { color: var(--body); }
.product-card .product-status { color: var(--muted); font-size: 12px; }
.product-card button { align-self: end; justify-self: start; }
.auth-card { max-width: 480px; margin-bottom: 64px; }
.auth-card[hidden] { display: none; }
.auth-card input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--bg); color: var(--fg); font: inherit; }
.auth-card button { min-height: 42px; cursor: pointer; border: 1px solid var(--line); border-radius: 999px; padding: 10px 18px; background: var(--bg); color: var(--fg); font: inherit; }
.auth-card button.btn-primary { background: var(--fg); color: var(--bg); }
.auth-card p { overflow-wrap: anywhere; }
@media (min-width: 821px) and (max-width: 1100px) { .nav-links button { padding-inline: 8px; font-size: 12px; } }
@media (max-width: 760px) { .product-grid { grid-template-columns: 1fr; } .auth-card { padding: 22px; } }

.nav-links a { background: none; border: 0; cursor: pointer; padding: 8px 14px; border-radius: 999px; color: var(--body); font-size: 14px; font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; }
.nav-links a:hover { color: var(--fg); background: var(--surface); }
a.brand { text-decoration: none; color: inherit; }
.shell-foot { padding: 28px 0 48px; color: var(--muted); font-size: 13px; }
.shell-foot a { color: inherit; }
