/* Logicum UI: the single source for shared typography and components.
   Page-specific layout lives in @layer page-layout and cannot override these rules.
   No external fonts or icon services: the same assets work on every route. */
:root {
  --font-ui: Inter, Manrope, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --font-code: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --brand-900: #2f177d;
  --brand-800: #3e239f;
  --brand-700: #4b2db9;
  --brand-600: #5b36d9;
  --brand-500: #6f4af0;
  --brand-100: #eee9ff;
  --brand-50: #f7f5ff;
  --brand: var(--brand-600);
  --ink: #211f27;
  --muted: #625c6c;
  --line: #e5e0ed;
  --surface: #fff;
  --surface-soft: #faf9ff;
  --bg: var(--surface-soft);
  --hero-bg: #fff;
  --shadow-sm: 0 10px 30px rgb(42 27 93 / 8%);
  --container: 1320px;
  --header-h: 74px;
  --gutter: 28px;
  --section-space: 80px;
  --card-space: 28px;
  --radius-card: 22px;
  --radius-control: 12px;
  --text-small: 13px;
  --text-card: 15px;
  --text-body: 16px;
  --text-lead: 17px;
  /* The homepage is the visual reference for all public marketing pages. */
  --text-h1: clamp(39px, 2.95vw, 46px);
  --text-h2: clamp(34px, 2.65vw, 40px);
  --text-h3: 22px;
  --heading-line: 1.08;
  --heading-track: -.045em;
  --fact-min-height: 52px;
  --fact-icon-size: 20px;
}

