/* Print layer — Pawan Chande & Co
 *
 * Loaded with media="print", so none of this reaches a screen.
 *
 * This audience circulates documents. Someone will print this page or save it
 * to PDF and email it to a colleague or a board. Untreated, that produces a
 * black page, an ink-flooding hero photograph, invisible links, and — worst —
 * missing content, because anything still below the fold is held at opacity 0
 * by the scroll-reveal system and the reading panel is collapsed to zero
 * height. All of that is repaired here.
 */

@page {
  margin: 18mm 16mm;
}

/* ------------------------------------------------------------ ink on paper */

html,
body {
  background: #fff !important;
  color: #16181d !important;
  font-size: 11pt;
}

/* Monochrome by default: most office printing is, and the page must not depend
   on colour it may not get. Borders survive, so structure survives. */
*,
*::before,
*::after {
  background-image: none !important;
  background-color: transparent !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;
  color: #16181d !important;
}/* ------------------------------------------------------- remove the chrome */

header,
.rail,
[data-el="prog"],
[data-bg-wash],
[data-beam-sweep],
[data-el="mobileMenu"],
[data-mobile-toggle],
[data-action="toggleTheme"],
[data-action="organize"],
[data-screen-only],
[data-desktop-nav] {
  display: none !important;
}

/* body needs its white back after the universal transparent reset */
body {
  background-color: #fff !important;
}

/* ------------------------------------------------------------- the masthead */

[data-print-head] {
  display: block !important;
  margin: 0 0 14pt;
  padding-bottom: 8pt;
  border-bottom: 0.75pt solid #16181d;
  font-family: 'Libre Franklin', 'Franklin fallback', system-ui, sans-serif;
  font-size: 9pt;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
[data-print-head] span {
  display: block;
  margin-top: 3pt;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* --------------------------------------------------------------- the hero */

/* 100vh plus absolutely-positioned children collapses badly on paper. The
   photograph is dropped outright — it is the single most ink-hungry element on
   the page and carries nothing a reader needs once printed. */
[data-el="hero"] {
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
[data-el="hero"] > *:not([data-hero-content]) {
  display: none !important;
}
[data-hero-content] {
  position: static !important;
  opacity: 1 !important;
  transform: none !important;
  padding: 0 !important;
}
[data-hero-content] h1 {
  font-size: 26pt !important;
  line-height: 1.05 !important;
  margin: 0 0 6pt !important;
}

/* ------------------------------------------- nothing may print invisible */

/* The scroll-reveal system holds below-the-fold elements at opacity 0 until an
   observer fires. Printing never scrolls, so without this the middle of the
   document comes out blank. */
[data-pending],
[data-playing],
.reveal,
.drawline {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* The reading panel is collapsed to a zero-height grid row until opened. On
   paper it is the most valuable content in the section, so it is always open. */
[data-el="reading"] {
  grid-template-rows: 1fr !important;
  opacity: 1 !important;
  margin-bottom: 10pt !important;
  overflow: visible !important;
}

/* The eight figures sit scattered, greyed and half-transparent until the demo
   is run. Printed, that reads as a mistake — so they print settled. */
[data-chip] {
  transform: none !important;
  opacity: 1 !important;
  filter: none !important;
  transition: none !important;
}

/* ---------------------------------------------------------- flat surfaces */

[data-card],
.card,
.pfeat,
[data-persp] {
  border: 0.75pt solid #b9bec7 !important;
  border-radius: 3pt !important;
  break-inside: avoid;
  page-break-inside: avoid;
}

.ic,
[data-card] svg,
.pfeat svg {
  border-color: #b9bec7 !important;
}

/* The chapter numerals are transparent with a coloured stroke, which prints as
   nothing at all. Solid ink instead. */
.chap-n {
  color: #16181d !important;
  -webkit-text-stroke: 0 !important;
  opacity: 1 !important;
  font-size: 22pt !important;
}

.hair,
.drawline {
  background: #b9bec7 !important;
}

/* The full-bleed CTA band is a solid gradient — an entire page of ink. */
section[aria-label="Trusted advisory"] > div {
  background: #fff !important;
  border-top: 0.75pt solid #16181d !important;
  border-bottom: 0.75pt solid #16181d !important;
}

/* --------------------------------------------------------------- the links */

/* Internal anchors and the email / phone links already read as their own
   destination, so only genuinely external targets are expanded. */
a[href^="http"]::after {
  content: " — " attr(href);
  font-size: 8.5pt;
  word-break: break-all;
}

a {
  text-decoration: none !important;
}

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

h1, h2, h3 {
  break-after: avoid;
  page-break-after: avoid;
}

section {
  break-before: auto;
}

footer {
  break-inside: avoid;
  page-break-inside: avoid;
}

/* Keep the flagged figures distinguishable without relying on colour: the
   marker dot prints as ink, and the row keeps a heavier rule. */
[data-chip][data-key="1"] {
  border-color: #16181d !important;
  border-width: 1pt !important;
}
[data-chip][data-key="1"] [data-dot] {
  display: inline-block !important;
  background: #16181d !important;
}

/* ---------------------------------------------------------- the practices */

/* The advisory practices are a tablist on screen: one panel is shown and the
   other four are hidden until the reader points at them. Paper has no cursor,
   so an untreated print carries one practice out of five. All five are forced
   open, and the tab list itself goes, since it navigates nothing on paper. */
[data-practice-list] {
  display: none !important;
}

[data-practice-grid] {
  display: block !important;
}

[data-practice-panel] {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
}

[data-practice-panel] .prac-body {
  display: block !important;
  opacity: 1 !important;
  animation: none !important;
  padding: 10px 0;
  border-top: 1px solid #b9bec7;
  break-inside: avoid;
}

[data-practice-panel] .prac-body .ic {
  display: none !important;
}

/* The back-to-top control is a screen affordance. */
[data-el='toTop'],
.where {
  display: none !important;
}
