/* GROWTH, A BUSINESS'S HISTORY (public/rooms/growth/history.js): one glance (DESIGN.md "One glance", room-layout.css
   .rv-g-*): the sends this month as the headline under the tab row, the business and where it stands under it, a row a
   touch, leftover space at the bottom. A touch opens in full in its dialog, a kept call's Play and Words with it;
   Details holds its contact, what comes next and the plan (.gh-in: the history's own looks inside a dialog). And the
   search box that opens a history, which the Lists page holds in its dialog (.gh-search). Materials from theme.css;
   blue only on links and the focus ring. */
.gr-tabview:has(> .gh){container:glance / inline-size}
.rv-room.rv-g-page.gh{justify-content:flex-start;padding-top:0}
.rv-room.rv-g-page.gh .rv-g-tools{flex-wrap:wrap;gap:8px 20px}
.rv-room.rv-g-page.gh .rv-g-tools .rv-g-more{margin:0}
@container glance (max-width:719px){.rv-room.rv-g-page.gh .rv-g-tools{flex:1 1 100%}}
/* a dialog's own words in the history's looks (.gh-in: the page's rules inside a dialog) */
.rv-room.gh.gh-in{flex:none;max-width:none;justify-content:flex-start;gap:16px;padding:0}
.gh-in .gh-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px;margin:0}
.gh-in .gh-facts div{padding-block:8px;border-block:1px solid var(--line);min-width:0}
.gh-in .gh-facts dt{font-size:var(--t-meta);line-height:16px;color:var(--muted)}
.gh-in .gh-facts dd{margin:2px 0 0;overflow-wrap:anywhere}
.gh-in .gh-words{white-space:pre-wrap;overflow-wrap:break-word;text-wrap:pretty}
.gh-in .gh-who-in,.gh-in .gh-stand-in,.gh-in .gh-plan-in{display:flex;flex-direction:column;gap:4px}
.gh-in .gh-stand-in,.gh-in .gh-plan-in{padding-top:16px;border-top:1px solid var(--line)}
.gh-in .gh-plan-in h3{margin:0 0 8px;font:var(--w-mid) var(--t-meta)/16px var(--body);color:var(--muted)}
.gh-in .gh-plan-in .btn{align-self:flex-start}
.gh-in .gh-now{font:var(--w-strong) var(--t-head)/24px var(--display);letter-spacing:-.01em;color:var(--ink)}
.gh-in .gh-next{color:var(--muted)}
.gh-in .gh-in-link{color:var(--accent)}
@media (min-width:560px){.gh-touch-dialog,.gh-details-dialog{width:min(640px,calc(100% - 32px))}}

/* THE PLAN, in Details: each step on its mark, how it goes, its day. The mark's shape says the tone as its words do:
   filled where the step went, ringed in ink and the row outlined for today, open for planned, dashed and quiet for a
   step that will not go */
