/* ==========================================================================
   SOURCING — Legal & Trust pages (additive; uses existing theme tokens only)
   Loaded only by the legal/security views. Does not modify style.css.
   ========================================================================== */

.lg-hero {
  padding: clamp(48px, 6vw, 84px) 0 clamp(32px, 4vw, 52px);
  background: radial-gradient(circle at 85% 0%, var(--teal-light) 0%, transparent 55%);
  border-bottom: 1px solid var(--border-color);
}
.lg-crumbs { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 20px; }
.lg-crumbs a { color: var(--text-body); text-decoration: none; }
.lg-crumbs a:hover { color: var(--teal-dark); }
.lg-hero h1 { max-width: 26ch; margin-bottom: 16px; }
.lg-lead { max-width: 68ch; font-size: 1.12rem; line-height: 1.7; margin-bottom: 26px; }
.lg-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lg-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 99px;
  background: var(--bg-card); border: 1px solid var(--border-color);
  font-size: 0.8rem; color: var(--text-body); line-height: 1;
}
.lg-chip strong { color: var(--text-main); font-weight: 650; }
.lg-chip svg { color: var(--teal-primary); flex: none; }
.lg-print {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--border-color); color: var(--text-main);
  padding: 7px 14px; border-radius: var(--radius-sm); font: 600 0.8rem var(--font-sans); cursor: pointer;
  transition: all 0.2s ease;
}
.lg-print:hover { background: var(--bg-panel); border-color: var(--text-muted); }

/* Layout */
.lg-body { padding: clamp(32px, 4vw, 56px) 0 clamp(64px, 7vw, 96px); }
.lg-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }

/* Sticky table of contents */
.lg-toc { position: sticky; top: 92px; }
.lg-toc-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.lg-toc ol { list-style: none; counter-reset: toc; border-left: 1px solid var(--border-color); }
.lg-toc li { counter-increment: toc; }
.lg-toc a {
  display: flex; gap: 10px; padding: 7px 0 7px 16px; margin-left: -1px;
  border-left: 2px solid transparent; font-size: 0.86rem; line-height: 1.4;
  color: var(--text-body); text-decoration: none; transition: color 0.15s ease, border-color 0.15s ease;
}
.lg-toc a::before { content: counter(toc, decimal-leading-zero); font-size: 0.72rem; font-weight: 700; color: var(--text-muted); padding-top: 2px; font-variant-numeric: tabular-nums; }
.lg-toc a:hover { color: var(--text-main); }
.lg-toc a.is-active { color: var(--teal-dark); border-left-color: var(--teal-primary); font-weight: 600; }
[data-theme="dark"] .lg-toc a.is-active { color: var(--teal-primary); }
.lg-toc a.is-active::before { color: var(--teal-primary); }

/* Article */
.lg-article { min-width: 0; max-width: 820px; }
.lg-intro { font-size: 1.02rem; line-height: 1.8; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--border-color); }

.lg-glance {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  padding: 22px 24px; margin: 0 0 36px; box-shadow: var(--shadow-sm);
}
.lg-glance h2 { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal-dark); margin: 0 0 14px; font-weight: 700; }
[data-theme="dark"] .lg-glance h2 { color: var(--teal-primary); }
.lg-glance ul { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.lg-glance li { position: relative; padding-left: 26px; font-size: 0.9rem; line-height: 1.55; color: var(--text-body); }
.lg-glance li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--teal-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2300A699' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 10px no-repeat;
  border: 1px solid var(--teal-border);
}

.lg-sections { counter-reset: lgsec; }
.lg-section { counter-increment: lgsec; scroll-margin-top: 96px; padding: 30px 0; border-bottom: 1px solid var(--border-color); }
.lg-section:last-child { border-bottom: 0; }
.lg-section > h2 {
  display: flex; align-items: baseline; gap: 14px;
  font-size: clamp(1.2rem, 2vw, 1.5rem); margin: 0 0 14px; position: relative;
}
.lg-section > h2::before {
  content: counter(lgsec, decimal-leading-zero);
  font-size: 0.78rem; font-weight: 700; color: var(--teal-dark); background: var(--teal-light);
  border: 1px solid var(--teal-border); border-radius: 6px; padding: 3px 8px; letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums; transform: translateY(-2px);
}
[data-theme="dark"] .lg-section > h2::before { color: var(--teal-primary); }
.lg-anchor { opacity: 0; margin-left: 4px; color: var(--text-muted); text-decoration: none; font-weight: 500; transition: opacity 0.15s ease; }
.lg-section > h2:hover .lg-anchor, .lg-anchor:focus-visible { opacity: 1; }
.lg-section p, .lg-section li { font-size: 0.96rem; line-height: 1.8; color: var(--text-body); }
.lg-section p { margin-bottom: 14px; max-width: 74ch; }
.lg-section p:last-child { margin-bottom: 0; }
.lg-section ul { list-style: none; margin: 4px 0 8px; display: grid; gap: 10px; }
.lg-section ul li { position: relative; padding-left: 22px; max-width: 74ch; }
.lg-section ul li::before { content: ""; position: absolute; left: 4px; top: 0.72em; width: 6px; height: 6px; border-radius: 50%; background: var(--teal-primary); }
.lg-section a, .lg-end a.lg-inline { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--teal-border); }
.lg-section a:hover { text-decoration-color: currentColor; }
[data-theme="dark"] .lg-section a { color: var(--teal-primary); }

