/* ==========================================================================
   TeamTrek — the evidence figures
   --------------------------------------------------------------------------
   Section three of every industry page asks the same three questions and
   shows one figure above them. This file holds the figures that are not the
   comparison bars in page.css, so a page can pick the shape that fits the
   question it is actually asking:

     .dumb    a dumbbell: last period and this one as two points on one
              line, with the distance between them as the reading. For a
              page whose argument is change.

     .strip   a heat strip: one row per subject, one cell per period, weight
              for hours. For a page whose argument is that the same record
              reads over any period.

     .estact--split  a split table: the same rows, counted two ways and
              totalled. For a page whose argument is that two kinds of hour
              exist and both are recorded. (The frame it borrows, .estact,
              lives in page.css.)

   A page loads this sheet only if it uses one of them.
   ========================================================================== */

/* ==========================================================================
   The dumbbell
   --------------------------------------------------------------------------
   Two bars side by side make a reader measure the difference themselves. A
   dumbbell draws the difference: the old figure, the new one, and the line
   between them. Growth runs right, a fall runs left, and the length is the
   size of the change.
   ========================================================================== */
.dumb {
  margin-top: 2.5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
}

.dumb__head,
.dumb__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) 9rem 4.5rem;
  align-items: center; gap: 1.25rem;
  padding: .875rem 1.25rem;
}
.dumb__head {
  border-bottom: 1px solid var(--neutral-200);
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--neutral-500);
}
.dumb__row { border-bottom: 1px solid var(--neutral-150); }
.dumb__row:last-child { border-bottom: 0; }

.dumb__name { font-size: .875rem; color: var(--neutral-500); min-width: 0; }
.dumb__name b { display: block; font-size: .9375rem; color: var(--neutral-900); }

/* The track the two points sit on. Both are positioned from the same
   scale, so a row's distance is comparable with every other row's. */
.dumb__track {
  position: relative;
  height: 20px;
}
.dumb__track::before {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1px; margin-top: -.5px;
  background: var(--neutral-150);
}

/* The line between the two points is the reading. It is drawn from the
   smaller value to the larger one, whichever way round they are. */
.dumb__link {
  position: absolute; top: 50%;
  left: var(--from, 0%); width: calc(var(--to, 0%) - var(--from, 0%));
  height: 3px; margin-top: -1.5px;
  border-radius: var(--r-pill);
  background: var(--primary-300);
}
.dumb__row--down .dumb__link { background: var(--neutral-300); }

.dumb__pt {
  position: absolute; top: 50%;
  left: var(--at, 0%);
  width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
}
/* Last period is hollow, this period is solid: the filled point is the one
   the sentence is about. */
.dumb__pt--was {
  background: #fff;
  box-shadow: inset 0 0 0 2px var(--neutral-300);
}
.dumb__pt--now { background: var(--primary-600); }
.dumb__row--down .dumb__pt--now { background: var(--neutral-500); }

.dumb__hours {
  text-align: right;
  font-size: .8125rem; color: var(--neutral-500);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.dumb__hours b { color: var(--neutral-900); }

.dumb__delta {
  text-align: right;
  font-size: .875rem; font-weight: 700; color: var(--primary-700);
  font-variant-numeric: tabular-nums;
}
.dumb__row--down .dumb__delta { color: var(--neutral-600); }

/* The key, under the rows rather than floating beside the heading. */
.dumb__foot {
  display: flex; align-items: center; gap: 1rem;
  padding: .625rem 1.25rem;
  border-top: 1px solid var(--neutral-150);
  background: var(--neutral-25);
  font-size: .6875rem; color: var(--neutral-500);
}
.dumb__key { display: inline-flex; align-items: center; gap: .375rem; }
.dumb__key i {
  width: 11px; height: 11px; border-radius: 50%;
  background: #fff; box-shadow: inset 0 0 0 2px var(--neutral-300);
}
.dumb__key--now i { background: var(--primary-600); box-shadow: none; }

@media (max-width: 859px) {
  .dumb__head { display: none; }
  .dumb__row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: .625rem;
  }
  .dumb__track { grid-column: 1 / -1; }
  .dumb__hours { grid-column: 1; text-align: left; }
  .dumb__delta { grid-column: 2; }
}

