/* css/chat.css — chat.html's own rules. They were an inline <style>
   until 2026-10-22; the pages' CSP refuses inline style
   (style-src 'self', deploy/nginx/elopros.com.conf). */
/* ── the head ── */
.hv-head{display:flex;align-items:baseline;justify-content:space-between;gap:14px;
  flex-wrap:wrap;margin-top:26px}
.hv-head h1{font:700 clamp(2.2rem,4.6vw,3.6rem)/1 var(--sg);letter-spacing:-.045em;color:#fff}
.hv-head .byline{max-width:44em}

/* ── the app: rail + pane ── */
.hv-app{display:grid;grid-template-columns:212px 1fr;gap:0;margin-top:20px;
  border:1px solid var(--store-line);border-radius:var(--r);background:var(--store-panel);
  min-height:62vh;overflow:hidden}
@media (max-width:760px){.hv-app{grid-template-columns:1fr}}

/* the rail */
.hv-rail{border-right:1px solid var(--store-line);padding:14px 0 14px;display:flex;
  flex-direction:column;gap:4px;background:var(--store-pit);min-width:0}
@media (max-width:760px){.hv-rail{border-right:none;border-bottom:1px solid var(--store-line)}}
.hv-rail .klabel{padding:10px 14px 4px}
.hv-rooms{list-style:none;margin:0;padding:0}
.hv-rooms li{margin:0}
.hv-rooms button{display:flex;width:100%;align-items:baseline;gap:6px;text-align:left;
  font-family:var(--mono);font-size:13px;color:var(--store-muted);background:none;
  border:none;border-left:2px solid transparent;padding:6px 14px;cursor:pointer}
.hv-rooms button:hover{color:var(--store-ink);background:var(--store-panel-2)}
.hv-rooms button[aria-current="true"]{color:var(--g-live);border-left-color:var(--g-live);
  background:var(--store-panel-2)}
.hv-rooms .hash{opacity:.5}
.hv-rooms .mono-note{padding:4px 14px;display:block}
.hv-dm-form{display:flex;gap:5px;padding:6px 12px 2px}
.hv-dm-form input{flex:1;min-width:0;font-family:var(--mono);font-size:11px;
  color:var(--store-ink);background:var(--store-panel);border:1px solid var(--store-line);
  border-radius:var(--r);padding:5px 7px}
.hv-dm-form button{font-family:var(--mono);font-size:11px;color:var(--store-muted);
  background:none;border:1px solid var(--store-line);border-radius:var(--r);padding:5px 8px;cursor:pointer}
.hv-rail-foot{margin-top:auto;padding:12px 14px 0;border-top:1px solid var(--store-line);
  display:flex;flex-direction:column;gap:7px;overflow-wrap:anywhere}
/* on a phone the rail becomes a strip of room tabs — a vertical list of every
   room would push the actual conversation below the fold, which is the one
   thing a chat page must never do */
@media (max-width:760px){
  .hv-rail{padding-bottom:8px}
  .hv-rooms{display:flex;overflow-x:auto;gap:2px;padding:0 10px}
  .hv-rooms li{flex:0 0 auto}
  .hv-rooms button{border-left:none;border-bottom:2px solid transparent;
    padding:7px 9px;white-space:nowrap}
  .hv-rooms button[aria-current="true"]{border-left-color:transparent;
    border-bottom-color:var(--g-live)}
  .hv-rooms .mono-note{white-space:nowrap}
  /* the rail's FOOT is off on a phone, and it is not a loss: the relay address
     and the one-click app door are both printed again in the drawer, so
     nothing is lost by the cut. It buys back
     ~110px at the top of the first screen, which is where the conversation is
     supposed to be — the rule three comments up, which the rail's own
     furniture was quietly breaking. */
  .hv-rail-foot{display:none}
  /* and private rooms wait until you have a key that could hold one. `openDM`
     refuses with "join first" until then, so before entering this is
     a control that cannot work — 110px of the first screen spent advertising a
     door with nowhere to click. chat.js marks the app `is-in` on entry. */
  .hv-app:not(.is-in) .hv-direct-label,
  .hv-app:not(.is-in) #hv-dms,
  .hv-app:not(.is-in) .hv-dm-form{display:none}
  /* short enough that an empty room's join button is on the first screen */
  .hv-msgs{max-height:none;min-height:22vh}
}

/* the pane */
.hv-pane{display:flex;flex-direction:column;min-width:0}
.hv-pane-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;
  flex-wrap:wrap;padding:13px 16px;border-bottom:1px solid var(--store-line)}
