:root {
  --amber: #f9b03b;
  --ink: #080808;
  --paper: #ffffff;
  --muted: #66645f;
  --line: #d8d5ce;
}

* {
  box-sizing: border-box;
}

html {
  background: #d9d9d9;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  margin: 0;
  color: var(--ink);
  background: #d9d9d9;
  font-size: 10pt;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.print-toolbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.print-toolbar a,
.print-toolbar button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--amber);
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  line-height: 40px;
  text-decoration: none;
  cursor: pointer;
}

.print-toolbar a {
  color: #fff;
}

.print-toolbar button {
  color: var(--ink);
  background: var(--amber);
}

.roster-document {
  width: 210mm;
  min-height: 297mm;
  margin: 24px auto;
  padding: 13mm;
  background: var(--paper);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.18);
}

.roster-table {
  width: 100%;
  border-collapse: collapse;
}

.roster-table th,
.roster-table td {
  padding: 0;
  text-align: left;
  vertical-align: top;
}

.document-header {
  display: grid;
  grid-template-columns: 35mm minmax(0, 1fr) auto;
  align-items: center;
  gap: 7mm;
  padding-bottom: 5mm;
  border-bottom: 1.4mm solid var(--amber);
}

.document-header img {
  width: auto;
  height: 18mm;
  max-width: 34mm;
}

.document-header__title p {
  margin: 0 0 1mm;
  color: var(--muted);
  font-size: 7pt;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.document-header h1 {
  margin: 0;
  font-size: 18pt;
  letter-spacing: -0.035em;
  line-height: 1;
  text-transform: uppercase;
}

.document-header h1 span {
  display: block;
}

.document-header__contact {
  display: grid;
  justify-items: end;
  gap: 1mm;
  margin: 0;
  font-size: 7.5pt;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.roster-group-heading td {
  padding: 8mm 0 2.5mm;
}

.roster-group-heading div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5mm;
}

.roster-group-heading h2 {
  margin: 0;
  font-size: 16pt;
  letter-spacing: -0.04em;
  text-transform: uppercase;
}

.roster-position-heading {
  break-after: avoid;
  page-break-after: avoid;
}

.roster-position-heading td {
  padding: 0 0 1.8mm;
}

.roster-position-heading div {
  display: flex;
  align-items: center;
  gap: 3mm;
  padding: 4.5mm 0 0 3mm;
  border-left: 1.2mm solid var(--amber);
}

.roster-position-heading h3 {
  margin: 0;
  font-size: 10pt;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.roster-position-heading span {
  display: grid;
  width: 5mm;
  height: 5mm;
  place-items: center;
  color: var(--muted);
  border: 0.25mm solid var(--line);
  border-radius: 50%;
  font-size: 6pt;
  font-weight: 700;
}

.roster-entry {
  break-inside: avoid;
  page-break-inside: avoid;
}

.roster-entry > td {
  padding: 3.5mm 0;
  border-top: 0.3mm solid var(--line);
}

.roster-entry__inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr 2.15fr;
  align-items: center;
  gap: 5mm;
}

.roster-entry__person,
.roster-entry__club {
  min-width: 0;
}

.roster-entry__person strong {
  display: block;
  margin-bottom: 0.7mm;
  font-size: 10pt;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.roster-entry__person span,
.roster-entry__club small {
  display: block;
  color: var(--muted);
  font-size: 6.8pt;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.roster-entry__club strong {
  display: block;
  margin-top: 0.7mm;
  font-size: 8.2pt;
  line-height: 1.25;
}

.roster-entry__availability {
  display: block;
  margin-top: 1.2mm;
  color: var(--muted);
  font-size: 6.2pt;
  font-weight: 700;
  letter-spacing: 0.025em;
  line-height: 1.25;
  text-transform: uppercase;
}

.roster-entry__availability--available {
  color: #176b3a;
}

.roster-entry__availability--buyout {
  color: #111111;
}

.roster-entry__availability--unavailable {
  color: #b42318;
}

.roster-entry__availability--unknown {
  color: #77746e;
}

.roster-entry__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2mm 3mm;
  margin: 0;
}

.roster-entry__stats div {
  min-width: 0;
}

.roster-entry__stats dt,
.roster-entry__stats dd {
  margin: 0;
}

.roster-entry__stats dt {
  color: var(--muted);
  font-size: 5.8pt;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-transform: uppercase;
}

.roster-entry__stats dd {
  margin-top: 0.4mm;
  font-size: 7.3pt;
  font-weight: 700;
  line-height: 1.2;
}

.roster-empty {
  padding: 18mm 0 !important;
  text-align: center !important;
}

@page {
  size: A4 portrait;
  margin: 10mm 13mm 13mm;
}

@media print {
  html,
  body {
    background: #fff;
  }

  .print-toolbar {
    display: none;
  }

  .roster-document {
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }

  .roster-table thead {
    display: table-header-group;
  }

  .roster-table tbody {
    display: table-row-group;
  }

  .document-header {
    padding-top: 1mm;
  }
}

@media screen and (max-width: 760px) {
  .print-toolbar {
    align-items: stretch;
    flex-direction: column;
    text-align: center;
  }

  .roster-document {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 18px 14px;
  }

  .document-header {
    grid-template-columns: 90px 1fr;
  }

  .document-header__contact {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .roster-entry__inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}
