/* Maxima legal pages (terms, privacy, disclaimer) — 2026-12-06. Uses the Ridgeline tokens from styles.css. */

.lg-body { min-height: 100vh; }
.lg-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: calc(14px + env(safe-area-inset-top)) 24px 12px;
  background: linear-gradient(180deg, var(--bg) 55%, transparent);
}
.lg-top .brand { margin-right: auto; }
.lg-nav { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--raise); border: 1px solid var(--line); }
.lg-nav a {
  font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap;
  color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 999px; transition: color .2s, background .2s;
}
.lg-nav a:hover { color: var(--text); }
.lg-nav a[aria-current="page"] { color: var(--cta-ink); background: linear-gradient(135deg, var(--cta-a), var(--cta-b)); }
.lg-theme svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }

.lg-art { height: 150px; margin: -10px 0 -70px; pointer-events: none; overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%, #000 60%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 30%, #000 60%, transparent); }
.lg-art svg { width: 100%; height: 100%; overflow: visible; }
.lg-art .r { fill: none; stroke-width: 1.4; vector-effect: non-scaling-stroke; stroke-dasharray: 2400; stroke-dashoffset: 2400; animation: lgDraw 2.6s cubic-bezier(.2,.7,.2,1) forwards; }
.lg-art .r1 { stroke: var(--up); opacity: .85; filter: drop-shadow(0 0 6px var(--glow)); }
.lg-art .r2 { stroke: var(--mk4); opacity: .5; animation-delay: .25s; }
.lg-art .r3 { stroke: var(--mk3); opacity: .35; animation-delay: .5s; }
.lg-art .bead { fill: var(--value); opacity: 0; animation: lgBead .6s 2.2s forwards; filter: drop-shadow(0 0 8px var(--up)); }
@keyframes lgDraw { to { stroke-dashoffset: 0; } }
@keyframes lgBead { to { opacity: 1; } }

.legal { max-width: 1080px; margin: 0 auto; padding: 0 24px 60px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; position: relative; }
.lg-toc { position: sticky; top: 84px; align-self: start; padding-top: 128px; }
.lg-toc nav { margin-top: 14px; position: relative; padding-left: 18px; border-left: 1px solid var(--line); }
.lg-toc .rail { position: absolute; left: -1px; top: 0; width: 1px; height: 0; background: var(--up); box-shadow: 0 0 8px var(--glow); transition: height .2s; }
.lg-toc .rail::after { content: ""; position: absolute; left: -3px; bottom: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--value); box-shadow: 0 0 10px var(--up); }
.lg-toc a { display: grid; grid-template-columns: 26px 1fr; gap: 6px; padding: 5px 0; font-size: 13px; line-height: 1.35; color: var(--muted); text-decoration: none; transition: color .2s; }
.lg-toc a span { font-family: var(--mono); font-size: 10px; letter-spacing: .1em; padding-top: 2px; }
.lg-toc a:hover, .lg-toc a.on { color: var(--text); }
.lg-toc a.on span { color: var(--up); }

.lg-doc { padding-top: 128px; min-width: 0; }
.lg-doc h1 { font-family: var(--display); font-weight: 300; font-size: clamp(34px, 6vw, 60px); line-height: 1.02; letter-spacing: -.02em; margin: 14px 0 16px; color: var(--value); }
.lg-lede { font-size: 18px; line-height: 1.55; color: var(--text-body); max-width: 640px; margin: 0 0 32px; }
.lg-short {
  position: relative; padding: 22px 24px 18px; border-radius: 18px; margin-bottom: 44px;
  background: linear-gradient(160deg, var(--raise-2), var(--raise)); border: 1px solid var(--line); overflow: hidden;
}
.lg-short::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, transparent, var(--up), transparent); opacity: .7; }
.lg-short ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.lg-short li { position: relative; padding-left: 22px; font-size: 15px; line-height: 1.5; color: var(--text-body); }
.lg-short li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 10px; height: 6px; border-left: 1.5px solid var(--up); border-bottom: 1.5px solid var(--up); transform: rotate(-45deg); }
.lg-stamp { display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px; border-radius: 18px; margin-bottom: 44px; border: 1px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.lg-stamp svg { width: 44px; height: 44px; flex: 0 0 auto; }
.lg-stamp p { margin: 0; font-size: 16px; line-height: 1.55; color: var(--text-body); }
.lg-stamp b { color: var(--value); }

.lg-doc section { counter-increment: lgsec; padding-top: 8px; margin-bottom: 34px; scroll-margin-top: 90px; }
.lg-doc h2 { display: flex; align-items: baseline; gap: 14px; font-family: var(--display); font-weight: 400; font-size: 20px; letter-spacing: -.005em; color: var(--value); margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.lg-doc h2::before { content: counter(lgsec, decimal-leading-zero); font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--up); }
.lg-doc p, .lg-doc li { font-size: 15.5px; line-height: 1.7; color: var(--text-body); }
.lg-doc p { margin: 0 0 12px; }
.lg-doc ul { margin: 0 0 12px; padding-left: 20px; }
.lg-doc li { margin-bottom: 6px; }
.lg-doc li::marker { color: var(--up); }
.lg-doc b { color: var(--text); font-weight: 600; }
.lg-doc a { color: var(--up); text-underline-offset: 3px; }

.lg-foot { max-width: 1080px; margin: 0 auto; padding: 28px 24px calc(40px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.lg-foot div { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; }
.lg-foot nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.lg-foot a { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--muted); text-decoration: none; }
.lg-foot a:hover { color: var(--up); }

@media (max-width: 860px) {
  .legal { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 16px 40px; }
  .lg-toc { display: none; }
  .lg-doc { padding-top: 96px; }
  .lg-top { padding-left: 16px; padding-right: 16px; gap: 10px; }
  .lg-top .brand-word { display: none; }
  .lg-nav a { padding: 7px 9px; font-size: 9px; letter-spacing: .12em; }
  .lg-foot { padding-left: 16px; padding-right: 16px; }
  .lg-stamp { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-art .r { animation: none; stroke-dashoffset: 0; }
  .lg-art .bead { animation: none; opacity: 1; }
}
