/* ==========================================================================
   FAMILYTREE — the few rules WordPress markup needs.
   ---------------------------------------------------------------------------
   The design was authored for pages the theme composes itself; these are the
   shapes WordPress adds on top of it — the admin bar's offset, editor
   alignments, a prose column for editor output, and the plain list the
   fallback templates use.

   NOTHING HERE RESTYLES THE DESIGN. A rule that wants to change how a section
   looks belongs in that section's own stylesheet.
   ========================================================================== */

/* The admin bar is fixed and so is the header. Without this the pill sits
   under the bar for logged-in editors only — the kind of bug that never gets
   reported, because visitors never see it. */
body.admin-bar .nav { top: 32px; }
@media screen and (max-width: 782px) {
  body.admin-bar .nav { top: 46px; }
}

/* --- A measured column for editor content -------------------------------- */
.sv-prose-section {
  padding-block: clamp(3rem, 8vh, 5.5rem);
  background: linear-gradient(180deg, var(--sv-ivory) 0%, #f4f9ff 100%);
}

.sv-prose {
  width: min(46rem, 100% - 2 * var(--gutter));
  margin-inline: auto;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  line-height: 1.78;
  color: rgba(11, 45, 82, .78);
}
.sv-prose > * + * { margin-top: 1.1em; }

.sv-prose h2,
.sv-prose h3,
.sv-prose h4 {
  margin-top: 1.8em;
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.15;
  color: var(--c-blue-700);
}
.sv-prose h2 { font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.6rem); }
.sv-prose h3 { font-size: clamp(1.3rem, 1.1rem + 0.9vw, 1.75rem); }

.sv-prose a {
  color: var(--c-blue-700);
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-color: rgba(26, 114, 214, .4);
}
.sv-prose a:hover { text-decoration-color: currentColor; }

.sv-prose ul,
.sv-prose ol { padding-left: 1.4em; }
.sv-prose li + li { margin-top: .4em; }

.sv-prose blockquote {
  margin-left: 0;
  padding-left: 1.2em;
  border-left: 2px solid var(--c-mint);
  font-family: var(--f-display);
  font-style: italic;
  color: var(--c-blue-900);
}

.sv-prose img { max-width: 100%; height: auto; border-radius: var(--sv-r-md); }
.sv-prose figcaption {
  margin-top: .6rem;
  font-family: var(--f-ui);
  font-size: .82rem;
  color: var(--c-ink-faint);
}

/* Block alignments, inside that column. */
.sv-prose .alignwide { width: min(60rem, 100vw - 2 * var(--gutter)); margin-inline: auto; }
.sv-prose .alignfull { width: 100vw; margin-inline: calc(50% - 50vw); max-width: none; }
.sv-prose .alignleft { float: left; margin: .4em 1.4em 1em 0; }
.sv-prose .alignright { float: right; margin: .4em 0 1em 1.4em; }
.sv-prose .aligncenter { margin-inline: auto; display: block; }

/* --- The fallback list --------------------------------------------------- */
.ftd-list { list-style: none; padding: 0; margin-top: 2rem; }
.ftd-list__item { padding-block: 1.2rem; border-bottom: 1px solid var(--sv-hair); }
.ftd-list__item a {
  font-family: var(--f-display);
  font-size: 1.4rem;
  color: var(--c-blue-900);
}
.ftd-list__item a:hover { color: var(--c-blue-500); }
.ftd-list__item p { margin-top: .4rem; font-size: .95rem; color: var(--c-ink-soft); }

/* --- Screen-reader text --------------------------------------------------
   The design has .sr-only; this is WordPress's own name for the same thing,
   used by core markup the theme does not author. */
.screen-reader-text {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.screen-reader-text:focus {
  position: fixed;
  top: 12px; left: 12px;
  z-index: 100000;
  width: auto; height: auto;
  padding: .8rem 1.2rem;
  clip-path: none;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--sh-md);
}

/* --- Pagination ---------------------------------------------------------- */
.ftd-main .pagination { margin-top: 2.5rem; display: flex; gap: .5rem; flex-wrap: wrap; }
.ftd-main .page-numbers {
  display: grid;
  place-items: center;
  /* 44px: a touch target before it is a link. */
  min-width: 44px; min-height: 44px;
  padding-inline: .6rem;
  font-family: var(--f-ui);
  font-size: .9rem;
  color: var(--c-blue-900);
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--sv-card-brd);
  border-radius: 10px;
}
.ftd-main .page-numbers.current {
  background: var(--c-blue-500);
  border-color: var(--c-blue-500);
  color: #fff;
}
