:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #ededed;
  background: #111;
}

* {
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
}

main {
  flex: 1;
  width: min(100% - 48px, 920px);
  margin: 0 auto;
  padding: clamp(36px, 6vh, 64px) 0 64px;
}

.page-header {
  margin-bottom: clamp(64px, 10vw, 104px);
}

h1 {
  margin: 8px 0 0;
  font-size: clamp(4.25rem, 14vw, 7.5rem);
  font-weight: 520;
  line-height: 0.88;
  letter-spacing: -0.075em;
}

.page-header p {
  margin: 0;
  color: #999;
}

.page-header p {
  font-size: 0.75rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  overflow: hidden;
  background: #151515;
  border: 1px solid #383838;
  border-radius: 6px;
  transition: background 150ms ease, border-color 150ms ease;
}

li:hover {
  background: #191919;
  border-color: #555;
}

li a {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr) 1rem;
  gap: 12px;
  align-items: center;
  min-height: 62px;
  padding: 8px 12px;
  color: inherit;
  text-decoration: none;
}

.number,
.arrow {
  color: #777;
  font-size: 0.75rem;
}

.name {
  font-size: 1rem;
  font-weight: 440;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.arrow {
  text-align: right;
  transition: color 150ms ease, transform 150ms ease;
}

.source-mark {
  display: grid;
  width: 1.1rem;
  height: 1.1rem;
  place-items: center;
  justify-self: end;
  background: #1877f2;
  color: #fff;
  border-radius: 3px;
  font: 700 0.85rem/1 Arial, sans-serif;
}

li a:hover .name {
  color: #fff;
}

small {
  color: #999;
  font-size: 0.75rem;
  line-height: 1.2;
}

li a:hover .arrow {
  color: #ededed;
  transform: translate(2px, -2px);
}

li a:focus-visible {
  outline: 2px solid #ededed;
  outline-offset: -3px;
}

.grouped-section {
  margin-top: 36px;
}

.error {
  margin: 16px 0;
  color: #999;
  font-size: 0.85rem;
}

.random-quote {
  max-width: 620px;
  margin: 64px auto 0;
  text-align: center;
}

.random-quote blockquote,
.random-quote p {
  margin: 0;
}

.random-quote p {
  color: #d5d5d5;
  font-size: clamp(1.05rem, 2.5vw, 1.3rem);
  font-style: italic;
  line-height: 1.45;
  text-wrap: balance;
}

.random-quote figcaption {
  margin-top: 10px;
  color: #777;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.network-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 0 1rem max(1.5rem, env(safe-area-inset-bottom));
  color: #777;
  font: 0.6875rem/1 ui-monospace, "SFMono-Regular", "Cascadia Code",
    "Roboto Mono", Consolas, monospace;
  letter-spacing: 0.1em;
  text-align: center;
}

.network-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.network-status::before {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #39ff88;
  box-shadow: 0 0 0.5rem rgb(57 255 136 / 65%);
  content: "";
  transform: translateY(-0.03em);
}

.network-links {
  display: flex;
  gap: 1rem;
}

.network-links a {
  color: #555;
  text-decoration: none;
  transition: color 150ms ease;
}

.network-links a:hover,
.network-links a:focus-visible {
  color: #999;
}

@media (max-width: 780px) {
  ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  ol {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  main {
    width: min(100% - 32px, 920px);
    padding-top: 36px;
  }

  .page-header {
    margin-bottom: 64px;
  }

  li a {
    grid-template-columns: 1.5rem minmax(0, 1fr) 1rem;
    min-height: 60px;
    padding: 8px 11px;
  }

  li small {
    display: block;
  }
}
