/* ============================================================
   Monitman LLC – Legal Pages Stylesheet
   CSP-safe: no inline styles, no url() to external domains
   ============================================================ */

/* ---------- custom properties ---------- */
:root {
  --bg-primary:    #0f1117;
  --bg-surface:    #1a1d27;
  --bg-card:       #22252f;
  --bg-hover:      #2a2e3a;
  --text-primary:  #e8e9ed;
  --text-muted:    #9a9daa;
  --accent:        #f0a500;
  --accent-dim:    rgba(240, 165, 0, .12);
  --accent-border: rgba(240, 165, 0, .25);
  --divider:       rgba(255, 255, 255, .06);
  --radius:        8px;
  --max-w:         820px;
  --transition:    .25s ease;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
}

/* ---------- page header / hero ---------- */
.legal-hero {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--divider);
  padding: 3.5rem 1.25rem 2.5rem;
  text-align: center;
}

.legal-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -.02em;
  margin-bottom: .5rem;
}

.legal-hero .subtitle {
  font-size: .95rem;
  color: var(--text-muted);
}

/* ---------- table of contents ---------- */
.toc {
  max-width: var(--max-w);
  margin: 2rem auto 0;
  padding: 0 1.25rem;
}

.toc-title {
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin-bottom: .75rem;
}

.toc-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.toc-list li a {
  display: inline-block;
  padding: .35rem .85rem;
  font-size: .85rem;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--accent-border);
  border-radius: 100px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.toc-list li a:hover,
.toc-list li a:focus-visible {
  background: var(--accent);
  color: var(--bg-primary);
}

/* ---------- main content area ---------- */
.legal-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2.5rem 1.25rem 5rem;
}

/* ---------- section blocks ---------- */
.legal-section {
  background: var(--bg-card);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  transition: border-color var(--transition);
}

.legal-section:hover {
  border-color: var(--accent-border);
}

.legal-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .6rem;
}

.legal-section h2 .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  font-size: .78rem;
  font-weight: 700;
  background: var(--accent);
  color: var(--bg-primary);
  border-radius: 50%;
  flex-shrink: 0;
}

.legal-section p {
  color: var(--text-primary);
  margin-bottom: .85rem;
}

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

.legal-section ul {
  list-style: none;
  padding: 0;
  margin: .75rem 0 0;
}

.legal-section ul li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: .6rem;
  color: var(--text-primary);
}

.legal-section ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .6em;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}

.legal-section ul li strong {
  color: var(--accent);
  font-weight: 600;
}

/* sub-items (a, b, c style) */
.legal-section .sub-items {
  margin: .75rem 0 0;
  padding-left: .5rem;
}

.legal-section .sub-items li {
  padding-left: 1.35rem;
  margin-bottom: .4rem;
  font-size: .92rem;
  color: var(--text-muted);
}

.legal-section .sub-items li::before {
  width: 5px;
  height: 5px;
  background: var(--text-muted);
}

/* ---------- contact link ---------- */
.legal-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}

.legal-section a:hover { opacity: .8; }

/* ---------- back-to-top button ---------- */
.back-to-top {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-primary);
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-3px);
}

/* ---------- footer ---------- */
.legal-footer {
  text-align: center;
  padding: 2rem 1.25rem;
  font-size: .82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--divider);
}

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

.legal-footer a:hover { text-decoration: underline; }

/* ---------- print ---------- */
@media print {
  body { background: #fff; color: #111; }
  .legal-hero { background: none; border: none; }
  .legal-hero h1 { color: #111; }
  .legal-section { border: 1px solid #ccc; break-inside: avoid; }
  .back-to-top, .toc { display: none; }
}
