/* Legal Center and legal documents.
 *
 * Built by scripts/legal (shell.mjs writes the markup). Uses the site's v2
 * tokens from redesign.css, so the band and buttons match the rest of the
 * site. The print rules at the bottom are what "Print" and the PDF copies use.
 *
 * The tokens sit on :root because the server replaces the page's <body> tag
 * with the shared header's, so a class on <body> never arrives.
 */

:root {
  --lg-navy: var(--v2-navy, #06182e);
  --lg-navy-2: var(--v2-navy-2, #0a2747);
  --lg-blue: var(--v2-blue, #0a72c4);
  --lg-ink: var(--v2-ink, #0f2235);
  --lg-body: #33475b;
  --lg-muted: var(--v2-muted, #6b7d90);
  --lg-line: var(--v2-line, #e3e9f0);
  --lg-surface: var(--v2-surface, #f5f8fb);
  --lg-soft: var(--accent-soft, #e8f2fc);
}

/* ---------- Title band ---------- */

.legal-hero {
  position: relative;
  padding: 150px 0 56px;
  background:
    radial-gradient(ellipse 60% 80% at 85% 0%, rgba(10, 114, 196, 0.32), transparent 70%),
    linear-gradient(180deg, var(--lg-navy) 0%, var(--lg-navy-2) 100%);
  color: #fff;
}

.legal-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

.legal-crumbs a {
  color: #9fd0ff;
  font-weight: 600;
}

.legal-crumbs a:hover {
  color: #fff;
}

.legal-hero h1 {
  max-width: 820px;
  margin: 0 0 14px;
  color: #fff;
  font-size: 46px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.legal-hero__lead {
  max-width: 720px;
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 18px;
  line-height: 1.6;
}

.legal-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-bottom: 28px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}

.legal-hero__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legal-hero__meta i {
  color: #7cc0ff;
}

.legal-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.legal-btn--primary {
  background: var(--lg-blue);
  color: #fff;
}

.legal-btn--primary:hover {
  background: #075a9c;
  color: #fff;
}

.legal-btn--ghost {
  border-color: rgba(255, 255, 255, 0.4);
  background: transparent;
  color: #fff;
}

.legal-btn--ghost:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.legal-btn--outline {
  border-color: var(--lg-line);
  background: #fff;
  color: var(--lg-ink);
}

.legal-btn--outline:hover {
  border-color: var(--lg-blue);
  color: var(--lg-blue);
}

.legal-btn--sm {
  min-height: 38px;
  padding: 0 14px;
  font-size: 14px;
}

/* ---------- Document layout ---------- */

.legal-body {
  padding: 56px 0 72px;
  background: #fff;
}

.legal-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 128px);
  overflow-y: auto;
  padding-right: 6px;
}

.legal-toc__title {
  margin: 0 0 12px;
  color: var(--lg-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-toc ol,
.legal-toc-mobile ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-toc li a,
.legal-toc-mobile li a {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 4px;
  padding: 7px 10px;
  border-left: 2px solid var(--lg-line);
  color: var(--lg-body);
  font-size: 14px;
  line-height: 1.4;
}

.legal-toc li a span,
.legal-toc-mobile li a span {
  color: var(--lg-muted);
  font-variant-numeric: tabular-nums;
}

.legal-toc li a:hover {
  border-left-color: var(--lg-blue);
  color: var(--lg-blue);
}

.legal-toc li a.is-active {
  border-left-color: var(--lg-blue);
  background: var(--lg-soft);
  color: var(--lg-ink);
  font-weight: 600;
}

.legal-toc__download {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--lg-line);
}

.legal-toc__download a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--lg-blue);
  font-size: 14px;
  font-weight: 600;
}

.legal-toc-mobile {
  display: none;
}

.legal-doc {
  max-width: 780px;
  color: var(--lg-body);
  font-size: 16.5px;
  line-height: 1.75;
}

.legal-doc p {
  margin: 0 0 16px;
  color: var(--lg-body);
  font-size: inherit;
  line-height: inherit;
}

.legal-doc a {
  color: var(--lg-blue);
  text-decoration: underline;
  text-decoration-color: rgba(10, 114, 196, 0.35);
  text-underline-offset: 3px;
}

.legal-doc a:hover {
  text-decoration-color: currentColor;
}

.legal-doc strong {
  color: var(--lg-ink);
}

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

.legal-doc ul {
  list-style: disc;
}

.legal-doc ol {
  list-style: decimal;
}

.legal-doc li {
  margin-bottom: 8px;
  color: var(--lg-body);
  font-size: inherit;
  line-height: 1.7;
}

.legal-doc li::marker {
  color: var(--lg-blue);
}

/* style.css pads every <section>; a document section only needs its margin. */
.legal-section {
  padding: 8px 0 0;
  margin-bottom: 40px;
  scroll-margin-top: 100px;
}

.legal-section h2 {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--lg-line);
  color: var(--lg-ink);
  font-size: 26px;
  line-height: 1.25;
}

.legal-section__num {
  flex: 0 0 auto;
  min-width: 34px;
  color: var(--lg-blue);
  font-variant-numeric: tabular-nums;
}

.legal-anchor {
  margin-left: auto;
  color: var(--lg-line) !important;
  font-size: 18px;
  text-decoration: none !important;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.legal-section h2:hover .legal-anchor,
.legal-anchor:focus {
  opacity: 1;
  color: var(--lg-muted) !important;
}

.legal-doc h3 {
  margin: 26px 0 10px;
  color: var(--lg-ink);
  font-size: 18px;
  line-height: 1.35;
}

.legal-summary {
  margin: 0 0 36px;
  padding: 24px 26px 20px;
  border: 1px solid #cfe3f6;
  border-radius: 14px;
  background: linear-gradient(180deg, #f3f9ff 0%, #fafcfe 100%);
}

.legal-summary h2 {
  margin: 0 0 12px;
  color: var(--lg-ink);
  font-size: 18px;
}

.legal-summary ul {
  margin-bottom: 10px;
}

.legal-summary__note {
  margin: 0 !important;
  color: var(--lg-muted) !important;
  font-size: 14px !important;
}

.legal-intro {
  margin-bottom: 34px;
}

.legal-callout {
  margin: 0 0 20px;
  padding: 16px 20px;
  border-left: 4px solid #ef6c00;
  border-radius: 0 10px 10px 0;
  background: #fff6ee;
}

.legal-callout p:last-child {
  margin-bottom: 0;
}

.legal-callout--info {
  border-left-color: var(--lg-blue);
  background: var(--lg-soft);
}

.legal-table-wrap {
  margin: 0 0 22px;
  overflow-x: auto;
  border: 1px solid var(--lg-line);
  border-radius: 12px;
}

.legal-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.55;
}

.legal-table th,
.legal-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--lg-line);
  text-align: left;
  vertical-align: top;
}

.legal-table thead th {
  background: var(--lg-surface);
  color: var(--lg-ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.legal-table tbody tr:last-child td {
  border-bottom: 0;
}

.legal-table td:first-child {
  color: var(--lg-ink);
  font-weight: 600;
}

.legal-sample {
  margin: 0 0 20px;
  padding: 20px 22px;
  border: 1px dashed #c4d4e6;
  border-radius: 12px;
  background: var(--lg-surface);
}

.legal-doc__end {
  margin-top: 48px;
  padding: 22px 24px;
  border: 1px solid var(--lg-line);
  border-radius: 14px;
  background: var(--lg-surface);
  font-size: 15px;
}

.legal-doc__end p {
  margin-bottom: 8px;
}

.legal-doc__end p:last-child {
  margin-bottom: 0;
}

.legal-print-head {
  display: none;
}

/* ---------- Related documents ---------- */

.legal-related {
  padding: 56px 0 72px;
  border-top: 1px solid var(--lg-line);
  background: var(--lg-surface);
}

.legal-related h2 {
  margin: 0 0 22px;
  color: var(--lg-ink);
  font-size: 24px;
}

.legal-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.legal-related__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--lg-line);
  border-radius: 12px;
  background: #fff;
  color: var(--lg-body);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.legal-related__item:hover {
  border-color: #b9d6f1;
  box-shadow: var(--v2-shadow-sm, 0 2px 8px rgba(6, 24, 46, 0.06));
}

.legal-related__item strong {
  color: var(--lg-ink);
  font-size: 16px;
}

.legal-related__item span {
  font-size: 14px;
  line-height: 1.5;
}

/* ---------- Legal Center hub ---------- */

.legal-hub {
  padding: 64px 0 24px;
}

.legal-hub + .legal-hub {
  padding-top: 24px;
}

.legal-hub__head {
  max-width: 720px;
  margin-bottom: 26px;
}

.legal-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--lg-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-eyebrow:before {
  content: "";
  width: 22px;
  height: 2px;
  background: currentColor;
}

.legal-hub__head h2 {
  margin: 0 0 8px;
  color: var(--lg-ink);
  font-size: 30px;
  line-height: 1.2;
}

.legal-hub__head p {
  margin: 0;
  color: var(--lg-body);
  font-size: 16.5px;
  line-height: 1.65;
}

.legal-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.legal-card {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 18px;
  border: 1px solid var(--lg-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--v2-shadow-sm, 0 1px 2px rgba(6, 24, 46, 0.06));
}

.legal-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.legal-card__icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--lg-soft);
  color: var(--lg-blue);
  font-size: 18px;
}

.legal-card__tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--lg-surface);
  color: var(--lg-muted);
  font-size: 12px;
  font-weight: 600;
}

