/* ETF detail showpiece (P3): country exposure bars, sector conic-gradient donut,
   concentration line, and a reduced-motion-safe scroll-in reveal.
   Depends on screener.css for the design tokens (--accent, --bd, --muted, .fh-bar). */

/* ---- coverage honesty caption (the §4 "top holdings only" label) ---- */
.fh-cov-note { color: var(--muted); font-size: 0.85rem; margin: 0 0 12px; font-style: italic; }

/* ---- country exposure: code chip + name + bar + % ---- */
.fh-exposure { display: flex; flex-direction: column; gap: 10px; }
.fh-exp-row { display: grid; grid-template-columns: 2.2rem minmax(5rem, 1fr) 2fr auto; align-items: center; gap: 10px; }
.fh-exp-code { font-weight: 700; font-size: 0.72rem; letter-spacing: 0.03em; color: var(--accent-d); background: var(--soft); border-radius: 6px; padding: 2px 6px; text-align: center; }
.fh-exp-name { color: var(--ink); font-size: 0.9rem; }
.fh-exp-w { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); white-space: nowrap; }
.fh-exp-other { grid-template-columns: 2.2rem minmax(5rem, 1fr) 2fr auto; color: var(--muted); }
.fh-exp-other .fh-exp-name { grid-column: 1 / 4; color: var(--muted); }

/* ---- sector donut (conic-gradient) + legend ---- */
.fh-donut-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.fh-donut { width: 132px; height: 132px; border-radius: 50%; background: var(--g, var(--bd)); position: relative; flex: 0 0 auto; }
.fh-donut::before { content: ""; position: absolute; inset: 26%; border-radius: 50%; background: var(--card, #fff); }
.fh-legend { display: flex; flex-direction: column; gap: 7px; min-width: 12rem; flex: 1 1 12rem; }
.fh-leg-row { display: grid; grid-template-columns: 0.9rem 1fr auto; align-items: center; gap: 8px; font-size: 0.9rem; }
.fh-leg-dot { width: 0.9rem; height: 0.9rem; border-radius: 3px; }
.fh-leg-name { color: var(--ink); }
.fh-leg-w { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.fh-leg-other .fh-leg-name, .fh-leg-other .fh-leg-w { color: var(--muted); }

/* ---- concentration line ---- */
.fh-conc { font-size: 1rem; color: var(--ink); margin: 0; }

/* ---- top bar: back link + "look up another fund" search ---- */
.fh-profile-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.fh-profile-search { display: flex; gap: 6px; flex: 1 1 220px; max-width: 360px; }
.fh-profile-search-in { flex: 1 1 auto; padding: 8px 14px; border: 1px solid var(--bd); border-radius: 999px; font-size: 0.9rem; background: #fff; color: var(--ink); }
.fh-profile-search-in:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.fh-btn-search { padding: 8px 16px; background: var(--accent); color: #1b1206; border: none; border-radius: 999px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.fh-btn-search:hover { background: var(--accent-d); color: #fff; }

/* ---- at-a-glance chips (friendly, colourful, descriptive) ---- */
.fh-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.fh-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--soft); color: var(--accent-d); border: 1px solid #f6d9a3; border-radius: 999px; padding: 6px 13px; font-size: 0.85rem; font-weight: 600; }
.fh-chip-ico { font-size: 1rem; line-height: 1; }

@media (max-width: 520px) {
	.fh-profile-search { max-width: none; }
}

/* ---- "funds a bit like this one" rail ---- */
.fh-similar-sub { color: var(--muted); font-size: 0.85rem; margin: 0 0 12px; }
.fh-similar { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.fh-sim-card { display: flex; flex-direction: column; gap: 3px; padding: 14px; border: 1px solid var(--bd); border-radius: 14px; background: #fff; text-decoration: none; color: var(--ink); transition: transform .15s ease, box-shadow .15s ease; }
.fh-sim-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.fh-sim-name { font-weight: 700; font-size: 0.92rem; }
.fh-sim-issuer { color: var(--muted); font-size: 0.8rem; }
.fh-sim-ter { color: var(--accent-d); font-size: 0.85rem; font-weight: 600; }
.fh-sim-go { color: var(--accent-d); font-size: 0.8rem; font-weight: 700; margin-top: 4px; }

/* ---- per-fund FAQ ---- */
.fh-faq-item { border-bottom: 1px solid var(--bd); padding: 11px 0; }
.fh-faq-item summary { font-weight: 600; cursor: pointer; color: var(--ink); list-style: revert; }
.fh-faq-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fh-faq-item p { color: var(--muted); margin: 8px 0 0; }

/* ---- scroll-in reveal (only once JS marks the root ready; no-JS shows everything) ---- */
.fh-reveal-ready .fh-section[data-viz] { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.fh-reveal-ready .fh-section[data-viz].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.fh-reveal-ready .fh-section[data-viz] { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 520px) {
	.fh-exp-row { grid-template-columns: 2rem 1fr auto; }
	.fh-exp-row .fh-bar { grid-column: 1 / 4; }
	.fh-donut-wrap { justify-content: center; }
}
