.hbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  color: #fff;
  background: transparent;
  transition: background-color 300ms ease, box-shadow 300ms ease;
}
.hbar[data-solid="true"] {
  background: var(--bg);
  box-shadow: 0 1px 0 var(--hairline);
}
.hbar[data-open="true"] {
  transition-duration: 100ms;
  background: var(--bg);
  box-shadow: none;
}

.hscrim {
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto 0;
  height: 124px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.28) 45%, rgba(0, 0, 0, 0) 100%);
}
.hbar[data-solid="true"] .hscrim { display: none; }

.hrow {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  height: var(--header-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
}
.hlogo { grid-column: 1; justify-self: start; display: inline-flex; align-items: center; }
.hlogo img { height: 20px; width: auto; }

.hnav { grid-column: 2; justify-self: center; display: none; align-items: center; gap: 4px; }
@media (min-width: 1024px) { .hnav { display: flex; } }

.hactions { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 16px; }
.htext {
  font-size: 0.8125rem;
  font-weight: 500;
  color: inherit;
  text-decoration: none;
  transition: opacity 160ms ease;
}
.htext:hover { opacity: 0.7; }
@media (min-width: 1024px) { .htext { display: none; } }
.hprimary { display: none; height: 40px; padding: 0 20px; }
.hprimary:hover { background: #ffffff; color: #0a0a0a; }
@media (min-width: 1024px) { .hprimary { display: inline-flex; } }

.ln-trigger {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: inherit;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 8px 14px;
  line-height: 1;
  text-decoration: none;
  transition: opacity 160ms ease;
}
.ln-trigger:hover { opacity: 0.7; }

.ln-drawer {
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--bg);
  height: 0;
  overflow: hidden;
  transition: height 380ms cubic-bezier(0.22, 1, 0.36, 1);
  display: none;
}
.ln-drawer[data-open="true"] { box-shadow: 0 1px 0 var(--hairline), 0 14px 26px rgba(0, 0, 0, 0.05); }
@media (min-width: 1024px) { .ln-drawer { display: block; } }
.ln-drawer-inner { max-width: 1200px; margin: 0 auto; padding: 30px 20px; }
.ln-grid { display: grid; grid-template-columns: 230px 1fr; gap: 48px; align-items: start; }
.ln-rail { list-style: none; margin: 0; padding: 0; }
.ln-rail li + li { margin-top: 2px; }
.ln-railbtn {
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  background: transparent;
  border: 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
  padding: 9px 0;
  color: #fff;
  opacity: 0.5;
  transition: opacity 140ms ease;
}
.ln-railbtn:hover, .ln-railbtn[data-active="true"] { opacity: 1; }
.ln-stack { list-style: none; margin: 0; padding: 0; }
.ln-stacklink {
  display: inline-block;
  font-size: 15px;
  color: #fff;
  text-decoration: none;
  padding: 8px 0;
  transition: opacity 120ms ease;
  animation: lnRise 440ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ln-stacklink:hover { opacity: 0.55; }
@keyframes lnRise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }

.ln-backdrop {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--header-h);
  bottom: 0;
  background: rgba(0, 0, 0, 0.32);
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 0s linear 240ms;
  z-index: 40;
  display: none;
}
@media (min-width: 1024px) { .ln-backdrop { display: block; } }
.ln-backdrop[data-visible="true"] { opacity: 1; visibility: visible; transition: opacity 240ms ease; }

.hburger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  margin-right: -4px;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}
@media (min-width: 1024px) { .hburger { display: none; } }

.mpanel {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  transform: translateY(-100%);
  visibility: hidden;
  transition: transform 480ms cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 480ms;
}
.mpanel[data-open="true"] { transform: translateY(0); visibility: visible; transition: transform 480ms cubic-bezier(0.32, 0.72, 0, 1); }
.mpanel-bar {
  max-width: 768px;
  width: 100%;
  margin: 0 auto;
  height: var(--header-h);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.mpanel-bar img { height: 20px; width: auto; }
.micon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  width: 36px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  border-radius: 10px;
}
.micon:active { background: rgba(255, 255, 255, 0.08); }
.mpanel-body { position: relative; flex: 1; overflow: hidden; }
.mroot {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), opacity 220ms ease;
}
.mpanel[data-cat="true"] .mroot { transform: translateX(-22%); opacity: 0; pointer-events: none; }
.mroot-inner { max-width: 768px; margin: 0 auto; padding: 16px 20px; width: 100%; }
.mgroup {
  width: 100%;
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  font-family: inherit;
  font-size: 1.25rem;
  font-weight: 500;
  text-align: left;
}
.mgroup .chev { color: rgba(255, 255, 255, 0.25); }
.mcat {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  background: var(--bg);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 360ms;
}
.mcat[data-shown="true"] { transform: translateX(0); visibility: visible; transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1); }
.mcat-inner { max-width: 768px; margin: 0 auto; padding: 16px 20px; width: 100%; }
.mcat-inner a {
  display: block;
  padding: 12px 0;
  font-size: 1.0625rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}
.mcat-inner a:active { color: #fff; }
.mpanel-foot {
  max-width: 768px;
  width: 100%;
  margin: 0 auto;
  flex: none;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
}
.mpanel-foot .btn { width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .ln-drawer, .ln-stacklink, .mpanel, .mroot, .mcat { transition: none !important; animation: none !important; }
}
