/* Designed ebook landing (ui/_ebook_landing.html). */

/* Per-book colour themes (data-ebl-theme on the article, set in content/ebook_books
   EBOOK_THEMES). Lime stays the shared accent on every theme. */
.ebl {
  --t-a: #3B2A8C; --t-b: #4B35AE; --t-c: #5A3FC8; --t-deep: #2A1A6E;
  --t-hero: #f6f3ff; --t-disc: #ECE4FD; --t-disc-soft: #F5F1FE; --t-ink: #6B48E0;
}
.ebl[data-ebl-theme="midnight"] {
  --t-a: #0B2545; --t-b: #133B6B; --t-c: #1D5A96; --t-deep: #081C36;
  --t-hero: #EEF7FF; --t-disc: #DCEEFC; --t-disc-soft: #EEF7FF; --t-ink: #0067AB;
}
.ebl[data-ebl-theme="plum"] {
  --t-a: #45163F; --t-b: #6A2263; --t-c: #8C3483; --t-deep: #33102F;
  --t-hero: #FCF1FB; --t-disc: #F8DFF5; --t-disc-soft: #FCF0FA; --t-ink: #8A2A80;
}
.ebl[data-ebl-theme="teal"] {
  --t-a: #083F3A; --t-b: #0D5C53; --t-c: #137A6D; --t-deep: #062F2B;
  --t-hero: #ECFBF6; --t-disc: #D3F5EA; --t-disc-soft: #EAFBF5; --t-ink: #0B7466;
}
.ebl .ebl-accent { color: var(--t-ink); }
.ebl .ebl-learn .ebl-accent,
.ebl .ebl-join .ebl-accent { color: #D1F48C; }

.ebl-wrap {
  width: min(100% - 40px, 1160px);
  margin-inline: auto;
}

.ebl-narrow { width: min(100% - 40px, 820px); }
.ebl-accent { color: var(--brand-purple-ink, #6B48E0); }
.ebl-center { margin-top: 28px; text-align: center; }

.ebl-eyebrow {
  margin: 18px 0 8px;
  color: #006CB4;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ebl-text { max-width: 58ch; margin: 0 0 12px; color: #042238; }

/* Hero */
.ebl-hero {
  padding-block: clamp(28px, 4vw, 64px);
  background: linear-gradient(180deg, var(--t-hero) 0%, #fff 100%);
}

.ebl-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: center;
}

.ebl-hero h1 { margin: 0 0 16px; color: #042238; }

.ebl-actions-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  margin-top: 26px;
}

.ebl-cover-stage.eb-hub-feature { padding: 0; background: none; }

/* iPad-style device: an even near-black bezel inside a thin graphite frame */
.ebl-cover-stage .eb-tablet,
.ebl-page-tablet.eb-tablet {
  padding: 18px;
  border: 0;
  border-radius: 30px;
  background: #0d0d0f;
  box-shadow:
    0 0 0 2px #3a3b40,
    0 0 0 3px #1b1c1f,
    0 30px 50px #1e255040,
    0 6px 14px #1e255030;
}

.ebl-cover-stage .eb-tablet::before,
.ebl-page-tablet.eb-tablet::before {
  top: 7px;
  left: calc(50% - 2.5px);
  width: 5px;
  height: 5px;
  background: #2b2d33;
  box-shadow: inset 0 0 0 1px #45474f;
}

.ebl-cover-stage .eb-tablet { width: min(100%, 400px); }

/* Book-page cover: deep purple, one title line, audience, edition, thin printed frame */
.ebl-cover {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  padding: 28px 26px 0;
  border-radius: 8px;
  background: linear-gradient(165deg, var(--t-a) 0%, var(--t-deep) 62%);
  color: #fff;
  text-align: start;
}

.ebl-cover::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 3;
  border: 1px solid #ffffff59;
  border-radius: 5px;
  pointer-events: none;
}

.ebl-cover-mark { display: block; width: 104px; height: auto; margin-bottom: 22px; }

.ebl-cover-title, .ebl-cover-for, .ebl-cover-ed, .ebl-cover-ch { display: block; margin: 0; }

.ebl-cover-title {
  font: 700 34px/1.05 Poppins, sans-serif;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
}

.ebl-cover-for { margin-top: 8px; color: #E6DEFF; font: 400 14px/1.35 "Open Sans", sans-serif; }

.ebl-cover-ed {
  margin-top: 14px;
  color: #D1F48C;
  font: 700 12px/1.2 "Open Sans", sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.ebl-cover-art {
  position: relative;
  flex: 1;
  margin: 22px -26px 0;
  border-top: 2px solid #D1F48C;
}

.ebl-cover-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ebl-cover-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--t-deep) 15%, transparent) 0%, transparent 35%, color-mix(in srgb, var(--t-deep) 80%, transparent) 100%);
  mix-blend-mode: multiply;
}

.ebl-cover-ch {
  position: absolute;
  left: 26px;
  bottom: 22px;
  z-index: 2;
  color: #D1F48C;
  font: 700 11px/1.2 "Open Sans", sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* What you'll learn */
.ebl-learn {
  padding-block: clamp(40px, 5vw, 72px);
  background:
    radial-gradient(60% 80% at 100% 0, #D1F48C1f 0%, transparent 60%),
    radial-gradient(50% 70% at 0 100%, #ffffff14 0%, transparent 60%),
    linear-gradient(125deg, var(--t-a) 0%, var(--t-b) 55%, var(--t-c) 100%);
  color: #fff;
  text-align: center;
}

.ebl-eyebrow-dark { margin-top: 0; color: #D1F48C; }
.ebl-learn h2 { margin: 0 0 32px; color: #fff; }
.ebl-learn .ebl-accent { color: #D1F48C; }

.ebl-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 36px;
  text-align: start;
}

.ebl-card {
  padding: 28px 24px;
  border-top: 4px solid #D1F48C;
  border-radius: 8px;
  background: #fff;
  color: #042238;
  box-shadow: 0 14px 30px #1a0f4a33;
}

.ebl-card-num {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #D1F48C;
  color: #1B1C1A;
  font: 700 16px/1 Poppins, sans-serif;
}

.ebl-card-icon {
  display: block;
  width: 88px;
  height: 88px;
  margin: -6px 0 16px -6px;
}

.ebl-card h3 { margin: 0 0 10px; color: #042238; }
.ebl-card p { margin: 0; color: #2d3748; }

.ebl-learn .ebl-btn-onDark {
  border: 2px solid #fff;
  background: transparent;
  color: #fff;
}

.ebl-learn .ebl-btn-onDark:hover,
.ebl-learn .ebl-btn-onDark:focus-visible {
  border-color: #D1F48C;
  background: #D1F48C;
  color: #1B1C1A;
}

/* What's inside */
.ebl-inside { padding-block: clamp(48px, 6vw, 88px); }

.ebl-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
}

.ebl-split.is-solo { grid-template-columns: minmax(0, 1fr); width: min(100% - 40px, 820px); }

/* Background art behind the page preview: a soft lavender disc, a lime dotted arc
   (bottom left) and a purple dotted arc (top right). */
.ebl-page-stage {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: 36px 0;
}

.ebl-page-stage::before,
.ebl-page-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  aspect-ratio: 1;
  pointer-events: none;
}

.ebl-page-stage::before {
  inset: 50% auto auto 50%;
  width: min(92%, 500px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, var(--t-disc) 0 56%, var(--t-disc-soft) 56% 70.5%, transparent 71%);
}

/* lime dotted quarter-arc, bottom left */
.ebl-page-stage::after {
  left: 2%;
  bottom: 0;
  width: 190px;
  background: radial-gradient(circle, #84D828 2.4px, transparent 2.8px) 0 0 / 15px 15px;
  -webkit-mask: radial-gradient(circle at 0 100%, transparent 0 70px, #000 71px 186px, transparent 187px);
  mask: radial-gradient(circle at 0 100%, transparent 0 70px, #000 71px 186px, transparent 187px);
}

/* purple dotted quarter-arc, top right of the tablet */
.ebl-page-tablet::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -40px;
  right: -60px;
  width: 150px;
  aspect-ratio: 1;
  background: radial-gradient(circle, #6B48E0 2px, transparent 2.4px) 0 0 / 13px 13px;
  -webkit-mask: radial-gradient(circle at 100% 0, transparent 0 40px, #000 41px 146px, transparent 147px);
  mask: radial-gradient(circle at 100% 0, transparent 0 40px, #000 41px 146px, transparent 147px);
  opacity: .6;
  pointer-events: none;
}

.ebl-page-tablet.eb-tablet {
  position: relative;
  width: min(100%, 400px);
}

.ebl-page-tablet img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.ebl-inside h2 { margin: 0 0 18px; color: #042238; }
.ebl-list-h { margin: 18px 0 10px; color: #042238; font-weight: 700; }

.ebl-checks {
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.ebl-checks li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 7px 0;
  color: #042238;
  font-weight: 700;
}

/* Ebook pages always use the bright green check */
.ebl-checks .pub-check {
  flex: none;
  margin-top: 3px;
  background: url("/images/ui-symbols/check-circle-green-bright.svg") center / contain no-repeat;
}

/* FAQ */
.ebl-faq { padding-block: clamp(40px, 5vw, 64px); }
.ebl-faq h2 { margin: 0 0 22px; color: #042238; }

.ebl-q {
  margin-bottom: 12px;
  border-radius: 4px;
  background: #f3f4f7;
}

.ebl-q summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 14px 20px;
  color: #042238;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.ebl-q summary::-webkit-details-marker { display: none; }

.ebl-q summary::after {
  content: "";
  flex: none;
  border: 6px solid transparent;
  border-top-color: #042238;
  border-bottom-width: 0;
  transition: transform .2s ease;
}

.ebl-q[open] summary::after { transform: rotate(180deg); }
.ebl-q p { max-width: 70ch; margin: 0; padding: 0 20px 18px; color: #2d3748; }

/* Additional resources */
.ebl-resources { padding-block: clamp(40px, 5vw, 64px); text-align: center; }
.ebl-resources h2 { margin: 0 0 28px; color: #042238; }

/* Article cards: image, category, title, two-line summary, read time and link.
   Flex rows so a short last row centres instead of leaving a gap. */
.ebl-res-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  text-align: start;
}

.ebl-res {
  display: flex;
  flex-direction: column;
  flex: 0 1 calc((100% - 48px) / 3);
  overflow: hidden;
  border: 1px solid #e6e1f5;
  border-radius: 8px;
  background: #fff;
  color: #2d3748;
  box-shadow: 0 1px 2px #1e255014, 0 8px 24px #1e25500d;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.ebl-res-img {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #F4F0FE;
}

.ebl-res-img img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ebl-res-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 18px 20px 20px;
}

.ebl-res-k {
  color: #006CB4;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.ebl-res-t {
  color: #042238;
  font: 600 17px/1.35 Poppins, sans-serif;
}

.ebl-res-lead {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 14px;
  line-height: 1.5;
}

.ebl-res-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid #efedf6;
  color: #5b6475;
  font-size: 13px;
}

.ebl-res-go { color: var(--link-ink, #006CB4); font-weight: 700; }

.ebl-res:hover,
.ebl-res:focus-visible { border-color: var(--brand-purple-ink, #6B48E0); box-shadow: 0 1px 2px #1e255014, 0 12px 28px #6B48E01f; }
.ebl-res:hover .ebl-res-t,
.ebl-res:focus-visible .ebl-res-t,
.ebl-res:hover .ebl-res-go,
.ebl-res:focus-visible .ebl-res-go { color: var(--brand-purple-ink, #6B48E0); }

/* Still want more: a lavender library card */
.ebl-more { padding-block: clamp(24px, 3vw, 40px) 0; }

.ebl-more-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 24px 32px;
  border: 2px solid #E2D8FB;
  border-radius: 8px;
  background: linear-gradient(120deg, #F7F3FF 0%, #EFE8FE 100%);
}

.ebl-more-icon { display: block; width: 88px; height: 88px; }
.ebl-more h2 { margin: 0 0 6px; color: #042238; }
.ebl-more p { margin: 0; max-width: 62ch; color: #2d3748; }

/* Join: the purple call-to-action card */
.ebl-join { padding-block: clamp(24px, 3vw, 40px) clamp(48px, 6vw, 80px); }

.ebl-join-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: center;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 8px;
  background:
    radial-gradient(45% 90% at 100% 0, #D1F48C26 0%, transparent 60%),
    linear-gradient(125deg, var(--t-a) 0%, var(--t-b) 55%, var(--t-c) 100%);
  color: #fff;
}

.ebl-join-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -30px;
  bottom: -30px;
  width: 170px;
  aspect-ratio: 1;
  background: radial-gradient(circle, #D1F48C 2.2px, transparent 2.6px) 0 0 / 15px 15px;
  opacity: .85;
  -webkit-mask: radial-gradient(circle at 0 100%, transparent 0 60px, #000 61px 166px, transparent 167px);
  mask: radial-gradient(circle at 0 100%, transparent 0 60px, #000 61px 166px, transparent 167px);
}

.ebl-join h2 { margin: 0 0 10px; color: #fff; }
.ebl-join .ebl-accent { color: #D1F48C; }
.ebl-join-copy p { margin: 0 0 24px; max-width: 54ch; color: #E6DEFF; }
.ebl-join-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.ebl-join-art {
  display: grid;
  place-items: center;
  width: 168px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffff1a;
  box-shadow: inset 0 0 0 2px #ffffff26;
}

.ebl-join-art img { display: block; width: 128px; height: 128px; }


@media (max-width: 900px) {
  .ebl-hero-grid,
  .ebl-split { grid-template-columns: minmax(0, 1fr); }
  .ebl-hero-cover { order: -1; }
  .ebl-cover-stage .eb-tablet { width: min(100%, 280px); padding: 12px; border-radius: 22px; }
  .ebl-cover { padding: 20px 18px 0; }
  .ebl-cover-mark { width: 84px; margin-bottom: 14px; }
  .ebl-cover-title { font-size: 24px; }
  .ebl-cover-for { font-size: 12px; }
  .ebl-cover-art { margin-inline: -18px; margin-top: 14px; }
  .ebl-cover-ch { left: 18px; bottom: 18px; }
  .ebl-page-tablet.eb-tablet { padding: 12px; border-radius: 22px; }
  .ebl-more-card { grid-template-columns: minmax(0, 1fr); justify-items: start; gap: 14px; padding: 22px; }
  .ebl-more-icon { width: 72px; height: 72px; }
  .ebl-join-card { grid-template-columns: minmax(0, 1fr); }
  .ebl-join-art { display: none; }
  .ebl-cards { grid-template-columns: minmax(0, 1fr); }
  .ebl-res { flex-basis: 100%; }
  .ebl-page-tablet.eb-tablet { width: min(100%, 300px); }
}

@media (prefers-reduced-motion: reduce) {
  .ebl-q summary::after { transition: none; }
}


/* The cover scales with its tablet (library, featured book and book page share it). */
.eb-tablet:has(> .ebl-cover) { container-type: inline-size; }
.ebl-cover { width: 100%; padding: 7cqw 7cqw 0; }
.ebl-cover::after { inset: 2.7cqw; }
.ebl-cover .ebl-cover-mark { width: 28cqw; margin-bottom: 5.5cqw; }
.ebl-cover .ebl-cover-title { font-size: 9cqw; }
.ebl-cover .ebl-cover-for { margin-top: 2cqw; font-size: 3.8cqw; }
.ebl-cover .ebl-cover-ed { margin-top: 3.6cqw; font-size: 3.2cqw; }
.ebl-cover .ebl-cover-art { margin: 5.5cqw -7cqw 0; }
.ebl-cover .ebl-cover-ch { left: 7cqw; bottom: 5.5cqw; font-size: 3cqw; }
.eb-hub-card .eb-tablet, .eb-hub-feature-link .eb-tablet { padding: 8px; border: 0; border-radius: 16px; background: #0d0d0f; box-shadow: 0 0 0 1.5px #3a3b40, 0 14px 26px #1e255030; }

/* Bundle page: a scrolling row of every guide's cover, and the parts list. */
.ebl-shelf { padding-block: clamp(40px, 5vw, 72px) 8px; text-align: center; }
.ebl-shelf h2 { margin: 0 0 26px; color: #042238; }
.ebl-shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: 172px; gap: 22px; overflow-x: auto; padding: 8px 4px 22px; scroll-snap-type: x mandatory; text-align: start; }
.ebl-shelf-item { position: relative; display: grid; gap: 10px; scroll-snap-align: start; color: #042238; }
.ebl-shelf-item b { font: 600 14px/1.3 Poppins, sans-serif; }
.ebl-shelf-item:hover b, .ebl-shelf-item:focus-visible b { color: var(--brand-purple-ink, #6B48E0); }
.ebl-shelf-num { position: absolute; top: -6px; left: -6px; z-index: 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #D1F48C; color: #1B1C1A; font: 700 13px Poppins, sans-serif; box-shadow: 0 2px 6px #0003; }
.ebl-shelf-item .eb-tablet { width: 100%; padding: 6px; border: 0; border-radius: 12px; background: #0d0d0f; box-shadow: 0 0 0 1px #3a3b40, 0 10px 20px #1e255030; }
.ebl-shelf-item .eb-story-mark { top: 7px; left: 8px; width: 54px; }
.ebl-shelf-item .eb-story-text { left: 8px; right: 8px; bottom: 8px; gap: 2px; }
.ebl-shelf-item .eb-story-title { font-size: 13px; }
.ebl-shelf-item .eb-story-for { font-size: 8px; }
.ebl-shelf-item .eb-story-ed, .ebl-shelf-item .eb-story-ch { font-size: 7.5px; }
.ebl-parts { padding-block: clamp(40px, 5vw, 72px); background: #f6f3ff; }
.ebl-parts h2 { margin: 0 0 16px; color: #042238; }
.ebl-parts-list { margin: 20px 0 24px; }
.ebl-part { background: #fff; }
.ebl-part-n { margin-right: 6px; color: var(--brand-purple-ink, #6B48E0); }
.ebl-part-body { padding: 0 20px 16px; }
.ebl-part-body p { margin: 0 0 8px; color: #2d3748; }
.ebl-part-meta { color: #5b6475 !important; font-size: 14px; }
.ebl-part-links { display: flex; flex-wrap: wrap; gap: 18px; font-weight: 700; }
.ebl-parts .ebl-split { align-items: start; }
