/* The studio desk shares the application's ink, pigment and typography. */
.assistant-launch { display:flex; align-items:center; gap:7px; padding:7px 11px; color:var(--bone); border:1px solid var(--rule-2); border-radius:var(--r-sm); font-size:12px; font-weight:600; white-space:nowrap; }
.assistant-launch > span:first-child { color:var(--vermilion-lift); font-size:19px; display:grid; place-items:center; }
.assistant-launch:hover,.assistant-launch[aria-expanded="true"] { border-color:var(--vermilion); background:var(--vermilion-deep); }
.studio-assistant { position:fixed; right:18px; top:88px; bottom:18px; z-index:80; width:min(460px,calc(100vw - 36px)); display:flex; flex-direction:column; background:var(--ink-raise); border:1px solid var(--rule-2); border-top:3px solid var(--vermilion); border-radius:var(--r); box-shadow:0 24px 80px #0009; overflow:hidden; }
.as-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:20px 22px 16px; }
.as-eyebrow { font-size:9px; font-weight:600; letter-spacing:.14em; color:var(--muted); }
.as-eyebrow > span { padding:0 6px; color:var(--vermilion-lift); display:inline-grid; vertical-align:-2px; }
.as-head h2 { font:500 26px/1.15 var(--display); letter-spacing:-.04em; margin:7px 0 0; }
.as-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:var(--r-sm); color:var(--muted); flex:none; }
.as-icon:hover { background:var(--ink); color:var(--bone); }
#as-close { font-size:25px; }
.as-connection { padding:9px 22px; display:flex; gap:8px; align-items:center; border-block:1px solid var(--rule); font-size:10.5px; color:var(--bone-2); background:var(--ink); }
.as-dot { width:5px; height:5px; background:var(--marigold); border-radius:50%; }
.as-tabs { display:flex; gap:18px; padding:0 22px; border-bottom:1px solid var(--rule); }
.as-tabs button { color:var(--muted); font-size:11px; padding:12px 0 10px; border-bottom:2px solid transparent; }
.as-tabs button[aria-pressed="true"] { color:var(--bone); border-color:var(--vermilion); }
#as-new { margin-left:auto; font-size:10px; }
.as-messages,.as-history,.as-drafts { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:22px; scrollbar-width:thin; }
.as-welcome { padding:10px 0; }
.as-flash { display:block; font-size:39px; line-height:1; color:var(--vermilion); }
.as-welcome h3 { font:500 34px/1.04 var(--display); letter-spacing:-.045em; margin:20px 0 15px; }
.as-welcome p { color:var(--muted); max-width:33ch; font-size:12px; line-height:1.65; }
.as-starters { display:grid; gap:7px; margin-top:22px; }
.as-starters button { text-align:left; padding:11px 13px; border:1px solid var(--rule-2); border-radius:var(--r-sm); font-size:12px; color:var(--bone-2); }
.as-starters button:hover { border-color:var(--vermilion); color:var(--bone); }
.as-message { padding:0 0 23px; overflow-wrap:anywhere; }
.as-message-label { display:block; color:var(--muted); font-size:9px; letter-spacing:.14em; margin-bottom:8px; }
.as-message-text { white-space:pre-wrap; font-size:13px; line-height:1.7; }
.as-user { margin:0 0 20px 28px; padding:12px 15px; background:var(--ink-raise-2); border-left:2px solid var(--vermilion); border-radius:0 var(--r-sm) var(--r-sm) 0; }
.as-user .as-message-text { font-size:12px; }
.as-sources { display:flex; flex-wrap:wrap; gap:5px; margin-top:13px; }
.as-sources > span:first-child { flex-basis:100%; color:var(--muted); font-size:9px; letter-spacing:.09em; }
.as-source { font-size:10px; padding:4px 7px; border:1px solid var(--rule-2); border-radius:2px; color:var(--bone-2); text-align:left; }
button.as-source:hover { border-color:var(--bone-2); }
.as-navigation { margin-top:12px; color:var(--vermilion-lift); font-size:12px; font-weight:600; }
.as-nav-target { outline:1px solid var(--vermilion-lift); outline-offset:2px; background:var(--vermilion-deep) !important; color:var(--bone) !important; box-shadow:0 0 0 3px #d63c2820; animation:as-nav-pulse 1.2s ease-in-out 2; }
.as-transfer { border:1px solid var(--rule-2); border-top:2px solid var(--marigold); background:var(--ink); padding:15px; margin:15px 0 3px; border-radius:var(--r-sm); }
.as-transfer h4 { font:500 20px/1.25 var(--display); margin:8px 0 0; }
.as-transfer-quantity { font:500 26px/1.1 var(--display); margin:13px 0; color:var(--marigold); }
.as-transfer-route { font-size:12px; line-height:1.6; margin:0 0 10px; }
.as-transfer-meta,.as-transfer-outcome { font-size:10.5px; line-height:1.6; color:var(--muted); margin:7px 0; overflow-wrap:anywhere; }
.as-transfer-outcome { color:var(--bone-2); }
.as-transfer-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:13px; }
.as-transfer-actions .btn { height:36px; font-size:11px; padding:0 12px; }
.as-draft-layout { display:grid; gap:16px; align-items:start; }
.as-draft-list { display:grid; gap:7px; }
.as-draft-row { display:grid; gap:3px; text-align:left; padding:10px 12px; border:1px solid var(--rule-2); border-radius:var(--r-sm); background:var(--ink); }
.as-draft-row.is-active { border-color:var(--vermilion); background:var(--vermilion-deep); }
.as-draft-row strong { font-size:12px; color:var(--bone); font-weight:600; }
.as-draft-row span,.as-draft-row em { font-size:10px; color:var(--muted); font-style:normal; text-transform:capitalize; }
.as-draft-row em { color:var(--marigold); }
.as-draft-detail { border-top:2px solid var(--vermilion); background:var(--ink); padding:15px; border-radius:var(--r-sm); }
.as-draft-detail h3 { font:500 22px/1.2 var(--display); margin:8px 0 9px; }
.as-draft-summary,.as-draft-warning,.as-draft-error { font-size:11px; line-height:1.6; color:var(--muted); margin:8px 0; overflow-wrap:anywhere; }
.as-draft-warning,.as-draft-error { color:var(--marigold); }
.as-draft-missing { margin:10px 0; padding-left:18px; color:var(--marigold); font-size:11px; line-height:1.6; }
.as-draft-changes { display:grid; grid-template-columns:minmax(86px,1fr) minmax(0,2fr); gap:7px 10px; padding:12px 0; margin:0; border-block:1px solid var(--rule); font-size:11px; }
.as-draft-changes dt { color:var(--muted); overflow-wrap:anywhere; }
.as-draft-changes dd { margin:0; display:grid; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr); gap:6px; align-items:start; color:var(--bone-2); overflow-wrap:anywhere; }
.as-draft-changes dd b { color:var(--vermilion-lift); font-weight:500; }
.as-draft-form { display:grid; gap:10px; margin-top:13px; }
.as-draft-form h4 { margin:0; color:var(--bone-2); font-size:11px; font-weight:600; }
.as-draft-field { display:grid; gap:5px; font-size:11px; color:var(--muted); }
.as-draft-field input,.as-draft-field textarea,.as-draft-field select { width:100%; border:1px solid var(--rule-2); background:var(--ink-raise); color:var(--bone); border-radius:3px; padding:9px; font:400 12px/1.5 var(--font); }
.as-draft-field small { color:var(--marigold); line-height:1.4; }
.as-draft-lines { display:grid; gap:10px; }
.as-draft-line { display:grid; gap:8px; margin:0; padding:10px; border:1px solid var(--rule); border-radius:3px; }
.as-draft-line legend { padding:0 4px; color:var(--bone-2); font-size:10px; }
.as-draft-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:4px; }
.as-draft-actions .btn { min-height:36px; font-size:11px; padding:0 12px; }
#as-drafts-badge { display:inline-grid; place-items:center; min-width:17px; height:17px; margin-left:4px; padding:0 5px; border-radius:9px; background:var(--vermilion); color:white; font-size:10px; }
#as-drafts-badge[hidden] { display:none; }
.as-status { min-height:27px; padding:4px 22px 8px; font-size:10px; color:var(--marigold); line-height:1.5; }
.as-composer { margin:0; padding:13px 16px 12px; border-top:1px solid var(--rule-2); background:var(--ink); }
.as-composer textarea { display:block; width:100%; resize:vertical; max-height:180px; min-height:58px; border:0; background:none; color:var(--bone); font:400 13px/1.6 var(--font); padding:4px 5px; }
.as-composer textarea::placeholder { color:var(--muted); }
.as-composer textarea:focus-visible { outline:1px solid var(--rule-2); border-radius:3px; }
.as-controls { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:8px; }
.as-voice-controls { display:flex; align-items:center; gap:7px; }
.as-icon svg,.as-send svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.bleed-drop { width:18px; height:18px; display:block; fill:#d63c2830; stroke:currentColor; stroke-width:1.8; stroke-linejoin:round; }
.as-eyebrow .bleed-drop { width:10px; height:10px; }
.as-voice-controls select { padding:4px 0; font-size:10px; background:var(--ink); border:0; color:var(--muted); }
.as-read { display:flex; align-items:center; gap:3px; color:var(--muted); font-size:10px; white-space:nowrap; }
.as-read input { accent-color:var(--vermilion); width:12px; height:12px; }
.as-send { width:34px; height:34px; flex:none; display:grid; place-items:center; background:var(--vermilion); color:white; border-radius:var(--r-sm); }
.as-send:hover { background:var(--vermilion-lift); }
.as-text-btn { color:var(--marigold); font-size:11px; margin-left:auto; }
.as-voice-note { margin:8px 5px 0; color:var(--muted); font-size:9px; line-height:1.5; }
.as-mic.is-listening { color:var(--vermilion-lift); background:var(--vermilion-deep); box-shadow:0 0 0 1px var(--vermilion); }
.studio-assistant button:disabled { cursor:not-allowed; opacity:.45; }
@media(max-width:760px) { .assistant-launch { padding:4px 8px; } .assistant-launch > span:last-child { display:none; } .studio-assistant { inset:8px 8px max(8px,env(safe-area-inset-bottom)); width:auto; border-radius:6px; } .as-head { padding:17px 18px 13px; } .as-head h2 { font-size:25px; } .as-messages,.as-history,.as-drafts { padding:18px; } .as-welcome h3 { font-size:32px; } .as-composer textarea { font-size:16px; } .as-connection,.as-tabs { padding-left:18px; padding-right:18px; } .as-draft-changes { grid-template-columns:1fr; } .as-draft-changes dd { grid-template-columns:1fr; } }
@media(prefers-reduced-motion:reduce) { .studio-assistant * { scroll-behavior:auto; } }

.as-conversations { display:flex; align-items:center; gap:9px; padding:8px 22px; font-size:10px; color:var(--muted); border-bottom:1px solid var(--rule); }
.as-conversations select { min-width:0; width:100%; background:var(--ink-raise); border:0; color:var(--bone-2); font-size:11px; }

.as-balances { display:grid; grid-template-columns:1fr auto; gap:5px; padding:10px 0; border-block:1px solid var(--rule); font-size:11px; }
.as-balances dt { color:var(--muted); } .as-balances dd { margin:0; color:var(--bone); }
.as-evidence { width:100%; border:1px solid var(--rule-2); border-radius:3px; padding:9px; font-size:10px; }
.as-evidence summary { cursor:pointer; color:var(--bone-2); } .as-evidence pre { white-space:pre-wrap; font:10px/1.5 var(--font); }
.as-evidence-record { padding:7px 0; border-bottom:1px solid var(--rule); display:grid; gap:3px; }
.as-evidence-record span { color:var(--muted); } .as-evidence-warning { color:var(--marigold); }

.as-data-note { margin:15px 0 0; padding:9px 12px; border-left:2px solid var(--marigold); background:var(--marigold-deep); color:var(--marigold); font-size:11px; }
/* Keep the complete control set on small studio phones without widening the page. */
@media(max-width:760px) {
  .topbar { padding-inline:12px; gap:9px; min-width:0; }
  .topbar-right { gap:5px; min-width:0; }
  .topbar .logo-tile { width:32px; height:32px; }
  .topbar .icon-btn,.topbar .avatar { width:31px; height:32px; flex:none; }
  .topbar .pill { font-size:9px; padding-inline:7px; letter-spacing:0; }
  .topbar .currency { padding-inline:7px; gap:4px; height:32px; }
  .topbar .currency .flag { display:none; }
  .topbar .currency select { font-size:11px; padding-right:12px; }
  .topbar .assistant-launch { height:32px; padding-inline:7px; }
}
@media(max-width:359px) { .topbar .pill { max-width:42px; white-space:normal; line-height:1; text-align:center; padding-inline:5px; } .topbar-right { gap:3px; } }
.as-message-text p { margin:0 0 10px; }
.as-message-text p:last-child { margin-bottom:0; }
.as-message-text ul,.as-message-text ol { padding-left:19px; margin:8px 0 12px; }
.as-message-text li { padding-left:2px; margin:3px 0; }
.as-message-text strong { font-weight:600; color:var(--bone); }
.as-handsfree { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:10px 22px 5px; font-size:10px; }
.as-handsfree label { display:flex; gap:6px; align-items:center; color:var(--bone); font-weight:600; white-space:nowrap; }
.as-handsfree input { accent-color:var(--vermilion); }
#as-handsfree-state { color:var(--marigold); text-align:right; font-size:9px; }
.as-handsfree-disclosure { margin:0; padding:0 22px 10px; font-size:9px; line-height:1.5; color:var(--muted); }
.as-tabs { gap:14px; } #as-new { white-space:nowrap; }
.as-memory { flex:1; overflow:auto; min-height:0; padding:20px 22px; }
.as-memory h3 { font:500 24px/1.15 var(--display); margin:0 0 9px; }
.as-memory p,.as-memory label { font-size:11px; line-height:1.6; color:var(--muted); }
#as-memory-form { display:grid; gap:8px; margin:18px 0; }
#as-memory-text { border:1px solid var(--rule-2); background:var(--ink); border-radius:3px; padding:10px; width:100%; font-size:12px; }
.as-memory-row { padding:12px 0; border-top:1px solid var(--rule); display:flex; align-items:start; gap:12px; }
.as-memory-row p { flex:1; color:var(--bone-2); margin:0; overflow-wrap:anywhere; }
.bleed-wake { position:fixed; inset:0; z-index:150; display:flex; flex-direction:column; align-items:center; justify-content:center; pointer-events:none; background:radial-gradient(ellipse at center,#34140fe8 0%,#141110ed 62%); color:var(--bone); text-align:center; animation:bleed-arrive .35s ease-out both; }
.bleed-emblem { width:180px; height:180px; margin-bottom:20px; filter:drop-shadow(0 0 28px #d63c2850); }
.bleed-emblem svg { width:100%; height:100%; fill:none; stroke:var(--marigold); stroke-width:.7; }
.bleed-emblem .bleed-sigil { stroke:var(--vermilion-lift); stroke-width:1.5; fill:#d63c282e; }
.bleed-orbit { stroke-dasharray:3 8; transform-origin:center; animation:bleed-orbit 16s linear infinite; }
.bleed-wake>span { font-size:9px; letter-spacing:.26em; color:var(--marigold); }
.bleed-wake h2 { font:500 76px/1 var(--display); letter-spacing:.09em; margin:16px 0 7px; padding-left:.09em; }
.bleed-wake p { font-size:12px; letter-spacing:.13em; margin:0 0 27px; color:var(--bone-2); }
.bleed-wake small { font:400 italic 17px/1.4 var(--display); color:var(--muted); }
.bleed-dock { position:fixed; right:20px; bottom:20px; z-index:90; display:flex; align-items:center; gap:3px; min-width:240px; max-width:calc(100vw - 32px); border:1px solid var(--rule-2); border-top:2px solid var(--vermilion); border-radius:6px; background:var(--ink-raise); box-shadow:0 12px 40px #0008; }
.bleed-dock-open { display:flex; align-items:center; gap:12px; text-align:left; padding:11px 13px; flex:1; min-width:0; }
.bleed-dock-mark { color:var(--vermilion-lift); line-height:1; display:grid; place-items:center; }
.bleed-dock-mark .bleed-drop { width:30px; height:30px; filter:drop-shadow(0 0 10px #d63c2860); }
.bleed-dock strong { display:block; font:500 17px/1.15 var(--display); letter-spacing:.09em; }
.bleed-dock small { display:block; color:var(--muted); font-size:9px; max-width:210px; line-height:1.4; margin-top:3px; }
.bleed-dock>button:not(.bleed-dock-open) { width:28px; height:36px; color:var(--muted); flex:none; font-size:15px; }
.bleed-dock>button:last-child { margin-right:7px; }
.bleed-dock[data-state="speaking"] .bleed-dock-mark,.bleed-dock[data-state="talking"] .bleed-dock-mark { animation:bleed-talk .85s ease-in-out infinite; }
.bleed-dock[data-state="listening"] .bleed-dock-mark { animation:bleed-listen 1.3s ease-in-out infinite; }
.bleed-dock[data-state="thinking"] .bleed-dock-mark { animation:bleed-think 1.8s linear infinite; }
.bleed-wake[data-state="listening"] .bleed-emblem { animation:bleed-listen 1.3s ease-in-out infinite; }
.bleed-wake[data-state="speaking"] .bleed-emblem,.bleed-wake[data-state="talking"] .bleed-emblem { animation:bleed-talk .85s ease-in-out infinite; }
.bleed-wake[data-state="thinking"] .bleed-emblem { animation:bleed-think 1.8s linear infinite; }
.bleed-wake[data-state="armed"] .bleed-emblem { animation:bleed-breathe 2.2s ease-in-out infinite; }
@keyframes bleed-arrive { from { opacity:0; } to { opacity:1; } }
@keyframes bleed-orbit { to { transform:rotate(360deg); } }
@keyframes bleed-breathe { 50% { opacity:.4; transform:scale(.87); } }
@keyframes bleed-listen { 50% { transform:scale(1.04); filter:drop-shadow(0 0 34px #d63c2880); } }
@keyframes bleed-talk { 50% { transform:scale(.97); filter:drop-shadow(0 0 38px #f0a5247a); } }
@keyframes bleed-think { to { transform:rotate(360deg); } }
@keyframes as-nav-pulse { 50% { box-shadow:0 0 0 6px #d63c2838; } }
@media(max-width:760px) { .bleed-dock { bottom:76px; right:12px; } body:has(.studio-assistant:not([hidden])) .bleed-dock { display:none; } .as-handsfree { padding-inline:18px; } .as-handsfree-disclosure { padding-inline:18px; } .bleed-wake h2 { font-size:62px; } .bleed-wake small { max-width:85vw; } }
@media(prefers-reduced-motion:reduce) { .bleed-wake,.bleed-orbit,.bleed-emblem,.bleed-dock .bleed-dock-mark,.as-nav-target { animation:none !important; } }

/* ===== ChatGPT-style page: BLEED is the home screen, sections live in the hamburger ===== */
.assistant-launch { display:none; }
.studio-assistant { --col:768px; --gutter:max(18px,calc((100% - var(--col)) / 2)); left:0; right:0; top:76px; bottom:0; width:auto; z-index:20; background:var(--ink); border:0; border-radius:0; box-shadow:none; }
body:has(.studio-assistant:not([hidden])) #view { display:none; }
.as-head,#as-close { display:none; }
.as-connection { order:0; padding:6px var(--gutter); border:0; background:none; justify-content:center; color:var(--muted); font-size:10.5px; }
.as-handsfree { padding:0 var(--gutter); justify-content:center; gap:14px; }
.as-handsfree-disclosure { display:none; }
.as-tabs { padding:4px var(--gutter) 0; gap:6px; border-bottom:1px solid var(--rule); justify-content:center; flex-wrap:wrap; }
.as-tabs button { padding:8px 12px; border:0; border-radius:999px; margin-bottom:6px; font-size:12px; }
.as-tabs button[aria-pressed="true"] { background:var(--ink-raise-2); color:var(--bone); }
#as-new { margin-left:0; border:1px solid var(--rule-2); font-size:12px; }
.as-conversations { padding-inline:var(--gutter); }
.as-messages,.as-history,.as-drafts,.as-memory { padding:28px var(--gutter); }
.as-welcome { min-height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:0 0 40px; }
.as-flash .bleed-drop { width:44px; height:44px; margin:0 auto; }
.as-welcome h3 { font-size:clamp(28px,4.5vw,40px); margin:18px 0 12px; }
.as-welcome p { max-width:46ch; margin-inline:auto; font-size:13px; }
.as-starters { grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); width:100%; margin-top:28px; }
.as-starters button { border-radius:14px; padding:14px 16px; background:var(--ink-raise); }
.as-message-label { display:none; }
.as-message { padding:0 0 26px; }
.as-assistant .as-message-text { font-size:14.5px; line-height:1.75; }
.as-user { margin:0 0 26px auto; max-width:82%; width:fit-content; padding:11px 17px; background:var(--ink-raise-2); border:0; border-radius:20px; }
.as-user .as-message-text { font-size:14.5px; }
.as-status { padding-inline:var(--gutter); text-align:center; }
.as-composer { margin:0 var(--gutter) max(14px,env(safe-area-inset-bottom)); padding:10px 12px 8px 16px; border:1px solid var(--rule-2); border-radius:26px; background:var(--ink-raise); }
.as-composer:focus-within { border-color:var(--muted-2); }
.as-composer textarea { min-height:28px; max-height:200px; resize:none; field-sizing:content; font-size:14.5px; padding:6px 2px; }
.as-composer textarea:focus-visible { outline:0; }
.as-send { width:36px; height:36px; border-radius:50%; }
.as-voice-note { display:none; }
.as-draft-layout { max-width:var(--col); }
@media(max-width:760px) {
  .studio-assistant { inset:64px 0 0 0; --gutter:14px; }
  .as-user { max-width:90%; }
  .as-handsfree { justify-content:space-between; }
  .as-composer { margin-bottom:max(10px,env(safe-area-inset-bottom)); }
}

/* Transfer ledger tab is hidden for now; the code stays so it can come back. */
#as-history-tab { display:none; }

/* ===== Split screen: chat on the left, the results of the current question on the right ===== */
.studio-assistant { flex-direction:row; }
.as-chat { --gutter:18px; display:flex; flex-direction:column; flex:0 0 clamp(380px,36%,500px); min-width:0; min-height:0; border-right:1px solid var(--rule); }
.as-chat .as-welcome { padding-bottom:10px; }
.as-chat .as-starters { grid-template-columns:1fr; }
.as-user { max-width:92%; }
.as-show-results { color:var(--vermilion-lift); border-color:var(--vermilion); }
.as-results { flex:1; min-width:0; min-height:0; display:flex; flex-direction:column; background:var(--ink-raise); }
.rs-empty { margin:auto; max-width:38ch; padding:30px; text-align:center; color:var(--muted); }
.rs-empty .bleed-drop { width:36px; height:36px; margin:0 auto 14px; color:var(--vermilion); }
.rs-empty h3 { font:500 22px/1.2 var(--display); color:var(--bone); margin:0 0 8px; }
.rs-empty p { font-size:12.5px; line-height:1.65; margin:0; }
.as-results.has-results .rs-empty { display:none; }
.rs-body { flex:1; min-height:0; overflow:auto; padding:22px 26px 32px; display:grid; gap:28px; align-content:start; scrollbar-width:thin; }
.rs-back { display:none; margin:10px 18px 0; align-self:flex-start; }
.rs-section { display:grid; gap:14px; min-width:0; }
.rs-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; border-top:2px solid var(--vermilion); padding-top:12px; }
.rs-head h3 { font:500 22px/1.2 var(--display); letter-spacing:-.03em; margin:0; }
.rs-meta { margin:4px 0 0; font-size:10.5px; color:var(--muted); }
.rs-note { margin:0; font-size:11px; line-height:1.55; color:var(--marigold); }
.rs-empty-text { color:var(--muted); font-size:12.5px; }
.rs-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; }
.rs-card { background:var(--ink); border:1px solid var(--rule); border-radius:var(--r-sm); padding:12px 14px; display:grid; gap:5px; min-width:0; }
.rs-card-label { font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
.rs-card-value { font:500 22px/1.15 var(--display); letter-spacing:-.02em; color:var(--bone); overflow-wrap:anywhere; }
.rs-chart { background:var(--ink); border:1px solid var(--rule); border-radius:var(--r-sm); padding:14px 16px; }
.rs-chart h4 { margin:0 0 10px; font-size:11px; font-weight:600; color:var(--bone-2); }
.rs-table-wrap { overflow:auto; max-height:min(480px,60vh); border:1px solid var(--rule); border-radius:var(--r-sm); background:var(--ink); }
.rs-table { width:100%; border-collapse:collapse; font-size:12px; }
.rs-table th { position:sticky; top:0; background:var(--ink-raise-2); text-align:left; padding:0; border-bottom:1px solid var(--rule-2); white-space:nowrap; }
.rs-table th button { width:100%; padding:9px 12px; font:600 10.5px var(--font); color:var(--muted); text-align:inherit; letter-spacing:.04em; }
.rs-table th button:hover { color:var(--bone); }
.rs-table th[aria-sort] button { color:var(--vermilion-lift); }
.rs-table th.num,.rs-table td.num { text-align:right; }
.rs-table td { padding:8px 12px; border-bottom:1px solid var(--rule); color:var(--bone-2); }
.rs-table td:first-child { color:var(--bone); font-weight:500; }
.rs-table tr:last-child td { border-bottom:0; }
.rs-table-wrap .rs-note { padding:8px 12px; }
.studio-assistant:has(.as-drafts:not([hidden]),.as-memory:not([hidden]),.as-history:not([hidden])) .as-results { display:none; }
.studio-assistant:has(.as-drafts:not([hidden]),.as-memory:not([hidden]),.as-history:not([hidden])) .as-chat { flex:1; border:0; --gutter:max(18px,calc((100% - 768px) / 2)); }
@media(max-width:900px) {
  .studio-assistant { flex-direction:column; }
  .as-chat { flex:1; border-right:0; }
  .as-results { display:none; }
  .studio-assistant.view-results .as-chat { display:none; }
  .studio-assistant.view-results .as-results { display:flex; flex:1; }
  .rs-back { display:inline-flex; }
  .rs-body { padding:16px 14px 28px; }
}
@media(min-width:901px) { #as-results-tab { display:none; } }
.as-results:not(.has-results) .rs-body { display:none; }
.as-results:not(.has-results) .rs-empty { margin:auto; }
.rs-notes summary { cursor:pointer; font-size:11px; color:var(--marigold); }
.rs-notes .rs-note { margin-top:6px; }

/* Live data only (SHOPIFY_ONLY=1): just the Shopify chat, nothing that reads the demo inventory. */
.shopify-only .rail .nav-group:not(:first-child):not(.nav-foot),
.shopify-only .nav-foot a,
.shopify-only #search-btn,.shopify-only #alerts-btn,.shopify-only .currency,.shopify-only #as-drafts-tab { display:none; }