.rv-room.gh .gh-steps{margin:0;padding:0;list-style:none}
.rv-room.gh .gh-step{--when:132px;position:relative;display:grid;grid-template-columns:var(--when) 28px minmax(0,1fr) minmax(0,max-content);grid-template-areas:"how mark name day";align-items:start;gap:0 16px;margin:0 -8px;padding:8px;border-radius:8px}
.rv-room.gh .gh-step + .gh-step{margin-top:4px}
/* the line: from this step's mark down to the next one's */
.rv-room.gh .gh-step:not(:last-child)::before{content:"";position:absolute;left:calc(8px + var(--when) + 16px + 13.5px);top:22px;bottom:-26px;width:1px;background:var(--line2)}
.rv-room.gh .gh-sn{grid-area:mark;position:relative;z-index:1;box-sizing:border-box;display:grid;place-items:center;width:28px;height:28px;border-radius:50%;border:1px solid var(--muted);background:var(--bg2);color:var(--ink);font:var(--w-strong) var(--t-meta)/1 var(--body);font-variant-numeric:tabular-nums;box-shadow:0 0 0 4px var(--bg2)}
.rv-room.gh .gh-sname{grid-area:name;margin:0;padding-top:4px;font-weight:var(--w-mid);line-height:20px;overflow-wrap:break-word}
.rv-room.gh .gh-show{grid-area:how;margin:0;padding-top:5px;font-size:var(--t-meta);line-height:18px;color:var(--muted);text-align:right}
.rv-room.gh .gh-sday{grid-area:day;max-width:44ch;margin:0;padding-top:4px;line-height:20px;color:var(--ink);text-align:right;overflow-wrap:break-word;text-wrap:balance}
.rv-room.gh :is(.gh-step[data-tone=done] .gh-sn,.gh-sn[data-tone=done]){border-color:var(--ink);background:var(--ink);color:var(--bg2)}
.rv-room.gh .gh-step[data-tone=today]{box-shadow:inset 0 0 0 1.5px var(--ink)}
.rv-room.gh :is(.gh-step[data-tone=today] .gh-sn,.gh-sn[data-tone=today]){border:2px solid var(--ink)}
.rv-room.gh .gh-step[data-tone=today] .gh-sday{font-weight:var(--w-strong)}
.rv-room.gh :is(.gh-step[data-tone=off] .gh-sn,.gh-sn[data-tone=off]){border-style:dashed;color:var(--muted)}
.rv-room.gh .gh-step[data-tone=off] :is(.gh-sname,.gh-sday){color:var(--muted)}
.rv-room.gh .gh-step[data-tone=off] .gh-sname{font-weight:var(--w-row)}
@media (max-width:599px){
  /* a row on the phone: the mark keeps its column; the step and how it goes on its line, its day under them */
  .rv-room.gh .gh-step{grid-template-columns:28px minmax(0,1fr) auto;grid-template-areas:"mark name how" ". day day";gap:0 12px}
  .rv-room.gh .gh-step:not(:last-child)::before{left:calc(8px + 13.5px)}
  .rv-room.gh .gh-sday{max-width:none;padding-top:2px;text-align:left}
}

/* A KEPT CALL, under its touch: which way it went and how long, then Play and Words (each a 32px pill with a 44px
   reach; the player's track the same: a 44px input that draws a 3px line and takes no more room than the pills). The player takes Play's place on
   the same line, so opening it never moves the thread; the played part of its track is the one ink stroke */
