/* Shared styles for the Care Circles legal pages. No build step: edit and deploy. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --surface: #f6f3fb;
  --text: #1d1a24;
  --text-muted: #5b5568;
  --border: #e2dcec;
  --accent: #6b30cc;
  --accent-contrast: #ffffff;
  --placeholder-bg: #fff3c4;
  --placeholder-text: #5c4300;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 44rem;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14121a;
    --surface: #1f1c27;
    --text: #ebe7f2;
    --text-muted: #aaa3b8;
    --border: #353042;
    --accent: #b794f4;
    --accent-contrast: #14121a;
    --placeholder-bg: #4a3b00;
    --placeholder-text: #ffe08a;
  }
}

*,
*::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: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.site-header,
main,
.site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  text-decoration: none;
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.95rem;
}

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

h1 {
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.35rem;
  line-height: 1.3;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.5rem;
}

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

p,
ul,
ol,
table {
  margin: 0 0 1rem;
}

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

li + li {
  margin-top: 0.35rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

strong {
  font-weight: 650;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  overflow-wrap: anywhere;
}

.updated {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.lead {
  font-size: 1.125rem;
}

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

.box > h2:first-child,
.box > h3:first-child {
  margin-top: 0;
  padding-top: 0;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.steps > li {
  counter-increment: step;
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 0.9rem;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.75rem;
  text-align: center;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 650;
  text-decoration: none;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius);
  margin: 0.25rem 0 1rem;
}

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  margin: 2rem 0;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.card strong {
  display: block;
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.card span {
  color: var(--text-muted);
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
}

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

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

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

.toc {
  font-size: 0.95rem;
}

.toc ol {
  columns: 2 14rem;
  column-gap: 2rem;
  margin-bottom: 1rem;
}

/* Text that still has to be filled in before publishing. */
.ph {
  background: var(--placeholder-bg);
  color: var(--placeholder-text);
  border-radius: 4px;
  padding: 0 0.25em;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  padding-bottom: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0 0 0.25rem;
}
