/* Results sheet for printing or "Save as PDF": black on white, one A4 page wide. */

:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body.print-sheet {
  margin: 0;
  background: #e9e9e9;
  color: #000000;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, "Noto Naskh Arabic", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.print-tools {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 14px;
}

.print-tools button,
.print-tools a {
  font: inherit;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid #000000;
  background: #ffd000;
  color: #000000;
  text-decoration: none;
  cursor: pointer;
}

.print-tools a {
  background: #ffffff;
}

main {
  max-width: 210mm;
  margin: 0 auto 24px;
  padding: 16mm 14mm;
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
}

.p-head {
  display: flex;
  gap: 18px;
  align-items: center;
  border-bottom: 3px solid #000000;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.p-head img {
  border-radius: 50%;
  flex: none;
}

.p-club {
  margin: 0;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
}

h1 {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: 26px;
  margin: 2px 0 4px;
}

h2 {
  font-size: 16px;
  margin: 18px 0 8px;
}

.p-meta,
.p-status {
  margin: 0;
  color: #333333;
}

.p-status {
  font-weight: 700;
}

.p-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.p-place {
  display: grid;
  gap: 2px;
  justify-items: center;
  text-align: center;
  padding: 10px 8px;
  border: 2px solid #000000;
  border-radius: 10px;
}

.p-place-1 {
  border-width: 3px;
  background: #fff6cc;
}

.p-medal {
  font-size: 26px;
  line-height: 1;
}

.p-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.p-prize {
  font-weight: 700;
}

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

.p-table th,
.p-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #cccccc;
  text-align: start;
}

.p-table th {
  border-bottom: 2px solid #000000;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.p-table .num {
  text-align: end;
  font-variant-numeric: tabular-nums;
}

.p-table tr.is-dq td {
  color: #777777;
  text-decoration: line-through;
}

.p-title {
  display: inline-block;
  padding: 0 4px;
  border: 1px solid #000000;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 800;
}

.p-id {
  color: #555555;
  font-size: 12px;
}

.p-note,
.p-sponsors {
  margin: 10px 0 0;
  font-size: 12px;
  color: #333333;
}

.p-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  margin-top: 18px;
  padding-top: 8px;
  border-top: 1px solid #000000;
  font-size: 11px;
  color: #333333;
}

:lang(ar) .p-club,
:lang(ar) .p-label,
:lang(ar) .p-table th {
  letter-spacing: 0;
  text-transform: none;
}

@media (max-width: 640px) {
  main {
    padding: 16px;
  }
  .p-podium {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }
  body.print-sheet {
    background: #ffffff;
  }
  .print-tools {
    display: none;
  }
  main {
    max-width: none;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
  .p-table tr {
    break-inside: avoid;
  }
}