/* ==========================================================================
   The period row
   --------------------------------------------------------------------------
   Part of the illustration, not a control. The claim it carries is that the
   same record reads over any period; the figure under it shows one of them.
   Six buttons that cannot change anything would be a trap, so there are no
   buttons.
   ========================================================================== */
.estper {
  display: flex; flex-wrap: wrap; gap: .25rem;
  margin: 0; padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--neutral-200);
  background: var(--neutral-25);
}
.estper span {
  padding: .25rem .625rem;
  border-radius: var(--r-pill);
  font-size: .75rem; font-weight: 600; color: var(--neutral-500);
}
.estper .is-on { background: var(--primary-600); color: #fff; }

/* ==========================================================================
   The heat strip
   --------------------------------------------------------------------------
   A page whose claim is that the same record reads over any period should
   show more than one period. Bars show two. This shows six: a row per
   subject, a cell per month, weight for hours -- so a workstream that has
   been climbing since the spring is a shape rather than a percentage.

   The last column is this month, and it carries the outline, because that
   is the period the three questions underneath are about.
   ========================================================================== */
.strip {
  margin-top: 2.5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
}
.strip__inner { padding: 1.25rem; }

.strip__head,
.strip__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) repeat(var(--periods, 6), minmax(0, 1fr)) 9rem;
  align-items: center; gap: 4px;
}
.strip__head {
  margin-bottom: .5rem;
  font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--neutral-500);
}
.strip__head span { text-align: center; }
.strip__head span:first-child,
.strip__head span:last-child { text-align: left; }
.strip__head span:last-child { text-align: right; }
.strip__head .is-now { color: var(--primary-700); }

.strip__row { margin-bottom: 4px; }
.strip__row:last-child { margin-bottom: 0; }

.strip__name { font-size: .875rem; color: var(--neutral-500); min-width: 0; padding-right: .75rem; }
.strip__name b { display: block; font-size: .9375rem; color: var(--neutral-900); }

/* One subject in one month. Five weights of one hue: five colours would be
   a map, and this is a reading. */
.strip__cell {
  height: 38px;
  border-radius: var(--r-xs);
  background: var(--neutral-100);
}
.strip__cell[data-v="1"] { background: var(--primary-100); }
.strip__cell[data-v="2"] { background: var(--primary-200); }
.strip__cell[data-v="3"] { background: var(--primary-400); }
.strip__cell[data-v="4"] { background: var(--primary-600); }
.strip__cell.is-now { box-shadow: inset 0 0 0 2px var(--primary-700); }

.strip__hours {
  text-align: right;
  font-size: .8125rem; color: var(--neutral-500);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  padding-left: .75rem;
}
.strip__hours b { color: var(--neutral-900); }

.strip__foot {
  display: flex; align-items: center; gap: .75rem;
  padding: .625rem 1.25rem;
  border-top: 1px solid var(--neutral-150);
  background: var(--neutral-25);
  font-size: .6875rem; color: var(--neutral-500);
}
.strip__scale { display: flex; align-items: center; gap: 3px; }
.strip__scale i { width: 20px; height: 10px; border-radius: 2px; background: var(--neutral-100); }
.strip__scale i:nth-child(2) { background: var(--primary-100); }
.strip__scale i:nth-child(3) { background: var(--primary-200); }
.strip__scale i:nth-child(4) { background: var(--primary-400); }
.strip__scale i:nth-child(5) { background: var(--primary-600); }
.strip__note { margin-left: auto; }

@media (max-width: 859px) {
  .strip__inner { padding: 1rem; }
  .strip__head,
  .strip__row { grid-template-columns: minmax(0, 1fr) repeat(var(--periods, 6), minmax(0, 1fr)); }
  .strip__cell { height: 28px; }
  /* The total moves under its own row rather than squeezing the months. */
  .strip__hours { grid-column: 1 / -1; text-align: left; padding: .25rem 0 .5rem; }
}

/* ==========================================================================
   The split table
   --------------------------------------------------------------------------
   For a page whose argument is that one figure is really two or three: what
   was rostered against what was tracked, or what was tracked at the desk
   against what was added by hand. Four text columns and no bars, because a
   bar chart of one against the other reads as a judgement about which of
   them is better, and the section is only saying that both are recorded.

   It borrows .estact for its frame, which lives in page.css, and replaces
   the grid.
   ========================================================================== */
