/* Commissions page. Shared tokens, fonts, logo, circle menu and the
   title/kink-line component come from styles.css.
   Values from the two Figma screens (1920 × 1080). */

.commission-page {
  --c-purple: #A161F6;
  --c-purple-deep: #6517eb;  /* "next step" hover */
  --c-lavender: #f2ecfa;     /* button text / "go back" hover */
  --c-detail-title: #a161f6; /* style name on the details screen */
  --c-lightpurple: #F3ECFC;
  --c-dot: #d9d9d9;
  --c-dot-on: #66A331;       /* step ring, travelled line */
  --c-check: #A4A19A;        /* terms check circle once read */
  --c-dot-done: #d0e09a;     /* fill of completed steps */
  --c-dot-current: #a8d84b;  /* fill of the current step */
  --c-line: #60605f;
  /* Detail slider (from the "viewed" mockup) */
  --c-slider: #97D826;         /* handle, travelled line, viewed rings */
  --c-slider-glow: #c5e565;    /* thin lime edge under the travelled line */
  --c-slider-ahead: #6E0CF5;   /* line and rings not reached yet */
  --c-slider-viewed: #e6fbd2;  /* fill of styles already viewed */
  --c-slider-handle: #E1FCCE;  /* handle's inner circle */
  --c-slider-ring: #97D826;    /* handle's ring */

  /* Carousel card: 659 × 364 (60% of 1099 × 607), shrinking only when
     the window is too narrow to fit it inside the 100px side margins. */
  --card-w: max(260px, min(659px, calc(100vw - 2 * var(--side-margin))));
  --card-h: calc(var(--card-w) * 607 / 1099);

  /* Detail image (999 × 916 at 1920). */
  --img-w: min(999px, 52.03vw);
  --img-h: max(420px, min(916px, calc(100vh - 164px)));
}

