/* =============================================================
   LEGAL PAGES
   Long-form documents on the landing's tokens. These pages are
   read, not scanned: the measure is capped, the rhythm is looser
   than the marketing pages, and every heading is anchorable so a
   clause can be linked to directly.
   ============================================================= */

.legaldoc { padding-top: var(--hdr-h); }

.legaldoc__inner { max-width: 800px; margin: 0 auto; padding: clamp(40px,6vw,76px) 0 clamp(64px,8vw,110px); }

/* ---------- document head ---------- */
.legaldoc__head { padding-bottom: clamp(28px,3.4vw,44px); border-bottom: 1px solid var(--line); margin-bottom: clamp(32px,4vw,52px); }
.legaldoc__back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 500; color: var(--ink-3);
  transition: color .18s var(--ease);
}
.legaldoc__back:hover { color: var(--ink); }
.legaldoc__back .i { font-size: 14px; transform: rotate(180deg); }
.legaldoc__h1 {
  margin-top: 20px;
  font-size: clamp(1.9rem,4.4vw,3.1rem); font-weight: 600;
  letter-spacing: -.04em; line-height: 1.05;
}
.legaldoc__sub { margin-top: 16px; font-size: 1rem; line-height: 1.6; color: var(--ink-3); max-width: 60ch; }

/* ---------- body ---------- */
.legaldoc__body { font-size: 1rem; line-height: 1.72; color: var(--ink-2); }
.legal-section { padding-top: clamp(28px,3.2vw,40px); }
.legal-section:first-child { padding-top: 0; }

.legaldoc__body h2 {
  margin-bottom: 18px;
  font-size: clamp(1.15rem,2vw,1.4rem); font-weight: 600;
  letter-spacing: -.025em; line-height: 1.25; color: var(--ink);
  scroll-margin-top: calc(var(--hdr-h) + 24px);
}
.legaldoc__body h3 {
  margin: 26px 0 12px;
  font-size: 1.02rem; font-weight: 600; letter-spacing: -.015em; color: var(--ink);
}
.legaldoc__body p { margin-bottom: 16px; }
.legaldoc__body p:last-child { margin-bottom: 0; }
.legaldoc__body strong { color: var(--ink); font-weight: 600; }

.legaldoc__body ul { margin: 0 0 18px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.legaldoc__body li { position: relative; padding-left: 22px; }
/* a lavender rule instead of a bullet: the brand's mark, not a dot */
.legaldoc__body li::before {
  content: ""; position: absolute; left: 0; top: .72em;
  width: 10px; height: 2px; border-radius: 1px;
  background: color-mix(in srgb, var(--accent) 70%, transparent);
}

.legaldoc__body a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.legaldoc__body a:hover { color: var(--accent-lift); }

/* ---------- tables ---------- */
.legal-table-wrap { margin: 4px 0 20px; overflow-x: auto; border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); }
.legal-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.legal-table th, .legal-table td { padding: 14px 18px; text-align: left; }
.legal-table thead th {
  background: var(--bg-2); color: var(--ink);
  font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase;
  white-space: nowrap;
}
.legal-table tbody tr + tr td { border-top: 1px solid var(--line); }
.legal-table tbody td { color: var(--ink-2); }

/* ---------- footer note ---------- */
.legaldoc__foot {
  margin-top: clamp(40px,5vw,64px); padding-top: 28px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap;
}
.legaldoc__foot p { font-size: .88rem; color: var(--ink-3); }

/* ---------- 404 ----------
   The page is a rate line that stops: everything past the last point is a
   ghost, because what you asked for is off the chart. Same dot matrix and
   lavender bloom the live chart and the closing CTA use, so a dead end still
   looks like the same product.
   -------------------------- */
.nf {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: calc(100dvh - var(--hdr-h));
  display: grid; align-items: center;
  padding: clamp(48px,8vh,90px) 0 clamp(64px,10vh,120px);
}
/* dot matrix, fading out toward the top so the type stays clean */
.nf__grid {
  position: absolute; inset: 0; z-index: -2;
  background-image: radial-gradient(circle, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 42%, #000 78%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 42%, #000 78%, transparent);
}
.nf__glow {
  position: absolute; inset: auto 0 -30% 0; height: 90%; z-index: -2;
  background: radial-gradient(60% 100% at 50% 100%, rgba(201,166,242,.30) 0%, rgba(201,166,242,0) 70%);
}
/* Sits below the content, not behind it: the series ends in a point, and that
   point was landing underneath the quick-links row where nothing of it could
   be seen. */
.nf__chartwrap {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: -1;
  height: clamp(140px,22vh,220px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
.nf__chart {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
}
/* No non-scaling-stroke here: combined with stroke-dasharray it measures the
   dashes in screen units while the path is scaled 1.2x on X, so the stroke
   stopped ~90px short of its own end point and left a gap before the dot.
   The width is scaled instead, which on a 2.5px decorative line is invisible. */
.nf__line, .nf__ghost { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.nf__line {
  stroke: var(--accent);
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--accent) 55%, transparent));
}
/* what would have come next, had the page existed */
.nf__ghost { stroke: var(--ink-3); stroke-dasharray: 5 9; }
/* 648/1200 across, 104/260 down — the exact end of the path. No outline:
   a ring around it read as a border rather than as the series stopping. */
.nf__end {
  position: absolute; left: 54%; top: 40%;
  width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 85%, transparent);
}

.nf__in { max-width: 620px; margin-inline: auto; text-align: center; }
.nf__code {
  font-family: var(--ff); font-size: clamp(5rem,17vw,11rem); font-weight: 600;
  letter-spacing: -.07em; line-height: .9;
  background: linear-gradient(180deg, var(--ink) 8%, var(--accent) 62%, color-mix(in srgb, var(--accent) 45%, transparent) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.nf__h { margin-top: 6px; font-size: clamp(1.5rem,3.4vw,2.25rem); font-weight: 600; letter-spacing: -.04em; }
.nf__p { margin-top: 16px; font-size: clamp(.98rem,1.3vw,1.06rem); line-height: 1.65; color: var(--ink-3); }
.nf__btns { margin-top: 34px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.nf__links {
  margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line);
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
}
.nf__links a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--bg-2); color: var(--ink-2);
  font-size: 13px; font-weight: 500;
  transition: background .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.nf__links a:hover { background: var(--bg-3); color: var(--ink); transform: translateY(-2px); }
.nf__links .i { color: var(--accent); font-size: 15px; }

/* Static by request: the line, its end point and the trailing dashes are
   simply drawn, with no reveal and no loop. */
.nf__ghost { opacity: .34; }

@media (max-width: 620px) {
  .legaldoc__foot { flex-direction: column; align-items: flex-start; }
}
