/* ================================================================ SEO-блок на главной */
.seo-block { padding: 48px 16px 24px; border-top: 1px solid var(--line, #ecd8bd); }
.seo-in { max-width: 1100px; margin: 0 auto; }
.seo-block h2 { font: 800 clamp(22px, 3vw, 30px)/1.2 var(--head, 'Rubik'), system-ui, sans-serif; margin: 0 0 12px; }
.seo-block p { line-height: 1.6; max-width: 820px; }
.seo-links { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 10px; }
.seo-links a { display: block; height: 100%; padding: 14px 16px; border-radius: 14px; text-decoration: none; font-weight: 700; background: #fff; color: #2a1d14; border: 2px solid #ecd8bd; }
.seo-links a:hover { border-color: #ee7a1f; }
.seo-links small { display: block; font-weight: 600; opacity: .7; margin-top: 4px; }
.seo-faq details { border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; background: #ffffff; border: 1px solid #ecd8bd; }
.seo-faq summary { cursor: pointer; font-weight: 800; }
.seo-faq p { margin: 10px 0 0; }
body:not([data-theme="classic"]) .seo-block { color: #e9e2f3; border-top-color: #ffffff1f; font-family: 'Montserrat', system-ui, sans-serif; }
body:not([data-theme="classic"]) .seo-block h2 { font-family: 'Montserrat', system-ui, sans-serif; color: #fff; }
body:not([data-theme="classic"]) .seo-links a, body:not([data-theme="classic"]) .seo-faq details { background: #ffffff0f; color: #fff; border-color: #ffffff22; }
body[data-theme="a"] .seo-block { background: #46206a; }
body[data-theme="a"] .seo-links a:hover { border-color: #ffe14d; }
body[data-theme="b"] .seo-block { background: #0d1030; }
body[data-theme="b"] .seo-links a:hover { border-color: #ffd23f; }
body[data-theme="c"] .seo-block { background: #0b0811; }
body[data-theme="c"] .seo-links a:hover { border-color: #ff8a1f; }

/* ================================================================ статьи */
.sa-page { margin: 0; background: #0f0b16; color: #ece6f5; font: 500 17px/1.65 'Montserrat', system-ui, sans-serif; }
.sa-head { display: flex; align-items: center; gap: 20px; padding: 16px clamp(16px, 4vw, 40px); border-bottom: 1px solid #2e2440; position: sticky; top: 0; background: #0f0b16ee; backdrop-filter: blur(8px); z-index: 5; }
.sa-logo { font: 800 22px 'Unbounded', sans-serif; color: #fff; text-decoration: none; margin-right: auto; }
.sa-logo span { color: #ff8a1f; }
.sa-head nav { display: flex; gap: 18px; }
.sa-head nav a { color: #fff; text-decoration: none; font-weight: 700; opacity: .85; }
.sa { max-width: 820px; margin: 0 auto; padding: 24px 18px 40px; }
.sa a { color: #ffb36b; }
.sa-crumbs { font-size: 14px; color: #a79bbd; }
.sa-crumbs a { color: #a79bbd; }
.sa h1 { font: 800 clamp(30px, 5vw, 46px)/1.1 'Unbounded', sans-serif; margin: 14px 0 14px; color: #fff; }
.sa h2 { font: 800 clamp(21px, 3vw, 27px)/1.25 'Unbounded', sans-serif; margin: 38px 0 12px; color: #fff; }
.sa-lead { font-size: 19px; color: #d9cfe8; }
.sa-hero { margin: 22px 0; }
.sa-hero img { width: 100%; height: 340px; object-fit: cover; object-position: 50% 3%; border-radius: 18px; display: block; }
.sa-hero figcaption { font-size: 14px; color: #a79bbd; margin-top: 6px; }
.sa-toc { background: #1c1527; border: 1px solid #2e2440; border-radius: 16px; padding: 16px 20px; }
.sa-toc ol { margin: 8px 0 0; padding-left: 20px; }
.sa ul, .sa ol { padding-left: 22px; }
.sa li { margin-bottom: 6px; }
.sa-formula { font: 800 clamp(18px, 3vw, 24px) 'Unbounded', sans-serif; color: #ffd23f; background: #1c1527; border-radius: 14px; padding: 16px; text-align: center; }
.sa-lesson { display: flex; gap: 14px; align-items: center; margin: 18px 0; padding: 12px; border-radius: 16px; background: #1c1527; border: 1px solid #2e2440; text-decoration: none; color: #ece6f5 !important; transition: border-color .2s; }
.sa-lesson:hover { border-color: #ff8a1f; }
.sa-lesson img { flex: none; width: 110px; height: 90px; object-fit: cover; object-position: 50% 3%; border-radius: 10px; }
.sa-lesson b { display: block; color: #ffd23f; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.sa-lesson em { display: block; font-style: normal; font-weight: 800; color: #ff8a1f; margin-top: 4px; }
.sa-cta { margin: 40px 0; padding: 22px; border-radius: 20px; background: linear-gradient(120deg, #3b1d0c, #1c1527 60%); border: 1px solid #2e2440; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.sa-cta > div { flex: 1 1 260px; }
.sa-cta p { margin: 4px 0 0; color: #d9cfe8; }
.sa-btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 22px; border-radius: 14px; background: #fff; color: #111 !important; font-weight: 800; text-decoration: none; }
.sa-btn-ghost { background: #ffffff22; color: #fff !important; }
.sa-faq details { background: #1c1527; border: 1px solid #2e2440; border-radius: 14px; padding: 14px 18px; margin-bottom: 10px; }
.sa-faq summary { cursor: pointer; font-weight: 800; }
.sa-faq p { margin: 10px 0 0; color: #d9cfe8; }
.sa-related ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.sa-related a { display: block; padding: 12px 16px; border-radius: 12px; background: #1c1527; border: 1px solid #2e2440; text-decoration: none; font-weight: 700; }
.sa-foot { text-align: center; color: #a79bbd; font-size: 14px; padding: 26px 16px 40px; border-top: 1px solid #2e2440; }
.sa-foot a { color: inherit; }
@media (max-width: 600px) {
  .sa-head nav { display: none; }
  .sa-hero img { height: 220px; }
  .sa-lesson img { width: 84px; height: 72px; }
  .sa-cta .sa-btn { flex: 1 1 100%; justify-content: center; }
}

/* ================================================================ блок «Истории» */
.stories-block { padding: 40px 16px 8px; }
.stories-block h2 { font: 800 clamp(22px, 3vw, 30px)/1.2 var(--head, 'Rubik'), system-ui, sans-serif; margin: 0 0 14px; }
.stories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.story-card { display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; text-decoration: none; background: #fff; color: #2a1d14; border: 2px solid #ecd8bd; transition: transform .2s; }
.story-card:hover { transform: translateY(-4px); }
.story-card.on { border-color: #ee7a1f; }
.story-cover { display: block; aspect-ratio: 16 / 9; background-size: cover; background-position: 50% 3%; }
.story-body { display: grid; gap: 2px; padding: 12px 14px 14px; }
.story-body small { font-weight: 800; color: #ee7a1f; text-transform: uppercase; letter-spacing: .06em; font-size: 12px; }
.story-body em { font-style: normal; opacity: .7; font-size: 14px; }
body:not([data-theme="classic"]) .stories-block { color: #fff; font-family: 'Montserrat', system-ui, sans-serif; }
body:not([data-theme="classic"]) .stories-block h2 { font-family: 'Montserrat', system-ui, sans-serif; }
body:not([data-theme="classic"]) .story-card { background: #ffffff0f; color: #fff; border-color: #ffffff22; }
body[data-theme="a"] .stories-block { background: #46206a; }
body[data-theme="b"] .stories-block { background: #0d1030; }
body[data-theme="c"] .stories-block { background: #0b0811; }

/* ================================================================ блок «Для учителей» */
.teachers-block { padding: 56px 16px; background: #fff7ec; color: #2a1d14; font-family: 'Nunito', system-ui, sans-serif; }
.tch-in { max-width: 1180px; margin: 0 auto; }
.tch-kicker { display: inline-block; margin: 0 0 10px; padding: 6px 14px; border-radius: 999px; background: #ee7a1f; color: #fff; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.teachers-block h2 { font: 800 clamp(24px, 3.6vw, 40px)/1.15 var(--head, 'Rubik'), system-ui, sans-serif; margin: 0 0 12px; max-width: 900px; }
.tch-lead { font-size: 18px; line-height: 1.55; max-width: 820px; margin: 0 0 28px; opacity: .85; }
.tch-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .tch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .tch-grid { grid-template-columns: 1fr; } }
.tch-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; border-radius: 22px; background: #fff; border: 2px solid #ecd8bd; }
.tch-ico { font-size: 34px; line-height: 1; }
.tch-card h3 { margin: 4px 0 0; font: 800 20px/1.2 var(--head, 'Rubik'), system-ui, sans-serif; }
.tch-card p { margin: 0; line-height: 1.5; opacity: .85; }
.tch-card ul { margin: 4px 0 8px; padding-left: 20px; line-height: 1.5; flex: 1; }
.tch-btn { align-self: flex-start; display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 12px 20px; border: 0; border-radius: 14px; background: #ee7a1f; color: #fff; font-weight: 800; font-size: 16px; line-height: 1.1; font-family: inherit; text-decoration: none; cursor: pointer; }
.tch-btn:hover { filter: brightness(1.08); }
.tch-btn:disabled { opacity: .7; cursor: default; }
.tch-btn:focus-visible { outline: 3px solid #ffd23f; outline-offset: 2px; }
.tch-contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; margin-top: 28px; padding: 28px; border-radius: 26px; background: #2a1d14; color: #fff; scroll-margin-top: 16px; }
.tch-contact h3 { margin: 0 0 10px; font: 800 clamp(22px, 3vw, 30px)/1.2 var(--head, 'Rubik'), system-ui, sans-serif; }
.tch-contact p { line-height: 1.55; opacity: .9; }
.tch-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tch-links a, .foot-contacts a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: #ffffff1f; color: #fff; text-decoration: none; font-weight: 800; }
.tch-note { font-size: 14px; opacity: .7 !important; }
.tch-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tch-form label { display: grid; gap: 6px; font-weight: 700; font-size: 14px; }
.tch-form label:nth-of-type(1), .tch-form label:nth-of-type(4), .tch-form label:nth-of-type(5), .tch-form .tch-check, .tch-submit, .tch-status { grid-column: 1 / -1; }
.tch-form input, .tch-form select, .tch-form textarea { width: 100%; box-sizing: border-box; min-height: 46px; padding: 11px 14px; border-radius: 12px; border: 2px solid #ffffff33; background: #ffffff14; color: #fff; font-weight: 600; font-size: 16px; font-family: inherit; }
.tch-form select option { color: #111; }
.tch-form textarea { resize: vertical; min-height: 86px; }
.tch-form input:focus, .tch-form select:focus, .tch-form textarea:focus { outline: none; border-color: #ffd23f; }
.tch-form .tch-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 600; }
.tch-form .tch-check input { width: 22px; min-height: 22px; height: 22px; flex: none; margin: 0; accent-color: #ee7a1f; }
.tch-submit { width: 100%; }
.tch-status { margin: 0; min-height: 1.4em; font-weight: 700; }
.tch-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 760px) {
  .teachers-block { padding: 40px 16px; }
  .tch-contact { grid-template-columns: 1fr; padding: 20px; }
  .tch-form { grid-template-columns: 1fr; }
  .tch-btn { align-self: stretch; }
}
/* тёмные дизайны */
body:not([data-theme="classic"]) .teachers-block { color: #fff; font-family: 'Montserrat', system-ui, sans-serif; }
body:not([data-theme="classic"]) .teachers-block h2, body:not([data-theme="classic"]) .tch-card h3, body:not([data-theme="classic"]) .tch-contact h3 { font-family: 'Montserrat', system-ui, sans-serif; }
body:not([data-theme="classic"]) .tch-card { background: #ffffff0f; border-color: #ffffff22; }
body:not([data-theme="classic"]) .tch-contact { background: #00000040; border: 1px solid #ffffff22; }
body[data-theme="a"] .teachers-block { background: #46206a; }
body[data-theme="a"] .tch-kicker { background: #ff3d9a; }
body[data-theme="a"] .tch-btn { background: #ffe14d; color: #2a1640; }
body[data-theme="b"] .teachers-block { background: #0d1030; }
body[data-theme="b"] .tch-btn { background: #ffd23f; color: #141a3d; }
body[data-theme="c"] .teachers-block { background: #0b0811; }
body[data-theme="c"] .tch-btn { background: #ff8a1f; }
/* контакты в подвале */
.foot-contacts { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.foot-contacts > span { opacity: .75; }
body[data-theme="classic"] .foot-contacts a { background: #2a1d14; }
