/* Opt-in presentation for the seven public legal and information documents. */
.am-legal-page.am-legal-document {
    --am-legal-reading-width: 55rem;
    --am-legal-navigation-width: 15rem;
    --am-legal-column-gap: clamp(2.5rem, 4vw, 3.5rem);
    --am-legal-sticky-top: 6rem;
    padding: 3rem 0 4.5rem;
    background: var(--am-surface);
    color: var(--am-text);
    font-size: 1rem;
}
.am-legal-document > .am-public-container {
    display: grid;
    grid-template-columns: var(--am-legal-navigation-width) minmax(0, var(--am-legal-reading-width));
    column-gap: var(--am-legal-column-gap);
    justify-content: start;
}
.am-legal-document .am-legal-header {
    grid-column: 2;
    min-width: 0;
    max-width: none;
    margin: 0 0 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--am-border);
    overflow-wrap: anywhere;
}
.am-legal-document .am-legal-header h1 {
    margin: 0 0 .875rem;
    color: var(--am-navy);
    font-size: clamp(2rem, 3.2vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.035em;
}
.am-legal-document .am-legal-header p {
    margin: 0 0 1rem;
    color: var(--am-text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}
.am-legal-document .am-legal-updated {
    display: block;
    color: var(--am-text-muted);
    font-size: .8125rem;
    font-weight: 500;
    line-height: 1.65;
}
.am-legal-document .am-legal-layout {
    grid-column: 1 / -1;
    grid-template-columns: var(--am-legal-navigation-width) minmax(0, 1fr);
    gap: var(--am-legal-column-gap);
    min-width: 0;
}
.am-legal-document .am-legal-navigation {
    position: static;
    min-width: 0;
    gap: .125rem;
    padding: 1rem;
    border: 1px solid var(--am-border);
    border-radius: var(--am-radius-sm);
    background: var(--am-slate-50);
    overflow-wrap: anywhere;
}
.am-legal-document .am-legal-navigation > span {
    margin: 0 0 .5rem;
    color: var(--am-navy);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.5;
    letter-spacing: normal;
    text-transform: none;
}
.am-legal-document .am-legal-navigation a {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: .5rem .625rem;
    border-radius: var(--am-radius-sm);
    color: var(--am-text-secondary);
    font-size: .875rem;
    line-height: 1.5;
    text-decoration: none;
}
.am-legal-document .am-legal-navigation a:is(:hover, :active, :focus-visible) {
    color: var(--am-brand-turquoise);
    background: var(--am-teal-light);
}
.am-legal-document .am-legal-navigation a[aria-current="location"] {
    color: var(--am-brand-turquoise);
    background: var(--am-teal-light);
    font-weight: 600;
    box-shadow: inset 3px 0 var(--am-brand-turquoise);
}
.am-legal-document .am-legal-content {
    min-width: 0;
    overflow-wrap: anywhere;
}
.am-legal-document .am-legal-section {
    margin: 0 0 2.5rem;
    padding: 0;
    border: 0;
    scroll-margin-top: var(--am-legal-sticky-top);
}
.am-legal-document .am-legal-section:last-child { margin-bottom: 0; }
.am-legal-document .am-legal-section :is(h2, h3, h4) {
    color: var(--am-navy);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.015em;
}
.am-legal-document .am-legal-section h2 {
    margin: 0 0 1rem;
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}
.am-legal-document .am-legal-section h3 { margin: 1.75rem 0 .75rem; font-size: 1.125rem; }
.am-legal-document .am-legal-section h4 { margin: 1.5rem 0 .625rem; font-size: 1rem; }
.am-legal-document .am-legal-section :is(p, li) {
    color: var(--am-text);
    font-size: 1rem;
    line-height: 1.75;
}
.am-legal-document .am-legal-section p { margin: 0 0 1rem; }
.am-legal-document .am-legal-section :is(ul, ol) {
    margin: 1rem 0;
    padding-inline-start: 1.5rem;
}
.am-legal-document .am-legal-section li + li { margin-top: .5rem; }
.am-legal-document .am-legal-section li :is(ul, ol) { margin-block: .5rem; }
.am-legal-document .am-legal-section strong { color: var(--am-navy); font-weight: 600; }
.am-legal-document .am-legal-content a {
    color: var(--am-brand-turquoise);
    text-decoration: underline;
    text-underline-offset: .18em;
    text-decoration-thickness: 1px;
}
.am-legal-document .am-legal-content a:hover { color: var(--am-navy); }
.am-legal-document a:focus-visible {
    outline: 2px solid var(--am-brand-turquoise);
    outline-offset: 3px;
    border-radius: var(--am-radius-sm);
}
.am-legal-document :is(.am-legal-notice, .am-legal-warning) {
    min-width: 0;
    margin: 1rem 0 1.25rem;
    padding: 1rem 1.125rem;
    gap: .5rem;
    border: 0;
    border-inline-start: 3px solid var(--am-border-strong);
    border-radius: 0 var(--am-radius-sm) var(--am-radius-sm) 0;
    background: var(--am-slate-50);
    line-height: 1.7;
}
.am-legal-document .am-legal-notice span { color: var(--am-text-secondary); font-size: .9375rem; }
.am-legal-document .am-legal-warning {
    border-inline-start-color: var(--am-warning);
    background: var(--am-warning-background);
}
.am-legal-document :is(.am-legal-notice, .am-legal-warning) p:last-child { margin-bottom: 0; }
.am-legal-document .am-legal-provider-list { gap: 0; margin: 1rem 0; }
.am-legal-document .am-legal-provider-list > div {
    padding: 1.25rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.am-legal-document .am-legal-provider-list > div + div { border-top: 1px solid var(--am-border); }
.am-legal-document .am-legal-provider-list > div > strong {
    display: block;
    margin-bottom: .625rem;
    font-size: 1.0625rem;
}
.am-legal-document .am-legal-provider-list p { margin: .5rem 0 0; }

html:has(.am-legal-document) { scroll-behavior: smooth; }

@media (min-width: 1100px) {
    .am-legal-document .am-legal-navigation {
        position: sticky;
        top: var(--am-legal-sticky-top);
        align-self: start;
        max-height: calc(100vh - var(--am-legal-sticky-top) - 1.5rem);
        max-height: calc(100dvh - var(--am-legal-sticky-top) - 1.5rem);
        overflow-y: auto;
    }
}
@media (max-width: 1099.98px) {
    .am-legal-page.am-legal-document { --am-legal-reading-width: 74ch; }
    .am-legal-document > .am-public-container {
        grid-template-columns: minmax(0, var(--am-legal-reading-width));
        justify-content: center;
    }
    .am-legal-document .am-legal-header { grid-column: 1; }
    .am-legal-document .am-legal-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
    .am-legal-document .am-legal-navigation {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1rem;
    }
    .am-legal-document .am-legal-navigation > span { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
    html:has(.am-legal-document) { scroll-behavior: auto; }
}
@media (max-width: 639.98px) {
    .am-legal-page.am-legal-document { padding-block: 2rem 3rem; }
    .am-legal-document .am-legal-header { margin-bottom: 1.5rem; }
    .am-legal-document .am-legal-navigation { grid-template-columns: minmax(0, 1fr); padding: .875rem; }
    .am-legal-document .am-legal-section { margin-bottom: 2rem; }
    .am-legal-document .am-legal-section :is(ul, ol) { padding-inline-start: 1.25rem; }
}
