/* First-win onboarding overlay (static/onboarding.js) — Convergence Grid:
   Ink Navy #0D1F3C on Ice #F7F8FA, Plus Jakarta Sans for text, IBM Plex Mono
   for numbers, dates and tickers, 2px radius, hairline borders. No shadows,
   gradients or blue. Step dots and the chip grid replace the old .po-* rules.
   z-index 310: above the page header (150), the paywall (290) and the auth /
   checkout overlays (300). Full screen below 640px. */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&display=swap');

html.ob-open,
html.ob-open body { overflow: hidden; }

.ob-overlay {
  position: fixed;
  inset: 0;
  z-index: 310;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px;
  overflow-y: auto;
  background: rgba(247, 248, 250, 0.96);
  color: #0D1F3C;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
}

.ob-panel {
  width: 100%;
  max-width: 560px;
  padding: 24px 28px 28px;
  background: #F7F8FA;
  border: 1px solid rgba(13, 31, 60, 0.16);
  border-radius: 2px;
}

.ob-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

/* ── Step dots ── */
.ob-dots {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ob-dot {
  width: 8px;
  height: 8px;
  border: 1px solid #0D1F3C;
  border-radius: 2px;
  background: transparent;
}
.ob-dot-done { background: rgba(13, 31, 60, 0.35); border-color: rgba(13, 31, 60, 0.35); }
.ob-dot-active { background: #0D1F3C; }

.ob-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ob-close {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(13, 31, 60, 0.16);
  border-radius: 2px;
  background: transparent;
  color: #0D1F3C;
  font-size: 14px;
  cursor: pointer;
}

/* ── Type ── */
.ob-heading {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: #0D1F3C;
}
.ob-heading:focus { outline: none; }
.ob-sub {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(13, 31, 60, 0.78);
}
.ob-note {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(13, 31, 60, 0.78);
}
.ob-on {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
}
.ob-mono,
.ob-num,
.ob-count,
.ob-chip-ticker {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
}
.ob-num {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.ob-count {
  margin: 12px 0 0;
  font-size: 12px;
  color: rgba(13, 31, 60, 0.7);
}
.ob-error {
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: #0D1F3C;
}
.ob-error:empty { display: none; }

/* ── Chip grid (was .po-ticker-grid / .po-ticker-tile) ── */
.ob-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}
.ob-chip,
.ob-result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(13, 31, 60, 0.16);
  border-radius: 2px;
  background: transparent;
  color: #0D1F3C;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ob-chip:hover,
.ob-result:hover { border-color: #0D1F3C; }
.ob-chip-on {
  background: #0D1F3C;
  border-color: #0D1F3C;
  color: #F7F8FA;
}
.ob-chip:disabled { opacity: 0.45; cursor: default; }
.ob-chip-ticker { font-size: 13px; font-weight: 600; }
.ob-chip-name {
  max-width: 100%;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.8;
}

/* ── Typeahead ── */
.ob-search { position: relative; }
.ob-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}
.ob-input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(13, 31, 60, 0.32);
  border-radius: 2px;
  background: #F7F8FA;
  color: #0D1F3C;
  font: inherit;
  font-size: 15px;
}
.ob-results {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}
.ob-results li + li { margin-top: 4px; }
.ob-result {
  width: 100%;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
}

/* ── Payoff ── */
.ob-skeleton { margin: 16px 0 24px; }
.ob-skeleton-line {
  height: 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(13, 31, 60, 0.16);
  border-radius: 2px;
  animation: ob-pulse 1.4s ease-in-out infinite;
}
.ob-skeleton-line:nth-child(2) { width: 80%; }
.ob-skeleton-line:nth-child(3) { width: 60%; }
@keyframes ob-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@media (prefers-reduced-motion: reduce) {
  .ob-skeleton-line { animation: none; }
}

.ob-per-ticker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.ob-per-ticker li { display: flex; gap: 6px; }
.ob-items {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(13, 31, 60, 0.16);
}
.ob-items li { border-bottom: 1px solid rgba(13, 31, 60, 0.16); }
.ob-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 0;
  color: #0D1F3C;
  text-decoration: none;
}
.ob-item:hover .ob-item-headline { text-decoration: underline; }
.ob-item-headline { font-size: 14px; font-weight: 600; line-height: 1.4; }
.ob-item-meta {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px;
  color: rgba(13, 31, 60, 0.7);
}

/* ── Alerts ── */
.ob-row { margin-bottom: 16px; }
.ob-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 0;
  border-top: 1px solid rgba(13, 31, 60, 0.16);
  font-size: 15px;
  cursor: pointer;
}
.ob-toggle input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #0D1F3C;
}
.ob-event {
  margin: 12px 0 0;
  font-size: 14px;
}
.ob-event:empty { display: none; }
.ob-brief { margin: 4px 0 20px; font-size: 15px; line-height: 1.55; }

/* ── Actions ── */
.ob-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.ob-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid #0D1F3C;
  border-radius: 2px;
  background: #0D1F3C;
  color: #F7F8FA;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.ob-btn-secondary {
  background: transparent;
  color: #0D1F3C;
}
.ob-btn:disabled { opacity: 0.45; cursor: default; }
.ob-link {
  min-height: 44px;
  padding: 0 4px;
  border: none;
  background: none;
  color: #0D1F3C;
  font: inherit;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Focus ── */
.ob-overlay a:focus-visible,
.ob-overlay button:focus-visible,
.ob-overlay input:focus-visible {
  outline: 2px solid #0D1F3C;
  outline-offset: 2px;
}

/* ── Mobile: full screen, 16px gutters ── */
@media (max-width: 640px) {
  .ob-overlay {
    padding: 0;
    background: #F7F8FA;
  }
  .ob-panel {
    min-height: 100%;
    max-width: none;
    padding: 16px;
    border: none;
  }
  .ob-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ob-heading { font-size: 20px; }
  .ob-num { font-size: 24px; }
  .ob-actions .ob-btn { flex: 1 1 100%; }
}
