:root {
  --bg: #fafafa;
  --bg-alt: #f2f1ee;
  --card: #ffffff;
  --border: #e7e5e0;
  --text: #1c1b1a;
  --text-dim: #6b6863;
  --accent: #d9642e;
  --accent-hover: #c15523;
  --accent-soft: #fbe9de;
  --green: #1f9d55;
  --green-soft: #e4f6ea;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(28,27,26,0.05);
  --shadow-md: 0 6px 20px rgba(28,27,26,0.08);
  --mono: "SF Mono", "Fira Code", Consolas, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(250,250,250,0.9);
  backdrop-filter: blur(10px);
  z-index: 10;
}
.logo { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; text-decoration: none; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--text-dim); font-size: 0.92rem; font-weight: 500; text-decoration: none; }
.nav-links a:hover { color: var(--text); }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-dim); background: var(--card); }

.guide { max-width: 760px; margin: 0 auto; padding: 0 24px 90px; }

.guide-hero { padding: 56px 0 20px; }
.guide-hero .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.guide-hero h1 {
  font-size: 2.3rem;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  font-weight: 800;
  line-height: 1.15;
}
.guide-lede { font-size: 1.15rem; color: var(--text-dim); margin: 0; }
.breadcrumb { font-size: 0.85rem; color: var(--text-dim); margin-bottom: 4px; }
.breadcrumb a { text-decoration: none; color: var(--text-dim); }
.breadcrumb a:hover { color: var(--accent); }

.guide-body h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 40px 0 12px;
}
.guide-body h3 { font-size: 1.05rem; font-weight: 700; margin: 24px 0 8px; }
.guide-body p { font-size: 1rem; color: var(--text); margin: 0 0 14px; }
.guide-body ul, .guide-body ol { padding-left: 22px; margin: 0 0 14px; }
.guide-body li { margin-bottom: 6px; }
.guide-body strong { font-weight: 700; }

.code-snippet {
  background: #1c1b1a;
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 0.88rem;
  color: #e7e5e0;
  overflow-x: auto;
  white-space: pre;
  margin: 14px 0 20px;
}
.code-snippet .comment { color: #9a978f; }

.callout {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 18px 0;
  font-size: 0.94rem;
}
.callout strong { color: var(--accent); }

.guide-cta {
  margin-top: 48px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  text-align: center;
}
.guide-cta h3 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 800; }
.guide-cta p { color: var(--text-dim); margin: 0 0 20px; }

.related-guides { margin-top: 40px; }
.related-guides h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; }
.related-guides ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.related-guides a {
  display: block;
  padding: 12px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}
.related-guides a:hover { border-color: var(--accent); color: var(--accent); }

footer {
  text-align: center;
  padding: 40px 24px;
  color: var(--text-dim);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
footer a { color: var(--accent); text-decoration: none; }

/* Hub page (guides/index.html) */
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin-top: 12px;
}
.hub-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.hub-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.hub-card .hub-eyebrow { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-bottom: 8px; }
.hub-card h3 { margin: 0 0 6px; font-size: 1.05rem; font-weight: 800; }
.hub-card p { margin: 0; font-size: 0.88rem; color: var(--text-dim); }
.hub-section { margin-top: 40px; }
.hub-section:first-child { margin-top: 0; }
.hub-section h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.hub-section .hub-section-sub { color: var(--text-dim); margin: 0 0 4px; }

@media (max-width: 640px) {
  .guide-hero h1 { font-size: 1.7rem; }
  .guide-hero { padding: 36px 0 16px; }
}
