/* =========================================================
   LUCIWISE — PRIVACY PAGE
   Premium responsive layout + TOC + Dark/Light
========================================================= */

.privacy-section{
  position: relative;
  overflow: hidden;
  color: var(--lw-text, #0f172a);
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(124,58,237,.14), transparent 58%),
    radial-gradient(820px 380px at 88% 12%, rgba(59,130,246,.10), transparent 56%),
    var(--lw-bg, #ffffff);
  padding: clamp(42px, 7vw, 86px) 0;
}

html[data-theme="dark"] .privacy-section{
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(124,58,237,.24), transparent 58%),
    radial-gradient(820px 380px at 88% 12%, rgba(59,130,246,.14), transparent 56%),
    var(--lw-bg, #0b0f19);
}

.privacy-section::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0 31px,
      rgba(15,23,42,.045) 31px 32px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0 31px,
      rgba(15,23,42,.035) 31px 32px
    );
}

html[data-theme="dark"] .privacy-section::before{
  background:
    repeating-linear-gradient(
      to right,
      transparent 0 31px,
      rgba(255,255,255,.045) 31px 32px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0 31px,
      rgba(255,255,255,.035) 31px 32px
    );
}

/* Container */
.privacy-section .container{
  position: relative;
  z-index: 1;
  max-width: var(--container-w, 1200px);
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

/* Main card */
.privacy-main{
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.72));
  border: 1px solid var(--lw-border, rgba(15,23,42,.10));
  box-shadow:
    0 28px 70px rgba(15,23,42,.10),
    inset 0 1px 0 rgba(255,255,255,.45);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

html[data-theme="dark"] .privacy-main{
  background:
    linear-gradient(180deg, rgba(15,23,42,.86), rgba(15,23,42,.72));
  box-shadow:
    0 28px 70px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.08);
}

/* Hero */
.privacy-hero{
  margin-bottom: clamp(28px, 4vw, 44px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--lw-border, rgba(15,23,42,.10));
}

.privacy-kicker{
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--lw-purple, #7c3aed);
  background: rgba(124,58,237,.10);
  border: 1px solid rgba(124,58,237,.16);
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .14em;
}

html[data-theme="dark"] .privacy-kicker{
  color: #c4b5fd;
  background: rgba(139,92,246,.14);
  border-color: rgba(139,92,246,.22);
}

