/* ============ The Deeper You: premium report visual system (Phase V1C) ============

   Scoped entirely under .ica-report-v2 so this stylesheet can never leak
   into or collide with the existing plain report treatment in
   inner-compass-assessment.css, the free result pages, or any other view.

   Design tokens only here: no arbitrary one-off colours/spacing appear
   anywhere else in this file. Values are chosen to match the approved
   Orion cover direction: luminous lavender, pearl, warm cream, mist blue,
   celestial gold accents (never a large fill), deep violet typography.
   Fonts reuse the site's existing Google Fonts load (Playfair Display,
   Inter) from index.html -- no new font files are added. */

.ica-report-v2 {
  --report-paper: #fdfbfa;
  --report-lavender: #ece7f6;
  --report-lavender-soft: #f5f1fb;
  --report-violet: #4a3b7c;
  --report-violet-deep: #2c2154;
  --report-gold: #b9903f;
  /* PHASE V4P.50B1: darker text-only variant of --report-gold, for the
     handful of selectors that set text color (result titles, running
     footer, Contents numerals, pattern label) rather than decorative
     icons/borders/rules -- #b9903f measures ~2.95:1 against white, below
     WCAG AA even at large-bold sizes; #8a6c2f measures ~4.92:1, clearing
     the stricter 4.5:1 normal-text threshold with margin so it stays
     correct however a given placement's exact size/weight is classified.
     --report-gold itself is untouched and remains the token every
     decorative gold element (stars, rules, borders, sparkle dots) uses --
     those have no text-contrast requirement, and changing the shared
     token would have altered their appearance for no accessibility
     benefit. */
  --report-gold-accessible: #8a6c2f;
  --report-gold-soft: #e8d5a8;
  --report-mist-blue: #e4ecf5;
  --report-blush: #f7ecec;
  --report-border: #d9cdb8;
  --report-muted: #6c6478;
  --report-body: #3a3350;

  --report-page-margin: 20mm 18mm;
  --report-section-gap: 2.5rem;
  --report-card-radius: 14px;
  --report-border-weight: 1px;
  --report-shadow: 0 8px 28px rgba(74, 59, 124, 0.10);
  --report-ornament-opacity: 0.55;

  background: var(--report-paper);
  color: var(--report-body);
}

.ica-report-v2 * { box-sizing: border-box; }

.ica-report-v2 .ica-rv2-page {
  position: relative;
  background: var(--report-paper);
  border-radius: var(--report-card-radius);
  padding: 2.75rem 2rem;
  margin: 0 auto 2rem;
  max-width: 760px;
  break-inside: avoid;
  page-break-inside: avoid;
}

/* ---------- typography roles ---------- */
.ica-report-v2 .ica-rv2-display {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: var(--report-violet-deep);
  letter-spacing: 0.01em;
}
.ica-report-v2 .ica-rv2-editorial {
  font-family: "Playfair Display", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  color: var(--report-violet);
}
.ica-report-v2 .ica-rv2-label {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--report-muted);
}
.ica-report-v2 .ica-rv2-body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1.03rem;
  line-height: 1.75;
  color: var(--report-body);
}

/* ---------- persistent running header/footer band (Phase V1E) ---------- */
.ica-report-v2 .ica-rv2-runhead {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  font-family: "Inter", sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--report-muted);
  border-bottom: var(--report-border-weight) solid var(--report-border);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}
.ica-report-v2 .ica-rv2-runfoot {
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--report-gold-accessible);
  border-top: var(--report-border-weight) solid var(--report-border);
  padding-top: 0.75rem;
  margin-top: 2rem;
}
/* PHASE: print foundation fix. break-inside:avoid alone does not stop a
   trailing single-line band from being orphaned onto its own physical
   page: that property only governs splitting content INSIDE a box, not
   whether the whole (already unsplittable) box gets pushed as a unit
   when it doesn't fit in the space remaining at the bottom of a page --
   which is exactly what was happening. Taking the band fully out of
   normal flow removes it from print pagination's fragmentation
   decisions entirely, so it can never be pushed alone onto a fresh
   page. Positioned against .ica-rv2-page's own padding box, "bottom: 0"
   lands it in exactly the same visual place normal flow already put it
   (immediately after the page's real content, before the page's own
   bottom padding) for the ordinary one-physical-page case, and at the
   true end of content for the one chapter that legitimately flows
   across more than one physical page (Personal Patterns) -- both
   unchanged from the pre-fix visual result. */
@media print {
  .ica-report-v2 .ica-rv2-runfoot {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
  }
}
.ica-report-v2 .ica-rv2-cover .ica-rv2-runhead,
.ica-report-v2 .ica-rv2-cover .ica-rv2-runfoot { display: none; }

/* ---------- gold divider rule, chapter opener chrome ---------- */
.ica-report-v2 .ica-rv2-gold-rule {
  display: block;
  width: 64px;
  height: 2px;
  margin: 0.6rem auto 1.4rem;
  background: var(--report-gold);
}
.ica-report-v2 .ica-rv2-chapter-eyebrow { text-align: center; margin: 0 0 0.4rem; }
.ica-report-v2 .ica-rv2-chapter-title {
  text-align: center;
  font-size: 2rem;
  margin: 0 0 0.2rem;
}
.ica-report-v2 .ica-rv2-chapter-standfirst {
  text-align: center;
  font-size: 1.08rem;
  max-width: 520px;
  margin: 0 auto 1.8rem;
}
@media print {
  .ica-report-v2 .ica-rv2-chapter-eyebrow,
  .ica-report-v2 .ica-rv2-chapter-title,
  .ica-report-v2 .ica-rv2-gold-rule {
    break-after: avoid;
    page-break-after: avoid;
  }
}

/* ---------- shared celestial ornament (pure CSS, no image) ---------- */
.ica-report-v2 .ica-rv2-arc {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--report-ornament-opacity);
  background:
    radial-gradient(circle at 50% 8%, rgba(185, 144, 63, 0.12), transparent 42%),
    repeating-conic-gradient(from 0deg, transparent 0deg 5deg, rgba(185, 144, 63, 0.05) 5deg 6deg);
  border-radius: inherit;
}
.ica-report-v2 .ica-rv2-frame {
  border: var(--report-border-weight) solid var(--report-gold);
  outline: 1px solid rgba(185, 144, 63, 0.25);
  outline-offset: 6px;
}

/* Denser star field behind the cover, layered under the existing gradient.
   Pure CSS (radial-gradient dots), no new image asset. */
