.customer-profile {
    /* Remove original max-width and center margin to allow for sidebar layout */
    max-width: none;
    margin: 0;
    padding: 0;
    font-family: 'Roboto Condensed', sans-serif;

    /* 1. Establish the main layout using CSS Grid */
    display: grid;
    /* Define two columns: 250px for the TOC sidebar, and auto for the main content */
    grid-template-columns: 250px auto;
    max-width: 85rem; /* Set the max width on the main wrapper */
    margin: 0 auto; /* Center the main wrapper */
}

/* 2. Style and Position the TOC Sidebar */
.customer-profile .toc {
    /* GRID PLACEMENT: Place in the first column */
    grid-column: 1;

    /* STICKY POSITIONING */
    position: sticky;
    top: 2rem; /* How far from the top of the viewport it should stick */
    align-self: start; /* Keeps the sticky element positioned at the top of its grid cell */
    height: fit-content; /* Prevents the sidebar from filling the full height of the parent content */

    /* VISUAL STYLING (Adjusted from original) */
    background-color: var(--ast-global-color-5, #e6e7e8);
    padding: 1.5rem 1rem 1.5rem 2rem; /* Increased left padding for alignment */
    border-radius: 0;
    margin-bottom: 2rem;
    z-index: 10; /* Ensure links stay above content */
}

/* 3. Container for the main scrollable content */
.doc-content {
    /* GRID PLACEMENT: Place in the second column */
    grid-column: 2;
    padding: 2rem 1rem; /* Apply the page padding here */
    background-color: white;
}

/* --- General Document Styling (Kept Consistent) --- */
.customer-profile h1,
.customer-profile h2,
.customer-profile h3 {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: bold;
    color: var(--ast-global-color-3, #324b6b);
    border-bottom: 2px solid var(--ast-global-color-3, #324b6b);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.customer-profile h1 {
    font-size: 2rem;
    background-color: var(--ast-global-color-5, #e6e7e8);
}

.customer-profile h2 {
    font-size: 1.5rem;
}

.customer-profile h3 {
    font-size: 1.25rem;
}

.customer-profile p {
    margin-bottom: .5rem;
    line-height: 1.6;
}

.customer-profile ul {
    margin: 0 0 1rem 1.5rem;
    line-height: 1.6;
}

.customer-profile ul li {
    margin-bottom: 0.5rem;
}

.customer-profile strong {
    font-weight: bold;
}

.customer-profile a {
    color: var(--ast-global-color-3, #324b6b);
    text-decoration: underline;
}

.customer-profile a:hover {
    color: var(--ast-global-color-2, #F5821F);
}

/* 2. Style and Position the TOC Sidebar */
.customer-profile .toc {
    /* STICKY POSITIONING (No change here) */
    grid-column: 1;
    position: sticky;
    top: 170px;
    align-self: start;
    height: fit-content;

    /* REDUCED VISUAL STYLING */
    background-color: var(--ast-global-color-5, #e6e7e8);
    /* Reduced vertical padding (top/bottom) */
    padding: 1rem 1rem 1rem 1.5rem;
    border-radius: 0;
    /* Reduced margin below the TOC */
    margin-bottom: 1.5rem;
    z-index: 10;
}

/* TOC Specific Styling */
.customer-profile .toc h2 {
    /* Reduced vertical margins on the header */
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.4rem; /* Slightly smaller header */
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.5rem;
}

.customer-profile .toc ul {
    list-style: none;
    margin-left: 0;
    /* Reduced vertical margin for the main list */
    margin: 0.5rem 0 0 0;
    line-height: normal; /* Tighter line height for list items */
    padding-left: 0;
}

.customer-profile .toc ul li {
    /* Reduced spacing between list items */
    margin-bottom: 0.2rem;
}

.customer-profile .toc ul ul {
    /* Reduced indentation for nested lists */
    margin-left: 1rem;
}

.customer-profile .toc a {
    text-decoration: none;
    display: block;
    /* Reduced padding around the link text */
    padding: 0.1rem 0;
}

.customer-profile .toc a:hover {
    text-decoration: underline;
}

/* Table Styling */
.customer-profile table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 0;
}

.customer-profile table thead {
    background-color: var(--ast-global-color-3, #324b6b);
    color: white;
}

.customer-profile table th {
    padding: 0.25rem;
    text-align: left;
    font-weight: bold;
    border: none;
}

.customer-profile table tr:nth-child(even) {
    background-color: var(--ast-global-color-5, #e6e7e8);
}

.customer-profile table tbody tr:nth-child(odd) {
    background-color: white;
}

.customer-profile table td {
    padding: 0.25rem;
    border: none;
}

/* --- Responsive Fallback (Optional but recommended) --- */
@media (max-width: 900px) {
    .customer-profile {
        /* Switch to a single column stack layout on smaller screens */
        grid-template-columns: 1fr;
    }

    .customer-profile .toc {
        /* Reset sticky position and allow it to flow naturally at the top */
        position: relative;
        top: 170px;
        grid-column: 1; /* Place TOC at the top */
        padding: 1.5rem;
    }

    .doc-content {
        grid-column: 1; /* Place content below TOC */
        padding: 2rem 1rem 0;
    }
}