/* Real covers and restrained editorial layouts, shared by all three site palettes. */
@media screen {
  .book-shelf:has(.shelf-book-featured.is-expanded) { align-items: flex-start; }
  .shelf-book.shelf-book-featured { display: block; container: studio-book / inline-size; }
  /* Restore the accepted desktop width while retaining the larger, left-aligned cover. */
  .shelf-book.shelf-book-featured.is-expanded { flex: 0 0 min(66%, 780px); }
  .book-hero { position: relative; height: 100%; }
  .book-hero-copy[hidden] { display: none !important; }
  .shelf-book-featured .notes-cover-toggle,
  .shelf-book-featured.is-expanded .notes-cover-toggle {
    display: flex; flex-direction: column; justify-content: flex-start;
    width: 100%; min-width: 0; min-height: 350px; padding: 18px 12px;
    gap: 10px; background: linear-gradient(135deg, var(--t-tint), var(--t-soft));
  }
  .notes-cover-toggle::before, .notes-cover-toggle::after { content: none; }
  .notes-cover-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
  .notes-series { display: none; color: var(--s-muted); font-size: 11px; letter-spacing: .12em; }
  .notes-cover-art { display: grid; place-items: center; flex: 1; width: 100%; min-height: 185px; }
  .notes-cover-art img { display: block; width: 100%; max-width: 192px; height: 205px; object-fit: contain; filter: drop-shadow(0 9px 9px #143f4c18); }
  .notes-cover-caption { display: flex; flex-direction: column; gap: 3px; }
  .notes-cover-caption strong { color: var(--s-ink); font: 600 21px/1.5 var(--s-serif); }
  .notes-cover-caption > span { color: var(--s-muted); font-size: 11px; }
  .shelf-book-featured .book-cover-cue { flex: none; margin-top: 2px; }
  .shelf-book-featured.is-expanded .book-hero {
    display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); align-items: end;
    gap: 20px; height: auto; padding: 54px 22px 26px;
    border-bottom: 1px solid var(--s-line); background: linear-gradient(135deg, var(--t-tint), var(--t-soft));
  }
  .shelf-book-featured.is-expanded .notes-cover-toggle {
    position: static; height: auto; min-height: 0; padding: 0; background: none;
  }
  .shelf-book-featured.is-expanded .notes-cover-label { position: absolute; inset: 17px 62px auto 22px; width: auto; }
  .shelf-book-featured.is-expanded .notes-series { display: inline; }
  .shelf-book-featured.is-expanded .notes-cover-art { min-height: 0; place-items: end start; }
  .shelf-book-featured.is-expanded .notes-cover-art img { width: 100%; max-width: 300px; height: 300px; object-position: left bottom; }
  .shelf-book-featured.is-expanded .notes-cover-caption { display: none; }
  .shelf-book-featured.is-expanded .book-cover-cue { position: absolute; right: 18px; top: 13px; bottom: auto; }
  .book-hero-copy { display: grid; gap: 10px; min-width: 0; align-self: end; text-align: left; }
  .book-hero-copy h2 { margin: 0; color: var(--s-ink); font: 650 27px/1.4 var(--s-serif); text-wrap: balance; }
  .book-hero-copy p { margin: 0; color: var(--s-muted); font-size: 12px; line-height: 1.8; }
  .book-hero-copy .notes-subtitle { color: var(--s-green-dark); font-size: 13px; }
  .book-hero-copy .notes-edition { justify-self: start; }
  .book-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 6px; }
  .book-actions > div { display: grid; gap: 6px; text-align: center; }
  .book-action { width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--s-green); border-radius: 12px; font: 600 14px/1.4 var(--s-sans); }
  .book-action-trial { background: var(--s-paper); color: var(--s-green-dark); }
  .book-action-buy { background: var(--s-green-dark); color: var(--s-paper); }
  .book-action:disabled { cursor: not-allowed; opacity: .78; }
  .book-actions span { color: var(--s-muted); font-size: 10px; line-height: 1.5; }
  .shelf-book-featured .notes-detail { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; gap: 22px; padding: 24px; }
  .notes-edition { color: var(--s-green-dark); font-size: 11px; padding: 5px 9px; border: 1px solid var(--s-line); border-radius: 7px; background: var(--t-soft); }
  .notes-detail p { line-height: 1.8; }
  .notes-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; padding: 13px 0; border-block: 1px solid var(--s-line); }
  .notes-stats > div { display: flex; flex-direction: column-reverse; align-items: center; gap: 3px; }
  .notes-stats > div + div { border-left: 1px solid var(--s-line); }
  .notes-stats dt { color: var(--s-muted); font-size: 11px; }
  .notes-stats dd { margin: 0; color: var(--s-green-dark); font: 650 28px/1.2 var(--s-sans); font-variant-numeric: tabular-nums; }
  .notes-stats.book-stats-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .notes-audience { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 14px 16px; border-radius: 10px; background: var(--t-soft); }
  .notes-detail h3 { color: var(--s-ink); font-size: 13px; line-height: 1.6; margin: 0 0 6px; }
  .notes-audience p { font-size: 12px; }
  .notes-features { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .notes-methods ul { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
  .notes-methods li { display: flex; align-items: baseline; gap: 10px; color: var(--s-muted); font-size: 12px; }
  .notes-methods li strong { min-width: 25px; color: var(--s-green-dark); font-size: 18px; font-variant-numeric: tabular-nums; }
  .notes-methods p { font-size: 12px; }
  .notes-visual figure { margin: 12px 0 0; }
  /* A CSS viewport of the supplied illustration, not the promotional poster layout.
     Keep the original image bytes and the complete scientific diagram unchanged. */
  .notes-model-crop { position: relative; overflow: hidden; aspect-ratio: 1080 / 610; border: 1px solid var(--s-line); border-radius: 8px; background: #fff; }
  .notes-model-crop img { position: absolute; width: 148.1482%; max-width: none; height: auto; left: -23.1482%; top: -147.541%; }
  .book-source-crop { aspect-ratio: var(--book-art-ratio); border: 0; box-shadow: 0 0 0 1px var(--s-line); }
  .book-source-crop img { width: var(--book-art-width); left: var(--book-art-left); top: var(--book-art-top); }
  .notes-visual figcaption { font-size: 10px; line-height: 1.6; margin-top: 7px; color: var(--s-muted); }
  .book-keypoints ul { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 12px; }
  .book-keypoints li { padding-left: 11px; border-left: 2px solid var(--s-line); }
  .book-keypoints li strong { color: var(--s-green-dark); font-size: 12px; }
  .book-keypoints li p { margin-top: 3px; font-size: 12px; }
  .book-study-flow { padding: 14px; border: 1px solid var(--s-line); border-radius: 10px; background: var(--t-soft); }
  .book-study-flow ol { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 13px; }
  .book-study-flow li { display: flex; align-items: flex-start; gap: 10px; }
  .book-study-flow li > span { flex: none; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--s-line); border-radius: 50%; color: var(--s-green-dark); background: var(--s-paper); font: 600 10px/1 var(--s-sans); }
  .book-study-flow strong { color: var(--s-ink); font-size: 12px; }
  .book-study-flow li p { margin-top: 2px; font-size: 11px; }
  .book-study-flow .book-flow-note { font-size: 10px; padding-top: 9px; border-top: 1px solid var(--s-line); }
  .notes-outline { border-block: 1px solid var(--s-line); }
  .notes-outline summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; cursor: pointer; list-style: none; color: var(--s-ink); }
  .notes-outline summary::-webkit-details-marker { display: none; }
  .notes-outline summary > span:first-child { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 16px; }
  .notes-outline summary strong { font-size: 13px; }
  .notes-outline summary span span { font-size: 11px; color: var(--s-muted); }
  .notes-outline-cue { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--t-soft); color: var(--s-green-dark); flex: none; }
  .notes-outline-cue::before { content: "+"; }
  .notes-outline[open] .notes-outline-cue::before { content: "−"; }
  .notes-outline ol { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; list-style: none; padding: 0 0 12px; margin: 0; }
  .notes-outline li { display: flex; gap: 10px; align-items: baseline; padding: 8px 0; color: var(--s-ink); font-size: 12px; }
  .notes-outline li > span { color: var(--s-green); font: 500 11px/1.5 var(--s-sans); }
  .notes-publication { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 11px; color: var(--s-muted); }
  .planned-cover-stack { flex: 1; width: 100%; min-height: 185px; display: flex; align-items: center; justify-content: center; padding: 12px; }
  .planned-cover-stack > span { width: 30%; height: 130px; border: 1px solid var(--s-line); border-radius: 3px 7px 7px 3px; background: var(--s-paper); box-shadow: -4px 5px 10px #0000000d; transform: rotate(-8deg); }
  .planned-cover-stack > span + span { margin-left: -12%; }
  .planned-cover-stack > span:nth-child(2) { transform: translateY(-8px) rotate(-3deg); background: var(--t-soft); }
  .planned-cover-stack > span:nth-child(3) { transform: rotate(4deg); background: var(--t-tint); }
  .planned-cover-stack > span:nth-child(4) { transform: translateY(8px) rotate(10deg); }
  .shelf-book-planning.is-expanded .notes-cover-toggle { height: 62px; min-height: 0; background: var(--t-soft); border-bottom: 1px solid var(--s-line); }
  .shelf-book-planning.is-expanded .planned-cover-stack { display: none; }
  .planned-detail > header p { margin-top: 8px; }
  .planned-books-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; }
  .planned-book { min-width: 0; margin: 0; }
  .planned-book-art { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-height: 195px; padding: 24px 12px 18px; border: 1px solid var(--s-line); border-radius: 10px; background: var(--t-soft); }
  .planned-book-number { position: absolute; top: 10px; left: 12px; color: var(--s-muted); font-size: 10px; }
  .planned-book-cover { display: flex; flex-direction: column; justify-content: space-between; width: 100%; min-width: 0; max-width: 112px; height: 150px; padding: 18px 10px; border: 1px solid var(--s-line); border-left: 5px solid var(--s-green); border-radius: 2px 7px 7px 2px; background: var(--s-paper); box-shadow: 5px 8px 13px #0000000a; text-align: center; }
  .planned-book-cover small { color: var(--s-muted); font-size: 7px; letter-spacing: .06em; }
  .planned-book-cover strong { color: var(--s-green-dark); font: 600 17px/1.6 var(--s-serif); text-wrap: balance; }
  .planned-book-cover > span { color: var(--s-muted); font-size: 9px; }
  .planned-book figcaption { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 5px; padding-top: 10px; }
  .planned-book figcaption h3 { margin: 0; font-size: 14px; }
  .planned-book figcaption > span { color: var(--s-muted); font-size: 10px; }
  @media (min-width: 821px) {
    .shelf-book-featured:not(.is-expanded) .notes-cover-toggle { height: 365px; }
    .shelf-book-featured:not(.is-expanded) .notes-cover-caption { min-height: 66px; justify-content: center; }
    /* The other six spines stay legible when one book opens horizontally. */
    .book-shelf:has(.is-expanded) .shelf-book-featured:not(.is-expanded) .notes-cover-toggle { padding: 18px 7px; gap: 12px; }
    .book-shelf:has(.is-expanded) .shelf-book-featured:not(.is-expanded) .book-number { font-size: 9px; letter-spacing: 0; white-space: nowrap; }
    .book-shelf:has(.is-expanded) .shelf-book-featured:not(.is-expanded) .notes-cover-art { min-height: 0; flex: none; }
    .book-shelf:has(.is-expanded) .shelf-book-featured:not(.is-expanded) .notes-cover-art img { height: 78px; }
    .book-shelf:has(.is-expanded) .shelf-book-featured:not(.is-expanded) .notes-cover-caption { align-items: center; flex: 1; min-height: 0; }
    .book-shelf:has(.is-expanded) .shelf-book-featured:not(.is-expanded) .notes-cover-caption strong { writing-mode: vertical-rl; white-space: nowrap; font-size: 18px; letter-spacing: .1em; }
    .book-shelf:has(.is-expanded) .shelf-book-featured:not(.is-expanded) .notes-cover-caption > span { display: none; }
    .book-shelf:has(.is-expanded) .shelf-book-planning:not(.is-expanded) .planned-cover-stack { flex: none; min-height: 78px; padding: 8px; }
    .book-shelf:has(.is-expanded) .shelf-book-planning:not(.is-expanded) .planned-cover-stack > span { height: 56px; }
  }
  @media (min-width: 821px) and (max-width: 1199px) {
    .shelf-book.shelf-book-featured.is-expanded { flex-basis: 63%; }
    .book-shelf:has(.shelf-book-featured.is-expanded) .shelf-book:not(.shelf-book-featured) .book-number { font-size: 9px; letter-spacing: 0; }
    .book-shelf:has(.shelf-book-featured.is-expanded) .shelf-book:not(.shelf-book-featured) .book-cover-foot { display: none; }
    .book-shelf:has(.is-expanded) .shelf-book-featured:not(.is-expanded) .notes-cover-label { display: none; }
    .book-shelf:has(.is-expanded) .shelf-book-featured:not(.is-expanded) .notes-cover-art img { height: 62px; }
    .shelf-book-featured .notes-detail { padding: 20px; }
    .notes-features { grid-template-columns: 1fr; gap: 18px; }
    .notes-visual figure { max-width: 360px; }
    .notes-methods ul { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .notes-methods li { display: grid; gap: 2px; }
  }
  @media (max-width: 820px) {
    .shelf-book.shelf-book-featured.is-expanded { display: block; grid-column: 1 / -1; }
    .shelf-book-featured .notes-cover-toggle { min-height: 265px; padding: 16px 12px; }
    .shelf-book-featured:not(.is-expanded) .notes-cover-toggle { height: 100%; }
    .notes-cover-art { min-height: 120px; }
    .notes-cover-art img { height: 155px; }
    .shelf-book-featured .notes-detail { padding: 22px; gap: 20px; }
    .notes-cover-caption strong { font-size: 20px; text-wrap: balance; }
  }
  @media (max-width: 540px) {
    .shelf-book-featured .notes-detail { padding: 20px 16px; }
    .notes-edition { font-size: 10px; padding: 4px 7px; }
    .notes-stats dd { font-size: 24px; }
    .notes-stats dt { font-size: 10px; }
    .notes-features { grid-template-columns: 1fr; gap: 20px; }
    .notes-methods ul { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .notes-methods li { display: grid; gap: 2px; }
    .notes-audience { gap: 12px; padding: 12px; }
    .notes-audience p { font-size: 11px; }
    .notes-outline ol { gap: 0 12px; }
    .notes-outline li { font-size: 11px; gap: 6px; }
  }
  /* Keep the header readable in a narrow card, including the tablet accordion. */
  @container studio-book (max-width: 500px) {
    .shelf-book-featured.is-expanded .book-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 50px 18px 22px; }
    .shelf-book-featured.is-expanded .notes-cover-art img { width: min(100%, 270px); height: 270px; }
    .book-hero-copy h2 { font-size: 25px; }
    .book-hero-copy p { font-size: 13px; }
    .book-actions { max-width: 320px; }
    .notes-features { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .notes-methods ul { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .notes-methods li { display: grid; gap: 2px; }
    .notes-outline ol { grid-template-columns: minmax(0, 1fr); }
    .notes-audience { gap: 12px; padding: 12px; }
    .notes-stats dd { font-size: 24px; }
    .notes-stats dt { font-size: 10px; text-align: center; }
    .planned-books-grid { gap: 20px 12px; }
    .planned-book-art { min-height: 170px; padding-inline: 6px; }
    .planned-book-cover { height: 130px; padding: 14px 6px; }
    .planned-book-cover strong { font-size: 15px; }
  }
  @container studio-book (max-width: 340px) {
    .notes-audience { grid-template-columns: minmax(0, 1fr); }
    .notes-stats:not(.book-stats-three) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 0; }
    .notes-stats:not(.book-stats-three) > div:nth-child(3) { border-left: 0; }
    .book-stats-three dd { font-size: 21px; }
  }
  @media (max-width: 360px) {
    .notes-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 0; }
    .notes-stats > div:nth-child(3) { border-left: 0; }
    .notes-stats.book-stats-three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
    .notes-stats.book-stats-three > div:nth-child(3) { border-left: 1px solid var(--s-line); }
    .book-stats-three dd { font-size: 21px; }
    .notes-audience { grid-template-columns: 1fr; }
  }
}
