/* Legal pages (/security, /privacy): fact grid, section index, reading rhythm.
   Plain CSS on purpose: the Tailwind bundle is precompiled, so new utilities would not exist. */

.lg-main { max-width: 56rem; }

/* At a glance */
.lg-facts {
  list-style: none;
  margin: 0 0 3rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.lg-fact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #1e293b;
  border-radius: 12px;
  background: #0f172a;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.lg-fact svg {
  width: 24px;
  height: 24px;
  flex: none;
  color: #0ea5e9;
}

/* Two-column layout: index + prose */
.lg-layout { display: block; }
.lg-body { min-width: 0; }

.lg-toc { display: none; }

.lg-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.lg-toc-list a {
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-left: 2px solid #1e293b;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}
.lg-toc-list a[aria-current="true"] {
  border-left-color: #0ea5e9;
  color: #f1f5f9;
  font-weight: 500;
}
.lg-toc-title {
  margin: 0 0 12px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* Mobile "On this page" */
.lg-toc-mobile {
  margin: 0 0 24px;
  border: 1px solid #1e293b;
  border-radius: 12px;
  background: #0f172a;
}
.lg-toc-mobile summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 16px;
  color: #f1f5f9;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}
.lg-toc-mobile summary::-webkit-details-marker { display: none; }
.lg-toc-mobile summary svg {
  width: 18px;
  height: 18px;
  color: #94a3b8;
}
.lg-toc-mobile[open] summary svg { transform: rotate(180deg); }
.lg-toc-mobile .lg-toc-list { padding: 0 16px 16px; }
.lg-toc-mobile .lg-toc-list a { min-height: 44px; }

/* Reading rhythm */
.lg-prose {
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.7;
}
.lg-prose p,
.lg-prose li { max-width: 68ch; }
.lg-prose p { color: #cbd5e1; }
.lg-prose tbody { color: #cbd5e1; }
.lg-prose > section { scroll-margin-top: 88px; }

.lg-h {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 48px 0 16px;
}
.lg-h h2 {
  margin: 0;
  color: #f1f5f9;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}
.lg-anchor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  min-height: 24px;
  border-radius: 6px;
  color: #38bdf8;
  font-size: 18px;
  font-weight: 500;
  text-decoration: none;
  opacity: 0;
}
.lg-h:focus-within .lg-anchor,
.lg-anchor:focus-visible { opacity: 1; }
@media (hover: hover) and (pointer: fine) {
  .lg-h:hover .lg-anchor { opacity: 1; }
  .lg-toc-list a:hover { color: #f1f5f9; }
}

.lg-toc-list a:focus-visible,
.lg-anchor:focus-visible,
.lg-toc-mobile summary:focus-visible {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: no-preference) {
  .lg-anchor { transition: opacity 150ms ease-out; }
  .lg-toc-list a { transition: color 150ms ease-out, border-color 150ms ease-out; }
  .lg-toc-mobile summary svg { transition: transform 150ms ease-out; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
}

@media (min-width: 1024px) {
  .lg-main { max-width: 72rem; }
  .lg-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lg-layout {
    display: grid;
    grid-template-columns: 13rem minmax(0, 1fr);
    gap: 48px;
    align-items: start;
  }
  .lg-toc {
    display: block;
    position: sticky;
    top: 88px;
    max-height: calc(100vh - 112px);
    overflow-y: auto;
    padding-top: 48px;
  }
  .lg-toc-mobile { display: none; }
}
