/* What the two calendar pages, /payday-calendar and /three-paycheck-months, add to style.css and tools.css (both
   loaded first). Colours are the site's tokens only, so the pages follow the site into dark mode and onto paper. */

/* A field the chosen schedule doesn't need, and a result that can't be worked out yet. Without this the site's
   `.tool label { display: grid }` would go on showing a hidden field. */
.tool [hidden] { display: none; }

/* One height for every field. A date field is a few pixels taller than a select left to itself, which lifts its
   label above its neighbours' in the row. */
.tool input, .tool select { height: 47px; }

/* The month-by-month table on /three-paycheck-months. It keeps its three columns on a phone, where the site's
   .table-scroll would turn every row into a card. */
.months { margin-top: 20px; border: 1px solid var(--card-line); border-radius: var(--radius); overflow: hidden; }
.doc .months table { min-width: 0; }
.doc .months td:last-child { white-space: nowrap; }
@media (max-width: 640px) {
  .doc .months th, .doc .months td { padding: 8px 10px; }
}
/* On a narrow phone the type steps down, so a weekly month's five paydays stay on one line. */
@media (max-width: 480px) {
  .doc .months th, .doc .months td { padding: 8px; font-size: 0.9rem; }
  .doc .months thead th { font-size: 0.98rem; }
}

/* A month of five weeks keeps the row height of the six-week month beside it, so the weeks line up across the year;
   left to stretch, its rows would grow to fill the taller month's height. */
.cal-year { align-items: start; }

/* A small heading inside the tool, over the list of paydays. */
.doc .tool h2 { font: 600 0.95rem/1.3 var(--sans); letter-spacing: 0; margin-top: 26px; padding-top: 0; }

/* Every payday in order, numbered, in as many columns as fit: three on a wide screen, one on a phone. A column is
   wide enough for "Wednesday, September 30" on one line. The room for the numbers is each line's own margin, not
   the list's padding, so a number stays inside its column (Safari cuts off what hangs outside one). */
.doc .paydays { columns: 14.7em; column-gap: 20px; margin-top: 10px; padding-left: 0; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.doc .paydays li { break-inside: avoid; margin: 0 0 0 2.1em; padding-block: 3px; }
.doc .paydays li::marker { color: var(--gold-ink); }

/* Under the result: one line that hands off to the app, then the other free tools. */
.tool .next { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--card-line); }
.tool .next + .next { margin-top: 8px; padding-top: 0; border-top: 0; }

/* On paper: the sheet's own title and the schedule in words, in place of the page's headline and form, then the
   answer and the year. The months are set larger than tools.css prints them, to use the sheet; the whole still ends
   well short of one US Letter page, so a longer answer or a browser's own header and footer can't push it onto two. */
@media print {
  .tool { margin-top: 0; }
  .sheet-title { font: 400 22pt/1.1 var(--serif); letter-spacing: -0.02em; }
  .doc .sheet-line { font-size: 10.5pt; margin-top: 3pt; color: var(--muted); }
  .tool .answer { margin-top: 10pt; }
  .cal-year { gap: 16pt 18pt; margin-top: 14pt; }
  .doc .cal-month caption { font-size: 11pt; padding-bottom: 3pt; }
  .doc .cal-month th, .doc .cal-month td { height: 20pt; font-size: 9pt; }
  .doc .cal-month thead th { height: 17pt; font-size: 7.5pt; }
  .doc .cal-month td > span:first-child { width: 15.5pt; height: 15.5pt; }
}
