/* IDLife paper editions. Loaded only for print; no screen/theme changes.
   Named pages do not alter printing elsewhere in the application.
   Paper size remains the user's choice (Letter / A4); no viewport-height
   sizing, zoom-to-fit, fixed canvas, or clipped health information. */
@page idn-report {
  size: auto;
  margin: 15mm 15mm 17mm;
  @top-left {
    content: 'IDLife  /  IDNutrition';
    font: 600 8pt 'Space Grotesk', sans-serif;
  }
  @top-right {
    content: 'PERSONAL WELLNESS REPORT';
    font: 500 7pt 'Inter', sans-serif;
    letter-spacing: .08em;
  }
  @bottom-left {
    content: 'PRIVATE  ·  Wellness screening, not a diagnosis';
    font: 400 7pt 'Inter', sans-serif;
  }
  @bottom-right {
    content: counter(page) ' / ' counter(pages);
    font: 600 8pt 'Space Grotesk', sans-serif;
  }
}

@media print {
  html:has(body.hr-printing), body.hr-printing {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: white !important;
    color-scheme: light;
  }
  body.hr-printing { margin: 0 !important; padding: 0 !important; }
  body.hr-printing > :not(#hr-print-root) { display: none !important; }
  body.hr-printing::before, body.hr-printing::after { display: none !important; }
  #hr-print-root {
    page: idn-report;
    display: block !important;
    position: static;
    width: auto;
    height: auto;
    /* A deliberate paper palette, independent of the member's OS theme. */
    --bg-1: #fff; --surface: #fff; --surface-2: #f6f9ff;
    --text: #0c1736; --text-2: #34435e; --muted: #47566f; --muted-2: #52617a;
    --border: rgba(16,42,98,.20); --border-soft: rgba(16,42,98,.12);
    --border-hi: rgba(22,82,240,.40); --hairline: rgba(16,42,98,.16);
    --fill-1: rgba(16,42,98,.025); --fill-2: rgba(16,42,98,.045); --fill-hover: transparent;
    --track: rgba(16,42,98,.12); --grid-line: rgba(16,42,98,.12);
    --teal: #087f8b; --blue: #164cba; --blue-2: #3159a7;
    --violet: #6540ac; --shield: #087764; --danger: #b42e3e; --warning: #925900;
    --ink-on-brand: #fff;
    --teal-soft: rgba(8,127,139,.06); --blue-soft: rgba(22,76,186,.05);
    --violet-soft: rgba(101,64,172,.06); --shield-soft: rgba(8,119,100,.06);
    --danger-soft: rgba(180,46,62,.05);
    --grad-card: linear-gradient(var(--surface), var(--surface));
    --grad-brand: linear-gradient(135deg, var(--teal), var(--blue));
    --grad-brand-3: linear-gradient(120deg, var(--teal), var(--blue), var(--violet));
    --grad-text: linear-gradient(120deg, var(--blue), var(--teal), var(--violet));
    --shadow-sm: none; --shadow-md: none; --shadow-lg: none;
    background: var(--surface);
    color: var(--text);
    font: 10pt/1.5 var(--font-body);
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  #hr-print-root *, #hr-print-root *::before, #hr-print-root *::after {
    animation: none !important;
    transition: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    caret-color: transparent;
  }
  #hr-print-root a { color: inherit; text-decoration: none; cursor: default; }
  #hr-print-root button { cursor: default; }
  #hr-print-root :is(p, li, blockquote) { orphans: 3; widows: 3; }
  #hr-print-root .hr-slide {
    display: block;
    position: static;
    flex: none;
    min-width: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    overflow: visible;
    padding: 0;
    margin: 0;
    break-after: page;
    break-inside: auto;
  }
  #hr-print-root .hr-slide:last-child { break-after: auto; }
    /* Small chapters can share a sheet. Long ones continue naturally, with
      their masthead kept with the first finding rather than wasting a page. */
    #hr-print-root .hr-slide--chspread { break-after: auto; margin-bottom: 7mm; }
    #hr-print-root .hr-slide--chspread + .hr-slide:not(.hr-slide--chspread) { break-before: page; }
  #hr-print-root .hr-slide > * { max-width: 100%; margin: 0 0 3.5mm; }
  #hr-print-root .hr-slide > :last-child { margin-bottom: 0; }
  #hr-print-root .hr-slide::before, #hr-print-root .hr-chs-mast::before { display: none; }
  #hr-print-root .hr-print-section {
    display: flex; justify-content: space-between; align-items: baseline;
    padding-bottom: 2.5mm; margin-bottom: 5mm; border-bottom: 1.5pt solid var(--teal);
    color: var(--text-2); font: 600 8pt/1.3 var(--font-display); letter-spacing: .06em;
    break-after: avoid;
  }
  #hr-print-root .hr-print-section b { color: var(--teal); }
  #hr-print-root .hr-print-edition {
    font: 700 8pt/1.4 var(--font-display); color: var(--teal);
    letter-spacing: .1em; text-transform: uppercase;
  }
  #hr-print-root .hr-print-note {
    font: 400 8pt/1.5 var(--font-body); color: var(--muted);
    border-top: 1px solid var(--hairline); padding-top: 3mm;
  }
  #hr-print-root :is(.hr-h2, .hr-h3, .hr-eyebrow, .hr-microlabel, .hr-display, .hr-chs-mast, .hr-tocgroup > .hr-microlabel) {
    break-after: avoid; break-inside: avoid;
  }
  #hr-print-root .hr-h2 { font-size: 23pt; line-height: 1.12; }
  #hr-print-root .hr-h3 { font-size: 16pt; }
  #hr-print-root .hr-display { font-size: 32pt; }
  #hr-print-root .hr-eyebrow { font-size: 8pt; color: var(--teal); }
  #hr-print-root .hr-microlabel { font-size: 7.5pt; letter-spacing: .13em; }
  #hr-print-root :is(.hr-dim, .hr-body) { font-size: 10pt; line-height: 1.5; }
  #hr-print-root .hr-fineprint { font-size: 8pt; line-height: 1.5; margin-top: 3mm; }

  /* Book-like cover: vector artwork, quiet white paper, balanced type.
     No screen animation, viewport sizing or giant decorative background. */
  #hr-print-root .hr-slide--cover2 { padding: 12mm 0 8mm !important; }
  #hr-print-root .hr-cover2 { display: block; height: auto; min-height: 0; overflow: visible; padding: 0; }
  #hr-print-root :is(.hrcv-frame, .hrcv-eyebrow) { display: none; }
  #hr-print-root .hrcv-grid {
    display: flex; flex-direction: column; gap: 8mm;
    width: 100%; max-width: none; min-height: 0; padding: 0; margin: 0;
  }
  #hr-print-root .hrcv-art { width: 100%; }
  #hr-print-root .hrcv-emblem { width: 64mm; height: 64mm; filter: none; }
  #hr-print-root .hrcv-ring { transform: none; }
  #hr-print-root .hrcv-copy { align-items: center; gap: 4mm; width: 100%; text-align: center; }
  #hr-print-root .hrcv-title { font-size: 34pt; line-height: 1.04; }
  #hr-print-root :is(.hrcv-sheen, .hr-chs-name, .hr-chapter-name, .hr-traj-num,
    .hr-traj-mini b, .hr-move-no, .hr-statcard--score b, .hrcv-scorepill b,
    .hr-fut-ringc > b, .hr-fut-then b, .gradient-text) {
    color: var(--blue); -webkit-text-fill-color: var(--blue); background: none;
  }
  #hr-print-root .hrcv-lead { font-size: 11pt; line-height: 1.5; max-width: 135mm; }
  #hr-print-root .hrcv-prepared { padding: 4mm 6mm; gap: 4mm; background: var(--surface); }
  #hr-print-root .hrcv-prep-main b { font-size: 14pt; }
  #hr-print-root .hrcv-prep-main small { font-size: 8.5pt; }
  #hr-print-root .hrcv-gaptag { margin: 0; flex-basis: auto; }
  #hr-print-root .hrcv-stats { flex-direction: row; gap: 6mm; }
  #hr-print-root .hrcv-stat b { font-size: 19pt; }
  #hr-print-root .hrcv-stat i { font-size: 7pt; }
  #hr-print-root .hrcv-rise { opacity: 1 !important; transform: none !important; }
  #hr-print-root .hrcv-scorepill {
    opacity: 1 !important; transform: translateX(-50%) !important;
    background: var(--surface); white-space: nowrap; font-size: 8pt; padding: 2mm 4mm;
  }
  #hr-print-root .hrcv-copy .hr-print-note { max-width: 135mm; margin-top: 4mm; }

  /* Containers may fragment; a single finding/row stays together when it fits.
     Single-column chapter cards avoid grid-row gaps and ambiguous reading order. */
  #hr-print-root :is(.hr-chs-findings, .hr-findings, .hr-moves, .hr-sb,
    .hr-record-body, .hr-ctxgroup, .hr-cmp-changes, .hr-cmp-sec, .hr-cmp-grid,
    .hr-cmp-steady, .hr-cmp-samegrid, .hr-cmp-ledger, .hr-shield-blocks,
    .hr-fut-systems, .hr-fut-levers, .hr-wrap-sec, .hr-tocgroup, .hr-toclist) {
    display: block; break-inside: auto; height: auto; max-height: none; overflow: visible;
  }
  #hr-print-root :is(.hr-cfind, .hr-finding, .hr-move, .hr-tocrow, .hr-idxrow,
    .hr-sb-row, .hr-cmp-check, .hr-cmp-change, .hr-cmp-same, .hr-shield-block,
    .hr-week, .hr-strength, .hr-statcard, .hr-tallycard, .hr-ovt-card,
    .hr-fut-lever, .hr-fut-sys, .hr-at-chart, .hr-bandspec, .hr-keepsake-stats,
    .hr-traj-hero, .hr-fut-hero, .hr-day30, .hr-myai-tease) {
    break-inside: avoid; margin-bottom: 3mm;
  }
  #hr-print-root :is(.hr-cfind, .hr-finding, .hr-move, .hr-cmp-change) {
    padding: 3.5mm 4mm; border-radius: 2mm; gap: 2mm;
  }
  #hr-print-root .hr-cfind-title { font-size: 11pt; line-height: 1.35; }
  #hr-print-root :is(.hr-cfind-why, .hr-finding-story, .hr-move-body p) { font-size: 9.5pt; line-height: 1.5; }
  #hr-print-root .hr-cfind-qa { padding: 2mm 3mm; }
  #hr-print-root .hr-cfind-q { font-size: 8pt; }
  #hr-print-root .hr-cfind-a { font-size: 9.5pt; }
  #hr-print-root :is(.hr-cfind-src, .hr-finding-domain, .hr-idxdomain, .hr-tocpage,
    .hr-sb-track, .hr-sb-band, .hr-cmp-check-grade, .hr-fut-track, .hr-journey-label,
    .hr-bandspec-labels) { display: block; }
  #hr-print-root .hr-cfind-src { font-size: 7pt; }
  #hr-print-root .hr-chs-mast { padding: 4mm; gap: 4mm; flex-wrap: nowrap; border-radius: 2mm; }
  #hr-print-root .hr-chs-no { font-size: 30pt; color: var(--teal); -webkit-text-stroke: 0; order: 0; }
  #hr-print-root .hr-chs-name { font-size: 21pt; line-height: 1.15; }
  #hr-print-root .hr-chs-line { font-size: 9pt; }
  #hr-print-root .hr-chs-gauges { flex-basis: auto; gap: 3mm; }
  #hr-print-root .hr-minidial { width: 17mm; }
  #hr-print-root .hr-chs-fact b { font-size: 9pt; }
  #hr-print-root .hr-chip { padding: 1.2mm 2mm; font-size: 7.5pt; line-height: 1.25; }
  #hr-print-root .hr-impact { font-size: 7pt; }

  #hr-print-root .hr-tocgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2mm; }
  #hr-print-root .hr-tocrow { padding: 2.5mm 3mm; gap: 3mm; margin-bottom: 2mm; border-radius: 2mm; }
  #hr-print-root .hr-tocmain b { font-size: 10pt; }
  #hr-print-root .hr-tocmain small { white-space: normal; overflow: visible; font-size: 8pt; }
  #hr-print-root .hr-tocpage { font-size: 8pt; color: var(--teal); letter-spacing: 0; }
  #hr-print-root .hr-tocno { min-width: 6mm; font-size: 9pt; }
  #hr-print-root .hr-slide--contents .hr-tocrow { padding: 2mm 3mm; margin-bottom: 1.5mm; }
  #hr-print-root .hr-tocgroup + .hr-tocgroup { margin-top: 2mm; }
  #hr-print-root .hr-tocgrid .hr-tocrow { margin-bottom: 0; }
  #hr-print-root[data-kind="atlas"] .hr-toclist {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2mm;
  }
  #hr-print-root[data-kind="atlas"] .hr-toclist > .hr-tocrow { margin-bottom: 0; }
  #hr-print-root .hr-sb-row { width: 100%; grid-template-columns: minmax(0, 1.3fr) 1fr 10mm minmax(28mm, .8fr); gap: 3mm; padding: 2mm 3mm; margin-bottom: 1.5mm; }
  #hr-print-root .hr-sb-name { font-size: 9.5pt; }
  #hr-print-root .hr-sb-band { font-size: 7.5pt; letter-spacing: .04em; }
  #hr-print-root .hr-sb-legend { gap: 3mm; }
  #hr-print-root .hr-sb-legend span { font-size: 7pt; }
  #hr-print-root .hr-sb-block { padding-top: 0; margin-top: 0; border-top: 0; }
  #hr-print-root .hr-route-strip { break-inside: avoid; padding: 3mm 4mm; }
  #hr-print-root :is(.hr-tally, .hr-cmp-stats, .hr-at-recs) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 3mm; }
  #hr-print-root :is(.hr-strengths, .hr-shield-stats, .hr-ovt-grid) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3mm; }
  #hr-print-root :is(.hr-weeks, .hr-fut-levergrid) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3mm; }
  #hr-print-root :is(.hr-baseline-grid, .hr-glance-grid) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4mm; }
  #hr-print-root .hr-wrap-sec + .hr-wrap-sec { padding-top: 4mm; margin-top: 4mm; }
  #hr-print-root .hr-wrap-sec > * { margin-bottom: 3mm; }
  #hr-print-root .hr-slide--wrapup .hr-h2 { font-size: 20pt; }
  #hr-print-root :is(.hr-strength, .hr-week) { padding: 3mm; }
  #hr-print-root :is(.hr-strength p, .hr-week p) { font-size: 9pt; line-height: 1.4; }
  #hr-print-root :is(.hr-strengths, .hr-weeks, .hr-tally, .hr-cmp-stats, .hr-at-recs, .hr-shield-stats, .hr-ovt-grid) > * { margin-bottom: 0; }
  #hr-print-root .hr-keepsake-stats { flex-direction: row; flex-wrap: wrap; }
  #hr-print-root .hr-cmp-check { grid-template-columns: minmax(0, 1fr) 12mm minmax(24mm, auto) max-content; }
  #hr-print-root .hr-fut-sys { grid-template-columns: minmax(0, 1fr) 1fr max-content; }
  #hr-print-root .hr-fut-ring { width: 40mm; }
  #hr-print-root .hr-fut-hero { justify-content: flex-start; text-align: left; }
  #hr-print-root .hr-fut-scores { justify-content: flex-start; }
  #hr-print-root .hr-record-body { padding: 0; border: 0; }
  #hr-print-root .hr-idxrow { padding: 2mm 3mm; gap: 3mm; border-radius: 1.5mm; }
  #hr-print-root .hr-idxlabel { font-size: 9pt; }
  #hr-print-root .hr-idxdomain { flex: 0 1 34mm; font-size: 8pt; }
  #hr-print-root .hr-print-ref { flex: none; color: var(--teal); font: 600 8pt/1.5 var(--font-display); }
  #hr-print-root .hr-map-wrap { display: grid; }
  #hr-print-root .hr-mapv { display: none; }
  #hr-print-root .hr-map-wrap svg { max-height: 150mm; max-width: 100%; }
  #hr-print-root .hr-dive-rail { position: static; }
  #hr-print-root :is(.hr-cfind-title, .hr-chs-name, .hrcv-prep-main, .hr-chip, .hr-tocmain, .hr-sblock-tx) { overflow-wrap: anywhere; }
}