@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@600;700;800&family=Nunito:wght@400;700;800;900&display=swap");

:root {
  --color-cream: #f9f4e8;
  --color-paper: #fffdf7;
  --color-paper-warm: #fff0cc;
  --color-navy: #0e2a66;
  --color-blue: #4a90e2;
  --color-sky: #9dd4ff;
  --color-coral: #f26a5a;
  --color-red: #cf3f37;
  --color-green: #6bbf73;
  --color-yellow: #f2c94c;
  --color-gold: #e9c46a;
  --color-lavender: #d8c6f2;
  --color-ink-soft: #13294b;
  --color-border: #ead7ae;
  --shadow-card: 0 18px 42px rgba(43, 58, 82, 0.12);
  --shadow-sticker: 0 10px 0 rgba(21, 54, 95, 0.08), 0 18px 34px rgba(21, 54, 95, 0.14);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --sidebar-width: 212px;
  --font-display: "Baloo 2", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --font-body: "Nunito", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--color-navy);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12px 12px, rgba(21, 54, 95, 0.035) 1px, transparent 1px),
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 240, 204, 0.5)),
    var(--color-cream);
  background-size: 24px 24px, auto, auto;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.32;
  background-image: url("assets/textures/paper-texture.svg");
}

a {
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 20;
  padding: 10px 14px;
  color: #fff;
  background: var(--color-navy);
  border-radius: 999px;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 0 22px 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  background: rgba(255, 253, 247, 0.92);
  border-right: 2px solid rgba(234, 215, 174, 0.85);
  box-shadow: 12px 0 36px rgba(21, 54, 95, 0.08);
}

.nav-toggle {
  display: none;
}

.site-sidebar::-webkit-scrollbar {
  display: none;
}

.brand {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: auto;
}

.brand-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 900;
  background: var(--color-coral);
  border: 3px solid #fff;
  border-radius: 18px;
  box-shadow: var(--shadow-sticker);
  transform: rotate(-4deg);
}

.brand-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 900;
}

.brand-tagline {
  display: block;
  max-width: 180px;
  margin-top: 5px;
  color: var(--color-ink-soft);
  font-size: 0.85rem;
  line-height: 1.35;
}

.nav-toggle {
  display: none;
}

.site-nav {
  display: grid;
  gap: 7px;
}

.site-nav a {
  padding: 10px 12px;
  font-weight: 800;
  text-decoration: none;
  border-radius: 14px;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--color-navy);
  outline: 0;
  background: var(--color-paper-warm);
}

.sidebar-cta {
  margin-top: auto;
  padding: 18px;
  background: #fff;
  border: 2px dashed var(--color-yellow);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.sidebar-cta img {
  display: block;
  margin: -8px auto 8px;
}

.sidebar-cta p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.35;
}

.page-shell {
  width: min(1180px, calc(100% - var(--sidebar-width)));
  margin-left: var(--sidebar-width);
  padding: 34px clamp(18px, 3.2vw, 52px) 56px;
}

.section-band,
.content-section {
  position: relative;
  margin-bottom: 34px;
}

.hero {
  min-height: min(720px, calc(100vh - 68px));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  gap: clamp(26px, 5vw, 68px);
  align-items: center;
  padding: clamp(34px, 6vw, 72px);
  overflow: hidden;
  background:
    linear-gradient(125deg, rgba(255, 253, 247, 0.94), rgba(255, 240, 204, 0.86)),
    var(--color-paper);
  border: 2px solid var(--color-border);
  border-radius: 32px;
  box-shadow: var(--shadow-card);
}

.hero::after {
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 270px;
  height: 270px;
  content: "";
  background: repeating-linear-gradient(-18deg, rgba(47, 119, 189, 0.12) 0 12px, transparent 12px 24px);
  border-radius: 48% 52% 45% 55%;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--color-red);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.05;
}

h1 {
  max-width: 720px;
  font-size: clamp(2.35rem, 5.6vw, 5.55rem);
}

h2 {
  font-size: clamp(1.8rem, 3vw, 3rem);
}

h3 {
  font-size: 1.22rem;
}

p {
  color: var(--color-ink-soft);
  line-height: 1.65;
}

.hero-text {
  max-width: 660px;
  margin: 22px 0 0;
  font-size: 1.13rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  font-weight: 900;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover,
.button:focus-visible {
  outline: 0;
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: var(--color-coral);
  box-shadow: 0 8px 0 #b9332c;
}

.button-secondary {
  color: var(--color-navy);
  background: #fff;
  border-color: var(--color-border);
  box-shadow: 0 6px 0 rgba(21, 54, 95, 0.1);
}

.hero-art {
  position: relative;
  min-height: 430px;
  display: grid;
  place-items: center;
}

.sticker {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 18px 16px rgba(21, 54, 95, 0.15));
}

.sticker-teddy {
  width: min(360px, 88%);
  transform: rotate(3deg);
}

.sticker-pencil {
  position: absolute;
  top: 24px;
  right: 2px;
  width: 132px;
  transform: rotate(15deg);
}

.paper-note {
  position: absolute;
  bottom: 20px;
  left: 12px;
  z-index: 2;
  width: 170px;
  padding: 18px;
  display: grid;
  gap: 6px;
  color: var(--color-navy);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 900;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sticker);
  transform: rotate(-7deg);
}

.paper-note span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.paper-note span::before {
  width: 12px;
  height: 12px;
  content: "";
  background: var(--color-yellow);
  border-radius: 50%;
}

.content-section {
  padding: clamp(28px, 4vw, 46px);
  background: rgba(255, 253, 247, 0.72);
  border: 2px solid rgba(234, 215, 174, 0.76);
  border-radius: 28px;
}

.section-heading {
  max-width: 800px;
  margin-bottom: 24px;
}

.split-heading {
  max-width: none;
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
}

