/* Off-screen PDF export layout — content only; header/footer drawn in JS */
.swimmena-export-mount {
  position: fixed;
  left: 0;
  top: 0;
  width: 794px;
  opacity: 0.01;
  z-index: -9999;
  pointer-events: none;
}

.swimmena-export-doc {
  width: 794px;
  background: #f7fafc;
  color: #35495e;
  font-family: "Inter", "Tajawal", ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.swimmena-export-doc * {
  box-sizing: border-box;
}

.export-header {
  display: none;
}

.export-doc-footer {
  display: none;
}

.export-athlete {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 18px;
  margin: 20px 24px 0;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid #dce6ec;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(12, 23, 36, 0.06);
}

.export-athlete-photo {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(145deg, #41a6c6, #1d6b85);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Manrope", sans-serif;
  font-size: 22px;
  font-weight: 800;
}

.export-athlete-copy h1 {
  margin: 0;
  font-family: "Manrope", "Inter", sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #0c1724;
  line-height: 1.15;
}

.export-name-ar {
  margin: 6px 0 0;
  font-family: "Tajawal", sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: #1d6b85;
  direction: rtl;
  text-align: right;
}

.export-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.export-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #eef4f6;
  color: #35495e;
}

.export-badge.is-active {
  background: #e8f7ef;
  color: #1f7a4f;
}

.export-badge.is-top {
  background: #e8f4fa;
  color: #1d6b85;
}

.export-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #eef4f6;
}

.export-meta-grid div span {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5c6678;
}

.export-meta-grid div strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #0c1724;
}

.export-filters {
  display: flex;
  gap: 8px;
  margin: 14px 24px 0;
}

.export-filter-chip {
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #dce6ec;
  font-size: 10px;
  font-weight: 600;
  color: #35495e;
}

.export-section {
  margin: 18px 24px 0;
}

.export-section h2 {
  margin: 0 0 10px;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #0c1724;
}

.export-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.export-kpi-card {
  background: #fff;
  border: 1px solid #dce6ec;
  border-radius: 12px;
  padding: 12px 14px;
}

.export-kpi-card span {
  display: block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5c6678;
}

.export-kpi-card strong {
  display: block;
  margin-top: 4px;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #0c1724;
  line-height: 1.1;
}

.export-kpi-card small {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  color: #5c6678;
}

.export-kpi-card strong.is-positive {
  color: #1f7a4f;
}

.export-kpi-card strong.is-negative {
  color: #a22828;
}

.export-kpi-card strong.is-warning {
  color: #b45309;
}

.export-highlight {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}

.export-highlight-card,
.export-strokes-card {
  background: #fff;
  border: 1px solid #dce6ec;
  border-radius: 12px;
  padding: 14px 16px;
}

.export-highlight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.export-highlight-head p {
  margin: 0;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5c6678;
}

.export-highlight-head h3 {
  margin: 4px 0 0;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #0c1724;
}

.export-score-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8f7ef;
  color: #1d6b85;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.export-highlight-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
}

.export-highlight-stats div span {
  display: block;
  font-size: 9px;
  color: #5c6678;
}

.export-highlight-stats div strong {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: #0c1724;
}

.export-strokes-card h2 {
  margin: 0 0 10px;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #0c1724;
}

.export-stroke-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.export-stroke-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f7fafc;
  border: 1px solid #eef4f6;
}

.export-stroke-item.is-top {
  border-color: #adddc7;
  background: #f2fbf6;
}

.export-stroke-item strong {
  font-size: 11px;
  color: #0c1724;
}

.export-stroke-item span {
  font-size: 9px;
  color: #5c6678;
}

.export-stroke-item b {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 12px;
  color: #1d6b85;
}

.export-results-card {
  background: #fff;
  border: 1px solid #dce6ec;
  border-radius: 12px;
  overflow: hidden;
}

.export-results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 9.5px;
}

.export-results-table thead th {
  padding: 8px 8px;
  text-align: left;
  background: #eef4f6;
  color: #35495e;
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #dce6ec;
}

.export-results-table tbody td {
  padding: 7px 8px;
  border-bottom: 1px solid #eef4f6;
  vertical-align: top;
  color: #35495e;
}

.export-results-table tbody tr.is-best td {
  background: #f2fbf6;
}

.export-results-table tbody tr.is-best td:first-child {
  font-weight: 700;
  color: #0c1724;
}

.export-results-table .col-time,
.export-results-table .col-score {
  font-weight: 700;
  color: #0c1724;
  white-space: nowrap;
}

.export-results-table .col-change.is-positive {
  color: #1f7a4f;
  font-weight: 700;
}

.export-results-table .col-change.is-negative,
.export-results-table .col-gap.is-negative {
  color: #a22828;
  font-weight: 700;
}

.export-results-table .col-gap.is-positive {
  color: #1f7a4f;
  font-weight: 700;
}

.export-results-table .col-meet {
  max-width: 140px;
  font-family: "Tajawal", sans-serif;
  line-height: 1.35;
}

.export-results-table .col-meet.is-arabic {
  direction: rtl;
  text-align: right;
}

.export-results-note {
  margin: 0;
  padding: 10px 12px;
  font-size: 9px;
  color: #5c6678;
  background: #f7fafc;
  border-top: 1px solid #eef4f6;
}

.export-doc-footer {
  display: none;
}
