/* ==========================================================================
   MacroSpyder - Terms of Service & Privacy Policy Stylesheet
   Path: assets/css/pages/terms.css
   ========================================================================== */

:root {
  --terms-hero-bg: radial-gradient(circle at 50% -20%, rgba(56, 189, 248, 0.12), transparent 70%);
  --card-glass-bg: var(--surface);
  --card-border: var(--border);
}

[data-theme="light"] {
  --terms-hero-bg: radial-gradient(circle at 50% -20%, rgba(14, 165, 233, 0.08), transparent 70%);
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.65;
}

/* Topbar Header */
.topbar {
  height: 50px;
  min-height: 50px;
  max-height: 50px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 16px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
}

.brand-link img {
  height: 26px;
  width: auto;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--surface-2, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}
.pill:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: var(--accent);
  color: var(--accent);
}
.pill.icon-only {
  padding: 6px 8px;
}

/* Main Content Wrapper */
.terms-wrapper {
  max-width: 1160px;
  margin: 0 auto;
  padding: 40px 24px 80px 24px;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
}

.terms-hero {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 36px auto;
  background: var(--terms-hero-bg);
  padding: 24px 16px;
  border-radius: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 20px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: var(--accent, #38bdf8);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 14px;
}

.hero-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 12px 0;
  letter-spacing: -0.6px;
}

.hero-meta {
  font-size: 13.5px;
  color: var(--text-muted, #94a3b8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

/* Terms Layout Grid */
.terms-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 36px;
  align-items: start;
}

@media (max-width: 900px) {
  .terms-grid {
    grid-template-columns: 1fr;
  }
  .terms-sidebar {
    position: static !important;
    margin-bottom: 24px;
  }
}

/* Sidebar Navigation */
.terms-sidebar {
  position: sticky;
  top: 74px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 14px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.nav-title {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 12px;
  padding-left: 8px;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--text-muted, #94a3b8);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.4;
}

.toc-link:hover {
  background: rgba(56, 189, 248, 0.08);
  color: var(--accent, #38bdf8);
}

.toc-link.active {
  background: rgba(56, 189, 248, 0.14);
  color: var(--accent, #38bdf8);
  font-weight: 700;
}

/* Terms Content Sections */
.terms-content {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.terms-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  scroll-margin-top: 76px;
  transition: border-color 0.2s ease;
}

.terms-section:hover {
  border-color: rgba(56, 189, 248, 0.35);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.section-title {
  font-size: 18.5px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.3px;
}

.terms-text {
  font-size: 14px;
  color: var(--text-2, #cbd5e1);
  line-height: 1.7;
}

[data-theme="light"] .terms-text {
  color: #334155;
}

.terms-text p {
  margin: 0 0 12px 0;
}

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

/* Styled Definitions Table */
.terms-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 13.5px;
}

.terms-table th, .terms-table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}

.terms-table th {
  background: var(--surface-2, rgba(255, 255, 255, 0.04));
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}

.terms-table td code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
}

/* Alert Boxes */
.alert-box {
  padding: 16px 20px;
  border-radius: 12px;
  margin: 16px 0;
  display: flex;
  gap: 14px;
  font-size: 13.5px;
  line-height: 1.6;
}

.alert-box.warning {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.alert-box.info {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
}

.alert-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.alert-content {
  flex: 1;
}

/* Footer */
.terms-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
}

