body {
  margin: 0;
  line-height: 1.7;
}

.shell {
  width: min(100% - 40px, 990px);
  margin-inline: auto;
}

.library-header {
  background: radial-gradient(ellipse at center, #60402a, #2c1a12);
}

.hero {
  position: relative;
  width: min(100%, 1120px);
  margin-inline: auto;
  aspect-ratio: 3 / 2;
  container-type: inline-size;
}

.hero-art,
.hero-art img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-art {
  position: absolute;
  inset: 0;
}

.hero-art img {
  object-fit: fill;
}

.hero-copy {
  position: absolute;
  inset: 33% auto 18% 11%;
  display: grid;
  align-content: center;
  justify-items: center;
  width: 39.5%;
  text-align: center;
}

.roman {
  margin: 0 0 .15em;
  color: #4b3526;
  font: 400 clamp(1rem, 5cqw, 3rem) / 1 Allura, cursive;
}

.hero h1 {
  margin: 0;
  color: #223b2e;
  font: 700 clamp(1.35rem, 7.45cqw, 4.8rem) / 1.25 var(--site-serif);
  letter-spacing: .08em;
  white-space: nowrap;
}

.hero h1::after {
  content: "";
  display: block;
  width: 26%;
  max-width: 55px;
  height: 1px;
  margin: .38em auto .32em;
  background: #8d643f;
  opacity: .74;
}

.hero-text {
  max-width: 25em;
  margin: 0;
  color: #67513a;
  font: 400 clamp(.59rem, 2.5cqw, .98rem) / 1.7 var(--site-serif);
  text-wrap: balance;
  word-break: keep-all;
}

.hero-text span { display: block; }

.hero-actions {
  position: absolute;
  top: clamp(8px, 2cqw, 27px);
  right: clamp(9px, 2.6cqw, 32px);
  display: flex;
  align-items: center;
  gap: 8px;
}

.favorite-tab {
  padding: 5px 8px;
  border: 1px solid #d1a977;
  border-radius: 3px;
  background-color: #f7e6c7;
  color: #513722;
  font: 600 .72rem / 1.3 var(--site-serif);
  text-decoration: none;
}

.bookshelf {
  position: relative;
  padding: clamp(4px, .9vw, 14px) 0 clamp(9px, 1.6vw, 22px);
  background:
    linear-gradient(180deg, #1f100a 0, rgb(46 26 17 / 30%) 36%, rgb(34 19 12 / 65%) 100%),
    #42291c;
  box-shadow: inset 0 7px 14px #21130d, 0 5px 15px rgb(76 42 22 / 26%);
}

.bookshelf::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: clamp(9px, 1.6vw, 22px);
  background: var(--site-wood);
  border-bottom: 2px solid #42261a;
  box-shadow: 0 -2px 6px rgb(20 10 5 / 40%);
  pointer-events: none;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1px, 1vw, 10px);
  width: min(100% - 14px, 750px);
  margin-inline: auto;
}

.quick-link {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .24em;
  aspect-ratio: 466 / 584;
  padding: 11% 8% 9% 14%;
  color: #263427;
  background:
    var(--binding) center / 100% 100% no-repeat,
    linear-gradient(#f6e3c0, #ead1a5) 58% center / 77% 79% no-repeat;
  font: 700 clamp(.62rem, 2.94vw, 1.16rem) / 1.24 var(--site-serif);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .18s ease, filter .18s ease;
}

.quick-link:hover,
.quick-link:focus-visible {
  z-index: 1;
  transform: translateY(-3px);
  filter: brightness(1.065);
}

.library-header :focus-visible,
.site-footer :focus-visible {
  outline-color: #f4d396;
}

.binding-green { --binding: url('/assets/site/library/binding-green.webp'); }
.binding-russet { --binding: url('/assets/site/library/binding-russet.webp'); }
.binding-sage { --binding: url('/assets/site/library/binding-sage.webp'); }
.binding-ivory { --binding: url('/assets/site/library/binding-ivory.webp'); white-space: normal; }

.quick-link .sketch-icon {
  flex: none;
  width: clamp(30px, 11vw, 88px);
  height: auto;
  aspect-ratio: 1;
}

.quick-arrow {
  color: #765030;
  font: 400 1.15em / 1 var(--site-sans);
}

.sketch-icon {
  display: block;
  flex: none;
  width: 56px;
  height: 56px;
  background: url('/assets/site/pencil-icons.webp') 0 0 / 200% 200% no-repeat;
}

.sketch-icon--stage { background-position: right top; }
.sketch-icon--book { background-position: left bottom; }

.youtube-mark {
  display: grid;
  place-items: center;
  background: none;
}

.youtube-mark::before {
  content: "";
  width: 85%;
  aspect-ratio: 92 / 62;
  border-radius: 19% / 29%;
  background: url('/assets/site/youtube-pencil.webp') center / contain no-repeat;
  mask-image:
    linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent),
    linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-composite: intersect;
}

.band {
  padding-block: clamp(30px, 6vw, 64px);
  scroll-margin-top: 8px;
}

.band + .band { border-top: 1px solid var(--site-line); }

.activity-band { padding-block-end: 0; }

.band-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2.4vw, 22px);
  margin: 0 auto clamp(19px, 4.2vw, 36px);
  color: var(--site-ink);
  font: 700 clamp(1.36rem, 5.1vw, 2.63rem) / 1.35 var(--site-serif);
  letter-spacing: .06em;
  text-align: center;
}

.band-title::before,
.band-title::after {
  content: "";
  flex: 1 1 36px;
  max-width: 165px;
  height: 1px;
  background: var(--site-line);
}

