.terms-page {
  --terms-surface: #151f32;
  --terms-raised: #1b2940;
  --terms-border: rgba(173, 190, 214, 0.14);
  color: var(--text);
}

.terms-page .container {
  max-width: 1180px;
}

.terms-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(129, 206, 244, 0.2);
  background:
    radial-gradient(ellipse at 84% 45%, rgba(66, 169, 225, 0.16), transparent 30%),
    radial-gradient(ellipse at 12% 8%, rgba(255, 58, 111, 0.1), transparent 28%),
    linear-gradient(125deg, #101827, #17243a);
}

.terms-hero::after {
  position: absolute;
  right: -90px;
  bottom: -250px;
  width: 460px;
  height: 460px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  content: "";
}

.terms-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 250px;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.terms-eyebrow,
.terms-toc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #82c9ed;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.terms-eyebrow > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--custom-blue);
  box-shadow: 0 0 14px rgba(255, 58, 111, 0.7);
}

.terms-hero h1 {
  margin: 0.8rem 0 0.65rem;
  color: #fff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.045em;
}

.terms-hero p {
  max-width: 660px;
  margin: 0;
  color: #b3c1d3;
  font-size: 1rem;
  line-height: 1.75;
}

.terms-hero-mark {
  display: grid;
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  place-items: center;
  border: 1px solid rgba(129, 206, 244, 0.2);
  border-radius: 1.6rem;
  background: rgba(66, 169, 225, 0.1);
  color: #81cef4;
  font-size: 2rem;
  transform: rotate(4deg);
}

.terms-page-container {
  padding-top: 1.25rem;
  padding-bottom: 4rem;
}

.terms-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.25rem;
  color: #7789a1;
  font-size: 0.83rem;
}

.terms-breadcrumb a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #aebdd0;
  text-decoration: none;
}

.terms-breadcrumb a:hover {
  color: #81cef4;
}

.terms-breadcrumb > i {
  font-size: 0.65rem;
}

.terms-breadcrumb span {
  color: #e3eaf3;
}

.terms-layout {
  align-items: start;
}

.terms-aside {
  min-width: 0;
}

.terms-toc {
  --bs-offcanvas-width: min(88vw, 380px);
  --bs-offcanvas-bg: var(--terms-surface);
  --bs-offcanvas-color: var(--text);
  color: var(--text);
}

.terms-toc-mobile-header {
  border-bottom: 1px solid var(--terms-border);
}

.terms-toc-mobile-header .offcanvas-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
}

.terms-toc-mobile-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.terms-toc-body {
  padding: 0;
}

.terms-toc-card {
  position: sticky;
  top: 1.25rem;
  padding: 1.2rem;
  border: 1px solid var(--terms-border);
  border-radius: 1rem;
  background: linear-gradient(155deg, rgba(27, 41, 64, 0.98), rgba(20, 30, 47, 0.98));
}

.terms-toc-card h2 {
  margin: 0.45rem 0 1rem;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 750;
}

.terms-toc-list {
  display: grid;
  gap: 0.2rem;
  max-height: calc(100vh - 220px);
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: #53647b transparent;
  scrollbar-width: thin;
}

.terms-toc-list a {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 0.65rem;
  color: #aebdd0;
  font-size: 0.82rem;
  line-height: 1.45;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.terms-toc-list a span {
  flex: 0 0 1.5rem;
  color: #71839b;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.terms-toc-list a:hover,
.terms-toc-list a.active {
  border-color: rgba(66, 169, 225, 0.12);
  background: rgba(66, 169, 225, 0.1);
  color: #fff;
}

.terms-toc-list a.active span {
  color: #81cef4;
}

.terms-mobile-toolbar {
  margin-bottom: 1rem;
}

.terms-toc-trigger {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--terms-border);
  border-radius: 0.8rem;
  background: var(--terms-surface);
  color: #e5edf7;
  font-size: 0.9rem;
  font-weight: 700;
  text-align: left;
}

.terms-toc-trigger > i:first-child {
  color: #81cef4;
}

.terms-toc-trigger > i:last-child {
  margin-left: auto;
  color: #8292a8;
  font-size: 0.72rem;
}

.terms-content {
  min-width: 0;
}

.terms-intro-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(66, 169, 225, 0.18);
  border-radius: 0.9rem;
  background: rgba(66, 169, 225, 0.07);
}

.terms-intro-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 0.65rem;
  background: rgba(66, 169, 225, 0.12);
  color: #81cef4;
}

