/* Legal pages (terms-of-use.html, privacy-policy.html) — ticket #231. Prefix: lg- */

.lg-skip {
  position: absolute; left: -9999px; top: 0; z-index: 1000;
  background: #034ea2; color: #fff; padding: 0.7rem 1rem;
  font-family: 'Montserrat', sans-serif; font-size: 0.85rem; font-weight: 600;
}
.lg-skip:focus { left: 1rem; top: 1rem; }

.lg-page { background: #fff; }

/* ── Hero ─────────────────────────────────────────────────────── */
.lg-hero {
  background: linear-gradient(180deg, #eef9fb 0%, #ffffff 100%);
  border-bottom: 1px solid #dbe5ea;
  padding: 2.6rem 2rem 2rem;
}
.lg-hero-inner { max-width: 1160px; margin: 0 auto; }
.lg-breadcrumb { font-family: 'Montserrat', sans-serif; font-size: 0.8rem; color: #6b8590; margin: 0 0 1.4rem; }
.lg-breadcrumb a { color: #034ea2; text-decoration: none; }
.lg-breadcrumb a:hover { text-decoration: underline; }
.lg-breadcrumb [aria-current] { color: #43606b; }
.lg-eyebrow {
  font-family: 'Montserrat', sans-serif; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: #0891a6; margin: 0 0 0.5rem;
}
.lg-hero h1 {
  font-family: 'Source Serif 4', Georgia, serif; font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 2.8rem); line-height: 1.15; color: #1a3238; margin: 0 0 0.7rem;
}
.lg-meta { font-family: 'Montserrat', sans-serif; font-size: 0.9rem; color: #43606b; margin: 0 0 1.4rem; }
.lg-meta strong { color: #1a3238; }

.lg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.8rem 1.2rem; }
.lg-switch {
  display: inline-flex; border: 1px solid #b9d9e1; border-radius: 999px; padding: 3px; background: #fff;
}
.lg-switch a {
  font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  color: #034ea2; text-decoration: none; padding: 0.5rem 1.1rem; border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.lg-switch a:hover { background: #eef9fb; }
.lg-switch a[aria-current="page"] { background: linear-gradient(135deg, #1ca6c0 0%, #0891a6 100%); color: #fff; }
.lg-print {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-family: 'Montserrat', sans-serif; font-size: 0.8rem; font-weight: 600; color: #034ea2;
  background: none; border: 1px solid transparent; border-radius: 6px; padding: 0.45rem 0.7rem; cursor: pointer;
}
.lg-print:hover { border-color: #b9d9e1; background: #fff; }
.lg-print svg { width: 16px; height: 16px; }

/* ── Layout ───────────────────────────────────────────────────── */
.lg-layout {
  max-width: 1160px; margin: 0 auto; padding: 2.4rem 2rem 4rem;
  display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 3.5rem; align-items: start;
}

/* ── Table of contents ────────────────────────────────────────── */
.lg-toc { position: sticky; top: 96px; max-height: calc(100vh - 116px); overflow-y: auto; font-family: 'Montserrat', sans-serif; }
.lg-toc details { border: 0; }
.lg-toc summary {
  list-style: none; cursor: default;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: #5b7480;
  padding: 0 0 0.7rem;
}
.lg-toc summary::-webkit-details-marker { display: none; }
.lg-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid #e3ecef; counter-reset: none; }
.lg-toc li { margin: 0; }
.lg-toc a {
  display: flex; gap: 0.55rem; padding: 0.38rem 0 0.38rem 0.9rem; margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 0.82rem; line-height: 1.4; color: #43606b; text-decoration: none;
}
.lg-toc a span { color: #8aa3ad; min-width: 1.4rem; font-variant-numeric: tabular-nums; }
.lg-toc a:hover { color: #034ea2; }
.lg-toc a.is-active { color: #034ea2; font-weight: 600; border-left-color: #1ca6c0; }
.lg-toc a.is-active span { color: #1ca6c0; }

/* ── Document body ────────────────────────────────────────────── */
.lg-doc { max-width: 46rem; }
.lg-doc section { scroll-margin-top: 100px; padding-bottom: 0.4rem; }
.lg-doc section + section { border-top: 1px solid #edf2f4; padding-top: 0.6rem; }
.lg-doc h2 {
  font-family: 'Montserrat', sans-serif; font-size: 1.2rem; font-weight: 700; line-height: 1.35;
  color: #034ea2; margin: 1.6rem 0 0.9rem; display: flex; gap: 0.6rem; align-items: baseline;
}
.lg-doc h2 .lg-num { color: #1ca6c0; font-variant-numeric: tabular-nums; min-width: 1.8rem; }
.lg-doc h2 a.lg-anchor {
  margin-left: 0.2rem; color: #b9d9e1; text-decoration: none; font-weight: 400; opacity: 0; transition: opacity 0.15s;
}
.lg-doc h2:hover a.lg-anchor, .lg-doc h2 a.lg-anchor:focus { opacity: 1; }
.lg-doc h3 {
  font-family: 'Montserrat', sans-serif; font-size: 1rem; font-weight: 700; color: #1a3238;
  margin: 1.6rem 0 0.6rem; scroll-margin-top: 100px;
}
.lg-doc h4 {
  font-family: 'Montserrat', sans-serif; font-size: 0.92rem; font-weight: 700; color: #0891a6;
  letter-spacing: 0.02em; margin: 1.4rem 0 0.5rem; scroll-margin-top: 100px;
}
.lg-doc h3 .lg-num { color: #1ca6c0; margin-right: 0.45rem; }
.lg-doc p, .lg-doc li {
  font-family: 'Source Serif 4', Georgia, serif; font-size: 1.06rem; line-height: 1.75; color: #1a3238;
}
.lg-doc p { margin: 0 0 1.1rem; }
.lg-doc ul { margin: 0 0 1.2rem; padding-left: 1.4rem; }
.lg-doc ul ul { margin: 0.4rem 0 0.2rem; list-style: circle; }
.lg-doc li { margin-bottom: 0.45rem; padding-left: 0.2rem; }
.lg-doc li::marker { color: #1ca6c0; }
.lg-doc dfn { font-style: normal; font-weight: 700; }
.lg-doc strong { font-weight: 700; }
.lg-doc a { color: #034ea2; text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.lg-doc a:hover { color: #0891a6; }
.lg-doc a:focus-visible, .lg-toc a:focus-visible, .lg-switch a:focus-visible, .lg-print:focus-visible {
  outline: 2px solid #1ca6c0; outline-offset: 2px;
}
.lg-caps {
  font-family: 'Montserrat', sans-serif !important; font-size: 0.88rem !important; line-height: 1.7 !important;
  font-weight: 600; letter-spacing: 0.01em; color: #1a3238;
  background: #f4f7f9; border-left: 3px solid #1ca6c0; border-radius: 0 6px 6px 0; padding: 0.9rem 1.1rem;
}
.lg-contact { list-style: none; padding-left: 0 !important; }
.lg-contact li { padding-left: 0; }
.lg-end {
  margin-top: 2.6rem; padding-top: 1.2rem; border-top: 1px solid #dbe5ea;
  font-family: 'Montserrat', sans-serif; font-size: 0.85rem; color: #5b7480;
}
.lg-end a { color: #034ea2; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 999px) {
  .lg-layout { grid-template-columns: 1fr; gap: 1.4rem; padding-top: 1.4rem; }
  .lg-toc { position: static; max-height: none; overflow: visible; }
  .lg-toc details { border: 1px solid #dbe5ea; border-radius: 10px; background: #f9fbfc; }
  .lg-toc summary {
    cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    padding: 0.9rem 1.1rem; font-size: 0.75rem;
  }
  .lg-toc summary::after { content: '+'; font-size: 1.2rem; font-weight: 400; color: #1ca6c0; letter-spacing: 0; }
  .lg-toc details[open] summary::after { content: '\2212'; }
  .lg-toc ol { border-left: 0; padding: 0 1.1rem 0.9rem; }
  .lg-toc a { padding-left: 0; border-left: 0; }
  .lg-doc { max-width: none; }
}
@media (max-width: 600px) {
  .lg-hero { padding: 1.8rem 1.2rem 1.4rem; }
  .lg-layout { padding: 1.2rem 1.2rem 3rem; }
  .lg-doc p, .lg-doc li { font-size: 1.02rem; }
  .lg-switch a { padding: 0.45rem 0.85rem; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ── Print ────────────────────────────────────────────────────── */
@media print {
  .lp-top-bar, .lp-header, .lp-footer, .lg-toc, .lg-actions, .lg-breadcrumb, .lg-skip, .lg-anchor { display: none !important; }
  .lg-hero { background: none; border: 0; padding: 0 0 1rem; }
  .lg-layout { display: block; padding: 0; max-width: none; }
  .lg-doc { max-width: none; }
  .lg-doc p, .lg-doc li { font-size: 10.5pt; line-height: 1.5; color: #000; }
  .lg-doc h2 { color: #000; break-after: avoid; }
  .lg-doc h3 { break-after: avoid; }
  .lg-caps { background: none; border-left: 2px solid #000; }
  .lg-doc a { color: #000; text-decoration: none; }
  .lg-doc a[href^="http"]:not(.lg-url)::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
