/* ============================================================
   COLLECTORS CERTIFIED GRADING — legal.css
   Terms of Use + Privacy Policy (D206). Builds on style.css
   tokens and reuses the pf-* shell, .btn and .container.

   EVERY selector in this file is lg- prefixed or #lg-scoped.
   Nothing here can reach another page: the two legal pages are
   the only ones that load it, and the only shared classes they
   use (.pf-main, .pf-panel, .container) are left alone.

   THE NOTICE COLOUR IS THE TABLE-OF-CONTENTS BLUE (Jacob, 10-01).
   It went orange → two blues → this. The one he picked is the blue
   already on the page: the colour the ACTIVE row of "On this page"
   wears, i.e. --cyan (#36D4F9) from the style.css palette header.
   So there is ONE token, not a pair, and it points at --cyan rather
   than repeating the hex — the notice and the TOC highlight must
   never be able to drift apart. Change --cyan and both follow.

   The earlier pair existed to protect small uppercase text: the
   darker #1E79D4 drew the rules and edges but only reached about
   3.7:1 on this background, under the 4.5:1 a 14px uppercase kicker
   wants, so text borrowed the brighter #1492FD. That whole problem
   is gone here — #36D4F9 on --bg (#0a0e13) measures about 11.0:1,
   so the same value can do the edges, the fills, the headings and
   the badge with contrast to spare.

   Dark theme, like the rest of the customer site.
   ============================================================ */

:root {
  /* scoped to the legal pages by convention (only they load this file) */
  --lg-notice: var(--cyan);        /* text, badge, rules, borders — ONE blue, everywhere */
  /* The same colour again as a comma triple, because rgba() cannot decompose a hex held
     in a custom property. It is the one place the value is written out, so a future
     change to --cyan has to be made here too — which is why it says so. */
  --lg-notice-rgb: 54, 212, 249;
}

.lg-wrap { max-width: 1180px; }

/* ---------------- page head ----------------
   Left-aligned, unlike .pf-head: a legal document is read, not
   browsed, and a centred 58px title over a left-aligned wall of
   prose reads as two different pages stacked. */
.lg-head {
  max-width: 820px;
  margin: 0 0 34px;
  padding-bottom: 26px;
  border-bottom: 1px solid rgba(166, 196, 224, .14);
}
.lg-kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  letter-spacing: 3.4px; text-transform: uppercase;
  color: var(--lg-notice);
  margin-bottom: 10px;
}
.lg-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 54px);
  font-weight: 700; letter-spacing: .5px; line-height: 1.04;
  text-transform: uppercase;
}
.lg-subtitle {
  color: var(--muted); font-size: 15.5px; line-height: 1.6;
  margin-top: 12px;
}
.lg-subtitle[hidden] { display: none; }

/* effective / last updated */
.lg-meta {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin-top: 20px;
}
.lg-meta[hidden] { display: none; }
.lg-meta-item { display: flex; align-items: baseline; gap: 8px; }
.lg-meta-item[hidden] { display: none; }
.lg-meta dt {
  font-family: var(--font-display);
  font-size: 12px; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--dim);
}
.lg-meta dd {
  font-family: var(--font-mark);
  font-size: 14px; font-weight: 600;
  color: var(--text);
}

/* ---------------- loading / empty / error ----------------
   Same shapes confirmation.css uses, so a legal page that has
   nothing to show looks like every other honest state on the
   site rather than like a page that broke. */
.lg-boot {
  text-align: center; color: var(--dim);
  padding: 60px 20px; font-size: 14.5px;
}
.lg-boot[hidden] { display: none; }
.lg-state {
  text-align: center; max-width: 580px; margin: 24px auto;
  padding: 48px 30px;
}
.lg-state[hidden] { display: none; }
.lg-state img { width: 88px; opacity: .45; margin: 0 auto 20px; }
.lg-state h2 {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700;
  letter-spacing: .5px; text-transform: uppercase;
  margin-bottom: 10px;
}
.lg-state p {
  color: var(--muted); font-size: 14.5px; line-height: 1.65;
  margin-bottom: 24px;
}
.lg-state p:last-child { margin-bottom: 0; }

