/* releases.css: the releases and timing page of a cohort (releases.js, at #/admin/cohort/<id>/releases; task PS-02).
   It starts from PL-08's cut-down copy of the accepted preview's admin.css (foundation/PL-08/redrawn/css/
   releases.css) and keeps only what this page draws. The staff's states (.house-state), a row's small controls
   (.house-controls), the quiet action (.link-btn.house-quiet), the tool band and the layout without a rail are
   house.css's. Two things differ from the copy: the reader's line is .rel-who (it was .adm-who, which PS-04's
   admin.css may define for its own pages), and a week folds by a button (.rel-toggle, with aria-expanded) in place
   of details and summary, so that the week's own controls are not inside the control that folds it. Every colour,
   type family, radius and shadow is a custom property of ../styles.css or house.css. */

.rel-who { max-width: 44rem; margin: 12px 0 0; font-size: 14.5px; line-height: 1.55; color: var(--ink-3); }

/* ---- The release tree: a part's box, a week that folds, a unit's row, a timed item's row ---------------------- */
.rel-key { display: grid; grid-template-columns: minmax(0, 1fr) 14.5rem 21rem; column-gap: 20px; margin: 30px 0 0;
  padding: 0 17px 8px; font-size: 12px; font-weight: 750; letter-spacing: .13em; line-height: 1.4;
  text-transform: uppercase; color: var(--ink-3); }
.rel-key > :last-child { text-align: right; }
.rel-part { margin: 0 0 16px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); }
.rel-part.is-preparing { border-style: dashed; background: none; }
.rel-part-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px;
  padding: 13px 16px; background: var(--surface-2); }
.rel-part.is-preparing .rel-part-head { background: none; }
.rel-part-head h2 { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.4; letter-spacing: -.008em;
  color: var(--ink); }
.rel-part-state { margin: 0; font-size: 14px; color: var(--ink-2); }
.rel-part-note { flex: 0 0 100%; margin: 2px 0 0; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.rel-part-note > span { display: block; max-width: 46rem; }
.rel-list { margin: 0; padding: 0; list-style: none; }
.rel-list > li { margin: 0; }
.rel-row { display: grid; grid-template-columns: minmax(0, 1fr) 14.5rem 21rem; column-gap: 20px; row-gap: 6px;
  align-items: center; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.45;
  color: var(--ink-2); }
.rel-name { display: block; font-weight: 650; color: var(--ink); }
.rel-date { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 1px; font-size: 13px;
  color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rel-state { min-width: 0; }
.rel-by { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--ink-3); }
.rel-row .house-controls { min-width: 0; }

/* A week folds: its name is a button that shows or hides the week's units, with a drawn chevron. */
.rel-toggle { position: relative; display: block; width: 100%; margin: 0; padding: 0 0 0 22px; border: 0;
  background: none; font: inherit; font-weight: 650; line-height: inherit; text-align: left; color: var(--ink);
  cursor: pointer; }
.rel-toggle::before { content: ""; position: absolute; left: 3px; top: .42em; width: 6px; height: 6px;
  border: solid var(--ink-3); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); }
.rel-toggle[aria-expanded="true"]::before { top: .3em; transform: rotate(45deg); }
.rel-toggle:hover { text-decoration: underline; text-underline-offset: 3px; }
.rel-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.rel-row.is-week .rel-date { padding-left: 22px; }
.rel-list.is-inside > li > .rel-row { padding-left: 38px; }
.rel-row.is-timed { padding: 8px 16px 8px 38px; background: var(--bg); font-size: 14.5px; }
.rel-list.is-inside > li > .rel-row.is-timed { padding-left: 60px; }
.rel-row.is-timed .rel-name { font-weight: 560; }
.rel-row.is-plain .rel-name { font-weight: 560; }
.rel-part.is-preparing .rel-name { color: var(--ink-2); }

@media (max-width: 1100px) {
  .rel-key, .rel-row { grid-template-columns: minmax(0, 1fr) 12rem 19.5rem; column-gap: 16px; }
  .rel-key { letter-spacing: .08em; }
}
@media (max-width: 820px) {
  .rel-key { display: none; }
  .rel-part:first-of-type { margin-top: 26px; }
  .rel-row { grid-template-columns: minmax(0, 1fr); }
  .rel-row .house-controls { justify-content: flex-start; }
  .rel-row .house-controls:empty { display: none; }
  .rel-by { display: inline; margin: 0 0 0 8px; }
  .rel-list.is-inside > li > .rel-row { padding-left: 28px; }
  .rel-row.is-timed { padding-left: 28px; }
  .rel-list.is-inside > li > .rel-row.is-timed { padding-left: 40px; }
}
