.notes-section :where([id]), #note-index {
  scroll-margin-top: clamp(1.5rem, 4vw, 4rem);
}

.notes-index-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  margin-bottom: clamp(1.6rem, 3.2vw, 3rem);
}

.notes-index-header .section-heading,
.notes-archive .section-heading {
  margin: 0;
}

.notes-topics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.1rem clamp(1rem, 2.8vw, 2rem);
}

.notes-topics a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
  text-decoration: underline;
  text-underline-offset: 0.35em;
  text-decoration-color: var(--border);
}

.notes-topics a:hover {
  color: var(--copper);
  text-decoration-color: currentColor;
}

.notes-feature {
  border-block: 1px solid var(--border);
}

.notes-feature-intro {
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(0, 1.06fr);
  background: var(--paper-edge);
}

.notes-feature-copy {
  align-self: center;
  padding: clamp(1.5rem, 4.25vw, 4.15rem);
}

.notes-feature-copy h3 {
  margin: 0.55rem 0 1rem;
  font-size: clamp(2rem, 3.66vw, 3.55rem);
  line-height: 1.24;
  letter-spacing: -0.055em;
  font-weight: 710;
  text-wrap: balance;
}

.notes-feature-copy > p:not(.section-kicker) {
  max-width: 24em;
  color: var(--muted);
  line-height: 1.8;
  text-wrap: pretty;
}

.notes-feature-copy .button-outline { margin-top: 1.35rem; }
.notes-feature-copy .button-outline:hover { color: #833619; }

.notes-feature-figure {
  position: relative;
  min-height: clamp(20rem, 33vw, 30rem);
  overflow: hidden;
  background: #38261c;
}

.notes-feature-figure img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 54%;
}

.notes-feature-text {
  display: grid;
  grid-template-columns: minmax(0, 0.35fr) minmax(0, 1fr);
  gap: 1.25rem clamp(2rem, 6.5vw, 6.8rem);
  padding-block: clamp(2rem, 5vw, 4.5rem);
}

.notes-feature-side {
  padding-top: 0.3rem;
}

.notes-feature-side .text-link { margin-top: 0.45rem; }

.notes-prose {
  max-width: 48rem;
  color: var(--muted);
  line-height: 1.9;
  text-wrap: pretty;
}

.notes-prose h4 {
  margin: 0 0 0.7rem;
  color: var(--ink);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  line-height: 1.35;
  letter-spacing: -0.035em;
}

.notes-prose p + p { margin-top: 0.8rem; }
.notes-prose strong { color: var(--ink); font-weight: 650; }

.notes-steps {
  margin: 1.1rem 0;
  padding-inline-start: 1.4rem;
}

.notes-steps li { padding-inline-start: 0.25rem; }
.notes-steps li + li { margin-top: 0.45rem; }
.notes-steps li::marker { color: var(--copper); font-weight: 650; }

.notes-archive {
  display: grid;
  grid-template-columns: minmax(0, 0.35fr) minmax(0, 1fr);
  gap: 1rem clamp(2rem, 6.5vw, 6.8rem);
  margin-top: clamp(2.8rem, 5.6vw, 5.2rem);
}

.notes-archive-heading h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.045em;
}

.notes-entries { border-top: 1px solid var(--border); }
.notes-entry { border-bottom: 1px solid var(--border); }

.notes-entry summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.35rem 1.2rem;
  padding: 1.2rem 0;
  list-style: none;
  cursor: pointer;
}

.notes-entry summary::-webkit-details-marker { display: none; }

.notes-entry summary:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 0.25rem;
}

.notes-entry-title {
  font-size: clamp(1.12rem, 1.95vw, 1.5rem);
  font-weight: 660;
  line-height: 1.45;
  letter-spacing: -0.025em;
  transition: color 160ms ease;
}

.notes-entry summary:hover .notes-entry-title { color: var(--copper); }

.notes-entry-summary {
  grid-column: 1;
  color: var(--muted);
  line-height: 1.65;
}

.notes-entry-icon {
  grid-area: 1 / 2 / 3;
  position: relative;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--copper);
}

.notes-entry-icon::before,
.notes-entry-icon::after {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0.72rem;
  height: 1px;
  transform: translate(-50%, -50%);
  background: currentColor;
  content: "";
}

.notes-entry-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.notes-entry[open] .notes-entry-icon::after { display: none; }
.notes-entry-text { padding: 0.15rem 0.7rem 1.4rem 0; }
.notes-entry-text .text-link { margin-top: 0.55rem; }

@media (max-width: 56rem) {
  .notes-feature-intro { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .notes-feature-break { display: none; }
}

@media (max-width: 44rem) {
  .notes-feature-intro, .notes-feature-text, .notes-archive { grid-template-columns: 1fr; }
  .notes-feature-figure { min-height: clamp(12rem, 55vw, 21rem); }
  .notes-feature-side { padding-top: 0; }
  .notes-feature-side .text-link { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .notes-entry-title { transition: none; }
}
