main {
  padding-top: 26px;
  padding-bottom: calc(64px + env(safe-area-inset-bottom));
}

.intro {
  margin-bottom: 22px;
}

.intro-title {
  margin: 0;
  font-size: 34px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.intro-text {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 19px;
}

.search {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 6px 2px;
  transition: border-color 0.15s ease;
}

.search:focus-within {
  border-color: var(--accent-strong);
}

.search-icon {
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.search input {
  flex: 1;
  width: 100%;
  padding: 8px 0;
  font-size: 21px;
}

.search input::placeholder {
  color: var(--muted);
}

.search input::-webkit-search-cancel-button {
  appearance: none;
}

.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 6px;
  color: var(--muted);
  font-size: 17px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.list-head .count {
  letter-spacing: 0.02em;
}

.surah-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.surah-item {
  background: var(--row-a);
}

.surah-item:nth-child(odd) {
  background: var(--row-b);
}

.surah-link {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 2px;
}

.surah-link:hover,
.surah-link:active {
  background: rgba(139, 92, 246, 0.1);
}

.surah-link:hover .surah-latin,
.surah-link:focus-visible .surah-latin {
  color: var(--accent);
}

.surah-number {
  min-width: 36px;
  color: var(--accent);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.surah-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.surah-latin {
  font-size: 22px;
  line-height: 1.3;
  transition: color 0.15s ease;
}

.surah-meta {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.3;
}

.surah-arabic {
  font-family: "Scheherazade New", serif;
  font-size: 28px;
  line-height: 1.6;
  white-space: nowrap;
}

.empty {
  color: var(--muted);
  padding: 28px 0;
}

@media (min-width: 700px) {
  main {
    padding-top: 40px;
  }

  .intro-title {
    font-size: 42px;
  }

  .surah-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 44px;
  }

  .surah-item {
    background: var(--row-a);
  }

  .surah-item:nth-child(4n + 1),
  .surah-item:nth-child(4n + 2) {
    background: var(--row-b);
  }

  .surah-item:nth-child(4n + 3),
  .surah-item:nth-child(4n + 4) {
    background: var(--row-a);
  }

  .surah-link {
    padding: 13px 10px;
  }
}

@media (min-width: 900px) {
  .surah-arabic {
    font-size: 32px;
  }
}
