*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
a, button, input, select, textarea, label, summary { touch-action: manipulation; }

html { font-size: 18px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f0f2f7;
  color: #1a2035;
  min-height: 100vh;
  padding: 2.5rem 1.25rem;
  line-height: 1.5;
}

header {
  max-width: 1000px;
  margin: 0 auto 2.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  border-bottom: 2px solid #d4d9e8;
  padding-bottom: 1.25rem;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f1624;
  letter-spacing: -.02em;
}

#last-updated { font-size: .9rem; color: #7a85a0; }

.section-title {
  max-width: 1000px;
  margin: 0 auto 1.1rem;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7a85a0;
}

.direction-badge {
  font-size: .8rem;
  font-weight: 800;
  padding: .2rem .6rem;
  border-radius: 5px;
  letter-spacing: .03em;
  white-space: nowrap;
}

.direction-badge.YES  { background: #dcfce7; color: #15803d; }
.direction-badge.NO   { background: #fee2e2; color: #dc2626; }
.direction-badge.LONG { background: #dcfce7; color: #15803d; }
.direction-badge.SHORT { background: #fee2e2; color: #dc2626; }
.direction-badge.PASS { background: #f3f4f6; color: #6b7280; }

/* ── Page content wrapper — used by all dashboards ── */
#page-content {
  max-width: 1000px;
  margin-inline: auto;
  width: 100%;
}

/* ── Top bar logo link — used by all dashboards ── */
.top-bar-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-right: .6rem;
  line-height: 0;
  opacity: .75;
  transition: opacity .15s;
  border-radius: 6px;
}
.top-bar-logo:hover        { opacity: 1; }
.top-bar-logo:focus-visible { outline: 2px solid #6b7aff; outline-offset: 3px; }
.top-bar-logo img          { width: 28px; height: 28px; border-radius: 6px; display: block; }

/* Provider identity dots — used by Prompt Inspector, Trades page, etc. */
.conv-block-label-dot {
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.conv-block-label-dot.claude  { background: #d97706; }
.conv-block-label-dot.openai  { background: #16a34a; }
.conv-block-label-dot.gemini  { background: #1a73e8; }
.conv-block-label-dot.grok    { background: #e11d48; }
.conv-block-label-dot.prompt  { background: var(--color-accent, #4f46e5); }

.empty {
  color: #9aa0b4;
  font-size: 1rem;
  text-align: center;
  padding: 2.5rem;
}

#error-banner {
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  background: #fee2e2;
  color: #991b1b;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: .95rem;
  display: none;
}

#wallet-status {
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  background: #e0e7ff;
  color: #1e3a8a;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  font-size: .95rem;
  display: none;
}

/* ── Reasoning modal ── */
#reasoning-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 36, .55);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

#reasoning-modal.open { display: flex; }

.modal-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1.4rem 1.5rem 1rem;
  border-bottom: 1px solid #e8ebf2;
  flex-shrink: 0;
}

.modal-question {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a2035;
  line-height: 1.4;
  flex: 1;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #9aa0b4;
  cursor: pointer;
  padding: .1rem .3rem;
  flex-shrink: 0;
  line-height: 1;
}

.modal-close:hover { color: #1a2035; }

.modal-body {
  padding: 1.25rem 1.5rem 1.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.modal-provider {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #9aa0b4;
  margin-bottom: .75rem;
}

.modal-reasoning-text {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #2a3450;
  white-space: pre-wrap;
}
