:root{font-family:"DM Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#183f32;background:#f6f5ee;font-synthesis:none;--ink:#183f32;--muted:#647268;--line:#d9ded1;--paper:#f6f5ee;--green:#2b644f;--app-height:100dvh}
*{box-sizing:border-box}body{margin:0}button,input,textarea{font:inherit}button,a,input,textarea,summary{-webkit-tap-highlight-color:transparent}button,summary{cursor:pointer}button{color:inherit}button:disabled{cursor:wait;opacity:.55}a{color:inherit}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}img{max-width:100%;object-fit:contain}button{border:0;background:none}button:focus-visible,a:focus-visible,summary:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #36775c;outline-offset:3px}[hidden]{display:none!important}.symbols,.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.eyebrow{font-size:10px;font-weight:650;letter-spacing:1.8px;line-height:1.6}.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-size:19px;letter-spacing:-.7px;white-space:nowrap}.brand img{width:35px;height:35px}.brand b{font-weight:500;color:#677965}.primary,.secondary{display:flex;align-items:center;justify-content:center;gap:10px;border-radius:12px;min-height:46px;padding:12px 18px;font-size:14px;font-weight:550;text-decoration:none}.primary{background:var(--green);color:#fff}.primary:hover{background:#204c3c}.secondary{border:1px solid var(--line);background:#ffffff75}.secondary:hover{background:#e9eddf}.icon-button{display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:10px;list-style:none;flex-shrink:0}.icon-button:hover,.text-button:hover{background:#e5e9dd}.icon-button::-webkit-details-marker{display:none}.text-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:42px;padding:8px 10px;border-radius:10px;font-size:13px;font-weight:550;white-space:nowrap}.quiet-link{font-size:12px;text-decoration:none;color:var(--muted)}.loading{height:100dvh;display:grid;place-items:center;color:var(--muted);font-size:14px}
#app{height:var(--app-height);display:grid;grid-template-columns:264px minmax(0,1fr);overflow:hidden}.mobile-only{display:none}#sidebar{min-height:0;display:flex;flex-direction:column;padding:26px 18px 12px;background:#e9eddf;border-right:1px solid #d4dccb}.sidebar-brand{display:flex;align-items:center;justify-content:space-between;padding:0 6px 27px}.new-chat{justify-content:flex-start;padding-left:16px;margin-bottom:29px}.sidebar-label{padding:0 10px;color:#647267;margin-bottom:12px}.assistants{display:grid;gap:4px}.assistants button{display:flex;align-items:center;gap:12px;padding:12px 10px;border:1px solid transparent;border-radius:12px;text-align:left}.assistants button:hover{background:#ffffff50}.assistants button.active{background:#f8f9f1;border-color:#d8e1d0;box-shadow:0 2px 3px #1d493504}.assistants img{width:31px;height:31px}.assistants b{display:block;font-size:14px;font-weight:600}.assistants small{display:block;font-size:11px;color:var(--muted);margin-top:4px}.selected-dot{margin-left:auto;width:5px;height:5px;border-radius:50%;background:transparent}.active .selected-dot{background:var(--green)}.history-heading{display:flex;justify-content:space-between;align-items:center;margin:30px 10px 12px;color:var(--muted)}#chat-count{font-size:11px}.search{display:flex;align-items:center;gap:7px;padding:0 10px;margin-bottom:12px}.search svg{width:15px;color:#6c7a6c}.search input{min-width:0;width:100%;border:0;background:transparent;padding:9px 0;font-size:12px;color:var(--ink)}.history{flex:1;min-height:60px;overflow:auto;scrollbar-width:thin}.history-row{display:block;text-align:left;width:100%;padding:11px 12px;border-radius:9px;margin:2px 0;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.history-row.active{background:#dce4d2}.history-row:hover{background:#dce4d280}.history-row small{display:block;font-size:10px;margin-top:4px;color:var(--muted)}.no-chats{font-size:12px;line-height:1.6;color:var(--muted);padding:10px}.sidebar-bottom{padding-top:12px}.plan-button{width:100%;border:1px solid #cbd6c3;border-radius:12px;padding:14px;display:flex;align-items:center;justify-content:space-between;text-align:left}.plan-button b{font-size:13px;font-weight:600;display:block}.plan-button small{font-size:11px;display:block;color:var(--muted);margin-top:3px}.sidebar-bottom>p{font-size:10px;text-align:center;color:var(--muted);margin:12px 0}.account-button{width:100%;display:flex;gap:10px;align-items:center;padding:10px 6px;text-align:left}.avatar{display:grid;place-items:center;border-radius:50%;width:30px;height:30px;background:#d1ddc6;font-size:12px;flex-shrink:0}#account-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;flex:1}.account-button svg{width:18px}.workspace{display:flex;flex-direction:column;min-width:0;min-height:0}.chat-header{height:84px;flex-shrink:0;display:flex;justify-content:space-between;align-items:center;padding:16px clamp(18px,3vw,44px);border-bottom:1px solid #e4e6dc;gap:12px}.header-context,.header-actions{display:flex;align-items:center;gap:12px;min-width:0}.header-context img{width:32px;height:32px}.header-context b{font-size:15px;font-weight:600;display:block}.header-context small{font-size:11px;color:var(--muted);display:block;margin-top:4px}.header-actions{gap:5px}details{position:relative}.popover{position:absolute;right:0;top:48px;z-index:10;width:180px;border:1px solid var(--line);border-radius:14px;padding:6px;background:#fcfcf7;box-shadow:0 12px 30px #183f3215}.popover button{display:block;width:100%;text-align:left;padding:12px;border-radius:8px;font-size:13px}.popover button:hover{background:#e9eddf}.danger{color:#9e3e35}.conversation{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:36px 24px 20px;scrollbar-width:thin}.empty{max-width:720px;margin:auto;padding:clamp(24px,7vh,80px) 0 28px;text-align:center}.empty>.eyebrow{color:#738267}h1{font-weight:400;letter-spacing:-2px;font-size:clamp(42px,4.7vw,66px);line-height:1.06;margin:23px 0 18px}h1 em{font-family:"Instrument Serif",Georgia,serif;font-weight:400;letter-spacing:-1.5px}.empty>p{font-size:14px;color:var(--muted);line-height:1.75;margin:0 0 32px}.suggestions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;text-align:left}.suggestions button{border:1px solid var(--line);border-radius:14px;padding:18px;text-align:left;background:#ffffff40;min-height:96px;display:flex;flex-direction:column;justify-content:space-between;gap:18px}.suggestions button:hover{background:#edf1e5;border-color:#b7c7ad}.suggestions b{font-size:13px;font-weight:500;line-height:1.5}.suggestions small{font-size:10px;color:var(--muted)}.messages{max-width:760px;margin:auto}.message{margin:0 0 28px;line-height:1.8;font-size:15px;overflow-wrap:anywhere;min-width:0}.message.user{max-width:86%;margin-left:auto;padding:14px 20px;border-radius:19px 19px 4px 19px;background:#e7eddf;color:#173e32;white-space:pre-wrap}.message.assistant{padding:5px 0}.message-label{font-size:11px;color:var(--muted);font-weight:550;display:flex;gap:8px;align-items:center;margin-bottom:10px}.message-label img{width:21px;height:21px}.message pre{max-width:100%;overflow:auto;background:#e9ede2;padding:16px;border:1px solid #d7dfcf;border-radius:12px;font-size:12px;white-space:pre}.message code{font-family:ui-monospace,monospace;background:#e9ede2;border-radius:4px;padding:2px 4px;font-size:.86em}.message pre code{padding:0}.message p{margin:0 0 12px}.message ul,.message ol{padding-left:25px}.message h2,.message h3{font-size:18px;margin:20px 0 8px}.message a{color:#246249;text-decoration-thickness:1px;text-underline-offset:3px}.message-attachments{font-size:11px;color:var(--muted);margin-top:8px}.composer-area{flex-shrink:0;padding:6px clamp(16px,3vw,36px) max(16px,env(safe-area-inset-bottom));width:100%;max-width:832px;margin:0 auto}.composer{border:1px solid #cbd6c3;border-radius:20px;background:#fcfcf7;box-shadow:0 4px 18px #183f3205;padding:7px}.composer:focus-within{border-color:#7c9b78;box-shadow:0 0 0 3px #547d4810}textarea{resize:none;width:100%;min-height:55px;max-height:160px;padding:13px 14px 4px;background:transparent;border:0;font-size:15px;line-height:1.6;color:var(--ink);display:block;outline:none!important}textarea::placeholder{color:#8b9789}.composer-tools{display:flex;align-items:center;justify-content:space-between;padding:0 5px 3px}.attach-group{display:flex;align-items:center;gap:8px;min-width:0}.attach-group .text-button{font-size:12px;color:var(--muted)}#file-count{font-size:10px;color:var(--muted)}.send{width:40px;height:40px;border-radius:13px;background:var(--green);color:#fff;display:grid;place-items:center;flex-shrink:0}.send:hover{background:#204c3c}.send.stop:before{content:'';width:13px;height:13px;background:#fff;border-radius:2px}.send.stop svg{display:none}.composer-footer{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:10px 4px 0;color:var(--muted);font-size:10px;line-height:1.5}.composer-footer button{font-size:10px;padding:3px 0;text-decoration:underline;text-underline-offset:3px;flex-shrink:0}.files{display:flex;gap:6px;flex-wrap:wrap}.files:not(:empty){padding:6px 8px 0}.file-chip{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:9px;background:#f1f4e9;padding:5px 6px 5px 9px;max-width:100%}.file-chip svg{width:16px}.file-chip span{font-size:11px;max-width:200px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.file-chip button{width:30px;height:30px;display:grid;place-items:center}.file-chip button svg{width:13px}.error{padding:12px 15px;background:#f6eae1;border:1px solid #dfc7b4;border-radius:12px;font-size:12px;line-height:1.5;margin-bottom:10px}.backdrop{position:fixed;inset:0;background:#163c3250;z-index:19}.welcome-nav{display:flex;justify-content:space-between;align-items:center;padding:28px 5vw}.welcome-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);max-width:1380px;margin:auto;padding:0 4vw 40px;gap:8vw;min-height:calc(100svh - 100px);align-items:center}.welcome-art{align-self:stretch;min-height:600px;position:relative;background:#dfe8d1;border-radius:140px 140px 24px 24px;overflow:hidden;padding:54px 40px;display:flex;flex-direction:column;justify-content:space-between}.welcome-art>.eyebrow{position:relative;z-index:1;text-align:center}.orb{position:absolute;width:115%;aspect-ratio:1;top:8%;left:-12%;border-radius:50%;background:radial-gradient(circle at 33% 24%,#eaf0cf 0,#a1bc86 25%,#548364 50%,#1b4f3c 73%,#143d2b 85%);box-shadow:30px 40px 80px #1b4f3c30}.welcome-art p{position:relative;z-index:1;font-size:clamp(32px,3.9vw,57px);font-weight:400;letter-spacing:-2px;line-height:1.08;color:#f5f6df;margin:180px 0 70px}.welcome-art p em{font-family:"Instrument Serif",Georgia,serif;font-weight:400}.art-caption{font-size:9px;letter-spacing:1.5px;position:relative}.welcome-copy{max-width:430px;padding:25px 0}.welcome-copy>p{font-size:15px;line-height:1.8;color:var(--muted)}.welcome-copy h1{margin-top:20px}.signin-buttons{display:grid;gap:10px;margin-top:28px}.signin-buttons button{justify-content:space-between}.welcome-copy .legal{font-size:10px;margin:16px 0;line-height:1.9}.welcome-products{display:grid;grid-template-columns:1fr 1fr;gap:30px;margin-top:28px;border-top:1px solid var(--line);padding-top:23px}.welcome-products>div{display:grid;grid-template-columns:30px 1fr;gap:5px 10px}.welcome-products img{width:28px;height:28px;grid-row:span 2}.welcome-products b{font-size:13px}.welcome-products span{font-size:11px;color:var(--muted)}
dialog{width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:24px;border:1px solid #d2dac9;border-radius:24px;background:#f8f8ef;color:var(--ink);box-shadow:0 24px 100px #153c3230;overflow:auto}dialog::backdrop{background:#183f3255;backdrop-filter:blur(5px)}.dialog-top{display:flex;justify-content:space-between;align-items:center}dialog h2{font-size:30px;font-weight:450;letter-spacing:-1px;margin:16px 0}dialog p{font-size:13px;color:var(--muted);line-height:1.7}dialog .primary{margin-top:20px;width:100%}dialog .secondary{margin-top:10px;width:100%}dialog input{width:100%;padding:13px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink)}.usage-row{padding:16px 0;border-bottom:1px solid var(--line);font-size:13px}.usage-row>div{display:flex;justify-content:space-between;gap:15px}.usage-row small{display:block;margin-top:7px;color:var(--muted);font-size:11px}.usage-row progress{display:block;appearance:none;width:100%;height:5px;margin-top:13px;border:0;border-radius:9px;overflow:hidden;background:#dde5d3}.usage-row progress::-webkit-progress-bar{background:#dde5d3}.usage-row progress::-webkit-progress-value{background:#568364}.usage-row progress::-moz-progress-bar{background:#568364}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:calc(100vw - 32px);padding:12px 20px;background:#183f32;color:#fff;font-size:13px;border-radius:12px;opacity:0;pointer-events:none;z-index:100}
@media(min-width:1400px){#app{grid-template-columns:280px minmax(0,1fr)}#sidebar{padding-left:24px;padding-right:24px}}
@media(max-width:900px){#app{grid-template-columns:232px minmax(0,1fr)}#sidebar{padding:22px 12px 10px}.suggestions{gap:7px}.suggestions button{padding:14px}.welcome-grid{gap:5vw}.welcome-art{padding:44px 24px}.welcome-art p{font-size:40px}.welcome-copy h1{font-size:48px}.composer-footer>span{max-width:48%;text-align:right}}
@media(max-width:700px){#app{display:flex}.workspace{width:100%}.mobile-only{display:inline-flex}#sidebar{position:fixed;z-index:20;top:0;left:0;bottom:0;height:var(--app-height);width:min(310px,88vw);padding:22px 18px max(12px,env(safe-area-inset-bottom));transform:translateX(-105%);transition:transform .2s}.sidebar-brand{padding-bottom:21px}#sidebar.open{transform:translateX(0)}.chat-header{height:70px;padding:max(10px,env(safe-area-inset-top)) 12px 10px;gap:6px}.header-context{gap:8px}.header-context img{width:27px;height:27px}.header-context small{display:none}.header-actions{gap:0}.header-actions .text-button{font-size:12px;gap:4px;padding:8px}.conversation{padding:20px 18px 12px}.empty{padding:clamp(25px,8dvh,70px) 0 20px}.empty h1{font-size:48px;margin-top:20px}.empty>p{font-size:13px;margin-bottom:25px}.suggestions{grid-template-columns:1fr;gap:8px;max-width:360px;margin:auto}.suggestions button{min-height:54px;padding:13px 16px;flex-direction:row;align-items:center;gap:10px}.suggestions b{font-size:12px}.suggestions small{font-size:10px;white-space:nowrap}.composer-area{padding:4px 12px max(12px,env(safe-area-inset-bottom))}.composer{border-radius:17px}.composer textarea{font-size:16px;min-height:48px;max-height:110px;padding:10px 10px 4px}.composer-footer{font-size:9px;gap:8px;padding-top:7px}.composer-footer button{font-size:10px}.composer-footer>span{max-width:45%}.message{font-size:15px}.message.user{max-width:92%;padding:12px 16px}.welcome-nav{padding:20px}.welcome-nav .quiet-link{font-size:10px}.welcome-grid{display:flex;flex-direction:column;padding:22px;gap:35px}.welcome-copy{order:-1;max-width:430px;padding:0;width:100%}.welcome-copy h1{font-size:54px}.welcome-art{width:100%;min-height:370px;max-width:430px;border-radius:90px 90px 20px 20px;padding:32px}.orb{top:-5%}.welcome-art p{font-size:42px;margin:90px 0 40px}.welcome-products{margin-top:25px}.brand{font-size:18px}.brand img{width:30px;height:30px}}
@media(max-width:360px){.header-context img{display:none}.header-actions .text-button{padding:6px}.empty h1{font-size:42px}.suggestions small{display:none}.composer-footer>span{font-size:8px}.welcome-nav .quiet-link{max-width:90px;text-align:right}.welcome-copy h1{font-size:46px}}
@media(max-height:650px){.empty{padding-top:20px}.empty h1{font-size:40px;margin:15px 0}.empty>p{margin-bottom:18px}.history-heading{margin-top:16px}.new-chat{margin-bottom:16px}.chat-header{height:64px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{transition:none!important;scroll-behavior:auto!important}}
.brand img{filter:brightness(0) saturate(100%) invert(22%) sepia(19%) saturate(1159%) hue-rotate(104deg) brightness(89%) contrast(90%)}
.brand{gap:14px;letter-spacing:0}.monogram{display:block;width:40px;height:48px;flex-shrink:0;background:#3d8b6f;mask:url('/sig-logo-new.png') center/auto 160% no-repeat;-webkit-mask:url('/sig-logo-new.png') center/auto 160% no-repeat}.brand-wordmark{font-size:17px;font-weight:650}.brand-wordmark b{font-weight:500}.brand-wordmark small{display:block;font-size:9px;font-weight:600;letter-spacing:1.5px;color:#6c7b6c;margin-top:7px}
/* Keep the account footer inside the rail even when the available height shrinks. */
body:has(#app:not([hidden])){overflow:hidden}
#app{overflow:clip}
#sidebar{overflow:hidden}
.sidebar-brand,.sidebar-bottom{flex-shrink:0}
.sidebar-content{display:flex;flex-direction:column;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-bottom:6px}
.sidebar-content>.new-chat,.sidebar-content>.sidebar-label,.sidebar-content>.assistants,.sidebar-content>.history-heading,.sidebar-content>.search{flex-shrink:0}
.sidebar-content .history{flex:1 0 70px;overflow:visible}
.sidebar-bottom{background:#e9eddf;border-top:1px solid #d4dccb;margin-top:8px}
@media(max-height:650px){.sidebar-brand{padding-bottom:16px}.sidebar-content .history-heading{margin-top:18px}.sidebar-bottom>p{margin:8px 0}.plan-button{padding:11px 14px}.sidebar-bottom{padding-top:10px}}

.chat-files{width:100%;font-size:12px;color:var(--muted)}.chat-files summary{cursor:pointer;padding:4px 0}.chat-files p{font-size:11px;line-height:1.5;margin:8px 0}.chat-files .file-chip{display:inline-flex;margin:0 6px 6px 0}#file-count{white-space:normal}

.workspace{position:relative}.file-drop{position:absolute;inset:12px;z-index:40;display:grid;place-items:center;padding:24px;background:#f4f3ebed;border:2px dashed #42745d;border-radius:20px;pointer-events:none;backdrop-filter:blur(4px)}.file-drop[hidden]{display:none}.file-drop-card{display:grid;justify-items:center;gap:14px;text-align:center;max-width:340px}.file-drop-card svg{width:36px;height:36px;color:var(--green)}.file-drop-card strong{font-size:22px;font-weight:550}.file-drop-card span{font-size:13px;line-height:1.6;color:var(--muted)}@media(prefers-reduced-transparency:reduce){.file-drop{background:#f4f3eb;backdrop-filter:none}}
/* Rich text flows inside the conversation, including narrow split views. */
.message-content{min-width:0;overflow-wrap:anywhere}.message-content a{overflow-wrap:anywhere;word-break:break-word}.message-content h1{font-family:inherit;font-size:24px;letter-spacing:-.5px;line-height:1.35;margin:22px 0 12px}.message-content h2{font-size:21px}.message-content h4,.message-content h5,.message-content h6{font-size:16px;margin:18px 0 8px}.message-content blockquote{margin:16px 0;padding:4px 16px;border-left:3px solid #a5bc99;color:var(--muted)}.message-content hr{border:0;border-top:1px solid var(--line);margin:22px 0}.message-content li>p{margin:4px 0}.markdown-table{max-width:100%;overflow:auto;margin:16px 0}.markdown-table table{border-collapse:collapse;font-size:13px;min-width:100%}.markdown-table th,.markdown-table td{border:1px solid var(--line);padding:9px 12px;text-align:left}.markdown-table th{background:#e9eddf}.code-block{min-width:0;max-width:100%;margin:16px 0;border:1px solid #d7dfcf;border-radius:12px;overflow:hidden;background:#e9ede2}.code-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:6px 12px;border-bottom:1px solid #d7dfcf;font-size:11px}.code-toolbar span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.code-toolbar button{font-size:12px;min-height:36px;flex-shrink:0;text-decoration:underline;text-underline-offset:3px}.message .code-block pre{border:0;border-radius:0;margin:0}.message-content strong{font-weight:700}
#app.files-open{grid-template-columns:264px minmax(320px,1fr) minmax(320px,380px)}#workfiles{min-width:0;min-height:0;overflow:auto;background:#f0f2e8;border-left:1px solid var(--line);padding:24px 20px;overscroll-behavior:contain;scrollbar-width:thin}.workfiles-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.workfiles-heading h2{font-family:"Instrument Serif",Georgia,serif;font-size:34px;font-weight:400;margin:4px 0 0}.workfiles-note,.workfiles-footer{font-size:12px;color:var(--muted);line-height:1.6}.workfiles-footer{border-top:1px solid var(--line);padding-top:16px;margin-top:24px}#workfile-list h3{font-size:11px;font-weight:650;letter-spacing:.6px;text-transform:uppercase;margin:24px 0 10px}.workfiles-empty{font-size:12px;color:var(--muted);line-height:1.6}.workfile-row{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:12px 10px;margin:6px 0;border:1px solid #d8dfcf;background:#fafbf5;border-radius:12px}.workfile-row:hover{border-color:#8fa885}.workfile-row>span{min-width:0;font-size:13px;overflow-wrap:anywhere}.workfile-row small{display:block;font-size:10px;color:var(--muted);margin-top:4px}#file-detail{margin-top:22px;padding-top:20px;border-top:1px solid #cbd6c3}#draft-name{width:100%;background:#fafbf5;border:1px solid #d2dcc9;border-radius:8px;padding:10px;margin-top:6px;color:var(--ink);font-size:13px}#file-status{font-size:11px;color:var(--muted);line-height:1.6}#draft-editor{height:clamp(240px,40dvh,580px);max-height:none;background:#fafbf5;border:1px solid var(--line);border-radius:10px;font:12px/1.65 ui-monospace,monospace;padding:14px;white-space:pre;overflow:auto;resize:vertical}#file-preview img{display:block;max-height:420px;margin:auto;border-radius:8px}#file-preview pre{max-height:50dvh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;font:12px/1.65 ui-monospace,monospace;background:#fafbf5;border:1px solid var(--line);padding:14px;border-radius:10px}.file-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:12px}.file-actions button{flex:1;font-size:12px;min-height:44px;padding:10px}
@media(max-width:1100px){#app.files-open{grid-template-columns:232px minmax(0,1fr)}#workfiles{position:fixed;inset:0 0 0 auto;width:min(460px,100%);z-index:30;box-shadow:-30px 0 100px #183f3233;padding:max(20px,env(safe-area-inset-top)) 20px max(20px,env(safe-area-inset-bottom))}}@media(max-width:700px){#workfiles{width:100%;border:0}#open-workfiles{padding:8px 6px;font-size:12px}#header-new span{display:none}#header-new{width:36px}.code-toolbar button{min-height:44px}}
.document-action{font-size:11px;color:var(--muted);margin-top:4px;padding-left:0;min-height:38px}.document-action:hover{padding-left:10px}
@media(min-width:701px){#app:not(.sidebar-collapsed) #open-sidebar{display:none}#app.sidebar-collapsed{grid-template-columns:minmax(0,1fr)}#app.sidebar-collapsed #sidebar{display:none}#app.sidebar-collapsed.files-open{grid-template-columns:minmax(320px,1fr) minmax(320px,380px)}.sidebar-brand{gap:4px;padding-left:0;padding-right:0}.sidebar-brand .brand{gap:8px}.sidebar-brand .icon-button{width:30px;height:36px}#close-sidebar svg{width:16px}}
@media(min-width:701px) and (max-width:1100px){#app.sidebar-collapsed.files-open{grid-template-columns:minmax(0,1fr)}}
.storage-summary{display:block;width:100%;padding:12px;text-align:left;border:1px solid var(--line,#ccd4c3);border-radius:12px;background:var(--paper,#f5f3e8);color:var(--ink,#173d32);font:inherit;font-size:.82rem;margin-bottom:16px;overflow-wrap:anywhere}.storage-progress{width:100%;height:8px;accent-color:#2c6b55}.storage-file{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:14px 0;border-bottom:1px solid #d5dccf}.storage-file>div{min-width:0}.storage-file strong{display:block;overflow-wrap:anywhere;font-size:.94rem}.storage-file small{display:block;opacity:.7;margin-top:4px}.storage-file button{flex-shrink:0}

/* Keep editable text at iOS's native focus size, including landscape and tablets. */
#message{font-size:16px}
@media (pointer:coarse), (max-width:700px){
 .search input,dialog input,#draft-name,#draft-editor{font-size:16px}
 #app{position:fixed;left:0;right:0;top:var(--viewport-top,0px);width:100%;max-width:100%;height:var(--app-height);min-height:0}
 .workspace,.composer-area,.composer-tools{min-width:0}
 .attach-group{flex-wrap:wrap;gap:2px 8px}
 .composer-footer{flex-wrap:wrap}
 #workfiles{top:var(--viewport-top,0px);bottom:auto;height:var(--app-height)}
}

/* Prevent WebKit text autosizing from inflating controls during keyboard focus. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
@media(pointer:coarse),(max-width:700px){
 #message,.search input,dialog input,#draft-name,#draft-editor{font-size:17px}
 .workspace{flex:1 1 0;width:0;max-width:100%}
 .chat-header,.conversation,.composer-area{width:100%;max-width:100%}
 .composer-footer>span{min-width:0;overflow-wrap:anywhere}
}

@media(pointer:coarse),(max-width:700px){
 html:has(#app:not([hidden])),body:has(#app:not([hidden])){width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
 body:has(#app:not([hidden])){position:fixed;inset:0}
}


/* ============================================================
   NIGHT MODE — warm dark variant of the paper/green palette.
   Toggled by html[data-theme="dark"]. Default follows the OS.
   ============================================================ */
html[data-theme="dark"]{
  --ink:#ece9dc; --muted:#a8ac9a; --line:#31362a; --paper:#151811; --green:#79bd97;
  color:#ece9dc; background:#151811; color-scheme:dark;
}
html[data-theme="dark"] button:focus-visible,
html[data-theme="dark"] a:focus-visible,
html[data-theme="dark"] summary:focus-visible,
html[data-theme="dark"] input:focus-visible,
html[data-theme="dark"] textarea:focus-visible{ outline-color:#79bd97 }

html[data-theme="dark"] .primary{ background:#2f7a5c; color:#f2f7f0 }
html[data-theme="dark"] .primary:hover{ background:#3b8f6c }
html[data-theme="dark"] .secondary{ background:rgba(255,255,255,.06) }
html[data-theme="dark"] .secondary:hover{ background:#222819 }
html[data-theme="dark"] .icon-button:hover,
html[data-theme="dark"] .text-button:hover{ background:#222819 }
html[data-theme="dark"] .brand b{ color:#9aa791 }
html[data-theme="dark"] .brand-wordmark small{ color:var(--muted) }

html[data-theme="dark"] #sidebar{ background:#1a1e15; border-right-color:var(--line) }
html[data-theme="dark"] .sidebar-bottom{ background:#1a1e15; border-top-color:var(--line) }
html[data-theme="dark"] .sidebar-label{ color:var(--muted) }
html[data-theme="dark"] .assistants button:hover{ background:rgba(255,255,255,.05) }
html[data-theme="dark"] .assistants button.active{ background:#242a1c; border-color:#3a4230; box-shadow:0 2px 3px rgba(0,0,0,.35) }
html[data-theme="dark"] .search svg{ color:var(--muted) }
html[data-theme="dark"] .history-row.active{ background:#2b3222 }
html[data-theme="dark"] .history-row:hover{ background:rgba(255,255,255,.05) }
html[data-theme="dark"] .plan-button{ border-color:var(--line) }
html[data-theme="dark"] .avatar{ background:#2f3627; color:#dfe6d4 }

html[data-theme="dark"] .chat-header{ border-bottom-color:var(--line) }
html[data-theme="dark"] .popover{ background:#1f2419; box-shadow:0 12px 30px rgba(0,0,0,.55) }
html[data-theme="dark"] .popover button:hover{ background:#262b20 }
html[data-theme="dark"] .danger{ color:#e0796d }
html[data-theme="dark"] .empty>.eyebrow{ color:var(--muted) }
html[data-theme="dark"] .suggestions button{ background:rgba(255,255,255,.05) }
html[data-theme="dark"] .suggestions button:hover{ background:#262b20; border-color:#4a5440 }

html[data-theme="dark"] .message.user{ background:#26301f; color:#e6ecdc }
html[data-theme="dark"] .message pre,
html[data-theme="dark"] .code-block{ background:#10140c; border-color:var(--line) }
html[data-theme="dark"] .code-toolbar{ border-bottom-color:var(--line) }
html[data-theme="dark"] .message code{ background:#222819; color:#d8e4cf }
html[data-theme="dark"] .message a{ color:#8fd0aa }
html[data-theme="dark"] .message-content blockquote{ border-left-color:#4c6b4f }
html[data-theme="dark"] .markdown-table th{ background:#262b20 }

html[data-theme="dark"] .composer{ border-color:var(--line); background:#1f2419; box-shadow:0 4px 18px rgba(0,0,0,.35) }
html[data-theme="dark"] .composer:focus-within{ border-color:#5c9a78; box-shadow:0 0 0 3px rgba(120,190,150,.12) }
html[data-theme="dark"] textarea::placeholder{ color:#7d8474 }
html[data-theme="dark"] .send{ background:#2f7a5c; color:#f2f7f0 }
html[data-theme="dark"] .send:hover{ background:#3b8f6c }
html[data-theme="dark"] .file-chip{ background:#262b20 }
html[data-theme="dark"] .error{ background:#3a2a22; border-color:#6b4a38 }

html[data-theme="dark"] .backdrop{ background:rgba(0,0,0,.55) }
html[data-theme="dark"] .welcome-art{ background:#1f2419 }
html[data-theme="dark"] .welcome-art p{ color:#eef2dd }

html[data-theme="dark"] dialog{ border-color:var(--line); background:#1f2419; box-shadow:0 24px 100px rgba(0,0,0,.65) }
html[data-theme="dark"] dialog::backdrop{ background:rgba(0,0,0,.65) }
html[data-theme="dark"] dialog input{ background:#151811; color:var(--ink) }
html[data-theme="dark"] .usage-row progress,
html[data-theme="dark"] .usage-row progress::-webkit-progress-bar{ background:#2b3226 }
html[data-theme="dark"] .usage-row progress::-webkit-progress-value,
html[data-theme="dark"] .usage-row progress::-moz-progress-bar{ background:#6fae8e }
html[data-theme="dark"] #toast{ background:#2f7a5c; color:#f2f7f0 }
html[data-theme="dark"] .monogram{ background:#2f7a5c }

html[data-theme="dark"] .file-drop{ background:rgba(20,23,15,.94); border-color:#4e8a6e }
html[data-theme="dark"] #workfiles{ background:#171b12; box-shadow:-30px 0 100px rgba(0,0,0,.65) }
html[data-theme="dark"] .workfile-row{ border-color:var(--line); background:#1f2419 }
html[data-theme="dark"] .workfile-row:hover{ border-color:#5c9a78 }
html[data-theme="dark"] #file-detail{ border-top-color:var(--line) }
html[data-theme="dark"] #draft-name,
html[data-theme="dark"] #draft-editor{ background:#151811; border-color:var(--line); color:var(--ink) }
html[data-theme="dark"] #file-preview pre{ background:#10140c }
html[data-theme="dark"] .storage-progress{ accent-color:#6fae8e }
html[data-theme="dark"] .storage-file{ border-bottom-color:var(--line) }

/* --- Night mode toggle --- */
.theme-toggle{
  width:100%; display:flex; align-items:center; gap:10px; margin:0 0 4px;
  padding:9px 12px; border:1px solid #cbd6c3; border-radius:12px;
  background:transparent; color:var(--ink); font-size:12px; font-weight:550;
  font-family:inherit; cursor:pointer;
  transition:background .15s ease, border-color .15s ease;
}
.theme-toggle:hover{ background:#e9eddf }
.theme-toggle .tt-label{ flex:1; text-align:left }
.theme-toggle .tt-icon{ width:15px; height:15px; color:#5c6f5c; flex-shrink:0 }
.theme-toggle .tt-switch{
  position:relative; width:34px; height:18px; border-radius:999px; flex-shrink:0;
  background:#cdd8c3; box-shadow:inset 0 0 0 1px #b9c7ae;
  transition:background .18s ease;
}
.theme-toggle .tt-knob{
  position:absolute; top:2px; left:2px; width:14px; height:14px; border-radius:50%;
  background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.25);
  transition:transform .18s ease, background .18s ease;
}
html[data-theme="dark"] .theme-toggle{ border-color:var(--line) }
html[data-theme="dark"] .theme-toggle:hover{ background:#222819 }
html[data-theme="dark"] .theme-toggle .tt-icon{ color:#8fb08f }
html[data-theme="dark"] .theme-toggle .tt-switch{ background:var(--green); box-shadow:inset 0 0 0 1px #4e8a6e }
html[data-theme="dark"] .theme-toggle .tt-knob{ transform:translateX(16px); background:#12200f }


/* Landing-nav placement + compact variant */
.welcome-nav .nav-right{ display:flex; align-items:center; gap:14px }
.theme-toggle-compact{ width:auto; padding:6px 10px; gap:8px; border-radius:999px; margin:0 }
.theme-toggle-compact .tt-label{ display:none }

/* Dark scrollbars so no light chrome leaks into night mode */
html[data-theme="dark"]{ scrollbar-color:#3a4230 #151811 }
html[data-theme="dark"] ::-webkit-scrollbar{ width:10px; height:10px }
html[data-theme="dark"] ::-webkit-scrollbar-track{ background:#151811 }
html[data-theme="dark"] ::-webkit-scrollbar-thumb{ background:#3a4230; border-radius:6px }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{ background:#4a5440 }


/* ============================================================
   Organic hero motion — the same language as the main site's
   breathe (12s) / glass-flow (12s) / orbit-breathe (9s), retimed
   slower for a calm hero. Silhouette morphs, glow drifts, veil flows.
   ============================================================ */
.orb{
  transform-origin:52% 56%;
  animation:orb-drift 26s cubic-bezier(.37,.15,.63,.85) infinite alternate,
            orb-morph 19s ease-in-out infinite alternate;
  will-change:transform,border-radius;
}
@keyframes orb-drift{
  from{ transform:translate3d(0,0,0) scale(1) rotate(0deg) }
  to{ transform:translate3d(-2.2%,-1.6%,0) scale(1.045) rotate(-2.5deg) }
}
@keyframes orb-morph{
  0%{ border-radius:50% 50% 50% 50% }
  33%{ border-radius:53% 47% 45% 55% / 52% 48% 52% 48% }
  66%{ border-radius:47% 53% 55% 45% / 48% 54% 46% 52% }
  100%{ border-radius:50% 50% 50% 50% }
}

/* Soft light that breathes across the surface */
.orb::before{
  content:''; position:absolute; inset:0; border-radius:inherit; pointer-events:none;
  background:radial-gradient(circle at 30% 22%, rgba(240,246,214,.55) 0%, rgba(234,240,207,.18) 26%, transparent 46%);
  mix-blend-mode:screen; opacity:.5;
  animation:orb-glow 12s ease-in-out infinite alternate;
}
@keyframes orb-glow{
  from{ transform:translate3d(0,0,0) scale(1); opacity:.42 }
  to{ transform:translate3d(2%,2.4%,0) scale(1.07); opacity:.68 }
}

/* Translucent veil drifting inside the shape (main-site glass-flow) */
.orb::after{
  content:''; position:absolute; inset:-32%; border-radius:50%; pointer-events:none;
  background:conic-gradient(from 0deg,
     rgba(255,255,255,.10) 0deg,
     rgba(150,205,168,.05) 110deg,
     rgba(255,255,255,.09) 210deg,
     rgba(120,190,150,.04) 300deg,
     rgba(255,255,255,.10) 360deg);
  transform-origin:55% 45%;
  filter:blur(1px);
  animation:orb-flow 12s ease-in-out infinite alternate;
}
@keyframes orb-flow{
  from{ transform:rotate(-28deg) scale(1.3) translateX(-3%) }
  to{ transform:rotate(-12deg) scale(1.4) translateX(4%) }
}

/* Pause the hero motion when the panel scrolls out of view (main-site parity) */
.art-out-of-view .orb,
.art-out-of-view .orb::before,
.art-out-of-view .orb::after{ animation-play-state:paused }

/* Lava-lamp interior: bright masses (screen) + dark masses (multiply)
   so the blobs read as separate molten bodies instead of one wash. */
.orb{ overflow:hidden; isolation:isolate }
.orb .blob{
  position:absolute; display:block; aspect-ratio:1; border-radius:50%;
  mix-blend-mode:screen; opacity:1; will-change:transform;
}
.orb .b1{
  width:64%; left:-8%; top:0%; filter:blur(9px);
  background:radial-gradient(circle at 45% 42%, #ffffff 0%, #e8f6cd 34%, rgba(219,237,189,0) 62%);
  animation:lamp-a 23s ease-in-out infinite alternate;
}
.orb .b2{
  width:62%; left:46%; top:30%; filter:blur(11px); mix-blend-mode:multiply;
  background:radial-gradient(circle at 50% 50%, #0b2a1f 0%, #12392c 46%, rgba(20,56,43,0) 68%);
  animation:lamp-b 31s ease-in-out infinite alternate;
}
.orb .b3{
  width:54%; left:30%; bottom:-8%; filter:blur(8px);
  background:radial-gradient(circle at 48% 46%, #fdfff2 0%, #d7ecb8 36%, rgba(203,228,172,0) 66%);
  animation:lamp-c 19s ease-in-out infinite alternate;
}
.orb .b4{
  width:44%; left:60%; bottom:26%; filter:blur(10px); mix-blend-mode:multiply;
  background:radial-gradient(circle at 50% 50%, #0d2f23 0%, #17422f 44%, rgba(23,66,47,0) 66%);
  animation:lamp-d 27s ease-in-out infinite alternate;
}
@keyframes lamp-a{
  0%{ transform:translate3d(0,0,0) scale(1) }
  50%{ transform:translate3d(26%,16%,0) scale(1.16) }
  100%{ transform:translate3d(10%,38%,0) scale(.94) }
}
@keyframes lamp-b{
  0%{ transform:translate3d(0,0,0) scale(1.04) }
  40%{ transform:translate3d(-24%,14%,0) scale(.9) }
  100%{ transform:translate3d(-8%,-9%,0) scale(1.12) }
}
@keyframes lamp-c{
  0%{ transform:translate3d(0,0,0) scale(.96) }
  55%{ transform:translate3d(38%,-22%,0) scale(1.14) }
  100%{ transform:translate3d(12%,-6%,0) scale(1.02) }
}
@keyframes lamp-d{
  0%{ transform:translate3d(0,0,0) scale(1.08) }
  45%{ transform:translate3d(-26%,-8%,0) scale(.92) }
  100%{ transform:translate3d(-10%,18%,0) scale(1.1) }
}

/* Reduced motion: keep the shape alive but slower and with less travel,
   because Windows "animation effects off" reports reduce here and would
   otherwise freeze every decorative element. */
@media (prefers-reduced-motion: reduce){
  .orb{ animation-duration:38s,28s }
  .orb .b1{ animation-duration:34s }
  .orb .b2{ animation-duration:45s }
  .orb .b3{ animation-duration:29s }
  .orb .b4{ animation-duration:40s }
  .orb::after{ animation-duration:19s }
}


/* Legibility over the moving orb: soft scrim via shadow, both themes */
.welcome-art p{ text-shadow:0 2px 28px rgba(24,63,50,.45), 0 1px 2px rgba(24,63,50,.28) }
.welcome-art>.eyebrow{ text-shadow:0 1px 12px rgba(24,63,50,.4) }
html[data-theme="dark"] .welcome-art p{ color:#f7f9e9; text-shadow:0 2px 32px rgba(6,18,12,.6), 0 1px 3px rgba(6,18,12,.45) }
html[data-theme="dark"] .welcome-art>.eyebrow{ color:rgba(247,249,233,.92); text-shadow:0 1px 14px rgba(6,18,12,.55) }


/* Depth so the masses read as volume inside liquid, plus fine grain
   to kill the "CSS blur" smoothness. */
.orb{
  box-shadow: inset -22px -26px 70px rgba(6, 28, 20, .38),
              inset 16px 18px 54px rgba(255,255,255,.16);
  background-image:
    url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E"),
    radial-gradient(circle at 33% 24%, #eaf0cf 0, #a1bc86 25%, #548364 50%, #1b4f3c 73%, #143d2b 85%);
  background-blend-mode: soft-light, normal;
  background-size: 160px 160px, auto;
}


/* Text bed: a left-anchored band in the panel colour. Predictable contrast
   for the whole headline width, fading before the dark mass on the right. */
.welcome-art::before{
  content:''; position:absolute; inset:0; pointer-events:none; z-index:0;
  background:
    linear-gradient(96deg,
      rgba(246,245,238,.88) 0%,
      rgba(246,245,238,.74) 26%,
      rgba(246,245,238,.45) 46%,
      rgba(246,245,238,.12) 60%,
      rgba(246,245,238,0) 70%),
    radial-gradient(80% 60% at 8% 58%, rgba(246,245,238,.55) 0%, rgba(246,245,238,0) 76%);
}
html[data-theme="dark"] .welcome-art::before{
  background:
    linear-gradient(96deg,
      rgba(13,17,10,.94) 0%,
      rgba(13,17,10,.86) 26%,
      rgba(13,17,10,.66) 46%,
      rgba(13,17,10,.30) 60%,
      rgba(13,17,10,0) 70%),
    radial-gradient(80% 60% at 8% 58%, rgba(13,17,10,.50) 0%, rgba(13,17,10,0) 76%);
}

/* Label legibility over moving masses: a halo of the panel colour means the
   text keeps contrast whether a bright or dark mass drifts behind it. */
.welcome-art>.eyebrow{
  color:#17453a;
  text-shadow:0 0 18px rgba(223,232,209,.95), 0 0 10px rgba(223,232,209,.95), 0 0 5px rgba(223,232,209,.9);
}
.welcome-art .art-caption{
  color:#16402f;
  font-weight:700;
  text-shadow:none;
}
html[data-theme="dark"] .welcome-art>.eyebrow{
  color:rgba(247,249,233,.95);
  text-shadow:0 0 18px rgba(31,36,25,.95), 0 0 10px rgba(31,36,25,.95), 0 0 5px rgba(31,36,25,.9);
}
html[data-theme="dark"] .welcome-art .art-caption{
  color:rgba(240,244,229,.95);
  font-weight:700;
  text-shadow:none;
}




/* Headline ink: dark on the light wash, cream on the dark wash */
.welcome-art p{ color:#123a2b; text-shadow:0 1px 2px rgba(255,255,255,.35) }
html[data-theme="dark"] .welcome-art p{ color:#f7f9e9; text-shadow:0 1px 3px rgba(0,0,0,.35) }


/* Dark theme: keep the masses glowing but not blooming out under the headline */
html[data-theme="dark"] .orb .b1{ filter:blur(9px) brightness(.72) }
html[data-theme="dark"] .orb .b3{ filter:blur(8px) brightness(.78) }
