/*
Theme Name: BooksOpen 2026
Theme URI: https://www.booksopen.net/
Author: BooksOpen Foundation
Description: Block theme for BooksOpen Foundation. Warm paper palette, Source Serif 4 headings, responsive layouts, and green pill buttons. Replaces the Thesis 1.7 theme used from 2009.
Version: 1.5.0
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: booksopen-2026
*/

/* ---------- base ---------- */
body { -webkit-font-smoothing: antialiased; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
/* short pages: keep the footer at the bottom of the window */
.wp-site-blocks { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.wp-site-blocks > main { flex: 1 0 auto; }
.bo-eyebrow {
  font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 700; color: var(--wp--preset--color--ochre); margin-bottom: 12px;
}
.bo-lead { font-size: 19px; }
.bo-note { font-size: 16px; color: var(--wp--preset--color--muted); }

/* ---------- header ---------- */
.bo-header { background: #fff; border-bottom: 1px solid var(--wp--preset--color--line); }
.bo-header__inner { padding: 16px 24px; gap: 12px; max-width: 1168px; margin: 0 auto; box-sizing: border-box; }
.bo-logo { margin: 0; line-height: 0; }
.bo-logo a { display: inline-block; }
.bo-logo img { display: block; height: clamp(26px, 8vw, 38px); width: auto; }
.bo-nav { font-size: 16px; }
.bo-nav .wp-block-navigation-item__content { color: var(--wp--preset--color--ink); padding: 10px 2px; }
.bo-nav .wp-block-navigation-item__content:hover { color: var(--wp--preset--color--green); }
.bo-nav .current-menu-item .wp-block-navigation-item__content { color: var(--wp--preset--color--green); font-weight: 600; }
.bo-header__nav { gap: clamp(10px, 2.4vw, 28px); }

/* ---------- buttons ----------
   One family: solid green for the main action, a quiet outline for the second
   choice, and a light button where the background is already green.
   Class names are unchanged from 1.3.0, so pages already built pick this up. */
.wp-block-button__link, .wpcf7 input[type="submit"], .wpcf7 button[type="submit"], button.bo-btn-green {
  border-radius: 999px; font-weight: 600; line-height: 1.25; text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.bo-btn-donate .wp-block-button__link, a.bo-btn-donate,
.bo-btn-green .wp-block-button__link, button.bo-btn-green {
  background: var(--wp--preset--color--green); color: #fff;
  border: 1.5px solid var(--wp--preset--color--green); padding: 12px 26px; white-space: nowrap;
}
.bo-btn-donate .wp-block-button__link:hover, a.bo-btn-donate:hover,
.bo-btn-green .wp-block-button__link:hover, button.bo-btn-green:hover {
  background: var(--wp--preset--color--green-dark); border-color: var(--wp--preset--color--green-dark); color: #fff;
}
.bo-btn-donate--sm .wp-block-button__link { padding: 9px 20px; font-size: 16px; }
.bo-btn-donate--lg .wp-block-button__link { padding: 14px 32px; font-size: 18px; }
.bo-btn-ghost .wp-block-button__link {
  background: transparent; color: var(--wp--preset--color--green-dark);
  border: 1.5px solid #679564; padding: 12px 26px;
}
.bo-btn-ghost .wp-block-button__link:hover { background: #EEF4EA; border-color: var(--wp--preset--color--green); color: var(--wp--preset--color--green-dark); }
/* on the green band */
.bo-band .bo-btn-donate .wp-block-button__link { background: var(--wp--preset--color--paper); border-color: var(--wp--preset--color--paper); color: var(--wp--preset--color--green-dark); }
.bo-band .bo-btn-donate .wp-block-button__link:hover { background: #fff; border-color: #fff; color: var(--wp--preset--color--green-dark); }
button.bo-btn-green { font: inherit; font-weight: 600; cursor: pointer; }

/* ---------- focus ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--wp--preset--color--ink); outline-offset: 2px; box-shadow: 0 0 0 6px #fff;
}

/* ---------- sections ---------- */
.bo-section { padding-top: 64px; padding-bottom: 64px; }
.bo-section--white { background: #fff; border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); }
.bo-band { background: var(--wp--preset--color--green); color: #fff; padding-top: 56px; padding-bottom: 56px; }
.bo-band :where(h1,h2,h3,p) { color: #fff; }

/* ---------- cards ---------- */
.bo-card { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 8px; overflow: hidden; }
.bo-card { display: flex; flex-direction: column; }
.bo-card > * { margin-block-start: 0; }
.bo-card__body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.bo-card__body > * { margin-block: 0 12px; }
.bo-card__body > p:last-child { margin-top: auto; margin-bottom: 0; padding-top: 6px; }
.bo-card__meta { font-size: 15px; color: var(--wp--preset--color--muted); margin-bottom: 12px; }
.bo-card__link { font-weight: 600; font-size: 16px; display: inline-block; padding: 4px 0; }
.bo-pad { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 8px; padding: 24px; }
.bo-placeholder {
  background: #DCE8D3; color: #3D5A35; font-size: 15px; text-align: center;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  min-height: 220px; border-radius: 0;
}
.bo-placeholder--hero { min-height: 400px; border: 2px dashed #8FB383; border-radius: 8px; font-size: 16px; }
.bo-placeholder--sq { min-height: 200px; border-radius: 8px; }
.bo-placeholder--avatar { min-height: 96px; width: 96px; border-radius: 50%; font-size: 13px; padding: 8px; flex: none; }

/* ---------- facts list ---------- */
.bo-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; font-size: 16px; margin: 0 0 28px; }
.bo-facts dt { color: var(--wp--preset--color--muted); font-size: 14px; }
.bo-facts dd { margin: 0; font-weight: 600; }

/* ---------- person ---------- */
.bo-person { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.bo-person__body { flex: 1 1 220px; min-width: 0; }
.bo-person__role { font-size: 15px; color: var(--wp--preset--color--ochre); font-weight: 700; margin: 0 0 10px; }

/* ---------- form ---------- */
.bo-form label { font-weight: 600; font-size: 16px; display: block; margin-bottom: 18px; }
.bo-form input, .bo-form textarea {
  display: block; width: 100%; box-sizing: border-box; margin-top: 6px; padding: 12px 14px;
  border: 1px solid #857C69; border-radius: 6px; font: inherit; background: #fff; color: var(--wp--preset--color--ink);
}
.bo-form textarea { resize: vertical; }

/* ---------- contact form 7 ---------- */
/* Matches the site's own form style. Works with CF7's older <p>-label template and its newer <label> template. */
.wpcf7 { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 8px; padding: 32px; }
.wpcf7 form > p { margin: 0 0 18px; }
.wpcf7 form > p:has(+ p > .wpcf7-form-control-wrap) { margin-bottom: 6px; font-weight: 600; font-size: 16px; }
.wpcf7 label { display: block; margin: 0 0 18px; font-weight: 600; font-size: 16px; }
.wpcf7 label .wpcf7-form-control-wrap { display: block; margin-top: 6px; font-weight: 400; }
.wpcf7 .wpcf7-form-control-wrap { display: block; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 input[type="url"],
.wpcf7 input[type="number"], .wpcf7 input[type="date"], .wpcf7 select, .wpcf7 textarea {
  display: block; width: 100%; max-width: none; box-sizing: border-box; margin: 0; padding: 12px 14px;
  border: 1px solid #857C69; border-radius: 6px; background: #fff; color: var(--wp--preset--color--ink);
  font: inherit; font-size: 17px; line-height: 1.4; font-weight: 400;
}
.wpcf7 textarea { height: 9.5em; min-height: 7em; resize: vertical; }
.wpcf7 input:hover, .wpcf7 textarea:hover { border-color: var(--wp--preset--color--ink); }
.wpcf7 input[type="submit"], .wpcf7 button[type="submit"] {
  display: inline-block; width: auto; margin: 4px 0 0; padding: 12px 28px; border: 1.5px solid var(--wp--preset--color--green); border-radius: 999px;
  background: var(--wp--preset--color--green); color: #fff; font: inherit; font-size: 17px; font-weight: 600;
  line-height: 1.25; cursor: pointer; -webkit-appearance: none; appearance: none;
}
.wpcf7 input[type="submit"]:hover, .wpcf7 button[type="submit"]:hover { background: var(--wp--preset--color--green-dark); }
.wpcf7 input[type="submit"]:disabled { opacity: 0.6; cursor: progress; }
.wpcf7 .wpcf7-spinner { vertical-align: middle; margin: 0 0 0 12px; background-color: var(--wp--preset--color--muted); }
.wpcf7 form > p:last-of-type, .wpcf7 form > p:has(input[type="submit"]) { margin-bottom: 0; }
/* validation and result messages */
.wpcf7 .wpcf7-not-valid { border-color: #A4262C; box-shadow: 0 0 0 1px #A4262C; }
.wpcf7 .wpcf7-not-valid-tip { color: #A4262C; font-size: 15px; font-weight: 600; margin-top: 6px; }
.wpcf7 form .wpcf7-response-output { margin: 20px 0 0; padding: 12px 16px; border: 0; border-left: 4px solid; border-radius: 4px; font-size: 16px; line-height: 1.5; }
.wpcf7 form.sent .wpcf7-response-output { background: #EEF4EA; border-color: var(--wp--preset--color--green); color: #1F4D1E; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.payment-required .wpcf7-response-output { background: #FBF3E2; border-color: var(--wp--preset--color--amber); color: #5F3D0B; }
.wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.aborted .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output { background: #FBEDEC; border-color: #A4262C; color: #7A1C20; }
@media (max-width: 781px) { .wpcf7 { padding: 22px; } }
.bo-pad .wpcf7 { background: none; border: 0; border-radius: 0; padding: 0; }   /* already inside a card */

/* ---------- footer ---------- */
.bo-footer { background: var(--wp--preset--color--tan); font-size: 15px; padding-top: 48px; }
.bo-footer h2, .bo-footer p strong { font-weight: 700; }
.bo-footer__brand { font-family: var(--wp--preset--font-family--display); font-size: 22px; font-weight: 600; color: var(--wp--preset--color--green); margin-bottom: 6px; }
.bo-footer__links { display: flex; flex-direction: column; align-items: flex-start; margin: 0; }
.bo-footer__links a, .bo-footer__links span { padding: 4px 0; }
.bo-footer__legal { border-top: 1px solid #DDD5C5; padding-top: 20px; padding-bottom: 32px; margin-top: 28px; font-size: 14px; color: var(--wp--preset--color--muted); }

/* ---------- breadcrumb ---------- */
.bo-breadcrumb { font-size: 15px; padding-top: 24px; }
.bo-breadcrumb a { display: inline-block; padding: 4px 0; }

/* ---------- layout glue ---------- */
.wp-block-post-content > .alignfull, .wp-site-blocks > main, .wp-site-blocks > footer { margin-block-start: 0; }
.bo-section--tight { padding-top: 28px; }
.bo-section h1, .bo-section h2 { margin-bottom: 0; }
.bo-section h2 + .bo-grid, .bo-section h2 + .wp-block-columns { margin-top: 28px; }
.bo-nowrap { white-space: nowrap; }
.bo-overview { margin-top: 24px; }
.bo-overview .bo-table { margin-bottom: 0; }
.bo-grid > * { margin: 0; }
.bo-grid h3 + p, .bo-person__body h3 + p { margin-top: 8px; }
.bo-figure { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 30px; line-height: 1.2; margin-block: 4px 12px; }
.bo-pad > * + * { margin-block-start: 12px; }
.wp-block-button.bo-btn-block { width: 100%; }
.bo-btn-block .wp-block-button__link { display: block; text-align: center; }
.bo-person > * { margin-block-start: 0; }
.bo-person__body > * { margin-block: 0 6px; }
.bo-footer__links { line-height: 1.5; }
.bo-footer .wp-block-column > p { margin-block: 0 6px; }

.bo-facts { margin-top: 20px; }
.bo-grid + .wp-block-buttons { margin-top: 32px; }
.bo-nav .wp-block-navigation__responsive-container-open { padding: 10px; margin: -4px; }
.bo-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 24px; }
.bo-nav .is-menu-open .wp-block-navigation-item__content { font-size: 20px; padding: 12px 0; }

/* ---------- budget tables ---------- */
.bo-table { margin-bottom: 20px; display: flex; flex-direction: column; }
.bo-table figcaption { order: -1; margin: 0 0 6px; font-size: 15px; font-weight: 700; color: var(--wp--preset--color--ink); text-align: left; }
.wp-block-table.bo-table table, .wp-block-table.bo-table table.has-fixed-layout { width: 100%; table-layout: auto; border-collapse: collapse; font-size: 16px; line-height: 1.45; }
.bo-table th, .bo-table td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 9px 10px 9px 0; text-align: left; vertical-align: top; }
.bo-table th { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wp--preset--color--muted); }
.bo-table .has-text-align-right { width: 1%; text-align: right; padding-right: 0; padding-left: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bo-table tfoot td { border-bottom: 0; border-top: 2px solid var(--wp--preset--color--ink); font-weight: 700; padding-top: 10px; }
.bo-table thead { border-bottom: 0; }
.bo-table tfoot { border-top: 0; }
.bo-overview .bo-table tfoot td { font-family: var(--wp--preset--font-family--display); font-size: 22px; font-weight: 600; }
.bo-details { margin-top: 8px; border-top: 1px solid var(--wp--preset--color--line); padding-top: 12px; }
.bo-details > summary { cursor: pointer; font-weight: 700; font-size: 16px; color: var(--wp--preset--color--green); padding: 6px 0; list-style-position: inside; }
.bo-details > summary:hover { color: var(--wp--preset--color--green-dark); text-decoration: underline; }
.bo-details[open] > summary { margin-bottom: 14px; }
.bo-details > .bo-table:last-of-type { margin-bottom: 8px; }
.bo-section > h3.wp-block-heading { margin-top: 40px; }

/* ---------- plain pages (not built from a BooksOpen layout) ---------- */
.bo-simple { padding-top: 64px; padding-bottom: 72px; }
.bo-simple > .bo-simple__title { margin-bottom: 20px; }

/* ---------- heading sizes that differ from their level ---------- */
.bo-h3 { font-size: clamp(21px, 18px + 0.8vw, 24px); line-height: 1.25; }
.bo-pad > h2.wp-block-heading { font-size: 28px; }
.bo-grid .bo-pad h3.wp-block-heading { font-size: 20px; }

/* ---------- small screens ---------- */
@media (max-width: 781px) {
  .bo-placeholder--hero { min-height: 260px; }
  .bo-simple { padding-top: 40px; padding-bottom: 48px; }
  .bo-band .wp-block-buttons { justify-content: flex-start; }
  .bo-section { padding-top: 48px; padding-bottom: 48px; }
  .bo-facts { grid-template-columns: 1fr; }
}

/* ---------- stretch goal ---------- */
.bo-stretch {
  margin: 0 !important;
  background: #FBF3DF; border: 1px solid var(--wp--preset--color--amber); border-radius: 8px; padding: 20px 24px;
}
.bo-stretch > * { margin-block: 0; }
.bo-stretch > * + * { margin-block-start: 8px; }
.bo-stretch h3.wp-block-heading { font-size: 22px; }
.bo-tag {
  display: inline-block; background: var(--wp--preset--color--amber); color: var(--wp--preset--color--ink);
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.4; padding: 3px 10px; border-radius: 999px;
}
p.bo-tag { margin-bottom: 4px; }
.bo-stretch-line { font-size: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }

/* ---------- phones: buttons fill the column ---------- */
@media (max-width: 480px) {
  main .wp-block-buttons { flex-direction: column; align-items: stretch; }
  main .wp-block-buttons > .wp-block-button { width: 100%; }
  main .wp-block-buttons .wp-block-button__link { display: block; text-align: center; }
  .wpcf7 input[type="submit"], .wpcf7 button[type="submit"], button.bo-btn-green { display: block; width: 100%; }
}

/* ---------- photos (when they replace the green placeholders) ---------- */
.bo-section .wp-block-image { margin: 0; }
.bo-section .wp-block-image img { display: block; width: 100%; height: auto; border-radius: 8px; }
.bo-card > .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: 0; }

/* ---------- tablets: no orphaned third item ---------- */
@media (min-width: 700px) and (max-width: 999px) {
  /* three short items stay three across */
  .bo-grid:has(> :nth-child(3):last-child):not(:has(> .bo-card)):not(:has(.bo-person)) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (min-width: 600px) and (max-width: 943px) {
  /* Scholar and people cards: one per row, photo beside the text */
  .bo-grid:has(> .bo-card), .bo-grid:has(.bo-person) { grid-template-columns: minmax(0, 1fr) !important; }
  .bo-grid > .bo-card { flex-direction: row; }
  .bo-grid > .bo-card > :first-child { flex: 0 0 36%; min-height: 0; align-self: stretch; }
  .bo-grid > .bo-card > .wp-block-image img { height: 100%; aspect-ratio: auto; }
}

/* ---------- finishing touches ---------- */
/* links: a finer underline, set a little below the text */
a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
main a:hover { text-decoration-thickness: 2px; }
/* cards sit slightly above the page */
.bo-card, .bo-pad { box-shadow: 0 1px 2px rgba(43, 43, 38, .04), 0 12px 24px -18px rgba(43, 43, 38, .28); }
.bo-pad .bo-pad, .bo-stretch { box-shadow: none; }
/* Scholar cards: the whole card is the link, and it lifts a little on hover */
.bo-card { position: relative; transition: transform .18s ease, box-shadow .18s ease; }
.bo-card__link::after { content: ""; position: absolute; inset: 0; }
.bo-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(43, 43, 38, .05), 0 18px 30px -18px rgba(43, 43, 38, .38); }
.bo-card:hover .bo-card__link { text-decoration-thickness: 2px; }
@media (prefers-reduced-motion: reduce) { .bo-card { transition: none; } .bo-card:hover { transform: none; } }
/* the seedling from the logo, faint, in the corner of the green band */
.bo-band { position: relative; overflow: hidden; }
.bo-band::after {
  content: ""; position: absolute; right: -36px; bottom: -84px; width: 300px; height: 300px;
  background: url(assets/images/booksopen-mark-white.svg) center / contain no-repeat; opacity: .07; pointer-events: none;
}
@media (max-width: 781px) { .bo-band::after { width: 190px; height: 190px; right: -28px; bottom: -56px; } }
.bo-band > * { position: relative; z-index: 1; }
/* gift amounts in the brand green */
.bo-grid .bo-figure { color: var(--wp--preset--color--green); }
/* main photos get a soft green block set behind them */
.bo-section > .wp-block-columns > .wp-block-column > .wp-block-image img { width: calc(100% - 14px); margin-bottom: 14px; box-shadow: 14px 14px 0 #DCE8D3; }
@media (max-width: 781px) { .bo-section > .wp-block-columns > .wp-block-column > .wp-block-image img { width: calc(100% - 8px); margin-bottom: 8px; box-shadow: 8px 8px 0 #DCE8D3; } }

/* ---------- thank-you page ---------- */
.bo-thanks { text-align: center; }
.bo-thanks .bo-eyebrow::before {
  content: ""; display: block; width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%;
  background: #E3EDDC url(assets/images/booksopen-mark.svg) center / 40px no-repeat;
}
.bo-thanks .bo-lead { font-size: 20px; }
.bo-step__num {
  display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
  background: #E3EDDC; color: var(--wp--preset--color--green-dark); font-weight: 700; font-size: 16px; margin: 0;
}
.bo-step__num + .wp-block-heading { margin-top: 14px; }

/* ---------- photos dropped into the other placeholder spots ---------- */
/* "Over the years" row: one shape, so different photos still line up */
.bo-grid > .wp-block-group > .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; }
.bo-grid > .wp-block-group > .wp-block-image + p { margin-top: 10px; }
/* people on the About page: round portraits */
.bo-person > .wp-block-image { flex: none; margin: 0; }
.bo-person > .wp-block-image img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: none; }

/* ---------- header: menu button below 900px ----------
   The four links and the Donate button need about 710px with Mac and iPhone
   fonts, so on tablets and narrow windows "Contact" wrapped to a second line.
   Below 900px the links move into the menu button; Donate stays visible. */
@media (max-width: 899px) {
  .bo-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
  .bo-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}

/* ---------- "No frame" image style (collages, graphics) ---------- */
.wp-block-image.is-style-bo-plain img,
.bo-section > .wp-block-columns > .wp-block-column > .wp-block-image.is-style-bo-plain img {
  width: 100%; margin-bottom: 0; border-radius: 0; box-shadow: none;
}

/* ---------- crops that keep faces in view ----------
   Scholar cards and "Over the years" photos are cropped to 4:3. Most photos of
   people are taken upright with the face in the top third, so crop from there
   rather than from the middle. */
.bo-card > .wp-block-image img,
.bo-grid > .wp-block-group > .wp-block-image img { object-position: 50% 18%; }

/* ---------- photo lineup (e.g. Mfaume's graduation day) ----------
   Upright photos side by side, all cut to the same 3:4 shape. Add or remove
   images in the editor; new ones take the same shape. */
.bo-lineup > .wp-block-image { margin: 0; }
.bo-lineup img { aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 15%; }
.bo-lineup + .wp-block-heading { margin-top: 56px; }
.bo-section > h2.wp-block-heading + .bo-lineup { margin-top: 24px; }

/* ---------- 1.5.0: "Over the years" centered ----------
   The heading, photos, captions and buttons all sit on the center line, so a
   row of two photos no longer looks pushed off to one side. On Mfaume's page
   the "Graduation day" heading above is centered too, to match. Scholar cards
   (bo-card) are left out, so the home page's "Our Scholars" stays left-aligned.
   On wide screens two photos are 400px each (three would fill the row). */
.bo-section:has(> .bo-grid:not(.bo-lineup) > .wp-block-group:not(.bo-card) > .wp-block-image) > h2.wp-block-heading { text-align: center; }
.bo-section:has(> .bo-grid:not(.bo-lineup) > .wp-block-group:not(.bo-card) > .wp-block-image) > .bo-grid .bo-note { text-align: center; }
.bo-section:has(> .bo-grid:not(.bo-lineup) > .wp-block-group:not(.bo-card) > .wp-block-image) > .wp-block-buttons { justify-content: center; }
@media (min-width: 1000px) {
  .bo-grid:has(> :nth-child(2):last-child):has(> .wp-block-group > .wp-block-image):not(.bo-lineup):not(.bo-duo) {
    grid-template-columns: repeat(2, minmax(0, 400px)) !important;
    justify-content: center; column-gap: 32px !important;
  }
}

/* ---------- 1.4.4: the "Make a gift" box ----------
   Group the goal, the button and the tax note, with more air between them. */
.bo-gift { padding: 28px; }
.bo-gift > * + * { margin-block-start: 0; }
.bo-gift > h2.wp-block-heading { margin-bottom: 6px; }
.bo-gift > h2 + p + .bo-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--wp--preset--color--line); }
.bo-gift > .bo-figure { margin-block: 2px 0; }
.bo-gift > .bo-stretch-line { margin-top: 14px; }
.bo-gift > .wp-block-buttons { margin-top: 28px; }
.bo-gift > .wp-block-buttons + .bo-note { margin-top: 18px; line-height: 1.55; }

/* About: a second photo stacked under the first */
.wp-block-column > .wp-block-image + .wp-block-image { margin-top: 20px; }

/* ---------- 1.4.4: home headline on two lines ----------
   One sentence per line. The size follows the column width so each sentence
   fits on its line, from a 360px phone up to a wide screen. */
.bo-hero-title { line-height: 1.12; }
@media (max-width: 781px) { .bo-hero-title { font-size: min(40px, calc(8.6vw - 5px)); } }
@media (min-width: 782px) { .bo-hero-title { font-size: min(48px, calc(4.5vw - 5px)); } }

/* ---------- 1.5.0: Support page, gift box first ----------
   The headline sits above both columns. The gift box comes first in the page,
   so on a phone it shows right under the headline. On wider screens the
   columns swap, which puts the letter on the left and the box on the right. */
.bo-section > h1 + .wp-block-columns { margin-top: 28px; }
@media (min-width: 782px) { .wp-block-columns.bo-give { flex-direction: row-reverse; } }
/* what a gift covers, listed inside the gift box */
.bo-gift > .bo-amounts { margin-top: 18px; border-top: 1px solid var(--wp--preset--color--line); }
.bo-amounts > p { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--wp--preset--color--line); font-size: 16px; line-height: 1.45; }
.bo-amounts strong { font-family: var(--wp--preset--font-family--display); font-size: 19px; color: var(--wp--preset--color--green); margin-right: 4px; }
.bo-gift > h2 + .bo-note { margin-top: 16px; }
.bo-gift > .wp-block-buttons + .bo-stretch-line { margin-top: 18px; }
.bo-gift > .bo-stretch-line + .bo-note { margin-top: 14px; line-height: 1.55; }
/* two photos side by side above the letter */
.bo-grid.bo-duo { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; justify-content: stretch; column-gap: 20px !important; margin-bottom: 28px; }
.bo-duo .bo-note { font-size: 15px; }

/* ---------- 1.5.0: home hero ----------
   The headline is one sentence now. On phones it is never smaller than 32px,
   and the photo comes before the text. */
.bo-hero-title { text-wrap: balance; }
@media (max-width: 781px) {
  .bo-hero-title { font-size: max(32px, min(40px, 8.6vw)); }
  .wp-block-columns.bo-hero > .wp-block-column:last-child { order: -1; }
}

/* ---------- 1.5.0: Scholar pages, cost line and button under the update ---------- */
.bo-cost { margin-top: 20px; margin-bottom: 0; }
.bo-cost + .wp-block-buttons { margin-top: 14px; }

/* ---------- 1.5.0: easier tap targets ---------- */
.bo-btn-donate--sm .wp-block-button__link { min-height: 44px; box-sizing: border-box; display: inline-flex; align-items: center; }
@media (max-width: 781px) { .bo-footer__links a, .bo-breadcrumb a { padding: 8px 0; } }

/* ---------- 1.5.0: Home and Donate links shown only in the open phone menu ---------- */
.bo-nav .wp-block-navigation-item.bo-menu-only { display: none; }
.bo-nav .is-menu-open .wp-block-navigation-item.bo-menu-only { display: flex; }
