/* ==========================================================================
   Print — true A4 output.
   Two modes, toggled by a body class before window.print():
     .gc-printing-month  one month on one page
     .gc-printing-year   all twelve months, one per page
   Remarks are included in both. A small footer watermark carries the site back.
   ========================================================================== */

@page {
  size: A4 portrait;
  margin: 12mm 10mm 14mm;
}

@media print {
  :root {
    /* Print is always the light palette — coloured paper is not a thing. */
    --ink: #000;
    --ink-2: #333;
    --ink-3: #555;
    --line: #c9c9c9;
    --line-2: #999;
    --surface: #fff;
    --surface-2: #fff;
    --surface-3: #f2f2f2;
  }

  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 10.5pt;
  }

  /* Chrome the reader does not need on paper. */
  .gc-header,
  .gc-footer,
  .gc-ad,
  .gc-skip,
  .gc-nav,
  .gc-drawer,
  .gc-menu-btn,
  .gc-cal__bar,
  .gc-months,
  .gc-filters,
  .gc-search,
  .gc-btn,
  .gc-modal,
  .gc-states,
  .gc-faq,
  .gc-hero__lead,
  .gc-chips,
  .gc-eyebrow,
  .gc-dl,
  .gc-lw,
  .gc-today,
  .gc-section--noprint {
    display: none !important;
  }

  .gc-layout { display: block !important; }
  .gc-layout__side { display: none !important; }
  .gc-wrap { max-width: none; padding: 0; }
  .gc-section { margin: 0 0 6mm; }

  a { color: #000 !important; text-decoration: none !important; }

  /* --- Print masthead ---------------------------------------------------- */

  .gc-print-head { display: block !important; margin-bottom: 5mm; }
  .gc-print-head__t { font-size: 15pt; font-weight: 800; margin: 0 0 1mm; letter-spacing: -.01em; }
  .gc-print-head p { font-size: 8.5pt; color: #444; margin: 0; }
  .gc-print-head__rule { height: 2pt; margin-top: 2.5mm; display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .gc-print-head__rule i { display: block; }
  .gc-print-head__rule i:nth-child(1) { background: #ff9933 !important; }
  .gc-print-head__rule i:nth-child(2) { background: #ddd !important; }
  .gc-print-head__rule i:nth-child(3) { background: #138808 !important; }

  /* --- Calendar ---------------------------------------------------------- */

  .gc-cal { border: 1px solid #999 !important; box-shadow: none !important; border-radius: 0 !important; }

  .gc-dow { border-bottom: 1px solid #999 !important; background: #f2f2f2 !important; }
  .gc-dow span { font-size: 7.5pt; padding: 1.6mm 0; color: #333 !important; }

  .gc-grid { gap: 0.4pt; background: #999 !important; }

  .gc-day {
    min-height: 20mm; padding: 1.2mm 1.4mm;
    background: #fff !important; break-inside: avoid;
  }
  .gc-day--weekend { background: #f4f4f4 !important; }
  .gc-day--pad { background: #fafafa !important; }
  .gc-day__n { font-size: 9pt; color: #000 !important; }
  .gc-day--today { box-shadow: inset 0 0 0 1.2pt #000 !important; }
  .gc-day--today .gc-day__n { background: #000 !important; color: #fff !important; }

  .gc-ev {
    font-size: 6.6pt; padding: .5mm 1mm; border-left-width: 2pt;
    -webkit-line-clamp: 2; line-height: 1.2;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }

  .gc-mlist { background: #fff !important; border-top: 1px solid #999 !important; padding: 2.5mm 2mm; }
  .gc-mlist ul { gap: .8mm; }
  .gc-mlist li { font-size: 8pt; }

  /* Force the swatch colours to actually print. */
  .gc-ev, .gc-badge, .gc-legend .dot, .gc-day--weekend, .gc-dow,
  .gc-print-head__rule i, .gc-table__month td {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .gc-legend { display: flex !important; gap: 2mm 5mm; margin: 2.5mm 0 0; font-size: 8pt; }

  /* --- Mode: single month ------------------------------------------------ */

  .gc-printing-month .gc-year { display: none !important; }
  .gc-printing-month .gc-month { display: none !important; }
  .gc-printing-month .gc-month.is-active { display: block !important; }
  .gc-printing-month .gc-section--table { display: none !important; }

  /* --- Mode: full year --------------------------------------------------- */

  .gc-printing-year .gc-year { display: none !important; }
  .gc-printing-year .gc-month { display: block !important; break-after: page; }
  .gc-printing-year .gc-month:last-of-type { break-after: auto; }
  .gc-printing-year .gc-month__h {
    display: block !important; font-size: 12pt; font-weight: 800;
    margin: 0 0 2mm; padding-top: 2mm;
  }
  .gc-printing-year .gc-section--table { break-before: page; }

  /* --- Holiday table ----------------------------------------------------- */

  .gc-section--table { display: block; }
  .gc-table-wrap { border: 1px solid #999 !important; border-radius: 0 !important; overflow: visible !important; }
  .gc-table { font-size: 8.5pt; }
  .gc-table th, .gc-table td { padding: 1.4mm 2mm; border-bottom: .5pt solid #ccc !important; }
  .gc-table thead th { background: #f2f2f2 !important; position: static; font-size: 7pt; }
  .gc-table tbody tr { break-inside: avoid; }
  .gc-table__month td { background: #eaeaea !important; font-size: 7.5pt; }
  .gc-table tr[hidden] { display: none !important; }

  .gc-badge { border: .5pt solid #999 !important; font-size: 7pt; padding: .3mm 1.6mm; }

  /* --- Remarks ----------------------------------------------------------- */

  .gc-ev--note { border-left: 2pt solid #d97706 !important; background: #fff8e6 !important; }

  /* --- Watermark --------------------------------------------------------- */

  .gc-print-mark {
    display: block !important;
    position: fixed; bottom: 3mm; left: 0; right: 0;
    text-align: center; font-size: 7pt; color: #777 !important;
    letter-spacing: .04em;
  }
  .gc-print-mark strong { color: #333 !important; font-weight: 700; }
}
