body {
  font-family: "Tahoma", Arial, sans-serif;
  margin: 0;
  background: #fff;
  color: #222;
}
header {
  text-align: center;
  padding: 1.5rem 1rem 1rem 1rem;
  background: #f5f5f5;
}
header img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
/* Social icons: a centred row under the banner, moving to the top right of the header band once the viewport is wide
   enough (banner 980px + room for 3 icons on the right) so it cannot overlap the banner. */
header { position: relative; }
.social-links ul {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #243542;
  color: #fff;
  font-size: 1.3rem;
  text-decoration: none;
  transition: background 0.2s;
}
.social-link:hover,
.social-link:focus-visible { background: #ee722a; color: #fff; }
.social-link:focus-visible { outline: 3px solid #243542; outline-offset: 2px; }
@media (min-width: 1240px) {
  .social-links { position: absolute; top: 1.5rem; right: 1.5rem; }
  .social-links ul { margin: 0; flex-direction: column; }
}
/* Collapsed (mobile) nav: the icons move from under the banner into the navy bar, left of the menu button. */
.nav-social { display: none; margin-right: auto; }
@media (max-width: 991.98px) {
  header .social-links { display: none; }
  .nav-social { display: block; }
  .nav-social ul { margin: 0; justify-content: flex-start; gap: 0; }
  .nav-social .social-link { width: 44px; height: 44px; font-size: 1.4rem; background: transparent; border: 0; border-radius: 0; }
  .nav-social .social-link:hover,
  .nav-social .social-link:focus-visible { background: transparent; color: #ee722a; }
  .nav-social .social-link:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
}
.social-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.social-list li { margin: 0 0 0.5rem; }
.social-list a { color: #243542; font-weight: 600; text-decoration: none; }
.social-list a:hover,
.social-list a:focus-visible { text-decoration: underline; }
.social-list .fa-brands { font-size: 1.4rem; width: 1.6rem; vertical-align: middle; }
.social-list .social-handle { font-weight: 400; color: #4a4a4a; }
/* Nav: Bootstrap navbar markup (see assets/vendor/bootstrap), site colours and spacing */
.navbar {
  background: #243542;
  padding: 0.5rem 1rem;
  justify-content: flex-end;
}
.navbar .navbar-nav { margin-top: 0; }
.justify-content-center {
  justify-content: center !important;
}
.navbar .navbar-nav .nav-link {
  color: #fff;
  font-weight: 600;
  padding: 0.6em 0.7em;
  border-radius: 4px;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}
.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus,
.navbar .navbar-nav .nav-link.active {
  background: #ee722a;
  color: #fff;
  outline: none;
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem #ee722a;
}
/* Dropdown sub-menus */
.navbar .dropdown-menu {
  --bs-dropdown-bg: #243542;
  --bs-dropdown-border-color: #3a4f60;
  --bs-dropdown-link-color: #fff;
  --bs-dropdown-link-hover-color: #fff;
  --bs-dropdown-link-hover-bg: #ee722a;
  --bs-dropdown-link-active-color: #fff;
  --bs-dropdown-link-active-bg: #ee722a;
  --bs-dropdown-divider-bg: #3a4f60;
  max-height: 65vh;
  overflow-x: hidden;
  overflow-y: auto;
  text-align: center;
}
.navbar .dropdown-item { font-weight: 500; white-space: normal; }
.navbar .dropdown-toggle { cursor: pointer; }
.navbar .nav-item { text-align: center; }
@media (min-width: 992px) {
  .navbar .navbar-nav { gap: 0.25rem; }
  .navbar-expand-lg { justify-content: center; }
  .navbar .dropdown-menu { text-align: left; min-width: 14rem; width: max-content; max-width: 22rem; }
}
@media (min-width: 1200px) {
  .navbar .navbar-nav { gap: 0.5rem; }
  .navbar .navbar-nav .nav-link { padding: 0.6em 1.1em; }
}
main {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  max-width: 1000px;
  margin: 2rem auto;
  padding: 1rem;
}
.poster {
  flex: 1 1 320px;
  max-width: 400px;
  min-width: 240px;
  align-self: flex-start;
}
.poster img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 10px #0001;
}
.content {
  flex: 2 1 320px;
  min-width: 260px;
}
h1, h2, h3 {
  font-family: inherit;
  font-weight: 700;
  color: #243542;
}
.registration-btn {
  display: inline-block;
  background: #b8480f;
  color: #fff;
  font-size: 1.1em;
  padding: 0.75em 1.5em;
  border-radius: 10px;
  margin: 1.2em 0;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
}
.registration-btn:hover,
.registration-btn:focus {
  background: #f28d00;
  color: #222;
  outline: none;
}
.registration-btn.is-disabled {
  background: #595959;
  color: #fff;
  cursor: not-allowed;
}
.info-links a {
  color: #b8480f;
  text-decoration: underline;
}
.info-links {
  margin: 1.5em 0;
  font-size: 1.05em;
}
@media (max-width: 800px) {
  main { flex-direction: column; gap: 1rem; }
  .poster, .content { max-width: 100%; min-width: 0; }
}

/* Utilities */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Home page: orange panels in a responsive grid */
.home {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}
.home .panel {
  background: #ffa64c;
  color: #000;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 1rem;
}
.home .panel a { color: #1b2a6b; }
.home .panel img { max-width: 100%; height: auto; }
.home .panel h2 { color: #000; font-size: 1.1em; margin-top: 0; }
.home .panel p { margin: 0 0 0.9em; }
.home address { font-style: normal; margin-bottom: 0.9em; }
.home .about, .home .foray { text-align: center; }
.home .about p { text-align: justify; }
.home .logo-mark { display: block; margin: 0.5rem auto 1rem; width: 202px; }
.home .foray .panel-img, .home .foray img { width: 100%; }
.home .book img { float: right; margin: 0 0 1rem 1rem; max-width: 40%; }
.home .photo { max-width: 100%; height: auto; border-radius: 4px; }
@media (min-width: 900px) {
  .home {
    grid-template-columns: repeat(3, 1fr);
    grid-template-areas:
      "about foray poster"
      "book  book  poster"
      "book  book  photo";
  }
  .home .about { grid-area: about; }
  .home .foray { grid-area: foray; border: 0; background: none; padding: 0; }
  .home .poster-sale { grid-area: poster; }
  .home .book { grid-area: book; }
  .home .photo { grid-area: photo; }
}

/* Single-column text pages (about, membership, contacts, resources) */
main.page { display: block; max-width: 860px; }
main.page .content { min-width: 0; }
main.page address { font-style: normal; margin: 0 0 1em; }
main.page a { color: #b8480f; }
.history { margin-top: 2rem; }
.history h2 { font-size: 1.4em; }
.history h3 { margin: 1.4em 0 0.3em; font-size: 1.1em; }
.history p { margin: 0 0 0.9em; }
.history .signature { margin-top: 1.5em; font-style: italic; }
@media (min-width: 900px) {
  .history { column-count: 2; column-gap: 2.5rem; }
  .history h2 { column-span: all; }
  .history h3 { break-after: avoid; }
}
.history .source { margin-top: 1.5em; font-size: 0.9em; column-span: all; }

/* Breadcrumb and section sub-nav (pages that belong to a section) */
.page-breadcrumb { margin: 0 0 1rem; }
/* Breadcrumb placed between the nav and a wide two-column <main> (foray pages) */
body > .page-breadcrumb { max-width: 1000px; margin: 1rem auto 0; padding: 0 1rem; }
body > .page-breadcrumb + main { margin-top: 0.5rem; }
.page-breadcrumb .breadcrumb { margin: 0; font-size: 0.95em; --bs-breadcrumb-divider-color: #243542; --bs-breadcrumb-item-active-color: #243542; }
.page-breadcrumb .breadcrumb a { color: #b8480f; }
/* Sub-nav: light bar directly under the dark main nav, smaller type, underline marks the current page */
.subnav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  padding: 0.35rem 1rem;
  background: #fde2bd;
  border-bottom: 3px solid #ee722a;
  font-size: 0.95rem;
}
.subnav .subnav-title {
  color: #243542;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  text-decoration: none;
  padding: 0.3em 0;
  line-height: 1.5;
  border-bottom: 3px solid transparent;
}
/* The divider belongs to the list, not the title link, so the title's hover/active underline hugs the text only. */
.subnav .nav::before { content: ""; align-self: center; width: 1px; height: 1.1em; background: #243542; opacity: 0.4; margin-right: 0.5rem; }
.subnav .nav { display: flex; flex-wrap: wrap; gap: 0 0.25rem; margin: 0; padding: 0; list-style: none; }
.subnav .nav-link { color: #243542; line-height: 1.5; padding: 0.3em 0.7em; border-bottom: 3px solid transparent; border-radius: 0; font-weight: 500; }
.subnav .nav-link:hover, .subnav .nav-link:focus, .subnav .subnav-title:hover, .subnav .subnav-title:focus { color: #243542; border-bottom-color: #ee722a; outline: none; }
.subnav .nav-link.active, .subnav .subnav-title.active { border-bottom-color: #243542; font-weight: 700; }
@media (max-width: 991.98px) {
  .subnav { gap: 0; padding: 0.4rem 0.5rem; }
  .subnav .subnav-title { flex: 1 0 100%; text-align: center; }
  .subnav .nav::before { display: none; }
  .subnav .nav { justify-content: center; }
}

/* Past Forays directory and report list */
.foray-directory { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.foray-card { display: flex; flex-direction: column; border: 1px solid #d9d9d9; border-radius: 6px; background: #fff; overflow: hidden; }
.foray-card img { display: block; width: 100%; height: auto; aspect-ratio: 420 / 544; object-fit: cover; object-position: top; background: #f5f5f5; }
.foray-card-body { padding: 0.75rem 1rem 1rem; }
.foray-card h3 { margin: 0 0 0.4rem; font-size: 1.15em; }
.foray-card p { margin: 0 0 0.4rem; }
.foray-place { color: #243542; }
.foray-dates { font-weight: 600; }
.foray-status { font-style: italic; }
/* Media card: text on the left, image on the right; the whole card is the link target */
.report-list { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.media-card { position: relative; display: flex; align-items: stretch; justify-content: space-between; gap: 1rem; border: 1px solid #d9d9d9; border-radius: 6px; background: #fff; overflow: hidden; }
.media-card:hover, .media-card:focus-within { border-color: #ee722a; box-shadow: 0 2px 8px rgba(36, 53, 66, 0.15); }
.media-card-body { padding: 0.9rem 0 0.9rem 1rem; min-width: 0; }
.media-card h3 { margin: 0 0 0.3rem; font-size: 1.3em; }
.media-card p { margin: 0 0 0.4rem; }
.media-card-img { flex: 0 0 110px; width: 110px; height: auto; align-self: stretch; object-fit: cover; object-position: top; background: #f5f5f5; }
.stretched-link::after { content: ""; position: absolute; inset: 0; }

/* science.html: article lists */
.science-list { list-style: none; padding-left: 0; }
.science-list li { margin-bottom: 1rem; }
.science-list .science-authors { display: block; }
/* Resources pages: reference lists, group banners, small logos */
.citations li { margin: 0 0 1rem; }
.group-banners { list-style: none; margin: 0; padding: 0; }
.group-banners li { margin: 0 0 1.25rem; }
.group-banners img { max-width: 100%; height: auto; }
.resource-logo { width: 56px; height: auto; }

/* Omphalina: issue cover grid, current issue, submission guidelines */
.issue-grid { list-style: none; margin: 1rem 0; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.issue-card a { display: block; text-decoration: none; text-align: center; }
.issue-card img { display: block; width: 100%; height: auto; margin-bottom: 0.4rem; border: 1px solid #d9d9d9; border-radius: 4px; background: #f5f5f5; }
.issue-card a:hover img, .issue-card a:focus-visible img { border-color: #ee722a; box-shadow: 0 2px 8px rgba(36, 53, 66, 0.2); }
.issue-label { font-weight: 600; color: #243542; }
.current-issue { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.current-issue > div { flex: 1 1 320px; min-width: 0; }
.current-issue img { display: block; width: 240px; max-width: 100%; height: auto; border: 1px solid #d9d9d9; border-radius: 4px; }
.submission { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.submission > div { flex: 1 1 320px; min-width: 0; }
.submission img { max-width: 100%; height: auto; }

/* Species list pages */
.media-card-extra { position: relative; z-index: 1; }
/* Flickr image pages: phylum lists with sample grids, and image tiles */
.flickr-index { display: grid; gap: 1.5rem; grid-template-columns: 1fr; align-items: start; }
.flickr-index h2 { font-size: 1.3em; }
.flickr-index h3 { font-size: 1.1em; margin: 1rem 0 0.4rem; }
.flickr-samples { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.flickr-samples img, .flickr-tiles img, .flickr-genera { max-width: 100%; height: auto; }
.flickr-tiles { list-style: none; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: 1rem; }
@media (min-width: 900px) { .flickr-index { grid-template-columns: 1fr auto 1fr; } .flickr-samples { flex-direction: column; flex-wrap: nowrap; } }
/* 404 page */
main.not-found { display: block; text-align: center; padding: 2rem 1rem 3rem; }
.not-found-code { margin: 0; font-size: clamp(4rem, 16vw, 8rem); font-weight: 800; line-height: 1; color: #243542; display: flex; align-items: center; justify-content: center; gap: 0.05em; }
.not-found-code img { width: 0.9em; height: 0.9em; transform: rotate(-8deg); }
main.not-found h1 { margin: 0.25rem 0 0.75rem; font-size: clamp(1.6rem, 5vw, 2.4rem); color: #b8480f; }
.not-found-eyebrow { margin: 0.5rem 0 0; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: #243542; }
.not-found-line[hidden] { display: none; }
.not-found-lead { max-width: 34rem; margin: 0 auto 1.5rem; font-size: 1.1em; }
.not-found-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
main.not-found a.not-found-btn { display: inline-block; padding: 0.6em 1.4em; border-radius: 10px; background: #b8480f; color: #fff; font-weight: 600; text-decoration: none; }
main.not-found a.not-found-btn:hover, main.not-found a.not-found-btn:focus-visible { background: #243542; color: #fff; }
/* Site footer (generated by scripts/apply_layout.rb from layout/footer.yml) */
footer.site-footer { background: #243542; color: #fff; text-align: left; padding: 0; margin-top: 3rem; border-top: 4px solid #ee722a; font-size: 1em; }
.site-footer a { color: #ffd3b8; text-decoration: none; }
.site-footer a:hover, .site-footer a:focus-visible { color: #fff; text-decoration: underline; }
.site-footer a:focus-visible { outline: 2px solid #ffd3b8; outline-offset: 2px; border-radius: 2px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.footer-inner { max-width: 1000px; margin: 0 auto; padding: 2rem 1rem 1.25rem; display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
.footer-brand img { display: block; width: 56px; height: 56px; margin-bottom: 0.5rem; }
.footer-brand p { margin: 0 0 0.5rem; max-width: 22rem; }
.footer-brand .footer-name { font-size: 1.15em; font-weight: 700; }
.footer-social { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; margin-top: 0.75rem !important; }
.footer-col h2 { margin: 0 0 0.6rem; font-size: 0.95em; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; border-bottom: 2px solid #ee722a; display: inline-block; padding-bottom: 0.2rem; }
.footer-col li { margin: 0 0 0.35rem; }
.footer-next-foray { width: min(968px, calc(100% - 2rem)); box-sizing: border-box; margin: 0 auto 1rem; padding: 0.75rem 1rem; background: #1b2832; border-left: 4px solid #ee722a; }
.footer-next-foray[hidden] { display: none; }
.footer-next-foray strong { color: #fff; }
.footer-bar { border-top: 1px solid #3a4f60; }
.footer-bar { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between; max-width: 1000px; margin: 0 auto; padding: 1rem; font-size: 0.92em; }
.footer-bar p { margin: 0; }
.footer-bar ul { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; }
@media (max-width: 800px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }
