.terms-page {
  padding: var(--space-16) 0;
}

.terms-header {
  text-align: center;
  margin-bottom: var(--space-12);
  border-bottom: 1px solid var(--gray-800);
  padding-bottom: var(--space-8);
}

.terms-title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-4);
  background: linear-gradient(to right, var(--color-text), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.terms-subtitle {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.terms-layout {
  display: grid;
  gap: var(--space-8);
  max-width: 900px;
  margin: 0 auto;
}

@media (min-width: 1024px) {
  .terms-layout {
    grid-template-columns: 280px 1fr;
    gap: var(--space-12);
    max-width: none;
  }
}

.terms-nav {
  order: -1;
}

@media (min-width: 1024px) {
  .terms-nav {
    order: 0;
    position: sticky;
    top: calc(var(--header-height) + var(--space-8));
    height: fit-content;
  }
}

.terms-nav-inner {
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
}

.terms-nav-title {
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.terms-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.terms-nav-list a {
  display: block;
  padding: var(--space-2) 0;
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
  border-left: 2px solid transparent;
  padding-left: var(--space-3);
  transition: all var(--duration-200) var(--ease-in-out);
}

.terms-nav-list a:hover,
.terms-nav-list a.active {
  color: var(--color-primary);
  border-left-color: var(--color-primary);
  background-color: var(--color-primary-subtle);
}

.terms-content {
  background-color: var(--color-bg-elevated);
  border: 1px solid var(--gray-800);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-6);
}

@media (min-width: 640px) {
  .terms-content {
    padding: var(--space-10);
  }
}

.terms-section {
  margin-bottom: var(--space-10);
  scroll-margin-top: calc(var(--header-height) + var(--space-8));
}

.terms-section:last-child {
  margin-bottom: 0;
}

.terms-section h2 {
  font-size: var(--text-2xl);
  color: var(--color-primary);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--gray-800);
}

.terms-section p {
  color: var(--color-text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.terms-section p:last-child {
  margin-bottom: 0;
}

.terms-section a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.terms-section a:hover {
  color: var(--color-primary-hover);
}

@media print {
  .terms-nav {
    display: none;
  }
  
  .terms-content {
    border: none;
    background: white;
    color: black;
  }
  
  .terms-section h2 {
    color: black;
    border-bottom-color: #ccc;
  }
  
  .terms-section p {
    color: #333;
  }
}