/* Scorecard Studio — print/PDF report stylesheet.
   Loaded with media="print". Design goals:
   - Match the original ScoreApp report: photo cover, teal feature pages,
     faded category banners, gold accents.
   - Tight pagination: only major sections start a new page; small sections
     flow together. No orphan paragraphs on otherwise-blank pages. */

@page {
  size: A4;
  margin: 12mm 13mm;
}

* {
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Hide all app chrome and interactive controls */
.site-header,
.site-footer,
.progress,
.progress-count,
.back-link,
.no-print,
.result-controls,
button,
.btn {
  display: none !important;
}

/* Keep the CTA link visible as plain text in print */
a.cta-link {
  display: inline-block !important;
  color: #fff !important;
  background: var(--brand-accent, #d9a83c) !important;
  border: none !important;
  border-radius: 3mm;
  padding: 3mm 8mm !important;
  text-decoration: none;
  font-weight: 700;
}
a.cta-link::after {
  content: "\A" attr(href);
  white-space: pre;
  font-weight: 400;
  font-size: 8pt;
}

html, body {
  background: #fff !important;
  color: #1c1c1c !important;
  font-size: 10.5pt;
  line-height: 1.45;
}

.main { max-width: none; padding: 0; margin: 0; }
.results { display: block; }

/* ------------------------------------------------------------- pagination */

.report-section {
  border: none;
  border-radius: 0;
  background: #fff;
  padding: 0;
  margin: 0 0 7mm;
  break-inside: auto;
}

/* Major sections start a fresh page. Everything else flows. */
.founder-message,
.making-the-most,
.about-us,
.interpret-guide,
.category-detail,
.cost-leakage,
.category-summary-grid,
.results-suggest,
.patterns,
.quote-section,
.overall-recap,
.path-forward,
.personal-note,
.future-whitepaper {
  break-before: page;
  page-break-before: always;
}

/* The overall narrative shares a page with the interpret guide;
   results-suggest follows the summary grid; the action plan follows
   the recap; about-scorecard follows the action plan. */
.overall-narrative,
.action-plan,
.about-scorecard,
.closing-line,
.score-hero,
.category-scores {
  break-before: auto;
  page-break-before: auto;
}

/* Blocks that must never split across pages */
.score-card,
.great-block,
.bands-table tr,
.patterns-col,
.recap-widget,
.category-detail-head,
.quote-section,
.deflist li {
  break-inside: avoid;
  page-break-inside: avoid;
}

h1, h2, h3 {
  break-after: avoid;
  page-break-after: avoid;
}
p, li { orphans: 3; widows: 3; }

/* ------------------------------------------------------------ typography */

h2.section-heading { font-size: 17pt; margin: 0 0 4mm; }
h3.sub-heading { font-size: 12pt; margin: 4mm 0 2mm; }
p { margin: 0 0 2.6mm; }
ul, ol { margin: 0 0 3mm; padding-left: 6mm; }
li { margin: 0 0 1.6mm; }

h1, h2, h3, .section-heading, .score-card-name, .categories-lead {
  color: var(--brand-primary, #166a6a) !important;
}
.category-label,
.score-card-band,
.score-dial-band,
.category-detail-score .band {
  color: var(--brand-highlight, #f0913b) !important;
}

/* ---------------------------------------------------------------- cover */

.report-cover {
  position: relative;
  height: 268mm;
  padding: 0;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: var(--brand-primary, #166a6a) !important;
  break-before: auto;
  page-break-before: auto;
  break-after: page;
  page-break-after: always;
  break-inside: avoid;
  page-break-inside: avoid;
}
.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.report-cover .cover-content {
  position: relative;
  height: 100%;
  padding: 30mm 12mm 16mm;
  background: linear-gradient(rgba(13, 60, 60, 0.55), rgba(13, 60, 60, 0.15) 45%, rgba(13, 60, 60, 0.35));
  border-radius: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.report-cover .cover-logo {
  color: var(--brand-accent, #d9a83c) !important;
  letter-spacing: 0.18em;
  font-size: 11pt;
  margin-bottom: 14mm;
}
.report-cover .cover-title {
  color: #fff !important;
  font-size: 30pt;
  line-height: 1.15;
  margin: 0 0 4mm;
  text-shadow: 0 1px 4mm rgba(0, 0, 0, 0.45);
}
.report-cover .cover-tagline {
  color: #fff !important;
  font-size: 12pt;
  text-shadow: 0 1px 3mm rgba(0, 0, 0, 0.45);
  margin: 0 0 24mm;
}
.report-cover .cover-name,
.report-cover .cover-date {
  display: table;
  background: #fff !important;
  color: #222 !important;
  border-radius: 99mm;
  padding: 3mm 12mm;
  margin: 2mm auto;
  font-size: 11pt;
}
.report-cover .cover-name { font-weight: 700; }
.report-cover .cover-footer {
  margin-top: auto;
  color: #fff !important;
  font-size: 9pt;
  text-shadow: 0 1px 2mm rgba(0, 0, 0, 0.5);
}

/* ---------------------------------------------------- teal feature pages */

.teal-page {
  background: var(--brand-primary, #166a6a) !important;
  border-radius: 4mm;
  padding: 10mm 10mm 12mm;
}
.teal-page h2.section-heading,
.teal-page h3.sub-heading,
.teal-page p,
.teal-page li,
.teal-page blockquote {
  color: #fff !important;
}
.teal-page .deflist strong { color: var(--brand-accent, #d9a83c) !important; }
.teal-page .footnote { color: rgba(255, 255, 255, 0.8) !important; }
.teal-page .bullet-list li::marker,
.teal-page .numbered-list li::marker { color: var(--brand-accent, #d9a83c); }

/* -------------------------------------------------------------- score UI */

.score-hero { text-align: center; margin-top: 4mm; }
.score-hero-label { font-size: 14pt; }

.score-dial {
  width: 52mm;
  height: 52mm;
  border: 3.5mm solid var(--brand-accent, #d9a83c);
  border-radius: 50%;
  margin: 4mm auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #fff !important;
}
.score-dial-pct {
  color: var(--brand-primary, #166a6a) !important;
  font-size: 26pt;
  font-weight: 800;
  line-height: 1;
}
.score-dial-small { width: 40mm; height: 40mm; border-width: 2.5mm; }
.score-dial-small .score-dial-pct { font-size: 18pt; }

.score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4mm;
}
.score-card {
  border: 0.4mm solid #d8d8d8;
  border-left: 1.6mm solid var(--brand-accent, #d9a83c);
  border-radius: 2.5mm;
  padding: 4mm 5mm;
  background: #fff !important;
}
.score-card-pct { font-size: 16pt; }
.score-card-summary { font-size: 9pt; }

.bands-table { font-size: 9.5pt; }
.bands-table th {
  background: var(--brand-primary, #166a6a) !important;
  color: #fff !important;
}

.great-block {
  background: #f2f6f6 !important;
  border-left: 1.4mm solid var(--brand-accent, #d9a83c);
  border-radius: 2.5mm;
  padding: 5mm 6mm;
  margin-top: 5mm;
}

/* ----------------------------------------------------------------- images */

.section-image {
  width: 100%;
  max-height: 85mm;
  object-fit: cover;
  border-radius: 2.5mm;
  margin-top: 5mm;
}
.category-banner {
  width: 100%;
  height: 34mm;
  object-fit: cover;
  border-radius: 2.5mm;
  margin-bottom: 4mm;
}

/* ------------------------------------------------------------- misc blocks */

.patterns-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 5mm; }
.patterns-col {
  border: 0.4mm solid #d8d8d8;
  border-radius: 2.5mm;
  padding: 4mm 5mm;
  background: #f7f9f9 !important;
}

.quote-section { text-align: center; padding: 16mm 12mm; }
.quote-img {
  width: 44mm;
  height: 44mm;
  object-fit: cover;
  object-position: top;
  border-radius: 50%;
  border: 1.6mm solid var(--brand-accent, #d9a83c);
  margin: 0 auto 8mm;
  display: block;
}
.quote-section .quote {
  border: none;
  padding: 0;
  font-size: 16pt;
  font-style: italic;
  max-width: 130mm;
  margin: 0 auto;
}
.quote-attribution { color: var(--brand-accent, #d9a83c) !important; font-weight: 600; margin-top: 6mm; }

.recap-widget { text-align: center; margin-top: 5mm; }
.band-scale { display: flex; gap: 3mm; justify-content: center; margin-top: 3mm; }
.band-pill {
  border: 0.4mm solid #cfcfcf;
  border-radius: 99mm;
  padding: 1.5mm 6mm;
  font-size: 8.5pt;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #666;
}
.band-pill.active {
  background: var(--brand-highlight, #f0913b) !important;
  border-color: var(--brand-highlight, #f0913b);
  color: #fff !important;
  font-weight: 700;
}

.footnote { font-size: 8.5pt; color: #666; }
.closing-line { text-align: center; margin-top: 10mm; }
