fstock-price-history {
  display: block;
  min-width: 0;
  margin: 16px 0 6px;
  padding: clamp(11px, 3vw, 16px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
fstock-price-history:not([data-ready]) { min-height: 225px; }
.price-history-title { font-size: .86rem; font-weight: 680; }
.price-history-state { margin-top: 7px; color: var(--muted); font-size: .82rem; }
.price-history-state .text-button { margin-left: 4px; }
.price-history-readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 4px 0 9px; }
.price-history-readout strong { font-size: clamp(1.12rem, 4vw, 1.48rem); line-height: 1.4; }
.price-history-readout [data-price-change], .price-history-readout time { font-size: .78rem; }
.price-history-readout time { color: var(--muted); }
.price-history-plot { display: block; width: 100%; height: clamp(118px, 24vw, 150px); }
.price-history-scrubber {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: .75rem;
}
.price-history-scrubber span { flex: 0 0 auto; }
.price-history-scrubber input {
  min-height: 30px;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  accent-color: var(--accent);
  cursor: pointer;
}
.price-history-caption { color: var(--muted); font-size: .73rem; overflow-wrap: anywhere; }
.price-history-caption:first-of-type { margin-top: 6px; }
.price-history-table { margin-top: 8px; padding-top: 6px; border-top: 1px solid var(--line); font-size: .77rem; }
.price-history-table summary { font-weight: 600; }
.price-history-table table { width: 100%; border-collapse: collapse; margin-top: 7px; }
.price-history-table :is(td, th) { padding: 5px 3px; text-align: right; }
.price-history-table th:first-child { text-align: left; }
.price-history-table thead { color: var(--muted); }
.price-history-table tbody th { font-weight: 400; }
.price-history-table tbody tr { border-top: 1px solid var(--line); }

fstock-price-history[data-price-technical] {
  --price-close: #29394f;
  --price-ma5: #935711;
  --price-ma20: #6b4d9b;
  --price-ideal_buy: #08737d;
  --price-secondary_buy: #365da3;
  --price-stop_loss: #a23052;
  --price-take_profit: #367245;
}
[data-price-technical] .price-history-title { font-size: .97rem; }
[data-price-technical] .price-history-readout { gap: 2px 8px; margin: 8px 0 3px; }
[data-price-technical] .price-history-readout time { margin-inline-start: auto; }
[data-price-technical] .price-history-readout strong { overflow-wrap: anywhere; }
.price-history-close-label { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .78rem; }
.price-history-averages { display: flex; flex-wrap: wrap; gap: 3px 18px; margin-bottom: 7px; font-size: .77rem; }
.price-history-averages div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 5px; min-width: 0; }
.price-history-averages dt, .price-history-levels dt { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.price-history-averages dd { font-weight: 650; overflow-wrap: anywhere; }
.price-history-key { display: inline-block; flex: none; width: 14px; border-top: 2px solid currentColor; }
.price-history-key[data-price-series='close'] { color: var(--price-close); }
.price-history-key[data-price-series='ma5'] { color: var(--price-ma5); }
.price-history-key[data-price-series='ma20'] { color: var(--price-ma20); border-top-style: dashed; }
.price-history-key[data-price-series='ideal_buy'] { color: var(--price-ideal_buy); border-top-style: dashed; }
.price-history-key[data-price-series='secondary_buy'] { color: var(--price-secondary_buy); border-top-style: dotted; }
.price-history-key[data-price-series='stop_loss'] { color: var(--price-stop_loss); border-top-style: dashed; }
.price-history-key[data-price-series='take_profit'] { color: var(--price-take_profit); border-top-style: dashed; }
[data-price-technical] .price-history-plot { height: clamp(171px, 40vw, 218px); cursor: crosshair; touch-action: pan-y pinch-zoom; }
[data-price-technical] .price-history-scrubber input { min-height: 44px; }
.price-history-options { display: flex; flex-wrap: wrap; column-gap: 18px; margin-top: -3px; }
.price-history-options label { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; font-size: .78rem; cursor: pointer; }
.price-history-levels { margin: 6px 0 9px; padding: 8px 9px; background: var(--soft); border-radius: 8px; }
.price-history-levels p { font-size: .79rem; font-weight: 650; }
.price-history-levels p span { color: var(--muted); font-weight: 400; }
.price-history-levels dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 102px), 1fr)); gap: 7px 12px; margin-top: 5px; }
.price-history-levels dt { font-size: .75rem; }
.price-history-levels dd { font-size: .86rem; font-weight: 680; overflow-wrap: anywhere; }
.price-history-levels dd small { display: block; color: var(--muted); font-size: .68rem; font-weight: 400; }
.price-history-conditions { margin-top: 6px; border-top: 1px solid var(--line); font-size: .76rem; }
.price-history-conditions summary { min-height: 38px; align-content: center; }
.price-history-conditions ul { margin: 0 0 6px; padding-inline-start: 20px; overflow-wrap: anywhere; }
.price-history-levels-empty { margin-bottom: 5px; }
.price-history-gap { padding-block: 8px; border-top: 1px solid var(--line); }
.price-history-gap header { display: flex; align-items: center; justify-content: space-between; gap: 4px 8px; }
.price-history-gap h5 { margin: 0; font-size: .83rem; }
.price-history-gap-jump {
  flex: none;
  min-height: 44px;
  padding: 4px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: .75rem;
  cursor: pointer;
}
.price-history-gap-jump:is(:hover, [aria-current='date']) { background: var(--soft); text-decoration: underline; }
.price-history-observation:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
.price-history-gap dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr)); gap: 6px 12px; }
.price-history-gap dt { font-size: .83rem; overflow-wrap: anywhere; }
.price-history-gap dd { color: var(--muted); font-size: .76rem; }
[data-price-technical] .price-history-table summary { min-height: 36px; align-content: center; }
[data-price-technical] .price-history-table :is(td, th) { overflow-wrap: anywhere; }
