/* ------------------------------------------------------------------
   The A6 card. 105mm x 148mm - a quarter of A4, which is the size that
   slips into a yardage-book cover. These rules apply on screen too, so
   the matrix screen can show a true-size preview of what will print.
   ------------------------------------------------------------------ */

#print-root { display: none; }

.card-a6 {
  width: 105mm;
  height: 148mm;
  flex: none;
  padding: 6mm 6mm 5mm;
  background: #fff;
  color: #000;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Preview-only chrome so the card reads as a card on screen. */
.preview-wrap .card-a6 {
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.a6-head {
  border-bottom: 1.2pt solid #000;
  padding-bottom: 1.6mm;
  margin-bottom: 2mm;
}
.a6-title {
  font-size: 11pt;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.1;
}
.a6-sub {
  margin-top: 1mm;
  font-size: 6.5pt;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #444;
  display: flex;
  justify-content: space-between;
  gap: 4mm;
}

.a6-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 8pt;
  table-layout: fixed;
}
.a6-table col.c { width: 17mm; }
.a6-table col.v { width: auto; }
.a6-table col.d { width: 20mm; }

.a6-table th {
  font-size: 5.8pt;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #555;
  font-weight: 600;
  text-align: left;
  padding: 0 0 .8mm;
  border-bottom: .5pt solid #999;
}
.a6-table th.d { text-align: right; }

.a6-table td {
  padding: .8mm 0;
  border-bottom: .4pt solid #d8d8d8;
  line-height: 1.15;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.a6-table td.c { font-weight: 700; }
.a6-table td.v { color: #333; padding-left: 1mm; }
.a6-table td.d {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* First row of each club gets a heavier rule above it. */
.a6-table tr.grp td { border-top: .9pt solid #000; }
.a6-table tr.grp:first-child td { border-top: 0; }

.a6-foot {
  margin-top: auto;
  padding-top: 1.5mm;
  border-top: .5pt solid #999;
  font-size: 5.8pt;
  letter-spacing: .05em;
  color: #555;
  display: flex;
  justify-content: space-between;
  gap: 3mm;
}

/* ---------- printing ---------- */
@media print {
  .topbar,
  .steps,
  .screen,
  .actionbar,
  .preview-wrap { display: none !important; }

  html, body {
    background: #fff !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  #print-root { display: block; }

  .card-a6 {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .card-a6:last-child { break-after: auto; page-break-after: auto; }

  /* Four A6 cards on one A4 sheet: cut along the dashed guides. */
  body.print-a4 #print-root {
    display: flex;
    flex-wrap: wrap;
    width: 210mm;
    align-content: flex-start;
  }
  body.print-a4 .card-a6 {
    break-after: auto;
    page-break-after: auto;
    outline: .3pt dashed #bbb;
    outline-offset: -.15pt;
  }

  .a6-table td { border-bottom-color: #ccc; }

  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