.legal-card h3 {
  margin: 0 0 8px;
  color: var(--lg-ink);
  font-size: 18px;
  line-height: 1.3;
}

.legal-card h3 a {
  color: inherit;
}

.legal-card h3 a:hover {
  color: var(--lg-blue);
}

.legal-card p {
  flex: 1 1 auto;
  margin: 0 0 14px;
  color: var(--lg-body);
  font-size: 15px;
  line-height: 1.6;
}

.legal-card__meta {
  margin-bottom: 14px !important;
  color: var(--lg-muted) !important;
  font-size: 13px !important;
}

.legal-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-commitments {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.legal-commitment {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--lg-surface);
}

.legal-commitment i {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  color: var(--lg-blue);
}

.legal-commitment strong {
  display: block;
  margin-bottom: 4px;
  color: var(--lg-ink);
  font-size: 16px;
}

.legal-commitment span {
  color: var(--lg-body);
  font-size: 14.5px;
  line-height: 1.55;
}

.legal-requests {
  margin-bottom: 72px;
}

.legal-requests .legal-table td:first-child {
  white-space: nowrap;
}

.legal-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 22px 24px;
  border-radius: 14px;
  background: var(--lg-navy);
  color: rgba(255, 255, 255, 0.85);
}

.legal-contact strong {
  display: block;
  color: #fff;
  font-size: 17px;
}

