/* CALIBRE Play - public grading report pages (/report/CLBR-.../), page key "report".

   One file styles both report templates in the parent's cwp-report.php (CSS only - the
   template is logic-heavy and live depends on it):
     A. the full report (older certs, e.g. CLBR-0000296): .topbar, #cwp-readout, .report-sheet ...
     B. the certificate page (newer certs, e.g. CLBR-0000742): .old-topbar, .cert ...
        Branch B's <head> has no wp_head(), so this file only reaches it once the lead adds the
        stylesheet links there (see the redesign report).

   Look: the measurement readout sits on the playmat; each of the four things we measure keeps
   its own accent everywhere - centering = water, corners = fire, edges = grass, surface = psychic.
   Dela Gothic One for the big grade and headings, Figtree for text, DM Mono for measurements.

   Safety rules for this page:
   - nothing here un-hides anything: no `display` with !important, and the readout only gets a
     layout once its [hidden] attribute is gone (staff-only notes, the override note, the
     technical sections, duplicate blocks and the provisional label all stay as they are);
   - !important is only used against the template's own !important "cwp-dark" block and inline
     style="" attributes (score colours, the share button, the footer button). */

html body {
  --rp-c: var(--play-water);
  --rp-k: var(--play-fire);
  --rp-e: var(--play-grass);
  --rp-s: var(--play-psychic);
}
html:root { background: var(--play-bg) !important; }

/* ═══════════ A. full report ═══════════ */

/* ── top bar: logo, Download PDF + Share, verify another cert */
html body .topbar {
  padding: 16px 40px;
  gap: 14px;
  background: rgba(18, 20, 41, .94);
  border-bottom: 1px solid var(--play-line);
}
html body .topbar .logo { font-family: var(--f-brand); font-weight: 700; font-size: 28px; letter-spacing: .16em; color: var(--play-ink); }
html body .backlink {
  font-family: var(--f-body); font-weight: 600; font-size: 13px; letter-spacing: .1em;
  color: var(--play-muted); border-bottom: 0; text-decoration: underline; text-underline-offset: 5px;
  min-height: 44px; display: inline-flex; align-items: center;
}
html body .backlink:hover { color: var(--play-ink); }

html body .topbar-cert input {
  font-family: var(--f-data); font-size: 15px; letter-spacing: .02em; min-height: 44px; padding: 10px 14px;
  background: var(--play-card-2) !important; color: var(--play-ink) !important;
  border: 1.5px solid var(--play-line) !important; border-right: 0 !important; border-radius: 12px 0 0 12px;
}
html body .topbar-cert input::placeholder { font-family: var(--f-body); color: var(--play-faint) !important; opacity: 1; letter-spacing: 0; }
html body .topbar-cert input:focus { border-color: var(--play-water) !important; box-shadow: 0 0 0 3px rgba(111, 157, 224, .25); }
html body .topbar-cert.err input { border-color: var(--play-fire) !important; box-shadow: 0 0 0 3px rgba(236, 118, 86, .25); }
html body .topbar-cert button {
  min-width: 48px; min-height: 44px; font: 800 17px/1 var(--f-body);
  background: color-mix(in srgb, var(--play-water) 24%, var(--play-card)); color: var(--play-ink);
  border: 1.5px solid var(--play-line); border-radius: 0 12px 12px 0;
}
html body .topbar-cert button:hover { background: color-mix(in srgb, var(--play-water) 40%, var(--play-card)); border-color: var(--play-water); }

html body .report-controls { gap: 10px; }
html body .pdf-btn {
  font: 800 14px/1 var(--f-body); color: var(--play-ink); background: var(--play-card);
  border: 1.5px solid var(--play-line); border-radius: 12px; min-height: 44px; min-width: 44px;
  padding: 0 15px; gap: 8px; justify-content: center; box-shadow: var(--play-shadow);
}
html body .pdf-btn:hover { background: var(--play-card-2); color: var(--play-ink); border-color: var(--play-water); }
html body .pdf-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .45); }
/* Share is the button people come back for: accent outline, still not a full fill */
html body .pdf-btn:has(.share-label) { border-color: var(--play-fire); background: color-mix(in srgb, var(--play-fire) 14%, var(--play-card)); }
html body .pdf-btn:has(.share-label):hover { background: color-mix(in srgb, var(--play-fire) 26%, var(--play-card)); border-color: var(--play-fire); }
html body .pdf-btn[disabled]:hover { background: var(--play-card); border-color: var(--play-line); }

