.yc-terms-page {
  position: relative;
  min-height: 100vh;
  padding: 24px;
  overflow: hidden;
}

.yc-terms-page .yc-header,
.yc-terms-page .yc-footer,
.yc-terms-hero,
.yc-terms-card {
  position: relative;
  z-index: 1;
}

.yc-terms-page .yc-header {
  margin-bottom: 54px;
}

.yc-terms-page .yc-nav {
  justify-content: flex-end;
}

.yc-terms-hero {
  width: min(980px, 100%);
  margin: 0 auto 28px;
  text-align: center;
}

.yc-terms-hero h1 {
  max-width: 780px;
  margin: 14px auto 18px;
  color: var(--navy);
  font-family: var(--font-display), sans-serif;
  font-size: clamp(2.7rem, 7vw, 5.6rem);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: .94;
}

.yc-terms-intro {
  max-width: 680px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.yc-terms-card {
  width: min(980px, 100%);
  margin: 0 auto 66px;
  padding: clamp(18px, 3vw, 30px);
  border: 1px solid var(--border);
  border-radius: 30px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.yc-terms-card-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 4px 18px;
}

.yc-terms-card-header h2 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-display), sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  font-weight: 740;
  letter-spacing: -.035em;
}

.yc-terms-card-header p,
.yc-scroll-hint {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 650;
}

.yc-terms-scroll {
  max-height: min(64vh, 680px);
  padding: clamp(20px, 4vw, 42px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(14, 43, 119, .14);
  border-radius: 22px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -18px 38px rgba(15, 43, 119, .035);
  scrollbar-color: var(--blue) #e8f2ff;
  scrollbar-width: thin;
}

.yc-terms-scroll::-webkit-scrollbar {
  width: 10px;
}

.yc-terms-scroll::-webkit-scrollbar-track {
  border-radius: 999px;
  background: #e8f2ff;
}

.yc-terms-scroll::-webkit-scrollbar-thumb {
  border: 2px solid #e8f2ff;
  border-radius: 999px;
  background: linear-gradient(var(--cyan), var(--blue));
}

.yc-terms-scroll:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--cyan) 65%, white);
  outline-offset: 4px;
}

.yc-terms-document {
  color: #24314f;
  font-size: .82rem;
  line-height: 1.68;
}

.yc-terms-document h2 {
  margin: 0 0 18px;
  color: var(--navy);
  font-family: var(--font-display), sans-serif;
  font-size: 1.55rem;
  font-weight: 760;
  letter-spacing: -.03em;
  line-height: 1.1;
}

.yc-terms-document h3 {
  margin: 28px 0 8px;
  color: var(--navy);
  font-family: var(--font-display), sans-serif;
  font-size: 1rem;
  font-weight: 760;
  letter-spacing: -.012em;
  line-height: 1.25;
}

.yc-terms-document p {
  margin: 0 0 14px;
}

.yc-terms-document .yc-terms-lead {
  margin-bottom: 24px;
  color: #17264a;
  font-size: .9rem;
  font-weight: 560;
}

.yc-scroll-hint {
  padding: 14px 4px 0;
  text-align: center;
}

.yc-terms-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: var(--navy);
  font-family: var(--font-display), sans-serif;
  font-weight: 760;
}

.yc-terms-back:hover {
  color: var(--blue);
}

@media (max-width: 720px) {
  .yc-terms-page {
    padding: 16px;
  }

  .yc-terms-page .yc-header {
    margin-bottom: 38px;
  }

  .yc-terms-page .yc-brand-image {
    width: 154px;
  }

  .yc-terms-page .yc-nav-cta {
    padding: 10px 14px;
    font-size: .82rem;
  }

  .yc-terms-hero {
    margin-bottom: 22px;
  }

  .yc-terms-intro {
    font-size: .96rem;
  }

  .yc-terms-card {
    margin-bottom: 40px;
    border-radius: 24px;
  }

  .yc-terms-card-header {
    display: block;
  }

  .yc-terms-card-header p {
    margin-top: 5px;
  }

  .yc-terms-scroll {
    max-height: 68vh;
    border-radius: 18px;
  }

  .yc-terms-document {
    font-size: .78rem;
    line-height: 1.63;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yc-terms-scroll {
    scroll-behavior: auto;
  }
}
