/* R25 public checkout and contacts. The existing Django form and quote contract
   stays intact; learning and staff pages do not load this stylesheet. */
.r25-public.r25-commerce .student-commerce-context {
  width: min(1100px, calc(100% - 64px));
  padding-top: 26px;
}
.r25-public.r25-commerce :is(.compact-purchase-shell, .lesson-topup-main, .payment-status-shell) {
  width: min(1100px, calc(100% - 64px));
  max-width: none;
  margin-inline: auto;
  padding: 26px 0 76px;
  font-size: 17px;
  line-height: 1.55;
}
.r25-public.r25-commerce :is(.compact-purchase-heading, .lesson-topup-hero, .payment-status-heading) h1 {
  font: 500 clamp(30px, 3.6vw, 44px)/1.15 Onest, Arial, sans-serif;
  letter-spacing: -.045em;
}
.r25-public.r25-commerce :is(.compact-purchase-heading, .payment-status-heading) .eyebrow {
  margin-bottom: 12px;
}
.r25-public.r25-commerce :is(.compact-section-head, .lesson-topup-section-head) h2 {
  font: 500 22px/1.3 Onest, Arial, sans-serif;
  letter-spacing: -.025em;
}
.r25-public.r25-commerce :is(.lesson-topup-summary, .payment-state-copy) h2 {
  font: 500 26px/1.25 Onest, Arial, sans-serif;
  letter-spacing: -.03em;
}
.r25-public.r25-commerce :is(.compact-form-section, .panel-like, .payment-state-card) {
  border-color: var(--line);
  background: var(--paper);
  box-shadow: none;
}
.r25-public.r25-commerce .lesson-topup-summary { background: var(--mint); }
.r25-public.r25-commerce :is(.compact-purchase-heading, .lesson-topup-hero) p:not(.eyebrow) {
  max-width: 720px;
  font-size: 18px;
  margin-top: 16px;
  color: var(--muted);
}
.r25-public.r25-commerce :is(.compact-purchase-heading, .lesson-topup-hero, .payment-status-heading) {
  margin-bottom: 32px;
}
.r25-public.r25-commerce .compact-section-head { flex-wrap: wrap; }
.r25-public.r25-commerce .compact-section-head h2 { margin: 0; }
.r25-public.r25-commerce .compact-section-number { font-family: Onest, Arial, sans-serif; }
.r25-public.r25-commerce :is(.commerce-field > span, .purchase-student-summary strong, .compact-group-option strong) {
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
}
.r25-public.r25-commerce :is(.purchase-student-summary span, .compact-group-option small, .compact-group-option span) {
  font-size: 14px;
  line-height: 1.5;
}
.r25-public.r25-commerce :is(.purchase-student-summary strong, .compact-group-option > div) { overflow-wrap: anywhere; }
.r25-public.r25-commerce .commerce-field :is(input, select, textarea) {
  min-height: 48px;
  max-width: 100%;
  border-color: #7b8b78;
  border-radius: 10px;
  background: var(--paper);
  font: inherit;
}
.r25-public.r25-commerce .compact-plan-card {
  border-color: #7b8b78;
  border-radius: 14px;
  background: var(--paper);
}
.r25-public.r25-commerce .compact-plan-card.is-selected { background: var(--mint); border-color: var(--green); }
.r25-public.r25-commerce .compact-plan-card > strong { font-size: 16px; font-weight: 500; }
.r25-public.r25-commerce .compact-plan-card .compact-plan-price {
  font: 600 26px/1.2 Onest, Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
.r25-public.r25-commerce .lesson-package-custom { background: var(--page); }
.r25-public.r25-commerce :is(.lesson-package-custom-head strong, .purchase-summary dt, .purchase-lesson-preview summary, .payer-details summary) {
  font-size: 16px;
  font-weight: 500;
}
.r25-public.r25-commerce .purchase-summary { gap: 14px; }
.r25-public.r25-commerce .purchase-summary dd { font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.r25-public.r25-commerce .purchase-summary .is-total dd {
  color: var(--green);
  font: 600 28px/1.25 Onest, Arial, sans-serif;
}
.r25-public.r25-commerce .purchase-summary .is-total dt { align-self: center; color: var(--ink); }
.r25-public.r25-commerce .purchase-lesson-preview { font-size: 16px; }
.r25-public.r25-commerce :is(.purchase-lesson-preview > p, .purchase-lesson-preview li span, .compact-purchase-note, .compact-purchase-consent) {
  font-size: 14px;
  line-height: 1.6;
}
.r25-public.r25-commerce .purchase-lesson-preview li { overflow-wrap: anywhere; }
.r25-public.r25-commerce main .button {
  min-height: 48px;
  height: auto;
  padding: 12px 20px;
  border-radius: 10px;
  font: 500 16px/1.4 Onest, Arial, sans-serif;
}
.r25-public.r25-commerce main .button-primary { background: var(--green); color: var(--paper); border-color: var(--green); }
.r25-public.r25-commerce main .button-primary:hover { background: var(--deep); }
.r25-public.r25-commerce main .button-secondary { background: transparent; color: var(--green); border-color: #7b8b78; }
.r25-public.r25-commerce .payment-order-grid strong { font-size: 16px; font-weight: 500; }
.r25-public.r25-commerce .payment-order-total strong { font-family: Onest, Arial, sans-serif; font-variant-numeric: tabular-nums; }

.r25-public.contacts-page .contacts-main { padding-block: 32px 76px; }
.r25-public.contacts-page .contacts-heading { margin-block: 32px 34px; }
.r25-public.contacts-page .contacts-heading h1 {
  font: 500 clamp(34px, 4.5vw, 58px)/1.15 Onest, Arial, sans-serif;
  letter-spacing: -.045em;
  margin-bottom: 18px;
}
.r25-public.contacts-page .contacts-heading p { font-size: 19px; max-width: 700px; }
.r25-public.contacts-page .contact-panel { background: var(--paper); border-radius: 22px; }
.r25-public.contacts-page :is(.contact-panel, .contact-documents) h2 {
  font: 500 26px/1.25 Onest, Arial, sans-serif;
  letter-spacing: -.03em;
}
.r25-public.contacts-page .contact-details dt { font-size: 15px; }
.r25-public.contacts-page .contact-details dd { font-size: 18px; font-weight: 500; }
.r25-public.contacts-page .contact-note { font-size: 15px; }
.r25-public.contacts-page .contact-legal-name { font-size: 18px; font-weight: 500; }
.r25-public.contacts-page .contacts-grid { align-items: start; }
.r25-public.contacts-page .contact-panel > h2 { margin-bottom: 20px; }
.r25-public.contacts-page .contact-legal-name { margin-bottom: 22px; overflow-wrap: anywhere; }
.r25-public.contacts-page .contact-details { gap: 20px; }
.r25-public.contacts-page .contact-details dd { margin-top: 5px; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.r25-public.contacts-page .contact-details > div { min-width: 0; }
.r25-public.contacts-page .contact-bank { margin-top: 20px; }
.r25-public.contacts-page .contact-bank-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; margin-bottom: 0; }
@media (max-width: 700px) {
  .r25-public.contacts-page .contact-bank-grid { grid-template-columns: minmax(0, 1fr); }
}
.r25-public.contacts-page .contact-documents { margin-top: 46px; }
.r25-public.contacts-page .contact-document { background: var(--paper); }
.r25-public.contacts-page .contact-document strong { font-size: 17px; font-weight: 500; }
.r25-public.contacts-page .contact-document small { font-size: 14px; }
.r25-public.contacts-page .contact-document-unavailable { background: transparent; }

@media (max-width: 900px) {
  .r25-public.r25-commerce .lesson-topup-layout { grid-template-columns: minmax(0, 1fr); }
  .r25-public.r25-commerce .lesson-topup-summary { position: static; }
}
@media (max-width: 650px) {
  .r25-public.r25-commerce :is(.student-commerce-context, .compact-purchase-shell, .lesson-topup-main, .payment-status-shell) {
    width: calc(100% - 32px);
  }
  .r25-public.r25-commerce :is(.compact-purchase-shell, .lesson-topup-main, .payment-status-shell) { padding-block: 20px 48px; }
  .r25-public.r25-commerce .compact-purchase-form { grid-template-columns: minmax(0, 1fr); }
  .r25-public.r25-commerce :is(.compact-form-section, .panel-like, .payment-state-card) { padding: 20px; border-radius: 18px; }
  .r25-public.r25-commerce .compact-group-option { grid-template-columns: minmax(0, 1fr); }
  .r25-public.r25-commerce .compact-section-head { align-items: start; gap: 12px; }
  .r25-public.r25-commerce .compact-section-head > small { text-align: left; }
  .r25-public.r25-commerce .compact-plan-options { grid-template-columns: minmax(0, 1fr); }
  .r25-public.r25-commerce .lesson-package-custom { padding: 16px; }
  .r25-public.r25-commerce .lesson-package-custom-head { flex-wrap: wrap; }
  .r25-public.r25-commerce .lesson-package-custom-head label { width: 100%; }
  .r25-public.r25-commerce .compact-plan-card .compact-plan-price { font-size: 24px; }
  .r25-public.r25-commerce .compact-purchase-submit { width: 100%; min-width: 0; }
  .r25-public.r25-commerce .payment-order-grid { grid-template-columns: minmax(0, 1fr); }
  .r25-public.r25-commerce .payment-order-head { align-items: start; flex-wrap: wrap; }
  .r25-public.r25-commerce .payment-state-main { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
  .r25-public.r25-commerce .payment-state-icon { width: 44px; height: 44px; border-radius: 12px; }
  .r25-public.r25-commerce .payment-state-copy h2 { font-size: 22px; }
  .r25-public.r25-commerce .payment-state-actions > :is(a, form),
  .r25-public.r25-commerce .payment-state-actions button { width: 100%; }
  .r25-public.contacts-page .contacts-main { padding-block: 24px 48px; }
  .r25-public.contacts-page .contacts-heading { margin-block: 24px 28px; }
  .r25-public.contacts-page .contacts-heading p { font-size: 17px; }
  .r25-public.contacts-page :is(.contact-panel, .contact-documents) h2 { font-size: 23px; }
  .r25-public.contacts-page .contact-panel .btn { width: 100%; }
}
/* Keep the section number with a naturally wrapping heading. Secondary actions
   move to the next flex line instead of squeezing a short word such as «Группа». */
.r25-public.r25-commerce .compact-section-head > div {
  flex: 0 0 auto;
  max-width: 100%;
  min-width: 0;
}
.r25-public.r25-commerce .compact-section-head h2 {
  overflow-wrap: normal;
  word-break: normal;
}
.r25-public.r25-commerce .compact-section-head > :is(a, small) {
  flex: 0 0 auto;
  max-width: 100%;
}
