/* Shared site rhythm: keeps page width, typography scale, and top navigation consistent. */
:root {
  --site-container: 1440px;
  --site-margin-desktop: 64px;
  --site-margin-mobile: 20px;
  --site-gutter: 24px;
  --site-nav-height: 72px;
  --site-nav-gap: 28px;
  --site-brand-width: 240px;
  --site-action-width: 40px;
}

html {
  font-size: 16px;
}

body {
  font-family: Inter, "Microsoft YaHei", "PingFang SC", Arial, sans-serif !important;
}

.max-w-container-max {
  max-width: var(--site-container) !important;
}

.px-margin-desktop,
.md\:px-margin-desktop {
  padding-left: var(--site-margin-desktop) !important;
  padding-right: var(--site-margin-desktop) !important;
}

.px-margin-mobile {
  padding-left: var(--site-margin-mobile) !important;
  padding-right: var(--site-margin-mobile) !important;
}

.gap-gutter {
  gap: var(--site-gutter) !important;
}

.text-display-lg {
  font-size: 48px !important;
  line-height: 56px !important;
  letter-spacing: 0 !important;
}

.text-headline-lg {
  font-size: 32px !important;
  line-height: 40px !important;
  letter-spacing: 0 !important;
}

.text-headline-lg-mobile {
  font-size: 24px !important;
  line-height: 32px !important;
  letter-spacing: 0 !important;
}

.text-body-lg,
.md\:text-body-lg {
  font-size: 18px !important;
  line-height: 28px !important;
  letter-spacing: 0 !important;
}

.text-body-md {
  font-size: 16px !important;
  line-height: 24px !important;
  letter-spacing: 0 !important;
}

.text-label-sm {
  font-size: 12px !important;
  line-height: 16px !important;
}

.tracking-tighter,
.tracking-tight,
.tracking-widest,
.uppercase.tracking-widest {
  letter-spacing: 0 !important;
}

body > header,
body > nav {
  min-height: var(--site-nav-height) !important;
}

body > header > div,
body > header > nav,
body > nav > div:first-child {
  min-height: var(--site-nav-height) !important;
  height: var(--site-nav-height) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

@media (min-width: 768px) {
  body > header > div,
  body > header > nav,
  body > nav > div:first-child {
    display: grid !important;
    grid-template-columns: var(--site-brand-width) minmax(0, 1fr) var(--site-action-width);
    align-items: center !important;
    column-gap: 24px !important;
  }

  body > header > div > :first-child,
  body > header > nav > :first-child,
  body > nav > div:first-child > :first-child {
    justify-self: start !important;
  }

  body > header > div > nav,
  body > header > div > .hidden.md\:flex,
  body > header > nav > .hidden.md\:flex,
  body > nav > div:first-child > nav,
  body > nav > div:first-child > .hidden.md\:flex,
  body > nav > div:first-child > .flex.space-x-8,
  body > nav > div:first-child > .flex.gap-8 {
    justify-self: center !important;
    width: auto !important;
  }

  body > header > div > :last-child:not(nav):not(.hidden):not(.space-x-8):not(.space-x-6):not(.gap-8),
  body > header > nav > :last-child:not(nav):not(.hidden):not(.space-x-8):not(.space-x-6):not(.gap-8),
  body > nav > div:first-child > :last-child:not(nav):not(.hidden):not(.space-x-8):not(.space-x-6):not(.gap-8) {
    justify-self: end !important;
  }
}

body > header nav,
body > nav nav,
body > header .hidden.md\:flex,
body > nav .hidden.md\:flex,
body > header .flex.space-x-8,
body > header .flex.gap-8,
body > nav .flex.space-x-8,
body > nav .flex.gap-8,
body > nav .hidden.md\:flex.items-center.space-x-8,
body > nav .hidden.md\:flex.items-center.space-x-6 {
  column-gap: var(--site-nav-gap) !important;
  gap: var(--site-nav-gap) !important;
}

body > header nav a,
body > nav nav a,
body > header .hidden.md\:flex a,
body > nav .hidden.md\:flex a,
body > nav .flex.space-x-8 a,
body > nav .flex.gap-8 a {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body > header .space-x-8 > :not([hidden]) ~ :not([hidden]),
body > header .space-x-6 > :not([hidden]) ~ :not([hidden]),
body > nav .space-x-8 > :not([hidden]) ~ :not([hidden]),
body > nav .space-x-6 > :not([hidden]) ~ :not([hidden]) {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body > header a,
body > nav a {
  font-size: 16px !important;
  line-height: 24px !important;
  letter-spacing: 0 !important;
  white-space: nowrap;
}

body > header .font-display-lg,
body > header .font-headline-lg,
body > header .font-headline-lg-mobile,
body > nav .font-display-lg,
body > nav .font-headline-lg,
body > nav .font-headline-lg-mobile {
  font-size: 24px !important;
  line-height: 32px !important;
  letter-spacing: 0 !important;
}

main {
  width: 100%;
}

@media (max-width: 767px) {
  .px-margin-desktop,
  .md\:px-margin-desktop,
  .px-margin-mobile {
    padding-left: var(--site-margin-mobile) !important;
    padding-right: var(--site-margin-mobile) !important;
  }

  body > header > div,
  body > header > nav,
  body > nav > div:first-child,
  body > nav > div.md\:hidden,
  body > nav > div:last-child {
    min-height: 64px !important;
    height: 64px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}
