.textbook-page {
    --textbook-ink: #24252a;
    --textbook-muted: #657078;
    --textbook-teal: #08c2cf;
    --textbook-teal-dark: #087e86;
    --textbook-yellow: #f8ca73;
    --textbook-line: #dce5e1;
    min-width: 0;
    padding: 40px 0 96px;
    color: var(--textbook-ink);
    background: #f4f7f4;
    font-family: Montserrat, "Montserrat-Alternates", sans-serif;
}

.textbook-container { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.textbook-breadcrumbs { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 24px; color: #84908a; font-size: 12px; font-weight: 700; }
.textbook-breadcrumbs a { color: var(--textbook-teal-dark); }
.textbook-breadcrumbs a:hover { text-decoration: underline; }
.textbook-hero { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: center; gap: 38px; padding: 30px; background: #fff; border: 1px solid var(--textbook-line); border-radius: 30px; box-shadow: 0 18px 56px rgba(23, 47, 42, .08); }
.textbook-cover { position: relative; width: 240px; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; color: #fff; background: #061125; border-radius: 24px; }
.textbook-cover::after { content: ""; position: absolute; width: 120px; height: 120px; right: -30px; bottom: -30px; background: var(--textbook-yellow); border-radius: 50%; }
.textbook-cover img { position: relative; z-index: 2; width: 100%; height: 100%; object-fit: cover; }
.textbook-cover span { color: var(--textbook-teal); font-size: 48px; font-weight: 900; }
.textbook-cover strong { position: absolute; right: 20px; bottom: 14px; z-index: 1; color: var(--textbook-ink); font-size: 28px; }
.textbook-hero__copy { min-width: 0; }
.textbook-section-heading p,
.textbook-progress > p:first-child { margin: 0 0 10px; color: var(--textbook-teal-dark); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.textbook-hero h1 { max-width: 800px; margin: 0; font-size: clamp(38px, 5vw, 62px); line-height: 1; letter-spacing: -.055em; overflow-wrap: break-word; }
.textbook-description { max-width: 780px; margin: 18px 0 0; color: var(--textbook-muted); font-size: 16px; line-height: 1.65; }
.textbook-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; padding: 0; list-style: none; }
.textbook-facts li { padding: 8px 10px; color: #52615a; background: #f0f4f1; border-radius: 9px; font-size: 11px; }
.textbook-facts strong { color: var(--textbook-ink); }
.textbook-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.textbook-hero__actions form { margin: 0; }
.textbook-button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 17px; border: 1px solid transparent; border-radius: 12px; font: inherit; font-size: 12px; font-weight: 850; cursor: pointer; }
.textbook-button--primary { color: #fff; background: var(--textbook-teal); box-shadow: 0 12px 25px rgba(8, 194, 207, .2); }
.textbook-button--primary:hover { background: var(--textbook-teal-dark); }
.textbook-button--secondary { color: var(--textbook-ink); background: #fff; border-color: #cdd8d2; }
.textbook-button--secondary:hover,
.textbook-button--secondary.is-active { background: #fff3d8; border-color: var(--textbook-yellow); }
.textbook-favorite { width: 46px; height: 46px; display: grid; place-items: center; padding: 0; color: #8a9590; background: #fff; border: 1px solid #cdd8d2; border-radius: 50%; font: inherit; cursor: pointer; transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease; }
.textbook-favorite span { font-size: 27px; line-height: 1; transform: translateY(-1px); }
.textbook-favorite:hover,
.textbook-favorite:focus-visible { color: #c93643; background: #fff4f5; border-color: #e5aab0; outline: none; transform: translateY(-1px); }
.textbook-favorite:focus-visible { box-shadow: 0 0 0 3px rgba(201, 54, 67, .18); }
.textbook-favorite.is-active { color: #d7283b; background: #fff0f2; border-color: #e49aa3; }
.textbook-favorite:disabled { opacity: .6; cursor: wait; transform: none; }

.textbook-learning-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 26px; margin-top: 28px; }
.textbook-syllabus { min-width: 0; padding: 34px; background: #fff; border: 1px solid var(--textbook-line); border-radius: 30px; }
.textbook-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; padding-bottom: 26px; border-bottom: 1px solid var(--textbook-line); }
.textbook-section-heading h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.02; letter-spacing: -.045em; }
.textbook-section-heading > span { flex: 0 0 auto; padding: 8px 10px; color: #58645e; background: #f0f4f1; border-radius: 9px; font-size: 10px; font-weight: 800; }
.textbook-part { padding: 30px 0 4px; }
.textbook-part + .textbook-part { border-top: 1px solid var(--textbook-line); }
.textbook-part__heading { display: flex; align-items: baseline; gap: 13px; margin-bottom: 14px; }
.textbook-part__heading span { color: var(--textbook-teal-dark); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.textbook-part__heading h3 { margin: 0; font-size: 20px; }
.lesson-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.lesson-row { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 15px; color: inherit; background: #f7f9f7; border: 1px solid transparent; border-radius: 15px; transition: border-color .16s ease, background-color .16s ease, transform .16s ease; }
.lesson-row:hover,
.lesson-row:focus-visible { background: #eefafb; border-color: rgba(8, 194, 207, .42); outline: none; transform: translateX(3px); }
.lesson-row__number { width: 42px; height: 42px; display: grid; place-items: center; color: var(--textbook-teal-dark); background: #dff5f4; border-radius: 12px; font-size: 11px; font-weight: 900; }
.lesson-row__copy { min-width: 0; display: grid; gap: 4px; }
.lesson-row__copy small { color: #84908a; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.lesson-row__copy strong { min-width: 0; font-size: 14px; line-height: 1.35; }
.lesson-row__meta { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.lesson-status,
.lesson-tasks { display: inline-flex; align-items: center; gap: 5px; padding: 7px 8px; color: #6b7771; background: #fff; border: 1px solid #dce3df; border-radius: 8px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.lesson-status i { font-style: normal; }
.lesson-status.is-read { color: #087e56; background: #e2f6ed; border-color: #b5dfca; }
.lesson-tasks { color: #705611; background: #fff6df; border-color: #f0dcae; }
.lesson-row__meta > b { color: var(--textbook-teal-dark); font-size: 17px; }
.textbook-empty { padding: 42px 20px; color: var(--textbook-muted); text-align: center; }

.textbook-progress { position: sticky; top: 28px; padding: 25px; color: #fff; background: #24252a; border-radius: 24px; box-shadow: 0 20px 45px rgba(6, 17, 37, .16); }
.textbook-progress__value { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.textbook-progress h2 { margin: 0; font-size: 22px; line-height: 1.2; }
.textbook-progress__value strong { color: var(--textbook-yellow); font-size: 30px; }
.textbook-progress progress { width: 100%; height: 8px; display: block; margin: 17px 0 20px; overflow: hidden; appearance: none; background: rgba(255,255,255,.14); border: 0; border-radius: 99px; }
.textbook-progress progress::-webkit-progress-bar { background: rgba(255,255,255,.14); }
.textbook-progress progress::-webkit-progress-value { background: var(--textbook-teal); border-radius: 99px; }
.textbook-progress progress::-moz-progress-bar { background: var(--textbook-teal); border-radius: 99px; }
.textbook-progress dl { display: grid; gap: 10px; margin: 0; }
.textbook-progress dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(255,255,255,.12); }
.textbook-progress dt { color: #bfc8c4; font-size: 10px; }
.textbook-progress dd { margin: 0; color: #fff; font-size: 11px; font-weight: 850; }
.textbook-progress__formula { margin: 17px 0 0; color: #bfc8c4; font-size: 10px; line-height: 1.55; }
.textbook-progress__lock { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 20px; background: rgba(248, 202, 115, .14); border-radius: 13px; font-size: 19px; }
.textbook-progress > .textbook-button { width: 100%; margin-top: 20px; color: var(--textbook-ink); }

@media (max-width: 940px) {
    .textbook-learning-layout { grid-template-columns: 1fr; }
    .textbook-progress { position: static; }
}

@media (max-width: 700px) {
    .textbook-page { padding: 26px 0 72px; }
    .textbook-container { width: min(100% - 28px, 1180px); }
    .textbook-hero { grid-template-columns: 1fr; padding: 20px; }
    .textbook-cover { width: min(240px, 100%); justify-self: center; }
    .textbook-hero h1 { font-size: clamp(32px, 10vw, 46px); }
    .textbook-syllabus { padding: 22px 16px; border-radius: 22px; }
    .textbook-section-heading { align-items: flex-start; flex-direction: column; }
    .lesson-row { grid-template-columns: 38px minmax(0, 1fr); gap: 11px; padding: 12px; }
    .lesson-row__number { width: 38px; height: 38px; }
    .lesson-row__meta { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
    .lesson-row__meta > b { display: none; }
}

@media (max-width: 430px) {
    .textbook-hero__actions { width: 100%; }
    .textbook-hero__actions .textbook-button { flex: 1 1 auto; }
    .lesson-status { font-size: 0; }
    .lesson-status i { font-size: 11px; }
}

/* Вводный текст под шапкой учебника. */
.textbook-intro { max-width: 860px; margin: 30px 0 0; padding: 0 4px; color: #44524c; font-size: 16px; line-height: 1.7; }
.textbook-intro p { margin: 0 0 .9em; }
.textbook-intro p:last-child { margin-bottom: 0; }
