/* Xul Valley — legal / long-form document pages.
   Loaded *after* styles.css: reuses the palette and ambient backdrop, but
   undoes the landing page's single-viewport clamp so the page can scroll. */

html, body {
  height: auto;
  min-height: 100%;
  overflow: visible; /* styles.css hides overflow for the one-screen landing */
}

/* ---- Layout ----------------------------------------------------------- */

.doc-stage {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 8vw, 5rem);
}

.doc {
  width: min(820px, 100%);
  min-width: 0;
  padding: clamp(1.6rem, 5vw, 3.25rem);
  border-radius: 28px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  backdrop-filter: blur(28px) saturate(150%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.25) inset,
    0 -1px 0 rgba(255, 255, 255, 0.04) inset,
    0 30px 80px rgba(0, 0, 0, 0.45),
    0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ---- Masthead --------------------------------------------------------- */

.doc a.doc-back {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.15s ease;
}

.doc a.doc-back {
  text-decoration: none;
}

.doc a.doc-back:hover { color: var(--ink-dim); }

.doc-back__icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  vertical-align: middle;
}

.doc h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.doc__subtitle {
  margin: 0.55rem 0 0;
  font-size: clamp(1rem, 3vw, 1.15rem);
  font-weight: 600;
  background: linear-gradient(100deg, var(--flow-a), var(--flow-b) 45%, var(--flow-c));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.doc__meta {
  margin: 1.1rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-faint);
}

.doc__meta dt,
.doc__meta dd {
  display: inline;
  margin: 0;
}

.doc__meta dt { font-weight: 600; }
.doc__meta dt::after { content: " "; }
.doc__meta dd::after { content: " · "; }
.doc__meta dd:last-child::after { content: ""; }

/* Anchor-target links (e.g. the Privacy Policy jump) */
.doc__jump {
  margin: 0.9rem 0 0;
  font-size: 0.85rem;
}

/* Offset anchored headings so they don't land flush against the viewport top */
.doc h2[id] { scroll-margin-top: 1.5rem; }

/* ---- Summary callout -------------------------------------------------- */

.doc__summary {
  margin: 2rem 0 0;
  padding: 1.1rem 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 3px solid var(--flow-b);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--ink-dim);
}

.doc__summary strong { color: var(--ink); }

/* ---- Body ------------------------------------------------------------- */

.doc section { margin-top: 2.4rem; }

.doc h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.05rem, 3vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.doc h2 .num {
  display: inline-block;
  min-width: 2.2rem;      /* fits two digits without crowding the heading */
  padding-right: 0.3rem;
  color: var(--flow-b);
  font-variant-numeric: tabular-nums;
}

.doc p,
.doc li {
  font-size: 0.95rem;
  line-height: 1.72;
  color: var(--ink-dim);
}

.doc p { margin: 0 0 0.9rem; }
.doc p:last-child { margin-bottom: 0; }

.doc ul {
  margin: 0 0 0.9rem;
  padding-left: 1.15rem;
}

.doc li { margin-bottom: 0.5rem; }
.doc li::marker { color: var(--flow-a); }

.doc strong { color: var(--ink); font-weight: 600; }

.doc a {
  color: var(--flow-b);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.doc a:hover { color: var(--flow-a); }

.doc :focus-visible {
  outline: 2px solid var(--flow-b);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Body of a numbered section, indented to line up under the heading text */
.doc section > *:not(h2) { padding-left: clamp(0rem, 2.75vw, 2.2rem); }

/* ---- Footer ----------------------------------------------------------- */

.doc-footer {
  margin-top: 2.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.82rem;
  line-height: 1.7;
  color: var(--ink-faint);
}

.doc-footer p { margin: 0; font-size: inherit; color: inherit; }

@media (max-width: 380px) {
  .doc { border-radius: 22px; }
}
