.nrdb-hero {
  --nrdb-paper: #f1f0ec;
  --nrdb-soft: #deddd8;
  --nrdb-ink: #111214;
  --nrdb-muted: #666560;
  --nrdb-line: rgba(17, 18, 20, 0.16);
  --nrdb-coral: #c65a50;
  margin: 0 0 28px;
  padding: 0 18px 18px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--nrdb-paper);
  color: var(--nrdb-ink);
  font-family: Arial, Helvetica, sans-serif;
}

.nrdb-hero,
.nrdb-hero * {
  box-sizing: border-box;
}

.nrdb-hero__nav {
  min-height: 62px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 2px;
  font-size: 10px;
  text-transform: uppercase;
}

.nrdb-hero__brand {
  color: inherit;
  font-weight: 700;
  text-decoration: none;
}

.nrdb-hero__nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.nrdb-hero__nav-links a {
  color: inherit;
  text-decoration: none;
}

.nrdb-hero__nav-links a:hover,
.nrdb-hero__nav-links a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nrdb-hero__code {
  text-align: right;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  letter-spacing: 0.1em;
}

.nrdb-hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1.22fr;
  grid-template-rows: 128px 290px 64px;
  gap: 12px;
}

.nrdb-hero__grid > * {
  min-width: 0;
}

.nrdb-hero__tools {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: 22px;
  background: var(--nrdb-soft);
}

.nrdb-hero__tool {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 26px;
  align-items: center;
  padding: 0 12px;
  border-radius: 14px;
  background: #ecebe7;
  color: var(--nrdb-ink);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 9px;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
}

.nrdb-hero__tool--primary {
  background: var(--nrdb-ink);
  color: var(--nrdb-paper);
}

.nrdb-hero__tool strong {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nrdb-hero__tool-arrow {
  text-align: right;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}

.nrdb-hero__info {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  padding: 18px;
  border-radius: 22px;
  background: var(--nrdb-soft);
}

.nrdb-hero__info strong {
  display: block;
  margin-top: 18px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.1;
}

.nrdb-hero__info strong span {
  display: block;
}

.nrdb-hero__info-arrow {
  position: absolute;
  right: 18px;
  bottom: 16px;
  font-size: 18px;
}

.nrdb-hero__index {
  color: var(--nrdb-muted);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.nrdb-hero__visual {
  position: relative;
  grid-column: 3;
  grid-row: 1 / 3;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #c9c8c4;
}

.nrdb-hero__visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 51% 50%;
}

.nrdb-hero__visual figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 24px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 16px;
  background: rgba(235, 232, 226, 0.8);
  color: var(--nrdb-ink);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(9px);
}

.nrdb-hero__visual figcaption span:first-child {
  color: var(--nrdb-coral);
}

.nrdb-hero__visual figcaption strong {
  min-width: 0;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nrdb-hero__visual-link {
  color: inherit;
  text-align: right;
  text-decoration: none;
}

.nrdb-hero__copy {
  grid-column: 1 / 3;
  grid-row: 2;
  min-width: 0;
  padding: 24px 0 0;
}

.nrdb-hero__copy h1 {
  max-width: 780px;
  margin: 16px 0 12px;
  color: var(--nrdb-ink);
  font-size: clamp(42px, 5.1vw, 66px);
  font-weight: 600;
  line-height: 0.92;
  letter-spacing: -0.055em;
}

.nrdb-hero--finishes .nrdb-hero__copy h1 {
  font-size: clamp(34px, 4.4vw, 56px);
}

.nrdb-hero__copy p {
  max-width: 480px;
  margin: 0;
  color: var(--nrdb-ink);
  font-size: 13px;
  line-height: 1.45;
}

.nrdb-hero__tags {
  grid-column: 1 / 4;
  grid-row: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.nrdb-hero__tags span {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e1dd;
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nrdb-hero__tags--stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nrdb-hero__tags--stats > span {
  justify-content: space-between;
  padding: 0 18px;
}

.nrdb-hero__tags--stats b {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nrdb-hero__tags--stats strong {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 20px;
  letter-spacing: -0.04em;
}

@media (max-width: 900px) {
  .nrdb-hero__nav-links {
    gap: 14px;
  }

  .nrdb-hero__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 112px 330px auto 108px;
    gap: 8px;
  }

  .nrdb-hero__tools {
    grid-column: 1;
    grid-row: 1;
    padding: 7px;
    border-radius: 16px;
  }

  .nrdb-hero__info {
    grid-column: 2;
    grid-row: 1;
    padding: 13px;
    border-radius: 16px;
  }

  .nrdb-hero__info strong {
    margin-top: 14px;
    font-size: 14px;
  }

  .nrdb-hero__index {
    overflow-wrap: anywhere;
  }

  .nrdb-hero__visual {
    grid-column: 1 / 3;
    grid-row: 2;
    border-radius: 16px;
  }

  .nrdb-hero__copy,
  .nrdb-hero--finishes .nrdb-hero__copy {
    grid-column: 1 / 3;
    grid-row: 3;
    padding: 18px 4px 14px;
  }

  .nrdb-hero__copy h1,
  .nrdb-hero--finishes .nrdb-hero__copy h1 {
    max-width: 680px;
    font-size: clamp(40px, 8vw, 64px);
  }

  .nrdb-hero__tags {
    grid-column: 1 / 3;
    grid-row: 4;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }
}

@media (max-width: 620px) {
  .nrdb-hero {
    padding: 0 12px 12px;
    border-radius: 20px;
  }

  .nrdb-hero__nav {
    min-height: 52px;
    grid-template-columns: 1fr auto;
  }

  .nrdb-hero__nav-links {
    display: none;
  }

  .nrdb-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 112px 100px 260px auto 108px;
  }

  .nrdb-hero__tools {
    grid-column: 1;
    grid-row: 1;
  }

  .nrdb-hero__info {
    grid-column: 1;
    grid-row: 2;
  }

  .nrdb-hero__info strong {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .nrdb-hero__info strong span:not(:last-child)::after {
    content: " /";
    color: var(--nrdb-muted);
  }

  .nrdb-hero__visual {
    grid-column: 1;
    grid-row: 3;
  }

  .nrdb-hero__copy,
  .nrdb-hero--finishes .nrdb-hero__copy {
    grid-column: 1;
    grid-row: 4;
  }

  .nrdb-hero__tags {
    grid-column: 1;
    grid-row: 5;
  }

  .nrdb-hero__tool {
    grid-template-columns: 20px minmax(0, 1fr) 18px;
    padding: 0 7px;
    font-size: 7px;
  }

  .nrdb-hero__visual figcaption {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 11px 12px;
  }

  .nrdb-hero__copy h1,
  .nrdb-hero--finishes .nrdb-hero__copy h1 {
    max-width: 100%;
    font-size: clamp(30px, 9vw, 38px);
    line-height: 0.96;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .nrdb-hero__copy p {
    max-width: 100%;
    font-size: 12px;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .nrdb-hero__tags {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nrdb-hero__tags span:last-child {
    grid-column: 1 / 3;
  }

  .nrdb-hero__tags.nrdb-hero__tags--stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nrdb-hero__tags--stats > span {
    padding: 0 9px;
  }

  .nrdb-hero__tags--stats > span:last-child {
    grid-column: auto;
  }

  .nrdb-hero__tags--stats b {
    font-size: 6px;
  }

  .nrdb-hero__tags--stats strong {
    font-size: 16px;
  }
}
