/* ==========================================================================
   legal.css — page-scoped styles shared by /privacy/, /terms/, /license/,
   and /license/all-rights-reserved/.
   Loaded on top of design-tokens.css.
   Namespace: .l-*
   ========================================================================== */

.l-page {
  padding: clamp(64px, 9vw, 128px) 0;
  background: var(--bg);
}

.l-page__inner {
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: clamp(20px, 5vw, 32px);
}

/* ─── Head (eyebrow + h1 + effective date / dek) ─────────────────────────── */

.l-head {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 64px);
  max-width: 720px;
  margin-inline: auto;
}

.l-eyebrow {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 14px;
}

.l-h1 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  color: var(--blue-900);
  margin: 0 0 14px;
}

.l-effective {
  font-family: 'Source Sans 3', sans-serif;
  font-style: italic;
  font-size: 14px;
  color: var(--text-500);
  margin: 0;
}

.l-dek {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.55;
  color: var(--text-500);
  margin: 0 auto;
  max-width: 600px;
}

/* ─── Layout (TOC + prose) ───────────────────────────────────────────────── */

.l-layout {
  display: block;
}

@media (min-width: 1024px) {
  .l-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 48px;
    align-items: start;
  }
}

/* ─── TOC (desktop sidebar) ──────────────────────────────────────────────── */

.l-toc {
  display: none;
}

@media (min-width: 1024px) {
  .l-toc:not(.l-toc--inline) {
    display: block;
    position: sticky;
    top: 32px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }
}

.l-toc__heading {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-500);
  margin: 0 0 12px;
}

.l-toc__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.l-toc__link {
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-700);
  text-decoration: none;
  transition: color 150ms ease;
  padding-left: 0;
  border-left: 2px solid transparent;
  margin-left: -16px;
  padding-left: 14px;
}

.l-toc__link:hover {
  color: var(--gold);
  text-decoration: none;
}

.l-toc__link--active {
  color: var(--gold);
  font-weight: 600;
  border-left-color: var(--gold);
}

/* ─── TOC (mobile inline collapsible) ────────────────────────────────────── */

.l-toc--inline {
  display: block;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 32px;
}

@media (min-width: 1024px) {
  .l-toc--inline {
    display: none;
  }
}

.l-toc--inline > summary {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-700);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.l-toc--inline > summary::-webkit-details-marker {
  display: none;
}

.l-toc--inline > summary::after {
  content: '\f078'; /* fa-chevron-down */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 11px;
  color: var(--text-500);
  transition: transform 200ms ease;
}

.l-toc--inline[open] > summary::after {
  transform: rotate(180deg);
}

.l-toc--inline .l-toc__list {
  margin-top: 14px;
}

.l-toc--inline .l-toc__link {
  margin-left: 0;
  padding-left: 0;
  border-left: none;
}

/* ─── Prose ──────────────────────────────────────────────────────────────── */

.l-prose {
  max-width: 70ch;
  font-family: 'Source Sans 3', sans-serif;
  color: var(--text-700);
  font-size: 17px;
  line-height: 1.65;
}

.l-prose > :first-child {
  margin-top: 0;
}

.l-prose h2 {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--blue-900);
  margin: 56px 0 14px;
  position: relative;
  scroll-margin-top: 24px;
}

.l-prose h2:first-of-type {
  margin-top: 40px;
}

.l-prose h3 {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--blue-900);
  margin: 28px 0 8px;
  scroll-margin-top: 24px;
}

.l-prose p {
  margin: 0 0 16px;
}

.l-prose ul,
.l-prose ol {
  margin: 0 0 18px;
  padding-left: 22px;
}

.l-prose li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.l-prose ul ul,
.l-prose ul ol {
  margin-top: 8px;
  margin-bottom: 4px;
}

.l-prose strong {
  font-weight: 600;
  color: var(--text-700);
}

.l-prose a {
  color: var(--blue-900);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color 150ms ease;
}

.l-prose a:hover {
  color: var(--gold);
}

.l-prose em {
  font-style: italic;
}

/* ─── Anchor links on H2 ─────────────────────────────────────────────────── */

.l-anchor {
  display: inline-block;
  margin-left: 10px;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  color: var(--gold);
  text-decoration: none;
  opacity: 0;
  transition: opacity 150ms ease;
}

.l-prose h2:hover .l-anchor,
.l-anchor:focus-visible {
  opacity: 1;
  outline: none;
}

.l-anchor:hover {
  text-decoration: underline;
}

/* ─── License hub grid ───────────────────────────────────────────────────── */

.l-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.l-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 200ms ease, transform 200ms ease;
}

.l-card:hover {
  border-color: var(--gold);
  transform: translateY(-1px);
}

.l-card__name {
  font-family: 'Lora', Georgia, serif;
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--blue-900);
  margin: 0 0 8px;
}

.l-card__desc {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-700);
  margin: 0 0 16px;
}

.l-card__link {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 200ms ease;
}

.l-card__link:hover {
  text-decoration: underline;
  color: var(--gold);
  gap: 10px;
}

/* ─── License hub footer note ────────────────────────────────────────────── */

.l-footnote {
  text-align: center;
  font-family: 'Source Sans 3', sans-serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-500);
  margin: 40px auto 0;
  max-width: 600px;
}

.l-footnote a {
  color: var(--blue-900);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
}

.l-footnote a:hover {
  color: var(--gold);
}

/* ─── Print ──────────────────────────────────────────────────────────────── */

@media print {
  .l-toc,
  .l-toc--inline {
    display: none !important;
  }

  .l-page {
    padding: 0;
  }

  .l-layout {
    display: block;
  }

  .l-prose {
    max-width: 100%;
    font-size: 11pt;
    color: #000;
  }

  .l-prose h2,
  .l-prose h3 {
    page-break-after: avoid;
    page-break-inside: avoid;
    color: #000;
  }

  .l-prose h2 + p,
  .l-prose h3 + p {
    page-break-before: avoid;
  }

  .l-anchor {
    display: none;
  }
}
