/* The Community tab (community/view.js): channels, posts, threads and feature requests. Pictures are Discover's (.ds-av), the
   empty state and the spinner are Create's. Phone first: the channels are a row of pills on top and a thread covers the channel;
   from 760 px the channels are a column on the left, and from 1100 px the thread is a third column on the right.
   The tab does not scroll; .cm-list and .cm-tlist do. */
.view.community { overflow: hidden; }
.cm { position: relative; display: flex; flex-direction: column; height: 100%; }

/* ---- channels ---- */
.cm-side { flex: none; display: flex; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
.cm-side h1, .cm-me { display: none; }
.cm-chans { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.cm-chan { flex: none; display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 12px 0 9px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); font-size: 14px; color: var(--muted); }
.cm-chan svg.i { width: 15px; height: 15px; }
.cm-chan:hover { color: var(--ink); }
.cm-chan[aria-current="page"] { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); font-weight: 600; }
.cm-chan.new { color: var(--ink); font-weight: 700; }
.cm-chan i { min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 9px; background: var(--cr-a2); color: #fff; font: 700 11px/18px var(--font); font-style: normal; text-align: center; }
html[data-community-new] #tab-community { position: relative; }
html[data-community-new] #tab-community::after { content: ""; position: absolute; top: 7px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%; background: var(--cr-a2); }

/* ---- the open channel ---- */
.cm-main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.cm-head { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cm-head-t { min-width: 0; }
.cm-head h2 { display: flex; align-items: center; gap: 4px; margin: 0; font: 700 17px/1.25 var(--font-display); }
.cm-head h2 svg.i { width: 17px; height: 17px; color: var(--muted); }
.cm-head p { display: none; margin: 1px 0 0; font-size: 13px; color: var(--muted); }      /* on a phone the channel's start says it already */
.cm-bar { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cm-bar .cr-search { flex: 1 1 150px; min-height: 34px; }
.cm-bar .seg button { padding: 5px 12px; }
.cm-select { min-height: 34px; max-width: 100%; padding: 4px 8px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; }
.cm-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px 0 12px; }
.cm-list > .ds-wait, .cm-list > .cr-warn, .cm-list > .cr-warn + .btn { margin-left: 16px; margin-right: 16px; }
.cm-foot, .cm-tfoot { flex: none; padding: 0 12px 12px; }
.cm-start { display: flex; flex-direction: column; gap: 3px; padding: 24px 16px 6px; font-size: 14px; color: var(--muted); }
.cm-start svg.i { width: 40px; height: 40px; padding: 9px; margin-bottom: 6px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.cm-start b { font: 700 19px/1.25 var(--font-display); color: var(--ink); }
.cm-older { display: flex; justify-content: center; padding: 10px 0 4px; }
.cm-day { display: flex; align-items: center; gap: 10px; margin: 14px 16px 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cm-day::before, .cm-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---- a post ---- */
.cm-msg { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 10px; padding: 6px 16px 3px; }
.cm-msg.cont { padding-top: 1px; }
.cm-msg:hover, .cm-msg.open, .cm-msg.picking { background: var(--raised); }
.cm-gutter { align-self: start; font-size: 10px; line-height: 22px; color: var(--faint); text-align: right; white-space: nowrap; overflow: hidden; visibility: hidden; }
.cm-msg:hover .cm-gutter { visibility: visible; }
.cm-body { min-width: 0; }
.cm-by { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin: 0; font-size: 14px; }
.cm-by time { font-size: 12px; color: var(--faint); }
.cm-text { font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-text a { color: var(--accent-text); }
.cm-text code, .cm-text pre { border: 1px solid var(--line); border-radius: 6px; background: var(--raised); font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; }
.cm-text code { padding: 1px 4px; }
.cm-text pre { margin: 4px 0; padding: 8px 10px; overflow-x: auto; white-space: pre; }
.cm-msg:hover .cm-text code, .cm-msg:hover .cm-text pre { background: var(--surface); }
.cm-edited { margin-left: 6px; font-size: 11px; color: var(--faint); }
.cm-rxs { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cm-rx { display: inline-flex; align-items: center; gap: 4px; min-height: 26px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.cm-rx:hover { border-color: var(--ink); }
.cm-rx[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.cm-rx.add { padding: 0 7px; }
.cm-rx.add svg.i { width: 15px; height: 15px; }
.cm-tlink { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 2px -4px; padding: 3px 10px 3px 4px; border: 1px solid transparent; border-radius: 8px;
  background: none; font-size: 13px; color: var(--accent-text); text-align: left; }
.cm-tlink:hover { border-color: var(--line-strong); background: var(--surface); }
.cm-tlink small { font-size: 12px; color: var(--faint); }
.cm-tools { position: absolute; top: -14px; right: 14px; z-index: 2; display: none; padding: 2px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow); }
.cm-msg:hover .cm-tools, .cm-msg:focus-within .cm-tools, .cm-msg.open .cm-tools, .cm-msg.picking .cm-tools { display: flex; }
.cm-tools button { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 7px; background: none; color: var(--muted); }
.cm-tools button:hover { background: var(--raised); color: var(--ink); }
.cm-tools svg.i { width: 16px; height: 16px; }
.cm-pick { position: absolute; top: 20px; right: 14px; z-index: 3; display: flex; gap: 2px; padding: 4px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); box-shadow: var(--shadow); }
.cm-pick button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; background: none; font-size: 19px; }
.cm-pick button:hover { background: var(--raised); }

/* ---- the box to write in ---- */
.cm-compose { display: flex; align-items: flex-end; gap: 6px; padding: 5px 5px 5px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); }
.cm-compose:focus-within { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.cm-compose textarea { flex: 1; min-width: 0; min-height: 36px; max-height: 180px; padding: 7px 0; border: 0; background: none; resize: none; font-size: 15px; line-height: 1.4; }
.cm-compose textarea:focus { outline: none; }
.cm-sendb { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }
.cm-sendb svg.i { width: 18px; height: 18px; }
.cm-compose:has(textarea:placeholder-shown) .cm-sendb { background: var(--raised); color: var(--faint); }
.cm-signin { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-radius: 14px; border: 1px dashed var(--line-strong);
  font-size: 14px; color: var(--muted); }

/* ---- the thread pane ---- */
.cm-thread { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: var(--bg); }
.cm-thead { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); }
.cm-thead h2 { margin: 0; font: 700 16px/1.25 var(--font-display); }
.cm-thead p { display: flex; align-items: center; gap: 2px; margin: 0; font-size: 12px; color: var(--muted); }
.cm-thead p svg.i { width: 12px; height: 12px; }
.cm-tlist { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 10px 0 12px; }

/* ---- feature requests ---- */
.cm-list.feats { padding: 12px 12px 24px; }
.cm-feats { display: flex; flex-direction: column; gap: 8px; max-width: 880px; margin: 0 auto; }
.cm-feat { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.cm-feat:hover { border-color: var(--line-strong); }
.cm-feat.on { border-color: var(--accent); }
.cm-vote { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 48px; min-height: 52px; padding: 4px 0; border-radius: 10px;
  border: 1px solid var(--line-strong); background: var(--raised); font-size: 14px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.cm-vote svg.i { width: 18px; height: 18px; }
.cm-vote:hover { border-color: var(--ink); color: var(--ink); }
.cm-vote[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.cm-vote[aria-pressed="true"] svg.i { fill: currentColor; }
.cm-vote.big { width: 56px; min-height: 60px; font-size: 16px; }
.cm-feat-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 2px 0; border: 0; background: none; color: var(--ink); text-align: left; }
.cm-feat-b > b { font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.cm-feat-b:hover > b { text-decoration: underline; }
.cm-feat-b p { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cm-feat-b small { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; font-size: 12px; color: var(--faint); }
.cm-feat-b small .ds-av { margin-right: -4px; }
.cm-ncm { display: inline-flex; align-items: center; gap: 3px; }
.cm-ncm svg.i { width: 13px; height: 13px; }
.cm-status { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 11px; font-weight: 700; line-height: 18px;
  vertical-align: 2px; white-space: nowrap; color: var(--muted); }
.cm-status.s-planned { color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); background: var(--accent-soft); }
.cm-status.s-progress { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); background: color-mix(in srgb, var(--warn) 10%, transparent); }
.cm-status.s-shipped { color: var(--live); border-color: color-mix(in srgb, var(--live) 45%, var(--line)); background: color-mix(in srgb, var(--live) 10%, transparent); }
.cm-status.s-declined { color: var(--faint); text-decoration: line-through; }
.cm-fdetail { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 6px 16px 4px; }
.cm-fd-top { display: flex; align-items: flex-start; gap: 12px; }
.cm-fd-top > div { min-width: 0; }
.cm-fd-top h3 { margin: 0 0 3px; font: 700 18px/1.25 var(--font-display); overflow-wrap: anywhere; }
.cm-fd-status { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; color: var(--muted); }
.cm-fd-status .cm-status { margin-left: 0; vertical-align: 0; }
.cm-fd-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.cm-fdetail .cm-pick { position: static; align-self: flex-start; }
#cm-sim:empty { display: none; }
#cm-sim { display: flex; flex-direction: column; gap: 6px; }
.cm-sim { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; font-size: 14px; }
.cm-sim:hover { border-color: var(--ink); }
.cm-sim > b { flex: none; display: inline-flex; align-items: center; gap: 2px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cm-sim > b svg.i { width: 14px; height: 14px; }
.cm-sim > span:not(.cm-status) { flex: 1; min-width: 0; overflow-wrap: anywhere; }

@media (min-width: 760px) {
  .cm { flex-direction: row; }
  .cm-side { width: 220px; flex-direction: column; align-items: stretch; gap: 12px; padding: 16px 10px 12px; border-bottom: 0; border-right: 1px solid var(--line); }
  .cm-side h1 { display: block; margin: 0 8px; font: 700 20px/1.2 var(--font-display); letter-spacing: -.02em; }
  .cm-chans { flex-direction: column; gap: 2px; overflow: visible; }
  .cm-chan { display: flex; gap: 8px; min-height: 36px; padding: 0 10px; border: 0; border-radius: 10px; background: none; font-size: 15px; text-align: left; }
  .cm-chan:hover { background: var(--raised); }
  .cm-chan i { margin-left: auto; }
  .cm-me { display: block; margin-top: auto; }
  .cm-mebtn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px; border: 0; border-radius: 10px; background: none; color: var(--ink); text-align: left; }
  .cm-mebtn:hover { background: var(--raised); }
  .cm-mebtn > span:not(.ds-av) { min-width: 0; display: flex; flex-direction: column; }
  .cm-mebtn b, .cm-mebtn small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cm-mebtn b { font-size: 13px; }
  .cm-mebtn small { font-size: 11px; color: var(--muted); }
  .cm-head { padding: 12px 20px; }
  .cm-head p { display: block; }
  .cm-bar { flex: 1 1 420px; justify-content: flex-end; }
  .cm-bar .cr-search { max-width: 280px; }
  .cm-msg, .cm-fdetail { padding-left: 20px; padding-right: 20px; }
  .cm-day, .cm-start { margin-left: 20px; margin-right: 20px; }
  .cm-start { padding-left: 0; padding-right: 0; }
  .cm-foot, .cm-tfoot { padding: 0 20px 16px; }
  .cm-list.feats { padding: 16px 20px 28px; }
  .cm-thread { left: 220px; border-left: 1px solid var(--line); }
}
@media (min-width: 1100px) {
  .cm-thread { position: static; flex: none; width: min(420px, 36vw); }
  .cm-thread .cm-msg, .cm-thread .cm-fdetail { padding-left: 16px; padding-right: 16px; }
  .cm-thread .cm-day { margin-left: 16px; margin-right: 16px; }
  .cm-tfoot { padding: 0 12px 16px; }
}
.cm-list .cr-empty .btn { margin-top: 10px; }
.cm-list .cr-empty .btn svg.i { width: 17px; height: 17px; margin: 0; color: inherit; }      /* not the big icon of the empty state */
