/* complex.md site styles. platform.css (loaded first) supplies the token
   floor: --theme-* colors, --font-* stacks, spacing and radius scales. This
   file only lays out the document. House rules: 4px corners, no pills. */

body {
  font-family: var(--font-body, system-ui, sans-serif);
  background: var(--theme-bg, #fff);
  color: var(--theme-text, #111);
  line-height: 1.6;
  margin: 0;
}

main {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.site-header nav {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  gap: 1.25rem;
  align-items: baseline;
}
.site-header a {
  color: var(--theme-text, #111);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-header a:hover { text-decoration: underline; }
.site-header .brand {
  font-weight: 700;
  margin-right: auto;
  font-size: 1.05rem;
}

h1 { font-size: 1.75rem; line-height: 1.2; margin: 1.5rem 0 0.75rem; }
h2 { font-size: 1.25rem; margin: 2.25rem 0 0.5rem; }
h3 { font-size: 1.05rem; margin: 1.5rem 0 0.5rem; }

a { color: var(--theme-link, var(--accent-600, #0a5bd1)); }

pre {
  background: var(--theme-surface, #f5f5f7);
  border: 1px solid var(--theme-border, #e2e2e6);
  border-radius: 4px;
  padding: 0.85rem 1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.5;
}
code { font-family: var(--font-mono, ui-monospace, monospace); font-size: 0.9em; }
p code, li code, td code {
  background: var(--theme-surface, #f5f5f7);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
}
th, td {
  text-align: left;
  padding: 0.4rem 0.75rem 0.4rem 0;
  border-bottom: 1px solid var(--theme-border, #e2e2e6);
  vertical-align: top;
}
th { font-weight: 600; }

.cta {
  display: inline-block;
  background: var(--theme-text, #111);
  color: var(--theme-bg, #fff);
  text-decoration: none;
  border-radius: 4px;
  padding: 0.6rem 1.1rem;
  font-weight: 600;
  font-size: 0.95rem;
}
.cta:hover { opacity: 0.85; }

.site-footer {
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid var(--theme-border, #e2e2e6);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--theme-text-dim, #6e6e73);
}