/* Cards (security page) */
.lg-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 36px; }
.lg-card {
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg);
  padding: 22px; box-shadow: var(--shadow-sm); transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.lg-card:hover { border-color: var(--teal-border); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.lg-card-icon {
  width: 40px; height: 40px; border-radius: var(--radius-md); display: grid; place-items: center;
  background: var(--teal-light); color: var(--teal-primary); border: 1px solid var(--teal-border); margin-bottom: 14px;
}
.lg-card h3 { font-size: 1.02rem; margin: 0 0 6px; }
.lg-card p { font-size: 0.9rem; line-height: 1.65; margin: 0; }

/* Callout */
.lg-callout {
  display: flex; gap: 14px; margin: 0 0 36px; padding: 16px 18px;
  background: var(--teal-light); border: 1px solid var(--teal-border); border-radius: var(--radius-md);
}
.lg-callout svg { flex: none; color: var(--teal-primary); margin-top: 2px; }
.lg-callout p { margin: 0; font-size: 0.9rem; line-height: 1.65; color: var(--text-main); }

/* End-of-document block */
.lg-end { margin-top: 40px; display: grid; gap: 20px; }
.lg-contact {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  padding: 24px 26px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.lg-contact h3 { margin: 0 0 4px; font-size: 1.05rem; }
.lg-contact p { margin: 0; font-size: 0.9rem; max-width: 56ch; }
.lg-related-title { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.lg-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.lg-related a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border: 1px solid var(--border-color); border-radius: var(--radius-md);
  background: var(--bg-card); color: var(--text-main); font-size: 0.86rem; font-weight: 600; text-decoration: none;
  transition: all 0.2s ease;
}
.lg-related a span { color: var(--text-muted); transition: transform 0.2s ease, color 0.2s ease; }
.lg-related a:hover { border-color: var(--teal-border); background: var(--teal-light); }
.lg-related a:hover span { color: var(--teal-primary); transform: translateX(3px); }
.lg-related a[aria-current="page"] { border-color: var(--teal-primary); background: var(--teal-light); color: var(--teal-dark); }
[data-theme="dark"] .lg-related a[aria-current="page"] { color: var(--teal-primary); }

/* Responsive */
@media (max-width: 960px) {
  .lg-layout { grid-template-columns: 1fr; gap: 24px; }
  .lg-toc { position: static; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 4px 16px; }
  .lg-toc summary { cursor: pointer; padding: 12px 0; font-size: 0.86rem; font-weight: 650; color: var(--text-main); list-style: none; display: flex; justify-content: space-between; }
  .lg-toc summary::after { content: "+"; color: var(--text-muted); }
  .lg-toc[open] summary::after { content: "–"; }
  .lg-toc summary::-webkit-details-marker { display: none; }
  .lg-toc .lg-toc-title { display: none; }
  .lg-toc ol { margin-bottom: 12px; }
}
@media (max-width: 650px) {
  .lg-glance ul, .lg-cards { grid-template-columns: 1fr; }
  .lg-print { margin-left: 0; }
  .lg-section > h2 { gap: 10px; }
}
@media (min-width: 961px) { .lg-toc summary { display: none; } }

/* Print */
@media print {
  .site-header, .site-footer, .lg-toc, .lg-print, .lg-end, .scroll-progress-track, .scroll-top-btn,
  .floating-contact-btn, .cookie-banner, .lg-anchor { display: none !important; }
  .lg-hero { background: none; padding: 0 0 16px; }
  .lg-layout { display: block; }
  .lg-section { break-inside: avoid-page; padding: 16px 0; }
  body { background: #fff; color: #000; }
}
@media (prefers-reduced-motion: reduce) { .lg-card, .lg-related a, .lg-related a span { transition: none; } .lg-card:hover { transform: none; } }
