/* Study Edition product pages (scripts/build_study_pages.py) */
.st-main h2 { margin-top: 2.2rem; }
.st-hero {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: 2rem;
  align-items: start;
  margin-top: 1rem;
}
.st-cover {
  width: 100%;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 14px 34px rgba(26, 58, 46, 0.30), 0 2px 6px rgba(0, 0, 0, 0.15);
}
.st-kicker {
  font-size: 0.85rem;
  font-variant: small-caps;
  letter-spacing: 0.08em;
  color: var(--color-gold);
  margin-bottom: 0.2rem;
}
.st-hero h1 { margin: 0 0 0.2rem; line-height: 1.15; }
.st-sub { font-style: italic; color: var(--color-text-muted); margin-bottom: 1rem; }
.st-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.st-facts li {
  padding: 0.35rem 0.8rem;
  background: #fff;
  border: 1px solid var(--color-cream-dark);
  border-radius: 999px;
  font-size: 0.95rem;
}
.st-facts strong { color: var(--color-dark-green); }
.st-price-line { margin: 1.2rem 0 0.6rem; }
.st-buy {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background: var(--color-dark-green);
  color: var(--color-cream);
  text-decoration: none;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  font-size: 1.15rem;
  border-radius: 3px;
  font-weight: 600;
  box-shadow: 0 3px 10px rgba(26, 58, 46, 0.25);
}
.st-buy:hover { background: #24503f; color: #fff; }
.st-buy--soon { background: var(--color-cream-dark); color: var(--color-text-muted); cursor: default; }
.st-format { font-size: 0.95rem; color: var(--color-text-muted); }

.st-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  margin-top: 0.8rem;
}
.st-shot { text-decoration: none; color: var(--color-text-muted); font-size: 0.9rem; font-style: italic; }
.st-shot img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: 0.35rem;
  border: 1px solid var(--color-cream-dark);
  box-shadow: 0 6px 16px rgba(26, 58, 46, 0.14);
  transition: transform 0.15s;
}
.st-shot:hover img { transform: translateY(-3px); }

.st-two { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.st-list { padding-left: 1.2rem; }
.st-list li { margin-bottom: 0.4rem; }
.st-toc { list-style: none; padding: 0; margin: 0; font-size: 0.95rem; }
.st-toc li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.25rem 0; border-bottom: 1px dotted var(--color-cream-dark); }
.st-pg { color: var(--color-text-muted); white-space: nowrap; }

.st-complete {
  margin: 2.6rem 0 1rem;
  padding: 1.6rem;
  background: var(--color-dark-green);
  color: var(--color-cream);
  border: 1px solid var(--color-gold);
  border-radius: 4px;
}
.st-complete h2 { margin-top: 0; color: var(--color-cream); }
.st-complete .st-kicker { color: var(--color-gold-bright); }

.st-faq h3 { margin-top: 1.1rem; color: var(--color-dark-green); }