.band-title .sketch-icon {
  width: clamp(27px, 7vw, 59px);
  height: auto;
  aspect-ratio: 1;
}

.intro {
  margin: -7px 0 22px;
  color: var(--site-muted);
  text-align: center;
  font: 400 .92rem / 1.8 var(--site-serif);
}

.video-frame {
  position: relative;
  margin-top: 12px;
  padding: clamp(21px, 5vw, 46px) clamp(11px, 3.5vw, 40px) clamp(12px, 3vw, 30px);
}

.ribbon {
  position: absolute;
  inset: auto auto calc(100% - .86em) clamp(14px, 3.4vw, 37px);
  margin: 0;
  padding: .3em .9em .36em .8em;
  border-radius: 4px 1px 2px 6px;
  background: linear-gradient(#744a2d, #52311f);
  color: #fff1d9;
  box-shadow: 1px 3px 4px rgb(67 39 19 / 26%);
  font: 600 clamp(.83rem, 2.9vw, 1.18rem) / 1.3 var(--site-serif);
  letter-spacing: .07em;
}

.link-block a {
  display: grid;
  align-items: center;
  gap: clamp(8px, 2vw, 22px);
  text-decoration: none;
}

.link-block a + a { margin-top: 12px; }
.link-block a:hover .link-name { text-decoration: underline; text-decoration-color: var(--site-ochre); }
.channel-link { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.53fr) auto; }
.social-link { grid-template-columns: minmax(0, 1fr) auto; }

.channel-preview {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  border-radius: 5px;
  background: #e3cfab;
  box-shadow: 0 1px 5px rgb(73 44 26 / 22%);
}

.channel-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  object-position: 50% 60%;
}

.channel-play {
  position: absolute;
  display: grid;
  place-items: center;
  width: clamp(28px, 7vw, 57px);
  aspect-ratio: 1;
  border: 1px solid #fff1d9;
  border-radius: 50%;
  background: rgb(40 29 20 / 66%);
}

.channel-play::before {
  content: "";
  width: 38%;
  aspect-ratio: .9;
  margin-left: 8%;
  background: #fff1d9;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.channel-copy { display: block; min-width: 0; }

.link-name {
  display: flex;
  align-items: center;
  gap: .33em;
  color: var(--site-ink);
  font: 700 clamp(.89rem, 3.1vw, 1.57rem) / 1.42 var(--site-serif);
}

.brand-icon {
  display: grid;
  place-items: center;
  flex: 0 0 1.38em;
  aspect-ratio: 1;
  color: #884a29;
  font-family: var(--site-sans);
}

.link-sub {
  display: block;
  margin-top: .45em;
  color: var(--site-muted);
  font: 400 clamp(.74rem, 2.8vw, 1rem) / 1.65 var(--site-serif);
}

.arrow { color: #82512e; font-size: 1.12rem; text-decoration: none; }

.tile h3 {
  margin: 0 0 6px;
  color: var(--site-ink);
  font: 700 1.16rem / 1.45 var(--site-serif);
}

.tile p {
  margin: 0;
  color: var(--site-muted);
  font-size: .87rem;
  line-height: 1.8;
}

.desk-illustration {
  max-width: 1120px;
  margin-inline: auto;
  pointer-events: none;
}

.desk-illustration img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3.55 / 1;
  object-fit: cover;
  object-position: center bottom;
  mask-image: linear-gradient(transparent, black 21%, black 94%, transparent);
}

.apps,
.videos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.videos { margin-top: 13px; }
.videos .tile { padding: 16px; text-decoration: none; }

.tile,
#authors details {
  --binding-ink: #657050;
  border: 1px solid var(--site-line);
  border-left: 6px solid var(--binding-ink);
  border-radius: 4px 7px 7px 4px;
  background: linear-gradient(145deg, rgb(255 250 235 / 78%), rgb(248 231 199 / 77%));
  box-shadow: 0 2px 7px rgb(75 43 22 / 15%);
}

.apps .tile:nth-child(even) { --binding-ink: #895238; }

.apps a {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 107px;
  padding: 14px;
  text-decoration: none;
}

.apps a:hover h3,
.work-card:hover strong { text-decoration: underline; text-decoration-color: var(--site-ochre); }

.app-tag { color: #815634; font-size: .75rem; }
#authors details + details { margin-top: 12px; }

summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--site-ink);
  font: 700 1.06rem / 1.4 var(--site-serif);
  cursor: pointer;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }
summary::after { content: "＋"; margin-left: auto; color: #875839; }
details[open] summary::after { content: "−"; }
.author-count { color: var(--site-muted); font: 400 .75rem var(--site-sans); }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 245px), 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

details .cards { padding: 0 12px 12px; }
.work-card {
  display: grid;
  grid-template-columns: 69px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 8px;
  text-decoration: none;
}

.work-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border: 1px solid #b0996d;
  border-radius: 2px;
}

.work-card strong { font: 700 1.06rem var(--site-serif); }
.work-card p { margin-top: 4px; font-size: .79rem; }

.foot-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.foot-inner > a {
  font: 700 1.03rem var(--site-serif);
  text-decoration: none;
}

@media (min-width: 740px) {
  .hero { aspect-ratio: 16 / 9; }
  .channel-copy { border-left: 1px solid var(--site-line); padding-left: clamp(14px, 3vw, 35px); }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 26px, 990px); }
  .quick-links { width: calc(100% - 8px); }
  .apps, .videos { grid-template-columns: 1fr; }
}
