/*
Theme Name: Stillbrook Press
Theme URI: https://stillbrookpress.co.uk/
Author: Stillbrook Press
Author URI: https://stillbrookpress.co.uk/
Description: A calm, premium WordPress theme for Stillbrook Press with proper book and download front-end templates.
Version: 8.8.8
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: stillbrook-press
*/

:root {
  --sb-bg: #f5f0e9;
  --sb-surface: rgba(255,255,255,0.72);
  --sb-card: #fbf8f3;
  --sb-text: #221a15;
  --sb-muted: #5e5046;
  --sb-border: rgba(34, 26, 21, 0.12);
  --sb-accent: #a8845d;
  --sb-accent-dark: #2a1d16;
  --sb-shadow: 0 12px 30px rgba(34, 26, 21, 0.05);
  --sb-frame: #ddd2c4;
  --sb-frame-inner: rgba(255,255,255,0.92);
  --sb-radius-xl: 24px;
  --sb-radius-lg: 18px;
  --sb-radius-md: 16px;
  --sb-container: min(1120px, calc(100% - 28px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--sb-text);
  background:
    radial-gradient(circle at top left, rgba(255,255,255,0.9), transparent 28%),
    linear-gradient(180deg, #f8f5ef 0%, var(--sb-bg) 100%);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4, h5, h6,
.sb-brand__name,
.sb-hero__title,
.sb-section-title,
.sb-book-card__title,
.sb-callout__title,
.entry-title {
  font-family: "Cormorant Garamond", Georgia, serif;
}

.sb-site-wrap { min-height: 100vh; }
.sb-container { width: var(--sb-container); margin: 0 auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(248, 245, 239, 0.9);
  border-bottom: 1px solid rgba(34, 26, 21, 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
}

.sb-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.sb-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--sb-accent-dark);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  box-shadow: var(--sb-shadow);
}

.sb-brand__eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.28em;
  color: #79695d;
  font-weight: 700;
  margin-bottom: 2px;
}

.sb-brand__name {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1;
  font-weight: 600;
}

.primary-navigation .menu,
.primary-navigation ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-navigation a {
  text-decoration: none;
  color: var(--sb-muted);
  font-weight: 600;
}
.primary-navigation a:hover,
.primary-navigation .current-menu-item > a { color: var(--sb-text); }

.sb-header-actions { display: flex; align-items: center; gap: 14px; }

.sb-button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.sb-button:hover,
.wp-block-button__link:hover,
.sb-button:focus-visible,
.wp-block-button__link:focus-visible {
  transform: translateY(-1px);
}

.sb-button--primary,
.wp-block-button.is-style-fill .wp-block-button__link,
.wp-block-button__link {
  color: #fff;
  background: var(--sb-accent-dark);
}

.sb-button--primary:hover,
.wp-block-button__link:hover,
.sb-button--primary:focus-visible,
.wp-block-button__link:focus-visible {
  color: #fff;
  background: #1c120d;
}

.sb-button--secondary {
  color: var(--sb-text);
  background: rgba(255,255,255,0.45);
  border-color: rgba(34, 26, 21, 0.12);
}

.sb-button--secondary:hover,
.sb-button--secondary:focus-visible {
  background: rgba(255,255,255,0.75);
  border-color: rgba(34, 26, 21, 0.18);
}

.sb-main { padding-bottom: 64px; }

.sb-hero {
  padding: clamp(28px, 4vw, 48px) 0 28px;
}

.sb-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}

.sb-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--sb-border);
  background: rgba(255,255,255,0.52);
  color: #6e5d51;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.sb-hero__title {
  margin: 14px 0 10px;
  max-width: 11.8ch;
  font-size: clamp(2.3rem, 4.2vw, 3.7rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 600;
  text-wrap: balance;
}

.sb-hero__lede {
  max-width: 34rem;
  margin: 0 0 18px;
  color: var(--sb-muted);
  font-size: clamp(0.98rem, 1.1vw, 1.04rem);
}

.sb-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }

.sb-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  color: #65564c;
  font-size: 0.98rem;
  font-weight: 700;
}
.sb-highlights li { position: relative; padding-left: 16px; }
.sb-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sb-accent);
}

.sb-callout {
  padding: clamp(18px, 2.6vw, 24px);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-radius-xl);
  background: var(--sb-surface);
  box-shadow: var(--sb-shadow);
}
.sb-callout__label {
  margin: 0 0 8px;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #86684e;
}
.sb-callout__title {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1;
}
.sb-callout__text { margin: 0 0 18px; color: var(--sb-muted); }

.sb-section { padding: clamp(20px, 3vw, 34px) 0; }
.sb-section--tight { padding-top: 8px; }
.sb-section__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.sb-section-kicker {
  margin: 0 0 6px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #7c6a5d;
  font-weight: 800;
}
.sb-section-title {
  margin: 0;
  font-size: clamp(1.6rem, 2.3vw, 2.2rem);
  line-height: 1;
}
.sb-section-intro { margin: 0; color: var(--sb-muted); max-width: 38rem; }

.sb-grid {
  display: grid;
  gap: 16px;
}
.sb-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sb-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.sb-book-card,
.sb-feature-box,
.sb-page-card {
  padding: 18px;
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-radius-lg);
  background: rgba(255,255,255,0.65);
  box-shadow: var(--sb-shadow);
}

.sb-book-card__art {
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  background: linear-gradient(180deg, #e7dccd 0%, #d8c6af 100%);
  overflow: hidden;
  display: flex;
  align-items: end;
  padding: 18px;
  margin-bottom: 14px;
}
.sb-book-card__art::before {
  content: "Stillbrook Press";
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sb-book-card__meta {
  margin: 0 0 8px;
  color: #7e6c5f;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 800;
}
.sb-book-card__title { margin: 0 0 10px; font-size: 1.55rem; line-height: 1.05; }
.sb-book-card__text { margin: 0 0 16px; color: var(--sb-muted); }
.sb-book-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.sb-feature-box__title,
.sb-page-card__title { margin: 0 0 8px; font-size: 1.28rem; line-height: 1.1; }
.sb-feature-box p,
.sb-page-card p { margin: 0; color: var(--sb-muted); }

.sb-page-header {
  padding: 34px 0 12px;
}
.sb-page-header .entry-title {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3.4vw, 2.8rem);
  line-height: 0.95;
}
.sb-page-header .entry-summary { margin: 0; color: var(--sb-muted); max-width: 42rem; }

.site-footer {
  border-top: 1px solid var(--sb-header-border);
  margin-top: 30px;
  padding: 20px 0 30px;
  color: #6a594d;
  background: var(--sb-header-bg);
}
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer__inner a {
  color: #6a594d;
}

.entry-content,
.page-content,
.post-content {
  background: rgba(255,255,255,0.42);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-radius-xl);
  padding: clamp(18px, 2.5vw, 26px);
  box-shadow: var(--sb-shadow);
}


