/* ─────────────────────────────────────────────────────
   OSUS — Shared legal-page layout (Terms / Privacy / Agreement)
   ONE unified design system for all three pages, using the COMPLETE
   OSUS palette together (no per-page accent):
     Navy #0F2837  = dominant structural color (titles, TOC heading, buttons)
     Sage #91B9B4  = soft surfaces / backgrounds / borders / dividers
     Orange #FF9619= controlled accents (active TOC, link hover, indicators)
     Burgundy #6E1946 = controlled accents (clause numbers, notice edge, focus)
   Content is never modified — visual identity only.
   ───────────────────────────────────────────────────── */

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.lgl {
  --nv: #0F2837;   /* navy    */
  --sg: #91B9B4;   /* sage    */
  --or: #FF9619;   /* orange  */
  --bu: #6E1946;   /* burgundy*/
  --lgl-idline: linear-gradient(90deg, #0F2837 0%, #91B9B4 34%, #FF9619 66%, #6E1946 100%);
  --lgl-max: 1160px;
  display: block;
  /* Sage-dominant soft surface, with faint orange + burgundy hints (never saturated) */
  background:
    radial-gradient(ellipse 62% 42% at 100% 0%, rgba(145,185,180,0.20), transparent 60%),
    radial-gradient(circle at 2% 6%, rgba(255,150,25,0.06), transparent 34%),
    radial-gradient(circle at 14% 26%, rgba(110,25,70,0.05), transparent 32%),
    var(--warm-100, #f8f6f3);
  padding-top: var(--header-height, 72px);   /* clear the fixed global header */
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

/* ── Hero (compact, complete identity) ── */
.lgl-hero { padding-top: clamp(1.5rem, 3.5vw, 2.75rem); }
.lgl-hero__inner { max-width: var(--lgl-max); margin-inline: auto; padding-inline: clamp(1.15rem, 4vw, 2.5rem); }
.lgl-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-size: 0.82rem; margin-bottom: clamp(1.1rem, 2.5vw, 1.6rem); }
.lgl-breadcrumb a { color: #6a7c86; text-decoration: none; transition: color .18s; border-radius: 4px; }
.lgl-breadcrumb a:hover { color: var(--nv); }
.lgl-breadcrumb a:focus-visible { outline: 2px solid var(--or); outline-offset: 3px; }
.lgl-breadcrumb__sep { color: #b3bec4; }
.lgl-breadcrumb [aria-current="page"] { color: var(--nv); font-weight: 700; }

.lgl-eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.06em;
  color: var(--nv); background: rgba(145,185,180,0.18);
  border: 1px solid rgba(145,185,180,0.55);
  border-radius: 999px; padding: 0.32rem 0.85rem; margin-bottom: 1rem;
}
.lgl-eyebrow::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--or); } /* orange dot */

.lgl-title {
  font-size: clamp(1.9rem, 4.6vw, 2.9rem); font-weight: 900; line-height: 1.2;
  color: var(--nv); letter-spacing: -0.01em; margin: 0 0 0.9rem;
}
/* Signature OSUS identity line — carries all four colours */
.lgl-title::after { content: ''; display: block; width: 68px; height: 4px; border-radius: 4px; margin-top: 0.85rem; background: var(--lgl-idline); }

.lgl-lead { max-width: 62ch; font-size: 1.02rem; line-height: 1.9; color: #4a6070; margin: 0 0 1.4rem; }

.lgl-meta {
  display: inline-flex; align-items: center; gap: 0.55rem; flex-wrap: wrap;
  font-size: 0.8rem; background: rgba(255,255,255,0.75); border: 1px solid rgba(145,185,180,0.5);
  border-radius: 999px; padding: 0.4rem 0.9rem;
}
.lgl-meta::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--bu); } /* burgundy marker */
.lgl-meta__label { color: #77878f; font-weight: 600; }
.lgl-meta__label::after { content: ':'; margin-inline-start: 1px; }
.lgl-meta__value { color: var(--nv); font-weight: 800; }

/* ── Body: TOC + document ── */
.lgl-body {
  max-width: var(--lgl-max); margin-inline: auto; padding-inline: clamp(1.15rem, 4vw, 2.5rem);
  margin-top: clamp(1.75rem, 3.5vw, 2.75rem);
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(1.5rem, 3vw, 3rem);
  align-items: start;
}

/* Table of contents — sage surface, navy text, orange active, burgundy detail */
.lgl-toc {
  position: sticky; top: calc(var(--header-height, 72px) + 1rem);
  background: rgba(145,185,180,0.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(145,185,180,0.45); border-radius: 18px; padding: 0.4rem 0.5rem; overflow: hidden;
}
.lgl-toc::before { content: ''; display: block; height: 3px; border-radius: 3px; margin: 0.4rem 0.6rem 0.2rem; background: var(--lgl-idline); }
.lgl-toc__head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  list-style: none; cursor: default; padding: 0.6rem 0.65rem 0.5rem;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; color: var(--nv); text-transform: uppercase;
}
.lgl-toc__head::-webkit-details-marker { display: none; }
.lgl-toc__chev { width: 16px; height: 16px; color: var(--bu); transition: transform .25s; display: none; }
.lgl-toc__list { list-style: none; margin: 0; padding: 0 0.25rem 0.4rem; display: flex; flex-direction: column; gap: 2px; }
.lgl-toc__link {
  display: block; padding: 0.5rem 0.65rem; font-size: 0.85rem; line-height: 1.5;
  color: #43535c; text-decoration: none; border-radius: 10px;
  border-inline-start: 2px solid transparent;
  transition: background .18s, color .18s, border-color .18s;
}
.lgl-toc__link:hover { background: rgba(145,185,180,0.22); color: var(--nv); border-inline-start-color: var(--bu); } /* burgundy hover detail */
.lgl-toc__link:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; }
.lgl-toc__link.is-active {                                   /* orange active state */
  background: rgba(255,150,25,0.12); color: var(--nv); font-weight: 700;
  border-inline-start-color: var(--or);
}

