/* The Reports tab. Compact, like the Detailed report: one column
   on phones, more where there is room, and fitted to one US Letter page when printed. */
:root {
  /* The two people in a pair: bride or first person, then groom or second. */
  --viz-a: #3987e5; --viz-a-ink: #0b0b0b;
  --viz-b: #d95926; --viz-b-ink: #0b0b0b;
  --viz-letter: #0b0b0b;
}
:root[data-theme="light"] {
  --viz-a: #2a78d6; --viz-a-ink: #ffffff;
  --viz-b: #eb6834; --viz-b-ink: #0b0b0b;
  --viz-letter: #ffffff;
}

.tab-short, .panel-badge { display: none; }
@media (max-width: 600px) {
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-bottom: 8px; }
  .tab-btn { justify-content: center; min-height: 44px; padding: 10px 2px; font-size: 13px; }
  .tab-long, .tab-btn .tab-badge { display: none; }
  .tab-short { display: inline; }
  .panel-badge { display: block; margin-bottom: 6px; }
}

/* ---------------- shared layout ---------------- */
/* A report for one person, or for two. */
.rpt-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; max-width: 520px; margin-bottom: 10px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--panel); }
.rpt-side { min-height: 40px; padding: 0 4px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.rpt-side[aria-selected="true"] { background: var(--accent); color: var(--bg); }
.rpt-root[hidden] { display: none; }
.rpt-root { font-size: 11px; line-height: 1.35; }
.rpt-title { font-weight: 600; }
.rpt-sub { font-size: 9.5px; font-weight: 400; color: var(--muted); }
.rpt-eyebrow { font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.rpt-h { font-size: 11.5px; font-weight: 700; margin: 9px 0 3px; }
.rpt-h .rpt-sub { margin-left: 4px; }
.rpt-note, .rpt-foot { font-size: 9.5px; color: var(--muted); margin-top: 4px; }
.rpt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px solid var(--border); }
.rpt-btn { min-height: 28px; min-width: 56px; padding: 0 10px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--ink); font: inherit; font-size: 10.5px; cursor: pointer; }
.rpt-btn-primary { display: block; width: 100%; margin-top: 4px; background: var(--accent); border-color: var(--accent); color: var(--bg); font-weight: 700; }
.rpt-wide { display: block; width: 100%; margin-top: 4px; }
.rpt-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.rpt-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 13px; }
.rpt-head .rpt-btn { min-width: 0; padding: 0 8px; }
.rpt-subtitle { margin: -2px 0 3px; font-size: 10px; font-weight: 600; color: var(--accent); }
.rpt-tag { font-size: 9px; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); white-space: nowrap; }
.rpt-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; align-items: start; }
.rpt-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 14px; align-items: start; }
.rpt-print { display: none; }

/* ---------------- product cards and atlas header ---------------- */
.rpt-products { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.rpt-product { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 8px; padding: 6px 8px; }
.rpt-product.lead { border: 2px solid var(--accent); }
.rpt-product-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rpt-product h3 { margin: 0; font-size: 12px; }
.rpt-badge { font-size: 9px; font-weight: 700; padding: 0 7px; border-radius: 999px; border: 1px solid var(--accent); color: var(--accent); }
.rpt-product.lead .rpt-badge { background: var(--accent); color: var(--bg); }
.rpt-tagline { font-size: 10.5px; font-style: italic; }
.rpt-prices { display: flex; gap: 4px; margin: auto 0 0; padding-top: 5px; }
.rpt-prices span { flex: 1; text-align: center; padding: 2px; border-radius: 5px; background: var(--panel); border: 1px solid var(--border); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.rpt-prices small { font-size: 9px; font-weight: 400; color: var(--muted); }
/* The Detailed report's header block, at this tab's size. */
.rpt-root .report-header { font-size: 10px; padding-bottom: 4px; margin-bottom: 0; }
.rpt-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; margin: 5px 0 0; }
.rpt-seg button { min-height: 28px; padding: 0 2px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--ink); font: inherit; font-size: 10.5px; font-weight: 600; cursor: pointer; }
.rpt-seg button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }

