@page {
  size: A4 portrait;
  margin: 20mm 16mm 20mm;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: #202936;
  font: 9.5pt/1.45 "Segoe UI", Arial, Helvetica, sans-serif;
}

.print-actions {
  width: min(210mm, 100%);
  margin: 0 auto;
  padding: 12px 16mm;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e1e5eb;
}
.print-actions a { color: #174582; text-decoration: none; }
.print-actions button {
  border: 0;
  border-radius: 4px;
  background: #174582;
  color: #fff;
  padding: 9px 15px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.bulletin-document { width: min(210mm, 100%); margin: 0 auto; padding: 14mm 16mm 18mm; }

@media screen {
  body { background: #f3f5f8; }
  .bulletin-document, .print-sheet {
    margin: 24px auto 40px;
    background: #fff;
    border: 1px solid #e0e4ea;
    box-shadow: 0 10px 28px rgb(27 43 65 / 9%);
  }
}

.bulletin-cover {
  min-height: 245mm;
  display: flex;
  flex-direction: column;
  border-top: 2mm solid #174582;
  padding-top: 14mm;
  position: relative;
}
.bulletin-cover::before {
  content: "";
  position: absolute;
  top: -2mm;
  right: 0;
  width: 24mm;
  border-top: 2mm solid #d9ad2b;
}
.bulletin-cover-brand { display: flex; align-items: center; gap: 12mm; }
.bulletin-cover-brand img { display: block; height: 50mm; width: auto; max-width: 46mm; object-fit: contain; }
.bulletin-cover-brand p {
  max-width: 100mm;
  margin: 0;
  font-size: 13pt;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: .035em;
}
.bulletin-cover-title { margin-top: 19mm; }
.bulletin-cover-title h1 { margin: 0 0 6mm; font-size: 30pt; line-height: 1.08; letter-spacing: -.025em; }
.bulletin-cover-title h1 span { color: #174582; font-size: 38pt; }
.bulletin-cover-season { margin: 0 0 2mm; font-size: 14pt; font-weight: 750; letter-spacing: .015em; }
.bulletin-cover-type { margin: 0; font-size: 13pt; font-weight: 600; }
.bulletin-cover-date { margin: 7mm 0 0; color: #596475; font-size: 9pt; }
.bulletin-registration { max-width: 150mm; margin-top: auto; padding-bottom: 12mm; }
.bulletin-registration::before { content: ""; display: block; width: 26mm; border-top: 1mm solid #d9ad2b; margin-bottom: 4mm; }
.bulletin-registration h2 { margin: 0 0 2mm; font-size: 9.5pt; line-height: 1.3; letter-spacing: .035em; }
.bulletin-registration p { margin: 0; font-size: 8.5pt; line-height: 1.5; }

.bulletin-content { border-top: 1px solid #d8dde4; padding-top: 7mm; }
.bulletin-content-heading {
  display: flex;
  justify-content: space-between;
  gap: 5mm;
  color: #5e6978;
  font-size: 8pt;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.bulletin-scope { margin-top: 9mm; }
.bulletin-scope > h2 {
  margin: 0 0 5mm;
  padding-bottom: 2mm;
  border-bottom: 1px solid #56739d;
  color: #173c72;
  font-size: 12pt;
  line-height: 1.3;
  text-transform: uppercase;
  break-after: avoid;
  page-break-after: avoid;
}
.bulletin-round { margin-bottom: 6mm; }
.bulletin-round-heading { margin: 0 0 2mm; break-after: avoid; page-break-after: avoid; }
.bulletin-round-heading h3 { margin: 0; font-size: 11pt; line-height: 1.25; text-transform: uppercase; }
.bulletin-round-heading p { margin: 1mm 0 0; color: #5b6674; font-size: 9pt; }

.bulletin-match { padding: 3mm 0 3.5mm; border-bottom: 1px solid #d8dde4; break-inside: avoid; page-break-inside: avoid; }
.bulletin-match-line { display: grid; grid-template-columns: minmax(0, 1fr) 23mm minmax(0, 1fr); align-items: center; gap: 4mm; }
.bulletin-team { min-width: 0; font-size: 9.5pt; font-weight: 400; line-height: 1.25; overflow-wrap: anywhere; }
.bulletin-team-home { text-align: right; }
.bulletin-team-away { text-align: left; }
.bulletin-team-winner { font-weight: 700; }
.bulletin-final-score { color: #162c4d; font-size: 20pt; font-weight: 800; line-height: 1; text-align: center; white-space: nowrap; }
.bulletin-match-state { color: #5d6876; font-size: 7.5pt; font-weight: 700; line-height: 1.2; text-align: center; text-transform: uppercase; }
.bulletin-match-numbers { margin-top: 1.5mm; text-align: center; }
.bulletin-sets { margin: 0; font-size: 8.5pt; font-weight: 650; }
.bulletin-points { margin: .5mm 0 0; color: #647080; font-size: 8pt; }
.bulletin-match-meta { display: grid; gap: 1mm; margin-top: 2.5mm; font-size: 7.8pt; }
.bulletin-match-meta-row { display: flex; flex-wrap: nowrap; align-items: baseline; gap: 4mm; }
.bulletin-match-meta-row p { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.bulletin-match-meta-row span { color: #596575; font-weight: 650; }
.bulletin-match-cards > span { font-weight: 700; }
.bulletin-match-cards { margin-top: 1.5mm; font-size: 8pt; }
.bulletin-match-cards ul { margin: .5mm 0 0; padding-left: 5mm; }
.bulletin-match-note { margin: 3mm 0 2mm; padding: 1mm 0 1mm 2mm; border-left: 2px solid #8ca3c6; font-size: 8pt; white-space: pre-wrap; }
.bulletin-match-note span { font-weight: 700; }
.bulletin-correction { break-inside: avoid; page-break-inside: avoid; }
.bulletin-change-label { margin: 2mm 0 0; color: #5b6674; font-size: 7.5pt; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }

.bulletin-standings { margin-top: 5mm; }
.bulletin-standings h3 { margin: 0 0 2.5mm; font-size: 9.5pt; line-height: 1.3; text-transform: uppercase; break-after: avoid; page-break-after: avoid; }
.bulletin-standings table { width: 100%; border-collapse: collapse; font-size: 8pt; }
.bulletin-standings thead { display: table-header-group; }
.bulletin-standings tr { break-inside: avoid; page-break-inside: avoid; }
.bulletin-standings th, .bulletin-standings td { padding: 1.7mm 1mm; border-bottom: 1px solid #e0e4e9; text-align: center; }
.bulletin-standings thead th { border-top: 1px solid #9eabba; border-bottom: 1px solid #9eabba; background: #eaf0f6; color: #183c71; font-weight: 750; }
.bulletin-standings tbody tr:nth-child(even) { background: #f6f8fa; }
.bulletin-standings th:nth-child(2) { width: 36%; text-align: left; }
.bulletin-standings tbody th { font-weight: 500; }
.bulletin-standings tbody tr:last-child { break-after: avoid; page-break-after: avoid; }
.bulletin-scope-last .bulletin-round:last-of-type > .bulletin-match:last-child,
.bulletin-scope-last .bulletin-round:last-of-type .bulletin-correction:last-child > .bulletin-match:last-child { break-after: avoid; page-break-after: avoid; }

.bulletin-signature { width: 80mm; margin: 8mm 0 0 auto; break-before: avoid; page-break-before: avoid; break-inside: avoid; page-break-inside: avoid; }
.bulletin-signature img { display: block; width: 50mm; height: auto; margin: 3mm auto 0; }
.bulletin-signature p { margin: 0 0 1mm; font-size: 8.5pt; text-align: center; }
.bulletin-signature strong { display: block; font-size: 9pt; text-align: center; }
.bulletin-footer { margin-top: 8mm; padding-top: 2mm; border-top: 1px solid #d8dde4; color: #66717f; font-size: 8pt; text-align: center; }

@media print {
  body { background: none; color: #151b22; }
  .print-actions { display: none !important; }
  .bulletin-document, .print-sheet { margin: 0; background: none; border: 0; box-shadow: none; }
  .bulletin-document { width: auto; padding: 0; }
  .bulletin-cover { height: 250mm; min-height: 0; break-after: page; page-break-after: always; }
  .bulletin-content { border-top: 0; padding-top: 0; }
  .bulletin-content-heading { display: none; }
  .bulletin-scope + .bulletin-scope { break-before: page; page-break-before: always; }
  .bulletin-standings, .bulletin-standings table { break-inside: avoid; page-break-inside: avoid; }
  .bulletin-standings thead th, .bulletin-standings tbody tr:nth-child(even) { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .bulletin-footer { display: none; }
}
