/*
 * Site header and footer, on every page. Drawn in the paper look (see
 * shared/paper.css): ink outlines, solid offset shadows, teal accents.
 * Kept compact so the home and request pages fit on one screen.
 */

/* What shows behind the phone's browser bar and home indicator, and past
   the page edge when it bounces: the footer's ink, not white. */
html {
  background-color: #333333;
}

/* Page height = the screen you can actually see. On phones 100vh counts the
   browser bar as hidden, which made short pages scroll. */
body.static-footer-layout {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Home (fixed footer): a column that fills the screen exactly; the body's
   bottom padding keeps clear of the footer. */
body:has(> main > .home-container) {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

body:has(> main > .home-container) > main {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-flex: 1;
      -ms-flex: 1 0 auto;
          flex: 1 0 auto;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 1000;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  gap: 24px;
  padding: 10px max(24px, calc((100% - 1240px) / 2));
  /* Clear the notch when installed as an app (viewport-fit=cover). */
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  border-bottom: 2px dashed rgba(51, 51, 51, 0.3);
}

.site-header .logo-container {
  -webkit-box-flex: 0;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto;
}

.site-header .logo-link {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 8px;
  color: #1f1a17;
  text-decoration: none;
}

.site-header .logo-link:hover {
  color: #1f1a17;
  text-decoration: none;
}

.site-header #main-logo {
  display: block;
  width: 50px;
  height: 50px;
  -o-object-fit: contain;
     object-fit: contain;
  -webkit-transition: -webkit-transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: -webkit-transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), -webkit-transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.site-header .logo-link:hover #main-logo {
  -webkit-transform: rotate(-6deg);
      -ms-transform: rotate(-6deg);
          transform: rotate(-6deg);
}

.site-header .logo-word {
  font-family: "Lora", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}

.site-header nav {
  -webkit-box-flex: 0;
      -ms-flex: 0 1 auto;
          flex: 0 1 auto;
}

#menu {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

#menu li {
  margin: 0;
}

.site-header .nav-link {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 7px;
  padding: 8px 13px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  color: #2a211c;
  text-decoration: none;
  border: 2.5px solid transparent;
  border-radius: 12px;
  -webkit-transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    -webkit-transform 0.15s ease,
    -webkit-box-shadow 0.15s ease;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    -webkit-transform 0.15s ease,
    -webkit-box-shadow 0.15s ease;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease,
    -webkit-transform 0.15s ease,
    -webkit-box-shadow 0.15s ease;
}

.site-header .nav-link:hover {
  color: #2a211c;
  text-decoration: none;
  background: rgba(255, 248, 242, 0.5);
  border-color: rgba(51, 51, 51, 0.35);
}

/* The page you're on: a paper tab. */
.site-header .nav-link.active {
  font-weight: 700;
  background: #f6e2d2;
  border-color: #333333;
  -webkit-box-shadow: 3px 3px 0 #333333;
          box-shadow: 3px 3px 0 #333333;
}

.site-header .nav-link:focus-visible {
  outline: 3px solid #005a9c;
  outline-offset: 2px;
}

.site-header .nav-icon {
  width: 18px;
  height: 18px;
  margin: 0;
}

/* Contact and install: small outlined squares. */
.site-header .nav-actions {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 12px;
  margin-left: 26px;
}

.site-header .nav-action,
.site-header #install_app {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 6px;
  background: #fbefe5;
  border: 2.5px solid #333333;
  border-radius: 12px;
  -webkit-box-shadow: 3px 3px 0 #333333;
          box-shadow: 3px 3px 0 #333333;
  cursor: pointer;
  -o-object-fit: contain;
     object-fit: contain;
  -webkit-transition:
    -webkit-transform 0.15s ease,
    -webkit-box-shadow 0.15s ease;
  transition:
    -webkit-transform 0.15s ease,
    -webkit-box-shadow 0.15s ease;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    -webkit-transform 0.15s ease,
    -webkit-box-shadow 0.15s ease;
}

/* Install: teal, so it stands out from the cream squares beside it. */
.site-header #install_app {
  background: #93f9e8;
}

.site-header #install_app .nav-action-icon {
  width: 24px;
  height: 24px;
}

.site-header #install_app[hidden] {
  display: none;
}

