.search-shell{display:inline-flex;align-items:center;margin-left:auto;padding-left:25px}
.search-shell+.accessibility-shell{margin-left:0;padding-left:8px}
.search-trigger{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:42px;min-height:42px;border:1px solid rgba(21,37,30,.22);border-radius:999px;background:transparent;color:var(--ink);padding:9px 12px;font:500 11px 'DM Mono',monospace;letter-spacing:.04em;cursor:pointer}
.search-trigger svg{width:18px;height:18px;stroke:currentColor;stroke-width:1.8;fill:none}
.search-trigger:hover,.search-trigger:focus-visible{border-color:var(--accent);outline:2px solid var(--accent);outline-offset:2px}
.search-backdrop[hidden]{display:none}
.search-backdrop{position:fixed;inset:0;z-index:1200;display:grid;place-items:start center;padding:clamp(78px,12vh,138px) 16px 28px;background:rgba(15,25,20,.66);overflow:auto}
.search-dialog{width:min(760px,100%);max-height:min(760px,calc(100vh - 110px));display:flex;flex-direction:column;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:18px;box-shadow:0 28px 90px rgba(10,20,15,.38);overflow:hidden}
.search-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 24px 14px}
.search-dialog-title{margin:0;font:500 clamp(25px,4vw,36px)/1.1 Fraunces,serif}
.search-close{flex:0 0 42px;width:42px;height:42px;border:0;border-radius:50%;background:transparent;color:var(--ink);font-size:29px;line-height:1;cursor:pointer}
.search-close:hover,.search-close:focus-visible{background:rgba(104,118,111,.15);outline:2px solid var(--accent);outline-offset:2px}
.search-form{padding:0 24px 18px}
.search-label{display:block;margin:0 0 8px;font:500 11px 'DM Mono',monospace;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.search-input{box-sizing:border-box;width:100%;min-height:50px;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);padding:12px 15px;font:16px/1.4 'DM Sans',sans-serif}
.search-input:focus-visible{border-color:var(--accent);outline:3px solid color-mix(in srgb,var(--accent) 45%,transparent);outline-offset:2px}
.search-status{min-height:24px;margin:0;padding:0 24px 12px;color:var(--muted);font:12px/1.5 'DM Mono',monospace}
.search-results{margin:0;padding:0 12px 22px;list-style:none;overflow:auto;overscroll-behavior:contain}
.search-result{border-top:1px solid var(--line)}
.search-result-link{display:grid;grid-template-columns:112px minmax(0,1fr);gap:16px;padding:16px 12px;color:inherit;text-decoration:none;border-radius:10px}
.search-result-link:hover,.search-result-link:focus-visible{background:rgba(104,118,111,.1);outline:2px solid var(--accent);outline-offset:-2px}
.search-result-image{width:112px;height:78px;object-fit:cover;border-radius:8px;background:rgba(104,118,111,.12)}
.search-result-copy{min-width:0}
.search-result-kind{display:block;margin-bottom:4px;color:var(--accent);font:500 10px 'DM Mono',monospace;letter-spacing:.06em;text-transform:uppercase}
.search-result-title{display:block;font:500 21px/1.2 Fraunces,serif}
.search-result-excerpt{display:block;margin-top:6px;color:var(--muted);font:14px/1.5 'DM Sans',sans-serif}
html.theme-dark .search-dialog{box-shadow:0 28px 90px rgba(0,0,0,.66)}
html.theme-contrast .search-trigger,html.theme-contrast .search-dialog,html.theme-contrast .search-input{border:3px solid #000;box-shadow:none;background:#fff;color:#000}
html.theme-contrast .search-result-link:hover,html.theme-contrast .search-result-link:focus-visible{background:#fff;outline:4px solid #000}
body.search-open{overflow:hidden}
@media(max-width:800px){.search-shell{padding-left:8px}.search-shell+.accessibility-shell{padding-left:5px}.search-trigger{padding:8px 10px}.search-trigger-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.search-backdrop{padding:72px 10px 14px}.search-dialog{max-height:calc(100vh - 86px);border-radius:14px}.search-dialog-header{padding:18px 18px 12px}.search-form{padding:0 18px 15px}.search-status{padding:0 18px 10px}.search-result-link{grid-template-columns:86px minmax(0,1fr);gap:12px}.search-result-image{width:86px;height:68px}.search-result-title{font-size:18px}}
@media(max-width:430px){.search-shell{margin-left:0;justify-self:center;padding-left:0}.search-result-link{grid-template-columns:1fr}.search-result-image{width:100%;height:auto;max-height:165px}.search-dialog-header{padding-top:14px}}
@media(prefers-reduced-motion:reduce){.search-backdrop,.search-dialog{scroll-behavior:auto}}

/* Center navigation; keep local website tools together in the fixed footer. */
body>nav{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px 20px}
body>nav>.brand{grid-column:1;justify-self:start;min-width:0;max-width:100%}
body>nav>.header-links,body>nav>div{position:static;transform:none;grid-column:2;display:flex!important;align-items:center;justify-self:center;justify-content:center;gap:22px;margin:0;padding:0;white-space:nowrap}
body>nav>.header-links a,body>nav>.header-links a:first-child,body>nav>div a,body>nav>div a:first-child{margin-left:0}
body>footer{height:auto!important;min-height:48px;padding:7px 6vw!important;gap:12px}
body>footer>.site-credits{min-width:0;margin-left:auto}
.footer-tools{display:flex!important;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 10px;flex:1 1 auto;margin:0 12px;min-width:0}
.footer-tools>.search-shell,.footer-tools>.accessibility-shell{display:inline-flex!important;margin:0;padding:0}
.footer-tools .search-trigger,.footer-tools .accessibility-trigger{min-height:28px;padding:3px 5px;color:#f3f0f5;border:0;border-radius:0;background:transparent;box-shadow:none;font-size:11px;text-decoration:none}
.footer-tools .search-trigger:hover,.footer-tools .accessibility-trigger:hover{text-decoration:underline;text-underline-offset:3px}
.footer-tools .search-trigger:focus-visible,.footer-tools .accessibility-trigger:focus-visible{outline:2px solid currentColor;outline-offset:2px}
.footer-tools .search-trigger-label{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto;white-space:nowrap}
html.theme-contrast .footer-tools .search-trigger,html.theme-contrast .footer-tools .accessibility-trigger{color:#000;background:#fff;border:0}
@media(max-width:1100px){body>nav{grid-template-columns:1fr;gap:8px}body>nav>.brand{grid-column:1;justify-self:center}body>nav>.header-links,body>nav>div{grid-column:1;gap:clamp(16px,4vw,24px)}body>footer{display:grid!important;grid-template-columns:auto minmax(0,1fr);padding:6px 7vw!important;gap:4px 12px}body>footer>.footer-tools{grid-column:1/-1;justify-self:center;margin:3px 0 0}}

/* Keep the existing logo, report link and credits on one compact footer row. */
.footer-tools .accessibility-trigger>span{margin:0;line-height:1}
@media(max-width:1100px){body>footer{grid-template-columns:auto minmax(0,1fr) auto;padding:6px 4vw!important;gap:4px 6px}body>footer>.footer-home{grid-column:1;grid-row:1}body>footer>.wwc-report-footer-link{grid-column:2;grid-row:1;justify-self:start;width:auto!important;margin:0!important;max-width:100%;font-size:9px!important;line-height:1.3!important}body>footer>.wwc-report-footer-link span{margin:0}body>footer>.site-credits{grid-column:3;grid-row:1;max-width:none;margin:0;gap:1px!important}body>footer>.site-credits .site-credit{min-height:16px}body>footer>.footer-tools{grid-column:1/-1;grid-row:2}}

/* Reserve the approved header font footprints while web fonts load.
   Glyphs can redraw without moving the logo or the navigation anchors. */
body>nav>.brand{width:298.28125px}
body>nav>.brand::before{white-space:nowrap}



@media(max-width:800px){body>nav>.brand{width:254.921875px}}

/* Anchor the tool group to the viewport midpoint, independent of side widths.
   Stack below the links before the groups can collide. */
@media(min-width:1801px){
  body>footer>.footer-tools{position:absolute;left:50%;transform:translateX(-50%);flex:none;margin:0;width:max-content}
}
@media(min-width:1101px) and (max-width:1800px){
  body>footer{display:grid!important;grid-template-columns:auto 1fr auto;gap:4px 12px}
  body>footer>.footer-home{grid-column:1;grid-row:1}
  body>footer>.wwc-report-footer-link{grid-column:2;grid-row:1}
  body>footer>.site-credits{grid-column:3;grid-row:1}
  body>footer>.footer-tools{grid-column:1/-1;grid-row:2;justify-self:center;margin:0}
}
@media(max-width:1800px){body>footer>.site-credits{gap:4px 14px!important}}

/* Website tools return to the right of the header. */
body>nav>.header-tools{grid-column:3;grid-row:1;justify-self:end;display:flex;align-items:center;gap:6px;min-width:0}
.header-tools>.search-shell,.header-tools>.accessibility-shell{display:inline-flex!important;margin:0;padding:0}
.header-tools .search-trigger,.header-tools .accessibility-trigger{min-height:44px}
.header-tools .accessibility-menu{position:absolute;top:calc(100% + 12px);bottom:auto;right:0;box-sizing:border-box;max-height:calc(100dvh - 130px);overflow-y:auto}
body.accessibility-open>nav{z-index:1300}
@media(max-width:1100px){body>nav{grid-template-columns:minmax(0,1fr) auto}body>nav>.brand{grid-column:1;grid-row:1;justify-self:start}body>nav>.header-links{grid-column:1/-1;grid-row:2;justify-self:center}body>nav>.header-tools{grid-column:2;grid-row:1}}
@media(max-width:600px){body>nav{gap:6px 8px}body>nav>.brand{grid-column:1/-1;grid-row:1;justify-self:center}body>nav>.header-links{grid-column:1;grid-row:2;justify-self:start;font-size:12px;gap:8px}body>nav>.header-tools{grid-column:2;grid-row:2;gap:4px}.header-tools .search-trigger,.header-tools .accessibility-trigger{width:42px;padding:8px;justify-content:center}}

/* A natural page ending; links wrap and grow with the available space. */
.footer-privacy-full, .footer-privacy-short { margin: 0 !important; }
.footer-privacy-short { display: none; }
body > footer {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  height: auto !important;
  min-height: 72px;
  padding: 12px max(24px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)) !important;
}
body > footer > .footer-home { flex: 0 0 28px; width: 28px; height: 44px; }
body > footer > a.wwc-report-footer-link {
  flex: 0 0 auto;
  width: auto !important;
  max-width: none;
  margin: 0 !important;
  min-height: 44px !important;
  font-size: 12px !important;
  letter-spacing: .01em !important;
  white-space: normal;
}
body > footer > a.wwc-report-footer-link span { margin: 0; }
body > footer > .site-credits {
  display: flex;
  flex: 0 1 auto;
  flex-direction: row !important;
  flex-wrap: wrap;
  align-items: center !important;
  justify-content: flex-end;
  width: auto;
  max-width: none;
  margin: 0 0 0 auto;
  gap: 20px !important;
  border: 0;
}
body > footer > .site-credits a.site-credit {
  min-height: 44px !important;
  font-size: 12px !important;
  letter-spacing: .01em !important;
  white-space: normal;
}
body { padding-bottom: 0; }
body > .back-to-top, .category-back {
  bottom: calc(var(--wwc-footer-overlap, 0px) + var(--wwc-floating-nav-clearance) + env(safe-area-inset-bottom)) !important;
}
@media (max-width: 600px) {
  .footer-privacy-full { display: none; }
  .footer-privacy-short { display: inline; }
  body > footer { gap: 8px; padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right)) !important; }
  body > footer > a.wwc-report-footer-link,
  body > footer > .site-credits a.site-credit { font-size: 11px !important; }
  body > footer > .site-credits { gap: 14px !important; }
}

/* Give shared navigation real touch space without device-specific layouts. */
body > nav { padding-inline: clamp(16px, 4vw, 64px); }
body > nav > .header-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
}
@media (max-width: 600px) {
  body > nav { padding: 8px 16px 10px; gap: 8px; }
  body > nav > .header-links { gap: 10px; }
}

