:root { color-scheme:dark; font:100%/1.55 system-ui,sans-serif; background:#171917; color:#f2efe6; }
* { box-sizing:border-box; }
body { margin:0; min-height:100vh; background:radial-gradient(ellipse at 22% 0%,#34352a 0,transparent 52%); }
main { width:min(46rem,100%); margin:auto; padding:clamp(3rem,12vh,8rem) 1.3rem 2rem; }
header { margin-bottom:2rem; }
h1 { font:normal clamp(2.65rem,7vw,4.8rem)/1.07 Georgia,serif; margin:0 0 .85rem; letter-spacing:-.045em; }
h1 em { color:#e9c88a; font-weight:normal; }
header p { max-width:38rem; color:#d0d0c5; font-size:1.08rem; }
form { background:#22251f; border:1px solid #737460; padding:1rem 1.15rem; border-radius:.8rem; }
label { display:block; font-weight:600; }
textarea { display:block; width:100%; resize:vertical; margin:.4rem 0; padding:.4rem; border:0; background:transparent; color:inherit; font:inherit; }
textarea::placeholder {color:#b7b9ae;}
.controls { display:flex; align-items:center; justify-content:flex-end; gap:.6rem; }
button,.upload { font:inherit; cursor:pointer; border-radius:.4rem; padding:.5rem .85rem; }
button { color:#181914; background:#edce91; border:1px solid transparent; font-weight:600; }
button:hover {filter:brightness(1.1);}
:focus-visible,.upload:has(+ input:focus-visible) { outline:2px solid #f8ce7f; outline-offset:3px; }
.upload { margin-right:auto; padding-left:0; color:#edce91; }
input[type=file] { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
#suggestions,nav { display:flex; flex-wrap:wrap; gap:.65rem 1rem; }
#suggestions button { background:transparent; border:1px solid #53584c; color:#deded1; font-size:.92rem; font-weight:400; }
[hidden],#suggestions[hidden] { display:none; }
#status { min-height:1.55rem; color:#edce91; margin:.55rem 0; }
#status.busy::before { content:''; display:inline-block; width:.65rem; height:.65rem; margin-right:.55rem; border:2px solid #6c6856; border-top-color:#efd18f; border-radius:50%; animation:spin 1s linear infinite;}
@keyframes spin { to {transform:rotate(360deg);} }
@media(prefers-reduced-motion:reduce) { #status.busy::before {animation:none;} }
article { margin:1rem 0 1.5rem; overflow-wrap:anywhere; }
#conversation:not(:empty) { max-height:48dvh; overflow:auto; overscroll-behavior:contain; padding-right:.6rem; margin-bottom:1rem; scrollbar-color:#656950 transparent; }
article h2 { color:#deb978; font-size:.93rem; margin:0 0 .3rem; }
.question,.partial { white-space:pre-wrap; }
.answer { padding-left:1rem; border-left:2px solid #70644c; }
.answer p:first-child {margin-top:0;}
.answer pre {white-space:pre-wrap;}
.answer table { display:block; overflow:auto; }
footer { margin-top:2.75rem; padding-top:1rem; border-top:1px solid #45483f; }
details { margin-top:1.25rem; color:#d0d0c5; }
summary { cursor:pointer; color:#edce91; }
a { color:#e0c797; text-underline-offset:.2em; }
#filename {display:block;overflow-wrap:anywhere;}
