/* Kindred legal pages. System fonts only; no external resources (CSP default-src 'self'). */
:root {
  --bg: #ffffff;
  --text: #1f1a1d;
  --muted: #5c5258;
  --brand: #a8352c;      /* coral, darkened for 6:1 contrast on white */
  --brand-2: #6b3a5e;    /* plum */
  --border: #e4dde1;
  --surface: #f8f4f6;
  --mark: #fff1b8;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17131a;
    --text: #f2ecef;
    --muted: #c3b8bf;
    --brand: #ff9b8f;
    --brand-2: #e3b4d6;
    --border: #3a3139;
    --surface: #221c24;
    --mark: #5a4a12;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--brand-2);
  color: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; }

.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-2);
  text-decoration: none;
}
.site-header ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
}
.site-header a[aria-current="page"] { font-weight: 700; text-decoration-thickness: 2px; }

main { padding-top: 1.5rem; padding-bottom: 3rem; }

h1, h2, h3, h4 { line-height: 1.25; margin: 2rem 0 0.75rem; }
h1 { font-size: 1.9rem; margin-top: 0.5rem; color: var(--brand-2); }
h2 { font-size: 1.45rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }

p, ul, ol, .table-wrap, blockquote, pre { margin: 0 0 1rem; }
ul, ol { padding-left: 1.5rem; }
li { margin: 0.3rem 0; }
li > ul, li > ol { margin: 0.3rem 0 0; }

a { color: var(--brand); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, .skip-link:focus { outline: 3px solid var(--brand-2); outline-offset: 2px; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--surface);
  padding: 0.05em 0.3em;
  border-radius: 0.25rem;
  overflow-wrap: anywhere;
}
pre { background: var(--surface); padding: 0.75rem; overflow-x: auto; border-radius: 0.375rem; }
pre code { padding: 0; background: none; }

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

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--border);
  overflow-wrap: anywhere;
}
thead th { background: var(--surface); }
tbody th { font-weight: 600; background: var(--surface); }
@media (min-width: 40rem) {
  th, td { overflow-wrap: break-word; }
}

mark.placeholder { background: var(--mark); color: inherit; padding: 0 0.15em; }

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
  padding: 1rem 0;
}
.site-footer p { margin: 0.25rem 0; }
.site-footer a { color: inherit; }

/* A rule above the first section already separates it from the dates. */
hr + h2 { border-top: 0; padding-top: 0; }

/* Phones: one-line menu, labels above values, table rows as cards (approved mock-up, 2026-12-02). */
@media (max-width: 40rem) {
  body { font-size: 1rem; line-height: 1.55; }
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.25rem; }
  .site-header .wrap { flex-direction: column; align-items: flex-start; gap: 0.35rem; padding-top: 0.6rem; padding-bottom: 0.6rem; }
  .site-header ul { flex-wrap: nowrap; gap: 0 0.85rem; font-size: 0.92rem; white-space: nowrap; }
  th, td { overflow-wrap: normal; word-break: normal; hyphens: none; }
  /* Two-column "label | value" tables: label above value. */
  table:not(:has(thead)) tr { display: block; border-bottom: 1px solid var(--border); }
  table:not(:has(thead)) th, table:not(:has(thead)) td { display: block; width: 100%; border: 0; }
  table:not(:has(thead)) th { padding-bottom: 0; }
  /* Tables with column headings: one card per row, each value under its heading. */
  table:has(thead) thead { position: absolute; left: -9999px; }
  table:has(thead) tr { display: block; border: 1px solid var(--border); border-radius: 0.5rem; margin-bottom: 0.75rem; padding: 0.25rem 0; }
  table:has(thead) td, table:has(thead) tbody th { display: block; border: 0; background: none; padding: 0.3rem 0.75rem; }
  table:has(thead) [data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }
}
