/* Factsheet v2 (Nov 2026). Uses the site tokens from styles.css. */
.fs-page { display: flex; flex-direction: column; gap: 20px; }
.fs-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; justify-content: space-between; }
.fs-head-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 520px; }
.fs-head h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); letter-spacing: -0.02em; }
.fs-meta { margin: 0; color: var(--muted); font-size: 15px; }
.fs-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.fs-tag { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.fs-tag-teal { background: #e6f2f0; color: var(--teal-dark); }
.fs-tag-amber { background: #f4ecdd; color: #7a5210; }
.fs-tag-grey { background: #eef1f0; color: var(--steel); }
.fs-head-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.fs-head-actions .button-row { flex-wrap: wrap; justify-content: flex-end; }
.fs-share-note { font-size: 12px; color: var(--muted); min-height: 16px; }

.fs-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.fs-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.fs-kpi-label { font-size: 12px; color: var(--muted); }
.fs-kpi-value { font-size: 26px; font-weight: 700; margin-top: 6px; letter-spacing: -0.01em; }
.fs-kpi-note { font-size: 12px; color: var(--muted); margin-top: 4px; min-height: 15px; }
.fs-pos { color: var(--green); }
.fs-neg { color: var(--red); }

.fs-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.fs-main { flex: 999 1 620px; min-width: 0; }
.fs-side { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.fs-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; }
.fs-card h2, .fs-card h3 { margin: 0; font-size: 17px; }
.fs-card-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.fs-card .chart { width: 100%; height: auto; }
.fs-card.chart-card { margin: 0; }

.fs-table-wrap { overflow-x: auto; }
.fs-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.fs-table th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 8px 6px; }
.fs-table td { padding: 10px 6px; border-top: 1px solid #eef1f0; }
.fs-strong { font-weight: 600; }
.fs-muted { color: var(--steel); }
.fs-num { text-align: right; font-variant-numeric: tabular-nums; }
.fs-table th.fs-num { text-align: right; }
.fs-empty { color: var(--muted); }
.fs-chip { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.fs-chip-new { background: #e3f1e8; color: var(--green); }
.fs-chip-kept { background: #eef1f0; color: var(--steel); }

.fs-layer { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.4; }
.fs-layer-badge { min-width: 46px; text-align: center; padding: 5px 0; border-radius: 8px; font-weight: 700; font-size: 13px; flex: none; }
.fs-layer-l1 { background: #e6f2f0; color: var(--teal-dark); }
.fs-layer-l2 { background: #f4ecdd; color: #7a5210; }
.fs-layer-l3 { background: #e3ecf3; color: #2b5a78; }
.fs-small { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.45; }

.fs-bar-row { display: grid; grid-template-columns: minmax(90px, 140px) 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.fs-bar-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fs-bar { height: 8px; background: #eef1f0; border-radius: 4px; overflow: hidden; }
.fs-bar > span { display: block; height: 8px; background: var(--teal); border-radius: 4px; }

.fs-loading #fsKpis, .fs-loading #fsHoldingsBody, .fs-loading #fsLayers, .fs-loading #fsExposure, .fs-loading #fsMeta { opacity: 0.4; transition: opacity 0.15s; }
.fs-three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.fs-three .fs-bar-row { grid-template-columns: minmax(110px, 1.5fr) minmax(50px, 1fr) 36px; }
.fs-bar-row.fs-other > span:first-child { color: var(--muted); }
.fs-bar-row.fs-other .fs-bar > span { background: #b8c4be; }
.fs-stack { display: flex; flex-direction: column; gap: 20px; }
.fs-stack .chart { max-height: 460px; }
.fs-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.fs-footnote { font-size: 12px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 14px; margin: 0; }

/* Return by year: one row per year, years down the left */
#factsheetAnnualReturnChart { display: none; }
.fs-years { display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.fs-years-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.fs-years-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.fs-yr-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 62px 62px; gap: 10px; align-items: center; padding: 5px 0; border-top: 1px solid #eef1f0; }
.fs-yr-head { border-top: 0; color: var(--muted); font-size: 11px; font-weight: 600; padding: 0 0 2px; }
.fs-yr-year { font-weight: 700; color: var(--ink, #26332d); }
.fs-yr-year small { display: block; font-weight: 500; font-size: 10px; color: var(--muted); }
.fs-yr-bars { position: relative; height: 22px; }
.fs-yr-bars::before { content: ""; position: absolute; top: 0; bottom: 0; left: var(--zero); border-left: 1px solid #b8c4be; }
.fs-yr-bar { position: absolute; height: 9px; border-radius: 2px; }
.fs-yr-bar.m { top: 1px; background: #0f766e; }
.fs-yr-bar.b { top: 12px; background: #c99a4a; }
.fs-yr-num { text-align: right; font-variant-numeric: tabular-nums; }
.fs-yr-num.b { color: var(--steel); }

@media (max-width: 1100px) {
  .fs-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .fs-three { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .fs-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fs-two { grid-template-columns: minmax(0, 1fr); }
  .fs-head-actions { align-items: stretch; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  .topbar, .fs-head-actions, .chart-range-controls, .fs-noprint { display: none !important; }
  body { background: #fff; }
  .workspace, .standalone-workspace { padding: 0 !important; margin: 0 !important; max-width: none !important; }
  .fs-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .fs-card, .fs-kpi { break-inside: avoid; box-shadow: none; }
  .fs-row { gap: 12px; }
  .fs-two, .fs-stack, .fs-three { gap: 12px; }
  .fs-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fs-kpi-value { font-size: 20px; }
}
