/* dzimplei public site — the one stylesheet every page links.
 *
 * Static host, no build step, so this is hand-written and stays that way.
 *
 * THE COLUMN IS THE LAYOUT. Text was previously laid out inside a 68rem
 * container while each element capped its own measure at ~46ch. Everything
 * started at the left edge and stopped 500-750px short of the right, so the
 * page read as pushed into a corner rather than centered — the container was
 * centered but its contents were not. The reading column is now the container
 * (--measure), centered in the viewport, and wide layouts opt OUT of it with
 * .wide. A measure is for reading; a grid is for scanning; they are not the
 * same width and should not share one wrapper.
 *
 * One family for the interface, one for anything that is literally typed.
 * Both declared as tokens so a third cannot creep in unnoticed. */
:root {
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  /* Four sizes, four roles: hero, headline, body, label. No fifth. */
  --hero: clamp(2rem, 1.2rem + 3.6vw, 3.25rem);
  --headline: clamp(1.25rem, 1.05rem + 0.9vw, 1.6rem);
  --body: 1.0625rem;
  --label: 0.8125rem;

  /* Spacing scale, multiples of 4. */
  --s1: 4px;  --s2: 8px;  --s3: 16px; --s4: 24px;
  --s5: 32px; --s6: 48px; --s7: 72px; --s8: 112px;

  /* The reading column, and the wide column for grids. */
  --measure: 44rem;
  --wide: 68rem;

  /* Neutral base, exactly one accent — the app's own --color-accent. */
  --bg: #eef3fb;
  --surface: #ffffff;
  --ink: #0d1117;
  --ink-soft: #4a5568;
  --line: #d9e2f0;
  --accent: #2b5cff;
  --accent-ink: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111; --surface: #181a1f; --ink: #f2f4f8;
    --ink-soft: #a8b2c1; --line: #2a2f37; --accent: #6f95ff; --accent-ink: #0d1117;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ui);
  font-size: var(--body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* The reading column. Content never touches the container edge. */
.wrap { width: 100%; max-width: var(--measure); margin-inline: auto; padding-inline: var(--s4); }
/* Opt out of the reading column for anything that scans rather than reads. */
.wide { max-width: var(--wide); }

a { color: inherit; }
a:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px;
}

header { padding-block: var(--s4); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); text-decoration: none; font-weight: 650; }
.brand img { width: 28px; height: 28px; display: block; }

/* Hero. Centered like the reference marketing pages: the one block on the
   page where centring reads as deliberate rather than as a mistake. */
.hero { padding-block: var(--s7) var(--s6); text-align: center; }
h1 {
  font-size: var(--hero); line-height: 1.1; letter-spacing: -0.02em;
  font-weight: 700; margin: 0 auto var(--s4); max-width: 22ch;
}
.lede {
  font-size: var(--headline); line-height: 1.45; color: var(--ink-soft);
  margin: 0 auto var(--s5); max-width: 44ch;
}
.hero .actions { justify-content: center; }

.actions { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  text-decoration: none; font-weight: 600; border: 1px solid transparent;
  min-height: 44px; line-height: 1.5;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { border-color: var(--line); background: var(--surface); color: var(--ink); }

section { padding-block: var(--s6); border-top: 1px solid var(--line); }
h2 {
  font-size: var(--headline); line-height: 1.3; margin: 0 0 var(--s4);
  max-width: 34ch; letter-spacing: -0.01em;
}

/* Cards. Three peers, never more per row. minmax so a card shrinks instead of
   pushing the page into horizontal scroll. */
.cards { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: var(--s4); }
.card h3 { margin: 0 0 var(--s2); font-size: var(--body); font-weight: 650; }
.card p { margin: 0; color: var(--ink-soft); }
a.card { text-decoration: none; display: block; }
a.card:hover { border-color: var(--accent); }

.label { font-size: var(--label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 var(--s2); }

.chat { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: var(--s4); }
.msg { font-family: var(--mono); font-size: var(--label); line-height: 1.7; margin: 0; white-space: pre-wrap; word-break: break-word; }
.msg + .msg { margin-top: var(--s3); padding-top: var(--s3); border-top: 1px solid var(--line); }
.who { color: var(--accent); font-weight: 700; }

/* Breadcrumb. Label size because it orients, it does not inform. */
.crumb { font-size: var(--label); color: var(--ink-soft); padding-block: var(--s4) 0; margin: 0; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

/* Body prose. No max-width of its own: the column already is the measure, and
   a second cap inside it is what pushed every paragraph left of centre. */
.prose { color: var(--ink-soft); }
.prose p { margin: 0 0 var(--s3); }
.prose p:last-child { margin-bottom: 0; }
.prose ul { margin: 0 0 var(--s3); padding-left: 1.15em; }
.prose li { margin-bottom: var(--s2); }
.prose li:last-child { margin-bottom: 0; }
.prose strong { color: var(--ink); font-weight: 650; }

/* "On this page". A short contents list is what makes a long answer feel
   navigable, and it is how the reference docs page opens. */
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: var(--s4); }
.toc h2 { font-size: var(--label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 var(--s3); }
.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin-bottom: var(--s2); }
.toc li:last-child { margin-bottom: 0; }

/* The constraint that keeps a feature honest — the thing it deliberately
   will not do. Accent edge because it is the sentence people quote back. */
.note {
  border-left: 3px solid var(--accent);
  padding: var(--s1) 0 var(--s1) var(--s4);
  margin: var(--s4) 0 0; color: var(--ink-soft);
}

/* FAQ. Real questions people type into a search box, which is why they are
   headings and not an accordion: an answer hidden behind a click is an answer
   a crawler and a hurried reader both skip. */
.faq { margin: 0; }
.faq dt { font-weight: 650; margin: 0 0 var(--s2); }
.faq dd { margin: 0 0 var(--s4); color: var(--ink-soft); }
.faq dd:last-child { margin-bottom: 0; }

footer { border-top: 1px solid var(--line); padding-block: var(--s5) var(--s6); color: var(--ink-soft); }
footer p { margin: 0; font-size: var(--label); }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