.split-heading p:last-child {
  max-width: 340px;
  margin: 0;
  font-size: 0.92rem;
}

code {
  padding: 2px 5px;
  background: var(--color-paper-warm);
  border-radius: 6px;
}

.card-grid,
.value-grid {
  display: grid;
  gap: 18px;
}

.series-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.books-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.series-card,
.book-card,
.value-card {
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.series-card {
  min-height: 235px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.series-card:nth-child(1) {
  border-top: 8px solid var(--color-blue);
}

.series-card:nth-child(2) {
  border-top: 8px solid var(--color-green);
}

.series-card:nth-child(3) {
  border-top: 8px solid var(--color-yellow);
}

.series-card:nth-child(4) {
  border-top: 8px solid var(--color-coral);
}

.series-card p,
.value-card p,
.book-card p {
  margin: 10px 0 0;
}

.series-count {
  width: fit-content;
  margin-top: auto;
  padding: 7px 10px;
  color: var(--color-navy);
  font-size: 0.84rem;
  font-weight: 900;
  background: var(--color-paper-warm);
  border-radius: 999px;
}

.value-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.value-card {
  padding: 20px;
}

.value-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 900;
  background: var(--color-blue);
  border-radius: 15px;
  transform: rotate(-5deg);
}

.value-card:nth-child(2) .value-icon {
  background: var(--color-coral);
  transform: rotate(4deg);
}

.value-card:nth-child(3) .value-icon {
  background: var(--color-green);
  transform: rotate(5deg);
}

.value-card:nth-child(4) .value-icon {
  color: var(--color-navy);
  background: var(--color-yellow);
  transform: rotate(-3deg);
}

.book-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
}

.book-cover {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #cfeeff, #fff0cc);
}

.book-cover img {
  width: 76%;
  max-height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 14px 10px rgba(21, 54, 95, 0.12));
}

