.acc-curriculum {
  --acc-ink: #20382e;
  --acc-muted: #4a6257;
  padding: clamp(2.5rem, 6vw, 5rem) 0;
  background: #f3f5ed;
  color: var(--acc-ink);
  scroll-margin-top: 1rem;
}
.acc-frame { width: min(1090px, calc(100% - 48px)); margin-inline: auto; }
.acc-header { max-width: 53rem; margin-bottom: 1.45rem; }
.acc-curriculum .acc-header h2 {
  margin: 0 0 .65rem;
  font-size: clamp(1.75rem, 3.6vw, 3.35rem);
  line-height: 1.15;
  text-wrap: balance;
}
.acc-header p, .acc-placement p { margin: 0; color: var(--acc-muted); }
.acc-books {
  max-width: 53rem;
  margin-bottom: 1.45rem;
  padding: .8rem 1.1rem;
  border: 1px solid #e1d4e6;
  border-inline-start: 4px solid #875897;
  border-radius: .55rem;
  background: #f8f0f7;
}
.acc-curriculum .acc-books h3 { margin: 0 0 .3rem; color: #603275; font: 730 1.05rem/1.35 system-ui, sans-serif; }
.acc-books p { margin: 0; color: var(--acc-ink); }
.acc-books a { display: inline-block; margin-top: .45rem; color: #603275; font-weight: 740; text-underline-offset: .2em; }
.acc-levels { display: grid; gap: .55rem; }
.acc-level {
  --acc-accent: #643a7a;
  --acc-tint: #eee4f2;
  border: 1px solid #d7dfd5;
  border-inline-start: 4px solid var(--acc-accent);
  border-radius: .7rem;
  background: #fffdf7;
  scroll-margin-top: 1rem;
}
.acc-level-a2 { --acc-accent: #994555; --acc-tint: #f9e5e9; }
.acc-level-b1 { --acc-accent: #965020; --acc-tint: #faeadc; }
.acc-level-b2 { --acc-accent: #806115; --acc-tint: #faefd2; }
.acc-level-b3 { --acc-accent: #246678; --acc-tint: #e0f0f5; }
.acc-level:target { outline: 2px solid var(--acc-accent); outline-offset: 3px; }
.acc-level > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(.55rem, 1.7vw, 1.15rem);
  min-height: 4.65rem;
  padding: .73rem clamp(.63rem, 2vw, 1.2rem);
  cursor: pointer;
  list-style: none;
}
.acc-level > summary::-webkit-details-marker { display: none; }
.acc-level > summary::after { content: '+'; color: var(--acc-accent); font: 600 1.45rem/1 system-ui, sans-serif; }
.acc-level[open] > summary::after { content: '−'; }
.acc-code {
  display: inline-grid;
  place-items: center;
  min-width: 3.1rem;
  min-height: 2.72rem;
  border-radius: .48rem;
  background: var(--acc-tint);
  color: var(--acc-accent);
  font: 760 1.15rem/1 system-ui, sans-serif;
}
.acc-at-a-glance { min-width: 0; display: grid; row-gap: .12rem; }
.acc-at-a-glance > strong { font-size: clamp(1rem, 1.6vw, 1.19rem); line-height: 1.35; }
.acc-bands { display: flex; flex-wrap: wrap; gap: 0 .75rem; color: var(--acc-muted); font-size: .83rem; }
.acc-bands > :last-child:not(:first-child) { color: var(--acc-accent); font-weight: 650; }
.acc-teachers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
  padding: .15rem clamp(.63rem, 2vw, 1.2rem) .9rem;
}
.acc-teacher { padding: .75rem .88rem; border: 1px solid #e2e6dc; border-radius: .5rem; background: #f7f7f1; }
.acc-teacher h4 { margin: 0 0 .44rem; color: var(--acc-ink); font-size: .99rem; }
.acc-topics { list-style: none; margin: 0; padding: 0; }
.acc-topics li + li { border-top: 1px solid #d9e0d8; margin-top: .62rem; padding-top: .62rem; }
.acc-topics p { margin: .13rem 0 0; color: var(--acc-muted); font-size: .92rem; line-height: 1.5; }
.acc-time { display: block; color: var(--acc-accent); font-size: .77rem; font-weight: 650; }
.acc-friday { grid-column: 1 / -1; background: var(--acc-tint); border-color: transparent; }
.acc-friday .acc-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
.acc-friday .acc-topics li + li { border: 0; margin: 0; padding: 0; }
.acc-placement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .8rem 1.5rem;
  margin-top: 1rem;
  padding: 1rem 1.15rem;
  border: 1px solid #d5dfd3;
  border-radius: .66rem;
  background: #e7eee4;
}
.acc-curriculum .acc-placement h3 { margin: 0 0 .33rem; font: 730 1rem/1.3 system-ui, sans-serif; }
.acc-placement p { max-width: 63ch; font-size: .89rem; }
.acc-placement a { color: #234b37; font-weight: 750; text-underline-offset: 3px; }
.acc-curriculum :focus-visible { outline: 2px solid #875624; outline-offset: 3px; }
.acc-book-gallery { margin-top: clamp(2rem, 5vw, 3.7rem); scroll-margin-top: 1rem; }
.acc-book-gallery-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .15rem 1rem; margin-bottom: .75rem; }
.acc-curriculum .acc-book-gallery-heading h3 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.55rem); }
.acc-curriculum .acc-book-gallery-heading p { margin: 0; font-size: .86rem; color: #654d67; }
.acc-book-display {
  padding: clamp(.85rem, 2.3vw, 1.65rem);
  border-radius: .85rem;
  color: #fef6e9;
  background: radial-gradient(ellipse at 48% 0%, #514259, #302335 72%);
  box-shadow: 0 .55rem 1.6rem #39294128;
}
.acc-book-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(.55rem, 1.35vw, .95rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.acc-book-display .acc-book-tile {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  align-items: start;
  justify-items: center;
  height: 100%;
  padding: .65rem .45rem .72rem;
  overflow-wrap: anywhere;
  text-align: center;
  text-decoration: none;
  color: #fff9ec;
  background: #fff8ec0c;
  border: 1px solid #fff8ec25;
  border-radius: .55rem;
  cursor: zoom-in;
}
.acc-book-display .acc-book-tile:hover { background: #fff8ec19; }
.acc-book-display .acc-book-tile:focus-visible,
.acc-book-display summary:focus-visible,
.acc-book-display .acc-shelf :focus-visible { outline-color: #efd098; }
.acc-book-stage {
  display: grid;
  place-items: end center;
  align-self: end;
  width: 100%;
  margin-bottom: .45rem;
  padding: .4rem .2rem .65rem;
  border-bottom: 1px solid #efc99947;
  background: radial-gradient(ellipse at 50% 100%, #b58b7140, transparent 66%);
}
.acc-book-cover {
  container-type: inline-size;
  position: relative;
  display: block;
  width: min(100%, 7.45rem);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  isolation: isolate;
  color: var(--book-colour);
  background: #fff0d5;
  border-radius: 3px 4px 4px 3px;
  box-shadow: 1px 2px 0 #fff3dfb5, 3px 4px 0 #bdaba3, 5px 10px 14px #0006;
}
.acc-book-cover img {
  position: absolute;
  top: var(--book-image-top);
  left: var(--book-image-left);
  width: 300%;
  height: 200%;
  max-width: none;
}
.acc-book-cover::before,
.acc-book-cover::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
}
.acc-book-cover::before {
  inset: 0 auto 0 0;
  width: 11%;
  background: linear-gradient(90deg, #36273e30, #fff3d520 80%, transparent);
}
.acc-book-cover::after {
  inset: 3% auto 3% -.5%;
  width: 9%;
  background: radial-gradient(ellipse 57% 34% at 46% 50%, transparent 41%, #322637 50% 63%, #95818c 68% 78%, transparent 85%) left top / 100% 6cqw repeat-y;
}
.acc-book-imprint,
.acc-book-print-title,
.acc-book-print-level {
  position: absolute;
  left: 15%;
  right: 5%;
  text-align: left;
}
.acc-book-imprint {
  top: 6.5%;
  font: 760 6.6cqw/1.05 system-ui, sans-serif;
  color: #5a3171;
}
.acc-book-imprint b { color: #a4482d; }
.acc-book-print-title {
  top: 16%;
  font: 700 15cqw/.96 Georgia, serif;
  letter-spacing: -.05em;
  overflow-wrap: normal;
}
.acc-book-cover-long-title .acc-book-print-title { right: 3%; font-size: 10.3cqw; }
.acc-book-cover-long-title .acc-book-print-title::first-line { font-size: 13cqw; }
.acc-book-print-level {
  inset: auto 0 0;
  display: flex;
  align-items: center;
  min-height: 12%;
  padding-left: 15%;
  font: 760 7.1cqw/1 system-ui, sans-serif;
  color: #fff9ec;
  background: var(--book-colour);
}
.acc-book-tile strong { align-content: center; min-height: 2.48em; max-width: 100%; font-size: .95rem; line-height: 1.24; }
.acc-book-tile > span:last-child { margin-top: .23rem; color: #eddbed; font-size: .8rem; line-height: 1.3; }
.acc-book-display .acc-shelf { container-type: inline-size; margin-top: .75rem; }
.acc-shelf summary {
  width: fit-content;
  min-height: 2.75rem;
  align-content: center;
  padding: .42rem .8rem;
  color: #fff6e7;
  background: #fff8ec13;
  border: 1px solid #e8c8a880;
  border-radius: .4rem;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 720;
}
.acc-shelf-hide,
.acc-shelf[open] .acc-shelf-show,
.acc-shelf-swipe { display: none; }
.acc-shelf[open] .acc-shelf-hide { display: inline; }
.acc-shelf .acc-shelf-swipe { margin: .7rem 0 .2rem; color: #f1e0ec; font-size: .8rem; }
.acc-shelf-scroll {
  margin-top: .6rem;
  overflow-x: auto;
  border-radius: .44rem;
  background: #2b180f;
  scrollbar-color: #b38c6e #2b180f;
}
.acc-shelf-cabinet {
  position: relative;
  min-width: 51rem;
  aspect-ratio: 3;
  background: #442715;
}
.acc-shelf-wood { display: block; width: 100%; height: auto; }
.acc-shelf-row {
  position: absolute;
  inset: auto 2.6% calc(51.8% + 3px);
  display: grid;
  grid-template-columns: repeat(11, minmax(0, 1fr));
  gap: clamp(.55rem, 1vw, .85rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.acc-shelf-row + .acc-shelf-row { bottom: calc(4.4% + 3px); }
.acc-shelf-book { display: block; border-radius: 4px; cursor: zoom-in; }
.acc-shelf-book .acc-book-cover { width: 100%; }
@media (hover: hover) {
  .acc-shelf-book:hover .acc-book-cover { transform: translateY(-3px); }
}
.acc-book-display .acc-shelf-original {
  display: inline-block;
  margin: .68rem 0 0 .2rem;
  color: #f1e0ec;
  font-size: .8rem;
  text-underline-offset: .2em;
}
@container (width < 51rem) {
  .acc-shelf .acc-shelf-swipe { display: block; }
}
.acc-book-dialog {
  width: min(23rem, calc(100% - 1.4rem));
  max-height: calc(100% - 1.4rem);
  padding: 1.6rem 1.4rem 1.25rem;
  overflow: auto;
  text-align: center;
  background: #fffaf3;
  color: #38273f;
  border: 1px solid #ded0df;
  border-radius: .85rem;
}
.acc-book-dialog::backdrop { background: #26192caa; }
.acc-book-dialog h4 { margin: 0 2rem .8rem; font-size: 1.25rem; }
.acc-book-close { position: absolute; top: .55rem; right: .55rem; width: 2.6rem; height: 2.6rem; color: inherit; font-size: 1.4rem; background: #f3e7f3; border: 1px solid #dfcae4; border-radius: 50%; cursor: pointer; }
.acc-book-zoom .acc-book-cover { width: min(100%, 11.5rem); margin-inline: auto; }
.acc-book-dialog a { display: inline-block; margin-top: 1rem; color: #603275; font-size: .88rem; }
@media (max-width: 900px) {
  .acc-book-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 540px) {
  .acc-frame { width: calc(100% - 28px); }
  .acc-code { min-width: 2.55rem; min-height: 2.4rem; font-size: 1rem; }
  .acc-teachers, .acc-friday .acc-topics { grid-template-columns: minmax(0, 1fr); }
  .acc-bands { font-size: .78rem; }
  .acc-book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