.ica-report-v2 .ica-rv2-starfield {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.7;
  background-image:
    radial-gradient(1.6px 1.6px at 8% 12%, var(--report-gold) 60%, transparent),
    radial-gradient(1.2px 1.2px at 18% 30%, var(--report-violet) 50%, transparent),
    radial-gradient(1.4px 1.4px at 32% 8%, var(--report-gold) 60%, transparent),
    radial-gradient(1px 1px at 45% 22%, var(--report-violet) 50%, transparent),
    radial-gradient(1.6px 1.6px at 62% 6%, var(--report-gold) 60%, transparent),
    radial-gradient(1.2px 1.2px at 78% 16%, var(--report-violet) 50%, transparent),
    radial-gradient(1.4px 1.4px at 90% 10%, var(--report-gold) 60%, transparent),
    radial-gradient(1px 1px at 12% 88%, var(--report-violet) 50%, transparent),
    radial-gradient(1.4px 1.4px at 88% 90%, var(--report-gold) 60%, transparent),
    radial-gradient(1.2px 1.2px at 70% 82%, var(--report-violet) 50%, transparent);
  background-repeat: no-repeat;
}

/* Fine gold corner flourishes on the cover frame, echoing the reference's
   ornamental corner brackets. */
.ica-report-v2 .ica-rv2-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 1px solid var(--report-gold);
  opacity: 0.8;
  pointer-events: none;
}
.ica-report-v2 .ica-rv2-corner-tl { top: 10px; left: 10px; border-width: 1px 0 0 1px; }
.ica-report-v2 .ica-rv2-corner-tr { top: 10px; right: 10px; border-width: 1px 1px 0 0; }
.ica-report-v2 .ica-rv2-corner-bl { bottom: 10px; left: 10px; border-width: 0 0 1px 1px; }
.ica-report-v2 .ica-rv2-corner-br { bottom: 10px; right: 10px; border-width: 0 1px 1px 0; }

/* Orbital ring backdrop behind Guardian art (cover + opener). */
.ica-report-v2 .ica-rv2-orbits {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 128%;
  height: 128%;
  color: var(--report-gold);
  opacity: 0.55;
  pointer-events: none;
}

/* Small four-point star glyphs used as divider/eyebrow/brand accents. */
.ica-report-v2 .ica-rv2-brand-star,
.ica-report-v2 .ica-rv2-eyebrow-star,
.ica-report-v2 .ica-rv2-foot-star {
  width: 0.6em;
  height: 0.6em;
  color: var(--report-gold);
  vertical-align: middle;
  margin: 0 0.4em;
}
.ica-report-v2 .ica-rv2-eyebrow-star { margin: 0 0.4em 0 0; }

/* ---------- A. hero cover ---------- */
.ica-report-v2 .ica-rv2-cover {
  position: relative;
  background: linear-gradient(180deg, var(--report-mist-blue) 0%, var(--report-lavender-soft) 55%, var(--report-paper) 100%);
  text-align: center;
  padding: 2.5rem 2rem 3rem;
  overflow: hidden;
}
.ica-report-v2 .ica-rv2-cover-brand {
  font-family: "Inter", sans-serif;
  letter-spacing: 0.32em;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--report-violet);
  margin: 0 0 1.25rem;
}
.ica-report-v2 .ica-rv2-cover-arc {
  position: absolute;
  left: 50%;
  border: 1px solid var(--report-gold);
  border-bottom: none;
  border-radius: 999px 999px 0 0;
  opacity: 0.4;
  pointer-events: none;
}
.ica-report-v2 .ica-rv2-cover-arc-1 { top: -60px; width: 520px; height: 260px; transform: translateX(-50%); }
.ica-report-v2 .ica-rv2-cover-arc-2 { top: -30px; width: 620px; height: 310px; transform: translateX(-50%); opacity: 0.25; }
.ica-report-v2 .ica-rv2-cover-plus {
  position: absolute;
  color: var(--report-gold);
  font-size: 0.9rem;
  opacity: 0.6;
  pointer-events: none;
}
.ica-report-v2 .ica-rv2-cover-plus-1 { top: 18%; left: 10%; }
.ica-report-v2 .ica-rv2-cover-plus-2 { top: 10%; right: 12%; }
.ica-report-v2 .ica-rv2-cover-plus-3 { bottom: 22%; left: 14%; }
.ica-report-v2 .ica-rv2-cover-rule {
  margin: 0.4rem auto 1.6rem;
}
.ica-report-v2 .ica-rv2-cover-art {
  /* PHASE V4P.50B2C: the official Sprint 3 mascot art is a transparent,
     character-scale PNG (not a full-bleed painted scene), so this
     container now supplies its own report-owned celestial "stage" --
     a soft radial glow behind the character -- rather than relying on
     the image's own background to fill the frame. The mascot artwork
     itself is never touched; only this presentation layer is new. */
  position: relative;
  max-width: 420px;
  margin: 0 auto 1.5rem;
  border-radius: 999px 999px 24px 24px;
  background: radial-gradient(ellipse 68% 62% at 50% 58%, var(--report-gold-soft) 0%, var(--report-lavender-soft) 55%, transparent 82%);
}
.ica-report-v2 .ica-rv2-cover-art img {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 999px 999px 24px 24px;
}
@media print {
  /* PHASE V4P.51A.1: print-only Cover mascot height bound. The 16
     official Sprint 3 fullbody assets are NOT a uniform aspect ratio --
     Orion is a 1:1 square (1024x1024) but the other 15 range from 1.25:1
     to 1.5:1 (taller). Screen layout only ever bounded width
     (max-width:420px, height:auto), so on screen a taller-ratio Guardian
     simply renders taller with no consequence -- but confirmed by real
     Chromium print-to-PDF (V4P.51A), Orion's square art already used
     nearly the full measured print-safe image budget on the Cover page
     (~257mm total content height per the @page rule below, ~155mm of
     which is fixed Cover chrome -- title/tagline/prepared-for/pills/
     result-title/supporting-text/footer -- leaving roughly 100mm for
     the art); a taller-ratio Guardian (confirmed with Bruno, 1.33:1)
     exceeds that budget and splits the whole Cover card across 2
     physical pages. Bounding both axes here and letting the image
     letterbox via object-fit:contain keeps every Guardian's rendered
     footprint identical regardless of intrinsic ratio -- one shared
     print contract, no per-Guardian CSS, no change to the untouched
     source WebP files, and no change to the screen/mobile/tablet layout
     above (this rule exists only under @media print). */
  .ica-report-v2 .ica-rv2-cover-art {
    max-width: 95mm;
    margin: 0 auto 1.5rem;
    overflow: hidden;
  }
  .ica-report-v2 .ica-rv2-cover-art img {
    /* An explicit height (rather than max-height:100% on a container
       whose own height is only a max-height constraint, not a definite
       height) is required here -- confirmed by real Chromium print-to-
       PDF against Bruno: the percentage-based approach left the
       container's resolved height ambiguous, so the image rendered at
       its full unbounded height anyway, overlapping the "TypeKingdom"
       brand mark above it and completely hiding "The Deeper You" title
       below it. A fixed physical height on the image itself has no such
       ambiguity -- same fix as the matching Guardian Letter and Closing
       art rules. */
    width: auto;
    height: 80mm;
    max-width: 100%;
    margin: 0 auto;
    object-fit: contain;
  }
}
.ica-report-v2 .ica-rv2-cover-title {
  font-size: clamp(2.1rem, 5vw, 3rem);
  margin: 0.25rem 0 0.6rem;
}
.ica-report-v2 .ica-rv2-cover-tagline {
  font-size: 1.08rem;
  margin: 0 0 1.5rem;
}
.ica-report-v2 .ica-rv2-cover-prepared {
  margin: 0 0 0.2rem;
}
.ica-report-v2 .ica-rv2-cover-name {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--report-violet-deep);
  margin: 0 0 1rem;
}
.ica-report-v2 .ica-rv2-cover-pills {
  display: inline-flex;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: var(--report-lavender);
  font-family: "Inter", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--report-violet);
  margin-bottom: 1.4rem;
}
.ica-report-v2 .ica-rv2-cover-resulttitle {
  font-size: 1.2rem;
  letter-spacing: 0.03em;
  color: var(--report-gold-accessible);
  text-transform: uppercase;
  margin: 0 0 0.6rem;
}
.ica-report-v2 .ica-rv2-cover-supporting {
  font-size: 1.02rem;
  max-width: 480px;
  margin: 0 auto 1.75rem;
}
.ica-report-v2 .ica-rv2-cover-foot {
  font-family: "Inter", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--report-muted);
  border-top: var(--report-border-weight) solid var(--report-border);
  padding-top: 1rem;
}

