/* Monthly calendar, the sheets: one per month, landscape Letter by default,
   A4 under html.a4 (the runtime swaps the @page rule). Six rows always, so
   every month is the same height and twelve printed sheets line up. Colors
   only through --t-* so a theme is a set of variables; rules are element
   borders so they print as lines. Static font instances only. */

@font-face { font-family: "Fraunces"; src: url("/assets/fonts/fraunces-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: block; }
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/intertight-400.woff2") format("woff2"); font-weight: 400; font-display: block; }
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/intertight-500.woff2") format("woff2"); font-weight: 500; font-display: block; }

@page { size: Letter landscape; margin: 0; }

:root { --t-paper: #ffffff; --t-ink: #1a1a1a; --t-accent: #8f2d2d; --t-muted: #6b7078; }
html, body { margin: 0; padding: 0; background: #fff; }
[hidden] { display: none !important; }

.sheet {
  width: 11in; height: 8.5in; padding: 0.5in 0.5in 0.6in; box-sizing: border-box; position: relative; overflow: hidden;
  background: var(--t-paper); color: var(--t-ink);
  font: 400 10pt/1.4 "Inter Tight", system-ui, sans-serif;
  display: flex; flex-direction: column; gap: 0.14in;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
  break-after: page; page-break-after: always;
  --line: color-mix(in srgb, var(--t-muted) 45%, transparent);
}
.sheet:last-child { break-after: auto; page-break-after: auto; }
html.a4 .sheet { width: 297mm; height: 210mm; }

/* Header: the month and the year at the left; the header text and the two small months at the right. */
.head { flex: none; display: flex; justify-content: space-between; align-items: flex-end; gap: 0.3in; border-bottom: 1.5pt solid var(--t-accent); padding-bottom: 0.08in; min-height: 0.9in; }
.mtitle { display: flex; align-items: baseline; gap: 0.14in; white-space: nowrap; }
.mname { font: 500 30pt/1.2 "Fraunces", Georgia, serif; letter-spacing: -0.005em; color: var(--t-ink); }
.myear { font: 500 15pt/1.2 "Fraunces", Georgia, serif; color: var(--t-accent); }
.hright { display: flex; flex-direction: column; align-items: flex-end; gap: 0.08in; min-width: 0; }
.htext { font: 500 8.5pt/1.4 "Inter Tight", system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t-muted); white-space: nowrap; overflow: hidden; max-width: 3.4in; height: 1.4em; }
.minis { display: flex; gap: 0.22in; }
.mini { width: 1.35in; }
.mini .mn { display: block; font: 500 6.5pt/1.3 "Inter Tight", system-ui, sans-serif; letter-spacing: 0.1em; text-transform: uppercase; color: var(--t-muted); margin-bottom: 2pt; white-space: nowrap; }
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mgrid i { display: block; font: 400 6pt/1.55 "Inter Tight", system-ui, sans-serif; font-style: normal; text-align: center; color: var(--t-ink); }

/* The month: weekday row, six rows of seven, and the notes column beside it. */
.main { flex: 1; min-height: 0; display: flex; gap: 0.26in; }
.cal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dow { flex: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1pt solid var(--t-accent); }
.dow span { font: 500 7.5pt/1 "Inter Tight", system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t-muted); padding: 0 0 4pt 4pt; }
.cells { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: repeat(6, minmax(0, 1fr)); }
.cell { min-width: 0; min-height: 0; overflow: hidden; padding: 3pt 4pt; border-right: 0.5pt solid var(--line); border-bottom: 0.5pt solid var(--line); display: flex; flex-direction: column; }
/* nth-of-type, not nth-child: the <template> the cells are cloned from is the container's first child and would be counted. */
.cell:nth-of-type(7n) { border-right: 0; }
.cell .num { font: 500 11pt/1 "Fraunces", Georgia, serif; color: var(--t-ink); }
.cell .hol { font: 400 6.5pt/1.25 "Inter Tight", system-ui, sans-serif; color: var(--t-accent); margin-top: 2pt; white-space: nowrap; overflow: hidden; }
.notes { flex: none; width: 1.75in; display: flex; flex-direction: column; }
.notes .label { flex: none; font: 500 7.5pt/1 "Inter Tight", system-ui, sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: var(--t-muted); padding: 0 0 4pt; border-bottom: 1pt solid var(--t-accent); }
.notes .rules { flex: 1; display: flex; flex-direction: column; }
.notes .rules i { display: block; flex: 1; border-bottom: 0.5pt solid var(--line); }

/* The foot: the free version's credit line and the one-inch mark. */
.foot { position: absolute; left: 0.5in; right: 0.5in; bottom: 0.42in; font-size: 7.5pt; color: var(--t-muted); display: flex; justify-content: space-between; align-items: flex-end; }
.ruler { width: 1in; border-top: 0.5pt solid var(--t-muted); font-size: 6.5pt; color: var(--t-muted); text-align: center; line-height: 1.6; }
