/* Printable match scoresheet: US Letter, black and white friendly */

:root {
  --ink: #111;
  --muted: #555;
  --rule: #222;
  --light: #bbb;
  --cloth: #183774;
  --display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: #e9edf0; color: var(--ink); }
body { font: 11pt/1.35 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }

.toolbar {
  max-width: 8.5in; margin: 0 auto; padding: 12px 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.toolbar a { color: var(--cloth); }
.toolbar button {
  font: 600 1rem/1 system-ui, sans-serif; padding: 12px 18px; border-radius: 8px; border: 0;
  background: var(--cloth); color: #fff; cursor: pointer;
}

.sheet {
  width: 8.5in; min-height: 11in; margin: 0 auto 24px; padding: 0.5in 0.55in;
  background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

.head { display: flex; justify-content: space-between; align-items: center;
        border-bottom: 3px solid var(--rule); padding-bottom: 6px; margin-bottom: 14px; }
h1 { font: 700 24pt/1 var(--display); margin: 0; }
.sub { margin: 4px 0 0; color: var(--muted); font-size: 10pt; }
.sheet-logo { height: 0.62in; width: auto; margin-right: 14px; }
.titles { flex: 1; }
.week { font: 700 16pt/1 var(--display); display: flex; align-items: flex-end; gap: 6px; }

.row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 18px; margin: 0 0 14px; }
.fill { flex: 1 1 0; display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.lbl { font-weight: 700; white-space: nowrap; }
.lbl.gap { margin-left: 18px; }
.blank { flex: 1; border-bottom: 1.5px solid var(--rule); min-height: 1.4em; padding: 0 4px; }
.blank.short { flex: none; width: .7in; text-align: center; }
.blank.name { font-size: 13pt; font-weight: 600; }
.opt { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.opt.grow { flex: 1; }
.opt.grow .blank { min-width: 1.5in; }
.box { display: inline-block; width: 14px; height: 14px; border: 1.5px solid var(--rule); border-radius: 2px; flex: none; }

.grid { width: 100%; border-collapse: collapse; margin: 6px 0 14px; table-layout: fixed; }
.grid th, .grid td { border: 1.5px solid var(--rule); text-align: center; vertical-align: middle; }
.grid thead th { font-size: 9pt; line-height: 1.15; padding: 4px 2px; background: #eee; }
.grid thead th.grp { font: 700 12pt/1.1 var(--display); background: #ddd; }
.grid .note { font-weight: 400; font-size: 8pt; color: var(--muted); }
.grid tbody td { height: 0.62in; }
.grid td.g { font: 700 18pt/1 var(--display); }
.grid tfoot th { font: 700 13pt/1 var(--display); background: #eee; }
.grid tfoot td { height: 0.55in; border-width: 2.5px; }
.grid tfoot td.shade { background: repeating-linear-gradient(45deg, #fff 0 6px, #eee 6px 8px); border-width: 1.5px; }
.c-game { width: 9%; } .c-pts { width: 15%; } .c-run { width: 11%; } .c-early { width: 11%; }

.rules { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; border: 1.5px solid var(--light);
         border-radius: 6px; padding: 10px 12px; margin-bottom: 22px; font-size: 8.8pt; line-height: 1.35; }
.rules h2 { font: 700 11.5pt/1.1 var(--display); margin: 0 0 4px; }
.rules p { margin: 0 0 4px; }

.signatures { margin-top: 10px; }
.signatures .blank { min-height: 2em; }
.hint { margin: -6px 0 10px; font-size: 9pt; color: var(--muted); }
.foot { margin-top: 18px; font-size: 9pt; color: var(--muted); border-top: 1px solid var(--light); padding-top: 8px; }

@media print {
  @page { size: letter; margin: 0; }
  html, body { background: #fff; }
  .toolbar { display: none; }
  .sheet { box-shadow: none; margin: 0; min-height: auto; }
  .grid thead th, .grid tfoot th, .grid tfoot td.shade { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media screen and (max-width: 8.6in) {
  .sheet { width: auto; min-height: auto; padding: 16px; }
  .rules { grid-template-columns: 1fr; }
}