.book-card-content {
  padding: 20px;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.book-card-content h3 a {
  text-decoration: none;
}

.book-card-content h3 a:hover,
.book-card-content h3 a:focus-visible {
  color: var(--color-coral);
  outline: 0;
}

.book-cover-link {
  display: block;
  text-decoration: none;
}

.book-cover-link:focus-visible {
  outline: 4px solid rgba(242, 106, 90, 0.28);
  outline-offset: 4px;
}

.home-book-card .book-card-content {
  padding: 16px;
}

.home-book-card p {
  font-size: 0.92rem;
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill {
  padding: 6px 9px;
  color: var(--color-navy);
  font-size: 0.78rem;
  font-weight: 900;
  background: var(--color-paper-warm);
  border-radius: 999px;
}

.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
}

.book-actions .button {
  min-height: 42px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.resource-panel,
.newsletter-section,
.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: center;
}

.resource-panel {
  grid-template-columns: 190px minmax(0, 1fr);
  padding: 24px;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.newsletter-section {
  background:
    linear-gradient(135deg, rgba(207, 63, 55, 0.08), rgba(47, 119, 189, 0.08)),
    rgba(255, 253, 247, 0.86);
  grid-template-columns: 1fr;
}

.newsletter-copy p:last-child {
  max-width: 980px;
  white-space: nowrap;
}

.newsletter-copy {
  max-width: 100%;
}

.newsletter-form {
  padding: 22px;
  display: grid;
  gap: 14px;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.newsletter-form,
.inline-newsletter-form {
  position: relative;
}

.newsletter-signup-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 224px;
  gap: 18px;
  align-items: center;
}

.newsletter-fields {
  display: grid;
  gap: 14px;
  padding-right: 0;
}

.heart-button {
  position: static;
  width: 224px;
  height: 224px;
  justify-self: center;
  transform: none;
  background: transparent !important;
  border: none;
  border-radius: 0;
  box-shadow: none !important;
  padding: 0;
  cursor: pointer;
  transition: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}

@media (max-width: 860px) {
  .newsletter-fields {
    padding-right: 0;
  }

  .heart-button {
    position: static;
    width: 224px;
    height: 224px;
    transform: none;
    margin: 0 auto;
  }
}

.heart-button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.heart-button:hover,
.heart-button:focus-visible {
  transform: none;
  outline: 2px solid var(--color-blue);
  outline-offset: 4px;
}

.heart-button::before,
.heart-button::after {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.checkbox-label {
  min-height: 46px;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  align-self: end;
  padding: 10px 12px;
  color: var(--color-ink-soft);
  font-weight: 800;
  background: var(--color-paper);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.checkbox-label input {
  width: 18px;
  min-height: 18px;
  padding: 0;
}

label {
  display: grid;
  gap: 7px;
  color: var(--color-navy);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--color-navy);
  font: inherit;
  background: var(--color-paper);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
}

input,
select {
  min-height: 46px;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(47, 119, 189, 0.28);
  border-color: var(--color-blue);
}

.form-message {
  min-height: 1.5em;
  margin: 0;
  color: var(--color-green);
  font-weight: 900;
}

.about-section > p {
  max-width: 880px;
  margin-bottom: 0;
  font-size: 1.05rem;
}

.contact-section {
  grid-template-columns: minmax(0, 1fr) auto;
}

.page-hero {
  min-height: auto;
  grid-template-columns: minmax(0, 1fr) 220px;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 4.4rem);
}

.page-hero .hero-art {
  min-height: 220px;
}

.page-hero .sticker {
  width: min(190px, 80%);
}

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

.detail-grid:has(.about-playful) {
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.detail-grid:has(.about-playful) .about-mini-card {
  padding: 20px;
}

.detail-grid:has(.about-playful) .wide-card {
  grid-column: 1 / -1;
}

.detail-card {
  padding: 28px;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 22px;
}

@media (max-width: 860px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid:has(.about-playful) {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-approach-grid {
    grid-template-columns: 1fr;
  }
}

.detail-card a.button-primary {
  justify-self: center;
  min-width: 180px;
  width: auto;
  padding: 12px 22px;
  font-size: 0.95rem;
}

.detail-card.series-reading-hugs a.button-primary {
  background: var(--color-blue);
  box-shadow: 0 8px 0 rgba(46, 98, 167, 0.9);
}

.detail-card.series-math-hugs a.button-primary {
  background: var(--color-green);
  box-shadow: 0 8px 0 rgba(72, 143, 86, 0.9);
}

.detail-card.series-math-hugs-workbooks a.button-primary {
  background: var(--color-yellow);
  color: var(--color-deep-navy);
  box-shadow: 0 8px 0 rgba(200, 170, 48, 0.9);
}

.detail-card.series-coming-soon a.button-primary {
  background: var(--color-red);
  box-shadow: 0 8px 0 rgba(154, 33, 30, 0.9);
}

/* Color-code series detail cards to match Shop Books accents */
.detail-card.series-reading-hugs {
  --series-accent: var(--color-blue);
  --series-cover-bg: rgba(74, 144, 226, 0.18);
  --series-heading-color: #fff;
}

.detail-card.series-math-hugs {
  --series-accent: var(--color-green);
  --series-cover-bg: rgba(107, 191, 115, 0.24);
  --series-heading-color: #fff;
}

.detail-card.series-math-hugs-workbooks {
  --series-accent: var(--color-yellow);
  --series-cover-bg: rgba(242, 201, 76, 0.28);
  --series-heading-color: var(--color-deep-navy);
}

.detail-card.series-coming-soon {
  --series-accent: var(--color-red);
  --series-cover-bg: rgba(207, 63, 55, 0.10);
  --series-heading-color: #fff;
  border: 2px solid rgba(207, 63, 55, 0.12);
  background: rgba(207, 63, 55, 0.03);
}

.detail-card h3 {
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--color-deep-navy);
  display: block;
}

.detail-card p {
  margin: 0;
  line-height: 1.7;
}

.detail-card ul,
.info-list {
  margin: 0;
  padding-left: 20px;
  color: var(--color-ink-soft);
  line-height: 1.75;
}

.detail-card ul {
  margin-top: 12px;
}

.detail-card li + li,
.info-list li + li {
  margin-top: 8px;
}

.wide-card {
  grid-column: 1 / -1;
}

.about-approach-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-approach-grid .wide-card {
  grid-column: 1 / -1;
}

.about-mini-card {
  border-top-width: 10px;
}

.about-playful {
  background: linear-gradient(180deg, rgba(74, 144, 226, 0.2), rgba(255, 255, 255, 0.86));
  border-color: rgba(74, 144, 226, 0.5);
  border-top-color: var(--color-blue);
}

.about-practical {
  background: linear-gradient(180deg, rgba(107, 191, 115, 0.22), rgba(255, 255, 255, 0.86));
  border-color: rgba(107, 191, 115, 0.5);
  border-top-color: var(--color-green);
}

.about-purposeful {
  background: linear-gradient(180deg, rgba(242, 201, 76, 0.3), rgba(255, 255, 255, 0.88));
  border-color: rgba(242, 201, 76, 0.62);
  border-top-color: var(--color-yellow);
}

@media (max-width: 860px) {
  .about-approach-grid {
    grid-template-columns: 1fr;
  }
}

/* Temporary homepage mobile handling: keep the desktop layout until a dedicated mobile design is approved. */
@media (max-width: 860px) {
  body.home-page {
    min-width: 1180px;
    overflow-x: auto;
  }

  body.home-page .site-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    width: var(--sidebar-width);
    min-height: 100vh;
    padding: 16px 18px 18px;
    display: flex;
    grid-template-columns: none;
    align-items: stretch;
  }

  body.home-page .brand {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 166px;
    overflow: hidden;
  }

  body.home-page .brand-logo {
    width: min(145px, 100%);
    max-height: none;
    border-radius: 12px;
    transform: translateY(-23px);
  }

  body.home-page .nav-toggle {
    display: none;
  }

  body.home-page .site-nav,
  body.home-page .site-nav.is-open {
    display: flex;
    grid-template-columns: none;
    padding-top: 0;
  }

  body.home-page .page-shell {
    width: min(1220px, calc(100% - var(--sidebar-width)));
    margin-left: var(--sidebar-width);
    padding: 38px clamp(24px, 3.6vw, 56px) 40px;
  }

  body.home-page .hero,
  body.home-page #home.hero {
    display: block;
    min-height: 0;
    padding: 0;
    border-radius: 0;
  }

  body.home-page .content-section {
    padding: 34px 32px;
    border-radius: 28px;
  }

  body.home-page .home-approach-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.home-page .value-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body.home-page .newsletter-section {
    grid-template-columns: minmax(0, 0.95fr) minmax(280px, 1fr);
  }

  body.home-page .form-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.home-page .books-carousel {
    grid-template-columns: 46px minmax(0, 1fr) 46px;
    gap: 12px;
  }

  body.home-page .home-books-track {
    grid-auto-columns: calc((100% - 54px) / 4);
  }
}

.home-approach-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.home-approach-grid .about-mini-card {
  padding: 20px;
}

.books-library-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.contact-card {
  display: grid;
  gap: 12px;
}

.contact-card a {
  font-weight: 900;
}

.contact-form {
  max-width: 720px;
}

.contact-note {
  max-width: 820px;
}

.contact-note a {
  font-weight: 900;
}

.series-page-logo {
  display: block;
  width: min(190px, 82%);
  max-height: 180px;
  margin: 0 auto 14px;
  object-fit: contain;
  filter: drop-shadow(0 10px 16px rgba(21, 54, 95, 0.14));
}

@media (max-width: 1100px) {
  .series-grid,
  .value-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .site-sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    min-height: auto;
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .brand-tagline,
  .sidebar-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    padding: 9px 14px;
    color: #fff;
    font: inherit;
    font-weight: 900;
    background: var(--color-navy);
    border: 0;
    border-radius: 999px;
  }

  .site-nav {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 12px;
  }

  .site-nav.is-open {
    display: grid;
  }

  .page-shell {
    width: 100%;
    margin-left: 0;
    padding: 18px 16px 40px;
  }

  .hero,
  .page-hero,
  .newsletter-section,
  .resource-panel,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-art {
    min-height: 320px;
  }

  .split-heading {
    display: block;
  }

  .split-heading p:last-child {
    margin-top: 12px;
  }
}