.entry-content .alignleft,
.page-content .alignleft,
.post-content .alignleft,
.entry-content img.alignleft,
.page-content img.alignleft,
.post-content img.alignleft {
  float: left;
  margin: 0 1.5rem 1rem 0;
  display: inline;
  max-width: min(220px, 42%);
  height: auto;
}

.entry-content .alignright,
.page-content .alignright,
.post-content .alignright,
.entry-content img.alignright,
.page-content img.alignright,
.post-content img.alignright {
  float: right;
  margin: 0 0 1rem 1.5rem;
  display: inline;
  max-width: min(220px, 42%);
  height: auto;
}

.entry-content .aligncenter,
.page-content .aligncenter,
.post-content .aligncenter,
.entry-content img.aligncenter,
.page-content img.aligncenter,
.post-content img.aligncenter {
  display: block;
  margin: 0 auto 1rem;
}

.entry-content::after,
.page-content::after,
.post-content::after {
  content: "";
  display: table;
  clear: both;
}

.entry-content > *:first-child { margin-top: 0; }
.entry-content > *:last-child { margin-bottom: 0; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

@media (max-width: 1024px) {
  .sb-hero__grid,
  .sb-grid--3,
  .sb-grid--2 {
    grid-template-columns: 1fr;
  }

  .primary-navigation { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-header__inner { min-height: 68px; }
  .sb-brand__name { font-size: 1.3rem; }
  .sb-brand__mark { width: 40px; height: 40px; border-radius: 12px; }
  .sb-hero__title { font-size: clamp(2rem, 8vw, 2.8rem); max-width: 12ch; }
  .sb-hero__actions,
  .sb-book-card__actions { flex-direction: column; }
  .sb-button { width: 100%; }
}


/* V4 layout refinements */
.sb-hero--stacked {
  padding: clamp(40px, 6vw, 72px) 0 24px;
}

.sb-hero__content--wide {
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.sb-hero__title--wide {
  max-width: 12.5ch;
  font-size: clamp(3rem, 6vw, 4.8rem);
  line-height: 0.96;
  margin-bottom: 14px;
}

.sb-hero__lede--wide {
  max-width: 40rem;
  font-size: clamp(1.02rem, 1.5vw, 1.16rem);
  margin-bottom: 20px;
}

.sb-featured-book {
  display: grid;
  grid-template-columns: minmax(260px, 350px) minmax(240px, 1fr);
  gap: clamp(22px, 3.6vw, 34px);
  align-items: center;
  margin-top: 34px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--sb-border);
  border-radius: 30px;
  background: rgba(255,255,255,0.62);
  box-shadow: var(--sb-shadow);
}

.sb-featured-book__cover {
  max-width: 320px;
}
.sb-featured-book__media img,
.sb-featured-book__placeholder {
  border: 1px solid var(--sb-frame);
  background: var(--sb-frame-inner);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(34, 26, 21, 0.05);
}

.sb-featured-book__media {
  padding: 10px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(240,233,223,0.48));
  border: 1px solid rgba(34, 26, 21, 0.06);
}

.sb-featured-book__image-link {
  display: block;
}

.sb-featured-book__image-link img {
  width: 100%;
}


.sb-featured-book__cover-inner {
  aspect-ratio: 4 / 5.3;
  border-radius: 22px;
  padding: 22px;
  background: linear-gradient(180deg, #eadfce 0%, #d8c5ab 100%);
  border: 1px solid rgba(34,26,21,0.08);
  box-shadow: 0 18px 40px rgba(34, 26, 21, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sb-featured-book__cover-mark {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.78);
  color: #6d5b4e;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sb-featured-book__cover-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 0.94;
  font-weight: 600;
  color: #241b16;
  max-width: 8ch;
}

.sb-featured-book__cover-author {
  color: #5d4f45;
  font-size: 1rem;
  font-weight: 700;
}

.sb-featured-book__title {
  margin: 0 0 10px;
  max-width: 8ch;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 2.6vw, 2.35rem);
  line-height: 0.98;
}

.sb-featured-book__text {
  max-width: 22rem;
  margin: 0 0 18px;
  color: var(--sb-muted);
}

.sb-download-strip {
  padding: 12px 0 8px;
}

.sb-download-strip__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid var(--sb-border);
  border-radius: 24px;
  background: rgba(255,255,255,0.72);
  box-shadow: var(--sb-shadow);
}

.sb-download-strip__title {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.8rem, 2.8vw, 2.35rem);
  line-height: 0.98;
}

.sb-download-strip__text {
  margin: 0;
  color: var(--sb-muted);
  max-width: 48rem;
}

.sb-download-strip__action {
  flex: 0 0 auto;
}

@media (max-width: 1024px) {
  .sb-featured-book {
    grid-template-columns: 1fr;
  }

  .sb-featured-book__cover {
    max-width: 280px;
  }

  .sb-download-strip__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .sb-hero__title--wide {
    font-size: clamp(2.4rem, 10vw, 3.4rem);
    max-width: 12ch;
  }

  .sb-featured-book {
    padding: 18px;
    border-radius: 22px;
  }

  .sb-download-strip__inner {
    padding: 18px;
    border-radius: 20px;
  }
}

/* V5 homepage + featured book selector */
.sb-hero {
  padding: clamp(52px, 7vw, 86px) 0 28px;
}

.sb-hero__grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 420px);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.sb-hero__content {
  max-width: 680px;
}

.sb-hero__title {
  max-width: 14ch;
  font-size: clamp(3rem, 5.2vw, 4.8rem);
  line-height: 0.96;
  margin-bottom: 14px;
}

