/* Textbook authoring preview reuses the approved family journal skin. */
.textbook-editorial__brand-mark { display: grid; place-items: center; width: 45px; height: 48px; border-radius: 14px; background: var(--family-yellow); color: var(--family-ink); font-family: var(--family-display); font-size: 30px; }
.textbook-editorial .family-nav [aria-current] { color: var(--family-blue); }
.textbook-editorial .family-journal > .family-preview { margin-bottom: 28px; }
.textbook-editorial .family-journal__lead { max-width: 760px; }
.textbook-editorial .family-post__image { aspect-ratio: 3 / 2; }
.textbook-editorial .family-post__image > img { object-fit: contain; }
.textbook-editorial .family-post__image:hover > img { transform: none; }
.textbook-editorial__grade-filter { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 24px; font-size: 13px; }
.textbook-editorial__grade-filter label { font-weight: 700; }
.textbook-editorial__grade-filter .ui-select { width: 160px; height: 44px; min-height: 44px; padding: 8px 32px 8px 12px; border: 1px solid var(--family-line); border-radius: 12px; background-color: var(--family-paper); color: var(--family-ink); font: inherit; }
.textbook-editorial__grade-filter .family-back { margin: 0; }
.textbook-editorial__article-links { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.textbook-editorial .family-article-header .family-preview { display: inline-block; margin: 0 0 20px; }
.textbook-editorial .family-article-meta > a { color: var(--family-blue); font-weight: 700; }
.textbook-editorial .family-article-body pre { overflow-x: auto; max-width: 100%; padding: 20px; border: 1px solid var(--family-line); border-radius: 16px; background: var(--family-soft-blue); white-space: pre; }
.textbook-editorial .family-article-body code { font-family: var(--font-mono, monospace); }
.textbook-editorial .family-article-body .article-cover,
.textbook-editorial .family-article-body > .article-body img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 560px;
  margin-inline: auto;
  object-fit: contain;
}
.textbook-editorial .textbook-tools { margin: 40px 0; padding: 28px; border-color: var(--family-line); border-radius: var(--family-radius); background: var(--family-paper); }
.textbook-editorial .textbook-tools :is(.textbook-note, .textbook-status) { color: var(--family-muted); }
.textbook-editorial .textbook-tools .article-eyebrow { margin-bottom: 12px; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--family-blue); }
.textbook-editorial .textbook-tools .btn { border-radius: 14px; font-family: var(--family-body); }
.textbook-editorial .textbook-tools .btn-primary { background: var(--family-blue); color: var(--family-paper); }
.textbook-editorial .textbook-tools .btn-secondary { border-color: var(--family-line); background: var(--family-paper); color: var(--family-ink); }
.textbook-editorial .textbook-tools__navigation { gap: 12px; }
.textbook-editorial .textbook-tools__navigation a { font-size: 12px; }
.textbook-editorial .textbook-diagram__scroll { border-color: var(--family-line); background: var(--family-paper); }
.textbook-editorial .textbook-diagram__scroll img { width: 1200px; max-width: none; max-height: none; height: auto; margin: 0; }
.textbook-editorial .textbook-personal { margin-top: 28px; padding: 24px; border: 0; border-radius: 20px; background: var(--family-soft-green); }
.textbook-editorial .textbook-personal h2 { margin-top: 0; }
.textbook-editorial .textbook-personal--guest {
  padding: var(--space-5);
  border: 1px solid var(--family-line);
  border-radius: var(--radius-lg);
  background: var(--family-soft-blue);
}
.textbook-editorial .textbook-personal--guest > p { color: var(--family-muted); }
.textbook-editorial .family-article-body .textbook-tools :is(h2,h3) { font-family: var(--family-body); }
.textbook-editorial .textbook-practice .learner-lab-native-player p { margin-bottom: 16px; }
.textbook-editorial__course { padding: 32px; border-radius: var(--family-radius); background: var(--family-blue); color: var(--family-paper); }
.textbook-editorial .textbook-editorial__course h2 { margin-top: 0; color: var(--family-paper); font-size: 28px; line-height: 1.4; }
.textbook-editorial__course p:last-child { margin-bottom: 0; }
.textbook-editorial .textbook-editorial__course a { text-decoration: none; }
.textbook-editorial .family-footer__main { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 700px) {
  .textbook-editorial .family-header__inner { gap: 12px; }
  .textbook-editorial .family-brand__text { font-size: 18px; }
  .textbook-editorial .family-brand__text > span { font-size: 8px; letter-spacing: .04em; }
  .textbook-editorial__brand-mark { width: 38px; height: 42px; font-size: 27px; }
  .textbook-editorial .family-header__actions { gap: 8px; }
  .textbook-editorial .family-header__actions > .family-icon-button { display: none; }
  .textbook-editorial .family-article-header h1 { font-size: 28px; }
  .textbook-editorial .family-journal h1 { font-size: 30px; }
  .textbook-editorial .textbook-tools { padding: 18px; }
  .textbook-editorial .textbook-personal { padding: 20px 16px; }
  .textbook-editorial .textbook-personal--guest { padding: var(--space-4); }
  .textbook-editorial .textbook-personal .textbook-tools__actions { align-items: stretch; flex-direction: column; }
  .textbook-editorial .textbook-personal .btn { white-space: normal; text-align: center; }
  .textbook-editorial__course { padding: 24px 20px; }
  .textbook-editorial .textbook-editorial__course h2 { font-size: 24px; }
  .textbook-editorial .family-footer__main { grid-template-columns: 1fr; }
}

