/* =====================================================================
   HosurOnline — Progeny Report · Exact A4 32-page Paged Media stylesheet
   Screen preview + print share one set of page metrics (210mm × 297mm).
   ===================================================================== */

@font-face {
  font-family: 'Noto Sans Tamil';
  src: local('Noto Sans Tamil'), url('../fonts/noto-sans-tamil-tamil-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0B80-0BFF, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Noto Sans Tamil';
  src: local('Noto Sans Tamil Bold'), url('../fonts/noto-sans-tamil-tamil-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0B80-0BFF, U+200C-200D, U+25CC;
}

@page { size: A4 portrait; margin: 0; }

.ho-prg-report.ho-lang-en { font-family: 'Segoe UI', 'Helvetica Neue', Arial, 'Noto Sans Tamil', system-ui, sans-serif; }
.ho-prg-report {
  --maroon: #7C1D1D;
  --gold: #C89B3C;
  --gold-d: #B47B17;
  --ivory: #FDF8EE;
  --ink: #1F2937;
  --muted: #6B7280;
  --line: #EADFC8;
  font-family: 'Noto Sans Tamil', 'Latha', 'Vijaya', 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
  text-rendering: optimizeLegibility;
}
.ho-prg-report *, .ho-prg-report *::before, .ho-prg-report *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------- page box */
.ho-pdf-page {
  width: 210mm;
  height: 297mm;
  padding: 14mm 14mm 15mm 14mm;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #FFFFFF;
  position: relative;
  font-size: 10.4pt;
  line-height: 1.5;
  page-break-after: always;
  break-after: page;
  page-break-inside: avoid;
  break-inside: avoid;
}
.ho-pdf-page:last-child { page-break-after: auto; break-after: auto; }

.ho-pdf-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  border-bottom: 1.5px solid var(--gold);
  padding-bottom: 1.6mm; margin-bottom: 3.2mm; flex: 0 0 auto;
}
.ho-pdf-head-title { display: flex; flex-direction: column; line-height: 1.25; }
.ho-pdf-head-main { color: var(--maroon); font-weight: 700; font-size: 9.8pt; }
.ho-pdf-head-brand { color: var(--gold-d); font-size: 7.2pt; letter-spacing: .03em; }
.ho-pdf-head-logo { height: 16px; width: auto; }
.ho-pdf-id { display: flex; flex-direction: column; align-items: flex-end; text-align: right; font-size: 6.6pt; line-height: 1.35; color: var(--ink); max-width: 112mm; }
.ho-pdf-id span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 112mm; }
.ho-pdf-id strong { color: var(--maroon); }
.ho-pdf-page { isolation: isolate; }
.ho-wm { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; display: flex; flex-direction: column; justify-content: space-around; align-items: center; }
.ho-wm span { transform: rotate(-32deg); white-space: nowrap; font-size: 15pt; font-weight: 700; color: var(--maroon); opacity: .06; letter-spacing: .04em; }

.ho-pdf-body { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 2.4mm; }
.ho-pdf-body > * { flex-shrink: 0; zoom: var(--ho-fit, 1); }

.ho-pdf-foot {
  flex: 0 0 auto; margin-top: 2.4mm; padding-top: 1.6mm;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 4mm;
  font-size: 7pt; color: var(--muted);
}
.ho-pdf-foot-left { display: flex; align-items: center; gap: 2.4mm; min-width: 0; }
.ho-pdf-foot-left img { height: 13px; width: auto; flex: 0 0 auto; }
.ho-pdf-foot-left span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ho-pdf-pill {
  background: var(--ivory); border: 1px solid #E7D3A6; color: var(--maroon);
  border-radius: 999px; padding: .6mm 3mm; font-weight: 700; white-space: nowrap; font-size: 7.4pt;
}