@media (max-width: 620px) {
  .hero,
  .content-section {
    padding: 24px 18px;
    border-radius: 22px;
  }

  .series-grid,
  .value-grid,
  .books-grid,
  .books-library-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .book-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .sticker-pencil {
    width: 98px;
  }

  .paper-note {
    width: 140px;
    font-size: 1rem;
  }
}

/* Brand refresh based on the approved Learning Hugs visual direction. */
:root {
  --color-deep-navy: #13294b;
}

body {
  color: var(--color-deep-navy);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 12px 12px, rgba(21, 54, 95, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 247, 231, 0.72), rgba(255, 253, 247, 0.96) 42%, #fffdf7),
    var(--color-cream);
  background-size: 24px 24px, auto, auto;
}

.site-sidebar {
  padding: 16px 18px 18px;
  gap: 6px;
  background: linear-gradient(180deg, #fffaf0, #fff6e8);
  border-right: 1px solid rgba(234, 215, 174, 0.7);
  box-shadow: 10px 0 32px rgba(21, 54, 95, 0.05);
}

.brand {
  height: 166px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
}

.brand-logo {
  display: block;
  width: min(145px, 100%);
  max-height: none;
  object-fit: contain;
  object-position: center;
  border-radius: 22px;
  margin: 0 auto;
  transform: translateY(-23px);
}

.brand-mark {
  display: block;
  width: auto;
  height: auto;
  color: var(--color-deep-navy);
  font-family: var(--font-display);
  font-size: 2.55rem;
  font-weight: 900;
  line-height: 0.92;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  transform: none;
}

.brand-mark > span {
  display: block;
}

.brand-mark > span:last-child {
  color: var(--color-coral);
}

.logo-placeholder {
  width: 150px;
  height: 88px;
  display: grid;
  place-items: center;
  color: var(--color-deep-navy);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
  background:
    linear-gradient(135deg, rgba(242, 106, 90, 0.1), rgba(74, 144, 226, 0.1)),
    #fffdf7;
  border: 2px dashed rgba(19, 41, 75, 0.28);
  border-radius: 24px;
  box-shadow: 0 10px 20px rgba(21, 54, 95, 0.06);
}

.brand-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.brand-tagline {
  max-width: 215px;
  margin-top: 24px;
  color: var(--color-deep-navy);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.35;
}

.site-nav {
  gap: 9px;
}

.site-nav a {
  position: relative;
  min-height: 52px;
  padding: 14px 12px 14px 50px;
  display: flex;
  align-items: center;
  border-radius: 19px;
}

.site-nav a::before {
  position: absolute;
  left: 15px;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: var(--color-deep-navy);
  font-size: 1.05rem;
  line-height: 1;
  content: "⌂";
}

.site-nav a:nth-of-type(2)::before {
  content: "▤";
}

.site-nav a:nth-of-type(3)::before {
  content: "▥";
}

.site-nav a:nth-of-type(4)::before {
  content: "♡";
}

.site-nav a:nth-of-type(5)::before {
  content: "✉";
}

.sidebar-search {
  position: relative;
  display: block;
}

.sidebar-search span {
  position: absolute;
  top: 50%;
  left: 16px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--color-deep-navy);
  border-radius: 50%;
  transform: translateY(-58%);
}

.sidebar-search span::after {
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 8px;
  height: 2px;
  content: "";
  background: var(--color-deep-navy);
  border-radius: 999px;
  transform: rotate(45deg);
}

.sidebar-search input {
  min-height: 42px;
  width: 100%;
  padding: 9px 12px 9px 40px;
  font-size: 0.9rem;
  font-weight: 800;
  background: rgba(255, 253, 247, 0.9);
  border: 1px solid #f0d7c5;
  border-radius: 16px;
}

.sidebar-search {
  margin-bottom: 38px;
}

