/* ═══════════════════════════════════════════════════════════
   SeekerClaw — Legal Pages (Copyright & Privacy)
   ───────────────────────────────────────────────────────────
   Shared styles for copyright.html and privacy.html.
   Uses theme tokens from theme.css.
   ═══════════════════════════════════════════════════════════ */

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-primary);
  background: var(--bg-deep);
  line-height: 1.65;
  overflow-x: hidden;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.2s;
}

a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.accent {
  color: var(--color-accent);
  font-weight: inherit;
}

/* ── Container ────────────────────────────────────────────── */
.legal-container {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navigation ───────────────────────────────────────────── */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 8, 15, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 0;
}

.legal-nav .legal-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 780px;
}

.legal-nav__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.legal-nav__logo:hover {
  text-decoration: none;
  opacity: 1;
}

.legal-nav__logo-img {
  width: 28px;
  height: 28px;
  display: block;
}

.legal-nav__logo-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.legal-nav__links {
  display: flex;
  gap: 1.25rem;
}

.legal-nav__link {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.legal-nav__link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* ── Main Content ─────────────────────────────────────────── */
.legal {
  padding: 4rem 0 5rem;
}

.legal__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.legal__updated {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 3rem;
}

.legal__section {
  margin-bottom: 2.5rem;
}

.legal__section h2 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.legal__section p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 0.75rem;
}

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

.legal__section strong {
  color: var(--text-primary);
  font-weight: 600;
}

.legal__section ul {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
}

.legal__section ul li {
  font-size: 0.92rem;
  color: var(--text-secondary);
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
  line-height: 1.6;
}

.legal__section ul li::before {
  content: '\2192';
  position: absolute;
  left: 0;
  color: var(--color-primary);
}

/* ── License Code Block ───────────────────────────────────── */
.legal__code {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.7;
  color: var(--text-secondary);
  overflow-x: auto;
}

.legal__code p {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  margin-bottom: 0.75rem;
}

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

/* ── Attribution Table ────────────────────────────────────── */
.legal__table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 1rem 0;
  font-size: 0.88rem;
}

.legal__table thead th {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  text-align: left;
  padding: 0.75rem 1rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.legal__table tbody td {
  padding: 0.75rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.legal__table tbody tr:last-child td {
  border-bottom: none;
}

.legal__table tbody td a {
  font-weight: 500;
}

/* ── Footer ───────────────────────────────────────────────── */
.legal-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  text-align: center;
}

.legal-footer p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.legal-footer a {
  color: var(--text-secondary);
  font-weight: 400;
}

.legal-footer a:hover {
  color: var(--text-primary);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .legal {
    padding: 3rem 0 4rem;
  }

  .legal-nav__links {
    gap: 0.75rem;
  }

  .legal-nav__link {
    font-size: 0.8rem;
  }

  .legal__code {
    padding: 1rem;
    font-size: 0.65rem;
  }

  .legal__table {
    font-size: 0.8rem;
  }

  .legal__table thead th,
  .legal__table tbody td {
    padding: 0.6rem 0.6rem;
  }
}
