
.notebook {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: auto;
  gap: 72px 24px;
  max-width: min(1380px, calc(100% - var(--gutter) * 2));
  margin-bottom: var(--section-space);
  padding: 72px 48px 96px;
  background-color: var(--surface);
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 20px 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  isolation: isolate;
}
.notebook .study:nth-child(n) {
  width: 100%;
  grid-row: auto;
  margin: 0;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  box-shadow: 0 6px 16px #0000000a;
  transform: rotate(var(--board-angle, 0deg));
  z-index: 1;
}
.notebook .study:nth-child(6n+1) { grid-column: 2 / span 5; --board-angle: -3deg; }
.notebook .study:nth-child(6n+2) { grid-column: 8 / span 4; margin-top: 116px; --board-angle: 3deg; }
.notebook .study:nth-child(6n+3) { grid-column: 1 / span 4; margin-top: 16px; --board-angle: 2deg; }
.notebook .study:nth-child(6n+4) { grid-column: 7 / span 5; margin-top: 76px; --board-angle: -2deg; }
.notebook .study:nth-child(6n+5) { grid-column: 2 / span 4; margin-top: 12px; --board-angle: -2deg; }
.notebook .study:nth-child(6n) { grid-column: 8 / span 4; margin-top: 64px; --board-angle: 3deg; }
.notebook .study::before {
  content: '';
  position: absolute;
  z-index: 2;
  top: -10px;
  left: calc(50% - 28px);
  width: 56px;
  height: 22px;
  background: var(--accent);
  opacity: .65;
  transform: rotate(-4deg);
  pointer-events: none;
}
.notebook .study:hover, .notebook .study:focus-within { z-index: 2; }
.notebook .study-image img { max-height: 400px; }
.notebook .study figcaption { padding: 16px 4px 4px; background: transparent; }
.notebook .study-meta { margin-bottom: 8px; }
.notebook .study h2 { font-size: var(--type-title); }
.notebook .study figcaption > p { display: block; margin: 10px 0 0; color: var(--muted); }
.notebook .study-source { margin-top: 14px; }
.notebook-empty { grid-column: 1 / -1; }

@media (min-width: 701px) and (max-width: 1000px) {
  .notebook { padding: 56px 24px 72px; gap: 56px 20px; }
  .notebook .study:nth-child(6n+1), .notebook .study:nth-child(6n+3), .notebook .study:nth-child(6n+5) { grid-column: 1 / span 6; }
  .notebook .study:nth-child(6n+2), .notebook .study:nth-child(6n+4), .notebook .study:nth-child(6n) { grid-column: 8 / span 5; }
}
@media (max-width: 700px) {
  .notebook { grid-template-columns: 1fr; padding: 40px 20px 56px; gap: 40px; max-width: calc(100% - 24px); border-radius: 14px; }
  .notebook .study:nth-child(n) { grid-column: 1; width: 92%; margin: 0; padding: 12px; --board-angle: -2deg; justify-self: start; }
  .notebook .study:nth-child(even) { justify-self: end; --board-angle: 2deg; }
  .notebook .study:nth-child(3n) { width: 84%; }
  .notebook .study-image img { max-height: none; }
}
