:root { --ink: #172033; --muted: #667085; --line: #e4e7ec; --accent: #2563eb; --bg: #f7f8fa; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--bg); }
main { max-width: 760px; margin: 0 auto; padding: 24px 16px; }
h1 { font-size: 22px; margin: 0 0 4px; }
p.lead { color: var(--muted); margin: 0 0 24px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px; }
label { display: block; font-weight: 600; margin: 16px 0 6px; }
input[type=password], select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
button, a.button { display: inline-block; margin-top: 16px; padding: 10px 18px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button.secondary, a.secondary { background: #fff; color: var(--ink); border: 1px solid var(--line); }
button:disabled { opacity: .5; cursor: not-allowed; }
.notice { margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: #eff4ff; }
.notice { white-space: pre-line; }
.notice.error { background: #fef3f2; color: #b42318; }
.notice.ok { background: #ecfdf3; color: #067647; }
#keyLink { display: inline-block; margin-top: 6px; font-size: 14px; }
details { margin-top: 10px; font-size: 14px; color: var(--muted); }
details pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.hidden { display: none !important; }
#log { display: flex; flex-direction: column; gap: 12px; min-height: 50vh; padding-bottom: 16px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.bubble.user { align-self: flex-end; background: var(--accent); color: #fff; }
.bubble.assistant { align-self: flex-start; background: #fff; border: 1px solid var(--line); }
.bubble.change pre { margin: 8px 0; padding: 8px; background: #f6f7f9; border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.bubble.change button { margin: 0 8px 0 0; padding: 6px 14px; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin-top: 14px; }
label.check input { width: auto; margin-top: 3px; }
.bubble.system { align-self: center; color: var(--muted); font-size: 14px; }
form.composer { position: sticky; bottom: 0; display: flex; gap: 8px; padding: 12px 0; background: var(--bg); }
form.composer textarea { resize: none; height: 48px; }
form.composer button { margin-top: 0; }
h2 { font-size: 18px; margin: 0 0 4px; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 8px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
dl.facts dd button.small { margin: 0 0 0 8px; }
pre.code { margin: 0; padding: 10px 12px; background: #f6f7f9; border-radius: 8px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
input.text { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.row { display: flex; gap: 8px; align-items: center; }
.row.pair { margin-top: 8px; }
.row.pair code { flex: 0 0 auto; min-width: 90px; font-size: 13px; }
button.small { margin-top: 8px; padding: 6px 12px; font-size: 14px; }
.row button.small { margin-top: 0; }
small.hint { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; }
ul.documents li span button { margin-left: 8px; }
ul.documents { list-style: none; margin: 16px 0 0; padding: 0; }
ul.documents li { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
ul.documents small { color: var(--muted); }
