@import url("./property-thread.css");

/* The app home (start.html), set up the way Claude and ChatGPT are: a sidebar
   of tools and recent searches, one question box in the middle of the page,
   and answers that arrive as a conversation. Every answer is a real Cividian
   read or a hand-off to the tool that does the work. */
@import url("./app-theme.css");
:root{--bg:var(--cvs-bg);--panel:var(--cvs-panel);--rail:var(--cvs-rail);--rail-hover:var(--cvs-hover);--ink:var(--cvs-ink);--text:var(--cvs-text);--muted:var(--cvs-muted);--faint:var(--cvs-faint);--line:var(--cvs-line);--line-strong:var(--cvs-line2);--accent:var(--cvs-accent);--accent-ink:var(--cvs-accent-ink);--accent-soft:var(--cvs-accent-soft);--good:var(--cvs-good);--focus:var(--cvs-focus);--sans:var(--cvs-sans);--display:var(--cvs-display);--rail-w:var(--cvs-rail-w);--brass:#af9364;--shadow:0 1px 3px #17212b0a;}
*,*::before,*::after{box-sizing:border-box}
html,body{height:100%}
body.cv{margin:0;background:var(--bg);color:var(--text);font-family:var(--sans);font-size:15px;line-height:1.55;-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
button,input,textarea{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0;padding:0}
h1,h2,h3,p,ol{margin:0}
svg{display:block}
a:focus-visible,button:focus-visible,textarea:focus-visible,input:focus-visible{outline:3px solid var(--focus);outline-offset:3px;border-radius:8px}
.cv-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.cv-skip{position:fixed;left:12px;top:-80px;z-index:100;background:var(--panel);padding:10px 14px;border-radius:10px}.cv-skip:focus{top:12px}
.cv-muted{color:var(--muted);font-size:13px}

/* Shell */
.cv-shell{display:grid;grid-template-columns:var(--rail-w) minmax(0,1fr);height:100vh;height:100dvh}
.cv-shell.rail-collapsed{grid-template-columns:0 minmax(0,1fr)}
.cv-shell.rail-collapsed .cv-rail{visibility:hidden}

/* Sidebar */
.cv-rail{display:flex;flex-direction:column;min-height:0;background:var(--rail);border-right:1px solid var(--line);padding:12px 10px;overflow:hidden}
.cv-rail-top{display:flex;align-items:center;justify-content:space-between;padding:2px 4px 12px 8px}
.cv-brand{display:inline-flex;align-items:center;gap:8px;font-family:var(--display);font-weight:700;font-size:16px;letter-spacing:1.6px;color:var(--ink)}
.cv-brand svg{width:22px;height:22px}.cv-brand span{color:#86ada9;margin-left:-7px}
.cv-icon-btn{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:10px;color:var(--muted)}
.cv-icon-btn:hover{background:var(--rail-hover);color:var(--ink)}
.cv-icon-btn svg,.cv-new svg,.cv-tools svg,.cv-mode svg,.cv-send svg{fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.cv-icon-btn svg{width:20px;height:20px}
.cv-new{display:flex;align-items:center;gap:10px;min-height:42px;padding:0 12px;margin-bottom:8px;border-radius:12px;background:var(--panel);border:1px solid var(--line);font-weight:600;font-size:14px;color:var(--ink);box-shadow:0 1px 2px #0000000d}
.cv-new:hover{border-color:var(--line-strong)}
.cv-new svg{width:18px;height:18px}
.cv-tools{display:flex;flex-direction:column;gap:1px;padding-bottom:10px;border-bottom:1px solid var(--line)}
.cv-tools a{display:flex;align-items:center;gap:11px;min-height:38px;padding:0 12px;border-radius:10px;font-size:14px;color:var(--text)}
.cv-tools a:hover{background:var(--rail-hover)}
.cv-tools svg{width:17px;height:17px;color:var(--muted)}
.cv-recents{flex:1;min-height:0;overflow-y:auto;padding:14px 0 10px}
.cv-recents h2{font-size:12px;font-weight:600;color:var(--faint);padding:0 12px 6px;letter-spacing:.2px}
.cv-recents ol{list-style:none;padding:0;display:flex;flex-direction:column;gap:1px}
.cv-recents li{display:flex;align-items:center;border-radius:10px}
.cv-recents li:hover,.cv-recents li.is-current{background:var(--rail-hover)}
.cv-recents li button:first-child{flex:1;min-width:0;text-align:left;padding:9px 12px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cv-recents .cv-del{width:32px;height:32px;margin-right:4px;border-radius:8px;color:var(--faint);opacity:0}
.cv-recents li:hover .cv-del,.cv-recents .cv-del:focus-visible{opacity:1}
.cv-recents .cv-del:hover{color:var(--ink);background:var(--line)}
.cv-recents-empty{padding:4px 12px;font-size:13px;color:var(--faint)}
.cv-recents-empty[hidden]{display:none}
.cv-saved{margin-bottom:12px}.cv-saved[hidden]{display:none}
.cv-recents li a{flex:1;min-width:0;padding:9px 12px;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cv-recents li a small{color:var(--faint);font-size:12px;margin-left:6px}
.cv-account{border-top:1px solid var(--line);padding-top:10px}
.cv-account .cv-theme-label{display:grid;gap:8px;margin-bottom:12px}.cv-account .cv-theme-label select{width:100%;min-height:44px}
.cv-signin{padding:12px;border:1px solid var(--line);border-radius:14px;background:var(--panel);font-size:13px;color:var(--muted);margin-bottom:8px}
.cv-signin b{color:var(--ink)}
.cv-signin .cv-pill{width:100%;margin-top:10px}
.cv-signin[hidden],.cv-me[hidden]{display:none}
.cv-me{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px;margin-bottom:6px}
.cv-me:hover{background:var(--rail-hover)}
.cv-me b{display:block;font-size:14px;color:var(--ink)}.cv-me small{display:block;font-size:12px;color:var(--muted);max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cv-avatar{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--accent);color:var(--accent-ink);font-weight:700;font-size:14px;flex-shrink:0}
.cv-more{display:flex;flex-wrap:wrap;gap:2px 12px;padding:4px 12px 2px;font-size:12px;color:var(--faint)}
.cv-more a{padding:3px 0}.cv-more a:hover{color:var(--ink)}
.cv-scrim{position:fixed;inset:0;background:#0007;z-index:40}.cv-scrim[hidden]{display:none}

/* Main column */
.cv-main{display:flex;flex-direction:column;min-width:0;min-height:0;position:relative}
.cv-bar{display:flex;align-items:center;gap:8px;height:56px;padding:0 14px 0 10px;flex-shrink:0}
.cv-rail-toggle{display:none}
.rail-collapsed .cv-rail-toggle{display:inline-grid}
.cv-bar-title{display:flex;align-items:center;gap:8px;font-family:var(--display);font-weight:600;font-size:17px;color:var(--ink);padding-left:6px}
.cv-beta{font-family:var(--sans);font-size:10px;font-weight:600;letter-spacing:.4px;padding:2px 7px;border:1px solid var(--line-strong);border-radius:999px;color:var(--muted)}
.cv-bar-new[hidden]{display:none}
.cv-bar-actions{margin-left:auto;display:flex;gap:8px}
.cv-pill{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border-radius:999px;border:1px solid var(--line-strong);font-size:14px;font-weight:600;white-space:nowrap;color:var(--ink)}
.cv-pill:hover{background:var(--rail)}
.cv-pill-solid{background:var(--ink);border-color:var(--ink);color:var(--bg)}.cv-pill-solid:hover{background:var(--text)}
.cv-pill[hidden]{display:none}
.cv-stage{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;align-items:center;padding:0 20px;scroll-padding-bottom:180px}
.cv-stage>*{width:100%;max-width:780px}

/* Welcome */
.cv-welcome{margin-top:max(40px,14vh);text-align:center}
.cv-mark{display:inline-grid;place-items:center;width:44px;height:44px;border-radius:12px;background:var(--ink);color:var(--bg);margin-bottom:18px}
.cv-mark svg{width:24px;height:24px}
.cv-greet{font-size:15px;color:var(--muted)}
.cv-welcome h1{font-family:var(--display);font-weight:500;font-size:clamp(28px,3.4vw,40px);letter-spacing:-.03em;line-height:1.15;margin-top:6px;color:var(--ink)}

/* Composer */
.cv-composer{position:relative;margin-top:26px;background:var(--panel);border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow);padding:14px 14px 10px 18px}
.cv-composer:focus-within{border-color:var(--line-strong)}
.cv-composer textarea{display:block;width:100%;min-height:28px;max-height:220px;resize:none;border:0;outline:none;background:transparent;font-size:16px;line-height:1.5;padding:4px 0 8px;color:var(--ink)}
.cv-composer textarea::placeholder{color:var(--faint)}
.cv-composer-row{display:flex;align-items:flex-end;gap:10px}
.cv-modes{flex:1;min-width:0;display:flex;flex-wrap:wrap;gap:6px}
.cv-mode{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 12px;border-radius:999px;border:1px solid var(--line);font-size:13px;color:var(--muted)}
.cv-mode svg{width:15px;height:15px}
.cv-mode:hover{color:var(--ink);border-color:var(--line-strong)}
.cv-mode[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent);color:var(--accent)}
.cv-send{display:grid;place-items:center;width:44px;height:44px;min-height:44px;flex-shrink:0;border-radius:999px;background:var(--ink);color:var(--bg)}
.cv-send svg{width:20px;height:20px;stroke-width:2.1}
.cv-send:disabled{opacity:.3;cursor:default}
.cv-hint{font-size:12px;color:var(--faint);padding:6px 2px 0;min-height:24px}
.cv-options{position:absolute;left:10px;right:10px;bottom:calc(100% + 8px);z-index:20;background:var(--panel);border:1px solid var(--line);border-radius:16px;padding:6px;box-shadow:var(--shadow);max-height:300px;overflow:auto}
.cv-options[hidden]{display:none}
.cv-options [role=option]{padding:11px 14px;min-height:44px;border-radius:10px;font-size:14px;cursor:pointer}
.cv-options [role=option][aria-selected=true],.cv-options [role=option]:hover{background:var(--accent-soft)}
.cv.has-thread .cv-welcome,.cv.has-thread .cv-below{display:none}
.cv.has-thread .cv-dock{position:sticky;bottom:0;margin-top:auto;padding:26px 0 6px;background:linear-gradient(to bottom,transparent,var(--bg) 26px);z-index:5}
.cv.has-thread .cv-composer{margin-top:0}
.cv.has-thread .cv-hint{display:none}

/* Below the composer */
.cv-below{padding:18px 0 8px}
.cv-starters{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px;font-size:13px;color:var(--muted)}
.cv-starters button{min-height:36px;padding:0 13px;border-radius:999px;border:1px solid var(--line);color:var(--text);font-size:13px}
.cv-starters button:hover{border-color:var(--line-strong);background:var(--panel)}
.cv-prompts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:22px}
.cv-prompts button{display:flex;flex-direction:column;gap:2px;text-align:left;padding:13px 16px;border-radius:16px;border:1px solid var(--line);background:transparent;font-size:14px}
.cv-prompts button:hover{background:var(--panel);border-color:var(--line-strong)}
.cv-prompts b{font-weight:600;color:var(--ink)}.cv-prompts span{color:var(--muted);font-size:13px}
.cv-foryou{margin-top:34px;padding-top:20px;border-top:1px solid var(--line)}
.cv-foryou-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.cv-foryou h2{font-family:var(--display);font-size:17px;font-weight:600;color:var(--ink)}
.cv-link{font-size:13px;font-weight:600;color:var(--accent);min-height:36px;padding:0 4px}
.cv-link:disabled{opacity:.5}
.cv-toggle{display:flex;align-items:center;gap:8px;font-size:13px;color:var(--muted);margin-top:8px}.cv-toggle[hidden]{display:none}
.cv-places{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:14px}
.cv-places button{display:flex;flex-direction:column;gap:4px;text-align:left;padding:14px;border-radius:14px;border:1px solid var(--line);background:var(--panel)}
.cv-places button:hover{border-color:var(--line-strong)}
.cv-places b{font-family:var(--display);font-size:16px;font-weight:600;color:var(--ink)}
.cv-places small{font-size:12px;color:var(--muted);line-height:1.45}
.cv-projects{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px;margin-top:26px;font-size:13px;color:var(--muted)}
.cv-projects a,.cv-projects button{font-weight:600;color:var(--text);border-bottom:1px solid var(--line-strong);padding:4px 0}
.cv-projects a:hover,.cv-projects button:hover{border-color:var(--ink)}
.cv-fine{font-size:12px;color:var(--faint);text-align:center;padding:14px 0 18px}
.cv.has-thread .cv-fine{padding:0 0 12px;font-size:11px}

/* Thread */
.cv-thread{display:flex;flex-direction:column;gap:26px;padding:22px 0 30px}
.cv-thread[hidden]{display:none}
.cv-msg-user{align-self:flex-end;max-width:80%;background:var(--rail);color:var(--ink);padding:10px 16px;border-radius:20px 20px 6px 20px;font-size:15px;white-space:pre-wrap;overflow-wrap:anywhere}
.cv-msg-bot{display:grid;grid-template-columns:30px minmax(0,1fr);gap:14px;align-items:start}
.cv-msg-bot>.cv-bot-mark{display:grid;place-items:center;width:30px;height:30px;border-radius:9px;background:var(--ink);color:var(--bg)}
.cv-bot-mark svg{width:16px;height:16px}
.cv-bot-body{display:flex;flex-direction:column;gap:12px;min-width:0;padding-top:4px}
.cv-bot-body>p{font-size:15px;line-height:1.65;color:var(--text)}
.cv-bot-body .cv-label{font-size:12px;color:var(--faint)}
.cv-typing{display:inline-flex;gap:5px;padding:10px 0}
.cv-typing i{width:7px;height:7px;border-radius:50%;background:var(--faint);animation:cvdot 1.1s infinite ease-in-out}
.cv-typing i:nth-child(2){animation-delay:.15s}.cv-typing i:nth-child(3){animation-delay:.3s}
@keyframes cvdot{0%,80%,100%{opacity:.25;transform:translateY(0)}40%{opacity:1;transform:translateY(-3px)}}
.cv-actions{display:flex;flex-wrap:wrap;gap:8px}
.cv-act{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:0 14px;border-radius:999px;border:1px solid var(--line-strong);font-size:13px;font-weight:600;color:var(--ink);background:transparent}
.cv-act:hover{background:var(--panel)}
.cv-act-primary{background:var(--ink);border-color:var(--ink);color:var(--bg)}.cv-act-primary:hover{background:var(--text)}
.cv-choices{display:flex;flex-wrap:wrap;gap:8px}
.cv-choices button{min-height:38px;padding:0 14px;border-radius:999px;border:1px solid var(--line-strong);font-size:14px}
.cv-choices button:hover{background:var(--panel)}
.cv-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cv-pair .cv-facts{grid-template-columns:repeat(2,minmax(0,1fr))}

/* City card: the same read the homepage card showed, as an answer */
.cv-card{background:var(--panel);border:1px solid var(--line);border-radius:18px;padding:20px 22px}
.cv-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}
.cv-card-kicker{font-size:10px;font-weight:650;letter-spacing:1.6px;text-transform:uppercase;color:var(--faint)}
.cv-card h3{font-family:var(--display);font-size:21px;font-weight:600;letter-spacing:-.02em;color:var(--ink);margin-top:3px}
.cv-state{font-size:11px;color:var(--muted);text-align:right;max-width:130px}
.cv-grade{display:flex;align-items:center;gap:18px;padding:16px 0 14px}
.cv-letter{font-family:var(--display);font-size:52px;line-height:1;font-weight:500;letter-spacing:-2px;color:var(--ink);min-width:44px}
.cv-verdict{border-left:1px solid var(--line);padding-left:18px}
.cv-verdict strong{display:block;font-size:11px;letter-spacing:1.4px;font-weight:650;color:var(--good);text-transform:uppercase}
.cv-verdict p{font-size:12px;color:var(--muted);margin-top:4px;line-height:1.5}
.cv-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;padding:14px 0;margin:0;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.cv-facts dt{font-size:11px;color:var(--muted)}
.cv-facts dd{margin:2px 0 0;font-family:var(--display);font-size:18px;font-weight:500;color:var(--ink)}
.cv-rank{display:flex;justify-content:space-between;font-size:12px;margin-top:14px}
.cv-rank strong{font-weight:600}
.cv-track{height:4px;background:var(--line);border-radius:4px;margin:8px 0}
.cv-track span{display:block;height:100%;border-radius:4px;background:var(--accent)}
.cv-small{font-size:11px;color:var(--muted);line-height:1.55}
.cv-evidence{border-top:1px solid var(--line);margin-top:12px}
.cv-evidence summary{display:flex;justify-content:space-between;align-items:center;min-height:44px;font-size:13px;font-weight:600;cursor:pointer;list-style:none}
.cv-evidence summary::-webkit-details-marker{display:none}
.cv-evidence summary::after{content:'+';font-size:18px;font-weight:400;color:var(--muted)}
.cv-evidence[open] summary::after{content:'−'}
.cv-row{padding:10px 0;border-top:1px solid var(--line)}
.cv-row header{display:flex;justify-content:space-between;gap:12px;font-size:12px;font-weight:600}
.cv-row p{font-size:11px;color:var(--muted);margin-top:3px}
.cv-row a{text-decoration:underline;text-underline-offset:2px}
.cv-source{font-size:11px;color:var(--muted);margin-top:10px}

/* Small screens: the sidebar slides over the page */
@media(max-width:900px){
  .cv-shell,.cv-shell.rail-collapsed{grid-template-columns:minmax(0,1fr)}
  .cv-rail{position:fixed;left:0;top:0;bottom:0;width:min(300px,86vw);z-index:50;transform:translateX(-102%);transition:transform .22s ease;visibility:visible!important;box-shadow:none}
  .cv-shell.rail-open .cv-rail{transform:none;box-shadow:0 0 40px #0005}
  .cv-rail-toggle{display:inline-grid}
  .cv-bar-new:not([hidden]){display:inline-grid}
}
@media(max-width:600px){
  .cv-bar .cv-beta{display:none}
  #navAccount{display:none}
  .cv-stage{padding:0 12px}
  .cv-welcome{margin-top:6vh}
  .cv-composer{border-radius:22px;padding:12px 10px 8px 14px}
  .cv-modes{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin-right:2px}.cv-modes::-webkit-scrollbar{display:none}
  .cv-mode{padding:0 10px;font-size:12px;flex-shrink:0}.cv-mode svg{display:none}
  .cv-prompts,.cv-places,.cv-pair{grid-template-columns:1fr}
  .cv-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cv-card{padding:16px}
  .cv-msg-bot{grid-template-columns:minmax(0,1fr)}.cv-msg-bot>.cv-bot-mark{display:none}
}
@media(prefers-reduced-motion:reduce){.cv-rail{transition:none}.cv-typing i{animation:none;opacity:.6}}

/* Model picker: Cividian (research) and Cividian Build (3D massing) */
.cv-model{position:relative}
.cv-model-btn{display:inline-flex;align-items:center;gap:4px;min-height:40px;padding:0 10px;border-radius:10px;font-family:var(--display);font-weight:600;font-size:17px;color:var(--ink)}
.cv-model-btn:hover,.cv-model-btn[aria-expanded=true]{background:var(--rail)}
.cv-model-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;color:var(--muted)}
.cv-model-menu{position:absolute;top:calc(100% + 6px);left:0;z-index:30;width:min(340px,86vw);padding:6px;background:var(--panel);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow)}
.cv-model-menu[hidden]{display:none}
.cv-model-menu button{display:flex;flex-direction:column;gap:2px;width:100%;text-align:left;padding:10px 12px 10px 36px;border-radius:10px;position:relative}
.cv-model-menu button:hover{background:var(--rail)}
.cv-model-menu button[aria-selected=true]::before{content:'';position:absolute;left:13px;top:15px;width:10px;height:6px;border-left:2px solid var(--accent);border-bottom:2px solid var(--accent);transform:rotate(-45deg)}
.cv-model-menu b{font-size:14px;color:var(--ink)}.cv-model-menu span{font-size:12px;color:var(--muted)}.cv-model-menu small{font-size:11px;color:var(--faint)}
.cv-model-menu small:empty{display:none}
.cv-model-note{max-width:560px;margin:10px auto 0;font-size:14px;color:var(--muted)}
.cv-model-note[hidden]{display:none}
body:not(.model-build) [data-for="cividian-build"],body.model-build [data-for="cividian"]{display:none!important}

/* AI answers */
.cv-answer{font-size:15px;line-height:1.7;color:var(--text);white-space:pre-wrap}
.cv-cite{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 4px;margin:0 1px;border-radius:6px;background:var(--accent-soft);color:var(--accent);font-size:11px;font-weight:700;vertical-align:1px}
.cv-sources{display:flex;flex-direction:column;gap:4px;padding:10px 12px;border:1px solid var(--line);border-radius:12px;font-size:12px;color:var(--muted)}
.cv-sources a{text-decoration:underline;text-underline-offset:2px}
.cv-follow{display:flex;flex-wrap:wrap;gap:8px}
.cv-follow button{min-height:36px;padding:0 12px;border-radius:999px;border:1px dashed var(--line-strong);font-size:13px;color:var(--text)}
.cv-follow button:hover{background:var(--panel);border-style:solid}

/* Cividian Build card */
.cv-3d{position:relative;height:360px;margin:14px 0 4px;border-radius:14px;overflow:hidden;background:var(--bg);border:1px solid var(--line)}
.cv-3d canvas{display:block;width:100%;height:100%;cursor:grab;touch-action:none}
.cv-3d canvas:active{cursor:grabbing}
.cv-3d-wait{position:absolute;inset:0;display:grid;place-items:center;font-size:13px;color:var(--muted);padding:20px;text-align:center}
.cv-build-facts{grid-template-columns:repeat(3,minmax(0,1fr))}
.cv-build-controls{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px 14px;padding:14px 0 6px}
.cv-build-controls label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted)}
.cv-build-controls output{font-weight:600;color:var(--ink)}
.cv-build-controls select,.cv-build-controls input[type=number]{min-height:38px;border:1px solid var(--line-strong);border-radius:10px;background:var(--bg);padding:0 8px;font-size:14px;color:var(--ink)}
.cv-build-controls input[type=range]{accent-color:var(--accent);min-height:30px}
.cv-basis{margin-top:4px}
.cv-build-notes p{margin-top:8px;padding:10px 12px;border-radius:10px;background:#af93641f;border:1px solid #af936455;font-size:13px;color:var(--text)}
@media(max-width:600px){.cv-3d{height:260px}.cv-build-controls{grid-template-columns:1fr 1fr}.cv-build-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}

.cv-answer{overflow-wrap:anywhere;min-width:0}.cv-answer p{white-space:pre-wrap}.cv-answer code{white-space:pre-wrap;overflow-wrap:anywhere}.cv-answer ul{padding-left:1.3rem}.cv-answer h3,.cv-answer h4,.cv-answer h5{margin:1rem 0 .5rem}.cv-cite{cursor:pointer;font:inherit;border:0}.cv-status{font-size:.8rem;color:var(--muted)}.cv-sources section{margin:.6rem 0;overflow-wrap:anywhere}.cv-answer-preview{white-space:pre-wrap;overflow-wrap:anywhere}

/* Approved Figma layout, composed from the existing interactive app controls. */
.cv-bar{height:auto;min-height:84px;padding:16px 20px;background:var(--panel);gap:12px}
.cv-bar-actions{margin-left:0;flex:none}
.cv-pill,.cv-act,.cv-choices button,.cv-follow button{border-radius:12px;border-color:var(--line-strong);min-height:44px}
.cv-pill-solid,.cv-act-primary,.cv-send{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
.cv-pill-solid:hover,.cv-act-primary:hover,.cv-send:hover:not(:disabled){background:var(--accent);filter:brightness(.95)}
.cv-new{min-height:44px;border-color:var(--line-strong)}
.cv-tools a{min-height:44px}
.cv-rail{padding:16px;overflow-y:auto}
.cv-recents{min-height:120px}
.cv-brand{letter-spacing:0;font-family:var(--sans);font-size:16px}
.cv-brand svg{color:var(--accent);width:24px;height:24px}.cv-brand span{display:none}
.cv-recents h2,.cv-recents-empty,.cv-more{font-size:14px;color:var(--muted)}
.cv-signin{font-size:14px}.cv-signin .cv-pill{font-weight:500}
.cv-stage{padding:0 48px;scrollbar-gutter:stable}
.cv-stage>*{max-width:764px}
.cv-welcome{margin-top:60px}
.cv-mark{background:transparent;color:var(--accent);border-radius:0;margin-bottom:24px}
.cv-mark svg{width:44px;height:44px}
.cv-greet{font-size:14px;line-height:1.45}
.cv-welcome h1{font-size:32px;line-height:1.45;letter-spacing:0;margin-top:24px}
.cv-composer{padding:20px;border-radius:24px;border-color:var(--line-strong);box-shadow:none;margin-top:24px}
.cv-composer-label{display:block;font-size:14px;font-weight:500;margin-bottom:16px;color:var(--ink)}
.cv-composer textarea{background:var(--bg);border:1px solid var(--line-strong);border-radius:8px;min-height:48px;padding:12px;font-size:16px;line-height:1.45;margin-bottom:16px;max-width:100%}
.cv-composer textarea::placeholder{color:var(--muted)}
.cv-composer:focus-within{border-color:var(--line-strong)}
.cv-composer textarea:focus-visible{outline:3px solid var(--focus);outline-offset:3px}
.cv-modes{gap:8px}.cv-mode{min-height:44px;border-radius:12px;background:var(--panel);border-color:var(--line-strong);padding:10px 12px;font-size:14px;font-weight:500;color:var(--ink)}
.cv-mode svg{display:none}
.cv-submit-row{display:flex;align-items:center;gap:12px;margin-top:16px}
.cv-hint{flex:1;min-width:0;padding:0;font-size:14px;line-height:1.45;color:var(--muted)}
.cv-send{display:inline-flex;align-items:center;justify-content:center;width:174px;min-height:44px;border-radius:12px;font-size:14px;font-weight:500}
.cv-send:disabled{opacity:1;background:var(--rail);color:var(--muted);border:1px solid var(--line);cursor:not-allowed}
.cv-starters{justify-content:flex-start;font-size:14px;gap:8px}.cv-starters>span{flex-basis:100%;margin-bottom:4px}
.cv-starters button{min-height:44px;border-radius:12px;border-color:var(--line-strong);background:var(--panel);font-size:14px}
.cv-prompts{gap:12px;margin-top:24px}.cv-prompts button{background:var(--panel);padding:20px;gap:8px}.cv-prompts b{font-size:16px;font-weight:700;line-height:1.45}.cv-prompts span{font-size:14px;line-height:1.45}
.cv-fine{text-align:left;font-size:14px;line-height:1.45}
@media(max-width:1100px){.cv-bar{gap:8px;padding:16px}.cv-bar-actions .cv-pill{padding:0 12px}.cv-stage{padding:0 28px}}
@media(max-width:600px){
  .cv-bar{min-height:76px;padding:12px;gap:4px;flex-wrap:wrap}
  .cv-bar .cv-model-btn{padding:0 4px;font-size:16px}
  .cv-bar-actions{margin-left:4px}.cv-bar-actions .cv-pill{padding:0 12px}
  .cv-stage{padding:0 20px;scrollbar-gutter:auto}
  .cv-welcome{margin-top:36px}.cv-welcome h1{font-size:28px;margin-top:24px}
  .cv-composer{padding:20px;border-radius:24px}
  .cv-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;flex-wrap:wrap;margin:0;width:100%}
  .cv-mode{justify-content:center;font-size:14px;padding:10px 8px;white-space:normal}
  .cv-mode[data-for="cividian-build"]{font-size:13px}
  .cv-submit-row{align-items:center}.cv-send{width:140px;max-width:50%}
  .cv-starters button{flex:1 1 140px}.cv-prompts{margin-top:24px}
}

/* Build card: the photoreal render stays on white in every theme; the picture is a concept illustration. */
.cv-render{margin-top:10px}.cv-render[hidden]{display:none}.cv-render-image{display:block;width:100%;height:auto;background:#fff;border-radius:8px;color-scheme:light}.cv-render-note{font-size:12px;color:var(--muted,#626b63);margin:6px 0 0}
/* Saved chats: server-owned search box and the restored-chat notice. */
.cv-recents-search{display:block;width:calc(100% - 24px);margin:0 12px 8px;padding:8px 10px;border-radius:10px;border:1px solid var(--line);background:var(--panel);color:var(--text);font:inherit;font-size:13px}
.cv-recents-search[hidden]{display:none}
.cv-restored{font-size:13px;color:var(--faint);margin:0 0 12px}
.cv-recents-empty .cv-link{font:inherit;font-size:inherit;color:var(--text);text-decoration:underline;padding:0;min-height:0}
.cv-save-status{margin:8px auto 0;max-width:720px;padding:8px 12px;border:1px solid var(--line-strong);border-radius:12px;font-size:13px;color:var(--text);background:var(--panel)}.cv-save-status[hidden]{display:none}.cv-save-status .cv-link{font:inherit;color:inherit;text-decoration:underline;padding:0;min-height:0}
/* Today's Cividian AI allowance (usage-meter.js). */
.cv-usage{font-size:13px;line-height:1.45;color:var(--muted);padding:8px 2px 0}
.cv-usage p{margin:0}
.cv-usage-actions{display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;margin-top:4px!important}
.cv-usage-actions a{color:var(--accent);font-weight:600;min-height:36px;display:inline-flex;align-items:center}
.cv-usage[hidden],.cv-usage-actions[hidden]{display:none}
/* Export, share and download controls only for a confirmed account: hidden while the session is
   unknown, pending, failed or a guest (start-gate.js marks it; build-view.js and app-chat.js also refuse the actions). */
:root:not([data-session="account"]) .cv-build-actions,:root:not([data-session="account"]) .cv-copy,:root:not([data-session="account"]) #savedGroup{display:none!important}
