/* Calm Chat home (owner direction 2026-10-16, r01). Approved look: paper,
 * olive controls, thin green borders, serif section headings, sans controls.
 * Desktop: My rooms | Ask + stream | one card. Phone: one column, Ask first. */
.chat-home { --ch-paper:var(--fd-paper,#fffef9); --ch-bg:var(--fd-bg,#f5f3ec); --ch-ink:var(--fd-ink,#29372e);
  --ch-muted:var(--fd-muted,#586653); --ch-line:var(--fd-line,#d9ded0); --ch-green:var(--fd-green,#526547);
  --ch-green-dark:var(--fd-green-dark,#344b2c); --ch-soft:#eef1e7; --ch-current:#e4ead8; --ch-warm:#f7f0dc; --ch-warm-line:#e3d6ae;
  color:var(--ch-ink); max-width:1180px; }
.chat-home * { box-sizing:border-box; }
.chat-home .ch-lead { margin:-6px 0 14px; color:var(--ch-muted); font-size:14px; }
.chat-home .ch-grid { display:grid; grid-template-columns:minmax(190px,220px) minmax(0,1fr) minmax(240px,290px);
  grid-template-areas:"rooms ask rail" "rooms stream rail"; grid-template-rows:auto 1fr; gap:16px 20px; align-items:start; }
.chat-home .ch-rooms { grid-area:rooms; position:sticky; top:82px; background:var(--ch-paper); border:1px solid var(--ch-line); border-radius:8px; padding:14px 10px 12px; }
.chat-home .ch-ask { grid-area:ask; background:var(--ch-paper); border:1px solid var(--ch-line); border-radius:8px; padding:16px 18px; }
.chat-home .ch-stream { grid-area:stream; min-width:0; }
.chat-home .ch-rail { grid-area:rail; position:sticky; top:82px; }
.chat-home .ch-hello-slot:empty { display:none; }
.chat-home .ch-hello-slot .ch-card { background:var(--ch-paper); border:1px solid var(--ch-line); border-radius:8px; padding:14px; }

.chat-home .ch-kicker { margin:0 0 8px; padding:0 6px; font:600 10px/1.5 "DM Sans",sans-serif; letter-spacing:1px; text-transform:uppercase; color:#5d6958; }
.chat-home .ch-h2 { margin:0 0 10px; font:600 21px/1.25 "Newsreader","Source Serif 4",Georgia,serif; color:var(--ch-ink); }
.chat-home .ch-note { margin:6px 6px 0; font-size:12.5px; line-height:1.45; color:var(--ch-muted); }
.chat-home .ch-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.chat-home .ch-link { color:var(--ch-green-dark); font-weight:600; text-decoration:underline; text-underline-offset:2px; }
.chat-home .ch-link-btn { border:0; background:none; padding:6px 2px; min-height:32px; color:var(--ch-green-dark); font:600 13px/1.3 "DM Sans",sans-serif; text-decoration:underline; text-underline-offset:2px; cursor:pointer; }
.chat-home .ch-btn { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:8px 14px; border:1px solid #b9c4ab; border-radius:5px;
  background:var(--ch-paper); color:var(--ch-green-dark); font:600 13px/1.2 "DM Sans",sans-serif; text-decoration:none; cursor:pointer; }
.chat-home .ch-btn:hover { background:#edf1e6; }
.chat-home .ch-btn.primary { background:var(--ch-green); border-color:var(--ch-green); color:#fff; }
.chat-home .ch-btn.primary:hover { background:var(--ch-green-dark); }
.chat-home .ch-btn:disabled { opacity:.6; cursor:not-allowed; }

/* My rooms */
.chat-home .ch-group { margin:10px 0 4px; }
.chat-home .ch-group-title { margin:10px 6px 4px; font:500 11.5px/1.4 "DM Sans",sans-serif; color:var(--ch-muted); }
.chat-home .ch-room-list { list-style:none; margin:0; padding:0; }
.chat-home .ch-room { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; min-height:38px; margin:1px 0; padding:7px 8px;
  border:0; border-radius:5px; background:transparent; color:var(--ch-ink); font:400 13px/1.35 "DM Sans",sans-serif; text-align:left; cursor:pointer; }
.chat-home .ch-room:hover { background:#edf1e6; }
.chat-home .ch-room.is-current { background:var(--ch-current); color:var(--ch-green-dark); font-weight:600; box-shadow:inset 3px 0 0 var(--ch-green); }
/* r10 My conversations: private chats as rows, an unread dot when something is new. */
.chat-home a.ch-room.ch-dm { color:inherit; text-decoration:none; }
.chat-home .ch-dot { flex:none; width:9px; height:9px; border-radius:50%; background:var(--ch-green, #526547); }
.chat-home .ch-follow-empty[hidden] { display:none; }
.chat-home .ch-room-label { min-width:0; overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.chat-home .ch-new { flex:none; padding:1px 7px; border-radius:999px; background:#e6ecdd; border:1px solid #cbd4bf; color:var(--ch-green-dark); font:600 11px/1.5 "DM Sans",sans-serif; white-space:nowrap; }
.chat-home .ch-more summary { margin:4px 6px; min-height:32px; display:flex; align-items:center; color:var(--ch-muted); font-size:12.5px; cursor:pointer; }
.chat-home .ch-messages { margin-top:10px; border-top:1px solid var(--ch-line); border-radius:0 0 5px 5px; padding-top:10px; font-weight:600; }
.chat-home .ch-new-note { margin-top:10px; }

/* Ask your people */
.chat-home .ch-ask-form { display:flex; flex-direction:column; gap:8px; }
.chat-home .ch-ask-input { width:100%; min-height:72px; padding:10px 12px; border:1px solid #b9c4ab; border-radius:6px; background:#fff; font:400 14px/1.5 "DM Sans",sans-serif; resize:vertical; }
.chat-home .ch-dest { margin:0; font-size:13px; color:var(--ch-muted); }
.chat-home .ch-dest-text { color:var(--ch-ink); }
.chat-home .ch-picker { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.chat-home .ch-picker-label { font-size:13px; color:var(--ch-muted); }
.chat-home .ch-picker-select { min-height:38px; max-width:100%; padding:6px 8px; }
.chat-home .ch-ask-actions { display:flex; align-items:center; justify-content:flex-end; gap:12px; flex-wrap:wrap; }
.chat-home .ch-rules { margin:0 0 6px; font-size:12px; color:var(--ch-muted); }
.chat-home .ch-check { display:flex; gap:8px; align-items:flex-start; font-size:13px; line-height:1.45; }
.chat-home .ch-check input { margin-top:3px; width:18px; height:18px; flex:none; accent-color:var(--olive, #526547); }
.chat-home .ch-gate { margin:0; padding:9px 11px; border:1px solid #d9d2b6; border-radius:6px; background:#fbf7ea; font-size:13px; }
.chat-home .ch-cap { margin:0; }
.chat-home .ch-gate-host { display:flex; flex-direction:column; gap:8px; }
.chat-home .ch-status { margin:0; min-height:1px; font-size:13px; color:var(--ch-ink); }
.chat-home .ch-status:empty,.chat-home .ch-gate-host:empty,.chat-home .ch-ack-host:empty { display:none; }
.chat-home .ch-fail { padding:10px 12px; border:1px solid #e0c9b8; border-radius:6px; background:#fbf3ee; }
.chat-home .ch-fail p { margin:0 0 8px; font-size:13px; }

/* Stream */
.chat-home .ch-stream-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; margin:2px 0 10px; }
.chat-home .ch-stream-head .ch-h2 { margin:0; font-size:18px; }
.chat-home .ch-stream-list { display:flex; flex-direction:column; gap:10px; }
.chat-home .ch-post { display:flex; gap:12px; padding:13px 15px; background:var(--ch-paper); border:1px solid var(--ch-line); border-radius:8px; }
.chat-home .ch-avatar { flex:none; display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:50%; background:#dfe7d3; color:var(--ch-green-dark); font:700 12px/1 "DM Sans",sans-serif; }
.chat-home .ch-post-main { min-width:0; flex:1; }
.chat-home .ch-post-head { display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
.chat-home .ch-name { padding:0; border:0; background:none; color:var(--ch-ink); font:600 13.5px/1.35 "DM Sans",sans-serif; text-align:left; }
.chat-home button.ch-name { cursor:pointer; text-decoration:underline; text-decoration-color:#b9c4ab; text-underline-offset:2px; min-height:28px; }
.chat-home .ch-post-meta { font-size:12px; color:var(--ch-muted); }
.chat-home .ch-coins { display:inline-flex; }
.chat-home .ch-post-title { margin:6px 0 0; font-weight:600; font-size:14px; overflow-wrap:anywhere; }
.chat-home .ch-post-body { margin:4px 0 0; font-size:14px; line-height:1.5; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:5; -webkit-box-orient:vertical; overflow:hidden; }
.chat-home .ch-post-foot { display:flex; flex-wrap:wrap; align-items:center; gap:4px 14px; margin-top:8px; font-size:12.5px; color:var(--ch-muted); }
.chat-home .ch-post-foot .ch-link { display:inline-flex; align-items:center; min-height:32px; }
.chat-home .ch-unanswered { padding:13px 15px; background:var(--ch-warm); border:1px solid var(--ch-warm-line); border-radius:8px; }
.chat-home .ch-unanswered-title { margin:0 0 6px; font:600 14px/1.3 "DM Sans",sans-serif; color:#5a4a17; }
.chat-home .ch-unanswered-body { margin:0; font-size:14px; line-height:1.5; overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }
.chat-home .ch-unanswered-meta { margin:6px 0 0; font-size:12.5px; color:#5d5532; }
.chat-home .ch-unanswered-note { margin:4px 0 10px; font-size:12.5px; color:#5d5532; }
.chat-home .ch-empty { margin:0; padding:16px; background:var(--ch-paper); border:1px dashed #cbd4bf; border-radius:8px; color:var(--ch-muted); }

/* One card at a time */
.chat-home .ch-card { padding:15px 16px; background:var(--ch-paper); border:1px solid var(--ch-line); border-radius:8px; }
.chat-home .ch-card .ch-kicker { padding:0; color:#6b5a1f; }
.chat-home .ch-card-title { margin:0 0 6px; font:600 17px/1.3 "Newsreader","Source Serif 4",Georgia,serif; overflow-wrap:anywhere; }
.chat-home .ch-card-meta,.chat-home .ch-card-note { margin:4px 0 0; font-size:12.5px; color:var(--ch-muted); }
.chat-home .ch-chips { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 2px; }
.chat-home .ch-chip { padding:2px 8px; border:1px solid #cbd4bf; border-radius:999px; background:#f3f5ee; font-size:11.5px; font-weight:600; color:var(--ch-green-dark); }
.chat-home .ch-chip-due { background:#fbf3df; border-color:#e3d6ae; color:#5a4a17; }
.chat-home .ch-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.chat-home .ch-people,.chat-home .ch-milestones { list-style:none; margin:8px 0 0; padding:0; display:flex; flex-direction:column; gap:6px; font-size:13px; }
.chat-home .ch-people li { display:flex; align-items:center; gap:6px; }
.chat-home .ch-when { color:var(--ch-muted); font-size:12px; }
.chat-home .ch-rail-foot { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:6px; padding:0 2px; }
.chat-home .ch-rail-foot .ch-note { margin:0; }
.chat-home .ch-rail-foot .ch-link-btn { text-align:right; }

@media(max-width:1180px) and (min-width:761px) {
  .chat-home .ch-grid { grid-template-columns:minmax(180px,210px) minmax(0,1fr); grid-template-areas:"rooms ask" "rooms stream" "rooms rail"; grid-template-rows:auto auto 1fr; }
  .chat-home .ch-rail { position:static; }
}
@media(max-width:760px) {
  .chat-home .ch-lead { margin:0 0 10px; }
  .chat-home .ch-grid { grid-template-columns:minmax(0,1fr); grid-template-areas:"ask" "hello" "rooms" "stream" "rail"; grid-template-rows:auto; gap:12px; }
  .chat-home .ch-hello-slot { grid-area:hello; }
  .chat-home .ch-ask { padding:14px; }
  .chat-home .ch-h2 { font-size:19px; }
  /* My rooms becomes one scrollable row of rooms. */
  .chat-home .ch-rooms { position:static; padding:10px 0 8px; border-radius:8px; }
  .chat-home .ch-rooms > .ch-kicker { padding:0 12px; }
  .chat-home .ch-rooms-body { display:flex; gap:6px; overflow-x:auto; padding:0 10px 4px; scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch; }
  .chat-home .ch-group { display:contents; }
  .chat-home .ch-group-title { display:none; }
  .chat-home .ch-room-list { display:contents; }
  .chat-home .ch-room-list li { display:contents; }
  .chat-home .ch-room,.chat-home .ch-messages { flex:none; width:auto; max-width:240px; min-height:40px; margin:0; padding:6px 12px; border:1px solid #cbd4bf; border-radius:999px; background:#fff; scroll-snap-align:start; }
  .chat-home .ch-room.is-current { box-shadow:none; border-color:var(--ch-green); }
  .chat-home .ch-room-label { -webkit-line-clamp:1; white-space:nowrap; display:block; }
  .chat-home .ch-messages { border-top:1px solid #cbd4bf; padding-top:6px; }
  .chat-home .ch-more { display:contents; }
  .chat-home .ch-more summary { display:none; }
  .chat-home .ch-more > ul { display:contents; }
  .chat-home .ch-group > .ch-note { flex:none; display:flex; align-items:center; max-width:250px; margin:0; padding:0 6px; font-size:12px; }
  .chat-home .ch-new-note { display:none; }
  .chat-home .ch-rail { position:static; }
  .chat-home .ch-post { padding:12px; gap:10px; }
  .chat-home .ch-avatar { width:30px; height:30px; }
  /* 44px touch targets on phones (DESIGN_DNA): room chips, link buttons, Open links, names. */
  .chat-home .ch-room,.chat-home .ch-messages { min-height:44px; }
  .chat-home .ch-link-btn { min-height:44px; min-width:44px; padding:10px 4px; }
  .chat-home .ch-post-foot .ch-link,.chat-home .ch-stream-head .ch-link,.chat-home .ch-status .ch-link { display:inline-flex; align-items:center; min-height:44px; min-width:44px; }
  .chat-home button.ch-name { min-height:44px; }
  .chat-home .ch-btn,.chat-home .ch-picker-select { min-height:44px; }
  .chat-home .ch-check { min-height:44px; align-items:center; }
  .chat-home .ch-check input { margin-top:0; width:22px; height:22px; }
  .chat-home .ch-milestones .ch-link { display:inline-flex; align-items:center; min-height:44px; }
}
/* Phone: the rail sits at the end of the stream, so its photograph would land at the very
   bottom, far from the discussion it belongs to. Leave it out on phones; Ask stays first. */
@media(max-width:760px) {
  body.fd-design .chat-home .fd-topic-photo.fd-chat-photo { display:none; }
}
/* Unanswered near you: Answer and the "⋯" menu on one row (WP5 verifier fix). */
.chat-home .ch-unanswered-acts { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-top:8px; }
.chat-home .ch-unanswered-acts .fr-actions, .chat-home .ch-post-foot .fr-actions { margin:0; }
.chat-home .ch-crew { margin-left:2px; }
/* FIX-2 (2026-10-17): explicit ink for headings and room names, so a host page's chat tokens (the legacy
   dark scheme among them) never paint them near-white on paper. The approved design is light-only. */
.chat-home :is(h1,h2,h3,h4) { color:var(--ch-ink); }
