.jsk-ebook-page {
  --ebook-ink: #141414;
  --ebook-muted: #625f58;
  --ebook-paper: #fbfaf6;
  --ebook-green: #254f42;
  --ebook-lime: #d9f99d;
  color: var(--ebook-ink);
  background: var(--ebook-paper);
}
.jsk-ebook-page * { box-sizing: border-box; }
.ebook-wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.ebook-library, .ebook-detail { padding-top: 96px; }
.ebook-library__hero, .ebook-detail__hero {
  padding: 72px 0 64px;
  background:
    radial-gradient(circle at 84% 18%, rgba(217,249,157,.65), transparent 26rem),
    linear-gradient(145deg, #f7f4ec 0%, #fff 100%);
  border-bottom: 1px solid rgba(20,20,20,.1);
}
.ebook-crumbs { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 34px; color: var(--ebook-muted); font-size: 13px; }
.ebook-crumbs a { color: inherit; text-decoration: none; }
.ebook-crumbs a:hover, .ebook-crumbs a:focus-visible { color: var(--ebook-green); text-decoration: underline; }
.ebook-eyebrow {
  display: inline-flex;
  color: var(--ebook-green);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
}
.ebook-library__hero h1, .ebook-detail__hero h1 {
  max-width: 900px;
  margin: 15px 0 18px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: .98;
  letter-spacing: -.052em;
}
.ebook-library__hero p {
  max-width: 720px;
  margin: 0;
  color: var(--ebook-muted);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}
.ebook-library__body { padding: 58px 0 96px; }
.ebook-discovery { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.ebook-discovery h2 { margin: 0; font-size: 18px; }
.ebook-filter-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ebook-filter-links a, .ebook-tags a {
  border: 1px solid rgba(20,20,20,.16);
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--ebook-ink);
  background: #fff;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}
.ebook-filter-links a:hover, .ebook-filter-links a:focus-visible,
.ebook-tags a:hover, .ebook-tags a:focus-visible { border-color: var(--ebook-green); color: var(--ebook-green); }
.ebook-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px; }
.ebook-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(150px, 37%) minmax(0,1fr);
  overflow: hidden;
  border: 1px solid rgba(20,20,20,.11);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 54px rgba(20,20,20,.06);
}
.ebook-card__cover, .ebook-related__cover {
  display: grid;
  min-height: 285px;
  place-items: center;
  overflow: hidden;
  background: #eeeae0;
}
.ebook-card__cover picture, .ebook-card__cover img,
.ebook-related__cover picture, .ebook-related__cover img,
.ebook-detail__cover picture, .ebook-detail__cover img {
  display: block;
  width: 100%;
  height: 100%;
}
.ebook-card__cover img, .ebook-related__cover img, .ebook-detail__cover img {
  object-fit: contain;
  object-position: center;
}
.ebook-card__placeholder { display: grid; width: 100%; height: 100%; min-height: 260px; place-items: center; padding: 24px; color: #fff; background: var(--ebook-green); font-size: 22px; font-weight: 800; text-align: center; }
.ebook-card__content { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; padding: 28px; }
.ebook-card__meta { display: flex; flex-wrap: wrap; gap: 10px; color: var(--ebook-muted); font-size: 12px; }
.ebook-card__meta a { color: var(--ebook-green); font-weight: 700; text-decoration: none; }
.ebook-card h2 { margin: 14px 0 12px; font-size: clamp(23px, 2.2vw, 31px); line-height: 1.1; letter-spacing: -.028em; }
.ebook-card h2 a, .ebook-related h3 a { color: inherit; text-decoration: none; }
.ebook-card h2 a:hover, .ebook-card h2 a:focus-visible, .ebook-related h3 a:hover, .ebook-related h3 a:focus-visible { color: var(--ebook-green); }
.ebook-card__content > p { margin: 0 0 16px; color: var(--ebook-muted); line-height: 1.55; }
.ebook-card__author { font-size: 13px; }
.ebook-card__author a, .ebook-byline .ebook-author-name { color: var(--ebook-green); font-weight: 700; }
.ebook-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.ebook-text-link { margin-top: auto; color: var(--ebook-green); font-weight: 750; text-decoration: none; }
.ebook-text-link:hover, .ebook-text-link:focus-visible { text-decoration: underline; }
.ebook-empty { padding: 64px 28px; border: 1px dashed rgba(20,20,20,.22); border-radius: 20px; text-align: center; }
.ebook-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 13px 22px;
  color: #fff;
  background: var(--ebook-green);
  font-weight: 750;
  text-decoration: none;
  transition: transform .18s ease, background .18s ease;
}
.ebook-button:hover, .ebook-button:focus-visible { transform: translateY(-2px); background: #18392f; }
.ebook-button--disabled { opacity: .55; cursor: not-allowed; }
.ebook-button--disabled:hover { transform: none; background: var(--ebook-green); }
.ebook-button--full { width: 100%; }
.ebook-preview-banner { position: fixed; z-index: 40; inset: 78px 0 auto; padding: 10px 20px; color: #1f370f; background: var(--ebook-lime); font-weight: 750; text-align: center; }
.ebook-preview-banner + .ebook-detail { padding-top: 132px; }
.ebook-detail__hero-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(280px,.75fr); align-items: center; gap: clamp(44px, 8vw, 104px); }
.ebook-detail__summary { max-width: 720px; margin: 0 0 22px; color: var(--ebook-muted); font-size: clamp(19px, 2.2vw, 25px); line-height: 1.5; }
.ebook-byline { display: flex; flex-wrap: wrap; gap: 8px 14px; margin: 0 0 14px; }
.ebook-byline span { color: var(--ebook-muted); }
.ebook-publication { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 18px; color: var(--ebook-muted); font-size: 13px; }
.ebook-detail__hero .ebook-button { margin-top: 8px; }
.ebook-detail__cover {
  min-height: 480px;
  max-height: 620px;
  margin: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 16px;
  background: #ebe7dc;
  box-shadow: 0 28px 76px rgba(20,20,20,.16);
}
.ebook-detail__content { padding: 84px 0; }
.ebook-detail__content-grid { display: grid; grid-template-columns: minmax(0,1fr) 310px; align-items: start; gap: clamp(48px, 8vw, 110px); }
.ebook-prose { min-width: 0; }
.ebook-prose section + section { margin-top: 58px; padding-top: 52px; border-top: 1px solid rgba(20,20,20,.11); }
.ebook-prose h2, .ebook-facts h2, .ebook-related h2 { margin: 0 0 22px; font-size: clamp(28px, 3vw, 42px); letter-spacing: -.035em; }
.ebook-prose p, .ebook-prose li, .ebook-richtext { color: #393733; font-size: 18px; line-height: 1.75; }
.ebook-prose ul, .ebook-prose ol { display: grid; gap: 12px; padding-left: 24px; }
.ebook-richtext h2, .ebook-richtext h3, .ebook-richtext h4 { margin: 34px 0 12px; color: var(--ebook-ink); }
.ebook-richtext blockquote { margin: 28px 0; border-left: 4px solid var(--ebook-green); padding: 8px 0 8px 22px; color: var(--ebook-green); }
.ebook-richtext a { color: var(--ebook-green); }
.ebook-toc { counter-reset: ebook-chapter; list-style: none; padding-left: 0 !important; }
.ebook-toc li { display: grid; grid-template-columns: 42px 1fr; align-items: start; }
.ebook-toc li::before { counter-increment: ebook-chapter; content: counter(ebook-chapter, decimal-leading-zero); color: var(--ebook-green); font-size: 13px; font-weight: 800; letter-spacing: .08em; }
.ebook-facts { position: sticky; top: 118px; border: 1px solid rgba(20,20,20,.12); border-radius: 20px; padding: 28px; background: #fff; box-shadow: 0 18px 54px rgba(20,20,20,.06); }
.ebook-facts h2 { font-size: 24px; }
.ebook-facts dl { margin: 0 0 24px; }
.ebook-facts dl div { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid rgba(20,20,20,.1); }
.ebook-facts dt { color: var(--ebook-muted); }
.ebook-facts dd { margin: 0; text-align: right; font-weight: 700; }
.ebook-related { padding: 78px 0 96px; background: #f0ede5; }
.ebook-related__grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 24px; }
.ebook-related__grid article { min-width: 0; }
.ebook-related__cover { min-height: 300px; max-height: 420px; border-radius: 16px; }
.ebook-related h3 { margin: 17px 0 8px; font-size: 24px; line-height: 1.2; }
.ebook-related p { margin: 0; color: var(--ebook-muted); line-height: 1.55; }
@media (max-width: 980px) {
  .ebook-card-grid { grid-template-columns: 1fr; }
  .ebook-detail__hero-grid { grid-template-columns: minmax(0,1fr) minmax(240px,.65fr); gap: 42px; }
  .ebook-detail__content-grid { grid-template-columns: minmax(0,1fr) 270px; gap: 42px; }
}
@media (max-width: 760px) {
  .ebook-wrap { width: min(100% - 30px, 680px); }
  .ebook-library, .ebook-detail { padding-top: 72px; }
  .ebook-library__hero, .ebook-detail__hero { padding: 48px 0; }
  .ebook-library__hero h1, .ebook-detail__hero h1 { font-size: clamp(38px, 11vw, 54px); }
  .ebook-discovery { align-items: flex-start; flex-direction: column; }
  .ebook-filter-links { justify-content: flex-start; }
  .ebook-card { grid-template-columns: minmax(120px,35%) minmax(0,1fr); }
  .ebook-card__content { padding: 22px; }
  .ebook-detail__hero-grid, .ebook-detail__content-grid { grid-template-columns: 1fr; }
  .ebook-detail__cover { min-height: 360px; max-height: 540px; order: -1; }
  .ebook-detail__content { padding: 60px 0; }
  .ebook-facts { position: static; }
  .ebook-related__grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 520px) {
  .ebook-card { grid-template-columns: 1fr; }
  .ebook-card__cover { min-height: 330px; max-height: 460px; }
  .ebook-related__grid { grid-template-columns: 1fr; }
  .ebook-related__cover { min-height: 360px; }
  .ebook-preview-banner { top: 64px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ebook-button { transition: none; }
}

/* CMS-backed landing page inside the preserved E-books & Guides visual shell. */
.ebook-library-reference .ebook-cover-media {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
  color: inherit;
  text-decoration: none;
}
.ebook-library-reference .ebook-cover-media picture {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}
.ebook-library-reference .ebook-cover-media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}
.ebook-library-reference .ebook-card__placeholder {
  min-height: 0;
  border-radius: 3px 7px 7px 3px;
}
.ebook-library-reference .ebook-body h2 a {
  color: inherit;
  text-decoration: none;
}
.ebook-library-reference .ebook-body h2 a:hover,
.ebook-library-reference .ebook-body h2 a:focus-visible,
.ebook-library-reference .ebook-library-byline a:hover,
.ebook-library-reference .ebook-library-byline a:focus-visible {
  color: #07664f;
  text-decoration: underline;
}
.ebook-library-reference .ebook-library-byline {
  display: block;
  margin: -7px 0 13px;
  color: #75847d;
  font-size: 12px;
  line-height: 1.4;
}
.ebook-library-reference .ebook-library-byline a,
.ebook-library-reference .ebook-library-byline .ebook-author-name {
  color: #496158;
  font-weight: 700;
  text-decoration: none;
}
.ebook-library-reference .ebook-more {
  text-decoration: none;
}
.ebook-library-reference .ebook-empty-filter:not([hidden]) {
  display: grid;
}

@media (max-width: 560px) {
  .ebook-library-reference .ebook-cover-media {
    padding: 14px;
  }
}