.site-header .nav-action:hover,
.site-header #install_app:hover {
  -webkit-transform: translate(-1px, -1px);
      -ms-transform: translate(-1px, -1px);
          transform: translate(-1px, -1px);
  -webkit-box-shadow: 4px 4px 0 #333333;
          box-shadow: 4px 4px 0 #333333;
}

.site-header .nav-action:active,
.site-header #install_app:active {
  -webkit-transform: translate(3px, 3px);
      -ms-transform: translate(3px, 3px);
          transform: translate(3px, 3px);
  -webkit-box-shadow: 0 0 0 #333333;
          box-shadow: 0 0 0 #333333;
}

.site-header .nav-action:focus-visible {
  outline: 3px solid #005a9c;
  outline-offset: 2px;
}

.site-header .nav-action-icon {
  width: 26px;
  height: 26px;
  -o-object-fit: contain;
     object-fit: contain;
}

/* Buy me a coffee: an icon square beside Contact on desktop, a menu row on
   phones (see the phone menu below). */
.site-header .nav-action--coffee {
  padding: 5px;
  text-decoration: none;
}

.site-header .nav-action--coffee.active {
  background: #93f9e8;
}

.site-header .nav-action--coffee .nav-action-icon {
  width: 28px;
  height: 28px;
}

/* Share cPage: an icon square beside the coffee on desktop. On a computer
   it opens WhatsApp and copies the link; share.ts puts "Link copied" in
   data-share-note, shown as a small bubble under it. */
.site-header .nav-action--share {
  position: relative;
  padding: 7px;
}

.site-header .nav-action--share[data-share-note]::after {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  z-index: 20;
  padding: 6px 10px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  pointer-events: none;
  content: attr(data-share-note);
  background: #2a211c;
  border-radius: 8px;
  -webkit-transform: translateX(-50%);
      -ms-transform: translateX(-50%);
          transform: translateX(-50%);
}

.site-header .nav-support {
  display: none;
}

/* The hamburger, its checkbox and the close icon belong to the phone menu. */
#menuToggle > input,
#menuToggle > .hamburgers,
.site-header .nav-close {
  display: none;
}

/* ---------- Phone menu ---------- */

/* The phone menu takes over at 56.25em: 900px at the usual 16px text size,
   and wider when the reader has set a bigger text size in the browser (media
   query em always follows that setting), so the full bar never runs off the
   screen. The same em values are used for every header breakpoint below. */
