/* CareCircle legal site — one stylesheet, no external requests, no trackers.
   The privacy policy claims this site sets no cookies and loads nothing from a
   third party, so it must not quietly pull a webfont or an analytics tag. */

:root {
  --bg: #fdfbf8;
  --surface: #ffffff;
  --border: #e6ded4;
  --text: #2c2622;
  --muted: #6b6058;
  --brand: #0f766e;
  --brand-soft: #e6f2f0;
  --warn-bg: #fff6ec;
  --warn-border: #e5b887;
  --warn-text: #7a4a12;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17140f;
    --surface: #201c17;
    --border: #38312a;
    --text: #ece5dc;
    --muted: #a89c90;
    --brand: #5fc9bd;
    --brand-soft: #17332f;
    --warn-bg: #2d2114;
    --warn-border: #7a5a2c;
    --warn-text: #f0c58a;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

/* Header ------------------------------------------------------------------ */

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 2.5rem;
}

header.site .wrap {
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.brand .mark {
  width: 1.9rem;
  height: 1.9rem;
  border-radius: 0.6rem;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
}

@media (prefers-color-scheme: dark) {
  .brand .mark { color: #10201e; }
}

nav.site a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  margin-left: 1.25rem;
}

nav.site a:first-child { margin-left: 0; }
nav.site a:hover, nav.site a[aria-current="page"] { color: var(--brand); }

/* Typography -------------------------------------------------------------- */

h1 {
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

h3 {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.5rem;
}

p, li { margin: 0 0 0.9rem; }

ul, ol { padding-left: 1.35rem; }

li { margin-bottom: 0.5rem; }

a { color: var(--brand); }

strong { font-weight: 650; }

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

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

/* Secondary label inside a table cell — e.g. what a provider is used for. */
.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

/* Blocks ------------------------------------------------------------------ */

.callout {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 0.75rem;
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0 2rem;
  color: var(--warn-text);
}

.callout p:last-child, .card p:last-child, .card ul:last-child { margin-bottom: 0; }

.callout strong { color: inherit; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.1rem 1.25rem;
  margin: 1.5rem 0;
}

.summary {
  background: var(--brand-soft);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.1rem 1.25rem 0.6rem;
  margin: 0 0 2rem;
}

.summary h2 {
  border: 0;
  padding: 0;
  margin: 0 0 0.6rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Table of contents ------------------------------------------------------- */

.toc { margin: 0 0 2.5rem; }

.toc ol {
  columns: 2;
  column-gap: 2rem;
  font-size: 0.95rem;
  padding-left: 1.2rem;
}

.toc li { margin-bottom: 0.35rem; break-inside: avoid; }

@media (max-width: 34rem) {
  .toc ol { columns: 1; }
}

/* Data table -------------------------------------------------------------- */

.table-scroll { overflow-x: auto; margin: 1.25rem 0 1.75rem; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 30rem;
  font-size: 0.95rem;
}

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

th {
  font-weight: 650;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Home page cards --------------------------------------------------------- */

.doc-links {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin: 2rem 0;
  padding: 0;
  list-style: none;
}

.doc-links li { margin: 0; }

.doc-links a {
  display: block;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.15rem 1.25rem;
  text-decoration: none;
  color: var(--text);
}

.doc-links a:hover { border-color: var(--brand); }

.doc-links strong { display: block; margin-bottom: 0.25rem; color: var(--brand); }

.doc-links span { font-size: 0.95rem; color: var(--muted); }

/* Footer ------------------------------------------------------------------ */

footer.site {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

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

/* Print ------------------------------------------------------------------- */

@media print {
  header.site nav, .toc { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  h2 { page-break-after: avoid; }
}
