/* Explainer on Guide, plus Pixel King chips. Tokens match the prototype; type is Inter. */

.ob {
  --ob-surface-1: #070d1c;
  --ob-surface-2: #0e1628;
  --ob-surface-3: #172136;
  --ob-surface-4: #1e293b;
  --ob-line: rgba(148, 163, 184, 0.1);
  --ob-line-strong: rgba(148, 163, 184, 0.2);
  --ob-line-gold: rgba(242, 193, 78, 0.34);
  --ob-gold: #f2c14e;
  --ob-gold-bright: #ffd97a;
  --ob-gold-wash: rgba(242, 193, 78, 0.09);
  --ob-em: #34d399;
  --ob-em-mid: #1fb980;
  --ob-em-deep: #0e9f6e;
  --ob-em-wash: rgba(52, 211, 153, 0.1);
  --ob-pos: #34d399;
  --ob-neg: #fb7185;
  --ob-tx-1: #f1f5f9;
  --ob-tx-2: #94a3b8;
  --ob-tx-3: #64748b;
  --ob-tx-4: #475569;
  --ob-on-em: #04170f;
  --ob-on-gold: #1a1206;
  --ob-eth: #627eea;
  --ob-usdg: #84cc16;
  --ob-usdg-dim: #65a30d;
  --ob-idle: #334155;
  --ob-bg: #020617;
  --ob-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --ob-snap: cubic-bezier(0.4, 0, 0.2, 1);
  --ob-press: cubic-bezier(0.2, 0, 0, 1);
  --ob-lift: inset 0 1px 0 rgba(255, 255, 255, 0.05);

  position: relative;
  border: 1px solid var(--ob-line-gold);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 22px;
  box-shadow:
    0 24px 60px -34px rgba(242, 193, 78, 0.35),
    var(--ob-lift);
  background:
    radial-gradient(110% 150% at 8% 0%, rgba(242, 193, 78, 0.1), transparent 58%),
    radial-gradient(90% 130% at 96% 8%, rgba(52, 211, 153, 0.07), transparent 55%),
    var(--ob-surface-1);
  color: var(--ob-tx-1);
  font-family: var(--font-sans);
  animation: obIn 420ms var(--ob-spring) both;
}

@keyframes obIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ob [hidden] {
  display: none !important;
}

.ob button {
  font-family: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  transition:
    transform 130ms var(--ob-press),
    background-color 160ms var(--ob-snap),
    border-color 160ms var(--ob-snap),
    color 160ms var(--ob-snap),
    opacity 160ms var(--ob-snap);
}

.ob button:active {
  transform: scale(0.975);
}

.ob .num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  letter-spacing: -0.01em;
}

.ob-in {
  padding: 26px 28px 24px;
}

.ob-pick-king {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #070d1c;
  --pk-jewel: #34d399;
  --pk-crown: #f2c14e;
  --pk-crown-hi: #ffd97a;
  --pk-crown-lo: #c9922a;
  --pk-cloak: #1e293b;
  --pk-cloak-lo: #0e1628;
}

.ob-pick-king--1 {
  --pk-jewel: #f2c14e;
  --pk-crown: #34d399;
  --pk-crown-hi: #6ee7b7;
  --pk-crown-lo: #0e9f6e;
  --pk-cloak: #134e3a;
  --pk-cloak-lo: #06281d;
}

.ob-pick-king--2 {
  --pk-jewel: #ffd97a;
  --pk-crown: #3987e5;
  --pk-crown-hi: #7db3f0;
  --pk-crown-lo: #2f5f9e;
  --pk-cloak: #1e3a5f;
  --pk-cloak-lo: #0c1c33;
}

.ob-pick-king svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Explainer — copy + actions first, demo plot second so Next/Skip stay above
   the fold on phone. Desktop keeps actions under the copy column. */
.ob-ex {
  display: grid;
  grid-template-columns: 320px 1fr;
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    'copy plot'
    'acts plot'
    '.    plot';
  gap: 0 22px;
  margin-top: 16px;
  align-items: start;
}

.ob-ex-l {
  grid-area: copy;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ob-acts {
  grid-area: acts;
  margin-top: 16px;
  padding-top: 0;
  display: flex;
  gap: 9px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .ob-ex {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas:
      'copy'
      'acts'
      'plot';
    gap: 14px;
  }

  .ob-acts {
    margin-top: 0;
  }
}

.ob-beats {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
}

.ob-beats i {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--ob-surface-4);
  transition: background 240ms var(--ob-snap);
}

.ob-beats i[data-on] {
  background: var(--ob-gold);
}

