:root {
  --ink: #203d52;
  --ink-2: #132c3d;
  --cyan: #3ecfd9;
  --yellow: #ffcc49;
  --violet: #b077dd;
  --paper: #f4f7f8;
  --white: #fff;
  --line: #dce5e9;
  --muted: #5d707b;
  --green: #15967d;
  --red: #c94f5a;
  --shadow: 0 22px 60px rgba(19, 44, 61, 0.11);
}

* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; min-width: 320px; color: var(--ink-2); background: var(--paper); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 20px; color: white; background: var(--ink); display: flex; flex-direction: column; overflow: hidden; }
.brand { display: flex; align-items: center; gap: 11px; color: white; text-decoration: none; font-weight: 800; font-size: 1.28rem; letter-spacing: -.02em; }
.brand-mark { width: 31px; height: 31px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.brand-mark i { border: 5px solid currentColor; border-right: 0; border-bottom: 0; border-radius: 2px 0 0 0; }
.brand-mark i:nth-child(1) { color: var(--cyan); }
.brand-mark i:nth-child(2) { color: var(--yellow); }
.brand-mark i:nth-child(3) { color: var(--violet); grid-column: 2; }
.nav { margin-top: 48px; display: grid; gap: 8px; }
.nav button { width: 100%; color: #dce7ed; border: 0; background: transparent; border-radius: 10px; padding: 11px 12px; display: flex; gap: 12px; align-items: center; text-align: left; }
.nav button.active, .nav button:hover { color: white; background: #ffffff12; }
.sidebar-foot { margin-top: auto; padding: 16px 12px 5px; border-top: 1px solid #ffffff18; color: #aec1cb; font-size: .78rem; line-height: 1.6; }
.mode { display: flex; gap: 8px; align-items: center; color: #dce7ed; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px #3ecfd91a; }
.main { min-width: 0; }
.topbar { height: 82px; padding: 0 clamp(24px, 4vw, 58px); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: #f4f7f8e8; backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.breadcrumbs { color: var(--muted); font-size: .88rem; }
.profile { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; border-radius: 50%; background: white; border: 1px solid var(--line); color: var(--ink); font-weight: 800; font-size: .78rem; }
.logout-link { margin-top: 12px; padding: 0; border: 0; color: #dce7ed; background: transparent; font-size: .78rem; text-decoration: underline; text-underline-offset: 3px; }
.content { width: min(1230px, 100%); margin: 0 auto; padding: 42px clamp(24px, 4vw, 58px) 70px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-weight: 700; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; color: var(--ink); font-size: clamp(2rem, 4vw, 3.35rem); letter-spacing: -.045em; line-height: .98; }
.intro { max-width: 590px; margin: 14px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.primary, .secondary, .ghost { min-height: 44px; border-radius: 11px; padding: 0 16px; border: 1px solid transparent; font-weight: 750; display: inline-flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none; }
.primary { color: white; background: var(--ink); box-shadow: 0 8px 20px #203d5222; }
.primary:hover { background: var(--ink-2); transform: translateY(-1px); }
.secondary { color: var(--ink); background: white; border-color: var(--line); }
.ghost { color: var(--ink); background: transparent; padding-inline: 10px; }
.primary:disabled, .secondary:disabled { opacity: .55; cursor: wait; transform: none; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: white; border-radius: 16px; margin-bottom: 28px; overflow: hidden; }
.metric { padding: 19px 22px; display: flex; align-items: center; gap: 14px; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 10px; color: var(--ink); background: #3ecfd91a; }
.metric:nth-child(2) .metric-icon { background: #ffcc4926; }
.metric:nth-child(3) .metric-icon { background: #b077dd1a; }
.metric b { display: block; color: var(--ink); font-size: 1.22rem; }
.metric span { color: var(--muted); font-size: .83rem; }
.section-row { display: flex; justify-content: space-between; align-items: center; margin: 31px 0 16px; }
.section-row h2 { margin: 0; color: var(--ink); font-size: 1.05rem; }
.filters { display: flex; gap: 6px; }
.filters button { border: 0; background: transparent; color: var(--muted); padding: 7px 10px; border-radius: 8px; font-size: .82rem; }
.filters button.active { background: white; color: var(--ink); box-shadow: 0 2px 8px #203d5210; }
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.app-card { min-height: 245px; background: white; border: 1px solid var(--line); border-radius: 17px; padding: 21px; display: flex; flex-direction: column; box-shadow: 0 4px 16px #203d5207; transition: transform .18s ease, box-shadow .18s ease; }
.app-card:hover { transform: translateY(-3px); box-shadow: 0 17px 40px #203d5212; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.app-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); background: linear-gradient(135deg, #3ecfd928, #b077dd1f); font-weight: 850; }
.app-icon.asnr { color: #153e75; background: linear-gradient(135deg, #dbeafe, #cffafe); }
.status { padding: 6px 9px; border-radius: 999px; font-size: .72rem; font-weight: 750; }
.status.deployed, .status.preview { color: #08745f; background: #daf6ef; }
.status.draft { color: #776016; background: #fff4ca; }
.status.deploying { color: #185fa9; background: #e0efff; }
.status.error { color: #9f2633; background: #ffe1e4; }
.app-card h3 { margin: 19px 0 8px; color: var(--ink); font-size: 1.03rem; }
.app-card p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.55; }
.card-bottom { margin-top: auto; padding-top: 20px; border-top: 1px solid #edf1f3; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.meta { color: #61737d; font-size: .75rem; }
.round-link { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); background: white; color: var(--ink); border-radius: 50%; }
.empty { grid-column: 1/-1; border: 1px dashed #b9c8cf; border-radius: 16px; padding: 48px; text-align: center; color: var(--muted); }

.workspace { min-height: calc(100vh - 82px); padding: 28px clamp(24px, 4vw, 58px) 36px; display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; }
.chat { min-height: 0; background: white; border: 1px solid var(--line); border-radius: 18px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.chat-head { min-height: 76px; padding: 15px 21px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.chat-title { display: flex; align-items: center; gap: 13px; min-width: 0; }
.chat-title h1 { font-size: 1.12rem; letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title p { margin: 4px 0 0; color: var(--muted); font-size: .76rem; }
.messages { height: calc(100vh - 305px); min-height: 370px; padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; scroll-behavior: smooth; background: linear-gradient(#fff, #fbfcfd); }
.message { max-width: min(740px, 84%); display: flex; gap: 11px; align-items: flex-start; }
.message.user { align-self: flex-end; flex-direction: row-reverse; }
.avatar { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ink); color: white; font-size: .72rem; font-weight: 800; }
.message.user .avatar { border-radius: 50%; color: var(--ink); background: #e8eef1; }
.bubble { border-radius: 4px 15px 15px 15px; padding: 13px 15px; background: #f0f5f7; color: #314853; font-size: .92rem; line-height: 1.6; white-space: pre-wrap; }
.message.user .bubble { border-radius: 15px 4px 15px 15px; color: white; background: var(--ink); }
.message time { display: block; color: #61737d; font-size: .68rem; margin-top: 6px; }
.message.user time { text-align: right; }
.composer-wrap { border-top: 1px solid var(--line); padding: 14px 17px 16px; }
.ready-note { margin: 0 0 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #1f6268; background: #e8fafa; border: 1px solid #c8eff1; border-radius: 11px; padding: 10px 12px; font-size: .8rem; }
.composer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.composer textarea { width: 100%; min-height: 47px; max-height: 120px; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; color: var(--ink); background: white; outline: none; line-height: 1.45; }
.composer textarea:focus { border-color: #70dce3; box-shadow: 0 0 0 3px #3ecfd920; }
.voice-controls { display:flex; align-items:center; flex-wrap:wrap; gap:8px 12px; margin-top:8px; min-width:0; }
.composer > .voice-controls,.composer > .voice-panel { grid-column:1 / -1; }
.voice-button { display:inline-flex; align-items:center; gap:7px; min-height:42px; padding:8px 12px; border:1px solid #c8d8df; border-radius:12px; background:#f4f9fa; color:var(--ink); font:inherit; font-size:.8rem; cursor:pointer; }
.voice-button:focus-visible { outline:3px solid #70dce3; outline-offset:2px; }
.voice-button:disabled { opacity:.6; cursor:default; }
.voice-button.recording { background:#e9f7f3; border-color:#72b5a5; color:#216b59; }
.voice-limit { color:var(--muted); font-size:.7rem; line-height:1.5; }
.voice-panel { margin-top:8px; padding:10px 12px; border:1px solid #c8d8df; border-radius:12px; background:#f4f9fa; min-width:0; }
.voice-panel p { margin:5px 0 0; color:var(--ink); font-size:.78rem; line-height:1.5; overflow-wrap:anywhere; }
.voice-recording { display:flex; align-items:center; gap:12px; }
.voice-wave { display:flex; align-items:center; gap:3px; height:32px; }
.voice-wave i { display:block; width:4px; height:3px; border-radius:3px; background:#357b6b; transition:height 220ms ease-out; }
.voice-clock { font-variant-numeric:tabular-nums; font-size:.78rem; color:var(--ink); }
.voice-recovery { display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; }
.voice-recovery button { min-height:42px; }
.voice-panel [hidden],.voice-panel[hidden] { display:none; }
.send { width: 47px; height: 47px; border: 0; border-radius: 12px; background: var(--ink); color: white; display: grid; place-items: center; }
.send:disabled { background: #aebbc1; cursor: not-allowed; }
.sidepanel { display: flex; flex-direction: column; gap: 14px; }
.panel { border-radius: 16px; border: 1px solid var(--line); background: white; padding: 18px; }
.panel h2 { margin: 0 0 16px; color: var(--ink); font-size: .9rem; }
.detail-list { display: grid; gap: 13px; }
.detail { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .8rem; }
.detail span { color: var(--muted); }
.detail b { color: var(--ink); font-size: .78rem; text-align: right; }
.theme-swatch { display: flex; gap: 5px; }
.theme-swatch i { width: 14px; height: 14px; border-radius: 4px; }
.urlbox { padding: 11px; border-radius: 10px; color: #4b626d; background: #f2f6f7; font: .72rem ui-monospace, monospace; overflow-wrap: anywhere; }
.guardrails { display: grid; gap: 10px; }
.guard { display: flex; gap: 9px; color: var(--muted); font-size: .76rem; line-height: 1.4; }
.guard svg { flex: 0 0 15px; color: var(--green); margin-top: 1px; }

.modal-backdrop { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 18px; background: #0e2636a8; backdrop-filter: blur(7px); }
.modal { width: min(490px, 100%); border-radius: 21px; background: white; box-shadow: 0 28px 90px #071a2766; overflow: hidden; }
.modal-head { padding: 24px 25px 19px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; color: var(--ink); font-size: 1.25rem; }
.modal-head p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; font-size: .86rem; }
.modal-body { padding: 22px 25px 25px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-size: .8rem; color: var(--ink); font-weight: 750; }
.field input, .field select { height: 45px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; outline: none; }
.theme-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.theme-option { border: 1px solid var(--line); border-radius: 12px; padding: 13px; background: white; text-align: left; }
.theme-option.active { border-color: var(--ink); box-shadow: 0 0 0 2px #203d5210; }
.theme-option b { display: block; color: var(--ink); font-size: .85rem; margin-bottom: 7px; }
.theme-option span { display: flex; gap: 5px; }
.theme-option i { width: 19px; height: 8px; border-radius: 5px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 24px; }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .88fr) 1.12fr; background: white; }
.login-brand { position: relative; overflow: hidden; padding: clamp(32px, 5vw, 72px); color: white; background: var(--ink); display: flex; flex-direction: column; justify-content: space-between; }
.login-brand::after { content: ''; position: absolute; right: -90px; bottom: 8%; width: 330px; height: 330px; border: 74px solid #3ecfd91b; border-radius: 50%; box-shadow: 0 0 0 74px #b077dd0e, 0 0 0 148px #ffcc4909; }
.login-brand > * { position: relative; z-index: 1; }
.login-brand .brand { align-self: flex-start; }
.login-brand .brand small { font-weight: 500; opacity: .65; }
.login-brand h1 { max-width: 560px; color: white; font-size: clamp(2.8rem, 5.5vw, 5.6rem); line-height: .93; }
.login-brand p:not(.eyebrow) { max-width: 500px; margin: 22px 0 0; color: #c9d8df; font-size: 1.05rem; line-height: 1.7; }
.login-brand .eyebrow { color: var(--cyan); }
.login-foot { color: #9fb4bf; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.login-panel { display: grid; place-items: center; padding: 36px; background: linear-gradient(145deg, #fff, #f4f7f8); }
.login-card { width: min(430px, 100%); }
.login-heading { margin-bottom: 30px; }
.login-heading h2 { margin: 18px 0 6px; color: var(--ink); font-size: 1.8rem; }
.login-heading p { margin: 0; color: var(--muted); }
.login-symbol { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; color: var(--ink); background: linear-gradient(135deg, #3ecfd933, #b077dd22); font-weight: 850; }
.login-card .field { margin-bottom: 17px; }
.login-card .field input { height: 50px; font-size: 1rem; }
.login-card .field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px #3ecfd920; }
.login-submit { width: 100%; min-height: 50px; margin-top: 4px; }
.login-help { margin: 17px 0 0; color: #7c8e98; text-align: center; font-size: .78rem; line-height: 1.5; }
.form-error { margin-bottom: 18px; padding: 11px 13px; border: 1px solid #f2c4c8; border-radius: 10px; color: #9f2633; background: #fff0f1; font-size: .84rem; }

.accounts-modal { width: min(680px, 100%); max-height: min(820px, calc(100vh - 36px)); overflow-y: auto; }
.account-list { display: grid; gap: 9px; max-height: 220px; overflow-y: auto; }
.account-row { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; }
.account-avatar { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: white; background: var(--ink); font-size: .7rem; font-weight: 800; }
.account-row b, .account-row small { display: block; }
.account-row b { color: var(--ink); font-size: .86rem; }
.account-row small { margin-top: 3px; color: var(--muted); font-size: .72rem; }
.account-form { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.account-form h3 { margin: 0 0 15px; color: var(--ink); font-size: .95rem; }
.account-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.account-form .field { margin-bottom: 12px; }
.role-choice { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; color: var(--muted); font-size: .8rem; }

.deployment { width: min(620px, 100%); max-height: calc(100dvh - 36px); overflow-y: auto; }
.deploy-body { padding: 24px 26px 27px; }
.deploy-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 0 0 10px; color: var(--ink); font-size: .83rem; }
.deploy-summary span { font-weight: 750; }
.deploy-summary b { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.progress-track { height: 7px; border-radius: 10px; background: #e7edef; overflow: hidden; margin: 5px 0 25px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--cyan), var(--violet)); transition: width .45s ease; }
.poll-warning { margin: -12px 0 16px; padding: 9px 11px; border-radius: 9px; color: #776016; background: #fff4ca; font-size: .76rem; }
.steps { display: grid; gap: 0; }
.step { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 11px; align-items: center; min-height: 48px; color: #61737d; font-size: .87rem; transition: color .2s ease; }
.step:not(:last-child)::after { content: ''; position: absolute; left: 14px; top: 37px; width: 1px; height: 21px; background: var(--line); }
.step-icon { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); background: white; font-size: .72rem; }
.step.done, .step.active { color: var(--ink); }
.step.done .step-icon { color: white; background: var(--green); border-color: var(--green); }
.step.active .step-icon { color: var(--ink); border-color: var(--cyan); box-shadow: 0 0 0 5px #3ecfd91f; }
.step.error .step-icon { color: white; background: var(--red); border-color: var(--red); }
.step small { color: #9aa8ae; }
.deploy-result { margin-top: 20px; padding: 16px; border: 1px solid #bee9df; background: #edfbf7; border-radius: 12px; }
.deploy-result b { display: block; color: #086e5a; margin-bottom: 7px; }
.deploy-result a { color: var(--ink); font-size: .82rem; overflow-wrap: anywhere; }
.error-result { border-color: #f2c4c8; background: #fff0f1; }
.error-result b { color: #9f2633; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 80; color: white; background: var(--ink-2); padding: 13px 16px; border-radius: 11px; box-shadow: var(--shadow); font-size: .85rem; animation: slide .2s ease; }

/* Project framing workspace */
.brief-workspace { width: min(1480px, 100%); margin: 0 auto; padding: 30px clamp(18px, 3vw, 42px) 54px; }
.demo-banner { display:flex; gap:10px; align-items:center; margin-bottom:18px; padding:11px 14px; border:1px solid #eed58a; border-radius:11px; color:#725811; background:#fff8df; font-size:.82rem; }
.brief-titlebar { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:24px; }
.brief-titlebar h1 { font-size:clamp(1.8rem,3vw,2.55rem); }
.brief-titlebar p:not(.eyebrow) { max-width:700px; margin:10px 0 0; color:var(--muted); line-height:1.55; }
.brief-status,.count-pill { flex:0 0 auto; padding:8px 11px; border-radius:999px; color:#536872; background:#eef3f5; font-size:.76rem; font-weight:750; }
.brief-columns { display:grid; grid-template-columns:minmax(0,1.08fr) minmax(350px,.92fr); align-items:start; gap:20px; }
.brief-chat,.brief-panel { border:1px solid var(--line); border-radius:17px; background:white; box-shadow:var(--shadow); }
.brief-chat { overflow:hidden; }
.brief-chat-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 19px; border-bottom:1px solid var(--line); }
.brief-chat-head b,.brief-chat-head span { display:block; }
.brief-chat-head b { color:var(--ink); font-size:.9rem; }
.brief-chat-head span { margin-top:4px; color:var(--muted); font-size:.74rem; }
.brief-chat-head .demo-dot { margin:0; padding:6px 9px; border-radius:99px; background:#e7f8f8; color:#26747a; font-weight:700; white-space:nowrap; }
.brief-messages { display:flex; flex-direction:column; gap:16px; height:min(57vh,620px); min-height:360px; overflow-y:auto; padding:22px; background:linear-gradient(#fff,#fbfcfd); }
.brief-messages .message { max-width:min(720px,90%); }
.welcome-card { align-self:center; max-width:420px; margin:auto; padding:26px; border:1px solid #e6eef1; border-radius:15px; background:white; text-align:left; box-shadow:0 12px 35px #203d5209; }
.welcome-mark { display:grid; place-items:center; width:39px; height:39px; border-radius:12px; color:var(--ink); background:#e8fafa; font-size:.8rem; font-weight:850; }
.welcome-card h2 { margin:17px 0 8px; color:var(--ink); font-size:1.12rem; }
.welcome-card p { margin:0; color:var(--muted); font-size:.87rem; line-height:1.65; }
.brief-composer { padding:14px 17px 16px; border-top:1px solid var(--line); }
.brief-composer textarea { display:block; width:100%; min-height:88px; max-height:190px; resize:vertical; border:1px solid var(--line); border-radius:12px; padding:12px 13px; outline:none; line-height:1.5; }
.brief-composer textarea:focus,.proposal-edit:focus { border-color:#70dce3; box-shadow:0 0 0 3px #3ecfd920; }
.composer-bottom { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:10px; }
.composer-bottom span,.subtle { color:var(--muted); font-size:.76rem; }
.brief-side { display:flex; flex-direction:column; gap:14px; min-width:0; }
.brief-panel { padding:18px; box-shadow:0 4px 18px #203d5208; }
.brief-panel h2 { margin:0; color:var(--ink); font-size:1rem; }
.brief-panel > p { color:var(--muted); font-size:.8rem; line-height:1.55; }
.row-between,.proposal-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.brief-counts { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin:15px 0 17px; }
.brief-counts div { padding:10px; border-radius:10px; background:#f4f7f8; }
.brief-counts b,.brief-counts span { display:block; }
.brief-counts b { color:var(--ink); font-size:1.05rem; }
.brief-counts span { margin-top:2px; color:var(--muted); font-size:.68rem; }
.brief-section { margin-top:15px; padding-top:14px; border-top:1px solid #edf1f3; }
.brief-section h3,.proposal-heading h3 { margin:0; color:var(--ink); font-size:.85rem; }
.brief-entry { margin-top:9px; padding:11px; border:1px solid #e8eef0; border-radius:11px; background:#fff; }
.pending-entry { border-color:#f0dda2; background:#fffdf6; }
.entry-meta,.entry-foot { display:flex; justify-content:space-between; align-items:center; gap:8px; }
.entry-meta > span:first-child { color:#566d77; font-size:.69rem; font-weight:750; }
.entry-status { padding:4px 7px; border-radius:99px; background:#edf1f3; color:#52646d; font-size:.65rem; font-weight:750; }
.entry-status.confirmed { color:#08745f; background:#daf6ef; }
.entry-status.open { color:#776016; background:#fff1c2; }
.entry-status.rejected { color:#7b8489; background:#edf0f1; }
.brief-entry > p { margin:9px 0; color:#344d59; font-size:.82rem; line-height:1.55; white-space:pre-wrap; }
.entry-foot { flex-wrap:wrap; color:#82939c; font-size:.66rem; }
.source-link,.deliverable-links a { color:#235d75; font-size:.72rem; font-weight:700; text-decoration:underline; text-underline-offset:3px; overflow-wrap:anywhere; }
.proposal-edit { display:block; width:100%; min-height:65px; margin-top:9px; resize:vertical; border:1px solid var(--line); border-radius:9px; padding:9px; outline:none; color:var(--ink); font:inherit; font-size:.78rem; line-height:1.5; background:#fff; }
.proposal-section { width:100%; height:36px; margin-top:9px; border:1px solid var(--line); border-radius:9px; padding:0 9px; color:var(--ink); background:#fff; font-size:.76rem; }
.proposal-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:7px; margin-top:8px; }
.proposal-actions button,.compact-button { min-height:34px; padding:0 10px; border-radius:9px; font-size:.72rem; }
.text-button { padding:5px; border:0; color:#416c7e; background:transparent; font-size:.71rem; font-weight:750; text-decoration:underline; text-underline-offset:3px; }
.text-button:disabled { opacity:.45; }
.brief-empty { padding:18px 12px; border:1px dashed #cad7dc; border-radius:10px; color:var(--muted); font-size:.78rem; text-align:center; }
.research-form-wrap { margin-top:16px; padding-top:14px; border-top:1px solid #edf1f3; }
.research-form-wrap p { margin:0 0 9px; color:var(--muted); font-size:.72rem; line-height:1.5; }
.research-form-wrap form { display:flex; gap:7px; }
.research-form-wrap input,.admin-panel select { min-width:0; flex:1; height:39px; border:1px solid var(--line); border-radius:9px; padding:0 10px; outline:none; font-size:.76rem; }
.research-form-wrap .secondary { min-height:39px; padding:0 11px; font-size:.72rem; }
.research-result { margin-top:14px; padding:12px; border-radius:10px; background:#f1f7fa; }
.research-result.unavailable { background:#fff6e3; }
.research-result b { color:var(--ink); font-size:.76rem; }
.research-result small { color:#82939c; font-size:.65rem; }
.research-result p { white-space:pre-wrap; color:#435b65; font-size:.76rem; line-height:1.55; }
.research-result > a { display:block; margin-top:6px; overflow-wrap:anywhere; }
.report-panel { border-color:#d9e8ec; background:linear-gradient(145deg,#fff,#f8fbfc); }
.panel-kicker { margin-bottom:6px; color:#578190; font-size:.64rem; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
.full-button { width:100%; margin-top:6px; }
.mockup-panel { background:#fbfafc; }
.deliverable-state { margin-top:12px; padding:11px; border-radius:10px; background:#f1f6f7; }
.deliverable-state.ready { border:1px solid #c8e8de; background:#effaf6; }
.deliverable-state.failed { border:1px solid #f2c4c8; background:#fff2f3; }
.deliverable-state b,.deliverable-state > span { color:var(--ink); font-size:.76rem; }
.deliverable-state p { color:#86424a; font-size:.75rem; line-height:1.45; }
.deliverable-links { display:flex; flex-wrap:wrap; gap:12px; margin-top:8px; }
.deliverable-links .secondary { min-height:34px; padding:0 10px; font-size:.72rem; }
.revision-badge { display:inline-block; margin-left:5px; padding:3px 6px; border-radius:99px; color:#725811; background:#fff1c2; font-size:.62rem; vertical-align:middle; }
.deliverable-history { margin-top:13px; padding-top:10px; border-top:1px solid #e7edef; }
.deliverable-history summary,.manual-entry-details summary { color:#416c7e; font-size:.76rem; font-weight:750; cursor:pointer; }
.deliverable-history .deliverable-state { margin-top:9px; }
.manual-entry-details { margin:16px 0 14px; padding:13px 0; border-top:1px solid #edf1f3; border-bottom:1px solid #edf1f3; }
.manual-entry-details form { display:grid; gap:8px; margin-top:11px; }
.manual-entry-details label { color:#596f79; font-size:.72rem; font-weight:700; }
.manual-entry-details select,.manual-entry-details textarea { width:100%; min-height:38px; border:1px solid var(--line); border-radius:9px; padding:9px; color:var(--ink); background:white; font:inherit; font-size:.76rem; }
.manual-entry-details textarea { min-height:70px; resize:vertical; line-height:1.5; }
.manual-entry-details .primary { min-height:38px; justify-self:start; font-size:.75rem; }
.deliverable-state.busy { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.deliverable-state.busy .text-button { margin-left:auto; }
.mockup-frame { display:block; width:100%; height:350px; margin-top:10px; border:1px solid var(--line); border-radius:9px; background:white; }
.inline-error { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:0 0 15px; padding:11px 13px; border:1px solid #f2c4c8; border-radius:10px; color:#8c2835; background:#fff0f1; font-size:.8rem; }
.inline-error .secondary { min-height:35px; font-size:.73rem; }
.admin-panel form { display:grid; grid-template-columns:1fr auto; align-items:center; gap:8px; }
.admin-panel label { grid-column:1/-1; color:var(--muted); font-size:.72rem; }
.admin-panel .secondary { min-height:39px; font-size:.72rem; }
.account-user-main { flex:1; min-width:0; }
.account-row .text-button { flex:0 0 auto; }
.report-brand-note { display:flex; align-items:center; gap:10px; margin:4px 0 18px; padding:11px 12px; border:1px solid #e4edf0; border-radius:11px; color:#405a66; background:#f8fbfc; font-size:.8rem; font-weight:700; }
.report-brand-note .brand-mark { width:27px; height:27px; }
@keyframes slide { from { opacity: 0; transform: translateY(8px); } }
.spinner { width: 16px; height: 16px; border: 2px solid #ffffff55; border-top-color: white; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (max-width: 1020px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace { grid-template-columns: 1fr; }
  .sidepanel { display: grid; grid-template-columns: 1fr 1fr; }
  .messages { height: 520px; }
  .brief-columns { grid-template-columns:1fr; }
  .brief-messages { height:460px; }
}
@media (max-width: 720px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { min-height: 270px; padding: 28px 24px; gap: 24px; }
  .login-brand h1 { max-width: 420px; font-size: clamp(2.3rem, 12vw, 3.7rem); }
  .login-brand p:not(.eyebrow) { font-size: .95rem; line-height: 1.55; margin-top: 16px; }
  .login-panel { padding: 35px 20px 48px; }
  .account-fields { grid-template-columns: 1fr; }
  .shell { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 14px 18px; flex-direction: row; align-items: center; }
  .brand { font-size: 1.05rem; }
  .brand-mark { width: 26px; height: 26px; }
  .nav, .sidebar-foot { display: none; }
  .topbar { height: 62px; padding: 0 18px; }
  .content { padding: 28px 18px 50px; }
  .page-head { align-items: flex-start; flex-direction: column; margin-bottom: 25px; }
  .page-head .primary { width: 100%; }
  .metrics { grid-template-columns: 1fr; }
  .metric + .metric { border-left: 0; border-top: 1px solid var(--line); }
  .app-grid { grid-template-columns: 1fr; }
  .section-row { align-items: flex-start; flex-direction: column; gap: 10px; }
  .workspace { padding: 14px 12px 26px; }
  .chat { border-radius: 14px; }
  .chat-head { padding: 13px 15px; }
  .messages { height: calc(100vh - 300px); padding: 18px 14px; }
  .message { max-width: 94%; }
  .sidepanel { grid-template-columns: 1fr; }
  .brief-workspace { padding:20px 12px 35px; }
  .brief-titlebar { align-items:flex-start; flex-direction:column; gap:12px; }
  .brief-messages { height:55vh; min-height:320px; padding:16px 12px; }
  .brief-composer { padding:12px; }
  .composer-bottom { align-items:flex-start; flex-direction:column; }
  .composer-bottom .primary { width:100%; }
  .brief-panel { padding:15px; }
  .inline-error { align-items:flex-start; flex-direction:column; }
  .theme-choice { grid-template-columns: 1fr; }
  .ready-note { align-items: flex-start; flex-direction: column; }
  .ready-note .primary { width: 100%; }
  .modal-backdrop { align-items: start; overflow-y: auto; }
  .deploy-body { padding: 20px 18px 22px; }
  .step { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
  .step small { grid-column: 2; margin-top: -10px; }
}

/* Conversation-first project framing */
.conversation-page { width:min(980px,100%); padding-top:18px; }
.conversation-titlebar { display:flex; align-items:center; gap:16px; margin:0 0 18px; }
.conversation-titlebar > div { min-width:0; flex:1; }
.conversation-titlebar h1 { overflow:hidden; color:var(--ink); font-size:1.15rem; text-overflow:ellipsis; white-space:nowrap; }
.conversation-titlebar .eyebrow { margin:0 0 3px; font-size:.62rem; letter-spacing:.12em; }
.conversation-titlebar .ghost { flex:0 0 auto; }
.conversation-history { padding:8px 11px; border:1px solid var(--line); border-radius:9px; color:var(--muted); background:#fff; font-size:.76rem; }
.conversation-guide { min-height:44px; padding:8px 13px; border:1px solid #203d52; border-radius:9px; color:#fff; background:#203d52; font-size:.8rem; white-space:nowrap; }
.conversation-guide:disabled { opacity:.5; cursor:default; }
.guide-handoff { margin:24px 0 8px; padding:24px; border:1px solid #c7e7df; border-radius:16px; background:#f2faf7; }
.guide-handoff h2 { margin:8px 0; color:var(--ink); font-size:1.25rem; }
.guide-handoff p { margin:0 0 18px; color:#385562; line-height:1.65; }
.guide-handoff > small { display:block; margin-top:12px; color:#426052; font-size:.75rem; line-height:1.5; }
.guide-handoff > small:first-child { margin:0; font-size:.65rem; letter-spacing:.1em; }
.guide-handoff .primary { display:inline-flex; min-height:44px; align-items:center; text-decoration:none; }
[data-usage-panel] { padding:8px 0; color:var(--muted); font-size:.8rem; line-height:1.6; overflow-wrap:anywhere; }
.conversation-shell { display:flex; flex-direction:column; min-height:min(760px,calc(100vh - 190px)); border:1px solid var(--line); border-radius:18px; overflow:hidden; background:#fff; box-shadow:0 12px 40px #203d520b; }
.conversation-shell { height:calc(100dvh - 115px); min-height:440px; max-height:960px; }
.conversation-stream { min-height:0; }
.conversation-stream .message > div:last-child { min-width:0; }
.bubble { overflow-wrap:anywhere; }
.pending-reply .bubble:empty { display:none; }
.response-status { display:flex; align-items:center; gap:8px; margin-top:8px; color:var(--muted); font-size:.75rem; }
.response-status .spinner { display:inline-block; flex-shrink:0; border-color:#203d5230; border-top-color:var(--ink); }
button:focus-visible, a:focus-visible, summary:focus-visible { outline:3px solid #147983; outline-offset:3px; }
.conversation-stream { display:flex; flex:1; flex-direction:column; gap:20px; overflow:auto; padding:clamp(18px,4vw,38px); background:linear-gradient(180deg,#fff,#fbfcfd); }
.conversation-stream .message { max-width:min(740px,94%); }
.conversation-stream .message.user { align-self:flex-end; }
.conversation-stream .message.assistant { align-self:flex-start; }
.conversation-stream .message .bubble { line-height:1.65; }
.conversation-stream .message.assistant .bubble { background:#fff; }
.brief-welcome { width:min(640px,100%); margin:auto; padding:20px 8px; text-align:center; }
.brief-welcome .welcome-mark { width:46px; height:46px; margin:0 auto 18px; border-radius:15px; font-weight:850; }
.brief-welcome h2 { margin:8px 0 10px; color:var(--ink); font-size:clamp(1.55rem,4vw,2rem); letter-spacing:-.035em; }
.brief-welcome > p:not(.eyebrow) { max-width:510px; margin:0 auto; color:var(--muted); line-height:1.65; }
.conversation-prompts { display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin:24px auto 0; }
.conversation-prompts button { max-width:240px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; color:#405762; background:#fff; font-size:.76rem; line-height:1.4; text-align:left; cursor:pointer; }
.conversation-prompts button:hover { border-color:#8bcbd0; background:#f3fbfb; }
.conversation-composer { padding:13px 16px 15px; border-top:1px solid var(--line); background:#fff; }
.conversation-composer textarea { min-height:54px; max-height:180px; resize:vertical; border:1px solid #dce5e9; border-radius:13px; padding:13px 14px; font:inherit; line-height:1.5; }
.conversation-composer textarea:focus { border-color:#70dce3; box-shadow:0 0 0 3px #3ecfd920; outline:none; }
.conversation-composer .composer-bottom { margin-top:8px; }
.conversation-composer .composer-bottom .primary { display:grid; width:42px; height:42px; place-items:center; padding:0; border-radius:13px; }
.conversation-composer .composer-bottom span { font-size:.7rem; }
.deliverable-message .bubble { min-width:min(460px,75vw); padding:17px; border:1px solid #dce8ec; }
.deliverable-intro { display:flex; flex-direction:column; gap:5px; margin:0 0 14px; }
.deliverable-intro small { color:#4c6875; font-size:.62rem; font-weight:800; letter-spacing:.1em; }
.deliverable-intro b { color:var(--ink); font-size:1rem; }
.deliverable-message .deliverable-state { margin:0; }
.deliverable-message .deliverable-links { display:flex; flex-wrap:wrap; gap:10px 16px; margin-top:12px; }
.conversation-history-list { margin:12px 0 0 auto; width:min(520px,100%); color:var(--muted); font-size:.78rem; }
.conversation-history-list:not([open]) { display:none; }
.conversation-history-list summary { width:max-content; margin-left:auto; padding:8px 10px; cursor:pointer; }
.conversation-history-list[open] { padding:10px 14px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.conversation-history-list[open] summary { margin-bottom:12px; }
.conversation-history-list .deliverable-state { margin:8px 0; padding:10px; border:1px solid var(--line); border-radius:10px; }
.conversation-history-list .deliverable-links { display:flex; flex-wrap:wrap; gap:8px 14px; margin-top:8px; }
@media(max-width:720px) {
  .shell:has(.conversation-page) { min-height:0; }
  .shell:has(.conversation-page) > .sidebar { display:none; }
  .conversation-page { display:flex; flex-direction:column; height:var(--conversation-viewport,100dvh); padding:0; overflow:hidden; }
  .conversation-titlebar { flex-shrink:0; gap:8px; margin:0; padding:calc(8px + env(safe-area-inset-top)) 12px 8px; border-bottom:1px solid var(--line); background:#fff; }
  .conversation-titlebar .ghost { min-height:44px; padding:7px 4px; font-size:.78rem; }
  .conversation-titlebar .ghost svg { width:16px; }
  .conversation-titlebar h1 { font-size:1rem; }
  .conversation-titlebar .eyebrow { font-size:.55rem; letter-spacing:.07em; }
  .conversation-history { min-height:44px; padding:7px 9px; font-size:.75rem; }
  .conversation-shell { flex:1; height:auto; min-height:0; max-height:none; border:0; border-radius:0; box-shadow:none; }
  .conversation-stream { gap:24px; padding:22px 20px; overscroll-behavior-y:contain; scroll-padding-block:20px; }
  .conversation-stream .message { flex-shrink:0; width:100%; max-width:100%; }
  .conversation-stream .message > .avatar { display:none; }
  .conversation-stream .message > div:last-child { width:100%; }
  .conversation-stream .message.assistant .bubble { padding:0; background:transparent; font-size:1.0625rem; line-height:1.7; color:var(--ink-2); }
  .conversation-stream .message.user { width:auto; max-width:90%; }
  .conversation-stream .message.user .bubble { padding:12px 15px; font-size:1rem; }
  .conversation-stream .message time { font-size:.7rem; margin-top:8px; }
  .brief-welcome { padding:18px 4px; }
  .conversation-prompts { flex-direction:column; align-items:stretch; margin-top:18px; }
  .conversation-prompts button { max-width:none; text-align:center; }
  .conversation-composer { flex-shrink:0; display:grid; grid-template-columns:minmax(0,1fr) 46px; align-items:end; gap:8px 10px; padding:10px 16px calc(10px + env(safe-area-inset-bottom)); box-shadow:0 -5px 20px #203d5205; }
  .conversation-composer textarea { grid-column:1; min-height:50px; max-height:110px; resize:none; font-size:1rem; }
  .conversation-composer .composer-bottom { display:contents; }
  .conversation-composer #composer-hint { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
  .conversation-composer .composer-bottom .primary { grid-column:2; grid-row:1; width:46px; height:50px; min-height:44px; }
  .conversation-composer .voice-controls,.conversation-composer .voice-panel { grid-column:1 / -1; margin:0; }
  .conversation-composer .voice-button { min-height:44px; background:white; }
  .conversation-composer .voice-button.recording { background:#e9f7f3; }
  .conversation-composer .voice-limit { flex:1; font-size:.72rem; }
  .conversation-stream .deliverable-message .bubble { min-width:0; padding:16px; border-radius:16px; background:#fff; }
  .deliverable-message .deliverable-links a { min-height:44px; display:inline-flex; align-items:center; font-size:.85rem; }
  .conversation-history-list[open] { flex-shrink:0; width:100%; max-height:30dvh; overflow:auto; margin:0; border-radius:0; }
  .conversation-page > .demo-banner,.conversation-page > .inline-error { flex-shrink:0; margin:8px 12px; }
}
@media(max-width:380px) {
  .conversation-stream { padding-inline:16px; }
  .conversation-titlebar .eyebrow { display:none; }
}
@media(max-width:720px) and (max-height:480px) {
  .conversation-titlebar { padding-block:4px; }
  .conversation-composer { gap:4px 8px; padding-block:6px; }
  .conversation-composer .voice-limit { display:none; }
  .conversation-composer .voice-button { min-height:36px; padding:4px 10px; }
}
.main:has(.conversation-page) > .topbar { display:none; }

.product-promise .metric b { font-size: 1.1rem; line-height: 1.35; }
.product-promise .metric span { line-height: 1.5; }

.conversation-stream:focus-visible { outline:3px solid #147983; outline-offset:-3px; }
