.shelf h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); color: var(--green); }
.affiliate-note { color: var(--muted); font-size: .9rem; margin: .55rem 0 1.2rem; }
.shelf-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.shelf-item { background: var(--white); border: 1px solid var(--line); }
.shelf-item > a { display: flex; flex-direction: column; height: 100%; }
.shelf-item img { width: 100%; height: auto; aspect-ratio: 1.15; object-fit: contain; background: white; }
.shelf-copy { padding: .9rem; flex: 1; display: flex; flex-direction: column; align-items: start; }
.shelf-brand { color: var(--ruby); font-size: .875rem; font-weight: 700; }
.shelf-copy h2 { font-size: clamp(1.22rem, 2vw, 1.5rem); margin: .25rem 0 1rem; }
.shop-button { margin-top: auto; background: var(--green); color: white; padding: .6rem .45rem; display: grid; min-height: 44px; place-items: center; text-align: center; font-size: .95rem; font-weight: 650; width: 100%; }
.shelf-item a:hover .shop-button, .shelf-item a:focus-visible .shop-button { background: var(--ruby); }
.shelf-more { margin-top: 1.4rem; gap: .3rem 1.3rem; }
.shelf-more a { padding-block: .5rem; text-decoration: underline; text-underline-offset: .22em; }
.shelf details { margin-top: .65rem; border-top: 1px solid var(--line); }
.shelf summary { cursor: pointer; padding: .7rem 0; font-weight: 600; }
.shelf summary:focus-visible { outline: 3px solid var(--ruby); }
.shelf fieldset { border: 0; padding: .4rem 0; margin: 0; }
.shelf legend { color: var(--muted); }
.shelf label { display: block; cursor: pointer; padding: .32rem 0; }
.list-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.list-controls button { background: var(--white); border: 1px solid var(--line); font: inherit; padding: .45rem .85rem; cursor: pointer; }
@media (max-width: 62rem) { .shelf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 40rem) {
  .shelf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  .shelf-copy { padding: .7rem; }
  .shelf-copy h2 { font-size: 1.18rem; }
  .shelf-item img { aspect-ratio: 1.35; }
  .shelf-more { font-size: .9rem; }
}

.teacher-grid { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:1rem; max-width:62rem; }
.teacher-grid .shelf-item img { max-height:300px; padding:1rem; box-sizing:border-box; }
.teacher-grid .shelf-copy p { margin:0 0 1rem; }
@media (max-width: 38rem) {.teacher-grid {grid-template-columns:1fr;}.teacher-grid .shelf-item img {max-height:240px;}}
