:root {
  --brand: #39ff14;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  background: #ffffff;
  color: #000000;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font: inherit;
}

.header {
  position: relative;
  border-bottom: 1px solid #e5e5e5;
  background: #ffffff;
}

.header__inner {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.header__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.header__mark {
  height: 1.625rem;
  width: auto;
  display: block;
}

.header__wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.header__center {
  display: none;
  align-items: center;
  gap: 2rem;
  flex: 1;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header__link {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #000000;
  transition: color 150ms ease;
}

.header__link:hover {
  color: #525252;
}

.header__link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Shared search slot — fixed width so trigger <-> input never shifts the
   rest of the header. */
.search {
  position: relative;
  width: 18rem;
  flex-shrink: 0;
  margin-left: auto;
}

.search__trigger {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  color: #737373;
  cursor: pointer;
  transition: border-color 150ms ease;
}

.search__trigger:hover {
  border-color: #d4d4d4;
}

.search__trigger:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.search__placeholder {
  flex: 1;
  text-align: left;
}

.search__kbd {
  border: 1px solid #e5e5e5;
  background: #fafafa;
  border-radius: 0.25rem;
  padding: 0.125rem 0.375rem;
  font-family: inherit;
  font-size: 0.75rem;
  color: #a3a3a3;
}

.search__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: inherit;
}

.search__active {
  animation: header07-morph 200ms ease-out both;
}

.search__field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #d4d4d4;
  background: #ffffff;
  padding: 0.375rem 0.75rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.search__field .search__icon {
  color: #000000;
}

.search__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.875rem;
  color: #000000;
  min-width: 0;
}

.search__input::placeholder {
  color: #a3a3a3;
}

.search__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  border: none;
  background: none;
  color: #a3a3a3;
  cursor: pointer;
  padding: 0;
}

.search__close svg {
  width: 1.125rem;
  height: 1.125rem;
}

.search__close:hover {
  color: #000000;
}

.search__close:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.search__results {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  z-index: 30;
  margin-top: 0.5rem;
  max-height: 20rem;
  overflow-y: auto;
  border-radius: 0.75rem;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.18);
  padding: 0.25rem 0.5rem;
  animation: header07-results 180ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.search__results--mobile {
  position: static;
  margin-top: 0.5rem;
  box-shadow: none;
}

.search__list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.search__item {
  display: block;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #000000;
  transition: background-color 150ms ease;
}

.search__item:hover,
.search__item:focus-visible {
  background: #f5f5f5;
  outline: none;
}

.search__empty {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.875rem;
  color: #737373;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.header__cta {
  display: none;
  align-items: center;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 150ms ease;
}

.header__cta:hover {
  background: #262626;
}

.header__cta:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.header__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: none;
  background: none;
  color: #000000;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.header__icon-btn svg {
  width: 1.125rem;
  height: 1.125rem;
}

.header__icon-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.header__icon-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

#mobile-nav-trigger .icon-close {
  display: none;
}

#mobile-nav-trigger.is-open .icon-menu {
  display: none;
}

#mobile-nav-trigger.is-open .icon-close {
  display: block;
}

/* Mobile nav dropdown */

.mobile-nav-panel {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  z-index: 20;
  border-bottom: 1px solid #e5e5e5;
  background: #ffffff;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.18);
  animation: header07-panel 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mobile-nav-panel__nav {
  max-width: 80rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.75rem 1rem;
}

.mobile-nav-panel__link {
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #000000;
}

.mobile-nav-panel__link:hover {
  background: #f5f5f5;
}

.mobile-nav-panel__link:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.mobile-nav-panel__cta {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Mobile search overlay */

.mobile-search-panel {
  position: absolute;
  inset-inline: 0;
  top: 100%;
  z-index: 20;
  border-bottom: 1px solid #e5e5e5;
  background: #ffffff;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.18);
  padding: 1rem;
  animation: header07-panel 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes header07-morph {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes header07-results {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes header07-panel {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .search__active,
  .search__results,
  .mobile-nav-panel,
  .mobile-search-panel {
    animation: none;
  }
}

@media (min-width: 640px) {
  .header__inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .header__center {
    display: flex;
  }

  .header__cta {
    display: inline-flex;
  }

  #mobile-search-trigger,
  #mobile-nav-trigger {
    display: none;
  }

  .mobile-nav-panel,
  .mobile-search-panel {
    display: none !important;
  }

  .header__inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
