:root {
  --foreground: #171717;
  --muted-foreground: #6b6b6b;
  --border: #e5e5e5;
  --brand: #39ff14;
  --brand-foreground: #0a0a0a;
}

* {
  box-sizing: border-box;
}

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

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

.page {
  min-height: 100vh;
  background: #ffffff;
}

/* Nav shell */

.nav {
  position: relative;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
}

.nav__inner {
  max-width: 80rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  height: 4.5rem;
  padding: 0 1rem;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  justify-self: start;
}

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

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

/* Center links */

.nav__links {
  display: none;
  align-items: center;
  gap: 0.25rem;
  justify-self: center;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: color 150ms ease;
}

.nav__link:hover {
  color: var(--brand);
}

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

.nav__chevron {
  width: 0.875rem;
  height: 0.875rem;
  flex-shrink: 0;
  transition: transform 200ms ease;
}

.nav__dropdown-trigger[aria-expanded="true"] .nav__chevron {
  transform: rotate(180deg);
}

/* Dropdown */

.nav__dropdown {
  position: relative;
}

.nav__dropdown-panel {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.5rem;
  width: 20rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.18);
  padding: 0.5rem;
  z-index: 30;
  animation: nb1-panel 160ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@media (prefers-reduced-motion: reduce) {
  .nav__dropdown-panel {
    animation: none;
  }
}

@keyframes nb1-panel {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.nav__dropdown-item {
  display: block;
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  transition: background-color 150ms ease;
}

.nav__dropdown-item:hover,
.nav__dropdown-item:focus-visible {
  background: rgba(57, 255, 20, 0.1);
  outline: none;
}

.nav__dropdown-item-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav__dropdown-item-desc {
  display: block;
  margin-top: 0.125rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

/* Actions */

.nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-self: end;
}

.nav__cta {
  display: none;
  align-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-foreground);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: transform 150ms ease;
}

.nav__cta:hover {
  transform: scale(1.03);
}

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

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

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

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

.icon-menu,
.icon-close {
  width: 1.125rem;
  height: 1.125rem;
}

.icon-close {
  display: none;
}

.nav__menu-btn.is-open .icon-menu {
  display: none;
}

.nav__menu-btn.is-open .icon-close {
  display: block;
}

/* Mobile panel */

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

@media (prefers-reduced-motion: reduce) {
  .nav__mobile-panel {
    animation: none;
  }
}

@keyframes nb1-mobile {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.nav__mobile-heading {
  margin-top: 0.25rem;
  padding: 0 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.nav__mobile-link {
  border-radius: 0.5rem;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 150ms ease;
}

.nav__mobile-link:hover {
  background: rgba(57, 255, 20, 0.1);
}

.nav__mobile-cta {
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-foreground);
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

/* Content placeholder */

.content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 4rem 1rem;
}

.content__placeholder {
  min-height: 8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--border);
  border-radius: 1rem;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Breakpoints */

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

  .nav__cta {
    display: inline-flex;
  }

  .nav__menu-btn {
    display: none;
  }

  .nav__mobile-panel {
    display: none !important;
  }
}

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

  .nav__mobile-links {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .nav__inner,
  .content {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}