/* ---------------- the two-column shell ----------------
   Contents rail on the left, document on the right. The rail is
   a fixed width so the measure of the prose does not change
   between the two documents. */
.lg-grid {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

/* ---------------- table of contents ---------------- */
.lg-toc { position: sticky; top: 104px; }
.lg-toc[hidden] { display: none; }

/* The bar is the small-screen control only; see the media query. */
.lg-toc-toggle { display: none; }

.lg-toc-panel {
  background: linear-gradient(170deg, rgba(166, 196, 224, .07), rgba(166, 196, 224, .02));
  border: 1px solid rgba(166, 196, 224, .15);
  border-radius: var(--radius);
  padding: 20px 14px 20px 16px;
  max-height: calc(100vh - 156px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(166, 196, 224, .3) transparent;
}
.lg-toc-panel::-webkit-scrollbar { width: 8px; }
.lg-toc-panel::-webkit-scrollbar-thumb {
  background: rgba(166, 196, 224, .22); border-radius: 999px;
}

.lg-toc-head {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  letter-spacing: 2.2px; text-transform: uppercase;
  color: var(--dim);
  padding: 0 10px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(166, 196, 224, .12);
}

/* It is an <ol> for the semantics — these sections are in order — but the
   numbers stay off: the headings carry their own, and a second set beside them
   would disagree the moment a document skips one (the Terms preamble does). */
.lg-toc-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 1px;
  margin: 0; padding: 0;
}
.lg-toc-link {
  display: block;
  font-size: 13.5px; line-height: 1.45;
  color: var(--dim);
  padding: 8px 10px;
  border-radius: 9px;
  border-left: 2px solid transparent;
  transition: color .18s, background .18s, border-color .18s;
}
.lg-toc-link:hover { color: var(--text); background: rgba(54, 212, 249, .07); }
.lg-toc-link:focus-visible {
  outline: none; color: var(--text);
  box-shadow: 0 0 0 2px rgba(54, 212, 249, .5);
}
.lg-toc-link[aria-current="true"] {
  color: var(--cyan);
  background: rgba(54, 212, 249, .1);
  border-left-color: var(--cyan);
  font-weight: 600;
}

/* ---------------- the document ----------------
   74ch is the readable measure. These documents are thousands of
   words of dense prose and a full-width line is the single
   quickest way to make one unreadable. */
.lg-doc {
  max-width: 74ch;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.78;
}
.lg-doc[hidden] { display: none; }

/* Section headings. NO CSS COUNTER, on purpose: the numbers in these
   documents are literal text the parser is forbidden to touch, so a generated
   number would print a second, disagreeing one beside it. */
.lg-h2 {
  font-family: var(--font-display);
  font-size: clamp(21px, 2.3vw, 26px);
  font-weight: 700; letter-spacing: .6px; line-height: 1.18;
  text-transform: uppercase;
  color: var(--text);
  margin: 46px 0 16px;
  padding-top: 30px;
  border-top: 1px solid rgba(166, 196, 224, .14);
}
.lg-doc > .lg-h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.lg-h3 {
  font-family: var(--font-mark);
  font-size: 16.5px; font-weight: 600; letter-spacing: .2px; line-height: 1.35;
  color: var(--text);
  margin: 30px 0 12px;
}

.lg-h2[id], .lg-h3[id] { scroll-margin-top: 112px; }

/* The section a deep link landed on. A flash rather than a permanent marker:
   it answers "did it take me to the right place" and then gets out of the way
   of reading. The inset shadow fills the box without changing the layout. */
@keyframes lgTargetFlash {
  from { box-shadow: inset 0 0 0 120px rgba(54, 212, 249, .15); }
  to   { box-shadow: inset 0 0 0 120px rgba(54, 212, 249, 0); }
}
.lg-doc .lg-h2:target, .lg-doc .lg-h3:target {
  border-radius: 8px;
  animation: lgTargetFlash 2.6s ease-out 1;
}

.lg-p { margin: 0 0 16px; }
.lg-p:last-child { margin-bottom: 0; }

.lg-doc strong { color: var(--text); font-weight: 600; }
.lg-doc em { font-style: italic; }
.lg-doc u { text-decoration: underline; text-underline-offset: 2.5px; }

.lg-link {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2.5px;
  text-decoration-thickness: 1px;
  word-break: break-word;
  transition: opacity .2s;
}
.lg-link:hover { opacity: .75; }
.lg-link:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(54, 212, 249, .5); border-radius: 3px; }

