/* ============================================================
   ChipFlip — shared site styles
   Design language: dark trading-terminal, built for the subject
   (price tracking / arbitrage) rather than a generic dark theme.
   ============================================================ */

:root {
  --bg:           #0b0d12;
  --bg-raised:    #11141c;
  --bg-card:      #161a24;
  --border:       #232838;
  --border-soft:  #1a1e2a;

  --text-primary:   #e7eaf3;
  --text-secondary: #9aa3b8;
  --text-muted:     #5b6479;

  --new:    #3b82f6;   /* Amazon / new price */
  --used:   #22c55e;   /* eBay sold / used price */
  --margin: #f5a623;   /* profit / margin accent */
  --danger: #ef4444;

  --mono: 'IBM Plex Mono', 'Courier New', monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --serif: 'Fraunces', Georgia, serif;

  --radius: 10px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------------- Header ---------------- */

.site-header {
  border-bottom: 1px solid var(--border-soft);
  background: rgba(11, 13, 18, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
}

.logo-mark {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--new), var(--used));
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #07080b;
}

.main-nav {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-secondary);
}

.main-nav a:hover { color: var(--text-primary); }
.main-nav a.active { color: var(--text-primary); }

.nav-spacer { flex: 1; }

.nav-cta {
  font-size: 13px;
  font-family: var(--mono);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 14px;
  color: var(--text-primary);
  transition: border-color 0.15s;
}
.nav-cta:hover { border-color: var(--used); }

/* ---------------- Footer ---------------- */

.site-footer {
  border-top: 1px solid var(--border-soft);
  margin-top: 80px;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a:hover { color: var(--text-secondary); }

.disclosure {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.6;
}

/* ---------------- Typography ---------------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }
p { line-height: 1.7; color: var(--text-secondary); }

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--used);
}

/* ---------------- Buttons ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg);
}
.btn-primary:hover { background: #fff; }

.btn-ghost {
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-ghost:hover { border-color: var(--text-secondary); }

/* ---------------- Content pages ---------------- */

.content-page {
  padding: 64px 0 40px;
}

.content-header {
  max-width: 720px;
  margin-bottom: 48px;
}

.content-header h1 {
  font-size: 38px;
  margin-top: 14px;
  margin-bottom: 16px;
}

.content-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
}

.prose {
  max-width: 720px;
}

.prose h2 {
  font-size: 24px;
  margin-top: 48px;
  margin-bottom: 16px;
}

.prose h3 {
  font-size: 18px;
  font-family: var(--sans);
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { color: var(--text-secondary); line-height: 1.8; padding-left: 22px; }
.prose li { margin-bottom: 8px; }

.prose strong { color: var(--text-primary); font-weight: 600; }

.callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--used);
  border-radius: 0 8px 8px 0;
  padding: 18px 20px;
  margin: 24px 0;
  font-size: 14px;
}
.callout p { margin: 0; color: var(--text-secondary); }
.callout strong { color: var(--text-primary); }

.price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 32px;
  font-size: 14px;
}
.price-table th, .price-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
}
.price-table th {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.price-table td.num { font-family: var(--mono); text-align: right; }
.price-table .margin-cell { color: var(--margin); font-weight: 600; }

.affiliate-link {
  display: inline-block;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--new);
  border-bottom: 1px dashed var(--new);
}

.related-guides {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid var(--border-soft);
}

.related-guides h3 {
  font-size: 16px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.guide-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s, transform 0.15s;
}
.guide-card:hover { border-color: var(--used); transform: translateY(-1px); }
.guide-card h4 { font-size: 15px; margin: 0 0 8px; color: var(--text-primary); }
.guide-card p { font-size: 13px; margin: 0; color: var(--text-muted); }

@media (max-width: 720px) {
  .content-header h1 { font-size: 28px; }
  .main-nav { display: none; }
}