@media (max-width: 56.25em) {
  .site-header {
    padding: 8px 16px;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
  }

  .site-header #main-logo {
    width: 54px;
    height: 54px;
  }

  /* Never wider than the screen allows: at a very big text size (200% on a
     320px phone) the wordmark would push the menu button off the edge. At
     the usual sizes 13vw is the larger value, so nothing changes there. */
  .site-header .logo-word {
    font-size: 2.15rem;
    font-size: min(2.15rem, 13vw);
  }

  #menuToggle {
    position: relative;
    top: 0;
    left: 0;
    width: 40px;
    height: 32px;
    -webkit-user-select: none;
       -moz-user-select: none;
        -ms-user-select: none;
            user-select: none;
    -webkit-transition:
      top 0.3s ease,
      left 0.3s ease;
    transition:
      top 0.3s ease,
      left 0.3s ease;
  }

  /* Open: step in from the panel's edge so the close square sits inside it.
     (Offsets, not a transform: a transform would capture the fixed menu.) */
  #menuToggle:has(input:checked) {
    top: 8px;
    left: -10px;
  }

  /* An invisible checkbox over the three bars does the opening. */
  #menuToggle > input {
    position: absolute;
    inset: -6px;
    z-index: 2002;
    display: block;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    margin: 0;
    opacity: 0;
    cursor: pointer;
  }

  /* Three bars, 4px thick and 10px apart, centred in the 40x32 toggle. */
  #menuToggle > .hamburgers {
    position: absolute;
    left: 4px;
    z-index: 2001;
    display: block;
    width: 32px;
    height: 4px;
    margin: 0;
    background: #333333;
    border-radius: 3px;
    -webkit-transform-origin: 50% 50%;
        -ms-transform-origin: 50% 50%;
            transform-origin: 50% 50%;
    -webkit-transition:
      opacity 0.25s ease,
      -webkit-transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
    transition:
      opacity 0.25s ease,
      -webkit-transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
    transition:
      transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1),
      opacity 0.25s ease;
    transition:
      transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1),
      opacity 0.25s ease,
      -webkit-transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1);
  }

  #menuToggle > .hamburgers:nth-of-type(1) {
    top: 4px;
  }

  #menuToggle > .hamburgers:nth-of-type(2) {
    top: 14px;
  }

  #menuToggle > .hamburgers:nth-of-type(3) {
    top: 24px;
  }

  /* Open: the outer bars meet in the middle and cross. */
  #menuToggle input:checked ~ .hamburgers:nth-of-type(1) {
    -webkit-transform: translateY(10px) rotate(45deg) scaleX(0.78);
        -ms-transform: translateY(10px) rotate(45deg) scaleX(0.78);
            transform: translateY(10px) rotate(45deg) scaleX(0.78);
  }

  #menuToggle input:checked ~ .hamburgers:nth-of-type(2) {
    opacity: 0;
    -webkit-transform: scaleX(0.2);
        -ms-transform: scaleX(0.2);
            transform: scaleX(0.2);
  }

  #menuToggle input:checked ~ .hamburgers:nth-of-type(3) {
    -webkit-transform: translateY(-10px) rotate(-45deg) scaleX(0.78);
        -ms-transform: translateY(-10px) rotate(-45deg) scaleX(0.78);
            transform: translateY(-10px) rotate(-45deg) scaleX(0.78);
  }

  /* Open: an outlined square behind the X, like the pickers' close button. */
  #menuToggle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2001;
    width: 46px;
    height: 46px;
    background: #fbefe5;
    border: 2.5px solid #333333;
    border-radius: 12px;
    -webkit-box-shadow: 3px 3px 0 #333333;
            box-shadow: 3px 3px 0 #333333;
    opacity: 0;
    -webkit-transform: translate(-50%, -50%) scale(0.8);
        -ms-transform: translate(-50%, -50%) scale(0.8);
            transform: translate(-50%, -50%) scale(0.8);
    -webkit-transition:
      opacity 0.2s ease,
      -webkit-transform 0.2s ease;
    transition:
      opacity 0.2s ease,
      -webkit-transform 0.2s ease;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease;
    transition:
      opacity 0.2s ease,
      transform 0.2s ease,
      -webkit-transform 0.2s ease;
    pointer-events: none;
  }

  #menuToggle:has(input:checked)::before {
    opacity: 1;
    -webkit-transform: translate(-50%, -50%) scale(1);
        -ms-transform: translate(-50%, -50%) scale(1);
            transform: translate(-50%, -50%) scale(1);
  }

  /* The menu itself: a paper sheet that slides in from the right. */
  #menu {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 2000;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: stretch;
        -ms-flex-align: stretch;
            align-items: stretch;
    gap: 6px;
    width: min(300px, calc(100vw - 20px));
    padding: 70px 14px 16px;
    background: #f6e2d2;
    border: 3px solid #333333;
    border-radius: 18px;
    -webkit-box-shadow: 6px 6px 0 #333333;
            box-shadow: 6px 6px 0 #333333;
    -webkit-transform: translateX(calc(100% + 30px));
        -ms-transform: translateX(calc(100% + 30px));
            transform: translateX(calc(100% + 30px));
    visibility: hidden;
    -webkit-transition:
      visibility 0s linear 0.45s,
      -webkit-transform 0.45s cubic-bezier(0.77, 0.2, 0.05, 1);
    transition:
      visibility 0s linear 0.45s,
      -webkit-transform 0.45s cubic-bezier(0.77, 0.2, 0.05, 1);
    transition:
      transform 0.45s cubic-bezier(0.77, 0.2, 0.05, 1),
      visibility 0s linear 0.45s;
    transition:
      transform 0.45s cubic-bezier(0.77, 0.2, 0.05, 1),
      visibility 0s linear 0.45s,
      -webkit-transform 0.45s cubic-bezier(0.77, 0.2, 0.05, 1);
  }

  #menuToggle input:checked ~ #menu {
    -webkit-transform: none;
        -ms-transform: none;
            transform: none;
    visibility: visible;
    -webkit-transition:
      visibility 0s,
      -webkit-transform 0.45s cubic-bezier(0.77, 0.2, 0.05, 1);
    transition:
      visibility 0s,
      -webkit-transform 0.45s cubic-bezier(0.77, 0.2, 0.05, 1);
    transition:
      transform 0.45s cubic-bezier(0.77, 0.2, 0.05, 1),
      visibility 0s;
    transition:
      transform 0.45s cubic-bezier(0.77, 0.2, 0.05, 1),
      visibility 0s,
      -webkit-transform 0.45s cubic-bezier(0.77, 0.2, 0.05, 1);
  }

  .site-header .nav-link {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    padding: 12px 14px;
    font-size: 1.05rem;
  }

  .site-header .nav-link:hover {
    background: #efd3bf;
    border-color: transparent;
  }

  .site-header .nav-link.active {
    background: #dcf2ea;
  }

  .site-header .nav-icon {
    width: 22px;
    height: 22px;
  }

  .site-header .nav-actions {
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    margin: 8px 0 0;
    padding-top: 14px;
    border-top: 2px dashed #d6b39c;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header .nav-link,
  .site-header .nav-action,
  .site-header #install_app,
  .site-header #main-logo,
  #menu,
  #menuToggle > .hamburgers {
    -webkit-transition: none;
    transition: none;
  }
}

