/* What the free tools add to the site's stylesheet (style.css, loaded first): a year of small month calendars,
   buttons inside a tool, and how a tool prints. Colours are the site's tokens, so Dusk comes along in dark mode;
   printing sets them to ink on white. No colour goes straight into a rule here except in the print block. */

/* Read aloud, not shown. */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* A field the chosen schedule doesn't need. Without this the site's rule for a tool's labels would still show it. */
.tool [hidden] { display: none; }

/* Sixteen pixels in a field, or an iPhone zooms the page when the field is tapped. */
.tool input, .tool select { font-size: 1rem; }

/* Buttons inside a tool: the filled one for the main action, .quiet for the rest. */
.tool .actions { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-top: 20px; }
.tool button { font: 600 0.95rem/1 var(--sans); color: var(--bg); background: var(--ink); border: 1px solid var(--ink); border-radius: 10px; padding: 0 16px; min-height: 44px; cursor: pointer; }
.tool button:hover { background: var(--ink-hover); border-color: var(--ink-hover); }
.tool button.quiet { color: var(--ink); background: transparent; border-color: var(--card-line); }
.tool button.quiet:hover { background: var(--wash); border-color: var(--card-line); }
.tool button:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

/* A year of month calendars: four across, three on a tablet, two on a phone. */
.cal-year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 24px 20px; margin-top: 22px; }
@media (max-width: 900px) { .cal-year { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cal-year { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; } }

/* One month. The .doc prefix outranks the site's table rules (padding, row lines, the 480px floor). */
.doc .cal-month { border-collapse: collapse; width: 100%; min-width: 0; table-layout: fixed; }
.doc .cal-month caption { text-align: left; font: 600 0.95rem/1.3 var(--sans); padding: 0 0 6px 4px; }
.doc .cal-month caption small { font-weight: 600; font-size: 0.78rem; color: var(--gold-ink); margin-left: 4px; }
.doc .cal-month th, .doc .cal-month td { padding: 0; border: 0; height: 28px; text-align: center; vertical-align: middle; font: 400 0.8rem/1 var(--sans); font-variant-numeric: tabular-nums; }
.doc .cal-month thead th { font: 500 0.7rem/1 var(--sans); color: var(--quiet); height: 22px; }
.doc .cal-month td > span:first-child { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; border: 1.5px solid transparent; }
/* A payday: a ring and a wash, so it still shows when a printer leaves backgrounds out. */
.doc .cal-month td.payday > span:first-child { border-color: var(--gold-ink); background: var(--gold-soft); font-weight: 700; }
.doc .cal-month.extra caption { color: var(--gold-ink); }

/* On a phone the card gives up some padding and the days get smaller; a narrow phone gets one month across. */
@media (max-width: 640px) {
  .tool { padding: 18px 14px; }
  .doc .cal-month th, .doc .cal-month td { height: 25px; font-size: 0.74rem; }
  .doc .cal-month td > span:first-child { width: 21px; height: 21px; }
}
@media (max-width: 460px) {
  .cal-year { gap: 18px 10px; }
  .doc .cal-month caption { font-size: 0.86rem; padding-left: 2px; }
  .doc .cal-month caption small { display: block; margin-left: 0; }
  .doc .cal-month th, .doc .cal-month td { height: 22px; font-size: 0.68rem; }
  .doc .cal-month td > span:first-child { width: 19px; height: 19px; border-width: 1px; }
}

/* Shown only on paper: the line that says what the sheet is and where it came from. */
.print-only { display: none; }

@media print {
  :root {
    --bg: #fff; --bg-2: #fff; --card: #fff; --card-line: #b5b5b5; --ink: #000; --muted: #2b2b2b; --quiet: #444;
    --green: #000; --green-soft: #fff; --gold: #000; --gold-ink: #000; --gold-soft: #fff; --wash: transparent;
    color-scheme: light;
  }
  @page { size: letter; margin: 0.5in; }
  html, body { background: #fff; }
  .site-header, .site-footer, .cta, .no-print, .tool form, .tool .actions, .tool .note { display: none !important; }
  .print-only { display: block; }
  .doc { padding: 0; }
  .doc .wrap { max-width: none; padding: 0; }
  .doc h1 { font-size: 22pt; }
  .doc .lede { font-size: 11pt; margin-top: 6pt; }
  .tool { border: 0; border-radius: 0; padding: 0; margin-top: 10pt; background: none; }
  .tool .answer { font-size: 13pt; margin-top: 0; }
  .table-scroll { overflow: visible; border-radius: 0; }
  a { color: inherit; text-decoration: none; }
  .cal-year { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14pt 16pt; margin-top: 12pt; }
  .doc .cal-month th, .doc .cal-month td { height: 17pt; font-size: 8.5pt; }
  .doc .cal-month td > span:first-child { width: 15pt; height: 15pt; }
  .cal-month, .keep { break-inside: avoid; }
  .print-only.sheet-foot { margin-top: 14pt; padding-top: 6pt; border-top: 0.75pt solid #000; font: 400 8.5pt/1.4 var(--sans); color: #000; }
}
