/* Lingenic Compose - Common Stylesheet */

/* ── Color Variables ── */
:root {
  --bg: #fafafa;
  --fg: #222;
  --code-bg: #f0f0f0;
  --border: #ddd;
  --accent: #0066cc;
  --subtle: #666;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1a1a;
    --fg: #e0e0e0;
    --code-bg: #2a2a2a;
    --border: #444;
    --accent: #66aaff;
    --subtle: #999;
  }
}

/* ── Reset & Base ── */
* { box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
  background: var(--bg);
  color: var(--fg);
}

/* ── Typography ── */
h1 { font-size: 2rem; margin-bottom: 0.25rem; }
h2 { margin-top: 2.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
h3 { margin-top: 1.5rem; }

.subtitle { color: var(--subtle); margin-top: 0; font-size: 1.1rem; }

a { color: var(--accent); }

/* ── Code ── */

/* Inline code: small snippets within text */
code, .code-inline {
  font-family: var(--mono-font-inline);
  font-size: 0.9em;
}

/* Code blocks: standalone, multi-line code */
pre, .code-block {
  background: var(--code-bg);
  padding: 1rem;
  border-radius: 6px;
  font-family: var(--mono-font);
  font-size: 0.85rem;
  line-height: 1.4;
  overflow-x: auto;
}

/* Reset inline styles when code is inside a block */
pre code, .code-block code {
  background: none;
  padding: 0;
  font-size: inherit;
  border-radius: 0;
}

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--code-bg);
  font-weight: 600;
}

/* ── Navigation ── */
nav {
  margin: 1rem 0 1.5rem 0;
  font-size: 0.95rem;
}

nav a {
  text-decoration: none;
}

/* ── Footer ── */
footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--subtle);
}

/* ── Utility Classes ── */
.principle {
  background: var(--code-bg);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 1.1rem;
}

.code-pair {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  align-items: stretch;
}

.code-pair pre {
  margin: 0;
  flex: 1 1 50%;
  overflow: visible;
}

/* ── Header Branding ── */
.brand {
  margin: 0;
  font-size: 1.1rem;
}

.brand a {
  text-decoration: none;
  font-weight: 600;
}