.ob-ex-step {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ob-gold);
  margin-bottom: 8px;
}

.ob-ex-l h3 {
  font-size: 20px;
  font-weight: 710;
  letter-spacing: -0.032em;
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--ob-tx-1);
  font-family: var(--font-sans);
}

.ob-ex-l p {
  font-size: 13.5px;
  color: var(--ob-tx-2);
  line-height: 1.7;
  margin: 0;
}

.ob-ex-l p b {
  color: var(--ob-tx-1);
  font-weight: 620;
}

.ob-cue {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ob-gold);
  font-weight: 600;
}

.ob-cue svg {
  width: 15px;
  height: 15px;
  animation: obNudge 1.6s var(--ob-snap) infinite;
}

@keyframes obNudge {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(4px);
  }
}

.ob-acts button {
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 670;
}

.ob button.ob-next {
  flex: 1;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.35) !important;
}

.ob button.ob-next:hover {
  color: #fde68a;
  border-color: rgba(250, 204, 21, 0.55) !important;
  background: rgba(250, 204, 21, 0.14);
}

.ob button.ob-prev {
  padding: 0 14px;
  color: #fde68a;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.35) !important;
  flex: none;
}

.ob button.ob-prev:hover {
  color: #fde68a;
  border-color: rgba(250, 204, 21, 0.55) !important;
  background: rgba(250, 204, 21, 0.14);
}

.ob-ex-r {
  grid-area: plot;
  border: 1px solid var(--ob-line);
  border-radius: 14px;
  background: var(--ob-bg);
  padding: 16px 18px 14px;
  position: relative;
  box-shadow: var(--ob-lift);
  min-width: 0;
}

.ob-readout {
  display: flex;
  gap: 9px;
  margin-bottom: 6px;
  padding-right: 150px;
}

.ob-rcell {
  flex: 1;
  border: 1px solid var(--ob-line);
  border-radius: 11px;
  padding: 9px 12px;
  background: var(--ob-surface-1);
}

.ob-rcell .k {
  font-size: 9.5px;
  color: var(--ob-tx-4);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 750;
}

.ob-rcell .v {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 3px;
  transition: text-shadow 200ms var(--ob-snap);
}

.ob-rcell .v small {
  font-size: 11px;
  font-weight: 600;
  color: var(--ob-tx-4);
  margin-left: 2px;
  letter-spacing: 0;
}

.ob-rcell.hot {
  border-color: var(--ob-line-gold);
}

.ob-rcell.hot .v {
  text-shadow: 0 0 16px rgba(242, 193, 78, 0.75);
}

.ob-state {
  position: absolute;
  right: 18px;
  top: 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 680;
  transition: all 220ms var(--ob-snap);
}

.ob-state[data-in='1'] {
  background: var(--ob-em-wash);
  border: 1px solid rgba(52, 211, 153, 0.42);
  color: var(--ob-em);
}

.ob-state[data-in='0'] {
  background: rgba(251, 113, 133, 0.1);
  border: 1px solid rgba(251, 113, 133, 0.38);
  color: var(--ob-neg);
}

.ob-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.ob-plotrow {
  position: relative;
}

.ob-strip {
  position: relative;
  height: 166px;
  margin-top: 38px;
  touch-action: none;
  cursor: ew-resize;
  user-select: none;
}

.ob-sidelbl {
  position: absolute;
  bottom: 0;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.11em;
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition:
    opacity 200ms var(--ob-snap),
    left 120ms linear;
}

.ob-sidelbl.buy {
  color: var(--ob-usdg);
}

.ob-sidelbl.sell {
  color: var(--ob-eth);
}

.ob-autopill {
  position: absolute;
  left: 0;
  bottom: -24px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--ob-tx-4);
}

.ob-autopill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ob-em);
  box-shadow: 0 0 8px 1px rgba(52, 211, 153, 0.6);
}

.ob-autopill[data-auto='0'] i {
  background: var(--ob-tx-4);
  box-shadow: none;
}

.ob-pop {
  position: absolute;
  bottom: 74px;
  transform: translateX(-50%);
  font-size: 11.5px;
  font-weight: 780;
  color: var(--ob-gold-bright);
  pointer-events: none;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 7px;
  background: rgba(2, 6, 23, 0.88);
  border: 1px solid var(--ob-line-gold);
  box-shadow: 0 6px 18px -8px rgba(242, 193, 78, 0.5);
  animation: obPopUp 1200ms var(--ob-spring) forwards;
}

@keyframes obPopUp {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(8px) scale(0.88);
  }
  16% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-46px);
  }
}