/* ---------- Phase 2: essay chapters (opening-synthesis, growth-needs,
   off-balance, contribution-value, guardian-message) -- one shared,
   simple editorial archetype: chapter head, then paragraphs. ---------- */
.ica-report-v2 .ica-rv2-essay { padding-top: 2.75rem; padding-bottom: 2.75rem; }
.ica-report-v2 .ica-rv2-essay .ica-rv2-body { margin: 0 0 1.1rem; }
.ica-report-v2 .ica-rv2-essay .ica-rv2-body:last-child { margin-bottom: 0; }
.ica-report-v2 .ica-rv2-guardian-message { background: var(--report-lavender-soft); }
/* PHASE V4P.50B1: Guardian Letter sign-off portrait -- appended after the letter body via
   renderEssayChapter()'s new optional afterBody slot. Deliberately smaller and quieter than
   Closing's ceremonial art (max-width 220px here vs Closing's 380px, a lighter shadow, no bottom
   margin beyond normal essay spacing) so this page reads as an intimate sign-off rather than
   repeating the final-page finale. Its own class, never ica-rv2-closing-art, so the two can be
   tuned independently even though both resolve the same underlying hero asset. */
.ica-report-v2 .ica-rv2-guardian-message-art {
  /* PHASE V4P.50B2C: report-owned celestial stage, quieter than Cover's own (smaller radius,
     softer glow) -- see the matching Cover note for why this container now paints its own
     background rather than relying on the mascot image's own scene. */
  position: relative;
  max-width: 220px;
  width: 45%;
  min-width: 150px;
  margin: 2rem auto 0;
  border-radius: 999px 999px 20px 20px;
  background: radial-gradient(ellipse 66% 60% at 50% 58%, var(--report-gold-soft) 0%, var(--report-lavender-soft) 58%, transparent 84%);
}
.ica-report-v2 .ica-rv2-guardian-message-art img {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 999px 999px 20px 20px;
  filter: drop-shadow(0 0 16px rgba(185, 144, 63, 0.18));
}
@media print {
  /* PHASE V4P.51A.1: real Chromium print-to-PDF (V4P.51A) confirmed the
     Guardian Letter's sign-off portrait was tall enough, at its
     unbounded screen size, to never fit in whatever space remained below
     the letter text on Chapter 13's one print page -- so it broke onto
     its own page alone with only the running footer for company
     (reproduced for both Orion and Bruno, so this is systemic, not one
     Guardian's proportions). Measured remaining space below the Gold
     Standard letter's last line was ~57mm; bounding the art to 42mm here
     (well under that, since Chapter 13 letters range 8-18 paragraphs and
     shorter letters leave less room to spare) gives it a real chance to
     land on the same page as the letter for every profile. Where a
     profile's letter is long enough that even the bounded art still has
     nowhere to go, break-before/break-inside "avoid" ask Chromium to
     keep the art attached to whatever content immediately precedes it
     rather than stranding it alone -- so the worst case becomes "art
     plus its nearest preceding paragraph(s) move to a fresh page
     together", never "art alone on a near-blank page". Screen/mobile/
     tablet layout is untouched (print-only). */
  .ica-report-v2 .ica-rv2-guardian-message-art {
    max-height: 34mm;
    max-width: 46mm;
    margin: 0.6rem auto 0;
    overflow: hidden;
    break-before: avoid;
    page-break-before: avoid;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .ica-report-v2 .ica-rv2-guardian-message-art img {
    width: auto;
    height: 34mm;
    max-width: 100%;
    margin: 0 auto;
    object-fit: contain;
  }
  /* Reinforces the keep-together binding from the other side: the letter
     paragraph immediately preceding the art (selected precisely via
     :has(), supported by the Chromium version this project's print QA
     already depends on, rather than the existing nth-last-child(2) rule
     a few lines above, which only matches .ica-rv2-essay and silently
     stops matching Chapter 13 once the art is present as an extra
     trailing sibling after it). */
  .ica-report-v2 .ica-rv2-guardian-message .ica-rv2-body:has(+ .ica-rv2-guardian-message-art) {
    break-after: avoid;
    page-break-after: avoid;
  }
}
@media print {
  /* PHASE: orphan spill pagination fix (see the matching .ica-rv2-
     contents-foot rule for the full mechanism explanation). An essay
     chapter's paragraphs are plain flowing content with no break rule of
     their own; when the whole chapter's real content (Guardian Letter,
     What You May Need More Than You Realise, etc.) lands just over one
     A4 page, the last paragraph -- sometimes a short one, like the
     Guardian's own name-and-title attribution line -- can flow onto its
     own page alone. Confirmed for real Oswald Action-led content:
     "Oswald the Octopus - Guardian of Transformation" printed alone
     with only the running footer for company.

     ":last-child" does NOT select the true last paragraph here -- proven
     empirically (matches("... .ica-rv2-body:last-child") returned false)
     the same way it failed for the Closing page: every interior chapter
     has a .ica-rv2-runfoot band injected as a real trailing DOM sibling
     after the renderer's own content (see pageFooter()/the "chromed"
     wrap in renderDeeperYouReport()), so the runfoot -- not the last
     paragraph -- is always the actual last child. That injection is
     unconditional for every interior chapter, so the real last paragraph
     is reliably the SECOND-to-last child instead. */
  .ica-report-v2 .ica-rv2-essay .ica-rv2-body:nth-last-child(2) {
    break-before: avoid;
    page-break-before: avoid;
  }
}

/* ---------- Phase 2.6: subsection headings inside an essay chapter,
   used when a canon field's own `blocks` array carries internal
   "subheading" entries (currently growthAreas). Violet/gold editorial
   treatment matching the rest of the report's hierarchy, distinct from
   the top-level chapter title. ---------- */
.ica-report-v2 .ica-rv2-subsection-heading {
  font-size: 1.15rem;
  color: var(--report-violet-deep);
  border-left: 3px solid var(--report-gold);
  padding-left: 0.85rem;
  margin: 1.8rem 0 0.9rem;
}
.ica-report-v2 .ica-rv2-essay .ica-rv2-subsection-heading:first-child { margin-top: 0; }
@media print {
  .ica-report-v2 .ica-rv2-subsection-heading {
    break-after: avoid;
    page-break-after: avoid;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .ica-report-v2 .ica-rv2-subsection-heading + .ica-rv2-body {
    break-before: avoid;
    page-break-before: avoid;
  }
}

/* ---------- Phase 2: Guardian Promise callout, shown exactly once
   (Guardian chapter only) -- see the assembler's Guardian Quotation
   Rule. ---------- */
.ica-report-v2 .ica-rv2-guardian-promise {
  margin-top: 1.5rem;
  padding: 1.1rem 1.3rem;
  border-left: 3px solid var(--report-gold);
  background: var(--report-lavender);
  border-radius: 0 10px 10px 0;
}
.ica-report-v2 .ica-rv2-guardian-promise-label { margin: 0 0 0.4rem; }
.ica-report-v2 .ica-rv2-guardian-promise-text { margin: 0; font-size: 1.05rem; }

/* ---------- Phase V4P.35I: general-production V4 Chapter 12 framing
   labels ("Try this, and why it fits you" / "Reflection"), additive
   only -- the frozen v3/Gold-Standard Chapter 12 shape never emits
   these classes. ---------- */
.ica-report-v2 .ica-rv2-next-step-framing-label { margin: 1.1rem 0 0.4rem; }
.ica-report-v2 .ica-rv2-next-step-reflection-label { margin: 1.1rem 0 0.4rem; }

/* ---------- Phase 2: Guardian x Natural Approach synergy addendum,
   folded into the same Guardian chapter page as a labelled continuation
   rather than a separate top-level chapter. ---------- */
.ica-report-v2 .ica-rv2-opener-synergy {
  grid-column: 1 / -1;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}
.ica-report-v2 .ica-rv2-opener-synergy-label { text-align: left; margin: 0 0 0.8rem; }
.ica-report-v2 .ica-rv2-opener-synergy .ica-rv2-gold-rule { margin-left: 0; }

/* ---------- Contents page ---------- */
.ica-report-v2 .ica-rv2-contents { text-align: center; padding-top: 3rem; padding-bottom: 3rem; }
.ica-report-v2 .ica-rv2-contents-eyebrow { margin: 0 0 1.5rem; }
.ica-report-v2 .ica-rv2-toc {
  list-style: none;
  margin: 0 auto 2rem;
  padding: 0;
  max-width: 420px;
  text-align: left;
}
.ica-report-v2 .ica-rv2-toc li {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-bottom: var(--report-border-weight) solid var(--report-border);
}
.ica-report-v2 .ica-rv2-toc li:last-child { border-bottom: none; }
/* PHASE V4P.53A: Contents entries are now real <a href="#..."> links to
   their chapter; this neutralises default link styling (colour,
   underline) so the page reads exactly as before, just clickable. */
.ica-report-v2 .ica-rv2-toc li a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  width: 100%;
  color: inherit;
  text-decoration: none;
}
.ica-report-v2 .ica-rv2-toc-num {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  color: var(--report-gold-accessible);
  font-size: 1.1rem;
  min-width: 1.4rem;
}
.ica-report-v2 .ica-rv2-toc-title {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  color: var(--report-violet-deep);
  font-size: 1.02rem;
}
.ica-report-v2 .ica-rv2-contents-foot { font-size: 1.05rem; }
@media print {
  /* PHASE: orphan spill pagination fix. Validated empirically: neither
     this closing tagline nor an essay chapter's last paragraph (see the
     .ica-rv2-essay rule below) ever carried any break-avoidance rule at
     all -- both are ordinary flowing content. When a section's total
     content lands just barely taller than one A4 page (varies by real
     customer content length; content-dependent, not a fixed threshold),
     normal pagination simply flows whatever doesn't fit onto a fresh
     page, and when the overflow is only the short trailing line, that
     line prints alone. break-before: avoid asks the print engine to
     prefer NOT starting a fresh page immediately before this element --
     which in practice means fitting it on the same page as at least
     some of what precedes it, rather than isolating it. This is
     deliberately NOT break-inside or a container-level rule (neither
     addresses where the break falls within already-flowing content),
     and deliberately does not shrink font size, padding or margins to
     force a fit -- that would affect the whole report, not just these
     borderline single-paragraph tails. */
  .ica-report-v2 .ica-rv2-contents-foot {
    break-before: avoid;
    page-break-before: avoid;
  }
}

/* ---------- Intro page ("how to read this guide") ---------- */
.ica-report-v2 .ica-rv2-intro { padding-top: 3rem; padding-bottom: 3rem; }
.ica-report-v2 .ica-rv2-intro-eyebrow,
.ica-report-v2 .ica-rv2-intro-title,
.ica-report-v2 .ica-rv2-intro .ica-rv2-gold-rule { text-align: center; margin-left: auto; margin-right: auto; }
.ica-report-v2 .ica-rv2-intro .ica-rv2-body { max-width: 560px; margin: 0 auto 1.1rem; }

/* ---------- C. Guardian identity opener (Chapter 1) ---------- */
.ica-report-v2 .ica-rv2-opener {
  display: grid;
  grid-template-columns: minmax(0, 260px) 1fr;
  gap: 2.25rem;
  align-items: start;
  background: var(--report-lavender-soft);
}
/* PHASE 3C.3 print-QA fix: a Guardian with no registered report art (15 of
   16 today) renders an empty first grid child. minmax(0, 260px) still
   resolves to its full 260px maximum regardless of that child's (empty)
   content, leaving a wide dead column beside a needlessly narrowed text
   column -- invisible on screens narrower than the 600px breakpoint below,
   which is why Phase 3C.2's browser-only visual QA missed it, but visible
   on any wider viewport, including real A4 print output. Only the
   art-column track collapses; the text content and its typography are
   otherwise unchanged. */
.ica-report-v2 .ica-rv2-opener-no-art { grid-template-columns: 1fr; }
.ica-report-v2 .ica-rv2-opener-art {
  position: relative;
  padding: 14px;
}
.ica-report-v2 .ica-rv2-opener-art img {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 999px 999px 16px 16px;
  overflow: hidden;
  box-shadow: var(--report-shadow);
}
.ica-report-v2 .ica-rv2-opener .ica-rv2-chapter-eyebrow,
.ica-report-v2 .ica-rv2-opener .ica-rv2-chapter-title,
.ica-report-v2 .ica-rv2-opener .ica-rv2-gold-rule { text-align: left; margin-left: 0; }
.ica-report-v2 .ica-rv2-opener .ica-rv2-chapter-title { font-size: 1.6rem; }
.ica-report-v2 .ica-rv2-opener-title { font-size: 1.8rem; margin: 0 0 0.5rem; }
.ica-report-v2 .ica-rv2-opener-supporting { font-size: 1.05rem; margin: 0 0 1rem; }

@media (max-width: 600px) {
  .ica-report-v2 .ica-rv2-opener { grid-template-columns: 1fr; }
  .ica-report-v2 .ica-rv2-opener-art { max-width: 260px; margin: 0 auto; }
  .ica-report-v2 .ica-rv2-opener .ica-rv2-chapter-eyebrow,
  .ica-report-v2 .ica-rv2-opener .ica-rv2-chapter-title,
  .ica-report-v2 .ica-rv2-opener .ica-rv2-gold-rule { text-align: center; margin-left: auto; margin-right: auto; }
}

/* ---------- E. Your Personal Patterns chapter: ONE consolidated chapter
   holding all 11 real dimension sections as flowing numbered subsections,
   each separated by a gold rule, instead of 11 separate full-bleed pages.
   This is the direct visual fix for the "one section = one large minimal
   page" density problem -- same real content, denser editorial rhythm. ---------- */
.ica-report-v2 .ica-rv2-patterns { padding-top: 2.5rem; }
.ica-report-v2 .ica-rv2-pattern {
  padding: 1.75rem 0;
  break-inside: avoid;
  page-break-inside: avoid;
}
.ica-report-v2 .ica-rv2-pattern:first-of-type { padding-top: 0; }
.ica-report-v2 .ica-rv2-pattern-rule {
  /* PHASE V4P.50B1: this rule's own width/max-width/background/margin
     declarations were already authored correctly, but a bare <span> is
     display:inline by default, so none of a box-model property took
     effect -- the divider had a 0x0 bounding box and never rendered
     (confirmed via getComputedStyle in V4P.50A). display:block plus an
     explicit height is the only change needed to make the already-
     authored visual rule actually appear; no other declaration touched. */
  display: block;
  height: 1px;
  margin: 1.5rem auto;
  width: 100%;
  max-width: 220px;
  background: var(--report-border);
}
.ica-report-v2 .ica-rv2-pattern-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-align: center;
}
.ica-report-v2 .ica-rv2-pattern-heading { font-size: 1.5rem; margin: 0.3rem 0 0.5rem; text-align: center; }
.ica-report-v2 .ica-rv2-pattern-explanation {
  color: var(--report-muted);
  margin: 0 0 1.4rem;
  text-align: center;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}
