/* exhibitproof.com — the one stylesheet. Token names follow /Users/Shared/reusable/PortableThemes/html-css/theme.css.
   Light and dark follow the visitor's system setting. Document blocks use the md-* classes from
   webui/templates/_marketing_blocks.html (the same renderer the app uses). */

:root {
  color-scheme: light dark;
  --font-display: "Fraunces", Georgia, "Iowan Old Style", serif;
  --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-code: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --bg: #f4f1ea;          /* paper */
  --surface: #fbfaf6;
  --surface-2: #ffffff;
  --ink: #1b1f2a;         /* ink */
  --ink-muted: #4a5163;
  --ink-faint: #6b7183;
  --rule: #d8d2c4;
  --accent: #8a2c22;      /* seal red */
  --accent-ink: #fdf8f3;
  --accent-soft: #f1e1db;
  --focus: #2f5f8f;
  --shadow: 0 1px 2px rgba(27, 31, 42, 0.05), 0 10px 30px rgba(27, 31, 42, 0.07);

  --radius-s: 4px;
  --radius-m: 10px;
  --wrap: 1080px;
  --prose: 46rem;
  --gutter: clamp(16px, 4vw, 40px);
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161c;
    --surface: #1a1d25;
    --surface-2: #20242e;
    --ink: #ebe7de;
    --ink-muted: #b0b3bd;
    --ink-faint: #8a8e99;
    --rule: #2f3340;
    --accent: #e0806f;
    --accent-ink: #1a0f0c;
    --accent-soft: #3a2420;
    --focus: #8bb8e8;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font-body);
  overflow-wrap: break-word;
}

a { color: inherit; text-underline-offset: 0.2em; }
a:focus-visible, .button:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link { position: absolute; left: -999px; top: 0; }
.skip-link:focus { left: var(--space-2); top: var(--space-2); background: var(--surface-2); padding: var(--space-1); z-index: 10; }

/* ── Brand, header, nav ──────────────────────────────────────────────── */
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font: 650 1.2rem/1 var(--font-display); letter-spacing: -0.01em; text-decoration: none;
}
.brand-mark {
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  border: 2px solid var(--accent);
  box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 10px var(--accent);
}

.site-header { border-bottom: 1px solid var(--rule); background: var(--surface); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 4rem; flex-wrap: wrap; padding-top: 0.6rem; padding-bottom: 0.6rem; }
.site-nav { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; font-weight: 500; font-size: 0.95rem; }
.site-nav a:not(.button) { text-decoration: none; color: var(--ink-muted); }
.site-nav a:not(.button):hover, .site-nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* ── Buttons and links ───────────────────────────────────────────────── */
.button {
  display: inline-block; padding: 0.8rem 1.3rem; border-radius: var(--radius-s);
  background: var(--accent); color: var(--accent-ink);
  font-weight: 600; text-decoration: none; line-height: 1.2;
}
.button:hover { filter: brightness(1.08); }
.button--small { padding: 0.55rem 0.95rem; font-size: 0.9rem; }
.text-link { font-weight: 600; color: var(--accent); }

/* ── Page hero ───────────────────────────────────────────────────────── */
.page-hero { padding: var(--space-5) 0 var(--space-4); border-bottom: 1px solid var(--rule); }
.page-hero--home { padding-top: clamp(4rem, 10vw, 7rem); }
.kicker {
  margin: 0 0 var(--space-2); color: var(--accent);
  font: 400 0.8rem/1 var(--font-code); letter-spacing: 0.12em; text-transform: uppercase;
}
.page-hero h1 {
  margin: 0; max-width: 18ch;
  font: 650 clamp(2.2rem, 5.5vw, 3.8rem)/1.05 var(--font-display); letter-spacing: -0.02em;
}
.page-hero--home h1 { max-width: 15ch; font-size: clamp(2.6rem, 7vw, 4.8rem); }
.lede { max-width: 40rem; margin: var(--space-3) 0 0; font-size: 1.2rem; color: var(--ink-muted); }
.hero-actions { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-4); }

