/* myChap legal pages — shared styles */

:root {
  --ink: #1A1D26;
  --ink-soft: #4A5162;
  --deep: #102A6E;
  --blue: #1E4BC8;
  --teal: #0FA891;
  --rule: #E3E6ED;
  --wash: #F6F8FB;
  --warn-bg: #FFF8E8;
  --warn-rule: #C98A0E;
  --page: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E8EBF2;
    --ink-soft: #A3ABBD;
    --deep: #9DB4F5;
    --blue: #8FA9F2;
    --teal: #4FCFB6;
    --rule: #2A3040;
    --wash: #1A1F2B;
    --warn-bg: #2A2413;
    --warn-rule: #D9A93F;
    --page: #12151D;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  font-feature-settings: "liga" 1;
}

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

/* ---- masthead ---- */

.mast {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
}

.brand {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--deep);
  text-decoration: none;
  display: inline-block;
}

.brand span { color: var(--teal); font-weight: 500; }

h1 {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--deep);
  margin: 1.25rem 0 0.75rem;
}

.meta {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}

/* ---- headings ---- */

h2 {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 1.3125rem;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--deep);
  margin: 3rem 0 0.75rem;
}

h3 {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--ink);
  margin: 2rem 0 0.5rem;
}

h2 + .plain, h1 + .plain { margin-top: 1rem; }

p { margin: 0 0 1.1rem; }

a { color: var(--blue); text-decoration: underline; text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; border-radius: 2px; }

strong { font-weight: 600; }

ul, ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
li { margin-bottom: 0.5rem; }

/* ---- the one structural device: plain-English summary ---- */

.plain {
  border-left: 3px solid var(--teal);
  padding: 0.1rem 0 0.1rem 1.1rem;
  margin: 0 0 1.5rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.plain p { margin-bottom: 0.6rem; }
.plain p:last-child { margin-bottom: 0; }
.plain b { color: var(--ink); font-weight: 600; }

/* ---- callout for legally important carve-outs ---- */

.note {
  background: var(--warn-bg);
  border-left: 3px solid var(--warn-rule);
  padding: 1rem 1.2rem;
  margin: 0 0 1.5rem;
  font-size: 0.9875rem;
}
.note p:last-child { margin-bottom: 0; }

/* ---- tables ---- */

.scroll { overflow-x: auto; margin: 0 0 1.5rem; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 30rem;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.875rem;
  line-height: 1.55;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}

th {
  font-weight: 600;
  color: var(--deep);
  border-bottom: 2px solid var(--rule);
}

/* ---- contact block ---- */

.contact {
  background: var(--wash);
  padding: 1.4rem 1.5rem;
  margin: 1.5rem 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.7;
}
.contact p { margin-bottom: 0.7rem; }
.contact p:last-child { margin-bottom: 0; }

/* ---- index cards ---- */

.docs { margin: 2.5rem 0 0; padding: 0; list-style: none; }
.docs li { border-top: 1px solid var(--rule); margin: 0; }
.docs li:last-child { border-bottom: 1px solid var(--rule); }
.docs a {
  display: block;
  padding: 1.25rem 0;
  text-decoration: none;
  color: inherit;
}
.docs a:hover .docs-title { color: var(--blue); text-decoration: underline; }
.docs-title {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--deep);
  display: block;
  margin-bottom: 0.2rem;
}
.docs-desc { color: var(--ink-soft); font-size: 0.9375rem; }

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

footer {
  margin-top: 4rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  line-height: 1.7;
}

footer a { color: var(--ink-soft); }

.footnav { margin-bottom: 0.9rem; }
.footnav a { margin-right: 1.1rem; display: inline-block; }

@media (max-width: 34rem) {
  .wrap { padding: 2rem 1.15rem 4rem; }
  body { font-size: 1rem; }
}
