/* GROWTH, SENT (public/rooms/growth/sent.js): a ledger of what went out (DESIGN.md "One glance", room-layout.css
   .rv-g-*). Today's count against the day's limit as the headline, Came back beside it, the clinics ready under it,
   each weekday's emails as the picture, then the touches a row each. Came back's dialog is a tally that adds up under
   one rule to every clinic emailed, then the chosen group's rows; a clinic opens its emails oldest first, its reply
   and what went back. Materials from theme.css; blue only on the picture's today, links and the focus ring. */
.gr-tabview:has(> .gx){container:glance / inline-size}
.rv-g-page.gx{flex:1 1 auto}
.gx .gx-dim,.gx-dim{margin:0;color:var(--muted)}

/* beside the headline: Came back, its figures in mono, and its Open */
.gx .rv-g-tools{gap:12px}
.gx .gx-back{color:var(--muted);white-space:nowrap}
.gx .gx-back .mono{color:var(--ink);font-family:var(--mono);font-size:var(--t-row)}

/* Sent as, beside the list's title: a quiet select; 16px text so the phone never zooms */
.gx .rv-g-sh{align-items:center}
.gx .rv-g-sh .rv-g-more{white-space:nowrap}
.gx .rv-g-sh .rv-g-more[hidden]{display:none}
.gx .gx-as{display:inline-flex;align-items:center;gap:8px;margin:-10px 0 -10px 8px;color:var(--muted);font-size:var(--t-meta)}
.gx .gx-as select{min-height:44px;max-width:220px;padding:0 8px;border:1px solid var(--line2);border-radius:var(--r-ctl);background:transparent;color:var(--ink);font:var(--w-row) var(--t-head)/20px var(--body);cursor:pointer}
.gx .gx-as select:hover{background:var(--bg3)}
.gx .gx-as option{background:var(--bg2);color:var(--ink)}
.gx .gx-fail{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
.gx .gx-fail p{margin:0}

/* the whole list: the search, every row read, how many, the next hundred */
.gx-all .rv-dialog-body{display:flex;flex-direction:column;gap:16px;container:glance / inline-size}
.gx-find{display:flex;flex-direction:column;gap:4px;color:var(--muted);font-size:var(--t-meta)}
.gx-find input{box-sizing:border-box;width:100%;min-height:44px;padding:0 12px;border:1px solid var(--line2);border-radius:var(--r-ctl);background:var(--bg);color:var(--ink);font:var(--w-row) var(--t-head)/20px var(--body)}
.gx-find input:focus-visible,.gx .gx-as select:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
.gx-foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}
.gx-all[open]{display:flex;flex-direction:column}
.gx-all .rv-dialog-head,.gx-all .gx-find,.gx-all .gx-foot{flex:none}
.gx-all .rv-dialog-body{min-height:0;max-height:none;overflow:hidden}
.gx-all .gx-list{min-height:0;overflow:auto;overscroll-behavior:contain}
.gx-all .gx-foot{margin-top:auto}
.gx-foot .gx-n{margin:0;color:var(--muted)}
.gx-none{margin:0;color:var(--muted)}
.gx-none[hidden],.gx-foot [hidden]{display:none}

/* a touch: its facts, then its words as they were written */
.gx-words{margin-top:16px;padding-block:12px;border-top:1px solid var(--line);white-space:pre-wrap;overflow-wrap:break-word;text-wrap:pretty}
.gx-words.gx-hidden{color:var(--muted)}

/* Came back: the tally, ruled once under it with the whole, then the chosen group */
.gx-backbox .rv-dialog-body{display:flex;flex-direction:column;gap:20px;container:glance / inline-size}

.gx-backbox .gx-tally .rv-g-cl[aria-pressed=true] .rv-g-cll{text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:2px}
.gx-backbox .gx-tally .rv-g-clv{color:var(--ink);font-family:var(--mono)}
/* a ledger at every width: one line a standing, its figure at the right, as the total under them */
.gx-backbox .rv-dialog-body .gx-tally{display:block;margin-bottom:-20px;padding:0;background:none;border-radius:0}
.gx-backbox .rv-dialog-body .gx-tally li + li{border-top:1px solid var(--line)}
.gx-backbox .rv-dialog-body .gx-tally .rv-g-cl{flex-direction:row;align-items:center;gap:12px;min-height:44px;padding:0}
.gx-backbox .rv-dialog-body .gx-tally .rv-g-clv{max-width:none;text-align:right;font-size:var(--t-row);line-height:20px}
.gx-backbox .rv-dialog-body .gx-tally .rv-chev{display:block}
.gx-backbox .gx-zero .rv-g-cl{color:var(--muted);cursor:default}
.gx-backbox .gx-zero .rv-g-clv{margin-right:28px;color:var(--muted)}
.gx-total{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;margin:0;padding:0 44px 0 16px;border-top:2px solid var(--line2);font-weight:var(--w-strong)}
.gx-total .mono{font-family:var(--mono);font-size:var(--t-row);line-height:20px}
.gx-group{display:flex;flex-direction:column;gap:8px}
.gx-group h3{margin:0;padding:0 4px;font-size:var(--t-head);line-height:24px}
.gx-group h3 .rv-g-n{margin-left:4px;font-weight:var(--w-row)}
.gx-backbox .rv-dialog-body .gx-tally{padding:0 16px}
.gx-group > .btn{align-self:flex-start}

/* a clinic: its facts, then each email oldest first, what it wrote back, what went back */
.gx-clinic .gx-thread{display:flex;flex-direction:column;gap:12px;margin-top:16px}
.gx-entry{padding:12px 0 0;border-top:1px solid var(--line)}
.gx-entry .gx-eh{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px;margin:0}
.gx-entry .gx-eh span{color:var(--muted);font-size:var(--t-meta);white-space:nowrap}
.gx-entry .gx-subj{margin:4px 0 0;color:var(--muted)}
.gx-entry .gx-words{margin-top:8px}
.gx-entry.gx-theirs .gx-words{background:none;box-shadow:inset 0 0 0 1px var(--line2)}
.gx-thread > .gx-words.gx-hidden{margin-top:0}
.gx-back-none{margin:0;padding-top:12px;border-top:1px solid var(--line);color:var(--muted)}

/* a page short of room for three touches (sent.js fit): the week reads in two columns, Monday to Friday across and
   down, its lines closer */
.gx.gx-tight .rv-g-bars{grid-template-columns:max-content minmax(40px,1fr) minmax(24px,max-content) max-content minmax(40px,1fr) minmax(24px,max-content);gap:0 12px}
.gx.gx-tight .rv-g-bars .rv-g-bl{min-height:26px}
.gx.gx-tight .rv-g-bars .rv-g-bv{line-height:26px}

/* the headline on a folded phone: its figure, then one line holding the clinics ready and, at the right, Came back
   with its Open */
@container glance (min-width:360px) and (max-width:719px){
  .gx .rv-g-head{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"hl hl" "sub tools";align-items:center;gap:8px 16px}
  .gx .rv-g-head > div:first-child{display:contents}
  .gx .rv-g-hl{grid-area:hl}
  .gx .rv-g-sub{grid-area:sub;margin:0}
  .gx .rv-g-tools{grid-area:tools}
}

@container glance (max-width:719px){
  .gx .gx-as > span{display:none}
  .gx .gx-as{margin-left:auto}
  .gx .gx-as select{max-width:150px}
  .gx .gx-as ~ .rv-g-more{margin-left:8px}
  .gx-total{padding:0 40px 0 12px}
}