/* ── Document body (md-* blocks) ─────────────────────────────────────── */
.doc { padding-top: var(--space-4); padding-bottom: var(--space-5); }
.doc > h2, .doc > p, .doc > ul, .doc > ol, .doc > .md-callout, .doc > .md-fine { max-width: var(--prose); }
.doc h2 {
  margin: var(--space-5) 0 var(--space-2);
  font: 650 1.7rem/1.2 var(--font-display); letter-spacing: -0.01em;
}
.doc > h2:first-child { margin-top: var(--space-3); }
.doc h3 { margin: var(--space-3) 0 var(--space-1); font-size: 1rem; }
.doc ul { padding-left: 1.2rem; }
.doc li { margin: 0.35rem 0; }
.doc li::marker { color: var(--accent); }

.md-steps { counter-reset: step; list-style: none; padding: 0; }
.md-steps li { counter-increment: step; position: relative; padding-left: 2.6rem; margin: 0.8rem 0; }
.md-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0.1rem;
  width: 1.8rem; height: 1.8rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font: 600 0.9rem/1 var(--font-body);
}

.md-table-wrap { overflow-x: auto; margin: var(--space-2) 0 var(--space-3); border: 1px solid var(--rule); border-radius: var(--radius-m); background: var(--surface-2); box-shadow: var(--shadow); }
.md-table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
.md-table-wrap th, .md-table-wrap td { text-align: left; vertical-align: top; padding: 0.8rem 1rem; border-bottom: 1px solid var(--rule); }
.md-table-wrap tbody tr:last-child td { border-bottom: 0; }
.md-table-wrap thead th { font: 400 0.75rem/1.3 var(--font-code); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); background: var(--surface); }
.md-table-wrap td:first-child { font-weight: 600; min-width: 11rem; }
.md-table-wrap td:last-child:not(:first-child) { white-space: normal; }

.md-callout {
  margin: var(--space-3) 0; padding: var(--space-2) var(--space-3);
  border-left: 3px solid var(--accent); background: var(--accent-soft); border-radius: 0 var(--radius-s) var(--radius-s) 0;
  font-family: var(--font-display); font-size: 1.15rem; line-height: 1.5;
}

.md-contact {
  margin: var(--space-5) 0 var(--space-4); padding: var(--space-4) var(--space-3);
  background: var(--surface-2); border: 1px solid var(--rule); border-radius: var(--radius-m); box-shadow: var(--shadow);
}
.md-contact h2 { margin-top: 0; }
.md-contact > div { color: var(--ink-muted); }
.md-contact .button { margin-top: var(--space-2); }

.md-fine, .fine-print { font-size: 0.85rem; color: var(--ink-faint); line-height: 1.55; }

.md-glossary { margin-top: var(--space-5); padding-top: var(--space-3); border-top: 1px solid var(--rule); max-width: var(--prose); }
.md-glossary h2 { font-size: 1.3rem; }
.md-glossary h3 { font: 400 0.75rem/1.3 var(--font-code); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-top: var(--space-3); }
.md-glossary dl { margin: 0; }
.md-glossary dt { font-weight: 600; margin-top: var(--space-2); }
.md-glossary dd { margin: 0.2rem 0 0; color: var(--ink-muted); font-size: 0.95rem; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--rule); background: var(--surface); padding: var(--space-4) 0 var(--space-3); font-size: 0.95rem; }
.footer-grid { display: flex; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.footer-grid p { margin: 0.3rem 0; }
.footer-grid nav { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.footer-grid nav a { color: var(--ink-muted); }
.brand--footer { margin-bottom: var(--space-1); }

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .site-nav { gap: var(--space-2); }
  .md-table-wrap td:first-child { min-width: 8rem; }
}
