/* Shared styles of the /guides/ pages. Tokens and components are copied from
   landing/index.html (inline there) so the guides match the main page. */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-start: #0F0A1A;
  --bg-end: #1A0E2E;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-hover: rgba(255, 255, 255, 0.10);
  --purple: #A855F7;
  --pink: #EC4899;
  --gradient: linear-gradient(135deg, #A855F7, #EC4899);
  --text: #F1F5F9;
  --text-muted: #94A3B8;
  --radius: 20px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(165deg, var(--bg-start) 0%, var(--bg-end) 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Ambient glow orbs */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 600px; height: 600px;
  background: var(--purple);
  top: -200px; right: -100px;
}
body::after {
  width: 500px; height: 500px;
  background: var(--pink);
  bottom: -150px; left: -100px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── NAV ── */
nav {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}
nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
nav a:hover { color: var(--text); }
.nav-links { display: flex; gap: 28px; }

/* ── GLASS CARD ── */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

/* ── BUTTONS ── */
.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(168, 85, 247, 0.35);
}
.btn-secondary {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--text);
  transition: transform 0.2s, background 0.2s;
}
.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--glass-hover);
}

/* ── GUIDE ── */
.guide {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 0 0;
}
.guide a { color: var(--purple); }
.guide a:hover { color: var(--pink); }
.crumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.crumbs a { text-decoration: none; }
.guide-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 20px;
}
.lead {
  font-size: 1.15rem;
  line-height: 1.65;
  margin-bottom: 16px;
}
.meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}
/* The TOC is a <nav>: undo the site-nav flex layout and its 44px link rows */
.toc {
  display: block;
  padding: 24px 28px;
  margin-bottom: 40px;
}
.toc h2 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--purple);
  margin-bottom: 12px;
}
.toc ul { list-style: none; columns: 2 260px; column-gap: 32px; }
.toc li { padding: 4px 0; break-inside: avoid; font-size: 0.92rem; }
.toc a { display: inline; min-height: 0; font-size: inherit; font-weight: 500; color: var(--text); text-decoration: none; }
.toc a:hover { color: var(--pink); }

.guide section { margin-bottom: 40px; scroll-margin-top: 16px; }
.guide section h2 {
  font-size: clamp(1.35rem, 3vw, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 16px;
}
.guide section p,
.guide section li {
  color: var(--text-muted);
  line-height: 1.7;
  font-size: 1rem;
}
.guide section p + p { margin-top: 14px; }
.guide section ul,
.guide section ol { padding-left: 22px; margin: 12px 0; }
.guide section li { padding: 4px 0; }

.clause {
  border-left: 3px solid var(--glass-border);
  background: var(--glass-bg);
  border-radius: 0 12px 12px 0;
  padding: 12px 16px;
  margin: 0 0 12px;
  color: var(--text) !important;
}
.clause.bad { border-left-color: var(--pink); }
.clause.better { border-left-color: var(--purple); }
.clause-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.app-card { padding: 32px 28px; }
.app-card h2 { margin-bottom: 16px; }
.guide .btn-primary, .guide .btn-primary:hover { color: #fff; }
.guide .btn-secondary, .guide .btn-secondary:hover { color: var(--text); }

/* ── FAQ ── */
.faq-list { display: grid; gap: 16px; }
.faq-item { padding: 24px 28px; }
.faq-item h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.faq-item p {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.95rem;
}

.related ul { list-style: none; padding-left: 0 !important; }

/* ── HUB ── */
.guide-list { display: grid; gap: 20px; margin-bottom: 40px; }
.guide-card {
  display: block;
  padding: 28px;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s;
}
.guide-card:hover { transform: translateY(-4px); background: var(--glass-hover); }
.guide section .guide-list { margin-bottom: 0; }
.guide-card h2,
.guide-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.35;
}
.guide-card p { color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; }

/* ── FOOTER ── */
footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--glass-border);
  margin-top: 60px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-links a {
  display: inline-block;
  padding: 14px 8px;
  margin: -14px -8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 16px;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }
.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
}

@media (max-width: 768px) {
  .guide { padding-top: 24px; }
  .toc ul { columns: 1; }
}
