/*
 * EGE-School school page (design B-school): hero with the rating card, sticky section
 * nav, course groups and «Показать все курсы», the promo block (cards: promos.css), lite
 * YouTube previews, «О школе» with «Читать полностью», contacts, reviews (list, distribution,
 * «Показать ещё») and the review form (B-review-form).
 * Loaded after page.css, schools.css (logo plate), subject.css (course cards) and
 * promos.css (promo cards).
 * Values from docs/design/b/B-school-*.dc.html; colours only from base.css tokens.
 */

.es-school {
  padding-bottom: clamp(56px, 7vw, 88px);
}

/* anchors land below the sticky nav */
.es-school [id] {
  scroll-margin-top: 84px;
}

/* elements toggled by school.js keep display:none over their own display */
.es-school [hidden] {
  display: none !important;
}

/* ---------- hero ---------- */
.es-school-hero__inner {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-8);
  padding-top: var(--es-s-6);
  padding-bottom: clamp(40px, 5vw, 56px);
}

.es-school-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: end;
  gap: 40px;
}

.es-school-hero__main {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-6);
  min-width: 0;
}

.es-school-hero__top {
  display: flex;
  align-items: center;
  gap: 20px;
}

.es-school-hero .es-logo {
  flex: none;
  width: 96px;
  height: 96px;
  border-radius: 30px;
  background: var(--es-white);
  font-size: 30px;
}

.es-school-hero .es-logo--text {
  background: var(--es-subj-profilnaya-matematika);
}

.es-school-hero__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--es-s-2);
  min-width: 0;
  list-style: none;
}

.es-school-hero__tags .es-tag--glass {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
}

.es-school-hero__title {
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1;
}

.es-school-hero__lead {
  max-width: 640px;
  font-size: clamp(15px, 1.4vw, 19px);
}

.es-school-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--es-s-3);
}

.es-school-hero__ad {
  color: var(--es-on-dark);
  font-size: 12px;
  line-height: 1.4;
}

.es-school-hero__side {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-3);
  min-width: 0;
}

.es-school-score {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px;
  border-radius: var(--es-r-xl);
  background: var(--es-acc);
  color: var(--es-ink);
}

.es-school-score__label,
.es-school-score__line {
  font-weight: 700;
}

.es-school-score__value {
  font-family: var(--es-font-display);
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 800;
  line-height: 1;
}

.es-school-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--es-s-3);
  list-style: none;
}

.es-school-fact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 20px;
  border-radius: var(--es-r-md);
  background: color-mix(in srgb, var(--es-white) 10%, transparent);
}

.es-school-fact__value {
  font-family: var(--es-font-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 800;
  line-height: 1.2;
}

.es-school-fact__label {
  color: var(--es-on-dark);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* TutorOnline partner card (D44): glass banner in the main hero column, one link,
   text left, outline button right, marking under them */
.es-partner-card {
  max-width: 640px;
  border: 1px solid color-mix(in srgb, var(--es-white) 16%, transparent);
  border-radius: var(--es-r-md);
  background: color-mix(in srgb, var(--es-white) 8%, transparent);
  color: var(--es-white);
}

.es-partner-card__link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    'title button'
    'text button'
    'marking marking';
  align-items: center;
  column-gap: var(--es-s-4);
  row-gap: 4px;
  padding: 18px 20px;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
}

.es-partner-card__title {
  grid-area: title;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.es-partner-card__text {
  grid-area: text;
  color: var(--es-on-dark);
  font-size: 15px;
  line-height: 1.4;
}

.es-partner-card__button {
  grid-area: button;
  max-width: 100%;
}

.es-partner-card__link:hover .es-partner-card__button {
  border-color: var(--es-acc);
  color: var(--es-acc);
}

.es-partner-card__marking {
  grid-area: marking;
  margin-top: var(--es-s-2);
  color: var(--es-on-dark);
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

/* ---------- section nav ---------- */
.es-school-nav {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 10;
  background: var(--es-ground);
}

.es-school-nav__list {
  display: flex;
  gap: var(--es-s-2);
  padding-top: 20px;
  padding-bottom: 12px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}

.es-school-nav__list li {
  flex: none;
}

.es-school-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border-radius: var(--es-r-pill);
  background: var(--es-white);
  color: var(--es-ink);
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}

.es-school-nav__link:hover {
  background: var(--es-acc);
  color: var(--es-ink);
}

.es-school-nav__count {
  color: var(--es-muted);
}

.es-school-nav__link:hover .es-school-nav__count {
  color: var(--es-ink);
}

/* ---------- sections ---------- */
.es-school-section {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-6);
  padding-top: clamp(40px, 5vw, 72px);
}

.es-school-courses {
  padding-top: clamp(28px, 3vw, 48px);
}

.es-school-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--es-s-4) 20px;
}