/* ---------------------------------------------------------------- headings */
.ho-h { display: flex; align-items: center; gap: 3mm; }
.ho-h-num { background: var(--maroon); color: #fff; border-radius: 50%; width: 9mm; height: 9mm; display: grid; place-items: center; font-weight: 700; }
.ho-h-ta { margin: 0; color: var(--maroon); font-size: 15pt; line-height: 1.3; font-weight: 700; }
.ho-h-en { margin: 0; color: var(--gold-d); font-size: 8.2pt; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; }
.ho-sub { margin: 1.4mm 0 0; font-size: 11pt; color: var(--maroon); font-weight: 700; border-left: 3px solid var(--gold); padding-left: 2mm; line-height: 1.3; }
.ho-sub small { color: var(--muted); font-weight: 500; font-size: 7.8pt; }

/* ---------------------------------------------------------------- tables */
.ho-tbl { width: 100%; border-collapse: collapse; font-size: 9.6pt; line-height: 1.38; page-break-inside: avoid; break-inside: avoid; }
.ho-tbl th { background: var(--ivory); color: var(--maroon); text-align: left; font-weight: 700; padding: 1.3mm 1.8mm; border-bottom: 1.2px solid var(--gold); vertical-align: bottom; }
.ho-tbl td { padding: 1.2mm 1.8mm; border-bottom: 1px solid #F1E9D8; vertical-align: top; }
.ho-tbl tbody tr:nth-child(even) td { background: #FFFCF5; }
.ho-tbl .ta { display: block; }
.ho-tbl .en { display: block; color: var(--muted); font-size: 7pt; line-height: 1.25; }
.ho-tbl small { display: block; color: var(--muted); font-size: 6.9pt; }
.ho-tbl-compact { font-size: 9pt; }
.ho-tbl-compact th { padding: .9mm 1.5mm; }
.ho-tbl-compact td { padding: 1mm 1.6mm; }
.ho-tbl-grid th, .ho-tbl-grid td { text-align: center; }
.ho-tbl-grid th:first-child, .ho-tbl-grid td:first-child { text-align: left; }
.ho-tbl-planets td:nth-child(5) { text-align: center; }
.ho-tbl-inline .en, .ho-tbl-inline small { display: inline; margin-left: 1.2mm; }
.ho-tbl-inline td { padding-top: .45mm; padding-bottom: .45mm; }
.ho-tbl-planets.ho-tbl-compact { font-size: 7.4pt; line-height: 1.2; }
.ho-tbl-planets.ho-tbl-compact td { padding: .3mm 1.3mm; }
.ho-tbl-planets.ho-tbl-compact th { padding: .5mm 1.3mm; }
.ho-tbl-factors td:nth-child(2) { font-weight: 600; }
.ho-tbl-factors td:nth-child(3) { white-space: nowrap; width: 1%; }
.ho-tbl-dasa td { padding: .55mm 1.4mm; }
.ho-tbl-remedy td, .ho-tbl-temples td, .ho-tbl-gloss td { font-size: 7.6pt; }
.ho-tbl-av td, .ho-tbl-av th { padding: .7mm 1mm; }
.ho-tbl-transit td:last-child { font-size: 7.2pt; }
.ho-hl { background: #F6E3B4; color: var(--maroon); font-weight: 800; border-radius: 3px; padding: 0 1.2mm; }
.ho-cell-strong { color: #166534; }
.ho-cell-mid { color: #92400E; }
.ho-cell-weak { color: #991B1B; }
.ho-yes { color: #166534; font-weight: 700; }
.ho-no { color: var(--muted); }
.ho-flag { display: inline-block; font-size: 6.6pt; border: 1px solid #D6C7A3; border-radius: 3px; padding: 0 1mm; margin-right: .6mm; color: var(--maroon); background: #FFF8E8; }
.ho-flag-c { color: #991B1B; border-color: #F3B7B7; background: #FFF1F1; }
.ho-flag-v { color: #166534; border-color: #A7D7B3; background: #F0FAF2; }
.ho-sw { display: inline-block; width: 2.4mm; height: 2.4mm; border-radius: 1px; margin-right: 1.2mm; vertical-align: middle; }
.ho-sw-high { background: #1E6B34; } .ho-sw-mid { background: #6DB57A; } .ho-sw-low { background: #E7E1D3; }

/* ---------------------------------------------------------------- badges */
.ho-badge { display: inline-flex; align-items: center; gap: 1mm; border-radius: 999px; padding: .35mm 2.2mm; font-size: 7.2pt; font-weight: 700; white-space: nowrap; }
.ho-badge-strong { color: #166534; background: #DCFCE7; }
.ho-badge-moderate { color: #92400E; background: #FEF3C7; }
.ho-badge-caution { color: #991B1B; background: #FEE2E2; }

/* ---------------------------------------------------------------- interpretation text (one language) */
.ho-bi { page-break-inside: avoid; break-inside: avoid; }
.ho-bi-text { font-size: 10.8pt; line-height: 1.66; border-left: 2.5px solid var(--gold); padding-left: 3mm; }
.ho-bi-text p { margin: 0 0 1.6mm; text-align: justify; hyphens: auto; }
.ho-bi-text p:last-child { margin-bottom: 0; }
.ho-bi-tight .ho-bi-text { font-size: 10.2pt; line-height: 1.6; }
.ho-bi-list .ho-bi-text p { text-align: left; }
.ho-lang-en .ho-bi-text { font-size: 11pt; }
.ho-lang-en .ho-bi-tight .ho-bi-text { font-size: 10.4pt; }
.ho-note { margin: 0; font-size: 8pt; color: var(--muted); }

.ho-callout { background: var(--ivory); border: 1px solid #EBD9B0; border-radius: 2mm; padding: 2.2mm 3.2mm; font-size: 9.6pt; page-break-inside: avoid; }
.ho-callout p { margin: 0 0 .8mm; }
.ho-callout p:last-child { margin-bottom: 0; }
.ho-callout-info { border-left: 3px solid var(--gold); }
.ho-callout-ok { border-left: 3px solid #166534; background: #F0FAF2; }

.ho-guide { border: 1px solid #E7D3A6; border-radius: 2mm; background: linear-gradient(180deg, #FFFBF1, #FDF8EE); padding: 2mm 3mm; page-break-inside: avoid; margin-top: auto; }
.ho-guide-title { font-weight: 700; color: var(--maroon); font-size: 8.8pt; margin-bottom: 1mm; }
.ho-guide ol { margin: 0; padding-left: 5mm; font-size: 10pt; }
.ho-guide li { margin-bottom: .8mm; }
.ho-guide .en, .ho-list .en, .ho-check .en, .ho-steps .en { display: block; color: var(--muted); font-size: 7.6pt; }

.ho-list { margin: 0; padding-left: 4.5mm; font-size: 9.6pt; }
.ho-list li { margin-bottom: 1mm; }
.ho-list-tight li { margin-bottom: .5mm; font-size: 7.8pt; }
.ho-check { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 1.6mm 4mm; font-size: 9.6pt; }
.ho-check li { padding-left: 5mm; position: relative; }
.ho-check li::before { content: '☐'; position: absolute; left: 0; top: 0; color: var(--maroon); }
.ho-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2mm; font-size: 10pt; }
.ho-steps li { display: flex; gap: 3mm; align-items: flex-start; border-bottom: 1px dashed #EADFC8; padding-bottom: 1.4mm; }
.ho-step-n-wide { flex-basis: 14mm !important; width: 14mm; border-radius: 2mm !important; font-size: 7pt; }
.ho-step-n { flex: 0 0 7mm; height: 7mm; border-radius: 50%; background: var(--maroon); color: #fff; display: grid; place-items: center; font-weight: 700; }

.ho-chips { display: flex; flex-wrap: wrap; gap: 1.2mm; }
.ho-chip { font-size: 8.4pt; border: 1px solid #E7D3A6; background: #FFFBF1; border-radius: 999px; padding: .3mm 2.2mm; }
.ho-chip-on { background: var(--maroon); color: #fff; border-color: var(--maroon); }
.ho-mantra { font-weight: 600; color: var(--maroon); font-size: 9pt; }

/* ---------------------------------------------------------------- layout helpers */
.ho-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm; align-items: start; }
.ho-grid-gauge { grid-template-columns: 62mm 1fr; align-items: center; }
.ho-grid-wheel { grid-template-columns: 68mm 1fr; align-items: center; }
.ho-grid-d7 { display: grid; grid-template-columns: 92mm 1fr; gap: 4mm; align-items: start; }
.ho-center { text-align: center; }
.ho-mini { font-size: 7.2pt; color: var(--muted); }
.ho-charts figure { margin: 0; text-align: center; }
.ho-prg-report .ho-charts svg { width: 100%; height: auto; max-width: 84mm; }
.ho-prg-report .ho-charts-sm svg { max-width: 58mm; }
.ho-prg-report .ho-charts-d7 svg { max-width: 80mm; }
.ho-charts figcaption { font-size: 7.6pt; color: var(--muted); margin-top: .6mm; }
.ho-prg-report svg { display: block; margin: 0 auto; max-width: 100%; height: auto; font-family: 'Noto Sans Tamil', 'Latha', 'Segoe UI', system-ui, sans-serif; }
.ho-bars, .ho-heat, .ho-dasa, .ho-meters, .ho-strip { width: 100%; }
.ho-dasa-tables > div { min-width: 0; }

.ho-toc { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 6mm; font-size: 8.8pt; line-height: 1.3; }
.ho-toc li { display: flex; gap: 1.6mm; break-inside: avoid; padding: .3mm 0; border-bottom: 1px dotted #EADFC8; line-height: 1.18; }
.ho-toc-n { flex: 0 0 5mm; font-weight: 700; color: var(--maroon); }
.ho-toc .ta { flex: 1 1 auto; }
.ho-toc .en { color: var(--muted); font-size: 6.8pt; text-align: right; }

.ho-m12 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1mm; }
.ho-m12-cell { border-radius: 1.4mm; text-align: center; padding: 1mm 0; font-size: 7pt; line-height: 1.2; }
.ho-m12-cell span { display: block; }
.ho-m12-cell strong { display: block; font-size: 10pt; }

/* ---------------------------------------------------------------- question pages */
.ho-qbanner { background: linear-gradient(135deg, #7C1D1D, #5E1414); color: #FFF8E8; border-radius: 2.4mm; padding: 2.6mm 3.6mm; position: relative; }
.ho-qchip { display: inline-block; background: var(--gold); color: #3B1010; font-weight: 700; font-size: 7.2pt; border-radius: 999px; padding: .2mm 2.4mm; letter-spacing: .03em; }
.ho-q-ta { margin: 1.4mm 0 .6mm; font-size: 12pt; font-weight: 700; line-height: 1.42; }
.ho-q-en { margin: 0; font-size: 9pt; color: #F6E3B4; font-style: italic; }
.ho-q-focus { margin: 1.2mm 0 0; font-size: 6.9pt; color: #F3DDB0; line-height: 1.35; }
.ho-verdict { display: grid; grid-template-columns: 1fr auto; gap: 3mm; align-items: center; border: 1px solid var(--line); border-radius: 2mm; padding: 1.8mm 3mm; background: #FFFDF8; }
.ho-verdict-strong { border-left: 4px solid #166534; }
.ho-verdict-moderate { border-left: 4px solid #B47B17; }
.ho-verdict-caution { border-left: 4px solid #991B1B; }
.ho-verdict-label { display: flex; flex-direction: column; gap: .8mm; align-items: flex-start; }
.ho-verdict-k { font-size: 7pt; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.ho-verdict .ho-badge { font-size: 8.4pt; padding: .7mm 3mm; white-space: normal; }
.ho-verdict-score strong { font-size: 22pt; color: var(--maroon); line-height: 1; }
.ho-verdict-score span { color: var(--muted); font-size: 8pt; }
.ho-qpage .ho-pdf-body { gap: 2mm; }
.ho-qpage .ho-bi-text { font-size: 10.6pt; line-height: 1.62; }
.ho-qpage .ho-bi-deep .ho-bi-text { font-size: 10pt; border-left-color: #E7D3A6; }
.ho-qpage .ho-tbl-factors { font-size: 9pt; }
.ho-qpage .ho-tbl-factors td { padding-top: .7mm; padding-bottom: .7mm; }
.ho-qpage .ho-tbl-remedy td { font-size: 7.2pt; padding: .4mm 1.3mm; line-height: 1.22; }
.ho-qpage .ho-guide { padding: 1.6mm 3mm; }
.ho-qpage .ho-guide li { margin-bottom: .4mm; }
.ho-qbanner { padding: 2.2mm 3.4mm; }
.ho-mandala { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4mm; font-size: 7.1pt; line-height: 1.3; }
.ho-mandala > div { background: #FFFBF1; border: 1px solid #EADFC8; border-radius: 1.6mm; padding: 1.2mm 2mm; }
.ho-mandala strong { display: block; color: var(--maroon); font-size: 8pt; }
.ho-mandala .en { display: block; color: var(--muted); font-size: 6.9pt; }

.ho-caution-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2mm; }
.ho-caution-cell { border-radius: 1.6mm; padding: 1mm 1.6mm; font-size: 7pt; line-height: 1.3; border: 1px solid #EADFC8; background: #FFFBF1; }
.ho-caution-cell strong { display: block; font-size: 7.6pt; color: var(--maroon); }
.ho-lvl-3 { background: #FEE2E2; border-color: #F3B7B7; }
.ho-lvl-2 { background: #FEF3C7; border-color: #F2D98B; }

/* ---------------------------------------------------------------- covers */
.ho-cover { padding: 9mm; }
.ho-cover-frame { flex: 1 1 auto; border: 2.2mm double var(--maroon); outline: .8mm solid var(--gold); outline-offset: -4.2mm; padding: 6mm; display: flex; background: radial-gradient(circle at 50% 30%, #FFFBF0 0%, #FDF8EE 60%, #F8EEDA 100%); }
.ho-cover-inner { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 3mm; padding: 4mm 6mm; }
.ho-cover-logo { height: 17mm; width: auto; }
.ho-cover-invoke { margin: 0; color: var(--maroon); font-weight: 700; letter-spacing: .06em; font-size: 10pt; }
.ho-cover-emblem { height: 54mm; width: auto; }
.ho-cover-title { margin: 0; display: flex; flex-direction: column; gap: 1.4mm; }
.ho-cover-title-main { font-size: 21pt; color: var(--maroon); line-height: 1.35; font-weight: 700; }
.ho-cover-sub { margin: 0; font-size: 8.4pt; color: var(--muted); }
.ho-cover-for { width: 100%; background: #FFFFFF; border: 1px solid #E7D3A6; border-radius: 3mm; padding: 3mm 4mm; box-shadow: 0 .6mm 0 #EAD9B4; }
.ho-cover-for-title { font-size: 7.6pt; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-d); font-weight: 700; }
.ho-cover-names { font-size: 14pt; font-weight: 800; color: var(--maroon); margin: .6mm 0 2mm; }
.ho-cover-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(70mm, 1fr)); gap: 3mm; text-align: left; }
.ho-cover-card { margin: 0; display: grid; grid-template-columns: 30mm 1fr; gap: .6mm 2mm; font-size: 7.8pt; background: var(--ivory); border-radius: 2mm; padding: 2mm 2.6mm; }
.ho-cover-card dt { color: var(--muted); }
.ho-cover-card dt .en { font-size: 6.6pt; display: block; }
.ho-cover-card dd { margin: 0; font-weight: 600; word-break: break-word; }
.ho-cover-meta { display: flex; justify-content: space-between; gap: 3mm; margin-top: 2mm; font-size: 7.6pt; color: var(--muted); flex-wrap: wrap; }
.ho-cover-scope { margin: auto 0 0; font-size: 7.8pt; color: var(--maroon); line-height: 1.5; }
.ho-cover-scope span { color: var(--muted); }
.ho-cover-foot { height: 7mm; width: auto; }

.ho-back-emblem { height: 30mm; width: auto; opacity: .95; }
.ho-back-cards { margin-top: 2mm; }
.ho-back-bless { margin: 0; display: flex; flex-direction: column; }
.ho-back-bless .ta { font-size: 18pt; color: var(--maroon); font-weight: 700; }
.ho-back-bless .en { font-size: 10pt; color: var(--gold-d); font-weight: 600; }
.ho-back-box, .ho-back-legal { width: 100%; text-align: left; background: #FFFFFF; border: 1px solid #E7D3A6; border-radius: 3mm; padding: 2.6mm 3.6mm; }
.ho-back-box-title { font-weight: 700; color: var(--maroon); font-size: 9pt; margin-bottom: 1.2mm; }
.ho-back-legal { border-left: 4px solid #991B1B; }
.ho-back-legal p { margin: 0 0 1.2mm; font-size: 8.2pt; text-align: justify; }
.ho-back-portal { font-size: 8pt; color: var(--muted); margin-top: auto; line-height: 1.6; }
.ho-back-portal strong { color: var(--maroon); }
.ho-prg-report code { font-family: ui-monospace, 'Consolas', monospace; font-size: 8.6pt; color: var(--maroon); letter-spacing: .08em; }

/* ---------------------------------------------------------------- site-CSS isolation (Bootstrap 3 / custom.css) */
.ho-prg-report code { background: none; padding: 0; border-radius: 0; white-space: normal; }
.ho-prg-report h1, .ho-prg-report h2, .ho-prg-report h3 { font-family: inherit; }
.ho-prg-report table { background-color: transparent; }
.ho-prg-report img { vertical-align: middle; border: 0; }

/* ---------------------------------------------------------------- screen preview */
@media screen {
  .ho-prg-report { display: flex; flex-direction: column; align-items: center; gap: 8mm; padding: 6mm 0; }
  .ho-pdf-page { box-shadow: 0 2px 14px rgba(60, 30, 10, .18); border-radius: 1mm; }
}

/* ---------------------------------------------------------------- print isolation */
@media print {
  html, body { margin: 0 !important; padding: 0 !important; background: #FFFFFF !important; }
  body.ho-prg-printing > *:not(#ho-prg-print-host) { display: none !important; }
  #ho-prg-print-host { display: block !important; }
  .ho-prg-report { display: block; padding: 0; gap: 0; }
  .ho-pdf-page { box-shadow: none; border-radius: 0; margin: 0; }
  .ho-no-print { display: none !important; }
}
