/* Admin page: under the title, the choice between its two views. Overview: the three figures in a row (the words,
   the figure large, a line under it), then the chart of a running total under a rule, the table of jobs outside the
   team, and the footnote. People: the view's two choices, four figures, the funnel as a table with a bar of ink for
   each step, the chart of active people, retention as a grid whose cells deepen with their share, what people use as
   four short lists, and the table of people; one person: their steps as a line that is ink as far as they got, their
   figures, their days as a grid, and their records as tables. Sections under rules, no boxes. Ink only: a share is a
   depth of ink, never a hue. Every rule is under the page, so nothing here reaches another page or a dialog. Tokens
   from styles.css only. */

.page[data-page="admin"] .admin-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-content: start; }
.page[data-page="admin"] .admin-figures {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 40px;
}
.page[data-page="admin"] .admin-figure { display: grid; gap: 2px; min-width: 0; align-content: start; }
.page[data-page="admin"] .admin-figure-label { color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.page[data-page="admin"] .admin-figure-value {
  font-size: 28px; font-weight: 600; line-height: 1.2; letter-spacing: -.012em; color: var(--ink); white-space: nowrap;
}
.page[data-page="admin"] .admin-figure-sub { color: var(--ink-3); font-size: 12.5px; line-height: 1.5; }
.page[data-page="admin"] .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }
.page[data-page="admin"] .admin-chart { padding: 12px 0 0; }
.page[data-page="admin"] .admin-chart .chart-head { margin-bottom: 6px; }
.page[data-page="admin"] .admin-jobs { margin-top: 12px; }
.page[data-page="admin"] .admin-deleted { color: var(--ink-3); font-size: 12.5px; }

