/* A paper pedigree chart filled in with blue pen: white page, one easy-to-read typeface, one ink.
   The family tree is the only rich thing on the page. Sizes sit on a 4px grid. */
:root {
  --page: #ffffff; --raised: #f3f5fa; --ink: #172033; --soft: #465066; --muted: #5f697d;
  --line: rgba(23, 32, 51, 0.16); --pen: #1f3fa6; --error: #b3261e;
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 18px/28px var(--font); }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--pen); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--pen); outline-offset: 2px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
h1 { font-size: clamp(38px, 5.4vw, 64px); line-height: 1.06; letter-spacing: -0.02em; max-width: 17em; }
h2 { font-size: 28px; line-height: 34px; }
h3 { font-size: 20px; line-height: 28px; }
@media (min-width: 641px) { .nb { white-space: nowrap; } }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1200px; margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
.fine { color: var(--muted); font-size: 16px; line-height: 24px; }
.preview-bar { background: var(--raised); color: var(--soft); padding: 8px 20px; font-size: 16px; line-height: 24px; text-align: center; }

.top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; padding-block: 24px; }
.wordmark { color: var(--ink); font-size: 22px; font-weight: 600; text-decoration: none; }
nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
nav a { color: var(--soft); text-decoration: none; padding-block: 4px; }
nav a:hover { color: var(--pen); text-decoration: underline; }

.btn { display: inline-flex; align-items: center; min-height: 48px; padding: 8px 20px; border: 1px solid var(--pen); border-radius: 8px;
  background: var(--page); color: var(--pen); font: 500 18px/24px var(--font); text-decoration: none; cursor: pointer; transition: background-color 150ms, color 150ms; }
.btn:hover { background: var(--raised); }
.btn.primary { background: var(--pen); color: #fff; }
.btn.primary:hover { background: #17307f; }

.hero { padding-top: 56px; }
.lede { max-width: 38em; margin-top: 24px; font-size: 20px; line-height: 32px; color: var(--soft); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* the tree: every name on a line, parents to the right of their child */
.tree { margin-top: 64px; }
.tree figcaption { color: var(--soft); max-width: 44em; }
.pedigree { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(8, 72px); }
.pedigree li { position: relative; display: grid; grid-template-rows: 1fr 1fr; min-width: 0; }
.pedigree .who { align-self: end; padding: 0 4px 4px 12px; border-bottom: 1.5px solid var(--pen); color: var(--pen); font-weight: 500; font-size: 17px; line-height: 20px; }
.pedigree li:first-child .who { padding-left: 0; font-size: 18px; line-height: 24px; }
.pedigree li:first-child .life { padding-left: 0; }
.pedigree .life { padding: 4px 4px 0 12px; color: var(--soft); font-size: 15px; line-height: 20px; font-variant-numeric: tabular-nums; }
.pedigree .father::before, .pedigree .mother::before { content: ""; position: absolute; left: 0; border-left: 1.5px solid var(--pen); }
.pedigree .father::before { top: 50%; bottom: 0; }
.pedigree .mother::before { top: 0; bottom: 50%; }
.pedigree .gap .who { color: var(--muted); font-weight: 400; border-bottom-style: dashed; }
.pedigree .rel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.src { display: inline-block; padding: 0 3px; font-size: 12px; line-height: 16px; font-weight: 500; vertical-align: 5px; text-decoration: none; }
.src:hover { text-decoration: underline; }

/* text sections: the heading on the left, the content on the right */
.split { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px 64px; padding-top: 96px; }
.split > div { display: grid; gap: 16px; align-content: start; min-width: 0; }
.split p, .split li { max-width: 40em; }
.split ul, .steps { margin: 0; padding-left: 24px; display: grid; gap: 12px; }
.steps ::marker { color: var(--pen); font-weight: 600; }
.split > .beside { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 24px 48px; }
.beside > div { display: grid; gap: 16px; align-content: start; }
.beside img { border: 1px solid var(--line); }

.prices { width: 100%; border-collapse: collapse; }
.prices th, .prices td { padding: 16px 24px 16px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-weight: 400; }
.prices thead th { padding-top: 0; color: var(--muted); font-size: 16px; }
.prices tbody th { font-weight: 600; white-space: nowrap; }
.prices td:nth-child(2) { color: var(--soft); }
.prices td:nth-child(3) { white-space: nowrap; }
.prices th:last-child, .prices td:last-child { padding-right: 0; text-align: right; font-variant-numeric: tabular-nums; }
.prices td:last-child { font-weight: 600; }

.split > .faq { gap: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { padding-block: 16px; cursor: pointer; font-weight: 500; }
.faq summary::marker { color: var(--pen); }
.faq p { padding-bottom: 20px; color: var(--soft); }

form { display: grid; gap: 20px; padding: 28px; border-radius: 12px; background: var(--raised); min-width: 0; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
label { display: grid; gap: 8px; font-weight: 500; }
input, select, textarea { width: 100%; min-width: 0; min-height: 48px; padding: 8px 12px; border: 1px solid #7d879b; border-radius: 8px; background: var(--page); color: var(--ink); font: 400 18px/28px var(--font); }
textarea { resize: vertical; }
::placeholder { color: var(--muted); opacity: 1; }
.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; }
.check input { flex: none; width: 20px; min-height: 20px; height: 20px; margin: 4px 0 0; accent-color: var(--pen); }
form .btn { justify-self: start; }
.addr { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; user-select: all; }
.form-result { display: grid; gap: 12px; }
.form-result pre { margin: 0; padding: 16px; border-radius: 8px; background: var(--page); font: inherit; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.form-result .err { color: var(--error); }

.foot { margin-top: 96px; padding-block: 24px 40px; color: var(--muted); font-size: 16px; }

@media (max-width: 900px) {
  .hero { padding-top: 32px; }
  .split { grid-template-columns: minmax(0, 1fr); padding-top: 72px; }
  .tree { margin-top: 48px; }
  /* the tree becomes a list: who they are to him, then the name */
  .pedigree { display: block; }
  .pedigree li { display: grid; grid-template-columns: 116px minmax(0, 1fr); grid-template-rows: auto; padding-block: 8px; border-bottom: 1px solid var(--line); }
  .pedigree li::before { display: none; }
  .pedigree li:first-child { grid-template-columns: minmax(0, 1fr); }
  .pedigree .rel { position: static; width: auto; height: auto; clip-path: none; grid-row: span 2; padding-right: 12px; color: var(--muted); font-size: 15px; line-height: 20px; }
  .pedigree .who, .pedigree .life { padding: 0; border: 0; }
  .src { padding: 4px; font-size: 14px; }
}
@media (max-width: 640px) {
  .field-row, .split > .beside { grid-template-columns: minmax(0, 1fr); }
  form { padding: 20px 16px; }
  .prices, .prices tbody { display: block; }
  .prices thead { display: none; }
  .prices tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding-block: 16px; border-bottom: 1px solid var(--line); }
  .prices th, .prices td { padding: 0; border: 0; }
  .prices td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .prices td:nth-child(3) { grid-column: 1 / -1; grid-row: 3; color: var(--muted); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn { transition: none; } }
