/* Notes: the list page and single notes.
   Same skeleton as Lab: text starts right of the fixed avatar (144px).
   A note reads in one 680px column; headings in IBM Plex Mono, text in Helvetica. */
.page--notes {
  background: var(--color-bg);
}

.l-page-shell--notes {
  width: min(100%, var(--container-max));
  margin: 0 auto;
}

.l-notes {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: calc(var(--page-gutter) + 88px + 32px);
  padding-right: var(--page-gutter);
}

/* ── List page ────────────────────────────────────────────────── */

.notes-hero {
  padding-top: 22px;
}

.notes-title {
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 56px;
  font-weight: 500;
}

.notes-lead {
  margin-top: 8px;
  max-width: 680px;
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: 24px;
  line-height: 32px;
}

.notes-list {
  margin-top: 72px;
  max-width: 1040px;
}

/* ── Single note ──────────────────────────────────────────────── */

.note {
  padding-top: 22px;
}

.note__kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 20px;
}

.note__kicker a {
  color: var(--color-link);
}

.note__kicker a:hover {
  color: var(--color-link-hover);
}

.note__title {
  margin-top: 12px;
  max-width: 900px;
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 56px;
  font-weight: 500;
  text-wrap: balance;
}

.note__lead {
  margin-top: 20px;
  max-width: 680px;
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
  font-size: 24px;
  line-height: 34px;
}

.note__body {
  margin-top: 48px;
  max-width: 680px;
  color: var(--color-text-primary);
  font-family: var(--font-ui);
  font-size: 20px;
  line-height: 32px;
}

.note__body > * + * {
  margin-top: 20px;
}

.note__body h2 {
  margin-top: 48px;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 36px;
  font-weight: 500;
  text-wrap: balance;
}

.note__body h2 + p {
  margin-top: 12px;
}

.note__body ul,
.note__body ol {
  padding-left: 24px;
}

.note__body li + li {
  margin-top: 8px;
}

.note__body strong {
  font-weight: 600;
}

.note__body a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.note__body a:hover {
  color: var(--color-link-hover);
}

/* A line worth keeping: set large, in mono, no box around it. */
.note__pull {
  margin: 40px 0;
  color: var(--color-text-primary);
  font-family: var(--font-display);
  font-size: 32px;
  line-height: 40px;
  font-weight: 500;
  text-wrap: balance;
}

.note__pull::before {
  content: "“";
  display: block;
  height: 32px;
  color: var(--color-link);
  font-size: 56px;
  line-height: 56px;
}

/* Short dialogue or before/after pairs */
.note__pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.note__card {
  padding: 20px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 14px;
  background: #0d0d0d;
}

.note__card-label {
  display: block;
  margin-bottom: 12px;
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.note__card p {
  font-size: 17px;
  line-height: 25px;
}

.note__card p + p {
  margin-top: 10px;
}

.note__card-title {
  font-weight: 600;
}

.note__card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.note__card-actions span {
  padding: 6px 12px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 8px;
  font-size: 15px;
  line-height: 20px;
}

.note__card-actions span:first-child {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.note__card--loud {
  border-color: #ff8fc7;
  background: #2a1020;
}

.note__card--loud .note__card-actions span:first-child {
  border-color: #ff5fae;
  background: #ff5fae;
}

.note__caption {
  color: var(--color-text-secondary);
  font-size: 15px;
  line-height: 22px;
}

.note__origin {
  margin-top: 56px;
  max-width: 680px;
  padding-top: 20px;
  border-top: 1px solid rgb(255 255 255 / 12%);
  color: var(--color-text-secondary);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 24px;
}

.note__origin a {
  color: var(--color-link);
}

.note__origin a:hover {
  color: var(--color-link-hover);
}

/* Previous / next */
.note-nav {
  margin-top: 96px;
}

.note-nav__grid {
  max-width: 1040px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.note-nav__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 140px;
  padding: 20px 24px 24px;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 16px;
  background: #0d0d0d;
  color: var(--color-text-primary);
  transition: border-color var(--transition-fast);
}

.note-nav__link:hover {
  border-color: rgb(255 255 255 / 26%);
}

.note-nav__link:focus-visible {
  outline: 2px solid var(--color-link);
  outline-offset: 3px;
}

.note-nav__link--next {
  grid-column: 2;
  text-align: right;
}

.note-nav__dir {
  color: var(--color-text-secondary);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 20px;
}

.note-nav__title {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 30px;
  font-weight: 500;
  text-wrap: balance;
}

.page--notes .site-footer {
  margin-top: 120px;
}

@media (max-width: 1100px) {
  .l-notes {
    padding-left: var(--page-gutter-mobile);
    padding-right: var(--page-gutter-mobile);
  }

  .notes-hero,
  .note {
    padding-top: 188px;
  }
}

@media (max-width: 768px) {
  .notes-title,
  .note__title {
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.15;
  }

  .notes-lead,
  .note__lead {
    font-size: 20px;
    line-height: 28px;
  }

  .notes-list {
    margin-top: 48px;
  }

  .note__body {
    margin-top: 36px;
    font-size: 18px;
    line-height: 28px;
  }

  .note__body h2 {
    font-size: 24px;
    line-height: 32px;
  }

  .note__pull {
    font-size: 26px;
    line-height: 34px;
  }

  .note__pair,
  .note-nav__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .note-nav__link--next {
    grid-column: auto;
    text-align: left;
  }

  .page--notes .site-footer {
    margin-top: 80px;
  }
}