/* lists */
.lg-list { margin: 0 0 18px; padding-left: 26px; }
.lg-list li { margin-bottom: 9px; }
.lg-list li:last-child { margin-bottom: 0; }
.lg-ul { list-style: disc; }
.lg-ol { list-style: decimal; }
.lg-list li::marker { color: var(--dim); }
.lg-list .lg-list { margin-top: 9px; }

/* A deliberate blank in the source document. Narrow on purpose — the block
   spacing above already does most of the work, and a full blank line would
   double it. */
.lg-spacer { height: 10px; }

/* ---------------- notice boxes ----------------
   The 1x1 Word tables: IMPORTANT ARBITRATION NOTICE, NO CARD
   SUBMISSIONS AT THE CORPORATE OFFICE, and four more. They are
   meant to stop a reader, so they are the one loud thing on the
   page — blue on blue, a hard left edge and a drawn badge.
   The badge is an ASCII "!" in a circle rather than a warning
   glyph: a dingbat or an emoji is a font lottery on Windows and
   a tofu box in a legal notice is worse than no icon at all. */
.lg-callout {
  margin: 30px 0;
  padding: 20px 24px;
  border: 1px solid rgba(var(--lg-notice-rgb), .40);
  border-left: 4px solid var(--lg-notice);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(var(--lg-notice-rgb), .13), rgba(var(--lg-notice-rgb), .03));
  box-shadow: 0 12px 34px rgba(0, 0, 0, .3);
}
.lg-callout-head {
  display: flex; align-items: flex-start; gap: 11px;
  font-family: var(--font-display);
  font-size: 16.5px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; line-height: 1.3;
  color: var(--lg-notice);
  margin-bottom: 12px;
}
.lg-callout-head::before {
  content: '!';
  flex: 0 0 auto;
  width: 21px; height: 21px; margin-top: 1px;
  border-radius: 50%;
  background: var(--lg-notice); color: #04121f;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mark);
  font-size: 14px; font-weight: 700; letter-spacing: 0; line-height: 1;
}
.lg-callout-head:last-child { margin-bottom: 0; }
.lg-callout-body { color: var(--muted); font-size: 15.5px; }
.lg-callout-body .lg-p { margin-bottom: 12px; }
.lg-callout-body .lg-p:last-child { margin-bottom: 0; }
.lg-callout-body .lg-list { margin-bottom: 12px; }
.lg-callout-body strong { color: var(--text); }
.lg-callout .lg-spacer { height: 6px; }

/* ---------------- tables ----------------
   The WRAPPER scrolls, never the page: a wide table on a 375px
   screen must not drag the whole document sideways with it.
   Left-aligned throughout, unlike .pf-table-scroll — these hold
   sentences, not figures. */
