/*
 * Styles for the static guide pages under /guides/.
 *
 * These pages deliberately do NOT boot the React bundle — it is ~3.2 MB and
 * content pages live or die on load speed. Colour values mirror the tokens in
 * src/index.css so the guides match the app; keep them in sync if those change.
 */

:root {
  --background: 214 30% 97%;
  --foreground: 216 50% 8%;
  --primary: 158 65% 30%;
  --muted-foreground: 214 22% 40%;
  --border: 38 35% 82%;
  --gold: 38 92% 50%;
  --terracotta: 12 70% 52%;
  --sand: 214 28% 87%;
  --card: 0 0% 100%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: 216 55% 5%;
    --foreground: 195 18% 95%;
    --primary: 158 72% 45%;
    --muted-foreground: 214 18% 55%;
    --border: 30 25% 20%;
    --gold: 38 90% 58%;
    --terracotta: 12 65% 52%;
    --sand: 216 28% 22%;
    --card: 216 45% 9%;
  }
}

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

body {
  margin: 0;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .brand {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0 0 1rem; }
h2 { font-size: clamp(1.4rem, 3.5vw, 1.75rem); margin: 2.75rem 0 0.75rem; }
h3 { font-size: 1.15rem; margin: 1.75rem 0 0.5rem; }

p, li { color: hsl(var(--foreground) / 0.88); }

a { color: hsl(var(--primary)); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: hsl(var(--terracotta)); }

/* ---------------------------------------------------------------- layout */

.wrap { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem; }

header.site {
  border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--card) / 0.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: hsl(var(--foreground));
  text-decoration: none;
}

.brand span { color: hsl(var(--primary)); }

.cta {
  display: inline-block;
  background: hsl(var(--primary));
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0.6rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
}

.cta:hover { background: hsl(var(--primary) / 0.88); color: #fff; }

main { padding: 2.5rem 0 4rem; }

nav.crumbs {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 1.25rem;
}

nav.crumbs a { color: hsl(var(--muted-foreground)); }

.lede {
  font-size: 1.15rem;
  color: hsl(var(--foreground) / 0.95);
  border-left: 3px solid hsl(var(--gold));
  padding-left: 1rem;
  margin: 0 0 2rem;
}

.meta {
  font-size: 0.85rem;
  color: hsl(var(--muted-foreground));
  margin: 0 0 2rem;
}

/* ----------------------------------------------------------- components */

.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.9rem;
  padding: 1.25rem 1.4rem;
  margin: 1.75rem 0;
}

.card h3 { margin-top: 0; }

.callout {
  background: hsl(var(--sand) / 0.5);
  border: 1px solid hsl(var(--border));
  border-left: 3px solid hsl(var(--primary));
  border-radius: 0.6rem;
  padding: 1rem 1.25rem;
  margin: 1.75rem 0;
}

.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

th, td {
  border: 1px solid hsl(var(--border));
  padding: 0.6rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

th { background: hsl(var(--sand) / 0.5); font-weight: 600; }

/* Tables must scroll inside their own box, never the page body. */
.scroll-x { overflow-x: auto; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em;
  background: hsl(var(--sand) / 0.6);
  padding: 0.12em 0.38em;
  border-radius: 0.3rem;
}

ol, ul { padding-left: 1.35rem; }
li { margin: 0.4rem 0; }

.guide-list { list-style: none; padding: 0; }

.guide-list li {
  border: 1px solid hsl(var(--border));
  background: hsl(var(--card));
  border-radius: 0.9rem;
  padding: 1.1rem 1.3rem;
  margin: 0.9rem 0;
}

.guide-list a { font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.guide-list p { margin: 0.35rem 0 0; color: hsl(var(--muted-foreground)); font-size: 0.95rem; }

.next {
  border-top: 1px solid hsl(var(--border));
  margin-top: 3rem;
  padding-top: 1.5rem;
}

footer.site {
  border-top: 1px solid hsl(var(--border));
  padding: 2rem 0;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

footer.site a { color: hsl(var(--muted-foreground)); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