.site-nav a:hover,
.site-nav a:focus-visible,
.site-nav a.is-active {
  color: var(--color-deep-navy);
  background: linear-gradient(135deg, #ffe7da, #fff4ec);
  box-shadow: inset 0 0 0 1px rgba(239, 91, 76, 0.16);
}

.sidebar-cta {
  padding: 0;
  text-align: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.sidebar-cta img.sidebar-teddy {
  display: block;
  width: min(160px, 100%);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 14px 18px rgba(21, 54, 95, 0.12));
}

.sidebar-cta p {
  color: var(--color-deep-navy);
  font-size: 1.08rem;
}

.page-shell {
  width: min(1220px, calc(100% - var(--sidebar-width)));
  padding: 38px clamp(24px, 3.6vw, 56px) 40px;
}

.topbar {
  margin-bottom: 38px;
  display: grid;
  grid-template-columns: minmax(280px, 560px) auto 54px;
  gap: 20px;
  align-items: center;
}

.search-box {
  position: relative;
  margin: 0;
  display: block;
}

.search-box span {
  position: absolute;
  top: 50%;
  left: 24px;
  width: 20px;
  height: 20px;
  border: 3px solid var(--color-deep-navy);
  border-radius: 50%;
  transform: translateY(-58%);
}

.search-box span::after {
  position: absolute;
  right: -8px;
  bottom: -7px;
  width: 10px;
  height: 3px;
  content: "";
  background: var(--color-deep-navy);
  border-radius: 999px;
  transform: rotate(45deg);
}

.search-box input {
  min-height: 68px;
  padding-left: 62px;
  background: rgba(255, 253, 247, 0.9);
  border-color: #f0d7c5;
  border-radius: 28px;
}

.community-button {
  min-height: 68px;
  padding: 0 26px;
  display: inline-flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  background: var(--color-deep-navy);
  border-radius: 28px;
  box-shadow: 0 10px 22px rgba(6, 29, 73, 0.16);
}

.community-button span {
  font-size: 0.8rem;
  line-height: 1;
  text-transform: uppercase;
}

.profile-button {
  position: relative;
  width: 54px;
  height: 54px;
  border: 1px solid #f0d7c5;
  border-radius: 50%;
  background: #fffaf2;
}

.profile-button::before {
  position: absolute;
  top: 12px;
  left: 19px;
  width: 14px;
  height: 14px;
  content: "";
  border: 3px solid var(--color-deep-navy);
  border-radius: 50%;
}

.profile-button::after {
  position: absolute;
  right: 14px;
  bottom: 12px;
  left: 14px;
  height: 13px;
  content: "";
  border: 3px solid var(--color-deep-navy);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  border-bottom: 0;
}

.hero {
  min-height: 610px;
  padding: 28px clamp(14px, 2vw, 22px) 28px clamp(26px, 3vw, 34px);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  box-shadow: none;
}

#home.hero {
  min-height: 0;
  display: block;
  aspect-ratio: 2172 / 515;
  margin-top: 8px;
  padding: 0;
  overflow: hidden;
  text-align: center;
  background: transparent;
  border: 3px solid rgba(234, 215, 174, 0.76);
  border-radius: 30px;
  box-shadow: 0 18px 38px rgba(19, 41, 75, 0.12);
}

.hero-banner-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

#home.hero .hero-copy {
  width: min(100%, 570px);
}

#home.hero .hero-text {
  max-width: 540px;
  margin-right: 0;
  margin-left: 0;
}

.hero::after {
  background: transparent;
}

h1,
h2,
h3 {
  color: var(--color-deep-navy);
  font-family: var(--font-display);
  letter-spacing: 0;
}

h1 {
  font-size: clamp(2.75rem, 5.2vw, 5rem);
  font-weight: 800;
  line-height: 0.96;
}

h2 {
  font-weight: 800;
  line-height: 1;
}

h3 {
  font-weight: 800;
  line-height: 1.08;
}

h1 span {
  display: block;
}

.hero-text {
  margin-top: 30px;
  color: var(--color-deep-navy);
  font-weight: 700;
}

.button-primary {
  background: linear-gradient(180deg, #ff6b5e, var(--color-coral));
}

.hero-art {
  min-height: 490px;
}

.sticker {
  filter: drop-shadow(0 15px 18px rgba(21, 54, 95, 0.13));
}

.sticker-teddy {
  width: min(520px, 104%);
  transform: rotate(0deg);
}

.mascot-image {
  border-radius: 38px;
  mix-blend-mode: multiply;
}

.scribble-highlight {
  display: inline-block;
  margin: 0 -0.04em;
  padding: 0 0.12em;
  color: inherit;
  background: linear-gradient(100deg, rgba(248, 200, 78, 0.88), rgba(248, 200, 78, 0.62));
  border-radius: 18px 10px 16px 12px;
}

.scribble-highlight.coral {
  background: linear-gradient(100deg, rgba(255, 159, 139, 0.9), rgba(255, 202, 186, 0.72));
}

.content-section {
  padding: clamp(28px, 4vw, 46px) clamp(14px, 2vw, 22px);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
}

.section-heading h2::after {
  display: none;
  width: 32px;
  height: 4px;
  margin-top: 12px;
  content: "";
  background: var(--color-coral);
  border-radius: 999px;
  transform: rotate(-4deg);
}

.series-card,
.book-card,
.value-card,
.detail-card,
.newsletter-form,
.resource-panel {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid #ecd7c5;
  border-radius: 22px;
  box-shadow: 0 12px 25px rgba(21, 54, 95, 0.07);
}

.series-card {
  position: relative;
  min-height: 350px;
  padding: 142px 22px 22px;
  overflow: hidden;
}

.series-card::before {
  position: absolute;
  top: 28px;
  left: 50%;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 2.3rem;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(21, 54, 95, 0.16);
  content: "★";
  background: #ffd96b;
  border: 7px solid #fff;
  border-radius: 28px;
  box-shadow: var(--shadow-sticker);
  transform: translateX(-50%) rotate(-7deg);
}

.series-card:nth-child(2)::before {
  content: "123";
  color: var(--color-deep-navy);
  font-size: 1.45rem;
  background: #dcecc9;
  transform: translateX(-50%) rotate(5deg);
}

.series-card:nth-child(3)::before {
  content: "♡";
  background: #cde7fb;
  transform: translateX(-50%) rotate(-2deg);
}

.series-card:nth-child(4)::before {
  content: "⌁";
  background: var(--color-lavender);
  transform: translateX(-50%) rotate(6deg);
}

.book-cover {
  aspect-ratio: 3 / 4;
  padding: 12px;
  background: linear-gradient(135deg, #fff1c9, #dcecff);
}

.book-cover img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.books-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 12px;
  align-items: center;
}

.home-books-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 54px) / 4);
  grid-template-columns: none;
  gap: 18px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.home-books-track::-webkit-scrollbar {
  display: none;
}

.home-books-track .book-card {
  scroll-snap-align: start;
}

.carousel-arrow {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--color-deep-navy);
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  background: #fffdf7;
  border: 1px solid #ecd7c5;
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(21, 54, 95, 0.08);
  cursor: pointer;
}

