.hp {
  --hp-bg: #0c0a0b;
  --hp-card: #161214;
  --hp-ink: #f5f0f0;
  --hp-mist: #d6ccc8;
  --hp-line: #3a3332;
  --hp-brand: #ef4444;
  --hp-up: #4ade80;
  --hp-up-ink: #052e16;
  --hp-down: #f87171;
  --hp-mono: "Fira Code", ui-monospace, Consolas, monospace;
  color: var(--hp-ink);
  margin: 0 0 12px;
}
.hp-status {
  margin: 0 0 10px;
  color: var(--hp-mist);
  font-size: 13px;
  line-height: 1.45;
}
.hp-modes {
  display: flex;
  gap: 8px;
  margin: 0 0 10px;
}
.hp-modes button {
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--hp-line);
  background: transparent;
  color: var(--hp-mist);
  border-radius: 0;
}
.hp-modes button[aria-pressed="true"] {
  background: var(--hp-ink);
  color: var(--hp-bg);
  border-color: var(--hp-ink);
}
.hp-sorts button {
  flex: 1;
  padding: 0 4px;
  font-size: 13px;
}
.hp-sorts button[data-dir] { white-space: nowrap; }
.hp-sorts button[data-dir]::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  vertical-align: 1px;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  border-top: 5px solid currentColor;
}
.hp-sorts button[data-dir="asc"]::after {
  border-top: 0;
  border-bottom: 5px solid currentColor;
  vertical-align: 2px;
}
.hp-bands { overflow: visible; padding-top: 10px; }
.hp-bands button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1.1;
}
.hp-bands button .hp-band-n {
  position: absolute;
  top: -8px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--hp-ink);
  color: var(--hp-bg);
  box-shadow: 0 0 0 2px var(--hp-bg);
  font-family: var(--hp-mono);
  font-size: 11px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
}
.hp-bands button[aria-pressed="true"] .hp-band-n {
  background: var(--hp-bg);
  color: var(--hp-ink);
  box-shadow: 0 0 0 2px var(--hp-ink);
}
.hp-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}
.hp-rail li {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-height: 44px;
  padding: 8px 10px;
  background: var(--hp-card);
  border: 1px solid var(--hp-line);
}
.hp-rail b { font-size: 15px; }
.hp-rail em { color: var(--hp-mist); font-style: normal; font-size: 12px; }
.hp-rail strong { font-family: var(--hp-mono); font-size: 14px; font-weight: 600; }
.hp-rail strong.up { color: var(--hp-up); }
.hp-rail strong.down { color: var(--hp-down); }
.hp-board { display: flex; flex-direction: column; gap: 12px; }
.hp-card {
  background: var(--hp-card);
  border: 1px solid var(--hp-line);
  padding: 12px;
  min-width: 0;
}
.hp-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.hp-card header > b { letter-spacing: 0.04em; }
.hp-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; min-width: 0; }
.hp-title b { letter-spacing: 0.04em; }
.hp-watch { color: var(--hp-mist); font-style: normal; font-size: 13px; font-weight: 650; white-space: nowrap; }
.hp-watch.buy { color: var(--hp-up); }
.hp-watch.sell { color: var(--hp-down); }
.hp-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.hp-acts button.hp-side { width: 100%; min-height: 44px; padding: 0 8px; font-size: 16px; font-weight: 700; }
.hp-side {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 2px 8px;
  border: 1px solid var(--hp-line);
  font-size: 13px;
  font-style: normal;
  font-weight: 650;
}
button.hp-side {
  appearance: none;
  font: inherit;
  cursor: pointer;
  border-radius: 0;
  min-height: calc(28px * 1.1);
}
.hp-side.buy { background: var(--hp-up); color: var(--hp-up-ink); border-color: var(--hp-up); }
.hp-side.sell { background: var(--hp-brand); color: #fff; border-color: var(--hp-brand); }
.hp-side.flat { color: var(--hp-mist); }
.hp-orbit { background: #101418; border-color: #243044; }
.hp-orbit.hot { border-color: var(--hp-brand); }
.hp-orbit.ready { border-color: #f5a623; }
.hp-orbit.watch { border-color: #7dd3c7; }
.hp-vs {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}
.hp-vs i { color: var(--hp-mist); font-style: normal; font-size: 12px; letter-spacing: 0.08em; }
.hp-head-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.hp-pool { font-style: normal; font-size: 12px; color: var(--hp-mist); }
.hp-pool.trade { color: #7dd3c7; }
.hp-ordered {
  font-style: normal;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  padding: 4px 6px;
  border: 1px solid #f5a623;
  color: #f5a623;
  white-space: nowrap;
}
.hp-ordered-line {
  margin: 8px 0 0;
  color: #f5a623;
  font-size: 13px;
  font-weight: 700;
}
.hp-card.is-ordered { box-shadow: inset 0 0 0 1px rgba(245, 166, 35, 0.45); }
.hp-gauges { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.hp-gauges .hp-ring:first-child { transform: translateX(12px); }
.hp-gauges .hp-ring:last-child { transform: translateX(-12px); }
.hp-ring { min-width: 0; color: var(--hp-ink); }
.hp-face { position: relative; width: 88px; height: 88px; margin: 0 auto; }
.hp-face svg { display: block; width: 100%; height: 100%; }
.hp-track, .hp-arc { fill: none; stroke-width: 3.9; }
.hp-track { stroke: #3a3332; }
.hp-arc { stroke: #7dd3c7; transform: rotate(-90deg); transform-origin: 18px 18px; }
.hp-face b {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--hp-mono);
  font-size: 16px;
  font-weight: 600;
  font-style: normal;
}
.hp-ring > span { display: block; margin-top: 4px; color: var(--hp-mist); font-size: 12px; text-align: center; }
.hp-dot { fill: currentColor; }
.hp-ring.dial.warn { color: #f5a623; }
.hp-ring.dial.up { color: var(--hp-up); }
.hp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}
.hp-stat {
  min-height: 64px;
  padding: 8px 4px;
  border: 1px solid #243044;
  text-align: center;
}
.hp-stat span { display: block; color: var(--hp-mist); font-size: 12px; }
.hp-stat b { display: block; margin-top: 6px; font-family: var(--hp-mono); font-size: 13px; font-weight: 600; }
.hp-lane { margin-top: 12px; }
.hp-lane-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--hp-mist);
  font-family: var(--hp-mono);
  font-size: 12px;
}
.hp-bar { position: relative; height: 18px; margin-top: 6px; background: #1a222c; }
.hp-bar i { display: block; height: 100%; width: var(--pct); background: linear-gradient(90deg, #1d4e89, #7dd3c7 40%, #f5a623); }
.hp-bar b { position: absolute; top: -2px; left: var(--pct); width: 3px; height: 22px; margin-left: -1.5px; background: #f5f0f0; }
.hp-spread {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 10px 0 0;
  color: var(--hp-mist);
  font-family: var(--hp-mono);
  font-size: 12px;
}
.hp-foot { display: flex; align-items: stretch; gap: 8px; margin-top: 10px; }
.hp-foot .hp-callout { flex: 1 1 auto; min-width: 0; margin: 0; display: flex; align-items: center; }
.hp-foot button.hp-side { align-self: stretch; min-height: 44px; padding: 0 12px; font-size: 15px; font-weight: 700; white-space: nowrap; }
.hp-callout { margin: 10px 0 0; padding: 8px 10px; border: 1px solid #7dd3c7; color: #d7fff6; font-size: 13px; }
.hp-callout.buy { color: var(--hp-up); }
.hp-callout.sell { color: var(--hp-down); }
.hp-action { margin: 10px 0 0; font-size: 14px; }
.hp-legs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 6px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}
.hp-legs li { display: flex; align-items: center; gap: 4px; min-width: 0; min-height: 28px; }
.hp-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  min-height: 22px;
  padding: 0 3px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
}
.hp-pill.buy { background: var(--hp-up); color: var(--hp-up-ink); }
.hp-pill.sell { background: var(--hp-brand); color: #fff; }
.hp-legs b {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.hp-fibo { display: flex; align-items: center; gap: 8px; }
.hp-fibo > span { flex: 0 0 auto; color: var(--hp-mist); font-size: 13px; }
.hp-cells {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 3px;
  height: 14px;
}
.hp-cells i { display: block; height: 100%; background: #2a2426; position: relative; overflow: hidden; }
.hp-cells i::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: scaleX(var(--lit, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, #4ade80, #a3e635);
}
.hp-cells i:nth-child(2)::after { background: linear-gradient(90deg, #a3e635, #d9f99d); }
.hp-cells i:nth-child(3)::after { background: linear-gradient(90deg, #d9f99d, #fde047); }
.hp-cells i:nth-child(4)::after { background: linear-gradient(90deg, #fde047, #facc15); }
.hp-cells i:nth-child(5)::after { background: linear-gradient(90deg, #facc15, #f59e0b); }
.hp-cells i:nth-child(6)::after { background: linear-gradient(90deg, #f59e0b, #f97316); }
.hp-cells i:nth-child(7)::after { background: linear-gradient(90deg, #f97316, #ef4444); }
.hp-cells i:nth-child(8)::after { background: linear-gradient(90deg, #ef4444, #e11d48); }
.hp-cells i:nth-child(9)::after { background: linear-gradient(90deg, #e11d48, #fb7185); }
.hp-cells i:nth-child(10)::after { background: linear-gradient(90deg, #fb7185, #fecdd3); }
.hp-kins { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 0; }
.hp-kin {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 6px;
  border: 1px solid var(--hp-line);
  background: #100e0f;
}
.hp-rank {
  margin: 0;
  padding: 3px 4px;
  border: 1px solid var(--hp-line);
  background: #1c1819;
  color: var(--hp-mist);
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
}
.hp-trackbar {
  position: relative;
  height: 96px;
  border: 1px solid #4a4143;
  background: #2a2426;
  overflow: hidden;
}
.hp-trackbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--hp-mist);
}
.hp-tag {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 6px;
  color: var(--hp-ink);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}
.hp-trackbar i {
  position: absolute;
  left: 0;
  width: 100%;
  height: var(--fill, 0%);
  background: var(--hp-mist);
}
.hp-trackbar i.up { top: auto; bottom: 50%; transform-origin: bottom center; background: var(--hp-up); }
.hp-trackbar i.down { top: 50%; transform-origin: top center; background: var(--hp-down); }
.hp-kin > b {
  display: block;
  font-family: var(--hp-mono);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}
.hp-kin > b.up { color: var(--hp-up); }
.hp-kin > b.down { color: var(--hp-down); }
.hp-kin > b.flat { color: var(--hp-mist); }
@media (prefers-reduced-motion: no-preference) {
  .hp-trackbar i.run { animation: hp-rise 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
}
@keyframes hp-rise {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}
#hedge-order {
  --hp-bg: #0c0a0b;
  --hp-card: #161214;
  --hp-ink: #f5f0f0;
  --hp-mist: #d6ccc8;
  --hp-line: #3a3332;
  --hp-brand: #ef4444;
  --hp-up: #4ade80;
  --hp-up-ink: #052e16;
  --hp-down: #f87171;
  --hp-mono: "Fira Code", ui-monospace, Consolas, monospace;
  position: absolute;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(12, 10, 11, 0.78);
  color: var(--hp-ink);
}
#hedge-order[hidden] { display: none; }
.hp-ticket {
  width: min(440px, 100%);
  max-height: calc(100% - 8px);
  overflow: auto;
  padding: 16px;
  background: #161214;
  color: var(--hp-ink);
  border: 1px solid var(--hp-line);
  border-top: 3px solid var(--hp-up);
}
.hp-ticket.sell { border-top-color: var(--hp-brand); }
.hp-ticket-head h2 { margin: 0; font-size: 18px; letter-spacing: -0.02em; }
.hp-ticket-legs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
  padding: 0;
  list-style: none;
}
.hp-ticket-legs li {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}
.hp-leg-top { display: flex; align-items: center; gap: 6px; min-height: 32px; }
.hp-leg-lot {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed #7a716c;
  color: var(--hp-mist);
  font-family: var(--hp-mono);
  font-size: 13px;
  font-style: normal;
  text-align: center;
}
.hp-ticket-legs li.span { grid-column: 1 / -1; }
.hp-ticket-legs b { font-size: 15px; white-space: nowrap; }
.hp-field { display: block; margin: 14px 0 8px; color: var(--hp-mist); font-size: 13px; }
.hp-lot-line { display: flex; gap: 10px; }
.hp-lot-line button, .hp-ticket-actions button, .hp-chip {
  min-height: 44px;
  border: 1px solid var(--hp-line);
  border-radius: 0;
  background: transparent;
  color: var(--hp-ink);
}
.hp-lot-line button { width: 48px; }
.hp-lot-line input {
  flex: 1;
  min-height: 48px;
  border: 1px solid var(--hp-line);
  border-radius: 0;
  background: #100e0f;
  color: var(--hp-ink);
  font-family: var(--hp-mono);
  font-size: 20px;
  text-align: center;
}
.hp-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.hp-chip { min-width: 0; padding: 8px 4px; }
.hp-chip small { display: block; color: var(--hp-mist); font-size: 12px; white-space: nowrap; }
.hp-chip[aria-pressed="true"] { background: var(--hp-ink); color: #0c0a0b; border-color: var(--hp-ink); }
.hp-chip[aria-pressed="true"] small { color: #0c0a0b; }
.hp-field-error { min-height: 1.4em; margin: 6px 0 0; color: var(--hp-down); font-size: 14px; }
.hp-money {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding: 12px;
  background: #100e0f;
  border: 1px solid var(--hp-line);
}
.hp-money div { min-width: 0; text-align: center; }
.hp-money span { display: block; color: var(--hp-mist); font-size: 13px; }
.hp-money b { display: block; margin-top: 4px; font-family: var(--hp-mono); font-size: 20px; font-weight: 700; }
.hp-money .down { color: var(--hp-down); }
.hp-money .up { color: var(--hp-up); }
.hp-ticket-actions { display: flex; gap: 8px; margin-top: 14px; }
.hp-ticket-actions button { flex: 1; }
.hp-ticket-actions .go { background: var(--hp-up); color: var(--hp-up-ink); border-color: var(--hp-up); font-weight: 700; }