.hv-pane-head b{font-family:var(--mono);font-size:15px;color:var(--store-ink)}
.hv-pane-head .about{font-family:var(--sg);font-size:13.5px;color:var(--store-muted);
  display:block;margin-top:3px;max-width:52em}
#hv-live{font-family:var(--mono);font-size:11px;color:var(--store-muted);white-space:nowrap}
#hv-live.on{color:var(--g-live)}

/* the messages — chronological, oldest first, the way a room reads */
.hv-msgs{list-style:none;margin:0;padding:14px 16px;display:flex;flex-direction:column;
  gap:11px;flex:1;overflow-y:auto;max-height:52vh}
/* a chat sits ON the composer, so a short room reads as quiet rather than as
   abandoned — six messages at the top of an 800px pane is the dead-server look.
   `margin-top:auto` on the FIRST row rather than `justify-content:flex-end` on
   the list: with overflow-y:auto the flex-end version can put the oldest
   message above the scroll origin, where it cannot be reached. */
.hv-msgs > li:first-child{margin-top:auto}
.hv-msgs li{display:grid;grid-template-columns:44px 1fr;gap:10px}
.hv-msgs li.note{display:block;font-family:var(--mono);font-size:12px;
  color:var(--store-muted);padding:6px 0}
.hv-av{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;
  justify-content:center;font-family:var(--sg);font-size:12px;letter-spacing:.04em;
  background:var(--store-panel-2);color:var(--store-muted);border:1px solid var(--store-line);
  text-transform:uppercase}
.hv-av.checked{border-color:var(--g-core);color:var(--g-live)}
.hv-msgs .vmeta{display:flex;gap:8px;flex-wrap:wrap;align-items:baseline;margin-bottom:2px}
.hv-msgs .vmeta b{font-family:var(--sg);font-size:13px;letter-spacing:.01em;
  color:var(--g-live)}
.hv-msgs .vmeta .guest{font-family:var(--sg);font-size:13px;color:var(--store-ink)}
.hv-msgs .vmeta time,.hv-msgs .vmeta .tag{font-family:var(--mono);font-size:10.5px;
  color:var(--store-muted)}
.hv-msgs .vbody{font-family:var(--sg);font-size:15px;line-height:1.5;
  white-space:pre-wrap;overflow-wrap:anywhere}
.hv-msgs .vbody a{color:var(--g-live)}

/* the speaker button — the face is the target, so it must not look like a
   button until you are on it: a room full of chrome reads as a form */
.hv-speaker{background:none;border:none;padding:0;cursor:pointer;line-height:0;
  border-radius:50%;width:44px;height:44px;align-self:start;
  display:flex;align-items:center;justify-content:center}
.hv-speaker:hover .hv-av,.hv-speaker:focus-visible .hv-av{border-color:var(--g-live)}
img.hv-av{object-fit:cover;background:var(--store-panel-2)}
img.hv-av.nomark{visibility:hidden}

/* the card: one speaker, over the room's foot */
.hv-card{border-top:1px solid var(--store-line);background:var(--store-pit);padding:12px 16px}
.hv-card-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;
  font-family:var(--mono);font-size:12px;color:var(--store-muted)}
.hv-card-body{display:flex;gap:12px;align-items:flex-start;margin-top:8px}
.hv-card-body b{font-family:var(--sg);font-size:14px;color:var(--g-live);
  margin-right:7px}
.hv-card-body .tag{font-family:var(--mono);font-size:10.5px;color:var(--store-muted)}
.hv-card-face{width:44px;height:44px;border-radius:50%;border:1px solid var(--g-core);
  flex:0 0 auto;background:var(--store-panel-2)}
