/* ==========================================================================
   TeamTrek — one utilization rate, and the hours it is made of
   --------------------------------------------------------------------------
   The hero figure on the workforce utilization page: a single rate for the
   month, large, and underneath it the one bar that rate was divided out of,
   with the three kinds of hour in it called out by name.

   A ratio rather than a record. The pages in the tracking group draw what is
   happening -- a timer, a task, a client's month; the capacity page draws a
   month that has not happened yet. This page is about one number that
   somebody is going to be asked about, so the panel states the number and
   then takes it apart, because a rate with no denominator on the page is an
   assertion rather than a figure.

   1056 by 482, like every other hero figure on the site.
   ========================================================================== */

.rate {
  width: 100%; max-width: 66rem; margin-inline: auto;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-xl);
  background: #fff;
  /* Heavier than the shared shadow: the panel straddles the dark band and
     the dome, and a light shadow over the dark half disappears. */
  box-shadow: 0 30px 80px rgba(8, 40, 36, .28);
  text-align: left;
  display: flex; flex-direction: column;
}

/* ------------------------------------------------------------- the head */
.rate__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--neutral-200);
}
.rate__state {
  display: flex; align-items: center; gap: .5rem;
  font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--primary-700);
}
.rate__what { font-size: .9375rem; font-weight: 700; color: var(--neutral-900); }
.rate__who { font-size: .8125rem; color: var(--neutral-500); }
.rate__tracked {
  margin-left: auto;
  font-size: .8125rem; color: var(--neutral-500); font-variant-numeric: tabular-nums;
}
.rate__tracked b { font-weight: 800; color: var(--neutral-900); }

/* --------------------------------------------------------- the rate itself */
.rate__body {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 1rem 0;
}

.rate__figure { margin: 0; text-align: center; }
.rate__value {
  display: block;
  font-size: clamp(3rem, 6vw, 4.5rem); font-weight: 800; letter-spacing: -.04em;
  line-height: 1;
  color: var(--primary-700); font-variant-numeric: tabular-nums;
}
.rate__of {
  display: block; margin-top: .5rem;
  font-size: .9375rem; color: var(--neutral-600); font-variant-numeric: tabular-nums;
}

/* The bar the rate was divided out of. One track, three kinds of hour, in
   the order they are argued about: billable first, then the hours that were
   worked and are not billable, then the hours nobody worked. */
.rate__bar {
  display: flex; margin-top: 1.5rem; height: 2.5rem;
  border-radius: var(--r-sm);
  background: var(--neutral-100);
  box-shadow: inset 0 0 0 1px var(--neutral-150);
  overflow: hidden;
}
.rate__seg {
  display: block; height: 100%; width: var(--w, 0%);
  transition: width var(--dur-slow, 700ms) var(--ease-brand);
}
.rate__seg--billable { background: var(--primary-500); }
.rate__seg--internal { background: var(--primary-200); }
.rate__seg--idle { background: var(--neutral-200); }

/* The three shares, under the segment each one names. */
.rate__legend {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem; margin: 1.25rem 0 0; padding: 0; list-style: none;
}
.rate__item { margin: 0; }
.rate__key {
  display: flex; align-items: center; gap: .4375rem;
  font-size: .75rem; color: var(--neutral-600);
}
.rate__key i {
  display: block; width: .75rem; height: .75rem; flex: none;
  border-radius: 3px; background: var(--neutral-200);
}
.rate__item--billable .rate__key i { background: var(--primary-500); }
.rate__item--internal .rate__key i { background: var(--primary-200); }
.rate__hours {
  display: block; margin-top: .25rem;
  font-size: 1.125rem; font-weight: 800; color: var(--neutral-900);
  font-variant-numeric: tabular-nums;
}
.rate__share { display: block; font-size: .8125rem; color: var(--neutral-500); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- the foot */
.rate__foot {
  flex: none;
  margin: 0; padding-top: .875rem;
  border-top: 1px solid var(--neutral-200);
}
.rate__note {
  display: flex; align-items: center; gap: .5rem;
  font-size: .75rem; color: var(--neutral-500);
}
.rate__note .icon { flex: none; color: var(--neutral-400); }

/* ------------------------------------------------------------------ sizes */
@media (min-width: 860px) {
  /* The figure every other hero on the site carries. */
  .rate { height: 482px; }
}

@media (max-width: 859px) {
  .rate { padding: 1.125rem 1.25rem; }
  .rate__bar { height: 2rem; margin-top: 1.25rem; }
  .rate__legend { gap: .75rem; }
  .rate__hours { font-size: 1rem; }
}

@media (max-width: 599px) {
  .rate { padding: 1rem; }
  /* The three shares go under each other: at 90px a column cannot hold
     "688h" and the word that says what it is. */
  .rate__legend { grid-template-columns: minmax(0, 1fr); gap: .625rem; }
  .rate__item { display: flex; align-items: baseline; gap: .5rem; }
  .rate__key { flex: none; }
  .rate__hours { margin-top: 0; margin-left: auto; font-size: .9375rem; }
}

/* --------------------------------------------------------------------------
   The same month, team by team
   --------------------------------------------------------------------------
   Section 04's figure: the rate in the hero, divided the way a conversation
   about it actually goes -- which team is it, and is their mix different
   from everyone else's.

   Each team's bar is the full width of its own tracked hours, so the three
   rows compare mixes rather than sizes; the hours themselves are stated
   beside each bar, because otherwise a small team and a large one with the
   same mix would look identical.
   -------------------------------------------------------------------------- */
.mix {
  margin-top: 2.5rem; padding: 1.5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
}

.mix__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--neutral-150);
}
.mix__who { font-size: .9375rem; font-weight: 700; color: var(--neutral-900); }
.mix__who span { display: block; font-size: .75rem; font-weight: 400; color: var(--neutral-500); }
.mix__when { font-size: .8125rem; color: var(--neutral-500); }
.mix__rate {
  margin-left: auto;
  font-size: .8125rem; color: var(--neutral-500); font-variant-numeric: tabular-nums;
}
.mix__rate b { font-weight: 700; color: var(--neutral-900); }

