.library { color: #173a2d; }
.library-green { --library-tone: #33654b; --library-wash: #eaf2de; }
.library-cyan { --library-tone: #246173; --library-wash: #e1f0ec; }
.library-purple { --library-tone: #583f8f; --library-wash: #eeebf9; }
.library-pink { --library-tone: #843956; --library-wash: #f6e8ee; }
.library-amber { --library-tone: #785326; --library-wash: #f6efdf; }
.library-category-grid,.library-chapters {
 display: grid;
 grid-template-columns: minmax(0,1fr);
 gap: 15px;
 margin: 24px 0 0;
}
.library-card {
 min-width: 0;
 height: 100%;
 display: flex;
 flex-direction: column;
 gap: 10px;
 padding: clamp(17px,2.4vw,28px);
 border: 1px solid color-mix(in srgb,var(--library-tone) 33%,white);
 border-radius: 20px;
 background: linear-gradient(148deg,#fffdf1,var(--library-wash));
 box-shadow: 0 8px 20px #142c1c0c;
}
.library-card .ai-skill-icon { color: var(--library-tone); }
.library-card h3 { margin: 0; font-size: clamp(20px,2.1vw,27px); }
.library-card p { margin: 0; color: #405a4e; line-height: 1.55; }
.library-card .library-count { margin-top: auto; color: var(--library-tone); font-size: 14px; font-weight: 650; }
.library-card .about-secondary { align-self: start; color: var(--library-tone); }
.library-head {
 padding-block: clamp(35px,6vw,78px);
 background: radial-gradient(ellipse at 82% 0%,var(--library-tone),transparent 70%),#15392f;
 color: #f3faec;
}
.library-head h1 { max-width: 20ch; font-size: clamp(34px,5vw,65px); overflow-wrap: anywhere; text-wrap: balance; }
.library-head p { max-width: 61ch; margin: 17px 0 0; font-size: clamp(16px,1.8vw,20px); color: #e4efde; }
.library-head .breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 21px; color: #e0f1db; overflow-wrap: anywhere; }
.library-head .breadcrumbs a { color: inherit; text-decoration: underline; }
.library-body { padding-block: clamp(32px,5vw,70px); }
.library-chapters { padding-inline-start: 26px; }
.library-chapters li::marker { color: #37654f; font-weight: 750; }
.library-chapters h3 a:hover,.library-toc a:hover,.library-pagination a:hover { text-decoration-thickness: 2px; }
.library-reading { display: grid; grid-template-columns: minmax(0,1fr); gap: 28px; align-items: start; }
.library-toc,.library-trial { padding: clamp(16px,2.4vw,28px); border: 1px solid #9bb49d; border-radius: 18px; background: #e9efe0; }
.library-toc h2,.library-trial h2 { font-size: 23px; }
.library-toc ol { margin: 11px 0 15px; padding-inline-start: 22px; }
.library-toc li + li,.library-prose li + li { margin-top: 7px; }
.library-prose { min-width: 0; max-width: 72ch; font-size: 17px; line-height: 1.66; }
.library-prose h2 { font-size: clamp(23px,3vw,34px); margin: 0 0 13px; }
.library-prose h2 span { color: #4b765d; }
.library-prose section { margin-bottom: 32px; scroll-margin-top: 110px; }
.library-prose figure { margin: 20px 0 0; }
.library-prose figcaption { font-size: 14px; font-weight: 650; color: #38634e; }
.library-prose pre { margin: 6px 0 0; padding: 15px; overflow: auto; border-radius: 12px; background: #14352e; color: #e4ffd3; font-size: 14px; }
.library-pagination { display: grid; gap: 10px; margin: 26px 0 32px; }
.library-pagination a { min-width: 0; display: grid; gap: 3px; padding: 13px 15px; border: 1px solid #9bb49d; border-radius: 12px; background: #f9faf2; }
.library-pagination span { font-size: 14px; }
.library-trial { margin-top: 28px; }
.library-trial p { margin: 0 0 14px; }
.library-trial .button { white-space: normal; }
.library a:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

@media(min-width: 600px) {
 .library-category-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .library-pagination { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(min-width: 900px) {
 .library-category-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
 .library-category-grid > article { grid-column: span 2; }
 .library-category-grid > article:nth-child(4) { grid-column: 2/span 2; }
 .library-reading { grid-template-columns: minmax(200px,1fr) minmax(0,2.3fr); gap: 50px; }
 .library-toc { position: sticky; top: 112px; }
}
@media(prefers-reduced-motion: no-preference) {
 .library-card { transition: transform .2s,box-shadow .2s; }
 .library-card:focus-within { transform: translateY(-3px); box-shadow: 0 12px 25px #142c1c18; }
 @media(hover: hover) {
  .library-card:hover { transform: translateY(-3px); box-shadow: 0 12px 25px #142c1c18; }
 }
}
