/* Lomax Lead Notifications — documentation pages.
   One stylesheet, no fonts or assets fetched from anywhere else, so the
   Content-Security-Policy in _headers can forbid every external origin. */

:root {
  --ink: #16181c;
  --muted: #53586b;
  --line: #dcdfe6;
  --bg: #ffffff;
  --band: #f5f6f9;
  --accent: #0b5d3b;
  --callout-bg: #eef4ff;
  --callout-line: #2b5bb5;

  /* One content width and one gutter, shared by every block on every page.
     Nothing else sets a max-width, so headings, paragraphs, lists and callouts
     all start and end on the same two lines. */
  --measure: 40rem;
  --gutter: 1.5rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8eaf0;
    --muted: #a7adc0;
    --line: #333845;
    --bg: #14161a;
    --band: #1b1e25;
    --accent: #6fd3a3;
    --callout-bg: #182439;
    --callout-line: #7aa6f0;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  /* A long URL or email address wraps rather than widening the page. */
  overflow-wrap: break-word;
}

/* ---------------------------------------------------------------- layout
   The three page regions are full-width (so .band keeps its edge-to-edge
   background) and each lays its children out in a single centered column.
   Placement is done by the grid, not by auto margins on the children.

   That distinction is the whole fix. The previous rule centered each child
   individually with `margin-inline: auto`, which any later rule using the
   `margin` shorthand silently cancelled — `.eyebrow { margin: 0 0 .35rem }`
   and `.lede { margin: 0 }` did exactly that, so those two sat hard left
   while `h1` and every <section>, which set no margin of their own, stayed
   centered. Children can set whatever margins they like now without
   affecting where the column is. */
.band,
main,
footer {
  display: grid;
  grid-template-columns:
    [full-start] minmax(var(--gutter), 1fr)
    [content-start] minmax(0, var(--measure)) [content-end]
    minmax(var(--gutter), 1fr) [full-end];
}

.band > *,
main > *,
footer > * {
  grid-column: content;
  min-width: 0;        /* long content shrinks instead of widening the column */
}

/* Keyboard users get to the content without walking the header. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: .7rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0; }

.band {
  background: var(--band);
  border-bottom: 1px solid var(--line);
  padding-block: 2.5rem 2rem;
}

.eyebrow {
  margin: 0 0 .35rem;
  font-size: .8rem;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 { margin: 0 0 .6rem; font-size: 1.95rem; line-height: 1.2; }
h2 { margin: 2.4rem 0 .6rem; font-size: 1.25rem; }
h3 { margin: 1.5rem 0 .35rem; font-size: 1.02rem; color: var(--muted); }

.lede { margin: 0; font-size: 1.07rem; color: var(--muted); }

main { padding-block: 0 1rem; }
main > section { padding-bottom: .4rem; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
/* Visible focus for every interactive element, not just on hover. */
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

code {
  font: .92em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--band);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: .06em .32em;
}

dl { margin: .8rem 0 0; }
dt { margin-top: 1rem; }
dd { margin: .2rem 0 0 1.25rem; }

ul.plain { list-style: none; padding-left: 0; }
ul.plain li { margin-bottom: .3rem; }

.callout {
  background: var(--callout-bg);
  border-left: 4px solid var(--callout-line);
  padding: .75rem .9rem;
  margin: 1.1rem 0;
}

.small { font-size: .9rem; color: var(--muted); }

footer {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding-block: 1.5rem 3rem;
  font-size: .93rem;
  color: var(--muted);
}

/* Phones: a tighter gutter buys back reading width, and the display heading
   stops dominating a small screen. The content column needs no breakpoint of
   its own — minmax() already lets it shrink to whatever is left. */
@media (max-width: 34rem) {
  :root { --gutter: 1.15rem; }
  .band { padding-block: 1.75rem 1.5rem; }
  h1 { font-size: 1.6rem; }
  h2 { margin-top: 2rem; }
  body { font-size: 16px; }
}
