
/* =====================================================================
   V54 — Tender Executive Summary & BOQ Extraction
   Inner report text reduced by exactly 30% from the V50 baseline.

   V50 baseline : #boqAnalysisBody / #tenderSummaryBody = 120%
   V54 target   : 120% x 0.70 = 84%

   Rows, columns, grid tracks and table structure are explicitly
   re-asserted so nothing reflows or collapses at the smaller size.
   ===================================================================== */

/* ---------- 1. Root scale: exact -30% ---------- */
#boqAnalysisBody,
#tenderSummaryBody,
#boqAnalysisModal .analysis-modal-body,
#tenderSummaryModal .analysis-modal-body{
  font-size:84%!important;      /* 19.2px -> 13.44px  (-30%) */
  line-height:1.55;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* Everything inherits the reduced root (prevents % compounding) */
#boqAnalysisBody *,
#tenderSummaryBody *{
  font-size:inherit;
}

/* ---------- 2. Typographic ladder (same ratios as V50, so every
               element lands at exactly 70% of its previous size) ---------- */
#boqAnalysisBody h1,#tenderSummaryBody h1{font-size:1.55em!important;line-height:1.25}
#boqAnalysisBody h2,#tenderSummaryBody h2{font-size:1.35em!important;line-height:1.3;letter-spacing:-.005em}
#boqAnalysisBody h3,#tenderSummaryBody h3{font-size:1.18em!important;line-height:1.35}
#boqAnalysisBody h4,#tenderSummaryBody h4{font-size:1.08em!important;line-height:1.4}
#boqAnalysisBody small,#tenderSummaryBody small{font-size:.82em!important}
#boqAnalysisBody .section-kicker,
#tenderSummaryBody .section-kicker{font-size:.78em!important;letter-spacing:.11em}

/* ---------- 3. Report header ---------- */
#boqAnalysisBody .analysis-result-head p,
#tenderSummaryBody .analysis-result-head p{font-size:.88em!important;line-height:1.5}
#boqAnalysisBody .analysis-cache,
#tenderSummaryBody .analysis-cache{font-size:.7em!important;padding:5px 8px}
#boqAnalysisBody .analysis-pdf-download b,
#tenderSummaryBody .analysis-pdf-download b{font-size:.92em!important}
#boqAnalysisBody .analysis-pdf-download small,
#tenderSummaryBody .analysis-pdf-download small{font-size:.74em!important}

/* ---------- 4. BOQ summary strip — 5 columns preserved ---------- */
#boqAnalysisBody .boq-summary-strip{
  grid-template-columns:.65fr 1.55fr .75fr .75fr .9fr!important;
  gap:8px;margin:12px 0;
}
#boqAnalysisBody .boq-summary-strip>div{padding:9px 10px}
#boqAnalysisBody .boq-summary-strip span{font-size:.63em!important;letter-spacing:.05em;line-height:1.3}
#boqAnalysisBody .boq-summary-strip strong{font-size:1.12em!important;line-height:1.3;margin-top:4px}

/* ---------- 5. Document meta — 5 columns preserved ---------- */
#boqAnalysisBody .boq-document-meta{
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:8px;margin:11px 0;
}
#boqAnalysisBody .boq-document-meta>div{padding:9px 10px}
#boqAnalysisBody .boq-document-meta span{font-size:.62em!important;letter-spacing:.05em;margin-bottom:4px}
#boqAnalysisBody .boq-document-meta b{font-size:.95em!important;line-height:1.42}

/* ---------- 6. Executive summary block ---------- */
#boqAnalysisBody .boq-exec-summary{padding:11px 12px;margin:11px 0}
#boqAnalysisBody .boq-exec-head h3{font-size:1.05em!important}
#boqAnalysisBody .boq-exec-head>span{width:30px;height:30px}
#boqAnalysisBody .boq-exec-summary li{font-size:.96em!important;line-height:1.58}

