/* ==========================================================================
   print.css — the month timetable on paper.

   The one thing anyone prints from this site is the month table, to pin up
   at home or at the centre. So printing drops everything else: nav, hero,
   footer, the high-latitude explainer, the print button itself. What is left
   is the table, the month it covers, and where it came from.
   ========================================================================== */
@media print {
  /* Force light regardless of the reader's theme — a dark page prints as a
     solid block of toner and the table is unreadable. */
  :root, [data-theme="dark"], [data-theme="light"] {
    --bg-page: #fff; --bg-section: #fff; --bg-card: #fff;
    --text-hi: #000; --text-mid: #1a1a1a; --text-low: #444;
    --accent: #000; --border-subtle: #999; --border-strong: #000;
  }
  html, body {
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }

  .site-header, .site-footer, .nav-toggle, .site-search, .site-search-open,
  .to-top, .player-bar, .skip-link, .marquee, .hero,
  .next-strip, .note-block, .pw-method, .btn, .btn-link,
  .page-head__sub, .page-head__back, .reading-tools, .lib__controls {
    display: none !important;
  }

  /* The explainer is on screen for people wondering why summer looks odd;
     on a printed timetable it is two paragraphs of paper. */
  .highlat-block, .pw-highlat { display: none !important; }

  /* The live "next prayer" widget goes too. Someone printing this page wants
     the MONTH's timetable to put on a wall or a fridge — a countdown to today's
     Zuhr is stale the moment it leaves the printer, and it was taking most of
     the first sheet. Client, 2026-08-06. */
  .prayer-widget { display: none !important; }

  main, .section, .container, .container-wide, .month-block, .table-wrap {
    margin: 0 !important;
    padding: 0 !important;
    max-inline-size: none !important;
    overflow: visible !important;
    box-shadow: none !important;
  }

  h1 { font-size: 16pt; margin: 0 0 2mm; }
  .month-block__head h2 { font-size: 13pt; margin: 0 0 3mm; }

  table.month {
    inline-size: 100%;
    border-collapse: collapse;
    font-size: 9.5pt;
  }
  table.month caption {
    /* Unhide the caption that is sr-only on screen: on paper it is the only
       thing naming what the sheet is. */
    position: static !important;
    inline-size: auto !important; block-size: auto !important;
    clip: auto !important; clip-path: none !important;
    overflow: visible !important;
    margin-block-end: 2mm;
    font-weight: 700; text-align: start;
  }
  table.month th, table.month td {
    border: 0.4pt solid #999;
    padding: 1.2mm 1.6mm;
    text-align: center;
    color: #000 !important;
    background: none !important;
  }
  table.month thead th {
    background: #eee !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
    font-weight: 700;
  }
  /* Repeat the header on every printed page of a 31-row table. */
  table.month thead { display: table-header-group; }
  table.month tr { page-break-inside: avoid; }
  /* Banding survives to paper — it is what keeps your eye on the right row. */
  table.month tbody tr:nth-child(odd) td {
    background: #f4f4f4 !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  table.month tbody tr[data-today] td { font-weight: 700; }

  /* Provenance, so a sheet on a noticeboard says where it came from. */
  .month-block::after {
    content: "yk-shia.com — Jafari method, Yellowknife 62.45°N";
    display: block;
    margin-block-start: 3mm;
    font-size: 8pt; color: #444;
  }
  a[href]::after { content: ""; }     /* no URL spam mid-table */
  @page { margin: 12mm; }
}

/* ==========================================================================
   Quran pages on paper.

   Rendered to PDF at publish time. The first pass fitted five verses to a
   page: generous screen padding carried straight over, and a page of paper
   is not a scrolling viewport. Everything here is tuned for density without
   crowding — the Arabic keeps its leading because it needs it, and the
   translations tighten around it.

   The running header and footer are supplied by Chrome at render time, not
   by CSS, so they repeat on every page rather than only the first.
   ========================================================================== */
@media print {
  .quran-audio, .surah-pager, .quran-dl, .reading-tools,
  .ayah__play, .to-top, .page-head__back { display: none !important; }

  /* The title block appears once, at the top of page one. */
  .dua-page .page-head {
    padding: 0 0 3mm;
    margin-block-end: 3mm;
    border-block-end: 0.6pt solid #c9c2ab;
  }
  .dua-page .page-head h1 { font-size: 16pt; margin: 0; color: #6b5a1e !important; }
  .surah-title__n {
    inline-size: 1.5em; block-size: 1.5em;
    font-size: .55em;
    color: #6b5a1e !important; border-color: #6b5a1e !important;
  }
  .dua-page .page-head__sub {
    display: block !important;
    margin: 1mm 0 0;
    font-size: 9pt; color: #555 !important;
    /* The Arabic name is RTL inside an LTR line; without this it was
       clipped against the left margin. */
    unicode-bidi: isolate;
  }

  .ayah-list { margin: 0; padding: 0; }
  .ayah {
    padding: 2mm 3mm;
    border-block-end: 0.3pt solid #ddd8c8;
    break-inside: avoid;
    text-align: center;
  }
  .ayah:nth-child(odd) {
    background: #f8f6f0 !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  /* Number sits inline with the verse rather than on its own line. */
  .ayah__head { margin-block-end: 1mm; gap: 0; }
  .ayah__n {
    inline-size: 5mm; block-size: 5mm;
    margin: 0;
    font-size: 7pt; color: #8a7c47 !important;
    border-color: #d5cdb4 !important;
  }
  .ayah__ar {
    font-family: 'Indopak Nastaleeq', 'Amiri', serif;
    /* Larger, and tighter between wrapped lines. Nastaleeq needs headroom for
       its descenders but 2.6 was leaving a visible gap mid-verse. */
    font-size: 16pt; line-height: 2.05; color: #000 !important;
    max-inline-size: none;
  }
  .ayah__en {
    margin: 1.5mm auto 0; max-inline-size: 150mm;
    font-size: 9.5pt; line-height: 1.45; color: #333 !important;
  }
  .ayah__ur {
    /* Same centred measure as the English, or the Urdu runs the full width of
       the page while the English sits in a narrower column and the two stop
       looking like one block. */
    margin: 1.5mm auto 0;
    max-inline-size: 150mm;
    text-align: center;
    font-size: 10.5pt; line-height: 1.85; color: #222 !important;
  }
  .ayah-list::after { content: none; }     /* footer comes from the renderer */

  @page { margin: 16mm 12mm 14mm; }
}