.ica-report-v2 .ica-rv2-pattern-label {
  display: block;
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-style: italic;
  font-size: 1.2rem;
  letter-spacing: 0.01em;
  color: var(--report-gold-accessible);
  margin: 0 0 1.3rem;
}

/* ---------- D. DISC page: its own editorial archetype (low decoration,
   no spectrum, no card frame, no eyebrow ornament -- deliberately not
   the dimension archetype). ---------- */
.ica-report-v2 .ica-rv2-disc {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.ica-report-v2 .ica-rv2-disc-heading { font-size: 1.6rem; margin: 0 0 0.9rem; }
.ica-report-v2 .ica-rv2-disc-explanation { color: var(--report-muted); margin: 0 0 1.3rem; }
.ica-report-v2 .ica-rv2-disc-label { font-size: 1.15rem; margin: 0 0 1.6rem; }
.ica-report-v2 .ica-rv2-disc-block {
  padding: 1.1rem 0;
  border-top: var(--report-border-weight) solid var(--report-border);
}
.ica-report-v2 .ica-rv2-disc-block:first-of-type { border-top: none; padding-top: 0; }
.ica-report-v2 .ica-rv2-disc-block-name {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  color: var(--report-violet-deep);
  margin: 0 0 0.4rem;
}

/* ---------- G. Growth Direction: medium decoration, slightly more
   weight than a dimension page, never repeating the cover/opener. ---------- */
.ica-report-v2 .ica-rv2-growth {
  text-align: center;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
.ica-report-v2 .ica-rv2-growth-mark { display: inline-block; width: 1.1rem; height: 1.1rem; color: var(--report-gold); margin: 0 0 1rem; }
.ica-report-v2 .ica-rv2-growth-heading { font-size: 1.9rem; margin: 0 0 1.2rem; }
.ica-report-v2 .ica-rv2-growth .ica-rv2-body { max-width: 520px; margin: 0 auto; text-align: left; }

/* ---------- pagination quality: keep small atomic groups from splitting
   awkwardly across a printed page boundary. Body prose itself is left
   free to flow across pages naturally when genuinely long. ---------- */
@media print {
  .ica-report-v2 .ica-rv2-pattern-eyebrow,
  .ica-report-v2 .ica-rv2-pattern-heading,
  .ica-report-v2 .ica-rv2-pattern-explanation,
  .ica-report-v2 .ica-rv2-pattern-label,
  .ica-report-v2 .ica-rv2-spectrum {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .ica-report-v2 .ica-rv2-pattern-heading { break-after: avoid; page-break-after: avoid; }
  .ica-report-v2 .ica-rv2-disc-block { break-inside: avoid; page-break-inside: avoid; }
  .ica-report-v2 .ica-rv2-disc-heading,
  .ica-report-v2 .ica-rv2-growth-heading { break-after: avoid; page-break-after: avoid; }
  .ica-report-v2 .ica-rv2-runhead,
  .ica-report-v2 .ica-rv2-runfoot { break-inside: avoid; page-break-inside: avoid; }
}

/* Five-position spectrum, styled as an editorial assessment mark rather
   than a progress bar: a fine gold-tinted line with small diamond ticks,
   the active position rendered as a soft glowing star. The real
   customerLabel above remains the primary, sufficient carrier of meaning
   (aria-hidden here). */
.ica-report-v2 .ica-rv2-spectrum {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: 380px;
  margin: 0 auto 2rem;
}
.ica-report-v2 .ica-rv2-spectrum-track {
  flex: 1;
  height: 1px;
  background: var(--report-border);
  position: relative;
}
.ica-report-v2 .ica-rv2-spectrum-tick {
  position: absolute;
  top: 50%;
  width: 5px;
  height: 5px;
  background: var(--report-border);
  transform: translate(-50%, -50%) rotate(45deg);
}
.ica-report-v2 .ica-rv2-spectrum-dot {
  position: absolute;
  top: 50%;
  width: 11px;
  height: 11px;
  background: var(--report-gold);
  box-shadow: 0 0 0 5px rgba(185, 144, 63, 0.16);
  transform: translate(-50%, -50%) rotate(45deg);
}

/* ---------- H. Type Passport ---------- */
.ica-report-v2 .ica-rv2-passport {
  background: linear-gradient(160deg, var(--report-lavender-soft), var(--report-paper));
  border: 1.5px solid var(--report-gold);
  border-radius: 18px;
  position: relative;
  padding-top: 2.25rem;
}
.ica-report-v2 .ica-rv2-passport-seal {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid var(--report-gold);
  box-shadow: var(--report-shadow);
}
.ica-report-v2 .ica-rv2-passport-seal img { width: 100%; height: 100%; object-fit: cover; }
.ica-report-v2 .ica-rv2-passport-eyebrow {
  text-align: center;
  margin: 0 0 0.9rem;
}
.ica-report-v2 .ica-rv2-passport-title { text-align: center; font-size: 1.7rem; margin: 0 0 0.2rem; }
.ica-report-v2 .ica-rv2-passport-name { text-align: center; font-size: 1.1rem; margin: 0 0 0.9rem; }
.ica-report-v2 .ica-rv2-passport-resulttitle {
  text-align: center;
  color: var(--report-gold-accessible);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 1rem;
  margin: 0 0 0.5rem;
}
.ica-report-v2 .ica-rv2-passport-identity {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--report-violet);
  margin: 0 0 1.4rem;
}
.ica-report-v2 .ica-rv2-passport-disc {
  text-align: center;
  font-family: "Inter", sans-serif;
  font-size: 0.92rem;
  color: var(--report-body);
  padding-top: 1.1rem;
  margin: 0 0 1.4rem;
  border-top: var(--report-border-weight) solid var(--report-border);
}
.ica-report-v2 .ica-rv2-passport-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 2rem;
}
.ica-report-v2 .ica-rv2-passport-item {
  padding: 0.55rem 0;
  border-bottom: var(--report-border-weight) solid var(--report-border);
}
.ica-report-v2 .ica-rv2-passport-item:nth-last-child(-n+2) { border-bottom: none; }
.ica-report-v2 .ica-rv2-passport-item-heading {
  font-family: "Inter", sans-serif;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--report-muted);
  margin: 0 0 0.15rem;
}
.ica-report-v2 .ica-rv2-passport-item-label {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--report-violet-deep);
  margin: 0;
}
@media (max-width: 520px) {
  .ica-report-v2 .ica-rv2-passport-grid { grid-template-columns: 1fr; }
  .ica-report-v2 .ica-rv2-passport-item:nth-last-child(-n+2) { border-bottom: var(--report-border-weight) solid var(--report-border); }
  .ica-report-v2 .ica-rv2-passport-item:last-child { border-bottom: none; }
}