.sb-hero__lede {
  max-width: 40rem;
  font-size: clamp(1.02rem, 1.35vw, 1.14rem);
  margin-bottom: 20px;
}

.sb-featured-book {
  display: grid;
  gap: 18px;
  align-items: start;
  padding: 22px;
  margin: 0;
  border: 1px solid var(--sb-border);
  border-radius: 30px;
  background: rgba(255,255,255,0.68);
  box-shadow: var(--sb-shadow);
}

.sb-featured-book__media {
  position: relative;
  width: 100%;
}

.sb-featured-book__image-link,
.sb-featured-book__placeholder {
  display: block;
  text-decoration: none;
}

.sb-featured-book__image,
.sb-featured-book__placeholder {
  width: 100%;
  aspect-ratio: 4 / 5.25;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid rgba(34,26,21,0.08);
  box-shadow: 0 16px 34px rgba(34, 26, 21, 0.08);
}

.sb-featured-book__placeholder {
  padding: 20px;
  background: linear-gradient(180deg, #eadfce 0%, #d8c5ab 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.sb-featured-book__placeholder-mark {
  display: inline-flex;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.82);
  color: #6d5b4e;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sb-featured-book__placeholder-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  line-height: 0.94;
  font-weight: 600;
  color: #241b16;
}

.sb-featured-book__placeholder-author,
.sb-featured-book__author {
  margin: 0;
  color: #6c5a4d;
  font-size: 0.98rem;
  font-weight: 700;
}

.sb-featured-book__title {
  margin: 0 0 6px;
  font-size: clamp(1.8rem, 2.4vw, 2.4rem);
  line-height: 0.98;
}

.sb-featured-book__text {
  margin: 10px 0 16px;
  color: var(--sb-muted);
}

.sb-download-strip {
  padding: 18px 0 10px;
}

.sb-download-strip__inner {
  align-items: center;
}

@media (max-width: 1024px) {
  .sb-hero__grid {
    grid-template-columns: 1fr;
  }

  .sb-featured-book {
    grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
    align-items: center;
  }
}

@media (max-width: 720px) {
  .sb-featured-book {
    grid-template-columns: 1fr;
  }

  .sb-hero__title {
    max-width: 12ch;
  }
}

@media (max-width: 640px) {
  .sb-hero {
    padding-top: 34px;
  }

  .sb-hero__title {
    font-size: clamp(2.5rem, 10vw, 3.2rem);
    max-width: 11ch;
  }
}


/* V6 homepage refinements */
.sb-hero--featured {
  padding: clamp(44px, 6vw, 78px) 0 26px;
}

.sb-hero__grid--featured {
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.95fr);
  gap: clamp(34px, 5vw, 70px);
  align-items: center;
}

.sb-hero__content--featured {
  max-width: 640px;
}

.sb-hero__title--featured {
  max-width: 8.6ch;
  font-size: clamp(2.9rem, 5.2vw, 4.9rem);
  line-height: 0.92;
  margin: 18px 0 14px;
}

.sb-hero__lede--featured {
  max-width: 34rem;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  margin-bottom: 20px;
}

.sb-featured-book-wrap {
  width: 100%;
}

.sb-section-kicker--featured {
  margin: 0 0 10px;
}

.sb-featured-book--hero {
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 0;
  padding: 24px;
  border-radius: 26px;
  background: rgba(255,255,255,0.7);
}

.sb-featured-book__body--hero {
  min-width: 0;
}

.sb-featured-book__image-link,
.sb-featured-book__placeholder {
  border-radius: 18px;
}

.sb-featured-book__title {
  margin: 0 0 8px;
  font-size: clamp(2rem, 3.1vw, 2.6rem);
  line-height: 0.98;
}

.sb-featured-book__author {
  margin: 0 0 12px;
  font-size: 0.98rem;
  font-weight: 700;
  color: #756356;
}

.sb-featured-book__text {
  margin: 0 0 18px;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.65;
}

@media (max-width: 1024px) {
  .sb-hero__grid--featured {
    grid-template-columns: 1fr;
  }

  .sb-hero__content--featured {
    max-width: 760px;
  }

  .sb-hero__title--featured {
    max-width: 10ch;
  }

  .sb-featured-book--hero {
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .sb-hero--featured {
    padding-top: 30px;
  }

  .sb-hero__title--featured {
    font-size: clamp(2.4rem, 10vw, 3.5rem);
    max-width: 9ch;
  }

  .sb-featured-book--hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }
}

.sb-hero__content--featured {
  max-width: 36rem;
}

.sb-hero__title--featured {
  max-width: 7.8ch;
}

.sb-hero__lede--featured {
  max-width: 31rem;
}

.sb-featured-book__body--hero {
  padding-right: 6px;
}

.sb-section-kicker--featured {
  margin-bottom: 12px;
}

.sb-download-strip__text {
  max-width: 44rem;
}

@media (max-width: 1024px) {
  .sb-featured-book__title {
    max-width: none;
  }

  .sb-featured-book__text {
    max-width: 38rem;
  }
}

/* V7 final refinements */
.sb-brand__name {
  font-size: 1.4rem;
}

.sb-hero__grid--featured {
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  gap: clamp(34px, 4.8vw, 64px);
}

.sb-hero__title--featured {
  max-width: 7.2ch;
  font-size: clamp(2.45rem, 4vw, 3.75rem);
  line-height: 0.94;
}

.sb-hero__lede--featured {
  max-width: 29rem;
  font-size: clamp(0.98rem, 1.05vw, 1.03rem);
}

.sb-featured-book--hero {
  grid-template-columns: minmax(250px, 300px) minmax(220px, 1fr);
  align-items: center;
}

.sb-featured-book__media {
  padding: 12px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.54), rgba(241,234,225,0.56));
  border: 1px solid rgba(34, 26, 21, 0.07);
}

.sb-featured-book__image-link,
.sb-featured-book__placeholder,
.sb-featured-book__image {
  border-radius: 16px;
}

.sb-featured-book__image,
.sb-featured-book__placeholder,
.sb-featured-book__media img {
  border: 1px solid var(--sb-frame);
  background: var(--sb-frame-inner);
  box-shadow: 0 10px 26px rgba(34, 26, 21, 0.05);
}

