/* ── Page shell ─────────────────────────────────────────────────────────────── */
.terms {
  background: #f8f8f8;
  min-height: 100vh;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HERO
───────────────────────────────────────────────────────────────────────────── */
.terms__hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(4rem + 3.5rem); /* $nav-height(64px) + rem(56) */
  padding-bottom: 3.25rem; /* rem(52) */
  background: linear-gradient(
    180deg,
    #f8f8f8 0%,
    rgba(69, 57, 204, 0.035) 50%,
    #f8f8f8 100%
  );
}
@media (max-width: 844px) {
  .terms__hero {
    padding-top: calc(4rem + 2.5rem); /* nav + rem(40) */
    padding-bottom: 2.5rem;
  }
}

.terms__hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(
    circle,
    rgba(69, 57, 204, 0.09) 1px,
    transparent 1px
  );
  background-size: 1.75rem 1.75rem; /* rem(28) */
  mask-image: radial-gradient(
    ellipse 70% 90% at 50% 0%,
    black 0%,
    transparent 70%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 70% 90% at 50% 0%,
    black 0%,
    transparent 70%
  );
}

.terms__hero-inner {
  width: 100%;
  max-width: 48.75rem; /* rem(780) */
  margin-inline: auto;
  padding-inline: 1.5rem; /* $container-pad = rem(24) */
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem; /* rem(16) */
}

/* Pill */
.terms__pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.6875rem; /* rem(11) */
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4539cc;
  background: rgba(69, 57, 204, 0.07);
  border: 1px solid rgba(69, 57, 204, 0.14);
  border-radius: 9999px;
  padding: 0.3125rem 0.875rem; /* rem(5) rem(14) */
}

/* Title */
.terms__hero-title {
  font-family: "Inter", sans-serif;
  font-size: clamp(
    1.625rem,
    4vw,
    3rem
  ); /* clamp($font-size-2xl=rem(26), 4vw, rem(48)) */
  font-weight: 700;
  color: #0d0d0d;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0;
}

/* Subtitle */
.terms__hero-sub {
  font-size: 0.90625rem; /* rem(14.5) */
  color: #737373; /* $color-gray-500 */
  line-height: 1.75;
  margin: 0;
  max-width: 28.75rem; /* rem(460) */
}

/* Trust bar */
.terms__trust {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e4e4e4;
  border-radius: 9999px;
  padding: 0.5rem 1.25rem; /* rem(8) rem(20) */
  margin-top: 0.25rem; /* rem(4) */
  justify-content: center;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .terms__trust {
    flex-wrap: wrap;
    white-space: normal;
    border-radius: 0.75rem; /* rem(12) */
    padding: 0.625rem 1rem; /* rem(10) rem(16) */
  }
}

.terms__trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem; /* rem(6) */
  font-size: 0.75rem; /* rem(12) */
  font-weight: 500;
  color: #555555; /* $color-gray-600 */
  padding: 0.125rem 0.75rem; /* rem(2) rem(12) */
}

.terms__trust-divider {
  width: 0.0625rem; /* rem(1) */
  height: 0.875rem; /* rem(14) */
  background: #e4e4e4;
}
@media (max-width: 640px) {
  .terms__trust-divider {
    display: none;
  }
}

/* ─────────────────────────────────────────────────────────────────────────────
   BODY — same two-column layout as Privacy
───────────────────────────────────────────────────────────────────────────── */
.terms__body {
  background: #f8f8f8;
}

.terms__body-inner {
  width: 100%;
  max-width: 62.5rem; /* rem(1000) */
  margin-inline: auto;
  padding-inline: 1.5rem;
  display: grid;
  grid-template-columns: 12.5rem 1fr; /* rem(200) 1fr */
  gap: 3.5rem; /* rem(56) */
  padding-top: 3rem; /* rem(48) */
  padding-bottom: 15rem; /* rem(240) */
  align-items: start;
}
@media (max-width: 1024px) {
  .terms__body-inner {
    grid-template-columns: 10.625rem 1fr; /* rem(170) 1fr */
    gap: 2.5rem; /* rem(40) */
  }
}
@media (max-width: 844px) {
  .terms__body-inner {
    grid-template-columns: 1fr;
    gap: 2rem; /* rem(32) */
    padding-top: 2rem; /* rem(32) */
    padding-bottom: 4rem; /* rem(64) */
  }
}

/* ── Sticky TOC ──────────────────────────────────────────────────────────────── */
.terms__toc {
  position: sticky;
  top: calc(4rem + 1.5rem); /* $nav-height(64px) + rem(24) */
}
@media (max-width: 844px) {
  .terms__toc {
    display: none;
  }
}

.terms__toc-label {
  font-size: 0.65625rem; /* rem(10.5) */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #a0a0a0; /* $color-gray-400 */
  margin: 0 0 0.75rem; /* rem(12) */
}

.terms__toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-left: 1px solid #e8e8e8;
}

.terms__toc-link {
  display: block;
  font-size: 0.78125rem; /* rem(12.5) */
  color: #a0a0a0;
  text-decoration: none;
  padding: 0.25rem 0.75rem; /* rem(4) rem(12) */
  margin-left: -0.0625rem; /* rem(-1) — overlap border */
  border-left: 0.125rem solid transparent; /* rem(2) */
  transition:
    color 150ms ease,
    border-color 150ms ease;
  line-height: 1.4;
}
.terms__toc-link:hover {
  color: #333333;
  border-left-color: #d0d0d0;
}
.terms__toc-link--active {
  color: #4539cc;
  font-weight: 600;
  border-left-color: #4539cc;
}

