:root {
  --bg: #0d0f14;
  --surface: #141720;
  --surface-2: #1a1f2e;
  --accent: #ff5c1a;
  --accent-dim: rgba(255,92,26,0.15);
  --text: #f5f0e8;
  --text-muted: rgba(245,240,232,0.45);
  --border: rgba(245,240,232,0.08);
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Metric cards — shared style for hero cards */
.metric-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
}

.card-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.35);
  margin-bottom: 8px;
}

.card-value {
  font-family: 'DM Mono', monospace;
  font-size: 28px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
  margin-bottom: 8px;
}

.card-delta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  margin-bottom: 4px;
}
.card-delta.positive { color: #22c55e; }
.card-delta.neutral { color: rgba(245,240,232,0.35); }

.delta-arrow { font-size: 14px; }
.card-period {
  color: rgba(245,240,232,0.35);
  font-size: 11px;
}

.card-spark {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 30px;
  opacity: 0.7;
}
.card-spark svg {
  width: 100%;
  height: 100%;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(245,240,232,0.12); border-radius: 3px; }

/* Focus */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Links */
a { color: inherit; text-decoration: none; }

/* Selection */
::selection {
  background: var(--accent);
  color: #0d0f14;
}

/* Settings page (/settings) — scoped to .settings* classes so they don't
 * bleed into the landing page or the dashboard. Visually mirrors the
 * existing onboarding-card surface: rgba card + Playfair/DM Mono type. */
.settings {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 80px 32px;
  box-sizing: border-box;
}
.settings-card {
  max-width: 720px;
  width: 100%;
  border: 1px solid rgba(245,240,232,0.08);
  border-radius: 8px;
  padding: 56px 56px 48px;
  background: rgba(20,23,32,0.6);
}
.settings-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.25);
  margin-bottom: 24px;
}
.settings-headline {
  font-family: 'Playfair Display', serif;
  font-size: clamp(26px, 2.6vw, 40px);
  font-weight: 700;
  line-height: 1.2;
  color: #f5f0e8;
  margin: 0 0 32px;
}
.settings-section {
  border-top: 1px solid rgba(245,240,232,0.08);
  padding-top: 32px;
  margin-top: 32px;
}
.settings-section-label {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,92,26,0.55);
  margin-bottom: 12px;
}
.settings-section-body {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(245,240,232,0.55);
  margin: 0 0 20px;
}
.settings-toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid rgba(245,240,232,0.06);
  border-bottom: 1px solid rgba(245,240,232,0.06);
}
.settings-toggle-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 36px;
  height: 20px;
  background: rgba(245,240,232,0.12);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 120ms ease;
  flex: 0 0 auto;
}
.settings-toggle-row input[type="checkbox"]:checked {
  background: rgba(255,92,26,0.85);
}
.settings-toggle-row input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #f5f0e8;
  border-radius: 50%;
  transition: transform 120ms ease;
}
.settings-toggle-row input[type="checkbox"]:checked::after {
  transform: translateX(16px);
}
.settings-toggle-row input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.settings-toggle-row label {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: rgba(245,240,232,0.75);
  cursor: pointer;
}
.brief-preview {
  margin-top: 0;
  background: rgba(13,15,20,0.7);
  border: 1px solid rgba(245,240,232,0.06);
  border-radius: 6px;
  padding: 18px 20px;
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  color: rgba(245,240,232,0.65);
  max-height: 320px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.brief-preview-label {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245,240,232,0.35);
  margin-top: 22px;
  margin-bottom: 10px;
}
.settings-empty {
  font-family: 'DM Mono', monospace;
  font-size: 13px;
  color: rgba(245,240,232,0.5);
  padding: 18px 0;
}
.settings-empty a {
  color: #ff5c1a;
}
.settings-foot {
  border-top: 1px solid rgba(245,240,232,0.06);
  padding-top: 20px;
  margin-top: 32px;
}
.settings-link {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(245,240,232,0.4);
}
.settings-link:hover { color: #ff5c1a; }
.toggle-status {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: rgba(245,240,232,0.35);
  margin-left: auto;
}
@media (max-width: 600px) {
  .settings-card { padding: 36px 24px; }
}