/* ---------- PHASE V4P.56B: V4 Gold Class Chapter 14 additions. The
   V1/V2/V3 passport rules above are untouched and remain the sole
   styling for that markup; everything below is additive, scoped to the
   new .ica-rv2-passport-gold sections only. ---------- */
.ica-report-v2 .ica-rv2-passport-subheading {
  font-size: 1.05rem;
  text-align: center;
  margin: 1.6rem 0 0.8rem;
}
.ica-report-v2 .ica-rv2-passport-core {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 2rem;
  row-gap: 0.5rem;
  padding-top: 1rem;
  margin: 0 0 1.4rem;
  border-top: var(--report-border-weight) solid var(--report-border);
}
.ica-report-v2 .ica-rv2-passport-core-row {
  font-family: "Inter", sans-serif;
  font-size: 0.88rem;
  color: var(--report-body);
  margin: 0;
}
.ica-report-v2 .ica-rv2-passport-core-label {
  display: block;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--report-muted);
  margin: 0 0 0.15rem;
}
.ica-report-v2 .ica-rv2-passport-patterns { margin: 0 0 0.5rem; }
.ica-report-v2 .ica-rv2-passport-pattern {
  padding: 0.7rem 0;
  border-bottom: var(--report-border-weight) solid var(--report-border);
}
.ica-report-v2 .ica-rv2-passport-pattern:last-child { border-bottom: none; }
.ica-report-v2 .ica-rv2-passport-pattern-heading {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--report-violet-deep);
  margin: 0 0 0.15rem;
}
.ica-report-v2 .ica-rv2-passport-pattern-spectrum {
  font-family: "Inter", sans-serif;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--report-muted);
  margin: 0 0 0.3rem;
}
.ica-report-v2 .ica-rv2-passport-pattern-expression,
.ica-report-v2 .ica-rv2-passport-pattern-summary {
  font-size: 0.85rem;
  color: var(--report-body);
  margin: 0 0 0.3rem;
}
.ica-report-v2 .ica-rv2-passport-pattern-summary { margin-bottom: 0; font-style: italic; }
.ica-report-v2 .ica-rv2-passport-keep,
.ica-report-v2 .ica-rv2-passport-questions,
.ica-report-v2 .ica-rv2-passport-final-note {
  padding-top: 1rem;
  margin: 0 0 0.5rem;
  border-top: var(--report-border-weight) solid var(--report-border);
}
.ica-report-v2 .ica-rv2-passport-keep-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--report-body);
}
.ica-report-v2 .ica-rv2-passport-questions-list {
  font-size: 0.88rem;
  color: var(--report-body);
  padding-left: 1.3rem;
  margin: 0;
}
.ica-report-v2 .ica-rv2-passport-questions-list li { margin-bottom: 0.4rem; }
.ica-report-v2 .ica-rv2-passport-final-note-text {
  font-size: 0.9rem;
  color: var(--report-body);
}
@media (max-width: 520px) {
  .ica-report-v2 .ica-rv2-passport-core { grid-template-columns: 1fr; }
}

