/* Product density and responsive layouts extend the shared brand foundation. */
body { background: var(--color-paper); }
.studio-skip { position: fixed; top: -80px; left: 16px; z-index: 100; background: white; padding: var(--space-3); border: 2px solid var(--ink); }
.studio-skip:focus { top: 8px; }
.topbar { height: 64px; min-height: 64px; padding: 0 var(--space-6); gap: var(--space-6); border-bottom: 1px solid var(--line); }
.wordmark { font-size: var(--text-20); gap: 10px; white-space: nowrap; }
.logo { width: 32px; height: 32px; border-radius: var(--radius-10); font-size: var(--text-caption); }
.studio-label { padding-left: var(--space-3); margin-left: 0; font-size: var(--text-caption); }
.top-actions { gap: var(--space-2); }
.top-actions button { font-size: var(--text-caption); padding: var(--space-2) var(--space-3); min-height: 36px; border-radius: 9px; }
.top-actions .rw-icon { width: 16px; height: 16px; }
.mode, .draft-label { border: 0; background: var(--color-paper); font-size: var(--text-caption); border-radius: var(--radius-6); padding: 5px var(--space-2); }
.command-trigger { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius-8); background: var(--surface-subtle); color: var(--muted); padding: var(--space-2) var(--space-3); width: min(320px, 26vw); margin-left: auto; font-size: var(--text-caption); }
.command-trigger .rw-icon { width: 16px; height: 16px; }
.command-trigger kbd { margin-left: auto; white-space: nowrap; }
kbd { padding: 2px var(--space-1); border: 1px solid var(--line); border-radius: var(--radius-4); font-family: inherit; font-size: var(--text-caption); line-height: 1.3; background: white; }
.quiet, .outline, .primary { min-height: 36px; border-radius: var(--radius-8); font-size: var(--text-caption); padding: var(--space-2) var(--space-3); }
.workspace, .workspace.chat-collapsed { display: grid; grid-template-columns: 196px minmax(0, 1fr) 292px; min-height: 0; height: calc(100dvh - 64px); padding: 0; gap: 0; }
.workspace.chat-collapsed { grid-template-columns: 196px minmax(0, 1fr); }
.workspace-sidebar { min-width: 0; display: flex; flex-direction: column; background: var(--surface-navigation); border-right: 1px solid var(--border-ui); padding: var(--space-6) var(--space-3) var(--space-4); overflow-y: auto; }
.sidebar-project { display: flex; align-items: center; gap: 10px; padding: 0 6px 26px; min-width: 0; }
.project-avatar { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border: 1px solid var(--border-control); background: white; color: var(--color-iron); border-radius: 9px; font-size: var(--text-caption); font-weight: 600; }
.sidebar-project > div { min-width: 0; }
.sidebar-project strong { display: block; font-size: var(--text-small); line-height: 1.4; overflow-wrap: anywhere; }
.sidebar-project small { display: block; color: var(--muted); font-size: var(--text-caption); margin-top: 3px; }
.sidebar-label { color: var(--color-steel); font-size: var(--text-caption); letter-spacing: .1em; font-weight: 600; margin: 0 10px 10px; }
.tabs { display: flex; flex-direction: column; gap: var(--space-1); padding: 0; border: 0; background: none; overflow: visible; }
.tabs button { padding: 11px var(--space-3); min-height: 42px; border: 1px solid transparent; border-radius: var(--radius-8); font-size: var(--text-caption); text-align: left; }
.tabs button .rw-icon { width: 17px; height: 17px; }
.tabs button:hover { background: var(--surface-selected); }
.tabs button.active { background: white; color: var(--color-graphite); border-color: var(--border-control); }
.tabs button[data-count]:not([data-count=""])::after { content: attr(data-count); margin-left: auto; background: var(--surface-selected); color: var(--color-steel); min-width: 20px; border-radius: var(--radius-4); padding: 2px 5px; font-size: var(--text-caption); text-align: center; }
.tabs button[data-ready=true]::after { content: ''; margin-left: auto; width: 6px; height: 6px; border-radius: var(--radius-round); background: var(--color-steel); }
.sidebar-insight { background: var(--color-cloud); border: 1px solid var(--border-ui); padding: 14px; border-radius: var(--radius-10); margin: var(--space-7) var(--space-1) var(--space-4); }
.sidebar-insight .sidebar-label { font-size: var(--text-caption); margin: 0; }
.sidebar-insight p { color: var(--color-iron); font-size: var(--text-caption); line-height: 1.6; margin: var(--space-2) 0 10px; }
.text-action { display: inline-flex; align-items: center; gap: var(--space-2); background: transparent; border: 0; color: var(--ink); font-size: var(--text-caption); font-weight: 600; padding: 6px 0; min-height: 32px; text-align: left; }
.text-action .rw-icon { width: 14px; height: 14px; }
.sidebar-bottom { margin-top: auto; padding: var(--space-3) 10px 0; border-top: 1px solid var(--border-ui); font-size: var(--text-caption); color: var(--color-steel); }
.sidebar-bottom p, .sidebar-bottom a { display: flex; align-items: center; gap: 6px; margin: var(--space-2) 0; line-height: 1.5; }
.sidebar-bottom a { min-height: 32px; }
.sidebar-bottom .rw-icon { width: 13px; height: 13px; }
.main-panel { height: 100%; border: 0; border-radius: 0; background: var(--surface-workspace); min-height: 0; }
.projectbar { min-height: 62px; padding: var(--space-3) var(--space-7); gap: var(--space-3); }
.projectbar > div { font-size: var(--text-small); gap: 10px; }
.project-dot { display: none; }
#project-name { max-width: none; font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
.chat-toggle { border: 1px solid var(--line); padding: 7px; min-width: 32px; min-height: 32px; }
.chat-toggle span { display: none; }
.chat-toggle .rw-icon { width: 16px; height: 16px; }
.workspace-progress { color: var(--muted); font-size: var(--text-caption); padding: 9px var(--space-7); background: var(--surface-workspace); border-bottom: 1px solid var(--surface-selected); }
#project-content { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; }
.tab-panel, .chat-collapsed .tab-panel { padding: var(--space-7); width: 100%; max-width: 1400px; margin: 0 auto; }
.section-heading, .tab-panel .section-heading { margin-bottom: var(--space-6); }
.section-heading .eyebrow, .tab-panel .section-heading .eyebrow { font-size: var(--text-caption); letter-spacing: .06em; margin-bottom: 10px; color: var(--color-steel); }
.section-heading .eyebrow .rw-icon { width: 13px; height: 13px; }
.section-heading h2, .tab-panel .section-heading h2 { font-size: var(--text-27); letter-spacing: -.035em; line-height: 1.2; margin-bottom: var(--space-2); }
.section-heading p:last-child { font-size: var(--text-caption); line-height: 1.6; max-width: 680px; }
.workspace-footer { padding: 10px var(--space-7); font-size: var(--text-caption); min-height: 34px; background: var(--surface-workspace); }
.workspace-footer .rw-icon { width: 12px; height: 12px; }
.chat-panel { position: static; height: 100%; width: 100%; padding: var(--space-6) var(--space-5) 14px; border: 0; border-left: 1px solid var(--border-ui); border-radius: 0; background: var(--surface-navigation); color: var(--ink); }
.chat-top .eyebrow { font-size: var(--text-caption); color: var(--color-steel); letter-spacing: .08em; }
.chat-top h2 { margin: 0 0 var(--space-3); line-height: 1.2; font-size: var(--text-23); color: var(--color-slate); letter-spacing: -.025em; }
.chat-top > p:last-child { font-size: var(--text-caption); color: var(--color-steel); }
.message { font-size: var(--text-caption); }
.message.assistant { color: var(--color-steel); }
.message-author { color: var(--color-steel); font-size: var(--text-caption); }
.message.user { background: white; color: var(--color-slate); border: 1px solid var(--border-ui); padding: var(--space-3); border-radius: var(--radius-10); margin-left: var(--space-3); }
.examples button { color: var(--color-steel); border: 1px solid var(--border-ui); border-radius: var(--radius-6); font-size: var(--text-caption); padding: 6px var(--space-2); min-height: 30px; background: white; }
.examples button:hover { background: var(--surface-selected); }
.composer { background: white; border: 1px solid var(--color-mist); border-radius: var(--radius-12); padding: var(--space-3); }
.composer textarea { color: var(--color-slate); font-size: var(--text-caption); }
.composer textarea::placeholder { color: var(--color-steel); }
.composer-bottom > span { font-size: var(--text-caption); color: var(--color-steel); flex: 1; min-width: 0; }
.composer-bottom .send { flex-shrink: 0; }
.send { background: var(--color-slate); color: white; border-color: var(--color-slate); min-height: 32px; padding: 6px var(--space-2); border-radius: var(--radius-7); font-size: var(--text-caption); }
.send:hover:enabled { background: var(--color-iron); }
.privacy-note { color: var(--color-steel); font-size: var(--text-caption); }
.project-dashboard { display: grid; grid-template-columns: 1.5fr 1fr; gap: var(--space-4); margin-bottom: var(--space-6); }
.dashboard-mission { padding: var(--space-6); border-radius: var(--radius-14); background: var(--color-slate); color: white; position: relative; overflow: hidden; }
.dashboard-mission::after { content: ''; position: absolute; right: -34px; top: -44px; width: 160px; height: 160px; border: 1px solid var(--color-iron); border-radius: var(--radius-round); pointer-events: none; }
.mission-heading { display: flex; justify-content: space-between; align-items: center; }
.mission-heading .rw-icon { width: 18px; height: 18px; color: var(--color-ash); }
.mission-tag { background: var(--badge-accent-soft); color: var(--color-slate); border-radius: var(--radius-4); padding: 5px 7px; font-size: var(--text-caption); letter-spacing: .08em; }
.dashboard-mission h3 { color: white; font-size: var(--text-24); letter-spacing: -.025em; margin: var(--space-5) 0 var(--space-2); overflow-wrap: anywhere; }
.dashboard-mission > p { font-size: var(--text-caption); line-height: 1.6; color: var(--text-muted-on-dark); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.mission-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--space-3); padding-top: var(--space-5); margin-top: var(--space-5); border-top: 1px solid var(--color-iron); }
.mission-stats strong { display: block; font-size: var(--text-21); font-weight: 500; }
.mission-stats span { font-size: var(--text-caption); color: var(--text-muted-on-dark); }
.dashboard-readiness { padding: var(--space-6); border: 1px solid var(--border-ui); border-radius: var(--radius-14); background: white; display: grid; grid-template-columns: 64px 1fr; align-content: center; gap: 18px; }
.brief-check-icon { width: 48px; height: 48px; border-radius: var(--radius-12); background: var(--surface-selected); display: grid; place-items: center; }
.dashboard-readiness .card-kicker { font-size: var(--text-caption); letter-spacing: .08em; }
.dashboard-readiness h3 { font-size: var(--text-ui); margin: var(--space-2) 0; }
.dashboard-readiness p { font-size: var(--text-caption); color: var(--color-steel); line-height: 1.6; margin: 0; }
.dashboard-readiness > .text-action { grid-column: 1/-1; border-top: 1px solid var(--color-cloud); padding-top: 14px; margin-top: var(--space-2); }
.overview-grid, .chat-collapsed .overview-grid { grid-template-columns: 1.4fr 1fr; gap: var(--space-4); }
.overview-card, .assumptions-card { border-radius: var(--radius-14); padding: var(--space-6); background: white; color: var(--ink); border: 1px solid var(--border-ui); }
.overview-card label { font-size: var(--text-caption); font-weight: 500; }
.overview-card input, .overview-card textarea, .overview-card select { padding: 10px var(--space-3); font-size: var(--text-caption); border: 1px solid var(--border-control); border-radius: var(--radius-8); margin-bottom: 18px; }
.overview-card textarea { min-height: 86px; }
.assumptions-card .card-kicker { color: var(--color-steel); font-size: var(--text-caption); letter-spacing: .06em; }
.assumptions-card h3 { color: var(--ink); font-size: 19px; margin: var(--space-3) 0 var(--space-5); }
.assumptions-card ul, .assumptions-card p { color: var(--color-steel); font-size: var(--text-caption); }
.assumptions-card li { margin: 10px 0; }
.discovery-check { border-color: var(--border-ui); font-size: var(--text-caption); padding-top: 18px; margin-top: var(--space-5); }
.discovery-check li { font-size: var(--text-caption); }
.next-row { position: static; background: transparent; padding: 18px 0 0; margin-top: var(--space-6); border-top: 1px solid var(--border-ui); display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 10px; }
#scope { display: block; height: auto; padding: var(--space-7); }
#scope .section-heading { margin-bottom: var(--space-6); }
#scope .section-heading .eyebrow { display: inline-flex; }
#scope .section-heading h2 { font-size: var(--text-27); margin-bottom: var(--space-2); }
.scope-toolbar { gap: var(--space-2); margin-bottom: var(--space-3); }
.scope-group-controls, .scope-layout-controls { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border-ui); border-radius: var(--radius-8); background: var(--surface-selected); }
.scope-group-controls button, .scope-layout-controls button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; background: transparent; border: 1px solid transparent; border-radius: 5px; font-size: var(--text-caption); padding: 6px var(--space-2); min-height: 32px; color: var(--color-steel); }
.scope-group-controls button.active, .scope-layout-controls button.active { color: var(--color-slate); background: white; border-color: var(--border-control); }
.scope-group-controls .rw-icon, .scope-layout-controls .rw-icon { width: 14px; height: 14px; }
.scope-history button { font-size: 0; padding: var(--space-2); min-height: 36px; }
.scope-history .rw-icon { width: 16px; height: 16px; }
.scope-search { gap: var(--space-2); }
.scope-search input { width: 180px; padding: 9px 10px; font-size: var(--text-caption); border: 1px solid var(--border-control); border-radius: var(--radius-8); }
.scope-viewbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin: var(--space-4) 0; }
.scope-viewbar label { font-size: var(--text-caption); color: var(--color-steel); display: flex; align-items: center; gap: var(--space-2); }
.scope-viewbar select { font-size: var(--text-caption); padding: 7px 10px; border: 1px solid var(--border-ui); border-radius: var(--radius-6); background: white; }
.scope-summary { font-size: var(--text-caption); margin: 0 auto 0 0; }
.scope-viewbar .quiet { font-size: var(--text-caption); padding: 6px; }
.scope-bulk { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); padding: var(--space-3); background: var(--surface-selected); border: 1px solid var(--color-mist); border-radius: var(--radius-10); margin-bottom: var(--space-3); }
.scope-bulk strong { font-size: var(--text-caption); margin-right: auto; }
#bulk-relationships { display: flex; gap: var(--space-2); }
.scope-bulk button { font-size: var(--text-caption); }
.feature-table, #scope .feature-table { max-height: 64vh; min-height: 0; border: 1px solid var(--border-ui); border-radius: var(--radius-12); overflow: auto; scrollbar-width: thin; background: white; }
.feature-header, .feature-row { grid-template-columns: 28px minmax(210px, 2.2fr) minmax(120px, 1fr) minmax(120px, 1fr) 72px 110px 70px; min-width: 900px; padding: 14px var(--space-4); gap: var(--space-3); }
.feature-header { position: sticky; top: 0; height: 44px; z-index: 3; font-size: var(--text-caption); background: var(--surface-subtle); padding-block: 10px; }
.feature-row { align-items: start; }
.feature-row:hover { background: var(--surface-workspace); }
.feature-row > input[type=checkbox], .feature-header input[type=checkbox] { width: 18px; height: 18px; padding: 0; margin: var(--space-2) 0 0; accent-color: var(--color-slate); }
.feature-header input[type=checkbox] { margin-top: 0; }
.feature-story { min-width: 0; }
.story-drag { display: inline-flex; float: left; padding: 5px; margin-right: 2px; color: var(--color-ash); touch-action: none; user-select: none; }
.story-drag .rw-icon { width: 14px; height: 14px; }
.story-drag[data-draggable=true] { cursor: grab; }
.feature-story .story-toggle { display: flex; align-items: flex-start; gap: 5px; width: calc(100% - 27px); font-size: var(--text-caption); font-weight: 600; text-align: left; line-height: 1.5; padding: var(--space-1) 0; min-height: 28px; border: 0; background: transparent; color: var(--color-slate); }
.story-toggle .rw-icon { flex: none; width: 13px; height: 13px; margin-top: 2px; }
.story-description { color: var(--color-steel); font-size: var(--text-caption); line-height: 1.5; margin: var(--space-1) 0 var(--space-2) 46px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-readiness { display: inline-block; margin-left: 46px; font-size: var(--text-caption); color: var(--color-steel); background: var(--surface-selected); border-radius: var(--radius-4); padding: 3px 6px; }
.story-readiness[data-defined=true] { color: var(--color-iron); background: var(--color-cloud); }
.story-notes { display: block; padding: 6px 0; min-height: 30px; border: 0; background: transparent; text-align: left; color: var(--color-steel); font-size: var(--text-caption); line-height: 1.6; }
.story-notes .rw-icon { width: 12px; height: 12px; margin-right: var(--space-1); }
.story-relationships { display: grid; gap: 6px; min-width: 0; }
.relationship-trigger { display: flex; gap: 6px; align-items: center; width: 100%; text-align: left; color: var(--color-steel); font-size: var(--text-caption); line-height: 1.5; padding: 7px var(--space-2); min-height: 32px; border: 1px solid var(--border-ui); background: white; border-radius: var(--radius-6); overflow-wrap: anywhere; }
.relationship-trigger .rw-icon { flex: none; width: 13px; height: 13px; }
.feature-row > .story-effort-field, .feature-row > .story-release-field { padding: 7px; font-size: var(--text-caption); border-radius: var(--radius-6); min-height: 32px; border-color: var(--border-ui); background: var(--surface-navigation); }
.feature-row > .story-release-field { background: var(--surface-selected); color: var(--color-iron); }
.feature-row[data-release=Post-MVP] > select { background: white; color: var(--color-steel); }
.feature-actions { gap: var(--space-1); }
.feature-actions button { padding: 5px; min-height: 30px; min-width: 30px; border-radius: 5px; color: var(--color-steel); }
.feature-actions .rw-icon { width: 13px; height: 13px; }
.scope-group-heading { position: sticky; top: 44px; z-index: 2; min-width: 900px; padding: 7px var(--space-4); background: var(--surface-selected); gap: 10px; }
.scope-group-heading button { font-size: var(--text-caption); padding: 5px; min-height: 30px; border-radius: 5px; }
.scope-group-heading > button:first-child { max-width: 65%; }
.group-effort { margin-left: auto; font-size: var(--text-caption); color: var(--color-steel); }
.scope-group-actions { gap: 2px; }
.scope-group-actions .rw-icon { width: 12px; height: 12px; }
.feature-row.drop-target { outline: 2px solid var(--color-fog); outline-offset: -2px; background: var(--surface-selected); }
.story-details { grid-column: 2/-1; display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); border: 1px solid var(--border-control); background: var(--surface-navigation); padding: 18px; border-radius: var(--radius-10); }
.story-details label { display: grid; gap: var(--space-2); font-size: var(--text-caption); color: var(--color-steel); }
.story-details input, .story-details textarea { font-size: var(--text-caption); line-height: 1.6; background: white; border: 1px solid var(--border-control); border-radius: var(--radius-7); padding: 10px; }
.story-details label:first-child { grid-column: 1/-1; }
.story-details .suggested-check { grid-column: 1/-1; justify-self: start; }
.story-identity { display: flex; gap: var(--space-4); grid-column: 1/-1; }
.story-identity > div { flex: 1; min-width: 0; }
.story-identity span { font-size: var(--text-caption); color: var(--color-steel); display: block; margin-bottom: var(--space-2); }
.relationship-popover { position: fixed; inset: auto; margin: 0; border: 1px solid var(--color-mist); border-radius: var(--radius-10); padding: 10px; background: white; color: var(--ink); max-height: min(360px,80vh); overflow: auto; }
.relationship-popover input { width: 100%; font-size: var(--text-caption); border: 1px solid var(--border-control); padding: 10px; border-radius: var(--radius-6); background: var(--surface-subtle); }
.relationship-popover [role=listbox] { max-height: 190px; overflow: auto; padding-top: 6px; }
.relationship-popover [role=option] { display: flex; gap: var(--space-2); align-items: center; width: 100%; border: 0; border-radius: var(--radius-6); padding: 9px; min-height: 36px; background: white; text-align: left; font-size: var(--text-caption); color: var(--color-iron); overflow-wrap: anywhere; }
.relationship-popover [role=option]:hover, .relationship-popover .highlighted { background: var(--surface-selected); }
.relationship-popover p { font-size: var(--text-caption); color: var(--color-steel); line-height: 1.5; }
.feature-table.board-view, #scope .feature-table.board-view { background: transparent; border: 0; max-height: none; overflow: visible; border-radius: 0; }
.board-view .feature-header { display: none; }
.board-view #features { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: var(--space-4); align-items: start; }
.board-view .scope-group { background: var(--surface-selected); border: 1px solid var(--border-ui); padding: var(--space-2); border-radius: var(--radius-12); min-width: 0; }
.board-view .scope-group-heading { position: static; min-width: 0; padding: var(--space-1) var(--space-1) var(--space-3); border: 0; flex-wrap: wrap; }
.board-view .scope-group-heading > button:first-child { max-width: 100%; font-size: var(--text-caption); }
.board-view .scope-group-actions { margin-left: auto; }
.board-view .scope-group-actions button:not(:last-child) { display: none; }
.board-view .group-effort { margin-left: var(--space-1); }
.board-view .feature-row { min-width: 0; display: grid; grid-template-columns: 24px minmax(0,1fr) 110px; gap: 10px; background: white; border: 1px solid var(--border-ui); border-radius: 9px; padding: 14px; margin-bottom: var(--space-2); }
.board-view .feature-row > input[type=checkbox] { grid-column: 1; grid-row: 1; }
.board-view .feature-story { grid-column: 2/-1; }
.board-view .story-notes, .board-view .story-relationships { grid-column: 2/-1; }
.board-view .story-relationships { display: flex; gap: 6px; }
.board-view .story-relationships > div { flex: 1; min-width: 0; }
.board-view .feature-row > .story-effort-field { grid-column: 2; grid-row: 4; max-width: 84px; }
.board-view .feature-row > .story-release-field { grid-column: 3; grid-row: 4; }
.board-view .feature-actions { grid-column: 2/-1; display: flex; justify-content: flex-end; padding-top: var(--space-2); border-top: 1px solid var(--surface-selected); }
.board-view .story-details { grid-column: 1/-1; grid-template-columns: 1fr; padding: var(--space-3); }
.board-view .story-drag { display: none; }
.board-view .feature-story .story-toggle { width: 100%; }
.board-view .story-description, .board-view .story-readiness { margin-left: 18px; }
.estimate-controls { display: flex; align-items: center; gap: var(--space-4); padding: 14px var(--space-4); margin-bottom: var(--space-5); background: var(--color-paper); border: 1px solid var(--border-ui); border-radius: var(--radius-10); }
.settings-label { color: var(--color-steel); font-size: var(--text-caption); margin-right: auto; }
.settings-label .rw-icon { width: 14px; height: 14px; }
.estimate-controls label { font-size: var(--text-caption); gap: 5px; }
.estimate-controls input { padding: 7px 9px; font-size: var(--text-caption); border: 1px solid var(--border-control); border-radius: var(--radius-6); width: 136px; min-height: 34px; }
.estimate-cards, .chat-collapsed .estimate-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--space-3); }
.estimate-cards article { padding: 22px; gap: 14px; border: 1px solid var(--border-ui); border-radius: var(--radius-12); background: white; }
.estimate-cards article:first-child { background: var(--color-slate); color: white; border-color: var(--color-slate); }
.estimate-cards small { font-size: var(--text-caption); color: var(--color-steel); }
.estimate-cards article:first-child small, .estimate-cards article:first-child span { color: var(--text-muted-on-dark); }
.estimate-cards strong { font-size: var(--text-30); letter-spacing: -.04em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.estimate-cards span { font-size: var(--text-caption); line-height: 1.5; }
.release-comparison { border: 1px solid var(--border-ui); border-radius: var(--radius-12); overflow: auto; background: white; margin-top: var(--space-4); }
.release-table { border-collapse: collapse; min-width: 460px; width: 100%; font-size: var(--text-caption); text-align: left; }
.release-table caption { font-size: var(--text-caption); color: var(--color-slate); text-align: left; padding: 14px var(--space-4); font-weight: 600; }
.release-table td, .release-table th { padding: 10px var(--space-4); border-top: 1px solid var(--surface-selected); font-weight: 400; }
.release-table thead { background: var(--surface-navigation); color: var(--color-steel); font-size: var(--text-caption); }
.release-table tr:last-child { background: var(--surface-navigation); }
.subhead { font-size: var(--text-body); letter-spacing: -.01em; margin: 26px 0 14px; }
.subhead .rw-icon { width: 16px; height: 16px; }
.effort-breakdown { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: var(--space-4); }
.effort-breakdown > div { border: 0; border-radius: 0; padding: 0; background: none; gap: 7px; }
.effort-breakdown span { font-size: var(--text-caption); }
.effort-breakdown strong { font-size: var(--text-caption); }
.discipline-track { height: 4px; border-radius: var(--radius-4); background: var(--color-cloud); overflow: hidden; display: block; margin-top: 2px; }
.discipline-track > span { display: block; height: 100%; background: var(--color-steel); border-radius: var(--radius-4); }
.estimate-review-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.estimate-review-toolbar input { border: 1px solid var(--border-control); border-radius: var(--radius-8); padding: 10px var(--space-3); background: white; font-size: var(--text-caption); width: 260px; max-width: 100%; }
.estimate-detail { border: 1px solid var(--border-ui); border-radius: var(--radius-10); overflow: auto; max-height: 54vh; background: white; scrollbar-width: thin; }
.estimate-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 700px; font-size: var(--text-caption); color: var(--color-steel); }
.estimate-table th, .estimate-table td { padding: var(--space-3); border-bottom: 1px solid var(--surface-selected); text-align: right; font-variant-numeric: tabular-nums; }
.estimate-table th:first-child { text-align: left; min-width: 220px; }
.estimate-table thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-subtle); font-size: var(--text-caption); font-weight: 400; }
.estimate-table th button { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; background: transparent; border: 0; padding: 0; color: var(--color-slate); text-align: left; font-size: var(--text-caption); font-weight: 500; line-height: 1.5; }
.estimate-table th small { display: block; font-size: var(--text-caption); margin-top: 2px; font-weight: 400; }
.estimate-group, .estimate-table tfoot { background: var(--color-paper); color: var(--color-iron); font-weight: 500; }
.estimate-note { font-size: var(--text-caption); line-height: 1.7; padding: var(--space-3) 0; margin: 0; }
.sequence-note { font-size: var(--text-caption); color: var(--color-steel); margin-top: -6px; }
.timeline { border-radius: var(--radius-10); border-color: var(--border-ui); }
.timeline-row { font-size: var(--text-caption); padding: var(--space-3) var(--space-4); grid-template-columns: 180px 1fr; }
.timeline-track, .timeline-bar { height: 14px; border-radius: var(--radius-4); }
.timeline-track { background: var(--surface-selected); }
.timeline-bar { background: var(--color-ash); border: 0; }
.review-handoff { border-radius: var(--radius-12); padding: var(--space-5); margin: var(--space-6) 0 var(--space-3); background: var(--color-paper); }
.review-handoff h3 { font-size: var(--text-body); margin-bottom: 6px; }
.review-handoff p { font-size: var(--text-caption); }
.review-actions { gap: var(--space-2); }
.preview-toolbar { flex-direction: row; align-items: center; }
.preview-stage { border-radius: var(--radius-12); padding: var(--space-2); background: var(--surface-selected); }
.preview-stage iframe { border-radius: var(--radius-8); }
.source-layout { border-radius: var(--radius-12); }
.source-layout nav { padding: var(--space-2); }
.source-layout button { border-radius: var(--radius-6); }
.alert { border: 0; border-bottom: 1px solid var(--border-ui); border-radius: 0; padding: 10px var(--space-7); margin: 0; background: var(--surface-selected); font-size: var(--text-caption); }
.run-activity, .run-activity.compact { border: 0; border-bottom: 1px solid var(--surface-selected); border-radius: 0; margin: 0; padding: 10px var(--space-7); background: white; }
.run-activity.compact { padding-block: 5px; }
.run-heading, .run-activity.compact strong { font-size: var(--text-caption); }
.run-heading > span { font-size: var(--text-caption); }
.run-heading .quiet { font-size: var(--text-caption); padding: var(--space-1) var(--space-2); min-height: 28px; }
.run-activity.compact .run-actions { display: none; }
.run-activity ol { gap: 10px; margin: var(--space-3) 0; }
.run-activity li { font-size: var(--text-caption); }
.run-activity p { font-size: var(--text-caption); }
.empty-state { padding: var(--space-12); width: 100%; overflow: auto; }
.empty-state h2 { font-size: clamp(32px,4vw,52px); }
.empty-state > p { font-size: var(--text-small); }
.starter-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--space-3); }
.starter-grid button { display: flex; padding: var(--space-5); border-radius: var(--radius-12); gap: var(--space-4); }
.starter-grid strong { font-size: var(--text-ui); }
.starter-grid button > span:last-child { font-size: var(--text-caption); }
.starter-grid .icon-badge { border-radius: var(--radius-10); }
dialog { padding: var(--space-6); border-radius: var(--radius-16); max-height: 90dvh; overflow: auto; }
dialog::backdrop { background: rgb(22 22 28 / .48); backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.dialog-heading h2 { margin: 0; font-size: var(--text-21); letter-spacing: -.025em; }
.dialog-heading .eyebrow { font-size: var(--text-caption); margin-bottom: 10px; }
.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 36px; height: 36px; background: white; border: 1px solid var(--border-ui); border-radius: var(--radius-7); flex: none; }
.icon-button .rw-icon { width: 16px; height: 16px; }
.command-dialog { width: min(560px, calc(100vw - 32px)); padding: var(--space-4); }
.command-dialog .dialog-heading { align-items: center; }
.command-dialog h2 { font-size: var(--text-body); }
#command-search { width: 100%; padding: var(--space-3); border-radius: var(--radius-8); border: 1px solid var(--color-mist); font-size: var(--text-small); }
.command-count { font-size: var(--text-caption); color: var(--color-steel); margin: var(--space-3) var(--space-1); }
#command-results { max-height: 380px; overflow: auto; }
.command-result { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; background: white; border: 0; border-radius: var(--radius-7); padding: var(--space-3); min-height: 56px; color: var(--color-iron); }
.command-result:hover, .command-result:focus { background: var(--surface-selected); }
.command-result > .rw-icon { width: 18px; height: 18px; flex: none; }
.command-result > .rw-icon:last-child { margin-left: auto; width: 12px; height: 12px; color: var(--color-ash); }
.command-result span { min-width: 0; }
.command-result strong { display: block; font-size: var(--text-caption); font-weight: 500; }
.command-result small { display: block; font-size: var(--text-caption); margin-top: var(--space-1); color: var(--color-steel); }
.command-help { display: flex; align-items: center; gap: var(--space-2); border-top: 1px solid var(--surface-selected); padding-top: var(--space-3); margin-bottom: 0; font-size: var(--text-caption); }
.share-dialog { width: min(600px, calc(100vw - 24px)); }
.share-intro { font-size: var(--text-caption); margin-top: 0; }
.share-card-preview { background: var(--color-slate); border-radius: var(--radius-12); overflow: hidden; }
.share-card-preview img { display: block; width: 100%; height: auto; }
.share-option { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: var(--space-3); font-size: var(--text-caption); }
.share-option input { width: 18px; height: 18px; accent-color: var(--color-slate); }
.share-note { font-size: var(--text-caption); color: var(--color-steel); line-height: 1.6; margin: var(--space-1) 0 14px; }
.share-actions { display: flex; gap: var(--space-2); }
#share-status { margin: var(--space-3) 0 0; }
.copy-fallback { margin-top: var(--space-3); width: 100%; min-height: 160px; padding: var(--space-3); font-size: var(--text-caption); border: 1px solid var(--border-control); border-radius: var(--radius-8); }
@media (max-width: 1180px) {
  .workspace { grid-template-columns: 172px minmax(0,1fr); }
  .workspace.chat-collapsed { grid-template-columns: 172px minmax(0,1fr); }
  .chat-panel { position: fixed; top: 64px; right: 0; bottom: 0; width: 320px; max-width: 100%; z-index: 8; height: auto; border-left: 1px solid var(--color-mist); box-shadow: -20px 0 40px rgb(22 22 28 / .06); }
  .command-trigger { width: 200px; }
  .command-trigger span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar { gap: var(--space-3); }
  .mode { display: none; }
  .project-dashboard { grid-template-columns: 1.4fr 1fr; }
  .settings-label { width: 100%; }
  .estimate-controls { flex-wrap: wrap; }
  .estimate-cards strong { font-size: var(--text-25); }
}
@media (max-width: 900px) {
  .project-dashboard { grid-template-columns: 1fr; }
  .dashboard-readiness { grid-template-columns: 64px 1fr; }
  .overview-grid, .chat-collapsed .overview-grid { grid-template-columns: 1fr; }
  .effort-breakdown { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .command-trigger { width: 36px; height: 36px; padding: 9px; flex: none; }
  .command-trigger span, .command-trigger kbd { display: none; }
  #new-project { font-size: 0; padding: var(--space-2); }
  .studio-label { display: none; }
  .scope-search { margin-left: 0; width: 100%; }
  .scope-search input { flex: 1; width: 0; }
}
@media (max-width: 760px) {
  .topbar { display: flex; height: 60px; min-height: 60px; padding: 0 var(--space-4); gap: var(--space-2); }
  .wordmark { font-size: var(--text-17); gap: var(--space-2); }
  .logo { width: 28px; height: 28px; border-radius: var(--radius-8); }
  .top-actions { display: flex; gap: 6px; }
  .top-actions #new-project, .top-actions #download { display: none; }
  .top-actions #share-project { font-size: 0; padding: var(--space-2); min-width: 36px; }
  .top-actions #share-project span { display: none; }
  .command-trigger { margin-left: auto; }
  .workspace, .workspace.chat-collapsed { display: flex; flex-direction: column; padding: 0; gap: 0; height: auto; min-height: calc(100dvh - 60px); }
  .workspace-sidebar { padding: 0; border: 0; border-bottom: 1px solid var(--border-ui); overflow: hidden; position: sticky; top: 0; z-index: 6; background: var(--surface-subtle); }
  .sidebar-project, .workspace-sidebar > .sidebar-label, .sidebar-insight, .sidebar-bottom { display: none; }
  .tabs { flex-direction: row; gap: var(--space-1); padding: var(--space-1) 10px; overflow-x: auto; scrollbar-width: none; }
  .tabs button { padding: 10px; min-height: 44px; font-size: var(--text-caption); border-radius: var(--radius-6); }
  .tabs button .rw-icon { width: 15px; height: 15px; }
  .tabs button::after { display: none; }
  .tabs button[data-tab=scope] > span:last-child { font-size: 0; }
  .tabs button[data-tab=scope] > span:last-child::after { content: 'Scope'; font-size: var(--text-caption); }
  .tabs button[data-tab=preview] > span:last-child { font-size: 0; }
  .tabs button[data-tab=preview] > span:last-child::after { content: 'Preview'; font-size: var(--text-caption); }
  .main-panel { height: auto; min-height: calc(100dvh - 112px); border-radius: 0; }
  .projectbar { min-height: 62px; padding: var(--space-3) var(--space-4); }
  .projectbar > div { gap: var(--space-2); }
  #project-name { font-size: var(--text-ui); }
  .projectbar .primary { min-height: 38px; font-size: var(--text-caption); padding: var(--space-2) 10px; }
  .projectbar .primary .rw-icon { width: 15px; height: 15px; }
  .chat-panel { top: 112px; bottom: 0; padding: var(--space-5); height: auto; width: min(340px, calc(100vw - 44px)); border-radius: var(--radius-12) 0 0 0; }
  .workspace-progress { padding: var(--space-2) var(--space-4); font-size: var(--text-caption); }
  #project-content { overflow: visible; }
  .tab-panel, .chat-collapsed .tab-panel, #scope { padding: var(--space-6) var(--space-4); }
  .section-heading h2, .tab-panel .section-heading h2, #scope .section-heading h2 { font-size: var(--text-25); }
  .section-heading .eyebrow { font-size: var(--text-caption); }
  .section-heading p:last-child, #scope .section-heading p:last-child { font-size: var(--text-caption); }
  .project-dashboard { gap: var(--space-3); margin-bottom: var(--space-4); }
  .dashboard-mission { padding: var(--space-5); }
  .dashboard-mission h3 { font-size: var(--text-22); }
  .dashboard-readiness { padding: var(--space-5); gap: var(--space-4); }
  .overview-card, .assumptions-card { padding: var(--space-5); border-radius: var(--radius-12); }
  .overview-card input, .overview-card textarea, .overview-card select { font-size: var(--text-ui); min-height: 44px; }
  .scope-toolbar { gap: var(--space-2); }
  .scope-group-controls { width: auto; }
  .scope-group-controls button { flex: 1; padding: 6px var(--space-2); font-size: var(--text-caption); }
  .scope-layout-controls { margin-right: auto; }
  .scope-layout-controls button { font-size: var(--text-caption); }
  .scope-layout-controls .rw-icon { display: none; }
  .scope-history { width: auto; gap: var(--space-1); }
  .scope-history button { min-height: 36px; padding: 6px; }
  .scope-search input { font-size: var(--text-small); min-height: 44px; }
  .scope-search .outline { min-height: 44px; }
  .scope-viewbar { gap: var(--space-2); }
  .scope-viewbar .scope-summary { width: 100%; order: 4; line-height: 1.6; }
  .scope-viewbar select, .scope-viewbar .quiet { min-height: 36px; }
  .scope-bulk strong { width: 100%; }
  #bulk-relationships { width: 100%; }
  #bulk-relationships > div { flex: 1; }
  .scope-bulk button { min-height: 36px; }
  .feature-table, #scope .feature-table { max-height: none; overflow: visible; background: transparent; border: 0; }
  .feature-header { height: 40px; min-width: 0; display: flex; gap: 10px; position: static; border-bottom: 1px solid var(--border-ui); margin-bottom: var(--space-3); padding: 0; background: none; }
  .feature-header::after { content: 'Select all matching stories'; font-size: var(--text-caption); color: var(--color-steel); }
  .feature-header > span { display: none; }
  .scope-group { background: var(--surface-selected); border: 1px solid var(--border-ui); padding: var(--space-2); border-radius: var(--radius-12); margin-bottom: var(--space-4); }
  .scope-group-heading { position: static; min-width: 0; padding: var(--space-1) var(--space-1) var(--space-3); border: 0; flex-wrap: wrap; gap: 6px; }
  .scope-group-heading > button:first-child { max-width: 100%; font-size: var(--text-caption); }
  .scope-group-actions { margin-left: auto; }
  .scope-group-actions button:not(:last-child) { display: none; }
  .group-effort { margin-left: var(--space-1); }
  .feature-row { min-width: 0; display: grid; grid-template-columns: 24px minmax(0,1fr) 110px; gap: 10px; border: 1px solid var(--border-ui); border-radius: 9px; padding: 14px; margin-bottom: var(--space-2); background: white; }
  .feature-row > input[type=checkbox] { grid-column: 1; grid-row: 1; }
  .feature-story { grid-column: 2/-1; }
  .story-notes, .story-relationships { grid-column: 2/-1; }
  .story-relationships { display: flex; gap: 6px; }
  .story-relationships > div { flex: 1; min-width: 0; }
  .feature-row > .story-effort-field { grid-column: 2; grid-row: 4; max-width: 84px; }
  .feature-row > .story-release-field { grid-column: 3; grid-row: 4; }
  .feature-actions { grid-column: 2/-1; display: flex; justify-content: flex-end; padding-top: var(--space-2); border-top: 1px solid var(--surface-selected); }
  .feature-actions button { min-height: 36px; min-width: 36px; }
  .feature-story .story-toggle { width: 100%; min-height: 36px; }
  .story-drag { display: none; }
  .story-description, .story-readiness { margin-left: 18px; }
  .relationship-trigger { min-height: 36px; font-size: var(--text-caption); }
  .story-details { grid-column: 1/-1; grid-template-columns: 1fr; padding: var(--space-3); }
  .story-details input, .story-details textarea { font-size: var(--text-ui); min-height: 44px; }
  .story-identity { flex-direction: column; gap: var(--space-3); }
  .board-view #features { grid-template-columns: 1fr; }
  .board-view .scope-group { margin-bottom: 0; }
  .estimate-controls { gap: var(--space-3); padding: 14px; }
  .estimate-controls label { flex: 1 1 120px; font-size: var(--text-caption); }
  .estimate-controls input { width: 100%; min-height: 40px; font-size: var(--text-small); }
  .estimate-cards, .chat-collapsed .estimate-cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .estimate-cards article { padding: var(--space-4); gap: var(--space-3); border-radius: var(--radius-10); }
  .estimate-cards article:first-child { grid-column: 1/-1; }
  .estimate-cards strong { font-size: var(--text-25); }
  .estimate-cards small { font-size: var(--text-caption); }
  .estimate-cards span { font-size: var(--text-caption); }
  .release-table { min-width: 0; font-size: var(--text-caption); }
  .release-table th, .release-table td { padding: 10px var(--space-2); }
  .release-table thead th { font-size: var(--text-caption); }
  .effort-breakdown { grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--space-4); }
  .estimate-review-toolbar input { width: 100%; font-size: var(--text-small); min-height: 44px; }
  .estimate-detail { max-height: none; overflow: visible; border: 0; background: transparent; }
  .estimate-table { min-width: 0; }
  .estimate-table thead { display: none; }
  .estimate-table tbody, .estimate-table tfoot, .estimate-table tr { display: block; }
  .estimate-table tr { background: white; border: 1px solid var(--border-ui); border-radius: var(--radius-10); margin-bottom: var(--space-2); padding: var(--space-3); }
  .estimate-table th:first-child { display: block; min-width: 0; padding: 0 0 10px; border: 0; }
  .estimate-table td { display: inline-block; width: 33.333%; padding: 6px 0; border: 0; text-align: left; font-size: var(--text-caption); }
  .estimate-table td::before { content: attr(data-label); display: block; color: var(--color-steel); font-size: var(--text-caption); margin-bottom: 3px; }
  .estimate-table .estimate-group { background: var(--surface-selected); }
  .estimate-table .estimate-group td { display: none; }
  .estimate-table .estimate-group th:first-child { padding: 0; }
  .estimate-table th button { min-height: 32px; font-size: var(--text-caption); }
  .estimate-table tfoot tr { background: var(--surface-selected); }
  .timeline-row { grid-template-columns: 120px minmax(0,1fr); padding: var(--space-3); font-size: var(--text-caption); }
  .review-handoff { padding: 18px; flex-direction: column; gap: var(--space-4); }
  .review-actions { display: grid; width: 100%; }
  .review-actions button { min-height: 44px; }
  .preview-toolbar { flex-direction: column; align-items: flex-start; }
  .preview-controls button { min-height: 40px; }
  .source-layout { grid-template-columns: 1fr; }
  .source-layout pre { padding: var(--space-4); }
  .source-layout nav { border-bottom: 1px solid var(--color-iron); }
  .workspace-footer { padding: 14px var(--space-4); flex-direction: row; gap: var(--space-2); }
  .alert, .run-activity, .run-activity.compact { padding-inline: var(--space-4); }
  .run-heading { flex-wrap: wrap; }
  .empty-state { padding: var(--space-8) var(--space-5); }
  .empty-state h2 { font-size: var(--text-34); }
  .starter-grid { grid-template-columns: 1fr; }
  .share-actions { flex-wrap: wrap; }
  .share-actions button { flex: 1; min-height: 44px; }
  .share-dialog { padding: var(--space-5); }
}
@media (prefers-reduced-motion: no-preference) {
  .tabs button, .feature-row, .command-result, .relationship-trigger { transition: background-color var(--duration-150) ease, border-color var(--duration-150) ease; }
  dialog[open] { animation: dialog-in var(--duration-160) ease-out; }
  @keyframes dialog-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
}
@media (prefers-reduced-motion: reduce) { .alert.busy::before { animation: none; } }

