[hidden] {
  display: none !important;
}

.name-detail-main {
  min-height: calc(100vh - 76px);
}

.name-state,
.name-detail {
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
}

.name-state {
  display: grid;
  min-height: 620px;
  place-content: center;
  justify-items: center;
  text-align: center;
}

.name-state > p:not(.eyebrow) {
  max-width: 520px;
  margin: 18px auto 0;
  color: var(--muted);
}

.name-state h1 {
  margin: 17px 0 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 500;
  letter-spacing: -.04em;
  line-height: 1.4;
}

.loading-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-top-color: var(--terracotta);
  border-radius: 50%;
  animation: detail-loading 1s linear infinite;
}

@keyframes detail-loading {
  to { transform: rotate(360deg); }
}

.state-actions {
  display: flex;
  gap: 9px;
  margin-top: 30px;
}

.state-actions a,
.state-actions button {
  min-width: 132px;
  padding: 12px 18px;
  border: 1px solid var(--navy);
  border-radius: 999px;
  background: var(--navy);
  color: white;
  font: 600 12px var(--sans);
  text-decoration: none;
  cursor: pointer;
}

.state-actions a + a,
.state-actions button + a {
  background: transparent;
  color: var(--navy);
}

.name-detail {
  padding: 44px 0 100px;
}

.back-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--terracotta);
}

.name-hero {
  padding: 82px 0 74px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}

.name-hero h1 {
  margin: 19px 0 14px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(72px, 12vw, 116px);
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1.15;
  text-indent: .12em;
}

.name-hero > p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.headline-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: min(520px, 100%);
  margin: 40px auto 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.headline-stats div {
  padding: 25px;
}

.headline-stats div + div {
  border-left: 1px solid var(--line);
}

.headline-stats dt {
  color: var(--muted);
  font-size: 10px;
}

.headline-stats dd {
  margin: 4px 0 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 600;
}

.gender-section,
.nearby-section {
  padding: 76px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: start;
}

.section-heading h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--serif);
  font-size: clamp(27px, 4vw, 38px);
  font-weight: 500;
  line-height: 1.5;
}

.gender-table-shell {
  margin-top: 42px;
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--sheet);
}

.gender-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.gender-table th,
.gender-table td {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  text-align: right;
}

.gender-table tr:last-child th,
.gender-table tr:last-child td {
  border-bottom: 0;
}

.gender-table th:first-child {
  text-align: left;
}

.gender-table thead th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.gender-table tbody th {
  color: var(--navy);
  font-family: var(--serif);
  font-size: 18px;
}

.gender-table tbody td {
  color: var(--ink);
  font-size: 13px;
}

.stat-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.nearby-names {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 42px;
}

.nearby-names a {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  background: var(--sheet);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.nearby-names a:hover,
.nearby-names a:focus-visible {
  border-color: var(--terracotta);
  transform: translateY(-2px);
}

.nearby-names span {
  color: var(--muted);
  font-size: 10px;
}

.nearby-names strong {
  color: var(--navy);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 600;
}

.detail-app-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  margin-top: 76px;
  padding: 52px;
  overflow: hidden;
  border: 1px solid #d3c4ae;
  background: var(--sheet);
  box-shadow: 0 18px 54px rgb(72 58 46 / 10%);
}

.detail-app-card::before {
  position: absolute;
  inset: 11px;
  border: 1px solid #e2d5c2;
  pointer-events: none;
  content: "";
}

.detail-app-card > * {
  position: relative;
}

.detail-app-card h2 {
  margin: 12px 0 14px;
  color: var(--navy);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
  line-height: 1.5;
}

.detail-app-card p:not(.eyebrow, .app-features) {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.app-features {
  margin: 18px 0 0;
  color: var(--terracotta);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}

.detail-store-actions {
  display: flex;
  max-width: 270px;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.app-detail-link {
  width: 100%;
  margin-top: 4px;
  color: var(--navy);
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
}

.data-source-note {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 9px;
  text-align: right;
}

@media (max-width: 720px) {
  .name-state,
  .name-detail {
    width: calc(100% - 40px);
  }

  .name-state {
    min-height: 520px;
  }

  .state-actions {
    width: 100%;
    flex-direction: column;
  }

  .name-detail {
    padding-top: 28px;
  }

  .name-hero {
    padding: 62px 0 58px;
  }

  .name-hero h1 {
    font-size: 70px;
  }

  .headline-stats div {
    padding: 19px 12px;
  }

  .headline-stats dd {
    font-size: 21px;
  }

  .gender-section,
  .nearby-section {
    padding: 58px 0;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .nearby-names {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-app-card {
    grid-template-columns: 1fr;
    gap: 27px;
    padding: 42px 25px;
    text-align: center;
  }

  .detail-store-actions {
    margin: 0 auto;
  }

  .data-source-note {
    text-align: left;
  }
}
