/* Brand tokens, taken from the MyCelium home page */
:root {
  --paper: #ffffff;
  --plate: #ffffff;
  --coral: #cf6369;
  --coral-deep: #b24c53;
  --hypha: #f2c6c9;
  --ink: #3b2a2c;
  --muted: #8a7275;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1416; --plate: #ffffff;
    --coral: #e2858a; --coral-deep: #f0a3a7; --hypha: #5a3236;
    --ink: #f3e6e5; --muted: #b59a9c;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: var(--coral-deep); }
a:focus-visible { outline: 2px solid var(--coral); outline-offset: 4px; border-radius: 6px; }

.brand { font-family: "Josefin Sans", "Futura", "Avenir Next", sans-serif; font-weight: 700; }

/* Logo: sits on a white plate in dark mode, since the artwork has a white ground */
.logo { display: block; margin: 0; }
.logo img { display: block; width: 100%; height: auto; }
@media (prefers-color-scheme: dark) {
  .logo img { background: var(--plate); border-radius: 14px; padding: 4px 8px; }
}

/* ---------- Home ---------- */
.home { max-width: 640px; margin: 0 auto; padding: clamp(16px, 4vh, 40px) 16px 40px; }
.home .logo { max-width: 380px; margin: 0 auto; }
@media (min-width: 900px) {
  body.home-page { min-height: 100vh; display: flex; align-items: center; }
  .home { max-width: 1040px; width: 100%; display: grid;
    grid-template-columns: minmax(300px, 420px) 1fr; column-gap: 64px; align-items: center; padding: 32px; }
  .home .logo { max-width: 420px; }
}

/* The thread the branches grow from */
.branches { position: relative; margin: 24px 0 0 18px; padding-left: 42px; list-style: none; }
.branches::before {
  content: ""; position: absolute; left: 0; top: 4px; bottom: 30px; width: 2px;
  background: linear-gradient(var(--hypha), var(--coral) 12%, var(--coral) 88%, var(--hypha));
  border-radius: 2px;
}
.branches li { position: relative; padding: 7px 0 10px; }
.branches li::before {
  content: ""; position: absolute; left: -42px; top: 22px; width: 26px; height: 2px;
  background: var(--coral); border-radius: 2px; transform-origin: left center; transform: rotate(-14deg);
}
.branches li::after {
  content: ""; position: absolute; left: -19px; top: 13px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--coral);
}
.branches h2, .branches .branch-link {
  display: block; margin: 0; padding-top: 4px;
  font-family: "Josefin Sans", "Futura", "Avenir Next", sans-serif;
  font-weight: 700; font-size: 25px; line-height: 1.15; letter-spacing: .01em; color: var(--coral);
}
.branches .branch-link { text-decoration: none; }
.branches .branch-link:hover { color: var(--coral-deep); }
.branches li:has(.branch-link:hover)::after { background: var(--coral); }
.branches p { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; max-width: 52ch; }
.branches p a { color: inherit; }
@media (min-width: 900px) { .home .branches { margin-top: 0; } }
@media (max-width: 420px) {
  .branches { margin-left: 8px; }
  .branches h2, .branches .branch-link { font-size: 23px; }
}

/* ---------- Policy pages ---------- */
.doc { max-width: 680px; margin: 0 auto; padding: 32px 16px 56px; }
.doc header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.doc header .logo { width: 180px; }
.doc header nav a { margin-left: 18px; font-size: 15px; color: var(--muted); text-decoration: none; }
.doc header nav a:hover, .doc header nav a[aria-current="page"] { color: var(--coral-deep); }
.doc header nav a:first-child { margin-left: 0; }

.doc h1 {
  margin: 40px 0 4px; font-family: "Josefin Sans", "Futura", "Avenir Next", sans-serif;
  font-weight: 700; font-size: clamp(32px, 6vw, 44px); line-height: 1.1; color: var(--coral);
}
.doc .updated { margin: 0 0 28px; color: var(--muted); font-size: 15px; }

/* Each section hangs off the same thread, one node per heading */
.doc article { position: relative; padding-left: 34px; }
.doc article::before {
  content: ""; position: absolute; left: 4px; top: 10px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--coral), var(--coral) 85%, var(--hypha)); border-radius: 2px;
}
.doc h2 {
  position: relative; margin: 30px 0 6px;
  font-family: "Josefin Sans", "Futura", "Avenir Next", sans-serif;
  font-weight: 700; font-size: 22px; line-height: 1.2; color: var(--ink);
}
.doc h2:first-child { margin-top: 0; }
.doc h2::before {
  content: ""; position: absolute; left: -35px; top: 4px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--paper); border: 2px solid var(--coral);
}
.doc p { margin: 0 0 12px; max-width: 64ch; }

.doc footer { margin-top: 48px; padding-left: 34px; color: var(--muted); font-size: 15px; }
.doc footer a { color: inherit; margin-right: 18px; }
