/* Hide the theme's default page title on these legal pages */
.page-header { display: none; }

/* ==========================================================================
   LEXZUR — Legal pages (Terms & Conditions, Exhibit A, Exhibit B)
   Everything is scoped under .lxz-terms so it won't clash with the theme.
   Swap brand values in the :root-like block below.
   ========================================================================== */

.lxz-terms {
  --lxz-ink: #14233b;        /* headings, numbers */
  --lxz-text: #2b3445;       /* body copy */
  --lxz-muted: #5b6576;      /* meta, captions */
  --lxz-rule: #e3e6ec;       /* dividers, borders */
  --lxz-wash: #f5f7fa;       /* table header, TOC active */
  --lxz-accent: #1f5f8b;     /* links, active marker */
  --lxz-paper: #ffffff;

  --lxz-serif: Charter, "Bitstream Charter", "Iowan Old Style", "Sitka Text", Cambria, Georgia, serif;
  --lxz-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --lxz-header-offset: 96px; /* set to your sticky site header height */

  background: var(--lxz-paper);
  color: var(--lxz-text);
  font-family: var(--lxz-serif);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.lxz-terms *,
.lxz-terms *::before,
.lxz-terms *::after { box-sizing: border-box; }

/* ---------- Header ---------- */
.lxz-terms__header {
  border-bottom: 1px solid var(--lxz-rule);
  padding: 72px 24px 48px;
}
.lxz-terms__header-inner {
  max-width: 1160px;
  margin: 0 auto;
}
.lxz-terms__title {
  font-family: var(--lxz-serif);
  font-weight: 400;
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--lxz-ink);
  margin: 0 0 16px;
}
.lxz-terms__meta {
  font-family: var(--lxz-sans);
  font-size: 0.9rem;
  color: var(--lxz-muted);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
}
.lxz-terms__meta strong { color: var(--lxz-ink); font-weight: 600; }

/* ---------- Layout ---------- */
.lxz-terms__layout {
  max-width: 1160px;
  margin: 0 auto;
  padding: 48px 24px 96px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}