.sb-featured-book__title {
  max-width: 7ch;
  font-size: clamp(1.7rem, 2.2vw, 2.2rem);
}

.sb-featured-book__text {
  max-width: 18rem;
  font-size: 0.98rem;
}

.sb-download-strip__title {
  max-width: 13ch;
}

.sb-download-strip__text {
  max-width: 36rem;
}

@media (max-width: 1024px) {
  .sb-hero__grid--featured {
    grid-template-columns: 1fr;
  }

  .sb-hero__content--featured,
  .sb-hero__lede--featured {
    max-width: 42rem;
  }

  .sb-hero__title--featured {
    max-width: 9ch;
  }

  .sb-featured-book--hero {
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  }

  .sb-featured-book__title,
  .sb-featured-book__text {
    max-width: none;
  }
}

@media (max-width: 720px) {
  .sb-hero__title--featured {
    font-size: clamp(2.2rem, 9vw, 3.1rem);
  }

  .sb-featured-book--hero {
    grid-template-columns: 1fr;
  }
}


/* V8 featured book card refinements */
.sb-featured-book {
  background: #fff;
  grid-template-columns: minmax(250px, 310px) minmax(250px, 1fr);
  gap: 28px;
  padding: 26px 34px 26px 24px;
}

.sb-featured-book__media {
  padding: 0;
  background: #fff;
  border: 0;
  border-radius: 0;
}

.sb-featured-book__image-link img,
.sb-featured-book__placeholder {
  border: 2px solid #d6cabd;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(34, 26, 21, 0.04);
}

.sb-featured-book__body--hero {
  padding-right: 18px;
}

.sb-featured-book__title {
  max-width: 9ch;
  margin-bottom: 10px;
}

.sb-featured-book__text {
  max-width: 18rem;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .sb-featured-book {
    padding-right: 24px;
  }

  .sb-featured-book__body--hero {
    padding-right: 0;
  }
}

@media (max-width: 720px) {
  .sb-featured-book {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .sb-featured-book__image-link img,
  .sb-featured-book__placeholder {
    border-width: 2px;
  }
}

/* V8.1 header stability and colour refinements */
.site-header {
  top: 0;
  min-height: 88px;
  background: rgba(242, 236, 227, 0.96);
  border-bottom: 1px solid rgba(74, 60, 50, 0.12);
  box-shadow: 0 1px 0 rgba(255,255,255,0.55) inset;
}

.site-header__inner {
  min-height: 88px;
  padding: 14px 0;
  align-items: center;
}

body.admin-bar .site-header {
  top: 32px;
}

.sb-brand__mark {
  background: #352218;
}

.primary-navigation a {
  color: #5a4b41;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item > a {
  color: #241a14;
}

.sb-header-actions .sb-button--secondary {
  background: rgba(255,255,255,0.62);
  border-color: rgba(74, 60, 50, 0.12);
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 640px) {
  .site-header {
    min-height: 76px;
  }

  .site-header__inner {
    min-height: 76px;
    padding: 10px 0;
  }
}


/* V8.2 sticky header stability and subtle hue separation */
:root {
  --sb-admin-offset: 0px;
  --sb-header-bg: rgba(239, 233, 223, 0.97);
  --sb-header-border: rgba(74, 60, 50, 0.14);
}

body.admin-bar {
  --sb-admin-offset: 32px;
}

.site-header {
  position: sticky;
  top: var(--sb-admin-offset);
  min-height: auto;
  overflow: visible;
  background: var(--sb-header-bg);
  border-bottom: 1px solid var(--sb-header-border);
  box-shadow: 0 8px 20px rgba(34, 26, 21, 0.04);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.site-header__inner {
  min-height: 90px;
  padding: 16px 0;
  align-items: center;
}

.sb-brand {
  min-height: 58px;
}

.sb-brand__mark {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #342116;
  flex: 0 0 56px;
}

.sb-brand__eyebrow {
  color: #7a685b;
}

.primary-navigation a {
  color: #5c4c41;
}

.sb-header-actions .sb-button--secondary {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(74, 60, 50, 0.14);
}

@media (max-width: 782px) {
  body.admin-bar {
    --sb-admin-offset: 46px;
  }
}

@media (max-width: 640px) {
  .site-header__inner {
    min-height: 80px;
    padding: 12px 0;
  }

  .sb-brand__mark {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    flex-basis: 44px;
  }
}


/* V8.3 featured card text-lane fix */
.sb-featured-book--hero {
  grid-template-columns: minmax(230px, 46%) minmax(240px, 54%);
  gap: 24px;
}

.sb-featured-book__media {
  max-width: 100%;
}

.sb-featured-book__body,
.sb-featured-book__body--hero {
  min-width: 0;
}

.sb-featured-book__body--hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 0 30px 0 0;
}

.sb-featured-book__title {
  max-width: 8.5ch;
}

.sb-featured-book__text {
  max-width: 17.5rem;
}

.sb-featured-book__body--hero .sb-book-card__actions {
  width: 100%;
}

@media (max-width: 1180px) {
  .sb-featured-book--hero {
    grid-template-columns: minmax(220px, 44%) minmax(230px, 56%);
  }

  .sb-featured-book__body--hero {
    padding-right: 22px;
  }
}

@media (max-width: 1024px) {
  .sb-featured-book--hero {
    grid-template-columns: minmax(220px, 300px) minmax(0, 1fr);
  }

  .sb-featured-book__body--hero {
    padding-right: 0;
  }

  .sb-featured-book__text {
    max-width: 20rem;
  }
}

@media (max-width: 720px) {
  .sb-featured-book--hero {
    grid-template-columns: 1fr;
  }

  .sb-featured-book__title,
  .sb-featured-book__text {
    max-width: none;
  }
}


/* V8.5 US trade featured cover + subtle 3D treatment */
.sb-featured-book--hero {
  grid-template-columns: minmax(220px, 270px) minmax(250px, 1fr);
  gap: 38px;
  padding: 28px 40px 28px 28px;
  align-items: center;
}

.sb-featured-book__media {
  min-width: 0;
}

.sb-featured-book__image-link,
.sb-featured-book__placeholder {
  position: relative;
  display: block;
  width: min(100%, 260px);
  margin: 0 auto;
  border-radius: 0;
  transform: perspective(1400px) rotateY(-7deg) rotateX(0.6deg);
  transform-origin: center left;
  box-shadow: 16px 18px 34px rgba(34, 26, 21, 0.10);
}

.sb-featured-book__image-link::before,
.sb-featured-book__placeholder::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: -10px;
  width: 10px;
  border-radius: 0;
  background: linear-gradient(180deg, #d7cabd 0%, #bba995 100%);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.5), inset 1px 0 0 rgba(54, 39, 28, 0.08);
}

.sb-featured-book__image-link::after,
.sb-featured-book__placeholder::after {
  content: "";
  position: absolute;
  inset: 8px -14px 8px 14px;
  z-index: -1;
  border-radius: 0;
  background: rgba(84, 63, 46, 0.07);
  filter: blur(8px);
}

.sb-featured-book__image-link img,
.sb-featured-book__placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #fff;
  border: 2px solid #cfc2b4;
  border-radius: 0;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.9);
}