.legal-contact a {
  color: #9fd0ff;
}

/* ---------- Tablet and phone ---------- */

@media (max-width: 1199.98px) {
  .legal-cards,
  .legal-commitments {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .legal-hero {
    padding: 124px 0 44px;
  }

  .legal-hero h1 {
    font-size: 38px;
  }

  .legal-layout {
    display: block;
  }

  .legal-toc {
    display: none;
  }

  .legal-toc-mobile {
    display: block;
    margin: 0 0 28px;
    border: 1px solid var(--lg-line);
    border-radius: 12px;
    background: var(--lg-surface);
  }

  .legal-toc-mobile summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    padding: 0 16px;
    color: var(--lg-ink);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
  }

  .legal-toc-mobile summary::-webkit-details-marker {
    display: none;
  }

  .legal-toc-mobile summary:after {
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--lg-muted);
    transition: transform 0.15s ease;
  }

  .legal-toc-mobile[open] summary:after {
    transform: rotate(180deg);
  }

  .legal-toc-mobile ol {
    padding: 0 8px 10px;
  }

  .legal-toc-mobile li a {
    min-height: 40px;
    align-items: center;
    border-left: 0;
    border-radius: 8px;
  }

  .legal-doc {
    max-width: none;
  }
}

@media (max-width: 767.98px) {
  .legal-hero {
    padding: 108px 0 36px;
  }

  .legal-hero h1 {
    font-size: 32px;
  }

  .legal-hero__lead {
    font-size: 16.5px;
  }

  .legal-hero__actions .legal-btn {
    flex: 1 1 100%;
  }

  .legal-body {
    padding: 32px 0 48px;
  }

  .legal-doc {
    font-size: 16px;
    line-height: 1.7;
  }

  .legal-section h2 {
    font-size: 22px;
  }

  .legal-section__num {
    min-width: 0;
  }

  .legal-anchor {
    display: none;
  }

  .legal-summary {
    padding: 18px 18px 14px;
  }

  .legal-cards,
  .legal-commitments {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-hub {
    padding-top: 44px;
  }

  .legal-hub__head h2 {
    font-size: 25px;
  }

  .legal-card__actions .legal-btn {
    flex: 1 1 auto;
    min-height: 44px;
  }

  .legal-requests .legal-table td:first-child {
    white-space: normal;
  }
}

/* Three-column tables become one card per row on phones (labels from legal.js). */
@media screen and (max-width: 767.98px) {
  .legal-table--stack {
    min-width: 0;
  }

  .legal-table--stack thead {
    display: none;
  }

  .legal-table--stack,
  .legal-table--stack tbody,
  .legal-table--stack tr,
  .legal-table--stack td {
    display: block;
    width: 100%;
  }

  .legal-table--stack tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--lg-line);
  }

  .legal-table--stack tbody tr:last-child {
    border-bottom: 0;
  }

  .legal-table--stack td {
    padding: 0;
    border: 0;
  }

  .legal-table--stack td:first-child {
    font-size: 16px;
  }

  .legal-table--stack td + td::before {
    content: attr(data-label);
    display: block;
    margin: 8px 0 2px;
    color: var(--lg-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

/* ---------- Print and PDF ---------- */

@media print {
  @page {
    size: Letter;
    margin: 0.7in 0.75in 0.8in;
  }

  html,
  body {
    background: #fff !important;
  }

  body > :not(.wrapper),
  .wrapper > :not(.legal-body),
  .preloader,
  .legal-toc,
  .legal-toc-mobile,
  .legal-anchor,
  #scrollTopBtn {
    display: none !important;
  }

  .wrapper,
  .legal-body,
  .legal-body .container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
    width: auto !important;
  }

  .legal-layout {
    display: block;
  }

  .legal-doc {
    max-width: none;
    color: #1b2733;
    font-size: 10.5pt;
    line-height: 1.5;
  }

  .legal-doc p,
  .legal-doc li {
    color: #1b2733;
    orphans: 3;
    widows: 3;
  }

  .legal-doc a {
    color: inherit;
    text-decoration: none;
  }

  .legal-print-head {
    display: block;
    margin-bottom: 18pt;
    padding-bottom: 12pt;
    border-bottom: 2pt solid #06182e;
  }

  .legal-print-head__brand {
    display: flex;
    align-items: center;
    gap: 8pt;
    margin-bottom: 10pt;
    color: #06182e;
    font-size: 10pt;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .legal-print-head__brand img {
    width: 26pt;
    height: auto;
  }

  .legal-print-head h1 {
    margin: 0 0 6pt;
    color: #06182e;
    font-size: 24pt;
    line-height: 1.15;
  }

  .legal-print-head p {
    margin: 0;
    color: #4a5b6c;
    font-size: 9.5pt;
  }

  .legal-summary {
    break-inside: avoid;
    padding: 10pt 12pt 6pt;
    border: 1pt solid #b8cadd;
    border-radius: 6pt;
    background: #f5f9fd !important;
  }

  .legal-section {
    margin-bottom: 16pt;
  }

  .legal-section h2 {
    margin-bottom: 8pt;
    padding-bottom: 4pt;
    font-size: 14pt;
    break-after: avoid;
  }

  .legal-doc h3 {
    margin: 12pt 0 4pt;
    font-size: 11.5pt;
    break-after: avoid;
  }

  .legal-table-wrap {
    overflow: visible;
    border-radius: 0;
  }

  .legal-table {
    min-width: 0;
    font-size: 9pt;
  }

  .legal-table th,
  .legal-table td {
    padding: 5pt 6pt;
  }

  .legal-table tr,
  .legal-callout,
  .legal-sample {
    break-inside: avoid;
  }

  .legal-callout,
  .legal-sample,
  .legal-doc__end {
    background: #fff !important;
  }
}
