/* The top bar and phone menu, shared by the app and the original pages.
   "html" in the selectors beats the rules each original page injects into its head later.
   Quiet logo and links, a lime sticker on the current page, and one filled button at the end. */
.pm-burger, .pm { display: none; }

html .tb { position: sticky; top: 0; z-index: 60; padding: 12px var(--gutter, 0) 4px; pointer-events: none; }
html .tb-in { pointer-events: auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; flex-wrap: nowrap; max-width: 1200px; min-height: 64px; margin: 0 auto; padding: 0 10px 0 16px; background: #fff; border: 3px solid #1b1033; border-radius: 20px; box-shadow: 3px 4px 0 #1b1033; font-family: "Bricolage Grotesque Variable", "Bricolage Grotesque", system-ui, sans-serif; }
html .tb-logo { justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; transform: none; font-size: 21px; font-weight: 800; letter-spacing: -.035em; line-height: 1; color: #1b1033; text-decoration: none; transition: none; }
html .tb-logo::before { content: ""; flex: none; width: 29px; height: 36px; margin-top: -5px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%20130%20160%22%3E%3Cpath%20d%3D%22M40%208v18M65%202v26M90%208v18%22%20stroke%3D%22%231b1033%22%20stroke-width%3D%2210%22%20stroke-linecap%3D%22round%22%2F%3E%3Cg%20transform%3D%22rotate%289%2065%2088%29%22%3E%3Crect%20x%3D%2225%22%20y%3D%2252%22%20width%3D%2280%22%20height%3D%2280%22%20rx%3D%2218%22%20fill%3D%22%231b1033%22%2F%3E%3Crect%20x%3D%2222%22%20y%3D%2244%22%20width%3D%2280%22%20height%3D%2280%22%20rx%3D%2218%22%20fill%3D%22%23fffdf7%22%20stroke%3D%22%231b1033%22%20stroke-width%3D%229%22%2F%3E%3Crect%20x%3D%2244%22%20y%3D%2266%22%20width%3D%2236%22%20height%3D%2236%22%20rx%3D%229%22%20fill%3D%22%23b8f03a%22%20stroke%3D%22%231b1033%22%20stroke-width%3D%228%22%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") center / contain no-repeat; }
html .tb-logo:hover { color: #1b1033; transform: none; }
html .tb-tabs { order: 0; flex: none; flex-wrap: nowrap; display: flex; gap: 2px; margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }
html .tb-tabs i { display: none; }
html .tb-tabs a { flex: none; display: inline-flex; align-items: center; min-height: 38px; padding: 0 12px; border: 2.5px solid transparent; border-radius: 12px; background: none; color: #1b1033; font-size: 16px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; transition: background .15s ease; }
html .tb-tabs a:hover { background: #fff4d6; color: #1b1033; }
html .tb-tabs a[aria-current=page], html .tb-tabs a[aria-current=page]:hover { background: #b8f03a; border-color: #1b1033; box-shadow: 2px 3px 0 #1b1033; transform: rotate(-2deg); color: #1b1033; font-weight: 800; }
html .tb-r { justify-self: end; flex: none; display: flex; align-items: center; gap: 6px; margin: 0; }
html .tb-sign { order: 1; display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: none; color: #1b1033; font-size: 16px; font-weight: 600; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; transition: background .15s ease; }
html .tb-sign:hover, html .tb-sign[aria-current=page], html .tb-sign[aria-current=page]:hover { background: #fff4d6; color: #1b1033; }
html .tb-av { order: 1; display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; border: 0; border-radius: 12px; background: none; color: #1b1033; text-decoration: none; }
html .tb-av span { display: none; }
html .tb-av b { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 2.5px solid #1b1033; border-radius: 50%; background: #b8f03a; font-size: 15px; overflow: hidden; }
html .tb-av b img { width: 100%; height: 100%; object-fit: cover; }
html .tb-av:hover, html .tb-av[aria-current=page] { background: #fff4d6; color: #1b1033; }
html .tb-cta { order: 2; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 11px; border: 2.5px solid #1b1033; border-radius: 999px; background: #b8f03a; color: #1b1033; box-shadow: 2px 3px 0 #1b1033; font-size: 16px; font-weight: 800; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; transition: transform .12s ease, box-shadow .12s ease; }
html .tb-cta svg { display: none; }
html .tb-cta::before { content: ""; flex: none; width: 22px; height: 24px; background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2026%22%3E%3Cpath%20d%3D%22M7%201v4M12%200v5M17%201v4%22%20stroke%3D%22%231b1033%22%20stroke-width%3D%222.400%22%20stroke-linecap%3D%22round%22%2F%3E%3Crect%20x%3D%222.500%22%20y%3D%228%22%20width%3D%2219%22%20height%3D%2216%22%20rx%3D%224%22%20fill%3D%22%23fffdf7%22%20stroke%3D%22%231b1033%22%20stroke-width%3D%222.600%22%20transform%3D%22rotate(-6%2012%2016)%22%2F%3E%3Crect%20x%3D%228.500%22%20y%3D%2212%22%20width%3D%227%22%20height%3D%227%22%20rx%3D%222%22%20fill%3D%22%23ff6fae%22%20stroke%3D%22%231b1033%22%20stroke-width%3D%222%22%20transform%3D%22rotate(-6%2012%2016)%22%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
html .tb-cta .tb-long { display: inline; }
html .tb-cta:hover { background: #c9f56a; color: #1b1033; transform: translateY(-1px); box-shadow: 2px 4px 0 #1b1033; }
html .tb-cta:active { transform: translateY(2px); box-shadow: 0 1px 0 #1b1033; }
.nav-ph { width: 64px; }

/* Tablets: still one calm row. It just tightens up as the space runs out. */
@media (max-width: 1000px) {
  html .tb { padding-left: 12px; padding-right: 12px; }
  html.static-page .tb { margin: 0 -12px; padding-left: 0; padding-right: 0; margin-left: -12px; margin-right: -12px; }
  html .tb-in { grid-template-columns: auto 1fr auto; min-height: 60px; padding: 0 8px 0 12px; border-radius: 18px; }
  html .tb-tabs { justify-self: center; }
  html .tb-tabs a { padding: 0 8px; font-size: 15px; }
  html .tb-sign { padding: 0 10px; font-size: 15px; }
  html .tb-cta { gap: 6px; padding: 0 13px 0 9px; font-size: 15px; }
  html .tb-cta .tb-long { display: none; }
}
@media (max-width: 860px) {
  html .tb-logo { gap: 0; font-size: 0; }
  html .tb-tabs a { padding: 0 6px; }
}
@media (max-width: 720px) {
  html .tb-in { gap: 6px; padding: 0 6px 0 10px; }
  html .tb-r { gap: 2px; }
  html .tb-tabs { gap: 0; }
  html .tb-tabs a { padding: 0 4px; font-size: 14px; letter-spacing: -.02em; }
  html .tb-sign { padding: 0 6px; font-size: 14px; }
  html .tb-cta { padding: 0 11px; font-size: 14px; }
  html .tb-cta::before { display: none; }
}

@media (max-width: 640px), (max-width: 1000px) and (max-height: 500px) {
  html .tb { position: sticky; top: 0; padding: calc(8px + env(safe-area-inset-top)) 12px 4px; }
  html.static-page .tb { margin: 0 -12px; padding-left: 0; padding-right: 0; }
  html .tb-in { display: flex; gap: 8px; min-height: 58px; padding: 5px 6px 5px 12px; border-radius: 18px; transition: transform .3s cubic-bezier(.22, 1, .36, 1); }
  html .tb.tb-away .tb-in { transform: translateY(calc(-100% - 20px)); }
  html .tb-logo { gap: 7px; font-size: 19px; }
  html .tb-logo::before { width: 26px; height: 32px; margin-top: -4px; }
  html .tb-tabs, html .tb-sign, html .tb-av { display: none; }
  html .tb-r { margin-left: auto; }
  html .tb-cta { min-height: 44px; padding: 0 14px; font-size: 15px; box-shadow: none; }
  html .tb-cta::before { display: none; }
  html .tb-cta .tb-long { display: none; }
  html .tb.tb-hero .tb-cta { display: none; }
  html a, html button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

  /* Three lines, turning into a cross. */
  html .pm-burger { position: relative; flex: none; display: block; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 13px; background: #1b1033; cursor: pointer; }
  .pm-burger i { position: absolute; left: 12px; width: 20px; height: 2.5px; border-radius: 2px; background: #fff4d6; transition: transform .3s cubic-bezier(.22, 1, .36, 1), opacity .15s linear; }
  .pm-burger i:nth-child(1) { top: 14px; }
  .pm-burger i:nth-child(2) { top: 21px; }
  .pm-burger i:nth-child(3) { top: 28px; }
  .pm-burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .pm-burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
  .pm-burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* Slides down behind the bar. Only transform and opacity animate, so it stays smooth on old phones. */
  html .pm { position: fixed; inset: 0; z-index: 59; display: flex; flex-direction: column; justify-content: space-between; gap: 20px; padding: calc(92px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom)); background: #1b1033; color: #fff4d6; font-family: "Bricolage Grotesque Variable", "Bricolage Grotesque", system-ui, sans-serif; overflow-y: auto; overscroll-behavior: contain; visibility: hidden; transform: translateY(-100%); transition: transform .42s cubic-bezier(.22, 1, .36, 1), visibility 0s linear .42s; }
  html .pm.on { visibility: visible; transform: none; transition: transform .42s cubic-bezier(.22, 1, .36, 1), visibility 0s; }
  .pm-links { display: flex; flex-direction: column; }
  .pm a { color: inherit; text-decoration: none; }
  html .pm-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 62px; padding: 8px 2px; border-bottom: 1px solid rgba(255, 244, 214, .16); font-size: min(9.4vw, 38px, 5.6vh); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; opacity: 0; transform: translateY(14px); transition: opacity .3s ease, transform .42s cubic-bezier(.22, 1, .36, 1); }
  .pm.on .pm-link { opacity: 1; transform: none; transition-delay: calc(70ms + var(--i) * 42ms); }
  .pm-link svg { flex: none; width: 22px; height: 22px; opacity: .5; }
  html .pm-link[aria-current="page"] { color: #b8f03a; }
  .pm-link[aria-current="page"] svg { opacity: 1; }
  .pm-foot { display: flex; flex-direction: column; gap: 10px; opacity: 0; transition: opacity .3s ease; }
  .pm.on .pm-foot { opacity: 1; transition-delay: .26s; }
  html .pm-cta, html .pm-sign { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border-radius: 999px; font-size: 18px; font-weight: 800; }
  html .pm-cta { background: #b8f03a; color: #1b1033; }
  html .pm-sign { border: 2px solid rgba(255, 244, 214, .4); }
  html .pm-small { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 20px; font-size: 14px; font-weight: 500; color: rgba(255, 244, 214, .72); }
  html .pm-small a { display: inline-flex; align-items: center; min-height: 44px; }
  html.locked { overflow: hidden; }
}

@media (max-width: 640px) {
  /* The original pages: filter chips scroll sideways instead of stacking into a wall, and fields don't zoom on iOS. */
  html div:has(> .flab) { flex-wrap: nowrap !important; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; }
  html div:has(> .flab)::-webkit-scrollbar { display: none; }
  html div:has(> .flab) > * { flex: none; }
  html .foot nav a { display: flex; align-items: center; min-height: 44px; }
  html input, html select, html textarea { font-size: 16px !important; }
}
