.terms-page {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 84px);
  overflow: hidden;
  padding: 52px 20px 88px;
  background: #07070d;
}

.terms-page__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: url('/images/hero_illustration.jpg');
  background-position: center 28%;
  background-repeat: no-repeat;
  background-size: cover;
  opacity: 0.09;
  filter: saturate(0.7) contrast(1.1);
}

.terms-page::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 7, 13, 0.82) 0%, rgba(7, 7, 13, 0.94) 35%, #07070d 100%);
}

.terms-page::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: min(1040px, calc(100% - 32px));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.5), transparent);
}

.terms-shell {
  width: min(960px, 100%);
  margin: 0 auto;
}

.terms-hero {
  max-width: 720px;
  margin: 0 auto 30px;
  text-align: center;
}

.terms-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px 9px;
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 6px;
  background: rgba(124, 58, 237, 0.12);
  color: #c084fc;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

.terms-eyebrow svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.terms-hero h1 {
  margin: 0;
  color: #f8f7ff;
  font-size: 2.65rem;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.08;
}

.terms-hero h1 span {
  color: #a855f7;
  text-shadow: 0 0 24px rgba(168, 85, 247, 0.22);
}

.terms-updated {
  margin-top: 12px;
  color: #77788a;
  font-size: 0.75rem;
  font-weight: 600;
}

.terms-intro {
  max-width: 580px;
  margin: 12px auto 0;
  color: #a6a6b7;
  font-size: 0.9rem;
  line-height: 1.65;
}

.terms-notice,
.terms-support {
  display: grid;
  align-items: center;
  border-radius: 8px;
  background: rgba(15, 14, 25, 0.86);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.terms-notice {
  position: relative;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid rgba(139, 92, 246, 0.36);
  overflow: hidden;
}

.terms-notice::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #8b5cf6;
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.75);
}

.terms-notice h2,
.terms-support h2 {
  margin: 0 0 4px;
  color: #f3f0ff;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0;
}

.terms-notice p,
.terms-support p {
  margin: 0;
  color: #9899aa;
  font-size: 0.76rem;
  line-height: 1.6;
}

.terms-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 8px;
  background: rgba(124, 58, 237, 0.12);
  color: #a855f7;
}

.terms-icon--notice {
  background: rgba(124, 58, 237, 0.15);
  color: #b468ff;
}

.terms-icon svg,
.terms-support__button svg,
.terms-chevron {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.terms-icon svg {
  width: 22px;
  height: 22px;
}

.terms-list {
  display: grid;
  gap: 12px;
}

.terms-card {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(12, 13, 21, 0.88);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.terms-card:hover {
  border-color: rgba(139, 92, 246, 0.28);
  background: rgba(15, 15, 25, 0.94);
}

.terms-card[open] {
  border-color: rgba(139, 92, 246, 0.34);
  background: rgba(15, 15, 25, 0.96);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28), 0 0 28px rgba(124, 58, 237, 0.05);
}

.terms-card summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 16px;
  min-height: 82px;
  padding: 16px 18px;
  cursor: pointer;
  list-style: none;
}

.terms-card summary::-webkit-details-marker {
  display: none;
}

.terms-card summary:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 3px;
  border-radius: 8px;
}

.terms-card__heading {
  display: block;
  min-width: 0;
}

.terms-card__title {
  display: block;
  margin-bottom: 5px;
  color: #f5f3ff;
  font-size: 0.87rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.3;
}

.terms-card__preview {
  display: block;
  color: #8e8f9f;
  font-size: 0.75rem;
  line-height: 1.55;
}

.terms-chevron {
  width: 17px;
  height: 17px;
  color: #77788a;
  transition: transform 180ms ease, color 180ms ease;
}

.terms-card[open] .terms-chevron {
  transform: rotate(180deg);
  color: #a855f7;
}

.terms-card__body {
  margin: 0 18px 0 78px;
  padding: 0 0 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.terms-card__body p {
  margin: 14px 0 0;
  color: #aaaabb;
  font-size: 0.79rem;
  line-height: 1.72;
}

.terms-support {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 16px;
  margin-top: 18px;
  padding: 17px 18px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.terms-support__copy {
  min-width: 0;
}

.terms-support__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid rgba(139, 92, 246, 0.62);
  border-radius: 7px;
  background: rgba(124, 58, 237, 0.08);
  color: #c084fc;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.terms-support__button svg {
  width: 15px;
  height: 15px;
}

.terms-support__button:hover {
  border-color: #a855f7;
  background: rgba(124, 58, 237, 0.18);
  color: #ffffff;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.16);
}

.terms-support__button:focus-visible {
  outline: 2px solid #a855f7;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .terms-page {
    padding: 34px 16px 64px;
  }

  .terms-hero {
    margin-bottom: 24px;
  }

  .terms-hero h1 {
    font-size: 2.15rem;
  }

  .terms-intro {
    font-size: 0.84rem;
  }

  .terms-support {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .terms-support__button {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .terms-page {
    padding-right: 12px;
    padding-left: 12px;
  }

  .terms-hero h1 {
    font-size: 1.9rem;
  }

  .terms-notice {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 16px;
  }

  .terms-icon {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .terms-icon svg {
    width: 19px;
    height: 19px;
  }

  .terms-card summary {
    grid-template-columns: 38px minmax(0, 1fr) 18px;
    gap: 12px;
    min-height: 78px;
    padding: 14px;
  }

  .terms-card__body {
    margin: 0 14px 0 64px;
    padding-bottom: 16px;
  }

  .terms-card__title {
    font-size: 0.82rem;
  }

  .terms-card__preview,
  .terms-card__body p,
  .terms-notice p,
  .terms-support p {
    font-size: 0.72rem;
  }

  .terms-support {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .terms-card,
  .terms-chevron,
  .terms-support__button {
    transition: none;
  }
}
