.watch-live-books-btn {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(148, 92, 214, 0.55);
  background: linear-gradient(180deg, #3a1a58, #1c0f2e);
  color: #f4e8ff;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.watch-live-books-btn:hover { border-color: #f5d000; color: #fff8c8; }
.watch-live-books-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: transparent;
  pointer-events: none;
  display: block;
  padding: 0;
}
.watch-live-books-modal[hidden] { display: none; }
.watch-live-books-panel {
  pointer-events: auto;
  position: absolute;
  left: 4vw;
  top: 6vh;
  width: min(1280px, 92vw);
  height: min(860px, 88vh);
  min-width: 720px;
  min-height: 480px;
  overflow: auto;
  resize: both;
  background: #12091c;
  color: #efe7f8;
  border: 1px solid rgba(140, 80, 210, 0.55);
  border-radius: 12px;
  padding: 1rem 1.1rem 1.2rem;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.watch-live-books-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.8rem;
  cursor: move;
  user-select: none;
}
.wlb-chrome { display: flex; gap: 0.4rem; cursor: default; }
.watch-live-books-panel .btn,
.wlb-chrome .btn {
  font-size: 0.72rem;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(148, 92, 214, 0.45);
  background: #1a1028;
  color: #efe7f8;
  border-radius: 4px;
  cursor: pointer;
}
.wlb-tabs, .wlb-horizons, .wlb-views {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.35rem 0 0.7rem;
}
.wlb-tabs button, .wlb-horizons button, .wlb-views button {
  background: #221334;
  color: #d7c8ea;
  border: 1px solid #3d2758;
  border-radius: 4px;
  padding: 0.28rem 0.5rem;
  font-size: 0.72rem;
  cursor: pointer;
}
.wlb-tabs button.is-on, .wlb-horizons button.is-on, .wlb-views button.is-on {
  background: #5b2c6f;
  color: #ffe135;
  border-color: #f5d000;
}
.wlb-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.95fr) minmax(260px, 1fr) minmax(240px, 0.95fr);
  gap: 0.8rem;
}
.wlb-ladder, .wlb-side, .wlb-tape {
  background: #1a1028;
  border: 1px solid #2c1b44;
  border-radius: 8px;
  padding: 0.7rem;
}
.wlb-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.4rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  padding: 0.12rem 0;
  position: relative;
}
.wlb-row.ask { color: #ff8d9a; }
.wlb-row.bid { color: #7dffb0; }
.wlb-row.wall { outline: 1px solid rgba(245, 208, 0, 0.55); }
.wlb-bar {
  position: absolute;
  inset: 1px auto 1px 0;
  opacity: 0.22;
  pointer-events: none;
  border-radius: 2px;
}
.wlb-row.ask .wlb-bar { background: #ff4d6a; }
.wlb-row.bid .wlb-bar { background: #2ee59d; }
.wlb-kvs { display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem 0.7rem; font-size: 0.78rem; }
.wlb-kvs span { color: #9b8bb3; }
.wlb-kvs strong { color: #f6eec4; }
.wlb-chartbook { font-size: 0.82rem; line-height: 1.45; }
.wlb-heat {
  display: flex;
  height: 72px;
  gap: 1px;
  margin-top: 0.5rem;
  align-items: flex-end;
}
.wlb-heat i {
  flex: 1;
  background: #4b2a78;
  min-width: 2px;
}
.wlb-modes { display: flex; gap: 0.35rem; margin: 0.35rem 0 0.55rem; }
.wlb-modes button, .wlb-replay-btns button {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  padding: 0.28rem 0.55rem;
  border: 1px solid rgba(148, 92, 214, 0.45);
  background: #1a1028;
  color: #efe7f8;
  border-radius: 4px;
  cursor: pointer;
}
.wlb-modes button.is-on, .wlb-replay-btns button.is-on { border-color: #f5d000; color: #fff8c8; }
.wlb-replay { margin-top: 0.85rem; padding-top: 0.6rem; border-top: 1px solid rgba(140, 80, 210, 0.35); }
.wlb-replay-banner { color: #f5d000; font-size: 0.72rem; letter-spacing: 0.08em; font-weight: 700; }
.wlb-replay-btns { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.4rem 0; }
.wlb-replay input[type="range"] { width: 100%; }
.wlb-warn {
  background: #3a1420;
  border: 1px solid #8a3048;
  color: #ffd0d8;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 0.7rem;
  white-space: pre-wrap;
}
.wlb-sentiment {
  margin: 0.45rem 0 0.7rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid rgba(245, 208, 0, 0.35);
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.4;
}
.wlb-sentiment strong { color: #ffe135; }
.wlb-tape-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-variant-numeric: tabular-nums;
}
.wlb-tape-row.buy { color: #7dffb0; }
.wlb-tape-row.sell { color: #ff8d9a; }
.wlb-lesson { color: #cbb8e6; font-size: 0.74rem; margin-top: 0.45rem; }
@media (max-width: 820px) {
  .wlb-grid { grid-template-columns: 1fr; }
  .watch-live-books-panel { min-width: 0; width: 96vw; left: 2vw; }
}
body:not(.waypoint-founder-login) #watchLiveBooksBtn { display: none !important; }
.wlb-nq {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.1rem;
  font-size: 0.78rem;
  margin: 0.4rem 0 0.7rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(140, 80, 210, 0.35);
  border-radius: 8px;
}
.wlb-diag {
  font-size: 0.72rem;
  white-space: pre-wrap;
  margin: 0.6rem 0 0;
  opacity: 0.85;
}
html.wlb-popout, html.wlb-popout body {
  margin: 0;
  height: 100%;
  background: #0b0612;
}
html.wlb-popout .watch-live-books-modal {
  position: static;
  inset: auto;
  pointer-events: auto;
  height: 100%;
}
html.wlb-popout .watch-live-books-panel {
  position: static;
  width: 100%;
  height: 100vh;
  max-height: none;
  min-height: 100vh;
  resize: none;
  border-radius: 0;
  box-shadow: none;
}
.wlb-statusbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  padding: 0.45rem 0.55rem;
  margin-bottom: 0.55rem;
  border: 1px solid rgba(245, 208, 0, 0.28);
  border-radius: 8px;
  background: #160b22;
}
.wlb-read {
  white-space: pre-wrap;
  font-size: 0.74rem;
  background: #1a1028;
  padding: 0.45rem;
  border-radius: 6px;
}
.wlb-3q p { margin: 0.2rem 0; font-size: 0.74rem; }
.wlb-depth { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.35rem 0 0.55rem; }
.wlb-depth button, .wlb-teach button {
  font-size: 0.68rem;
  padding: 0.22rem 0.45rem;
  border: 1px solid #3d2758;
  background: #221334;
  color: #d7c8ea;
  border-radius: 4px;
  cursor: pointer;
}
.wlb-depth button.is-on { border-color: #f5d000; color: #fff8c8; }
.wlb-row.wlb-full, .wlb-row.wlb-head {
  grid-template-columns: repeat(7, minmax(0, 1fr)) 1.2fr;
  font-size: 0.68rem;
}
.wlb-last { background: #2a1840; font-weight: 700; }
.wlb-events, .wlb-teach, .wlb-alerts {
  margin-top: 0.7rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(140, 80, 210, 0.3);
  font-size: 0.74rem;
}
.wlb-alerts label { margin-right: 0.7rem; }
.wlb-foot-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1.4fr;
  gap: 0.4rem;
  font-variant-numeric: tabular-nums;
  font-size: 0.74rem;
}
.wlb-heat2d {
  position: relative;
  height: 160px;
  display: flex;
  align-items: stretch;
  gap: 1px;
  background: #0d0714;
}
.wlb-heat2d i { position: relative; flex: 1; min-width: 2px; align-self: flex-end; }
.wlb-last-overlay {
  position: absolute;
  left: 0;
  font-size: 0.68rem;
  color: #ffe135;
}
.wlb-replay-badge {
  display: inline-block;
  margin: 0.35rem 0;
  padding: 0.15rem 0.55rem;
  background: #c9a227;
  color: #1a1204;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.wlb-vision {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.85rem;
  font-size: 0.72rem;
  margin: 0.35rem 0 0.55rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(140, 80, 210, 0.35);
  border-radius: 8px;
  background: #160c24;
}
.wlb-vision strong { letter-spacing: 0.08em; }
.wlb-ready, .wlb-aoi {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  font-size: 0.72rem;
  margin: 0.45rem 0;
}
.wlb-row.aoi-best-long-aoi { box-shadow: inset 3px 0 0 #3dce7a; }
.wlb-row.aoi-best-short-aoi { box-shadow: inset 3px 0 0 #e35b5b; }
.wlb-row.aoi-invalidation { box-shadow: inset 3px 0 0 #f0c14b; }
.wlb-row.aoi-tp1, .wlb-row.aoi-extended-tp { box-shadow: inset 3px 0 0 #7aa2ff; }
.wlb-edu { font-size: 0.72rem; margin: 0.4rem 0 0.7rem; }
.wlb-lessons { display: grid; gap: 0.4rem; margin-top: 0.6rem; }
.wlb-lessons article { border: 1px solid rgba(140,80,210,.35); padding: 0.4rem; font-size: 0.7rem; }

.ofl-top, .ofl-metrics, .ofl-toolbar, .ofl-split, .ofl-callouts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  align-items: center;
  margin: 0.3rem 0 0.55rem;
}
.ofl-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  background: #1f1430;
  border: 1px solid #f5d000;
  color: #fff3b0;
}
.ofl-health {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  padding: 0.18rem 0.45rem;
  border-radius: 4px;
}
.ofl-h-live { background: #143d28; color: #7dffb0; }
.ofl-h-delayed { background: #3d3414; color: #ffe08a; }
.ofl-h-stale, .ofl-h-offline { background: #3d1420; color: #ff8d9a; }
.ofl-h-reconnecting { background: #2a2140; color: #cbb8e6; }
.ofl-h-replay { background: #c9a227; color: #1a1204; }
.ofl-cap { font-size: 0.68rem; max-width: 52rem; }
.ofl-metrics {
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  padding: 0.4rem 0.55rem;
  border: 1px solid rgba(245, 208, 0, 0.28);
  border-radius: 8px;
  background: #160b22;
  cursor: pointer;
}
.ofl-metrics span { color: #9b8bb3; }
.ofl-metrics strong { color: #f6eec4; }
.ofl-hint { font-size: 0.68rem; margin: 0 0 0.5rem; }
.ofl-split article {
  flex: 1 1 240px;
  border: 1px solid #2c1b44;
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  font-size: 0.74rem;
  background: #1a1028;
}
.ofl-split article:first-child strong { color: #cde8ff; }
.ofl-split article:last-child strong { color: #ffe135; }
.ofl-sig {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  padding: 0.16rem 0.4rem;
  border-radius: 4px;
  border: 1px solid #3d2758;
}
.ofl-inferred { color: #ffd6a3; }
.ofl-calculated { color: #b8e0ff; }
.ofl-tfs, .ofl-obs, .ofl-toggles, .ofl-mini-tf { display: flex; flex-wrap: wrap; gap: 0.28rem; }
.ofl-tfs button, .ofl-obs button, .ofl-toggles button, .ofl-mini-tf button {
  background: #221334;
  color: #d7c8ea;
  border: 1px solid #3d2758;
  border-radius: 4px;
  padding: 0.24rem 0.45rem;
  font-size: 0.68rem;
  cursor: pointer;
}
.ofl-tfs button.is-on, .ofl-obs button.is-on, .ofl-toggles button.is-on, .ofl-mini-tf button.is-on {
  background: #5b2c6f;
  color: #ffe135;
  border-color: #f5d000;
}
.ofl-work { display: grid; grid-template-columns: 1fr; gap: 0.7rem; }
.ofl-work.has-tape { grid-template-columns: minmax(0, 1fr) 220px; }
.ofl-work.is-four.has-tape { grid-template-columns: minmax(0, 1fr) 200px; }
.ofl-four { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem; }
.ofl-panel {
  background: #140a1f;
  border: 1px solid #2c1b44;
  border-radius: 8px;
  padding: 0.45rem;
  min-height: 280px;
}
.ofl-panel header { display: flex; justify-content: space-between; font-size: 0.72rem; margin-bottom: 0.3rem; }
.ofl-ladder { display: flex; flex-direction: column; gap: 1px; }
.ofl-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-variant-numeric: tabular-nums;
  font-size: 0.72rem;
  padding: 0.12rem 0.2rem;
  cursor: pointer;
  text-align: left;
  min-height: 1.15rem;
}
.ofl-row.ask { color: #ff8d9a; }
.ofl-row.bid { color: #7dffb0; }
.ofl-row.is-last { background: rgba(245, 208, 0, 0.12); font-weight: 700; }
.ofl-row.is-bbo { outline: 1px solid rgba(245, 208, 0, 0.45); }
.ofl-row.is-hi, .ofl-row.is-sel { background: rgba(122, 162, 255, 0.18); }
.ofl-row.fresh-live-now { font-weight: 700; }
.ofl-row.fresh-recently-observed { opacity: 0.9; }
.ofl-row.fresh-aging { opacity: 0.55; }
.ofl-row.fresh-executed { color: #e8d9ff; }
.ofl-px { z-index: 1; text-align: center; }
.ofl-meta { z-index: 1; font-size: 0.62rem; color: #9b8bb3; }
.ofl-bar {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border-radius: 2px;
  pointer-events: none;
}
.ofl-bar.ask { right: 0; background: #ff4d6a; }
.ofl-bar.bid { left: 0; background: #2ee59d; }
.ofl-bar.bbo { opacity: 1; }
.ofl-bar.bbo.ask { background: #ff2d4a; }
.ofl-bar.bbo.bid { background: #17d98a; }
.ofl-bar.observed {
  opacity: 0.38;
  background-image: repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(0,0,0,0.25) 3px, rgba(0,0,0,0.25) 5px);
}
.ofl-bar.observed.ask { background-color: #c45a6c; }
.ofl-bar.observed.bid { background-color: #3aa87a; }
.ofl-bar.executed {
  top: 8px;
  bottom: 8px;
  opacity: 0.55;
}
.ofl-bar.executed.buy { left: 0; background: #7dffb0; }
.ofl-bar.executed.sell { right: 0; background: #ff8d9a; }
.ofl-row.is-observed { opacity: var(--ofl-op, 0.55); }
.ofl-row.is-bbo { opacity: 1; outline: 1px solid rgba(245, 208, 0, 0.45); font-weight: 700; }
.ofl-row.pulse { animation: ofl-pulse 0.45s ease-out; }
.ofl-stale .ofl-row.pulse { animation: none; }
.ofl-cov { font-size: 0.58rem; margin-left: 0.4rem; letter-spacing: 0.04em; }
.ofl-cov.is-partial { color: #ffcc66; }
.ofl-cov.is-complete { color: #7dffb0; }
.wlb-legacy-banner {
  margin: 0.4rem 0;
  padding: 0.4rem 0.6rem;
  border: 1px dashed rgba(245, 208, 0, 0.45);
  color: #ffe9a8;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
@keyframes ofl-pulse {
  from { background: rgba(255, 255, 255, 0.18); }
  to { background: transparent; }
}
.ofl-ov {
  z-index: 1;
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  margin-left: 0.2rem;
  opacity: 0.85;
}
.ofl-st { color: #c9b8ff; }
.ofl-wt { color: #ffe135; font-weight: 800; }
.ofl-tape {
  background: #1a1028;
  border: 1px solid #2c1b44;
  border-radius: 8px;
  padding: 0.55rem;
  font-size: 0.72rem;
}
.ofl-tape-ctrl { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0.35rem 0; }
.ofl-tape-ctrl button {
  font-size: 0.64rem;
  padding: 0.16rem 0.35rem;
  border: 1px solid #3d2758;
  background: #221334;
  color: #d7c8ea;
  border-radius: 4px;
  cursor: pointer;
}
.ofl-tape-ctrl button.is-on { border-color: #f5d000; color: #fff8c8; }
.ofl-tape .wlb-tape-row { grid-template-columns: auto 1fr auto auto; }
.ofl-card {
  margin-top: 0.7rem;
  border: 1px solid rgba(245, 208, 0, 0.35);
  border-radius: 8px;
  padding: 0.7rem;
  background: #1a1028;
}
.ofl-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; font-size: 0.74rem; }
.ofl-card h3 { margin: 0 0 0.35rem; font-size: 0.7rem; letter-spacing: 0.08em; }
.ofl-ask {
  margin-top: 0.55rem;
  background: #5b2c6f;
  color: #ffe135;
  border: 1px solid #f5d000;
  border-radius: 4px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}
@media (max-width: 900px) {
  .ofl-work.has-tape, .ofl-work.is-four.has-tape, .ofl-four, .ofl-card-grid { grid-template-columns: 1fr; }
}
