/*
 * Ligant Bench Tools: catalog page layout.
 *
 * Defined in terms of the tokens in tokens.css. No hex value of its own,
 * for the same reason the reference tool's own stylesheet carries none:
 * a colour typed here instead of read from the shared block is exactly the
 * kind of drift tokens.css exists to end.
 */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--page);
  color: var(--text-secondary);
  font-family: var(--font);
  line-height: 1.55;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--surface);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

.site-header {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 28px 24px 0;
}

.lockup {
  display: flex;
  align-items: center;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}
.wordmark {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
}

.site-nav {
  display: flex;
  gap: 20px;
}
.site-nav a {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--brand-teal);
}

main {
  max-width: 840px;
  margin: 0 auto;
  padding: 40px 24px 24px;
}

h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  margin: 0 0 12px;
}

.lede {
  color: var(--text-muted);
  max-width: 60ch;
  margin: 0 0 36px;
}

.tool-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.tool-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tool-card:hover,
.tool-card:focus-within {
  border-color: var(--brand-teal);
}

/* The primary link covers the whole card via a stretched ::after, so the
   card is clickable everywhere the secondary reference links (below) are
   not. Two overlapping <a> elements can't nest, so this is how a card can
   carry both a primary action and secondary ones without JavaScript. */
.card-primary-link {
  display: block;
  padding: 24px 24px 0;
  color: inherit;
  text-decoration: none;
}
.card-primary-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.card-primary-link:focus-visible {
  outline: none;
}
.card-primary-link:focus-visible::after {
  outline: 2px solid var(--brand-teal);
  outline-offset: -2px;
}

.tool-card h2 {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.011em;
  color: var(--text-primary);
  margin: 0 0 10px;
}

.tool-card p {
  color: var(--text-muted);
  margin: 0 0 16px;
}

.tool-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-teal);
}

.card-refs {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 16px;
  padding: 12px 24px 20px;
  margin-top: 4px;
}
.card-refs a {
  position: relative;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-caption);
  text-decoration: none;
}
.card-refs a:hover,
.card-refs a:focus-visible {
  color: var(--brand-teal);
  text-decoration: underline;
}

.site-footer {
  max-width: 840px;
  margin: 24px auto 0;
  padding: 24px 24px 40px;
  border-top: 1px solid var(--border);
  color: var(--text-caption);
  font-size: 13px;
}

.site-footer a {
  color: var(--brand-teal);
  text-decoration: none;
}
.site-footer a:hover {
  text-decoration: underline;
}