.lg-table-wrap {
  margin: 26px 0;
  overflow-x: auto;
  border: 1px solid rgba(166, 196, 224, .15);
  border-radius: 14px;
  background: rgba(6, 16, 25, .35);
  scrollbar-width: thin;
}
.lg-table-wrap:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(54, 212, 249, .45); }
.lg-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.lg-table th {
  text-align: left; vertical-align: bottom;
  font-family: var(--font-display);
  font-size: 12.5px; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--dim);
  padding: 13px 16px;
  border-bottom: 1px solid rgba(166, 196, 224, .18);
}
.lg-table td {
  text-align: left; vertical-align: top;
  padding: 13px 16px;
  color: var(--muted); line-height: 1.6;
  border-bottom: 1px dashed rgba(166, 196, 224, .11);
}
.lg-table tbody tr:last-child td { border-bottom: none; }
.lg-table .lg-p { margin-bottom: 8px; }
.lg-table .lg-p:last-child { margin-bottom: 0; }

/* ---------------- back to top ---------------- */
.lg-backtop {
  margin-top: 36px; padding-top: 24px;
  border-top: 1px solid rgba(166, 196, 224, .14);
  font-size: 13.5px;
}
.lg-backtop[hidden] { display: none; }
.lg-backtop a { color: var(--cyan); font-weight: 600; }
.lg-backtop a:hover { opacity: .75; }

/* ============================================================
   TABLET + PHONE
   The rail becomes one sticky bar. A 20-entry contents list
   stacked above the document is a page the reader scrolls past
   twice, and an always-open panel on a 375px screen is most of
   the screen — so the panel OVERLAYS rather than pushing, it is
   capped at well under half the viewport, and choosing a section
   closes it on the way out (legal.js).
   ============================================================ */
@media (max-width: 1020px) {
  .lg-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .lg-doc { max-width: 100%; }

  .lg-toc { top: 56px; z-index: 40; margin: 0 0 28px; }

  .lg-toc-toggle {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    background: rgba(10, 22, 34, .97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(166, 196, 224, .18);
    border-radius: 12px;
    padding: 13px 16px;
    color: var(--muted);
    font-family: var(--font-display);
    font-size: 15px; font-weight: 700;
    letter-spacing: 1.8px; text-transform: uppercase;
    text-align: left; line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
  }
  .lg-toc-toggle:focus-visible { outline: none; border-color: var(--cyan); }
  .lg-toc-caret {
    margin-left: auto; font-size: 10px; line-height: 1;
    opacity: .8; transition: transform .22s;
  }
  .lg-toc.is-open .lg-toc-toggle { border-color: rgba(54, 212, 249, .45); color: var(--text); }
  .lg-toc.is-open .lg-toc-caret { transform: rotate(180deg); }

  .lg-toc-head { display: none; }

  .lg-toc-panel {
    display: none;
    position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    z-index: 41;
    background: #0f1b26;
    border-color: rgba(166, 196, 224, .22);
    border-radius: 14px;
    padding: 8px;
    max-height: min(52vh, 380px);
    box-shadow: 0 22px 50px rgba(0, 0, 0, .58);
  }
  .lg-toc.is-open .lg-toc-panel { display: block; }

  .lg-toc-link { font-size: 14px; padding: 11px 12px; }

  /* The sticky bar sits over the top of the document, so a deep link has to
     clear the nav AND the bar. */
  .lg-h2[id], .lg-h3[id] { scroll-margin-top: 128px; }
}

@media (max-width: 640px) {
  .lg-head { margin-bottom: 26px; padding-bottom: 22px; }
  .lg-meta { gap: 8px 20px; margin-top: 16px; }
  .lg-doc { font-size: 15.5px; line-height: 1.72; }
  .lg-h2 { margin-top: 36px; padding-top: 24px; }
  .lg-list { padding-left: 21px; }
  .lg-callout { padding: 17px 17px; margin: 24px 0; border-radius: 12px; }
  .lg-callout-head { font-size: 14.5px; letter-spacing: 1.2px; gap: 9px; }
  .lg-callout-body { font-size: 14.5px; }
  .lg-table th, .lg-table td { padding: 11px 13px; }
  .lg-table { font-size: 13.5px; }
  .lg-state { padding: 38px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-doc .lg-h2:target, .lg-doc .lg-h3:target { animation: none; }
  .lg-toc-caret { transition: none; }
}