.ob-holdline {
  margin-top: 9px;
  font-size: 11.5px;
  color: var(--ob-tx-4);
  line-height: 1.5;
}

.ob-holdline b {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.ob-stepbrk {
  position: absolute;
  top: 2px;
  height: 16px;
  border: 1px solid var(--ob-gold);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  opacity: 0.9;
  pointer-events: none;
}

.ob-stepbrk b {
  position: absolute;
  left: 50%;
  top: -9px;
  transform: translateX(-50%);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--ob-gold);
  background: var(--ob-bg);
  padding: 0 5px;
  white-space: nowrap;
}

.ob-bars {
  position: absolute;
  inset: 0 0 40px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.ob-bars i {
  flex: 1;
  border-radius: 2px 2px 0 0;
  transition:
    height 180ms var(--ob-spring),
    background 180ms var(--ob-snap),
    opacity 180ms var(--ob-snap);
}

.ob-bars i.ob-live {
  position: relative;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 0 10px 1px rgba(241, 245, 249, 0.32);
  transition:
    height 180ms var(--ob-spring),
    opacity 180ms var(--ob-snap);
}

.ob-bars i.ob-live b {
  position: absolute;
  left: 0;
  right: 0;
  display: block;
}

.ob-bars i.ob-live .u {
  bottom: 0;
  background: var(--ob-usdg-dim);
}

.ob-bars i.ob-live .e {
  top: 0;
  background: var(--ob-eth);
}

.ob-bars i.ob-live em {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  margin-bottom: -1.5px;
  background: var(--ob-tx-1);
  box-shadow: 0 0 8px 2px rgba(241, 245, 249, 0.55);
  pointer-events: none;
}

.ob-rangeband {
  position: absolute;
  top: -4px;
  bottom: 40px;
  background: rgba(242, 193, 78, 0.055);
  border-left: 1px dashed rgba(242, 193, 78, 0.5);
  border-right: 1px dashed rgba(242, 193, 78, 0.5);
  pointer-events: none;
}

.ob-rangelbl {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 780;
  letter-spacing: 0.1em;
  color: var(--ob-gold);
  pointer-events: none;
}

.ob-pricer {
  position: absolute;
  top: -8px;
  bottom: 34px;
  width: 2px;
  background: var(--ob-tx-1);
  pointer-events: none;
  box-shadow: 0 0 12px 2px rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

.ob-pricer::after {
  content: '';
  position: absolute;
  left: 50%;
  top: -5px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ob-tx-1);
  transform: translateX(-50%);
}

.ob-pricetag {
  position: absolute;
  top: -32px;
  transform: translateX(-50%);
  height: 23px;
  padding: 0 9px;
  border-radius: 7px;
  background: var(--ob-tx-1);
  color: #04070f;
  font-size: 11.5px;
  font-weight: 760;
  display: flex;
  align-items: center;
  white-space: nowrap;
  pointer-events: none;
}

.ob-axis {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--ob-tx-4);
}

.ob-legend {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  font-size: 11px;
  color: var(--ob-tx-3);
}

.ob-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ob-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

@media (max-width: 720px) {
  .ob {
    border-radius: 14px;
    margin-bottom: 16px;
  }

  .ob-ex-l h3 {
    font-size: 17px;
  }

  .ob-ex-l p {
    font-size: 13px;
  }

  .ob-acts {
    padding-top: 0;
  }

  .ob-acts button {
    min-height: 44px;
    height: auto;
    padding: 11px 12px;
  }

  .ob-ex-r {
    padding: 12px 12px 12px;
  }

  .ob-state {
    position: static;
    margin: 0 0 10px;
    width: max-content;
    max-width: 100%;
    height: auto;
    min-height: 28px;
    padding: 5px 10px;
    font-size: 11.5px;
    white-space: normal;
  }

  .ob-readout {
    padding-right: 0;
    flex-wrap: wrap;
    gap: 8px;
  }

  .ob-rcell {
    flex: 1 1 calc(50% - 8px);
    min-width: 0;
    padding: 8px 9px;
  }

  .ob-rcell .v {
    font-size: 14px;
  }

  .ob-strip {
    height: 150px;
    margin-top: 34px;
  }

  .ob-legend {
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 28px;
  }

  .ob-autopill {
    max-width: 100%;
    white-space: normal;
    line-height: 1.35;
    bottom: -28px;
  }

  .ob-holdline {
    font-size: 11px;
  }

}

@media (prefers-reduced-motion: reduce) {
  .ob,
  .ob-cue svg,
  .ob-pop {
    animation: none !important;
    transition-duration: 1ms !important;
  }
}
