:root {
  --site-header-background: #ffffff;
  --site-header-border: rgba(17, 24, 39, 0.06);
  --site-header-text: #111827;
  --site-header-text-hover: #4b5563;
  --site-header-nav-font: Inter, "Helvetica Neue", "Hiragino Sans", "Meiryo",
    sans-serif;
  --site-footer-background: #ffffff;
  --site-footer-border: rgba(31, 41, 55, 0.06);
  --site-footer-text: #667085;
  --site-footer-text-strong: #344054;
  --site-footer-shell: 1320px;
  --site-footer-gap: clamp(72px, 9vw, 118px);
}

body {
  margin: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--site-header-background);
  border-bottom: 1px solid var(--site-header-border);
  color: var(--site-header-text);
}

.site-header nav {
  max-width: none;
  margin: 0;
  padding: 14px 46px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 28px;
}

.site-header__brand {
  justify-self: start;
}

.site-header .site-header__brand a {
  font-family: "DIN Alternate", "DIN 2014", "Arial Narrow",
    "Helvetica Neue", Arial, sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.05em;
  text-decoration: none;
  color: var(--site-header-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
}

.site-header__menu-toggle {
  display: none;
}

.site-header__menu {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
  flex-wrap: wrap;
}

.site-header__menu--primary {
  justify-content: center;
  gap: 24px 28px;
}

.site-header__menu--secondary {
  justify-content: flex-end;
  gap: 16px 20px;
}

.site-header a,
.site-header__dropdown-summary,
.site-header__account-summary {
  font-family: var(--site-header-nav-font);
  color: var(--site-header-text);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.035em;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  white-space: nowrap;
}

.site-header a:hover,
.site-header__dropdown-summary:hover,
.site-header__account-summary:hover {
  color: var(--site-header-text-hover);
}

.site-header__nav-item {
  position: relative;
}

.site-header__dropdown {
  position: relative;
}

.site-header__dropdown-summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.site-header__dropdown-summary::-webkit-details-marker {
  display: none;
}

.site-header__dropdown-summary::marker {
  content: "";
}

.site-header__dropdown-summary::after,
.site-header__account-summary::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
}

.site-header__dropdown:hover > .site-header__dropdown-summary,
.site-header__dropdown[open] > .site-header__dropdown-summary {
  color: var(--site-header-text-hover);
}

.site-header__dropdown[open] > .site-header__dropdown-summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.site-header__account-menu {
  position: relative;
}

.site-header__account-summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
  max-width: min(220px, 28vw);
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-header__account-summary::-webkit-details-marker {
  display: none;
}

.site-header__account-summary::marker {
  content: "";
}

.site-header__account-menu[open] > .site-header__account-summary {
  color: var(--site-header-text-hover);
}

.site-header__account-menu[open] > .site-header__account-summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.site-header__account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 45;
  min-width: 184px;
  display: none;
  margin: 0;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.site-header__account-menu[open] > .site-header__account-dropdown {
  display: grid;
  gap: 4px;
}

.site-header__account-item {
  width: 100%;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--site-header-text);
  font-family: var(--site-header-nav-font);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.02em;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
}

.site-header__account-item:hover {
  background: rgba(17, 24, 39, 0.04);
  color: var(--site-header-text-hover);
}

.site-header__account-item--disabled,
.site-header__account-item--disabled:hover {
  color: #9ca3af;
  background: transparent;
  cursor: default;
}

.site-header__account-logout-form {
  margin: 0;
}

.site-header__account-logout-button {
  font: inherit;
}

.site-header__dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  min-width: 188px;
  display: none;
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  gap: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(17, 24, 39, 0.08);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.site-header__dropdown:hover > .site-header__dropdown-menu,
.site-header__dropdown[open] > .site-header__dropdown-menu {
  display: grid;
}

.site-header__dropdown-menu a {
  min-height: auto;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--site-header-text);
}

.site-header__dropdown-menu a:hover {
  color: var(--site-header-text-hover);
}

.site-footer {
  margin-top: var(--site-footer-gap);
  border-top: 1px solid var(--site-footer-border);
  background: var(--site-footer-background);
  color: var(--site-footer-text);
  font-weight: 400;
}

.site-footer * {
  font-weight: 400;
}

.site-footer__inner {
  max-width: var(--site-footer-shell);
  margin: 0 auto;
  padding: 16px 30px 24px;
  display: flex;
  justify-content: center;
}

.site-footer__group {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  text-align: center;
}

.site-footer__brand {
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--site-footer-text);
  white-space: nowrap;
}

.site-footer__group a {
  font-size: 12px;
  line-height: 1.6;
  color: var(--site-footer-text);
  text-decoration: none;
  white-space: nowrap;
}

.site-footer__group a:hover {
  color: var(--site-footer-text-strong);
}

@media (max-width: 820px) {
  .site-header nav {
    grid-template-columns: minmax(0, 1fr) auto;
    row-gap: 0;
    column-gap: 16px;
    padding: 12px 20px;
  }

  .site-header__brand {
    justify-self: start;
  }

  .site-header .site-header__brand a {
    font-size: 28px;
  }

  .site-header__menu-toggle {
    display: inline-flex;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(17, 24, 39, 0.14);
    border-radius: 8px;
    background: #ffffff;
    color: var(--site-header-text);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    padding: 0;
    cursor: pointer;
    justify-self: end;
  }

  .site-header__menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  .site-header__menu {
    display: none;
    grid-column: 1 / -1;
    width: 100%;
    gap: 0;
    padding-top: 10px;
    border-top: 1px solid rgba(17, 24, 39, 0.08);
    margin-top: 12px;
  }

  .site-header.site-header--menu-open .site-header__menu {
    display: grid;
  }

  .site-header__menu + .site-header__menu {
    padding-top: 0;
    border-top: 0;
    margin-top: 0;
  }

  .site-header__menu--primary,
  .site-header__menu--secondary {
    justify-content: stretch;
  }

  .site-header__nav-item,
  .site-header__nav-item--discover,
  .site-header__nav-item--account,
  .site-header__dropdown {
    width: 100%;
    flex-basis: auto;
  }

  .site-header a,
  .site-header__dropdown-summary,
  .site-header__account-summary {
    width: 100%;
    min-height: 42px;
    border-bottom: 1px solid rgba(17, 24, 39, 0.08);
    color: var(--site-header-text);
    font-size: 15px;
    line-height: 1;
  }

  .site-header__brand a {
    border-bottom: 0;
  }

  .site-header__dropdown-summary,
  .site-header__account-summary {
    width: 100%;
  }

  .site-header__account-summary {
    max-width: none;
  }

  .site-header__dropdown-menu,
  .site-header__account-dropdown {
    position: static;
    left: auto;
    right: auto;
    transform: none;
    min-width: 0;
    margin-top: 4px;
    padding: 0 0 6px 16px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    width: 100%;
  }

  .site-header__dropdown-menu a,
  .site-header__account-item {
    min-height: 36px;
    border-bottom: 0;
    font-size: 14px;
  }

  .site-footer__inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .site-footer__group {
    gap: 8px 12px;
  }
}