.estact--split .estact__head,
.estact--split .estact__row {
  grid-template-columns: minmax(0, 1fr) 7rem 7rem 7rem;
  gap: 1rem;
}
.estact--split .estact__head span + span,
.estact--split .estact__num { text-align: right; }

/* A group header inside the table: client work, then internal work. */
.estact__group {
  margin: 0;
  padding: .625rem 1.25rem;
  border-bottom: 1px solid var(--neutral-150);
  background: var(--neutral-25);
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--neutral-500);
}

.estact__num {
  font-size: .875rem; color: var(--neutral-600);
  font-variant-numeric: tabular-nums;
}
.estact__num--tot { font-weight: 700; color: var(--neutral-900); }
/* A column the page wants read as a gap rather than as a quantity. */
.estact__num--gap { color: var(--neutral-500); }

@media (max-width: 859px) {
  .estact--split .estact__head { display: none; }
  .estact--split .estact__row {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: .75rem;
  }
}

/* ==========================================================================
   One height for section three
   --------------------------------------------------------------------------
   The same 235px the bars in page.css hold, and for the same reason: the
   six industry pages should agree with each other and with the product
   pages' day strip. Below 860px the figures reflow and take their own
   height again.
   ========================================================================== */
@media (min-width: 860px) {

  /* ------------------------------------------------------- the dumbbell */
  .dumb {
    height: 235px; overflow: hidden;
    display: flex; flex-direction: column;
  }
  .dumb__head { flex: 0 0 auto; }
  .dumb__row { flex: 1 1 auto; }
  .dumb__head { padding-block: .625rem; }
  .dumb__row { padding-block: .5rem; }
  .dumb__name { font-size: .8125rem; }
  .dumb__name b { display: inline; margin-right: .375rem; font-size: .875rem; }
  .dumb__track { height: 18px; }
  .dumb__pt { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }
  .dumb__hours { font-size: .75rem; }
  .dumb__delta { font-size: .8125rem; }
  .dumb__foot { padding-block: .25rem; font-size: .625rem; }

  /* ----------------------------------------------------- the heat strip */
  .strip {
    height: 235px; overflow: hidden;
    display: flex; flex-direction: column;
  }
  .strip__inner { flex: 1 1 auto; display: flex; flex-direction: column; }
  .strip__head { flex: 0 0 auto; }
  .strip__row { flex: 1 1 auto; align-items: stretch; }
  .strip__name,
  .strip__hours { align-self: center; }
  .strip__inner { padding: 1rem 1.25rem; }
  .strip__head { margin-bottom: .375rem; }
  .strip__row { margin-bottom: 4px; }
  .strip__name {
    font-size: .8125rem;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .strip__name b { display: inline; font-size: .875rem; }
  /* The subtitle comes off at this height. The row name identifies the
     workstream on its own, and the sentence under the figure still carries
     what each one covers. Kept below 860px, where there is room. */
  .strip__sub { display: none; }
  .strip__cell { height: 38px; }
  .strip__hours { font-size: .75rem; }
  /* The scale key is the one thing this figure gives up for the height.
     What it said -- that shading is per row and the hours are exact -- is
     said in the section's own footnote instead, where it still has to be
     read before the figures are believed. */
  .strip__foot { display: none; }
}

/* ==========================================================================
   The periods, above the figure
   --------------------------------------------------------------------------
   One quiet line rather than a band inside the card. It still says that the
   same record reads over a day, a week, a quarter or a year, and still
   marks the one the figure below is showing -- but it does it in the space
   a sentence takes, not the space a row takes.
   ========================================================================== */
.estperiods {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .375rem;
  margin: 2rem 0 -1.25rem;
  font-size: .75rem; color: var(--neutral-500);
}
.estperiods b { font-weight: 700; color: var(--primary-700); }
.estperiods i { font-style: normal; color: var(--neutral-300); }

/* ==========================================================================
   The trend
   --------------------------------------------------------------------------
   Six periods as a line rather than six cells. It carries the same claim
   the heat strip did -- that the record reads over any period -- and it
   exists because the healthcare page already has a grid of cells in its
   hero. Two grids on one page read as the same figure twice, however
   different their axes are.

   A line also says something cells cannot: the shape of the movement. A
   workstream climbing steadily and one that jumped last month look
   different here and identical in a row of weights.
   ========================================================================== */
.trend {
  margin-top: 2.5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
}

.trend__head,
.trend__row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) 9rem 4.5rem;
  align-items: center; gap: 1.25rem;
  padding: .625rem 1.25rem;
}
.trend__head {
  border-bottom: 1px solid var(--neutral-200);
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--neutral-500);
}
.trend__row { border-bottom: 1px solid var(--neutral-150); }
.trend__row:last-child { border-bottom: 0; }

