/* Reading-first app shell. This is the final layer over the original visual concept. */
:root{color-scheme:dark;--reading-bottom:0px}
html:has(body.flow){scrollbar-width:none;scroll-padding:88px 0 var(--reading-bottom)}
html:has(body.flow)::-webkit-scrollbar{display:none}
body.flow{--bg:#181716;--ink:#e6e2db;--muted:#b6afa8;--dim:#aaa29c;--accent:#dab0e5;background:#181716;font-size:16px}
.flow .ambient{opacity:.36;filter:saturate(.95);background:#181716}
.flow .grain{opacity:.024}
.flow .background-preview{background:#181716}
.flow .background-preview>.atmosphere{opacity:.36;filter:saturate(.95)}
.flow .topbar{height:72px;padding:12px 28px;position:sticky;top:0;border:0;box-shadow:none;background:none;z-index:20}
.flow .topbar::before{inset:0 0 -18px;background:linear-gradient(#181716fa 0%,#181716f5 70%,#18171600 100%);backdrop-filter:none}
.flow .wordmark{background:#ddb0e6;filter:drop-shadow(0 0 9px #b97ad721)}
.flow .today-link,.flow .location{color:#c6b7cf;font-size:14px}
.flow .workspace{width:calc(100% - 80px);max-width:760px;margin-inline:auto;min-height:calc(var(--app-height,100dvh) - 112px)}
.flow .workspace.has-messages{padding-bottom:calc(var(--dock-height,140px) + 48px)}
.flow .message{margin-bottom:32px;max-width:100%;min-width:0}
.flow .message.assistant{padding:0;background:none;box-shadow:none;border:0}
.flow .message.user{margin-left:8%;padding:16px 22px;background:#ffffff06;border:0;border-radius:18px}
.flow .message-body,.flow .source-content{font-family:Georgia,'Times New Roman',serif;font-size:18px;line-height:1.65;font-weight:400;color:#e1ddd6;text-shadow:none;letter-spacing:-.012em;overflow-wrap:break-word}
.flow .message.user .message-body{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;font-size:16px;line-height:1.6;letter-spacing:0;color:#d9d5ce}
.flow .message-body strong{font-weight:600;color:#e9e5de}
.flow .message-body p{margin:0 0 1em}
.flow .message-body h1{font-size:1.35em}.flow .message-body h2{font-size:1.2em}.flow .message-body h3{font-size:1.08em}
.flow .message-body h1,.flow .message-body h2,.flow .message-body h3{line-height:1.4;font-weight:600;color:#e9e5de;margin:1.6em 0 .65em}
.flow .message-body li{margin:.35em 0}.flow .message-body ul,.flow .message-body ol{padding-left:1.3em}
.flow .message-body a{color:#c9b0dd}.flow .message-body blockquote{color:#c4beb6;border-left-color:#b89bc54d}
.flow .message-more,.flow .thread-title,.flow .new-thread{color:#bdb4c2}
.flow .message-head{color:#a7a09a}.flow .tabs{border-color:#ffffff0c}.flow .tab{color:#afa8a1}.flow .tab.active{color:#d8c0e3}
.flow .thread-heading{min-height:44px;margin-bottom:14px}.flow .thread-title{font-size:14px;min-height:44px}
.flow .messages{padding-top:18px}
.flow .workspace-footer{color:#9c9590}.flow.has-chat-dock .workspace-footer{display:none}
.flow .sidebar{top:8px;bottom:8px;left:8px;width:282px;border:1px solid #c4b0d013;border-radius:18px;background:linear-gradient(150deg,#302c33f7,#252425fc);box-shadow:10px 0 50px #0003;backdrop-filter:blur(24px);scrollbar-width:thin;scrollbar-color:#756877 transparent}
.flow .drawer-head{color:#c6b7cf}.flow .sidebar .section-label{color:#a9a0ac;font-size:11px;letter-spacing:.12em}
.flow .sidebar .project-link,.flow .sidebar .nav-button{color:#c9c3cd;font-size:14px;min-height:44px}
.flow .new-thought{background:#bb9bcd0b;border-color:#b49cc522;color:#e0d1e8}
.flow .sidebar-bottom{background:transparent}
.flow .composer-wrap{min-width:0}
.flow .workspace.has-messages .composer-wrap{position:fixed;z-index:22;bottom:calc(14px + var(--dock-inset,0px));left:calc(var(--content-left,0px) + (100% - var(--content-left,0px))/2);transform:translateX(-50%);width:min(760px,calc(100% - var(--content-left,0px) - 80px));padding:0;margin:0}
.flow .workspace.has-messages .composer{background:#302e2cf5;border:1px solid #d1c3d221;border-radius:20px;box-shadow:0 8px 32px #0002;padding:14px 16px 8px;backdrop-filter:blur(24px)}
.flow .workspace.has-messages .floating-field{padding:0;min-height:44px;gap:12px;display:flex;align-items:flex-end}
.flow .workspace.has-messages .inviting-cursor,.flow .workspace.has-messages .entry-glow{display:none}
.flow .workspace.has-messages .composer textarea{font:17px/1.5 Georgia,'Times New Roman',serif;padding:8px 0;width:100%;min-height:44px;flex:1;resize:none;color:#e7e1da;text-shadow:none;caret-color:#dab0e5;overflow-y:auto!important;max-height:var(--editor-max,220px)}
.flow .composer textarea::placeholder{color:#bcb4bd;opacity:1}
.flow .workspace.has-messages .composer textarea:focus::placeholder{opacity:1}
.flow .workspace.has-messages #send-button{position:static;flex:0 0 40px;width:40px;height:40px;border:0;background:#c9aedc;color:#29232e;opacity:1;visibility:visible;margin-bottom:2px}
.flow .workspace.has-messages #send-button:disabled{background:#b7a6bd29;color:#b4a7b9;opacity:1}
.flow .composer-bottom{padding:2px 0 0;gap:12px;min-height:36px}
.flow .composer-bottom button{font-size:12px;color:#c1b1c9;min-height:36px}
.flow .workspace.is-empty:not(.mobile-composing) .composer textarea{color:#eee5ef;font-size:19px;text-shadow:none}
.flow .mobile-reply,.flow .composer-collapse{display:none}
.flow .conversation-position{position:fixed;right:6px;top:42%;z-index:19;width:40px;display:flex;align-items:center;flex-direction:column;gap:8px;color:#b6a4bd;opacity:1}
.flow .conversation-position:hover,.flow .conversation-position:focus-within{opacity:1}
.flow .conversation-position[hidden],.flow .jump-latest[hidden]{display:none}
.flow .conversation-position input{appearance:none;writing-mode:vertical-lr;direction:ltr;width:44px;height:120px;margin:0;cursor:pointer;background:transparent;border:0;border-radius:0;padding:0;touch-action:none}
.flow .conversation-position input::-webkit-slider-runnable-track{width:12px;background:repeating-linear-gradient(to bottom,#b3a9b53d 0 2px,transparent 2px 15px);border:0}
.flow .conversation-position input::-webkit-slider-thumb{appearance:none;width:16px;height:3px;background:#d3afd8;border-radius:4px;margin-left:-2px;box-shadow:0 0 8px #cca1d538}
.flow .conversation-position input::-moz-range-track{width:12px;background:repeating-linear-gradient(to bottom,#b3a9b53d 0 2px,transparent 2px 15px)}
.flow .conversation-position input::-moz-range-thumb{width:16px;height:3px;background:#d3afd8;border:0;border-radius:4px}
.flow .conversation-position output{font:10px/1.2 system-ui}
.flow .jump-latest{position:fixed;z-index:21;bottom:calc(var(--dock-height,140px) + var(--dock-inset,0px) + 28px);left:calc(var(--content-left,0px) + (100% - var(--content-left,0px))/2);transform:translateX(-50%);width:40px;height:40px;border:1px solid #c4b7cb20;border-radius:50%;background:#302d32ee;color:#d9ccdF;font:24px/1 system-ui;box-shadow:0 4px 12px #0002}
.flow dialog{background:#29272c;color:#e1dbdf;border-color:#ba9bc326}.flow .inline-menu{background:#302c34f7;box-shadow:0 8px 32px #0004;border-color:#b99acb21}
.flow .dialog-copy,.flow .form-row small{color:#c0b7c4}
.flow :is(button,a,input,textarea,select):focus-visible{outline:2px solid #bda3cf;outline-offset:3px}
.flow textarea:focus-visible{outline:none}
.flow .composer:focus-within{border-color:#bda3cf66}
@media(min-width:900px) and (hover:hover) and (pointer:fine){body.flow.sidebar-pinned{--content-left:302px}.flow.sidebar-pinned .main{margin-left:302px}}
@media(max-width:700px){
 .flow .topbar{height:calc(60px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 18px 0;gap:8px}
 .flow .identity{gap:12px;min-width:0}.flow .wordmark{width:112px;height:24px}.flow .today-link{font-size:12px}.flow .location{display:none}
 .flow .workspace{width:calc(100% - 44px);min-height:calc(var(--app-height,100dvh) - 104px)}
 .flow .message-body,.flow .source-content{font-size:18px;line-height:1.65;letter-spacing:-.012em}
 .flow .message.user{margin-left:4%;padding:14px 16px}.flow .message.user .message-body{font-size:15px}
 .flow .message-body strong{font-weight:600}.flow .messages{padding-top:10px}.flow .message{margin-bottom:28px}
 .flow .workspace.has-messages .composer-wrap,.flow .workspace.mobile-composing .composer-wrap{position:fixed;z-index:22;left:12px;right:12px;bottom:calc(var(--dock-inset,0px) + max(8px,env(safe-area-inset-bottom)));transform:none;width:auto;margin:0;padding:0}
 .flow .mobile-reply i{font:20px system-ui;font-style:normal;color:#d5b7df}
 .flow .workspace.mobile-composing .composer{display:block;background:#302e2cfa;border:1px solid #c5b4c740;border-radius:18px;padding:10px 14px 8px;box-shadow:0 8px 30px #0003}
 .flow .workspace.mobile-composing .floating-field{display:flex;align-items:flex-end;padding:0;min-height:44px;gap:10px}
 .flow .workspace.mobile-composing .inviting-cursor,.flow .workspace.mobile-composing .entry-glow{display:none}
 .flow .workspace.mobile-composing textarea{font:17px/1.5 Georgia,serif;padding:8px 0;min-height:44px;max-height:var(--editor-max,180px);overflow-y:auto!important;color:#e7e1da;text-shadow:none;flex:1;width:100%;resize:none}
 .flow .workspace.mobile-composing #send-button{position:static;flex:0 0 40px;width:40px;height:40px;margin:0 0 2px;background:#c9aedc;color:#29232e;opacity:1;visibility:visible;border:0}
 .flow .workspace.mobile-composing .composer-collapse{display:block;position:static;margin:4px 0 0 auto;min-height:32px;min-width:44px;border:0;background:none;color:#c5b3cd;font-size:12px;padding:4px 8px}
 .flow .workspace.mobile-composing .daily-start{display:none}
 .flow .composer-bottom{padding-top:0;gap:6px;flex-wrap:wrap}.flow .composer-bottom button{font-size:12px;min-height:36px}
 .flow .workspace.is-empty:not(.mobile-composing) .composer textarea{font-size:18px}
 .flow .conversation-position{right:0;width:14px;top:38%;opacity:.55}.flow .conversation-position input{width:28px;height:92px}.flow .conversation-position input::-webkit-slider-runnable-track{width:5px;background-size:auto 100%}.flow .conversation-position input::-webkit-slider-thumb{width:9px;margin-left:-2px}.flow .conversation-position output{display:none}
 .flow .sidebar{max-width:calc(100vw - 40px)}
}
@media(prefers-reduced-motion:reduce){.flow .ambient,.flow .atmosphere *{animation:none!important}}
@media(forced-colors:active){.flow .conversation-position input{appearance:auto}.flow .composer{border:1px solid CanvasText}.flow .mobile-reply{border:1px solid CanvasText}}

/* A long draft is the only vertically scrolling text field. */
.flow .composer textarea{max-height:var(--editor-max,220px)!important;overflow-y:auto!important}
.flow .workspace.has-messages .composer,.flow .workspace.mobile-composing .composer{max-height:calc(var(--app-height,100dvh) - 24px);overflow:auto;overscroll-behavior:contain}
.flow .workspace.has-messages .composer textarea{border:0;border-radius:0;background:none;box-shadow:none}
.flow .workspace.has-messages .composer-bottom{border:0}

.flow .workspace.has-messages .floating-field,.flow .workspace.mobile-composing .floating-field{border:0;box-shadow:none}
@media(max-width:700px){.flow .workspace.is-empty.mobile-composing .composer textarea:placeholder-shown,.flow .workspace.is-empty.mobile-composing .composer textarea:not(:placeholder-shown){font:17px/1.5 Georgia,serif;padding:8px 0}}
.flow .sidebar{z-index:40}.flow .drawer-shade{z-index:30}
@media(max-width:700px){
 .flow .workspace.mobile-composing .composer{position:relative}
 .flow .workspace.mobile-composing .composer-collapse{position:absolute;right:12px;bottom:8px;margin:0}
 .flow .workspace.mobile-composing .composer-bottom{padding-right:62px}
}

/* Light belongs around the work. Keep the centre dark and the brand intact. */
.flow [data-palette="violet"]{--sky:#19171c;--fold:#7f57b4;--glow:#bd6cac;--glint:#b75f49}
.flow [data-palette="ember"]{--sky:#1b1716;--fold:#804a50;--glow:#ba664a;--glint:#9263b0}
.flow .atmosphere{background:radial-gradient(ellipse 42% 68% at 108% 8%,color-mix(in srgb,var(--fold) 36%,transparent),transparent 75%),radial-gradient(ellipse 48% 50% at -10% 108%,color-mix(in srgb,var(--glint,var(--glow)) 25%,transparent),transparent 72%),var(--sky)}
.flow .atmosphere-field{opacity:calc(.25 + var(--scene-depth,.65)*.55)}
.flow .light-one{background:radial-gradient(ellipse at 103% 12%,var(--fold),transparent 42%);opacity:.65}
.flow .light-two{background:radial-gradient(ellipse at -5% 100%,var(--glow),transparent 36%);opacity:.33}
.flow .light-three{background:radial-gradient(ellipse at 106% 102%,var(--glint,var(--glow)),transparent 32%);opacity:.4}
.flow .atmosphere:after{opacity:.18}
.flow .atmosphere-shade{background:radial-gradient(ellipse 66% 65% at 45% 50%,#181716e8,transparent 90%)}
.flow .atmosphere-texture{opacity:calc(var(--scene-texture,.045)*2.6)}
.flow .workspace.is-empty:not(.mobile-composing) .composer-wrap{width:min(100%,620px)}
.flow .workspace.is-empty:not(.mobile-composing) .composer{
 padding:16px 18px 10px;border:1px solid #c8a4df40;border-radius:22px;
 background:linear-gradient(125deg,#302c36f2,#29272bf5);
 box-shadow:0 16px 55px #100b1a2b,0 0 60px -22px #ba77d547,inset 0 1px 0 #ead8ff0a;
 transition:border-color .2s,box-shadow .2s;
}
.flow .workspace.is-empty:not(.mobile-composing) .composer:focus-within{border-color:#d5abe575;box-shadow:0 16px 55px #100b1a2b,0 0 50px -18px #ba77d550,inset 0 1px 0 #ead8ff0d}
.flow .workspace.is-empty:not(.mobile-composing) .floating-field,
.flow .workspace.is-empty:not(.mobile-composing) .composer.has-text .floating-field{display:flex;align-items:flex-end;gap:14px;padding:0;min-height:54px}
.flow .workspace.is-empty:not(.mobile-composing) .composer textarea:placeholder-shown,
.flow .workspace.is-empty:not(.mobile-composing) .composer textarea:not(:placeholder-shown){font:19px/1.55 Georgia,'Times New Roman',serif;letter-spacing:0;text-align:left;min-height:44px;flex:1;width:100%;padding:7px 0;color:#e9e1e7;caret-color:var(--mayrose-pink);text-shadow:none;box-shadow:none;border:0;border-radius:0}
.flow .workspace.is-empty:not(.mobile-composing) .entry-glow{display:none}
.flow .workspace.is-empty:not(.mobile-composing) .inviting-cursor{left:0;top:auto;bottom:12px;width:1px;height:23px;box-shadow:0 0 10px #d6a0f344}
.flow .workspace.is-empty:not(.mobile-composing) #send-button{position:static;flex:0 0 40px;width:40px;height:40px;margin-bottom:5px;opacity:1;visibility:visible;border:1px solid #d6a0f340;background:linear-gradient(135deg,#d7abe21c,#a979ca1a);color:#deb9e9;box-shadow:inset 0 1px #ffffff0b}
.flow .workspace.is-empty:not(.mobile-composing) .composer.has-text #send-button{background:linear-gradient(135deg,#e6b1de,#c79ddf);color:#342638;border-color:transparent}
.flow .workspace.is-empty:not(.mobile-composing) .composer-bottom{padding:6px 0 0;gap:20px;opacity:1;visibility:visible;pointer-events:auto;transform:none;min-height:38px}
.flow .workspace.is-empty:not(.mobile-composing) .composer-bottom button{font-size:12px;min-height:38px;color:#c5b4d1}
.flow .daily-start{padding:0 18px;margin-top:12px}
.flow .daily-destination{font-size:15px;color:#cbb3d4}
.flow .workspace.has-messages .composer{background:linear-gradient(125deg,#302d34fa,#2b292bf7);border-color:#c8a4df32;box-shadow:0 8px 32px #0002,0 0 38px -22px #b782ce45}
@media(max-width:700px){
 .flow .workspace.is-empty:not(.mobile-composing) .composer{padding:14px 15px 8px;border-radius:20px}
 .flow .workspace.is-empty:not(.mobile-composing) .composer textarea:placeholder-shown,
 .flow .workspace.is-empty:not(.mobile-composing) .composer textarea:not(:placeholder-shown){font-size:18px}
 .flow .workspace.is-empty:not(.mobile-composing) .composer-bottom{gap:16px;flex-wrap:wrap}
 .flow .daily-start{padding-inline:12px}.flow .daily-destination{font-size:14px}
}
@media(prefers-reduced-motion:reduce){.flow .workspace.is-empty .composer{transition:none}}

@media(max-width:700px) and (pointer:coarse){
 .flow .workspace.has-messages:not(.mobile-composing) .composer{display:block;background:transparent;border:0;box-shadow:none;backdrop-filter:none;padding:0 8px;overflow:visible}
 .flow .workspace.has-messages:not(.mobile-composing) .floating-field{display:none}
 .flow .workspace.has-messages:not(.mobile-composing) .mobile-reply{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:54px;padding:12px 18px;border-radius:24px;border:1px solid #c5b4c724;background:#302e2cfa;box-shadow:0 5px 22px #0002;color:#c6bcc9;font:18px/1.4 Georgia,serif;text-align:left}
}

/* Quiet glass surface; context remains available without focusing the editor. */
.flow .workspace .composer,
.flow .workspace.has-messages .composer,
.flow .workspace.is-empty:not(.mobile-composing) .composer,
.flow .workspace.mobile-composing .composer{
 border:0;background:rgba(10,9,13,.94);backdrop-filter:blur(24px);border-radius:22px;
 box-shadow:0 12px 34px #0004,0 0 34px -13px #d59bdf55;
}
.flow .workspace .composer:focus-within,
.flow .workspace.has-messages .composer:focus-within,
.flow .workspace.is-empty:not(.mobile-composing) .composer:focus-within{
 border:0;box-shadow:0 12px 34px #0004,0 0 38px -12px #dba3e778;
}
.flow .workspace .composer-bottom,
.flow .workspace.is-empty:not(.mobile-composing) .composer-bottom{
 display:flex;justify-content:space-between;align-items:center;flex-wrap:nowrap;gap:16px;
 opacity:1;visibility:visible;pointer-events:auto;transform:none;padding:4px 0 0;min-height:44px;
}
.flow .workspace .composer-bottom button{min-height:44px;font-size:12px;line-height:1.35}
.flow .workspace .project-selector{flex:0 1 44%;max-width:44%;min-width:0;color:#c5b7cb}
.flow .workspace .thinking-mode{flex:0 1 56%;min-width:0;max-width:56%;padding:0;justify-content:flex-end;text-align:right;gap:8px}
.flow .model-mode-copy{display:flex;flex-direction:column;min-width:0;gap:2px}
.flow #model-label{color:#d4bddc;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.flow #mode-label{color:#a79fae;font-size:11px;font-weight:400}
body.flow:has(.workspace.has-messages) .ambient{opacity:.24}
body.flow:has(.workspace.has-messages) .ambient .atmosphere-shade{background:linear-gradient(90deg,transparent,#181716ee 25%,#181716ee 75%,transparent)}
@media(max-width:700px){
 body.flow:has(.workspace.has-messages) .ambient .atmosphere-shade{background:#181716ba}
 .flow .workspace .composer-bottom,.flow .workspace.is-empty:not(.mobile-composing) .composer-bottom{gap:10px}
 .flow .workspace.mobile-composing .composer-bottom{padding-right:0}
 .flow .workspace.mobile-composing .composer-collapse{position:static;margin:0 0 0 auto;min-height:32px;padding:2px 0 0 12px}
}
@media(max-width:700px) and (pointer:coarse){
 .flow .workspace.has-messages:not(.mobile-composing) .composer{background:none;box-shadow:none;padding:0 8px;backdrop-filter:none}
 .flow .workspace.has-messages:not(.mobile-composing) .mobile-reply{border:0;background:rgba(10,9,13,.94);box-shadow:0 8px 24px #0003,0 0 30px -12px #d59bdf55}
}
@media(forced-colors:active){.flow .workspace .composer,.flow .workspace .mobile-reply{border:1px solid CanvasText}}

.flow .inline-menu-title{margin:0;padding:9px 12px 5px;font-size:11px;color:#c7b4cf}
@media(max-width:700px) and (pointer:coarse){
 .flow .workspace.has-messages:not(.mobile-composing) .composer-wrap{background:rgba(10,9,13,.94);border-radius:22px;backdrop-filter:blur(24px);box-shadow:0 8px 24px #0003,0 0 30px -12px #d59bdf55}
 .flow .workspace.has-messages:not(.mobile-composing) .mobile-reply{background:none;box-shadow:none}
 .flow .workspace.has-messages:not(.mobile-composing) .composer{background:none;box-shadow:none;padding-inline:16px}
}
