/* The guide shares the explorer's green palette, type and interaction scale. */
:root{--tg-bg:#fbfcf8;--tg-ink:#173d2d;--tg-muted:#586b5b;--tg-line:#dce5d9;--tg-soft:#edf2e8;--tg-green:#214e37}
.tg-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#themisDock *,#themisGuide *,.tg-reader-tools *{box-sizing:border-box}
#themisGuide [hidden],#themisDock [hidden]{display:none!important}
#themisDock{position:fixed;left:36px;bottom:24px;z-index:110;max-width:calc(100vw - 72px);font-family:var(--font)}
#themisDock button,#themisGuide button,.tg-reader-tools button{cursor:pointer;font-family:inherit;letter-spacing:normal;text-transform:none}
#wakeThemis{display:flex;align-items:center;gap:13px;min-height:58px;padding:10px 19px 10px 13px;border:1px solid #466750;background:#173d2df5;color:#f5f8ef;border-radius:999px;box-shadow:0 7px 24px #173b292c,inset 0 1px #c8deb326;font-size:14px;font-weight:550;transition:transform .22s,box-shadow .22s}
#wakeThemis:hover{transform:translateY(-2px);box-shadow:0 10px 32px #173b2940}#wakeThemis[aria-expanded=true]{background:#244b36}
.tg-dock-tag{font-size:10px;font-weight:400;color:#d0dcc9;border-left:1px solid #5b7761;padding-left:12px;margin-left:2px}
.tg-mark{position:relative;display:inline-flex;align-items:center;justify-content:center;width:33px;height:33px;flex:0 0 33px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#72996644,#21412b00 70%);color:#ccdfb6}
.tg-mark i{position:absolute;width:15px;height:26px;border:1.15px solid currentColor;border-radius:50%;transform:rotate(0)}.tg-mark i:nth-child(2){transform:rotate(60deg)}.tg-mark i:nth-child(3){transform:rotate(120deg)}
#themisGuide{position:fixed;inset:auto auto 95px 36px;width:402px;max-width:calc(100vw - 72px);height:min(630px,calc(100dvh - 175px));max-height:none;margin:0;padding:0;border:1px solid #cddbc9;border-radius:23px;background:var(--tg-bg);color:var(--tg-ink);box-shadow:0 18px 70px #0f322735,0 3px 12px #0f322712;z-index:112;overflow:hidden;font-family:var(--font);font-size:14px;line-height:1.6;animation:tg-enter .3s cubic-bezier(.2,.75,.25,1);transform-origin:35px 100%}
#themisGuide[open]{display:flex;flex-direction:column}#themisGuide::backdrop{background:#0c291c66;backdrop-filter:blur(3px)}
#themisGuide .tg-header{display:flex;align-items:center;justify-content:space-between;padding:19px 21px 16px;background:#173d2d;color:#f4f7ef;flex-shrink:0}
.tg-header>div{display:flex;align-items:center;gap:12px}#themisGuide .tg-header h2{font-size:19px;font-weight:550;line-height:1.2;letter-spacing:-.035em;margin:0;color:inherit}#themisGuide .tg-header span:not(.tg-mark){font-size:11px;color:#cad9c4;display:block;margin-top:2px}
#themisGuide #tgMinimize{display:grid;place-items:center;width:36px;height:36px;min-height:36px;background:#ffffff0c;border:1px solid #ffffff1c;border-radius:50%;padding:0;color:#deead5}
#themisGuide svg,#themisDock svg,.tg-reader-tools svg{width:17px;height:17px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.tg-preview-note{display:flex;justify-content:space-between;gap:10px;padding:7px 21px;color:var(--tg-muted);background:var(--tg-soft);font-size:10px;border-bottom:1px solid var(--tg-line);flex-shrink:0}.tg-preview-note>span{font-weight:550}
.tg-context{display:flex;align-items:center;gap:7px;padding:13px 21px;border-bottom:1px solid var(--tg-line);color:var(--tg-muted);font-size:11px;min-width:0;flex-shrink:0}.tg-context-dot{width:5px;height:5px;border-radius:50%;background:#588247;flex-shrink:0}#tgContext{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1}#themisGuide #tgReset{font-size:10px;color:var(--tg-muted);background:transparent;border:0;padding:4px 0 4px 9px;min-height:28px}
#tgConversation{overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#cbd8c3 transparent;flex:1;padding:23px 23px 18px;min-height:0}
.tg-eyebrow{display:block;font-size:9px;letter-spacing:.13em;font-weight:600;color:var(--tg-muted)}
#themisGuide .tg-welcome h3{font-size:29px;line-height:1.17;letter-spacing:-.055em;font-weight:530;margin:12px 0;color:var(--tg-ink)}#themisGuide .tg-welcome p{font-size:13px;line-height:1.7;margin:0 0 24px;color:var(--tg-muted);max-width:285px}
.tg-suggestions{display:grid;gap:8px}#themisGuide .tg-action{width:100%;display:flex;align-items:center;gap:10px;border:1px solid var(--tg-line);background:var(--tg-bg);color:var(--tg-ink);border-radius:11px;padding:13px 12px;min-height:47px;font-size:12px;text-align:left;line-height:1.45;font-weight:500;transition:background .18s,border-color .18s}#themisGuide .tg-action>span{flex:1}#themisGuide .tg-action>svg:last-child{width:14px;height:14px;color:var(--tg-muted)}#themisGuide .tg-action:hover{background:var(--tg-soft);border-color:#9cb68d}
#themisGuide .tg-welcome-note{font-size:10px;margin:18px 0 0;color:var(--tg-muted)}
.tg-composer-wrap{padding:12px 15px 12px;border-top:1px solid var(--tg-line);background:var(--tg-bg);flex-shrink:0}#tgComposer{display:flex;align-items:flex-end;border:1px solid #c9d6c0;border-radius:14px;padding:8px;background:var(--tg-bg);gap:5px}#tgComposer:focus-within{outline:2px solid #789b672c;border-color:#698957}#themisGuide #tgInput{background:transparent;border:0;outline:0;box-shadow:none;resize:none;min-width:0;width:100%;color:var(--tg-ink);font:inherit;font-size:12px;line-height:1.6;padding:8px 3px 5px 5px;height:36px;max-height:85px;border-radius:0}#tgInput::placeholder{color:var(--tg-muted)}#tgComposer button{border:0;background:#244f35;color:#f7f9f3;border-radius:50%;width:32px;height:32px;min-height:32px;display:grid;place-items:center;padding:0;flex-shrink:0}
.tg-composer-meta{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 2px 0}.tg-composer-meta>span{font-size:9px;color:var(--tg-muted)}#themisGuide #tgVoice{display:flex;gap:5px;align-items:center;padding:3px 0;background:transparent;border:0;font-size:10px;color:var(--tg-ink);min-height:25px}#tgVoice svg{width:14px;height:14px}
.tg-message{margin:0 0 24px;animation:tg-message .25s ease}.tg-message-label{display:block;font-size:10px;font-weight:600;color:var(--tg-muted);margin-bottom:5px}#themisGuide .tg-message>p{font-size:13px;line-height:1.8;color:var(--tg-ink);margin:0 0 12px;white-space:pre-line;overflow-wrap:anywhere}#themisGuide .tg-user{background:var(--tg-soft);border-radius:13px 13px 3px 13px;padding:12px 14px;margin-left:24px}#themisGuide .tg-user p{margin:0;font-size:12px}.tg-choice-list{display:grid;gap:7px}.tg-message .tg-action{margin-top:8px}
#themisGuide .tg-source{display:flex;align-items:center;gap:8px;text-align:left;border:0;background:var(--tg-soft);border-radius:8px;padding:10px;font-size:10px;color:var(--tg-ink);width:100%;line-height:1.6;min-height:39px}#themisGuide .tg-source>span{flex:1}#themisGuide .tg-source svg{width:14px;height:14px}#themisGuide .tg-caption{font-size:10px!important;line-height:1.7!important;color:var(--tg-muted)!important;margin-top:9px!important}
.tg-scope{border-left:2px solid #668459;padding:0 0 0 12px;margin:18px 0}.tg-scope>span{font-size:9px;letter-spacing:.12em;display:block;color:var(--tg-muted)}.tg-scope strong{display:block;font-size:15px;font-weight:550;margin:3px 0}#themisGuide .tg-scope p{font-size:11px;color:var(--tg-muted);margin:0}
.tg-example{background:var(--tg-soft);border:1px solid var(--tg-line);padding:17px;border-radius:12px;margin:17px 0}#themisGuide .tg-example h4{font-size:17px;font-weight:550;letter-spacing:-.025em;margin:5px 0 10px;color:var(--tg-ink)}#themisGuide .tg-example p{font-size:12px;line-height:1.9;color:var(--tg-ink);margin:0 0 12px}.tg-example .tg-source{border:1px solid var(--tg-line)!important;background:var(--tg-bg)!important}.tg-facts>span{font-size:11px;font-weight:600;color:var(--tg-muted)}#themisGuide .tg-facts p{font-size:12px;line-height:1.7;margin:0;padding:12px 0;border-bottom:1px solid var(--tg-line)}.tg-facts strong{font-size:10px;font-weight:500;color:var(--tg-muted)}.tg-gap{padding:14px 0}#themisGuide .tg-gap strong{font-size:12px;font-weight:600}#themisGuide .tg-gap p{font-size:12px;line-height:1.8;margin:4px 0;color:var(--tg-muted)}#themisGuide .tg-quote{margin:10px 0;padding:18px 15px;border:1px solid var(--tg-line);border-left:2px solid #91aa75;border-radius:3px 11px 11px 3px;font-size:13px;line-height:2;color:var(--tg-ink);background:var(--tg-soft)}.tg-quote>span{display:block;font-size:9px;color:var(--tg-muted);letter-spacing:.08em;margin-bottom:10px}.tg-quote mark{background:#dce9cc;color:#24452b;border-radius:2px}
.tg-reader-tools{display:flex;gap:18px;align-items:center;flex-wrap:wrap;margin:14px 0 17px}.tg-reader-tools button{display:flex;align-items:center;gap:7px;border:0;background:transparent;font-size:11px;color:var(--tg-ink);min-height:34px;padding:0}.tg-reader-tools button:hover{color:#54743d}.tg-reader-tools .tg-mark{width:19px;height:23px;flex-basis:19px;color:#466b36;background:none}.tg-reader-tools .tg-mark i{height:18px;width:10px;border-width:1px}#listenStatus{font-size:10px;color:var(--tg-muted);flex-basis:100%;margin-top:-8px}
#themisActivity{display:flex;align-items:center;gap:14px;background:#173d2df7;color:#f3f8ee;border:1px solid #51724f;border-radius:20px;box-shadow:0 7px 30px #173b2933;min-height:69px;padding:12px 14px;max-width:min(540px,calc(100vw - 72px));backdrop-filter:blur(15px)}#themisActivity>div{min-width:0;flex:1}#themisActivity small{display:block;font-size:8px;letter-spacing:.1em;color:#c9dcc0;margin-bottom:3px}#tgActivityText{font-size:12px;line-height:1.5;display:block}#themisActivity button{border:0;background:transparent;color:#e2edd8;border-radius:8px;padding:5px;min-width:28px;min-height:32px;display:flex;align-items:center;gap:5px;font-size:10px}#themisActivity button:hover{background:#ffffff15}.tg-wave{height:29px;display:flex;align-items:center;gap:3px;width:31px;flex-shrink:0}.tg-wave i{display:block;width:2px;height:5px;background:#c5dda9;border-radius:4px}.tg-wave i:nth-child(2),.tg-wave i:nth-child(6){height:10px}.tg-wave i:nth-child(3),.tg-wave i:nth-child(5){height:16px}.tg-wave i:nth-child(4){height:23px}.is-speaking .tg-wave i{animation:tg-wave .75s ease-in-out infinite alternate}.is-speaking .tg-wave i:nth-child(2n){animation-delay:-.3s}.is-speaking .tg-wave i:nth-child(3n){animation-delay:-.6s}
.themis-focus{outline:2px solid #668951!important;outline-offset:5px;animation:tg-focus 1s ease-out}.reader-panel.themis-focus{border-radius:8px}.themis-workspace #rail{padding-bottom:85px}.themis-workspace .footer{padding-bottom:110px}
@keyframes tg-enter{from{opacity:0;transform:translateY(12px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes tg-message{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}@keyframes tg-wave{to{transform:scaleY(.35);opacity:.55}}@keyframes tg-focus{from{outline-color:#abc98a;box-shadow:0 0 0 9px #96b67820}to{outline-color:#668951;box-shadow:0 0 0 0 transparent}}
@media(min-width:821px) and (max-width:1100px){#themisDock{left:25px}#themisGuide{left:25px;width:340px;max-width:calc(100vw - 50px)}}
@media(max-width:820px){#themisDock{left:16px;bottom:16px;max-width:calc(100vw - 32px)}#wakeThemis{min-height:51px;padding:8px 16px 8px 11px;font-size:13px;gap:9px}#themisGuide{inset:auto 10px 10px;width:calc(100vw - 20px);max-width:none;height:min(740px,calc(100dvh - 26px));border-radius:23px;box-shadow:0 10px 70px #0f322740}#tgConversation{padding:23px 22px}.tg-header{padding:19px 20px!important}.tg-composer-wrap{padding-bottom:max(14px,env(safe-area-inset-bottom))}#themisGuide #tgInput{font-size:16px;height:40px;padding-top:5px}.tg-composer-meta>span{font-size:9px}#themisGuide .tg-composer-meta{gap:5px}#themisActivity{max-width:calc(100vw - 32px);gap:9px;border-radius:17px;padding:12px}#tgUndo span{display:none}#tgActivityText{font-size:11px}#themisActivity .tg-wave{width:24px;gap:2px}.tg-reader-tools{gap:14px}.themis-workspace.detail-open .reader-navigation{padding-bottom:95px}.themis-workspace.detail-open #detail{padding-bottom:25px}.tg-reader-tools button{font-size:11px;min-height:40px}.tg-preview-note{font-size:9px}}
@media(max-width:360px){#tgConversation{padding:20px 17px}#themisGuide .tg-welcome h3{font-size:27px}.tg-composer-meta>span{font-size:8px}.tg-reader-tools{gap:9px}.tg-reader-tools button{font-size:10px}#themisActivity{gap:6px;padding:10px}#themisActivity small{font-size:7px}}
html[data-theme=dark]{--tg-bg:#22221f;--tg-ink:#eceae6;--tg-muted:#c5c3ba;--tg-line:rgba(255,255,255,.13);--tg-soft:#2a2a27;--tg-green:#bedbb5}html[data-theme=dark] #themisGuide{border-color:rgba(255,255,255,.36)}html[data-theme=dark] #tgComposer{border-color:rgba(255,255,255,.36)}html[data-theme=dark] #tgComposer button{background:#95b88a;color:#161d14}html[data-theme=dark] .tg-reader-tools .tg-mark{color:#c5c3ba}html[data-theme=dark] .tg-reader-tools button:hover{color:#eceae6}
@media(prefers-reduced-motion:reduce){#themisGuide,.tg-message,.tg-wave i,.themis-focus,#wakeThemis{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media print{#themisDock,#themisGuide,.tg-reader-tools,#tgLive{display:none!important}.themis-focus{outline:0!important}}

.tg-mark img{display:block;width:25px;height:31px}.tg-reader-tools .tg-mark img{width:18px;height:22px}.workspace-brand>img{display:block;width:26px;height:32px;object-fit:contain}

/* Marks where the conversation moved to another step */
#themisGuide .tg-divider{display:flex;align-items:center;gap:10px;margin:14px 0 6px;font-size:11.5px;font-weight:600;letter-spacing:.02em;color:#6f8468}
#themisGuide .tg-divider::before,#themisGuide .tg-divider::after{content:"";flex:1;height:1px;background:currentColor;opacity:.3}
html[data-theme=dark] #themisGuide .tg-divider{color:#b9b7af}