.trend__name { font-size: .8125rem; color: var(--neutral-500); min-width: 0; }
.trend__name b { font-size: .875rem; color: var(--neutral-900); margin-right: .375rem; }

/* The line itself. Drawn as an SVG so the shape is the data rather than a
   row of boxes approximating it; the viewBox is 100x30 on every row, so
   two rows' shapes are comparable even though their hours are not. */
.trend__line { display: block; width: 100%; height: 30px; overflow: visible; }
.trend__path {
  fill: none;
  stroke: var(--primary-500); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.trend__row--down .trend__path { stroke: var(--neutral-400); }
/* The last point is this period, which is the one the questions underneath
   are about. */
/* The slot is wider than the viewBox on a big screen and narrower on a
   small one, so the dots are told to ignore the scaling they sit in. */
.trend__dot,
.trend__start { vector-effect: non-scaling-size; }
.trend__dot { fill: var(--primary-600); }
.trend__row--down .trend__dot { fill: var(--neutral-500); }
/* The first point, so a reader can see which end the line starts at. */
.trend__start { fill: #fff; stroke: var(--neutral-300); stroke-width: 2; }

.trend__hours {
  text-align: right;
  font-size: .75rem; color: var(--neutral-500);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.trend__hours b { font-size: .8125rem; color: var(--neutral-900); }

.trend__delta {
  text-align: right;
  font-size: .8125rem; font-weight: 700; color: var(--primary-700);
  font-variant-numeric: tabular-nums;
}
.trend__row--down .trend__delta { color: var(--neutral-600); }

@media (min-width: 860px) {
  .trend {
    height: 235px; overflow: hidden;
    display: flex; flex-direction: column;
  }
  .trend__head { flex: 0 0 auto; padding-block: .5rem; }
  /* 24px of line, not 30: four rows and a head have 235px between them. */
  .trend__row { flex: 1 1 auto; padding-block: .25rem; }
  .trend__line { height: 24px; }
}

@media (max-width: 859px) {
  .trend__head { display: none; }
  .trend__row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: .5rem;
  }
  .trend__line { grid-column: 1 / -1; }
  .trend__hours { grid-column: 1; text-align: left; }
  .trend__delta { grid-column: 2; }
}

/* ==========================================================================
   The figures on a phone
   --------------------------------------------------------------------------
   Same floor as the panels: nothing under 12px.
   ========================================================================== */
@media (max-width: 599px) {
  .estperiods { font-size: .8125rem; margin-bottom: -1rem; }
  .dumb__head,
  .trend__head { font-size: .75rem; }
  .dumb__hours,
  .dumb__delta,
  .trend__hours,
  .trend__delta { font-size: .8125rem; }
  .dumb__foot,
  .strip__foot { font-size: .75rem; }
  .strip__name,
  .trend__name { font-size: .8125rem; }
  /* This sheet loads after page.css, so the floor for the split table's
     group headers has to be set here or its own rule wins. */
  .estact__group { font-size: .75rem; }
}

/* ==========================================================================
   The figures on a phone
   --------------------------------------------------------------------------
   Same floor as the panels: nothing under 12px.
   ========================================================================== */
@media (max-width: 599px) {
  .estperiods { font-size: .8125rem; margin-bottom: -1rem; }
  .dumb__head,
  .trend__head { font-size: .75rem; }
  .dumb__hours,
  .dumb__delta,
  .trend__hours,
  .trend__delta { font-size: .8125rem; }
  .dumb__foot,
  .strip__foot { font-size: .75rem; }
  .strip__name,
  .trend__name { font-size: .8125rem; }
  /* This sheet loads after page.css, so the floor for the split table's
     group headers has to be set here or its own rule wins. */
  .estact__group { font-size: .75rem; }
}

/* ==========================================================================
   The week ribbon
   --------------------------------------------------------------------------
   One track per person, running Monday to Friday, cut into five segments
   whose widths are that day's hours. The drawing carries two readings at
   once: how uneven a single week is, and -- because every track is the same
   length and every total lands in the same place -- how close the four
   weeks are to each other.

   There are no markers for where a day was worked. That is the section's
   claim rather than an omission: the panel in the hero already shows which
   desk each day happened at.
   ========================================================================== */
.ribbon {
  margin-top: 2.5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
}

/* The days sit in the same three columns as a row, so a label lands over
   the track it names rather than over the card. */
.ribbon__head,
.ribbon__row {
  display: grid;
  grid-template-columns: 8rem minmax(0, 1fr) 5rem;
  gap: 1rem;
  align-items: center;
  padding: .5rem 1.25rem;
}
.ribbon__head {
  border-bottom: 1px solid var(--neutral-200);
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--neutral-500);
}
.ribbon__head span:last-child { text-align: right; }

/* The five day labels, spread across the track they belong to. */
.ribbon__days {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
  text-align: center;
}

.ribbon__row { border-bottom: 1px solid var(--neutral-150); }
.ribbon__row:last-child { border-bottom: 0; }

.ribbon__who { min-width: 0; font-size: .8125rem; color: var(--neutral-500); }
.ribbon__who b { display: block; font-size: .875rem; color: var(--neutral-900); }

/* The track. Every one is the same length, so two rows are comparable even
   though the segments inside them are not the same widths. */
.ribbon__track {
  display: flex; gap: 2px;
  height: 22px;
  border-radius: var(--r-xs);
  overflow: hidden;
}

/* One day. The width is the share of that person's week the day took, and
   the weight is how long the day was against a full one -- so a short
   Friday is both narrower and lighter than a full Wednesday. */
.ribbon__day {
  flex: var(--w, 1) 1 0;
  min-width: 2px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 2px;
  background: var(--primary-200);
  font-size: .625rem; font-weight: 700; color: var(--primary-900);
  white-space: nowrap; overflow: hidden;
  transition: background-color var(--dur-ui) var(--ease-ui);
}
.ribbon__day--full { background: var(--primary-500); color: #fff; }
.ribbon__day--long { background: var(--primary-400); color: var(--primary-900); }
.ribbon__day--short { background: var(--primary-100); }

.ribbon__sum {
  text-align: right;
  font-size: .875rem; font-weight: 700; color: var(--neutral-900);
  font-variant-numeric: tabular-nums;
}

/* The team's week, under the rows rather than as one more of them. */
.ribbon__foot {
  display: flex; align-items: center; gap: 1rem;
  padding: .5rem 1.25rem;
  border-top: 1px solid var(--neutral-200);
  background: var(--neutral-25);
  font-size: .6875rem; color: var(--neutral-500);
}
.ribbon__foot b { color: var(--neutral-900); font-variant-numeric: tabular-nums; }
.ribbon__peak { margin-left: auto; }

@media (min-width: 860px) {
  .ribbon {
    height: 235px; overflow: hidden;
    display: flex; flex-direction: column;
  }
  .ribbon__head,
  .ribbon__foot { flex: 0 0 auto; padding-block: .375rem; }
  .ribbon__row { flex: 1 1 auto; padding-block: .25rem; }
  /* The name and what they were on share a line here: stacked, the four
     rows plus the head and the foot came to 280px in a 235px card. */
  .ribbon__who b { display: inline; margin-right: .375rem; font-size: .8125rem; }
  .ribbon__who { font-size: .75rem; }
  .ribbon__track { height: 20px; }
}

@media (max-width: 859px) {
  .ribbon__head,
  .ribbon__row {
    grid-template-columns: minmax(0, 1fr) 5rem;
    row-gap: .375rem;
  }
  /* The head keeps only its day labels, spread across the full width the
     tracks below it use. Left in the two-column grid, "Person" took the
     first column, the days took the second, and "Week" dropped onto a line
     of its own -- which is how Monday ended up off the figure. */
  .ribbon__head {
    display: block;
    padding-block: .375rem;
  }
  .ribbon__head > span:not(.ribbon__days) { display: none; }
  .ribbon__days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 2px; }

  .ribbon__track { grid-column: 1 / -1; grid-row: 2; }
  .ribbon__who { grid-row: 1; }
  .ribbon__sum { grid-row: 1; }
  .ribbon__foot { flex-wrap: wrap; gap: .25rem .75rem; }
  .ribbon__peak { margin-left: 0; flex: 1 0 100%; }
}

@media (max-width: 599px) {
  .ribbon__head,
  .ribbon__row { padding-inline: .875rem; }
  .ribbon__who b { font-size: .8125rem; }
  .ribbon__day { font-size: 0; }
  .ribbon__foot { padding-inline: .875rem; font-size: .75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ribbon__day { transition: none; }
}

/* ==========================================================================
   The session table
   --------------------------------------------------------------------------
   The on-site page's evidence figure. Five columns: the person, when their
   session ran, and then tracked, idle and manual time side by side.

   Not a chart. The three kinds of time are different evidence -- one is
   measured, one is a gap, one is typed in by hand -- and drawing them on a
   shared scale would merge exactly what the section keeps apart. Each gap
   carries the note the person wrote beside it, under the figure.
   ========================================================================== */
.estact--sessions .estact__head,
.estact--sessions .estact__row {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 1rem;
  align-items: start;
}
.estact--sessions .estact__head span + span,
.estact--sessions .estact__num { text-align: left; }
.estact--sessions .estact__name { align-self: center; }

/* The note under a value, in the person's own words. */
.estact__note {
  display: block; margin-top: .125rem;
  font-size: .75rem; font-style: normal; font-weight: 400;
  color: var(--neutral-500);
}
/* No idle time, or none added by hand. A dash would read as missing data;
   the word says the day had none. */
.estact__num--none { color: var(--neutral-400); }

/* Five rows of two lines each in the shared 235px: the session table runs
   tighter than the other figures because every cell is two lines, not one. */
@media (min-width: 860px) {
  .estact--sessions .estact__head { padding-block: .375rem; }
  .estact--sessions .estact__row { padding-block: .25rem; }
  .estact--sessions .estact__note { margin-top: 0; font-size: .6875rem; }
}

@media (max-width: 859px) {
  .estact--sessions .estact__head { display: none; }
  /* Two equal columns, so a label sits over its own value whatever the
     value happens to be. An auto column sized itself to the longest cell
     in the row and moved the second pair about from row to row. */
  .estact--sessions .estact__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: .5rem;
  }
  .estact--sessions .estact__name { grid-column: 1 / -1; }
  .estact--sessions .estact__num { text-align: left; }
}

/* The head is dropped below 860px, so each cell names itself from its own
   data-label. The figures are also written out in full in the sr-only
   sentence under the table, so nothing depends on generated content. */
@media (max-width: 859px) {
  .estact--sessions .estact__num::before {
    content: attr(data-label);
    display: block;
    font-size: .75rem; font-weight: 400; letter-spacing: .04em;
    text-transform: uppercase; color: var(--neutral-400);
  }
}

/* ==========================================================================
   The policy table
   --------------------------------------------------------------------------
   The enterprise page's evidence figure. Four kinds of data, what each is
   kept for, who may read it, and what the person it is about can do.

   Nothing in it is a quantity, so nothing in it is a bar. A retention
   period drawn as a length would invite a reader to compare 30 days with
   24 months as if shorter were worse, and the table is only stating the
   policy.
   ========================================================================== */
.estact--policy .estact__head,
.estact--policy .estact__row {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr) minmax(0, 1.2fr) minmax(0, 1.1fr);
  gap: 1rem;
}
.estact--policy .estact__head span + span,
.estact--policy .estact__num { text-align: left; }

