/* Shared navigation: present on every page */
.top-bar, .dropdown, .side-menu { font-family: Helvetica, Arial, sans-serif; font-weight: 400; }
.top-bar, .top-bar * , .dropdown, .dropdown *, .side-menu, .side-menu * { box-sizing: border-box; }
.top-bar {
  width: 100%; height: 60px; background: white;
  display: flex; justify-content: flex-end; align-items: center;
  padding: 0 30px 0 20px; position: fixed; top: 0; left: 0; z-index: 1000;
}
.hamburger {
  cursor: pointer; width: 30px; height: 22px; padding: 0; border: 0;
  background: transparent; display: flex; flex-direction: column;
  justify-content: space-between;
}
.hamburger span { display: block; width: 100%; height: 4px; background: black; border-radius: 2px; }
.dropdown {
  display: none; position: fixed; top: 60px; right: 20px;
  background: white; border: 1px solid #ccc;
  box-shadow: 0 4px 6px rgba(0,0,0,.1); z-index: 999;
}
.dropdown a { display: block; padding: 10px 20px; text-decoration: none; color: #000 !important; white-space: nowrap; }
.dropdown a:hover { background: #f0f0f0; text-decoration: none; }
.side-menu {
  position: fixed; top: 0; right: -100%; width: 80%; height: 100vh;
  height: 100dvh; background: black; color: white;
  display: flex; flex-direction: column; align-items: flex-start;
  padding: 60px 20px; transition: right .3s ease-in-out; z-index: 999;
  overflow-y: auto;
}
.side-menu a, .side-menu a:link, .side-menu a:visited, .side-menu a:active {
  color: white !important; text-decoration: none; font-size: 24px; margin: 20px 0;
}
.side-menu a:hover { color: white !important; text-decoration: underline; }
@media (orientation: portrait) { .dropdown { display: none !important; } }
@media (orientation: landscape) { .side-menu { display: none !important; } }

/* Automatic dark-background variant. Typography and geometry remain identical. */
html.nav-dark .top-bar { background: #000; }
html.nav-dark .hamburger span { background: #fff; }
html.nav-dark .dropdown { background: #000; border-color: #444; box-shadow: 0 4px 6px rgba(0,0,0,.35); }
html.nav-dark .dropdown a,
html.nav-dark .dropdown a:link,
html.nav-dark .dropdown a:visited,
html.nav-dark .dropdown a:active { color: #fff !important; }
html.nav-dark .dropdown a:hover { background: #222; color: #fff !important; text-decoration: none; }

/* Static footer: ordinary HTML links, functional even when JavaScript is disabled. */
.site-footer {
  display: block; position: relative; clear: both;
  width: 100%; box-sizing: border-box;
  padding: 22px 14px 20px; margin: 0 auto;
  text-align: center; background: transparent;
  font-family: Helvetica, Arial, sans-serif;
  font-size: 12px; font-weight: 300; line-height: 1.8;
  letter-spacing: normal;
}
.site-footer-row { display: block; }
.site-footer-row + .site-footer-row { margin-top: 2px; }
.site-footer a, .site-footer a:link, .site-footer a:visited {
  color: #404040 !important; text-decoration: none !important;
  font: inherit;
}
.site-footer a:hover, .site-footer a:focus-visible {
  color: #000 !important; text-decoration: underline !important;
}
.site-footer-sep { color: #888; margin: 0 3px; }
/* Cancel the homepage legacy footer-link margins for uniform spacing. */
.site-footer .site-footer-row a { margin: 0 !important; }
/* Reel pages have explicitly black backgrounds; this works without JavaScript. */
body.reel-dark .site-footer a, body.reel-dark .site-footer a:link,
body.reel-dark .site-footer a:visited { color: #aaa !important; }
body.reel-dark .site-footer a:hover, body.reel-dark .site-footer a:focus-visible {
  color: #fff !important; text-decoration: underline !important;
}
body.reel-dark .site-footer-sep { color: #777; }
@media (max-width: 480px) {
  .site-footer { padding-left: 10px; padding-right: 10px; }
  .site-footer-sep { margin: 0 2px; }
}

/* Consistent 15% smaller footer text on portrait phones across all pages. */
@media (orientation: portrait) and (max-width: 600px) {
  .site-footer, #text2.site-footer { font-size: 10.2px; }
}

/* Landscape phones: match the existing portrait-phone footer size.
   Desktop and tablet landscape retain the original 12px. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 950px) and (pointer: coarse) {
  .site-footer, #text2.site-footer { font-size: 10.2px; }
}

/* Mobile footer sizing in both orientations. Override mobile browser text
   inflation and inherited site-specific font rules (including #text2). */
@media (max-width: 950px) and (pointer: coarse),
       (orientation: portrait) and (max-width: 600px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  footer.site-footer, footer#text2.site-footer {
    font-size: 9px !important;
    line-height: 1.8;
  }
  footer.site-footer .site-footer-row,
  footer.site-footer .site-footer-row a,
  footer.site-footer .site-footer-row .site-footer-sep {
    font-size: inherit !important;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}