.es-school-section__title {
  margin: 0;
  font-family: var(--es-font-display);
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

/* ---------- courses ---------- */
.es-school-subjects {
  display: flex;
  flex-wrap: wrap;
  gap: var(--es-s-2);
}

.es-school-subjects .es-tag {
  height: 32px;
  padding: 0 14px;
  gap: 6px;
  background: var(--chip, var(--es-white));
  font-size: 13px;
}

.es-school-subjects__count {
  color: var(--es-muted-2);
}

.es-course-group {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-3);
}

.es-course-group + .es-course-group,
.es-course-cards + .es-course-cards {
  margin-top: var(--es-s-2);
}

.es-course-group__title {
  margin: 0;
  font-size: inherit;
}

.es-course-group__title .es-chip {
  background: var(--chip, var(--es-white));
}

@media (min-width: 901px) {
  .es-school-courses .es-course-card {
    min-height: 200px;
  }
}


.es-school-more__summary {
  list-style: none;
}

.es-school-more__summary::-webkit-details-marker {
  display: none;
}

.es-school-more__body {
  display: flex;
  margin-top: var(--es-s-6);
  flex-direction: column;
  gap: var(--es-s-6);
}

/* ---------- reviews (#otzyvy): list, «Показать ещё», distribution ---------- */
/* placeholder of single-schools.php, used only without template-parts/schools/school-reviews.php */
.es-school-reviews__summary {
  color: var(--es-muted-2);
  font-weight: 700;
}

.es-school-reviews__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
  gap: var(--es-s-6);
}

.es-school-reviews__main,
.es-school-reviews__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.es-school-reviews__more {
  align-self: flex-start;
}

.es-school-reviews__more[aria-busy='true'] {
  cursor: progress;
}

.es-school-reviews__status {
  color: var(--es-muted-2);
  font-size: 14px;
  font-weight: 700;
}

.es-school-reviews__empty {
  padding: 26px;
  color: var(--es-muted-2);
  font-weight: 600;
}

.es-review {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  padding: 26px;
  border-radius: var(--es-r-lg);
  background: var(--es-white);
}

/* programmatic focus after «Показать ещё» marks where the new portion starts */
.es-review:focus {
  outline: 3px solid var(--es-link-h);
  outline-offset: 2px;
}

.es-review__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--es-s-2) var(--es-s-3);
}

.es-review__author {
  min-width: 0;
  margin: 0;
  font-family: var(--es-font-text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.es-review__score {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--es-r-pill);
  background: var(--es-acc);
  color: var(--es-ink);
  font-size: 13px;
  font-weight: 800;
}

.es-review__title {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.es-review__text {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.es-review__date {
  color: var(--es-muted);
  font-size: 13px;
  font-weight: 600;
}

/* D36: a review without text — name, rating and date in one row */
.es-review--compact {
  padding-top: 16px;
  padding-bottom: 16px;
}

.es-review--compact .es-review__head {
  justify-content: flex-start;
}

.es-review--compact .es-review__date {
  margin-left: auto;
}

.es-review-dist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
}

.es-review-dist__title {
  margin: 0;
  font-family: var(--es-font-display);
  font-size: 18px;
  font-weight: 800;
}

.es-review-dist__avg {
  color: var(--es-muted-2);
  font-weight: 600;
}

.es-review-dist__avg b {
  color: var(--es-ink);
  font-weight: 800;
}

.es-review-dist__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  list-style: none;
}

.es-review-dist__row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.es-review-dist__stars {
  flex: none;
  width: 20px;
}

.es-review-dist__bar {
  flex: 1;
  height: 12px;
  overflow: hidden;
  border-radius: var(--es-r-pill);
  background: var(--es-line-2);
}

.es-review-dist__bar b {
  display: block;
  height: 100%;
  border-radius: var(--es-r-pill);
  background: var(--es-link-h);
}

.es-review-dist__count {
  flex: none;
  min-width: 40px;
  text-align: right;
}

.es-review-dist .es-btn {
  margin-top: var(--es-s-2);
}

/* ---------- review form (#otzyv-forma, B-review-form) ---------- */
.es-review-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  overflow: hidden;
  border-radius: 36px;
}

.es-review-form__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
  padding: 36px 40px;
}

.es-review-form__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.es-review-form span.es-logo {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  font-size: 15px;
}

.es-review-form .es-logo--text {
  background: var(--es-subj-profilnaya-matematika);
}

.es-review-form__title {
  min-width: 0;
  margin: 0;
  font-family: var(--es-font-display);
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 800;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.es-review-form__sent {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-radius: var(--es-r-md);
  background: var(--es-acc);
  font-weight: 700;
}

.es-review-form__sent .es-icon {
  flex: none;
}

.es-review-form__errors {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-2);
  padding: 16px 18px;
  border: 2px dashed var(--es-ink);
  border-radius: var(--es-r-md);
  background: var(--es-ground);
}

