:root{--lb-navy:#153d6c;--lb-blue:#1c4d8d;--lb-mid:#4988c4;--lb-sky:#78b3ce;--lb-mist:#f3f8fc;--lb-ink:#19334f;--lb-muted:#60758a;--lb-line:#dfe9f2}
.library-page{background:linear-gradient(#f6fafd,#fff 360px);min-height:65vh;padding:42px 0 100px;color:var(--lb-ink);font-family:inherit}
.library-page *{box-sizing:border-box}.lb-container{max-width:1170px;margin:0 auto;padding:0 22px}.lb-hero{background:linear-gradient(110deg,#153d6c,#1c4d8d 58%,#4988c4);border-radius:22px;padding:41px 45px;color:white;display:grid;grid-template-columns:1fr auto;gap:24px;align-items:center}
.lb-eyebrow{text-transform:uppercase;letter-spacing:.16em;font-size:.7rem;font-weight:900;color:#bcdef2}.lb-hero h1{color:#fff;font-size:clamp(1.9rem,4vw,2.7rem);line-height:1.15;margin:9px 0 11px;letter-spacing:-.03em}.lb-hero p{color:#e5f3ff;font-size:1rem;line-height:1.7;margin:0;max-width:580px}.lb-hero-icon{font-size:4rem;opacity:.3}.lb-tabs{display:flex;gap:8px;align-items:center;flex-wrap:wrap;padding:22px 0 16px;border-bottom:1px solid var(--lb-line)}.lb-tab{display:inline-flex;gap:8px;align-items:center;padding:10px 17px;color:#355a7e;font-weight:800;font-size:.87rem;text-decoration:none;border-radius:9px;border:1px solid #dce8f2;background:#fff}.lb-tab.active{background:var(--lb-blue);color:white;border-color:var(--lb-blue)}.lb-count{margin-left:auto;font-weight:700;color:#8191a3;font-size:.84rem}
.lb-filter{display:flex;gap:12px;align-items:center;margin:20px 0 8px;flex-wrap:wrap}.lb-filter input{padding:12px 14px;border:1px solid #cedeea;border-radius:9px;max-width:330px;width:100%;font:inherit}.lb-filter strong{color:#4a6782;font-size:.89rem}
.lb-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:19px;margin-top:22px}.lb-card{min-width:0;border:1px solid var(--lb-line);border-radius:16px;background:#fff;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 9px 31px rgba(18,65,109,.05);transition:box-shadow .15s}.lb-card:hover{box-shadow:0 15px 36px rgba(18,65,109,.12)}.lb-cover{height:187px;display:grid;place-items:center;background:linear-gradient(135deg,#e1eef9,#bcd8ec);color:#2f689a}.lb-cover img{display:block;width:100%;height:100%;object-fit:cover}.lb-cover i{font-size:3.6rem;opacity:.45}.lb-body{padding:20px;display:flex;flex-direction:column;flex:1;gap:9px}.lb-meta{font-size:.7rem;letter-spacing:.07em;font-weight:900;text-transform:uppercase;color:#487da9}.lb-card h2{font-size:1.13rem;line-height:1.37;letter-spacing:-.02em;margin:0;color:var(--lb-ink)}.lb-card p{font-size:.88rem;line-height:1.65;color:var(--lb-muted);margin:0;flex:1}.lb-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:13px;border-top:1px solid #e9eff5;margin-top:7px}.lb-price{font-size:1.04rem;font-weight:900;color:#123f73}.lb-owned{font-size:.77rem;color:#13804e;font-weight:850}.lb-action{display:inline-flex;align-items:center;gap:8px;justify-content:center;background:var(--lb-blue);color:#fff!important;border:1px solid var(--lb-blue);text-decoration:none;border-radius:9px;padding:10px 14px;font-size:.82rem;font-weight:850;white-space:nowrap}.lb-action:hover{background:#123e73}.lb-action.alt{color:var(--lb-blue)!important;background:#fff}.lb-empty{margin:22px 0;border:1px dashed #b8d1e3;background:#f6fafd;padding:38px;border-radius:16px;text-align:center;color:#54738d}.lb-empty i{font-size:2.3rem;color:#8ab4d1}.lb-empty h2{font-size:1.2rem;color:#233f5d;margin:12px 0 6px}.lb-empty p{max-width:520px;margin:0 auto 15px;line-height:1.7}.lb-info{font-size:.85rem;line-height:1.65;color:#647d94;margin:16px 0}.lb-notice{padding:16px 20px;margin:16px 0;border-radius:11px;background:#e9f4ff;color:#24517a;border:1px solid #c9e1f4}.lb-notice.error{background:#fff3f1;color:#9c3f2c;border-color:#f0cec6}.lb-detail{max-width:800px;margin:22px auto 0;background:#fff;border:1px solid var(--lb-line);padding:30px;border-radius:17px}.lb-detail h2{margin-top:0}.lb-detail p{line-height:1.7;color:#5c7488}.lb-sectionhead{display:flex;gap:15px;justify-content:space-between;align-items:flex-end;margin-top:26px}.lb-sectionhead h2{font-size:1.35rem;margin:0;color:#19344f}.lb-sectionhead p{color:var(--lb-muted);margin:5px 0 0;font-size:.87rem}.lb-privacy{border-top:1px solid var(--lb-line);padding-top:18px;margin-top:34px;color:var(--lb-muted);font-size:.82rem}
@media(max-width:930px){.lb-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:600px){.library-page{padding-top:17px}.lb-container{padding:0 14px}.lb-hero{padding:26px 22px;grid-template-columns:1fr;border-radius:14px}.lb-hero-icon{display:none}.lb-grid{grid-template-columns:1fr}.lb-tabs{gap:7px}.lb-tab{padding:10px 11px;font-size:.79rem}.lb-count{width:100%;margin-left:0}.lb-sectionhead{display:block}.lb-detail{padding:22px}}

.lb-card[hidden]{display:none!important}


/* ====================================================================
   LIBRARY RESOURCE CARD FIX — NOVEMBER 2026
   Keep uploaded portrait book art inside a dedicated media region.
   The media and the text column are separate normal-flow elements.
   This overrides image intrinsic sizing and legacy site-wide rules.
   ==================================================================== */
.library-page .lb-grid {
  align-items: stretch;
  grid-auto-flow: row;
}
.library-page .lb-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}
.library-page .lb-card .lb-cover {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: 295px;
  aspect-ratio: 4 / 3;
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(145deg, #f0f7fc 0%, #dbeaf7 100%);
  border-bottom: 1px solid #dce8f2;
}
.library-page .lb-card .lb-cover img {
  position: absolute;
  inset: 0;
  display: block;
  box-sizing: border-box;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: contain;
  object-position: center;
  padding: 14px;
  margin: 0;
  border: 0;
  border-radius: 0;
}
.library-page .lb-card .lb-cover i {
  position: relative;
  z-index: 1;
}
.library-page .lb-card .lb-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  height: auto;
  padding: 20px;
  gap: 0;
  background: #fff;
}
.library-page .lb-card .lb-card-copy {
  min-width: 0;
  flex: 1 1 auto;
}
.library-page .lb-card .lb-meta {
  display: block;
  margin-bottom: 8px;
  color: #386e9c;
}
.library-page .lb-card h2 {
  margin: 0 0 12px;
  font-size: clamp(1.08rem, 1.5vw, 1.25rem);
  line-height: 1.35;
  overflow-wrap: anywhere;
  color: #19334f;
}
.library-page .lb-card .lb-summary {
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  max-height: none;
  margin: 0;
  color: #526b84;
  font-size: .9rem;
  line-height: 1.7;
  font-weight: 400;
  white-space: normal;
  overflow-wrap: anywhere;
}
.library-page .lb-card .lb-bottom {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 12px;
  min-width: 0;
  margin-top: 20px;
  padding-top: 16px;
}
.library-page .lb-card .lb-price {
  font-size: 1.12rem;
  line-height: 1.4;
}
.library-page .lb-card .lb-action {
  display: inline-flex;
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 11px 15px;
  white-space: normal;
  line-height: 1.4;
  text-align: center;
}
.library-page .lb-filter input { min-width: 0; }
@media (max-width: 600px) {
  .library-page .lb-card .lb-cover { aspect-ratio: 4 / 3; }
  .library-page .lb-card .lb-body { padding: 18px; }
  .library-page .lb-card h2 { font-size: 1.16rem; }
  .library-page .lb-card .lb-summary { font-size: .92rem; }
  .library-page .lb-filter { align-items: stretch; gap: 8px; }
  .library-page .lb-filter label { width: 100%; }
  .library-page .lb-filter input { max-width: none; width: 100%; }
}

.library-page .lb-card .lb-summary.lb-summary-collapsed {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  overflow: hidden;
}
.library-page .lb-card .lb-more {
  display: inline-block;
  align-self: flex-start;
  margin: 9px 0 0;
  padding: 5px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #1c4d8d;
  font: inherit;
  font-size: .83rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.library-page .lb-card .lb-more[hidden] { display: none !important; }
.library-page .lb-card .lb-more:focus-visible {
  outline: 2px solid #4988c4;
  outline-offset: 4px;
  border-radius: 2px;
}

/* Private purchase documents, shown only in the authenticated My Library view. */
.lb-documents{margin:34px 0 8px;scroll-margin-top:95px}
.lb-documents .lb-sectionhead{margin-bottom:16px}
.lb-records{display:grid;gap:12px}
.lb-record{display:flex;justify-content:space-between;align-items:center;gap:20px;min-width:0;padding:18px 20px;border:1px solid var(--lb-line);border-radius:13px;background:#fff}
.lb-record-info{display:grid;gap:5px;min-width:0}
.lb-record-info strong{color:#153d6c;font-size:1rem;overflow-wrap:anywhere}
.lb-record-info small{color:#60758a;font-size:.78rem;overflow-wrap:anywhere}
.lb-document-actions{display:flex;flex-wrap:wrap;gap:9px;align-items:center}
.lb-document-actions a{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:normal;text-align:center;text-decoration:none;font-size:.82rem;font-weight:800;padding:10px 13px;border-radius:9px;border:1px solid #c9dbe9;color:#1c4d8d;background:#f5faff}
.lb-document-actions a:hover{border-color:#1c4d8d;background:#e9f3fb}
.lb-resource-documents{border-top:1px solid var(--lb-line);padding-top:18px;margin-top:25px}
.lb-resource-documents h3{font-size:1.15rem;color:#153d6c;margin:0 0 5px}
@media(max-width:720px){.lb-record{align-items:stretch;flex-direction:column}.lb-document-actions a{flex:1 1 160px}}
@media(max-width:380px){.lb-document-actions{flex-direction:column;align-items:stretch}.lb-document-actions a{width:100%}}


/* ========================================================================
   DIGITAL LIBRARY: DEDICATED BOOK/COURSE DETAILS + SIDE-BY-SIDE ACTIONS
   ======================================================================== */
.library-page .lb-card .lb-cover-link {text-decoration:none;cursor:pointer;}
.library-page .lb-card .lb-cover-link:focus-visible {outline:3px solid #4988c4;outline-offset:-4px;}
.library-page .lb-card .lb-title-link {color:inherit;text-decoration:none;}
.library-page .lb-card .lb-title-link:hover {color:var(--lb-blue);text-decoration:underline;text-underline-offset:3px;}
.library-page .lb-card .lb-title-link:focus-visible {outline:2px solid var(--lb-mid);outline-offset:3px;}
.library-page .lb-card .lb-summary {display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden;}
.library-page .lb-card .lb-card-actions {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;gap:9px;min-width:0;}
.library-page .lb-card .lb-card-actions .lb-action {display:inline-flex;min-width:0;width:100%;height:100%;white-space:normal;padding:10px 9px;font-size:.79rem;line-height:1.35;overflow-wrap:anywhere;}
.library-page .lb-card .lb-card-actions .lb-read-more {background:#f2f7fc!important;color:#1c4d8d!important;border:1px solid #b9d1e5!important;}
.library-page .lb-card .lb-card-actions .lb-read-more:hover {background:#e3f0fa!important;}
.library-page .lb-card .lb-card-actions .lb-unavailable {color:var(--lb-blue)!important;background:#fff!important;border-color:#c3d7e9!important;}
.library-page .lb-card .lb-card-actions .lb-action:focus-visible {outline:3px solid #78b3ce;outline-offset:2px;}
.lb-resource-page {min-width:0;padding-top:25px;}
.lb-resource-page .lb-breadcrumb {display:flex;flex-wrap:wrap;align-items:center;gap:9px;margin:0 0 22px;font-size:.87rem;color:#647f96;min-width:0;}
.lb-resource-page .lb-breadcrumb a {color:#1c4d8d;font-weight:750;text-decoration:none;}
.lb-resource-page .lb-breadcrumb a:hover {text-decoration:underline;}
.lb-resource-page .lb-breadcrumb span[aria-current] {overflow-wrap:anywhere;}
.lb-resource-page .lb-resource-overview {display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.22fr);gap:clamp(22px,4vw,55px);align-items:start;margin:0 0 28px;}
.lb-resource-page .lb-resource-visual {min-width:0;}
.lb-resource-page .lb-resource-cover {width:100%;min-width:0;aspect-ratio:4/4.3;max-height:535px;display:grid;place-items:center;background:linear-gradient(145deg,#f0f7fc,#d9eaf6);border:1px solid #dce8f2;border-radius:20px;overflow:hidden;box-shadow:0 20px 50px rgba(16,51,90,.07);}
.lb-resource-page .lb-resource-cover img {display:block;width:100%;height:100%;object-fit:contain;object-position:center;padding:24px;box-sizing:border-box;}
.lb-resource-page .lb-resource-cover i {font-size:5rem;color:#8ab7d8;}
.lb-resource-page .lb-resource-delivery {display:flex;align-items:center;justify-content:center;gap:9px;padding:15px 8px;font-size:.77rem;line-height:1.5;text-align:center;color:#4e6d8a;}
.lb-resource-page .lb-resource-main {min-width:0;padding-top:10px;}
.lb-resource-page .lb-resource-kicker,.lb-resource-page .lb-resource-small-label {font-size:.72rem;letter-spacing:.16em;font-weight:850;color:#3976aa;}
.lb-resource-page .lb-resource-main h1 {color:#142f4d;font-size:clamp(2rem,4vw,3.35rem);font-weight:800;line-height:1.13;letter-spacing:-.035em;margin:16px 0;overflow-wrap:anywhere;}
.lb-resource-page .lb-resource-category {display:inline-flex;align-items:center;gap:8px;border-radius:99px;background:#eaf3fb;padding:8px 12px;color:#296394;font-size:.78rem;font-weight:750;max-width:100%;overflow-wrap:anywhere;}
.lb-resource-page .lb-resource-intro {font-size:1.02rem;line-height:1.85;color:#496983;margin:24px 0;overflow-wrap:anywhere;white-space:pre-line;}
.lb-resource-page .lb-resource-purchase {background:#fff;padding:23px 24px;border:1px solid #dce8f2;border-radius:17px;box-shadow:0 8px 32px rgba(16,51,90,.04);}
.lb-resource-page .lb-resource-price-label {font-size:.78rem;font-weight:800;letter-spacing:.03em;color:#607d95;margin-bottom:6px;}
.lb-resource-page .lb-resource-price {font-size:clamp(1.5rem,2.5vw,2rem);line-height:1.3;font-weight:900;color:#163f70;}
.lb-resource-page .lb-resource-price.is-unavailable {color:#6a8196;font-size:1.4rem;}
.lb-resource-page .lb-resource-buttons {display:flex;flex-wrap:wrap;align-items:stretch;gap:11px;margin:20px 0 14px;}
.lb-resource-page .lb-resource-buttons .lb-action {min-height:47px;white-space:normal;text-align:center;line-height:1.45;}
.lb-resource-page .lb-resource-secondary,.lb-resource-page .lb-read-more {color:#1c4d8d!important;background:#fff!important;border-color:#bed4e7!important;}
.lb-resource-page .lb-resource-safe-note {font-size:.79rem;color:#59748d;line-height:1.65;margin:0;display:flex;gap:8px;align-items:flex-start;}
.lb-resource-page .lb-resource-safe-note i {color:#278056;margin-top:3px;}
.lb-resource-page .lb-resource-content {display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,.7fr);gap:22px;align-items:start;margin-top:28px;}
.lb-resource-page .lb-resource-description,.lb-resource-page .lb-resource-sidebar {min-width:0;padding:30px;background:#fff;border:1px solid #dfe9f2;border-radius:17px;}
.lb-resource-page .lb-resource-description h2 {margin:8px 0 18px;color:#163a60;font-size:1.55rem;line-height:1.3;}
.lb-resource-page .lb-resource-long-description {white-space:pre-line;font-size:.98rem;line-height:1.9;color:#4b6680;overflow-wrap:anywhere;margin:0;}
.lb-resource-page .lb-resource-sidebar h2 {font-size:1.15rem;color:#163a60;margin:0 0 18px;line-height:1.35;}
.lb-resource-page .lb-resource-sidebar dl {padding:0;margin:0;}
.lb-resource-page .lb-resource-sidebar dl div {display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid #e6eef5;}
.lb-resource-page .lb-resource-sidebar dt {color:#71849a;font-size:.81rem;flex-shrink:0;}
.lb-resource-page .lb-resource-sidebar dd {color:#1f4365;font-weight:750;font-size:.84rem;text-align:right;margin:0;overflow-wrap:anywhere;min-width:0;}
.lb-resource-page .lb-resource-my-library {display:flex;align-items:center;gap:9px;margin-top:20px;padding-top:18px;border-top:1px solid #e6eef5;color:#1c4d8d;text-decoration:none;font-size:.85rem;font-weight:800;}
.lb-resource-page .lb-resource-my-library i:last-child {margin-left:auto;}
.lb-resource-page .lb-resource-not-found {max-width:740px;margin:40px auto;padding:50px 30px;border:1px solid var(--lb-line);border-radius:18px;text-align:center;background:#fff;}
.lb-resource-page .lb-resource-not-found > i {font-size:3rem;color:#9dbbd3;}
.lb-resource-page .lb-resource-not-found h1 {color:#173957;font-size:clamp(1.5rem,3vw,2rem);}
.lb-resource-page .lb-resource-not-found p {color:#60758a;line-height:1.7;}
@media(max-width:900px) {
  .lb-resource-page .lb-resource-overview {grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:22px;}
  .lb-resource-page .lb-resource-content {grid-template-columns:1fr;}
}
@media(max-width:690px) {
  .lb-resource-page .lb-resource-overview {grid-template-columns:1fr;}
  .lb-resource-page .lb-resource-cover {max-height:440px;aspect-ratio:4/3;}
  .lb-resource-page .lb-resource-cover img {padding:18px;}
  .lb-resource-page .lb-resource-main h1 {font-size:clamp(1.85rem,7vw,2.6rem);}
  .lb-resource-page .lb-resource-main {padding-top:0;}
  .lb-resource-page .lb-resource-description,.lb-resource-page .lb-resource-sidebar {padding:22px;}
  .lb-resource-page .lb-resource-purchase {padding:20px;}
}
@media(max-width:360px) {
  .library-page .lb-card .lb-card-actions {grid-template-columns:1fr;}
  .lb-resource-page .lb-resource-buttons .lb-action {width:100%;}
  .lb-resource-page .lb-resource-main h1 {font-size:1.8rem;}
}

/* Checkout-matched library offer labels; base price remains in the admin editor. */
.library-page .lb-old-price{display:block;color:#8a9bad;font-size:.82rem;font-weight:500;line-height:1.4;margin-top:5px}
.library-page .lb-detail-old-price{color:#8496a5;margin-top:9px;display:inline-block}
.library-page .lb-promo-active{display:inline-flex;gap:7px;align-items:center;border-radius:8px;color:#18619b;background:#eaf5ff;padding:7px 10px;font-size:.86rem;font-weight:750;line-height:1.5}
.library-page .lb-checkout-offer{border:1px solid #cee1f0;background:#f2f8fc;padding:10px 13px;border-radius:9px}
.library-page .lb-checkout-offer del{margin:0 7px;color:#8394a2}

/* November 2026: original vs promotional prices on all library surfaces. */
.library-page .lb-price-stack{display:flex;align-items:flex-start;flex-direction:column;gap:3px;min-width:0}
.library-page .lb-price-stack .lb-original-label{color:#62758b;font-size:.78rem;font-weight:750;line-height:1.4}
.library-page .lb-price-stack .lb-old-price{display:inline;margin:0 0 0 3px;font-size:.9rem;font-weight:750;color:#68798b;text-decoration-line:line-through;text-decoration-color:#a75959;text-decoration-thickness:2px}
.library-page .lb-price-stack .lb-promo-label{color:#17654d;font-size:.8rem;font-weight:850}
.library-page .lb-price-stack .lb-promo-label strong{font-size:1.28rem;font-weight:950;display:block;color:#146747;line-height:1.35}
.library-page .lb-price-stack .lb-saving-label{display:inline-block;padding:3px 7px;border-radius:5px;background:#e2f5ec;color:#166c4b;font-weight:800;font-size:.68rem}
.library-page .lb-resource-original{display:flex;flex-wrap:wrap;gap:6px;align-items:center;color:#65798e;font-size:.82rem;margin:13px 0 3px}
.library-page .lb-resource-original .lb-detail-old-price{margin:0;font-weight:800;text-decoration:line-through;text-decoration-color:#aa5757;text-decoration-thickness:2px;color:#68798b}
.library-page .lb-resource-sale-label{display:block;margin-top:10px;color:#267354;font-weight:850;font-size:.83rem}
.library-page .lb-checkout-offer{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:12px 15px;background:#ecf8f2;border-radius:9px;border:1px solid #d0e9dc;color:#31664e;margin:13px 0}
.library-page .lb-checkout-offer del{text-decoration:line-through;text-decoration-thickness:2px;color:#657684}
.library-page .lb-checkout-offer strong{color:#146747}
