/* ============================================================
   PORCHLIGHT — PRINT / PDF layout
   Page-based magazine. Reuses report.css component styling.
   Letter portrait (8.5 x 11in). Charts render static (no anim).
   ============================================================ */

@page { size: 8.5in 11in; margin: 0; }

:root { --pgpad: 0.72in; }

html, body { background: #d9d6cf; }
body { margin: 0; }

/* reveals always visible in print */
.reveal { opacity: 1 !important; transform: none !important; }

/* screen preview: stack pages on a grey backdrop */
.sheet {
  display: flex; flex-direction: column; align-items: center;
  gap: 28px; padding: 36px 0;
}
.page {
  width: 8.5in; height: 11in; position: relative; overflow: hidden;
  background: var(--bg); color: var(--ink-soft);
  box-shadow: 0 10px 40px rgba(20,30,45,.22);
  padding: var(--pgpad);
  display: flex; flex-direction: column;
}
.page--pad0 { padding: 0; }
.page__inner { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.page__inner > * { flex-shrink: 0; }

/* running footer */
.pfoot {
  position: absolute; left: var(--pgpad); right: var(--pgpad); bottom: 0.42in;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 8.5pt; letter-spacing: .04em; color: var(--ink-mute);
  text-transform: uppercase; font-weight: 600;
}
.page--dark .pfoot { color: rgba(255,255,255,.5); }
.pfoot .num { font-family: var(--num-font); }

/* page header eyebrow row */
.phead { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.32in; }

/* sizes tuned for print */
.page .display { line-height: 0.98; }
.print-d1 { font-size: 58pt; }
.print-d2 { font-size: 36pt; }
.print-d3 { font-size: 25pt; }

.page .body { font-size: 10.5pt; line-height: 1.62; }
.page .lead { font-size: 13.5pt; line-height: 1.45; }
.page .eyebrow { font-size: 8.5pt; letter-spacing: .2em; }
.page .chapno { font-size: 9pt; }

/* dark full-bleed page */
.page--dark { background: var(--navy-950); color: #fff; }
.page--dark .display, .page--dark h1, .page--dark h2, .page--dark h3 { color: var(--ink); }
.page--dark .body, .page--dark .lead { color: rgba(255,255,255,.8); }
/* program stat labels stay legible on dark program pages */
.page--dark .mini-stat span:not(.num) { color: rgba(255,255,255,.72) !important; }
/* all muted/secondary text turns white on dark pages (mirrors web .panel-dark) */
.page--dark .stat__label,
.page--dark .goal__d,
.page--dark .muted,
.page--dark .chart-sub,
.page--dark .lead { color: #fff !important; }

/* cover */
.pcover { padding: 0; }
.pcover__art {
  position: absolute; inset: 0;
  background:
    radial-gradient(110% 80% at 82% 6%, color-mix(in srgb, var(--sig) 72%, transparent), transparent 55%),
    linear-gradient(165deg, var(--navy-950), color-mix(in srgb, var(--navy-950) 84%, var(--sig)));
}
.pcover__year {
  position: absolute; right: 0.5in; top: 1.1in;
  font-family: var(--num-font); font-weight: var(--display-weight);
  font-size: 230pt; line-height: .8; color: #fff; opacity: .08; letter-spacing: -0.04em;
}
.pcover__body { position: relative; z-index: 2; margin-top: auto; padding: var(--pgpad); color: #fff; }
.pcover__masthead { position: absolute; top: var(--pgpad); left: var(--pgpad); z-index: 2; display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 16pt; letter-spacing: -0.02em; }

/* stat grid tuned */
.page .stats-grid { gap: 0.34in 0.4in; }
.page .stat__num { font-size: 42pt; }
.page .stat__label { font-size: 9.5pt; }
.page--dark .stat { border-color: rgba(255,255,255,.35); }

/* charts: keep compact on page */
.page .chart-card { padding: 0.26in; border-radius: 14px; box-shadow: none; }
.page .bars { height: 1.7in; }
.page .donut svg { width: 150px; height: 150px; }
.page .donut { width: 150px; height: 150px; }
.page .linechart { height: 1.7in; }

/* values + goals tuned */
.page .value h3 { font-size: 16pt; }
.page .value p { font-size: 9.5pt; }
.page .goal__t { font-size: 17pt; }
.page .goal__d { font-size: 9pt; }
.page .goal { padding: 0.16in 0; }

/* program block for print */
.pprogram { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4in; align-items: center; }
.pprogram .shot { aspect-ratio: 4/5; border-radius: 12px; }
.pshot {
  border-radius: 12px; position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 18% 12%, color-mix(in srgb, var(--sig) 55%, transparent), transparent 60%),
    linear-gradient(145deg, var(--sig-deep), var(--navy-900) 92%);
}
.pshot img, .pcover__photo { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.pcover__photo { z-index:0; }
.pshot__tag { position: absolute; left: 12px; bottom: 12px; z-index:3; background: var(--sig); color: #fff; font-size: 7.5pt; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 5px 8px; border-radius: 5px; }

.pquote { font-family: var(--display-font); font-weight: 300; font-size: 22pt; line-height: 1.2; color: var(--ink); }
.pquote .accent-word { font-style: var(--display-italic); color: var(--sig); }

.psign { font-family: var(--display-font); font-style: italic; font-size: 22pt; color: var(--sig); }

/* flow legend tuned */
.page .flowbar { height: 0.5in; }
.page .flow-item .num { font-size: 16pt; }
.page .treemap { grid-auto-rows: 0.52in; }
.page .tm span { font-size: 11pt; }

/* ============================================================
   PRINT-ONLY EDITORIAL BLOCKS (fill the page, add depth)
   ============================================================ */
/* full-bleed photo band with caption */
.pband { position: relative; border-radius: 12px; overflow: hidden; }
.pband img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pband::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; background: linear-gradient(transparent, rgba(0,0,0,.6)); pointer-events: none; }
.pband__cap { position: absolute; z-index: 2; left: 14px; right: 14px; bottom: 11px; color: #fff; font-size: 8.5pt; font-weight: 500; letter-spacing: .02em; text-shadow: 0 1px 8px rgba(0,0,0,.55); }

/* user story / testimonial */
.pstory { border-left: 3px solid var(--sig); padding: 0.02in 0 0.02in 0.24in; }
.pstory__q { font-family: var(--display-font); font-weight: var(--display-weight); font-size: 17pt; line-height: 1.26; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.page--dark .pstory__q { color: #fff; }
.pstory__by { margin: 0.12in 0 0; font-size: 8.5pt; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sig); }

/* numbered process strip */
.pprocess { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.24in; }
.pstep { border-top: 2px solid color-mix(in srgb, var(--sig) 65%, transparent); padding-top: 9px; }
.pstep__n { font-family: var(--num-font); font-weight: var(--display-weight); font-size: 15pt; color: var(--sig); line-height: 1; }
.pstep__t { margin-top: 6px; font-size: 10pt; font-weight: 700; line-height: 1.18; color: var(--ink); }
.page--dark .pstep__t { color: #fff; }
.pstep__d { margin-top: 4px; font-size: 8pt; line-height: 1.38; color: var(--ink-mute); }
.page--dark .pstep__d { color: rgba(255,255,255,.72); }

/* spotlight callout (dark card on a light page) */
.pspot { background: var(--navy-950); border-radius: 12px; padding: 0.26in 0.28in; display: flex; flex-direction: column; justify-content: center; }
.pspot__k { font-size: 8pt; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--sig); }
.pspot__t { font-family: var(--display-font); font-weight: var(--display-weight); font-size: 16pt; letter-spacing: -0.01em; margin: 7px 0 9px; color: var(--ink); }
.pspot__d { font-size: 9.5pt; line-height: 1.5; color: rgba(255,255,255,.84); }
.pspot__d strong { color: #fff; }

/* centered insight line (between stat rows etc.) */
.pinsight { font-family: var(--display-font); font-weight: var(--display-weight); font-size: 15pt; line-height: 1.3; letter-spacing: -0.01em; text-align: center; text-wrap: balance; max-width: 30ch; margin-inline: auto; }
.page--dark .pinsight { color: #fff; }
.pinsight em { font-style: var(--display-italic); color: var(--sig); }

/* testimonial with portrait */
.ptestimonial { display: flex; align-items: center; gap: 0.34in; max-width: 6.6in; }
.ptestimonial__photo { width: 1.35in; height: 1.35in; border-radius: 50%; overflow: hidden; flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sig) 70%, transparent); }
.ptestimonial__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ptestimonial__q { font-family: var(--display-font); font-weight: var(--display-weight); font-size: 15pt; line-height: 1.3; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.page--dark .ptestimonial__q { color: #fff; }
.ptestimonial__by { margin-top: 0.12in; font-size: 8.5pt; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sig); }

/* hide screen-only controls when printing */
@media print {
  html, body { background: #fff !important; margin: 0; padding: 0; }
  .sheet { gap: 0; padding: 0; margin: 0; display: block; }
  .page { box-shadow: none; margin: 0; overflow: hidden; break-inside: avoid; }
  .page:not(:last-child) { break-after: page; }
  .no-print { display: none !important; }
  /* force the navy panels, amber accents, charts and photos to actually print */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* small helpers */
.mtauto { margin-top: auto; }
.divider { height: 2px; background: var(--sig); width: 56px; margin: 0.18in 0; }
.print-note { position: fixed; right: 14px; bottom: 14px; z-index: 99; background: var(--navy-900); color:#fff; font: 600 12px/1 var(--sans-font); padding: 10px 14px; border-radius: 999px; box-shadow: var(--shadow-lg); }