.privacy-main h1{
  margin: 0;
  color: var(--lw-text, #0f172a);
  font-size: clamp(2.15rem, 5vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.07em;
  font-weight: 950;
}

.effective-date{
  margin: 16px 0 0;
  color: var(--lw-muted, rgba(15,23,42,.68));
  font-size: 1rem;
  font-weight: 800;
}

/* Sections */
.privacy-main section{
  scroll-margin-top: 110px;
  margin: 0;
  padding: 26px 0;
  border-bottom: 1px solid var(--lw-border, rgba(15,23,42,.10));
}

.privacy-main section:last-child{
  border-bottom: 0;
  padding-bottom: 0;
}

.privacy-main h2{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--lw-text, #0f172a);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.18;
  letter-spacing: -.035em;
  font-weight: 950;
}

.privacy-main h2::before{
  content: "";
  width: 9px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lw-purple, #7c3aed), var(--lw-purple-2, #8b5cf6));
  box-shadow: 0 10px 22px rgba(124,58,237,.22);
}

.privacy-main p{
  margin: 0 0 14px;
  color: var(--lw-muted, rgba(15,23,42,.68));
  font-size: 1rem;
  line-height: 1.78;
  font-weight: 600;
}

.privacy-main p:last-child{
  margin-bottom: 0;
}

.privacy-main ul{
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.privacy-main li{
  position: relative;
  padding: 12px 14px 12px 42px;
  border-radius: 16px;
  color: var(--lw-text, #0f172a);
  background: rgba(255,255,255,.52);
  border: 1px solid var(--lw-border, rgba(15,23,42,.10));
  font-size: .96rem;
  line-height: 1.55;
  font-weight: 700;
}

html[data-theme="dark"] .privacy-main li{
  background: rgba(255,255,255,.055);
}

.privacy-main li::before{
  content: "✓";
  position: absolute;
  left: 14px;
  top: 12px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--lw-purple, #7c3aed), var(--lw-purple-2, #8b5cf6));
  font-size: .72rem;
  font-weight: 950;
}

.privacy-main strong{
  color: var(--lw-text, #0f172a);
  font-weight: 950;
}

.privacy-main a{
  color: var(--lw-purple, #7c3aed);
  font-weight: 900;
  text-decoration: none;
}

.privacy-main a:hover{
  text-decoration: underline;
}

html[data-theme="dark"] .privacy-main a{
  color: #c4b5fd;
}

/* Anchor */
.p-anchor{
  opacity: 0;
  color: var(--lw-purple, #7c3aed);
  font-size: .95rem;
  text-decoration: none !important;
  transform: translateY(1px);
  transition: opacity .18s ease;
}

.privacy-main h2:hover .p-anchor{
  opacity: 1;
}

/* Contact box */
.privacy-contact-box{
  margin-top: 14px !important;
  padding: 18px;
  border-radius: 20px;
  color: var(--lw-text, #0f172a) !important;
  background:
    linear-gradient(135deg, rgba(124,58,237,.11), rgba(59,130,246,.08));
  border: 1px solid rgba(124,58,237,.18);
}

/* TOC */
.privacy-toc{
  position: sticky;
  top: 98px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,255,255,.66));
  border: 1px solid var(--lw-border, rgba(15,23,42,.10));
  box-shadow:
    0 22px 55px rgba(15,23,42,.10),
    inset 0 1px 0 rgba(255,255,255,.42);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

html[data-theme="dark"] .privacy-toc{
  background:
    linear-gradient(180deg, rgba(15,23,42,.84), rgba(15,23,42,.66));
  box-shadow:
    0 22px 55px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.toc-title{
  margin-bottom: 12px;
  color: var(--lw-text, #0f172a);
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.privacy-toc ol{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.privacy-toc li{
  margin: 0;
  padding: 0;
}

.privacy-toc a{
  display: block;
  padding: 10px 11px;
  border-radius: 14px;
  color: var(--lw-muted, rgba(15,23,42,.68));
  text-decoration: none;
  font-size: .9rem;
  font-weight: 850;
  line-height: 1.35;
  transition:
    background .18s ease,
    color .18s ease,
    transform .18s ease;
}

.privacy-toc a:hover,
.privacy-toc a.active{
  color: var(--lw-purple, #7c3aed);
  background: rgba(124,58,237,.10);
  transform: translateX(2px);
}

html[data-theme="dark"] .privacy-toc a:hover,
html[data-theme="dark"] .privacy-toc a.active{
  color: #c4b5fd;
  background: rgba(139,92,246,.14);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 980px){
  .privacy-section .container{
    grid-template-columns: 1fr;
  }

  .privacy-toc{
    position: relative;
    top: auto;
    order: -1;
  }

  .privacy-toc ol{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px){
  .privacy-section{
    padding: 34px 0 52px;
  }

  .privacy-section .container{
    padding: 0 14px;
    gap: 18px;
  }

  .privacy-main{
    padding: 20px 16px;
    border-radius: 24px;
  }

  .privacy-hero{
    margin-bottom: 24px;
    padding-bottom: 20px;
  }

  .privacy-main h1{
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .privacy-main section{
    padding: 22px 0;
    scroll-margin-top: 86px;
  }

  .privacy-main h2{
    align-items: flex-start;
  }

  .privacy-main h2::before{
    height: 24px;
    margin-top: 2px;
  }

  .privacy-main p{
    font-size: .96rem;
    line-height: 1.7;
  }

  .privacy-main li{
    padding: 12px 12px 12px 40px;
    font-size: .94rem;
  }

  .privacy-toc{
    padding: 14px;
    border-radius: 20px;
  }

  .privacy-toc ol{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px){
  .privacy-section .container{
    padding: 0 12px;
  }

  .privacy-main{
    padding: 18px 14px;
  }

  .privacy-main p,
  .privacy-main li,
  .privacy-toc a{
    font-size: .9rem;
  }
}

/* =========================================================
   ACCESSIBILITY / MOTION
========================================================= */

.privacy-main a:focus-visible,
.privacy-toc a:focus-visible{
  outline: 2px solid var(--lw-purple, #7c3aed);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  .privacy-section *,
  .privacy-section *::before,
  .privacy-section *::after{
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================================
   LUCIWISE — LEGAL PAGES
   Privacy + Terms | Premium responsive + TOC + Dark/Light
========================================================= */

.privacy-section,
.terms-section{
  position: relative;
  overflow: hidden;
  color: var(--lw-text, #0f172a);
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(124,58,237,.14), transparent 58%),
    radial-gradient(820px 380px at 88% 12%, rgba(59,130,246,.10), transparent 56%),
    var(--lw-bg, #ffffff);
  padding: clamp(42px, 7vw, 86px) 0;
}

html[data-theme="dark"] .privacy-section,
html[data-theme="dark"] .terms-section{
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(124,58,237,.24), transparent 58%),
    radial-gradient(820px 380px at 88% 12%, rgba(59,130,246,.14), transparent 56%),
    var(--lw-bg, #0b0f19);
}

.privacy-section::before,
.terms-section::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .45;
  background:
    repeating-linear-gradient(
      to right,
      transparent 0 31px,
      rgba(15,23,42,.045) 31px 32px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0 31px,
      rgba(15,23,42,.035) 31px 32px
    );
}

html[data-theme="dark"] .privacy-section::before,
html[data-theme="dark"] .terms-section::before{
  background:
    repeating-linear-gradient(
      to right,
      transparent 0 31px,
      rgba(255,255,255,.045) 31px 32px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0 31px,
      rgba(255,255,255,.035) 31px 32px
    );
}

/* Container */
.privacy-section .container,
.terms-section .container{
  position: relative;
  z-index: 1;
  max-width: var(--container-w, 1200px);
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 34px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 28px;
  align-items: start;
}

/* Main card */
.privacy-main,
.terms-main{
  min-width: 0;
  padding: clamp(22px, 3vw, 34px);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.72));
  border: 1px solid var(--lw-border, rgba(15,23,42,.10));
  box-shadow:
    0 28px 70px rgba(15,23,42,.10),
    inset 0 1px 0 rgba(255,255,255,.45);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

html[data-theme="dark"] .privacy-main,
html[data-theme="dark"] .terms-main{
  background:
    linear-gradient(180deg, rgba(15,23,42,.86), rgba(15,23,42,.72));
  box-shadow:
    0 28px 70px rgba(0,0,0,.34),
    inset 0 1px 0 rgba(255,255,255,.08);
}

/* Hero */
.privacy-hero,
.terms-hero{
  margin-bottom: clamp(28px, 4vw, 44px);
  padding-bottom: 24px;
  border-bottom: 1px solid var(--lw-border, rgba(15,23,42,.10));
}

.privacy-kicker,
.terms-kicker{
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--lw-purple, #7c3aed);
  background: rgba(124,58,237,.10);
  border: 1px solid rgba(124,58,237,.16);
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .14em;
}

html[data-theme="dark"] .privacy-kicker,
html[data-theme="dark"] .terms-kicker{
  color: #c4b5fd;
  background: rgba(139,92,246,.14);
  border-color: rgba(139,92,246,.22);
}

.privacy-main h1,
.terms-main h1{
  margin: 0;
  color: var(--lw-text, #0f172a);
  font-size: clamp(2.15rem, 5vw, 4.4rem);
  line-height: .98;
  letter-spacing: -.07em;
  font-weight: 950;
}

.effective-date{
  margin: 16px 0 0;
  color: var(--lw-muted, rgba(15,23,42,.68));
  font-size: 1rem;
  font-weight: 800;
}

/* Sections */
.privacy-main section,
.terms-main section{
  scroll-margin-top: 110px;
  margin: 0;
  padding: 26px 0;
  border-bottom: 1px solid var(--lw-border, rgba(15,23,42,.10));
}

.privacy-main section:last-child,
.terms-main section:last-child{
  border-bottom: 0;
  padding-bottom: 0;
}

.privacy-main h2,
.terms-main h2{
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  color: var(--lw-text, #0f172a);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.18;
  letter-spacing: -.035em;
  font-weight: 950;
}

.privacy-main h2::before,
.terms-main h2::before{
  content: "";
  width: 9px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--lw-purple, #7c3aed), var(--lw-purple-2, #8b5cf6));
  box-shadow: 0 10px 22px rgba(124,58,237,.22);
}

.privacy-main p,
.terms-main p{
  margin: 0 0 14px;
  color: var(--lw-muted, rgba(15,23,42,.68));
  font-size: 1rem;
  line-height: 1.78;
  font-weight: 600;
}

.privacy-main p:last-child,
.terms-main p:last-child{
  margin-bottom: 0;
}

.privacy-main ul,
.terms-main ul{
  margin: 16px 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.privacy-main li,
.terms-main li{
  position: relative;
  padding: 12px 14px 12px 42px;
  border-radius: 16px;
  color: var(--lw-text, #0f172a);
  background: rgba(255,255,255,.52);
  border: 1px solid var(--lw-border, rgba(15,23,42,.10));
  font-size: .96rem;
  line-height: 1.55;
  font-weight: 700;
}

html[data-theme="dark"] .privacy-main li,
html[data-theme="dark"] .terms-main li{
  background: rgba(255,255,255,.055);
}

.privacy-main li::before,
.terms-main li::before{
  content: "✓";
  position: absolute;
  left: 14px;
  top: 12px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--lw-purple, #7c3aed), var(--lw-purple-2, #8b5cf6));
  font-size: .72rem;
  font-weight: 950;
}

.privacy-main strong,
.terms-main strong{
  color: var(--lw-text, #0f172a);
  font-weight: 950;
}

.privacy-main a,
.terms-main a{
  color: var(--lw-purple, #7c3aed);
  font-weight: 900;
  text-decoration: none;
}

.privacy-main a:hover,
.terms-main a:hover{
  text-decoration: underline;
}

html[data-theme="dark"] .privacy-main a,
html[data-theme="dark"] .terms-main a{
  color: #c4b5fd;
}

/* Anchor */
.p-anchor,
.h-anchor{
  opacity: 0;
  color: var(--lw-purple, #7c3aed);
  font-size: .95rem;
  text-decoration: none !important;
  transform: translateY(1px);
  transition: opacity .18s ease;
}

.privacy-main h2:hover .p-anchor,
.terms-main h2:hover .h-anchor{
  opacity: 1;
}

/* Contact box */
.privacy-contact-box,
.terms-contact-box{
  margin-top: 14px !important;
  padding: 18px;
  border-radius: 20px;
  color: var(--lw-text, #0f172a) !important;
  background:
    linear-gradient(135deg, rgba(124,58,237,.11), rgba(59,130,246,.08));
  border: 1px solid rgba(124,58,237,.18);
}

/* TOC */
.privacy-toc,
.terms-toc{
  position: sticky;
  top: 98px;
  padding: 18px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.84), rgba(255,255,255,.66));
  border: 1px solid var(--lw-border, rgba(15,23,42,.10));
  box-shadow:
    0 22px 55px rgba(15,23,42,.10),
    inset 0 1px 0 rgba(255,255,255,.42);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

html[data-theme="dark"] .privacy-toc,
html[data-theme="dark"] .terms-toc{
  background:
    linear-gradient(180deg, rgba(15,23,42,.84), rgba(15,23,42,.66));
  box-shadow:
    0 22px 55px rgba(0,0,0,.30),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.toc-title{
  margin-bottom: 12px;
  color: var(--lw-text, #0f172a);
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.privacy-toc ol,
.terms-toc ol{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.privacy-toc li,
.terms-toc li{
  margin: 0;
  padding: 0;
}

.privacy-toc a,
.terms-toc a{
  display: block;
  padding: 10px 11px;
  border-radius: 14px;
  color: var(--lw-muted, rgba(15,23,42,.68));
  text-decoration: none;
  font-size: .9rem;
  font-weight: 850;
  line-height: 1.35;
  transition:
    background .18s ease,
    color .18s ease,
    transform .18s ease;
}

.privacy-toc a:hover,
.privacy-toc a.active,
.terms-toc a:hover,
.terms-toc a.active{
  color: var(--lw-purple, #7c3aed);
  background: rgba(124,58,237,.10);
  transform: translateX(2px);
}

html[data-theme="dark"] .privacy-toc a:hover,
html[data-theme="dark"] .privacy-toc a.active,
html[data-theme="dark"] .terms-toc a:hover,
html[data-theme="dark"] .terms-toc a.active{
  color: #c4b5fd;
  background: rgba(139,92,246,.14);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 980px){
  .privacy-section .container,
  .terms-section .container{
    grid-template-columns: 1fr;
  }

  .privacy-toc,
  .terms-toc{
    position: relative;
    top: auto;
    order: -1;
  }

  .privacy-toc ol,
  .terms-toc ol{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px){
  .privacy-section,
  .terms-section{
    padding: 34px 0 52px;
  }

  .privacy-section .container,
  .terms-section .container{
    padding: 0 14px;
    gap: 18px;
  }

  .privacy-main,
  .terms-main{
    padding: 20px 16px;
    border-radius: 24px;
  }

  .privacy-hero,
  .terms-hero{
    margin-bottom: 24px;
    padding-bottom: 20px;
  }

  .privacy-main h1,
  .terms-main h1{
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .privacy-main section,
  .terms-main section{
    padding: 22px 0;
    scroll-margin-top: 86px;
  }

  .privacy-main h2,
  .terms-main h2{
    align-items: flex-start;
  }

  .privacy-main h2::before,
  .terms-main h2::before{
    height: 24px;
    margin-top: 2px;
  }

  .privacy-main p,
  .terms-main p{
    font-size: .96rem;
    line-height: 1.7;
  }

  .privacy-main li,
  .terms-main li{
    padding: 12px 12px 12px 40px;
    font-size: .94rem;
  }

  .privacy-toc,
  .terms-toc{
    padding: 14px;
    border-radius: 20px;
  }

  .privacy-toc ol,
  .terms-toc ol{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 380px){
  .privacy-section .container,
  .terms-section .container{
    padding: 0 12px;
  }

  .privacy-main,
  .terms-main{
    padding: 18px 14px;
  }

  .privacy-main p,
  .privacy-main li,
  .privacy-toc a,
  .terms-main p,
  .terms-main li,
  .terms-toc a{
    font-size: .9rem;
  }
}

/* =========================================================
   ACCESSIBILITY / MOTION
========================================================= */

.privacy-main a:focus-visible,
.privacy-toc a:focus-visible,
.terms-main a:focus-visible,
.terms-toc a:focus-visible{
  outline: 2px solid var(--lw-purple, #7c3aed);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce){
  .privacy-section *,
  .privacy-section *::before,
  .privacy-section *::after,
  .terms-section *,
  .terms-section *::before,
  .terms-section *::after{
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}