/* ==========================================================================
   Privacy Policy / Terms of Service — "The new era of now"
   (docs/design/now-era/Legal.dc.html). Values copied from the design.
   ========================================================================== */

.lgl {
  min-height: 100vh;
  background: var(--ne-bg);
  color: var(--ne-ink);
  font-family: var(--ne-font);
  line-height: normal;
  text-align: start;
}
.lgl h1, .lgl h2, .lgl p, .lgl ol, .lgl ul { font-family: var(--ne-font); margin: 0; padding: 0; }
.lgl a { color: inherit; }
.lgl a:hover { color: inherit; }

.lgl-wrap { max-width: 1140px; margin: 0 auto; padding: 0 32px; box-sizing: border-box; }
.lgl-main { padding-top: 48px; padding-bottom: 72px; display: flex; flex-direction: column; gap: 32px; }

/* Document switch (Privacy / Terms) */
.lgl-bar { display: flex; justify-content: flex-end; margin-bottom: -16px; }
.lgl-seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--ne-seg); }
.lgl-seg > a { height: 36px; padding: 0 14px; border-radius: 10px; display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: var(--ne-ink) !important; text-decoration: none; transition: background 0.15s ease, box-shadow 0.15s ease; }
.lgl-seg > a:hover { background: rgba(255, 255, 255, 0.55); }
.lgl-seg > a.is-active { background: #FFFFFF; box-shadow: var(--ne-shadow-seg); }

/* Dark title card */
.lgl-hero { border-radius: 28px; background: var(--ne-ink); color: #FFFFFF; padding: 36px; display: flex; flex-direction: column; gap: 10px; }
.lgl .lgl-hero__overline { font-family: var(--ne-font-mono); font-size: 13px; color: var(--ne-accent); }
.lgl .lgl-hero__title { font-family: var(--ne-font-display); font-size: 48px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; color: #FFFFFF; }
.lgl-hero__desc { max-width: 640px; font-size: 16px; line-height: 1.7; color: var(--ne-dark-text); }
.lgl .lgl-hero__meta { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--ne-dark-muted); }
/* Arabic letters must stay joined */
html[dir="rtl"] .lgl .lgl-hero__title, html[dir="rtl"] .lgl .lgl-toc__label { letter-spacing: 0; }

/* TOC + article */
.lgl-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.lgl-toc { flex: 1 1 240px; min-width: 0; padding: 14px; border-radius: 22px; background: #FFFFFF; border: 1px solid var(--ne-line); display: flex; flex-direction: column; gap: 2px; box-sizing: border-box; }
.lgl .lgl-toc__label { margin: 4px 10px 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ne-muted); }
.lgl-toc__list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.lgl-toc__link { display: flex; gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 14px; line-height: 1.4; text-decoration: none; color: var(--ne-ink-2) !important; font-weight: 400; transition: background 0.12s ease; }
.lgl-toc__link:hover { background: var(--ne-chip); }
.lgl-toc__link.is-active { background: var(--ne-bg); color: var(--ne-ink) !important; font-weight: 600; }
.lgl-toc__n { width: 22px; flex: none; font-family: var(--ne-font-mono); font-size: 12px; line-height: 1.65; color: var(--ne-muted); }

.lgl-article { flex: 3 1 520px; min-width: 0; padding: 36px; border-radius: 26px; background: #FFFFFF; border: 1px solid var(--ne-line); display: flex; flex-direction: column; gap: 26px; font-size: 16px; line-height: 1.8; color: var(--ne-ink-2); box-sizing: border-box; overflow-wrap: anywhere; }
.lgl-section { display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 24px; }
.lgl .lgl-section__title { font-family: var(--ne-font-display); font-size: 24px; font-weight: 600; line-height: 1.3; color: var(--ne-ink); }
.lgl .lgl-section p { line-height: 1.8; }
.lgl .lgl-section__list { list-style: disc; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 6px; }
.lgl-section__list li::marker { color: var(--ne-accent); }
.lgl-callout { padding: 18px 20px; border-radius: 18px; background: var(--ne-accent-tint); color: var(--ne-accent-deep); font-size: 15px; line-height: 1.7; }
.lgl-callout a { color: var(--ne-accent-deep) !important; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.lgl-callout__addr { display: block; font-size: 14px; color: var(--ne-accent-ink); }

/* Sticky TOC on wide screens */
@media (min-width: 900px) {
  .lgl-toc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
}

@media (max-width: 767.98px) {
  .lgl-wrap { padding: 0 16px; }
  .lgl-main { padding-top: 28px; padding-bottom: 56px; gap: 22px; }
  .lgl-bar { justify-content: flex-start; margin-bottom: -8px; }
  .lgl-hero { padding: 24px; border-radius: 24px; }
  .lgl .lgl-hero__title { font-size: 34px; }
  .lgl-article { padding: 22px; border-radius: 22px; gap: 22px; font-size: 15px; }
  .lgl .lgl-section__title { font-size: 20px; }
}