/* ---------------- rows, cards and tables ---------------- */
.rpt-card { border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; margin-bottom: 5px; }
.rpt-couple { display: flex; flex-direction: column; margin-bottom: 6px; }
.rpt-factor { border-bottom: 1px solid var(--border); }
.rpt-factor summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; cursor: pointer; list-style: none; }
.rpt-factor summary::-webkit-details-marker { display: none; }
.rpt-factor summary::after { content: "\203A"; color: var(--muted); font-size: 14px; transition: transform .15s; }
.rpt-factor[open] summary::after { transform: rotate(90deg); }
.rpt-kv { display: grid; grid-template-columns: 66px minmax(0, 1fr); gap: 1px 8px; margin: 0; padding: 3px 0; font-size: 10px; }
.rpt-kv dt { color: var(--muted); }
.rpt-kv dd { margin: 0; }
table.rpt-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0; font-size: 10px; }
.rpt-table th, .rpt-table td { padding: 2px 4px; text-align: left; vertical-align: top; border: 1px solid var(--border); }
.rpt-table th { color: var(--ink); }
.rpt-table tr:first-child th { color: var(--muted); font-size: 9px; }
.rpt-table tr:first-child th:first-child { width: 24%; }
table.viz-checks tr:first-child th:first-child { width: 38%; }
table.viz-checks tr:first-child th:nth-child(2) { width: 11%; }
.viz-checks td { text-align: center; vertical-align: middle; font-size: 9.5px; font-weight: 700; padding: 1px; }
.viz-basis { display: block; }
table.rpt-grid { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0; font-size: 10px; }
table.rpt-grid th, table.rpt-grid td { padding: 2px 0; text-align: center; border: 1px solid var(--card-bg); }
table.rpt-grid th:first-child { width: 30px; }
table.rpt-grid tr.total td { font-weight: 700; }

