/* Willing & Weak: a calm, evergreen palette (carried over from Re-Center's dashboard), light and dark. */
:root {
  --bg: #f4f1ea; --surface: #fffdf8; --ink: #1d2320; --muted: #5d6862; --line: #dcd6c9;
  --accent: #2f5d4b; --accent-ink: #ffffff; --danger: #9a3b2e;
  --radius: 14px; --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 8px 24px rgba(0, 0, 0, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111714; --surface: #18201c; --ink: #e8ede9; --muted: #9aa8a0; --line: #2a3530;
    --accent: #7fb89e; --accent-ink: #0d1411; --danger: #e59a8c; --shadow: none; color-scheme: dark; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 16px clamp(16px, 4vw, 32px); }
.brand { font-family: ui-serif, Georgia, serif; font-size: 1.15rem; letter-spacing: .01em; }
main { width: min(680px, 100% - 32px); margin: 0 auto 64px; }
.verse { margin: 24px 0 28px; padding: 0; font-family: ui-serif, Georgia, serif; }
.verse p { font-size: clamp(1.4rem, 4vw, 1.9rem); line-height: 1.35; margin: 0 0 8px; }
.verse cite { color: var(--muted); font-style: normal; font-size: .95rem; }
.hello { font-family: ui-serif, Georgia, serif; font-weight: 400; font-size: 1.5rem; margin: 0 0 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin: 0 0 16px; }
.card h2 { font-size: 1.05rem; margin: 0 0 6px; }
summary { cursor: pointer; font-weight: 600; }
details[open] summary { margin-bottom: 12px; }
form { display: grid; gap: 12px; }
label { display: grid; gap: 4px; font-size: .92rem; color: var(--muted); }
input { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; }
input:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button { font: inherit; cursor: pointer; border-radius: 999px; padding: 9px 18px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
button.link { border: 0; background: none; padding: 4px 0; color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.status { min-height: 1.5em; margin: 0 0 12px; }
.status.error { color: var(--danger); }
.list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.list li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; }
.list li small { grid-column: 1; color: var(--muted); }
.list li button { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.codes { font-family: ui-monospace, "SF Mono", Menlo, monospace; columns: 2; padding-left: 1.4em; }
.pair-code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.1rem; margin: 12px 0 0; }
@media (max-width: 480px) { .codes { columns: 1; } }

textarea, select { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; width: 100%; }
textarea { resize: vertical; }
.row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
.row .grow { flex: 1; }
.row label { min-width: 120px; }
.search { margin: 0 0 12px; }
.search input { width: 100%; border-radius: 999px; padding: 12px 18px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.entry-body { white-space: pre-wrap; }

.chat { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
.chat li { padding: 10px 14px; border-radius: 14px; white-space: pre-wrap; max-width: 92%; }
.chat li.user { justify-self: end; background: var(--accent); color: var(--accent-ink); }
.chat li.assistant { justify-self: start; background: var(--bg); border: 1px solid var(--line); }
.chat li small { display: block; margin-top: 6px; opacity: .75; font-size: .8rem; }
.chat li.pending { opacity: .7; font-style: italic; }
