/* =====================================================================
   NexusHub - Terms and Privacy
   Shared look for both pages: sticky contents, collapsible sections,
   and gentle reveals as you scroll.
   ===================================================================== */
:root {
  --lg-panel: rgba(6, 6, 10, .66);
  --lg-inset: rgba(3, 3, 6, .7);
  --lg-line: rgba(255, 255, 255, .075);
  --lg-line-2: rgba(255, 255, 255, .14);
  --lg-text: #f4f4f5;
  --lg-muted: #9a9aa5;
  --lg-dim: #6a6a75;
  --lg-purple: #a855f7;
  --lg-blue: #3b82f6;
  --lg-ease: cubic-bezier(.16, 1, .3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; color: var(--lg-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--lg-purple); outline-offset: 3px; }

/* how far down the page you are */
.lg-progress { position: fixed; top: 0; left: 0; z-index: 90; height: 2px; width: 0; background: linear-gradient(90deg, var(--lg-purple), var(--lg-blue)); transition: width .1s linear; }

.lg-app { width: min(1120px, calc(100% - 32px)); margin: 8px auto 72px; flex: 1 0 auto; }

/* ---------- Title ---------- */
.lg-hero { max-width: 720px; margin: 18px auto 34px; text-align: center; }
.lg-hero h1 {
  margin: 0 0 14px; font-family: Outfit, Inter, sans-serif; font-weight: 900;
  font-size: clamp(2.2rem, 5.4vw, 3.4rem); line-height: 1.04; letter-spacing: -.03em;
}
.lg-hero h1 span { background: linear-gradient(90deg, #c084fc, #60a5fa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-hero p { margin: 0 auto; max-width: 560px; color: var(--lg-muted); font-size: 1.02rem; line-height: 1.7; }
.lg-stamp {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  padding: 6px 14px; border: 1px solid var(--lg-line); border-radius: 999px;
  background: rgba(255, 255, 255, .03); color: var(--lg-dim); font-size: 12px; font-weight: 600;
}
.lg-stamp svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- The short version ---------- */
.lg-tldr {
  max-width: 820px; margin: 0 auto 30px; padding: 24px 26px;
  border: 1px solid rgba(168, 85, 247, .22); border-radius: 22px;
  background: linear-gradient(140deg, rgba(168, 85, 247, .09), rgba(59, 130, 246, .05)), var(--lg-panel);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.lg-tldr h2 { margin: 0 0 14px; font-family: Outfit, Inter, sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: .01em; }
.lg-tldr ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 11px; }
.lg-tldr li { display: flex; gap: 11px; color: #c9c9d2; font-size: 14px; line-height: 1.6; }
.lg-tldr li svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: #86efac; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.lg-tldr li b { color: #fff; font-weight: 650; }

/* ---------- Layout ---------- */
.lg-split { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 28px; align-items: start; }

/* contents, pinned on desktop */
.lg-toc { position: sticky; top: 92px; }
.lg-toc-title { margin: 0 0 12px 12px; color: var(--lg-dim); font-size: 10.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.lg-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 1px; }
.lg-toc a {
  position: relative; display: block; padding: 9px 12px; border-radius: 10px;
  color: var(--lg-muted); font-size: 13.5px; line-height: 1.4; text-decoration: none;
  transition: background .2s ease, color .2s ease, padding-left .25s var(--lg-ease);
}
.lg-toc a::before {
  content: ""; position: absolute; top: 50%; left: 4px; width: 2px; height: 0; margin-top: 0;
  border-radius: 2px; background: linear-gradient(180deg, var(--lg-purple), var(--lg-blue));
  transform: translateY(-50%); transition: height .28s var(--lg-ease);
}
.lg-toc a:hover { background: rgba(255, 255, 255, .045); color: #fff; }
.lg-toc a.is-current { color: #fff; background: rgba(255, 255, 255, .05); padding-left: 16px; }
.lg-toc a.is-current::before { height: 18px; }

.lg-jump { display: none; }

/* ---------- Sections ---------- */
.lg-tools { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 12px; }
.lg-toggle-all {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 13px;
  border: 1px solid var(--lg-line); border-radius: 10px; background: transparent;
  color: var(--lg-muted); font-size: 12.5px; font-weight: 600;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.lg-toggle-all:hover { background: rgba(255, 255, 255, .06); border-color: var(--lg-line-2); color: #fff; }
.lg-toggle-all svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.lg-sections { display: grid; gap: 12px; }
.lg-card {
  overflow: hidden; scroll-margin-top: 96px;
  border: 1px solid var(--lg-line); border-radius: 18px;
  background: var(--lg-panel);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s ease, transform .6s var(--lg-ease), border-color .25s ease;
}
.lg-card.revealed { opacity: 1; transform: none; }
.lg-card:hover { border-color: rgba(255, 255, 255, .12); }
.lg-card.is-open { border-color: rgba(168, 85, 247, .32); }

.lg-head {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 17px 20px;
  border: 0; background: transparent; text-align: left;
  transition: background .2s ease;
}
.lg-head:hover { background: rgba(255, 255, 255, .03); }
.lg-num {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center;
  border-radius: 8px; background: rgba(255, 255, 255, .06);
  color: var(--lg-dim); font-size: 11.5px; font-weight: 800; font-variant-numeric: tabular-nums;
  transition: background .25s ease, color .25s ease;
}
.lg-card.is-open .lg-num { background: linear-gradient(140deg, var(--lg-purple), var(--lg-blue)); color: #fff; }
.lg-head h2 { flex: 1; margin: 0; font-family: Outfit, Inter, sans-serif; font-size: 1.02rem; font-weight: 700; letter-spacing: -.01em; }
.lg-chev { width: 18px; height: 18px; flex: none; color: var(--lg-dim); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--lg-ease), color .2s ease; }
.lg-card.is-open .lg-chev { transform: rotate(180deg); color: #c4b5fd; }

.lg-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .42s var(--lg-ease); }
.lg-card.is-open .lg-body { grid-template-rows: 1fr; }
.lg-body > div { overflow: hidden; min-height: 0; }
.lg-inner { padding: 2px 20px 20px 60px; color: var(--lg-muted); font-size: 14px; line-height: 1.75; }
.lg-inner > *:first-child { margin-top: 0; }
.lg-inner > *:last-child { margin-bottom: 0; }
.lg-inner p { margin: 0 0 12px; }
.lg-inner b, .lg-inner strong { color: #e8e8ec; font-weight: 650; }
.lg-inner a { color: #c4b5fd; text-decoration: underline; text-underline-offset: 2px; }
.lg-inner a:hover { color: #ddd0ff; }
.lg-inner ul { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 9px; }
.lg-inner li { position: relative; padding-left: 18px; }
.lg-inner li::before { content: ""; position: absolute; top: 9px; left: 3px; width: 5px; height: 5px; border-radius: 50%; background: rgba(168, 85, 247, .7); }
.lg-note {
  display: flex; gap: 11px; margin: 14px 0 0; padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, .07); border-radius: 13px; background: rgba(255, 255, 255, .03);
  color: #c2c2cb; font-size: 13px; line-height: 1.6;
}
.lg-note svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: #c4b5fd; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-note.warn { border-color: rgba(245, 158, 11, .26); background: rgba(245, 158, 11, .07); color: #fcd9a1; }
.lg-note.warn svg { color: #fbbf24; }

/* ---------- Footer of the page ---------- */
.lg-foot {
  max-width: 820px; margin: 30px auto 0; padding: 22px 24px;
  border: 1px solid var(--lg-line); border-radius: 18px; background: var(--lg-panel);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: var(--lg-muted); font-size: 13.5px; line-height: 1.7; text-align: center;
}
.lg-foot a { color: #c4b5fd; text-decoration: underline; text-underline-offset: 2px; }
.lg-foot .lg-pair { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.lg-foot .lg-pill, .lg-pill { text-decoration: none; }
.lg-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px;
  border: 1px solid var(--lg-line-2); border-radius: 12px; background: rgba(255, 255, 255, .04);
  color: #e4e4e7; font-size: 13px; font-weight: 600; text-decoration: none;
  transition: background .2s ease, transform .2s var(--lg-ease);
}
.lg-pill:hover { background: rgba(255, 255, 255, .09); transform: translateY(-1px); }
.lg-pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* back to top */
.lg-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 1px solid var(--lg-line-2); border-radius: 14px;
  background: rgba(10, 10, 14, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #d4d4d8; box-shadow: 0 12px 30px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .3s ease, transform .35s var(--lg-ease), background .2s ease;
}
.lg-top.show { opacity: 1; transform: none; pointer-events: auto; }
.lg-top:hover { background: rgba(168, 85, 247, .25); }
.lg-top svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .lg-split { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .lg-toc { position: static; }
  .lg-toc-wrap { border: 1px solid var(--lg-line); border-radius: 16px; background: var(--lg-panel); overflow: hidden; }
  .lg-jump {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 16px;
    border: 0; background: transparent; color: #e4e4e7; font-size: 14px; font-weight: 600;
  }
  .lg-jump svg.chev { width: 17px; height: 17px; margin-left: auto; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--lg-ease); }
  .lg-jump[aria-expanded="true"] svg.chev { transform: rotate(180deg); }
  .lg-toc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .38s var(--lg-ease); }
  .lg-toc-panel.open { grid-template-rows: 1fr; }
  .lg-toc-panel > div { overflow: hidden; min-height: 0; }
  .lg-toc-title { display: none; }
  .lg-toc ol { padding: 4px 8px 10px; }
}
@media (max-width: 640px) {
  .lg-app { width: min(100% - 20px, 1120px); }
  .lg-tldr { padding: 20px; border-radius: 18px; }
  .lg-head { padding: 15px 16px; gap: 11px; }
  .lg-head h2 { font-size: .95rem; }
  .lg-inner { padding: 2px 16px 18px 16px; }
  .lg-top { right: 14px; bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .lg-card { opacity: 1; transform: none; }
  * { transition-duration: .01ms !important; }
}
