*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:       #0C0C0E;
  --surface:  #1A1A1C;
  --text:     #E8E6E1;
  --text-40:  #E8E6E166;
  --text-50:  #E8E6E150;
  --text-30:  #E8E6E140;
  --coral:    #C84A1E;
  --coral-bg: #C84A1E15;
  --cyan:     #4AD8C7;
  --border:   #2A2A2E;
  --mono:     'JetBrains Mono', 'SF Mono', monospace;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  max-width: 440px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}

/* ── Header ────────────────────────────────── */
.header {
  padding: 18px 16px 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.header h1 {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.02em;
}
.header .meta {
  font-size: 11px;
  color: var(--text-40);
}

/* ── Section labels ────────────────────────── */
.section-label {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-50);
  padding: 0 16px;
  margin-bottom: 8px;
}

/* ── Alerts ────────────────────────────────── */
.alerts { padding: 0 12px 4px; }

.alert-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 8px;
}
.alert-card.hot {
  background: var(--coral-bg);
}
.alert-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}
.alert-store {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.alert-time {
  font-size: 11px;
  color: var(--text-40);
}
.alert-product {
  font-weight: 500;
  font-size: 15px;
  margin-bottom: 1px;
}
.alert-set { font-size: 11px; color: var(--text-40); margin-bottom: 6px; }
.alert-pricing {
  display: flex;
  gap: 5px;
  align-items: baseline;
  font-size: 12px;
}
.alert-pricing .retail { color: var(--text-40); }
.alert-pricing .arrow  { color: var(--text-30); font-size: 10px; }
.alert-pricing .market { font-weight: 500; }
.alert-pricing .margin { color: var(--cyan); font-weight: 500; }
.alert-card.hot .alert-pricing .margin { color: var(--coral); }
.alert-qty {
  font-size: 10px;
  color: var(--text-40);
  margin-top: 3px;
}

/* ── Watchlist ─────────────────────────────── */
.watchlist { padding: 0 12px 4px; }

.watch-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.watch-left { flex: 1; min-width: 0; }
.watch-name {
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.watch-set { font-size: 11px; color: var(--text-40); margin-bottom: 3px; }
.watch-prices {
  font-size: 11px;
  display: flex;
  gap: 4px;
  align-items: baseline;
}
.watch-prices .msrp  { color: var(--text-40); }
.watch-prices .arrow { color: var(--text-30); font-size: 9px; }
.watch-prices .market { font-weight: 500; }
.watch-right { text-align: right; flex-shrink: 0; margin-left: 10px; }
.watch-spread {
  font-weight: 500;
  font-size: 13px;
}
.spread-green { color: var(--cyan); }
.spread-olive { color: var(--cyan); }
.spread-amber { color: var(--cyan); }
.watch-stores {
  font-size: 10px;
  color: var(--text-40);
  margin-top: 1px;
}
.watch-stores.none { color: var(--coral); }

/* ── Stats strip ───────────────────────────── */
.stats-strip {
  display: flex;
  margin: 0 12px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
}
.stat { flex: 1; text-align: center; padding: 12px 6px; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-value {
  font-weight: 500;
  font-size: 20px;
  line-height: 1;
  margin-bottom: 3px;
  color: var(--cyan);
}
.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-50);
}

/* ── CTA ───────────────────────────────────── */
.cta-wrap { padding: 6px 12px 28px; }
.cta {
  display: block;
  width: 100%;
  padding: 12px;
  background: transparent;
  color: var(--cyan);
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
  border: 1px solid var(--cyan);
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  letter-spacing: 0.02em;
}
.cta:disabled { opacity: 0.5; cursor: default; }
.cta.subscribed {
  background: var(--cyan);
  color: var(--bg);
  border-color: var(--cyan);
}

/* ── Watchlist extras ──────────────────────── */
.watchlist-banner {
  font-size: 11px;
  color: var(--text-40);
  padding: 0 4px 10px;
}
.uncalibrated-section { margin-top: 4px; }
.uncalibrated-toggle {
  font-size: 11px;
  color: var(--text-40);
  padding: 8px 4px;
  cursor: pointer;
  list-style: none;
}
.uncalibrated-toggle::before { content: '\25b6  '; font-size: 9px; }
details[open] > .uncalibrated-toggle::before { content: '\25bc  '; }
.uncalibrated-list { padding-top: 4px; }

/* ── Utility ───────────────────────────────── */
.empty-state {
  font-size: 12px;
  color: var(--text-40);
  text-align: center;
  padding: 24px 16px;
}