.st-lightbox {
  position: fixed; inset: 0; z-index: 130;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 16px; background: rgba(16, 32, 26, 0.88);
}
.st-lightbox[hidden] { display: none; }
.st-lightbox img { max-width: 100%; max-height: calc(100vh - 90px); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.st-lightbox p { color: #f4f1e8; font-style: italic; margin-top: 0.6rem; }
.st-lightbox button {
  position: absolute; top: 10px; right: 14px; border: none; background: none;
  color: #f4f1e8; font-size: 2.2rem; cursor: pointer;
}

@media (max-width: 760px) {
  .st-hero { grid-template-columns: 1fr; }
  .st-cover { max-width: 260px; }
  .st-gallery { grid-template-columns: 1fr 1fr; gap: 0.8rem; }
  .st-two { grid-template-columns: 1fr; }
}
.st-buy--light { background: #fff; color: var(--color-dark-green); }
.st-buy--light:hover { background: var(--color-cream); color: var(--color-dark-green); }

/* Collection page: grid of the ten books */
.st-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.2rem; margin-top: 1rem; }
.st-card { display: flex; flex-direction: column; gap: 0.15rem; text-decoration: none; color: var(--color-text-dark); font-size: 0.95rem; line-height: 1.3; }
.st-card img { width: 100%; height: auto; border-radius: 2px; box-shadow: 0 8px 20px rgba(26, 58, 46, 0.22); margin-bottom: 0.5rem; transition: transform 0.15s; }
.st-card:hover img { transform: translateY(-4px); }
.st-card-n { font-size: 0.8rem; font-variant: small-caps; letter-spacing: 0.06em; color: var(--color-gold); }
@media (max-width: 900px) { .st-cards { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .st-cards { grid-template-columns: repeat(2, 1fr); } }

/* Contents: full width, in columns, grouped by part, long lists folded */
.st-contents { margin-top: 2.2rem; }
.st-toc--cols { columns: 2 300px; column-gap: 2.4rem; }
.st-toc--cols li { break-inside: avoid; }
.st-toc--clip li:nth-child(n+17) { display: none; }
.st-more {
  margin-top: 0.6rem; padding: 0.45rem 1rem; border: 1px solid var(--color-dark-green); border-radius: 3px;
  background: transparent; color: var(--color-dark-green); font: inherit; font-size: 0.95rem; cursor: pointer;
}
.st-more:hover { background: var(--color-dark-green); color: #fff; }
.st-part { border-top: 1px solid var(--color-cream-dark); padding: 0.2rem 0; }
.st-part:last-of-type { border-bottom: 1px solid var(--color-cream-dark); }
.st-part summary {
  display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; cursor: pointer;
  padding: 0.6rem 0; font-size: 1.08rem; color: var(--color-dark-green); list-style: none;
}
.st-part summary::-webkit-details-marker { display: none; }
.st-part summary::before { content: "+"; display: inline-block; width: 1.1rem; color: var(--color-gold); font-weight: 600; }
.st-part[open] summary::before { content: "\2212"; }
.st-part summary > span:first-child { flex: 1; }
.st-part .st-toc { margin-bottom: 0.8rem; }

/* Printable Edition page */
.st-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 0.8rem; }
.st-ways section { background: #fff; border: 1px solid var(--color-cream-dark); border-radius: 4px; padding: 1rem 1.2rem; }
.st-ways h3 { margin: 0 0 0.4rem; color: var(--color-dark-green); font-size: 1.1rem; }
.st-ways p { margin: 0; font-size: 0.97rem; }
.st-strip { margin: 1.4rem 0 0; overflow-x: auto; border: 1px solid var(--color-cream-dark); }
.st-strip img { display: block; height: 220px; width: auto; max-width: none; }
.st-strip figcaption { font-size: 0.9rem; font-style: italic; color: var(--color-text-muted); padding: 0.3rem 0.5rem; }

/* Two editions side by side: Study Edition / Illustrated Family Edition */
.st-editions { margin-top: 2.4rem; }
.st-ed-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1rem; }
.st-ed {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--color-cream-dark); border-radius: 4px; padding: 1.1rem 1.2rem;
}
.st-ed--family { background: #fffdf6; border-color: var(--color-gold); }
.st-ed-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 0.3rem; }
.st-ed-head img { display: block; width: 78px; height: auto; border-radius: 2px; box-shadow: 0 5px 14px rgba(26, 58, 46, 0.22); }
.st-ed h3 { margin: 0; color: var(--color-dark-green); font-size: 1.15rem; line-height: 1.25; }
.st-ed dl { margin: 0 0 1rem; font-size: 0.96rem; }
.st-ed dt { margin-top: 0.5rem; font-size: 0.82rem; font-variant: small-caps; letter-spacing: 0.06em; color: var(--color-gold); }
.st-ed dd { margin: 0; }
.st-ed .st-buy { align-self: flex-start; margin-top: auto; font-size: 1rem; padding: 0.6rem 1.2rem; }
.st-ed-note { margin-top: 0.9rem; font-size: 0.95rem; color: var(--color-text-muted); }
@media (max-width: 820px) { .st-ed-grid { grid-template-columns: 1fr; } .st-ed { padding: 1rem; } }

/* Illustrated Family Edition: placeholder cover until the panel's own cover is ready */
.st-ph {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem;
  aspect-ratio: 800 / 1035; padding: 0.8rem; text-align: center;
  background: #15233d; color: #f3e9d2; border-radius: 2px;
  outline: 1px solid #c9a45a; outline-offset: -7px;
  box-shadow: 0 8px 20px rgba(26, 58, 46, 0.22); margin-bottom: 0.5rem;
}
.st-ph small { font-size: 0.7rem; letter-spacing: 0.12em; color: #c9a45a; }
.st-ph strong { font-size: 1.05rem; line-height: 1.2; }
.st-badge {
  align-self: flex-start; margin-top: 0.2rem; padding: 0.1rem 0.6rem; border-radius: 999px;
  background: var(--color-cream-dark); color: var(--color-text-muted); font-size: 0.8rem;
}
.st-badge--now { background: var(--color-dark-green); color: var(--color-cream); }
.st-card--soon { cursor: default; }
.st-card--soon:hover img { transform: none; }

/* Whole collection (Books page): the complete edition and the fan of the ten illustrated books, larger */
.st-editions--all .st-ed-head { flex-direction: column; align-items: flex-start; gap: 0.7rem; }
.st-editions--all .st-ed-head > a { display: flex; align-items: flex-end; height: 150px; }
.st-editions--all .st-ed-head img { width: auto; height: 150px; }
.st-editions--all .st-ed-head img.st-ed-fan { height: auto; width: 240px; max-height: 150px; box-shadow: none; }

/* Readability for the real audience (2026-10-15): short points, clear price, larger book cards, darker labels */
.st-points { margin: 0 0 1rem; padding-left: 1.2rem; font-size: 1.08rem; line-height: 1.55; }
.st-points li { margin-bottom: 0.3rem; }
.st-price-big { margin: 0.8rem 0 0; font-size: 1.35rem; font-weight: 600; color: var(--color-dark-green); }
.st-price-big span { display: block; font-size: 1rem; font-weight: 400; color: var(--color-text-dark); }
.st-format { font-size: 1rem; color: var(--color-text-dark); }
.st-kicker { color: #7a5c12; font-size: 0.9rem; }
.st-card { font-size: 1.05rem; }
.st-card-n { font-size: 0.9rem; color: #7a5c12; }
.st-card .pg-muted { font-style: normal; }
.st-editions .pg-choices { margin-top: 0.8rem; }
.pg-choice--fan { grid-template-columns: 230px 1fr; }
.pg-choice--fan img { box-shadow: none; }
@media (max-width: 640px) { .pg-choice--fan { grid-template-columns: 1fr; } .pg-choice--fan img { max-width: 260px; } }
.st-contact { margin: 2.2rem 0 1rem; padding: 1.3rem 1.5rem; background: #fff; border: 2px solid var(--color-cream-dark); border-radius: 8px; }
.st-contact h2 { margin-top: 0; }
.st-contact p { font-size: 1.08rem; margin-bottom: 0.6rem; }
.st-contact p:last-child { margin-bottom: 0; }

/* Complete edition page (/study-edition/complete/) */
.st-buy-alt { display: inline-block; margin: 0.2rem 0 0 0.2rem; font-size: 1.05rem; }
.st-booklist { margin: 1rem 0 0; }
.st-bookrow { display: grid; grid-template-columns: 96px 1fr; gap: 1.1rem; align-items: start; padding: 1.1rem 0; border-top: 1px solid var(--color-cream-dark); }
.st-bookrow img { width: 96px; height: auto; border-radius: 4px; box-shadow: 0 3px 10px rgba(0,0,0,0.18); }
.st-bookrow h3 { margin: 0 0 0.15rem; font-size: 1.25rem; }
.st-bookrow p { margin: 0.25rem 0; }
.st-steps { padding-left: 1.3rem; font-size: 1.08rem; line-height: 1.55; }
.st-steps li { margin-bottom: 0.45rem; }
@media (max-width: 600px) { .st-bookrow { grid-template-columns: 72px 1fr; gap: 0.8rem; } .st-bookrow img { width: 72px; } }

/* Product pages, 2026-10-24: wider column, larger buy block, better rhythm */
.pg-main.st-main { max-width: 1040px; }
.st-hero { grid-template-columns: minmax(220px, 320px) 1fr; gap: 2.6rem; margin-top: 1.2rem; }
.st-hero > div { max-width: 640px; }
.st-hero h1 { font-size: 2.4rem; }
.st-hero > div > p:not(.st-kicker):not(.st-sub):not(.st-price-line):not(.st-format) { font-size: 1.12rem; line-height: 1.6; }
.st-price-line { margin: 1.6rem 0 .7rem; }
.st-buy { display: block; text-align: center; padding: 1rem 1.8rem; font-size: 1.3rem; max-width: 420px; }
.st-buy:focus-visible, .st-more:focus-visible, .shop-buy:focus-visible { outline: 3px solid var(--color-gold-bright, #d6ad45); outline-offset: 2px; }
.st-facts li { font-size: 1rem; }
.st-getbox { max-width: 640px; }
.st-gallery { gap: 1.6rem; }
.st-main h2 { margin-top: 3rem; }
@media (max-width: 760px) {
  .st-hero { grid-template-columns: 1fr; gap: 1.2rem; }   /* 2026-11-16: the 2-column rule above had overridden the one-column phone layout since 24 Oct */
  .st-hero h1 { font-size: 2rem; }
  .st-buy { max-width: none; }
  .st-cover { max-width: 240px; margin: 0 auto; }
  /* phones: a small cover so the title, the price and the buy button come into the first screens */
  .st-hero .st-cover { width: 100%; max-width: 150px; margin: 0 auto; }
}
.pg-main .st-facts { padding-left: 0; margin-left: 0; }
@media (min-width: 761px) { .st-cover { position: sticky; top: 1.4rem; } }
.pg-main .st-complete .st-buy { margin-left: 0; }

/* 2026-11-16: the Printable Edition + Panel 1 book bundle ($15) put forward on the two product pages that sell its parts */
.pg-bundle-card { max-width: 640px; margin: 1.3rem 0 .6rem; padding: 1.1rem 1.3rem 1.25rem; background: #fffaf0; border: 2px solid #b8922c; border-radius: 8px; box-shadow: 0 2px 10px rgba(26,58,46,.12); }
.pg-bundle-card .pgb-flag { display: inline-block; margin: 0 0 .55rem; padding: .22rem .7rem; background: #1a3a2e; color: #f4f1e8; font: bold .85rem/1.2 Arial, Helvetica, sans-serif; letter-spacing: .06em; text-transform: uppercase; border-radius: 3px; }
.pg-bundle-card .pgb-title { margin: 0 0 .3rem; font-size: 1.3rem; line-height: 1.3; font-weight: bold; color: #1a3a2e; }
.pg-bundle-card .pgb-text { margin: 0 0 .6rem; font-size: 1.05rem; line-height: 1.5; }
.pg-bundle-card .pgb-price { margin: 0 0 .85rem; font-size: 1.05rem; }
.pg-bundle-card .pgb-price strong { font-size: 1.7rem; color: #1a3a2e; }
.pg-bundle-card .pgb-price s { margin: 0 .2rem 0 .5rem; color: #5f5f5f; }
.pg-bundle-card .pgb-btn { display: block; box-sizing: border-box; max-width: 420px; min-height: 48px; padding: 1rem 1.4rem; background: #d4a932; color: #1a3a2e !important; font: bold 1.25rem/1.2 Arial, Helvetica, sans-serif; text-align: center; text-decoration: none !important; border-radius: 6px; }
.pg-bundle-card .pgb-btn:hover { background: #e0b83f; }
.pg-bundle-card .pgb-btn:focus-visible { outline: 3px solid #1a3a2e; outline-offset: 2px; }
.pg-bundle-card--bottom { margin-left: auto; margin-right: auto; }
@media (max-width: 760px) { .pg-bundle-card { padding: 1rem 1rem 1.1rem; } .pg-bundle-card .pgb-btn { max-width: none; } }

/* mobile-first-screen (2026-11-20): on phones the price and the Buy button come right after the title, and the cover is smaller,
   so the first screen shows what the book is and how to buy it. Nothing is hidden: the description follows the button. */
@media (max-width: 640px) {
  .st-hero > div { display: flex; flex-direction: column; }
  .st-hero > div > .st-kicker, .st-hero > div > h1, .st-hero > div > .st-sub { order: -3; }
  .st-hero > div > .st-price-big { order: -2; }
  .st-hero > div > .st-price-line, .st-hero > div > .sx-aonly, .st-hero > div > .sx-bonly { order: -1; }
  .st-cover { max-width: 150px; }
}

/* purchase-path pass 4 (2026-11-22): Library block on the Complete page */
.st-lib-list { margin: 0.6rem 0 1rem; padding-left: 1.2rem; line-height: 1.55; }
.st-lib-list li { margin-bottom: 0.45rem; }
.lot-look { font-size: 1.05rem; margin: 0.4rem 0 0.8rem; }
@media (max-width: 640px) {
  .st-library > img { float: none !important; display: block; width: min(220px, 62%) !important; margin: 0 auto 1rem !important; }
}