@media (max-width: 859px) {
  .estact--policy .estact__head { display: none; }
  .estact--policy .estact__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: .5rem;
  }
  .estact--policy .estact__name { grid-column: 1 / -1; }
  .estact--policy .estact__num::before {
    content: attr(data-label);
    display: block;
    font-size: .75rem; font-weight: 400; letter-spacing: .04em;
    text-transform: uppercase; color: var(--neutral-400);
  }
}

/* On a phone the two columns are 140px each, which is two or three words
   a line and a row four lines deep. One column, one cell under the next. */
@media (max-width: 599px) {
  .estact--policy .estact__row {
    grid-template-columns: minmax(0, 1fr);
    row-gap: .75rem;
  }
  .estact--policy .estact__name {
    padding-bottom: .625rem;
    border-bottom: 1px solid var(--neutral-150);
  }
}

/* ==========================================================================
   The roles table
   --------------------------------------------------------------------------
   The enterprise page's evidence figure. One week of hours, read by each of
   the four roles the hero matrix carries.

   Nothing in it is drawn: 1,184h and 34h are not two quantities to compare,
   they are the same week seen from two places, and a bar beside each would
   read as one role doing more work than another.
   ========================================================================== */
.estact--roles .estact__head,
.estact--roles .estact__row {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 8rem;
  gap: 1rem;
}
.estact--roles .estact__head span + span { text-align: left; }
.estact--roles .estact__head span:last-child,
.estact--roles .estact__num--tot { text-align: right; }