.carousel-arrow:hover,
.carousel-arrow:focus-visible {
  outline: 3px solid rgba(242, 106, 90, 0.22);
  background: #fff3eb;
}

.series-card {
  cursor: pointer;
}

.series-card-hit {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
}

.series-card h3,
.series-card p,
.series-count,
.series-sticker,
.series-logo {
  position: relative;
  z-index: 3;
  pointer-events: none;
}

.series-logo {
  position: absolute;
  top: 18px;
  left: 50%;
  width: min(132px, calc(100% - 34px));
  height: 104px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 10px 14px rgba(21, 54, 95, 0.14));
}

.book-series-library {
  display: grid;
  gap: 28px;
}

.book-library-section {
  padding-top: 8px;
}

.book-series-section {
  scroll-margin-top: 24px;
}

.book-series-section .section-heading {
  margin-bottom: 18px;
}

.book-series-section h3 {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
}

.disabled-button {
  cursor: default;
}

.eyebrow {
  width: fit-content;
  margin-bottom: 14px;
  color: var(--color-deep-navy);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.eyebrow::after {
  display: none;
  width: 34px;
  height: 4px;
  margin-top: 6px;
  content: "";
  background: var(--color-coral);
  border-radius: 999px;
  transform: rotate(-4deg);
}

.series-card {
  min-height: 330px;
  padding: 126px 22px 22px;
  isolation: isolate;
}

.series-card::before {
  inset: 18px 18px auto 18px;
  width: auto;
  height: 102px;
  content: "";
  background:
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.78) 0 14px, transparent 15px),
    linear-gradient(135deg, rgba(74, 144, 226, 0.24), rgba(255, 255, 255, 0.78));
  border: 0;
  border-radius: 20px;
  box-shadow: inset 0 0 0 1px rgba(19, 41, 75, 0.06);
  transform: none;
  z-index: -1;
}

.series-sticker {
  position: absolute;
  top: 32px;
  left: 50%;
  width: 84px;
  height: 84px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.45rem;
  font-weight: 900;
  background: var(--color-blue);
  border: 7px solid #fff;
  border-radius: 28px;
  box-shadow: var(--shadow-sticker);
  transform: translateX(-50%) rotate(-7deg);
}

#math-hugs::before {
  content: "";
  background:
    radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.78) 0 14px, transparent 15px),
    linear-gradient(135deg, rgba(107, 191, 115, 0.25), rgba(255, 255, 255, 0.78));
}

#math-hugs .series-sticker {
  color: var(--color-deep-navy);
  background: var(--color-green);
  transform: translateX(-50%) rotate(5deg);
}

#math-hugs-workbooks::before {
  content: "";
  background:
    radial-gradient(circle at 20% 70%, rgba(255, 255, 255, 0.78) 0 14px, transparent 15px),
    linear-gradient(135deg, rgba(242, 201, 76, 0.32), rgba(255, 255, 255, 0.78));
}

#math-hugs-workbooks .series-sticker {
  color: var(--color-deep-navy);
  background: var(--color-yellow);
  transform: translateX(-50%) rotate(-3deg);
}

#coming-soon::before {
  content: "";
  background:
    radial-gradient(circle at 78% 72%, rgba(255, 255, 255, 0.78) 0 14px, transparent 15px),
    linear-gradient(135deg, rgba(216, 198, 242, 0.42), rgba(242, 106, 90, 0.12));
}

#coming-soon .series-sticker {
  color: var(--color-deep-navy);
  font-size: 1.05rem;
  background: var(--color-lavender);
  transform: translateX(-50%) rotate(7deg);
}

.series-count {
  background: #fff4dc;
  border: 1px solid rgba(233, 196, 106, 0.65);
}

.value-grid {
  gap: 0;
}

.value-card {
  position: relative;
  min-height: 270px;
  padding: 24px 22px;
  background: transparent;
  border-right: 1px solid rgba(234, 215, 174, 0.9);
}

.value-card:last-child {
  border-right: 0;
}

.value-icon {
  position: relative;
  width: 78px;
  height: 78px;
  margin-bottom: 18px;
  color: var(--color-deep-navy);
  font-size: 0.95rem;
  background: #fff;
  border: 6px solid #fff;
  border-radius: 26px;
  box-shadow: var(--shadow-sticker);
}

.value-icon::after {
  position: absolute;
  width: 18px;
  height: 5px;
  content: "";
  background: var(--color-blue);
  border-radius: 999px;
  transform: translate(44px, 22px) rotate(-16deg);
}