/* the figures need about 200px each: side by side only where they have it */
@media (max-width: 699px) {
  .page[data-page="admin"] .admin-figures { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .page[data-page="admin"] .admin-body { gap: 28px; }
}

/* the head: the title and its line, then the two views as tabs */
.page[data-page="admin"] .admin-head { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }

/* ---------------------------------------------------------------- People: the list */

.page[data-page="admin"] .admin-choices { gap: 6px 28px; }
.page[data-page="admin"] .admin-figures[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* a share: a bar of ink on a quiet track, as wide as its cell */
.page[data-page="admin"] .admin-bar {
  display: block; height: 6px; min-width: 48px; background: var(--paper-3); border-radius: var(--radius-cap); overflow: hidden;
}
.page[data-page="admin"] .admin-bar > i { display: block; height: 100%; width: var(--w); background: var(--ink); border-radius: var(--radius-cap); }

/* the funnel: the step, its bar taking the room that is left, then its figures */
.page[data-page="admin"] .admin-funnel td.admin-step { font-weight: 550; white-space: nowrap; }
.page[data-page="admin"] .admin-funnel th.admin-step-bar, .page[data-page="admin"] .admin-funnel td.admin-step-bar { width: 36%; min-width: 96px; }
.page[data-page="admin"] .admin-stopped { font-variant-numeric: tabular-nums; }
.page[data-page="admin"] .admin-gap { margin-top: 14px; color: var(--ink-2); max-width: 80ch; }
.page[data-page="admin"] .admin-gap + .admin-gap { margin-top: 4px; }

/* retention: a cell's ink deepens with its share; past the middle its figure is set in the paper's colour */
.page[data-page="admin"] .admin-retention th[scope="row"] {
  position: static; height: 40px; padding: 0 12px 0 0; vertical-align: middle; font-size: 13.5px; font-weight: 500;
  font-stretch: 100%; line-height: inherit; color: var(--ink); white-space: nowrap; text-align: left;
  border-bottom: 1px solid var(--rule);
}
.page[data-page="admin"] .admin-retention tbody tr:last-child th { border-bottom: 0; }
.page[data-page="admin"] .admin-retention .admin-week { min-width: 68px; }
.page[data-page="admin"] .admin-cell { border-left: 2px solid var(--paper); }
.page[data-page="admin"] .admin-cell[data-depth="0"] { color: var(--ink-3); }
.page[data-page="admin"] .admin-cell[data-depth="1"] { background: color-mix(in oklab, var(--ink) 8%, var(--paper)); }
.page[data-page="admin"] .admin-cell[data-depth="2"] { background: color-mix(in oklab, var(--ink) 18%, var(--paper)); }
.page[data-page="admin"] .admin-cell[data-depth="3"] { background: color-mix(in oklab, var(--ink) 30%, var(--paper)); }
.page[data-page="admin"] .admin-cell[data-depth="4"] { background: color-mix(in oklab, var(--ink) 62%, var(--paper)); color: var(--paper); font-weight: 550; }
.page[data-page="admin"] .admin-cell[data-depth="5"] { background: color-mix(in oklab, var(--ink) 84%, var(--paper)); color: var(--paper); font-weight: 550; }

/* what they use: four short lists side by side, each a name, its bar and its count */
.page[data-page="admin"] .admin-tallies { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px 40px; padding-top: 12px; }
.page[data-page="admin"] .admin-tally-title { font-size: 13px; font-weight: 550; color: var(--ink-2); margin-bottom: 10px; }
.page[data-page="admin"] .admin-tally-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.page[data-page="admin"] .admin-tally-list li {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(48px, 1fr) minmax(2ch, max-content); align-items: center;
  gap: 12px; font-size: 13.5px;
}
.page[data-page="admin"] .admin-tally-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page[data-page="admin"] .admin-tally-count { text-align: right; color: var(--ink-2); }

/* the table of people */
.page[data-page="admin"] .admin-line { display: flex; align-items: baseline; gap: 14px; font-size: 12.5px; color: var(--ink-3); min-height: 20px; }
.page[data-page="admin"] .admin-people td.admin-person { min-width: min(30ch, 60vw); }
.page[data-page="admin"] .admin-person-name { font-weight: 550; white-space: nowrap; }
.page[data-page="admin"] .admin-person-under { display: flex; flex-wrap: wrap; gap: 0 12px; }
.page[data-page="admin"] .admin-tag { font-size: 12px; font-weight: 500; font-stretch: var(--label-stretch); color: var(--ink-3); white-space: nowrap; }
.page[data-page="admin"] .admin-tag[data-tone="warn"] { color: var(--warn); }

/* ---------------------------------------------------------------- People: one person */

.page[data-page="admin"] .admin-back { font-size: 13px; margin-bottom: 6px; }
.page[data-page="admin"] .admin-person-title { overflow-wrap: anywhere; }
.page[data-page="admin"] .admin-person-sub .facts { display: flex; flex-wrap: wrap; gap: 2px 18px; }

/* the steps: one line, ink as far as they got and a hairline after, a mark where each step begins */
.page[data-page="admin"] .admin-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.page[data-page="admin"] .admin-step-item {
  position: relative; display: grid; gap: 1px; align-content: start; padding: 14px 16px 0 0; border-top: 2px solid var(--rule-2);
}
.page[data-page="admin"] .admin-step-item[data-done="yes"] { border-top-color: var(--ink); }
.page[data-page="admin"] .admin-step-mark {
  position: absolute; top: -6px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--paper);
  border: 2px solid var(--rule-2);
}
.page[data-page="admin"] .admin-step-item[data-done="yes"] .admin-step-mark { background: var(--ink); border-color: var(--ink); }
.page[data-page="admin"] .admin-step-name { font-size: 13.5px; font-weight: 550; line-height: 1.35; }
.page[data-page="admin"] .admin-step-item[data-done="no"] .admin-step-name { color: var(--ink-3); font-weight: 500; }
.page[data-page="admin"] .admin-step-when { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }

/* their days: a grid of squares, a column a week, beside the totals by where the requests came from */
.page[data-page="admin"] .admin-activity-body { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 20px 56px; align-items: start; padding-top: 12px; }
.page[data-page="admin"] .admin-heat-wrap { display: grid; gap: 10px; max-width: 34ch; }
.page[data-page="admin"] .admin-heat { display: grid; grid-template-rows: repeat(7, 13px); grid-auto-flow: column; grid-auto-columns: 13px; gap: 3px; }
.page[data-page="admin"] .admin-day { display: block; background: var(--paper-3); }
.page[data-page="admin"] .admin-day[data-depth="none"] { background: none; }
.page[data-page="admin"] .admin-day[data-depth="1"] { background: color-mix(in oklab, var(--ink) 22%, var(--paper)); }
.page[data-page="admin"] .admin-day[data-depth="2"] { background: color-mix(in oklab, var(--ink) 40%, var(--paper)); }
.page[data-page="admin"] .admin-day[data-depth="3"] { background: color-mix(in oklab, var(--ink) 58%, var(--paper)); }
.page[data-page="admin"] .admin-day[data-depth="4"] { background: color-mix(in oklab, var(--ink) 78%, var(--paper)); }
.page[data-page="admin"] .admin-day[data-depth="5"] { background: var(--ink); }
.page[data-page="admin"] .admin-refused { color: var(--bad); font-weight: 550; }
.page[data-page="admin"] .admin-job { color: var(--ink-3); font-size: 12.5px; }
.page[data-page="admin"] .panel > .note { margin-top: 10px; }

@media (max-width: 1099px) {
  .page[data-page="admin"] .admin-tallies { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page[data-page="admin"] .admin-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
}
@media (max-width: 899px) {
  .page[data-page="admin"] .admin-figures[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 32px; }
  .page[data-page="admin"] .admin-activity-body { grid-template-columns: minmax(0, 1fr); }
}
/* a phone: the steps down the page, the line beside them */
@media (max-width: 699px) {
  .page[data-page="admin"] .admin-figures[data-count="4"] { grid-template-columns: minmax(0, 1fr); }
  .page[data-page="admin"] .admin-tallies { grid-template-columns: minmax(0, 1fr); }
  .page[data-page="admin"] .admin-steps { grid-template-columns: minmax(0, 1fr); row-gap: 0; }
  .page[data-page="admin"] .admin-step-item { border-top: 0; border-left: 2px solid var(--rule-2); padding: 0 0 16px 18px; }
  .page[data-page="admin"] .admin-step-item[data-done="yes"] { border-left-color: var(--ink); }
  .page[data-page="admin"] .admin-step-item:last-child { padding-bottom: 0; }
  .page[data-page="admin"] .admin-step-mark { top: 4px; left: -6px; }
  .page[data-page="admin"] .admin-person-name { white-space: normal; overflow-wrap: anywhere; }
  /* the bars repeat the figures beside them: on a phone the figures keep the room */
  .page[data-page="admin"] .admin-funnel th.admin-step-bar, .page[data-page="admin"] .admin-funnel td.admin-step-bar { display: none; }
}