.sb-featured-book__body--hero {
  min-width: 0;
  padding-right: 28px;
}

.sb-featured-book__title {
  max-width: 7.5ch;
}

.sb-featured-book__text {
  max-width: 17rem;
}

@media (max-width: 1024px) {
  .sb-featured-book--hero {
    grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
    gap: 32px;
    padding-right: 28px;
  }

  .sb-featured-book__body--hero {
    padding-right: 8px;
  }
}

@media (max-width: 720px) {
  .sb-featured-book--hero {
    grid-template-columns: 1fr;
    padding: 22px;
    gap: 24px;
  }

  .sb-featured-book__image-link,
  .sb-featured-book__placeholder {
    width: min(100%, 240px);
    transform: none;
    box-shadow: 10px 14px 24px rgba(34, 26, 21, 0.08);
  }

  .sb-featured-book__image-link::before,
  .sb-featured-book__placeholder::before {
    left: -7px;
    width: 7px;
  }

  .sb-featured-book__image-link::after,
  .sb-featured-book__placeholder::after {
    inset: 8px -8px 8px 10px;
  }

  .sb-featured-book__body--hero {
    padding-right: 0;
  }
}


/* V8.6 featured book: flatter cover treatment + editable blurb support */
.sb-featured-book--hero {
  grid-template-columns: minmax(230px, 255px) minmax(270px, 1fr);
  gap: 34px;
  padding: 28px 34px 28px 28px;
  align-items: center;
}

.sb-featured-book__image-link,
.sb-featured-book__placeholder {
  width: min(100%, 248px);
  transform: none;
  border-radius: 18px;
  box-shadow: 0 14px 28px rgba(34, 26, 21, 0.08);
}

.sb-featured-book__image-link::before,
.sb-featured-book__placeholder::before,
.sb-featured-book__image-link::after,
.sb-featured-book__placeholder::after {
  content: none;
  display: none;
}

.sb-featured-book__image-link img,
.sb-featured-book__placeholder {
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 2px solid #ccbfb1;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 8px rgba(255,255,255,0.98), 0 14px 30px rgba(34, 26, 21, 0.06);
}

.sb-featured-book__body--hero {
  padding-right: 20px;
}

.sb-featured-book__title {
  max-width: 8.2ch;
}

.sb-featured-book__text {
  max-width: 16.5rem;
}

@media (max-width: 1024px) {
  .sb-featured-book--hero {
    grid-template-columns: minmax(220px, 245px) minmax(0, 1fr);
    gap: 28px;
    padding-right: 26px;
  }

  .sb-featured-book__body--hero {
    padding-right: 8px;
  }
}

@media (max-width: 720px) {
  .sb-featured-book--hero {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 22px;
  }

  .sb-featured-book__image-link,
  .sb-featured-book__placeholder {
    width: min(100%, 240px);
    box-shadow: none;
  }

  .sb-featured-book__image-link img,
  .sb-featured-book__placeholder {
    box-shadow: 0 0 0 6px rgba(255,255,255,0.98), 0 10px 18px rgba(34, 26, 21, 0.06);
  }

  .sb-featured-book__body--hero {
    padding-right: 0;
  }
}


/* V8.6.3 homepage tightening */
.sb-hero--featured {
  padding: 18px 0 18px;
}

.sb-hero__content--featured {
  display: none;
}

.sb-hero__grid--featured {
  grid-template-columns: 1fr;
  gap: 0;
}

.sb-featured-book-wrap {
  max-width: 780px;
}

.sb-section-kicker--featured {
  margin: 0 0 14px;
}

.sb-featured-book--hero {
  width: fit-content;
  max-width: 100%;
  grid-template-columns: minmax(220px, 248px) minmax(0, 360px);
  gap: 28px;
  padding: 24px 28px 24px 24px;
  align-items: center;
}

.sb-featured-book__body--hero {
  padding-right: 0;
}

.sb-featured-book__title {
  max-width: 9ch;
}

.sb-featured-book__text {
  max-width: 22rem;
}

@media (max-width: 900px) {
  .sb-featured-book--hero {
    width: 100%;
    grid-template-columns: minmax(210px, 240px) minmax(0, 1fr);
  }

  .sb-featured-book__text {
    max-width: 28rem;
  }
}

@media (max-width: 720px) {
  .sb-hero--featured {
    padding-top: 10px;
  }

  .sb-featured-book-wrap {
    max-width: none;
  }

  .sb-featured-book--hero {
    width: 100%;
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .sb-featured-book__title,
  .sb-featured-book__text {
    max-width: none;
  }
}


/* 8.7.0 homepage rebuild */
.sb-home-intro {
  padding: clamp(26px, 4vw, 42px) 0 20px;
}

.sb-home-intro__panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
  gap: 28px;
  align-items: stretch;
}

.sb-home-intro__copy,
.sb-home-intro__cards {
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--sb-border);
  border-radius: 30px;
  background: rgba(255,255,255,0.62);
  box-shadow: var(--sb-shadow);
}

