.rental-page {
  background: #f7fafc;
}

.rental-hero {
  display: grid;
  grid-template-columns: minmax(360px, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(34px, 5vw, 76px);
  padding: clamp(38px, 6vw, 88px) clamp(20px, 5vw, 76px) clamp(64px, 8vw, 108px);
  background: linear-gradient(135deg, #eef8ff 0%, #fff 60%);
}

.rental-hero h1 {
  margin-bottom: 20px;
  font-size: clamp(54px, 6.4vw, 96px);
  line-height: .95;
}

.rental-hero-copy > p:not(.eyebrow) {
  max-width: 700px;
  color: var(--muted);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.45;
}

.rental-hero figure {
  margin: 0;
}

.rental-hero img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(18, 51, 74, .14);
}

.rental-apply-button {
  margin-top: 26px;
  border-color: #d71920;
  background: #d71920;
  color: #fff;
}

.rental-apply-button:hover,
.rental-apply-button:focus-visible {
  border-color: #b51218;
  background: #b51218;
  color: #fff;
}

.rental-summary,
.rental-terms-section,
.rental-cta {
  padding: clamp(64px, 8vw, 106px) clamp(20px, 5vw, 76px);
}

.rental-summary {
  border-block: 1px solid #c9ddea;
  background: #eef8ff;
}

.rental-section-heading {
  max-width: 980px;
}

.rental-section-heading h2,
.rental-cta h2 {
  font-size: clamp(40px, 5vw, 70px);
}

.rental-section-heading > p:last-child,
.rental-cta p {
  color: var(--muted);
  font-size: clamp(18px, 1.7vw, 23px);
  line-height: 1.5;
}

.rental-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 38px;
  overflow: hidden;
  border: 1px solid #c9ddea;
  border-radius: 18px;
  background: #fff;
}

.rental-summary-grid article {
  min-height: 210px;
  padding: clamp(24px, 3vw, 42px);
}

.rental-summary-grid article + article {
  border-left: 1px solid #dbe7ef;
}

.rental-summary-grid strong,
.rental-summary-grid span {
  display: block;
}

.rental-summary-grid strong {
  margin-bottom: 12px;
  font-size: clamp(54px, 6vw, 92px);
  line-height: 1;
}

.rental-summary-grid article > span {
  color: var(--muted);
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 900;
}

.summary-free strong { color: #0f875a; }
.summary-reserved strong { color: #d71920; }
.summary-total strong { color: #1679ba; }
.summary-use strong { color: #7a4ab0; }

.rental-meter {
  height: 18px;
  margin-top: 30px;
  overflow: hidden;
  border-radius: 999px;
  background: #d6e8f2;
}

.rental-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f875a, #1679ba);
  transition: width .35s ease;
}

.rental-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 17px;
  font-weight: 800;
}

.rental-terms-section {
  background: #fff;
}

.rental-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0;
}

.rental-legend span {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.rental-legend .is-available { background: #dff5e9; color: #086640; }
.rental-legend .is-last { background: #fff0d5; color: #9a5700; }
.rental-legend .is-full { background: #ffe0e2; color: #a41117; }

.rental-terms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.rental-term {
  display: grid;
  align-content: start;
  min-height: 280px;
  padding: 26px;
  border: 2px solid #dbe4eb;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(18, 51, 74, .05);
}

.rental-term.status-available { border-top: 8px solid #0f875a; }
.rental-term.status-last { border-top: 8px solid #ef8a00; }
.rental-term.status-full { border-top: 8px solid #d71920; }

.rental-term-number {
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.rental-term h3 {
  margin: 12px 0 24px;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.2;
}

.rental-term-status {
  margin-top: auto;
  font-size: 22px;
}

.status-available .rental-term-status { color: #0f875a; }
.status-last .rental-term-status { color: #b36500; }
.status-full .rental-term-status { color: #b51218; }

.rental-term p {
  margin: 8px 0 14px;
  color: var(--muted);
  font-weight: 700;
}

.rental-term-meter {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9eef2;
}

.rental-term-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
}

.lesson-rental-page .rental-hero,
.lesson-rental-page .rental-summary {
  background: linear-gradient(135deg, #f5effc 0%, #eef8ff 100%);
}

.lesson-rental-page .rental-apply-button {
  border-color: #7a4ab0;
  background: #7a4ab0;
}

.lesson-rental-page .rental-apply-button:hover,
.lesson-rental-page .rental-apply-button:focus-visible {
  border-color: #633594;
  background: #633594;
}

.has-set-breakdown .rental-terms {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.has-set-breakdown .rental-term {
  min-height: 580px;
}

.rental-set-list {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.rental-set-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 11px 13px;
  border-left: 5px solid #0f875a;
  border-radius: 8px;
  background: #eff9f4;
}

.rental-set-list li.status-last {
  border-left-color: #ef8a00;
  background: #fff7e8;
}

.rental-set-list li.status-full {
  border-left-color: #d71920;
  background: #fff0f1;
}

.rental-set-list span {
  font-weight: 800;
  line-height: 1.25;
}

.rental-set-list strong {
  color: #086640;
  font-size: 14px;
  white-space: nowrap;
}

.rental-set-list .status-last strong { color: #9a5700; }
.rental-set-list .status-full strong { color: #a41117; }

.status-available .rental-term-meter { color: #0f875a; }
.status-last .rental-term-meter { color: #ef8a00; }
.status-full .rental-term-meter { color: #d71920; }

.rental-loading,
.rental-error {
  grid-column: 1 / -1;
  padding: 34px;
  border: 1px dashed #b9c6d0;
  border-radius: 14px;
  color: var(--muted);
  font-size: 19px;
  font-weight: 800;
  text-align: center;
}

.rental-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 42px;
  border-top: 1px solid #edd58b;
  background: #fff8e7;
}

.rental-cta .button {
  min-width: 260px;
  margin: 0;
}

@media (max-width: 1000px) {
  .rental-hero,
  .rental-cta {
    grid-template-columns: 1fr;
  }

  .rental-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rental-summary-grid article:nth-child(3) {
    border-left: 0;
    border-top: 1px solid #dbe7ef;
  }

  .rental-summary-grid article:nth-child(4) {
    border-top: 1px solid #dbe7ef;
  }

  .rental-terms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .rental-hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .rental-summary-grid,
  .rental-terms,
  .has-set-breakdown .rental-terms {
    grid-template-columns: 1fr;
  }

  .rental-summary-grid article + article {
    border-top: 1px solid #dbe7ef;
    border-left: 0;
  }

  .rental-summary-grid article {
    min-height: 160px;
  }

  .rental-term {
    min-height: 230px;
  }

  .has-set-breakdown .rental-term {
    min-height: 0;
  }

  .rental-set-list li {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .rental-cta .button {
    width: 100%;
    min-width: 0;
  }
}
