/* ============================================================
   COMMON.CSS
   Design tokens, resets, typography, buttons and shared
   components used across every page (footer included).
   ============================================================ */

:root {
  --paper: #ffffff;
  --ink: #000000;
  --ink-body: #1a1a1a;
  --ink-soft: #555555;
  --band: #f4f4f4;
  --rule: #e2e2e2;
  --rule-strong: #000000;
  --hero: #000000;
  --hero-ink: #ffffff;
  --hero-soft: #b5b5b5;
  --ph-border: #9a9a9a;
  --ph-bg: #fafafa;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0e0e0e;
    --ink: #ffffff;
    --ink-body: #e8e8e8;
    --ink-soft: #a3a3a3;
    --band: #181818;
    --rule: #2e2e2e;
    --rule-strong: #ffffff;
    --hero: #000000;
    --hero-ink: #ffffff;
    --hero-soft: #b5b5b5;
    --ph-border: #5a5a5a;
    --ph-bg: #141414;
  }
}
:root[data-theme="dark"] {
  --paper: #0e0e0e;
  --ink: #ffffff;
  --ink-body: #e8e8e8;
  --ink-soft: #a3a3a3;
  --band: #181818;
  --rule: #2e2e2e;
  --rule-strong: #ffffff;
  --hero: #000000;
  --hero-ink: #ffffff;
  --hero-soft: #b5b5b5;
  --ph-border: #5a5a5a;
  --ph-bg: #141414;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-body);
  font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, 'Segoe UI', sans-serif;
  font-size: 17.5px;
  line-height: 1.65;
}
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 1.4rem; }
.narrow { max-width: 740px; }

/* ---------- Placeholder ---------- */
.ph {
  border: 1.5px dashed var(--ph-border);
  background: var(--ph-bg);
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--ink-soft);
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.5; padding: 1rem;
}

/* ---------- Type ---------- */
h1, h2, h3, .u { font-family: 'Ubuntu', 'Segoe UI', sans-serif; color: var(--ink); }
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-soft); margin: 0 0 1rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 1rem;
  padding: 0.85rem 1.6rem; border: 2px solid transparent; font-family: 'Source Sans 3', sans-serif;
}
.btn-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn-dark:hover { background: var(--paper); color: var(--ink); }

/* ---------- Shared section components ---------- */
h2.section-title { font-weight: 700; font-size: 2.1rem; line-height: 1.15; margin: 0 0 2rem; letter-spacing: -0.01em; }
.diagram { margin: 1.6rem 0; }
.fig-panel { background: #ffffff; border: 1px solid var(--rule); padding: 1.2rem; margin: 1.4rem 0; }
.fig-panel img { width: 100%; height: auto; display: block; }
.fig-panel.narrow-fig { max-width: 540px; }
.diagram svg { max-width: 100%; height: auto; display: block; }
.cred-strip { display: flex; flex-wrap: wrap; gap: 0.5rem 2.4rem; padding: 1.2rem 0; border-top: 2px solid var(--rule-strong); border-bottom: 2px solid var(--rule-strong); margin: 2.5rem 0 1rem; font-size: 0.84rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }

.prose p { margin: 0.85rem 0; }
.prose h2:not(.section-title), .prose h3 { font-weight: 700; font-size: 1.35rem; margin: 2.2rem 0 0.5rem; }
.page-head { padding: 4rem .75rem 0.5rem; }
.page-head h1 { font-weight: 700; font-size: clamp(2rem, 4vw, 2.9rem); line-height: 1.1; margin: 0 0 0.8rem; letter-spacing: -0.01em; }
.page-head p.lead { font-size: 1.15rem; color: var(--ink-soft); margin: 0; }
.page-head::before { content: ""; display: block; width: 64px; border-top: 5px solid var(--rule-strong); margin-bottom: 1.6rem; }
.page-body { padding: 1.5rem .75rem 4.5rem; }

.callout {
  background: var(--band); border-left: 4px solid var(--rule-strong);
  padding: 1.2rem 1.5rem; margin: 1.8rem 0;
}
.callout p { margin: 0.3rem 0; }

.cta-band { background: var(--hero); color: var(--hero-ink); padding: 3.8rem 0; }
.cta-band h2 { font-weight: 700; font-size: 2rem; margin: 0 0 0.8rem; color: var(--hero-ink); }
.cta-band p { color: var(--hero-soft); max-width: 42rem; margin: 0 0 1.7rem; font-size: 1.05rem; }

/* ---------- Footer ---------- */
footer { border-top: 2px solid var(--rule-strong); padding: 2.8rem 0 3.2rem; color: var(--ink-soft); font-size: 0.95rem; }
.footer-grid { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
footer address { font-style: normal; line-height: 1.7; }
.footnote { margin-top: 1.8rem; font-size: 0.85rem; }
