main:has(.feature-track) { max-width: none; padding-inline: 0; padding-top: 0; }
main:has(.feature-track) > :is(.library-heading,.library-grid,.reading-apps) {
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
}
.feature-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 50%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.feature-book {
  display: grid;
  grid-template-columns: minmax(90px, min(32%,190px)) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding: 28px clamp(48px,3.5vw,64px) 32px;
  color: #292730;
  background: linear-gradient(to top, transparent 32px, var(--wash) 32px);
  --wash: #f2d8c8;
  scroll-snap-align: start;
}
.feature-book:nth-child(2) { --wash: #ead4e6; }
.feature-book:nth-child(3) { --wash: #c7e3ec; }
.feature-book:nth-child(4) { --wash: #e1dfbd; }
.feature-book img { align-self: end; transform: translateY(10px); }
.feature-book img, .library-card img {
  width: 100%;
  height: auto;
  border-radius: 2px;
  box-shadow: 0 5px 12px #12223933;
}
.feature-copy { padding-bottom: 20px; }
.feature-copy h2, .library-card h3 {
  font-family: Georgia, serif;
  line-height: 1.12;
  margin: 5px 0;
}
.feature-copy h2 { font-size: clamp(23px, 2.2vw, 38px); color: #192537; letter-spacing: -.025em; }
.feature-copy p, .library-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  font-family: system-ui, sans-serif;
  font-size: clamp(15px,1vw,16px);
  line-height: 1.6;
  max-width: 54ch;
  color: #565961;
  margin: 10px 0;
}
.library-card p { -webkit-line-clamp: 2; font-family: Oxygen, system-ui, sans-serif; font-size: 14px; font-weight: 400; color: #626974; }
.read-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 600;
}
.read-link::after {
  content: "";
  width: 6px;
  height: 6px;
  border-top: 1.6px solid currentColor;
  border-right: 1.6px solid currentColor;
  transform: rotate(45deg);
}
.feature-controls, .library-heading, .library-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.feature-shelf { position: relative; }
.feature-controls {
  position: absolute;
  inset: 0 4px 32px;
  pointer-events: none;
}
.feature-controls button {
  pointer-events: auto;
  width: 40px;
  padding-inline: 0;
}
.feature-controls button, .library-heading select {
  background: white;
  color: #243649;
  border: 1px solid #cbd3da;
  border-radius: 24px;
  min-height: 40px;
  padding: 5px 14px;
  cursor: pointer;
  font: inherit;
}
.feature-controls button:disabled { opacity: .45; cursor: default; }
.feature-controls button {
  position:relative;
  aspect-ratio:1;
  padding:0;
  font-size:0;
}
.feature-controls button::after {
  content:"";
  position:absolute;
  inset:0;
  margin:auto;
  width:16px;
  height:16px;
  background:currentColor;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m5.5 3 5 5-5 5' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
}
.feature-controls button[data-step="-1"]::after { transform:rotate(180deg); }
.library-heading { gap: 10px; margin: 18px 0 34px; }
.library-heading h2 { margin: 0; }
.library-heading { flex-wrap: wrap; }
.library-heading select {
  field-sizing: content;
  max-width: 100%;
  min-height: 44px;
  padding: 8px 34px 8px 14px;
  appearance: none;
  border: 1px solid #b9c8d4;
  border-radius: 9px;
  background: #f7f9fb url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%233b5267' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 14px no-repeat;
  color: #263c50;
  font-size: 16px;
  font-weight: 600;
}
.library-heading select:has(option:checked:not([value=""])) { background-color: #eaf3fc; border-color: #7b9ebd; }
.library-heading select:hover { border-color: #67869f; }
.library-heading select:focus-visible { outline: 2px solid #075fb5; outline-offset: 3px; }
@media (forced-colors: active) {
  .library-heading select { appearance: auto; background-image: none; }
}
.library-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 42px 24px; }
.library-card {
  display: grid;
  grid-template-rows: 1fr auto;
  grid-template-columns: clamp(86px, 10vw, 126px) 1fr;
  align-items: start;
  gap: 12px 20px;
  padding: 16px 18px 12px;
  color: #243649;
  border: 1px solid #f2f2f2;
  border-radius: 8px;
  box-shadow: 0 3px 12px #172b420b;
}
.library-card img { margin-top: -30px; }
.library-card small, .feature-copy small {
  display: inline-block;
  color: #615468;
  font: italic 15px/1.4 Georgia, serif;
  margin-bottom: 2px;
}
.library-card h3 { font-size: clamp(22px, 1.7vw, 27px); color: #192537; }
.library-card footer { color: #526378; }
.read-link { color: #174d76; }
.library-card footer { font-size: 14px; }
.reading-time { display: inline-flex; align-items: center; gap: 6px; }
.reading-time svg { flex: none; }
.library-card footer { grid-column: 1/-1; border-top: 1px solid #e6e9ed; padding-top: 8px; }
.library-card footer span:last-child { color: #075fb5; font-weight: 600; }
.library-card:hover h3, .feature-book:hover h2 { text-decoration: underline; }
.library-card[hidden] { display: none; }
.feature-book:focus-visible { outline-offset: -4px; }
@media (min-width:731px) and (max-width:1024px) {
  .feature-book {
    align-content:center;
    align-items:start;
    gap:16px;
    padding-block:24px;
    background:var(--wash);
  }
  .feature-book img { align-self:start; transform:none; }
  .feature-copy { padding-bottom:0; }
}
@media(max-width:730px) {
  .library-grid { grid-template-columns: 1fr; }
  .feature-track { grid-auto-columns: 100%; }
  .feature-book { gap: 12px; padding: 14px 46px 32px; }
  .feature-copy p { -webkit-line-clamp: 2; }
}
@media(max-width:600px) {
  .feature-book {
    grid-template-columns: clamp(70px,23vw,110px) minmax(0,1fr);
    gap: 12px;
    padding: 16px 33px;
    background: var(--wash);
  }
  .feature-book img { align-self:center; transform:none; }
  .feature-copy { padding-bottom: 0; }
  .feature-copy h2 { font-size:20px; overflow-wrap:anywhere; }
  .feature-copy p { font-size: 14px; line-height: 1.45; margin-block: 7px; }
  .read-link { font-size: 14px; padding: 4px 12px; border:1px solid #23394a30; }
  .feature-controls { inset: 0 2px; z-index:1; }
  .feature-controls button { width:30px; min-height:30px; }
  .library-heading { margin-block: 12px 24px; }
  .library-heading h2 { font-size: 20px; }
  .library-heading select { max-width:44%; min-height:32px; padding:3px 20px 3px 6px; background-color:transparent; background-position:right 3px center; background-size:12px; border-color:transparent; font-size:13px; font-weight:400; color:#526378; }
  .library-card small, .feature-copy small { font-size:13px; }
  .library-grid { gap: 24px; }
  .library-card { grid-template-columns: clamp(74px,22vw,102px) minmax(0,1fr); gap: 8px 12px; padding: 12px; }
  .library-card img { margin-top: -18px; }
  .library-card h3 { font-size: 20px; overflow-wrap: anywhere; }
  .library-card p { margin-block: 6px; }
}
@font-face {
  font-family: Oxygen;
  src: url("../font/Oxygen-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