.rpt-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 6px; }
.rpt-charts.two { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.rpt-charts.pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rpt-charts.small { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.rpt-charts.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rpt-chart { min-width: 0; width: 100%; max-width: 260px; margin: 0 auto; }
.rpt-chart svg { display: block; width: 100%; max-width: none !important; height: auto; background: #fff; border-radius: 4px; }
.rpt-factor .rpt-charts { padding-bottom: 6px; }

/* The Detailed report's tables, fitted to this tab. */
.rpt-details .report-compact-table { margin-top: 3px; }
.rpt-details .report-compact-table th, .rpt-details .report-compact-table td { padding: 2px 2px; font-size: 9.5px; vertical-align: top; }
/* The yoga list comes from the Detailed report's renderer, with its own inline sizes. */
.rpt-details > div[style]:not(.hint) { margin-top: 9px !important; font-size: 11.5px !important; }
.rpt-details .hint { font-size: 9.5px; }

/* ---------------- charts ---------------- */
.viz-legend { display: flex; flex-wrap: wrap; gap: 1px 9px; margin: 3px 0; font-size: 9.5px; }
.viz-legend span { display: inline-flex; align-items: center; gap: 3px; }
.viz-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; }

.viz-cols { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2px; }
.viz-col { display: flex; flex-direction: column; align-items: center; font-size: 9.5px; }
.viz-col > span { display: flex; align-items: flex-end; width: 100%; height: 40px; }
.viz-col i { display: block; width: 100%; border-radius: 3px 3px 0 0; }
.viz-col em { font-style: normal; color: var(--muted); }

.viz-m-row { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: center; gap: 4px; padding: 1px 0; font-size: 10px; }
.viz-m-head { font-weight: 600; }
.viz-m-head span:first-child { text-align: right; }
.viz-m-head span:nth-child(2) { text-align: center; color: var(--muted); font-weight: 400; }
.viz-m-house { text-align: center; font-weight: 700; }
.viz-m-a, .viz-m-b { display: grid; align-items: center; gap: 4px; }
.viz-m-a { grid-template-columns: 18px minmax(0, 1fr); }
.viz-m-b { grid-template-columns: minmax(0, 1fr) 18px; }
.viz-m-a b { text-align: right; }
.viz-m-b b { order: 2; }
.viz-m-a > span, .viz-m-b > span { display: flex; height: 9px; }
.viz-m-a > span { justify-content: flex-end; }
.viz-m-a i { border-radius: 3px 0 0 3px; }
.viz-m-b i { border-radius: 0 3px 3px 0; }

/* ---------------- porutham ---------------- */
.viz-hero { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.viz-hero-side { flex: 1; min-width: 0; }
.viz-books { margin-top: 3px; font-size: 10.5px; font-weight: 700; }
.viz-ring { width: 92px; height: 92px; flex: 0 0 auto; }
.viz-ring path { fill: none; stroke-width: 14; }
.viz-ring-num { font-size: 40px; font-weight: 700; fill: var(--ink); text-anchor: middle; }
.viz-ring-of { font-size: 18px; fill: var(--muted); text-anchor: middle; }
.viz-stack { display: flex; gap: 2px; margin-top: 2px; }
.viz-stack span { border-radius: 3px; text-align: center; font-size: 10px; font-weight: 700; }
.viz-key { margin: 0; }
.viz-warn { margin: 6px 0 0; border-width: 2px; }
.viz-warn ul { margin: 2px 0; padding-left: 14px; font-size: 9.5px; }
.viz-key-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 3px; }
.viz-ladder { display: flex; flex-direction: column; gap: 1px; margin-bottom: 2px; }
.viz-keys { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; align-items: start; }
.viz-rung { display: grid; grid-template-columns: 94px minmax(0, 1fr) auto; column-gap: 4px; align-items: center; min-height: 15px; padding: 0 4px; border-radius: 3px; border: 1px solid transparent; background: var(--panel); font-size: 9.5px; }
.viz-stars { color: var(--muted); line-height: 1.2; }
table.viz-beyond tr:first-child th:first-child { width: 26%; }
.viz-beyond .tl-chip { margin-right: 2px; }
.viz-rung.same { border: 2px solid var(--ink); }
.viz-rung b { margin-right: 3px; padding: 0 6px; border-radius: 999px; font-size: 9px; }
.viz-rung b.a, .viz-link b.a { background: var(--viz-a); color: var(--viz-a-ink); }
.viz-rung b.b, .viz-link b.b { background: var(--viz-b); color: var(--viz-b-ink); }
.viz-link { display: grid; grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr); align-items: center; gap: 3px; margin: 8px 0; text-align: center; }
.viz-link b { padding: 3px 2px; border-radius: 5px; font-size: 9.5px; }
.viz-link i { height: 4px; border-radius: 2px; background: var(--link); }
.viz-link.blocked i { background: repeating-linear-gradient(90deg, var(--link) 0 4px, transparent 4px 7px); }
.viz-dials { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; justify-items: center; gap: 6px; }
.viz-dial { width: 100%; max-width: 180px; }
.viz-dial-base { fill: none; stroke: var(--border); stroke-width: 2; }
.viz-dial-tick { fill: var(--muted); }
.viz-dial-arc { fill: none; stroke: var(--muted); stroke-width: 7; stroke-linecap: round; }
.viz-dial-name { fill: var(--muted); font-size: 16px; text-anchor: middle; dominant-baseline: middle; }
.viz-dial-unit { fill: var(--muted); font-size: 20px; text-anchor: middle; dominant-baseline: middle; }
.viz-dial-num { fill: var(--ink); font-size: 46px; font-weight: 700; text-anchor: middle; dominant-baseline: middle; }
.viz-dial-a { fill: var(--viz-a); }
.viz-dial-b { fill: var(--viz-b); }
.viz-dial-letter { fill: var(--viz-letter); font-size: 19px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }

/* ---------------- timelines ---------------- */
.tl-chip { display: inline-block; padding: 0 5px; border-radius: 999px; font-size: 9.5px; font-weight: 700; line-height: 15px; white-space: nowrap; }
.tl-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tl-now { display: flex; flex-wrap: wrap; gap: 2px 16px; margin: 5px 0 0; }
.tl-bands { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.tl-bands.wide { display: none; }
.tl-band { padding: 1px 5px 4px; border: 1px solid var(--border); border-radius: 6px; }
.tl-row { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 4px; margin-top: 2px; }
.tl-label { font-size: 9px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.tl-ticks { position: relative; height: 12px; font-size: 9px; color: var(--muted); }
.tl-ticks span { position: absolute; top: 0; padding-left: 2px; border-left: 1px solid var(--border); line-height: 12px; }
.tl-track { position: relative; height: 13px; }
.tl-track.thin { height: 5px; border-radius: 2px; background: var(--panel); }
.tl-seg { position: absolute; top: 0; bottom: 0; box-sizing: border-box; margin: 0; padding: 0; border: 0; border-right: 1px solid var(--card-bg); border-radius: 3px; overflow: hidden; white-space: nowrap; text-align: center; font-family: inherit; font-size: 9px; font-weight: 700; line-height: 13px; }
.tl-track:has(button.tl-seg) { height: 20px; }
button.tl-seg { line-height: 20px; cursor: pointer; }
.tl-seg.on { box-shadow: inset 0 0 0 2px var(--ink); }
.tl-seg.main, .tl-seg.transit { border: 1px solid var(--border); background: var(--panel); color: var(--ink); line-height: 11px; }
.tl-seg.transit { font-weight: 400; }
.tl-seg.mark { border: 0; border-radius: 2px; background: var(--muted); }
.tl-heading { margin-top: 3px; padding-left: 5px; border-left: 3px solid var(--muted); font-size: 10px; font-weight: 700; }
.tl-heading.a { border-left-color: var(--viz-a); }
.tl-heading.b { border-left-color: var(--viz-b); }
.tl-detail { margin-top: 4px; padding: 5px 7px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); font-size: 10px; }
.tl-detail[hidden] { display: none; }
.tl-list { columns: 2; column-gap: 6px; }
.tl-group { margin: 2px 0 1px; font-size: 10px; font-weight: 700; break-after: avoid; }
.tl-strip { margin-bottom: 1px; break-inside: avoid; }
.tl-strip[open] { column-span: all; }
.tl-strip summary { display: flex; align-items: center; gap: 4px; min-height: 19px; padding: 0 4px; border-radius: 3px; font-size: 9.5px; cursor: pointer; list-style: none; }
.tl-strip summary::-webkit-details-marker { display: none; }
.tl-strip summary b { width: 14px; }
.tl-strip summary span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; }
.tl-strip summary i { display: none; font-style: normal; font-size: 9px; }
.tl-strip summary em { font-style: normal; font-weight: 800; }
.tl-strip.now summary { box-shadow: inset 0 0 0 2px var(--ink); }
.tl-strip-body { padding: 0 5px 3px; border: 1px solid var(--border); border-radius: 0 0 4px 4px; }
.tl-pds { columns: 2; column-gap: 8px; padding-bottom: 3px; font-size: 9px; }
.tl-pds span { display: block; }
.rpt-page { break-before: page; }
table.tl-evidence { font-size: 8.5px; }
.tl-evidence th, .tl-evidence td { padding: 1px 3px; line-height: 1.3; }
table.tl-evidence tr:first-child th:first-child { width: 18%; }
table.tl-evidence tr:first-child th:nth-child(2) { width: 11%; }
table.tl-evidence tr:first-child th:nth-child(3) { width: 14%; }
table.tl-evidence tr:first-child th:nth-child(4) { width: 7%; }
.tl-evidence td span { display: inline-block; margin-right: 5px; white-space: nowrap; }
.tl-evidence tr.now td { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
table.tl-years { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 0; font-size: 9.5px; }
.tl-years th, .tl-years td { padding: 1px 2px; vertical-align: middle; }
.tl-years th:first-child { width: 28px; }
.tl-years .tl-chip { margin-right: 1px; padding: 0 3px; font-size: 9px; }

/* ---------------- wider screens and printed pages ---------------- */
@media (min-width: 640px) {
  .rpt-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-bands.phone { display: none; }
  .tl-bands.wide { display: grid; }
  .rpt-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tl-list { columns: 3; }
  .tl-strip summary i { display: inline; }
  .viz-keys { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .viz-beyond-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
}

@media print {
  :root, :root[data-theme] {
    --viz-a: #2a78d6; --viz-a-ink: #ffffff; --viz-b: #eb6834; --viz-b-ink: #0b0b0b; --viz-letter: #ffffff;
  }
  /* An open report prints instead of the chart sheet. */
  body:has(.tab-panel.active .rpt-root:not([hidden]) .rpt-report) #tab-jathagam { display: none !important; }
  body:has(.tab-panel.active .rpt-root:not([hidden]) .rpt-report) .tab-panel.active { display: block !important; }
  .rpt-screen, .rpt-seg, .tl-detail { display: none !important; }
  .rpt-print { display: block; }
  .rpt-root { font-size: 10px; }
  .rpt-root .report-header { font-size: 8.5px; }
  .rpt-h { margin: 6px 0 2px; break-after: avoid; }
  .rpt-note, .rpt-foot { margin-top: 3px; font-size: 8.5px; }
  .rpt-chart { max-width: 200px; break-inside: avoid; }
  .rpt-charts.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rpt-charts.small { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tl-band, .rpt-card, .viz-dials, .viz-hero, .rpt-table tr, .tl-years tr { break-inside: avoid; }
  .tl-bands.phone { display: none; }
  .tl-bands.wide { display: grid; }
  .viz-basis { display: inline; }
  .viz-checks th, .viz-checks td { padding-top: 1px; padding-bottom: 1px; font-size: 9px; }
  table.viz-checks tr:first-child th:first-child { width: 54%; }
  table.viz-checks tr:first-child th:nth-child(2) { width: 6%; }
  .rpt-charts.four .rpt-chart { max-width: 162px; }
  .viz-rung { min-height: 11px; font-size: 8.5px; line-height: 1.15; }
  .viz-rung b { font-size: 8px; line-height: 1.25; }
  .viz-ladder { gap: 0; }
  .viz-keys { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .viz-rung { grid-template-columns: 82px minmax(0, 1fr) auto; }
  .viz-beyond-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .viz-beyond th, .viz-beyond td { padding-top: 0; padding-bottom: 0; font-size: 8.5px; line-height: 1.2; }
  .viz-beyond .tl-chip { font-size: 7.5px; line-height: 10px; }
  .tl-track:has(button.tl-seg) { height: 14px; }
  button.tl-seg { line-height: 14px; }
  .tl-strip summary { min-height: 13px; font-size: 9px; }
  .viz-dial { max-width: 120px; }
  /* A report carrying the birth-details warning gives up a little chart size to
     stay on its page. */
  .viz-warn { margin-top: 3px; padding: 2px 8px; font-size: 9px; }
  .viz-warn ul { margin: 0; font-size: 8.5px; line-height: 1.25; }
  .rpt-report:has(.viz-warn) .rpt-charts.four .rpt-chart { max-width: 132px; }
  .rpt-report:has(.viz-warn) .rpt-h { margin-top: 3px; }
  .rpt-report:has(.viz-warn) .viz-dial { max-width: 96px; }
  .rpt-report:has(.viz-warn) .tl-row { margin-top: 1px; }
  .rpt-report:has(.viz-warn) .tl-track.thin { height: 4px; }
  /* The Marriage Analysis sizes its charts by how much text the page carries,
     to stay on one page. */
  .viz-beyond-cols { margin-bottom: 6px; }
  /* A paid report starts each of its reports on a new page. */
  body.report-doc .rpt-report + .rpt-report { break-before: page; }
  .rpt-report:has(.viz-fit-roomy) .rpt-charts.four .rpt-chart { max-width: 150px; }
  .rpt-report:has(.viz-fit-snug) .rpt-charts.four .rpt-chart { max-width: 118px; }
  .rpt-report:has(.viz-fit-tight) .rpt-charts.four .rpt-chart { max-width: 94px; }
  .rpt-report:has(.viz-fit-tight) .viz-checks th,
  .rpt-report:has(.viz-fit-tight) .viz-checks .rpt-sub { font-size: 8.5px; line-height: 1.2; }
}

/* ---------------- match comparison ---------------- */
:root { --viz-c: #199e70; }
:root[data-theme="light"] { --viz-c: #1baf7a; }
.cmp-page + .cmp-page { margin-top: 10px; }
.cmp-name { padding-left: 5px; border-left: 3px solid var(--muted); }
.cmp-name.cmp-p1, .tl-heading.cmp-p1 { border-left-color: var(--viz-a); }
.cmp-name.cmp-p2, .tl-heading.cmp-p2 { border-left-color: var(--viz-b); }
.cmp-name.cmp-p3, .tl-heading.cmp-p3 { border-left-color: var(--viz-c); }
.cmp-score { margin-bottom: 5px; }
.cmp-score-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cmp-strip { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 2px; margin: 2px 0 1px; }
.cmp-strip span { border-radius: 3px; text-align: center; font-size: 9px; font-weight: 700; line-height: 16px; }
.cmp-center td { text-align: center; vertical-align: middle; }
table.cmp-contacts tr:first-child th:first-child { width: 46%; }
.cmp-contacts th { font-weight: 400; }
.cmp-contacts tr:first-child th, .cmp-contacts tr:last-child th { font-weight: 700; }
.cmp-mark { display: inline-block; padding: 0 5px; border-radius: 999px; background: var(--muted); color: var(--card-bg); font-size: 9px; font-weight: 700; line-height: 14px; white-space: nowrap; }
.cmp-close { margin-bottom: 4px; }
.cmp-close-name { font-size: 9.5px; font-weight: 600; }
.cmp-lane { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px; align-items: center; min-height: 14px; }
.cmp-who { overflow: hidden; white-space: nowrap; font-size: 9px; color: var(--muted); }
.cmp-line { position: relative; height: 14px; border-bottom: 1px solid var(--border); }
.cmp-line::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px dashed var(--muted); }
.cmp-dot { position: absolute; top: 2px; display: inline-flex; align-items: center; gap: 3px; transform: translateX(-4px); font-size: 9px; line-height: 10px; white-space: nowrap; }
.cmp-dot.end { flex-direction: row-reverse; transform: translateX(calc(-100% + 4px)); }
.cmp-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.cmp-dot.cmp-p1 i { background: var(--viz-a); }
.cmp-dot.cmp-p2 i { background: var(--viz-b); }
.cmp-dot.cmp-p3 i { background: var(--viz-c); }
.cmp-scale div { display: flex; justify-content: space-between; font-size: 9px; color: var(--muted); }
.cmp-scale em { font-style: normal; }
.cmp-scroll { overflow-x: auto; }
table.cmp-events { min-width: 480px; }
table.cmp-events tr:first-child th:first-child { width: 17%; }
.cmp-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 6px; }
.cmp-bar { display: grid; grid-template-columns: 112px minmax(0, 1fr) 30px; gap: 4px; align-items: center; font-size: 9.5px; }
.cmp-bar div { height: 7px; border-radius: 3px; background: var(--panel); overflow: hidden; }
.cmp-bar i { display: block; height: 100%; background: var(--muted); }
.cmp-bar i.at { background: var(--ink); }
@media (min-width: 640px) {
  .cmp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media print {
  :root, :root[data-theme] { --viz-c: #1baf7a; }
  .cmp-page + .cmp-page { margin-top: 0; break-before: page; }
  .cmp-strip span, .cmp-mark, .cmp-dot i, .cmp-bar i, .cmp-bar div { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cmp-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cmp-scroll { overflow: visible; }
  table.cmp-events { min-width: 0; }
  /* Small enough that each of the three parts stays on its own page. */
  .rpt-root table.cmp-table th, .rpt-root table.cmp-table td { padding-top: 0; padding-bottom: 0; font-size: 8.5px; line-height: 1.3; }
  .cmp-table .rpt-sub { font-size: 8px; line-height: 1.15; }
  .cmp-table .tl-chip, .cmp-table .cmp-mark { font-size: 8px; line-height: 10.5px; }
  .cmp-lane { min-height: 11px; }
  .cmp-line { height: 11px; }
  .cmp-dot { top: 1px; font-size: 8px; line-height: 9px; }
  .cmp-close { margin-bottom: 2px; }
  .cmp-score { margin-bottom: 3px; }
  .cmp-strip span { line-height: 13px; }
  .cmp-page .tl-row { margin-top: 1px; }
  .cmp-page .tl-track:not(.thin) { height: 11px; }
  .cmp-page .tl-seg { line-height: 11px; }
}

/* ---------------- ordering a report ---------------- */
/* Fields, labels and the button use the AstroChart tab's own styles. */
.ord-form[hidden], .ord-summary[hidden], .ord-person[hidden] { display: none; }
.ord-person { border: 0; margin: 0; padding: 0; min-width: 0; }
.ord-summary { max-width: 520px; }
.ord-need { margin: 10px 0 6px; font-size: 12.5px; font-weight: 700; }
.ord-need.missing { color: #c0453d; font-weight: 600; }
.ord-need:empty { display: none; }
.ord-choices .rpt-prices button { flex: 1; min-height: 40px; padding: 4px 2px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: var(--bg); font: inherit; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.ord-choices .rpt-prices button small { color: inherit; }
.ord-choices .rpt-prices button.picked { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.ord-choices .rpt-prices button:disabled { opacity: .55; border-color: var(--border); background: var(--panel); color: var(--muted); box-shadow: none; cursor: default; }
.ord-sample { align-self: flex-start; margin-top: 4px; padding: 4px 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 11px; text-decoration: underline; cursor: pointer; }
.ord-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-top: 4px; border-bottom: 1px solid var(--border); }
.ord-tab { min-height: 40px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.ord-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.ord-tab[data-done="true"]::after { content: " \2713"; color: var(--accent); }
.ord-style { margin: 12px 0 0; padding: 3px; flex-wrap: wrap; border: 1px solid transparent; border-radius: 6px; }
.ord button.generate { margin-top: 12px; }
.ord .rpt-btn-primary, .ord .rpt-wide { min-height: 40px; font-size: 12px; margin-top: 6px; }
.ord .rpt-card { margin: 0 0 6px; }
.ord-total { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.ord-tip { margin: 0 0 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); }
.ord-download { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.ord-choices:not(:has(.rpt-product + .rpt-product)) { grid-template-columns: minmax(0, 1fr); }

/* Nadi trial (preview only) */
.ndi-banner { border-style: dashed; font-size: 10px; }
.ndi-bands .tl-row { grid-template-columns: 62px minmax(0, 1fr); }
.ndi-bands .tl-track.thin { height: 8px; }
.tl-seg.mark.ndi-bar { background: #b23b2e; }
.ndi .viz-legend { margin-bottom: 3px; }
table.rpt-table.ndi-glance tr:first-child th:first-child { width: 23%; }
.ndi-glance td { text-align: left; }
table.rpt-table.ndi-calendar tr:first-child th:first-child { width: 27%; }
table.rpt-table.ndi-calendar tr:first-child th:last-child { width: 33%; }
.ndi-reads .tl-chip { white-space: normal; margin-bottom: 1px; border-radius: 6px; line-height: 13px; }
.tl-chip.ndi-bad { background: #f6c6c0; color: #7a2318; }
.tl-chip.ndi-fine { background: #bfe3cd; color: #114a2c; }
table.rpt-table.ndi-windows tr:first-child th:first-child { width: 22%; }
table.rpt-table.ndi-windows tr:first-child th:nth-child(2) { width: 12%; }
table.rpt-table.ndi-windows tr:first-child th:nth-child(3) { width: 12%; }
table.rpt-table.ndi-windows tr:first-child th:last-child { width: 15%; }
.ndi-windows td { font-size: 9px; line-height: 1.3; }
.ndi-words { font-size: 10px; }
.ndi-dates { display: flex; flex-wrap: wrap; gap: 2px 4px; font-size: 9.5px; }
.ndi-dates span { padding: 0 4px; border: 1px solid var(--border); border-radius: 4px; white-space: nowrap; }
.ndi-strong { font-weight: 800; }
.ndi-moderate { text-decoration: underline; }
table.rpt-table.ndi-side tr:first-child th:first-child { width: 19%; }
.ndi-side th, .ndi-side td { padding: 1px 2px; }
.ndi-side td { text-align: center; vertical-align: middle; }
.ndi-side td small { display: block; font-size: 8px; }
.ndi-side tr.ndi-apart > * { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.ndi-method { margin: 2px 0; padding-left: 16px; font-size: 9.5px; }
.ndi table.rpt-table tr { break-inside: avoid; }
table.rpt-table th.ndi-keyrow { font-weight: 400; font-size: 9px; color: var(--muted); }
@media print { .ndi .rpt-h { margin-top: 5px; } .ndi .rpt-card { margin-bottom: 2px; } .ndi-dates { row-gap: 1px; } .ndi .rpt-note, .ndi .rpt-foot { margin-top: 2px; } }
@media print { .ndi-dates { font-size: 9px; column-gap: 3px; } .ndi .rpt-foot { break-before: avoid; } }

/* ---------------- where your focus goes (balance.js) ---------------- */
.bal-page + .bal-page { margin-top: 16px; }
.bal-headline { margin: 6px 0 4px; font-size: 11.5px; }
.bal-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name value" "track track" "read read"; gap: 1px 8px; padding: 3px 0; border-bottom: 1px solid var(--border); }
.bal-name { grid-area: name; font-size: 11px; }
.bal-name .rpt-sub { display: block; }
.bal-track { grid-area: track; position: relative; align-self: center; height: 18px; margin: 0 9px; border-radius: 4px; background: var(--panel); }
.bal-track i { position: absolute; font-style: normal; }
.bal-bar { top: 4px; height: 10px; border-radius: 2px; }
.bal-bar.up { background: var(--viz-a); }
.bal-bar.down { background: var(--viz-b); }
i.bal-even { top: -2px; bottom: -2px; width: 2px; margin-left: -1px; background: var(--ink); }
i.bal-usual { top: 0; width: 2px; height: 5px; margin-left: -1px; background: var(--muted); }
i.bal-link { top: 8px; height: 2px; background: var(--muted); }
i.bal-dot { top: 1px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; font: 700 8.5px/16px sans-serif; text-align: center; background: var(--viz-a); color: var(--viz-a-ink); }
i.bal-dot.p1 { border-radius: 3px; background: var(--viz-b); color: var(--viz-b-ink); }
.bal-value { grid-area: value; align-self: center; text-align: right; font-size: 12px; white-space: nowrap; }
.bal-read { grid-area: read; font-size: 10px; }
.bal-key { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 3px 0; font-size: 10px; }
.bal-key span { display: inline-flex; align-items: center; gap: 4px; }
.bal-key i.bal-dot { display: inline-block; margin: 0; }
.bal-key i.bal-even { display: inline-block; height: 12px; margin: 0; }
table.rpt-table.bal-planets tr:first-child th:first-child { width: 20%; }
table.rpt-table.bal-planets tr:first-child th:last-child { width: 28%; }
.bal-stood b { margin: 0 3px; }
.bal-planets td { text-align: center; }
.rpt-table td.bal-up { background: rgba(42, 120, 214, .2); font-weight: 700; }
.rpt-table td.bal-down { background: rgba(235, 104, 52, .24); font-weight: 700; }
table.rpt-table.bal-when tr:first-child th:first-child { width: 36%; }
table.rpt-table.bal-moon tr:first-child th:first-child { width: 56%; }
.bal-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 3px; margin-top: 5px; }
.bal-year { padding: 1px; border: 1px solid var(--border); border-radius: 4px; text-align: center; font-size: 9px; break-inside: avoid; }
.bal-year span { display: block; margin-top: 1px; border-radius: 3px; line-height: 13px; white-space: nowrap; }
.bal-chips { display: flex; flex-wrap: wrap; gap: 3px 6px; font-size: 10px; }
.bal-chip { padding: 0 4px; border: 1px solid var(--border); border-radius: 4px; white-space: nowrap; }
@media (min-width: 600px), print {
  .bal-row { grid-template-columns: 172px minmax(0, 1fr) 62px; grid-template-areas: "name track value" "name read read"; }
}
@media print {
  .bal-page + .bal-page { margin-top: 0; break-before: page; }
  .bal-year { font-size: 8.5px; }
  .bal-years, .bal-chips { break-inside: avoid; }
}

/* ---------------- next three periods (upcoming.js) ---------------- */
table.rpt-table.up-table { margin-top: 5px; }
table.rpt-table.up-table tr:first-child th:first-child { width: 19%; }
.up-table th, .rpt-table.up-table td { padding: 4px 6px; }
.up-date { display: block; width: fit-content; max-width: 100%; margin-bottom: 2px; padding: 1px 7px; border-radius: 4px; font-size: 10.5px; font-weight: 600; }
.up-care { background: #f6c6c0; color: #7a2318; }
.up-good { background: #bfe3cd; color: #114a2c; }
@media print { .up-table tr { break-inside: avoid; } }

/* ---------------- contents page and sample viewer ---------------- */
.toc-mark { position: absolute; font-size: 4px; line-height: 1; }
.smp { position: fixed; inset: 0; z-index: 10003; display: flex; flex-direction: column; background: rgba(0, 0, 0, .82); }
.smp-bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--panel); border-bottom: 1px solid var(--border); font-size: 12px; }
.smp-bar b { flex: 1; min-width: 0; }
.smp-bar a, .smp-bar button { min-height: 32px; padding: 0 10px; display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--ink); font: inherit; font-size: 12px; text-decoration: none; cursor: pointer; }
.smp-pages { flex: 1; overflow-y: auto; padding: 10px; text-align: center; overscroll-behavior: contain; }
.smp-pages img { display: block; width: 100%; max-width: 760px; height: auto; margin: 0 auto 10px; background: #fff; }
.smp-pages p { color: #fff; font-size: 12px; }
@media print { .smp { display: none !important; } }
.toc-start { margin: 6px 0 8px; font-size: 12px; }
/* The period breakdown must hold one page even when its key runs to extra lines. */
@media print { .rpt-report[data-part="dates"] { zoom: .93; } }
table.rpt-table.toc-table tbody tr { height: 44px; }
.toc.two table.rpt-table.toc-table tbody tr { height: 38px; }
.rpt-table.toc-table td { font-size: 11px; vertical-align: middle; }
.rpt-table.toc-table td.toc-q { font-size: 12px; font-weight: 700; }
.rpt-table.toc-table td.toc-n { text-align: center; font-size: 14px; font-weight: 800; }
.toc.two .rpt-table.toc-table td.toc-n { font-size: 12px; }
.rpt-table.toc-table th.toc-n { text-align: center; }
.toc-h { margin: 14px 0 3px; font-size: 12px; font-weight: 700; }
.toc-key { margin-top: 4px; font-size: 11px; }
.toc-care { margin-top: 12px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; }