/* ---------- 7. Financial cards — 2 columns preserved ---------- */
#boqAnalysisBody .boq-finance-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px}
#boqAnalysisBody .boq-finance-card{padding:9px 10px}
#boqAnalysisBody .boq-finance-card h3{font-size:.95em!important}
#boqAnalysisBody .boq-finance-card li{font-size:.9em!important;line-height:1.5}
#boqAnalysisBody .boq-section-title h3{font-size:1.15em!important;margin:3px 0 8px}
#boqAnalysisBody .grand-total-card>strong{font-size:1.45em!important;margin-top:8px;line-height:1.2}

/* ---------- 8. BOQ table — rows & columns untouched ---------- */
#boqAnalysisBody .analysis-table-wrap{overflow:auto}
#boqAnalysisBody .boq-table{min-width:1080px!important;border-collapse:collapse;table-layout:auto}
#boqAnalysisBody .boq-table th{font-size:.72em!important;letter-spacing:.045em;padding:7px 9px;line-height:1.35}
#boqAnalysisBody .boq-table td{font-size:.92em!important;padding:7px 9px;line-height:1.5;vertical-align:top}
#boqAnalysisBody .boq-table td b{font-size:1em!important;line-height:1.45}
#boqAnalysisBody .boq-table td small{font-size:.76em!important;line-height:1.45;margin-top:3px}
#boqAnalysisBody .boq-table th:nth-child(2),
#boqAnalysisBody .boq-table td:nth-child(2){min-width:320px}
#boqAnalysisBody .not-found{font-size:.8em!important}

/* ---------- 9. Tender Executive Summary — 2 columns preserved ---------- */
#tenderSummaryBody .summary-meta-row{gap:6px;margin:11px 0}
#tenderSummaryBody .summary-meta-row span{font-size:.76em!important;padding:5px 8px;line-height:1.35}
#tenderSummaryBody .summary-grid{grid-template-columns:1fr 1fr!important;gap:9px}
#tenderSummaryBody .summary-clause{padding:11px 12px}
#tenderSummaryBody .summary-clause header{gap:7px;padding-bottom:6px}
#tenderSummaryBody .summary-clause header i{width:25px;height:25px;font-size:.85em!important}
#tenderSummaryBody .summary-clause h3{font-size:1.02em!important;line-height:1.35}
#tenderSummaryBody .summary-clause ul{padding-left:16px;margin:8px 0 0;gap:6px}
#tenderSummaryBody .summary-clause li{font-size:.95em!important;line-height:1.6}
#tenderSummaryBody .summary-missing{font-size:.9em!important}
#tenderSummaryBody .parser-notes summary{font-size:.86em!important}
#tenderSummaryBody .parser-notes li{font-size:.86em!important;line-height:1.5}

/* ---------- 10. Shared footer / empty states ---------- */
#boqAnalysisBody .analysis-footnote,
#tenderSummaryBody .analysis-footnote{font-size:.84em!important;line-height:1.55}
#boqAnalysisBody .analysis-no-data h3,
#tenderSummaryBody .analysis-no-data h3{font-size:1.18em!important}
#boqAnalysisBody .analysis-no-data p,
#tenderSummaryBody .analysis-no-data p{font-size:.95em!important;line-height:1.6;max-width:820px!important}

/* ---------- 11. Optical breathing room on the card ---------- */
#boqAnalysisModal .analysis-modal-body,
#tenderSummaryModal .analysis-modal-body{padding:16px 20px 22px}

/* ---------- 12. Responsive — identical breakpoints to the original ---------- */
@media(max-width:1050px){
  #boqAnalysisBody .boq-document-meta{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:900px){
  #tenderSummaryBody .summary-grid{grid-template-columns:1fr!important}
}
@media(max-width:780px){
  #boqAnalysisBody .boq-summary-strip{grid-template-columns:1fr 1fr!important}
}
@media(max-width:650px){
  #boqAnalysisBody .boq-document-meta,
  #boqAnalysisBody .boq-finance-grid{grid-template-columns:1fr!important}
}
@media(max-width:520px){
  #boqAnalysisBody .boq-summary-strip{grid-template-columns:1fr!important}
  #boqAnalysisModal .analysis-modal-body,
  #tenderSummaryModal .analysis-modal-body{padding:13px}
}