.sb-home-intro__kicker { margin-bottom: 10px; }
.sb-home-intro__title {
  margin: 0 0 14px;
  max-width: 14ch;
  font-size: clamp(2.6rem, 4.8vw, 4.6rem);
  line-height: 0.92;
  letter-spacing: -0.03em;
}
.sb-home-intro__text {
  max-width: 38rem;
  margin: 0 0 20px;
  color: var(--sb-muted);
  font-size: clamp(1rem, 1.25vw, 1.14rem);
}
.sb-home-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sb-home-intro__cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(250,246,239,0.8));
}

.sb-imprint-card {
  padding: 18px 18px 16px;
  border: 1px solid rgba(34, 26, 21, 0.08);
  border-radius: 22px;
  background: rgba(255,255,255,0.72);
}
.sb-imprint-card__label {
  margin: 0 0 8px;
  color: #7c6a5d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.sb-imprint-card__title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  line-height: 1;
}
.sb-imprint-card__text {
  margin: 0;
  color: var(--sb-muted);
}

.sb-featured-section {
  padding: 8px 0 24px;
}
.sb-featured-section__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.sb-featured-section__title {
  margin: 0;
  font-size: clamp(1.7rem, 2.4vw, 2.35rem);
  line-height: 1;
}
.sb-featured-section__link {
  color: var(--sb-muted);
  font-weight: 700;
  text-decoration: none;
}

.sb-featured-shelf {
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 46px);
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--sb-border);
  border-radius: 30px;
  background: rgba(255,255,255,0.68);
  box-shadow: var(--sb-shadow);
}

.sb-featured-shelf__media {
  max-width: 320px;
}
.sb-featured-shelf__image-link,
.sb-featured-shelf__image-link img,
.sb-featured-shelf__media img {
  display: block;
  width: 100%;
}
.sb-featured-shelf__image-link img,
.sb-featured-shelf__media img,
.sb-featured-book__placeholder {
  border: 1px solid var(--sb-frame);
  border-radius: 24px;
  box-shadow: 0 10px 24px rgba(34, 26, 21, 0.06);
}
.sb-featured-shelf__eyebrow {
  margin: 0 0 10px;
  color: #7c6a5d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.sb-featured-shelf__title {
  margin: 0 0 10px;
  max-width: 16ch;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 0.94;
}
.sb-featured-shelf__author {
  margin: 0 0 10px;
  color: #7a6658;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}
.sb-featured-shelf__text {
  max-width: 34rem;
  margin: 0 0 18px;
  color: var(--sb-muted);
  font-size: clamp(1rem, 1.15vw, 1.12rem);
}

.sb-download-strip--publisher {
  padding-top: 0;
}

@media (max-width: 1024px) {
  .sb-home-intro__panel,
  .sb-featured-shelf {
    grid-template-columns: 1fr;
  }
  .sb-featured-shelf__media {
    max-width: 300px;
  }
}

@media (max-width: 640px) {
  .sb-home-intro__title,
  .sb-featured-shelf__title {
    max-width: none;
  }
  .sb-featured-section__header {
    align-items: start;
    flex-direction: column;
  }
}


/* 8.7.1 featured book / plugin-data alignment */
.sb-featured-shelf {
  grid-template-columns: minmax(250px, 320px) minmax(340px, 560px);
  justify-content: start;
}

.sb-featured-shelf__media {
  max-width: 300px;
}

.sb-book-mockup {
  position: relative;
  display: inline-block;
  width: min(100%, 280px);
  padding-right: 18px;
  padding-bottom: 10px;
}

.sb-book-mockup::before {
  content: "";
  position: absolute;
  inset: 10px 0 2px 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(43, 29, 20, 0.16), rgba(43, 29, 20, 0.06));
  filter: blur(10px);
  z-index: 0;
}

.sb-book-mockup::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 4px;
  width: 14px;
  height: calc(100% - 26px);
  border-radius: 0 16px 16px 0;
  background: linear-gradient(90deg, rgba(181, 168, 154, 0.92) 0%, rgba(244, 239, 232, 0.98) 55%, rgba(203, 192, 180, 0.92) 100%);
  box-shadow: inset 1px 0 0 rgba(255,255,255,0.7), inset -1px 0 0 rgba(105, 87, 72, 0.12);
  z-index: 1;
}

.sb-book-mockup img,
.sb-book-mockup.sb-featured-book__placeholder {
  position: relative;
  z-index: 2;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 16px 30px rgba(28, 20, 15, 0.14);
}

.sb-featured-shelf__subtitle {
  margin: 0 0 10px;
  color: #6f5b4d;
  font-style: italic;
  font-size: 1.02rem;
}

@media (max-width: 1024px) {
  .sb-featured-shelf {
    grid-template-columns: 1fr;
  }
}


/* 8.7.3 square book corners + de-duplicated featured copy */
.sb-book-mockup::before { border-radius: 0; }
.sb-book-mockup::after { border-radius: 0; }
.sb-book-mockup img,
.sb-book-mockup.sb-featured-book__placeholder { border-radius: 0; }


/* 8.7.5 featured blurb box */
.sb-featured-shelf__body {
  display: grid;
  gap: 20px;
}

.sb-featured-shelf__body--with-blurb {
  grid-template-columns: minmax(280px, 1.2fr) minmax(220px, 0.8fr);
  align-items: start;
}

.sb-featured-shelf__main {
  min-width: 0;
}

.sb-featured-shelf__blurb-box {
  align-self: stretch;
  padding: 18px 18px 16px;
  border: 1px solid rgba(34, 26, 21, 0.10);
  background: rgba(255,255,255,0.74);
  box-shadow: 0 10px 24px rgba(34, 26, 21, 0.04);
}

.sb-featured-shelf__blurb-label {
  margin: 0 0 8px;
  color: #7c6a5d;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sb-featured-shelf__blurb-box .sb-featured-shelf__text {
  margin: 0;
  max-width: none;
}

@media (max-width: 1024px) {
  .sb-featured-shelf__body--with-blurb {
    grid-template-columns: 1fr;
  }
}


/* 8.7.6 white surface cleanup + borderless excerpt box */
:root {
  --sb-bg: #ffffff;
  --sb-surface: #ffffff;
  --sb-card: #ffffff;
  --sb-frame-inner: #ffffff;
}

body {
  background: #ffffff;
}

.site-header {
  background: rgba(248, 245, 239, 0.96);
}

