/* ============================================================
   WUVERLY — print.css
   One day per page. Clean, structured, made to be kept.
   ============================================================ */

@media print {

  /* ── Page Setup ── */
  @page {
    size: A4;
    margin: 2.2cm 2.2cm 2.8cm;
  }

  @page :first {
    margin-top: 3cm;
  }

  /* ── Global Print Reset ── */
  *,
  *::before,
  *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: #fff !important;
    color: #1C1C1C !important;
    font-family: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
    font-size: 10.5pt;
    line-height: 1.65;
  }

  /* ── Hide screen-only elements ── */
  .progress-bar,
  .btn--share,
  .program-bridge,
  .program-header__print,
  .program-save-notice,
  nav,
  .back,
  button {
    display: none !important;
  }

  /* ── Remove screen layout constraints ── */
  #app,
  .screen,
  .screen--top,
  .program-screen {
    display: block !important;
    min-height: unset !important;
    padding: 0 !important;
    animation: none !important;
  }

  .container {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
  }


  /* ════════════════════════════════════════════════
     COVER PAGE  —  program-header fills page 1
  ════════════════════════════════════════════════ */

  .program-header {
    page-break-after: always;
    page-break-inside: avoid;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 22cm;
    padding: 0;
    border-bottom: none !important;
    margin-bottom: 0 !important;
  }

  .program-header__label {
    font-size: 7.5pt;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #7A7268 !important;
    margin-bottom: 0.6cm;
  }

  .program-header__name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 15pt;
    font-weight: 500;
    color: #C17F3E !important;
    margin-bottom: 0.4cm;
  }

  /* Gold rule above title */
  .program-header__name::before {
    content: '';
    display: block;
    width: 50pt;
    height: 1.2pt;
    background: #C17F3E !important;
    margin: 0 auto 0.55cm;
  }

  .program-header__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 28pt;
    font-weight: 400;
    line-height: 1.25;
    color: #1C1C1C !important;
    margin-bottom: 0.5cm;
  }

  /* "Five weeks. Yours completely." subtitle */
  .program-header p:last-of-type {
    font-size: 10pt;
    color: #7A7268 !important;
    font-style: italic;
  }

  /* Watermark line at bottom of cover */
  .program-header::after {
    content: 'wuverly.com \2014  your currency grows with you';
    display: block;
    font-size: 7pt;
    letter-spacing: 0.12em;
    color: #B0A898 !important;
    margin-top: 2cm;
  }


  /* ════════════════════════════════════════════════
     WEEK SECTION — each week starts on a fresh page
     Week header sits at the top of Day 1's page.
  ════════════════════════════════════════════════ */

  .week-section {
    page-break-before: always;
    margin: 0 !important;
  }

  .week-days {
    margin: 0;
  }

  /* Week header — printed above Day 1 on the same page */
  .week-header {
    border-bottom: 1.5pt solid #C17F3E !important;
    padding-bottom: 0.5cm;
    margin-bottom: 0.7cm;
    page-break-after: avoid;
  }

  .week-header__number {
    font-size: 7pt;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #C17F3E !important;
    margin-bottom: 0.15cm;
    display: block;
  }

  .week-header__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18pt;
    font-weight: 400;
    color: #1C1C1C !important;
    margin-bottom: 0.25cm;
    line-height: 1.25;
  }

  .week-header__intention {
    font-size: 9.5pt;
    color: #7A7268 !important;
    font-style: italic;
    border-left: 2pt solid #C17F3E !important;
    padding-left: 0.45cm;
    line-height: 1.6;
    display: block;
    margin: 0;
  }


  /* ════════════════════════════════════════════════
     DAY CARD — each day on its own page
     Day 1 of each week shares the page with its
     week-header (no extra page break needed).
  ════════════════════════════════════════════════ */

  /* Day 1: no leading page break — week-section already broke */
  .week-days .day-card:first-child {
    page-break-before: avoid;
    border-top: none;
  }

  /* Days 2–5: each gets its own page */
  .week-days .day-card + .day-card {
    page-break-before: always;
  }

  .day-card {
    page-break-inside: avoid;
    background: #fff !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  /* ── Day header ── */
  .day-card__header {
    display: flex;
    align-items: baseline;
    gap: 0.6cm;
    margin-bottom: 0.7cm;
    padding-bottom: 0.45cm;
    border-bottom: 0.5pt solid #C17F3E !important;
  }

  .day-card__number {
    font-size: 7pt;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #7A7268 !important;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .day-card__title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 15pt;
    font-weight: 500;
    color: #1C1C1C !important;
    line-height: 1.3;
  }

  /* ── Three practice sections ── */
  .day-card__section {
    margin-bottom: 0.65cm;
    padding-bottom: 0.55cm;
    border-bottom: 0.5pt solid #EDE8DF !important;
  }

  .day-card__section:last-of-type {
    border-bottom: none !important;
    margin-bottom: 0;
  }

  .day-card__section-label {
    font-size: 6.5pt;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: #C17F3E !important;
    margin-bottom: 0.2cm;
    display: block;
  }

  .day-card__section-content {
    font-size: 10pt;
    line-height: 1.75;
    color: #1C1C1C !important;
  }

  /* ── Daily reflection question ── */
  .day-card__question {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 10pt;
    font-style: italic;
    color: #7A7268 !important;
    border-top: 0.5pt solid #C17F3E !important;
    padding-top: 0.4cm;
    margin-top: 0.55cm;
    line-height: 1.65;
    page-break-inside: avoid;
  }


  /* ════════════════════════════════════════════════
     CLOSING CARD (the .day-card directly in .container,
     outside any .week-section)
  ════════════════════════════════════════════════ */

  .container > .day-card {
    page-break-before: always !important;
    text-align: center;
    padding: 2cm 1cm !important;
    border: 1pt solid #C17F3E !important;
    background: #fff !important;
  }

  .container > .day-card p {
    font-size: 10pt;
    color: #7A7268 !important;
    font-style: italic;
    margin-bottom: 0.75em;
    max-width: none;
  }

  /* Footer on closing page */
  .container > .day-card::after {
    content: 'wuverly.com \2014  your currency grows with you';
    display: block;
    font-size: 7.5pt;
    letter-spacing: 0.1em;
    color: #B0A898 !important;
    margin-top: 1.5cm;
    padding-top: 0.4cm;
    border-top: 0.5pt solid #E5DFCF !important;
    text-align: center;
  }


  /* ════════════════════════════════════════════════
     PAGE NUMBERS
  ════════════════════════════════════════════════ */

  @page {
    @bottom-center {
      content: counter(page);
      font-family: 'DM Sans', Arial, sans-serif;
      font-size: 8pt;
      color: #B0A898;
    }
  }

  @page :first {
    @bottom-center { content: ''; }
  }


  /* ════════════════════════════════════════════════
     WATERMARK — faint WUVERLY behind every page
  ════════════════════════════════════════════════ */

  body::before {
    content: 'WUVERLY';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-35deg);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 68pt;
    color: rgba(193, 127, 62, 0.045) !important;
    pointer-events: none;
    z-index: -1;
    letter-spacing: 0.3em;
  }


  /* ════════════════════════════════════════════════
     TYPOGRAPHY POLISH
  ════════════════════════════════════════════════ */

  h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    page-break-after: avoid;
    orphans: 3;
    widows: 3;
  }

  p, li {
    orphans: 3;
    widows: 3;
  }

  a[href]::after {
    content: none;
  }

} /* end @media print */