.es-review-form__errors-title {
  font-weight: 800;
}

.es-review-form__errors-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 20px;
  font-size: 15px;
}

.es-review-form__errors-list a,
.es-review-form__consent a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.es-review-form__criteria {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.es-review-form__label,
.es-review-form__criteria > legend {
  color: var(--es-muted-2);
  font-size: 13px;
  font-weight: 700;
}

.es-review-form__criteria > legend {
  padding: 0 0 4px;
}

.es-review-form__optional {
  color: var(--es-muted);
  font-weight: 600;
}

.es-rate {
  min-width: 0;
  margin: 0;
  padding: 12px 0;
  border: 0;
  border-bottom: 1px solid var(--es-line-2);
}

.es-rate:last-of-type {
  border-bottom: 0;
}

/* a floated legend takes part in the layout: the options sit to its right */
.es-rate__legend {
  float: left;
  margin-right: var(--es-s-4);
  padding: 0;
  font-weight: 700;
  line-height: 44px;
}

.es-rate__options {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.es-rate__opt {
  position: relative;
  display: block;
}

.es-rate__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.es-rate__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2px solid var(--es-line);
  border-radius: var(--es-r-sm);
  background: var(--es-white);
  font-family: var(--es-font-display);
  font-size: 14px;
  font-weight: 800;
}

.es-rate__opt:hover .es-rate__num {
  border-color: var(--es-muted);
}

/* the chosen score and every score below it are highlighted */
.es-rate__opt:has(.es-rate__input:checked) .es-rate__num,
.es-rate__opt:has(~ .es-rate__opt .es-rate__input:checked) .es-rate__num {
  border-color: var(--es-acc);
  background: var(--es-acc);
}

.es-rate__input:focus-visible + .es-rate__num {
  outline: 3px solid var(--es-link-h);
  outline-offset: 2px;
}

.es-review-form__criteria[aria-describedby] .es-rate__num {
  border-style: dashed;
}

.es-review-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.es-review-form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.es-review-form__hint {
  color: var(--es-muted);
  font-size: 13px;
  line-height: 1.4;
}

.es-review-form__error {
  padding-left: 10px;
  border-left: 3px solid var(--es-link-h);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.es-review-form__criteria .es-review-form__error {
  margin-top: var(--es-s-2);
}

.es-review-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--es-muted-2);
  font-size: 14px;
  line-height: 1.45;
}

.es-review-form__consent input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--es-ink);
}

.es-review-form__submit {
  min-height: 56px;
}

.es-review-form__aside {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 36px 28px;
  background: var(--es-ground);
  color: var(--es-muted-2);
  font-size: 15px;
  line-height: 1.55;
}

.es-review-form__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: var(--es-acc);
  color: var(--es-ink);
}

.es-review-form__aside-title {
  color: var(--es-ink);
  font-family: var(--es-font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
}

.es-review-form__count {
  margin-top: auto;
  padding: 16px;
  border-radius: var(--es-r-md);
  background: var(--es-white);
  color: var(--es-ink);
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- promos ---------- */
.es-school-promos {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: clamp(22px, 3vw, 36px);
  border-radius: 36px;
  background: var(--es-acc);
  color: var(--es-ink);
}

.es-school-promos :focus-visible {
  outline-color: var(--es-ink);
}

.es-school-promos__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: var(--es-s-4);
  list-style: none;
}

/* The card itself is in promos.css (shared with the promo archive, D39): here it keeps
   the dashed frame of B-school on the yellow block. */
.es-school-promos .es-promo-card {
  border: 2px dashed var(--es-ink);
  border-radius: var(--es-r-md);
}

.es-school-promos .es-promo-card__top {
  padding-bottom: 0;
}

.es-school-promos .es-promo-card__bot {
  border-top: 0;
}

/* ---------- videos ---------- */
.es-school-videos__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--es-s-4);
  list-style: none;
}

.es-video {
  position: relative;
  min-width: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--es-r-lg);
  background: var(--es-ink);
}

.es-video__link {
  display: block;
  width: 100%;
  height: 100%;
}

.es-video__link:focus-visible {
  outline-offset: -4px;
}

.es-video__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.es-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--es-r-pill);
  background: var(--es-acc);
  color: var(--es-ink);
  transform: translate(-50%, -50%);
  transition: background-color 0.15s;
}

.es-video__link:hover .es-video__play {
  background: var(--es-acc-h);
}

.es-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- about and contacts ---------- */
.es-school-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: var(--es-s-6);
}

.es-school-about--two {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.es-school-about__text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: clamp(24px, 3vw, 36px);
}

.es-school-about__title {
  font-size: clamp(22px, 2.2vw, 28px);
}