.textbook-classes { margin-block: 24px 32px; }
.textbook-classes h2, .textbook-catalog-heading, .textbook-sections__section h2 {
  margin: 0 0 12px;
  font-size: var(--text-xl);
  font-weight: 800;
}
.textbook-classes__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.textbook-class {
  padding: 4px 16px 10px;
  border: 1px solid var(--family-line);
  border-radius: var(--radius-lg);
  background: var(--family-paper);
}
.textbook-class summary, .textbook-class h3 {
  min-height: 44px;
  margin: 0;
  padding-block: 10px;
  font-size: var(--text-base);
  font-weight: 800;
}
.textbook-class ul, .textbook-skills { margin: 0; padding: 0; list-style: none; }
.textbook-class a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-top: 1px solid var(--family-line);
  color: var(--family-ink);
  font-weight: 700;
}
.textbook-class a:hover { color: var(--family-blue); }
.textbook-class__count { color: var(--family-muted); font-size: var(--text-sm); white-space: nowrap; }
.textbook-catalog-filters { margin-bottom: 24px; }
.textbook-catalog-filters summary, .textbook-class summary { cursor: pointer; }
.textbook-catalog-filters summary { padding-block: 10px; color: var(--family-blue); }
.textbook-catalog-filters summary:focus-visible, .textbook-class summary:focus-visible {
  outline: 3px solid var(--family-blue);
  outline-offset: 2px;
}
.textbook-sections__nav, .textbook-catalog-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.textbook-catalog-pages { justify-content: center; margin-top: 24px; }
.textbook-sections__section { margin-top: 24px; }
.textbook-sections__section h2 { scroll-margin-top: 90px; }
.textbook-sections__nav { margin-bottom: 12px; }
.textbook-skills {
  padding-inline: 16px;
  border: 1px solid var(--family-line);
  border-radius: var(--radius-lg);
  background: var(--family-paper);
}
.textbook-skill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 10px;
}
.textbook-skill + .textbook-skill { border-top: 1px solid var(--family-line); }
.textbook-skill h3 { margin: 0; font-size: var(--text-base); font-weight: 750; }
.textbook-skill__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.textbook-skill__actions a { display: inline-flex; align-items: center; min-height: 44px; }
.textbook-skill__actions a:first-child { color: var(--family-blue); font-weight: 700; }