.skip-link {
  position: fixed;
  z-index: 500;
  top: 8px;
  left: 8px;
  padding: 11px 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--brand-900);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(calc(-100% - 16px));
}
.skip-link:focus { transform: translateY(0); }
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 20px); }
body { margin: 0; font: 400 var(--text-body)/1.6 var(--font-ui); color: var(--ink); background: var(--surface); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: var(--font-ui); }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
img, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 4px; }
.container { width: min(var(--container), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
/* The homepage heading “Что сейчас нужно ребёнку?” is the exact reference for every marketing section H2. */
main h1, main h2, main h3 { font-family: var(--font-ui); text-wrap: balance; }
main h2[id] {
  margin: 0;
  max-width: 720px;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: var(--text-h2);
  line-height: var(--heading-line);
  letter-spacing: var(--heading-track);
  font-weight: 700;
  text-wrap: balance;
}
:is(.python-page, .literacy-page) main h3 {
  color: var(--ink);
  font-size: var(--text-h3);
  line-height: 1.2;
  letter-spacing: -.025em;
  font-weight: 700;
}
.py-hero h1 {
  font-size: var(--text-h1);
  line-height: 1.075;
  letter-spacing: -.035em;
  font-weight: 500;
  color: #221b36;
}
main p { font-size: var(--text-body); line-height: 1.6; text-wrap: pretty; }
main article p, main article li { font-size: var(--text-card); line-height: 1.6; }
.section-kicker, .eyebrow { font-size: 12px; font-weight: 700; line-height: 1.5; letter-spacing: .065em; color: var(--brand-600); }
.section-kicker { margin: 0 0 12px; text-transform: uppercase; }
.hero__lead, .py-hero__lead { font-size: var(--text-lead); line-height: 1.6; font-weight: 500; }
.hero__note, .py-hero__note, .py-projects__note, .dl-program-note,
.py-step__eyebrow, .py-teacher__areas, .dl-option__meta p, .dl-course-price__main > p,
.dl-course-price__trial p, figcaption { font-size: var(--text-small); line-height: 1.55; }

/* Same header, logo and navigation metrics on the three marketing pages. */
.site-header, .legal-header { height: var(--header-h); z-index: 100; background: rgb(255 255 255 / 95%); border-bottom: 1px solid var(--line); }
.site-header__inner, .legal-header__inner { height: var(--header-h); gap: 24px; }
.brand, .legal-header img { width: 150px; flex-shrink: 0; }
.site-nav { gap: 20px; font-size: 14px; font-weight: 700; }
.site-nav a { font-size: inherit; }
.mobile-menu nav a { font-size: 16px; }
.telegram-link { width: 44px; height: 44px; border-radius: var(--radius-control); }
.telegram-link .icon { width: 22px; height: 22px; color: #fff; }

/* One button size, weight, radius and state treatment everywhere. */
.btn { min-height: 48px; padding: 12px 22px; border-radius: var(--radius-control); font-size: 14px; font-weight: 700; line-height: 1.4; text-align: center; white-space: normal; gap: 8px; }
.btn--header { min-height: 44px; padding: 10px 16px; }
.btn--primary { color: #fff; background: var(--brand-600); border: 1px solid var(--brand-600); box-shadow: 0 8px 22px rgb(91 54 217 / 16%); }
.btn--primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.btn--outline { color: var(--brand-700); background: #fff; border: 1px solid #bcaee7; box-shadow: none; }
.btn--outline:hover { background: var(--brand-50); border-color: var(--brand-600); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

/* Shared filled icon set. Illustrative logos and course images stay unchanged. */
.icon { width: 24px; height: 24px; flex: 0 0 auto; fill: currentColor; stroke: none; color: var(--brand-600); }
.scroll-cue .icon { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.direction-card__icon, .why-card__icon, .process-step__icon,
.directions-help__icon, .learning-hub__feature-icon { width: 44px; height: 44px; border-radius: var(--radius-control); background: var(--brand-100); color: var(--brand-600); display: grid; place-items: center; }
.direction-card__icon .icon, .why-card__icon .icon, .process-step__icon .icon { width: 24px; height: 24px; }
.hero-facts-strip { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; width: 100%; max-width: 560px; list-style: none; padding: 0; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.hero-fact { display: flex; align-items: center; gap: 8px; min-width: 0; min-height: var(--fact-min-height); padding: 8px 12px; text-align: left; }
.hero-fact:nth-child(even) { border-left: 1px solid var(--line); }
.hero-fact:nth-child(n+3) { border-top: 1px solid var(--line); }
.hero-fact::before { content: none; }
.hero-fact .icon { width: var(--fact-icon-size); height: var(--fact-icon-size); min-width: var(--fact-icon-size); }
.hero-fact span, .hero-fact strong { font-size: 13px; font-weight: 400; line-height: 1.4; color: var(--ink); }
.hero-fact br { display: none; }
.hero-fact br::after { content: ' '; }
.hero__actions, .py-hero__actions { margin-top: 0; gap: 12px; }
.hero__note .icon, .trial__benefits .icon, .py-checklist .icon { width: 20px; height: 20px; }
.py-checklist li > span { flex: 0 0 30px; width: 30px; height: 30px; background: var(--brand-100); }
.icon-arrow { position: relative; display: inline-block; width: 18px; height: 18px; flex: 0 0 18px; color: inherit; }
.icon-arrow::before { content: ''; position: absolute; top: 8px; left: 2px; width: 13px; height: 2px; background: currentColor; }
.icon-arrow::after { content: ''; position: absolute; top: 5px; right: 2px; width: 8px; height: 8px; border-top: 2px solid; border-right: 2px solid; transform: rotate(45deg); }
.icon-arrow--back { transform: rotate(180deg); }

/* Consistent section rhythm and shared cards. */
main > section:not(.hero):not(.py-hero) { padding-block: var(--section-space); }
.py-hero { padding: 24px 0 var(--section-space); }
.py-hero__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.hero__grid { gap: 48px; }
.hero__content, .py-hero__content, .trial__copy { min-width: 0; }
.directions__heading, .py-section-head, .pricing__heading, .reviews__heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); align-items: end; gap: 40px; max-width: none; margin-bottom: 32px; }
.pricing__heading > p:last-child { margin: 0; }
.direction-card, .review-card, .py-fit__grid article, .dl-option, .dl-ready article,
.price-card, .py-project-card { border-radius: var(--radius-card); padding: var(--card-space); border-color: var(--line); }
.py-step, .py-parent, .py-teacher, .dl-course-price { border-radius: var(--radius-card); border-color: var(--line); }
.price-card:not(.price-card--featured) { padding-top: var(--card-space); }
.price-card__badge { font-size: 12px; }
.price-card__label, .dl-course-price__label, .dl-course-price__details > div:first-child > span,
.dl-course-price__trial > span { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; line-height: 1.5; }
.price-card__price strong, .dl-course-price__main > strong { font-size: clamp(34px, 3.5vw, 44px); line-height: 1.1; font-weight: 700; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.price-card__package, .price-card li, .dl-course-price__details li { font-size: var(--text-card); line-height: 1.6; }
.price-card__price span { font-size: var(--text-small); }
.pricing__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.dl-course-price { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
.dl-course-price__main, .dl-course-price__details { padding: var(--card-space); }
.dl-course-price__details { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.dl-course-price__trial { padding: 20px; border-radius: 16px; min-width: 0; }
.dl-course-price__trial strong { font-size: 20px; line-height: 1.3; }
.dl-course-price__details li, .price-card li { padding-left: 24px; }
.dl-course-price__details li::before, .price-card li::before { content: ''; width: 7px; height: 12px; top: 4px; left: 3px; border: solid var(--brand-600); border-width: 0 2px 2px 0; transform: rotate(45deg); }


/* Homepage parity for course-page content. Unique illustrations/layouts remain unique; their UI metrics do not. */
:is(.python-page, .literacy-page) .py-section-head > p,
:is(.python-page, .literacy-page) .directions__intro,
:is(.python-page, .literacy-page) .why__intro,
:is(.python-page, .literacy-page) .projects__intro,
:is(.python-page, .literacy-page) .process__intro,
:is(.python-page, .literacy-page) .pricing__heading > p,
:is(.python-page, .literacy-page) .reviews__heading > p,
:is(.python-page, .literacy-page) .trial__copy > p:not(.section-kicker),
:is(.python-page, .literacy-page) .faq__heading > p:not(.section-kicker),
:is(.python-page, .literacy-page) .py-results__copy > p:last-child,
:is(.python-page, .literacy-page) .py-next__box p:last-child {
  color: var(--muted);
  font-size: var(--text-body);
  line-height: 1.6;
}

:is(.python-page, .literacy-page) .py-fit__grid,
:is(.python-page, .literacy-page) .py-steps,
:is(.python-page, .literacy-page) .py-projects__grid,
:is(.python-page, .literacy-page) .dl-options { gap: 18px; }

:is(.python-page, .literacy-page) .py-fit__grid article,
:is(.python-page, .literacy-page) .py-step,
:is(.python-page, .literacy-page) .py-parent,
:is(.python-page, .literacy-page) .py-teacher,
:is(.python-page, .literacy-page) .py-project-card,
:is(.python-page, .literacy-page) .dl-option,
:is(.python-page, .literacy-page) .dl-ready article,
:is(.python-page, .literacy-page) .dl-topic-list li {
  border-color: var(--line);
  border-radius: var(--radius-card);
}

:is(.python-page, .literacy-page) .py-fit__grid article,
:is(.python-page, .literacy-page) .py-project-card,
:is(.python-page, .literacy-page) .dl-option,
:is(.python-page, .literacy-page) .dl-ready article { padding: var(--card-space); }

/* Course cards use the same light-card language as homepage project/direction cards. */
:is(.python-page, .literacy-page) .py-project-card,
:is(.python-page, .literacy-page) .py-project-card--space,
:is(.python-page, .literacy-page) .py-project-card--data {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
:is(.python-page, .literacy-page) .py-project-card__label { color: var(--brand-600); }
:is(.python-page, .literacy-page) .py-project-card h3 {
  margin: 28px 0 12px;
  color: var(--ink);
  font-size: var(--text-h3);
  line-height: 1.2;
}
:is(.python-page, .literacy-page) .py-project-card p { color: var(--muted); font-size: var(--text-card); line-height: 1.6; }
:is(.python-page, .literacy-page) .py-project-card > div { margin-top: 22px; }
:is(.python-page, .literacy-page) .py-project-card > div span {
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--brand-50);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

:is(.python-page, .literacy-page) .py-fit__grid h3,
:is(.python-page, .literacy-page) .py-step h3,
:is(.python-page, .literacy-page) .py-parent__head h3,
:is(.python-page, .literacy-page) .py-teacher h3,
:is(.python-page, .literacy-page) .dl-option h3,
:is(.python-page, .literacy-page) .dl-ready h3 {
  font-size: var(--text-h3);
  line-height: 1.2;
  letter-spacing: -.025em;
  font-weight: 700;
}
:is(.python-page, .literacy-page) .py-step h3 { min-height: 0; margin-bottom: 12px; }
:is(.python-page, .literacy-page) .py-parent__head h3,
:is(.python-page, .literacy-page) .py-teacher h3 { margin-top: 0; }
:is(.python-page, .literacy-page) .dl-option h3 { margin: 20px 0 12px; }

:is(.python-page, .literacy-page) .py-fit__grid p,
:is(.python-page, .literacy-page) .py-checklist p,
:is(.python-page, .literacy-page) .py-step__body > p:not(.py-step__eyebrow),
:is(.python-page, .literacy-page) .py-program__help p,
:is(.python-page, .literacy-page) .py-how__grid p,
:is(.python-page, .literacy-page) .py-parent__head > p,
:is(.python-page, .literacy-page) .py-parent__points p,
:is(.python-page, .literacy-page) .py-teacher p:not(.py-teacher__areas),
:is(.python-page, .literacy-page) .dl-option p,
:is(.python-page, .literacy-page) .dl-option li,
:is(.python-page, .literacy-page) .dl-ready p {
  color: var(--muted);
  font-size: var(--text-card);
  line-height: 1.6;
}
:is(.python-page, .literacy-page) .py-how__grid h3 { font-size: 18px; line-height: 1.4; }
:is(.python-page, .literacy-page) .py-checklist strong,
:is(.python-page, .literacy-page) .py-program__help strong { font-size: 17px; line-height: 1.35; }

:is(.python-page, .literacy-page) .py-step__body { padding: var(--card-space); }
:is(.python-page, .literacy-page) .py-step__number { padding: 20px var(--card-space); }
:is(.python-page, .literacy-page) .py-program__help,
:is(.python-page, .literacy-page) .py-parent__head,
:is(.python-page, .literacy-page) .py-parent__points,
:is(.python-page, .literacy-page) .py-teacher { padding: var(--card-space); }
:is(.python-page, .literacy-page) .py-parent__head { gap: 40px; }
:is(.python-page, .literacy-page) .py-parent__points { gap: 24px; }
:is(.python-page, .literacy-page) .py-teacher { gap: 32px; }

:is(.python-page, .literacy-page) .dl-topic-list li { padding: 18px 20px; font-size: 14px; line-height: 1.55; }
:is(.python-page, .literacy-page) .dl-option__age { font-size: 13px; }
:is(.python-page, .literacy-page) .dl-option__meta strong { font-size: 14px; }

/* Header/footer metrics are identical on every marketing route. */
:is(.python-page, .literacy-page) .site-footer__links a,
:is(.python-page, .literacy-page) .site-footer__contact a,
:is(.python-page, .literacy-page) .site-footer__bottom { font-size: var(--text-small); line-height: 1.6; }

/* Forms must not look or behave differently depending on the course stylesheet. */
.trial__box { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); gap: 48px; align-items: start; }
.trial__copy { padding-top: 24px; }
.trial-form { padding: var(--card-space); border: 1px solid var(--line); border-radius: var(--radius-card); }
.trial-form__head strong { font-size: 22px; line-height: 1.3; }
.trial-form__head span, .trial-form__selection, .trial-form__field > span,
.trial-form__message, .trial-form__telegram { font-size: var(--text-small); line-height: 1.55; }
.trial__benefits span { font-size: 14px; font-weight: 400; }
.trial-form__selection { padding: 12px; }
.trial-form__selection strong { display: block; margin: 4px 0 0; }
[data-course-reset] { display: block; min-height: 44px; padding: 8px 0; border: 0; background: none; color: var(--brand-700); font-size: var(--text-small); text-decoration: underline; cursor: pointer; }
.trial-form__field input, .trial-form__field select { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #c9c1d7; border-radius: var(--radius-control); background: #fff; color: var(--ink); font-size: 16px; line-height: 1.4; }
.trial-form__field input:focus, .trial-form__field select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgb(91 54 217 / 10%); }
.trial-form__consent, .trial-form__privacy { font-size: 12px; line-height: 1.6; color: var(--muted); }
.trial-form__privacy { margin: 10px 0 0; }
.trial-form__message.is-error { color: #9e2d35; }
.trial-form__message.is-success { color: #246740; }
.faq-item summary { min-height: 64px; padding-block: 16px; font-size: 16px; line-height: 1.5; font-weight: 700; }
.faq-item > div { font-size: var(--text-card); line-height: 1.65; }
.disclosure-icon { position: relative; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: var(--brand-100); color: var(--brand-600); }
.disclosure-icon::before, .disclosure-icon::after { content: ''; position: absolute; width: 12px; height: 2px; top: 13px; left: 8px; background: currentColor; }
.disclosure-icon::after { transform: rotate(90deg); }

/* Carousel controls follow the same icon-button and text scales. */
.reviews-carousel .review-card { padding: var(--card-space); }
.reviews-carousel .review-card blockquote { font-size: var(--text-card); line-height: 1.65; }
.review-card footer strong { font-size: 14px; }
.review-card footer span { font-size: var(--text-small); }
.reviews__heading-side > p { font-size: var(--text-body); line-height: 1.6; }
.reviews-carousel__controls button, [data-parent-prev], [data-parent-next] { width: 44px; height: 44px; min-width: 44px; border: 1px solid var(--line); border-radius: var(--radius-control); background: #fff; color: var(--brand-700); display: grid; place-items: center; }
.reviews-carousel__controls > span { font-size: var(--text-small); }
.reviews-carousel__dots button, .reviews-carousel__dots button.is-active { position: relative; width: 40px; height: 40px; border-radius: 0; background: transparent; }
.reviews-carousel__dots button::before { content: ''; position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; border-radius: 8px; transform: translate(-50%, -50%); background: #c9c1d7; }
.reviews-carousel__dots button.is-active::before { width: 22px; background: var(--brand-600); }
.reviews-carousel__controls { visibility: hidden; }
.reviews-carousel__viewport { overflow-x: auto; }
.reviews-carousel__track { transform: none; }
.reviews--enhanced .reviews-carousel__controls { visibility: visible; }
.reviews--enhanced .reviews-carousel__viewport { overflow: hidden; }
.reviews--enhanced .reviews-carousel__track { transform: var(--review-shift, none); }
.reviews-carousel__dots { margin-top: 12px; gap: 0; }
.site-footer__links a, .site-footer__contact a, .site-footer__bottom { font-size: var(--text-small); line-height: 1.6; }
.cookie-consent__copy span { font-size: 12px; line-height: 1.5; }
.cookie-consent__actions .btn { min-height: 44px; padding: 10px 14px; font-size: 12px; }

/* Legal content keeps a reading column, using the same brand and type system. */
.legal-header__inner, .legal-footer { width: min(var(--container), calc(100% - 2 * var(--gutter))); }
.legal-header__inner { gap: 16px; }
.legal-header a:last-child { font-size: 14px; color: var(--brand-700); }
.legal { width: min(900px, calc(100% - 2 * var(--gutter))); padding-block: var(--section-space); }
.legal h1 { margin: 0 0 28px; overflow-wrap: anywhere; }
.legal h2 { font-size: 24px; margin: 36px 0 12px; }
.legal p, .legal li { font-size: var(--text-body); line-height: 1.7; color: var(--muted); }
.legal a { color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.6; }
.legal th, .legal td { padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.legal th { background: var(--brand-50); }
.legal-footer { font-size: var(--text-small); }
@media (max-width: 1180px) {
  .site-nav { gap: 12px; font-size: 13px; }
  .site-header__inner { gap: 16px; }
  .py-hero__grid, .hero__grid { gap: 28px; }
  .dl-course-price { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  :root { --gutter: 20px; --header-h: 70px; --section-space: 64px; }
  .directions__heading, .py-section-head, .pricing__heading, .reviews__heading { grid-template-columns: 1fr; gap: 20px; }
  .trial__box { grid-template-columns: 1fr; gap: 32px; }
  .trial__copy { padding-top: 0; }
  .trial-form { width: 100%; }
  .py-hero__grid { grid-template-columns: 1fr; }
  .py-hero__content { max-width: 760px; }
}
@media (max-width: 680px) {
  :root { --gutter: 16px; --header-h: 68px; --section-space: 48px; --card-space: 22px; --radius-card: 18px; --text-lead: 16px; --text-h3: 20px; }
  .hero-facts-strip { --fact-min-height: 48px; --fact-icon-size: 18px; margin-block: 14px; }
  .hero-fact { padding-inline: 10px; }
  .py-hero__content > .section-kicker { order: 1; }
  .py-hero__content > h1 { order: 2; }
  .py-hero__lead { order: 3; }
  .py-hero__actions { order: 4; }
  .py-hero__note { order: 5; }
  .py-hero__facts { order: 6; }
  .hero__grid, .py-hero__grid { grid-template-columns: 1fr; gap: 32px; }
  .pricing__grid, .dl-course-price__details { grid-template-columns: 1fr; gap: 20px; }
  .legal-header img { width: 124px; }
  .legal-header a:last-child { font-size: 13px; text-align: right; }
  .legal th, .legal td { padding: 8px; font-size: 13px; }
  /* The banner covers a fifth of the first screen on phones, so it stays as
     compact as the consent wording allows: buttons in a row, not stacked. */
  .cookie-consent { padding: 8px 10px; gap: 6px; }
  .cookie-consent__copy span { font-size: 11px; line-height: 1.35; }
  .cookie-consent__actions { grid-template-columns: 1fr 1fr; gap: 6px; }
  .cookie-consent__actions .btn { min-height: 36px; padding: 6px 8px; font-size: 11px; line-height: 1.2; }
}

@media (max-width: 980px) {
  .py-hero h1 { font-size: clamp(42px, 6.5vw, 58px); line-height: 1.035; }
  :is(.python-page, .literacy-page) .py-step h3,
  :is(.python-page, .literacy-page) .py-parent__head h3,
  :is(.python-page, .literacy-page) .py-teacher h3,
  :is(.python-page, .literacy-page) .dl-option h3 { font-size: var(--text-h3); }
}
@media (max-width: 680px) {
  .py-hero h1 { font-size: clamp(30px, 8.5vw, 45px); line-height: 1.1; }
  main h2[id] { font-size: clamp(28px, 7.5vw, 32px); }
  :is(.python-page, .literacy-page) .py-project-card h3,
  :is(.python-page, .literacy-page) .py-step h3,
  :is(.python-page, .literacy-page) .py-parent__head h3,
  :is(.python-page, .literacy-page) .py-teacher h3,
  :is(.python-page, .literacy-page) .dl-option h3 { font-size: var(--text-h3); }
  :is(.python-page, .literacy-page) .py-step__body,
  :is(.python-page, .literacy-page) .py-step__number,
  :is(.python-page, .literacy-page) .py-program__help,
  :is(.python-page, .literacy-page) .py-parent__head,
  :is(.python-page, .literacy-page) .py-parent__points,
  :is(.python-page, .literacy-page) .py-teacher { padding: var(--card-space); }
}
/* Showcase code block: fixed-width type is the point of the component, so it lives above the page layer. */
.showcase-code__lines { font-family: var(--font-code); font-size: 11.5px; line-height: 1.75; }
main article .showcase-code__lines li { font-size: inherit; line-height: inherit; color: #3c3646; }
.showcase-code__lines li::marker { color: #b6b0c4; font-size: 10.5px; }
.showcase-code__lines code { font: inherit; white-space: pre; }
@media (max-width: 620px) { .showcase-code__lines { font-size: 10.5px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Home hero — stage 26: clearer vertical rhythm without changing inner-page heroes. */
.hero .eyebrow {
  position: relative;
  top: -10px;
}
.hero h1 {
  margin-bottom: 28px;
}
.hero .hero__lead {
  margin-bottom: 0;
}
.hero .hero-facts-strip {
  margin: 30px 0 0;
}
.hero .hero__actions {
  margin-top: 32px;
}
.hero .hero__note {
  margin-top: 18px;
}

@media (max-width: 980px) {
  .hero .eyebrow { top: -8px; }
  .hero h1 { margin-bottom: 24px; }
  .hero .hero-facts-strip { margin-top: 26px; }
  .hero .hero__actions { margin-top: 28px; }
}

@media (max-width: 620px) {
  .hero .eyebrow { top: -6px; }
  .hero h1 { margin-bottom: 22px; }
  .hero .hero-facts-strip { margin-top: 24px; }
  .hero .hero__actions { margin-top: 24px; }
  .hero .hero__note { margin-top: 16px; }
}

/* Inner-page heroes — stage 27: match the homepage first-screen vertical rhythm. */
.py-hero .section-kicker {
  position: relative;
  top: -10px;
  margin-bottom: 34px;
}
.py-hero h1 {
  margin: 0 0 28px;
}
.py-hero .py-hero__lead {
  margin: 0;
}
.py-hero .hero-facts-strip {
  margin: 30px 0 0;
}
.py-hero .py-hero__actions {
  margin-top: 32px;
}
.py-hero .py-hero__note {
  margin-top: 18px;
}

@media (max-width: 980px) {
  .py-hero .section-kicker { top: -8px; margin-bottom: 30px; }
  .py-hero h1 { margin-bottom: 24px; }
  .py-hero .hero-facts-strip { margin-top: 26px; }
  .py-hero .py-hero__actions { margin-top: 28px; }
}

@media (max-width: 620px) {
  .py-hero .section-kicker { top: -6px; margin-bottom: 26px; }
  .py-hero h1 { margin-bottom: 22px; }
  .py-hero .hero-facts-strip { margin-top: 24px; }
  .py-hero .py-hero__actions { margin-top: 24px; }
  .py-hero .py-hero__note { margin-top: 16px; }
}

/* Mobile conversion path for long marketing pages. Hidden before the hero and near the form. */
.mobile-trial-cta { display: none; }

@media (max-width: 680px) {
  .mobile-trial-cta:not([hidden]) {
    position: fixed;
    z-index: 180;
    left: 16px;
    right: 16px;
    bottom: max(12px, env(safe-area-inset-bottom));
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 17px;
    border: 1px solid rgb(255 255 255 / 34%);
    border-radius: 16px;
    color: #fff;
    background: #4f25dd;
    box-shadow: 0 14px 38px rgb(48 24 120 / 30%);
    text-decoration: none;
  }
  .mobile-trial-cta span { font-size: 11px; line-height: 1.25; opacity: .84; }
  .mobile-trial-cta strong { font-size: 14px; line-height: 1.25; text-align: right; }
  .mobile-trial-cta:focus-visible { outline: 3px solid #f2c94c; outline-offset: 3px; }
  /* The consent banner must not hide the conversion path: lift the CTA above it
     instead of removing it. --cookie-consent-h is measured in main.js. */
  .cookie-consent:not([hidden]) ~ .mobile-trial-cta {
    bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--cookie-consent-h, 0px) + 10px);
  }
}