/* ── card name + set line */
html body .report-hero { padding: 40px 48px 6px; }
html body .report-hero h1 {
  font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 5.6vw, 72px);
  line-height: 1.04; letter-spacing: .005em; margin-bottom: 10px; color: var(--play-ink); text-wrap: balance;
}
html body .report-hero .deck { font-family: var(--f-body); font-weight: 600; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.45; color: var(--play-muted); }

html body main.report { margin-top: 18px; }

/* ── the measurement readout: grade + four scores, on the playmat */
html body .cwp-readout {
  margin: 12px 0 28px; padding: 22px 24px 24px; color: var(--play-ink); font-family: var(--f-body);
  background-color: var(--play-mat);
  background-image: radial-gradient(var(--play-mat-dot) 1.6px, transparent 1.7px);
  background-size: 14px 14px;
  border: 1px solid var(--play-line); border-radius: 22px; box-shadow: var(--play-shadow);
}
html body .cwp-readout .reyebrow { font: 800 12px/1.2 var(--f-body); letter-spacing: .14em; color: var(--play-muted); }
html body .cwp-readout .rverified { font: 600 13.5px/1.3 var(--f-body); color: var(--play-ink); }
html body .cwp-readout .rdot { background: var(--play-grass); box-shadow: 0 0 0 4px rgba(91, 185, 138, .22); }
html body .cwp-readout .rlead { font-size: 15px; line-height: 1.55; color: var(--play-muted); }
html body .cwp-readout .rlead b { background: none; color: var(--play-electric); font-weight: 800; }
html body .cwp-readout .rgrid { gap: 12px; grid-template-columns: 250px 1fr; } /* room for a two-digit grade like 8.5 */

html body .cwp-readout .rhero {
  background: var(--play-card); border: 2px solid color-mix(in srgb, var(--play-electric) 55%, var(--play-card));
  border-radius: 18px; padding: 16px 20px; box-shadow: var(--play-shadow);
}
html body .cwp-readout .rhero .k { font: 800 12px/1.2 var(--f-body); letter-spacing: .14em; color: var(--play-muted); }
html body .cwp-readout .rhero .g { font-family: var(--f-display); font-weight: 400; font-size: 88px; line-height: 1; margin: 6px 0 4px; color: var(--play-electric) !important; }
html body .cwp-readout .rhero .word { font: 800 16px/1.2 var(--f-body); letter-spacing: .12em; color: var(--play-ink); }

