html {
  font-family: "PT Sans", Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  padding-top: 25px;
  padding-bottom: 40px;
  width: 50%;
  margin: 0px auto;
  background-color: #fff;
}

h1 {
  font-size: 2.5em;
  line-height: 1.2;
}

h2 {
  font-size: 1.75em;
  line-height: 1.3;
  margin: 1.5em 0 0.75em;
}

p {
  font-size: 1.25em;
  line-height: 1.5;
  margin: 1em 0;
}

/* Make bullet points and their text larger */
.main ul, .main ol {
  font-size: 1.25em;
  line-height: 1.5;
  margin: 1em 0;
}

/* Prevent nested lists from compounding font-size */
.main ul ul, .main ul ol, .main ol ul, .main ol ol {
  font-size: 1em;
  margin: 0.5em 0;
}

/* References section - lists after h3 headings should be normal size */
.main h3 + ul, .main h3 + ol {
  font-size: 1em;
}

/* Footnotes section styling */
.footnotes {
  margin-top: 3em;
  padding-top: 2em;
  border-top: 1px solid #ddd;
  font-size: 0.95em;
}

.footnotes h2 {
  font-size: 1.5em;
  margin-bottom: 1em;
}

.footnotes ol {
  font-size: 1em;
  padding-left: 1.5em;
}

.footnotes li {
  margin-bottom: 1em;
  line-height: 1.6;
}

/* Back-reference links in footnotes */
.footnotes a[data-footnote-backref] {
  margin-left: 0.3em;
  text-decoration: none;
  font-size: 0.9em;
}

/* Footnote reference superscripts in body */
sup a[data-footnote-ref] {
  text-decoration: none;
  font-weight: 500;
}

.main a {
  color: #6a9fb5;
}

.icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-top: 40px;
  padding: 28px 0 64px;
  border-top: 2px dotted #6a9fb5;
}

.icons a {
  display: inline-flex;
  line-height: 0;
}

.icon {
  color: #6a9fb5;
  fill: currentColor;
  width: 36px;
  height: 36px;
  transition: color 0.15s ease;
}

.icon-dev {
  width: 42px;
  height: 42px;
}

.icons a:hover .icon {
  color: #4f8199;
}

.site-title {
  color: #333;
  font-size: 2em;
  margin: 0 0 1em;
}

/* Posts list styles */
.posts-list {
  margin-top: 0;
}

.posts-list h2 {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.75em;
}

.posts-list p {
  margin: 1em 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  line-height: 1.4;
  flex-wrap: nowrap;
  gap: 1em;
}

.posts-list a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  font-size: 1.1em;
  min-width: 0;
  flex: 1;
  white-space: normal;
  line-height: 1.4;
}

.posts-list a:hover {
  text-decoration: underline;
}

.post-date {
  color: #666;
  font-size: 0.9em;
  white-space: nowrap;
  text-align: left;
}

.section {
  margin-bottom: 3em;
  padding-bottom: 2em;
  border-bottom: 1px solid #eee;
}

.section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section h2 {
  color: #333;
  margin-top: 0;
  margin-bottom: 1em;
}

@media screen and (max-width: 1200px) {
  body {
    width: 85%;
    margin: 0px auto;
  }
  .icon {
    width: 32px;
    height: 32px;
  }

  .icon-dev {
    width: 37px;
    height: 37px;
  }
}

@media screen and (max-width: 600px) {
  body {
    width: 92%;
    padding-top: 15px;
  }
  
  h1 {
    font-size: 2em;
  }

  .site-title {
    font-size: 1.6em;
  }
  
  h2 {
    font-size: 1.5em;
  }
  
  p {
    font-size: 1.1em;
  }
  
  .posts-list a {
    font-size: 1em;
  }
  
  .post-date {
    font-size: 0.85em;
  }
  
  .icons {
    gap: 22px;
    margin-top: 2em;
    padding-bottom: 48px;
  }

  .icon {
    width: 28px;
    height: 28px;
  }

  .icon-dev {
    width: 32px;
    height: 32px;
  }
}

/* Family tree figure on /family-history: breaks out of the text column */
.tree-figure {
  width: min(1200px, 100vw);
  margin: 0 0 1.5em calc(50% - min(600px, 50vw));
}

.tree-scroll {
  margin: 0 16px;
  padding: 16px;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tree-chart {
  display: block;
  margin: 0 auto;
  min-height: 200px;
}

.tree-chart .detailed text { font-family: "PT Sans", Helvetica, Arial, sans-serif; }
.tree-chart .detailed .id { display: none; }
.tree-chart .detailed rect { stroke: #8a8a8a; }
.tree-chart .detailed { stroke-width: 1.2px; }
.tree-chart .link { stroke: #6a9fb5; stroke-width: 1.4px; }
.tree-chart .detailed .name { fill: #2a2a2a; }
.tree-chart .indi.has-page .name { fill: #6a9fb5; text-decoration: underline; cursor: pointer; }
.tree-chart .indi.has-page { cursor: pointer; }

.tree-figure figcaption {
  font-size: 0.9em;
  color: #666;
  margin: 0.5em auto 0;
  max-width: 700px;
  padding: 0 20px;
}

/* Long URLs, code spans and wide tables must not push a phone page sideways */
.content a,
.footnotes a,
.content code {
  overflow-wrap: anywhere;
}

.content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