.commissions {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  overflow-x: clip;
  background:
    linear-gradient(180deg, #bce44b 0%, #d4f0d5 22%, #ecf9ec 60%, var(--white) 100%),
    var(--white);
}

/* The details screen has a softer mint-to-cream background (sampled
   from the mockup); it fades in over the lime one while a style opens. */
.commissions::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #d0eed0 0%, #e7f5e0 13%, #f7fbeb 22%, #fffdf1 34%, #fffef8 67%, var(--white) 100%);
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.commissions.is-detail::before {
  opacity: 1;
}

.commissions > .choose,
.commissions > .detail {
  position: relative;
}

/* Keep the logo above both screens so it stays clickable. */
.commissions > .site-header {
  z-index: 5;
}

/* Both screens share one grid cell so one can animate over the other. */
.choose,
.detail {
  grid-area: 1 / 1;
  transition: opacity 0.45s ease, visibility 0s linear 0s;
}

.is-inactive {
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Screen 1: choose a style ---------- */
.choose {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 131px 0 40px;
}

.choose__title {
  margin: 0;
  padding: 0 16px;
  font-family: "Aero", "Sora", sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 28px;
  letter-spacing: 1.92px;
  text-transform: uppercase;
  text-align: center;
  color: var(--text);
}

.choose__title,
.choose__info,
.detail-slider {
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.choose.is-leaving .choose__title,
.choose.is-leaving .choose__info,
.choose.is-leaving .detail-slider {
  opacity: 0;
  transform: translateY(12px);
}

.choose.is-leaving .choose__title {
  transform: translateY(-12px);
}

.styles-carousel {
  position: relative;
  width: 100%;
  height: var(--card-h);
  margin-top: 86px;
  perspective: 2200px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  outline: none;
}

.styles-carousel.is-dragging {
  cursor: grabbing;
}

.style-card {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--card-w);
  height: var(--card-h);
  margin-left: calc(var(--card-w) / -2);
  padding: 0;
  border: 0;
  background: #f4f4f4;
  overflow: hidden;
  display: grid;
  place-items: center;
  cursor: pointer;
  transform-origin: 50% 50%;
  will-change: transform, opacity;
  font: inherit;
  color: var(--text);
}

.style-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 6px;
}

.styles-carousel.is-dragging .style-card {
  cursor: grabbing;
}

/* Shared by carousel cards, the flying card and the detail image. */
.style-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.style-number {
  position: relative;
  font-family: "Aeroblade DEMO", "Aero", sans-serif;
  font-size: 64px;
  line-height: 1;
  letter-spacing: 3.84px;
  color: var(--text);
  pointer-events: none;
}

.style-card .style-number {
  font-size: calc(var(--card-w) * 0.0582);
}

/* The card travelling between the two screens. */
.style-flyer {
  position: fixed;
  z-index: 40;
  margin: 0;
  background: #f4f4f4;
  overflow: hidden;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* Title + description: same component as the home carousel, at the
   sizes in this mockup (SKETCHED / line art and optional shading). */
.choose__info {
  --name-h: 43px;
  --title-gap: 10px;
  margin-top: 32px;
}

.choose__info .project-title__name {
  font-size: 34px;
  line-height: 43px;
  letter-spacing: 1.36px;
  color: var(--c-detail-title);
}

.choose__info .project-title__desc {
  font-size: 15px;
  line-height: 19px;
  letter-spacing: 0.9px;
}

/* ---------- "less detail — more detail" slider ---------- */
.detail-slider {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 47px;
  font-size: 13px;
  letter-spacing: 0.78px;
  color: var(--desc-grey);
}

.detail-slider__track {
  position: relative;
  width: 220px;
  height: 24px;
  cursor: pointer;
  touch-action: none;
  outline: none;
}

.detail-slider__line,
.detail-slider__fill {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--c-slider-ahead);
  opacity: 0.6;
}

/* The stretch already travelled: dark green with a thin lime edge. */
.detail-slider__fill {
  height: 2px;
  margin-top: -0.5px;
  right: auto;
  width: 0;
  opacity: 1;
  background: var(--c-slider);
  box-shadow: 0 1px 0 var(--c-slider-glow);
}

.detail-slider__dot {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  padding: 0;
  border: 1.5px solid var(--c-slider-ahead);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
  transition:
    transform 0.2s ease,
    background-color 0.3s ease,
    border-color 0.3s ease;
}

/* Styles you've already moved past look "viewed". */
.detail-slider__dot.is-viewed {
  border-color: var(--c-slider);
  background: var(--c-slider-viewed);
}

.detail-slider__dot:hover {
  transform: scale(1.25);
}

.detail-slider__thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--c-slider-ring);
  border-radius: 50%;
  background: var(--c-slider-handle);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.detail-slider__track:focus-visible .detail-slider__thumb {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- Screen 2: details ---------- */
.detail {
  display: grid;
  grid-template-columns: var(--img-w) minmax(0, 1fr);
  column-gap: calc(55 / var(--frame-w) * 100vw);
  align-items: start;
  padding:
    127px calc(102 / var(--frame-w) * 100vw) 37px calc(99 / var(--frame-w) * 100vw);
}

.detail__media {
  position: relative;
  width: var(--img-w);
  height: var(--img-h);
  background: #f4f4f4;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.detail__info {
  position: relative;
  display: flex;
  flex-direction: column;
  height: var(--img-h);
  min-width: 0;
}

/* Right-column parts slide in from the right, one after another.
   Entrance is the lively one: a quick start that glides past its spot by
   a hair and settles back. The exit (below) is calmer. Both travel the
   same distance, --detail-slide. */
.detail {
  --detail-slide: 80px;
}

.detail__nav,
.detail__head,
.detail__body,
.stepper,
.detail__actions {
  transition:
    opacity 0.45s ease,
    transform 0.75s cubic-bezier(0.22, 1.25, 0.36, 1);
}

.detail.is-entering .detail__nav,
.detail.is-entering .detail__head,
.detail.is-entering .detail__body,
.detail.is-entering .stepper,
.detail.is-entering .detail__actions {
  opacity: 0;
  transform: translateX(var(--detail-slide));
  transition-duration: 0.3s, 0.3s;
  transition-delay: 0s;
}

.detail:not(.is-entering) .detail__head { transition-delay: 0.05s; }
.detail:not(.is-entering) .detail__body { transition-delay: 0.12s; }
.detail:not(.is-entering) .stepper { transition-delay: 0.19s; }
.detail:not(.is-entering) .detail__actions { transition-delay: 0.26s; }

/* Leaving the details: a gentler exit. Each part drifts right at an even
   pace (ease-in-out) and has fully faded before its movement ends, so it
   never stops while still visible; parts leave top to bottom. */
.detail.is-exiting .detail__nav,
.detail.is-exiting .detail__head,
.detail.is-exiting .detail__body,
.detail.is-exiting .stepper,
.detail.is-exiting .detail__actions {
  opacity: 0;
  transform: translateX(var(--detail-slide));
  transition:
    opacity 0.45s cubic-bezier(0.4, 0, 0.6, 1),
    transform 0.62s cubic-bezier(0.45, 0, 0.55, 1);
}

.detail.is-exiting .detail__head { transition-delay: 0.03s; }
.detail.is-exiting .detail__body { transition-delay: 0.06s; }
.detail.is-exiting .stepper { transition-delay: 0.09s; }
.detail.is-exiting .detail__actions { transition-delay: 0.12s; }

/* "next style": everything (image first) slides out to the left... */
.detail.is-switching-out .detail__media,
.detail.is-switching-out .detail__nav,
.detail.is-switching-out .detail__head,
.detail.is-switching-out .detail__body,
.detail.is-switching-out .stepper,
.detail.is-switching-out .detail__actions {
  opacity: 0;
  transform: translateX(calc(var(--detail-slide) * -1));
  transition:
    opacity 0.38s cubic-bezier(0.4, 0, 0.6, 1),
    transform 0.46s cubic-bezier(0.45, 0, 0.55, 1);
}

.detail.is-switching-out .detail__nav { transition-delay: 0.03s; }
.detail.is-switching-out .detail__head { transition-delay: 0.05s; }
.detail.is-switching-out .detail__body { transition-delay: 0.07s; }
.detail.is-switching-out .stepper { transition-delay: 0.09s; }
.detail.is-switching-out .detail__actions { transition-delay: 0.11s; }

/* ...then the next style starts just off to the right, hidden... */
.detail.is-switching-prep .detail__media,
.detail.is-switching-prep .detail__nav,
.detail.is-switching-prep .detail__head,
.detail.is-switching-prep .detail__body,
.detail.is-switching-prep .stepper,
.detail.is-switching-prep .detail__actions {
  opacity: 0;
  transform: translateX(var(--detail-slide));
  transition: none;
}

/* ...and glides in gently: image first, text staggered after it, so the
   text is the last thing to settle. */
.detail.is-switching-in .detail__media,
.detail.is-switching-in .detail__nav,
.detail.is-switching-in .detail__head,
.detail.is-switching-in .detail__body,
.detail.is-switching-in .stepper,
.detail.is-switching-in .detail__actions {
  transition:
    opacity 0.55s ease,
    transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

.detail.is-switching-in .detail__nav { transition-delay: 0.1s; }
.detail.is-switching-in .detail__head { transition-delay: 0.16s; }
.detail.is-switching-in .detail__body { transition-delay: 0.22s; }
.detail.is-switching-in .stepper { transition-delay: 0.28s; }
.detail.is-switching-in .detail__actions { transition-delay: 0.34s; }

/* "← all styles" on the left, "next style →" on the right. */
.detail__nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail__back,
.detail__next-style {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  letter-spacing: 0.78px;
  color: var(--desc-grey);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.detail__next-style span {
  display: inline-block;
  margin-left: 6px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.detail__back:hover,
.detail__next-style:hover {
  color: var(--text);
}

.detail__next-style:hover span {
  transform: translateX(4px);
}

.detail__next-style:focus-visible,
.detail__back:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Hidden only if there's a single style. */
.detail__next-style[hidden] {
  display: inline-block;
  visibility: hidden;
}

.detail__head,
.detail__body {
  width: min(642px, 100%);
  text-align: center;
}

.detail__head {
  margin-top: 70px;
}

.detail__name {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  line-height: 43px;
  letter-spacing: 1.36px;
  text-transform: uppercase;
  color: var(--c-detail-title);
}

.detail__desc {
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 19px;
  letter-spacing: 0.9px;
  color: var(--desc-grey);
}

.detail__body {
  margin-top: 96px;
}

.detail__time {
  margin: 0;
  font-size: 18px;
  line-height: 23px;
  letter-spacing: 1.08px;
  color: var(--desc-grey);
}

/* Price list: label column then price, rows 60px apart. */
.detail__prices {
  display: grid;
  grid-template-columns: 143px auto;
  justify-content: center;
  row-gap: 41px;
  margin: 34px 0 0;
  text-align: left;
  font-size: 15px;
  line-height: 19px;
  letter-spacing: 0.9px;
  color: var(--desc-grey);
}

.detail__prices dt {
  font-weight: 600;
}

.detail__prices dd {
  margin: 0;
}

.detail__panel-title {
  margin: 0;
  font-size: 18px;
  line-height: 23px;
  letter-spacing: 1.08px;
  color: var(--desc-grey);
}

.detail__panel-text {
  max-width: 440px;
  margin: 18px auto 0;
  font-size: 15px;
  line-height: 24px;
  letter-spacing: 0.6px;
  color: var(--desc-grey);
}

/* ---------- Terms of service: collapsible sections ---------- */
.terms {
  width: min(440px, 100%);
  margin: 18px auto 0;
  text-align: left;
  color: var(--desc-grey);
}

.terms__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0 8px;
  border: 0;
  border-bottom: 1px solid #d9d9d9;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 19px;
  letter-spacing: 0.9px;
  text-align: left;
  cursor: pointer;
}

.terms__title {
  flex: 1 1 auto;
  min-width: 0;
}

/* Read indicator: an empty ring that fills lime with a tick once the
   section has been opened. */
.terms__check {
  width: 15px;
  height: 15px;
  flex: none;
  margin-right: 10px;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.terms__check circle {
  fill: transparent;
  stroke: #c4c4c4;
  stroke-width: 1.2;
  transition: fill 0.25s ease, stroke 0.25s ease;
}

.terms__check path {
  stroke: #fff;
  stroke-width: 1.8;
  stroke-dasharray: 10;
  stroke-dashoffset: 10;
  transition: stroke-dashoffset 0.3s ease 0.12s;
}

.terms__toggle.is-read .terms__check circle {
  fill: var(--c-check);
  stroke: var(--c-check);
}

.terms__toggle.is-read .terms__check path {
  stroke-dashoffset: 0;
}

.terms__chevron {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.terms__toggle[aria-expanded="false"] .terms__chevron {
  transform: rotate(-90deg);
}

.terms__toggle:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Smooth open/close: the panel's row animates between 0 and auto. */
.terms__panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.terms__toggle[aria-expanded="false"] + .terms__panel {
  grid-template-rows: 0fr;
}

.terms__content {
  min-height: 0;
  overflow: hidden;
}

.terms__summary {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: 0.6px;
  font-weight: 600;
}

.terms__points {
  margin: 8px 0 6px;
  padding-left: 18px;
  font-size: 14px;
  line-height: 21px;
  letter-spacing: 0.6px;
}

.terms__points li + li {
  margin-top: 6px;
}

/* ---------- Stepper ---------- */
.stepper {
  position: relative;
  display: flex;
  justify-content: space-between;
  width: min(642px, 100%);
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

/* Grey connecting line, from the first dot to the last; the lime part
   grows as steps are completed (--progress 0–1). */
.stepper::before,
.stepper::after {
  content: "";
  position: absolute;
  left: var(--first, 28px);
  right: var(--last, 42px);
  bottom: 14px;
  height: 1px;
  background: var(--c-line);
}

.stepper::after {
  height: 2px;
  margin-bottom: -0.5px;
  right: auto;
  width: calc((100% - var(--first, 28px) - var(--last, 42px)) * var(--progress, 0));
  background: var(--c-dot-on);
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.stepper__step {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  font-size: 14px;
  line-height: 18px;
  letter-spacing: 0.84px;
  white-space: nowrap;
  color: var(--text);
}

.stepper__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-dot);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Reached steps get a green ring: pale fill once done, brighter on the
   current one. Upcoming steps stay plain grey. */
.stepper__step.is-done .stepper__dot,
.stepper__step.is-current .stepper__dot {
  background: var(--c-dot-done);
  box-shadow: inset 0 0 0 2px var(--c-dot-on);
}

.stepper__step.is-current .stepper__dot {
  background: var(--c-dot-current);
}

.stepper__step.is-current .stepper__dot {
  transform: scale(1.08);
}

/* The step you're on reads a hair heavier. */
.stepper__step.is-current .stepper__label {
  font-weight: 450;
}

/* "go back" (outlined, smaller) + "next step" (filled purple). */
.detail__actions {
  align-self: flex-end;
  display: flex;
  gap: 10px;
  margin-top: 28px;
}

.detail__next,
.detail__prev {
  height: 42px;
  border: 0;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.9px;
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s ease, opacity 0.3s ease;
}

.detail__next {
  width: 160px;
  background: var(--c-purple);
  color: var(--c-lavender);
}

.detail__prev {
  width: 100px;
  border: 1.5px solid var(--c-purple);
  background: transparent;
  color: var(--c-purple);
  font-size: 13px;
}

.detail__next:hover {
  background: var(--c-purple-deep);
}

/* Locked until each terms section has been opened. */
.detail__next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.detail__next:disabled:hover {
  background: var(--c-purple);
}

.detail__prev:hover {
  background: var(--c-lavender);
}

/* Nothing to go back to on the first step (keeps its space). */
.detail__prev.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.detail__next:focus-visible,
.detail__prev:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .detail__body {
    margin-top: 56px;
  }
}

/* Tablets and phones: details stack under the image. */
@media (max-width: 900px) {
  .commission-page {
    --img-w: 100%;
  }

  .detail {
    grid-template-columns: 1fr;
    row-gap: 28px;
    padding: 110px 16px 40px;
  }

  .detail__media {
    height: auto;
    aspect-ratio: 999 / 916;
    max-height: 70vh;
  }

  .detail__info {
    height: auto;
    align-items: center;
  }

  .detail__nav {
    position: static;
    align-self: stretch;
  }

  .detail__head {
    margin-top: 18px;
  }

  .detail__body {
    margin-top: 32px;
  }

  .stepper {
    margin-top: 48px;
  }

  .detail__actions {
    align-self: stretch;
    margin-top: 36px;
  }

  .detail__next {
    flex: 1 1 auto;
    width: auto;
  }

  .detail__prev {
    flex: 0 0 auto;
    width: 34%;
  }
}

@media (max-width: 767px) {
  .commission-page {
    --card-w: 84vw;
  }

  .choose {
    padding-top: 110px;
  }

  .choose__title {
    font-size: 19px;
    line-height: 20px;
    letter-spacing: 1.14px;
  }

  .styles-carousel {
    margin-top: 32px;
  }

  .choose__info {
    --name-h: 32px;
    --title-gap: 10px;
    margin-top: 16px;
  }

  .choose__info .project-title__name,
  .detail__name {
    font-size: 26px;
    line-height: 32px;
  }

  .detail-slider {
    gap: 12px;
    margin-top: 46px;
    font-size: 12px;
  }

  .detail-slider__track {
    width: 150px;
  }

  .stepper__step {
    gap: 10px;
    font-size: 11px;
    letter-spacing: 0.4px;
  }

  .stepper__dot {
    width: 22px;
    height: 22px;
  }

  .stepper::before,
  .stepper::after {
    bottom: 11px;
  }
}

/* ---------- Short windows: everything fits without scrolling ----------
   commissions.js sets --vs from the window height (1 at 890px tall and
   up, never below 0.5). Spacing, cards, dots and buttons scale by it;
   text scales too but stops at a readable minimum. Side-by-side layouts
   only; the stacked phone/tablet layout scrolls. */
@media (min-width: 901px) {
  .commission-page {
    --vs: 1;
    --card-w: max(260px, min(659px, calc(100vw - 2 * var(--side-margin)), calc(659px * var(--vs))));
    /* Detail image keeps its 999 × 916 shape, shrinking as one piece. */
    --img-h: min(916px, calc(100vh - 110px - 54px * var(--vs)));
    --img-w: min(999px, 52.03vw, calc(var(--img-h) * 999 / 916));
    --dot: max(18px, calc(28px * var(--vs)));
  }

  /* Choose screen */
  .choose {
    padding: calc(110px + 21px * var(--vs)) 0 calc(40px * var(--vs));
  }

  .choose__title {
    font-size: max(16px, calc(24px * var(--vs)));
    line-height: 1.17;
  }

  .styles-carousel {
    margin-top: calc(86px * var(--vs));
  }

  .choose__info {
    --name-h: max(28px, calc(43px * var(--vs)));
    margin-top: calc(32px * var(--vs));
  }

  .choose__info .project-title__name,
  .detail__name {
    font-size: max(22px, calc(34px * var(--vs)));
    line-height: max(28px, calc(43px * var(--vs)));
  }

  .choose__info .project-title__desc,
  .detail__desc {
    font-size: max(12px, calc(15px * var(--vs)));
    line-height: 1.27;
  }

  .detail-slider {
    margin-top: calc(47px * var(--vs));
    font-size: max(11px, calc(13px * var(--vs)));
  }

  /* Details screen */
  .detail {
    padding-top: calc(110px + 17px * var(--vs));
    padding-bottom: calc(37px * var(--vs));
  }

  .detail__back,
  .detail__next-style {
    font-size: max(11px, calc(13px * var(--vs)));
  }

  .detail__head {
    margin-top: calc(70px * var(--vs));
  }

  .detail__desc {
    margin-top: calc(4px * var(--vs));
  }

  .detail__body {
    margin-top: calc(96px * var(--vs));
  }

  .detail__time,
  .detail__panel-title {
    font-size: max(13px, calc(18px * var(--vs)));
    line-height: 1.28;
  }

  .detail__prices {
    row-gap: calc(41px * var(--vs));
    margin-top: calc(34px * var(--vs));
    font-size: max(12px, calc(15px * var(--vs)));
    line-height: 1.27;
  }

  .detail__panel-text {
    margin-top: calc(18px * var(--vs));
    font-size: max(12px, calc(15px * var(--vs)));
    line-height: 1.6;
  }

  .stepper::before,
  .stepper::after {
    bottom: calc(var(--dot) / 2);
  }

  .stepper__step {
    gap: calc(15px * var(--vs));
    font-size: max(11px, calc(14px * var(--vs)));
    line-height: 1.29;
  }

  .stepper__dot {
    width: var(--dot);
    height: var(--dot);
  }

  .detail__actions {
    margin-top: calc(28px * var(--vs));
  }

  .detail__next,
  .detail__prev {
    height: max(34px, calc(42px * var(--vs)));
    font-size: max(12px, calc(14px * var(--vs)));
  }

  .detail__next {
    width: max(128px, calc(160px * var(--vs)));
  }

  .detail__prev {
    width: max(84px, calc(100px * var(--vs)));
    font-size: max(11px, calc(13px * var(--vs)));
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .detail__body {
    margin-top: calc(56px * var(--vs));
  }
}

/* Terms sections on short windows: they scale with --vs like the rest,
   and if the panel still runs out of room it scrolls inside itself
   rather than spilling into the stepper. */
@media (min-width: 901px) {
  .detail__body {
    min-height: 0;
    margin-bottom: calc(20px * var(--vs));
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .terms {
    margin-top: calc(18px * var(--vs));
  }

  .terms__toggle {
    padding: calc(12px * var(--vs)) 0 calc(8px * var(--vs));
    font-size: max(12px, calc(15px * var(--vs)));
    line-height: 1.27;
  }

  .terms__summary,
  .terms__points {
    font-size: max(12px, calc(14px * var(--vs)));
    line-height: 1.5;
  }

  .terms__summary {
    margin-top: calc(12px * var(--vs));
  }

  .terms__points {
    margin: calc(8px * var(--vs)) 0 calc(6px * var(--vs));
  }

  .terms__points li + li {
    margin-top: calc(6px * var(--vs));
  }
}