.sb-home-intro__panel,
.sb-imprint-card,
.sb-download-strip--publisher,
.sb-featured-shelf,
.sb-featured-shelf__blurb-box,
.sb-featured-book,
.sb-featured-book__media,
.sb-featured-book__image-link img,
.sb-featured-book__placeholder,
.sb-book-card,
.sb-callout,
.entry-card,
.page .entry-content,
.single .entry-content,
.archive .entry-content {
  background: #ffffff;
}

.sb-featured-shelf__blurb-box {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.sb-featured-shelf__blurb-label {
  display: none;
}


/* 8.8.0 book and download front-end templates */
.sb-catalog-card {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  padding: 20px;
  border: 1px solid var(--sb-border);
  background: #ffffff;
  box-shadow: var(--sb-shadow);
}

.sb-catalog-card__media {
  min-width: 0;
}

.sb-catalog-card__media .sb-book-mockup {
  width: 100%;
  max-width: 180px;
}

.sb-catalog-card__media img {
  width: 100%;
}

.sb-catalog-card__placeholder {
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1px solid var(--sb-frame);
  background: #fff;
  color: #6d5b4e;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
}

.sb-catalog-card__kicker,
.sb-meta-list__label {
  margin: 0 0 8px;
  color: #7c6a5d;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sb-catalog-card__title {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.6rem, 2.4vw, 2.25rem);
  line-height: 0.98;
}

.sb-catalog-card__title a {
  text-decoration: none;
}

.sb-catalog-card__subtitle {
  margin: 0 0 8px;
  color: #6f5b4d;
  font-style: italic;
}

.sb-catalog-card__text {
  margin: 0 0 16px;
  color: var(--sb-muted);
}

.sb-book-detail {
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.sb-book-detail__cover .sb-book-mockup {
  width: min(100%, 300px);
}

.sb-book-detail__cover img {
  width: 100%;
}

.sb-book-detail__panel,
.sb-download-panel,
.sb-related-panel {
  padding: clamp(20px, 2.8vw, 30px);
  border: 1px solid var(--sb-border);
  background: #ffffff;
  box-shadow: var(--sb-shadow);
}

.sb-book-detail__title,
.sb-download-panel__title,
.sb-related-panel__title {
  margin: 0 0 10px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 3.6vw, 3.4rem);
  line-height: 0.94;
}

.sb-book-detail__subtitle,
.sb-download-panel__subtitle {
  margin: 0 0 12px;
  color: #6f5b4d;
  font-style: italic;
  font-size: 1.08rem;
}

.sb-book-detail__author {
  margin: 0 0 14px;
  color: #7a6658;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.sb-meta-list {
  display: grid;
  gap: 10px;
  margin: 18px 0;
  padding: 16px 0;
  border-top: 1px solid var(--sb-border);
  border-bottom: 1px solid var(--sb-border);
}

.sb-meta-list__item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 14px;
}

.sb-meta-list__value {
  color: var(--sb-muted);
}

.sb-template-section {
  padding: 28px 0 0;
}

.sb-download-card {
  display: grid;
  gap: 10px;
  padding: 20px;
  border: 1px solid var(--sb-border);
  background: #ffffff;
  box-shadow: var(--sb-shadow);
}

.sb-download-card__title {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  line-height: 1;
}

.sb-download-card__title a {
  text-decoration: none;
}

.sb-download-card__text {
  margin: 0;
  color: var(--sb-muted);
}

.sb-download-panel__actions,
.sb-book-detail__actions,
.sb-download-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.sb-related-book {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 18px;
}

.sb-related-book img {
  width: 100%;
  border: 1px solid var(--sb-frame);
}

.sb-template-note {
  margin: 14px 0 0;
  color: var(--sb-muted);
  font-size: 0.98rem;
}

@media (max-width: 860px) {
  .sb-catalog-card,
  .sb-book-detail,
  .sb-related-book {
    grid-template-columns: 1fr;
  }

  .sb-catalog-card__media .sb-book-mockup,
  .sb-book-detail__cover .sb-book-mockup {
    max-width: 260px;
  }

  .sb-meta-list__item {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

@media (max-width: 640px) {
  .sb-catalog-card,
  .sb-book-detail__panel,
  .sb-download-panel,
  .sb-related-panel,
  .sb-download-card {
    padding: 18px;
  }
}


/* 8.8.5 books archive polish */
.sb-archive-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.75fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: stretch;
  margin: 22px 0 30px;
}

.sb-archive-intro__main,
.sb-archive-intro__side {
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--sb-border);
  background: #ffffff;
  box-shadow: var(--sb-shadow);
}

.sb-archive-intro__main {
  border-radius: var(--sb-radius-xl);
}

.sb-archive-intro__side {
  border-radius: var(--sb-radius-lg);
}

.sb-archive-intro__title {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 0.92;
}

.sb-archive-intro__text {
  margin: 0;
  max-width: 48rem;
  color: var(--sb-muted);
}

.sb-archive-intro__text + .sb-archive-intro__text {
  margin-top: 12px;
}

.sb-archive-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.sb-archive-intro__list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sb-archive-intro__list li {
  padding: 12px 14px;
  border: 1px solid rgba(34, 26, 21, 0.09);
  border-radius: 14px;
  background: rgba(251, 248, 243, 0.72);
  color: var(--sb-muted);
}

.sb-archive-intro__list strong {
  display: block;
  margin-bottom: 2px;
  color: var(--sb-text);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.22rem;
  line-height: 1.05;
}

.sb-books-grid--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 980px;
}

.sb-books-grid--single .sb-catalog-card {
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
  gap: clamp(22px, 4vw, 44px);
  padding: clamp(22px, 3vw, 34px);
  border-radius: var(--sb-radius-xl);
}

.sb-books-grid--single .sb-catalog-card__media .sb-book-mockup {
  max-width: 240px;
}

.sb-catalog-card {
  border-radius: var(--sb-radius-lg);
}

@media (max-width: 900px) {
  .sb-archive-intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .sb-books-grid--single .sb-catalog-card {
    grid-template-columns: 1fr;
  }
}


/* 8.8.6 single download page polish */
.sb-download-page-header {
  max-width: 980px;
}