/* Labels become visible when rows reflow into story cards. */
.story-effort-field, .story-release-field { display: block; min-width: 0; }
.story-effort-field > span, .story-release-field > span { display: none; }
.story-effort-field input, .story-release-field select { padding: 7px; font-size: var(--text-caption); border: 1px solid var(--border-ui); border-radius: var(--radius-6); min-height: 32px; background: var(--surface-navigation); }
.feature-row > .story-effort-field, .feature-row > .story-release-field { padding: 0; border: 0; background: none; }
.board-view .story-effort-field > span, .board-view .story-release-field > span { display: block; font-size: var(--text-caption); color: var(--color-steel); margin-bottom: 5px; }
@media (max-width: 760px) { .story-effort-field > span, .story-release-field > span { display: block; font-size: var(--text-caption); color: var(--color-steel); margin-bottom: 5px; } .story-effort-field input, .story-release-field select { min-height: 38px; } }
.assistant-close { float: right; width: 28px; height: 28px; margin-top: -8px; background: transparent; }
.board-view .feature-header { display: flex; height: 36px; min-width: 0; gap: 10px; position: static; margin-bottom: var(--space-3); padding: 0; background: none; }
.board-view .feature-header > span { display: none; }
.board-view .feature-header::after { content: 'Select all matching stories'; font-size: var(--text-caption); color: var(--color-steel); }
.board-view .feature-row { gap: var(--space-2); padding: var(--space-3); }
.board-view .story-notes { padding-block: 3px; min-height: 24px; }
.board-view .story-description { -webkit-line-clamp: 2; }
@media (max-width: 760px) { .assistant-close { width: 36px; height: 36px; } }

