/* Trueread Noir: what the feature screens share, on top of the shell (app.css, portal-a.css, portal-b.css).
   Linked from the head of every venue page (forecast, a day, roster, kitchen prep, events, accuracy, estimated
   savings, sales data, settings), the account page and the admin pages, after the shell's files.
   The brand is brand/noir/README.md in the Trueread repo; colours, type and motion come from noir-tokens.css.

   - (01) labels: a page's sections are numbered in order, "(01)" in Red Hat Mono beside each heading, by a CSS
     counter, so a section that is left out doesn't leave a gap. The numbers are decoration (the empty alt text
     keeps them out of what a screen reader says).
   - (Check) notes: a caution is a sentence after the label "(Check)", in a firmer rim. No dot, no amber and no red:
     amber is a reading.
   - Signed figures: a change against usual carries its sign, in Sodium above usual and Mercury below, and the
     words beside it say busier or quieter, so the colour is never the only clue. */

/* ---------------------------------------------------------------- (01) labels on section headings */
.content { counter-reset: fs-section; }
.content :is(.section:not(.roster-day), .figures) > .section-head > h2 { counter-increment: fs-section; }
.content :is(.section:not(.roster-day), .figures) > .section-head > h2::before {
  content: "(" counter(fs-section, decimal-leading-zero) ")";
  content: "(" counter(fs-section, decimal-leading-zero) ")" / "";
  display: inline-block; min-width: 36px; margin-right: 12px;
  font: var(--tr-label); letter-spacing: .02em; color: var(--tr-text-2); vertical-align: 1px; }

/* On a phone the note beside a section heading drops under it and starts at the left, on every feature screen. */
@media (max-width: 520px) {
  .content .section-head .aside { margin-left: 0; }
}

/* ---------------------------------------------------------------- (Check) notes */
/* <p class="note check"><span class="note-label">(Check)</span> The sentence.</p>, and "(Done)" in .note.done for
   all clear (the sign-in pages say it the same way). */
.note:is(.check, .done) { padding-left: 16px; }
.note.check { border-color: var(--tr-field-edge); }
.note:is(.check, .done)::before { content: none; }
.content > .note:is(.check, .done) { padding-left: var(--pad); }
.note-label { margin-right: 8px; font: var(--tr-label); letter-spacing: .02em; color: var(--tr-text-2); white-space: nowrap; }

/* ---------------------------------------------------------------- status marks */
/* Sales arriving, a forecast run, a report: done is a White tick before the words; a problem has "(Check)" before
   them; anything else (running, waiting) a small Smoke square. No green and no red, and never a round dot, which is
   a reading's. The words always say the state. */
.content .tag.mark::before { width: 6px; height: 6px; border-radius: 0; background: var(--tr-text-2); }
.content .tag.mark:is(.good, .bad) { color: var(--tr-text); }
.content .tag.mark.good::before { width: 10px; height: 5px; margin: 0 1px 3px; background: none; border: solid var(--tr-text); border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.content .tag.mark.bad::before { content: "(Check)"; content: "(Check)" / ""; width: auto; height: auto; background: none;
  font: var(--tr-label); letter-spacing: .02em; color: var(--tr-text-2); }

/* ---------------------------------------------------------------- signed figures */
/* In a row, a column or a tag a signed figure is Red Hat Mono; inside a sentence it stays in Mona Sans (the kit's
   figure rule). Its colour is the shell's .busier and .quieter. */
.content :is(td, th, .tag, .wk, .acton-change, .update-when, .since) .change { font-family: var(--tr-font-mono); font-weight: 400; letter-spacing: 0; }

/* ---------------------------------------------------------------- estimated savings: the period switch */
/* Day, week, month, year: one segmented control; the period you are on is the White one. */
.page-savings .jump.periods { gap: 0; }
.page-savings .jump.periods a { border-radius: 0; }
.page-savings .jump.periods a:first-child { border-radius: var(--tr-radius) 0 0 var(--tr-radius); }
.page-savings .jump.periods a:last-child { border-radius: 0 var(--tr-radius) var(--tr-radius) 0; }
.page-savings .jump.periods a + a { margin-left: -1px; }
.page-savings .jump.periods a[aria-current] { position: relative; background: var(--tr-primary); border-color: var(--tr-primary); color: var(--tr-on-primary); }

/* ---------------------------------------------------------------- estimated savings: the chart by period */
/* No reading colours here: a saving is not busier or quieter. A period above the zero line (the plain four week
   average) is a solid Silver bar; one where the average did better hangs below the line as a Silver outline, and
   the table under the chart gives it a minus sign. */
.page-savings .savechart { font-family: var(--tr-font-mono); font-size: 11px; line-height: 14px; color: var(--tr-text-2); }
.page-savings .savechart-plot::after { background: var(--tr-line-strong); }
.page-savings .savechart-col i { width: min(100%, 20px); border-radius: 0; background: var(--tr-text-body); }
.page-savings .savechart-col i.is-below { background: transparent; box-shadow: inset 0 0 0 1px var(--tr-text-body); }
.page-savings .savechart-col:hover i { background: var(--tr-text); }
.page-savings .savechart-col:hover i.is-below { background: transparent; box-shadow: inset 0 0 0 1px var(--tr-text); }

/* ---------------------------------------------------------------- sales data: the connections */
/* Three ways in (Square, the emailed report, other tills), ruled one under the other inside the section rather than
   boxed: a card never holds a card. Each status is a mark (above). */
.page-data .section-body > .tile { border: 0; border-top: 1px solid var(--tr-line-strong); }
.page-data .section-body > .tile > .section-head { padding: 16px 0 0; }
.page-data .section-body > .tile > .section-body { padding-left: 0; padding-right: 0; }
.page-data .section-body > .tile > details.more summary { padding-left: 0; padding-right: 0; }
.page-data .section-body > .tile > details.more > .section-body { padding-left: 0; padding-right: 0; }
.page-data .tile > .section-head h3 { font-size: 16px; line-height: 24px; font-weight: 500; color: var(--tr-text); }
.page-data .tile ol.prose { padding-left: 20px; }
.page-data .tile ol.prose li + li { margin-top: 4px; }
.page-data .tile ol.prose li::marker { font-family: var(--tr-font-mono); font-size: 12px; color: var(--tr-text-2); }

@media (forced-colors: active) {
  .page-savings .savechart-col i { background: CanvasText; }
  .page-savings .savechart-col i.is-below { background: Canvas; border: 1px solid CanvasText; }
}
