/* The client page: the repo's dark palette (resource_browser.py), two panes. */
:root {
  --bg: #1e1e1e; --panel: #252526; --panel2: #2d2d30; --rule: #3e3e42;
  --text: #d4d4d4; --muted: #9a9a9a; --accent: #0e639c; --accent2: #1177bb;
  --empty: #b5651d; --ok: #4ec9b0;
  --mono: Consolas, "JetBrains Mono", "DejaVu Sans Mono", monospace;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
  display: flex; flex-direction: column;
}
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 18px; background: var(--panel); border-bottom: 1px solid var(--rule);
}
header .title { font-weight: 600; }
header .mode { color: var(--muted); font-weight: 400; margin-left: .6em; }
header .state { color: var(--muted); font-size: 13px; }
header .thinking { color: var(--ok); margin-right: 1em; }
main { flex: 1; display: grid; grid-template-columns: minmax(360px, 5fr) minmax(360px, 6fr); min-height: 0; }
section { min-height: 0; display: flex; flex-direction: column; }
#chat { border-right: 1px solid var(--rule); }
#messages { flex: 1; overflow-y: auto; padding: 16px 18px; }
.msg { max-width: 92%; margin: 0 0 12px; padding: 10px 14px; border-radius: 8px; white-space: pre-wrap; }
.msg.agent { background: var(--panel2); border: 1px solid var(--rule); }
.msg.client { background: var(--accent); color: #fff; margin-left: auto; }
.msg.error { background: #5a1d1d; border: 1px solid #a33; }
.msg .who { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.msg.client .who { color: #d6e9f5; }
#compose { padding: 12px 18px; border-top: 1px solid var(--rule); background: var(--panel); }
#compose textarea {
  width: 100%; resize: vertical; background: var(--bg); color: var(--text);
  border: 1px solid var(--rule); border-radius: 6px; padding: 10px; font: inherit;
}
#compose .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
button, .upload {
  background: var(--accent); color: #fff; border: 0; border-radius: 6px;
  padding: 8px 16px; font: inherit; cursor: pointer;
}
button:hover, .upload:hover { background: var(--accent2); }
button:disabled { opacity: .5; cursor: default; }
.upload input { display: none; }
.hint { color: var(--muted); font-size: 12px; margin-top: 8px; font-family: var(--mono); }
#document { overflow: hidden; }
#doc { flex: 1; overflow-y: auto; padding: 20px 28px; }
#doc > * { max-width: 900px; }
/* the evidence pane: the finding a reply names or the reader clicks */
#evidence { max-height: 45%; overflow-y: auto; border-top: 2px solid var(--accent); background: var(--panel); padding: 12px 28px 18px; }
#evidence .head { display: flex; justify-content: space-between; align-items: baseline; }
#evidence h4 { margin: 0 0 6px; font-size: 14px; }
#evidence .close { background: none; color: var(--muted); padding: 0 6px; font-size: 18px; }
#evidence .verdict { font-family: var(--mono); font-size: 12px; color: var(--ok); }
#evidence .verdict.adverse { color: var(--empty); }
#evidence blockquote { margin: 6px 0 10px; padding: 4px 10px; border-left: 3px solid var(--rule); color: var(--muted); font-style: italic; }
#evidence .gap { margin: 0 0 10px; }
#evidence .item { border: 1px solid var(--rule); border-radius: 4px; padding: 6px 10px; margin: 6px 0; }
#evidence .where { font-family: var(--mono); font-size: 12px; color: var(--muted); }
#evidence pre { margin: 6px 0; padding: 6px 8px; background: var(--bg); font-family: var(--mono); font-size: 12px; white-space: pre-wrap; overflow-x: auto; }
#evidence .shows { font-size: 14px; }
.report h3 { cursor: pointer; }
.report h3:hover { color: #6ea0ff; }
.report .finding.named { border-color: var(--accent2); box-shadow: 0 0 0 1px var(--accent2); }
/* fields an exchange changed */
.form .field.changed { background: #1f3a2a; }
.form .field.changed .k::after { content: " ●"; color: var(--ok); }
/* markdown in the agent's replies */
.msg p { margin: 0 0 .6em; }
.msg p:last-child { margin-bottom: 0; }
.msg ul, .msg ol { margin: .2em 0 .6em 1.3em; padding: 0; }
.msg code { font-family: var(--mono); font-size: 13px; background: var(--bg); padding: 0 .25em; border-radius: 3px; }
.msg pre { background: var(--bg); padding: 8px 10px; border-radius: 4px; overflow-x: auto; font-family: var(--mono); font-size: 13px; white-space: pre-wrap; }
.msg h1, .msg h2, .msg h3 { font-size: 15px; margin: .6em 0 .3em; }
.msg.agent { white-space: normal; }
/* the intake form */
.form h2 { font-size: 17px; margin: 0 0 6px; }
.form .ledger { color: var(--muted); font-family: var(--mono); font-size: 12px; margin-bottom: 18px; }
.form .group { margin-bottom: 18px; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.form .group h3 {
  margin: 0; padding: 6px 12px; font-size: 13px; letter-spacing: .04em;
  text-transform: uppercase; background: var(--panel2); color: var(--muted);
}
.form .field { display: grid; grid-template-columns: 170px 1fr; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--rule); }
.form .field .k { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.form .field .v { white-space: pre-wrap; }
.form .field.empty .v { color: var(--empty); font-style: italic; }
.form .list { margin: 0; padding: 8px 12px 8px 28px; }
/* the report, in the reading styles of the printable version */
.report h1 { font-size: 22px; margin: 0 0 .3em; }
.report h2 { font-size: 18px; margin: 1.6em 0 .5em; border-bottom: 1px solid var(--rule); padding-bottom: .2em; }
.report h3 { font-size: 15px; margin: 0 0 .4em; }
.report p { margin: .5em 0; }
.report blockquote { margin: .4em 0 .6em; padding: .3em .8em; border-left: 3px solid var(--rule); color: var(--muted); font-style: italic; }
.report code { font-family: var(--mono); font-size: 13px; background: var(--panel2); padding: 0 .2em; }
.report table { border-collapse: collapse; width: 100%; font-size: 13px; margin: .6em 0; }
.report th, .report td { border: 1px solid var(--rule); padding: .25em .45em; vertical-align: top; text-align: left; }
.report .finding { border: 1px solid var(--rule); border-radius: 4px; padding: .7em .9em .3em; margin: .9em 0; }
.report .front { color: var(--muted); font-size: 13px; }
.report a { color: #6ea0ff; }
.banner { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: pre-wrap; margin-bottom: 18px; }
@media (max-width: 800px) { main { grid-template-columns: 1fr; } #chat { border-right: 0; border-bottom: 1px solid var(--rule); } }
