/* HHH front door. Layout: a desk drawn as messages, not a feed. One column of people and conversation, one rail of member controls. */
:root {
  --bg: #f4f7f6; --panel: #ffffff; --fg: #17211f; --muted: #5b6a67; --line: #d3ddda;
  --accent: #0f7a70; --accent-ink: #ffffff; --human: #a4581f; --human-soft: #fbeee2; --machine: #2f5f7a; --machine-soft: #e6eff5;
  --hi: #e8b84a;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101817; --panel: #182220; --fg: #e9efed; --muted: #a3b3af; --line: #2c3a37; --accent: #5fd3c4; --accent-ink: #0d1816; --human: #e6a55c; --human-soft: #3a2a19; --machine: #8fc1de; --machine-soft: #1d2d38; color-scheme: dark; }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 17px; line-height: 1.5; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.wrap { max-width: 1120px; margin: 0 auto; padding-block: 1.25rem 3rem; padding-inline: 16px; }
.top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.35rem; letter-spacing: .01em; display: inline-flex; align-items: center; gap: .55rem; }
.brand img { border-radius: 50%; }
.brand .mark { letter-spacing: .06em; }
.brand .tagline { font-family: var(--mono); font-weight: 400; font-size: .8rem; color: var(--muted); letter-spacing: .02em; margin-left: .35rem; }
.mono { font-family: var(--mono); font-size: .92em; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 0 .3em; }
.promise { font-family: var(--mono); font-size: .8rem; color: var(--muted); letter-spacing: .02em; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 2rem; margin-top: 1.5rem; }
@media (max-width: 860px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.main, .rail { min-width: 0; }
h1 { font-family: var(--display); font-weight: 700; font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.08; margin: .5rem 0 .75rem; text-wrap: balance; letter-spacing: -.01em; }
h1 .hi { color: var(--accent); }
h2 { font-family: var(--display); font-weight: 700; font-size: 1.15rem; margin: 0 0 .5rem; }
.lead { font-size: 1.15rem; margin: 0 0 1.25rem; max-width: 34em; }
.lead b { color: var(--accent); }
p { margin: 0 0 1rem; max-width: 36em; }
a { color: var(--accent); }
.ask { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: .9rem; }
.ask textarea#q { width: 100%; min-height: 96px; resize: vertical; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 1.05rem; line-height: 1.45; outline: none; }
.ask textarea::placeholder { color: var(--muted); }
.askrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .5rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { border: 1px solid var(--line); background: transparent; color: var(--fg); font: inherit; font-size: .85rem; padding: .3rem .65rem; border-radius: 999px; cursor: pointer; }
.chip:hover, .chip:focus-visible { border-color: var(--accent); outline: none; }
.btn { border: 0; border-radius: 10px; padding: .6rem 1rem; font: inherit; font-weight: 700; cursor: pointer; background: var(--accent); color: var(--accent-ink); }
.btn.quiet { background: transparent; color: var(--accent); border: 1px solid var(--accent); font-weight: 400; padding: .35rem .7rem; font-size: .9rem; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, .chip:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.consent { font-size: .85rem; color: var(--muted); margin: .6rem 0 0; }
.pic { margin-top: .8rem; padding-top: .8rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .6rem; }
.pic .fl { font-weight: 700; font-size: .95rem; }
.pic textarea, .item textarea, .vouch textarea, .vouch input, .memberbox input, .memberbox select { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: .5rem; font: inherit; font-size: .95rem; background: transparent; color: var(--fg); }
.pic textarea { min-height: 70px; }
.pic fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .75rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.pic legend { font-family: var(--mono); font-size: .74rem; color: var(--muted); padding: 0 .3rem; }
.pic label { font-size: .92rem; display: inline-flex; align-items: center; gap: .35rem; }
.pic input[type=radio] { accent-color: var(--accent); }
.thread-wrap { margin-top: 1.5rem; }
.thread { display: flex; flex-direction: column; gap: 1.1rem; margin: .75rem 0 1.5rem; }
.msg { display: flex; flex-direction: column; gap: .5rem; }
.bubble { border: 1px solid var(--line); border-radius: 14px; padding: .8rem .95rem; background: var(--panel); max-width: 92%; }
.bubble.you { align-self: flex-start; border-style: dashed; background: transparent; border-bottom-left-radius: 4px; }
.bubble.them { align-self: flex-end; border-bottom-right-radius: 4px; border-color: color-mix(in srgb, var(--human) 45%, var(--line)); }
.bubble .body { white-space: pre-wrap; margin: 0; max-width: none; }
.msg .wait { margin: 0; align-self: flex-end; }
.msg .reply { display: flex; flex-direction: column; gap: .4rem; align-self: stretch; }
.msg .reply textarea { width: 100%; min-height: 64px; border: 1px solid var(--line); border-radius: 8px; padding: .5rem; font: inherit; font-size: .95rem; background: transparent; color: var(--fg); }
.record { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .1rem .6rem; margin: 0; font-family: var(--mono); font-size: .7rem; color: var(--muted); border-left: 2px solid var(--line); padding-left: .6rem; }
.record dt { display: flex; gap: .4rem; }
.record dt .k { color: var(--accent); min-width: 2.2em; }
.record dt .w { font-style: italic; }
.record dd { margin: 0; }
.err { color: var(--human); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; font-family: var(--mono); font-size: .74rem; letter-spacing: .02em; margin-bottom: .45rem; color: var(--muted); }
.tag { padding: .1rem .5rem; border-radius: 6px; font-weight: 500; }
.tag.human { background: var(--human-soft); color: var(--human); }
.tag.machine { background: var(--machine-soft); color: var(--machine); }
.note { font-size: .85rem; color: var(--muted); }
.explain { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.explain h2 { margin-top: 1.25rem; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: .5rem 0 1rem; }
@media (max-width: 640px) { .three { grid-template-columns: minmax(0, 1fr); } }
.three div { border-top: 3px solid var(--accent); padding-top: .5rem; }
.three b { font-family: var(--display); font-size: 1.05rem; display: block; margin-bottom: .2rem; }
.three p { font-size: .95rem; margin: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 1rem; margin-bottom: 1rem; }
.card h2 { font-size: 1rem; }
.here { margin-bottom: 1rem; }
.people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.people .name { font-weight: 700; }
.people li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.who { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); flex: none; }
.dot.on { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.status { font-family: var(--mono); font-size: .74rem; color: var(--muted); }
.toggle { font: inherit; font-size: .8rem; border: 1px solid var(--line); background: transparent; color: var(--fg); border-radius: 8px; padding: .25rem .55rem; cursor: pointer; }
.toggle:disabled { opacity: .5; cursor: default; }
.memberbox form { display: flex; flex-direction: column; gap: .4rem; }
.memberbox .row { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.desk-list { display: flex; flex-direction: column; gap: .75rem; }
.item { border-top: 1px solid var(--line); padding-top: .6rem; }
.item .q { font-weight: 700; margin: 0 0 .3rem; }
.item .a { margin: .35rem 0 0; white-space: pre-wrap; }
.item form, .vouch form { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; }
.item textarea { min-height: 64px; }
.sites { list-style: none; margin: .25rem 0 .5rem; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.sites li { border-top: 1px solid var(--line); padding-top: .5rem; }
.sites a { font-family: var(--display); font-weight: 700; display: block; margin-bottom: .1rem; }
.sites .note { display: block; max-width: 36em; }
.keeps ul { margin: 0; padding-left: 1.1rem; font-size: .95rem; }
.keeps li { margin-bottom: .3rem; }
footer { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); font-family: var(--mono); font-size: .76rem; color: var(--muted); }
footer p { max-width: none; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: no-preference) { .dot { transition: background .25s, box-shadow .25s; } }
