
.legal-heading {
    max-width: 125rem;
    margin-top: 4rem;
    margin-inline: auto;
    text-align: center;
    padding-bottom: 4rem;
}

.legal-heading h1 {
    font-size: 3.6rem;
    font-weight: 700;
    line-height: 5.8rem;
    letter-spacing: -0.03em;
    margin-bottom: 1.6rem;
}

.legal-heading p {
  margin-bottom: 0;
  color: var(--blueText);
}


.legal-image {
    display: block;
    margin: 0 auto;
    padding-bottom: 3rem;
}

/* LEGAL OUTLINE FORMATTING */
.legal-section {
    display: flex;
    padding-top: 0;
    padding-bottom: 2rem;
    background-color: #ffffff;
}

.legal-container {
  max-width: 1250px;
  width: 100%;
  margin: 0 auto;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  color: var(--solBlueText);
}

.legal-preamble {
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 2.4rem;
  margin-bottom: 2.2rem;
  padding-right: 2rem;
  padding-left: 2rem;
}

.legal-preamble p {
  margin-bottom: 1.2rem;
  color: var(--blueText);
}

/* 1. Reset standard list styles and initialize counters */
ol.legal-list, 
ol.legal-list ol {
  list-style-type: none;
  counter-reset: list-item-counter;
  padding-left: 25px; /* Adds space for nested indentation */
}

/* 2. Target each list item */
ol.legal-list li {
  counter-increment: list-item-counter;
  position: relative;
}

/* 3. LEVEL 1 FORMATTING: "1." */
ol.legal-list > li::before {
    content: counter(list-item-counter) ". ";
    font-weight: var(--font-weight-semibold);
    margin-right: 8px;
    font-size: var(--font-lg);
    line-height: 1rem;

}

ol.legal-list > li {
  margin-top: 1.5rem;
}

/* 4. LEVEL 2 FORMATTING: "1.1." */
ol.legal-list > li > ol > li::before {
  /* Inherits parent counter value, then adds the current sub-counter */
    content: counters(list-item-counter, ".") ". ";
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-base);
    margin-right: 8px;
}

/* Level 2 */
ol.legal-list > li > ol > li {
    margin-top: 1rem;
    line-height: 2.2rem;

}

/* 5. LEVEL 3 FORMATTING: "(a)" */
ol.legal-list > li > ol > li > ol > li::before {
  /* Converts the numerical counter to lowercase alpha characters */
    content: "(" counter(list-item-counter, lower-alpha) ") ";
    font-weight: normal;
    font-size: var(--font-sm);
    margin-right: 0.8rem;
}

/* Level 3 */
ol.legal-list > li > ol > li > ol > li {
    margin-top: 0.6rem;
    line-height: 2.2rem;
}

/* 5. LEVEL 4 FORMATTING: "(a)" */
ol.legal-list > li > ol > li > ol > li > ol > li::before {
  /* Converts the numerical counter to lowercase alpha characters */
    content: "(" counter(list-item-counter, lower-roman) ") ";
    font-weight: normal;
    font-size: var(--font-sm);
    margin-right: 0.8rem;
}

/* Level 3 */
ol.legal-list > li > ol > li > ol > li > ol > li {
    margin-top: 0.6rem;
    line-height: 2.2rem;
}

ol.legal-list li > ul > li {
    counter-increment: none;
    margin-left: 3.6rem;
}


.legal-item-1 {
  font-size: var(--font-lg);
  font-weight: var(--font-weight-semibold);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 1.4rem;
}

.legal-table thead tr { background: #5d5d5d; }

.legal-table th {
    text-align: left;
    padding: 1rem 1.4rem;
    font-weight: 600;
    color: #ffffff;
    border: none;
}

.legal-table td {
    padding: 1rem 1.4rem;
    border: none;
}

.legal-table tbody tr:nth-child(even) { background: #faf5fd; }
.legal-table tbody tr:nth-child(odd)  { background: transparent; }


/* MOBILE ADJUSTMENTS */
@media (max-width: 768px) {
    .legal-heading {
        margin-top: 2rem;
        padding-bottom: 2rem;
    }

    .legal-heading h1 {
        font-size: 2.4rem;
        line-height: 3.2rem;
    }

    .legal-image {
        width: 140px;
        padding-bottom: 1.5rem;
    }

    .legal-preamble {
        padding-left: 0;
        padding-right: 0;
    }

    ol.legal-list,
    ol.legal-list ol {
        padding-left: 16px;
    }

    ol.legal-list li > ul > li {
        margin-left: 2rem;
    }
}