@media (max-width: 859px) {
  .estact--roles .estact__head { display: none; }
  .estact--roles .estact__row {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: .375rem;
  }
  .estact--roles .estact__name { grid-column: 1 / -1; }
  .estact--roles .estact__num::before {
    content: attr(data-label);
    display: block;
    font-size: .75rem; font-weight: 400; letter-spacing: .04em;
    text-transform: uppercase; color: var(--neutral-400);
  }
  .estact--roles .estact__num--tot { text-align: right; }
}

/* ==========================================================================
   The teams table
   --------------------------------------------------------------------------
   The small-business page's evidence figure: every team in the company,
   with its people, its projects and its week.

   Three rows, and three is the whole company rather than a top three. That
   it fits on one card is the page's argument, so the figure is not drawn as
   a chart with an "other" bar at the end.
   ========================================================================== */
.estact--teams .estact__head,
.estact--teams .estact__row {
  grid-template-columns: minmax(0, 1.6fr) 7rem 7rem 8rem;
  gap: 1rem;
}
.estact--teams .estact__head span + span,
.estact--teams .estact__num { text-align: right; }

@media (max-width: 859px) {
  .estact--teams .estact__head { display: none; }
  .estact--teams .estact__row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: .5rem;
  }
  .estact--teams .estact__name { grid-column: 1 / -1; }
  .estact--teams .estact__num { text-align: left; }
  .estact--teams .estact__num::before {
    content: attr(data-label);
    display: block;
    font-size: .75rem; font-weight: 400; letter-spacing: .04em;
    text-transform: uppercase; color: var(--neutral-400);
  }
}