/* ─�� Content column ──────────────────────────────────────────────────────────── */
.terms__content {
  display: flex;
  flex-direction: column;
}

/* Intro card */
.terms__intro-card {
  display: flex;
  align-items: center; /* icon and text vertically centred */
  gap: 0.875rem; /* rem(14) */
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 0.875rem; /* rem(14) */
  padding: 1.125rem 1.375rem; /* rem(18) rem(22) */
  margin-bottom: 2.5rem; /* rem(40) */
  box-shadow: 0 0.0625rem 0.25rem rgba(0, 0, 0, 0.03);
}

.terms__intro-icon {
  flex-shrink: 0;
  width: 2.25rem; /* rem(36) */
  height: 2.25rem;
  background: rgba(69, 57, 204, 0.07);
  border-radius: 0.5625rem; /* rem(9) */
  display: flex;
  align-items: center;
  justify-content: center;
}

.terms__intro-text {
  font-size: 0.84375rem; /* rem(13.5) */
  color: #555555; /* $color-gray-600 */
  line-height: 1.65;
  margin: 0;
  min-width: 0;
  flex: 1;
}

/* Section blocks */
.terms__section {
  padding-bottom: 2.75rem; /* rem(44) */
  border-bottom: 1px solid #eeeeee;
  margin-bottom: 2.75rem; /* rem(44) */
  scroll-margin-top: calc(4rem + 2rem); /* nav + rem(32) */
}
.terms__section--last {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.terms__section-title {
  font-family: "Inter", sans-serif;
  font-size: 1.0625rem; /* rem(17) */
  font-weight: 700;
  color: #0d0d0d;
  letter-spacing: -0.03em;
  margin: 0 0 0.875rem; /* rem(14) */
  display: flex;
  align-items: center;
  gap: 0.625rem; /* rem(10) */
}

.terms__section-num {
  font-size: 0.65625rem; /* rem(10.5) */
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  color: #d0d0d0; /* $color-gray-300 */
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.terms__section-body {
  font-size: 0.875rem; /* rem(14) */
  color: #555555;
  line-height: 1.7;
  margin: 0 0 0.875rem; /* rem(14) */
}
.terms__section-body:last-child {
  margin-bottom: 0;
}

/* Standard list */
.terms__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.375rem; /* rem(6) */
}
.terms__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem; /* rem(10) */
  font-size: 0.875rem; /* rem(14) */
  color: #555555;
  line-height: 1.6;
}
.terms__list li::before {
  content: "";
  flex-shrink: 0;
  width: 0.3125rem; /* rem(5) */
  height: 0.3125rem;
  border-radius: 50%;
  background: #4539cc;
  opacity: 0.45;
  margin-top: 0.5rem; /* rem(8) */
}

/* Notice block — amber warning */
.terms__notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem; /* rem(12) */
  background: rgba(217, 119, 6, 0.05);
  border: 1px solid rgba(217, 119, 6, 0.18);
  border-radius: 0.625rem; /* rem(10) */
  padding: 0.875rem 1.125rem; /* rem(14) rem(18) */
  margin-bottom: 0.25rem; /* rem(4) */
}
.terms__notice p {
  font-size: 0.875rem; /* rem(14) */
  color: #333333; /* $color-gray-700 */
  line-height: 1.65;
  margin: 0;
  min-width: 0;
  flex: 1;
}
.terms__notice p strong {
  color: #0d0d0d;
}
.terms__notice--neutral {
  background: #fafafa;
  border-color: #e8e8e8;
}

/* Notice icon — aligned with cap-height of first line */
.terms__notice-icon {
  flex-shrink: 0;
  width: 1rem; /* rem(16) */
  height: 1rem;
  margin-top: 0.25rem; /* rem(4) optical alignment */
  color: #d97706;
}
.terms__notice--neutral .terms__notice-icon {
  color: #737373;
}

/* Availability status card */
.terms__status-card {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem; /* rem(14) */
  background: #ffffff;
  border: 1px solid #e8e8e8;
  border-radius: 0.75rem; /* rem(12) */
  padding: 0.875rem 1.125rem; /* rem(14) rem(18) */
}

.terms__status-dot {
  flex-shrink: 0;
  width: 0.5rem; /* rem(8) */
  height: 0.5rem;
  border-radius: 50%;
  background: #d97706;
  margin-top: 0.375rem; /* rem(6) */
  box-shadow: 0 0 0 0.1875rem rgba(217, 119, 6, 0.15); /* rem(3) */
  animation: status-pulse 2.5s ease-in-out infinite;
}

@keyframes status-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0.125rem rgba(217, 119, 6, 0.15);
  }
  50% {
    box-shadow: 0 0 0 0.3125rem rgba(217, 119, 6, 0.06);
  }
}

.terms__status-label {
  font-size: 0.78125rem; /* rem(12.5) */
  font-weight: 600;
  color: #d97706;
  margin: 0 0 0.25rem; /* rem(4) */
}

/* Contact link */
.terms__contact-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem; /* rem(8) */
  font-size: 0.875rem; /* rem(14) */
  font-weight: 600;
  color: #4539cc;
  text-decoration: none;
  background: rgba(69, 57, 204, 0.06);
  border: 1px solid rgba(69, 57, 204, 0.16);
  border-radius: 0.625rem; /* rem(10) */
  padding: 0.625rem 1.125rem; /* rem(10) rem(18) */
  transition:
    background 150ms ease,
    border-color 150ms ease;
}
.terms__contact-link:hover {
  background: rgba(69, 57, 204, 0.1);
  border-color: rgba(69, 57, 204, 0.28);
}