.sb-download-landing {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: clamp(22px, 4vw, 46px);
  align-items: stretch;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-radius-xl);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(251,248,243,0.88));
  box-shadow: var(--sb-shadow);
}

.sb-download-landing__main {
  align-self: center;
}

.sb-download-landing__title {
  margin: 0 0 12px;
  max-width: 12ch;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.35rem, 5vw, 4.45rem);
  line-height: 0.9;
}

.sb-download-landing__subtitle {
  margin: 0;
  max-width: 44rem;
  color: #6f5b4d;
  font-style: italic;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
}

.sb-download-landing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.sb-download-landing__note {
  display: inline-flex;
  margin: 18px 0 0;
  padding: 10px 13px;
  border: 1px solid rgba(34, 26, 21, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--sb-muted);
  font-size: 0.95rem;
}

.sb-download-landing__side {
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid rgba(34, 26, 21, 0.09);
  border-radius: var(--sb-radius-lg);
  background: rgba(255, 255, 255, 0.78);
}

.sb-download-benefits {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.sb-download-benefits li {
  padding: 12px 0 0;
  border-top: 1px solid rgba(34, 26, 21, 0.08);
}

.sb-download-benefits li:first-child {
  padding-top: 0;
  border-top: 0;
}

.sb-download-benefits strong {
  display: block;
  margin-bottom: 2px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.3rem;
  line-height: 1.05;
}

.sb-download-benefits span {
  display: block;
  color: var(--sb-muted);
}

.sb-download-book-section {
  padding: 28px 0 0;
}

.sb-download-book-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(115px, 170px);
  gap: clamp(20px, 3vw, 36px);
  align-items: center;
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--sb-border);
  border-radius: var(--sb-radius-xl);
  background: #ffffff;
  box-shadow: var(--sb-shadow);
}

.sb-download-book-card__title {
  margin: 0 0 8px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 3.8vw, 3.6rem);
  line-height: 0.92;
}

.sb-download-book-card__subtitle {
  margin: 0 0 10px;
  color: #6f5b4d;
  font-style: italic;
  font-size: 1.08rem;
}

.sb-download-book-card__text {
  margin: 0;
  max-width: 54rem;
  color: var(--sb-muted);
}

.sb-download-book-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.sb-download-book-card__cover {
  justify-self: end;
  width: min(100%, 150px);
}

.sb-download-book-card__cover img {
  width: 100%;
}

@media (max-width: 900px) {
  .sb-download-landing,
  .sb-download-book-card {
    grid-template-columns: 1fr;
  }

  .sb-download-landing__title {
    max-width: none;
  }

  .sb-download-book-card__cover {
    justify-self: start;
    order: -1;
    width: 140px;
  }
}

@media (max-width: 640px) {
  .sb-download-landing,
  .sb-download-book-card {
    padding: 20px;
  }

  .sb-download-landing__note {
    display: block;
    border-radius: 16px;
  }
}


/* 8.8.8 mobile navigation and homepage fit patch */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 760px) {
  :root {
    --sb-container: min(100% - 24px, 1120px);
  }

  .site-header {
    overflow: visible;
  }

  .site-header__inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-height: auto;
    padding: 10px 0 9px;
  }

  .sb-brand {
    min-width: 0;
    min-height: auto;
    gap: 10px;
  }

  .sb-brand__mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 13px;
  }

  .sb-brand__eyebrow {
    font-size: 0.58rem;
    letter-spacing: 0.2em;
  }

  .sb-brand__name {
    max-width: 11rem;
    font-size: clamp(1.08rem, 6vw, 1.42rem);
    line-height: 0.92;
    white-space: normal;
  }

  .sb-header-actions {
    display: none;
  }

  .primary-navigation {
    display: block;
    width: 100%;
    overflow-x: auto;
    padding: 2px 0 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .primary-navigation::-webkit-scrollbar {
    display: none;
  }

  .primary-navigation .menu,
  .primary-navigation ul {
    display: flex;
    align-items: center;
    gap: 8px;
    width: max-content;
    min-width: 100%;
    margin: 0;
    padding: 0 0 2px;
  }

  .primary-navigation li {
    flex: 0 0 auto;
  }

  .primary-navigation a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid rgba(74, 60, 50, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.68);
    color: #4c3d34;
    font-size: 0.88rem;
    line-height: 1;
    white-space: nowrap;
  }

  .primary-navigation a:hover,
  .primary-navigation a:focus-visible,
  .primary-navigation .current-menu-item > a {
    background: #ffffff;
    color: var(--sb-text);
    border-color: rgba(74, 60, 50, 0.24);
  }

  .sb-featured-section {
    padding-top: 18px;
  }

  .sb-featured-section__header {
    gap: 8px;
    margin-bottom: 12px;
  }

  .sb-featured-section__title {
    max-width: 14rem;
    font-size: clamp(1.65rem, 8vw, 2.15rem);
    line-height: 1.02;
  }

  .sb-featured-section__link {
    font-size: 0.95rem;
  }

  .sb-featured-shelf,
  .sb-home-intro__copy,
  .sb-home-intro__cards,
  .sb-download-strip--publisher {
    border-radius: 24px;
  }

  .sb-featured-shelf {
    padding: 18px;
    gap: 18px;
  }

  .sb-book-mockup {
    width: min(100%, 226px);
  }

  .sb-featured-shelf__title {
    font-size: clamp(2.1rem, 11vw, 3rem);
    line-height: 0.94;
  }

  .sb-featured-shelf__text {
    font-size: 1rem;
  }

  .sb-home-intro {
    padding-top: 18px;
  }

  .sb-home-intro__panel {
    gap: 18px;
  }

  .sb-home-intro__copy,
  .sb-home-intro__cards {
    padding: 22px;
  }

  .sb-home-intro__title {
    font-size: clamp(2.25rem, 12vw, 3.35rem);
    line-height: 0.94;
  }

  .sb-imprint-card {
    padding: 18px;
  }

  .sb-download-strip__inner {
    gap: 18px;
  }
}

@media (max-width: 420px) {
  .sb-brand__name {
    max-width: 9.8rem;
    font-size: 1.18rem;
  }

  .primary-navigation a {
    padding: 0 10px;
    font-size: 0.84rem;
  }

  .sb-featured-section__title {
    max-width: 12rem;
  }
}