.value-idea {
  background: linear-gradient(135deg, #fff3bf, #ffffff);
}

.value-bridge {
  background: linear-gradient(135deg, #e0f1ff, #ffffff);
}

.value-practice {
  background: linear-gradient(135deg, #ffe7df, #ffffff);
}

.value-grow {
  background: linear-gradient(135deg, #e4f5d8, #ffffff);
}

.value-card:nth-child(2) .value-icon,
.value-card:nth-child(3) .value-icon,
.value-card:nth-child(4) .value-icon {
  color: var(--color-deep-navy);
  transform: rotate(4deg);
}

.value-card:nth-child(3) .value-icon {
  transform: rotate(-5deg);
}

.value-card:nth-child(4) .value-icon {
  transform: rotate(3deg);
}

.value-card {
  text-align: center;
  box-shadow: none;
  border-top: 0;
  border-bottom: 0;
  border-radius: 0;
}

.value-icon {
  margin-right: auto;
  margin-left: auto;
  border: 6px solid #fff;
  box-shadow: var(--shadow-sticker);
}

/* Compact inner-page heroes so navigation pages show their main content sooner. */
.page-hero {
  min-height: auto;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  padding: 24px 28px;
  background: rgba(255, 253, 247, 0.72);
  border: 1px solid rgba(234, 215, 174, 0.86);
  border-radius: 26px;
  box-shadow: 0 12px 25px rgba(21, 54, 95, 0.06);
}

.page-hero h1 {
  max-width: 820px;
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  line-height: 1;
}

.page-hero .hero-text {
  max-width: 760px;
  margin-top: 12px;
  font-size: 1.02rem;
  font-weight: 700;
}

.page-hero .hero-art {
  min-height: 132px;
}

.page-hero .sticker {
  width: min(128px, 100%);
  max-height: 132px;
  object-fit: contain;
}

.hero-copy h1 span:nth-child(1) {
  color: var(--color-deep-navy);
}

.hero-copy h1 span:nth-child(2) {
  color: var(--color-deep-navy);
}

.hero-copy h1 span:nth-child(3) {
  color: var(--color-deep-navy);
}

.rainbow-title {
  max-width: 580px;
  color: var(--color-deep-navy);
  text-shadow: none;
}

.rainbow-line {
  width: auto;
  max-width: none;
  margin-inline: 0;
  white-space: nowrap;
}

.rainbow-line-one {
  font-size: clamp(2.6rem, 5vw, 4.65rem);
  transform: none;
}

.rainbow-line-two {
  font-size: clamp(2.6rem, 5vw, 4.65rem);
  transform: none;
}

p,
label,
input,
select,
textarea,
.site-nav a,
.button,
.pill,
.series-count {
  font-family: var(--font-body);
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .community-button,
  .profile-button {
    display: none;
  }

  .site-sidebar {
    padding: 14px 16px;
  }

  .brand {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 130px;
    overflow: hidden;
  }

  .brand-logo {
    width: 112px;
    max-height: none;
    border-radius: 12px;
    transform: translateY(-18px);
  }

  .brand-mark {
    font-size: 1.45rem;
  }

  .logo-placeholder {
    width: 96px;
    height: 56px;
    font-size: 0.86rem;
    border-radius: 16px;
  }

  .page-shell {
    width: 100%;
    padding: 18px 16px 40px;
  }

  .hero {
    min-height: auto;
    padding: 24px 0;
  }

  #home.hero {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .page-hero {
    grid-template-columns: 1fr 92px;
    padding: 20px;
  }

  .page-hero .hero-art {
    min-height: 92px;
  }

  .page-hero .sticker {
    width: 88px;
    max-height: 90px;
  }

  .books-carousel {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 8px;
  }

  .home-books-track {
    grid-auto-columns: minmax(220px, 72%);
  }

  .carousel-arrow {
    width: 40px;
    height: 40px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .newsletter-signup-layout {
    grid-template-columns: 1fr;
    align-items: center;
  }

  .heart-button {
    width: min(224px, 100%);
    height: auto;
    aspect-ratio: 1;
    justify-self: center;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none !important;
  }

  .heart-button::before,
  .heart-button::after {
    display: none;
  }
}

.coming-soon-panel {
  scroll-margin-top: 24px;
}

@media (max-width: 620px) {
  .hero,
  .content-section {
    padding-right: 0;
    padding-left: 0;
    border-radius: 0;
  }

  h1 {
    font-size: clamp(2.25rem, 11vw, 3.35rem);
  }

  #home.hero h1 {
    font-size: clamp(2rem, 9vw, 2.75rem);
  }

  #home.hero {
    border-radius: 18px;
  }

  .hero-art {
    min-height: 300px;
  }

  .home-books-track {
    grid-auto-columns: minmax(220px, 86%);
  }

  .page-hero {
    display: block;
    padding: 18px;
  }

  .page-hero h1 {
    font-size: clamp(1.8rem, 9vw, 2.55rem);
  }

  .page-hero .hero-art {
    display: none;
  }
}

/* Shop Books library cards. */
.book-series-section .books-library-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.shop-book-card {
  --series-accent: var(--color-blue);
  --series-shadow: #2f67a2;
  --series-cover-bg: rgba(74, 144, 226, 0.18);
  align-self: start;
}

.shop-book-card.series-reading-hugs {
  --series-accent: var(--color-blue);
  --series-shadow: #2f67a2;
  --series-cover-bg: rgba(74, 144, 226, 0.22);
}

.shop-book-card.series-math-hugs {
  --series-accent: var(--color-green);
  --series-shadow: #3f8f4d;
  --series-cover-bg: rgba(107, 191, 115, 0.24);
}

.shop-book-card.series-math-hugs-workbooks {
  --series-accent: var(--color-yellow);
  --series-shadow: #b88a16;
  --series-cover-bg: rgba(242, 201, 76, 0.28);
}

.shop-book-card .book-card-content {
  gap: 12px;
  padding: 16px;
}

.shop-book-card h3 {
  min-height: 3.1em;
  margin: 0;
  display: grid;
  align-items: center;
  text-align: center;
  font-size: clamp(1.2rem, 1.6vw, 1.48rem);
}

.shop-book-card .book-cover {
  width: 100%;
  margin-top: 0;
  background: var(--series-cover-bg);
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 18px;
  box-shadow: inset 0 0 0 1px rgba(19, 41, 75, 0.06);
}

.shop-book-card .book-meta {
  justify-content: center;
  margin-top: 2px;
}

.book-details {
  text-align: center;
}

.book-details summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--series-accent);
  font-weight: 900;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  cursor: pointer;
  list-style: none;
}

.book-details summary::-webkit-details-marker {
  display: none;
}

.book-details summary::after {
  margin-left: 7px;
  content: "+";
  font-weight: 900;
}

.book-details[open] summary::after {
  content: "-";
}