html body .cwp-readout .rstats { gap: 12px; }
html body .cwp-readout .rstat {
  --tone: var(--rp-c);
  background: color-mix(in srgb, var(--tone) 13%, var(--play-card));
  border: 1.5px solid color-mix(in srgb, var(--tone) 50%, var(--play-card));
  border-radius: 16px; padding: 13px 16px; box-shadow: var(--play-shadow);
}
html body .cwp-readout .rstat:nth-child(2) { --tone: var(--rp-k); }
html body .cwp-readout .rstat:nth-child(3) { --tone: var(--rp-e); }
html body .cwp-readout .rstat:nth-child(4) { --tone: var(--rp-s); }
html body .cwp-readout .rstat .k { font: 800 12px/1.2 var(--f-body); letter-spacing: .12em; color: color-mix(in srgb, var(--tone) 75%, #fff); }
html body .cwp-readout .rstat .v { font-family: var(--f-data); font-weight: 500; font-size: 34px; line-height: 1.1; letter-spacing: -.02em; color: var(--play-ink) !important; font-variant-numeric: tabular-nums; }
html body .cwp-readout .rstat .track { height: 8px; background: rgba(242, 242, 251, .1); border-radius: 999px; }
html body .cwp-readout .rstat .fill { background: var(--tone) !important; border-radius: 999px; }
html body .cwp-readout .rstat .ci { font-size: 12.5px; color: var(--play-muted); }
html body .cwp-readout .rstat .ci span:last-child { font-family: var(--f-data); }

html body .cwp-readout .rpop { border-top: 1px solid var(--play-line); gap: 14px 30px; }
html body .cwp-readout .rpop .pk { font: 800 11.5px/1.2 var(--f-body); letter-spacing: .12em; color: var(--play-muted); }
html body .cwp-readout .rpop .pv { font-family: var(--f-data); font-weight: 500; font-size: 24px; line-height: 1.2; color: var(--play-ink); }
html body .cwp-readout .rpop .pv span { font-size: 13px !important; color: var(--play-muted) !important; }
html body .cwp-readout .rpop .psub { font-size: 13px; color: var(--play-muted); }
html body .cwp-readout .rfoot { font-size: 13px; line-height: 1.55; color: var(--play-muted); }

/* ── the certificate sheet */
html body .report-sheet {
  background: var(--play-card) !important; border: 1px solid var(--play-line) !important;
  border-radius: 22px; box-shadow: var(--play-shadow) !important;
}
html body .report-sheet::before, html body .report-sheet::after { content: none; }
html body .report-header { border-bottom: 1px solid var(--play-line); padding-bottom: 26px; margin-bottom: 36px; }
html body .report-header .label { font: 800 11.5px/1.2 var(--f-body); letter-spacing: .14em; color: var(--play-muted); }
html body .report-header .value { font-family: var(--f-data); font-weight: 500; font-size: 16px; letter-spacing: .02em; color: var(--play-ink); }
html body .report-header-logo { font-family: var(--f-brand); font-weight: 700; letter-spacing: .16em; color: var(--play-ink); }
html body .report-header-logo .sub { font: 800 11px/1.2 var(--f-body); letter-spacing: .3em; color: var(--play-muted); margin-top: 6px; }

html body .top-section { margin-bottom: 44px; }
/* the scan: bigger, it's the brightest thing on the page */
html body .cert-card-flip { width: min(340px, 82vw); }
html body .cert-card-face { border-radius: 14px; box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .75), 0 2px 10px rgba(0, 0, 0, .4); }
html body .cert-card-face img { background: var(--play-bg); }
html body .cert-card-flipbtn {
  font: 800 13.5px/1 var(--f-body); letter-spacing: .06em; color: var(--play-ink);
  background: var(--play-card-2); border: 1.5px solid var(--play-line); border-radius: 12px;
  min-height: 44px; padding: 0 18px; box-shadow: var(--play-shadow);
}
html body .cert-card-flipbtn:hover { background: var(--play-card-2); border-color: var(--play-water); }
html body .cert-card-side { opacity: 1; color: var(--play-muted); font-weight: 600; }

html body .grade-panel-label { font: 800 12px/1.2 var(--f-body); letter-spacing: .14em; color: var(--play-muted); }
html body .grade-big { font-family: var(--f-display); font-weight: 400; font-size: clamp(92px, 11vw, 150px); line-height: 1; letter-spacing: -.01em; color: var(--play-ink); }
html body .grade-big .js-grade10 { color: var(--play-electric); }
html body .grade-big .of-ten { font-size: .4em; font-weight: 400; letter-spacing: 0; color: var(--play-muted); }
html body .grade-classification { font: 800 24px/1.2 var(--f-body); font-style: normal; color: var(--play-ink); margin-bottom: 18px; }
html body .grade-summary { font: 400 16px/1.6 var(--f-body); color: var(--play-muted); }
html body .grade-auth {
  background: color-mix(in srgb, var(--play-grass) 12%, var(--play-card));
  border: 1.5px solid color-mix(in srgb, var(--play-grass) 45%, var(--play-card)); border-radius: 14px;
}
html body .grade-auth-tick { background: var(--play-grass); color: var(--play-on); }
html body .grade-auth-text { font-family: var(--f-body); }
html body .grade-auth-text strong { font-weight: 800; color: var(--play-ink); }
html body .grade-auth-text span { font-size: 13.5px; color: var(--play-muted); }

html body .report-sheet .card-meta { border-color: var(--play-line); margin-bottom: 44px; }
html body .report-sheet .card-meta-item { border-color: var(--play-line); }
html body .report-sheet .card-meta-label { font: 800 11.5px/1.2 var(--f-body); letter-spacing: .14em; color: var(--play-muted); }
html body .report-sheet .card-meta-value { font: 800 19px/1.25 var(--f-body); color: var(--play-ink); }
html body .report-sheet .card-meta-value.js-card-number { font-family: var(--f-data); font-weight: 500; }

html body .subscore-rounding-note {
  font: 400 14.5px/1.6 var(--f-body); color: var(--play-muted);
  border-left: 3px solid var(--play-water); border-radius: 0 14px 14px 0;
  background: color-mix(in srgb, var(--play-water) 10%, var(--play-card));
}

html body .section-heading { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.06; letter-spacing: .005em; color: var(--play-ink); margin-bottom: 22px; }
html body .section-heading em { font-style: normal; font-weight: 400; color: var(--play-fire-ink); }

/* plain-English explainer: one panel per thing we measure */
html body .collector-explainer .collector-lead { font: 400 17px/1.6 var(--f-body); color: var(--play-ink); }
html body .collector-factors { gap: 12px; }
html body .collector-factor {
  --tone: var(--rp-c);
  border-left: 0; border: 1.5px solid color-mix(in srgb, var(--tone) 45%, var(--play-card)); border-radius: 14px;
  background: color-mix(in srgb, var(--tone) 12%, var(--play-card)); padding: 14px 16px;
}
html body .collector-factor:nth-child(2) { --tone: var(--rp-k); }
html body .collector-factor:nth-child(3) { --tone: var(--rp-e); }
html body .collector-factor:nth-child(4) { --tone: var(--rp-s); }
html body .collector-factor-name { font: 800 16px/1.3 var(--f-body); color: color-mix(in srgb, var(--tone) 75%, #fff); }
html body .collector-factor-score { font-family: var(--f-data); font-weight: 500; font-size: 20px; color: var(--play-ink); }
html body .collector-factor-desc { font: 400 14px/1.5 var(--f-body); color: var(--play-muted); margin-top: 4px; }
html body .collector-note { font: 400 14px/1.6 var(--f-body); color: var(--play-muted); }

/* about this report / scan to verify / issuing authority */
html body .report-footer { border-top: 1px solid var(--play-line); }
html body .footer-col h4 { font: 800 12px/1.2 var(--f-body); letter-spacing: .14em; color: var(--play-fire-ink); }
html body .footer-col p { font: 400 14px/1.6 var(--f-body); color: var(--play-muted); }
html body .footer-col p.footer-col-meta { font: 600 14px/1.7 var(--f-body); letter-spacing: 0; color: var(--play-ink); }
html body .footer-col:nth-child(2) p.footer-col-meta { font-family: var(--f-data); font-weight: 500; font-size: 13.5px; } /* cert no. + issue date */

/* ── "Want your cards measured?" + page footer */
html body .report-cta {
  background: var(--play-mat) radial-gradient(var(--play-mat-dot) 1.6px, transparent 1.7px) 0 0 / 14px 14px !important;
  border-top: 1px solid var(--play-line);
}
html body .report-cta h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(32px, 5vw, 60px); line-height: 1.06; color: var(--play-ink) !important; }
html body .report-cta h2 em { font-style: normal; font-weight: 400; color: var(--play-fire-ink); }
html body .report-cta p { font: 400 17px/1.6 var(--f-body); color: var(--play-ink) !important; margin-bottom: 30px; }
html body .cta-button {
  font: 800 17px/1 var(--f-body); letter-spacing: 0; text-transform: none;
  padding: 17px 30px; background: var(--play-fire); color: var(--play-on);
  border: 2px solid rgba(0, 0, 0, .25); border-radius: 12px; box-shadow: var(--play-shadow);
}
html body .cta-button:hover { background: #f18566; color: var(--play-on); transform: translateY(-1px); }
html body .cta-button:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .45); }
html body footer.page-footer, html body .page-footer-inner { background: #0d0f20 !important; }
html body footer.page-footer { border-top: 1px solid var(--play-line); }
html body .page-footer-inner { font: 600 12px/1.4 var(--f-body); letter-spacing: .12em; color: var(--play-muted); }

/* ── loading / error / revoked states */
html body .report-loader { background: var(--play-bg); }
html body .report-loader-spinner { border-color: rgba(242, 242, 251, .14); border-top-color: var(--play-fire); }
html body .report-loader-text, html body .report-loader-error { font-family: var(--f-body); color: var(--play-muted); }
html body .report-loader-error strong { font-family: var(--f-display); font-weight: 400; font-size: 24px; line-height: 1.15; color: var(--play-ink); }
html body .report-loader-error a { color: var(--play-fire-ink) !important; font-weight: 800; text-decoration: underline !important; text-underline-offset: 4px; padding: 12px 4px; }
html body .revoked-banner-inner {
  background: color-mix(in srgb, var(--play-fire) 14%, var(--play-card)); color: var(--play-ink);
  border: 1.5px solid color-mix(in srgb, var(--play-fire) 55%, var(--play-card)); border-left: 5px solid var(--play-fire);
}
html body .revoked-banner-icon { color: var(--play-fire-ink); }
html body .revoked-banner-inner strong { color: var(--play-ink); }
html body .revoked-banner-note { color: var(--play-muted); }

/* ── tablet + phone */
@media (max-width: 900px) {
  html body .topbar { padding: 12px 16px; gap: 8px 10px; }
  html body .topbar .logo { font-size: 24px; }
  html body .report-controls { margin-left: auto; }
  html body .backlink { order: 2; }
  html body .topbar-cert { order: 3; flex: 1 1 200px; margin: 0; }
  html body .report-hero { padding: 22px 16px 4px; }
  html body main.report { padding: 0 14px; margin-top: 10px; }
  html body .report-sheet { padding: 26px 18px; }
}
@media (max-width: 720px) {
  /* grade and the four scores first: the explanation moves under them */
  html body .cwp-readout { margin: 10px 0 22px; padding: 16px 14px 18px; border-radius: 20px; }
  html body .cwp-readout:not([hidden]) { display: flex; flex-direction: column; }
  html body .cwp-readout .rhead { order: 0; margin-bottom: 12px; gap: 6px 10px; }
  html body .cwp-readout .rverified { margin-left: 0; }
  html body .cwp-readout .rgrid { order: 1; gap: 10px; grid-template-columns: 1fr; }
  html body .cwp-readout .rlead { order: 2; margin: 14px 0 0; font-size: 14px; }
  html body .cwp-readout .rpop { order: 3; }
  html body .cwp-readout .rfoot { order: 4; }
  html body .cwp-readout .rhero {
    display: grid; grid-template-columns: auto 1fr; grid-template-areas: "g k" "g word";
    align-items: center; column-gap: 16px; padding: 10px 18px;
  }
  html body .cwp-readout .rhero .g { grid-area: g; font-size: 64px; margin: 0; }
  html body .cwp-readout .rhero .k { grid-area: k; align-self: end; }
  html body .cwp-readout .rhero .word { grid-area: word; align-self: start; font-size: 18px; margin-top: 4px; }
  html body .cwp-readout .rstats { gap: 10px; }
  html body .cwp-readout .rstat {
    display: grid; grid-template-columns: 1fr auto; grid-template-areas: "k v" "track track" "ci ci";
    align-items: center; column-gap: 8px; padding: 10px 12px; border-radius: 14px;
  }
  html body .cwp-readout .rstat .k { grid-area: k; font-size: 11.5px; letter-spacing: .08em; }
  html body .cwp-readout .rstat .v { grid-area: v; font-size: 26px; margin: 0; }
  html body .cwp-readout .rstat .track { grid-area: track; margin: 7px 0 5px; }
  html body .cwp-readout .rstat .ci { grid-area: ci; font-size: 12px; }
  html body .cwp-readout .rpop { gap: 12px 22px; }
  html body .report-header { margin-bottom: 26px; padding-bottom: 20px; }
  html body .top-section { gap: 22px; }
  html body .grade-panel { padding: 4px 0 8px; }
  html body .grade-classification { font-size: 21px; }
  html body .report-cta { padding: 52px 18px; }
  html body .cta-button { display: block; }
}
/* phone top bar: logo + Return, then Download PDF and Share as two big buttons, then the cert lookup.
   The "Download PDF" label comes back on phones (the template made it icon-only below 720px). */
@media (max-width: 720px) {
  html body .backlink { order: 1; margin-left: auto; }
  html body .report-controls { order: 2; flex: 1 1 100%; margin-left: 0; gap: 10px; }
  html body .report-controls .view-toggle { display: none; } /* empty here: its buttons are staff-only and already hidden */
  html body .report-controls .pdf-btn { flex: 1 1 0; }
  html body .pdf-btn .pdf-btn-text { display: inline; }
  html body .topbar-cert { order: 3; flex: 1 1 100%; }
}
@media (max-width: 380px) {
  html body .topbar .logo { font-size: 21px; letter-spacing: .13em; }
  html body .pdf-btn { padding: 0 10px; font-size: 13.5px; }
  html body .cwp-readout .rstat { padding: 10px; }
  html body .cwp-readout .rstat .k { font-size: 10.5px; letter-spacing: .05em; }
  html body .cwp-readout .rstat .v { font-size: 23px; }
}

/* ═══════════ B. certificate page (newer certs) ═══════════ */

html body .old-topbar { padding: 16px 40px; background: rgba(18, 20, 41, .94); border-bottom: 1px solid var(--play-line); }
html body .old-logo { font-family: var(--f-brand); font-weight: 700; font-size: 28px; letter-spacing: .16em; color: var(--play-ink); }
html body .old-backlink {
  font-family: var(--f-body); font-weight: 600; font-size: 13px; letter-spacing: .1em; color: var(--play-muted);
  border-bottom: 0; text-decoration: underline; text-underline-offset: 5px;
  min-height: 44px; display: inline-flex; align-items: center;
}
html body .old-backlink:hover { color: var(--play-ink); }

html body .cert { max-width: 900px; padding: 34px 24px 64px; font-family: var(--f-body); color: var(--play-ink); }
html body .cert .cert-header { margin-bottom: 22px; }
html body .cert .cert-id { font-family: var(--f-data); font-weight: 500; font-size: 13.5px; letter-spacing: .02em; color: var(--play-muted); }

html body .cert .hero { gap: 40px; margin-bottom: 30px; }
html body .cert .hero-card { width: 290px; }
html body .cert .flip-scene { width: 100%; }
html body .cert .flip-face { background: var(--play-card); border-radius: 15px; box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .75), 0 2px 10px rgba(0, 0, 0, .4); }
html body .cert .flip-face .no-photo { font-family: var(--f-body); color: var(--play-muted); }
html body .cert .flip-hint { font-size: 13px; color: var(--play-muted); letter-spacing: .02em; }
html body .cert .certified-pill {
  font: 800 12.5px/1.2 var(--f-body); letter-spacing: .06em; color: var(--play-electric);
  border: 1.5px solid var(--play-electric); background: color-mix(in srgb, var(--play-electric) 12%, transparent); padding: 6px 14px;
}
html body .cert .card-name { font-family: var(--f-display); font-weight: 400; font-size: clamp(28px, 4.4vw, 42px); line-height: 1.06; letter-spacing: .005em; margin: 12px 0 6px; color: var(--play-ink); text-wrap: balance; }
html body .cert .card-meta { font: 600 15px/1.4 var(--f-body); color: var(--play-muted); }
html body .cert .overall-grade { gap: 10px; }
html body .cert .overall-num { font-family: var(--f-display); font-weight: 400; font-size: 76px; line-height: 1; color: var(--play-electric); }
html body .cert .overall-of { font: 800 20px/1.2 var(--f-body); color: var(--play-ink); }
/* Share (inline-styled in the template) */
html body .cert button[onclick^="cwpShare"] {
  min-height: 44px !important; padding: 0 18px !important; border-radius: 12px !important;
  border: 1.5px solid var(--play-fire) !important; background: color-mix(in srgb, var(--play-fire) 14%, var(--play-card)) !important;
  color: var(--play-ink) !important; font: 800 15px/1 var(--f-body) !important; box-shadow: var(--play-shadow);
}
html body .cert button[onclick^="cwpShare"]:hover { background: color-mix(in srgb, var(--play-fire) 26%, var(--play-card)) !important; }

/* the four scores, each in its own accent */
html body .cert .grade-tiles { gap: 12px; margin-bottom: 40px; }
html body .cert .grade-tile {
  --tone: var(--rp-c);
  background: color-mix(in srgb, var(--tone) 13%, var(--play-card));
  border: 1.5px solid color-mix(in srgb, var(--tone) 50%, var(--play-card)); border-radius: 16px;
  padding: 16px 14px; box-shadow: var(--play-shadow);
}
html body .cert .grade-tile:nth-child(2) { --tone: var(--rp-k); }
html body .cert .grade-tile:nth-child(3) { --tone: var(--rp-e); }
html body .cert .grade-tile:nth-child(4) { --tone: var(--rp-s); }
html body .cert .grade-tile-num { font-family: var(--f-data); font-weight: 500; font-size: 34px; line-height: 1.15; color: var(--play-ink); }
html body .cert .grade-tile-name { font: 800 12px/1.2 var(--f-body); letter-spacing: .12em; color: color-mix(in srgb, var(--tone) 75%, #fff); margin-top: 4px; }
html body .cert .grade-tile-note { font-size: 13px; line-height: 1.4; color: var(--play-muted); }

/* measurement sections: a clear heading in that measurement's accent, then panels */
html body .cert .section-divider { background: var(--play-line); margin: 10px 0 34px; }
html body .cert .section-title { font-family: var(--f-display); font-weight: 400; font-size: clamp(24px, 3.6vw, 32px); line-height: 1.1; letter-spacing: .005em; margin: 0 0 8px; color: var(--play-ink); }
html body .cert .section-title:has(+ .section-sub + .corner-face-group .corner-tile-row) { color: color-mix(in srgb, var(--rp-k) 85%, #fff); }
html body .cert .section-title:has(+ .section-sub + .corner-face-group .mini-grade-row) { color: color-mix(in srgb, var(--rp-c) 85%, #fff); }
html body .cert .section-title:has(+ .section-sub + .corner-face-group > .section-sub),
html body .cert .section-title:has(+ .section-sub + .corner-face-group .mark-row) { color: color-mix(in srgb, var(--rp-s) 85%, #fff); }
html body .cert .section-title:has(+ .section-sub + .face-group) { color: color-mix(in srgb, var(--rp-e) 85%, #fff); }
html body .cert .section-sub { font-size: 15px; line-height: 1.55; color: var(--play-muted); margin-bottom: 18px; }

html body .cert .corner-face-group, html body .cert .face-group {
  background: var(--play-card); border: 1px solid var(--play-line); border-radius: 18px;
  padding: 16px; margin-bottom: 16px; box-shadow: var(--play-shadow);
}
html body .cert .corner-face-group > .section-sub { margin: 0; }
html body .cert .corner-face-label, html body .cert .face-label { font: 800 12px/1.2 var(--f-body); letter-spacing: .14em; color: var(--play-ink); margin-bottom: 12px; }
html body .cert .corner-tile-row, html body .cert .detail-row { gap: 10px; }
html body .cert .corner-tile, html body .cert .detail-tile { background: var(--play-card-2); border: 1px solid var(--play-line); border-radius: 12px; }
/* corner-profile charts: their lines keep the template colours; the axis text was too faint */
html body .cert .corner-tile svg { overflow: visible; } /* the "+0.05" axis labels were clipped at the left edge */
html body .cert .corner-tile svg text { fill: var(--play-muted); font-family: var(--f-data); font-size: 10px; }
html body .cert .corner-name { font: 800 14px/1.3 var(--f-body); color: var(--play-ink); margin-top: 8px; }
html body .cert .corner-note { font-family: var(--f-data); font-weight: 500; font-size: 12px; line-height: 1.5; color: var(--play-muted); }
html body .cert .mini-grade-row { background: var(--play-card-2); border: 1px solid var(--play-line); border-radius: 14px; gap: 18px 28px; }
html body .cert .mini-num { font-family: var(--f-data); font-weight: 500; font-size: 24px; line-height: 1.2; color: var(--play-ink); white-space: nowrap; }
html body .cert .mini-label { font: 800 11.5px/1.3 var(--f-body); letter-spacing: .1em; color: var(--play-muted); }
html body .cert .detail-name { font: 800 13px/1.3 var(--f-body); color: var(--play-ink); }
html body .cert .detail-photo { background-color: var(--play-bg); }
html body .cert .mark-row { background: var(--play-card-2); border: 1px solid var(--play-line); border-radius: 12px; }
html body .cert .mark-text { font-family: var(--f-data); font-weight: 500; font-size: 13px; color: var(--play-ink); }
html body .cert .mark-note { font-size: 12.5px; color: var(--play-muted); }
html body .cert .mark-num { color: var(--play-on); } /* same fire marker as the numbered box on the photo */
html body .cert .defect-photo { border-color: var(--play-line); background: var(--play-bg); }
html body .cert .defect-badge { color: var(--play-on); }
html body .cert .defect-reset { font: 800 13px/1 var(--f-body); color: var(--play-ink); background: var(--play-card-2); border: 1.5px solid var(--play-line); border-radius: 10px; min-height: 44px; padding: 0 16px; }
html body .cert .defect-reset:hover { border-color: var(--play-water); }

html body .old-page-footer { background: #0d0f20; border-top: 1px solid var(--play-line); }
html body .old-page-footer-inner { font: 600 12px/1.4 var(--f-body); letter-spacing: .12em; color: var(--play-muted); gap: 14px; }
html body .old-page-footer-inner a[href="/order/"] {
  font: 800 15px/1 var(--f-body) !important; letter-spacing: 0 !important; text-transform: none !important;
  color: var(--play-on) !important; background: var(--play-fire) !important; padding: 14px 22px !important;
  border: 2px solid rgba(0, 0, 0, .25); border-radius: 12px !important; box-shadow: var(--play-shadow);
}
html body .old-page-footer-inner a[href="/order/"]:hover { background: #f18566 !important; }

@media (max-width: 720px) {
  html body .old-topbar { padding: 10px 16px; }
  html body .old-logo { font-size: 24px; }
  /* phone order: name + grade + share, the four scores, then the big scan */
  html body .cert { display: flex; flex-direction: column; padding: 14px 16px 48px; }
  html body .cert > * { order: 5; }
  html body .cert > .cert-header { order: 0; margin-bottom: 8px; }
  html body .cert > .hero { display: contents; }
  html body .cert .hero-info { order: 1; flex: none; min-width: 0; margin-bottom: 18px; }
  html body .cert > .grade-tiles { order: 2; margin-bottom: 26px; gap: 10px; }
  html body .cert .hero-card { order: 3; flex: none; width: min(330px, 84vw); align-self: center; margin-bottom: 34px; }
  html body .cert .card-name { font-size: 30px; }
  html body .cert .overall-grade { margin-bottom: 6px; }
  html body .cert .overall-num { font-size: 64px; }
  html body .cert .grade-tile { padding: 12px 10px; }
  html body .cert .grade-tile-num { font-size: 30px; }
  html body .cert .corner-face-group, html body .cert .face-group { padding: 12px; }
  html body .cert .corner-tile { padding: 8px; }
  html body .cert .mini-grade-row { padding: 14px; gap: 14px 22px; }
  html body .cert .mini-num { font-size: 20px; }
  html body .old-page-footer { padding: 30px 20px 28px; }
  html body .old-page-footer-inner { flex-direction: column; text-align: center; }
}
@media (max-width: 380px) {
  html body .cert .corner-note { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html body .cert-card-flip, html body .cert .flip-inner, html body .cert .defect-inner { transition: none; }
  html body.report-ready .report-hero, html body.report-ready main.report { animation: none; }
}
