/* ───────── Bitcoin Insight — shared styles for guide pages ─────────
   Mirrors the app + homepage design system (flat black, Bitcoin orange).
   Used by /guides/*. The homepage keeps its own inline critical CSS. */

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

:root {
  --bg: #000000;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --text-muted: #98989f;
  --text-dim: #8a8a91;
  --accent: #f7931a;
  --accent-2: #ffb74d;
  --green: #30d158;
  --red: #ff453a;
  --radius-card: 24px;
  --radius-inner: 16px;
  --maxw: 760px;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-rounded: 'SF Pro Rounded', ui-rounded, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.bg-glow { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background: #000; }
.bg-glow::before {
  content: ''; position: absolute; border-radius: 50%; filter: blur(110px);
  width: 620px; height: 620px; background: rgba(247,147,26,0.13); top: -200px; left: 50%; transform: translateX(-50%);
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--accent); color: #1a1205; padding: 10px 16px; border-radius: 10px;
  font-weight: 600; text-decoration: none; transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ───────── Nav ───────── */
.nav-bar { position: sticky; top: 0; z-index: 100; border-bottom: 1px solid transparent; transition: background .3s, border-color .3s, backdrop-filter .3s; }
.nav-bar.scrolled { background: rgba(0,0,0,0.6); backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px); border-bottom-color: var(--border); }
nav { max-width: 1120px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 11px; font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); text-decoration: none; }
.logo img { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px;
  background: var(--accent); color: #1a1205; border-radius: 11px; font-size: 0.9rem; font-weight: 600;
  text-decoration: none; white-space: nowrap; transition: transform .2s, box-shadow .2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(247,147,26,0.25); }

/* ───────── Article ───────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.breadcrumbs { font-size: 0.84rem; color: var(--text-dim); margin: 36px 0 18px; }
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span { color: var(--text-dim); }

.guide-head { margin-bottom: 30px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; }
.eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.guide-head h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.guide-meta { color: var(--text-dim); font-size: 0.86rem; margin-top: 14px; }

.accent-text { background: linear-gradient(120deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

article { font-size: 1.06rem; color: #d7d7db; }
article > p { margin: 0 0 18px; }
article h2 { font-size: clamp(1.4rem, 3.4vw, 1.85rem); font-weight: 700; letter-spacing: -0.02em; color: var(--text); margin: 42px 0 14px; line-height: 1.2; scroll-margin-top: 80px; }
article h3 { font-size: 1.2rem; font-weight: 650; color: var(--text); margin: 28px 0 10px; }
article a { color: var(--accent); text-decoration: none; }
article a:hover { text-decoration: underline; }
article strong { color: var(--text); font-weight: 650; }
article ul, article ol { margin: 0 0 18px; padding-left: 22px; }
article li { margin-bottom: 9px; }
article li::marker { color: var(--accent); }
article blockquote {
  margin: 22px 0; padding: 16px 20px; border-left: 3px solid var(--accent);
  background: var(--surface); border-radius: 0 12px 12px 0; color: var(--text-muted);
}
article code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em;
  background: var(--surface-strong); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px;
}
article .lead { font-size: 1.18rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 26px; }

/* Key-takeaway / callout box */
.callout {
  background: linear-gradient(150deg, rgba(247,147,26,0.10), rgba(255,255,255,0.03));
  border: 1px solid var(--border-strong); border-radius: var(--radius-inner);
  padding: 20px 22px; margin: 26px 0;
}
.callout strong { color: var(--accent); }

/* Table of contents */
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-inner); padding: 18px 22px; margin: 0 0 32px; }
.toc-title { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.toc ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.toc a { color: var(--text-muted); text-decoration: none; font-size: 0.95rem; }
.toc a:hover { color: var(--accent); }

/* Comparison-ish simple table */
.g-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 22px 0; }
.g-table { width: 100%; border-collapse: collapse; min-width: 520px; font-size: 0.95rem; }
.g-table th, .g-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.g-table thead th { font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.g-table td { color: var(--text-muted); }
.g-table td:first-child { color: var(--text); }

/* CTA card */
.cta-card {
  margin: 48px 0 20px; text-align: center; position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 24px; padding: 40px 28px;
}
.cta-card::before { content: ''; position: absolute; top: -120px; left: 50%; transform: translateX(-50%); width: 360px; height: 260px; background: radial-gradient(circle, rgba(247,147,26,0.16), transparent 70%); filter: blur(20px); }
.cta-card h2 { position: relative; font-size: 1.5rem; font-weight: 750; letter-spacing: -0.02em; margin: 0 0 10px; }
.cta-card p { position: relative; color: var(--text-muted); max-width: 460px; margin: 0 auto 22px; }
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 26px; border-radius: 14px; font-size: 1rem; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn-primary { background: var(--accent); color: #1a1205; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(247,147,26,0.3); }

/* Related guides */
.related { margin: 40px 0; }
.related h2 { font-size: 1.2rem; margin-bottom: 14px; }
.related ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.related a {
  display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; color: var(--text); text-decoration: none; font-weight: 500; transition: border-color .2s, background .2s;
}
.related a:hover { border-color: var(--border-strong); background: var(--surface-strong); }
.related a span { display: block; color: var(--text-dim); font-size: 0.86rem; font-weight: 400; margin-top: 2px; }

/* Guides hub grid */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; margin: 10px 0 30px; }
.hub-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 26px; text-decoration: none; color: var(--text); transition: border-color .3s, transform .3s, background .3s; }
.hub-card:hover { border-color: var(--border-strong); transform: translateY(-4px); background: var(--surface-strong); }
.hub-card h2 { font-size: 1.15rem; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 8px; }
.hub-card p { color: var(--text-muted); font-size: 0.94rem; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 40px 0 50px; margin-top: 50px; }
.footer-inner { max-width: 1120px; margin: 0 auto; padding: 0 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.footer-brand img { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); }
.footer-links { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }
.footer-copy { max-width: 1120px; margin: 18px auto 0; padding: 0 24px; color: var(--text-dim); font-size: 0.82rem; }
.footer-copy a { color: var(--text-dim); }

@media (max-width: 560px) {
  .wrap { padding: 0 18px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  html { scroll-behavior: auto; }
}