/* Readable controls and consistent metadata, with one neutral status language. */
:is(.mode,.draft-label,.mission-tag,.story-readiness,.estimate-badge) { font-size: var(--text-caption); line-height: 1.4; border-radius: var(--radius-tag); padding: var(--space-1) var(--space-2); max-width: 100%; }
:is(.overview-card,.story-details) label, .story-identity span { font-size: var(--text-caption); }
:is(.overview-card,.story-details,.composer) :is(input,textarea,select) { font-size: var(--text-ui); }
:is(.dashboard-mission,.metric-card:first-child) :is(a,button):focus-visible { outline-color: var(--color-snow); }
@media (max-width: 760px) {
  .top-actions button, .tabs button, .scope-group-controls button, .scope-layout-controls button, .text-action, .scope-viewbar select { min-height: var(--control-height); }
  .feature-row :is(.story-toggle,.story-notes,.story-picker,.story-delete) { min-height: var(--control-height); }
}

.projectbar #project-name { font-size: var(--text-ui); font-weight: 600; margin: 0; line-height: 1.4; min-width: 0; }
@media (max-width: 760px) {
  .tabs button { flex: 0 0 auto; }
  #scope .scope-group-controls { width: 100%; overflow-x: auto; }
  #scope .scope-group-controls button { flex: 1 0 auto; padding-inline: var(--space-2); }
  #scope .scope-group-controls .icon-label { white-space: nowrap; overflow-wrap: normal; }
  .projectbar #project-name { white-space: normal; overflow-wrap: break-word; overflow: visible; }
  .projectbar > div { flex: 1; }
  .projectbar .primary { flex: none; }
  .feature-actions button, .assistant-close { min-width: 44px; min-height: 44px; }
}

