:root {
  --ink: #191b18;
  --muted: #686c64;
  --paper: #fffdf7;
  --white: #ffffff;
  --line: #e5e5dc;
  --lime: #bdf653;
  --lime-dark: #98d52c;
  --violet: #8a73e8;
  --coral: #ff826c;
  --blue: #66a8f2;
  --green: #63c59b;
  --yellow: #f5c94c;
  --mint: #9edcc7;
  --shadow: 0 24px 70px rgb(36 42 25 / 10%);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 34px;
  --container: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body:has(dialog[open]) {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  color: inherit;
}

img,
svg {
  display: block;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3,
.brand,
.book-title,
.equation {
  letter-spacing: -0.04em;
}

.container {
  width: min(calc(100% - 48px), var(--container));
  margin-inline: auto;
}

.compact-container {
  width: min(calc(100% - 48px), 1040px);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  color: var(--white);
  background: var(--ink);
  border-radius: 10px;
  transform: translateY(-150%);
}

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

:focus-visible {
  outline: 3px solid #5d7df6;
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  height: 76px;
  background: rgb(255 253 247 / 88%);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 8px 30px rgb(25 27 24 / 4%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 850;
  line-height: 1;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  background: var(--lime);
  border: 1.5px solid var(--ink);
  border-radius: 12px;
  box-shadow: 3px 3px 0 var(--ink);
  font-size: 20px;
}

.brand-dot {
  color: #8dbf33;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  margin-left: 75px;
  color: #4f534d;
  font-size: 14px;
  font-weight: 650;
}

.desktop-nav a,
.footer-links a {
  transition: color 160ms ease;
}

.desktop-nav a:hover,
.footer-links a:hover {
  color: #7eae29;
}

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

.header-search {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 9px 0 14px;
  color: #4a4e47;
  background: #f2f1ea;
  border: 1px solid #e5e4dc;
  border-radius: 13px;
  cursor: pointer;
  font-size: 13px;
}

.header-search:hover {
  background: #ebebe3;
}

kbd {
  padding: 3px 6px;
  color: #757970;
  background: var(--white);
  border: 1px solid #dddcd5;
  border-bottom-width: 2px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 10px;
  line-height: 1.2;
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.mobile-nav {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.mobile-nav .container {
  display: grid;
  gap: 2px;
  padding-block: 12px 18px;
}

.mobile-nav a {
  padding: 13px 4px;
  font-weight: 700;
}

.hero {
  position: relative;
  min-height: 648px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 95%, rgb(189 246 83 / 17%), transparent 28%),
    var(--paper);
}

.hero::before {
  position: absolute;
  width: 320px;
  height: 320px;
  background: #f1ead8;
  border-radius: 50%;
  content: "";
  filter: blur(5px);
  opacity: 0.3;
  right: -180px;
  top: 40px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(420px, 0.94fr);
  gap: 58px;
  align-items: center;
  padding-block: 72px 82px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.hero-badge,
.floating-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hero-badge {
  padding: 7px 12px;
  margin-bottom: 22px;
  background: var(--lime);
  border-radius: 100px;
  box-shadow: 3px 3px 0 var(--ink);
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 650px;
  margin-bottom: 24px;
  font-size: clamp(58px, 6.4vw, 86px);
  font-weight: 900;
  line-height: 0.91;
}

.hero-copy h1 span {
  position: relative;
  z-index: 1;
}

.mobile-break {
  display: none;
}

.hero-copy h1 span::after {
  position: absolute;
  z-index: -1;
  right: -5px;
  bottom: 3px;
  left: -5px;
  height: 21px;
  background: var(--lime);
  content: "";
  transform: rotate(-1.4deg);
}

.hero-lead {
  max-width: 570px;
  margin-bottom: 29px;
  color: #555a51;
  font-size: 18px;
  line-height: 1.55;
}

.hero-search {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  max-width: 625px;
  padding: 7px 7px 7px 19px;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 17px;
  box-shadow: 6px 7px 0 rgb(25 27 24 / 11%);
}

.hero-search input,
.dialog-search-form input,
.catalog-search input,
.number-search input {
  min-width: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
}

.hero-search input {
  height: 46px;
  font-size: 15px;
}

input::placeholder {
  color: #989b94;
}

.hero-search button,
.dialog-search-form button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  padding-inline: 18px;
  color: var(--white);
  background: var(--ink);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 750;
  transition: transform 160ms ease, background 160ms ease;
}

.hero-search button:hover,
.dialog-search-form button:hover,
.button--dark:hover {
  background: #30342e;
  transform: translateY(-1px);
}

.popular-searches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 18px;
  color: #83877f;
  font-size: 12px;
}

.popular-searches a {
  padding: 5px 9px;
  color: #5f635c;
  background: #f1f0e9;
  border-radius: 8px;
  transition: background 160ms ease;
}

.popular-searches a:hover {
  background: #e7e6de;
}

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

.hero-visual::before {
  position: absolute;
  width: 440px;
  height: 440px;
  background: var(--lime);
  border: 1.5px solid var(--ink);
  border-radius: 43% 57% 54% 46% / 53% 42% 58% 47%;
  box-shadow: 11px 12px 0 rgb(25 27 24 / 12%);
  content: "";
  transform: rotate(-4deg);
}

.orbit {
  position: absolute;
  z-index: 0;
  width: 470px;
  height: 260px;
  border: 1px dashed rgb(25 27 24 / 28%);
  border-radius: 50%;
}

.orbit-one {
  transform: rotate(30deg);
}

.orbit-two {
  transform: rotate(-30deg);
}

.solution-card {
  position: relative;
  z-index: 2;
  width: min(356px, 80%);
  padding: 24px;
  background: rgb(255 255 255 / 96%);
  border: 1.5px solid var(--ink);
  border-radius: 21px;
  box-shadow: 9px 10px 0 rgb(25 27 24 / 16%);
  transform: rotate(2.5deg);
}

.solution-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 15px;
  margin-bottom: 18px;
  color: #74786f;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  font-weight: 700;
}

.solution-number {
  padding: 4px 8px;
  color: var(--ink);
  background: #eeeee7;
  border-radius: 6px;
}

.solution-title {
  margin-bottom: 10px;
  font-size: 17px;
  font-weight: 800;
}

.equation {
  padding: 13px 15px;
  margin-bottom: 17px;
  background: #f5f4ee;
  border-radius: 10px;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.solution-step {
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 13px 0;
}

.step-index {
  display: grid;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  place-items: center;
  background: #ecefe8;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}

.solution-step div {
  display: grid;
}

.solution-step small {
  color: #858980;
  font-size: 10px;
}

.solution-step strong {
  font-family: Georgia, serif;
  font-size: 15px;
}

.solution-answer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 9px;
  align-items: center;
  padding: 11px 13px;
  margin-top: 17px;
  background: #e9f9c9;
  border: 1px solid #a6d64e;
  border-radius: 10px;
  font-size: 12px;
}

.solution-answer strong {
  font-family: Georgia, serif;
  font-size: 17px;
}

.floating-pill {
  position: absolute;
  z-index: 4;
  padding: 8px 12px;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 4px 5px 0 rgb(25 27 24 / 15%);
}

.floating-pill--top {
  top: 46px;
  right: 3px;
  transform: rotate(5deg);
}

.floating-pill--bottom {
  bottom: 50px;
  left: -2px;
  transform: rotate(-5deg);
}

.doodle {
  position: absolute;
  z-index: 1;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 800;
}

.doodle-one {
  top: 43px;
  left: 22px;
  transform: rotate(-15deg);
}

.doodle-two {
  right: 7px;
  bottom: 95px;
  font-size: 30px;
}

.doodle-three {
  bottom: 26px;
  left: 113px;
  transform: rotate(12deg);
}

.trust-strip {
  background: var(--ink);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-block: 24px;
  color: var(--white);
}

.trust-grid > div {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: center;
  min-height: 32px;
  border-right: 1px solid rgb(255 255 255 / 17%);
}

.trust-grid > div:last-child {
  border: 0;
}

.trust-grid strong {
  font-size: 23px;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.trust-grid span {
  color: #b9bcb6;
  font-size: 12px;
}

.section {
  padding-block: 105px;
}

.section-heading {
  margin-bottom: 40px;
}

.heading-with-note,
.heading-with-link,
.result-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 9px;
  color: #7aa523;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.section-heading h2,
.page-hero h1,
.result-heading h2,
.book-page-copy h1,
.exercise-content h2,
.chapter-nav h2 {
  margin-bottom: 0;
  font-size: clamp(34px, 4.2vw, 52px);
  font-weight: 850;
  line-height: 1.06;
}

.heading-with-note > p {
  max-width: 245px;
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 14px;
}

.catalog-section {
  background: #f4f2e9;
}

.grade-picker {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  padding: 14px;
  margin-bottom: 25px;
  background: var(--white);
  border: 1px solid #e3e2da;
  border-radius: 18px;
}

.grade-picker > span {
  padding-left: 10px;
  color: #767a72;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.grade-list {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 7px;
}

.grade-list a {
  display: grid;
  height: 44px;
  place-items: center;
  border: 1px solid #deded6;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.grade-list a:hover {
  background: var(--lime);
  border-color: var(--ink);
  transform: translateY(-2px);
}

.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.subject-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  min-height: 116px;
  padding: 22px;
  background: var(--white);
  border: 1px solid #deded6;
  border-radius: var(--radius-md);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.subject-card:hover {
  border-color: var(--ink);
  box-shadow: 5px 6px 0 var(--ink);
  transform: translate(-2px, -3px);
}

.subject-icon {
  display: grid;
  width: 57px;
  height: 57px;
  place-items: center;
  border-radius: 17px;
}

.subject-card--violet .subject-icon { background: #e5defe; color: #5940bb; }
.subject-card--coral .subject-icon { background: #ffe0da; color: #c14d39; }
.subject-card--blue .subject-icon { background: #dbeaff; color: #3471b8; }
.subject-card--green .subject-icon { background: #d8f3e4; color: #23865c; }
.subject-card--yellow .subject-icon { background: #fff0be; color: #a67a00; }
.subject-card--mint .subject-icon { background: #d9f3eb; color: #287d63; }

.subject-copy {
  display: grid;
  gap: 4px;
}

.subject-copy strong {
  font-size: 16px;
}

.subject-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.subject-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  background: #f2f1eb;
  border-radius: 50%;
  transition: background 180ms ease, transform 180ms ease;
}

.subject-card:hover .subject-arrow {
  background: var(--lime);
  transform: translateX(2px);
}

.books-section {
  background: var(--paper);
}

.text-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 3px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.heading-with-link .text-link {
  justify-self: start;
}

.text-link:hover .icon {
  transform: translateX(3px);
}

.text-link .icon {
  transition: transform 160ms ease;
}

.books-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 29px;
}

.book-card {
  min-width: 0;
}

.book-cover {
  position: relative;
  display: flex;
  min-height: 328px;
  flex-direction: column;
  overflow: hidden;
  padding: 23px;
  border: 1.5px solid var(--ink);
  border-radius: 8px 19px 19px 8px;
  box-shadow: 6px 8px 0 rgb(25 27 24 / 12%);
  isolation: isolate;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.book-cover::before {
  position: absolute;
  z-index: -1;
  inset: 0 auto 0 12px;
  width: 1px;
  background: rgb(25 27 24 / 20%);
  content: "";
}

.book-cover::after {
  position: absolute;
  z-index: -1;
  right: -46px;
  bottom: -56px;
  width: 180px;
  height: 180px;
  background: rgb(255 255 255 / 25%);
  border: 1px solid rgb(25 27 24 / 15%);
  border-radius: 50%;
  content: "";
}

.book-cover:hover {
  box-shadow: 10px 12px 0 rgb(25 27 24 / 13%);
  transform: translateY(-5px) rotate(-1deg);
}

.book-cover--violet { background: #a08af2; }
.book-cover--coral { background: #ff927f; }
.book-cover--blue { background: #7aaff0; }
.book-cover--green { background: #7dceaa; }
.book-cover--yellow { background: #f3cd59; }

.book-grade {
  align-self: flex-start;
  padding: 5px 9px;
  background: rgb(255 255 255 / 77%);
  border: 1px solid rgb(25 27 24 / 65%);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.book-title {
  max-width: 190px;
  margin-top: 24px;
  font-size: 27px;
  font-weight: 900;
  line-height: 1;
}

.book-line {
  width: 44px;
  height: 3px;
  margin-top: 15px;
  background: var(--ink);
}

.book-monogram {
  position: absolute;
  right: 8px;
  bottom: -33px;
  color: rgb(255 255 255 / 23%);
  font-family: Georgia, serif;
  font-size: 190px;
  font-weight: 900;
  line-height: 1;
}

.book-year {
  position: relative;
  z-index: 1;
  margin-top: auto;
  font-size: 11px;
  font-weight: 800;
}

.book-meta {
  padding: 19px 5px 0;
}

.book-meta h3 {
  margin-bottom: 6px;
  font-size: 15px;
  line-height: 1.3;
}

.book-meta a:hover h3 {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.book-meta p {
  min-height: 35px;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.book-meta > span {
  color: #7aa523;
  font-size: 11px;
  font-weight: 750;
}

.how-section {
  background: var(--ink);
  color: var(--white);
}

.how-heading {
  text-align: center;
}

.how-heading h2 {
  font-size: clamp(36px, 4.7vw, 57px);
}

.how-section .eyebrow {
  color: var(--lime);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.step-card {
  position: relative;
  min-height: 350px;
  padding: 31px;
  color: var(--ink);
  background: #f7f5eb;
  border: 1px solid #000;
  border-radius: 25px;
}

.step-card--offset {
  transform: translateY(25px);
}

.step-number {
  position: absolute;
  top: 23px;
  right: 25px;
  color: #b0b2ab;
  font-size: 12px;
  font-weight: 850;
}

.step-illustration {
  display: grid;
  width: 111px;
  height: 111px;
  margin: 20px 0 38px;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 31px;
  box-shadow: 5px 6px 0 var(--ink);
  transform: rotate(-4deg);
}

.step-illustration--search { background: var(--yellow); }
.step-illustration--book { background: var(--violet); transform: rotate(4deg); }
.step-illustration--check { background: var(--lime); }

.step-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.step-card p {
  max-width: 270px;
  margin: 0;
  color: #666a62;
  font-size: 14px;
}

.cta-section {
  padding-block: 90px;
  background: #f4f2e9;
}

.cta-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  min-height: 265px;
  overflow: hidden;
  padding: 58px 66px;
  background: var(--lime);
  border: 1.5px solid var(--ink);
  border-radius: 32px;
  box-shadow: 10px 11px 0 var(--ink);
}

.cta-card > div,
.cta-card > button {
  position: relative;
  z-index: 2;
}

.cta-card .eyebrow {
  color: #4f7015;
}

.cta-card h2 {
  margin-bottom: 8px;
  font-size: clamp(36px, 4.8vw, 59px);
  line-height: 1;
}

.cta-card p {
  margin: 0;
  color: #45522e;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 20px;
  border: 1.5px solid var(--ink);
  border-radius: 13px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button--light {
  min-width: 185px;
  background: var(--white);
  box-shadow: 5px 6px 0 var(--ink);
}

.button--light:hover {
  box-shadow: 2px 3px 0 var(--ink);
  transform: translate(2px, 2px);
}

.button--dark {
  color: var(--white);
  background: var(--ink);
}

.cta-symbol {
  position: absolute;
  color: rgb(25 27 24 / 12%);
  font-family: Georgia, serif;
  font-weight: 800;
}

.cta-symbol--one { top: 17px; left: 43%; font-size: 33px; transform: rotate(10deg); }
.cta-symbol--two { right: 31%; bottom: 2px; font-size: 76px; transform: rotate(-8deg); }
.cta-symbol--three { right: 20px; top: -21px; font-size: 83px; transform: rotate(9deg); }

.site-footer {
  padding-top: 68px;
  color: #d9dcd5;
  background: var(--ink);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 80px;
  padding-bottom: 60px;
}

.brand-footer {
  color: var(--white);
}

.footer-top > div > p {
  margin: 24px 0 0;
  color: #93978f;
  font-size: 13px;
  line-height: 1.65;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 70px;
}

.footer-links > div {
  display: grid;
  gap: 12px;
  align-content: start;
}

.footer-links h2 {
  margin-bottom: 8px;
  color: #777b73;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-links a {
  font-size: 13px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  padding-block: 18px;
  color: #6f736b;
  border-top: 1px solid #343731;
  font-size: 10px;
}

.search-dialog {
  width: min(calc(100% - 32px), 650px);
  padding: 28px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 24px;
  box-shadow: 10px 12px 0 rgb(0 0 0 / 25%);
}

.search-dialog::backdrop {
  background: rgb(25 27 24 / 62%);
  backdrop-filter: blur(4px);
}

.search-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  margin-bottom: 23px;
}

.search-dialog h2 {
  margin: 0;
  font-size: 29px;
}

.dialog-close {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  background: #eeede6;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
}

.dialog-search-form {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 7px 7px 7px 15px;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 15px;
}

.dialog-search-form input {
  height: 47px;
}

.dialog-hint {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 17px 0 0;
  color: #8a8e86;
  font-size: 10px;
}

/* Search and textbook pages */
.page-hero {
  padding-block: 80px 70px;
  background: #edf6d8;
  border-bottom: 1px solid #d9e2c6;
}

.page-hero h1 {
  margin-bottom: 35px;
  font-size: clamp(45px, 6vw, 68px);
}

.catalog-page-hero .breadcrumbs {
  margin-bottom: 38px;
}

.catalog-page-intro {
  max-width: 670px;
  margin: 22px 0 0;
  color: #58604f;
  font-size: 16px;
  line-height: 1.65;
}

.catalog-search {
  display: grid;
  grid-template-columns: minmax(230px, 1.5fr) 0.65fr 0.85fr auto;
  gap: 9px;
  padding: 9px;
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 17px;
  box-shadow: 6px 7px 0 rgb(25 27 24 / 11%);
}

.catalog-search-input {
  display: flex;
  gap: 10px;
  align-items: center;
  padding-inline: 10px;
}

.catalog-search select {
  width: 100%;
  height: 48px;
  padding-inline: 12px 34px;
  color: var(--ink);
  background: #f1f1ea;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
}

.search-results {
  min-height: 500px;
}

.catalog-results-section {
  min-height: 540px;
}

.catalog-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 58px;
}

.subject-filter {
  display: grid;
  align-self: start;
  position: sticky;
  top: 100px;
}

.subject-filter .eyebrow {
  padding-inline: 11px;
}

.subject-filter a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 43px;
  padding: 8px 11px;
  color: #666a62;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.subject-filter a:hover,
.subject-filter a.active {
  color: var(--ink);
  background: #edf6d8;
}

.subject-filter a span {
  color: #979b93;
  font-size: 10px;
}

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

.books-grid--catalog .book-cover {
  min-height: 330px;
}

.empty-state--compact {
  padding-top: 30px;
}

.result-heading {
  margin-bottom: 38px;
}

.result-heading h2 {
  font-size: 35px;
}

.result-heading > a {
  color: var(--muted);
  border-bottom: 1px solid currentcolor;
  font-size: 12px;
}

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

.books-grid--results .book-cover {
  min-height: 390px;
}

.empty-state {
  display: grid;
  max-width: 500px;
  justify-items: center;
  padding: 60px 30px;
  margin-inline: auto;
  text-align: center;
}

.empty-state > span {
  display: grid;
  width: 86px;
  height: 86px;
  margin-bottom: 23px;
  place-items: center;
  background: #edf6d8;
  border-radius: 26px;
}

.empty-state h3 {
  margin-bottom: 8px;
  font-size: 25px;
}

.empty-state p {
  margin-bottom: 25px;
  color: var(--muted);
}

.error-page {
  padding-block: 70px 90px;
}

.error-state {
  max-width: 560px;
}

.error-state h1 {
  margin-bottom: 10px;
  font-size: 34px;
}

/* Overrides `.empty-state > span`, which is shaped as an 86px icon tile. */
.error-state > .error-code {
  display: block;
  width: auto;
  height: auto;
  margin-bottom: 18px;
  background: none;
  border-radius: 0;
  color: var(--muted);
  font-size: 62px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  opacity: 0.35;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 42px;
}

.error-grades .eyebrow {
  display: block;
  margin-bottom: 14px;
}

.error-grades div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.error-grades a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--white);
  border: 1px solid #dfded6;
  border-radius: 12px;
  font-size: 15px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.error-grades a:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.book-page-head {
  padding-block: 34px 76px;
  background: #f2f0e8;
  border-bottom: 1px solid #e0ded6;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 42px;
  color: #7c8078;
  font-size: 11px;
}

.breadcrumbs a:hover {
  color: var(--ink);
}

.book-page-grid {
  display: grid;
  grid-template-columns: 255px 1fr;
  gap: 60px;
  align-items: center;
}

.book-cover--large {
  min-height: 350px;
  cursor: default;
}

.book-cover--large:hover {
  box-shadow: 6px 8px 0 rgb(25 27 24 / 12%);
  transform: none;
}

.book-page-copy h1 {
  max-width: 650px;
  margin-bottom: 13px;
  font-size: clamp(40px, 5.5vw, 64px);
}

.book-authors {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 16px;
}

.book-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.book-facts span {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 11px;
  background: var(--white);
  border: 1px solid #dbdad2;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.book-description {
  max-width: 540px;
  margin: 0;
  color: #595e55;
  line-height: 1.65;
}

.exercise-section {
  background: var(--paper);
}

.exercise-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 62px;
}

.chapter-nav {
  align-self: start;
  display: grid;
  position: sticky;
  top: 104px;
}

.chapter-nav h2 {
  margin-bottom: 24px;
  font-size: 22px;
}

.chapter-nav a {
  display: flex;
  justify-content: space-between;
  padding: 13px 12px;
  color: #676b64;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.chapter-nav a span {
  color: #a1a49d;
  font-size: 10px;
}

.chapter-nav a.active {
  color: var(--ink);
  background: #edf6d8;
}

.exercise-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 23px;
  margin-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.exercise-content h2 {
  font-size: 32px;
}

.number-search {
  display: flex;
  gap: 7px;
  align-items: center;
  width: 126px;
  height: 42px;
  padding-inline: 11px;
  background: #f1f0e9;
  border: 1px solid #e2e1da;
  border-radius: 11px;
}

.number-search input {
  width: 100%;
}

.exercise-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 9px;
}

.exercise-grid button,
.exercise-grid a {
  display: grid;
  min-height: 51px;
  place-items: center;
  background: var(--white);
  border: 1px solid #deded6;
  border-radius: 11px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.exercise-grid button:hover,
.exercise-grid a:hover {
  background: var(--lime);
  border-color: var(--ink);
  transform: translateY(-2px);
}

.exercise-grid button[hidden],
.exercise-grid a[hidden] {
  display: none;
}

.exercise-note {
  padding: 13px 15px;
  margin: 22px 0 0;
  color: #747870;
  background: #f2f1ea;
  border-radius: 11px;
  font-size: 11px;
}

.chapter-nav-empty {
  color: var(--muted);
  font-size: 12px;
}

.exercise-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  margin-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.exercise-toolbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.exercise-group {
  padding-top: 100px;
  margin-top: -100px;
}

.exercise-group + .exercise-group {
  margin-top: 44px;
}

.exercise-page-head {
  padding-block: 34px 68px;
  background:
    radial-gradient(circle at 80% 20%, rgb(189 246 83 / 24%), transparent 24%),
    #f2f0e8;
  border-bottom: 1px solid #e0ded6;
}

.exercise-page-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 40px;
}

.exercise-page-title h1 {
  margin: 8px 0 12px;
  font-size: clamp(48px, 7vw, 76px);
  line-height: 0.98;
}

.exercise-page-title p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.verified-badge {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  background: var(--lime);
  border: 1px solid var(--ink);
  border-radius: 11px;
  box-shadow: 3px 4px 0 var(--ink);
  font-size: 12px;
  font-weight: 800;
  transform: rotate(1deg);
}

.exercise-page-section {
  background: #f8f7f1;
}

.exercise-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 42px;
  align-items: start;
}

.exercise-main {
  display: grid;
  gap: 52px;
}

.content-card {
  padding: 34px;
  background: var(--white);
  border: 1px solid #dfded6;
  border-radius: 22px;
  box-shadow: 0 18px 50px rgb(25 27 24 / 5%);
}

.content-card-heading {
  display: flex;
  gap: 15px;
  align-items: center;
  padding-bottom: 22px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.content-card-heading h2,
.solution-block-heading h2 {
  margin: 3px 0 0;
  font-size: 34px;
}

.content-card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  background: #edf6d8;
  border-radius: 14px;
}

.condition-text {
  margin-bottom: 18px;
  font-family: Georgia, serif;
  font-size: 23px;
  line-height: 1.65;
}

.source-page {
  display: inline-flex;
  padding: 5px 9px;
  margin: 0;
  color: var(--muted);
  background: #f2f1ea;
  border-radius: 7px;
  font-size: 11px;
}

.solution-block-heading {
  margin-bottom: 26px;
}

.solution-variant {
  padding: 34px;
  background: var(--white);
  border: 1px solid #dfded6;
  border-radius: 22px;
}

.solution-variant + .solution-variant {
  margin-top: 24px;
}

.solution-variant-title {
  margin-bottom: 20px;
  font-size: 17px;
}

.solution-intro {
  max-width: 650px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

/* Scanned solutions: one column, full width, in reading order. */
.solution-scans {
  display: grid;
  gap: 18px;
}

.solution-scans + .solution-steps-list,
.solution-scans + .final-answer {
  margin-top: 26px;
}

.solution-scan {
  margin: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid #e6e5dd;
  border-radius: 14px;
}

.solution-scan img {
  display: block;
  width: 100%;
  height: auto;
  /* Scans are white-background photos of a page; keep them crisp when the
     source is wider than the column. */
  background: var(--white);
}

.solution-steps-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.solution-steps-list li {
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 17px;
  padding-bottom: 30px;
}

.solution-steps-list li:not(:last-child)::before {
  position: absolute;
  top: 38px;
  bottom: 0;
  left: 20px;
  width: 1px;
  background: #dfe0d8;
  content: "";
}

.solution-step-number {
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--ink);
  border-radius: 13px;
  color: var(--white);
  font-size: 13px;
  font-weight: 850;
}

.solution-step-copy h3 {
  margin: 1px 0 6px;
  font-size: 19px;
}

.solution-step-copy p {
  margin-bottom: 12px;
  color: var(--muted);
  line-height: 1.65;
}

.step-formula {
  display: inline-flex;
  padding: 12px 16px;
  background: #f3f2ec;
  border-left: 3px solid var(--lime-dark);
  border-radius: 8px;
  font-family: Georgia, serif;
  font-size: 21px;
  font-weight: 700;
}

.final-answer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 21px 23px;
  margin-top: 4px;
  background: #eaf8cf;
  border: 1px solid #afd35f;
  border-radius: 15px;
}

.final-answer div:first-child {
  display: grid;
  gap: 3px;
}

.final-answer span {
  color: #60723f;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.final-answer strong {
  font-family: Georgia, serif;
  font-size: 27px;
}

.final-answer-check {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  color: var(--ink) !important;
  background: var(--lime);
  border-radius: 50%;
}

.solution-pending {
  padding: 32px;
  background: #f2f1ea;
  border-radius: 18px;
}

.exercise-sidebar {
  position: sticky;
  top: 104px;
}

.exercise-book-card {
  padding: 24px;
  background: var(--white);
  border: 1px solid #dfded6;
  border-radius: 18px;
}

.exercise-book-card h2 {
  margin: 7px 0 10px;
  font-size: 22px;
  line-height: 1.1;
}

.exercise-book-card p {
  margin-bottom: 11px;
  color: var(--muted);
  font-size: 12px;
}

.exercise-book-card > span:not(.eyebrow) {
  color: #888c84;
  font-size: 11px;
}

.exercise-book-card a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 17px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 800;
}

.exercise-pagination {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 13px;
}

.exercise-pagination a {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 8px 10px;
  background: #eeede6;
  border-radius: 9px;
  font-size: 11px;
  font-weight: 750;
}

.exercise-pagination a:first-child svg {
  transform: rotate(180deg);
}

@media (max-width: 1050px) {
  .desktop-nav {
    margin-left: 10px;
  }

  .hero-grid {
    grid-template-columns: 1fr 420px;
    gap: 20px;
  }

  .hero-visual {
    transform: scale(0.9);
  }

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

  .books-grid {
    gap: 20px;
  }

  .book-cover {
    min-height: 290px;
  }
}

@media (max-width: 860px) {
  .desktop-nav,
  .header-search span,
  .header-search kbd {
    display: none;
  }

  .header-search {
    width: 42px;
    justify-content: center;
    padding: 0;
  }

  .menu-button {
    display: grid;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 57px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy h1,
  .hero-lead,
  .hero-search {
    margin-inline: auto;
  }

  .popular-searches {
    justify-content: center;
  }

  .hero-visual {
    width: min(520px, 100%);
    max-width: 100%;
    margin-inline: auto;
    transform: none;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 20px;
  }

  .trust-grid > div:nth-child(2) {
    border: 0;
  }

  .grade-picker {
    grid-template-columns: 1fr;
    gap: 11px;
  }

  .grade-list {
    grid-template-columns: repeat(6, 1fr);
  }

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

  .book-cover,
  .books-grid--results .book-cover {
    min-height: 410px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 560px;
    margin-inline: auto;
  }

  .step-card,
  .step-card--offset {
    min-height: auto;
    transform: none;
  }

  .step-illustration {
    margin-bottom: 25px;
  }

  .cta-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-search {
    grid-template-columns: 1fr 1fr;
  }

  .catalog-search-input {
    grid-column: 1 / -1;
    height: 48px;
  }

  .book-page-grid {
    gap: 42px;
  }

  .catalog-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .subject-filter {
    position: static;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }

  .subject-filter .eyebrow {
    grid-column: 1 / -1;
  }

  .exercise-layout {
    grid-template-columns: 1fr;
  }

  .chapter-nav {
    position: static;
  }

  .exercise-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .exercise-page-layout {
    grid-template-columns: 1fr;
  }

  .exercise-sidebar {
    position: static;
  }
}

@media (max-width: 620px) {
  .container,
  .compact-container {
    width: min(calc(100% - 30px), var(--container));
  }

  .site-header,
  .header-inner {
    height: 66px;
  }

  .brand {
    font-size: 20px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 18px;
  }

  .hero-grid {
    gap: 15px;
    padding-block: 42px 45px;
  }

  .hero-badge {
    margin-bottom: 20px;
    font-size: 10px;
  }

  .hero-copy h1 {
    margin-bottom: 19px;
    font-size: clamp(45px, 13vw, 52px);
  }

  .mobile-break {
    display: block;
  }

  .hero-copy h1 span::after {
    height: 14px;
  }

  .hero-lead {
    margin-bottom: 24px;
    font-size: 15px;
  }

  .hero-search {
    grid-template-columns: auto 1fr;
    padding: 8px 12px;
  }

  .hero-search button {
    grid-column: 1 / -1;
    width: 100%;
  }

  .hero-search input {
    height: 40px;
  }

  .popular-searches > span {
    width: 100%;
  }

  .hero-visual {
    min-height: 405px;
  }

  .hero-visual::before {
    width: 330px;
    height: 330px;
  }

  .solution-card {
    width: 280px;
    padding: 19px;
  }

  .solution-card-head {
    margin-bottom: 13px;
  }

  .floating-pill--top {
    top: 20px;
    right: 1px;
  }

  .floating-pill--bottom {
    bottom: 24px;
    left: 1px;
  }

  .doodle-one,
  .doodle-two {
    display: none;
  }

  .trust-grid {
    padding-block: 20px;
  }

  .trust-grid > div {
    display: grid;
    gap: 0;
    text-align: center;
  }

  .trust-grid strong {
    font-size: 19px;
  }

  .section {
    padding-block: 76px;
  }

  .section-heading {
    margin-bottom: 29px;
  }

  .heading-with-note,
  .heading-with-link,
  .result-heading {
    display: grid;
  }

  .section-heading h2,
  .page-hero h1 {
    font-size: 37px;
  }

  .heading-with-note > p {
    display: none;
  }

  .grade-list {
    grid-template-columns: repeat(4, 1fr);
  }

  .subject-grid {
    grid-template-columns: 1fr;
  }

  .subject-card {
    min-height: 104px;
  }

  .books-grid,
  .books-grid--results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 13px;
  }

  .book-cover,
  .books-grid--results .book-cover {
    min-height: 245px;
    padding: 17px;
  }

  .book-title {
    font-size: 20px;
  }

  .book-monogram {
    font-size: 130px;
  }

  .book-meta {
    padding-top: 15px;
  }

  .book-meta h3 {
    font-size: 13px;
  }

  .step-card {
    padding: 26px;
  }

  .cta-section {
    padding-block: 65px;
  }

  .cta-card {
    min-height: auto;
    padding: 40px 28px;
    border-radius: 24px;
  }

  .cta-card h2 {
    font-size: 38px;
  }

  .cta-card p {
    font-size: 13px;
  }

  .footer-top {
    flex-direction: column;
    gap: 45px;
  }

  .footer-links {
    gap: 25px;
  }

  .footer-bottom {
    gap: 7px;
    align-items: flex-start;
    flex-direction: column;
  }

  .search-dialog {
    padding: 20px;
  }

  .search-dialog h2 {
    font-size: 24px;
  }

  .dialog-search-form {
    grid-template-columns: auto 1fr;
  }

  .dialog-search-form button {
    grid-column: 1 / -1;
  }

  .page-hero {
    padding-block: 56px 50px;
  }

  .page-hero h1 {
    margin-bottom: 27px;
  }

  .catalog-search {
    grid-template-columns: 1fr;
  }

  .catalog-page-intro {
    font-size: 14px;
  }

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

  .books-grid--catalog .book-cover {
    min-height: 245px;
  }

  .catalog-search-input {
    grid-column: auto;
  }

  .book-page-head {
    padding-bottom: 57px;
  }

  .breadcrumbs {
    margin-bottom: 29px;
  }

  .book-page-grid {
    grid-template-columns: 125px 1fr;
    gap: 25px;
    align-items: start;
  }

  .book-cover--large {
    min-height: 185px;
    padding: 12px;
  }

  .book-cover--large .book-grade {
    padding: 3px 5px;
    font-size: 7px;
  }

  .book-cover--large .book-title {
    margin-top: 13px;
    font-size: 16px;
  }

  .book-cover--large .book-year {
    font-size: 8px;
  }

  .book-page-copy h1 {
    font-size: 30px;
  }

  .book-authors,
  .book-description {
    font-size: 12px;
  }

  .book-facts {
    display: grid;
  }

  .exercise-heading {
    align-items: start;
    flex-direction: column;
  }

  .exercise-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  .exercise-toolbar,
  .exercise-page-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .exercise-page-head {
    padding-block: 28px 48px;
  }

  .exercise-page-title h1 {
    font-size: 43px;
  }

  .exercise-page-title p {
    font-size: 13px;
  }

  .verified-badge {
    align-self: flex-start;
  }

  .content-card,
  .solution-variant {
    padding: 23px;
    border-radius: 17px;
  }

  .content-card-heading h2,
  .solution-block-heading h2 {
    font-size: 29px;
  }

  .condition-text {
    font-size: 19px;
  }

  .solution-steps-list li {
    grid-template-columns: 36px 1fr;
    gap: 13px;
  }

  /* On a phone the scan is the content, so let it use the full card width
     instead of losing 46px to horizontal padding. */
  .solution-scans {
    gap: 12px;
    margin-inline: -23px;
  }

  .solution-scan {
    border-inline: none;
    border-radius: 0;
  }

  .solution-step-number {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .solution-steps-list li:not(:last-child)::before {
    top: 32px;
    left: 17px;
  }

  .step-formula {
    font-size: 18px;
  }
}

@media (max-width: 380px) {
  .book-page-grid {
    grid-template-columns: 1fr;
  }

  .book-cover--large {
    display: none;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* Grade landing page */
.grade-catalog-hero {
  position: relative;
  overflow: hidden;
  padding-block: 45px 76px;
  background:
    radial-gradient(circle at 89% 16%, rgb(189 246 83 / 28%) 0 145px, transparent 146px),
    linear-gradient(135deg, #eef6dd 0%, #f7f8e9 62%, #edf2df 100%);
  border-bottom: 1px solid #dce3cd;
}

.grade-catalog-hero::after {
  position: absolute;
  right: -95px;
  bottom: -235px;
  width: 430px;
  height: 430px;
  border: 1px solid rgb(25 27 24 / 9%);
  border-radius: 50%;
  content: "";
}

.grade-catalog-breadcrumbs {
  position: relative;
  z-index: 1;
  margin-bottom: 56px;
}

.grade-catalog-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 75px;
  align-items: end;
}

.grade-catalog-copy h1 {
  max-width: 760px;
  margin-bottom: 22px;
  font-size: clamp(54px, 7.2vw, 88px);
  font-weight: 880;
  line-height: 0.96;
}

.grade-catalog-copy > p {
  max-width: 680px;
  margin-bottom: 34px;
  color: #555d4d;
  font-size: 17px;
  line-height: 1.65;
}

.grade-catalog-stats {
  display: flex;
  gap: 8px;
  margin: 0;
}

.grade-catalog-stats > div {
  display: grid;
  min-width: 112px;
  grid-template-columns: auto auto;
  gap: 5px;
  align-items: baseline;
  justify-content: start;
  padding: 10px 13px;
  background: rgb(255 255 255 / 68%);
  border: 1px solid rgb(25 27 24 / 10%);
  border-radius: 11px;
}

.grade-catalog-stats dt {
  color: #757c6d;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.grade-catalog-stats dd {
  order: -1;
  margin: 0;
  font-size: 18px;
  font-weight: 850;
}

.grade-catalog-switcher {
  padding: 24px;
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 26px;
  box-shadow: 11px 13px 0 rgb(25 27 24 / 10%);
}

.grade-catalog-switcher-head {
  display: flex;
  gap: 15px;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid rgb(255 255 255 / 12%);
}

.grade-catalog-switcher-number {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--ink);
  background: var(--lime);
  border-radius: 17px;
  font-size: 27px;
  font-weight: 900;
}

.grade-catalog-switcher-head > span:last-child {
  display: grid;
  gap: 2px;
}

.grade-catalog-switcher-head strong {
  font-size: 17px;
}

.grade-catalog-switcher-head small {
  color: rgb(255 255 255 / 55%);
  font-size: 11px;
}

.grade-catalog-grade-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
}

.grade-catalog-grade-list a {
  display: grid;
  height: 39px;
  place-items: center;
  color: rgb(255 255 255 / 66%);
  border: 1px solid rgb(255 255 255 / 13%);
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.grade-catalog-grade-list a:hover,
.grade-catalog-grade-list a.active {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
  transform: translateY(-1px);
}

.grade-catalog-subjects {
  padding-block: 78px 86px;
  background: var(--paper);
}

.grade-catalog-section-heading {
  display: flex;
  gap: 30px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 35px;
}

.grade-catalog-section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(36px, 4.4vw, 54px);
  font-weight: 870;
  line-height: 1;
}

.grade-catalog-section-heading > p {
  max-width: 335px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.grade-catalog-subject-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.grade-catalog-subject {
  display: grid;
  min-height: 104px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 15px;
  align-items: center;
  padding: 18px;
  background: var(--white);
  border: 1px solid #deded6;
  border-radius: 19px;
  transition: border-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

.grade-catalog-subject:hover {
  border-color: var(--ink);
  box-shadow: 4px 5px 0 var(--ink);
  transform: translate(-1px, -2px);
}

.grade-catalog-subject-icon,
.grade-catalog-group-title > span {
  display: grid;
  place-items: center;
  border-radius: 15px;
}

.grade-catalog-subject-icon {
  width: 54px;
  height: 54px;
}

.grade-catalog-subject-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.grade-catalog-subject-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grade-catalog-subject-copy small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-transform: uppercase;
}

.grade-catalog-subject-arrow {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  background: #f2f1eb;
  border-radius: 50%;
  transition: background 170ms ease, transform 170ms ease;
}

.grade-catalog-subject:hover .grade-catalog-subject-arrow {
  background: var(--lime);
  transform: translateX(2px);
}

.grade-catalog-subject.is-upcoming {
  background: #faf9f4;
}

.grade-catalog-subject.is-upcoming .grade-catalog-subject-arrow {
  opacity: 0.55;
}

.grade-catalog-subject--violet .grade-catalog-subject-icon,
.grade-catalog-group-title--violet > span { color: #5940bb; background: #e5defe; }
.grade-catalog-subject--coral .grade-catalog-subject-icon,
.grade-catalog-group-title--coral > span { color: #c14d39; background: #ffe0da; }
.grade-catalog-subject--blue .grade-catalog-subject-icon,
.grade-catalog-group-title--blue > span { color: #3471b8; background: #dbeaff; }
.grade-catalog-subject--green .grade-catalog-subject-icon,
.grade-catalog-group-title--green > span { color: #23865c; background: #d8f3e4; }
.grade-catalog-subject--yellow .grade-catalog-subject-icon,
.grade-catalog-group-title--yellow > span { color: #916d09; background: #fff0be; }
.grade-catalog-subject--mint .grade-catalog-subject-icon,
.grade-catalog-group-title--mint > span { color: #287d63; background: #d9f3eb; }

.grade-catalog-no-subjects {
  display: flex;
  gap: 18px;
  align-items: center;
  max-width: 700px;
  padding: 25px;
  background: #f4f2e9;
  border: 1px solid #e0ded4;
  border-radius: 20px;
}

.grade-catalog-no-subjects > span {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  background: var(--lime);
  border-radius: 16px;
}

.grade-catalog-no-subjects strong {
  display: block;
  margin-bottom: 3px;
  font-size: 18px;
}

.grade-catalog-no-subjects p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.grade-catalog-library {
  padding-block: 88px 96px;
  background: #f4f2e9;
  border-top: 1px solid #e6e3d9;
}

.grade-catalog-library-heading {
  align-items: center;
  margin-bottom: 44px;
}

.grade-catalog-authors {
  display: flex;
  max-width: 430px;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.grade-catalog-authors span {
  padding: 7px 11px;
  color: #5e625a;
  background: var(--white);
  border: 1px solid #deded5;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.grade-catalog-groups {
  display: grid;
  gap: 24px;
}

.grade-catalog-group {
  padding: 34px;
  background: var(--white);
  border: 1px solid #deded5;
  border-radius: 28px;
  scroll-margin-top: 105px;
}

.grade-catalog-group-head {
  display: flex;
  gap: 28px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 27px;
  margin-bottom: 30px;
  border-bottom: 1px solid #e9e8e1;
}

.grade-catalog-group-title {
  display: flex;
  gap: 16px;
  align-items: center;
}

.grade-catalog-group-title > span {
  width: 53px;
  height: 53px;
  flex: 0 0 auto;
}

.grade-catalog-group-title h2 {
  margin-bottom: 3px;
  font-size: 27px;
  font-weight: 850;
  line-height: 1.1;
}

.grade-catalog-group-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.grade-catalog-group-head .text-link {
  flex: 0 0 auto;
  margin: 0;
}

.grade-catalog-books {
  grid-template-columns: repeat(auto-fill, minmax(205px, 250px));
  gap: 32px;
}

.grade-catalog-books .book-cover {
  min-height: 315px;
}

.grade-catalog-group-more {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 11px 14px;
  margin-top: 31px;
  background: #f2f1eb;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 800;
  transition: background 160ms ease, transform 160ms ease;
}

.grade-catalog-group-more:hover {
  background: var(--lime);
  transform: translateY(-1px);
}

.result-limit-note {
  max-width: 470px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.grade-catalog-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 25px;
  align-items: center;
  padding: 35px;
  background: var(--white);
  border: 1px solid #deded5;
  border-radius: 27px;
}

.grade-catalog-empty-icon {
  display: grid;
  width: 84px;
  height: 84px;
  place-items: center;
  background: #edf6d8;
  border-radius: 23px;
}

.grade-catalog-empty .eyebrow {
  margin-bottom: 5px;
}

.grade-catalog-empty h3 {
  margin-bottom: 5px;
  font-size: 25px;
}

.grade-catalog-empty p {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.grade-catalog-upcoming {
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) 1.3fr;
  gap: 55px;
  align-items: center;
  padding: 34px;
  margin-top: 24px;
  color: var(--white);
  background: var(--ink);
  border-radius: 28px;
}

.grade-catalog-upcoming .eyebrow {
  color: var(--lime);
}

.grade-catalog-upcoming h2 {
  margin-bottom: 7px;
  font-size: 29px;
  line-height: 1.1;
}

.grade-catalog-upcoming p {
  margin: 0;
  color: rgb(255 255 255 / 55%);
  font-size: 12px;
}

.grade-catalog-upcoming-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.grade-catalog-upcoming-links a {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 9px 12px;
  color: rgb(255 255 255 / 72%);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.grade-catalog-upcoming-links a:hover {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}

@media (max-width: 980px) {
  .grade-catalog-hero-grid {
    grid-template-columns: minmax(0, 1fr) 345px;
    gap: 40px;
  }

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

@media (max-width: 760px) {
  .grade-catalog-hero {
    padding-block: 30px 58px;
  }

  .grade-catalog-breadcrumbs {
    margin-bottom: 38px;
  }

  .grade-catalog-hero-grid {
    grid-template-columns: 1fr;
    gap: 37px;
  }

  .grade-catalog-copy h1 {
    font-size: clamp(48px, 15vw, 68px);
  }

  .grade-catalog-copy > p {
    font-size: 15px;
  }

  .grade-catalog-switcher {
    max-width: 520px;
  }

  .grade-catalog-subjects,
  .grade-catalog-library {
    padding-block: 66px;
  }

  .grade-catalog-section-heading {
    display: grid;
  }

  .grade-catalog-section-heading > p {
    max-width: 480px;
  }

  .grade-catalog-library-heading {
    align-items: start;
  }

  .grade-catalog-authors {
    justify-content: flex-start;
  }

  .grade-catalog-group {
    padding: 26px;
  }

  .grade-catalog-group-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .grade-catalog-books {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 14px;
  }

  .grade-catalog-books--single {
    grid-template-columns: minmax(0, 220px);
  }

  .grade-catalog-books .book-cover {
    min-height: 265px;
  }

  .grade-catalog-empty {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .grade-catalog-empty .button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .grade-catalog-upcoming {
    grid-template-columns: 1fr;
    gap: 26px;
  }
}

@media (max-width: 520px) {
  .grade-catalog-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .grade-catalog-stats > div {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .grade-catalog-stats dd {
    font-size: 22px;
  }

  .grade-catalog-switcher {
    padding: 19px;
    border-radius: 22px;
  }

  .grade-catalog-grade-list {
    grid-template-columns: repeat(4, 1fr);
  }

  .grade-catalog-section-heading h2 {
    font-size: 38px;
  }

  .grade-catalog-subject-grid {
    grid-template-columns: 1fr;
  }

  .grade-catalog-subject {
    min-height: 92px;
    padding: 15px;
  }

  .grade-catalog-subject-icon {
    width: 49px;
    height: 49px;
  }

  .grade-catalog-group {
    padding: 20px;
    border-radius: 22px;
  }

  .grade-catalog-group-title {
    align-items: flex-start;
  }

  .grade-catalog-group-title > span {
    width: 46px;
    height: 46px;
  }

  .grade-catalog-group-title h2 {
    font-size: 22px;
  }

  .grade-catalog-books .book-cover {
    min-height: 235px;
  }

  .grade-catalog-books--single {
    grid-template-columns: minmax(0, 205px);
  }

  .grade-catalog-empty {
    grid-template-columns: 1fr;
    padding: 25px;
  }

  .grade-catalog-empty .button {
    grid-column: auto;
  }

  .grade-catalog-upcoming {
    padding: 26px;
    border-radius: 23px;
  }
}

/* Subject landing page */
.subject-catalog-hero {
  --subject-accent: #5940bb;
  --subject-accent-soft: #e5defe;
  position: relative;
  overflow: hidden;
  padding-block: 43px 78px;
  background:
    radial-gradient(circle at 87% 19%, var(--subject-accent-soft) 0 168px, transparent 169px),
    linear-gradient(135deg, #f5f4ed 0%, #fbfaf5 58%, var(--subject-accent-soft) 145%);
  border-bottom: 1px solid #e1dfd6;
}

.subject-catalog-hero--coral { --subject-accent: #c14d39; --subject-accent-soft: #ffe0da; }
.subject-catalog-hero--blue { --subject-accent: #3471b8; --subject-accent-soft: #dbeaff; }
.subject-catalog-hero--green { --subject-accent: #23865c; --subject-accent-soft: #d8f3e4; }
.subject-catalog-hero--yellow { --subject-accent: #916d09; --subject-accent-soft: #fff0be; }
.subject-catalog-hero--mint { --subject-accent: #287d63; --subject-accent-soft: #d9f3eb; }

.subject-catalog-hero::after {
  position: absolute;
  right: -72px;
  bottom: -205px;
  width: 420px;
  height: 420px;
  border: 1px solid rgb(25 27 24 / 8%);
  border-radius: 50%;
  content: "";
}

.subject-catalog-breadcrumbs {
  position: relative;
  z-index: 1;
  margin-bottom: 49px;
}

.subject-catalog-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 385px;
  gap: 74px;
  align-items: end;
}

.subject-catalog-kicker {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.subject-catalog-kicker-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  color: var(--subject-accent);
  background: var(--subject-accent-soft);
  border: 1px solid rgb(25 27 24 / 7%);
  border-radius: 16px;
}

.subject-catalog-kicker > span:last-child {
  display: grid;
  gap: 1px;
}

.subject-catalog-kicker small {
  color: #858980;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.subject-catalog-kicker strong {
  font-size: 17px;
}

.subject-catalog-copy h1 {
  max-width: 790px;
  margin-bottom: 21px;
  font-size: clamp(48px, 6.4vw, 78px);
  font-weight: 880;
  line-height: 0.98;
}

.subject-catalog-copy > p {
  max-width: 675px;
  margin-bottom: 31px;
  color: #5f625a;
  font-size: 16px;
  line-height: 1.65;
}

.subject-catalog-stats {
  display: flex;
  gap: 8px;
  margin: 0;
}

.subject-catalog-stats > div {
  display: grid;
  min-width: 118px;
  grid-template-columns: auto auto;
  gap: 6px;
  align-items: baseline;
  justify-content: start;
  padding: 10px 13px;
  background: rgb(255 255 255 / 75%);
  border: 1px solid rgb(25 27 24 / 10%);
  border-radius: 11px;
}

.subject-catalog-stats dt {
  color: #777b73;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.subject-catalog-stats dd {
  order: -1;
  margin: 0;
  font-size: 19px;
  font-weight: 880;
}

.subject-catalog-grade-card {
  padding: 27px;
  color: var(--white);
  background: var(--ink);
  border-radius: 27px;
  box-shadow: 11px 13px 0 rgb(25 27 24 / 10%);
}

.subject-catalog-grade-card .eyebrow {
  color: var(--lime);
}

.subject-catalog-grade-card h2 {
  margin-bottom: 6px;
  font-size: 26px;
  font-weight: 850;
  line-height: 1.1;
}

.subject-catalog-grade-card > p {
  margin-bottom: 21px;
  color: rgb(255 255 255 / 52%);
  font-size: 11px;
}

.subject-catalog-grade-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.subject-catalog-grade-list a {
  display: grid;
  min-height: 63px;
  place-items: center;
  align-content: center;
  color: rgb(255 255 255 / 67%);
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 11px;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.subject-catalog-grade-list strong {
  font-size: 18px;
  line-height: 1;
}

.subject-catalog-grade-list small {
  margin-top: 3px;
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
}

.subject-catalog-grade-list a:hover,
.subject-catalog-grade-list a.active {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
  transform: translateY(-2px);
}

.subject-catalog-library {
  min-height: 525px;
  padding-block: 86px 96px;
  background: #f4f2e9;
  border-bottom: 1px solid #e1dfd6;
}

.subject-catalog-section-head {
  display: flex;
  gap: 34px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 42px;
}

.subject-catalog-section-head h2 {
  max-width: 700px;
  margin-bottom: 0;
  font-size: clamp(37px, 4.5vw, 54px);
  font-weight: 870;
  line-height: 1.02;
}

.subject-catalog-tags {
  display: flex;
  max-width: 440px;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.subject-catalog-tags span {
  padding: 7px 11px;
  color: #5c6157;
  background: var(--white);
  border: 1px solid #deded5;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.subject-catalog-tags span.is-publisher {
  color: #526637;
  background: #edf6d8;
  border-color: #d6e5ba;
}

.subject-catalog-books {
  grid-template-columns: repeat(auto-fill, minmax(215px, 260px));
  gap: 34px;
}

.subject-catalog-books .book-cover {
  min-height: 340px;
}

.subject-catalog-empty {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 25px;
  align-items: center;
  padding: 36px;
  background: var(--white);
  border: 1px solid #deded5;
  border-radius: 27px;
}

.subject-catalog-empty-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  color: var(--ink);
  background: var(--lime);
  border-radius: 23px;
}

.subject-catalog-empty .eyebrow {
  margin-bottom: 5px;
}

.subject-catalog-empty h3 {
  margin-bottom: 6px;
  font-size: 25px;
}

.subject-catalog-empty p {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.subject-catalog-related {
  padding-block: 85px 96px;
  background: var(--paper);
}

.subject-catalog-related .subject-catalog-section-head {
  align-items: center;
}

.subject-catalog-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.subject-catalog-related-grid .grade-catalog-subject-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .subject-catalog-hero-grid {
    grid-template-columns: minmax(0, 1fr) 345px;
    gap: 42px;
  }

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

@media (max-width: 760px) {
  .subject-catalog-hero {
    padding-block: 30px 59px;
  }

  .subject-catalog-breadcrumbs {
    margin-bottom: 37px;
  }

  .subject-catalog-hero-grid {
    grid-template-columns: 1fr;
    gap: 37px;
  }

  .subject-catalog-copy h1 {
    font-size: clamp(43px, 13vw, 63px);
  }

  .subject-catalog-grade-card {
    max-width: 520px;
  }

  .subject-catalog-library,
  .subject-catalog-related {
    padding-block: 66px;
  }

  .subject-catalog-section-head {
    display: grid;
  }

  .subject-catalog-tags {
    justify-content: flex-start;
  }

  .subject-catalog-books {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 14px;
  }

  .subject-catalog-books--single {
    grid-template-columns: minmax(0, 235px);
  }

  .subject-catalog-books .book-cover {
    min-height: 275px;
  }

  .subject-catalog-empty {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .subject-catalog-empty .button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 520px) {
  .subject-catalog-kicker {
    margin-bottom: 17px;
  }

  .subject-catalog-copy > p {
    font-size: 14px;
  }

  .subject-catalog-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .subject-catalog-stats > div {
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 0;
    padding: 9px 10px;
  }

  .subject-catalog-stats dd {
    font-size: 22px;
  }

  .subject-catalog-stats dt {
    overflow: hidden;
    font-size: 8px;
    text-overflow: ellipsis;
  }

  .subject-catalog-grade-card {
    padding: 23px;
    border-radius: 23px;
  }

  .subject-catalog-grade-list {
    grid-template-columns: repeat(4, 1fr);
  }

  .subject-catalog-section-head h2 {
    font-size: 37px;
  }

  .subject-catalog-books--single {
    grid-template-columns: minmax(0, 210px);
  }

  .subject-catalog-books .book-cover {
    min-height: 245px;
  }

  .subject-catalog-empty {
    grid-template-columns: 1fr;
    padding: 25px;
  }

  .subject-catalog-empty .button {
    grid-column: auto;
  }

  .subject-catalog-related-grid {
    grid-template-columns: 1fr;
  }
}

/* Editorial copy and FAQ for catalog landings */
.landing-editorial-section {
  padding-block: 90px 100px;
  background: var(--white);
  border-top: 1px solid #e7e6df;
}

.landing-editorial {
  max-width: 1050px;
  margin-inline: auto;
}

.landing-editorial-head {
  max-width: 850px;
  margin-bottom: 43px;
}

.landing-editorial-head h2 {
  margin-bottom: 18px;
  font-size: clamp(39px, 5vw, 59px);
  font-weight: 880;
  line-height: 1.02;
}

.landing-editorial-head > p {
  max-width: 790px;
  margin-bottom: 0;
  color: #555a51;
  font-size: 17px;
  line-height: 1.72;
}

.landing-editorial-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(285px, 0.75fr);
  gap: 65px;
  align-items: start;
}

.landing-editorial-prose {
  color: #555a51;
  font-size: 14px;
  line-height: 1.8;
}

.landing-editorial-prose p:not(:last-child) {
  margin-bottom: 20px;
}

.landing-editorial-prose p:last-child {
  margin-bottom: 0;
}

.landing-editorial-checklist {
  padding: 27px;
  color: var(--white);
  background: var(--ink);
  border-radius: 24px;
  box-shadow: 8px 9px 0 rgb(25 27 24 / 10%);
}

.landing-editorial-check-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 19px;
  place-items: center;
  color: var(--ink);
  background: var(--lime);
  border-radius: 12px;
  font-size: 20px;
  font-weight: 900;
}

.landing-editorial-checklist h3 {
  margin-bottom: 19px;
  font-size: 22px;
  line-height: 1.15;
}

.landing-editorial-checklist ol {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  counter-reset: landing-check;
  list-style: none;
}

.landing-editorial-checklist li {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 9px;
  color: rgb(255 255 255 / 68%);
  counter-increment: landing-check;
  font-size: 11px;
  line-height: 1.55;
}

.landing-editorial-checklist li::before {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  color: var(--ink);
  background: rgb(189 246 83 / 82%);
  border-radius: 8px;
  content: counter(landing-check);
  font-size: 9px;
  font-weight: 850;
}

.landing-faq {
  display: grid;
  grid-template-columns: 315px minmax(0, 1fr);
  gap: 65px;
  align-items: start;
  padding-top: 65px;
  margin-top: 65px;
  border-top: 1px solid #e4e4dc;
}

.landing-faq-heading h3 {
  margin-bottom: 0;
  font-size: 31px;
  font-weight: 860;
  line-height: 1.08;
}

.landing-faq-list {
  border-top: 1px solid var(--ink);
}

.landing-faq-list details {
  border-bottom: 1px solid #dfdfd7;
}

.landing-faq-list summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding-block: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  list-style: none;
}

.landing-faq-list summary::-webkit-details-marker {
  display: none;
}

.landing-faq-list summary span {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  background: #f0f1e9;
  border-radius: 50%;
  font-size: 16px;
  transition: background 160ms ease, transform 160ms ease;
}

.landing-faq-list details[open] summary span {
  background: var(--lime);
  transform: rotate(45deg);
}

.landing-faq-list details p {
  max-width: 680px;
  padding: 0 45px 21px 0;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

@media (max-width: 820px) {
  .landing-editorial-section {
    padding-block: 70px 78px;
  }

  .landing-editorial-body {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .landing-editorial-checklist {
    max-width: 530px;
  }

  .landing-faq {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .landing-faq-heading {
    max-width: 470px;
  }
}

@media (max-width: 520px) {
  .landing-editorial-head h2 {
    font-size: 38px;
  }

  .landing-editorial-head > p {
    font-size: 15px;
  }

  .landing-editorial-prose {
    font-size: 13px;
  }

  .landing-editorial-checklist {
    padding: 24px;
    border-radius: 21px;
  }

  .landing-faq {
    padding-top: 50px;
    margin-top: 50px;
  }

  .landing-faq-heading h3 {
    font-size: 28px;
  }

  .landing-faq-list summary {
    font-size: 13px;
  }

  .landing-faq-list details p {
    padding-right: 0;
  }
}