/* Document — one coherent document (no per-clause colour cards) */
.lgl-doc {
  position: relative; min-width: 0; background: #fff; border: 1px solid rgba(15,40,55,0.08);
  border-radius: 20px; padding: clamp(1.5rem, 3.5vw, 3rem);
  box-shadow: 0 10px 34px rgba(15,40,55,0.06);
}
.lgl-doc::before { content: ''; position: absolute; top: 0; inset-inline: 0; height: 3px; border-top-left-radius: 20px; border-top-right-radius: 20px; background: var(--lgl-idline); opacity: 0.9; }
.lgl-sec { scroll-margin-top: calc(var(--header-height, 72px) + 1.25rem); }
.lgl-sec + .lgl-sec { margin-top: clamp(2rem, 4vw, 2.9rem); padding-top: clamp(2rem, 4vw, 2.9rem); border-top: 1px solid rgba(145,185,180,0.45); } /* sage divider */
.lgl-sec__num { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.05em; color: var(--bu); margin: 0 0 0.5rem; } /* burgundy clause marker */
.lgl-sec__num::before { content: ''; display: inline-block; width: 14px; height: 2px; border-radius: 2px; background: var(--bu); margin-inline-end: 0.5rem; vertical-align: middle; }
.lgl-sec__title { font-size: clamp(1.2rem, 2.4vw, 1.5rem); font-weight: 800; color: var(--nv); line-height: 1.4; margin: 0 0 1.1rem; }
.lgl-sec p, .lgl-sec li { font-size: 0.98rem; line-height: 2; color: #3f5560; }
.lgl-sec ul, .lgl-sec ol { margin: 0.9rem 0; padding-inline-start: 1.4rem; display: flex; flex-direction: column; gap: 0.55rem; }
.lgl-sec li::marker { color: var(--sg); }
.lgl-sec a { color: var(--nv); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(145,185,180,0.8); }
.lgl-sec a:hover { color: var(--or); text-decoration-color: var(--or); } /* orange link hover */
.lgl-sec a:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; border-radius: 3px; }

/* Subtle notice callout (existing status notes) — sage surface + burgundy edge */
.lgl-note {
  display: block; background: rgba(145,185,180,0.12);
  border: 1px solid rgba(145,185,180,0.4);
  border-inline-start: 3px solid var(--bu);
  border-radius: 12px; padding: 0.95rem 1.15rem;
}
.lgl-note__label { display: block; font-size: 0.82rem; font-weight: 800; color: var(--nv); margin-bottom: 0.3rem; }
.lgl-note__text { margin: 0; font-size: 0.92rem; line-height: 1.9; color: #566a73; }

/* Contact card (supporting element) — sage surface, navy button */
.lgl-contact {
  display: block; margin-top: clamp(2rem, 4vw, 2.9rem); padding: clamp(1.4rem, 3vw, 2rem);
  background: linear-gradient(150deg, rgba(145,185,180,0.18), rgba(255,255,255,0.4));
  border: 1px solid rgba(145,185,180,0.5); border-radius: 16px;
}
.lgl-contact__title { font-size: 1.05rem; font-weight: 800; color: var(--nv); margin: 0 0 0.5rem; }
.lgl-contact__text { font-size: 0.92rem; line-height: 1.9; color: #4a6070; margin: 0 0 1.15rem; max-width: 60ch; }
.lgl-contact__btn {
  display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.6rem 1.3rem;
  border-radius: 999px; font-size: 0.88rem; font-weight: 800; text-decoration: none;
  color: #fff; background: var(--nv);
  box-shadow: 0 8px 20px rgba(15,40,55,0.16); transition: transform .2s, background .2s, box-shadow .2s;
}
.lgl-contact__btn:hover { background: #14384c; transform: translateY(-2px); box-shadow: 0 12px 26px rgba(255,150,25,0.28); } /* orange-tinted hover glow */
.lgl-contact__btn:focus-visible { outline: 2px solid var(--bu); outline-offset: 3px; } /* burgundy focus */

/* ── Tablet ── */
@media (max-width: 900px) {
  .lgl-body { grid-template-columns: 1fr; gap: 1.25rem; }
  .lgl-toc { position: static; top: auto; }
  .lgl-toc__head { cursor: pointer; text-transform: none; font-size: 0.9rem; padding: 0.85rem 0.75rem; min-height: 44px; }
  .lgl-toc__chev { display: block; }
  .lgl-toc[open] .lgl-toc__chev { transform: rotate(180deg); }
}
/* desktop: force the details open + neutralize the summary toggle */
@media (min-width: 901px) {
  .lgl-toc > .lgl-toc__list { display: flex !important; }
  .lgl-toc__head { pointer-events: none; }
}

/* ── Mobile ── */
@media (max-width: 560px) {
  .lgl-doc { padding: 1.25rem 1.1rem; border-radius: 16px; }
  .lgl-title { font-size: clamp(1.6rem, 8vw, 2rem); }
  .lgl-lead { font-size: 0.95rem; }
}
