/* ============================================================
   report page — screen + print (A4)
   ============================================================ */

.report-body { background: #E9ECE7; }

.report-toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  background: var(--deep);
  border-bottom: 3px solid var(--lime);
}

.report-page {
  max-width: 880px;
  margin: 26px auto 60px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  padding: 44px 48px 36px;
}

/* cover */
.report-cover {
  display: flex;
  align-items: center;
  gap: 26px;
  border-bottom: 3px solid var(--deep);
  padding-bottom: 24px;
  margin-bottom: 26px;
}
.cover-logo { width: 128px; flex: none; }
.report-cover h1 { font-size: 23px; color: var(--deep); line-height: 1.5; }
.cover-sub { color: var(--ink-2); font-size: 14px; margin-top: 4px; }
.cover-meta { font-size: 12.5px; color: var(--ink-3); margin-top: 10px; }
.cover-meta strong { color: var(--forest); }
.cover-meta .date-note { font-size: 11px; color: var(--ink-3); margin-inline-start: 4px; }

/* sections */
.rep-section { margin-bottom: 30px; }
.rep-section h2 {
  font-size: 17px;
  color: var(--deep);
  border-inline-start: 4px solid var(--lime);
  padding-inline-start: 10px;
  margin-bottom: 12px;
}
.rep-section .h-sub { font-size: 12.5px; color: var(--ink-3); font-weight: 400; }
.rep-note { font-size: 12.5px; color: var(--ink-3); margin: -6px 0 12px; }
.rep-note.tied-note { font-size: 11.5px; }

/* KPIs */
.rep-kpis {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.rep-kpi {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--mint);
  padding: 10px 12px;
  text-align: center;
}
.rep-kpi .rk-value { font-size: 20px; font-weight: 700; color: var(--deep); line-height: 1.4; }
.rep-kpi .rk-value .unit { font-size: 11px; font-weight: 500; color: var(--ink-2); }
.rep-kpi .rk-label { font-size: 11px; color: var(--ink-2); line-height: 1.5; }

/* top10 bars */
.top10 { display: flex; flex-direction: column; gap: 7px; }
.t10-row { display: grid; grid-template-columns: 26px 150px 1fr 66px 44px; align-items: center; gap: 10px; }
.t10-rank {
  width: 24px; height: 24px;
  border-radius: 7px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.t10-name { font-size: 13px; font-weight: 500; color: var(--deep); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t10-track { height: 14px; background: var(--mint-deep); border-radius: 4px; overflow: hidden; }
.t10-fill { height: 100%; border-radius: 4px 0 0 4px; min-width: 4px; }
.t10-val { font-size: 11px; color: var(--ink-3); font-weight: 500; white-space: nowrap; }
.t10-cert { font-size: 11px; color: var(--ink-3); font-weight: 700; white-space: nowrap; }

/* full table */
.rep-table { width: 100%; font-size: 12px; }
.rep-table th {
  background: var(--deep);
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  text-align: start;
  padding: 7px 8px;
  white-space: nowrap;
}
.rep-table th:first-child { border-radius: 0 8px 8px 0; }
.rep-table th:last-child { border-radius: 8px 0 0 8px; }
.rep-table td {
  padding: 5.5px 8px;
  border-bottom: 1px solid #E6EBE6;
  white-space: nowrap;
}
/* numeric columns: center header + values (name column stays start-aligned) */
.rep-table th:not(:nth-child(2)), .rep-table td:not(:nth-child(2)) { text-align: center; }
.rep-table tbody tr:nth-child(even) { background: #F6F8F4; }
.rep-table .rt-name { font-weight: 500; color: var(--deep); white-space: normal; }
.rep-table .chg-up { color: var(--up); }
.rep-table .chg-down { color: var(--down); }
.rep-table .rank-chip { min-width: 26px; height: 21px; font-size: 11.5px; }

/* methodology */
.method-p { font-size: 13px; line-height: 2; color: var(--ink); text-align: justify; }
.num-formula {
  font-weight: 700;
  color: var(--forest);
  background: var(--mint);
  border-radius: 6px;
  padding: 1px 8px;
  white-space: nowrap;
}
.src-line {
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  line-height: 1.9;
}

.rep-footer {
  margin-top: 26px;
  padding-top: 12px;
  border-top: 2px solid var(--deep);
  font-size: 11px;
  color: var(--ink-3);
  text-align: center;
}

/* ---------- screen responsive ---------- */
@media (max-width: 900px) {
  .report-page { margin: 0; padding: 26px 20px; border: none; }
  .rep-kpis { grid-template-columns: repeat(3, 1fr); }
  .t10-row { grid-template-columns: 24px 108px 1fr 58px 38px; gap: 7px; }
  .rep-table { display: block; overflow-x: auto; }
}
@media (max-width: 640px) {
  .report-cover { flex-direction: column; text-align: center; gap: 12px; }
  .report-cover h1 { font-size: 19px; }
  .rep-kpis { grid-template-columns: repeat(2, 1fr); }
  .report-toolbar { padding: 10px 14px; }
  .report-toolbar .btn { font-size: 12.5px; padding: 8px 12px; }
}

/* ---------- print ---------- */
@page {
  size: A4;
  margin: 14mm 12mm;
}
@media print {
  .no-print { display: none !important; }
  body.report-body { background: #fff; font-size: 11px; }
  .report-page {
    max-width: none;
    margin: 0;
    padding: 0;
    border: none;
    box-shadow: none;
  }
  .rep-section { break-inside: auto; }
  .rep-section h2 { break-after: avoid; }
  .top10, .rep-kpis, .report-cover, .t10-row { break-inside: avoid; }
  .rep-table tr { break-inside: avoid; }
  .rep-table thead { display: table-header-group; }
  .method-p { font-size: 11.5px; }
  a { text-decoration: none; color: inherit; }
  .rep-kpi, .rep-table th, .t10-rank, .t10-fill, .rank-chip, .num-formula {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
