/*
 * Styles for the published legal documents.
 * Linked from src/index.html; Vite hashes it into dist/<target>/assets/.
 */

:root {
  --bg: #ffffff;
  --fg: #1a1d21;
  --muted: #5c6672;
  --line: #e3e7ec;
  --accent: #0a7d55;
  --quote: #f5f7f9;
  --code: #f0f2f5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171a;
    --fg: #e6e9ec;
    --muted: #9aa4b0;
    --line: #2a2f35;
    --accent: #4ec99a;
    --quote: #1c2024;
    --code: #22272c;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-size: 17px;
  line-height: 1.65;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 5rem;
}

/* -------------------------------------------------------------- document head */

header.doc {
  border-bottom: 1px solid var(--line);
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

header.doc h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
}

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

.meta .sep {
  opacity: 0.5;
  padding: 0 0.4rem;
}

/* What changed in this version, in one sentence, for the end user. */
.summary {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 0.92rem;
  background: var(--quote);
  border-radius: 6px;
  color: var(--muted);
}

/* ------------------------------------------------------- rendered markdown body */

h2 {
  font-size: 1.35rem;
  margin: 2.5rem 0 0.75rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.1rem;
  margin: 2rem 0 0.5rem;
}

h4 {
  font-size: 1rem;
  margin: 1.5rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.4rem;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

strong {
  font-weight: 650;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

code {
  background: var(--code);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  font-size: 0.88em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

blockquote {
  margin: 1.25rem 0;
  padding: 0.85rem 1.1rem;
  background: var(--quote);
  border-left: 3px solid var(--accent);
  border-radius: 0 6px 6px 0;
}

blockquote > :last-child {
  margin-bottom: 0;
}

/* Wide tables scroll inside themselves instead of pushing the page sideways. */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.93rem;
  display: block;
  overflow-x: auto;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.5rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--quote);
  font-weight: 650;
}

/* -------------------------------------------------------------------- footer */

footer.doc {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

footer.doc a {
  color: var(--muted);
}

footer.doc p {
  margin: 0 0 0.4rem;
}

/* ---------------------------------------------------------------------- print */

@media print {
  :root {
    --bg: #ffffff;
    --fg: #000000;
    --muted: #444444;
    --line: #cccccc;
    --quote: #f4f4f4;
  }

  .wrap {
    max-width: none;
    padding: 0;
  }

  .noprint {
    display: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }
}
