:root { --ink: #1f2328; --muted: #59636e; --line: #d1d9e0; --accent: #0b5cad; --bg: #ffffff; --danger: #b42318; }
@media (prefers-color-scheme: dark) {
  :root { --ink: #e6edf3; --muted: #9198a1; --line: #3d444d; --accent: #4493f8; --bg: #0d1117; --danger: #ff7b72; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.6 system-ui, sans-serif; color: var(--ink); background: var(--bg); }
header, main, footer { max-width: 44rem; margin: 0 auto; padding: 1rem; }
header { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; }
nav a { margin-left: 1rem; color: var(--accent); }
a { color: var(--accent); }
.posts { list-style: none; padding: 0; }
.posts li { padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
.posts p, time, .reference { color: var(--muted); margin: 0.25rem 0 0; }
time { font-size: 0.875rem; }
footer { color: var(--muted); font-size: 0.875rem; border-top: 1px solid var(--line); }
.error h1 { font-size: 2rem; }
.stack { display: grid; gap: 0.75rem; max-width: 22rem; }
.stack label { display: grid; gap: 0.25rem; }
input { font: inherit; padding: 0.4rem 0.5rem; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--ink); }
button { font: inherit; padding: 0.4rem 1rem; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: #fff; cursor: pointer; justify-self: start; }
p.error { color: var(--danger); }
.stack.wide { max-width: none; }
textarea, select { font: inherit; padding: 0.4rem 0.5rem; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--ink); }
.entries { width: 100%; border-collapse: collapse; }
.entries th, .entries td { text-align: left; padding: 0.4rem 0.5rem; border-bottom: 1px solid var(--line); }
button.danger { background: var(--danger); border-color: var(--danger); margin-top: 1rem; }
.chat-panes{display:grid;grid-template-columns:minmax(10rem,1fr) 3fr;gap:1rem}
.chat-list{list-style:none;padding:0;margin:0}
.chat-list button{width:100%;text-align:left;overflow-wrap:anywhere}
.chat [hidden]{display:none}
.chat-topic{display:block;font-size:.85em;opacity:.8;margin:.1rem 0 .4rem}
.chat-list .unread{font-weight:bold}
.chat-log{list-style:none;padding:0;max-height:60vh;overflow-y:auto}
.chat-log li{margin:.25rem 0}
.chat-log .mine{text-align:right}
.chat-send{display:flex;gap:.5rem}
.chat-send textarea{flex:1}
.chat-invites{list-style:none;padding:0}
.chat-invites li{margin:.25rem 0}
.chat-people{list-style:none;padding:0;font-size:.9em}
@media (max-width:40rem){.chat-panes{grid-template-columns:1fr}}

/* The account page's picture. */
.picture-edit { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; margin: 0 0 1.2rem; }
.picture-edit .picture { width: 6rem; height: 6rem; border-radius: 50%; object-fit: cover; }
.picture-edit .picture.none { display: inline-block; border: 1px dashed currentColor; opacity: 0.4; }
.picture-edit form.stack { flex: 1; min-width: 14rem; }
/* The contact form: its thank-you, and the field people never see. */
p.notice { color: var(--accent); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
