/* Styles for the static /learn content pages. Standalone (no Tailwind runtime),
   reuses the app's dark theme tokens from src/index.css. Keep these in sync. */
:root {
  --surface: #08090d;
  --panel: #11141e;
  --border: #25304a;
  --accent: #60a5fa;
  --teal: #2dd4bf;
  --amber: #fbbf24;
  --muted: #9ca3af;
  --text: #f1f5f9;
  --text-strong: #ffffff;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.7;
  font-size: 17px;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre, .mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }

/* ── Site header / footer ─────────────────────────────────────────────── */
header.site, footer.site {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
header.site { border-bottom: 1px solid var(--border); }
footer.site {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}
footer.site p { margin: 0.4rem 0; }
.brand {
  color: var(--accent);
  font-family: ui-monospace, monospace;
  font-weight: 700;
  letter-spacing: 0.15em;
  font-size: 1rem;
}
header.site nav a { margin-left: 1rem; color: var(--muted); font-size: 0.9rem; }

/* ── Article ──────────────────────────────────────────────────────────── */
main { max-width: 760px; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; }

.crumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; }
.crumbs .sep { margin: 0 0.5rem; opacity: 0.5; }
.crumbs [aria-current="page"] { color: var(--text); }

h1 {
  color: var(--text-strong);
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}
.updated { color: var(--muted); font-size: 0.85rem; margin: 0 0 1.5rem; }
.lead { font-size: 1.15rem; color: var(--text); }

h2 {
  color: var(--text-strong);
  font-size: 1.4rem;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
h3 { color: var(--text-strong); font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }

p, ul, ol { margin: 0.75rem 0; }
li { margin: 0.35rem 0; }

p code, li code {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
  color: var(--teal);
}

/* SQL code blocks */
figure.code { margin: 1.25rem 0; }
figure.code pre {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  margin: 0;
}
figure.code code {
  color: var(--text);
  font-size: 0.95rem;
  background: none;
  border: none;
  padding: 0;
}
figure.code figcaption { color: var(--muted); font-size: 0.82rem; margin-top: 0.4rem; }

/* Note / callout */
aside.note {
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

/* CTA button */
.cta { margin: 1.75rem 0; }
.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #04121f;
  font-weight: 600;
  padding: 0.7rem 1.2rem;
  border-radius: 8px;
}
.cta-btn:hover { text-decoration: none; filter: brightness(1.08); }

/* Related */
.related { margin-top: 2.5rem; }
.related h2 { border-top: 1px solid var(--border); }

/* ── /learn index hub cards ───────────────────────────────────────────── */
.cards { display: grid; gap: 1rem; margin: 1.75rem 0; }
.card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  color: var(--text);
  transition: border-color 0.15s ease;
}
.card:hover { border-color: var(--accent); text-decoration: none; }
.card h2 {
  margin: 0.3rem 0 0.4rem;
  border: none;
  padding: 0;
  font-size: 1.15rem;
  color: var(--text-strong);
}
.card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.card.featured { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
}
