:root {
  color-scheme: light;
  font-family: 'Instrument Sans', 'Segoe UI', sans-serif;
  color: #202c2a;
  background: #f5f6f2;
  --muted: #4e605a;
  --line: #dbe3dc;
  --accent: #245545;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
main { max-width: 1120px; margin: 0 auto; padding: clamp(32px, 7vw, 88px) 24px; }
header { border-bottom: 1px solid var(--line); margin-bottom: 28px; padding-bottom: 24px; }
h1, h2, h3, p { margin: 0; }
h1 { font-family: 'Instrument Serif', Georgia, serif; font-size: clamp(2.45rem, 7vw, 4.5rem); font-weight: 400; letter-spacing: -.055em; line-height: 1.05; }
header p { color: var(--muted); font-size: 1.05rem; margin-top: 14px; }
.workspace { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; min-width: 0; padding: clamp(20px, 4vw, 32px); }
h2 { font-size: 1.22rem; letter-spacing: -.025em; margin-bottom: 14px; }
h3 { font-size: 1.02rem; margin-bottom: 10px; }
p { line-height: 1.55; }
.documents p { font-size: .91rem; color: var(--muted); }
.file-picker, form label { font-size: .9rem; display: block; font-weight: 650; margin-bottom: 7px; }
.file-picker { margin-top: 20px; }
input, textarea, button { font: inherit; }
input[type="file"] { color: var(--muted); font-size: .84rem; width: 100%; }
input::file-selector-button { background: #eef4ef; border: 1px solid #d5e3da; border-radius: 7px; color: var(--accent); cursor: pointer; font: inherit; margin-right: 7px; padding: 8px; }
.file-list { border-top: 1px solid var(--line); margin: 20px 0 16px; padding-top: 14px; }
.file-list ul { color: var(--muted); font-size: .88rem; margin: 0; overflow-wrap: anywhere; padding-left: 18px; }
.file-list li + li { margin-top: 6px; }
textarea { background: #fbfcfa; border: 1px solid #cbd7d0; border-radius: 9px; color: inherit; display: block; line-height: 1.55; min-height: 100px; padding: 12px; resize: vertical; width: 100%; }
textarea::placeholder { color: #647772; }
button { background: var(--accent); border: 1px solid var(--accent); border-radius: 8px; color: #fff; cursor: pointer; font-size: .9rem; font-weight: 650; padding: 10px 14px; }
form button { margin-top: 14px; }
button.secondary { background: #fff; color: var(--accent); }
button:hover:not(:disabled) { filter: brightness(.93); }
button:disabled { opacity: .58; cursor: default; }
:focus-visible { outline: 2px solid #28745c; outline-offset: 3px; }
.status { color: var(--muted); font-size: .9rem; margin-top: 12px; }
.model-note { color: var(--muted); font-size: .87rem; margin-top: 10px; }
.status:empty { display: none; }
.result { border-top: 1px solid var(--line); margin-top: 24px; overflow-wrap: anywhere; padding-top: 20px; }
#answer { white-space: pre-wrap; }
#evidence { margin-top: 20px; }
details { background: #f4f7f3; border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; padding: 10px 12px; }
summary { color: var(--accent); cursor: pointer; font-size: .88rem; font-weight: 650; }
details p { color: var(--muted); font-size: .9rem; margin-top: 7px; }

@media (max-width: 720px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
}