/* Compact logo-only header. Full navigation appears when its contents fit. */
body > nav {
  grid-template-columns:44px minmax(0,1fr) auto;
  gap:16px;
  padding:6px max(16px, calc((100% - 1120px)/2));
  min-height:56px;
}
body > nav > .brand {
  grid-column:1;grid-row:1;justify-self:start;
  width:44px;height:44px;display:flex;align-items:center;justify-content:center;
  margin:0;
}
body > nav > .brand::before { content:none; }
body > nav > .brand > .brand-logo {width:40px;height:40px;margin:0;order:0;}
body > nav > .header-links {grid-column:2;grid-row:1;justify-self:center;gap:28px;}
body > nav > .header-tools {grid-column:3;grid-row:1;gap:4px;}
.header-tools .search-trigger,.header-tools .accessibility-trigger,.header-menu-toggle {
  display:inline-flex;align-items:center;justify-content:center;
  width:44px;height:44px;min-height:44px;padding:10px;
  color:var(--ink);border:0;border-radius:8px;background:transparent;
}
.header-tools .search-trigger-label {display:none;}
.header-tools .accessibility-trigger {font-size:0;}
.header-tools .accessibility-trigger > span {font-size:21px;}
.header-menu-toggle {display:none;cursor:pointer;}
.header-menu-toggle svg {width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;}
.header-menu-toggle:focus-visible,body > nav > .brand:focus-visible {outline:2px solid currentColor;outline-offset:2px;}
@media(max-width:719px){
  body > nav {grid-template-columns:44px minmax(0,1fr) auto;gap:8px;padding:6px 16px;}
  body > nav > .header-links {display:none!important;}
  .header-menu-toggle {display:inline-flex;}
  body > nav.menu-open > .header-links {
    display:flex!important;grid-column:1/-1;grid-row:2;justify-self:stretch;
    flex-direction:column;align-items:stretch;gap:0;padding:12px 0 20px;
    white-space:normal;
  }
  body > nav.menu-open > .header-links a {width:auto;justify-content:flex-start;font-size:20px;min-height:56px;margin:0;}
  body > nav.menu-open .header-menu-toggle svg {transform:rotate(90deg);}
}
.header-tools > .header-menu-toggle {order:3;}
html.theme-dark .brand-logo {filter:brightness(1.9);}
html.theme-contrast .brand-logo {filter:grayscale(1) brightness(0);}
/* Preserve the mascot's original colors in every theme. */
html.theme-dark body > nav .brand-logo,
html.theme-contrast body > nav .brand-logo {filter:none;}
/* Mobile navigation overlays content at every scroll position. */
@media(max-width:719px){
  body > nav.menu-open > .header-links {
    position:absolute;
    top:100%;left:0;right:0;
    transform:none;
    padding:12px 24px 20px;
    background:var(--wwc-header-granite);
    box-shadow:0 12px 18px rgba(21, 14, 32, .14);
    max-height:calc(100dvh - 56px);
    overflow-y:auto;
  }
  html.theme-dark body > nav.menu-open > .header-links {background:var(--paper);}
  html.theme-contrast body > nav.menu-open > .header-links {background:#fff;border-bottom:2px solid #000;}
}

/* Wildlife-log navigation uses the actual label width, including renamed labels. */
body>nav>.header-links>a{width:auto;flex-shrink:0;}

/* Use the same selected-page color for every primary navigation destination. */
body>nav>.header-links>a[aria-current="page"]{color:var(--accent);text-decoration:none;}
