:root {
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --accent: #f93c31;
  --grid-size: 20px;
  color: #000;
  font: 400 15px/1.6 Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: #fff;
  background-image: linear-gradient(#ccc 1px, transparent 1px),
                    linear-gradient(90deg, #ccc 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
}

.resource-page {
  --inset: 28px;
  padding: 20px 24px 48px;
}

.resource-hero,
.resource-paper {
  border: 1px solid #000;
  background: #fff;
}

.resource-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  background: #000;
  color: #fff;
  font: 400 11px/1.4 var(--mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}

.resource-bar a {
  color: inherit;
  text-decoration: none;
}

.resource-bar a:hover {
  text-decoration: underline;
}

.resource-intro {
  padding: 30px var(--inset) 28px;
}

.resource-intro h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 860;
  line-height: 1.02;
}

.resource-intro p {
  margin: 14px 0 0;
  color: #666;
  font-size: 19px;
  font-weight: 450;
  line-height: 1.45;
}

.resource-paper {
  margin-top: 18px;
  padding: 0 var(--inset) 30px;
}

.resource-index {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  padding: 17px 0 16px;
  border-bottom: 1px solid #000;
  font: 500 13px/1.5 var(--mono);
}

.resource-index a {
  color: #333;
  text-decoration: none;
}

.resource-index a:hover {
  text-decoration: underline;
  text-decoration-color: var(--accent);
}

.resource-index span {
  margin-right: 4px;
  color: #666;
}

.resource-section {
  margin-top: 34px;
  color: #333;
  line-height: 1.65;
}

.resource-section h2 {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 0 12px;
  color: #000;
  font-size: 23px;
  font-weight: 820;
  line-height: 1.15;
  scroll-margin-top: 20px;
}

.resource-section h2 span {
  display: inline-grid;
  flex: 0 0 30px;
  height: 30px;
  place-items: center;
  background: #000;
  color: #fff;
  font: 500 10px var(--mono);
}

.resource-section ul {
  margin: 0;
  padding-inline-start: 22px;
}

.resource-section li + li,
.resource-section li ul {
  margin-top: 5px;
}

.resource-section a {
  color: inherit;
  text-decoration: underline 2px var(--accent);
  text-underline-offset: .16em;
  overflow-wrap: anywhere;
}

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

.resource-section code {
  border: 1px solid #ddd;
  padding: 1px 4px;
  background: #f6f6f6;
  font: 400 12px var(--mono);
  white-space: nowrap;
}

.resource-footer {
  margin-top: 18px;
}

@media (max-width: 600px) {
  .resource-page {
    --inset: 16px;
    padding: 12px 12px 32px;
  }

  .resource-index {
    gap: 8px 16px;
  }
}