/* ---------- I. Guardian closing page ---------- */
.ica-report-v2 .ica-rv2-closing {
  text-align: center;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
.ica-report-v2 .ica-rv2-closing-text {
  max-width: 480px;
  margin: 0 auto 3rem;
  font-size: 1.08rem;
}
.ica-report-v2 .ica-rv2-closing-art {
  /* PHASE V4P.50B2C: the strongest of the three report-owned celestial stages, matching
     Closing's own ceremonial weight -- see the matching Cover note for the underlying reason. */
  position: relative;
  max-width: 380px;
  width: 55%;
  min-width: 240px;
  margin: 0 auto 2rem;
  border-radius: 999px 999px 20px 20px;
  background: radial-gradient(ellipse 70% 64% at 50% 56%, var(--report-gold-soft) 0%, var(--report-lavender-soft) 55%, transparent 82%);
}
.ica-report-v2 .ica-rv2-closing-art img {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 999px 999px 20px 20px;
  filter: drop-shadow(0 0 24px rgba(185, 144, 63, 0.25));
}
@media print {
  /* PHASE V4P.51A.1: real Chromium print-to-PDF (V4P.51A) confirmed the
     Gold Standard Closing's final one-sentence paragraph (9 words)
     orphaned alone onto its own near-blank trailing page, with only the
     running footer for company -- Closing had no keep-together
     protection at all (the existing nth-last-child(2) essay-orphan fix
     only targets .ica-rv2-essay, a different archetype from
     .ica-rv2-closing). Closing's authored copy is always short (the
     locked Gold Standard is 4 paragraphs/56 words; the shortest real
     profile is 3 paragraphs) and, like every top-level report section,
     .ica-rv2-closing already always starts at the top of a fresh
     physical page (.ica-rv2-page's break-after:page on the preceding
     section) -- so there is no risk of this rule stranding Closing
     behind unrelated content or forcing an unwanted extra page: bounding
     the art's height (freeing vertical room the same way as the two
     rules above) and keeping the whole section intact is safe precisely
     because its full height was already confirmed comfortably inside
     one page's budget once the art is bounded. Screen/mobile/tablet
     layout is untouched (print-only). */
  .ica-report-v2 .ica-rv2-closing-art {
    max-width: 78mm;
    margin: 0 auto 1rem;
    overflow: hidden;
  }
  .ica-report-v2 .ica-rv2-closing-art img {
    /* An explicit height (rather than max-height:100% on a flex child
       whose own height is only a max-height constraint, not a definite
       height) is required here -- confirmed by real Chromium print-to-
       PDF: the percentage-based approach left the container's resolved
       height ambiguous, so the image rendered at its full unbounded
       height anyway and visually overlapped the paragraph text that
       follows it in normal flow. A fixed physical height on the image
       itself has no such ambiguity. */
    width: auto;
    height: 55mm;
    max-width: 100%;
    margin: 0 auto;
    object-fit: contain;
  }
  .ica-report-v2 .ica-rv2-closing {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  /* PHASE V4P.51A.1B: the real Closing print-height budget was never
     dominated by the art (already bounded above) -- it was this 3rem
     (~28.6mm) gap repeated after EVERY paragraph, with no :last-child
     exemption, so a 4-paragraph Closing carried nearly 115mm of pure
     inter-paragraph whitespace before a single line of text was drawn.
     Measured against the real 32-Guardian x 2-Approach matrix (V4P.51A.1
     had only verified Orion and Bruno by hand): 10 of 32 valid profiles
     still produced a 2-physical-page Closing, worst case Terra's
     action-led text at 713 characters across roughly 6 paragraphs.
     Tightening this one rule for print -- while leaving the screen
     value untouched, so on-screen ceremonial spacing is unaffected --
     is enough on its own to bring the worst measured profile
     comfortably under the ~257mm page budget without touching font
     size, line-height, or any authored word. */
  .ica-report-v2 .ica-rv2-closing-text {
    margin-bottom: 0.85rem;
  }
  /* :last-of-type, not :last-child -- Closing's actual last DOM child is
     the injected .ica-rv2-runfoot band (every interior page is wrapped
     with one), so :last-child would never match any real paragraph
     here, exactly the same silent-match failure already documented on
     the essay-chapter orphan rule above. :last-of-type ignores that
     trailing sibling and correctly matches the true final authored
     paragraph regardless of what non-paragraph chrome follows it. */
  .ica-report-v2 .ica-rv2-closing-text:last-of-type {
    margin-bottom: 0;
  }
}

/* ---------- F. transition / breathing page ---------- */
.ica-report-v2 .ica-rv2-transition {
  text-align: center;
  padding: 3.25rem 2rem;
  max-width: 520px;
}
.ica-report-v2 .ica-rv2-transition-text {
  font-size: 1.15rem;
}
.ica-report-v2 .ica-rv2-transition-mark {
  width: 8px;
  height: 8px;
  margin: 0 auto 1.4rem;
  background: var(--report-gold);
  transform: rotate(45deg);
}

/* ---------- unmodified/pilot-untouched sections keep the existing plain
   treatment; this class only lightly aligns their spacing/colour with the
   new paper tokens so the pilot reads as one continuous document rather
   than two visually clashing systems. ---------- */
.ica-report-v2 .ica-report-section {
  max-width: 760px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
}

/* ---------- print ---------- */
@media print {
  .ica-report-v2 { background: #fff; }
  .ica-report-v2 .ica-rv2-page {
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }
  /* PHASE: print foundation fix. ":last-child" only matches when the
     final rendered .ica-rv2-page is the true last DOM sibling -- true in
     an isolated fixture, but never in the real app, which wraps this
     output in a toolbar (before) and a "use your browser's print
     dialog" paragraph (after); display:none on that paragraph hides it
     visually but does not remove it from the DOM tree, so ":last-child"
     silently never matches and the final page kept its forced page-
     break-after, printing one trailing blank physical page after
     Closing. ".ica-rv2-page-final" is assigned directly by the renderer
     to whichever page it actually renders last, so this rule no longer
     depends on surrounding markup at all. */
  .ica-report-v2 .ica-rv2-page-final {
    break-after: auto;
    page-break-after: auto;
  }
  @page { size: A4; margin: var(--report-page-margin, 20mm 18mm); }
}

/* ============================================================
   PHASE V4P.67: V4-ONLY Gold Class pagination/density profile.
   Every rule below is scoped under ".ica-rv2-v4" -- a marker class the
   renderer stamps onto every .ica-rv2-page section ONLY for a V4
   report (see the isV4 block in renderDeeperYouReport(), js/inner-
   compass-report-render.js). V3 elements never carry this class, so
   none of these selectors can ever match a V3 report -- V3's physical
   layout (line-height 1.75, page padding 2.75rem/2rem, subsection-
   heading margin 1.8rem/0.9rem, every forced chapter-start break, the
   420px Contents column) remains byte-for-byte unchanged. No existing,
   unscoped ".ica-report-v2"/".ica-rv2-*" rule above this block is
   edited by this phase.

   Approved calibration reference: docs of the "V4 Gold Class Pagination
   Feasibility Calibration" phase measured this exact density (line-
   height 1.60, these exact padding/margin reductions) as genuinely
   comfortable, premium-reading quality on real rendered pages -- not
   the absolute floor (which would go further, to 1.55/16mm margins).
   ============================================================ */

/* ---------- STAGE 3: V4 print density (screen + print, matching the
   base .ica-rv2-body/.ica-rv2-page/.ica-rv2-subsection-heading rules'
   own unscoped reach, so what a V4 customer sees on screen matches
   what they print/download). Body font-size is deliberately untouched
   at the shared 1.03rem -- only line-height, padding and heading
   margins are reduced, exactly per the approved brief. ---------- */
.ica-report-v2 .ica-rv2-v4 .ica-rv2-body { line-height: 1.60; }
.ica-report-v2 .ica-rv2-page.ica-rv2-v4 { padding: 2.25rem 1.75rem; }
.ica-report-v2 .ica-rv2-v4 .ica-rv2-subsection-heading { margin: 1.2rem 0 0.6rem; }
.ica-report-v2 .ica-rv2-v4 .ica-rv2-runhead { padding-bottom: 0.55rem; margin-bottom: 1.1rem; }
.ica-report-v2 .ica-rv2-v4 .ica-rv2-runfoot { padding-top: 0.55rem; margin-top: 1.3rem; }

/* ---------- STAGE 4: V4 Contents density. Widens the column (420px to
   640px, still centred, still well short of the page's own 760px max
   width) so the 14 approved chapter descriptions wrap less aggressively
   per row -- no description text, chapter count, or clickable anchor is
   touched. ---------- */
.ica-report-v2 .ica-rv2-v4.ica-rv2-contents .ica-rv2-toc { max-width: 640px; }
.ica-report-v2 .ica-rv2-v4.ica-rv2-contents .ica-rv2-toc li { padding: 0.6rem 0; }

@media print {
  /* ---------- STAGE 1 support: the inlined transition paragraph (now
     rendered as an ordinary .ica-rv2-body paragraph at the top of
     Chapter 4 / Chapter 11 -- see renderDeeperYouReport()) needs no
     dedicated rule here; it is plain body text and inherits Stage 3's
     density like any other paragraph. The old .ica-rv2-transition page
     rule above is simply unreached for V4 now (no V4 report ever
     renders that class), and remains fully intact, unedited, for V3. */

  /* ---------- STAGE 2, fix 1: Chapter 5 (and every essay chapter's)
     subheading/paragraph balanced keep-with-next. The shared, unscoped
     ".ica-rv2-subsection-heading { break-after: avoid }" rule above is
     NOT touched -- a heading can still never be stranded alone at the
     bottom of a page, for V3 or V4. What V4 removes is only the
     stronger, unscoped pairing rule that additionally forces the
     ENTIRE following paragraph to move as one unit with the heading;
     for V4, once the heading has at least started printing with the
     page it is on, its paragraph is free to wrap onto the next page
     normally, exactly like any other paragraph. This is the "balanced
     keep-with-next" the approved brief asked for: never an orphaned
     heading, never an entire paragraph needlessly dragged to a fresh
     page. ---------- */
  .ica-report-v2 .ica-rv2-v4 .ica-rv2-subsection-heading + .ica-rv2-body {
    break-before: auto;
    page-break-before: auto;
  }

  /* ---------- STAGE 2, fix 2 (REVERTED after the 32-PDF implementation
     QA): the first version of this fix removed the art's break-before
     and its preceding-paragraph binding entirely, on the theory that the
     art would then either share the letter's last page or land alone on
     a fresh one. Real rendered PDFs proved that theory wrong on 18 of 32
     Guardian x Approach combinations: because Chapter 14 unconditionally
     force-starts a fresh page (Stage 5), nothing can ever follow the art
     onto whatever page it lands on -- so "lands alone" in practice meant
     a near-empty physical page (the small bounded portrait plus a large
     dead white gap below it), the exact defect the ORIGINAL, shared
     break-before/break-inside/paragraph-binding rules (still active
     above, unedited, in the un-scoped @media print block) were written
     to prevent in the first place. Relaxing them bought no reliable
     page-count reduction (the calibration's own Experiment C already
     found chapter-sharing contributes at most 0-1 page once density
     reduction is applied) but did trade away real Gold Class visual
     quality. V4 therefore keeps the original, shared keep-with-previous-
     paragraph behaviour for this element -- no V4-specific override here
     at all is the correct fix. ---------- */

  /* ---------- STAGE 5: V4 chapter-start policy. Cover, Contents,
     Chapter 13 (Guardian Letter) and Chapter 14 (Type Passport) keep a
     forced fresh-page start (break-before: page directly on Contents/
     the Letter/the Passport -- Cover is always the first page by
     construction, so it needs no rule of its own). Every other V4
     section -- Front Matter and Chapters 1 through 12 -- has its
     forced break-after removed and may now share residual page space
     with whatever follows it, never stranding a heading at the very
     bottom of a page (the existing chapterHead()/.ica-rv2-chapter-title
     "break-after: avoid" rule already guarantees a chapter's own title
     always keeps at least its opening line on the same page as the
     heading). The more specific compound selectors below (three classes
     each) correctly win over the general ".ica-rv2-v4 { break-after:
     auto }" rule regardless of source order, with no !important
     needed anywhere in this block. ---------- */
  .ica-report-v2 .ica-rv2-page.ica-rv2-v4 {
    break-after: auto;
    page-break-after: auto;
  }
  .ica-report-v2 .ica-rv2-v4.ica-rv2-contents,
  .ica-report-v2 .ica-rv2-v4.ica-rv2-guardian-message,
  .ica-report-v2 .ica-rv2-v4.ica-rv2-passport {
    break-before: page;
    page-break-before: always;
  }
}
