/* /california-overtime-calculator/ page layer: loaded after tools.css, tokens only. */
@media (max-width: 760px) {
  .t-top { margin: var(--space-3) 0 var(--space-3); }
  .t-top .lead { font-size: var(--fs-body-sm); line-height: var(--lh-snug); margin-bottom: 0; }
  #example { padding-block: 0; padding-right: 0; }
}
.t-top .lead { text-wrap: pretty; }
.t-example { flex-wrap: wrap; row-gap: 0; }

/* fields */
.input-group > .pre { display: flex; align-items: center; padding-inline: var(--space-3) 0; color: var(--muted); font-family: var(--font-mono); }
#rate { padding-inline-start: var(--space-1); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-variant-numeric: tabular-nums; }
#weekStart { width: 100%; }
#fStart { max-width: 16em; }

/* the seven days: name and tag on the left, hours on the right, the day's split underneath */
.days { display: grid; gap: var(--space-2); min-width: 0; }
.day-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 8em); gap: var(--space-1) var(--space-3); align-items: start; padding: var(--space-2) var(--space-3); border: var(--border-w) solid var(--border); border-radius: var(--radius-md); min-width: 0; }
.day-row:has([aria-invalid=true]) { border-color: var(--invalid-bd); }
.day-head { display: flex; flex-direction: column; justify-content: center; gap: var(--space-1); min-width: 0; min-height: var(--control-h); }
.day-name { color: var(--text); font-size: var(--fs-body-sm); font-weight: var(--fw-semibold); line-height: var(--lh-snug); }
.day-tag { color: var(--muted); font-size: var(--fs-xs); line-height: var(--lh-snug); overflow-wrap: anywhere; }
.day-tag[hidden], .day-fig[hidden], .day-row > .t-err[hidden] { display: none; }
.day-in { min-width: 0; }
.day-in input { font-variant-numeric: tabular-nums; }
.day-row .echo { min-height: 0; }
.day-row .echo:empty { display: none; }
.day-fig { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); min-width: 0; }
.fig { display: grid; gap: 0; min-width: 0; }
.fig > .cap { color: var(--muted); font-size: var(--fs-xs); font-weight: var(--fw-bold); letter-spacing: var(--tracking-caps); text-transform: uppercase; }
.fig > .num { font-family: var(--font-mono); font-size: var(--fs-body-sm); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.day-row > .t-err { grid-column: 1 / -1; }
@media (max-width: 359px) {
  .day-row { grid-template-columns: minmax(0, 1fr); }
  .day-head { min-height: 0; }
  .day-fig { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fig { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-2); }
}
@media (min-width: 761px) {
  .day-row { grid-template-columns: minmax(0, 1fr) minmax(0, 8em) minmax(0, 2fr); align-items: center; }
  .day-fig { grid-column: auto; }
  .day-row > .t-err { grid-column: 1 / -1; }
}
#notSure { width: 100%; white-space: normal; }
.t-review { display: grid; gap: var(--space-2); min-width: 0; }
.t-review > p { margin: 0; }
#review[hidden] { display: none; }
#review { align-items: flex-start; }

/* result */
.t-result .t-row.t-total { border-top: 0; }
.t-pay { display: flex; flex-direction: column; gap: var(--space-3); margin-top: var(--space-1); padding-top: var(--space-3); border-top: var(--border-w) solid var(--rule-total); min-width: 0; }
.t-pay[hidden] { display: none; }
#math { font-family: var(--font-mono); }
.t-result.is-review :is(.t-big, .t-line) { color: var(--muted); font-weight: var(--fw-semibold); }
#outGross, #payReg, #payOt, #payDt { min-width: 0; overflow-wrap: anywhere; }

/* compare and the list under it */
.t-chart.t-compare { max-width: var(--compare-max); }
.t-chart + p { margin-top: var(--space-3); }
.t-compare .data-grid td.n { font-variant-numeric: tabular-nums; }
#not-fit { margin-top: var(--space-5); scroll-margin-top: var(--space-5); }
.t-notfit { margin: var(--space-2) 0 0; padding-inline-start: var(--space-5); max-width: var(--compare-max); }
.t-notfit > li { padding-block: var(--space-1); }

/* sources (same block as /overtime-pay-calculator/) */
section.side-block > .section-head { margin-bottom: var(--space-3); }
.t-checked { display: inline-flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.t-checked > .icon { color: var(--ok); }
.t-sources { list-style: none; margin: 0; padding: 0; max-width: var(--compare-max); border-top: var(--border-w) solid var(--border); counter-reset: src; }
.t-sources > li { counter-increment: src; display: grid; grid-template-columns: var(--space-6) minmax(0, 1fr); align-items: baseline; border-bottom: var(--border-w) solid var(--border); }
.t-sources > li::before { content: counter(src); color: var(--muted); font-family: var(--font-mono); font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }
.t-sources a {
  display: block; min-height: var(--tap); padding-block: var(--space-3); line-height: var(--lh-snug);
  color: var(--accent-ink); font-weight: var(--fw-medium); text-decoration: underline; text-decoration-color: var(--accent-bd);
  text-underline-offset: 3px; overflow-wrap: anywhere;
}
@media (min-width: 1024px) { section.side-block > .section-head { margin-bottom: 0; } .t-sources { max-width: none; } }
@media (hover: hover) { .t-sources a:hover { text-decoration-color: currentColor; } }

/* largest text: a gross of eight digits must still fit the card */
@container result (max-width: 20em) {
  #outGross { font-size: var(--fs-lg); white-space: normal; overflow-wrap: anywhere; }
}