.mix__rows { margin: .5rem 0 0; padding: 0; list-style: none; }
.mix__row {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr) 9rem;
  align-items: center; gap: 1rem;
  padding: 1rem 0;
}
.mix__row + .mix__row { border-top: 1px solid var(--neutral-150); }

.mix__name { font-size: .875rem; font-weight: 700; color: var(--neutral-900); }
.mix__name span { display: block; font-size: .75rem; font-weight: 400; color: var(--neutral-500); }

.mix__track {
  display: flex; height: 2.25rem;
  border-radius: var(--r-sm);
  background: var(--neutral-100);
  box-shadow: inset 0 0 0 1px var(--neutral-150);
  overflow: hidden;
}
.mix__seg { display: block; height: 100%; width: var(--w, 0%); }
.mix__seg--billable { background: var(--primary-500); }
.mix__seg--internal { background: var(--primary-200); }
.mix__seg--idle { background: var(--neutral-200); }

.mix__out { text-align: right; }
.mix__out b {
  display: block;
  font-size: 1rem; font-weight: 800; color: var(--neutral-900);
  font-variant-numeric: tabular-nums;
}
.mix__out span { display: block; font-size: .75rem; color: var(--neutral-500); font-variant-numeric: tabular-nums; }

/* The three figures the three rows add up to. */
.mix__sums {
  margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 1px solid var(--neutral-200);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.mix__sum { margin: 0; }
.mix__sum b {
  display: block;
  font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--neutral-900); font-variant-numeric: tabular-nums;
}
.mix__sum span { display: block; margin-top: .125rem; font-size: .8125rem; color: var(--neutral-500); }
.mix__sum--key b { color: var(--primary-700); }

@media (max-width: 859px) {
  .mix { padding: 1.25rem; }
  .mix__row { grid-template-columns: 7rem minmax(0, 1fr) 8rem; gap: .75rem; }
  .mix__sums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .875rem 1rem; }
  .mix__sum b { font-size: 1.125rem; }
}

@media (max-width: 599px) {
  .mix { padding: 1rem; }
  /* The team and its two figures. The mix is stated in the row. */
  .mix__row { grid-template-columns: minmax(0, 1fr) 7.5rem; }
  .mix__track { display: none; }
}

/* --------------------------------------------------------------------------
   Section 10's headline, in two lines at the shared size
   --------------------------------------------------------------------------
   This page's closing line is the longest on the site, and the shared panel
   sets it in four lines, which reads as a paragraph rather than a line. It
   is held at display-2's own 56px, like every other closing headline, so
   the only things that can give are where the line breaks and how wide the
   headline is allowed to be: 44rem cannot hold either half, 66rem holds
   both.

   The break falls mid-sentence, after "all run on", because that is the
   only split of this sentence whose two halves both fit the panel at 1280px
   -- 991px and 944px of 1008px. Breaking at the full stop would ask for
   1386px, and breaking a word earlier leaves a second line of 1034px.

   Below 1280px the panel is narrower than the second half needs, so the
   break is dropped and the sentence wraps on its own.
   -------------------------------------------------------------------------- */
.cta-panel__title { max-width: 66rem; }
.cta-panel__title br { display: none; }

@media (min-width: 1280px) {
  .cta-panel__title br { display: inline; }
}