.rv-room.gh .gh-call{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;margin-top:6px;min-width:0}
.rv-room.gh .gh-way{color:var(--ink);font-variant-numeric:tabular-nums}
.rv-room.gh .gh-gone{color:var(--muted)}
.rv-room.gh .gh-acts{display:flex;align-items:center;gap:8px;min-width:0}
.rv-room.gh .gh-play{display:flex;align-items:center;gap:8px;min-width:0}
.rv-room.gh .gh-btn{position:relative;display:inline-flex;align-items:center;gap:6px;flex:none;min-height:32px;height:32px;padding:0 12px;border:0;border-radius:16px;background:var(--bg3);color:var(--ink);font:var(--w-mid) var(--t-label)/1 var(--body)}
.rv-room.gh .gh-btn::before{content:"";position:absolute;inset:-6px 0}
.rv-room.gh .gh-btn:hover{background:color-mix(in srgb,var(--ink) 10%,var(--bg3))}
.rv-room.gh .gh-btn:disabled{cursor:default;color:var(--muted)}
.rv-room.gh .gh-btn svg{width:12px;height:12px;flex:none}
.rv-room.gh .gh-btn:has(svg){padding-left:10px}
.rv-room.gh .gh-tog{width:32px;padding:0!important;justify-content:center}
.rv-room.gh .gh-seek{--at:0%;flex:1 1 160px;width:clamp(120px,22vw,240px);min-width:96px;min-height:44px;height:44px;margin:-6px 0;background:transparent;cursor:pointer;-webkit-appearance:none;appearance:none}
.rv-room.gh .gh-seek::-webkit-slider-runnable-track{height:3px;border-radius:2px;background:linear-gradient(to right,var(--ink) var(--at),var(--line2) var(--at))}
.rv-room.gh .gh-seek::-moz-range-track{height:3px;border-radius:2px;background:var(--line2)}
.rv-room.gh .gh-seek::-moz-range-progress{height:3px;border-radius:2px;background:var(--ink)}
.rv-room.gh .gh-seek::-webkit-slider-thumb{width:12px;height:12px;margin-top:-4.5px;border:0;border-radius:50%;background:var(--ink);-webkit-appearance:none;appearance:none}
.rv-room.gh .gh-seek::-moz-range-thumb{width:12px;height:12px;border:0;border-radius:50%;background:var(--ink)}
.rv-room.gh .gh-seek:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
.rv-room.gh .gh-clock{flex:none;font-size:var(--t-meta);line-height:18px;color:var(--muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.rv-room.gh .gh-said{flex-basis:100%;color:var(--ink)}
@media (max-width:599px){
  /* the phone: which way and how long with Words at its end; Play (then the player, the line's full width) under them,
     so the player never crowds Words and opening it never moves the thread */
  .rv-room.gh .gh-call{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px 8px}
  .rv-room.gh .gh-call > *,.rv-room.gh .gh-acts > *{grid-column:1 / -1}
  .rv-room.gh .gh-way{grid-column:1}
  .rv-room.gh .gh-acts{display:contents}
  .rv-room.gh .gh-acts > [data-act="words"]{grid-column:2;grid-row:1}
  .rv-room.gh .gh-gone{margin-top:-4px;font-size:var(--t-meta);line-height:18px}
  .rv-room.gh .gh-seek{width:auto;flex:1 1 auto}
}

/* WORDS: both sides of one call in order, read top to bottom; theirs on the left, Sam's (or the line's) on the right,
   each speaker named where the speaker changes */
@media (min-width:560px){.gh-words-dialog{width:min(640px,calc(100% - 32px))}}
.gh-words-dialog .rv-dialog-body{display:flex;flex-direction:column;gap:16px}
.gh-words-dialog .rv-dialog-body p{margin:0;overflow-wrap:break-word;text-wrap:pretty}
.gh-words-dialog .gh-dim{color:var(--muted)}
.gh-words-dialog .gh-turns{display:flex;flex-direction:column;gap:4px;margin:0;padding:0;list-style:none}
.gh-words-dialog .gh-turn{display:flex;flex-direction:column;gap:4px;max-width:min(85%,480px)}
.gh-words-dialog .gh-turn.gh-first{margin-top:12px}
.gh-words-dialog .gh-turn:first-child{margin-top:0}
.gh-words-dialog .gh-turn > p:last-child{padding-block:8px;border-top:1px solid var(--line);line-height:20px}
.gh-words-dialog .gh-them{align-self:flex-start}
.gh-words-dialog .gh-ours{align-self:flex-end;align-items:flex-end}
.gh-words-dialog .gh-ours > p:last-child{background:color-mix(in srgb,var(--accent) 16%,var(--bg2))}
.gh-words-dialog .gh-them.gh-first > p:last-child{border-top-left-radius:4px}
.gh-words-dialog .gh-ours.gh-first > p:last-child{border-top-right-radius:4px}
.gh-words-dialog .gh-who-said{font-size:var(--t-meta);line-height:16px;color:var(--muted)}
.gh-words-dialog .btn{align-self:flex-start}
@media (max-width:599px){.gh-words-dialog .gh-turn{max-width:92%}}

/* THE SEARCH (mountSearch): the brand choice when the screen is not one brand's, the box, and its matches dropping
   under the box, over the page, scrolling inside themselves */
.gh-search{position:relative;width:100%;max-width:440px;min-width:0}
.gh-search form{position:relative;display:flex;flex-direction:column;gap:8px;margin:0}
.gh-search .rv-seg{display:flex;flex-wrap:wrap;gap:4px}
.gh-search .rv-seg button{display:inline-flex;align-items:center;min-height:44px;padding:0 14px;border:0;border-radius:10px;background:transparent;color:var(--muted);font:var(--w-mid) var(--t-row)/1.2 var(--body);white-space:nowrap;cursor:pointer}
.gh-search .rv-seg button[aria-pressed=true]{background:var(--bg3);color:var(--ink)}
.gh-search .gh-field{position:relative;display:block}
.gh-search .gh-field::before{content:"";position:absolute;left:13px;top:50%;width:11px;height:11px;margin-top:-7px;border:1.5px solid var(--muted);border-radius:50%;pointer-events:none}
.gh-search .gh-field::after{content:"";position:absolute;left:24px;top:50%;width:5px;height:1.5px;margin-top:5px;background:var(--muted);transform:rotate(45deg);transform-origin:left center;pointer-events:none}
.gh-search .gh-field input{box-sizing:border-box;width:100%;min-height:44px;padding:10px 12px 10px 38px;border:1px solid var(--line2);border-radius:10px;background:var(--bg2);color:var(--ink);font-size:var(--t-head);-webkit-appearance:none;appearance:none}
.gh-search input::placeholder{color:var(--muted);opacity:1}
.gh-search input::-webkit-search-cancel-button{-webkit-appearance:none}
.gh-search input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.gh-search .gh-found{position:absolute;z-index:20;top:calc(100% + 6px);left:0;right:0;box-sizing:border-box;max-height:min(360px,55dvh);overflow:auto;overscroll-behavior:contain;padding:4px 12px;border:1px solid var(--line2);border-radius:12px;background:var(--bg2);box-shadow:0 16px 40px rgba(20,26,36,.32)}
:root[data-theme=light] .gh-search .gh-found{box-shadow:0 16px 40px rgba(24,34,48,.14)}
.gh-search ol{margin:0;padding:0;list-style:none}
.gh-search li + li .gh-hit{border-top:1px solid var(--line)}
.gh-search .gh-hit{display:grid;grid-template-columns:minmax(0,1fr) 16px;grid-template-areas:"n chev" "p chev" "c chev";align-items:center;gap:0 12px;min-height:44px;padding:8px 4px;color:var(--ink);text-decoration:none;border-radius:0}
.gh-search .gh-hit:hover .gh-hn{text-decoration:underline;text-underline-offset:3px}
.gh-search .gh-hit:focus-visible{outline:2px solid var(--accent);outline-offset:-2px;border-radius:8px}
.gh-search .gh-hit .rv-tg{justify-self:start;margin-top:4px}
.gh-search .gh-hn{grid-area:n;font-weight:var(--w-mid);overflow-wrap:anywhere}
.gh-search .gh-hp{grid-area:p;font-size:var(--t-meta);line-height:18px;color:var(--muted);overflow-wrap:anywhere}
.gh-search .gh-hc{grid-area:c;font-size:var(--t-meta);line-height:18px;color:var(--ink);overflow-wrap:anywhere}
.gh-search .rv-chev{grid-area:chev;width:16px;height:16px;color:var(--muted)}
.gh-search .gh-line{margin:0;padding:12px 4px;color:var(--muted);text-wrap:pretty}
.gh-search .gh-fail{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:8px 4px}
.gh-search .gh-fail p{margin:0;color:var(--muted)}
.gh-search .btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 16px;border:0;border-radius:10px;background:var(--bg3);color:var(--ink);font:var(--w-strong) var(--t-row)/1.2 var(--body)}
@media (max-width:420px){.gh-search .rv-seg button{padding:0 10px}}
/* the search in a dialog (Lists' and a history's Find a business): tall enough for its matches, which scroll with the
   dialog; the room's dialog inputs (room-layout.css) would cover the search's drawn glass */
@media (min-width:560px){.gh-find-dialog{width:min(560px,calc(100% - 32px))}}
.gh-find-dialog .rv-dialog-body{min-height:min(420px,calc(100dvh - 120px))}
.gh-find-dialog .gh-search{max-width:none}
.gh-find-dialog .gh-field input:not([type=radio]):not([type=checkbox]){padding-left:38px;font-size:var(--t-head)}
.gh-find-dialog .gh-found{position:static;max-height:none;overflow:visible;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
