:root {
  --terms-primary: #0f3d56;
  --terms-accent: #1f7a8c;
  --terms-accent-soft: #e8f6f8;
  --terms-text: #1f2937;
  --terms-muted: #5f6b7a;
  --terms-border: #d9e2ec;
  --terms-bg: #f7fafc;
  --terms-white: #ffffff;
  --terms-shadow: 0 10px 30px rgba(15, 61, 86, 0.08);
  --terms-radius: 18px;
}

.terms-page {
  background: var(--terms-bg);
  color: var(--terms-text);
}

.terms-container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.terms-hero {
  background: linear-gradient(135deg, #0f3d56 0%, #145c72 100%);
  color: #fff;
  padding: 72px 0 48px;
}

.terms-hero .hero-content {
  max-width: 780px;
}

.terms-hero .eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.terms-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1.1;
  color: #fff;
}

.hero-text {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.75;
  color: rgba(255,255,255,0.9);
}

.last-updated {
  margin: 0;
  font-size: 15px;
  color: rgba(255,255,255,0.9);
}

.terms-layout {
  padding: 36px 0 72px;
}

.terms-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

.terms-content {
  background: var(--terms-white);
  border: 1px solid var(--terms-border);
  border-radius: var(--terms-radius);
  box-shadow: var(--terms-shadow);
  padding: 34px;
}

.terms-section + .terms-section {
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px solid #edf2f7;
}

.terms-section h2 {
  margin: 0 0 14px;
  font-size: 28px;
  line-height: 1.3;
  color: var(--terms-primary);
}

.terms-section h3 {
  margin: 20px 0 8px;
  font-size: 20px;
  line-height: 1.4;
  color: #133b52;
}

.terms-section p,
.terms-section li {
  font-size: 17px;
  line-height: 1.8;
  color: var(--terms-text);
}

.terms-section p {
  margin: 0 0 14px;
}

.terms-section ul {
  margin: 0 0 14px 22px;
  padding: 0;
}

.terms-section a {
  color: var(--terms-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.email-link {
  font-weight: 700;
  word-break: break-word;
}

.info-card {
  background: var(--terms-accent-soft);
  border: 1px solid #ccebef;
  border-radius: 14px;
  padding: 18px 18px 14px;
  margin: 18px 0 0;
}

.info-card h3 {
  margin-top: 0;
}

.terms-sidebar {
  position: sticky;
  top: 110px;
}

.sidebar-card {
  background: var(--terms-white);
  border: 1px solid var(--terms-border);
  border-radius: var(--terms-radius);
  box-shadow: var(--terms-shadow);
  padding: 22px;
}

.sidebar-kicker {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--terms-accent);
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toc a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--terms-text);
  font-size: 15px;
  line-height: 1.45;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.toc a:hover,
.toc a:focus {
  background: #f1f8fa;
  color: var(--terms-primary);
}

.toc a.is-active {
  background: var(--terms-accent-soft);
  color: var(--terms-primary);
  font-weight: 700;
}

@media (max-width: 991px) {
  .terms-grid {
    grid-template-columns: 1fr;
  }

  .terms-sidebar {
    position: static;
    top: auto;
  }

  .sidebar-card {
    padding: 18px;
  }

  .toc {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
}

@media (max-width: 767px) {
  .terms-hero {
    padding: 56px 0 36px;
  }

  .terms-container {
    width: min(100% - 20px, 1180px);
  }

  .terms-content {
    padding: 22px 18px;
    border-radius: 16px;
  }

  .terms-section + .terms-section {
    margin-top: 24px;
    padding-top: 24px;
  }

  .terms-section h2 {
    font-size: 23px;
  }

  .terms-section h3 {
    font-size: 18px;
  }

  .terms-section p,
  .terms-section li {
    font-size: 16px;
    line-height: 1.75;
  }

  .hero-text {
    font-size: 16px;
  }

  .toc {
    grid-template-columns: 1fr;
  }
}