/* ---------- Table of contents ---------- */
.lxz-terms__toc {
  position: sticky;
  top: calc(var(--lxz-header-offset) + 16px);
  max-height: calc(100vh - var(--lxz-header-offset) - 32px);
  overflow-y: auto;
  font-family: var(--lxz-sans);
  font-size: 0.85rem;
  line-height: 1.4;
  padding-right: 8px;
}
.lxz-terms__toc-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--lxz-ink);
  margin: 0 0 12px;
}
.lxz-terms__toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--lxz-rule);
}
.lxz-terms .lxz-terms__toc a {
  display: grid;
  grid-template-columns: 26px 1fr;
  padding: 6px 0 6px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--lxz-muted);
  text-decoration: none;
}
.lxz-terms .lxz-terms__toc a span { font-variant-numeric: tabular-nums; color: #8a93a3; }
.lxz-terms .lxz-terms__toc a:hover { color: var(--lxz-ink); border-left-color: var(--lxz-rule); }
.lxz-terms .lxz-terms__toc a:focus-visible {
  outline: 2px solid var(--lxz-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Mobile TOC (native <details>, no JS) */
.lxz-terms__toc-mobile { display: none; }

/* ---------- Body ---------- */
.lxz-terms__body {
  max-width: 72ch;
  counter-reset: none;
}
.lxz-terms__preamble {
  font-size: 1.05rem;
  padding-bottom: 32px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--lxz-rule);
}
.lxz-terms__preamble p:last-child { margin-bottom: 0; }
.lxz-terms__agree {
  font-style: italic;
  color: var(--lxz-ink);
}

.lxz-terms p { margin: 0 0 1.1em; }

.lxz-terms a { color: var(--lxz-accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.lxz-terms a:hover { text-decoration-thickness: 2px; }
.lxz-terms a:focus-visible { outline: 2px solid var(--lxz-accent); outline-offset: 2px; }

/* Sections with hanging numbers */
.lxz-section {
  position: relative;
  padding-top: 40px;
  scroll-margin-top: calc(var(--lxz-header-offset) + 16px);
}
.lxz-section + .lxz-section { border-top: 1px solid var(--lxz-rule); margin-top: 16px; }

.lxz-section h2 {
  font-family: var(--lxz-serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.3;
  color: var(--lxz-ink);
  margin: 0 0 20px;
  display: flex;
  align-items: baseline;
  gap: 16px;
}
.lxz-section h2 .lxz-num {
  font-family: var(--lxz-sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--lxz-accent);
  font-variant-numeric: tabular-nums;
  min-width: 2ch;
}
.lxz-section h3 {
  font-family: var(--lxz-sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--lxz-ink);
  margin: 28px 0 10px;
}
.lxz-section h3 .lxz-num { color: var(--lxz-accent); margin-right: 8px; font-variant-numeric: tabular-nums; }

/* Inline clause numbers, e.g. "5.1" */
.lxz-clause {
  font-family: var(--lxz-sans);
  font-size: 0.85em;
  font-weight: 600;
  color: var(--lxz-ink);
  margin-right: 6px;
  font-variant-numeric: tabular-nums;
}

/* Definitions */
.lxz-defs { margin: 0 0 1.2em; }
.lxz-defs dt {
  font-weight: 600;
  color: var(--lxz-ink);
  margin-top: 14px;
}
.lxz-defs dd { margin: 2px 0 0 0; }
.lxz-defs .lxz-exhibits { margin: 6px 0 0; padding-left: 20px; }

/* Lists */
.lxz-terms ul,
.lxz-terms ol { margin: 0 0 1.2em; padding-left: 0; }
.lxz-terms li { margin-bottom: 0.45em; }

.lxz-bullets { list-style: none; }
.lxz-bullets li { position: relative; padding-left: 22px; }
.lxz-bullets li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.72em;
  width: 6px;
  height: 1px;
  background: var(--lxz-ink);
}

/* (a) (b) (c)… / (i) (ii)… / 1. 2. 3. — legal-style markers */
.lxz-alpha, .lxz-roman, .lxz-decimal { list-style: none; counter-reset: lxz-item; }
.lxz-alpha > li, .lxz-roman > li, .lxz-decimal > li {
  counter-increment: lxz-item;
  position: relative;
  padding-left: 44px;
}
.lxz-alpha > li::before,
.lxz-roman > li::before,
.lxz-decimal > li::before {
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  font-family: var(--lxz-sans);
  font-size: 0.88em;
  font-weight: 500;
  line-height: inherit;
  color: var(--lxz-muted);
  font-variant-numeric: tabular-nums;
}
.lxz-alpha > li::before   { content: "(" counter(lxz-item, lower-alpha) ")"; }
.lxz-roman > li::before   { content: "(" counter(lxz-item, lower-roman) ")"; }
.lxz-decimal > li::before { content: counter(lxz-item) "."; }

/* Service credit table */
.lxz-table-wrap {
  overflow-x: auto;
  margin: 8px 0 1.4em;
  border: 1px solid var(--lxz-rule);
  border-radius: 4px;
}
.lxz-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--lxz-sans);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}
.lxz-table caption {
  caption-side: top;
  text-align: left;
  font-size: 0.85rem;
  color: var(--lxz-muted);
  padding: 10px 16px;
  border-bottom: 1px solid var(--lxz-rule);
}
.lxz-table th,
.lxz-table td { padding: 11px 16px; text-align: left; border-bottom: 1px solid var(--lxz-rule); }
.lxz-table thead th { background: var(--lxz-wash); color: var(--lxz-ink); font-weight: 600; }
.lxz-table tbody tr:last-child td { border-bottom: 0; }
.lxz-table td:last-child, .lxz-table th:last-child { text-align: right; }

/* Wide SLA table (Exhibit B) */
.lxz-table--sla { min-width: 600px; font-size: 0.84rem; }
.lxz-table--sla th,
.lxz-table--sla td { padding: 10px 12px; }
.lxz-table--sla th,
.lxz-table--sla td { text-align: left; vertical-align: top; }
.lxz-table--sla td:last-child,
.lxz-table--sla th:last-child { text-align: left; }
.lxz-table--sla thead th { font-size: 0.85rem; line-height: 1.35; }
.lxz-table--sla td { line-height: 1.5; }
.lxz-table--sla td.lxz-def { width: 38%; }
.lxz-table--sla .lxz-type { background: var(--lxz-wash); font-weight: 600; color: var(--lxz-ink); }
.lxz-table--sla .lxz-prio { font-weight: 600; color: var(--lxz-ink); white-space: nowrap; }
.lxz-table--sla td.lxz-time { min-width: 84px; }
.lxz-table--sla tbody tr:last-child td { border-bottom: 1px solid var(--lxz-rule); }
.lxz-table--sla tbody tr:last-child td:not(.lxz-type) { border-bottom: 0; }

/* Postal address block (Exhibit A, clause 7) */
.lxz-address {
  font-family: var(--lxz-sans);
  font-size: 0.92rem;
  line-height: 1.6;
  border-left: 2px solid var(--lxz-rule);
  padding: 4px 0 4px 16px;
  margin: 0 0 1.2em;
  color: var(--lxz-ink);
}

/* Footer of the document */
.lxz-terms__end {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--lxz-rule);
  font-family: var(--lxz-sans);
  font-size: 0.88rem;
  color: var(--lxz-muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .lxz-terms__layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 24px; }
  .lxz-terms__toc { display: none; }
  .lxz-terms__toc-mobile {
    display: block;
    font-family: var(--lxz-sans);
    font-size: 0.92rem;
    border: 1px solid var(--lxz-rule);
    border-radius: 4px;
    margin-bottom: 32px;
  }
  .lxz-terms__toc-mobile summary {
    cursor: pointer;
    padding: 12px 16px;
    font-weight: 600;
    color: var(--lxz-ink);
  }
  .lxz-terms__toc-mobile summary:focus-visible { outline: 2px solid var(--lxz-accent); outline-offset: 2px; }
  .lxz-terms__toc-mobile ol {
    list-style: none;
    margin: 0;
    padding: 4px 16px 12px;
    columns: 2;
    column-gap: 24px;
  }
  .lxz-terms__toc-mobile li { break-inside: avoid; margin-bottom: 6px; }
  .lxz-terms .lxz-terms__toc-mobile a { color: var(--lxz-text); text-decoration: none; }
  .lxz-terms .lxz-terms__toc-mobile a span { color: #8a93a3; display: inline-block; min-width: 24px; }
}
@media (max-width: 560px) {
  .lxz-terms { font-size: 16px; }
  .lxz-terms__header { padding: 48px 20px 32px; }
  .lxz-terms__layout { padding-left: 20px; padding-right: 20px; }
  .lxz-terms__toc-mobile ol { columns: 1; }
  .lxz-alpha > li, .lxz-roman > li, .lxz-decimal > li { padding-left: 36px; }
}

@media (prefers-reduced-motion: no-preference) {
  html:has(.lxz-terms) { scroll-behavior: smooth; }
}

/* ---------- Print ---------- */
@media print {
  .lxz-terms { font-size: 11pt; color: #000; }
  .lxz-terms__toc, .lxz-terms__toc-mobile, .lxz-terms__top { display: none !important; }
  .lxz-terms__layout { display: block; padding: 0; }
  .lxz-terms__header { padding: 0 0 16px; }
  .lxz-terms__body { max-width: none; }
  .lxz-section { break-inside: auto; padding-top: 18px; }
  .lxz-section h2, .lxz-section h3 { break-after: avoid; }
  .lxz-terms a { color: #000; text-decoration: none; }
}