:root {
  color-scheme: light;
  --ink: #242424;
  --body: #4c4c4c;
  --muted: #707070;
  --line: #e8e8e8;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #fff;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: #e4e4e4;
  color: #111;
}

a {
  color: inherit;
  text-decoration-color: #b5b5b5;
  text-underline-offset: 4px;
}

a:hover {
  color: #000;
  text-decoration-color: currentColor;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
  border-radius: 2px;
}

.container {
  width: min(100%, clamp(808px, 56vw, 1040px));
  margin-inline: auto;
  padding-inline: 32px;
}

.hero {
  padding-top: 72px;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 24px;
}

.wordmark {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.8px;
  line-height: 1.3;
}

.who {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}

.bio {
  color: var(--body);
  max-width: 75ch;
}

.channels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--body);
}

.channels a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  text-decoration: none;
}

.channels a:hover {
  background: #f5f5f5;
}

.channels svg {
  display: block;
}

.section {
  margin-top: 52px;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.section-title {
  font-size: 16px;
  font-weight: 600;
}

.section-note,
.stars,
.index-meta,
.board-meta,
.article-date {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.package + .package {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.package-name {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 17px;
  font-weight: 600;
}

.package-install {
  margin: 2px 0 10px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  color: var(--muted);
}

.package-desc,
.index-desc,
.medals {
  font-size: 15px;
  color: var(--body);
}

.package-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--body);
}

.package-links a {
  padding-block: 4px;
}

.index-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 16px;
  padding-block: 16px;
  text-decoration: none;
}

.index-row + .index-row,
.board-row + .board-row,
.article-row + .article-row {
  border-top: 1px solid var(--line);
}

.index-name,
.article-title {
  font-size: 15px;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #b5b5b5;
  text-underline-offset: 4px;
}

.index-row:hover .index-name,
.article-row:hover .article-title {
  text-decoration-color: currentColor;
}

.medals {
  margin-bottom: 16px;
}

.board-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: baseline;
  gap: 24px;
  padding-block: 16px;
}

.board-rank {
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.board-rank small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}

.board-info h3 {
  font-size: 15px;
  font-weight: 500;
}

.article-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: baseline;
  gap: 24px;
  padding-block: 16px;
  text-decoration: none;
}

.footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 24px;
  border-top: 1px solid var(--line);
  margin-top: 64px;
  padding: 20px 0 40px;
  font-size: 13px;
  color: var(--muted);
}

p,
h3,
.index-name,
.index-desc,
.article-title {
  overflow-wrap: break-word;
}

@media (max-width: 600px) {
  .container {
    padding-inline: 24px;
  }

  .hero {
    padding-top: 40px;
  }

  .wordmark {
    font-size: 26px;
  }

  .section {
    margin-top: 40px;
  }

  .index-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }

  .index-desc {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .board-row {
    gap: 16px;
  }

  .article-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }
}

@media print {
  @page {
    margin: 16mm;
  }

  .container {
    width: 100%;
    padding: 0;
  }

  .hero {
    padding-top: 0;
  }

  .channels {
    gap: 16px;
    font-size: 13px;
  }

  .channels a {
    width: auto;
    height: auto;
  }

  .channels svg,
  .footer {
    display: none;
  }

  .channels a::after {
    content: attr(aria-label);
  }

  .section {
    margin-top: 24px;
  }

  .section-head {
    break-after: avoid;
  }

  .package,
  .index-row,
  .board-row,
  .article-row {
    break-inside: avoid;
  }
}