/* ---------- Footer ---------- */

.site-footer {
  width: 100%;
  font-family: "DM Sans", sans-serif;
  color: #f6efe9;
  background: #333333;
}

/* Pages with a fixed footer (home): it stays on screen. */
body:not(.static-footer-layout) .site-footer {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1000;
}

body.static-footer-layout .site-footer {
  position: relative;
  margin-top: auto;
}

.site-footer-inner {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -ms-flex-wrap: wrap;
      flex-wrap: wrap;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  gap: 6px 24px;
  padding: 13px max(24px, calc((100% - 1240px) / 2));
  /* Run the ink under the home indicator. */
  padding-bottom: calc(13px + env(safe-area-inset-bottom, 0px));
}

.site-footer p {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  font-size: 0.92rem;
  line-height: 1.4;
  color: #f6efe9;
}

.site-footer a {
  margin: 0;
  font-weight: 700;
  color: #93f9e8;
  text-decoration: none;
}

.site-footer a:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.site-footer .footer-brand a {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  color: #ffffff;
}

.site-footer .footer-links {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 20px;
  font-size: 0.92rem;
}

.site-footer a.designer-link {
  color: #93f9e8;
}

.site-footer a.designer-link:hover {
  color: #ffffff;
}

@media (max-width: 700px) {
  /* One short line on every page: copyright and maker, no link row. */
  .site-footer-inner {
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
        -ms-flex-direction: row;
            flex-direction: row;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    gap: 2px 14px;
    padding: 10px 16px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    text-align: center;
  }

  .site-footer p {
    font-size: 0.85rem;
  }

  .site-footer .footer-links {
    display: none;
  }

}

/* ---------- Back to top ---------- */

/* A teal square with an ink outline and a solid shadow. The script in
   partials/scripts.ejs fades it in after 200px of scrolling. */
#back-to-top {
  right: 24px;
  width: 52px;
  height: 52px;
  margin: 0;
  padding: 0;
  color: #333333;
  background: #93f9e8;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: 3px solid #333333;
  border-radius: 14px;
  -webkit-box-shadow: 4px 4px 0 #333333;
          box-shadow: 4px 4px 0 #333333;
  -webkit-transition:
    opacity 0.3s ease,
    -webkit-transform 0.16s ease,
    -webkit-box-shadow 0.16s ease;
  transition:
    opacity 0.3s ease,
    -webkit-transform 0.16s ease,
    -webkit-box-shadow 0.16s ease;
  transition:
    opacity 0.3s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
  transition:
    opacity 0.3s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease,
    -webkit-transform 0.16s ease,
    -webkit-box-shadow 0.16s ease;
}

#back-to-top:hover {
  color: #333333;
  background: #93f9e8;
  border-color: #333333;
  -webkit-transform: translate(-2px, -2px);
      -ms-transform: translate(-2px, -2px);
          transform: translate(-2px, -2px);
  -webkit-box-shadow: 6px 6px 0 #333333;
          box-shadow: 6px 6px 0 #333333;
}

#back-to-top:active {
  -webkit-transform: translate(4px, 4px);
      -ms-transform: translate(4px, 4px);
          transform: translate(4px, 4px);
  -webkit-box-shadow: 0 0 0 #333333;
          box-shadow: 0 0 0 #333333;
  -webkit-transition-duration: 0.06s;
          transition-duration: 0.06s;
}

