/* === Color Palette (matches homepage) === */
:root {
  --bg: #0b0d10;
  --bg-card: #141820;
  --accent: #00ffd5;
  --accent-dim: #00ffd540;
  --text: #e0e0e6;
  --text-muted: #7a7f8a;
  --border: #1e2330;
}

/* === Reset & Base === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* === Grid Background === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 59px, var(--border) 59px, var(--border) 60px),
    repeating-linear-gradient(90deg, transparent, transparent 59px, var(--border) 59px, var(--border) 60px);
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* === Layout === */
.page {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === Site Header === */
.site-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-header-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--accent);
}

.site-header-nav {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* === Auth Nav === */
.auth-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.auth-sign-in {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
}

.auth-email {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-sign-out {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.85rem;
}

/* === Terms Content === */
.terms {
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 2rem;
}

.terms-title {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.terms-updated {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.terms-section {
  margin-bottom: 2rem;
}

.terms-section h2 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.terms-section h3 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.terms-section h4 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 0.4rem;
}

.terms-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.terms-section p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.terms-section ul {
  list-style: none;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.terms-section li {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  position: relative;
  padding-left: 1rem;
}

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

/* === Footer === */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  text-align: center;
  margin-top: 2rem;
}

.footer-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-links {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* === Responsive === */
@media (max-width: 600px) {
  .site-header {
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
  }

  .site-header-nav {
    order: 3;
    width: 100%;
  }

  .auth-email {
    display: none;
  }
}
