/* Tuatara performance chart styles, copied from templates/fund-performance.html (the chart script
   static/js/fund-perf-benchmark.js draws the same markup on /hedge-funds). */
.thf-perf {background: rgba(17,24,39,0.6); border: 1px solid rgba(0,150,255,0.15);
    border-radius: 12px; padding: 14px 16px 12px; margin: 10px 0 16px;}
.thf-perf-h {font-family: var(--font-display); color: var(--text-heading); font-size: 15px;
    letter-spacing: .04em; text-transform: uppercase; margin: 0 0 10px;}
.thf-perf-tabs {display: grid; grid-template-columns: minmax(0, 380px); gap: 8px; margin-bottom: 10px;}
.thf-perf-tab {background: rgba(17,24,39,0.6); border: 1px solid rgba(0,150,255,0.15); border-radius: 8px;
    padding: 8px 10px; text-align: left; cursor: pointer; color: var(--text); font: inherit;}
.thf-perf-tab.on {border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset;}
.thf-perf-tab .w {font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2);}
.thf-perf-tab .r {font-size: 20px; font-weight: 800; margin: 2px 0;}
.thf-perf-tab .p, .thf-perf-tab .b {font-size: 11px; color: var(--text-2);}
.thf-perf-tab .b .vs {white-space: nowrap;}
.thf-perf .pos {color: var(--pos);}
.thf-perf .neg {color: var(--neg);}
.thf-perf-head {margin: 4px 0 12px; display: grid; grid-template-columns: max-content max-content minmax(0, 1fr);
    column-gap: 14px; align-items: baseline;}
.thf-perf-head .hl {display: contents; font-family: var(--font-display); color: var(--text-heading); font-weight: 400;
    font-size: 22px; line-height: 1.3;}
.thf-perf-head .hl b {font-weight: 400; text-align: right; font-variant-numeric: tabular-nums;}
.thf-perf-head .sk {display: block; width: 84px; height: 24px; align-self: center;}
.thf-perf-head .sk svg {display: block; width: 100%; height: 100%; overflow: visible;}
.thf-perf-head .sk path {fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round;}
.thf-perf-head .sk .z {stroke: rgba(0,150,255,0.3); stroke-width: 1; stroke-dasharray: 2 3;}
.thf-perf-head .hw {grid-column: 1 / -1;}
@media (max-width: 420px) {
  .thf-perf-head .hl { font-size: 18px; }
  .thf-perf-head { column-gap: 10px; }
  .thf-perf-head .sk { width: 72px; height: 20px; }
}
.thf-perf-head .pos {color: var(--pos);}
.thf-perf-head .neg {color: var(--neg);}
.thf-perf-head .hw {display: block; margin-top: 4px; font-size: 12px; color: var(--text-2);}
.thf-perf-legend {display: flex; flex-wrap: wrap; gap: 1rem; font-size: 12px; color: var(--text-2); margin: 0 0 4px;}
.thf-perf-legend .k::before {content: ''; display: inline-block; width: 18px; height: 0; vertical-align: middle; margin-right: 6px;}
.thf-perf-legend .k.return::before {border-top: 2px solid var(--pos);}
.thf-perf-legend .k.bench::before {border-top: 2px dashed var(--blue-status);}
.thf-perf-legend .k.bench.b1::before {border-top: 2px dotted var(--accent);}
.thf-perf-legend .k.bench.b2::before {border-top: 2px dashed var(--text-secondary);}
.thf-perf-legend .k.off::before {border-top: 2px dotted var(--text-2);}
.thf-perf-legend .live {margin-left: auto; color: var(--accent); font-weight: 700; letter-spacing: .04em;}
.thf-perf-legend .live::before {content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent); margin-right: 5px; vertical-align: middle;}
.thf-perf-chart {position: relative; width: 100%; height: 240px;}
.thf-perf-chart svg {display: block; width: 100%; height: 100%; overflow: visible;}
.thf-perf-chart .grid {stroke: rgba(0,150,255,0.15); stroke-width: 1;}
.thf-perf-chart .zero {stroke: var(--text-2); stroke-width: 1; stroke-dasharray: 4 4;}
.thf-perf-chart .axis {fill: var(--text-2); font-size: 11px;}
.thf-perf-chart .line {fill: none; stroke-width: 2;}
.thf-perf-chart .line.return-up {stroke: var(--pos);}
.thf-perf-chart .line.return-down {stroke: var(--neg);}
.thf-perf-chart .area.return-up {fill: var(--pos); opacity: 0.1;}
.thf-perf-chart .area.return-down {fill: var(--neg); opacity: 0.1;}
.thf-perf-chart .line.bench {stroke: var(--blue-status); stroke-width: 1.5; stroke-dasharray: 5 3;}
.thf-perf-chart .line.bench.b1 {stroke: var(--accent); stroke-dasharray: 2 3;}
.thf-perf-chart .line.bench.b2 {stroke: var(--text-secondary); stroke-dasharray: 8 3 2 3;}
.thf-perf-chart .cursor {stroke: var(--accent); stroke-width: 1;}
.thf-perf-chart .dot {fill: var(--accent);}
.thf-perf-chart .dot.bench {fill: var(--blue-status);}
.thf-perf-chart .dot.bench.b1 {fill: var(--accent);}
.thf-perf-chart .dot.bench.b2 {fill: var(--text-secondary);}
.thf-perf-tip {position: absolute; top: 4px; pointer-events: none; background: var(--surface-2); border: 1px solid rgba(0,150,255,0.15);
    border-radius: 6px; padding: 5px 8px; font-size: 12px; color: var(--text); white-space: nowrap; display: none;}
.thf-perf-note {font-size: 11px; color: var(--text-3); line-height: 1.45; margin-top: 8px;}
.thf-perf-basis {font-size: 12px; color: var(--text-muted); line-height: 1.45; margin: 2px 0 8px;}
.thf-perf-apply {margin: 70px 0 0 !important; text-align: center;}
.thf-perf-paper {margin: 40px 0 0; text-align: center; font-size: 13px;}
[data-theme="light"] .thf-perf {background: var(--surface); border-color: rgba(0,100,200,0.2);}
[data-theme="light"] .thf-perf-tab {background: var(--surface-2); border-color: rgba(0,100,200,0.2); color: var(--text);}
[data-theme="light"] .thf-perf .pos, [data-theme="light"] .thf-perf-chart .line.return-up {color: var(--pos); stroke: var(--pos);}
[data-theme="light"] .thf-perf .neg, [data-theme="light"] .thf-perf-chart .line.return-down {color: var(--neg); stroke: var(--neg);}
[data-theme="light"] .thf-perf-chart .area.return-up {fill: var(--pos);}
[data-theme="light"] .thf-perf-chart .area.return-down {fill: var(--neg);}
[data-theme="light"] .thf-perf-legend .k.return::before {border-top-color: var(--pos);}
[data-theme="light"] .thf-perf-tip {background: var(--surface-2); color: var(--text);}
@media (max-width: 640px) {
  .thf-perf-tabs { grid-template-columns: minmax(0, 1fr); }
  .thf-perf-chart { height: 190px; }
  .thf-perf-tab .r { font-size: 17px; }
}
