:root{color-scheme:light;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#f6f7f5;color:#172823}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a{cursor:pointer}a{color:inherit}button:disabled{opacity:.55;cursor:wait}
:focus-visible{outline:3px solid #257b5b;outline-offset:3px}img{max-width:100%}[hidden]{display:none!important}
.button{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;border:1px solid #b9c7bf;background:#fff;color:#20392b;border-radius:8px;padding:.65rem 1rem;text-decoration:none;font-weight:600;line-height:1.3}
.button:hover{background:#edf3ee}.button.primary{background:#244d36;border-color:#244d36;color:#fff}.button.primary:hover{background:#163a27}
.notice{padding:1rem;border-radius:8px;margin:1rem 0}.notice.error{background:#fff0f0;color:#8b1b23;border:1px solid #e9a4a8}
.muted,.hint{color:#62736a;font-size:.9rem}.eyebrow{font-size:.74rem;font-weight:700;letter-spacing:.12em;color:#567465;text-transform:uppercase}.chip{display:inline-block;border-radius:100px;background:#e7eee9;padding:.3rem .65rem;font-size:.8rem;color:#40574a}
.admin-page{min-height:100vh;background:#f6f7f5}.admin-header{height:68px;padding:0 max(1.5rem,calc((100vw - 1320px)/2));display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #dbe4dd}
.admin-header .brand{font-weight:800;font-size:1.2rem;text-decoration:none;color:#203f2c}.admin-header nav{display:flex;align-items:center;gap:1rem}.admin-header nav a{text-decoration:none}.admin-header button{border:0;background:none;color:#2e593e}
.admin-shell{max-width:1360px;margin:auto;padding:2rem 1.5rem 5rem}.page-title{display:flex;justify-content:space-between;align-items:end;gap:1rem;margin-bottom:2rem}.page-title h1{font-size:clamp(1.8rem,3vw,2.6rem);margin:.3rem 0}.page-title p{margin:.2rem 0}
.panel{background:#fff;border:1px solid #dbe4dd;border-radius:14px;padding:1.5rem;margin-bottom:1.25rem;box-shadow:0 2px 10px #18352108}.panel h2,.panel h3,.panel h4{margin-top:0;color:#1d3b2a}.panel h3{font-size:1.3rem}.panel h4{font-size:1rem}
.admin-grid{display:grid;grid-template-columns:250px minmax(0,1fr);gap:1.5rem;align-items:start}.bot-sidebar{position:sticky;top:1.5rem}.bot-list{list-style:none;padding:0;margin:0 0 1.5rem}.bot-list button{width:100%;text-align:left;padding:.7rem;border:0;border-radius:7px;background:transparent}.bot-list button:hover,.bot-list button.active{background:#e6f0e8}.section-head,.editor-top{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin-bottom:1rem}.section-head h2,.section-head h3{margin:0}.editor-top h2{margin:.2rem 0}.actions{display:flex;gap:.6rem;flex-wrap:wrap}
label{display:block;font-weight:600;font-size:.9rem;margin:.8rem 0;color:#283a30}input:not([type=file]):not([type=color]):not([type=checkbox]),textarea,select{display:block;width:100%;padding:.65rem .75rem;margin-top:.4rem;border:1px solid #b9c7bf;border-radius:7px;color:#172823;background:#fff}textarea{resize:vertical}input[type=color]{display:block;width:5rem;height:2.8rem;margin-top:.4rem;border:1px solid #b9c7bf;border-radius:7px;background:#fff}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-stack>.button{margin-top:.4rem}.source-add{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin:1rem 0}.source-add form{padding:1rem;border:1px solid #dce4de;border-radius:9px;background:#fafcfb}.item-stack{display:grid;gap:.75rem}.editor-item{border:1px solid #dce4de;border-radius:9px;padding:1rem;background:#fcfdfc}.item-heading{display:flex;justify-content:space-between;gap:.75rem;align-items:center}.item-heading h4{margin:0}.item-actions{display:flex;gap:.4rem;flex-wrap:wrap}.item-actions button{background:transparent;border:1px solid #c9d6cc;border-radius:6px;padding:.35rem .6rem}.item-actions button:hover{background:#eef4ee}.topic-choices{display:flex;gap:.8rem;flex-wrap:wrap}.topic-choices label{display:flex;align-items:center;gap:.3rem;margin:.3rem 0;font-weight:400}.preview-result{white-space:pre-wrap;line-height:1.6;margin-top:1rem}.preview-result p{margin:.5rem 0}.home-card{max-width:690px;margin:15vh auto;padding:3rem;background:#fff;border:1px solid #dbe4dd;border-radius:18px}.home-card h1{font-size:clamp(2rem,5vw,3rem);line-height:1.1}.home-card p{line-height:1.6}
.admin-grid>*{min-width:0}.source-add>form{min-width:0}input[type=file]{max-width:100%}.manual-source-form{grid-column:1/-1}.source-text-editor{margin-top:1rem;border-top:1px solid #dce4de;padding-top:.5rem}.source-text-editor textarea{line-height:1.6;min-height:240px}
.home-directory{max-width:1160px}.bot-directory{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:1.25rem;list-style:none;padding:0;margin:0}.bot-directory-card{display:flex;flex-direction:column;height:100%;padding:1.5rem;border:1px solid #dbe4dd;border-radius:14px;background:#fff;text-decoration:none;overflow-wrap:anywhere;box-shadow:0 2px 10px #18352108}.bot-directory-card:hover{border-color:#7a9b85;background:#fafcfb}.bot-directory-card h2{margin:0 0 .75rem;font-size:1.35rem;color:#1d3b2a}.bot-directory-card p{margin:0 0 1.25rem;line-height:1.6;color:#50635a;white-space:pre-wrap}.bot-directory-action{margin-top:auto;padding-top:.75rem;font-size:.9rem;font-weight:600;color:#244d36}
.bot-page{min-height:100vh;display:flex;flex-direction:column;background:#fff}.bot-header{border-bottom:1px solid #dfe7df;background:#fff}.bot-header-inner{max-width:1240px;margin:auto;padding:1rem 1.5rem;display:flex;align-items:center;justify-content:space-between;gap:1rem}.bot-header nav{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.bot-header button,.bot-header a{border:1px solid #becbc2;background:#fff;border-radius:7px;padding:.55rem .8rem;text-decoration:none}.bot-brand{font-weight:800;display:flex;gap:.65rem;align-items:center}.bot-brand img{height:44px;width:auto}
.chat-shell{width:min(1240px,100%);margin:auto;display:grid;grid-template-columns:minmax(0,1fr);gap:2rem;flex:1;padding:2rem 1.5rem 4rem}.chat-shell.has-history{grid-template-columns:220px minmax(0,1fr)}.history-panel{border-right:1px solid #e0e7e2;padding-right:1rem}.history-panel h2{font-size:1rem}.history-panel ul{list-style:none;margin:0;padding:0}.history-panel li a{display:block;padding:.5rem;border-radius:6px;text-decoration:none;overflow-wrap:anywhere}.history-panel li a:hover{background:#edf3ee}.chat-main{min-width:0}.chat-intro{margin:0 0 1rem}.chat-intro h1{margin:.35rem 0 1rem}.chat-intro .lead{color:#50635a;max-width:60ch}.messages{min-height:250px;display:flex;flex-direction:column;gap:1rem;padding:1rem 0}.welcome{padding:2.5rem 1rem;text-align:center;color:#52685a;background:#f8faf8;border-radius:12px}.message{max-width:90%;padding:1rem 1.2rem;border-radius:12px;line-height:1.65;overflow-wrap:anywhere;white-space:pre-wrap}.message.user{align-self:flex-end;background:#e9f2e9}.message.assistant{align-self:flex-start;background:#f5f7f5;border:1px solid #e0e7e2}.message .message-label{font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.08em;margin:0 0 .5rem}.message p{margin:0}.message .sources{margin:.9rem 0 0;padding-left:1.1rem;font-size:.86rem}.message .sources a{text-decoration:underline}.message .mode{font-size:.77rem;font-weight:700;color:#715b21;margin-bottom:.5rem}.message button{margin-top:.75rem}.queue-panel{border:1px solid #dce6df;background:#fafcfb;border-radius:10px;padding:1rem;margin:1rem 0}.queue-panel h2{font-size:1rem;margin:0 0 .7rem}.queue-panel ol{padding-left:1.4rem;margin:0}.queue-panel li{padding:.25rem 0}.queue-panel li>span{margin-right:.6rem}.queue-panel button{border:0;background:none;text-decoration:underline;color:#7b2635;font-size:.85rem}.queue-panel .status{font-size:.78rem;color:#617267}.composer{border-top:1px solid #dfe7df;padding-top:1.2rem}.composer label{margin:0 0 .5rem}.composer-row{display:flex;align-items:end;gap:.75rem}.composer textarea{margin:0;min-height:80px}.composer .hint{margin:.5rem 0}.bot-footer{display:flex;justify-content:space-between;gap:2rem;padding:2rem max(1.5rem,calc((100vw - 1200px)/2));border-top:1px solid #dfe7df;background:#f6f8f6}.bot-footer p{max-width:50ch}.footer-links{display:flex;gap:1.5rem}.cookie-notice{position:fixed;bottom:0;left:0;right:0;z-index:50;padding:1rem max(1.5rem,calc((100vw - 1200px)/2));display:flex;align-items:center;justify-content:space-between;gap:1rem;background:#fff;border-top:2px solid #000;box-shadow:0 -4px 20px #0002}.cookie-notice p{margin:0;max-width:80ch}
.theme-neutral{--accent:#244d36}.theme-neutral .button.primary{background:var(--accent);border-color:var(--accent)}.theme-neutral .chat-intro h1{font-size:clamp(2rem,4vw,3rem);letter-spacing:-.035em}.theme-neutral .eyebrow{color:var(--accent)}
@media(max-width:900px){.admin-grid{grid-template-columns:1fr}.bot-sidebar{position:static}.chat-shell,.chat-shell.has-history{grid-template-columns:1fr}.history-panel{border-right:0;border-bottom:1px solid #e0e7e2;padding:0 0 1rem}.source-add{grid-template-columns:1fr}}
@media(max-width:620px){.admin-shell{padding:1.25rem 1rem 3rem}.page-title,.editor-top,.section-head{align-items:flex-start;flex-direction:column}.form-row{grid-template-columns:1fr}.panel{padding:1rem}.chat-shell{padding:1.25rem 1rem 3rem}.bot-header-inner{padding:1rem}.composer-row{flex-direction:column;align-items:stretch}.message{max-width:100%}.bot-footer{flex-direction:column}.cookie-notice{align-items:flex-start;flex-direction:column}}
.locale-control{display:flex;align-items:center;margin:0}.locale-select{width:auto!important;min-width:4.4rem;padding:.5rem!important;margin:0!important;border-radius:7px}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.message.preparing{color:#758078;background:#f1f3f1;border-color:#e1e5e1;transition:color .35s ease,background-color .35s ease}.message.preparing .message-preparing{margin-top:.5rem;color:#66756b;font-size:.82rem}.message.preparing .message-preparing::after{content:"";display:inline-block;width:1.2em;animation:preparing-dots 1.2s steps(4,end) infinite;vertical-align:bottom}@keyframes preparing-dots{0%{content:""}25%{content:"."}50%{content:".."}75%,100%{content:"..."}}
#chat-status.is-active{display:flex;align-items:center;gap:.55rem}#chat-status.is-active::before{content:"";width:.9rem;height:.9rem;flex:0 0 .9rem;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:answering-spin .8s linear infinite}@keyframes answering-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){#chat-status.is-active::before{animation:none;border-right-color:currentColor;border-top-color:transparent}}
.check-label{display:flex;align-items:flex-start;gap:.6rem}.check-label input{width:auto;margin:.2rem 0 0;flex:none}
.unanswered-group{padding-top:.75rem}.unanswered-group>h4{margin:0 0 .6rem;color:#40574a}.unanswered-question{margin:0;line-height:1.5;overflow-wrap:anywhere}.unanswered-meta{margin:.45rem 0 0;font-size:.8rem}
