/* Shared styles for the generated pages (`/faq/`, `/examples/…`, `/dialects/…`).
   The app page's own look lives in style.css; these pages are prose, so they
   only need a readable measure, a code block, and a nav. */

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.8;
}

header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

header .brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

header .subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-links {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}

.site-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-links a:hover {
  color: var(--accent);
}

main.page {
  flex: 1;
  width: 100%;
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

main.page h1 {
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

main.page h2 {
  font-size: 1.05rem;
  color: var(--accent);
  margin: 2rem 0 0.5rem;
}

main.page p,
main.page li,
main.page dd,
main.page td {
  color: var(--text);
}

main.page .lede {
  color: var(--text);
  font-size: 1.05rem;
}

main.page a {
  color: var(--accent);
}

main.page ul,
main.page ol {
  padding-left: 1.4rem;
}

main.page li {
  margin: 0.25rem 0;
}

main.page code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.05rem 0.25rem;
  font-size: 0.85em;
}

main.page pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
}

main.page pre code {
  background: none;
  border: none;
  padding: 0;
}

main.page table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.75rem 0;
  font-size: 0.9rem;
}

main.page th,
main.page td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

main.page th {
  background: var(--surface);
  font-weight: 600;
}

.crumbs {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.crumbs a {
  color: var(--text-muted);
}

.crumbs .sep {
  margin: 0 0.4rem;
}

/* "Run this in the simulator" — the point of an example page is that the reader
   can press it and get the program, not a screenshot of one. */
/* `main.page a` is more specific than a bare class, so the button states its own
   scope — a blue label on a blue background is invisible. */
main.page a.run-cta {
  display: inline-block;
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
}

main.page a.run-cta:hover {
  background: var(--accent-hover);
  color: #fff;
}

.page-list {
  list-style: none;
  padding-left: 0;
}

.page-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.page-list .desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.25rem 1rem;
  margin-left: auto;
}

footer .footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}

footer .footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}