.book-details p {
  margin: 12px 0 0;
  color: var(--color-ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.shop-book-card .book-actions {
  justify-content: center;
  margin-top: 2px;
  padding-top: 8px;
}

.shop-book-card .series-amazon-link {
  min-width: 150px;
  justify-content: center;
  color: #fff;
  background: var(--series-accent);
  box-shadow: 0 7px 0 var(--series-shadow);
}

.shop-book-card.series-math-hugs-workbooks .series-amazon-link {
  color: var(--color-deep-navy);
}

.shop-book-card .series-amazon-link:hover,
.shop-book-card .series-amazon-link:focus-visible {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

@media (max-width: 1180px) {
  .book-series-section .books-library-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .book-series-section .books-library-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .book-series-section .books-library-grid {
    grid-template-columns: 1fr;
  }
}

/* Clean Shop Books navigation and details refinements. */
#home.hero {
  height: auto;
  aspect-ratio: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.learning-path-nav {
  padding-top: 26px;
  padding-bottom: 24px;
}

.learning-path-nav .section-heading {
  margin-bottom: 12px;
}

.learning-path-nav .series-grid {
  gap: 14px;
}

.learning-path-nav .series-card {
  --path-color: var(--color-blue);
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 16px;
  box-shadow: none;
  overflow: hidden;
}

.learning-path-nav .series-card::before {
  display: none;
}

.learning-path-nav .series-card:nth-child(1) {
  --path-color: var(--color-blue);
}

.learning-path-nav .series-card:nth-child(2) {
  --path-color: var(--color-green);
}

.learning-path-nav .series-card:nth-child(3) {
  --path-color: var(--color-yellow);
}

.learning-path-nav .series-card:nth-child(4) {
  --path-color: var(--color-lavender);
}

.learning-path-nav .series-logo,
.learning-path-nav .series-sticker {
  display: none;
}

.learning-path-nav .series-card h3 {
  margin-top: 0;
  min-height: 58px;
  padding: 12px 14px;
  display: grid;
  place-items: center;
  color: var(--color-deep-navy);
  font-size: 1.08rem;
  text-align: center;
  background: var(--path-color);
  border-radius: 16px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.72);
}

.learning-path-nav .series-card p {
  display: none;
}

.book-details summary::after {
  display: none;
}

.book-details .book-meta {
  justify-content: center;
  margin-top: 12px;
}

.coming-soon-panel {
  display: grid;
  gap: 18px;
}

.coming-soon-book-card {
  width: min(280px, 100%);
}

.coming-soon-signup {
  width: 100%;
}

.coming-soon-signup > summary {
  width: fit-content;
  margin-top: 6px;
  list-style: none;
  cursor: pointer;
}

.coming-soon-signup > summary::-webkit-details-marker {
  display: none;
}

.inline-newsletter-form {
  margin-top: 18px;
}

/* Shop Books page: make the 4th learning-path card (Coming Soon) use red */
#series .series-card:nth-of-type(4) {
  --path-color: var(--color-red);
}

/* Ensure the bottom "More Hugs Coming Soon" heading keeps default color */
#coming-soon-books .section-heading h3 {
  color: inherit;
}

.contact-content-section {
  width: min(820px, 100%);
}

/* Explore Series: match the Shop Books learning-path colors and keep logos transparent. */
.detail-card.series-reading-hugs,
.detail-card.series-math-hugs,
.detail-card.series-math-hugs-workbooks,
.detail-card.series-coming-soon {
  border-width: 2px;
  border-style: solid;
  border-top-width: 10px;
}

.detail-card.series-reading-hugs {
  --series-accent: var(--color-blue);
  background: linear-gradient(180deg, rgba(74, 144, 226, 0.2), rgba(255, 255, 255, 0.82));
  border-color: rgba(74, 144, 226, 0.48);
  border-top-color: var(--color-blue);
}

.detail-card.series-math-hugs {
  --series-accent: var(--color-green);
  background: linear-gradient(180deg, rgba(107, 191, 115, 0.22), rgba(255, 255, 255, 0.82));
  border-color: rgba(107, 191, 115, 0.5);
  border-top-color: var(--color-green);
}

.detail-card.series-math-hugs-workbooks {
  --series-accent: var(--color-yellow);
  background: linear-gradient(180deg, rgba(242, 201, 76, 0.3), rgba(255, 255, 255, 0.86));
  border-color: rgba(242, 201, 76, 0.58);
  border-top-color: var(--color-yellow);
}

.detail-card.series-coming-soon {
  --series-accent: var(--color-red);
  background: linear-gradient(180deg, rgba(207, 63, 55, 0.14), rgba(255, 255, 255, 0.86));
  border-color: rgba(207, 63, 55, 0.36);
  border-top-color: var(--color-red);
}

.detail-card.series-reading-hugs .series-page-logo,
.detail-card.series-math-hugs .series-page-logo,
.detail-card.series-math-hugs-workbooks .series-page-logo {
  background: transparent;
  border: 0;
  box-shadow: none;
}

@media (max-width: 860px) {
  #home.hero {
    height: auto;
  }
}

/* About Us: keep the three approach notes aligned and color coded. */
.about-approach-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.about-approach-grid .wide-card {
  grid-column: 1 / -1;
}

.about-mini-card {
  border-top-width: 10px;
}

.about-playful {
  background: linear-gradient(180deg, rgba(74, 144, 226, 0.2), rgba(255, 255, 255, 0.86));
  border-color: rgba(74, 144, 226, 0.5);
  border-top-color: var(--color-blue);
}

.about-practical {
  background: linear-gradient(180deg, rgba(107, 191, 115, 0.22), rgba(255, 255, 255, 0.86));
  border-color: rgba(107, 191, 115, 0.5);
  border-top-color: var(--color-green);
}

.about-purposeful {
  background: linear-gradient(180deg, rgba(242, 201, 76, 0.3), rgba(255, 255, 255, 0.88));
  border-color: rgba(242, 201, 76, 0.62);
  border-top-color: var(--color-yellow);
}

@media (max-width: 860px) {
  .about-approach-grid {
    grid-template-columns: 1fr;
  }
}
