/*
 * Single Document Template — scoped styles
 * Source: design system at single-document-template/project/Privacy Policy.dc.html
 *
 * All rules are scoped under `.ldoc` to override Elementor / theme typography
 * without leaking into the rest of the site. Non-coders editing per-site
 * accents change ONE place: the CSS variables in `.ldoc` below.
 *
 * Themable per site:
 *   --accent       brand accent color (button, icons, active TOC marker, list markers)
 *   --lh           body line-height (1.75 comfortable, 1.6 compact)
 *   --sec-gap      space between major sections (46px comfortable, 32px compact)
 *
 * The neutral palette (--ink, --head, --muted, --faint, --rule, --panel) is
 * fixed by the design system and not intended for per-site changes.
 */

/* ===== Scope reset ===== */
.ldoc, .ldoc * { box-sizing: border-box; }

.ldoc {
  --accent: #3A3A3A;
  --lh: 1.75;
  --sec-gap: 32px;
  --measure: 70ch;
  --base: 16px;
  --sticky-top: 28px;
  --anchor: 28px;

  --ink: #232323;
  --head: #141414;
  --muted: #6A6A6A;
  --faint: #8A8A8A;
  --rule: #E6E6E6;
  --rule-soft: #EFEFEF;
  --panel: #FAFAFA;

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  color: var(--ink);
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  width: 100%;
}
.ldoc ::selection { background: color-mix(in srgb, var(--accent) 18%, transparent); }

/* ===== Three-column grid ===== */
.ldoc-grid {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr) 260px;
  gap: 56px;
  align-items: start;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ===== Body content (element-level styling so non-designers just edit plain HTML) ===== */
.doc-body { max-width: var(--measure); }
.doc-body > *:first-child { margin-top: 0; }

.doc-body p { margin: 0 0 1.05em; font-size: var(--base); line-height: var(--lh); color: var(--ink); }
.doc-body strong, .doc-body b { color: var(--head); font-weight: 600; }
.doc-body em, .doc-body i { font-style: italic; }

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

.doc-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: var(--head);
  margin: var(--sec-gap) 0 0.7em;
  padding-top: var(--sec-gap);
  border-top: 1px solid var(--rule);
  scroll-margin-top: var(--anchor);
}
.doc-body h2:first-of-type { margin-top: 22px; padding-top: 20px; }

.doc-body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--head);
  margin: 1.8em 0 0.5em;
  scroll-margin-top: var(--anchor);
}
.doc-body h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--head);
  margin: 1.5em 0 0.4em;
}

.doc-body ul, .doc-body ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.doc-body li { font-size: var(--base); line-height: var(--lh); color: var(--ink); margin-bottom: 0.45em; padding-left: 0.2em; }
.doc-body li::marker { color: var(--accent); }
.doc-body li > ul, .doc-body li > ol { margin: 0.45em 0 0.2em; }

.doc-body blockquote {
  margin: 1.4em 0;
  padding: 4px 0 4px 20px;
  border-left: 3px solid var(--accent);
  color: #4A4A4A;
}
.doc-body blockquote p { color: #4A4A4A; }

.doc-body hr { border: 0; border-top: 1px solid var(--rule); margin: var(--sec-gap) 0; }

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4em;
  font-size: 0.875em;
}
.doc-body th, .doc-body td {
  border: 1px solid var(--rule);
  padding: 7px 11px;
  text-align: left;
  line-height: 1.45;
  vertical-align: top;
}
.doc-body th { background: var(--panel); font-weight: 600; color: var(--head); }

.doc-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: #F2F2F2;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.88em;
}

/* ===== Table of contents (left rail) ===== */
.toc-rail { display: flex; flex-direction: column; border-left: 1px solid var(--rule); }
.ldoc [data-toc-link] {
  display: block;
  font-size: 13.5px;
  line-height: 1.4;
  color: #5A5A5A;
  text-decoration: none;
  padding: 7px 0 7px 16px;
  margin-left: -1px;
  border-left: 2px solid transparent;
}
.ldoc [data-toc-link]:hover { color: var(--head); }
.ldoc [data-toc-link][aria-current="true"] { color: var(--accent); font-weight: 600; border-left-color: var(--accent); }

/* ===== Focus visibility ===== */
.ldoc a:focus-visible,
.ldoc button:focus-visible,
.ldoc [data-toc-link]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== Skip link ===== */
.ldoc .skip-link {
  position: absolute;
  left: 12px;
  top: -200px;
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  z-index: 100;
  transition: top 0.15s ease;
}
.ldoc .skip-link:focus { top: 12px; }

/* ===== Common bits ===== */
.ldoc .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: #555555; }

/* Mobile "On this page" disclosure — hidden on desktop */
.ldoc .toc-mobile { display: none; }

/* ===== Responsive ===== */
@media (max-width: 1080px) {
  .ldoc-grid { grid-template-columns: 220px minmax(0, 1fr); gap: 44px; }
  .ldoc-aside-right { display: none; }
}
@media (max-width: 800px) {
  .ldoc-grid { grid-template-columns: 1fr; gap: 0; }
  .ldoc-aside-left { display: none; }
  .ldoc .toc-mobile { display: block; }
  .doc-body { max-width: 100%; }
}

/* Smooth anchor jumps unless the reader prefers reduced motion */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ===== Print ===== */
@media print {
  .ldoc-aside-left, .ldoc-aside-right, .ldoc-progress, .toc-mobile { display: none !important; }
  .ldoc-grid { display: block; }
  .doc-body { max-width: 100%; }
  .doc-body h2 { break-after: avoid; }
  .doc-body a { color: #000; text-decoration: underline; }
}
