/* legal-pages.css (project-044)
 * Shared typography + layout for privacy.html and terms.html.
 * Lifted from inline <style> blocks of those pages, refined per design-packet.md.
 */

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

html, body {
  height: auto !important;
  overflow: visible !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(139, 92, 246, 0.14), transparent 40%),
    linear-gradient(180deg, #0B0D12 0%, #111521 100%);
  color: var(--text);
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px 80px;
}

/* ───────── Top bar ───────── */

.pp-topbar {
  width: 100%;
  max-width: 720px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
}

.pp-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.pp-logo-mark {
  width: 28px;
  height: 28px;
}

.pp-logo-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pp-logo-beta {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--primary-glow);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-left: 2px;
  vertical-align: super;
}

.pp-back {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 150ms ease;
}

.pp-back:hover {
  color: var(--text);
}

/* ───────── Layout (TOC + content) ───────── */

.pp-layout {
  width: 100%;
  display: block;
}

.pp-container {
  width: 100%;
  max-width: 720px;
}

.pp-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.pp-header h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.pp-header .pp-updated {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.pp-intro {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-secondary, var(--text-muted));
  margin-bottom: 40px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 10px);
}

/* ───────── Section typography (refined per design packet) ───────── */

.pp-section {
  margin-bottom: 36px;
}

.pp-section h2 {
  font-size: 1.0625rem;        /* 17px */
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--primary-glow, #a78bfa);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 32px;
}

.pp-section:first-of-type h2 {
  margin-top: 0;
}

.pp-section h3 {
  font-size: 0.9375rem;        /* 15px */
  font-weight: 600;
  color: var(--text);
  margin-top: 24px;
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}

.pp-section p {
  font-size: 0.9375rem;        /* 15px */
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.pp-section ul {
  list-style: none;
  margin-bottom: 14px;
  padding-left: 0;
}

.pp-section ul li {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding: 0 0 0 16px;
  position: relative;
}

.pp-section ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--primary-glow, #a78bfa);
  opacity: 0.6;
}

.pp-section strong {
  color: var(--text);
  font-weight: 600;
}

.pp-section a {
  color: var(--primary-glow);
  text-decoration: underline;
}

.pp-section a:hover {
  color: var(--primary);
}

/* ───────── User-protective phrase emphasis ───────── */

.pp-emphasis {
  color: var(--primary-glow);
  font-weight: 600;
  background: rgba(139, 92, 246, 0.08);
  padding: 0 4px;
  border-radius: 3px;
}

/* ───────── Contact card ───────── */

.pp-contact {
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm, 10px);
  padding: 20px 24px;
}

.pp-contact h2 {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 8px;
}

.pp-contact p {
  margin-bottom: 4px;
}

.pp-contact a {
  color: var(--primary-glow, #a78bfa);
  text-decoration: none;
  font-weight: 500;
}

.pp-contact a:hover {
  text-decoration: underline;
}

/* ───────── Sticky desktop TOC ───────── */

.pp-toc {
  position: sticky;
  top: 32px;
  width: 200px;
  align-self: flex-start;
  display: none; /* hidden on mobile; shown via media query below */
}

.pp-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pp-toc-list li {
  margin: 0;
  padding: 0;
}

.pp-toc-list a {
  display: block;
  padding: 6px 0 6px 14px;
  font-size: 0.8125rem;          /* 13px */
  color: var(--text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 150ms ease, border-color 150ms ease, padding-left 150ms ease;
}

.pp-toc-list a:hover {
  color: var(--text);
}

.pp-toc-list a.is-active {
  color: var(--primary-glow);
  border-left: 2px solid var(--primary-glow);
  padding-left: 12px;
}

/* ───────── Mobile <details> TOC ───────── */

.pp-toc-mobile {
  display: block;
  margin: 0 0 32px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.pp-toc-mobile summary {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.pp-toc-mobile summary::-webkit-details-marker {
  display: none;
}

.pp-toc-mobile[open] summary {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.pp-toc-mobile ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pp-toc-mobile li {
  margin: 0;
  padding: 0;
}

.pp-toc-mobile li a {
  display: block;
  padding: 6px 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
}

.pp-toc-mobile li a:hover {
  color: var(--primary-glow);
}

/* ───────── Desktop two-column layout (≥ 1024px) ───────── */

@media (min-width: 1024px) {
  .pp-layout {
    display: flex;
    gap: 48px;
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 24px;
    align-items: flex-start;
  }
  .pp-toc {
    display: block;
  }
  .pp-toc-mobile {
    display: none;
  }
  .pp-container {
    flex: 1;
    min-width: 0;
    max-width: 720px;
  }
}
