/* Mass Almanac — WordPress adjustments.
   assets/almanac.css is the site's stylesheet unchanged; this file maps it onto WordPress's block markup. */

/* the page frame (was div.page) */
.wp-site-blocks {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(14px, 3vw, 40px) 12px;
  border-top: 4px double var(--navy);
}

/* masthead */
.wp-site-blocks .masthead-inner > * { margin-block-start: 0; margin-block-end: 0; }
.wp-site-blocks .masthead-inner .wp-block-image { margin: 0; }
.wp-site-blocks .masthead-inner .wp-block-image a { display: block; }
.wp-site-blocks .brand-title > * { margin-block-start: 0; }
.wp-site-blocks .brand-name { margin: 0; }
.wp-site-blocks .brand-name a { color: inherit; text-decoration: none; }
.wp-site-blocks .brand-tag { margin: 8px 0 0; }

/* top nav: one paragraph of links; the gold dot is drawn before every link but the first */
.wp-site-blocks p.topnav { margin: 0; }
.wp-site-blocks .topnav a + a::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
  display: inline-block; flex: none; margin: 0 26px 0 0;
}
.wp-site-blocks .topnav a { display: inline-flex; align-items: center; }
.wp-site-blocks .topnav a:hover { text-decoration: none; }
.wp-site-blocks .topnav a:hover span, .wp-site-blocks .topnav a:hover { text-decoration-color: var(--gold); }

/* footer */
.wp-site-blocks .colophon { margin: 12px 0 0; }

@media (max-width: 760px) {
  .wp-site-blocks { padding: 0 14px 10px; }
  .wp-site-blocks .topnav a + a::before { margin-right: 16px; }
  .wp-site-blocks .brand-tag { margin-top: 4px; }
}

/* ---------- content written in the WordPress editor ---------- */
:root { --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 5l7 7-7 7' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }

/* link lists made with the List block: the chevron the site's own lists carry as an icon is drawn here */
.linklist.wp-block-list a::after, .more-links a::after {
  content: ""; flex: none; display: inline-block; width: 16px; height: 16px; background: var(--navy);
  -webkit-mask: var(--chev) center / contain no-repeat; mask: var(--chev) center / contain no-repeat;
}
.home-bottom .linklist.wp-block-list a::after, .home-buckets .linklist.wp-block-list a::after { width: 14px; height: 14px; }
.list-cols .linklist.wp-block-list a::after { width: 13px; height: 13px; }
.home-section .linklist.wp-block-list a { text-transform: uppercase; letter-spacing: .13em; font-size: 15px; font-weight: 500; }

/* "All Vacancies ›" style links: a paragraph of links with the class more-links */
.wp-site-blocks .more-links { margin: 0; }
.more-links a { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; margin-right: 22px; text-transform: uppercase; letter-spacing: .14em; font-size: 14px; font-weight: 600; color: var(--navy); }
.more-links a:last-child { margin-right: 0; }
.more-links a::after { width: 12px; height: 12px; }
.home-buckets .more-links a { margin-top: 10px; }
.more-links.gc a { margin-top: 6px; }
.wp-site-blocks .list-related.more-links { margin: -6px 0 16px; }
.list-related.more-links a { margin-top: 0; }

/* the small "read more" chevron after a story excerpt */
a.more-inline:not(:has(svg)) {
  display: inline-block; width: 12px; height: 12px; vertical-align: -1px; overflow: hidden; text-indent: -999px; white-space: nowrap;
  background: var(--navy); -webkit-mask: var(--chev) center / contain no-repeat; mask: var(--chev) center / contain no-repeat;
}

/* story boxes on the home page: the Image block stands in for img.bimg */
.bucket-story figure.wp-block-image { margin: 2px 0 10px; }
.bucket-story figure.wp-block-image a { display: block; }
.bucket-story figure.wp-block-image img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: top; display: block; background: var(--paper-2); border: 1px solid var(--rule); }

/* Book of Facts banner and figures as Image blocks */
figure.facts-banner { overflow: hidden; }
figure.facts-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wp-site-blocks figure.wp-block-image.facts-media-img { margin: 0; }
.story .prose .story-figure figcaption, .facts-figure figcaption { margin-bottom: 0; text-align: left; }

/* record templates */
.profile-band:not(:has(> section)) { display: none; }
.leg-two > section > .h-orn ~ .h-orn { margin-top: 18px; }
.back-link { margin-top: 20px; }

@media (max-width: 760px) {
  .home-section .linklist.wp-block-list a { font-size: 14px; }
}

/* WordPress puts the class "page" on <body> for every Page; the site's .page frame rule must not apply there */
body.page { max-width: none; margin: 0; padding: 0; border-top: 0; }

/* let the first and last blocks' margins behave as they do on a plain page (WordPress makes this wrapper a separate flow) */
.wp-site-blocks .wp-block-post-content { display: block; }
.home-buckets p.more-links, .home-bottom p.more-links { font-size: inherit; line-height: inherit; }