.hv-card-links{display:flex;gap:12px;flex-wrap:wrap;margin-top:6px;
  font-family:var(--mono);font-size:12px}
.hv-card-links a{color:var(--g-live)}
.hv-card-foot{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:10px;
  padding-top:10px;border-top:1px solid var(--store-line)}

/* the composer */
.hv-compose{display:flex;gap:8px;padding:12px 16px;border-top:1px solid var(--store-line)}
.hv-compose input{flex:1;min-width:0;font-family:var(--mono);font-size:14px;
  color:var(--store-ink);background:var(--store-pit);border:1px solid var(--store-line);
  border-radius:var(--r);padding:10px 13px}
.hv-compose input:focus{border-color:var(--g-core);outline:none}
.hv-enter{display:flex;gap:12px;align-items:center;flex-wrap:wrap;
  padding:12px 16px;border-top:1px solid var(--store-line)}
.hv-enter .mono-note{max-width:40em}
.hv-status{font-family:var(--mono);font-size:12px;color:var(--store-muted);
  padding:0 16px 12px;min-height:1.3em}

/* ── the identity drawer ── */
.hv-drawer{margin-top:22px;border:1px solid var(--store-line);border-radius:var(--r);
  background:var(--store-panel);padding:var(--pad)}
.hv-cols{display:grid;grid-template-columns:1fr 1fr;gap:22px}
@media (max-width:820px){.hv-cols{grid-template-columns:1fr}}
.hv-prose{font-family:var(--sg);font-size:15.5px;line-height:1.55;max-width:38em}
.hv-prose a{color:var(--g-live)}
/* an ABSOLUTE size, not an em: a browser's default monospace is smaller than
   the surrounding face, so `font-size:.82em` on a code span inside a serif
   paragraph lands under the legibility floor — store.css §1944 paid for this
   finding once already, at 11.9px */
.hv-prose code{font-family:var(--mono);font-size:13px;background:var(--store-pit);
  border:1px solid var(--store-line);border-radius:3px;padding:1px 5px;overflow-wrap:anywhere}
.kv{display:flex;justify-content:space-between;gap:12px;font-family:var(--mono);
  font-size:12.5px;padding:7px 0;border-bottom:1px solid var(--store-line)}
table.hv-table{width:100%;border-collapse:collapse;font-size:14px;margin-top:10px}
table.hv-table th{font-family:var(--sg);font-size:10px;letter-spacing:.18em;
  text-transform:uppercase;color:var(--store-muted);text-align:left;font-weight:500;
  border-bottom:1px solid var(--store-ink);padding:6px 8px}
table.hv-table td{border-bottom:1px solid var(--store-line);padding:9px 8px;vertical-align:top}
.mono-note{font-family:var(--mono);font-size:11.5px;color:var(--store-muted)}
.hv-table a{color:var(--g-live)}
.hv-mini{font-family:var(--mono);font-size:10.5px;color:var(--store-muted);
  background:none;border:1px solid var(--store-line);padding:1px 7px;cursor:pointer}

  /* the page's own type floor, measured off the capture's `tinyType` list at
     390x844 — the shared floor in css/money.css cannot name these without
     leaking one page's vocabulary into the ten that load the same sheet */
  @media (max-width: 560px) {
    .hv-msgs .vmeta time, .hv-msgs .vmeta .tag, .hv-msgs li .mono-note,
    .hv-msgs time, .vmeta, .hv-rooms .mono-note,
    .hv-pane-head .about, .hv-rail small { font-size: max(13px, 1em); }
  }

/* the one checkbox on the page measured 13x13 — three times under the tap
   floor. The label is what a thumb aims at, so the whole row carries it. */
label.mono-note:has(> input[type="checkbox"]){
  display:flex;align-items:center;gap:9px;min-height:44px;cursor:pointer}
label.mono-note > input[type="checkbox"]{width:20px;height:20px;flex:0 0 auto;accent-color:var(--g-live)}