.terms-intro-card p {
  margin: 0;
  color: #c4d0df;
  font-size: 0.9rem;
  line-height: 1.65;
}

.terms-document {
  padding: clamp(1.1rem, 3vw, 2.25rem);
  border: 1px solid var(--terms-border);
  border-radius: 1rem;
  background: linear-gradient(155deg, rgba(27, 41, 64, 0.97), rgba(20, 30, 47, 0.97));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
}

.terms-section {
  margin: 0;
  padding: 1.55rem 0;
  border-bottom: 1px solid rgba(173, 190, 214, 0.12);
  scroll-margin-top: 1.5rem;
}

.terms-section:first-child {
  padding-top: 0.25rem;
}

.terms-section:last-of-type {
  border-bottom: 0;
}

.terms-section h2 {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin: 0 0 0.95rem;
  color: #f5f8fc;
  font-size: clamp(1.15rem, 2.3vw, 1.4rem);
  font-weight: 760;
  letter-spacing: -0.02em;
  line-height: 1.35;
}

.terms-section h2::before {
  width: 4px;
  height: 1.2em;
  flex: 0 0 4px;
  border-radius: 4px;
  background: linear-gradient(var(--custom-blue), #7964e8);
  content: "";
}

.terms-section h3 {
  margin: 1.35rem 0 0.65rem;
  color: #8bd1f4;
  font-size: 1rem;
  font-weight: 700;
}

.terms-section p,
.terms-section li {
  color: #b6c3d3;
  font-size: 0.94rem;
  line-height: 1.8;
}

.terms-section p {
  margin: 0 0 0.9rem;
}

.terms-section p:last-child {
  margin-bottom: 0;
}

.terms-section ul,
.terms-section ol {
  display: grid;
  gap: 0.45rem;
  margin: 0.5rem 0 1rem;
  padding-left: 1.35rem;
}

.terms-section li {
  padding-left: 0.25rem;
}

.terms-section li::marker {
  color: #81cef4;
  font-weight: 700;
}

.terms-section strong {
  color: #eef4fb;
}

.terms-section a {
  color: #81cef4 !important;
  overflow-wrap: anywhere;
}

.terms-section a:hover {
  color: #fff !important;
}

.terms-section .highlight-box,
.terms-section .warning-box {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(243, 149, 85, 0.16);
  border-left: 3px solid var(--custom-orange);
  border-radius: 0.75rem;
  background: rgba(243, 149, 85, 0.07);
}

.terms-section .warning-box {
  border-color: rgba(255, 58, 111, 0.16);
  border-left-color: var(--custom-blue);
  background: rgba(255, 58, 111, 0.065);
}

.terms-section .highlight-box p,
.terms-section .warning-box p {
  color: #d1dbe7;
}

.terms-section .warning-box ul,
.terms-section .warning-box ol {
  margin-bottom: 0;
}

.terms-document .last-updated {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-top: 1.35rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(61, 194, 147, 0.16);
  border-radius: 0.8rem;
  background: rgba(61, 194, 147, 0.07);
}

.terms-document .last-updated i {
  margin-top: 0.15rem;
  color: #70ddb4;
}

.terms-document .last-updated p {
  margin: 0;
  color: #c4d0df;
  font-size: 0.85rem;
  line-height: 1.65;
}

.terms-document .last-updated strong {
  color: #8ae4c0;
}

@media (min-width: 992px) {
  .terms-toc {
    position: static;
    width: 100%;
    height: auto;
    overflow: visible;
    border: 0;
    box-shadow: none;
    transform: none !important;
    visibility: visible !important;
  }

  .terms-toc-body {
    display: block !important;
    padding: 0;
    overflow: visible;
  }
}

@media (max-width: 991.98px) {
  .terms-toc-card {
    position: static;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .terms-toc-list {
    max-height: calc(100vh - 160px);
  }
}

@media (max-width: 575.98px) {
  .terms-hero-inner {
    min-height: 0;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  .terms-hero-mark {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
    border-radius: 1rem;
    font-size: 1.3rem;
  }

  .terms-hero p {
    font-size: 0.92rem;
  }

  .terms-breadcrumb {
    font-size: 0.76rem;
  }

  .terms-document {
    padding: 1rem;
  }

  .terms-section {
    padding: 1.2rem 0;
  }

  .terms-section p,
  .terms-section li {
    font-size: 0.9rem;
  }
}