#back-to-top:focus-visible {
  outline: 3px solid #005a9c;
  outline-offset: 3px;
}

#back-to-top svg {
  width: 26px;
  height: 26px;
  stroke-width: 3.2;
}

body.static-footer-layout #back-to-top {
  bottom: 28px;
}

@media (max-width: 768px) {
  #back-to-top {
    right: 16px;
    width: 48px;
    height: 48px;
  }

  body.static-footer-layout #back-to-top {
    bottom: 20px;
  }
}

/* ---------- University logo belt (src/frontend/logoBelt.ts) ---------- */

/* Logos drift slowly past; it fades in once the logo sprite has loaded, and
   the edges fade out so tiles slide in and out of view. */
.logo-belt {
  position: relative;
  width: 100%;
  overflow: hidden;
  opacity: 0;
  -webkit-transition: opacity 0.6s ease;
  transition: opacity 0.6s ease;
  -webkit-mask-image: -webkit-gradient(linear, left top, right top, from(transparent), color-stop(10%, #000), color-stop(90%, #000), to(transparent));
  -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
  mask-image: -webkit-gradient(linear, left top, right top, from(transparent), color-stop(10%, #000), color-stop(90%, #000), to(transparent));
  mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
}

.logo-belt.is-ready {
  opacity: 1;
}

.logo-belt-track {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 12px;
  width: -webkit-max-content;
  width: -moz-max-content;
  width: max-content;
  /* The tiles are added by script after the page loads. Holding their height
     (tile + padding) from the start stops the content above from jumping
     when they arrive: the request page's card is centred over the belt. */
  min-height: 57px;
  padding: 4px 4px 7px;
  -webkit-animation: logo-belt-drift 160s linear infinite;
          animation: logo-belt-drift 160s linear infinite;
}

.logo-belt:hover .logo-belt-track {
  -webkit-animation-play-state: paused;
          animation-play-state: paused;
}

.logo-belt-tile {
  -webkit-box-flex: 0;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto;
  width: 46px;
  height: 46px;
  background-color: #ffffff;
  background-image: var(--logo-belt-sprite);
  background-repeat: no-repeat;
  background-size: var(--logo-belt-grid);
  border: 2px solid #333333;
  border-radius: 11px;
  -webkit-box-shadow: 2px 2px 0 #333333;
          box-shadow: 2px 2px 0 #333333;
}

/* The track holds two copies, so moving it by half loops seamlessly. */
@-webkit-keyframes logo-belt-drift {
  from {
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }
  to {
    -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
  }
}
@keyframes logo-belt-drift {
  from {
    -webkit-transform: translateX(0);
            transform: translateX(0);
  }
  to {
    -webkit-transform: translateX(-50%);
            transform: translateX(-50%);
  }
}

@media (max-width: 600px) {
  .logo-belt-tile {
    width: 40px;
    height: 40px;
  }

  .logo-belt-track {
    min-height: 51px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .logo-belt-track {
    -webkit-animation: none;
            animation: none;
  }
}

.site-header .logo-picture {
  display: block;
  -webkit-box-flex: 0;
      -ms-flex: 0 0 auto;
          flex: 0 0 auto;
}

/* ---------- Holiday logo: shown instead of the plain one while on ---------- */

.site-header .logo-season {
  display: none;
}

html.has-season .site-header .logo-season {
  display: block;
}

/* Includes the id: .site-header #main-logo (display: block) would win otherwise.
   The class comes from the server, so no :has() is needed. */
html.has-season .site-header .logo-link.has-season-logo #main-logo {
  display: none;
}

.site-header .logo-season img {
  display: block;
  width: 50px;
  height: 50px;
  -o-object-fit: contain;
     object-fit: contain;
  -webkit-transition: -webkit-transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: -webkit-transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275), -webkit-transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.site-header .logo-link:hover .logo-season img {
  -webkit-transform: rotate(-6deg);
      -ms-transform: rotate(-6deg);
          transform: rotate(-6deg);
}

@media (max-width: 56.25em) {
  .site-header .logo-season img {
    width: 54px;
    height: 54px;
  }
}

/* ---------- Holiday switch ---------- */

/* Footer on desktop, side menu on phones; only rendered while a season is
   on. "On" means the holiday look is showing. */
.season-switch {
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 10px;
  margin: 0;
  padding: 4px 2px;
  font-family: "DM Sans", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
  background: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.season-switch:hover {
  background: none;
}

.season-switch:focus-visible {
  outline: 3px solid #93f9e8;
  outline-offset: 3px;
}

.season-switch-track {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  background: #8a7366;
  border: 2px solid #f6efe9;
  border-radius: 999px;
  -webkit-transition: background-color 0.18s ease;
  transition: background-color 0.18s ease;
}

.season-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #f6efe9;
  border-radius: 50%;
  -webkit-transition: -webkit-transform 0.18s ease;
  transition: -webkit-transform 0.18s ease;
  transition: transform 0.18s ease;
  transition: transform 0.18s ease, -webkit-transform 0.18s ease;
}

.season-switch[aria-checked="true"] .season-switch-track {
  background: #2bbf6e;
}

.season-switch[aria-checked="true"] .season-switch-thumb {
  -webkit-transform: translateX(18px);
      -ms-transform: translateX(18px);
          transform: translateX(18px);
}

/* In the footer: light on ink. */
.site-footer .footer-season {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

.site-footer .season-switch {
  color: #f6efe9;
}

/* In the side menu: ink on paper. */
.site-header .nav-season {
  display: none;
}

@media (max-width: 56.25em) {
  .site-header .nav-support {
    display: block;
  }

  .site-header .nav-action--coffee,
  .site-header .nav-action--share {
    display: none;
  }
}

@media (max-width: 56.25em) {
  .site-header .nav-season {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 2px dashed #d6b39c;
  }

  .site-header .nav-season .season-switch {
    padding: 8px 12px;
    font-size: 1rem;
    color: #2a211c;
  }

  .site-header .nav-season .season-switch-track {
    border-color: #333333;
  }

  .site-header .nav-season .season-switch-thumb {
    background: #ffffff;
    -webkit-box-shadow: 0 0 0 1.5px #333333;
            box-shadow: 0 0 0 1.5px #333333;
  }

  /* Phones: the switch lives in the menu, not the footer. */
  .site-footer .footer-season {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .season-switch-track,
  .season-switch-thumb {
    -webkit-transition: none;
    transition: none;
  }
}

/* Clicking or tapping the holiday switch shows no ring (Bootstrap's default
   focus outline did); keyboard users still get the teal one above. */
.season-switch:focus:not(:focus-visible) {
  outline: none;
  -webkit-box-shadow: none;
          box-shadow: none;
}

/* Phone menu on a short screen (a phone turned sideways): it scrolls inside
   itself instead of running off the bottom. */
@media (max-width: 56.25em) {
  #menu {
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
    overflow-y: auto;
    -ms-scroll-chaining: none;
        overscroll-behavior: contain;
  }
}

/* Back to top is hidden until the page is scrolled (scripts.ejs shows it);
   an invisible one would catch taps meant for the content under it. */
#back-to-top {
  display: none;
}

/* "Menu", across from the close button, in the phone menu only. */
.site-header .nav-title {
  display: none;
}

@media (max-width: 56.25em) {
  .site-header .nav-title {
    position: absolute;
    top: 22px;
    left: 24px;
    display: block;
    font-family: "DM Sans", sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #2a211c;
    pointer-events: none;
  }
}

/* Small desktops: a little less space around the icons, so the header row
   fits at 901px. */
/* Small desktops: four links and up to four squares (coffee, share, contact,
   install) must fit from 901px without the page scrolling sideways. */
/* Each range is the exact opposite of the one below it ("not all and"), so no
   width falls between two em values at any text size. */
@media not all and (max-width: 56.25em) {
  @media not all and (min-width: 64em) {
    .site-header .nav-link {
      gap: 6px;
      padding: 8px 8px;
    }

    .site-header .nav-actions {
      gap: 8px;
      margin-left: 8px;
    }

    .site-header .nav-action,
    .site-header #install_app {
      width: 40px;
      height: 40px;
    }
  }
}

/* Desktop: a bigger logo mark, so it holds its own beside the wordmark
   (56px on small desktops, where the header row is full; 64px from 1024px). */
@media not all and (max-width: 56.25em) {
  .site-header #main-logo,
  .site-header .logo-season img {
    width: 56px;
    height: 56px;
  }
}

@media (min-width: 64em) {
  .site-header .logo-link {
    gap: 10px;
  }

  .site-header #main-logo,
  .site-header .logo-season img {
    width: 64px;
    height: 64px;
  }
}
