:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1f2933;
  background: #fff;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #fff;
}

main {
  width: min(100% - 2rem, 52rem);
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.catalog-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #d8dee3;
}

h1 {
  margin: 0;
  color: #17222b;
  font-size: clamp(1.7rem, 4vw, 2.25rem);
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.legend {
  margin: 0.45rem 0 0;
  color: #697782;
  font-size: 0.78rem;
}

.search {
  flex: 0 1 14rem;
}

.search span {
  display: block;
  margin-bottom: 0.3rem;
  color: #52606b;
  font-size: 0.75rem;
  font-weight: 650;
}

input[type="search"] {
  width: 100%;
  padding: 0.52rem 0.65rem;
  border: 1px solid #b8c2ca;
  border-radius: 0.4rem;
  outline: none;
  background: #fff;
  color: #17222b;
  font: inherit;
  font-size: 0.9rem;
}

input[type="search"]:focus {
  border-color: #4474a0;
  box-shadow: 0 0 0 3px rgba(68, 116, 160, 0.15);
}

.catalog-list {
  margin: 1.2rem 0 0;
  padding: 0;
  list-style: none;
}

.catalog-item {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.72rem 0.2rem;
  border-bottom: 1px solid #e5e9ec;
}

.marker {
  font-size: 0.86rem;
  text-align: center;
}

.catalog-item[data-category="overview"] .marker,
.catalog-item[data-category="references"] .marker {
  color: #8a969f;
}

.deck-link {
  width: fit-content;
  color: #235f91;
  font-size: 1rem;
  font-weight: 580;
  line-height: 1.45;
  text-decoration: underline;
  text-decoration-color: rgba(35, 95, 145, 0.38);
  text-underline-offset: 3px;
}

.deck-link:hover {
  color: #17466d;
  text-decoration-color: currentColor;
}

.deck-link:focus-visible {
  border-radius: 3px;
  outline: 3px solid rgba(68, 116, 160, 0.22);
  outline-offset: 3px;
}

#empty-state {
  margin: 1.5rem 0;
  color: #697782;
  font-size: 0.9rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 38rem) {
  main {
    padding-top: 1.25rem;
  }

  .catalog-header {
    align-items: stretch;
    flex-direction: column;
    gap: 0.8rem;
  }

  .search {
    flex-basis: auto;
  }
}
