/* ============================================================
   STLCA - Print Stylesheet
   Applied via <link media="print"> on every page
   ============================================================ */

@media print {
  /* ── Reset colors for print ── */
  :root {
    --bg:    #ffffff;
    --bg2:   #f8f8f8;
    --panel: #f4f4f4;
    --text:  #111111;
    --muted: #444444;
    --dim:   #666666;
    --blue:  #1a56cc;
    --orange:#b45309;
    --red:   #b91c1c;
    --green: #065f46;
    --teal:  #0369a1;
    --border: #cccccc;
    --border-blue: #93c5fd;
    --blue-dim: #eff6ff;
  }

  /* ── Page setup ── */
  @page {
    margin: 18mm 16mm 18mm 16mm;
    size: letter portrait;
  }

  @page :first {
    margin-top: 12mm;
  }

  /* ── Base ── */
  *, *::before, *::after {
    background: transparent !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body {
    background: #fff !important;
    color: #111 !important;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 11pt;
    line-height: 1.6;
  }

  /* ── Hide non-print elements ── */
  .nav,
  .nav-mobile,
  .nav-toggle,
  .hero-btns .btn-outline,
  .cta-section .btn,
  .footer,
  [data-reveal],
  .btn-ghost,
  script,
  iframe {
    display: none !important;
  }

  /* ── Show all hidden/animated elements ── */
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    display: block !important;
  }

  /* ── Links ── */
  a {
    color: #1a56cc !important;
    text-decoration: underline;
  }

  a[href^="http"]::after,
  a[href^="https"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
    word-break: break-all;
  }

  a[href^="#"]::after,
  a.btn::after,
  .nav-brand::after,
  .district-link::after,
  .footer-col a::after {
    content: "" !important;
  }

  /* ── Page breaks ── */
  h1, h2, h3 { page-break-after: avoid; }
  .card, .metric-card, .district-card, .case-card, .priority-card { page-break-inside: avoid; }
  section { page-break-before: auto; }
  .section, .section-sm { page-break-inside: avoid; }

  /* ── Hero ── */
  .hero {
    padding: 24pt 0 16pt !important;
    background: none !important;
  }

  .hero::before { display: none !important; }

  .hero-headline {
    font-size: 22pt !important;
    color: #111 !important;
  }

  .hero-headline em { color: #1a56cc !important; }

  .hero-sub {
    font-size: 11pt !important;
    color: #333 !important;
  }

  /* ── Flow path ── */
  .flow-path {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4pt !important;
    border: 1pt solid #ccc;
    padding: 8pt;
    border-radius: 4pt;
    margin: 12pt 0;
  }

  .flow-node {
    border: 1pt solid #1a56cc !important;
    color: #1a56cc !important;
    background: #eff6ff !important;
    padding: 4pt 8pt !important;
    font-size: 8pt !important;
    border-radius: 20pt !important;
  }

  .flow-arrow { color: #666 !important; }

  /* ── Section headers ── */
  .page-header {
    padding: 16pt 0 12pt !important;
    border-bottom: 1.5pt solid #1a56cc !important;
    background: none !important;
    margin-bottom: 16pt;
  }

  .kicker {
    color: #1a56cc !important;
    font-size: 8pt !important;
  }

  /* ── Cards ── */
  .card, .metric-card, .district-card, .priority-card {
    background: #f8f8f8 !important;
    border: 1pt solid #ccc !important;
    padding: 10pt !important;
    margin-bottom: 8pt;
    border-radius: 4pt !important;
  }

  .card:hover, .metric-card:hover, .district-card:hover {
    transform: none !important;
  }

  /* ── Metric values ── */
  .metric-value { font-size: 18pt !important; }
  .metric-label { font-size: 8pt !important; color: #555 !important; }
  .metric-note  { font-size: 8pt !important; color: #666 !important; }

  .metric-blue .metric-value  { color: #1a56cc !important; }
  .metric-orange .metric-value { color: #b45309 !important; }
  .metric-red .metric-value   { color: #b91c1c !important; }
  .metric-green .metric-value { color: #065f46 !important; }
  .metric-teal .metric-value  { color: #0369a1 !important; }

  /* ── Grids - collapse to 2 columns for print ── */
  .grid-2, .grid-3, .grid-4, .grid-6, .grid-7 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8pt !important;
  }

  /* ── Callout boxes ── */
  .callout {
    border: 1pt solid #1a56cc !important;
    border-left: 3pt solid #1a56cc !important;
    background: #eff6ff !important;
    padding: 10pt !important;
    margin: 12pt 0 !important;
    page-break-inside: avoid;
  }

  /* ── Case cards ── */
  .case-card {
    border: 1pt solid #ccc !important;
    page-break-inside: avoid;
    margin-bottom: 12pt;
  }

  .case-card-header {
    background: #f0f4ff !important;
    padding: 8pt !important;
    border-bottom: 1pt solid #ccc !important;
  }

  .case-card-body { padding: 8pt !important; }
  .case-card-footer { padding: 6pt 8pt !important; border-top: 1pt solid #ccc !important; }

  .case-district-tag {
    background: #eff6ff !important;
    border: 1pt solid #93c5fd !important;
    color: #1a56cc !important;
    font-size: 7pt !important;
  }

  .case-stat-val { color: #1a56cc !important; }

  /* ── Template list ── */
  .template-item {
    border: 1pt solid #ccc !important;
    padding: 6pt 8pt !important;
    background: #f8f8f8 !important;
  }

  .template-num {
    background: #eff6ff !important;
    border: 1pt solid #93c5fd !important;
    color: #1a56cc !important;
  }

  /* ── Question grid ── */
  .question-item {
    border: 1pt solid #ccc !important;
    padding: 6pt 8pt !important;
    background: #f8f8f8 !important;
  }

  .question-mark {
    background: #fef3c7 !important;
    border: 1pt solid #fbbf24 !important;
    color: #b45309 !important;
  }

  /* ── District cards ── */
  .district-badge {
    background: #eff6ff !important;
    border: 1pt solid #93c5fd !important;
    color: #1a56cc !important;
  }

  /* ── RARE grid (two-col layout) ── */
  .rare-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 16pt !important;
  }

  /* ── CTA section ── */
  .cta-section {
    background: none !important;
    border-top: 1.5pt solid #1a56cc;
    padding: 16pt 0 !important;
    text-align: left !important;
  }

  /* ── Print header/footer via content ── */
  .print-header {
    display: block !important;
    font-size: 8pt;
    color: #666;
    border-bottom: 1pt solid #ccc;
    padding-bottom: 6pt;
    margin-bottom: 12pt;
  }

  /* ── Source documentation table ── */
  .source-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 9pt;
    margin: 8pt 0;
  }

  .source-table th {
    background: #1a56cc !important;
    color: #fff !important;
    padding: 5pt 8pt;
    text-align: left;
    font-size: 8pt;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .source-table td {
    padding: 4pt 8pt;
    border-bottom: 1pt solid #ddd;
    vertical-align: top;
  }

  .source-table tr:nth-child(even) td {
    background: #f8f8f8 !important;
  }
}