/* ==========================================================================
   The client matrix
   --------------------------------------------------------------------------
   The small-business page's evidence figure: clients down the side, people
   across, and a month of hours where the two meet.

   It is a matrix rather than a chart because the section asks two questions
   at once -- which client took the hours, and who gave them. A bar chart
   answers one and loses the other.

   Internal work sits below a rule. It is the one row that will never appear
   on an invoice, and the figure says so by position rather than by colour.

   It does not borrow .estact: that frame is built for a name column and
   right-aligned figures, and this is six even columns.
   ========================================================================== */
.matx {
  margin-top: 2.5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
  overflow: hidden;
}

.matx__head,
.matx__row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(5, minmax(0, 1fr));
  align-items: center; gap: 1rem;
  padding: .625rem 1.25rem;
}
.matx__head {
  border-bottom: 1px solid var(--neutral-200);
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--neutral-500);
}
.matx__head span + span { text-align: right; }
.matx__row { border-bottom: 1px solid var(--neutral-150); }
.matx__row:last-child { border-bottom: 0; }

/* The row that will never be invoiced, and the row that adds the rest up. */
.matx__row--internal { border-top: 1px solid var(--neutral-200); }
.matx__row--total { background: var(--neutral-25); }

.matx__name { font-size: .8125rem; color: var(--neutral-500); min-width: 0; }
.matx__name b {
  display: inline; margin-right: .375rem;
  font-size: .875rem; font-weight: 700; color: var(--neutral-900);
}

