/* Shared styles for /terms.html and /privacy.html.
   Deliberately self-contained: system fonts, no third-party requests, so the
   privacy page doesn't leak visitor IPs to a font CDN. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #111115;
  --surface: #1a1a22;
  --surface2: #242430;
  --accent: #7b6cf6;
  --accent-soft: #a89ff9;
  --text: #e8e8f0;
  --text-dim: #9a9ab2;
  --border: rgba(255, 255, 255, 0.08);
  --warn: #f59e0b;
  --radius: 12px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(
      ellipse 70% 40% at 50% 0%,
      rgba(123, 108, 246, 0.1) 0%,
      transparent 70%
    ),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-size: 1rem;
  line-height: 1.7;
}

a {
  color: var(--accent-soft);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--text);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.legal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto;
  padding: 1.25rem 16px;
}

.legal-nav .brand {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.legal-nav .links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
}

.legal-nav .links a {
  color: var(--text-dim);
  text-decoration: none;
}

.legal-nav .links a:hover,
.legal-nav .links a[aria-current="page"] {
  color: var(--text);
}

.legal-nav .links a[aria-current="page"] {
  border-bottom: 2px solid var(--accent);
}

main.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 16px 4rem;
}

.legal h1 {
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.legal .meta {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0 0 1.5rem;
}

.legal .lede {
  font-size: 1.08rem;
  color: var(--text);
  margin: 0 0 1.75rem;
}

.legal h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 1rem;
}

.legal h3 {
  font-size: 1.02rem;
  margin: 1.6rem 0 0.35rem;
  color: var(--accent-soft);
}

.legal p,
.legal ul,
.legal ol {
  margin: 0 0 1rem;
}

.legal li {
  margin-bottom: 0.4rem;
}

.legal code {
  background: var(--surface2);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  font-size: 0.88em;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
  margin: 0 0 1.25rem;
}

.callout.warn {
  border-left-color: var(--warn);
}

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

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--border);
}

thead th {
  background: var(--surface);
  color: var(--text-dim);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.legal-footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.5rem 16px 3rem;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
}

@media (max-width: 520px) {
  .legal-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}
