/* /agent and /legal: static HTML, no scripts, the splash's ground and ink, system fonts. */
:root {
  --ground: #FAFAF9;
  --ink: #191714;
  --muted: rgba(25, 23, 20, 0.62);
  --code: rgba(25, 23, 20, 0.05);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0E0F10;
    --ink: #F4F1EA;
    --muted: rgba(244, 241, 234, 0.64);
    --code: rgba(244, 241, 234, 0.07);
  }
}

html { background: var(--ground); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
}
.page {
  box-sizing: border-box;
  max-width: 44rem;
  margin: 0 auto;
  padding: max(2.5rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}

.home { display: inline-block; color: var(--ink); line-height: 0; }
.home svg { height: 1.25rem; width: auto; fill: currentColor; }

main { margin-top: 3rem; }
h1 { margin: 0; font-size: 2rem; line-height: 1.2; font-weight: 650; letter-spacing: -0.01em; }
.updated { margin: 0.5rem 0 2rem; color: var(--muted); font-size: 0.9375rem; }
p { margin: 0.75rem 0; }

a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 2px; }

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; font-size: 0.875em; }
code { background: var(--code); border-radius: 4px; padding: 0.1em 0.3em; overflow-wrap: anywhere; }
pre { background: var(--code); border-radius: 8px; padding: 0.875rem 1rem; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; overflow-wrap: normal; font-size: inherit; }

/* /legal: long documents, with the headings, bold and numbered lists their sources have. Sizes are in em so they
   follow the body, which is larger on /legal/hipaa. */
.legal main { overflow-wrap: break-word; }
h2 { margin: 2.25em 0 0.5em; font-size: 1.1875em; line-height: 1.3; font-weight: 650; scroll-margin-top: 1rem; }
h3 { margin: 1em 0 0.5em; font-size: 1.0625em; line-height: 1.3; font-weight: 650; }
strong { font-weight: 650; }
ul, ol { margin: 0.75rem 0; padding-left: 1.5em; }
li { margin: 0.4em 0; padding-left: 0.25em; }

/* /legal/hipaa: an authorization is set at 14 points or larger. */
.hipaa { font-size: 14pt; }
.hipaa li { margin: 0.6em 0; }

/* Printing and saving as PDF: black on white whatever the screen's theme, the page's margins instead of the screen's
   padding, no heading or last list item left alone at a page break, and no list item split across pages. */
@page { margin: 18mm 16mm; }
@media print {
  :root { --ground: #fff; --ink: #000; --muted: #444; --code: transparent; color-scheme: light; }
  body { line-height: 1.5; }
  .page { max-width: none; padding: 0 1px; }
  main { margin-top: 1.5rem; }
  h1, h2, h3 { break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  li { break-inside: avoid; }
  li:last-child { break-before: avoid; }
  .hipaa li { margin: 0.4em 0; }
  pre { white-space: pre-wrap; }
}
