/* A page's title row (CLAUDE.md, "Page layout"): the title on the left and its subtitle, a short line such as
   "5 affiliates", on the right of the same row in a white pill (in capitals, spaced like a bar's title), never under it.
   <header class="title-row"><h1>Tracking</h1><p class="title-row__note">5 affiliates</p></header> */
.title-row {
  display: flex;
  align-items: center; /* the pill sits on the title's middle */
  justify-content: space-between;
  gap: var(--sp-3);
  min-width: 0;
}

.title-row h1 {
  min-width: 0;
}

.title-row .title-row__note { /* two classes: beats a page's own subtitle style (dashboard__hello p) */
  flex: none;
  margin: 0;
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--fs-xxs); /* phones 10px, 11px from 576px (like a bar's title) */
  line-height: var(--lh-heading);
  letter-spacing: var(--tracking-caps); /* small capitals, like a bar's title (.box__title) */
  text-transform: uppercase;
  color: var(--c-text);
  background-color: var(--c-page);
  border: var(--border-1) solid var(--c-line);
  border-radius: var(--radius-pill);
}

/* A page's main box (CLAUDE.md, "Page layout"), the same on every page:
   1. its first row, an anthracite bar (.box__bar) always --bar-h high (48px; the box's corners --radius-4, 16px), its name on the left (.box__title) and
      what it is filtered by on the right (the month and its arrows on Tracking), 16px in from the box's sides on every page
      (Christopher, 2026-11-26), so the title never moves from one page to the next;
   2. a grey toolbar under it, when the page has one (.box__toolbar: Partners' search), its sides 16px too, lining up with the bar;
   3. its content (.box__body), whose own boxes have a lighter title bar (the pale grey band, instead of anthracite).
   The box reaches down to the bottom of the screen and grows with its content (its page gives it the space left).
   <div class="box">
     <div class="box__bar"><h2 class="box__title"><i class="bi bi-..." aria-hidden="true"></i> Overview</h2> ...</div>
     <div class="box__body"><section class="dashboard__tile"><header class="dashboard__head">...</header>...</section></div>
   </div> */
.box {
  overflow: clip;
  background-color: var(--c-page);
  border: var(--border-1) solid var(--c-line);
  border-radius: var(--radius-4); /* 16px: its bar's top corners follow it */
}

.box__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  height: var(--bar-h);
  padding-inline: var(--sp-4);
  color: var(--c-page);
  background-color: var(--c-anthracite);
}

.box__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2); /* its icon, then its name */
  font-family: inherit;
  font-size: var(--fs-small); /* 13.3px on phones, 12.8px from 768px, in the 48px bar (agreed 2026-11-25) */
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: inherit;
}

.box__title .bi {
  font-size: var(--fs-lead); /* its icon a step bigger: 19.2px on phones, 20px from 768px */
}

.box__body {
  display: grid;
  align-content: start;
  gap: var(--sp-5);
  padding: var(--sp-4);
}

/* The grey toolbar under the bar (Earnings' sections, Partners' search). */
.box__toolbar {
  padding: var(--sp-3) var(--sp-4);
  background-color: var(--c-surface);
  border-bottom: var(--border-1) solid var(--c-line);
}

/* The boxes inside: a lighter title bar. Its A–Z / Sales choice shows the chosen one in anthracite. */
.box__body .dashboard__head {
  color: var(--c-text);
  background-color: var(--c-surface);
  border-bottom: var(--border-1) solid var(--c-line);
}

.box__body .dashboard__sort :checked + span {
  color: var(--c-page);
  background-color: var(--c-anthracite);
}

.box__body .dashboard__sort :focus-visible + span {
  outline-color: var(--c-anthracite);
}

@media (min-width: 576px) {
  .title-row .title-row__note {
    font-size: var(--fs-xs);
  }
}

@media (min-width: 768px) {
  .box__body {
    padding: var(--sp-6);
  }
}
