/* Shared stylesheet for the static guide pages under public/<slug>/.
   Self-contained: fonts come from /fonts/ (the site CSP allows self only).
   Tokens mirror tailwind.config.js / style.css / app_theme.dart. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-700.woff2') format('woff2');
}

:root {
  --bg:            #0A0A0A;
  --surface:       #111111;
  --surface-alt:   #1C1C1C;
  --border:        #2A2A2A;
  --text:          #F5F5F5;
  --text-sec:      #C0C0C8;
  --text-muted:    #8A8A9A;
  --orange:        #F7931A;
  --orange-dark:   #D97D0F;
  --orange-dim:    rgba(247,147,26,.12);
  --orange-border: rgba(247,147,26,.30);
  --green:         #00C896;
  --red:           #FF4757;
  --radius-sm:     12px;
  --radius-lg:     20px;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,10,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav .logo { display: block; height: 2rem; width: auto; }
.nav .nav-cta {
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
  white-space: nowrap;
}
.nav .nav-cta:hover { text-decoration: underline; }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}
@media (max-width: 420px) { .wrap { padding-left: 16px; padding-right: 16px; } }

.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: '›'; margin-right: 6px; color: var(--text-muted); }
.breadcrumb a { color: var(--text-sec); text-decoration: none; }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb [aria-current] { color: var(--text-muted); }

/* ── Typography ──────────────────────────────────────────────────────────── */
h1 {
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 14px;
}
h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin: 44px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 22px 0 6px;
  color: var(--text);
}
p, ul, ol { color: var(--text-sec); margin-bottom: 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }
li::marker { color: var(--orange); }
strong { color: var(--text); font-weight: 600; }
a { color: var(--orange); }
a:hover { color: var(--orange-dark); }

.lead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 20px;
}
.meta { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; }

code {
  font-family: var(--mono);
  font-size: 0.85em;
  font-weight: 700;
  color: var(--orange);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1px 6px;
  word-break: break-all;
}
pre {
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text-sec);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 12px 0 18px;
  white-space: pre;
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; color: inherit; word-break: normal; }

/* ── Hero image + figures ────────────────────────────────────────────────── */
.hero {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin: 8px 0 12px;
}
.hero .hero-copy { flex: 1 1 320px; min-width: 0; }
.hero figure { flex: 0 0 220px; margin: 0; }
@media (max-width: 640px) {
  .hero { flex-direction: column; }
  .hero figure { flex-basis: auto; width: min(100%, 240px); margin: 0 auto; }
}

figure { margin: 14px 0 22px; }
figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
}
figcaption {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.5;
}

/* ── Steps ───────────────────────────────────────────────────────────────── */
.steps { list-style: none; padding: 0; counter-reset: step; margin: 18px 0 8px; }
.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  margin-bottom: 26px;
}
.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--orange-dim);
  border: 1px solid var(--orange-border);
  color: var(--orange);
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.steps > li > strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 16px; }
.steps > li p { margin-bottom: 8px; }
.steps figure { max-width: 240px; margin: 12px 0 6px; }

/* ── Callouts ────────────────────────────────────────────────────────────── */
.callout {
  background: var(--orange-dim);
  border: 1px solid var(--orange-border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 18px 0 22px;
  color: var(--text-sec);
  font-size: 15px;
}
.callout strong { color: var(--orange); }
.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin: 18px 0 22px;
  color: var(--text-sec);
  font-size: 15px;
}

/* ── Comparison table ────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 12px 0 20px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 420px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text-sec); }
th { color: var(--text); font-weight: 600; background: var(--surface); }
td code { white-space: nowrap; }

/* ── FAQ ─────────────────────────────────────────────────────────────────── */
.faq h3 { margin-top: 20px; }
.faq h3::before { content: 'Q'; color: var(--orange); font-family: var(--mono); margin-right: 8px; }

/* ── Store buttons ───────────────────────────────────────────────────────── */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 6px;
}
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface-alt);
  transition: border-color .15s, color .15s, background .15s;
  flex: 1 1 140px;
  justify-content: center;
}
.store-btn:hover { border-color: var(--orange); color: var(--orange); }
.store-btn.primary { background: var(--orange); color: #0A0A0A; border-color: var(--orange); }
.store-btn.primary:hover { background: var(--orange-dark); color: #0A0A0A; }
.store-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── More guides ─────────────────────────────────────────────────────────── */
.guides { list-style: none; padding: 0; margin: 12px 0 0; }
.guides li {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 8px;
}
.guides a {
  display: block;
  padding: 12px 14px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.guides a:hover { color: var(--orange); }
.guides span { display: block; font-size: 13px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }

/* ── Footer ──────────────────────────────────────────────────────────────── */
.foot {
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.foot a { color: var(--text-sec); text-decoration: none; }
.foot a:hover { color: var(--orange); }
