:root {
  --ink: #1d1d1f;
  --muted: #5f6368;
  --line: #d0d4d9;
  --accent: #2f6f4f;
  --bg: #f6f7f8;
  --card: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); }
main { max-width: 1100px; margin: 0 auto; padding: 16px; }
h1 { margin: 8px 0 16px; }

.site-header { background: var(--accent); padding: 10px 16px; }
.site-name { color: #fff; font-weight: 700; text-decoration: none; }

.cards { list-style: none; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { display: block; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; color: inherit; text-decoration: none; }
.card span { display: block; color: var(--muted); margin-top: 4px; }

.month-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.month-form label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.month-form select, .month-form input, .month-form button, .button {
  font: inherit; font-size: 17px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.month-form input { width: 7em; }
.month-form button, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

.toolbar { display: flex; align-items: center; gap: 12px; }
.toolbar h1 { margin: 0; flex: 1; text-align: center; }
.toolbar .nav { font-size: 28px; text-decoration: none; color: var(--accent); padding: 4px 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 16px 0 8px; }
.button { text-decoration: none; cursor: pointer; }
.hint { text-align: center; color: var(--muted); font-size: 14px; margin: 0 0 16px; }

/* The on-screen preview is laid out at letter-landscape size to match the PDF. */
.sheet-frame { overflow: hidden; }
.sheet {
  width: 11in; height: 8.5in; padding: 0.25in; margin: 0 auto; overflow: hidden;
  background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
  display: grid; grid-template-columns: 0.6in minmax(0, 1fr);
}
/* Month and year run up the left side of the grid. */
.sheet-title {
  min-width: 0; overflow: visible; margin: 0; display: flex; align-items: center; justify-content: center;
  font-size: 34pt; line-height: 1; text-transform: uppercase; white-space: nowrap;
}
.sheet-title span { display: block; transform: rotate(-90deg); }
.month-grid { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; border: 2px solid #000; }
.month-grid th { height: 0.25in; font-size: 10pt; border: 1px solid #000; }
.month-grid td { border: 1px solid #000; vertical-align: top; padding: 0.03in 0.06in; }
.month-grid td.outside { background: #efefef; }
.day { font-weight: 700; font-size: 13pt; }

/* Printing the web page itself is not supported: browsers and iOS add their own
   margins and scaling and can split it across pages. Print uses the PDF instead,
   so a printed web page shows only a pointer to it. */
.print-only { display: none; }
@media print {
  .no-print { display: none !important; }
  .print-only { display: block; font-size: 14pt; }
}
