@font-face{font-family:SB;src:url('./assets/fonts/SBSansText-Regular.ttf') format('truetype');font-weight:400;font-display:swap}
@font-face{font-family:SB;src:url('./assets/fonts/SBSansText-Medium.ttf') format('truetype');font-weight:500;font-display:swap}
@font-face{font-family:SB;src:url('./assets/fonts/SBSansText-Semibold.ttf') format('truetype');font-weight:600;font-display:swap}
/* Semantic roles shared by every screen and overlay. */
:root{
  color-scheme:light;
  --ink:#242136;--muted:#6e6a7d;--surface:#fff;--accent:#7150c9;
  --action-bg:#7150c9;--action-ink:#fff;--lilac:#ece6f5;--border:#e2dfea;
  --page-bg:#efedf5;--header-bg:transparent;--bottom-bg:transparent;
  --bg:linear-gradient(90deg,#f8f7fa,#efedf5);
  --result-gradient:linear-gradient(90deg,#514577,#766297);--on-result:#fff;
  --reading-leading:1.428571rem;--touch:44px;--radius:24px;
  --safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);
  --app-height:100dvh;--header-height:72px;
  --glass:linear-gradient(90deg,rgba(255,255,255,.3),rgba(255,255,255,.015) 46%,rgba(255,255,255,.12)),linear-gradient(rgba(219,200,242,.025),rgba(219,200,242,.025)),rgba(255,255,255,.36);
  --glass-border:rgba(255,255,255,.94);
  --glass-shadow:0 3px 12px rgba(68,55,86,.12),inset 0 1px 1px rgba(255,255,255,.75);
  --glass-flat:#eeebf3;
  --secondary-bg:linear-gradient(90deg,rgba(255,255,255,.3),rgba(255,255,255,.015) 46%,rgba(255,255,255,.12)),rgba(219,200,242,.2);
  --menu-bg:rgba(255,255,255,.96);--overlay-bg:rgba(36,33,54,.18);
  --handle:rgba(110,105,125,.25);--toast-bg:rgba(36,33,54,.94);--toast-ink:#fff;
  --spinner-track:#d8ceef;--disabled-send:rgba(255,255,255,.35);
  --sticker-bg:rgba(247,237,244,.94);--sticker-secondary:rgba(236,230,245,.94);
}
:root[data-theme=dark]{
  color-scheme:dark;
  --ink:#f3effa;--muted:#bab3c9;--surface:#292532;--accent:#c2aaff;
  --action-bg:#7452c4;--action-ink:#fff;--lilac:#3c304f;--border:#443d53;
  --page-bg:#191720;--header-bg:#191720;--bottom-bg:#191720;
  --bg:linear-gradient(90deg,#191720,#201b2b);
  --result-gradient:linear-gradient(90deg,#47375f,#62507d);
  --glass:linear-gradient(110deg,rgba(216,203,249,.06),rgba(216,203,249,.015)),rgba(41,37,50,.86);
  --glass-border:rgba(213,199,247,.16);
  --glass-shadow:0 3px 12px rgba(0,0,0,.2),inset 0 1px 1px rgba(239,229,255,.06);
  --glass-flat:#2d2839;--secondary-bg:rgba(185,155,243,.1);
  --menu-bg:rgba(41,37,50,.98);--overlay-bg:rgba(0,0,0,.55);
  --handle:rgba(203,193,222,.3);--toast-bg:#3a324a;--toast-ink:#f3effa;
  --spinner-track:#51466b;--disabled-send:rgba(213,199,247,.06);
  --sticker-bg:#403044;--sticker-secondary:#352b47;
}
/* A dark canvas is available before JS, including the no-script fallback. */
@media(prefers-color-scheme:dark){
  :root:not([data-theme]){color-scheme:dark;--ink:#f3effa;--muted:#bab3c9;--surface:#292532;--page-bg:#191720;--bg:var(--page-bg)}
}
*{box-sizing:border-box}html{background:var(--page-bg);height:100%;font:87.5%/1.428571 SB,-apple-system,BlinkMacSystemFont,sans-serif;color:var(--ink);-webkit-text-size-adjust:100%}body{margin:0;overscroll-behavior:none}button,input,textarea{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{color:inherit;cursor:pointer;border:0;background:none;padding:0}a{color:var(--accent);text-decoration:none}button:disabled{cursor:default;opacity:.45}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid var(--accent);outline-offset:3px}p,h1,h2,h3{margin:0;font-size:inherit;font-weight:inherit}img{display:block;user-select:none}a,button{touch-action:manipulation}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}.app{width:100%;max-width:430px;margin:auto;background:var(--bg);height:var(--app-height);min-height:320px;display:flex;flex-direction:column;position:relative;padding-top:var(--safe-top);padding-bottom:var(--safe-bottom);overflow:hidden}.header{height:var(--header-height);flex:none;position:relative;display:grid;grid-template-columns:44px 1fr 44px;align-items:end;gap:8px;padding:0 8px}.header h1{font-size:1.07143rem;line-height:1.42857rem;font-weight:600;text-align:center;align-self:end;margin-bottom:12px}.icon-button{width:44px;height:44px;display:inline-flex;align-items:center;justify-content:center;flex:none;border-radius:16px}.icon-button img{flex:none}.menu-button img{width:44px;height:44px}.content{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;padding:8px 24px 4px;scrollbar-width:none;overscroll-behavior:contain}.content::-webkit-scrollbar,.sheet-content::-webkit-scrollbar{display:none}.stack{display:flex;flex-direction:column;gap:12px}.stack-tight{gap:8px}.card{background:var(--surface);border-radius:24px;padding:16px;display:flex;flex-direction:column;gap:12px}.feed-card{box-shadow:0 6px 12px rgba(32,27,53,.04)}.metadata{display:flex;align-items:center;justify-content:space-between;gap:8px;height:24px;color:var(--muted);font-weight:500;font-size:0.857143rem;line-height:1.14286rem}.meta-line{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.metadata .icon-button{margin-right:-.5px}.tag-list{display:flex;gap:8px;align-items:center;min-height:20px;flex-wrap:wrap}.tag-button{position:relative;display:flex;min-height:20px;align-items:center;max-width:100%}.tag-button::after{content:'';position:absolute;inset:-12px 0}.tag{display:block;border-radius:16px;padding:2px 8px;background:var(--lilac);font-size:0.857143rem;line-height:1.14286rem;color:var(--muted);font-weight:500}.article-title{font-size:1rem;line-height:1.42857rem;font-weight:500}.actions{display:flex;gap:8px}.glass{background:var(--glass);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.action{height:44px;border-radius:24px;display:flex;align-items:center;justify-content:center;flex:1;min-width:0;font-size:1rem;font-weight:500}.action-primary{color:var(--action-ink);background:var(--action-bg);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow)}.action-secondary{background:var(--secondary-bg)}.navigation-wrap{padding:18px 23px 22px;flex:none}.navigation{position:relative;height:68px;padding:6px 7px;border-radius:32px;display:flex;gap:6px}.nav-side{height:56px;flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-weight:500;font-size:0.785714rem;line-height:1rem;color:var(--muted);border-radius:24px}.nav-side[aria-current=page]{background:var(--surface);color:var(--accent)}.nav-space{flex:1}.nav-avatar{position:absolute;top:-8px;left:calc(50% - 53px);width:106px;height:72px;display:flex;align-items:flex-start;justify-content:center}.avatar{position:relative;width:64px;height:64px;border-radius:50%;overflow:hidden;background:linear-gradient(90deg,#d1b8f5,#875cc9);box-shadow:0 4px 10px rgba(87,65,127,.16)}.avatar img{position:absolute;top:0;left:0;width:64px;height:66.974px;object-fit:contain}.article-header{position:relative;padding:11px 56px 0 0;min-height:69px;display:flex;flex-direction:column;gap:4px}.article-header h2{font-size:1.21429rem;line-height:1.57143rem;font-weight:500}.article-header p{font-size:0.857143rem;line-height:1.14286rem;color:var(--muted)}.article-header .icon-button{position:absolute;right:0;top:0}.theses{padding:12px 16px;gap:12px}.section-label{font-size:0.857143rem;line-height:1.14286rem;font-weight:600;color:var(--ink)}.card-heading{height:44px;display:flex;align-items:center;justify-content:space-between;gap:8px}.thesis-list{display:flex;flex-direction:column;gap:16px}.thesis{display:flex;flex-direction:column;gap:4px}.thesis h3{font-size:1rem;line-height:1.42857rem;font-weight:500}.thesis p{color:var(--muted);line-height:var(--reading-leading)}.result-card{padding:12px 16px;gap:8px;background:var(--result-gradient);color:var(--on-result)}.result-card .section-label{color:var(--on-result)}.result-card p{line-height:var(--reading-leading)}.rows{background:var(--surface);border-radius:20px;overflow:hidden}.row{width:100%;min-height:44px;padding:10px 16px;display:flex;align-items:center;gap:8px;text-align:left;font-weight:500;line-height:1.28571rem}.row-label{flex:1}.row-count{color:var(--muted);font-size:0.785714rem;line-height:1rem}.row-chevron{font-size:1.42857rem;color:var(--muted);width:12px;text-align:center}.row+.row{border-top:1px solid var(--border)}.list-caption{font-size:0.857143rem;line-height:1.14286rem;color:var(--muted);padding:0 16px}.hypothesis{gap:8px;padding:16px 16px 0;border-radius:20px}.hypothesis h3{font-weight:500;font-size:1rem;line-height:1.42857rem}.hypothesis>p{color:var(--muted);line-height:1.42857rem}.hypothesis-footer{display:flex;gap:8px;height:44px;align-items:center}.text-action{display:flex;align-items:center;min-height:44px;color:var(--accent);font-weight:500;text-align:left;flex:1;line-height:1.28571rem}.hypothesis-detail{display:flex;flex-direction:column;gap:12px;padding:4px 0 0}.detail-section{display:flex;flex-direction:column;gap:4px}.detail-section h4{font-size:0.857143rem;line-height:1.14286rem;font-weight:600;color:var(--muted);margin:0}.detail-section p{line-height:1.42857rem}.linked-action{color:var(--accent);font-size:0.857143rem;font-weight:500;display:flex;gap:4px;align-items:center;min-height:44px}.topic-row{width:100%;min-height:64px;display:flex;gap:12px;align-items:center;text-align:left;border-radius:20px;padding:12px 16px;background:var(--surface);box-shadow:0 6px 12px rgba(32,27,53,.04)}.topic-copy{flex:1;display:flex;flex-direction:column;gap:4px}.topic-title{font-weight:500}.topic-count{font-size:0.857143rem;line-height:1.14286rem;font-weight:500;color:var(--muted)}.topic-badge{font-size:0.857143rem;line-height:1.14286rem;padding:2px 8px;color:var(--muted);border-radius:16px;background:var(--lilac)}.empty-state{padding:20px;gap:12px}.empty-state h2{font-size:1.14286rem;line-height:1.57143rem;font-weight:500}.empty-state p{color:var(--muted)}.filter-header{display:flex;align-items:center;gap:8px;padding:4px 0 8px}.filter-header h2{font-size:1.21429rem;line-height:1.57143rem;font-weight:500;flex:1}.chat-content{padding-top:28px;display:flex;flex-direction:column;gap:16px}.welcome{padding:20px;gap:12px}.welcome h2{font-size:1.14286rem;font-weight:500;line-height:1.57143rem}.welcome p{line-height:1.28571rem}.chat-context{display:flex;align-items:start;gap:8px;flex:none;background:var(--surface);padding:12px 16px;border-radius:20px;position:relative}.context-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}.context-label{font-size:0.857143rem;color:var(--muted);line-height:1.14286rem}.context-title{font-weight:500}.chat-context .icon-button{margin:-6px -8px -6px 0}.messages{display:flex;flex-direction:column;gap:12px}.message{max-width:91%;padding:12px 16px;border-radius:20px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.42857rem}.message-user{background:var(--lilac);align-self:flex-end;border-bottom-right-radius:6px}.message-status{background:var(--surface);color:var(--muted);align-self:flex-start;border-bottom-left-radius:6px}.composer-wrap{padding:24px 24px 38px;flex:none}.composer{display:flex;align-items:flex-end;gap:8px}.composer textarea{flex:1;min-width:0;background:var(--surface);border:1px solid var(--glass-border);box-shadow:0 2px 6px rgba(82,64,110,.05);border-radius:24px;padding:13px 16px;height:48px;min-height:48px;max-height:120px;resize:none;color:var(--ink);line-height:1.42857rem}.composer textarea::placeholder{color:var(--muted)}.send-button{height:48px;width:48px;flex:none;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--accent);border:1px solid var(--glass-border);box-shadow:0 2px 3px rgba(82,64,110,.05)}.send-button:disabled{background:var(--disabled-send);color:var(--muted);opacity:1}.chips{display:flex;gap:8px;flex-wrap:wrap}.chip{min-width:72px;min-height:36px;padding:8px 16px;border-radius:24px;font-size:1rem}.menu-backdrop{position:fixed;inset:0;z-index:50;background:transparent}.menu{position:absolute;top:calc(var(--safe-top) + var(--header-height) - 8px);right:max(16px,calc((100vw - 430px)/2 + 16px));width:210px;padding:8px 6px;border-radius:20px;background:var(--menu-bg);box-shadow:0 4px 12px rgba(68,55,86,.13);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);display:flex;flex-direction:column}.menu-row{min-height:44px;padding:10px 12px;display:flex;align-items:center;gap:12px;color:var(--ink);font-size:0.928571rem;line-height:var(--reading-leading);font-weight:400;text-align:left}.menu-row+.menu-row{border-top:1px solid var(--border)}.menu-icon{display:block;width:20px;height:20px;flex:0 0 20px;color:inherit}.sheet-overlay{position:fixed;inset:0;z-index:60;background:var(--overlay-bg);display:flex;justify-content:center;align-items:flex-end}.sheet{background:var(--bg);width:100%;max-width:430px;max-height:calc(var(--app-height) - 100px);border-radius:24px 24px 0 0;padding:12px 24px max(24px,var(--safe-bottom));display:flex;flex-direction:column;gap:12px;box-shadow:0 -4px 16px rgba(36,33,54,.03)}.sheet-handle{width:36px;height:4px;border-radius:2px;background:var(--handle);align-self:center;flex:none}.sheet-heading{display:flex;align-items:center;height:44px;gap:8px;flex:none}.sheet-heading h2{flex:1;font-size:1.21429rem;font-weight:500;line-height:1.57143rem}.sheet-content{min-height:0;overflow:auto;scrollbar-width:none}.reasoning-card{padding:16px;border-radius:20px;gap:8px}.reasoning-card p{line-height:var(--reading-leading);color:var(--muted)}.about-copy{display:flex;flex-direction:column;gap:16px;padding:4px 0 12px}.about-copy p{color:var(--muted)}.toast{position:fixed;bottom:calc(var(--safe-bottom) + 120px);left:50%;transform:translateX(-50%);width:min(342px,calc(100vw - 48px));padding:12px 16px;border-radius:18px;background:var(--toast-bg);color:var(--toast-ink);box-shadow:0 4px 12px rgba(36,33,54,.12);z-index:100;line-height:1.28571rem}.speech-error{padding:12px 16px;border-radius:20px;display:flex;gap:8px;align-items:center;background:var(--glass);border:1px solid var(--glass-border);font-size:0.857143rem;line-height:1.14286rem;color:var(--muted)}.speech-error p{flex:1}.spinner{width:18px;height:18px;border:2px solid var(--spinner-track);border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite}.start-content{position:relative;display:flex;flex-direction:column;justify-content:center;padding:24px;gap:24px;overflow-y:auto;flex:1;min-height:0}.start-title{font-size:1.14286rem;line-height:1.57143rem;text-align:center;font-weight:500;min-height:52px;display:flex;align-items:center;justify-content:center;flex:none}.start-title span{color:var(--ink)}.start-visual{position:relative;width:100%;height:536px;flex:none;display:flex;justify-content:center;align-items:center;padding-bottom:100px}.start-portrait{position:relative;width:100%;height:392px;object-fit:contain}.start-glow{position:absolute;width:320px;height:320px;left:calc(50% - 160px);top:46px}.start-shadow{position:absolute;width:122px;height:28px;left:calc(50% - 61px);top:390px}.sticker{position:absolute;min-height:40px;padding:8px 16px;display:flex;align-items:center;justify-content:center;white-space:nowrap;border:1px solid var(--glass-border);border-radius:8px 8px 2px 8px;font-weight:500;font-size:0.857143rem;line-height:1.14286rem;background:var(--sticker-bg);box-shadow:var(--glass-shadow)}.sticker img{position:absolute;bottom:0;right:0;width:12px;height:12px}.sticker-a{left:0;top:60px;transform:rotate(-2deg)}.sticker-b{right:6px;top:8px;background:var(--sticker-secondary);transform:rotate(2deg)}.sticker-c{left:0;top:424px;background:var(--sticker-secondary);transform:rotate(2deg)}.sticker-d{right:11px;top:459px;transform:rotate(-2deg)}.start-action{width:100%;min-height:48px;flex:none}.no-script{margin:80px auto;max-width:342px}.no-script h1{font-size:1.42857rem;font-weight:600}.no-script a{display:block;min-height:44px}.app.start .header{flex:none}.app.start .start-content{padding-bottom:56px}
html[data-telegram] {--header-height:48px}html[data-telegram] .app{max-width:none}html[data-telegram] .header{align-items:center}html[data-telegram] .header h1{align-self:center;margin:0}html[data-telegram] .navigation-wrap{padding-bottom:12px}html[data-telegram] .composer-wrap{padding-bottom:16px}
@keyframes spin{to{transform:rotate(360deg)}}
@media(min-width:600px){.app{box-shadow:0 0 60px rgba(68,55,86,.08)}}
@media(max-width:360px){.content{padding-left:16px;padding-right:16px}.navigation-wrap{padding-left:15px;padding-right:15px}.start-content{padding-left:16px;padding-right:16px}.meta-line{gap:6px;font-size:0.785714rem}.composer-wrap{padding-left:16px;padding-right:16px}.sheet{padding-left:16px;padding-right:16px}.start-visual{height:480px}.sticker-c{top:390px}.sticker-d{top:424px}.start-portrait{height:350px}.start-shadow{top:365px}.start-glow{top:30px}}
@media(max-height:750px){.start-content{justify-content:flex-start}.start-visual{height:470px}.start-portrait{height:350px}.sticker-c{top:385px}.sticker-d{top:422px}.start-shadow{top:360px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.avatar-motion{position:absolute;top:0;left:0;width:64px;height:66.974px;display:block;visibility:hidden;pointer-events:none}
.avatar-motion svg{display:block;width:100%;height:100%;pointer-events:none}
.avatar.motion-ready>.avatar-motion{visibility:visible}
.avatar.motion-ready>img{visibility:hidden}
@media(prefers-reduced-motion:reduce){.avatar.motion-ready>img{visibility:visible}.avatar.motion-ready>.avatar-motion{visibility:hidden}}
@supports not (backdrop-filter:blur(8px)){.glass,.speech-error{background:var(--glass-flat)}}
.action-secondary{color:var(--ink)}
.action:disabled{color:var(--muted);opacity:.65;box-shadow:none;cursor:default}
.no-js .app{display:none}
.device-player{display:flex;align-items:center;gap:8px;min-height:52px;padding:4px 8px 4px 16px;border-radius:20px;color:var(--muted);font-size:.857143rem}.device-player>span:first-child{margin-right:auto}.device-player .device-play{background:var(--action-bg);color:var(--action-ink);border-radius:50%}.device-status{font-size:.857143rem}
.device-player .speech-rate{min-width:48px;width:auto;font-size:12px;font-variant-numeric:tabular-nums;color:var(--ink)}.device-player>span:first-child{min-width:0}.device-player .device-status{min-width:0}
.speech-action{width:44px;min-width:44px;padding:0;color:var(--accent)}.speech-action svg{flex:none}.card-heading{height:auto;min-height:44px}.card-heading .section-label{flex:1}
.nav-icon{display:block;flex:none;width:22px;height:22px}
.chat-availability{color:var(--muted);font-size:.857143rem;line-height:1.42857rem;padding:0 8px}
html[data-telegram] .header h1,html[data-telegram] .header>[data-action=close]{display:none}
html[data-telegram] .header .menu-button{display:none}

/* Rem typography follows the reader font size; touch controls keep their minimum. */
.action{height:auto;min-height:44px;padding:11px 8px;overflow-wrap:anywhere}
.metadata{height:auto;min-height:24px;position:relative;padding-right:52px}
.metadata .icon-button{position:absolute;right:0;top:50%;transform:translateY(-50%)}
/* Long source terms stay readable when the reader increases text size. */
.card,.article-header{overflow-wrap:anywhere}
.card>*,.meta-line,.topic-copy,.row-label{min-width:0}

/* Keep app gestures at the initial scale while retaining ordinary panning. */
html,body,.app,.content,.start-content,.sheet-content,.sheet-overlay,.menu-backdrop{
  touch-action:pan-x pan-y;
}
/* iOS can zoom focused fields below16px; rem still follows the reader's text size. */
.composer textarea{font-size:max(16px,1rem)}

/* Monochrome exported icons follow the surrounding text in both themes. */
.app-icon{display:block;flex:none;width:var(--icon-size);height:var(--icon-size);background:currentColor;-webkit-mask:var(--icon-url) center/contain no-repeat;mask:var(--icon-url) center/contain no-repeat}
.header{background:var(--header-bg)}
.source-link{color:var(--muted)}
[data-action=speech]{color:var(--accent)}
.composer-wrap{padding:8px 12px 12px}
.composer{gap:8px}
.composer textarea{border-color:var(--border);box-shadow:none}
.composer textarea:focus-visible{outline:none;box-shadow:inset 0 0 0 1px var(--accent)}
.send-button{background:var(--action-bg);color:var(--action-ink);border:0;box-shadow:none}
.send-icon{display:block;flex:none}
.send-button:disabled{background:var(--disabled-send);color:var(--muted)}
html[data-telegram] .composer-wrap{padding:8px 12px 12px}
html[data-telegram] .navigation-wrap,html[data-telegram] .composer-wrap{background:var(--bottom-bg)}
html[data-theme=dark] .start-glow{opacity:.45}
html[data-theme=dark] .sticker img{opacity:.45}

/* Startup recovery is separate from the completed app screens. */
.startup-status{position:fixed;top:18vh;left:24px;right:24px;max-width:342px;margin:0 auto;z-index:50}.startup-status h1{font-size:20px;font-weight:600}.startup-status[hidden],.startup-status [hidden]{display:none}

.evolution-comparison+.evolution-comparison{margin-top:24px}.evolution-sources{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:baseline}.evolution-sources a{overflow-wrap:anywhere}.evolution-conditions{color:var(--muted);font-size:0.857143rem;line-height:1.42857rem}.evolution-conditions summary{cursor:pointer;color:var(--accent);min-height:32px;padding-top:4px}.evolution-conditions[open] p{margin-top:8px}
.sheet-evolution{height:calc(var(--app-height) - 100px)}
.sheet-evolution .sheet-content{position:relative}
.evolution-options{display:flex;flex-direction:column;gap:8px;position:sticky;top:0;z-index:1;padding-bottom:12px;background:var(--bg)}
.evolution-option{min-height:84px;overflow-wrap:anywhere}
.evolution-option .topic-title{font-size:1rem;line-height:var(--reading-leading)}
.evolution-option .topic-count{font-size:0.857143rem;line-height:1.142857rem;font-weight:400}
.evolution-option[aria-pressed=true]{background:var(--lilac);color:var(--accent)}
.evolution-option[aria-pressed=true] .topic-count{color:var(--accent)}
.evolution-selected .section-label{color:var(--accent)}
.evolution-selected .empty-state{padding:16px;gap:8px}
.evolution-selected .empty-state h2{font-size:0.857143rem;line-height:1.142857rem;font-weight:600}
.evolution-selected .empty-state p{line-height:var(--reading-leading)}
.evolution-selected .reasoning-card>a{font-size:0.857143rem;line-height:1.142857rem}
.evolution-options-long{position:static}
@media(max-height:650px){.evolution-options{position:static}}

/* Versioned public source anchors for private Chat replies. */
.message-sources{display:grid;gap:8px;margin-top:12px;padding-top:8px;border-top:1px solid var(--border);white-space:normal}.message-source{display:flex;flex-direction:column;gap:2px;padding:4px 0;min-height:44px;font-size:.857143rem;line-height:1.28571rem}.message-source small{color:var(--muted);font-size:.785714rem;line-height:1.14286rem}
.chat-heading{display:flex;flex-direction:column;justify-content:center;gap:0;min-height:40px;margin-bottom:4px!important}.chat-heading-status{height:16px;font-size:.785714rem;line-height:16px;font-weight:400;color:var(--accent)}
.chat-activity{height:24px;flex:none;text-align:center;font-size:.857143rem;line-height:24px;color:var(--accent)}
html[data-telegram] .chat-content{padding-top:8px}
.typing-indicator{min-width:56px;min-height:40px;display:flex;align-items:center;justify-content:center;padding:12px 16px}
.typing-dots{display:flex;align-items:center;gap:4px;height:16px}.typing-dots i{display:block;width:5px;height:5px;border-radius:50%;background:currentColor;animation:chat-typing 1.2s ease-in-out infinite}.typing-dots i:nth-child(2){animation-delay:.15s}.typing-dots i:nth-child(3){animation-delay:.3s}
@keyframes chat-typing{0%,60%,100%{opacity:.4;transform:translateY(0)}30%{opacity:1;transform:translateY(-2px)}}
.message-delivery{display:flex;justify-content:flex-end;margin-top:4px;color:var(--muted);height:12px}
@media(prefers-reduced-motion:reduce){.typing-dots i{animation:none;opacity:.65;transform:none}}

/* Chat deletion reuses the existing menu and confirmation sheet. */
.clear-chat-confirm{display:flex;flex-direction:column;gap:16px}
.clear-chat-confirm p{color:var(--muted);line-height:var(--reading-leading)}

/* Assistant text: real list markers, plain user text and separate source refs. */
.message-copy{white-space:normal}.message-copy p{white-space:pre-wrap}.message-copy>p+p,.message-copy>p+ul,.message-copy>p+ol,.message-copy>ul+p,.message-copy>ol+p,.message-copy>ul+ol,.message-copy>ol+ul{margin-top:8px}.message-copy ul,.message-copy ol{margin:0;padding-left:20px}.message-copy li{padding-left:2px;white-space:pre-wrap}.message-copy li+li{margin-top:4px}.message-copy strong{font-weight:600}
