:root {
  color-scheme: light;
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #171717;
  --muted: #777777;
  --ring: rgba(23, 23, 23, 0.12);
  --shadow: 0 14px 36px rgba(23, 23, 23, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  font-family: Inter, sans-serif;
  background: var(--bg);
  color: var(--text);
}

#links {
  width: min(100%, 440px);
  min-height: calc(100vh - 48px);
  margin: 0 auto;
  display: grid;
  gap: 12px;
  align-content: center;
}

.link-card {
  display: grid;
  grid-template-columns: 40px 1fr 18px;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--ring);
  border-radius: 22px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.link-card:hover,
.link-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(23, 23, 23, 0.12);
}

.link-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 3px;
}

.logo-wrap {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #f5f5f5;
  overflow: hidden;
}

.logo-wrap img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.text,
.title,
.preview {
  min-width: 0;
}

.title,
.preview {
  display: block;
  overflow-wrap: anywhere;
}

.title {
  font-size: 1rem;
  font-weight: 650;
}

.preview {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.86rem;
}

.open-icon {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1;
}

@media (max-width: 520px) {
  body {
    padding: 16px;
  }

  #links {
    min-height: calc(100vh - 32px);
  }

  .link-card {
    grid-template-columns: 38px 1fr 18px;
    border-radius: 18px;
  }

  .logo-wrap {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .link-card {
    transition: none;
  }

  .link-card:hover,
  .link-card:focus-visible {
    transform: none;
  }
}