.es-school-about__body.is-collapsed {
  position: relative;
  max-height: 600px;
  overflow: hidden;
}

.es-school-about__body.is-collapsed::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 96px;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--es-white) 0%, transparent), var(--es-white));
  content: '';
  pointer-events: none;
}

.es-school-about__more {
  align-self: flex-start;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--es-ink);
  font-weight: 800;
  cursor: pointer;
}

.es-school-about__more::after {
  content: ' →';
}

.es-school-about__more[aria-expanded='true']::after {
  content: ' ↑';
}

.es-school-about__more:hover {
  color: var(--es-link-h);
}

.es-school-contacts {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-4);
  min-width: 0;
}

.es-school-contacts__title {
  margin: 0;
  font-family: var(--es-font-display);
  font-size: 18px;
  font-weight: 800;
}

.es-school-contacts__list {
  display: flex;
  flex-direction: column;
  gap: var(--es-s-4);
}

.es-school-contacts__row dt {
  color: var(--es-muted);
  font-size: 13px;
  font-weight: 700;
}

.es-school-contacts__row dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.es-school-contacts__row a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- tablet and phone ---------- */
@media (max-width: 900px) {
  .es-school-hero__grid,
  .es-school-about--two,
  .es-school-reviews__grid,
  .es-review-form {
    grid-template-columns: minmax(0, 1fr);
  }

  /* B-school-mobile: the distribution card comes before the list */
  .es-review-dist {
    order: -1;
  }

  .es-school-videos__list {
    display: flex;
    gap: 10px;
    padding-bottom: 4px;
    overflow-x: auto;
  }

  .es-video {
    flex: none;
    width: min(280px, 80vw);
  }

  .es-video__play {
    width: 60px;
    height: 60px;
  }
}

@media (max-width: 640px) {
  .es-school-hero__inner {
    gap: var(--es-s-4);
    padding-top: 4px;
  }

  .es-school-hero__main {
    gap: var(--es-s-4);
  }

  .es-school-hero__top {
    flex-wrap: wrap;
    gap: 14px;
  }

  .es-school-hero .es-logo {
    width: 72px;
    height: 72px;
    border-radius: var(--es-r-md);
    font-size: 22px;
  }

  .es-school-hero__actions .es-btn {
    width: 100%;
  }

  .es-school-score {
    padding: 18px;
    border-radius: var(--es-r-md);
  }

  .es-school-fact {
    padding: 12px 14px;
  }

  .es-partner-card__link {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      'title'
      'text'
      'button'
      'marking';
    padding: 16px;
  }

  .es-partner-card__button {
    width: 100%;
    margin-top: var(--es-s-2);
  }

  .es-school-subjects {
    flex-wrap: nowrap;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .es-school-nav__list,
  .es-school-videos__list {
    scrollbar-width: none;
  }

  .es-school-subjects .es-tag {
    flex: none;
  }

  .es-school-nav__list {
    padding-top: var(--es-s-4);
    padding-bottom: var(--es-s-2);
  }

  .es-school-nav__link {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
  }

  .es-school-more__summary {
    width: 100%;
  }

  .es-review,
  .es-review-dist {
    padding: 18px;
    border-radius: var(--es-r-md);
  }

  .es-review--compact {
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .es-review__author {
    font-size: 14px;
  }

  .es-review__score {
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
  }

  .es-review__title,
  .es-review__text {
    font-size: 15px;
  }

  .es-review__date {
    font-size: 12px;
  }

  .es-school-reviews__more,
  .es-review-dist .es-btn {
    width: 100%;
  }

  .es-review-form {
    border-radius: var(--es-r-lg);
  }

  .es-review-form__form {
    gap: 14px;
    padding: 20px 16px 24px;
  }

  .es-review-form__aside {
    gap: 12px;
    padding: 20px 16px;
  }

  .es-review-form__row {
    grid-template-columns: minmax(0, 1fr);
  }

  /* B-review-form-mobile: each criterion is a white card with five equal buttons */
  .es-review-form__criteria {
    gap: 10px;
  }

  .es-rate,
  .es-rate:last-of-type {
    padding: 16px;
    border: 2px solid var(--es-line-2);
    border-radius: 24px;
  }

  /* still floated (a rendered legend would sit on the border), now a full-width line */
  .es-rate__legend {
    width: 100%;
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.3;
  }

  .es-rate__options {
    display: grid;
    clear: both;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .es-rate__num {
    width: 100%;
    height: 48px;
    border-radius: 16px;
    font-size: 15px;
  }

  .es-review-form__consent {
    min-height: 44px;
  }

  .es-review-form__consent input {
    width: 22px;
    height: 22px;
  }
}

/* the admin bar is not fixed on narrow screens */
@media (max-width: 600px) {
  .es-school-nav {
    top: 0;
  }
}
