.terms-page {
  padding: 140px 32px 100px;
  max-width: var(--container);
  margin: 0 auto;
}

.terms-header {
  max-width: 760px;
  margin-bottom: 56px;
}

.terms-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 5vw, 48px);
  margin-bottom: 14px;
}

.terms-updated {
  color: var(--text-dim);
  font-size: 14px;
  font-family: var(--font-mono);
  line-height: 1.7;
}

.terms-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 56px;
  align-items: start;
}

/* Sidebar TOC */
.terms-toc {
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.terms-toc nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.terms-toc a {
  font-size: 13px;
  color: var(--text-dim);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
  border-left: 2px solid transparent;
}

.terms-toc a:hover {
  color: var(--text);
  background: rgba(78, 155, 255, 0.06);
}

.terms-toc a.active {
  color: var(--accent);
  background: rgba(78, 155, 255, 0.1);
  border-left: 2px solid var(--accent);
}

/* Content */
.terms-content {
  max-width: 720px;
}

.terms-section {
  padding-bottom: 48px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--panel-border);
  scroll-margin-top: 110px;
}

.terms-section:last-child {
  border-bottom: none;
}

.section-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--signal);
  display: block;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.terms-section h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 14px;
}

.terms-section .tldr {
  font-size: 14px;
  font-style: italic;
  color: var(--accent-soft);
  background: rgba(78, 155, 255, 0.06);
  border-left: 2px solid var(--accent);
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 20px;
}

.terms-section p {
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.85;
  margin-bottom: 16px;
}

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

.terms-section strong {
  color: var(--accent-soft);
  font-weight: 600;
}

.terms-section ul {
  margin: 0 0 16px 0;
  padding: 0;
}

.terms-section li {
  list-style: none;
  position: relative;
  padding-left: 22px;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 15.5px;
  line-height: 1.75;
}

.terms-section li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent);
}

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

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

/* Mobile */
@media (max-width: 900px) {
  .terms-layout {
    grid-template-columns: 1fr;
  }
  .terms-toc {
    position: static;
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--panel);
  }
  .terms-toc nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
  }
}

@media (max-width: 560px) {
  .terms-toc nav {
    grid-template-columns: 1fr;
  }
  .terms-page {
    padding: 120px 20px 80px;
  }
}
