/* ============================================================
   INVESTRA - print / Save as PDF (print.css, Round 16; linked with media="print")
   Every page prints as clean light tables without chrome. The company report (company.html, and
   EKLA on astra.html) prints as an A4 report with a dated header and footer; parichaya.js
   preparePrint() redraws its charts in light colours first.
   ============================================================ */
@page { size: A4 portrait; margin: 12mm 11mm 14mm; }
@media print {
  :root {
    --bg-base: #fff; --bg-card: #fff; --bg-input: #f2ede3; --bg-hover: #f2ede3; --border: #d8cdb8; --border-strong: #bdb097;
    --text: #1a140c; --text-sub: #3d3324; --text-muted: #5c4f3a; --gold: #8a6a1f; --text-gold: #7a5c16; --gold-dim: #f3ead3;
    --teal: #15745f; --teal-dim: #e1f0eb; --coral: #b13a2c; --coral-dim: #f6e4e1; --blue: #285f9c; --blue-dim: #e3ecf6; --amber: #a85d0c;
    --glass-bg: #fff; --glass-shadow: transparent;
  }
  html, body { background: #fff !important; color: var(--text); }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sidebar, .sidebar-overlay, .hamburger, .theme-toggle, .theme-toggle-fixed, .astra-fab, .fab-fire-canvas, .guide-fab, .m-topbar,
  .dr-launch, .dr-drawer, .dr-panel, .dr-scrim, #page-preloader, #inv-cine, .ember-canvas, .back-link, .co-switch, [data-drishti], .dr-placeholder,
  .csv-btn, .wl-star, .rp-act, .wl-toast, #glPop, .title-pop, .out-pop, .svg-filters, .device-hint, .scroll-progress, .disclaimer-footer .disc-copy { display: none !important; }
  .app-shell { display: block !important; }
  .content { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .glass, .card { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; filter: none !important; box-shadow: none !important; background: #fff !important; border: 1px solid var(--border) !important; }
  .fade-up { opacity: 1 !important; transform: none !important; transition: none !important; }
  .table-wrap, .dict-scroll, .wh-scroll, .tr-scroll, .dr-tscroll { overflow: visible !important; max-height: none !important; -webkit-mask-image: none !important; mask-image: none !important; }
  thead { display: table-header-group; }
  tr, .kv { break-inside: avoid; }
  a[href]:after { content: none !important; }

  /* the company report */
  .rp-print-head, .rp-print-foot { display: block !important; font-size: 10px; color: var(--text-muted); }
  .rp-print-head { border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 10px; }
  .rp-print-foot { border-top: 1px solid var(--border); padding-top: 6px; margin-top: 12px; }
  .rp .rp-sec-head { break-after: avoid; }
  .rp .glass.card, .rp .kt, .rp .chart-canvas-wrap, .rp .rp-head { break-inside: avoid; }
  .rp [id$="sources"] { break-inside: avoid; }
  .rp .rp-sec-head { flex-wrap: wrap; row-gap: 4px; }
  .rp [id$="liveQuoteMount"] { display: none !important; }
  /* A4 is ~710 CSS px wide (the phone/tablet tier): shrink the report so the desktop-like grids fit */
  .rp { zoom: .8; }
  .rp .rp-head-grid { grid-template-columns: 1fr !important; }
  .rp .rp-facts { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
  .rp .rp-grid-2, .rp .rp-grid-21 { grid-template-columns: 1fr 1fr !important; }
  .rp .rp-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  html.pr-ekla .page-header, html.pr-ekla .astra-tabs, html.pr-ekla .ekla-chooser, html.pr-ekla #eklaQuick, html.pr-ekla .astra-panel:not(#panel-ekla) { display: none !important; }
  html.pr-ekla #panel-ekla { display: block !important; }
}