/* Constructor actions wrap as a unit; the client delivery shell lives in client.css. */
.constructor-actions { position: relative; }
.constructor-actions summary { display: flex; align-items: center; gap: var(--space-2); list-style: none; min-height: 44px; padding: var(--space-2) var(--space-3); border: 1px solid var(--border-control); border-radius: var(--radius-8); font-size: var(--text-small); cursor: pointer; }
.constructor-actions summary::-webkit-details-marker { display: none; }
.constructor-action-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; display: grid; grid-template-columns:minmax(0,1fr); gap: 6px; width: 230px; max-width: calc(100vw - 32px); background: white; border: 1px solid var(--border-ui); border-radius: var(--radius-12); padding: var(--space-3); box-shadow: 0 12px 36px rgb(0 0 0 / .1); }
.top-actions .constructor-action-menu .mode { grid-column:auto; grid-row:auto; }
.constructor-action-menu :is(#new-project,#download,#share-project) { grid-column: 1; grid-row: auto; justify-self: stretch; width: 100%; }
.constructor-action-menu :is(button,a) { min-width: 0; justify-content: flex-start; }
.constructor-action-menu .studio-manager-contact { display:flex; align-items:center; gap:var(--space-2); min-height:44px; padding:9px 11px; border:1px solid #c9d5ff; border-radius:var(--radius-10); background:#f2f5ff; color:#1745c0; font-size:var(--text-small); font-weight:600; text-decoration:none; }
.constructor-action-menu .studio-manager-contact:hover { background:#e5ecff; }
.constructor-action-menu .studio-manager-contact:focus-visible,.sidebar-bottom a[href="https://t.me/growth_center"]:focus-visible { outline:3px solid #5578ef; outline-offset:2px; }
.constructor-action-menu .studio-manager-contact .rw-icon { width:16px; height:16px; }
.top-actions .constructor-action-menu button { display: flex; font-size: var(--text-small); min-height: 44px; text-align: left; }
.client-entry { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: var(--text-small); text-decoration: none; white-space: nowrap; }
.action-label-short, .client-entry-menu { display: none; }
.projectbar > .project-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }
.projectbar { flex-wrap: wrap; }
.projectbar > div:first-child { flex: 1 1 250px; }
.projectbar .draft-label { flex: none; }
.projectbar :is(.quiet,.outline,.primary) { min-height: 44px; font-size: var(--text-small); }
#brief-handoff { width: min(580px,calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: var(--space-7); border-radius: var(--radius-16); }
.handoff-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); }
.handoff-heading h2 { margin: var(--space-2) 0 var(--space-4); }
#brief-handoff-form label:not(.handoff-consent) { display: block; font-size: var(--text-ui); margin-top: var(--space-4); }
#brief-handoff-form > input { width: 100%; min-height: 44px; padding: 10px var(--space-3); border: 1px solid var(--border-control); border-radius: var(--radius-8); }
.handoff-consent { display: flex; align-items: flex-start; gap: var(--space-3); font-size: var(--text-small); margin: var(--space-5) 0; }
.handoff-consent input { flex: none; width: 20px; height: 20px; margin-top: 2px; }
#brief-handoff :is(button,input) { min-height: 44px; }
#brief-handoff .handoff-consent input { min-height: 20px; }
.handoff-note { border-top: 1px solid var(--border-ui); padding-top: var(--space-4); font-size: var(--text-small); }
@media (max-width: 900px) { .constructor-action-menu #new-project { font-size: var(--text-small); } }
@media (max-width: 760px) {
  .topbar { height: auto; min-height: 64px; flex-wrap: wrap; padding: 10px var(--space-4); }
  .topbar .top-actions { margin-left: auto; flex-wrap: wrap; }
  .constructor-actions summary { font-size: var(--text-caption); padding: var(--space-2); }
  .top-actions .constructor-action-menu :is(#new-project,#download,#share-project) { display: flex; font-size: var(--text-small); }
  .top-actions .constructor-action-menu #share-project span { display: inline; }
  .client-entry { font-size: var(--text-caption); }
  .projectbar > div:first-child { flex-basis: 100%; }
  .projectbar > .project-actions { justify-content: flex-start; flex: 1 1 100%; }
  .projectbar #project-name { max-width: none; flex: 1; }
  .projectbar .chat-toggle { flex: none; }
  .projectbar .primary .icon-label { white-space: normal; }
  .brief-check-icon { width: 44px; height: 44px; }
  #brief-handoff { padding: var(--space-5); }
}
@media (max-width: 420px) { .topbar .command-trigger { margin-left: auto; } .topbar .top-actions { width: 100%; justify-content: space-between; } }
.workspace-starting{grid-template-columns:1fr!important}.workspace-starting>.workspace-sidebar,.workspace-starting>.chat-panel,.workspace-starting .projectbar,.workspace-starting .workspace-progress,.workspace-starting .workspace-footer{display:none!important}.workspace-starting .main-panel{max-width:none}.workspace-starting .empty-state{max-width:820px;margin:auto;padding:56px var(--space-8)}.idea-start-form{text-align:left;max-width:660px;margin:var(--space-7) auto}.idea-start-form label{display:block;font-size:var(--text-ui);font-weight:600;margin-bottom:10px}.idea-start-form textarea{display:block;width:100%;resize:vertical;min-height:128px;padding:18px;border:1px solid var(--border-control);border-radius:var(--radius-14);background:var(--color-snow);font:16px/1.7 var(--font-ui);color:var(--color-obsidian)}.idea-start-form button{width:100%;justify-content:center;margin-top:var(--space-3);min-height:48px}.start-mode{font-size:var(--text-caption);line-height:1.7;color:var(--color-steel);margin:14px 0}.starter-examples button{padding:18px!important}.starter-examples button>.icon-badge{display:none}.workspace-starting .starter-examples{max-width:660px;margin:var(--space-6) auto;gap:var(--space-3)}.workspace-starting .starter-examples strong{font-size:var(--text-small)}.workspace-starting .starter-examples span{font-size:var(--text-caption)}.acceptance-guidance{border-top:1px solid var(--border-ui);padding-top:18px;margin-top:var(--space-5)}.acceptance-guidance h3{font-size:var(--text-body)}.acceptance-guidance p{font-size:var(--text-small);line-height:1.7}.source-readme{padding:var(--space-5) var(--space-6);background:var(--color-paper);border:1px solid var(--border-ui);border-radius:var(--radius-12);margin:18px 0;font-size:var(--text-small);line-height:1.8}.source-readme summary{cursor:pointer;font-weight:600;font-size:var(--text-ui)}.source-readme ol{padding-left:var(--space-5)}.source-readme p{font-size:var(--text-small)}.story-menu{display:block;align-self:start;min-width:76px;padding:var(--space-1)}.story-menu summary{list-style:none;cursor:pointer;border:1px solid var(--border-control);border-radius:var(--radius-6);padding:var(--space-2);font-size:var(--text-caption);min-height:36px;color:var(--color-steel)}.story-menu summary::-webkit-details-marker{display:none}.story-menu-items{display:grid;gap:3px;min-width:110px;padding-top:6px}.story-menu .story-menu-items button{display:flex;align-items:center;gap:7px;font-size:var(--text-11);white-space:nowrap;justify-content:flex-start;min-height:36px;width:100%;padding:var(--space-2)}.story-menu .story-menu-items button:last-child{color:var(--status-blocked-text)}.handoff-summary{display:grid;grid-template-columns:135px 1fr;gap:10px;font-size:var(--text-small);line-height:1.6;background:var(--color-paper);padding:18px;border-radius:var(--radius-10)}.handoff-summary dt{font-weight:600}.handoff-summary dd{margin:0;overflow-wrap:anywhere}.handoff-conversation{font-size:var(--text-small);margin:var(--space-5) 0}.handoff-conversation summary{cursor:pointer;font-weight:600}.handoff-conversation>div{max-height:220px;overflow:auto}.handoff-conversation p{font-size:var(--text-caption);white-space:pre-wrap;overflow-wrap:anywhere;border-top:1px solid var(--border-ui);padding-top:10px}
@media(max-width:760px){.workspace-starting .empty-state{padding:var(--space-8) var(--space-5)}.workspace-starting .empty-state h2{font-size:var(--text-34)}.workspace-starting .starter-examples{grid-template-columns:1fr}.workspace-starting .starter-examples button{text-align:left}.workspace-starting .empty-state>p{font-size:var(--text-ui)}.story-menu{grid-column:2/-1!important;justify-self:stretch}.story-menu-items{grid-template-columns:repeat(2,minmax(0,1fr));padding:var(--space-2) 0}.story-menu .story-menu-items button{min-height:44px;font-size:var(--text-small)}.handoff-summary{grid-template-columns:1fr;gap:var(--space-1)}.handoff-summary dd{margin-bottom:10px}.source-readme{padding:18px}.workspace-starting+.workspace-footer{display:none}}
.discovery-context{margin:var(--space-4) 0;font-size:var(--text-small);line-height:1.7}.discovery-context summary{cursor:pointer;font-weight:600;min-height:40px;padding:var(--space-2) 0}.discovery-context summary span{font-weight:400;color:var(--color-steel)}.discovery-fields{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-3);margin:var(--space-3) 0}.discovery-fields input,.discovery-fields select{display:block;width:100%;padding:10px;border:1px solid var(--border-control);border-radius:var(--radius-8);font:14px var(--font-ui);min-height:44px;background:var(--color-snow)}.discovery-context p{font-size:var(--text-caption);color:var(--color-steel)}.estimate-section-nav{display:flex;flex-wrap:wrap;gap:var(--space-2);margin:var(--space-5) 0}.estimate-section-nav a{font-size:var(--text-caption);color:var(--color-steel);text-decoration:none;border:1px solid var(--border-control);padding:9px var(--space-3);border-radius:var(--radius-7);min-height:38px;display:flex;align-items:center}.estimate-section-nav a:hover{background:var(--color-paper);color:var(--color-obsidian)}.production-review{margin:var(--space-7) 0;border:1px solid var(--border-ui);border-radius:var(--radius-14);padding:var(--space-6);background:var(--color-snow)}.production-review .section-heading{margin-bottom:18px}.production-review h3{font-size:var(--text-22);line-height:1.35}.production-review .section-heading p{font-size:var(--text-small)}.production-grid{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-4)}.production-grid article{background:var(--color-paper);padding:18px;border-radius:var(--radius-10)}.production-grid h4{font-size:var(--text-ui);margin:0 0 10px}.production-grid p,.production-grid a{font-size:var(--text-small);line-height:1.7}.production-grid a{font-weight:600;text-decoration:underline;text-underline-offset:4px}.section-anchor{display:block;scroll-margin-top:20px}
@media(max-width:760px){.discovery-fields,.production-grid{grid-template-columns:1fr}.discovery-fields input,.discovery-fields select{font-size:var(--text-16)}.production-review{padding:18px}.estimate-section-nav a{min-height:44px;font-size:var(--text-small)}}
.production-grid article { display:flex; flex-direction:column; gap:var(--space-3); border:1px solid var(--border-ui); }
.production-grid .production-card-heading { display:flex; align-items:center; gap:10px; margin:0; padding-bottom:var(--space-3); border-bottom:1px solid var(--border-ui); line-height:1.5; }
.production-card-heading .rw-icon { width:18px; height:18px; color:var(--color-steel); }
.production-grid p { margin:0; }
.production-grid .production-assumption { padding:var(--space-3); background:white; border:1px solid var(--border-ui); border-radius:var(--radius-8); font-size:var(--text-caption); }
.production-grid .production-card-action { margin-top:auto; padding-top:var(--space-3); border-top:1px solid var(--border-ui); min-height:44px; line-height:1.5; }
.production-card-action .rw-icon { width:16px; height:16px; }
.coverage-note{margin:0 var(--space-6) 18px;padding:14px var(--space-4);border:1px solid #e4d2c5;border-radius:var(--radius-10);background:#fff8f1;color:#68442b;font-size:var(--text-caption);line-height:1.7;flex-shrink:0}.workspace-starting .coverage-note{display:none}
@media(max-width:760px){.coverage-note{margin:0 var(--space-4) var(--space-4);font-size:var(--text-small)}}
@media(max-width:760px){.source-readme summary,.handoff-conversation summary,.discovery-context summary{min-height:44px}.topbar .command-trigger{width:44px;height:44px;min-width:44px;min-height:44px}}

@media(max-width:760px){#brief-handoff-form>input{font-size:var(--text-16)}}

/* Editorial Studio: paper surfaces, serif hierarchy and restrained Runwise blue. */
.studio-page { background: var(--surface-mist,var(--surface-mist)); color: var(--color-obsidian); }
.studio-page .topbar { height: 72px; min-height: 72px; padding-inline: var(--space-6); background: var(--color-snow); border-bottom-color: var(--border-soft); }
.studio-page .wordmark { color: var(--color-obsidian); letter-spacing: -.025em; }
.studio-page .logo { width: 36px; height: 36px; background: var(--color-obsidian); color: var(--color-snow); border-radius: 11px; }
.studio-page .studio-label { color: var(--text-muted); border-color: var(--border-soft); letter-spacing: 0; }
.studio-page .command-trigger { min-height: 42px; border-color: var(--border-soft); border-radius: var(--radius-pill); background: var(--surface-subtle); color: var(--text-muted); }
.studio-page kbd { background: var(--color-snow); border-color: #e1e1e4; color: var(--text-muted); }
.studio-page :is(.primary,.send) { background: var(--color-obsidian); color: var(--color-snow); border-color: var(--color-obsidian); border-radius: var(--radius-pill); font-weight: 500; box-shadow: none; }
.studio-page :is(.primary,.send):hover:enabled { background: #35373c; border-color: #35373c; }
.studio-page :is(.outline,.quiet) { border-radius: var(--radius-pill); color: var(--color-obsidian); }
.studio-page .outline { border-color: #dedee2; background: var(--color-snow); }
.studio-page .outline:hover:enabled { background: var(--surface-mist); border-color: #aeb0b7; }
.studio-page .quiet:hover:enabled { background: var(--color-cloud); }
.studio-page :is(button,a,summary,input,textarea,select):focus-visible { outline: 2px solid var(--color-obsidian); outline-offset: 3px; }
.studio-page .workspace, .studio-page .workspace.chat-collapsed { grid-template-columns: 208px minmax(0,1fr) 304px; gap: var(--space-3); padding: var(--space-3); height: calc(100dvh - 72px); }
.studio-page .workspace.chat-collapsed { grid-template-columns: 208px minmax(0,1fr); }
.studio-page .workspace-sidebar { background: var(--color-snow); border: 1px solid var(--border-ui); border-radius: var(--radius-20); padding: var(--space-6) var(--space-3) 18px; color: var(--color-obsidian); }
.studio-page .sidebar-project { padding-bottom: var(--space-7); }
.studio-page .project-avatar { background: var(--surface-mist); color: var(--color-obsidian); border: 1px solid #e8e8eb; border-radius: var(--radius-12); width: 38px; height: 38px; }
.studio-page .sidebar-project small, .studio-page .sidebar-label, .studio-page .sidebar-bottom { color: var(--text-muted); }
.studio-page .tabs { gap: 6px; }
.studio-page .tabs button { color: var(--text-muted); min-height: 44px; border-radius: var(--radius-pill); font-size: var(--text-small); font-weight: 450; }
.studio-page .tabs button:hover { color: var(--color-obsidian); background: var(--surface-subtle); }
.studio-page .tabs button.active { background: var(--surface-mist); color: var(--color-obsidian); border-color: transparent; font-weight: 500; }
.studio-page .tabs button[data-count]:not([data-count=""])::after { background: #e9e9ec; color: var(--text-muted); border-radius: var(--radius-pill); }
.studio-page .tabs button[data-ready=true]::after { background: var(--text-muted); }
.studio-page .sidebar-insight { background: var(--surface-subtle); border: 1px solid #e9e9ec; border-radius: var(--radius-16); margin: var(--space-8) var(--space-1) var(--space-5); padding: var(--space-4); }
.studio-page .sidebar-insight p { color: var(--text-muted); }
.studio-page .sidebar-insight .text-action { color: var(--color-obsidian); }
.studio-page .sidebar-bottom { border-color: var(--border-soft); }
.studio-page .main-panel { border: 1px solid var(--border-ui); border-radius: var(--radius-24); background: var(--color-snow); }
.studio-page .projectbar { padding-inline: var(--space-6); min-height: 76px; background: var(--color-snow); border-color: var(--color-cloud); }
.studio-page .projectbar #project-name { font-family: var(--font-ui); font-size: var(--text-body); font-weight: 500; letter-spacing: -.01em; }
.studio-page .draft-label { background: var(--surface-mist); color: var(--text-muted); }
.studio-page .chat-toggle { background: var(--color-snow); border-color: #e1e1e5; border-radius: var(--radius-pill); }
.studio-page .workspace-progress { padding: 10px var(--space-6); background: var(--color-snow); color: var(--text-muted); border-bottom-color: var(--color-cloud); font-size: var(--text-caption); }
.studio-page .workspace-footer { background: var(--color-snow); color: var(--text-muted); border-top: 1px solid var(--color-cloud); }
.studio-page .tab-panel { padding: var(--space-8) var(--space-6); }
.studio-page .section-heading .eyebrow, .studio-page .tab-panel .section-heading .eyebrow { color: var(--text-muted); font-weight: 450; letter-spacing: .04em; }
.studio-page .section-heading h2, .studio-page .tab-panel .section-heading h2, .studio-page #scope .section-heading h2 { color: var(--color-obsidian); font-family: var(--font-display,Georgia,serif); font-size: var(--text-36); font-weight: 400; line-height: 1.18; letter-spacing: -.02em; }
.studio-page .section-heading p:last-child { font-size: var(--text-small); color: var(--text-muted); }
.studio-page .project-dashboard { grid-template-columns: repeat(auto-fit,minmax(min(100%,390px),1fr)); gap: var(--space-4); }
.studio-page .dashboard-mission { border: 1px solid transparent; border-radius: var(--radius-24); background: var(--brand-tint,var(--brand-tint)); color: var(--brand-ink,var(--brand-ink)); padding: 26px; }
.studio-page .dashboard-mission::before, .studio-page .dashboard-mission::after { content: none; }
.studio-page .mission-tag { color: var(--brand-ink,var(--brand-ink)); background: transparent; padding: 0; font-size: var(--text-caption); letter-spacing: .06em; }
.studio-page .mission-heading > .rw-icon { color: var(--brand-ink,var(--brand-ink)); }
.studio-page .dashboard-mission h3 { color: var(--brand-ink,var(--brand-ink)); font-size: var(--text-25); font-weight: 500; margin: var(--space-6) 0 var(--space-3); letter-spacing: -.02em; }
.studio-page .dashboard-mission > p, .studio-page .mission-stats span { color: var(--brand-ink,var(--brand-ink)); }
.studio-page .dashboard-mission > p { display: block; overflow: visible; -webkit-line-clamp: unset; }
.studio-page .mission-stats { border-color: #173f9f26; gap: var(--space-2); }
.studio-page .mission-stats strong { color: var(--brand-ink,var(--brand-ink)); font-size: var(--text-27); letter-spacing: -.02em; font-weight: 450; }
.studio-page .dashboard-readiness { background: var(--surface-subtle); border: 1px solid #e8e8eb; border-radius: var(--radius-24); padding: var(--space-6); grid-template-columns: 44px minmax(0,1fr); gap: var(--space-4); }
.studio-page .brief-check-icon { width: 44px; height: 44px; background: var(--color-snow); color: var(--color-obsidian); border: 1px solid var(--border-ui); border-radius: var(--radius-14); }
.studio-page .dashboard-readiness .card-kicker { color: var(--text-muted); font-size: var(--text-caption); letter-spacing: .04em; }
.studio-page .dashboard-readiness h3 { font-size: var(--text-18); color: var(--color-obsidian); letter-spacing: -.01em; font-weight: 500; }
.studio-page .dashboard-readiness p { color: var(--text-muted); }
.studio-page .dashboard-readiness > .text-action { color: var(--color-obsidian); border-color: var(--border-soft); }
.studio-page :is(.overview-card,.assumptions-card) { border-color: var(--border-soft); border-radius: var(--radius-24); background: var(--color-snow); padding: var(--space-6); }
.studio-page .assumptions-card { background: var(--surface-subtle); }
.studio-page .overview-card :is(input,textarea,select), .studio-page .story-details :is(input,textarea) { background: var(--surface-subtle); border-color: #e2e2e5; border-radius: var(--radius-12); }
.studio-page .overview-card label { color: #484b53; font-weight: 450; }
.studio-page .assumptions-card h3 { color: var(--color-obsidian); font-weight: 500; }
.studio-page .discovery-check, .studio-page .acceptance-guidance, .studio-page .next-row { border-color: var(--border-soft); }
.studio-page .scope-group-controls, .studio-page .scope-layout-controls { background: var(--surface-mist); border-color: var(--border-soft); border-radius: var(--radius-pill); padding: var(--space-1); }
.studio-page .scope-group-controls button, .studio-page .scope-layout-controls button { border-radius: var(--radius-pill); }
.studio-page .scope-group-controls button.active, .studio-page .scope-layout-controls button.active { background: var(--color-snow); color: var(--color-obsidian); border-color: var(--border-soft); }
.studio-page .scope-search input, .studio-page .scope-viewbar select, .studio-page .estimate-review-toolbar input { border-color: #e2e2e5; background: var(--color-snow); border-radius: var(--radius-pill); }
.studio-page .feature-table, .studio-page #scope .feature-table, .studio-page .estimate-detail, .studio-page .release-comparison { border-color: var(--border-soft); border-radius: var(--radius-16); }
.studio-page .feature-header, .studio-page .estimate-table thead th { background: var(--surface-subtle); color: var(--text-muted); }
.studio-page .scope-group-heading { background: var(--surface-mist); }
.studio-page .feature-row:hover { background: var(--surface-subtle); }
.studio-page .feature-row > input[type=checkbox], .studio-page .feature-header input[type=checkbox] { accent-color: var(--color-obsidian); }
.studio-page .feature-row.drop-target { outline-color: #777b86; background: var(--surface-mist); }
.studio-page .relationship-trigger { border-color: var(--border-soft); border-radius: var(--radius-pill); }
.studio-page .relationship-trigger:hover { border-color: #b8bac2; background: var(--surface-subtle); }
.studio-page .story-readiness, .studio-page .story-readiness[data-defined=true] { background: var(--surface-mist); color: var(--text-muted); }
.studio-page .story-details, .studio-page .scope-bulk { background: var(--surface-mist); border-color: #e2e2e5; border-radius: var(--radius-16); }
.studio-page .story-effort-field input, .studio-page .story-release-field select { background: var(--surface-subtle); border-color: var(--border-ui); border-radius: var(--radius-10); }
.studio-page .story-menu summary { border-color: var(--border-soft); border-radius: var(--radius-pill); }
.studio-page .estimate-section-nav a { border-color: var(--border-soft); background: var(--color-snow); border-radius: var(--radius-pill); }
.studio-page .estimate-section-nav a:hover { background: var(--surface-mist); }
.studio-page .estimate-controls { border-color: var(--border-soft); background: var(--surface-subtle); border-radius: var(--radius-20); }
.studio-page .estimate-controls input { border-color: #e2e2e5; border-radius: var(--radius-12); background: var(--color-snow); }
.studio-page .estimate-cards article { border-color: #e8e8eb; border-radius: var(--radius-24); background: var(--surface-subtle); padding: 22px; }
.studio-page .estimate-cards article:first-child { background: var(--brand-tint,var(--brand-tint)); color: var(--brand-ink,var(--brand-ink)); border-color: transparent; }
.studio-page .estimate-cards article:first-child small, .studio-page .estimate-cards article:first-child span { color: var(--brand-ink,var(--brand-ink)); }
.studio-page .estimate-cards strong { font-size: 31px; font-weight: 450; letter-spacing: -.025em; }
.studio-page .effort-breakdown > div { padding: 14px; background: var(--surface-subtle); border: 1px solid #e9e9ec; border-radius: var(--radius-16); }
.studio-page .discipline-track { background: var(--border-ui); height: 5px; }
.studio-page .discipline-track > span { background: #777b86; }
.studio-page .timeline { background: var(--color-snow); border-color: var(--border-soft); border-radius: var(--radius-16); }
.studio-page .timeline-track { background: var(--surface-mist); }
.studio-page .timeline-bar { background: #9b9da5; }
.studio-page .production-review { background: var(--color-snow); border-color: var(--border-soft); border-radius: var(--radius-24); }
.studio-page .production-review h3 { font-family: var(--font-ui); font-size: var(--text-22); font-weight: 500; }
.studio-page .production-grid article { background: var(--surface-subtle); border-color: #e9e9ec; border-radius: var(--radius-16); }
.studio-page .production-card-heading .rw-icon { color: var(--text-muted); }
.studio-page .review-handoff { background: var(--surface-mist); border: 1px solid #e8e8eb; border-radius: var(--radius-24); }
.studio-page .preview-stage { background: var(--surface-mist); border: 1px solid var(--border-ui); padding: var(--space-3); border-radius: var(--radius-24); }
.studio-page .preview-stage iframe { border-radius: var(--radius-12); box-shadow: 0 6px 22px #17191c08; }
.studio-page .source-layout { background: var(--color-snow); border: 1px solid var(--border-soft); border-radius: var(--radius-20); }
.studio-page .source-layout nav { background: var(--surface-subtle); border-color: var(--border-soft); padding: var(--space-3); }
.studio-page .source-layout button { color: var(--text-muted); border-radius: var(--radius-pill); }
.studio-page .source-layout button.active { background: var(--color-cloud); color: var(--color-obsidian); }
.studio-page .source-layout pre { color: #33363d; background: var(--color-snow); }
.studio-page .source-readme { background: var(--surface-subtle); border-color: var(--border-soft); border-radius: var(--radius-20); }
.studio-page .chat-panel { border: 1px solid var(--border-ui); border-radius: var(--radius-24); background: var(--color-snow); padding: var(--space-6) 18px var(--space-4); }
.studio-page .chat-top .eyebrow { color: var(--text-muted); }
.studio-page .chat-top h2 { color: var(--color-obsidian); font-family: var(--font-ui); font-size: var(--text-23); font-weight: 500; line-height: 1.25; letter-spacing: -.02em; }
.studio-page .chat-top > p:last-child { color: var(--text-muted); font-size: var(--text-small); }
.studio-page .message.assistant, .studio-page .message-author { color: var(--text-muted); }
.studio-page .message.user { background: var(--surface-mist); border-color: var(--border-soft); color: #33363d; border-radius: var(--radius-16); }
.studio-page .examples button { border-color: var(--border-soft); background: var(--color-snow); border-radius: var(--radius-pill); color: var(--text-muted); min-height: 32px; }
.studio-page .examples button:hover { background: var(--surface-mist); }
.studio-page .composer { background: var(--surface-subtle); border-color: #dedee3; border-radius: var(--radius-20); }
.studio-page .composer:focus-within { border-color: #9b9da6; }
.studio-page .composer textarea { color: var(--color-obsidian); line-height: 1.6; }
.studio-page .composer-bottom > span, .studio-page .privacy-note { color: var(--text-muted); }
.studio-page .constructor-actions summary { border-color: #dedee3; border-radius: var(--radius-pill); background: var(--color-snow); }
.studio-page .constructor-action-menu { border-color: var(--border-ui); border-radius: var(--radius-20); box-shadow: 0 12px 36px #17191c14; }
.studio-page dialog, .studio-page .relationship-popover { background: var(--color-snow); color: var(--color-obsidian); border: 1px solid #e2e2e7; border-radius: var(--radius-24); box-shadow: 0 20px 70px #17191c26; }
.studio-page dialog::backdrop { background: #17191c66; backdrop-filter: blur(5px); }
.studio-page .dialog-heading h2, .studio-page .handoff-heading h2, .studio-page #new-dialog h2 { font-family: var(--font-display,Georgia,serif); font-size: var(--text-30); font-weight: 400; letter-spacing: -.02em; }
.studio-page .command-result { border-radius: var(--radius-16); }
.studio-page .command-result:hover, .studio-page .command-result:focus { background: var(--surface-mist); }
.studio-page .command-dialog input, .studio-page #brief-handoff-form > input { border-color: #dedee3; background: var(--surface-subtle); border-radius: var(--radius-16); }
.studio-page .relationship-popover [role=option]:hover, .studio-page .relationship-popover .highlighted { background: var(--surface-mist); }
.studio-page .handoff-summary { background: var(--surface-mist); border-radius: var(--radius-16); }
.studio-page .coverage-note { background: var(--surface-subtle); border-color: var(--border-soft); color: var(--text-muted); }
.studio-page .alert { background: var(--surface-mist); color: #484b53; }
.studio-page .alert button { margin: 6px 0 0 var(--space-2); vertical-align: middle; }
/* Idea handoff: a returning visitor chooses between a new idea and the saved draft. */
.studio-page .idea-handoff { width: min(560px, calc(100vw - 32px)); }
.studio-page .idea-handoff .eyebrow { margin: 0 0 10px; font-size: var(--text-caption); }
.studio-page .idea-handoff h2 { margin: 0 0 6px; font-family: var(--font-display,Georgia,serif); font-size: var(--text-30); font-weight: 400; letter-spacing: -.02em; }
.studio-page .idea-handoff p.idea-handoff-label { margin: 18px 0 6px; color: var(--text-muted); font-size: var(--text-caption); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.studio-page .idea-handoff .idea-handoff-idea { margin: 0; padding: 14px var(--space-4); border: 1px solid var(--brand-line,var(--brand-line)); border-radius: var(--radius-16); background: var(--brand-tint,var(--brand-tint)); color: var(--color-obsidian); font-size: var(--text-body); line-height: 1.55; overflow-wrap: anywhere; }
.studio-page .idea-handoff p.idea-handoff-current { margin: 0; color: var(--color-obsidian); font-size: var(--text-body); font-weight: 600; }
.studio-page .idea-handoff .dialog-actions { margin-top: var(--space-5); }
.studio-page .idea-handoff .idea-handoff-download { margin-top: var(--space-3); color: var(--text-muted); }
@media (max-width: 480px) {
  .studio-page .idea-handoff { padding: var(--space-5); }
  .studio-page .idea-handoff h2 { font-size: 26px; }
  .studio-page .idea-handoff p.idea-handoff-label { margin-top: 14px; }
  .studio-page .idea-handoff .idea-handoff-idea { padding: var(--space-3) 14px; font-size: var(--text-ui); }
  .studio-page .idea-handoff .dialog-actions { margin-top: var(--space-4); }
  .studio-page .idea-handoff .dialog-actions { flex-direction: column-reverse; }
  .studio-page .idea-handoff .dialog-actions button { width: 100%; min-height: 44px; justify-content: center; }
  .studio-page .idea-handoff .idea-handoff-download { min-height: 44px; }
}
.studio-page .alert.error { background: var(--status-blocked-surface); color: var(--status-blocked-text); }
.studio-page .run-activity { background: var(--surface-subtle); border-color: var(--color-cloud); }
.studio-page .workspace-starting { background: var(--color-snow); }
.studio-page .workspace-starting .main-panel { background: var(--color-snow); border: 0; }
.studio-page .workspace-starting .empty-state { max-width: 960px; padding: var(--space-16) var(--space-11) var(--space-11); }
.studio-welcome-intro { text-align: center; max-width: 760px; margin: 0 auto var(--space-9); }
.studio-page .empty-tag { display: inline-block; color: var(--text-muted); font-size: var(--text-caption); line-height: 1.5; letter-spacing: .06em; font-weight: 450; }
.studio-page .empty-state h2 { font-family: var(--font-display,Georgia,serif); font-size: clamp(44px,5vw,64px); font-weight: 400; line-height: 1.12; letter-spacing: -.025em; color: var(--color-obsidian); margin: var(--space-6) 0; }
.studio-page .empty-state h2 span { color: var(--color-obsidian); font-style: italic; }
.studio-welcome-copy > p { max-width: 560px; font-size: var(--text-body); line-height: 1.75; color: var(--text-muted); margin: 0 auto; }
.studio-page .idea-start-form { max-width: 760px; padding: var(--space-6); background: var(--color-snow); border: 1px solid #e1e1e5; border-radius: var(--radius-24); margin: 0 auto; box-shadow: 0 8px 28px #17191c06; }
.studio-page .idea-start-form > label { color: #33363d; font-weight: 450; }
.studio-page .idea-start-form textarea { background: var(--surface-subtle); border-color: var(--border-soft); border-radius: var(--radius-16); padding: var(--space-4); min-height: 112px; }
.studio-page .idea-start-form .primary { min-height: 50px; font-size: var(--text-ui); border-radius: var(--radius-pill); }
.studio-page .discovery-context { border-top: 1px solid var(--color-cloud); padding-top: var(--space-1); margin-bottom: 6px; }
.studio-page .discovery-context summary { color: #484b53; font-weight: 450; }
.studio-page .discovery-fields input, .studio-page .discovery-fields select { background: var(--surface-subtle); border-color: #e2e2e6; border-radius: var(--radius-12); }
.studio-page .start-mode { margin-bottom: 0; font-size: var(--text-caption); text-align: center; color: var(--text-muted); }
.studio-page .workspace-starting .starter-examples { max-width: 760px; margin: var(--space-6) auto; gap: var(--space-4); }
.studio-page .starter-examples button { border-color: #e9e9ec; background: var(--surface-subtle); border-radius: var(--radius-20); text-align: left; gap: var(--space-2); }
.studio-page .starter-examples button:hover { border-color: #c4c5cc; background: var(--surface-mist); }
.studio-page .starter-examples button > .icon-badge { display: grid; width: 32px; height: 32px; border: 1px solid var(--border-soft); border-radius: var(--radius-10); background: var(--color-snow); color: var(--text-muted); margin-bottom: var(--space-1); }
.studio-page .starter-examples button > .icon-badge .rw-icon { width: 17px; height: 17px; }
.studio-page .starter-examples strong { color: #33363d; font-weight: 500; }
.studio-page .empty-foot { font-size: var(--text-caption); color: var(--text-muted); max-width: 680px; margin-inline: auto; }
@media (min-width: 1600px) { .studio-page .workspace { grid-template-columns: 220px minmax(0,1fr) 330px; } .studio-page .workspace.chat-collapsed { grid-template-columns: 220px minmax(0,1fr); } }
@media (max-width: 1200px) and (min-width: 761px) { .studio-page .workspace, .studio-page .workspace.chat-collapsed { grid-template-columns: 188px minmax(0,1fr); } .studio-page .chat-panel { position: fixed; inset: 84px 12px 12px auto; width: 304px; height: auto; z-index: 15; box-shadow: 0 16px 56px #17191c1c; } .studio-page .project-dashboard { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 900px) { .studio-page .topbar { padding-inline: var(--space-4); gap: var(--space-3); } .studio-page .studio-label { font-size: var(--text-caption); padding-left: 9px; } .studio-page .command-trigger { min-width: 42px; } }
@media (max-width: 760px) {
  .studio-page .topbar { height: auto; padding: var(--space-3) var(--space-4); gap: 10px; }
  .studio-page .wordmark { font-size: 19px; }
  .studio-page .workspace, .studio-page .workspace.chat-collapsed { display: flex; flex-direction: column; padding: var(--space-2); gap: var(--space-2); height: auto; min-height: calc(100dvh - 120px); }
  .studio-page .workspace-sidebar { width: 100%; padding: 10px; border-radius: var(--radius-20); overflow: visible; }
  .studio-page .tabs { flex-direction: row; gap: var(--space-1); overflow-x: auto; padding: 0; }
  .studio-page .tabs button { padding: 11px; font-size: var(--text-caption); }
  .studio-page .workspace-sidebar > .sidebar-label { display: none; }
  .studio-page .main-panel { border-radius: var(--radius-20); }
  .studio-page .projectbar { padding: var(--space-4); gap: var(--space-3); }
  .studio-page .workspace-progress { padding-inline: var(--space-4); }
  .studio-page .tab-panel, .studio-page #scope { padding: var(--space-7) var(--space-4); }
  .studio-page .section-heading h2, .studio-page .tab-panel .section-heading h2, .studio-page #scope .section-heading h2 { font-size: var(--text-30); }
  .studio-page .project-dashboard { grid-template-columns: minmax(0,1fr); }
  .studio-page .dashboard-mission { padding: 22px; }
  .studio-page .dashboard-mission h3 { font-size: var(--text-24); }
  .studio-page .mission-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
  .studio-page .dashboard-readiness { padding: 22px; }
  .studio-page .overview-card, .studio-page .assumptions-card { padding: var(--space-5); border-radius: var(--radius-20); }
  .studio-page .feature-table, .studio-page #scope .feature-table { border: 0; border-radius: 0; }
  .studio-page .scope-group { border-color: var(--border-ui); border-radius: var(--radius-20); background: var(--surface-mist); }
  .studio-page .feature-header { background: transparent; }
  .studio-page .feature-row { border-color: var(--border-soft); border-radius: var(--radius-16); }
  .studio-page .estimate-detail { border: 0; }
  .studio-page .estimate-cards article { padding: 18px; border-radius: var(--radius-20); }
  .studio-page .effort-breakdown > div { padding: var(--space-3); }
  .studio-page .chat-panel { position: fixed; inset: 12px; width: auto; height: auto; max-height: calc(100dvh - 24px); z-index: 30; box-shadow: 0 0 0 200vmax #17191c66,0 20px 60px #17191c26; border-radius: var(--radius-24); padding: var(--space-6); }
  .studio-page .workspace-starting .empty-state { padding: var(--space-11) var(--space-4) var(--space-8); }
  .studio-welcome-intro { margin-bottom: var(--space-7); }
  .studio-welcome-copy > p { font-size: var(--text-ui); }
  .studio-page .empty-state h2 { font-size: clamp(36px,9.5vw,48px); line-height: 1.16; margin: 22px 0; }
  .studio-page .idea-start-form { padding: var(--space-5); border-radius: var(--radius-24); }
  .studio-page .idea-start-form textarea { padding: 14px; font-size: var(--text-16); }
  .studio-page .starter-examples button { flex-direction: row; flex-wrap: wrap; gap: 6px var(--space-3); align-items: center; }
  .studio-page .starter-examples button > .icon-badge { display: grid; grid-row: span 2; margin: 0; }
  .studio-page .starter-examples button strong { flex: 1; }
  .studio-page .starter-examples button > span:last-child { flex-basis: 100%; padding-left: var(--space-11); }
}
@media (prefers-reduced-motion: no-preference) { .studio-page :is(.primary,.outline,.send,.starter-examples button,.tabs button) { transition: background-color var(--duration-160),border-color var(--duration-160); } }

/* Studio navigation uses the same graphite and blue accent as Runwise's public design. */
.studio-page .workspace-sidebar { background: #f7f7f8; border-color: var(--border-ui); box-shadow: 0 8px 28px #17191c07; }
.studio-page .sidebar-project { margin: 0 var(--space-1) var(--space-6); padding: 0 var(--space-1) 22px; border-bottom: 1px solid var(--border-ui); }
.studio-page .project-avatar { background: #202126; border-color: #202126; color: var(--color-snow); box-shadow: 0 5px 14px #20212620; }
.studio-page .tabs button { transition: background-color var(--duration-180), color var(--duration-180), transform var(--duration-180); }
.studio-page .tabs button:hover { background: var(--color-snow); transform: translateX(2px); }
.studio-page .tabs button.active, .studio-page .tabs button.active:hover { background: #202126; color: var(--color-snow); box-shadow: 0 7px 18px #2021261e; transform: none; }
.studio-page .tabs button.active .rw-icon { color: #dce7ff; }
.studio-page .tabs button.active[data-count]:not([data-count=""])::after { background: #ffffff24; color: var(--color-snow); }
.studio-page .sidebar-insight { background: var(--brand-tint); border-color: var(--brand-line); }
.studio-page .sidebar-insight .sidebar-label, .studio-page .sidebar-insight p, .studio-page .sidebar-insight .text-action { color: var(--brand-ink); }
.studio-page .sidebar-insight .text-action:hover { text-decoration: underline; }
.studio-page .main-panel { box-shadow: 0 8px 28px #17191c06; }
.studio-page .workspace-progress { position: relative; }
.studio-page .workspace-progress::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: var(--space-2); border-radius: var(--radius-round); background: var(--brand-primary); box-shadow: var(--shadow-ring); vertical-align: 1px; }
.studio-page .dashboard-mission { background: linear-gradient(125deg,var(--brand-tint) 10%,#f8faff 100%); box-shadow: 0 12px 30px #173f9f0d; }
.studio-page .dashboard-readiness { box-shadow: 0 8px 24px #17191c05; }
.studio-page .studio-welcome-intro { position: relative; }
.studio-page .studio-welcome-intro::before { content: ""; position: absolute; z-index: -1; top: -52px; left: 50%; width: min(520px,80vw); height: 240px; transform: translateX(-50%); background: radial-gradient(ellipse,#dce7ff99 0%,transparent 72%); pointer-events: none; }
.studio-page .idea-start-form { box-shadow: 0 14px 44px #17191c0b; }
.studio-page .starter-examples button:hover { transform: translateY(-2px); box-shadow: 0 10px 24px #17191c0c; }
@media (max-width:760px) { .studio-page .sidebar-project { display: none; } .studio-page .tabs button:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) { .studio-page .tabs button, .studio-page .starter-examples button { transition: none; } .studio-page .starter-examples button:hover { transform: none; } }

.studio-page .coverage-note { margin-block: var(--space-2) var(--space-3); padding: 0; overflow: hidden; background: #f8faff; border-color: var(--brand-line); border-radius: var(--radius-14); }
.studio-page .coverage-note summary { display: flex; align-items: center; min-height: 42px; padding: 10px var(--space-4); color: var(--brand-ink); font-size: var(--text-caption); font-weight: 600; cursor: pointer; list-style: none; }
.studio-page .coverage-note summary::-webkit-details-marker { display: none; }
.studio-page .coverage-note summary::before { content: "i"; display: grid; place-items: center; width: 18px; height: 18px; margin-right: 9px; border: 1px solid #8aa8e5; border-radius: var(--radius-round); font-family: Georgia,serif; font-size: var(--text-caption); font-style: italic; }
.studio-page .coverage-note summary::after { content: "+"; margin-left: auto; font-size: var(--text-17); font-weight: 400; line-height: 1; }
.studio-page .coverage-note[open] summary::after { content: "−"; }
.studio-page .coverage-note p { margin: 0; padding: 0 var(--space-4) 14px 43px; color: #664737; font-size: var(--text-caption); line-height: 1.65; }
.studio-page .coverage-note p { color: var(--brand-ink); }
.studio-page .coverage-note summary:hover { background: var(--brand-tint); }

@media (min-width:761px) and (max-width:980px) {
  .studio-page .workspace, .studio-page .workspace.chat-collapsed { display: flex; flex-direction: column; height: calc(100dvh - 72px); gap: var(--space-2); }
  .studio-page .workspace-sidebar { flex: none; width: 100%; padding: var(--space-2); overflow: visible; border-radius: var(--radius-16); }
  .studio-page .sidebar-project, .studio-page .workspace-sidebar > .sidebar-label, .studio-page .sidebar-insight, .studio-page .sidebar-bottom { display: none; }
  .studio-page .tabs { flex-direction: row; gap: var(--space-1); overflow-x: auto; scrollbar-width: thin; }
  .studio-page .tabs button { flex: 0 0 auto; min-height: 42px; padding: 9px 13px; white-space: nowrap; }
  .studio-page .tabs button:hover { transform: none; }
  .studio-page .main-panel { flex: 1; width: 100%; height: auto; min-height: 0; border-radius: var(--radius-20); }
  .studio-page .project-dashboard { grid-template-columns: minmax(0,1fr); }
  .studio-page .preview-toolbar { flex-direction: row; align-items: center; }
  .studio-page .preview-controls { justify-content: flex-end; }
  .studio-page .chat-panel { top: 84px; }
}
@media (max-width:760px) {
  .studio-page .coverage-note { margin: var(--space-2) var(--space-4) var(--space-3); }
}

/* Keep the project identity, two primary actions and current step readable in a
   narrow viewport without consuming most of the first screen. */
@media (max-width: 760px) {
  .studio-page .projectbar { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 10px 14px; gap: var(--space-2); }
  .studio-page .projectbar > div:first-child { flex: none; min-width: 0; }
  .studio-page .projectbar > .project-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); width: 100%; gap: var(--space-2); }
  .studio-page .projectbar .project-actions button { width: 100%; min-width: 0; min-height: 44px; padding: var(--space-2); font-size: var(--text-caption); white-space: nowrap; justify-content: center; }
  .studio-page .projectbar #build { gap: 5px; }
  .studio-page .projectbar #build .rw-icon { width: 15px; height: 15px; flex: none; }
  .studio-page .workspace-progress { padding: 6px 14px; }
  .studio-page .run-activity, .studio-page .run-activity.compact { padding: var(--space-1) 14px; }
  .studio-page .coverage-note { margin: 6px 14px var(--space-2); }
  .studio-page .coverage-note summary { min-height: 38px; padding: 7px 10px; }
  .studio-page .coverage-note p { padding: 0 10px var(--space-3) 37px; }
  .studio-page .tab-panel, .studio-page #scope { padding-block: var(--space-5); }
}
@media (max-width: 420px) {
  .studio-page .topbar { height: 64px; min-height: 64px; padding: var(--space-2) var(--space-3); flex-wrap: nowrap; gap: var(--space-2); }
  .studio-page .wordmark { font-size: var(--text-17); }
  .studio-page .topbar .command-trigger { margin-left: auto; width: 44px; min-width: 44px; }
  .studio-page .topbar .top-actions { width: auto; margin-left: 0; flex-wrap: nowrap; }
  .studio-page .topbar > .top-actions > .client-entry { display: none; }
  .studio-page .action-label-full { display: none; }
  .studio-page .action-label-short { display: inline; }
  .studio-page .constructor-action-menu .client-entry-menu { display: flex; align-items: center; gap: var(--space-2); min-height: 44px; padding: 9px 11px; border-radius: var(--radius-10); font-size: var(--text-small); text-decoration: none; }
  .studio-page .constructor-action-menu .client-entry-menu:hover { background: var(--surface-selected); }
  .studio-page .run-activity.compact .run-heading strong { display: none; }
  .studio-page .run-activity.compact .run-heading { flex-wrap: nowrap; gap: var(--space-2); min-height: 36px; }
  .studio-page .run-activity.compact .run-heading > span { margin-left: 0; }
  .studio-page .run-activity.compact .run-heading .quiet { margin-left: auto; white-space: nowrap; }
  .studio-page .scope-viewbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .studio-page .scope-viewbar label, .studio-page .scope-viewbar .scope-summary { grid-column: 1 / -1; }
  .studio-page .scope-viewbar :is(#expand-groups, #collapse-groups) { width: 100%; min-height: 44px; border: 1px solid #e2e2e5; border-radius: var(--radius-pill); background: var(--color-snow); text-align: center; }
}

/* Runwise adaptations of Magic UI's Magic Card, Border Beam and Shimmer Button. */
.studio-page .rw-magic-card { position: relative; isolation: isolate; overflow: hidden; }
.studio-page .rw-magic-card > * { position: relative; z-index: 1; }
.studio-page .rw-magic-card::before,
.studio-page .rw-magic-card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity var(--duration-200) ease; }
.studio-page .rw-magic-card::before { z-index: 0; background: radial-gradient(230px circle at var(--rw-magic-x,50%) var(--rw-magic-y,50%),#2449e922,transparent 75%); }
.studio-page .rw-magic-card::after { z-index: 2; padding: 1px; background: radial-gradient(260px circle at var(--rw-magic-x,50%) var(--rw-magic-y,50%),var(--brand-primary),transparent 70%); -webkit-mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); mask-composite: exclude; }
.studio-page .dashboard-mission.rw-magic-card::before { background: radial-gradient(240px circle at var(--rw-magic-x,50%) var(--rw-magic-y,50%),#edf3ff87,transparent 75%); }
.studio-page .dashboard-mission.rw-magic-card::after { inset: 0; width: auto; height: auto; border: 0; background: radial-gradient(260px circle at var(--rw-magic-x,50%) var(--rw-magic-y,50%),var(--brand-primary),transparent 70%); }
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  .studio-page .rw-magic-card:hover::before,
  .studio-page .rw-magic-card:hover::after { opacity: 1; }
}

@property --rw-beam-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes rw-border-travel { to { --rw-beam-angle: 360deg; } }
.studio-page .rw-border-beam { position: relative; }
.studio-page .rw-border-beam::after { content: ""; position: absolute; z-index: 2; inset: 0; padding: 2px; border-radius: inherit; pointer-events: none; background: conic-gradient(from var(--rw-beam-angle),transparent 0 74%,#c8d7ff 81%,var(--brand-primary) 87%,transparent 93%); -webkit-mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); mask-composite: exclude; animation: rw-border-travel 9s linear infinite; }
.studio-page .rw-shimmer-button { position: relative; isolation: isolate; }
.studio-page .rw-shimmer-button::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 2px; pointer-events: none; background: conic-gradient(from var(--rw-beam-angle),transparent 0 79%,var(--brand-tint) 85%,#8eacff 89%,transparent 94%); -webkit-mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0); mask-composite: exclude; animation: rw-border-travel 7s linear infinite; }
.studio-page .rw-shimmer-button:disabled::after { content: none; }
@media (prefers-reduced-motion:reduce) {
  .studio-page .rw-magic-card::before,
  .studio-page .rw-magic-card::after,
  .studio-page .rw-border-beam::after,
  .studio-page .rw-shimmer-button::after { content: none; animation: none; transition: none; }
}

/* The prototype's natural next step is an explicit, reviewed project conversation. */
.studio-page .preview-review-next { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); margin-top: 22px; padding: var(--space-6); border: 1px solid var(--brand-line); border-radius: var(--radius-24); background: linear-gradient(120deg,#f8faff,var(--brand-tint)); color: var(--brand-ink); }
.studio-page .preview-review-next[hidden] { display: none; }
.studio-page .preview-review-next .card-kicker { margin: 0 0 var(--space-2); color: var(--brand-ink); font-size: var(--text-11); letter-spacing: .06em; }
.studio-page .preview-review-next h3 { margin: 0 0 7px; color: var(--brand-ink); font-family: var(--font-display,Georgia,serif); font-size: var(--text-25); font-weight: 400; line-height: 1.15; }
.studio-page .preview-review-next p:last-child { max-width: 560px; margin: 0; color: #39567f; font-size: var(--text-small); line-height: 1.6; }
.studio-page .preview-review-next .primary { flex: none; border-radius: 999px; }
@media (max-width:760px) { .studio-page .preview-review-next { flex-direction: column; align-items: stretch; padding: var(--space-5); } .studio-page .preview-review-next .primary { width: 100%; } }

/* Orientation and action feedback within the established editorial identity. */
.studio-start-path { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); max-width:760px; margin:0 auto var(--space-6); padding:0; list-style:none; border:1px solid var(--line); border-radius:var(--radius-16); background:var(--surface-subtle); }
.studio-start-path li { display:flex; align-items:center; gap:var(--space-3); min-width:0; padding:var(--space-4); }
.studio-start-path li + li { border-left:1px solid var(--line); }
.studio-start-path li > span { display:grid; place-items:center; width:28px; height:28px; flex:none; border-radius:var(--radius-round); background:var(--brand-tint); color:var(--brand-ink); font-size:var(--text-caption); }
.studio-start-path strong { display:block; font-size:var(--text-small); font-weight:500; }
.studio-start-path small { display:block; margin-top:3px; color:var(--muted); font-size:var(--text-caption); line-height:1.4; }
.studio-page .idea-start-form:focus-within { border-color:#9bb0f5; box-shadow:var(--shadow-ring); }
.studio-page .starter-examples-label { max-width:760px; margin:var(--space-6) auto 0; color:var(--muted); font-size:var(--text-small); text-align:left; }
.studio-page .workspace-starting .starter-examples { margin-top:var(--space-3); }
.studio-page .starter-examples strong { display:flex; justify-content:space-between; align-items:start; gap:var(--space-2); width:100%; }
.studio-page .starter-examples strong > span { flex:none; color:var(--brand-primary); }
.studio-page .starter-examples button > .icon-badge { color:var(--brand-primary); background:var(--brand-tint); border-color:var(--brand-line); }
.studio-page .starter-examples button:hover { border-color:#a3b7f0; background:var(--surface-subtle); transform:none; box-shadow:none; }
.studio-page .rw-magic-card:focus-within::after { opacity:1; }
.studio-page .rw-shimmer-button::after { opacity:0; animation-play-state:paused; }
.studio-page .rw-shimmer-button:is(:hover,:focus-visible)::after { opacity:1; animation-play-state:running; }
@media (min-width:1101px) {
  .studio-page .workspace-starting .empty-state { display:grid; grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr); align-items:start; column-gap:var(--space-11); row-gap:var(--space-5); max-width:1120px; padding-top:var(--space-12); }
  .studio-page .workspace-starting .studio-welcome-intro { grid-column:1; margin:var(--space-3) 0 0; text-align:left; }
  .studio-page .workspace-starting .studio-welcome-copy > p { margin:0; max-width:40ch; }
  .studio-page .workspace-starting .empty-state h2 { font-size:52px; margin:var(--space-5) 0; }
  .studio-page .workspace-starting .studio-start-path { grid-column:1; width:100%; margin:0; grid-template-columns:minmax(0,1fr); }
  .studio-page .workspace-starting .studio-start-path li { padding:var(--space-3) var(--space-4); align-items:center; }
  .studio-page .workspace-starting .studio-start-path li + li { border-left:0; border-top:1px solid var(--line); }
  .studio-page .workspace-starting .idea-start-form { grid-column:2; grid-row:1 / span 2; width:100%; margin:0; }
  .studio-page .workspace-starting .starter-examples-label { grid-column:1 / -1; width:100%; max-width:none; margin:var(--space-3) 0 -8px; }
  .studio-page .workspace-starting .starter-examples { grid-column:1 / -1; width:100%; max-width:none; margin:0; }
  .studio-page .workspace-starting .empty-foot { grid-column:1 / -1; margin-top:0; }
}
@media (max-width:760px) {
  .studio-page .workspace-starting .empty-state { padding-top:var(--space-7); }
  .studio-page .empty-state h2 { font-size:clamp(34px,8.5vw,44px); margin:var(--space-4) 0; }
  .studio-page .studio-welcome-intro { margin-bottom:var(--space-5); }
  .studio-start-path li { padding:var(--space-3); gap:var(--space-2); align-items:start; }
  .studio-start-path small { display:none; }
  .studio-start-path li > span { width:22px; height:22px; font-size:var(--text-caption); }
  .studio-start-path strong { font-size:var(--text-caption); padding-top:2px; }
  .studio-page .starter-examples strong { width:auto; }
}
@media (max-width:360px) {
  .studio-start-path li { flex-direction:column; gap:6px; }
}

/* Keep editable product text comfortable on touch devices without browser zoom. */
@media (max-width:640px), (pointer:coarse) {
  .studio-page :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea) { font-size:var(--text-16); }
}
@media (max-width:640px) {
  .studio-page .coverage-note summary { min-height:44px; }
}
