/* /secret-santa-rules-for-work only. Loaded after styles/site.css; use its tokens. See docs/WRITERS.md. */

/* Table text is ours, not typed names: wrap at spaces only, never mid-word. */
.page-body table th, .page-body table td { overflow-wrap: normal; word-break: normal; }

/* ---------- the four-week plan ---------- */
.planner .table-wrap { margin: 0.25rem 0 0.75rem; }
.page-body .plan-table { background: var(--field); }
.plan-table th, .plan-table td.dcol { overflow-wrap: normal; word-break: normal; }
.plan-table th[scope="row"] { width: 22%; white-space: nowrap; }
.plan-table td.dcol { width: 22%; font-weight: 600; color: var(--cran); }
.plan-help { margin: 0.6rem 0 0; }
.optional-t { font-weight: 400; color: var(--muted); }
@media (max-width: 559px) {
  .plan-table th[scope="row"] { white-space: normal; }
  .plan-table th, .plan-table td { padding: 9px 8px; }
}
/* With scripting off there are no dates to count: the plan reads as weeks. */
@media (scripting: none) {
  .plan-fields, .plan-table .dcol, #wp-ics, .plan-help { display: none; }
}

/* ---------- the office rules sheet (same sheet as /secret-santa-rules) ---------- */
.sheet-fields .help { margin: 0.5rem 0 0; }
.sheet {
  margin-top: 1.25rem; padding: 22px 18px 18px;
  background: var(--field); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 3px;
  box-shadow: 0 1px 0 var(--edge);
}
@media (min-width: 560px) { .sheet { padding: 30px 32px 24px; } }
.sheet-group {
  margin: 0; text-align: center; color: var(--muted);
  font-variant-caps: all-small-caps; letter-spacing: 0.12em; font-weight: 600; font-size: 1.05rem;
}
.sheet-title {
  margin: 0 0 1rem; padding-bottom: 0.7rem; text-align: center;
  font: 600 clamp(1.6rem, 6vw, 2.1rem)/1.1 var(--serif); letter-spacing: -0.01em;
  border-bottom: 1px solid var(--gold);
}
.sheet-facts { margin: 0 0 1.1rem; display: grid; grid-template-columns: 1fr; gap: 0 24px; }
@media (min-width: 560px) { .sheet-facts { grid-template-columns: 1fr 1fr; } }
.sheet-facts > div { display: flex; align-items: baseline; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.sheet-facts dt { flex: none; color: var(--muted); font-weight: 600; font-size: 0.95rem; font-variant-caps: all-small-caps; letter-spacing: 0.08em; }
.sheet-facts dd { margin: 0; min-width: 0; flex: 1 1 auto; font-weight: 600; }
.fill:empty::before { content: "\00a0"; }

/* Dos and don'ts: two columns, a line per pair. */
.page-body .dos { background: none; border: 0; border-radius: 0; font-size: 0.97rem; }
.dos th, .dos td { width: 50%; padding: 8px 10px 8px 0; }
.dos td + td, .dos th + th { padding-left: 12px; border-left: 1px solid var(--line); }
.dos thead th {
  font: 600 1.15rem/1.2 var(--serif); letter-spacing: 0; font-variant-caps: normal;
  color: var(--accent); border-bottom: 1px solid var(--gold);
}
.dos thead th + th { color: var(--cran); }
.dos tbody td { border-bottom: 1px solid var(--line); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dos thead th:first-child { color: var(--link); }
}
:root[data-theme="dark"] .dos thead th:first-child { color: var(--link); }
.sheet-foot { margin: 1.1rem 0 0; padding-top: 0.6rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; text-align: center; }

@media (scripting: none) {
  .sheet-fields { display: none; }
  .sheet { margin-top: 0; }
}

@media print {
  @page { margin: 14mm; }
  .sheet { break-inside: avoid; border: 1px solid #999; box-shadow: none; }
  .plan-table td.dcol { color: #000; }
  body.print-sheet .page-head,
  body.print-sheet .page-body > :not(#office-sheet),
  body.print-sheet #office-sheet > :not(.sheet) { display: none !important; }
  body.print-sheet .page-body { padding: 0; }
  body.print-sheet #office-sheet { margin: 0; padding: 0; border: 0; background: none; }
  body.print-sheet .sheet { margin: 0; padding: 0; border: 0; font-size: 12.5pt; line-height: 1.4; }
  body.print-sheet .sheet-group { font-size: 13pt; }
  body.print-sheet .sheet-title { font-size: 30pt; margin-bottom: 14pt; padding-bottom: 9pt; }
  body.print-sheet .sheet-facts { grid-template-columns: 1fr 1fr; margin-bottom: 16pt; }
  body.print-sheet .sheet-facts > div { padding: 8pt 0; }
  body.print-sheet .dos { font-size: 12.5pt; }
  body.print-sheet .dos thead th { font-size: 16pt; color: #000; }
  body.print-sheet .dos th, body.print-sheet .dos td { padding-top: 7pt; padding-bottom: 7pt; }
  body.print-sheet .sheet-foot { margin-top: 20pt; font-size: 10pt; }
}