.matx__num {
  text-align: right;
  font-size: .8125rem; color: var(--neutral-600);
  font-variant-numeric: tabular-nums;
}
.matx__num--tot { font-weight: 700; color: var(--neutral-900); }
/* A client this person did not work for. The nought is kept rather than
   blanked, because a blank cell reads as missing data. */
.matx__num--zero { color: var(--neutral-300); }

/* The same 235px every other evidence figure holds. Six rows and a head
   fit by sharing what the head leaves. */
@media (min-width: 860px) {
  .matx {
    height: 235px; overflow: hidden;
    display: flex; flex-direction: column;
  }
  .matx__head { flex: 0 0 auto; padding-block: .5rem; }
  .matx__row { flex: 1 1 auto; padding-block: .25rem; }
}

@media (max-width: 859px) {
  .matx__head { display: none; }
  /* Four people across is unreadable on a narrow screen, so each cell
     names its own person and the row becomes a small block. */
  .matx__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: .5rem;
  }
  .matx__name { grid-column: 1 / -1; }
  .matx__num { text-align: left; }
  .matx__num::before {
    content: attr(data-label);
    display: block;
    font-size: .75rem; font-weight: 400; letter-spacing: .04em;
    text-transform: uppercase; color: var(--neutral-400);
  }
}

@media (max-width: 599px) {
  .matx__head,
  .matx__row { padding-inline: .875rem; }
  .matx__name { font-size: .8125rem; }
  .matx__num { font-size: .8125rem; }
}

/* ==========================================================================
   The performance table
   --------------------------------------------------------------------------
   The project-performance page's evidence figure: five projects with what
   each was estimated at, what it took, the difference, and how much of it
   was rework.

   Five columns rather than the policy table's four, and the last three are
   figures, so they line up on their last digit the way a column of numbers
   has to.
   ========================================================================== */
.estact--perf .estact__head,
.estact--perf .estact__row {
  grid-template-columns: minmax(0, 1.4fr) 7rem 7rem 9rem 6rem;
  gap: 1rem;
}
.estact--perf .estact__head span + span,
.estact--perf .estact__num { text-align: right; }

@media (max-width: 859px) {
  .estact--perf .estact__head { display: none; }
  .estact--perf .estact__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: .5rem;
  }
  .estact--perf .estact__name { grid-column: 1 / -1; }
  .estact--perf .estact__num { text-align: left; }
  .estact--perf .estact__num::before {
    content: attr(data-label);
    display: block;
    font-size: .75rem; font-weight: 400; letter-spacing: .04em;
    text-transform: uppercase; color: var(--neutral-400);
  }
}

/* Five rows and a head in the catalogue's 235px: the performance table
   carries one row more than the policy table, so it runs tighter to hold
   the same height. */
@media (min-width: 860px) {
  .estact--perf .estact__head { padding-block: .5rem; }
  .estact--perf .estact__row { padding-block: .3125rem; }
}

/* ==========================================================================
   The origins table
   --------------------------------------------------------------------------
   The complete-records page's structure figure: the five ways an hour can
   reach the record, what happens to each, and what it carries with it.

   The same four columns as the policy table and one row more, so it runs a
   little tighter to hold the catalogue's height.
   ========================================================================== */
.estact--origin .estact__head,
.estact--origin .estact__row {
  grid-template-columns: minmax(0, 1.2fr) 7rem minmax(0, 1.2fr) minmax(0, 1.3fr);
  gap: 1rem;
}
.estact--origin .estact__head span + span,
.estact--origin .estact__num { text-align: left; }
.estact--origin .estact__head span:nth-child(2),
.estact--origin .estact__num--tot { text-align: right; }

@media (min-width: 860px) {
  .estact--origin .estact__head { padding-block: .5rem; }
  .estact--origin .estact__row { padding-block: .3125rem; }
}

@media (max-width: 859px) {
  .estact--origin .estact__head { display: none; }
  .estact--origin .estact__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    row-gap: .5rem;
  }
  .estact--origin .estact__name { grid-column: 1 / -1; }
  .estact--origin .estact__num--tot { text-align: left; }
  .estact--origin .estact__num::before {
    content: attr(data-label);
    display: block;
    font-size: .75rem; font-weight: 400; letter-spacing: .04em;
    text-transform: uppercase; color: var(--neutral-400);
  }
}
