.shelf-header,
.shelf-heading,
.classroom-crumb,
.shelf-meter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.shelf-header { margin-bottom: 1.6rem; }
.shelf-header h1 { font-size: clamp(2.1rem, 4.4vw, 3.65rem); }
.studio-entry {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 44px;
  padding: .55rem .96rem;
  border: 1px solid #bcb3a6;
  border-radius: .5rem;
  background: transparent;
  color: var(--ink);
  font-size: .91rem;
  font-weight: 620;
}
.studio-entry:hover { background: white; border-color: var(--ink); }
.shelf-cta i, .shelf-link i, .studio-entry i {
  display: inline-block;
  width: .5em;
  height: .5em;
  border: solid currentColor;
  border-width: 1.5px 1.5px 0 0;
  transform: rotate(45deg);
  margin-right: .2em;
}
.shelf-next {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-radius: 14px;
  padding: clamp(1.25rem, 3vw, 2.4rem);
  background: #e9edfd;
}
.shelf-next::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0 0 0 30%;
  background: linear-gradient(90deg,#e9edfd,rgba(233,237,253,.32) 65%,rgba(233,237,253,.12)),url('/editorial/blue-folds-small.webp') right 48% / cover;
}
.shelf-next > div { max-width: 62%; }
.shelf-next h2 { font-size: clamp(1.3rem, 2.7vw, 2.1rem); line-height: 1.16; }
.shelf-kicker, .shelf-program { font-size: .77rem; font-weight: 620; letter-spacing: .015em; }
.shelf-kicker { margin-bottom: .45rem; color: #243786; }
.shelf-next h2 + p { margin-top: .6rem; font-size: .91rem; color: #29344c; }
.shelf-cta {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  min-height: 44px;
  padding: .7rem 1rem;
  background: var(--ink);
  color: white;
  font-size: .93rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: .45rem;
  transition: background .2s var(--ease);
}
.shelf-cta:hover { background: #153bc9; }
.shelf { margin-top: clamp(2.25rem, 5vw, 4.25rem); }
.shelf-heading h2 { font-size: clamp(1.65rem, 3vw, 2.3rem); }
.shelf-search { width: min(100%, 18.5rem); position: relative; }
.shelf-search input { padding-left: 2.45rem; font-size: .9rem; min-height: 44px; border-color: #c9c1b6; border-radius: .5rem; }
.shelf-search::before, .shelf-search::after {
  position: absolute; content: ''; pointer-events: none; color: #494540;
}
.shelf-search::before { left: 1rem; top: calc(50% - .38rem); width: .69rem; height: .69rem; border: 1.5px solid; border-radius: 50%; }
.shelf-search::after { left: 1.56rem; top: calc(50% + .25rem); width: .31rem; height: 1.5px; transform: rotate(45deg); background: currentColor; }
.shelf-filters { display: flex; gap: 1.35rem; border-bottom: 1px solid var(--line); margin: .8rem 0 1.35rem; }
.shelf-filters button { min-height: 44px; border: 0; padding: .5rem 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: transparent; color: var(--muted); font-size: .9rem; font-weight: 550; }
.shelf-filters button[aria-pressed="true"] { color: var(--ink); border-color: var(--blue); }
.shelf-filters button:hover { color: var(--blue); }
.shelf-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(1rem, 2vw, 1.6rem); padding: 0; list-style: none; }
.shelf-card { position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 12px; background: white; border: 1px solid var(--line); }
.shelf-card-cover { position: relative; overflow: hidden; border-radius: 11px 11px 0 0; background: #e4e7ed; aspect-ratio: 1.98; }
.shelf-card-cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .46s var(--ease); }
.cover-status { position: absolute; left: .85rem; top: .85rem; border-radius: 3px; padding: .2rem .5rem; background: white; color: #20482c; font-size: .77rem; font-weight: 650; }
.shelf-card-body { flex: 1; display: flex; flex-direction: column; padding: clamp(1rem, 2vw, 1.4rem); }
.shelf-program { color: #4a4b54; margin-bottom: .4rem; }
.shelf-card h3 { font-size: clamp(1.08rem, 1.6vw, 1.28rem); line-height: 1.22; letter-spacing: -.035em; }
.shelf-card h3 a { text-decoration: none; overflow-wrap: anywhere; }
.shelf-card h3 a::after { position: absolute; content: ''; inset: 0; z-index: 1; border-radius: 12px; }
.shelf-card h3 a:focus-visible { outline: none; }
.shelf-card h3 a:focus-visible::after { outline: 3px solid var(--blue); outline-offset: 3px; }
.shelf-first { margin-top: .65rem; font-size: .89rem; line-height: 1.45; color: var(--muted); overflow-wrap: anywhere; }
.shelf-card-footer { margin-top: auto; padding-top: 1.3rem; }
.shelf-meter { font-size: .79rem; color: var(--muted); }
.shelf-meter strong { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.shelf-card progress { margin-top: .35rem; height: .32rem; }
.shelf-link { display: inline-flex; align-items: center; gap: .4rem; margin-top: .8rem; color: #1737aa; font-size: .85rem; font-weight: 620; }
.shelf-empty { color: var(--muted); padding-block: 1.5rem; }
.shelf-settings-heading { font-size: 1.45rem; margin: clamp(2.6rem,6vw,5rem) 0 1.4rem; }
.classroom-crumb { margin-bottom: 1.4rem; }
.classroom-crumb > a { color: #1737aa; text-underline-offset: 4px; font-size: .9rem; }
.shelf-settings-heading + .pathway-control { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
@media (hover: hover) {
  .shelf-card:hover img { transform: scale(1.035); }
  .shelf-card:hover .shelf-link { text-decoration: underline; text-underline-offset: 3px; }
}
@media (max-width: 900px) {
  .shelf-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .shelf-grid { grid-template-columns: minmax(0,1fr); }
  .shelf-header { flex-wrap: wrap; }
  .shelf-heading { align-items: stretch; flex-direction: column; gap: .9rem; }
  .shelf-search { width: 100%; }
  .shelf-next { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .shelf-next > div { max-width: 100%; }
  .shelf-next::before { inset: 0; background: linear-gradient(90deg,#e9edfd 13%,rgba(233,237,253,.80) 66%,rgba(233,237,253,.45)),url('/editorial/blue-folds-small.webp') right center / cover; }
}
@media (prefers-reduced-motion: reduce) {
  .shelf-card-cover img, .shelf-cta { transition: none; }
  .shelf-card:hover img { transform: none; }
}
