/* Price / P/E chart (screener.in style) */
.chart-ctrl { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow-x: auto; scrollbar-width: none; max-width: 100%; background: var(--surface); }
.seg::-webkit-scrollbar { display: none; }
.seg button, .seg .chip-ret { flex: none; }
.seg button { border: 0; background: none; padding: 0 16px; height: 44px; font-size: 15.5px; color: var(--ink-2); }
.seg button:hover { color: var(--brand); }
.seg button.on { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.seg .chip-ret { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-left: 1px solid var(--line-strong); font-size: 15.5px; font-weight: 600; }
.seg .chip-ret .cagr { color: var(--ink-2); font-weight: 500; padding-left: 10px; border-left: 1px solid var(--line); }
.seg .chip-ret .cagr small { font-size: 11px; letter-spacing: .06em; }
.chart { position: relative; width: 100%; height: 420px; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart text { font-family: var(--font); }
.chart .tip {
  position: absolute; pointer-events: none; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-pop); font-size: 12.5px; padding: 8px 10px; border-radius: 8px; white-space: nowrap; z-index: 2;
}
.chart .tip b { display: block; margin-bottom: 3px; }
.chart .tip i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; font-style: normal; }
.legend { display: flex; justify-content: center; gap: 26px; flex-wrap: wrap; margin-top: 14px; font-size: 15.5px; }
.legend label { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--ink-2); }
.legend input { width: 18px; height: 18px; accent-color: var(--brand); }
.legend .sw { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.legend .sw.bar { height: 12px; width: 12px; }
.legend .sw.dash { background: repeating-linear-gradient(90deg, var(--ink-3) 0 4px, transparent 4px 7px) !important; }
@media (max-width: 760px) {
  .chart { height: 300px; }
  .seg button { padding: 0 9px; height: 38px; font-size: 13.5px; }
  .seg .chip-ret { padding: 0 10px; font-size: 13px; }
  .legend { gap: 14px; font-size: 13.5px; }
}
