/* ════════════════════════════════════════════════════════
   Highstake Tear Sheet — TERMINAL / QUANT LETTER
   Pure utilitarian · all sans/mono · table-driven
   ════════════════════════════════════════════════════════ */

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

:root {
  --bg:    #FFFFFF;
  --bg-1:  #F4F4F2;
  --fg:    #111;
  --fg-2:  #444;
  --fg-3:  #777;
  --line:  #DDD;
  --line-hi: #BBB;
  --accent: #136B43;
  --red:   #A82929;
  --sans: 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 8.5pt; line-height: 1.4;
  -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum'; }
b, strong { font-weight: 600; }
.muted { color: var(--fg-3); }
.g { color: var(--accent); }
.r { color: var(--red); }

.page {
  position: relative; width: 210mm; height: 297mm;
  padding: 12mm 12mm 10mm; page-break-after: always; overflow: hidden;
  background: var(--bg);
}
.page:last-child { page-break-after: auto; }

/* ─── Letterhead (cover only) ─── */
.letterhead {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding-bottom: 4mm; border-bottom: 1.5pt solid var(--fg);
  margin-bottom: 6mm;
  font-family: var(--mono); font-size: 8pt;
}
.lh-name { font-weight: 600; font-size: 10pt; letter-spacing: 0.06em; }
.lh-id { color: var(--fg-3); margin-top: 1mm; letter-spacing: 0.1em; }
.lh-r { text-align: right; letter-spacing: 0.08em; }

/* ─── Page header (pages 2-6) ─── */
.page-header {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  font-family: var(--mono); font-size: 7pt; letter-spacing: 0.1em;
  color: var(--fg-3); text-transform: uppercase; font-weight: 500;
  padding-bottom: 3mm; border-bottom: 1pt solid var(--fg);
  margin-bottom: 6mm;
}
.page-header > :nth-child(2) { text-align: center; }
.page-header > :nth-child(3) { text-align: right; }

/* ─── Section heads ─── */
.title-block { margin-bottom: 6mm; }
.title-block h1 {
  font-family: var(--sans); font-weight: 600; font-size: 18pt;
  letter-spacing: -0.005em; line-height: 1.15;
}
.subtitle {
  font-family: var(--mono); font-size: 8pt; color: var(--fg-3);
  margin-top: 2mm; letter-spacing: 0.04em;
}
.section-h {
  font-family: var(--mono); font-size: 9pt; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 2mm 0; border-top: 1pt solid var(--fg); border-bottom: 1pt solid var(--fg);
  margin-bottom: 5mm;
}

/* ─── Two-column ─── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; margin-bottom: 5mm; }

/* ─── Block heads ─── */
.block-h {
  font-family: var(--mono); font-size: 7.5pt; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding-bottom: 2mm; border-bottom: 0.5pt solid var(--line-hi);
  margin-bottom: 2.5mm;
}
.block-foot { font-size: 7pt; color: var(--fg-3); margin-top: 2mm; line-height: 1.45; }

/* ─── Generic key-value table ─── */
.kv-tbl { width: 100%; border-collapse: collapse; }
.kv-tbl th { text-align: left; padding: 1.5mm 2mm; font-family: var(--mono);
  font-size: 7pt; letter-spacing: 0.1em; color: var(--fg-3); text-transform: uppercase;
  font-weight: 500; border-bottom: 0.5pt solid var(--line-hi); }
.kv-tbl th:not(:first-child) { text-align: right; }
.kv-tbl td {
  padding: 2mm; border-bottom: 0.5pt solid var(--line);
  vertical-align: baseline; font-family: var(--mono); font-size: 8pt;
}
.kv-tbl td:first-child { color: var(--fg-3); width: auto; }
.kv-tbl td:not(:first-child) { text-align: right; color: var(--fg); font-weight: 500; }
.kv-tbl tr:last-child td { border-bottom: none; }
.kv-tbl.tight td { padding: 1.6mm 2mm; font-size: 7.5pt; }

/* Headline strip (cover) */
.headline-strip {
  display: grid; grid-template-columns: repeat(6, 1fr);
  border: 1pt solid var(--fg); margin: 5mm 0;
}
.hl-cell {
  padding: 3mm 2mm; border-right: 0.5pt solid var(--line);
  display: flex; flex-direction: column; gap: 1.5mm;
  font-family: var(--mono);
}
.hl-cell:last-child { border-right: none; }
.hl-k { font-size: 6.5pt; letter-spacing: 0.14em; color: var(--fg-3); text-transform: uppercase; }
.hl-v { font-size: 14pt; font-weight: 600; letter-spacing: -0.02em; }

/* Exec summary (cover) */
.exec-summary { margin-top: 5mm; }
.exec-h {
  font-family: var(--mono); font-size: 7.5pt; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding-bottom: 2mm; border-bottom: 0.5pt solid var(--fg); margin-bottom: 3mm;
}
.exec-summary p { font-size: 8.5pt; line-height: 1.55; color: var(--fg);
  margin-bottom: 2mm; text-align: justify; }
.exec-summary p:last-child { margin-bottom: 0; }
.exec-summary p [data-bind] { font-weight: 600; }

/* Returns grid */
.returns-grid { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 7.5pt; margin-bottom: 6mm; }
.returns-grid th, .returns-grid td {
  border: 0.5pt solid var(--line-hi); padding: 1.8mm 1.5mm; text-align: right;
}
.returns-grid th {
  background: var(--fg); color: var(--bg); font-size: 6.5pt; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 500;
}
.returns-grid td:first-child, .returns-grid th:first-child {
  text-align: left; font-weight: 600; background: var(--bg-1);
}
.returns-grid .ytd { background: var(--bg-1); font-weight: 600; color: var(--accent); }
.returns-grid .nodata { color: var(--fg-3); }

/* Distribution table */
.dist-tbl { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 7.5pt; }
.dist-tbl td { padding: 1.5mm 2mm; border-bottom: 0.5pt solid var(--line); }
.dist-tbl td:first-child { color: var(--fg-3); width: 24%; }
.dist-tbl td:nth-child(2) { width: 12%; text-align: right; }
.dist-tbl td:last-child { color: var(--accent); }
.dist-bar { display: inline-block; height: 6px; background: var(--accent); opacity: 0.6; vertical-align: middle; }

/* Chart block */
.chart-block { margin: 0 0 6mm; padding: 4mm; border: 0.5pt solid var(--line-hi); }
.chart-block svg { width: 100%; height: 64mm; display: block; }
.chart-key {
  display: flex; gap: 8mm; margin-top: 3mm;
  font-family: var(--mono); font-size: 7pt; color: var(--fg-3); letter-spacing: 0.06em;
}
.chart-key b { color: var(--fg); font-weight: 500; margin-right: 4px; }

/* Drawdown table */
.dd-tbl { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 7.5pt; }
.dd-tbl th, .dd-tbl td { padding: 1.5mm 2mm; border-bottom: 0.5pt solid var(--line); text-align: right; }
.dd-tbl th { background: var(--bg-1); color: var(--fg-3); text-transform: uppercase; font-size: 6.5pt; letter-spacing: 0.1em; font-weight: 500; }
.dd-tbl td:first-child, .dd-tbl th:first-child { text-align: left; color: var(--fg-3); }
.dd-tbl .dd-depth { color: var(--red); font-weight: 600; }

/* Attribution */
.attrib-tbl { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 7.5pt; margin-bottom: 4mm; }
.attrib-tbl th, .attrib-tbl td {
  padding: 1.8mm 2mm; border-bottom: 0.5pt solid var(--line); text-align: left;
  vertical-align: top;
}
.attrib-tbl th { background: var(--bg-1); color: var(--fg-3); font-size: 6.5pt; letter-spacing: 0.1em; text-transform: uppercase; font-weight: 500; }
.attrib-tbl td.attr-total { color: var(--accent); font-size: 11pt; font-weight: 600; text-align: right; }
.attrib-tbl td.attr-num { text-align: right; }

/* Contact + footer */
.contact-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 3mm 0; margin-top: 4mm;
  border-top: 1pt solid var(--fg); border-bottom: 0.5pt solid var(--line-hi);
  font-family: var(--mono); font-size: 8pt; letter-spacing: 0.04em;
}
.disclosures { margin-top: 4mm; }
.disclosures p {
  font-size: 7pt; line-height: 1.5; color: var(--fg-3);
  text-align: justify; margin-top: 2mm; font-family: var(--sans);
}

/* Page footer (every page) */
.terminal-footer {
  position: absolute; bottom: 6mm; left: 12mm; right: 12mm;
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: 2mm; border-top: 0.5pt solid var(--fg);
  font-family: var(--mono); font-size: 6.5pt; color: var(--fg-3);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.pageno { font-weight: 600; color: var(--fg); }
