.hfp { color:var(--a1-ink); --hfp-focus:var(--a1-ink); }
.hfp-topline { display:flex; align-items:center; justify-content:space-between; gap:24px; border-bottom:1px solid var(--a1-line); }
.hfp-sources { display:flex; gap:24px; }
.hfp button { min-height:44px; border:1px solid var(--a1-line); background:transparent; color:var(--a1-ink); padding:10px 14px; font:400 .75rem/1.4 var(--a1-mono); cursor:pointer; }
.hfp button:hover:not(:disabled) { background:var(--a1-panel-solid); }
.hfp button:disabled { color:var(--a1-soft); opacity:.5; cursor:default; }
.hfp button:focus-visible,.hfp-chart:focus-visible,.hfp input:focus-visible { outline:2px solid var(--hfp-focus); outline-offset:4px; }
.hfp .hfp-sources button { border:0; border-bottom:2px solid transparent; margin-bottom:-1px; padding:14px 0; font:500 1rem/1.4 var(--a1-sans); }
.hfp .hfp-sources button[aria-pressed="true"] { border-bottom-color:var(--a1-ink); }
.hfp .hfp-sources button:hover { background:transparent; color:var(--a1-green); }
.hfp-sources small { margin-left:9px; font:400 .7rem var(--a1-mono); color:var(--a1-copy); }
.hfp-metric { margin:0; color:var(--a1-copy); font:.875rem/1.5 var(--a1-mono); }
.hfp-layout { display:grid; grid-template-columns:minmax(0,1fr) 260px; gap:30px; margin-top:28px; }
.hfp-chart-area { min-width:0; }
.hfp-chart-instruction { margin:0 0 18px; max-width:65ch; font:.8125rem/1.6 var(--a1-sans); color:var(--a1-copy); }
.hfp-chart { outline-offset:4px; }
.hfp-trade-svg,.hfp-distribution-svg { display:block; width:100%; height:auto; overflow:visible; }
.hfp-axis { fill:var(--a1-copy); font:12px var(--a1-mono); font-variant-numeric:tabular-nums; }
.hfp-grid { stroke:var(--a1-line); stroke-width:1; stroke-dasharray:3 4; }
.hfp-zero { stroke:var(--a1-copy); stroke-width:1; }
.hfp .gain { color:var(--a1-green); }
.hfp .loss { color:var(--a1-red); }
.hfp .flat { color:var(--a1-copy); }
.hfp-value { fill:currentColor; }
.hfp-hit { fill:transparent; }
.hfp-bar { cursor:pointer; }
.hfp-bar:hover .hfp-value { opacity:.7; }
.hfp-selected-outline { stroke:var(--a1-ink); stroke-width:1.5; fill:none; pointer-events:none; }
.hfp-window-heading { display:flex; justify-content:space-between; gap:16px; margin:17px 0 8px; font:.6875rem/1.6 var(--a1-mono); color:var(--a1-copy); }
.hfp-window-controls { display:grid; grid-template-columns:auto minmax(60px,1fr) auto; align-items:center; gap:20px; }
.hfp-window-controls input { width:100%; margin:0; accent-color:var(--a1-green); cursor:pointer; min-height:44px; }
.hfp-window-controls input:disabled { cursor:default; opacity:.5; }
.hfp-detail { border-left:1px solid var(--a1-line); padding-left:26px; }
.hfp-detail-top { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 0 15px; border-bottom:1px solid var(--a1-line); }
.hfp-detail-top span { font:.75rem/1.5 var(--a1-mono); color:var(--a1-copy); }
.hfp-detail-top strong { font:500 1.25rem/1.3 var(--a1-mono); }
.hfp-detail-top small { color:var(--a1-copy); font-size:.75rem; font-weight:400; }
.hfp-detail dl { margin:0; }
.hfp-detail dl>div { padding:15px 0; border-bottom:1px solid var(--a1-line); }
.hfp-detail dt { margin:0 0 7px; color:var(--a1-copy); font:.6875rem/1.5 var(--a1-mono); text-transform:uppercase; letter-spacing:.06em; }
.hfp-detail dd { margin:0; font:.8125rem/1.6 var(--a1-mono); font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.hfp-detail .hfp-detail-result dd { font-size:1.5rem; font-weight:500; }
.hfp-record-controls { display:flex; gap:8px; padding-top:18px; }
.hfp-record-controls button { flex:1; padding:8px; font-size:.6875rem; }
.hfp-distribution { border-top:1px solid var(--a1-line); margin-top:42px; padding-top:28px; }
.hfp-distribution-heading { display:flex; justify-content:space-between; align-items:baseline; gap:16px; margin-bottom:22px; }
.hfp-distribution-heading h3 { margin:0; font:500 1.5rem/1.2 var(--a1-sans); letter-spacing:-.025em; }
.hfp-distribution-heading p { margin:0; color:var(--a1-copy); font:.6875rem/1.6 var(--a1-mono); text-align:right; }
.hfp-distribution-caption { margin:6px 0 0; color:var(--a1-copy); font:.75rem/1.6 var(--a1-sans); }
.hfp-note { max-width:85ch; margin:30px 0 0; padding-top:20px; border-top:1px solid var(--a1-line); color:var(--a1-copy); font:.8125rem/1.7 var(--a1-sans); }
.hfp-empty { padding:48px 0; font:.9375rem/1.6 var(--a1-sans); }
.hfp-state { min-height:180px; padding:28px 0; color:var(--a1-copy); font:.9375rem/1.6 var(--a1-sans); }
.hfp-state button { min-height:44px; padding:10px 18px; border:1px solid var(--a1-line); background:var(--a1-paper); color:var(--a1-ink); font:400 .875rem var(--a1-sans); cursor:pointer; }
.hfp-state button:focus-visible { outline:2px solid var(--a1-ink); outline-offset:4px; }
.hfp-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
@media(max-width:900px) {
  .hfp-layout { grid-template-columns:minmax(0,1fr) 220px; gap:20px; }
  .hfp-detail { padding-left:20px; }
  .hfp-topline { gap:16px; }
  .hfp-sources { gap:20px; }
}
@media(max-width:700px) {
  .hfp-topline { align-items:flex-start; flex-direction:column; gap:14px; padding-bottom:18px; }
  .hfp-sources { width:100%; gap:28px; }
  .hfp .hfp-sources button { font-size:.9375rem; }
  .hfp-layout { grid-template-columns:1fr; gap:28px; }
  .hfp-chart-instruction { font-size:.75rem; }
  .hfp-detail { border-left:0; border-top:1px solid var(--a1-line); padding:22px 0 0; }
  .hfp-detail dl { display:grid; grid-template-columns:1fr 1fr; column-gap:22px; }
  .hfp-detail dl>div { min-width:0; }
  .hfp-detail dl>div:last-child { grid-column:1/-1; }
  .hfp-detail .hfp-detail-result dd { font-size:1.35rem; }
  .hfp-record-controls button { flex:none; font-size:.75rem; padding:10px 14px; }
  .hfp-distribution-heading { display:block; }
  .hfp-distribution-heading p { text-align:left; margin-top:12px; }
  .hfp-distribution { margin-top:32px; }
  .hfp-distribution-svg { min-height:150px; }
}
@media(max-width:480px) {
  .hfp-window-controls { gap:12px; }
  .hfp-window-controls button { padding:9px; }
  .hfp-window-heading { flex-direction:column; gap:3px; }
  .hfp-trade-svg { min-height:200px; }
  .hfp-note { font-size:.75rem; }
}