.textbook-class--mobile { display: none; }
@media (max-width: 700px) {
  .textbook-classes__grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .textbook-class--desktop { display: none; }
  .textbook-class--mobile { display: block; padding-bottom: 0; }
  .textbook-class[open] { padding-bottom: 6px; }
  .textbook-skill { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* Catalog: a shared visual hierarchy for every class and subject. */
.textbook-catalog-intro { margin-bottom: 32px; }
.textbook-catalog-intro--home {
  padding: 36px 40px; border-radius: 28px;
  background: var(--family-soft-blue);
  position: relative; isolation: isolate; overflow: hidden;
}
.textbook-catalog-intro--home::after {
  content: "ё"; position: absolute; right: 32px; top: -62px; z-index: -1;
  font: 360px/1 var(--family-display); color: var(--family-paper);
  transform: rotate(12deg); pointer-events: none;
}
.textbook-editorial .textbook-catalog-kicker {
  margin: 0 0 12px; color: var(--family-blue); font-size: 12px;
  font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
}
.textbook-editorial .textbook-catalog-intro h1 {
  font-size: clamp(30px, 3.7vw, 48px); line-height: 1.12;
  margin: 0 0 16px; max-width: 850px;
}
.textbook-editorial .textbook-catalog-intro .family-journal__lead {
  max-width: 680px; font-size: 17px; line-height: 1.6; margin-bottom: 24px;
}
.textbook-catalog-intro .family-search-form { max-width: 700px; margin: 0; }
.textbook-editorial .textbook-catalog-intro .family-library-search { background: var(--family-paper); margin: 0; }
.textbook-catalog-account { max-width: 700px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--family-line); }
.textbook-editorial .textbook-catalog-account p { margin: 0 0 16px; font-size: 15px; line-height: 1.6; }
.textbook-catalog-account__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; font-size: 14px; }
.textbook-catalog-account__actions .family-button { white-space: normal; text-align: center; }
.textbook-classes__heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.textbook-classes__heading h2 { margin: 0; font-size: 26px; }
.textbook-classes__heading p { margin: 0; color: var(--family-muted); font-size: 14px; }
.textbook-classes__grid { gap: 20px; }
.textbook-class {
  --class-tint: var(--family-soft-blue); --class-accent: var(--family-blue);
  padding: 0 18px 12px; border-radius: 22px; overflow: hidden;
  transition: border-color .18s ease;
}
.textbook-class--1, .textbook-class--5, .textbook-class--9 { --class-tint: var(--family-soft-yellow); --class-accent: var(--family-ink); }
.textbook-class--3, .textbook-class--7 { --class-tint: var(--family-soft-green); --class-accent: var(--family-green-ink); }
.textbook-class--4, .textbook-class--8 { --class-tint: var(--family-soft-pink); --class-accent: var(--family-pink-ink); }
.textbook-class:hover, .textbook-class:focus-within { border-color: var(--class-accent); }
.textbook-class h3, .textbook-class summary {
  display: flex; align-items: center; gap: 12px;
  margin: 0 -18px 6px; padding: 16px 18px;
  background: var(--class-tint); font-size: 21px; line-height: 1;
}
.textbook-class__number {
  display: grid; place-items: center; flex: 0 0 48px; height: 48px;
  border-radius: 15px; background: var(--family-paper); color: var(--class-accent);
  font: 30px/1 var(--family-display);
}
.textbook-class a { display: grid; grid-template-columns: 1fr auto 18px; min-height: 52px; font-size: 15px; border-radius: 8px; }
.textbook-class li:first-child a { border-top: 0; }
.textbook-class a:hover { background: var(--class-tint); color: var(--class-accent); }
.textbook-class a:focus-visible { outline: 3px solid var(--class-accent); outline-offset: 2px; }
.textbook-class__count { font-size: 12px; font-weight: 600; }
.textbook-class__arrow { color: var(--class-accent); font-size: 19px; }
.textbook-sections__nav { gap: 10px; margin-block: 20px 28px; }
.textbook-sections__section { margin-top: 32px; }
.textbook-sections__section h2 { border-left: 5px solid var(--family-yellow); padding-left: 14px; font-size: 23px; margin-bottom: 16px; }
.textbook-skills { padding-inline: 22px; border-radius: 22px; }
.textbook-skill { padding-block: 16px; gap: 24px; }
.textbook-skill h3 { line-height: 1.5; max-width: 680px; }
.textbook-skill__actions { flex-shrink: 0; }
.textbook-skill__actions .family-button { background: var(--family-soft-blue); border-color: transparent; }
@media (min-width: 701px) and (max-width: 1000px) {
  .textbook-classes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .textbook-skill { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (max-width: 700px) {
  .textbook-catalog-intro--home { padding: 24px 20px; border-radius: 22px; }
  .textbook-catalog-intro--home::after { font-size: 220px; top: -24px; right: -10px; }
  .textbook-editorial .textbook-catalog-intro h1 { font-size: 32px; }
  .textbook-editorial .textbook-catalog-intro .family-journal__lead { font-size: 15px; margin-bottom: 20px; }
  .textbook-catalog-intro .family-library-search { padding: 6px; gap: 6px; }
  .textbook-catalog-intro .family-library-search > svg { display: none; }
  .textbook-catalog-intro .family-library-search input { flex: 1; width: 0; min-width: 0; padding-left: 6px; font-size: 14px; }
  .textbook-catalog-intro .family-button { padding-inline: 12px; }
  .textbook-classes__heading { display: block; }
  .textbook-classes__heading h2 { font-size: 23px; margin-bottom: 4px; }
  .textbook-classes__grid { gap: 12px; }
  .textbook-class summary { margin-bottom: 0; padding-block: 12px; list-style: none; }
  .textbook-class summary::-webkit-details-marker { display: none; }
  .textbook-class summary::after { content: "+"; margin-left: auto; font-size: 24px; color: var(--class-accent); }
  .textbook-class[open] summary::after { content: "−"; }
  .textbook-class[open] summary { margin-bottom: 6px; }
  .textbook-class__number { flex-basis: 42px; height: 42px; font-size: 27px; }
  .textbook-skills { padding-inline: 16px; }
  .textbook-skill { gap: 6px; }
  .textbook-skill__actions { gap: 16px; }
  .textbook-sections__section h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { .textbook-class { transition: none; } }

.textbook-account-invite { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 28px; margin: 24px 0 36px; padding: 28px 32px; background: var(--family-soft-yellow); border-radius: 22px; }
.textbook-editorial .textbook-account-invite h2 { margin: 0 0 8px; font-size: 27px; line-height: 1.3; }
.textbook-editorial .textbook-account-invite p { margin: 0 0 10px; font-size: 16px; line-height: 1.6; }
.textbook-account-invite ul { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 14px 0 0; list-style: none; }
.textbook-account-invite li { font-size: 13px; margin: 0; }
.textbook-account-invite li::before { content: '✓'; color: var(--family-green-ink); margin-right: 7px; font-weight: 800; }
.textbook-account-invite__actions { display: flex; flex-direction: column; align-items: center; gap: 14px; font-size: 14px; }
.textbook-account-invite__actions a { text-decoration: none; }
.textbook-header-login { font-size: 14px; font-weight: 700; }
.textbook-editorial .textbook-personal--guest { background: transparent; border: 0; padding: 0; }
.textbook-personal--guest > h2 { display: none; }
.textbook-personal--guest .textbook-account-invite { grid-template-columns: 1fr; padding: 28px; }
.textbook-personal--guest .textbook-account-invite__actions { align-items: flex-start; }
.textbook-editorial .family-toc { background: var(--family-soft-blue); padding: 20px; border-radius: 18px; }
.textbook-editorial .family-toc a { color: var(--family-ink); padding: 12px 0; font-size: 13px; }
.textbook-editorial .family-toc a:hover { color: var(--family-blue); }
.textbook-editorial .family-article-body .article-body h2 { border-left: 4px solid var(--family-yellow); padding-left: 16px; }
.textbook-editorial .textbook-tools { border: 0; border-top: 1px solid var(--family-line); border-radius: 0; padding: 28px 0; }
.textbook-editorial .textbook-practice { background: var(--family-soft-blue); padding: 24px; border-radius: 22px; margin-top: 24px; }
.textbook-account-page, .textbook-checklists-page { padding-top: 36px; padding-bottom: 64px; }
.textbook-account-page > .family-back { display: inline-block; margin-bottom: 20px; }
.textbook-account-benefits { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-block: 30px; }
.textbook-account-benefits section { padding: 24px; border: 1px solid var(--family-line); border-radius: 20px; }
.textbook-account-benefits span { font: 30px var(--family-display); color: var(--family-blue); }
.textbook-account-benefits h2 { font-size: 21px; margin: 14px 0 10px; }
.textbook-account-benefits p, .textbook-account-start p { line-height: 1.7; }
.textbook-account-start { padding: 28px; border-radius: 22px; background: var(--family-soft-green); max-width: 780px; }
.textbook-account-start h2 { font-size: 25px; margin-bottom: 12px; }
.textbook-account-start .family-back { display: block; margin-block: 18px; }
.textbook-account-note { font-size: 13px; color: var(--family-muted); margin-top: 20px; }
.textbook-checklists-page .textbook-header { background: var(--family-soft-blue); padding: 28px; border-radius: 22px; margin-bottom: 24px; }
.textbook-checklists-page h1 { font: clamp(30px,4vw,44px)/1.2 var(--family-display); margin-block: 16px; }
.textbook-checklists-page .textbook-header p { max-width: 760px; line-height: 1.7; }
.textbook-checklists-page .textbook-gate { background: transparent; border: 0; padding: 0; max-width: none; }
.textbook-checklists-page .textbook-gate:has(.textbook-account-invite) > h2 { display: none; }
.textbook-checklists-page .textbook-filters { background: var(--family-paper); border-color: var(--family-line); border-radius: 20px; margin-block: 24px; }
.textbook-checklists-page .textbook-checklist { border-color: var(--family-line); border-radius: 18px; margin-bottom: 14px; background: var(--family-paper); }
.textbook-checklists-page .textbook-checklist > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 20px; padding: 20px; cursor: pointer; }
.textbook-checklists-page .textbook-checklist > summary::before { content: '+'; color: var(--family-blue); font-size: 24px; }
.textbook-checklists-page .textbook-checklist[open] > summary::before { content: '−'; }
.textbook-checklists-page .textbook-checklist[open] > summary { background: var(--family-soft-blue); border-radius: 18px 18px 0 0; }
.textbook-checklists-page .textbook-checklist__section h2 { font-size: 21px; margin-block: 24px 14px; }
.textbook-checklists-page .textbook-skills { border: 0; padding: 0; }
.textbook-checklists-page .textbook-skills > li { padding: 12px 0; border-bottom: 1px solid var(--family-line); }
@media(max-width: 1000px) { .textbook-account-invite { grid-template-columns: 1fr; } .textbook-account-invite__actions { align-items: flex-start; } }
@media(max-width: 700px) {
  .textbook-account-invite { padding: 22px 20px; gap: 20px; }
  .textbook-account-invite ul { flex-direction: column; }
  .textbook-account-invite .family-button { font-size: 14px; white-space: normal; text-align: center; }
  .textbook-editorial .textbook-account-invite h2 { font-size: 24px; }
  .textbook-header-login { font-size: 12px; }
  .textbook-editorial .family-header__actions { gap: 6px; }
  .textbook-editorial .family-header__actions > .family-button { padding-inline: 10px; font-size: 12px; }
  .textbook-account-benefits { grid-template-columns: 1fr; }
  .textbook-editorial .family-toc { position: static; max-height: none; }
  .textbook-checklists-page .textbook-header, .textbook-account-start { padding: 22px 20px; }
  .textbook-checklists-page .textbook-filters { display: grid; grid-template-columns: 1fr; }
  .textbook-checklists-page .textbook-checklist > summary { padding: 16px; }
  .textbook-checklists-page .textbook-checklist > summary .textbook-note { width: 100%; padding-left: 24px; }
}

.textbook-checklists-page .textbook-header { max-width: none; }
.textbook-skill h3 { flex: 1; }
.textbook-skill h3 a { display: flex; align-items: center; min-height: 44px; color: var(--family-ink); }
.textbook-skill h3 a:hover { color: var(--family-blue); text-decoration: underline; text-underline-offset: 4px; }

/* One readable article column, with an optional contents block above it. */
.textbook-editorial .family-article-layout { display: block; padding-top: 28px; }
.textbook-editorial .family-article-layout > :is(.family-toc, .family-article-body) { max-width: 800px; margin-inline: auto; }
.textbook-editorial .family-article-body > .article-summary { font-size: 18px; line-height: 1.75; font-weight: 400; }
.textbook-editorial .family-article-header__inner { max-width: none; }
.textbook-editorial .family-toc { position: static; max-height: none; margin-bottom: 28px; padding: 12px 20px; }
.textbook-editorial .family-toc__summary { margin-bottom: 0; }
.textbook-editorial .family-toc nav { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 24px; padding-top: 8px; }
@media(max-width:700px) { .textbook-editorial .family-toc nav { grid-template-columns: 1fr; } }
.textbook-editorial .family-article-body .textbook-account-invite ul { list-style: none; padding-left: 0; }
.textbook-editorial .family-article-body .textbook-account-invite li { list-style: none; }
.textbook-account-invite li::marker { content: ''; }

.textbook-practice__header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.textbook-editorial .textbook-practice__header h2 { margin: 0; font-size: 26px; line-height: 1.3; }
.textbook-practice__badge { padding: 5px 10px; border-radius: 999px; background: var(--family-paper); color: var(--family-blue); font-size: 12px; font-weight: 700; }

.textbook-vpr { padding-block: var(--textbook-page-top) 48px; }
.textbook-editorial .textbook-vpr h1 { margin: 0 0 12px; }
.textbook-vpr .family-search-form { margin-top: 18px; }
.textbook-vpr__grades { display: flex; flex-wrap: wrap; gap: 0 18px; border-bottom: 1px solid var(--family-line); margin-top: 22px; }
.textbook-vpr__grades a { display: inline-flex; align-items: center; padding: 10px 0; min-height: 44px; border-bottom: 3px solid transparent; color: var(--family-muted); font-weight: 700; text-decoration: none; }
.textbook-vpr__grades a[aria-current] { color: var(--family-blue); border-color: currentColor; }
.textbook-vpr__group { padding-block: 20px; border-bottom: 1px solid var(--family-line); }
.textbook-vpr__group h2 { margin: 0 0 12px; font-size: 24px; }
.textbook-vpr__group > a + h2 { margin-top: 10px; }
.textbook-vpr__group h3 { margin: 16px 0 8px; }
.textbook-vpr__group p { margin: 0; }
.textbook-vpr__subjects, .textbook-vpr__documents { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.textbook-vpr__subjects a, .textbook-vpr__documents a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 12px; border-radius: 10px; background: var(--family-soft-blue); color: var(--family-ink); font-weight: 700; text-decoration: none; }
.textbook-vpr a:hover { color: var(--family-blue); }
.textbook-vpr a:focus-visible { outline: 2px solid var(--family-blue); outline-offset: 2px; }
.textbook-vpr__documents span, .textbook-vpr__sources { color: var(--family-muted); font-size: 14px; }
.textbook-vpr .textbook-vpr__sources { margin-top: 16px; }
.textbook-editorial .textbook-practice .learner-lab-native-player { margin-top: 8px; padding: 0; border: 0; background: transparent; }
.textbook-editorial .textbook-practice .learner-lab-native-player__content { padding: 0; }
.textbook-editorial .textbook-practice p.textbook-practice__title { margin: 0 0 16px; color: var(--family-muted); font-size: 13px; font-weight: 500; line-height: 1.5; }
.textbook-editorial .textbook-practice__instructions p { font-size: 16px; line-height: 1.6; margin: 0 0 16px; }
.textbook-editorial .textbook-practice__instructions p:last-child { margin-bottom: 0; }
.textbook-editorial .textbook-practice__start { margin-top: 32px; }
.textbook-editorial .textbook-practice .learner-lab-compare-navigation > .btn { margin: 0; }
.textbook-editorial .textbook-practice .learner-lab-compare-navigation > .btn-primary { min-width: 9em; }

/* Keep the same page edges and heading panel throughout the textbook. */
.textbook-editorial { --textbook-page-gutter: 40px; --textbook-page-top: 35px; }
.textbook-editorial .family-shell { width: min(1280px, calc(100% - 2 * var(--textbook-page-gutter))); max-width: none; }
.textbook-editorial .family-journal,
.textbook-editorial .textbook-checklists-page { padding-top: var(--textbook-page-top); }
.textbook-editorial .textbook-page-intro { padding: 36px 40px; border-radius: 28px; background: var(--family-soft-blue); }
.textbook-editorial .family-article-header.textbook-page-intro { margin-top: var(--textbook-page-top); }
.textbook-editorial .textbook-page-intro h1 { font-family: var(--family-display); font-size: clamp(30px, 3.7vw, 48px); line-height: 1.2; letter-spacing: -.045em; max-width: 1100px; margin: 12px 0 24px; }
.textbook-editorial .textbook-page-intro .family-back { display: inline-block; margin: 0 0 20px; }
@media(max-width: 1190px) {
  .textbook-editorial { --textbook-page-gutter: 24px; }
}
@media(max-width: 700px) {
  .textbook-editorial { --textbook-page-gutter: 18px; --textbook-page-top: 25px; }
  .textbook-editorial .textbook-page-intro { padding: 24px 20px; border-radius: 22px; }
  .textbook-editorial .textbook-page-intro h1 { font-size: 30px; line-height: 1.25; }
}
@media(max-width: 700px) {
  .textbook-editorial .textbook-practice { padding: 20px; }
  .textbook-editorial .textbook-practice__header h2 { font-size: 22px; }
}

/* Connected subject and class tabs around one compact topic sheet. */
.textbook-subject-tabs { display: flex; padding: 14px 0 0 58px; border-bottom: 1px solid var(--family-line); }
.textbook-subject-tabs a { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 10px 30px; margin-bottom: -1px; border: 1px solid transparent; border-bottom: 3px solid transparent; color: var(--family-muted); font-size: 16px; font-weight: 700; text-decoration: none; }
.textbook-subject-tabs a + a { border-left-color: var(--family-line); }
.textbook-subject-tabs a[aria-current] { color: var(--family-blue); background: var(--family-paper); border-bottom-color: var(--family-blue); }
.textbook-subject-tabs a:hover { color: var(--family-blue); background: var(--family-soft-blue); }
.textbook-study-layout { display: grid; grid-template-columns: 58px minmax(0,1fr); align-items: start; margin-top: 24px; margin-bottom: 48px; }
.textbook-study-page { align-self: stretch; min-width: 0; padding: 26px 30px; border-left: 1px solid var(--family-line); background: var(--family-paper); box-shadow: -5px 0 9px -9px var(--family-muted); }
.textbook-editorial .textbook-study-page .family-shell { width: 100%; }
.textbook-editorial .textbook-study-page .family-journal { padding: 0; }
.textbook-grade-tabs { display: grid; position: sticky; top: 112px; padding-top: 20px; }
.textbook-grade-tabs__item { --grade-tint: var(--family-soft-blue); display: grid; place-items: center; height: 56px; margin-right: -1px; border: 1px solid transparent; border-right: 0; border-radius: 28px 0 0 28px; background: var(--grade-tint); color: var(--family-ink); font-size: 23px; font-weight: 800; text-decoration: none; }
.textbook-grade-tabs__item--1, .textbook-grade-tabs__item--5, .textbook-grade-tabs__item--9 { --grade-tint: var(--family-soft-yellow); }
.textbook-grade-tabs__item--3, .textbook-grade-tabs__item--7 { --grade-tint: var(--family-soft-green); }
.textbook-grade-tabs__item--4, .textbook-grade-tabs__item--8 { --grade-tint: var(--family-soft-pink); }
.textbook-grade-tabs__item[aria-current] { position: relative; z-index: 1; background: var(--family-paper); border-color: var(--family-line); color: var(--family-blue); }
.textbook-grade-tabs__item:hover { color: var(--family-blue); box-shadow: inset 4px 0 var(--family-blue); }
.textbook-subject-tabs a:focus-visible, .textbook-grade-tabs a:focus-visible, .textbook-section-menu a:focus-visible { position: relative; z-index: 2; outline: 3px solid var(--family-blue); outline-offset: -3px; }
.textbook-editorial .textbook-catalog-intro--selection { display: flex; align-items: center; gap: 24px; justify-content: space-between; padding: 0; margin-bottom: 24px; background: transparent; border-radius: 0; }
.textbook-editorial .textbook-catalog-intro--selection h1 { margin: 0; font-size: 36px; font-family: var(--family-body); font-weight: 800; letter-spacing: -.03em; }
.textbook-catalog-intro--selection .family-search-form { width: 320px; flex: 0 1 320px; }
.textbook-catalog-intro--selection .family-library-search { padding: 4px 6px 4px 12px; }
.textbook-catalog-intro--selection .family-library-search input { height: 40px; font-size: 13px; }
.textbook-catalog-intro--selection .family-library-search > svg { width: 16px; height: 16px; }
.textbook-editorial .textbook-catalog-intro--selection .family-button { min-height: 40px; padding: 8px 14px; font-size: 13px; }
.textbook-topic-browser__results { min-width: 0; }
.textbook-section-menu { margin-bottom: 16px; }
.textbook-section-menu nav { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--family-line); }
.textbook-section-menu a { display: flex; align-items: center; min-height: 40px; padding: 6px 12px; border-bottom: 2px solid transparent; font-size: 13px; text-decoration: none; }
.textbook-section-menu a[aria-current] { color: var(--family-blue); border-bottom-color: var(--family-blue); background: var(--family-soft-blue); }
.textbook-section-menu a:hover { color: var(--family-blue); }
.textbook-topic-tree { columns: 18rem 3; column-gap: 30px; }
.textbook-topic-tree .textbook-sections__section { break-inside: avoid; margin: 0 0 26px; }
.textbook-editorial .textbook-topic-tree h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 21px; line-height: 1.35; color: var(--family-blue); }
.textbook-editorial .textbook-topic-tree .textbook-skills { margin: 0; border: 0; padding: 0; border-radius: 0; }
.textbook-topic-tree .textbook-skill { display: flex; flex-direction: row; align-items: center; flex-wrap: nowrap; gap: 6px; padding: 0; border: 0; }
.textbook-topic-tree .textbook-skill h3 { font-size: 15px; font-weight: 500; line-height: 1.4; }
.textbook-topic-tree .textbook-skill h3 a { min-height: 36px; padding: 5px 0; }
.textbook-topic-tree .textbook-skill__actions { flex: 0 0 36px; }
.textbook-topic-tree .textbook-skill__actions a { justify-content: center; width: 36px; min-height: 36px; padding: 0; color: var(--family-blue); font-size: 19px; }
.textbook-topic-tree .textbook-skill__actions a:hover { background: var(--family-soft-blue); border-radius: 6px; }
.textbook-editorial .textbook-topic-browser .family-result-count { margin: 0 0 16px; font-size: 12px; }
.textbook-subject-grades { display: grid; gap: 12px; padding: 0; }
.textbook-subject-grade { --class-tint: var(--family-soft-blue); display: flex; align-items: stretch; gap: 20px; border: 1px solid var(--family-line); border-radius: 8px; overflow: hidden; background: var(--family-paper); }
.textbook-subject-grade:is(.textbook-class--1,.textbook-class--5,.textbook-class--9) { --class-tint: var(--family-soft-yellow); }
.textbook-subject-grade:is(.textbook-class--3,.textbook-class--7) { --class-tint: var(--family-soft-green); }
.textbook-subject-grade:is(.textbook-class--4,.textbook-class--8) { --class-tint: var(--family-soft-pink); }
.textbook-subject-grade__number { display: grid; place-items: center; flex: 0 0 52px; background: var(--class-tint); font: 26px/1 var(--family-display); }
.textbook-subject-grade__body { flex: 1; min-width: 0; padding-block: 16px; }
.textbook-subject-grade h2 { margin: 0 0 6px; font-size: 22px; }
.textbook-subject-grade nav { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.textbook-subject-grade nav a { font-size: 13px; }
.textbook-subject-grade nav span { color: var(--family-muted); margin-left: 4px; }
.textbook-subject-grade > .family-button { align-self: center; margin-right: 20px; white-space: nowrap; }
.textbook-article-neighbours { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 32px 0; }
.textbook-article-neighbours a { padding: 18px; border: 1px solid var(--family-line); border-radius: 16px; font-size: 15px; line-height: 1.5; }
.textbook-article-neighbours span { display: block; margin-bottom: 8px; color: var(--family-muted); font-size: 12px; }
.textbook-article-neighbours .textbook-article-neighbours__all { grid-column: 1/-1; text-align: center; background: var(--family-soft-blue); border: 0; }
@media(max-width: 1000px) {
  .textbook-editorial .textbook-catalog-intro--selection { display: block; }
  .textbook-catalog-intro--selection .family-search-form { width: 100%; margin-top: 16px; }
  .textbook-topic-tree { columns: 18rem 2; }
}
@media(max-width: 700px) {
  .textbook-subject-tabs { padding: 8px 0 0; }
  .textbook-subject-tabs a { flex: 1; padding: 8px 6px; font-size: 13px; text-align: center; }
  .textbook-study-layout { display: block; margin-top: 16px; }
  .textbook-grade-tabs { display: flex; position: static; padding: 0; }
  .textbook-grade-tabs__item { flex: 1; min-width: 0; height: 44px; margin: 0 0 -1px; border: 1px solid transparent; border-bottom: 0; border-radius: 14px 14px 0 0; font-size: 18px; }
  .textbook-study-page { padding: 20px 12px; border: 1px solid var(--family-line); box-shadow: none; }
  .textbook-editorial .textbook-catalog-intro--selection h1 { font-size: 27px; }
  .textbook-section-menu a { padding-inline: 8px; min-height: 44px; }
  .textbook-topic-tree { columns: 1; }
  .textbook-topic-tree .textbook-skill h3 a { min-height: 44px; }
  .textbook-topic-tree .textbook-skill__actions, .textbook-topic-tree .textbook-skill__actions a { width: 44px; min-height: 44px; flex-basis: 44px; }
  .textbook-subject-grade { gap: 12px; flex-wrap: wrap; }
  .textbook-subject-grade__number { flex-basis: 42px; }
  .textbook-subject-grade__body { padding: 12px 12px 4px 0; }
  .textbook-subject-grade > .family-button { margin: 0 12px 12px auto; }
  .textbook-article-neighbours { grid-template-columns: minmax(0,1fr); }
}
@media(max-width: 380px) {
  .textbook-editorial .family-header .family-brand__text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Article headers share the reading measure, without a second hero banner. */
.textbook-editorial .family-article-header.textbook-page-intro { max-width: 800px; margin: 0 auto; padding: 0 0 18px; border-radius: 0; border-bottom: 1px solid var(--family-line); background: transparent; }
.textbook-editorial .family-article-header.textbook-page-intro h1 { font-family: var(--family-body); font-size: 32px; line-height: 1.3; letter-spacing: -.025em; margin: 12px 0 14px; }
.textbook-editorial .family-article-header.textbook-page-intro .family-back { margin: 0; }
.textbook-editorial .textbook-editorial__article-links { justify-content: flex-start; gap: 10px 20px; }
.textbook-editorial .family-article-meta { gap: 10px 20px; margin: 0; font-size: 13px; }
.textbook-editorial .family-article-layout { padding-top: 16px; }
.textbook-editorial .family-toc { padding: 8px 16px; margin-bottom: 20px; border-radius: 10px; }
.textbook-editorial .family-toc__summary { min-height: 36px; padding: 6px 0; font-size: 12px; }
@media(max-width: 700px) {
  .textbook-editorial .family-article-header.textbook-page-intro h1 { font-size: 24px; line-height: 1.3; }
  .textbook-editorial .family-article-meta { font-size: 12px; }
}
