body.legal-preview::before,
body.legal-preview::after {
    display: none;
}

.legal-experience {
    min-height: 100svh;
    padding-bottom: 34px;
}

.legal-shell {
    width: min(1040px, 100%);
    margin: 0 auto;
    padding: 54px 0 24px;
}

.legal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: end;
    padding-bottom: 34px;
    border-bottom: 1px solid var(--line);
}

.legal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    color: var(--gold-light);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
}

.legal-kicker i {
    color: var(--gold);
}

.legal-hero h1 {
    max-width: 760px;
    margin: 0;
    color: #fff;
    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp(2.7rem, 7vw, 5.4rem);
    font-weight: 400;
    line-height: 0.96;
}

.legal-hero p {
    max-width: 680px;
    margin: 22px 0 0;
    color: var(--muted-soft);
    font-size: 1.03rem;
    font-weight: 300;
    line-height: 1.7;
}

.legal-updated {
    min-width: 190px;
    padding: 16px 18px;
    border: 1px solid rgba(214, 183, 92, 0.24);
    border-radius: 8px;
    background: rgba(16, 21, 29, 0.72);
    color: var(--muted-soft);
    font-size: 0.86rem;
    line-height: 1.45;
}

.legal-updated strong {
    display: block;
    margin-bottom: 4px;
    color: var(--gold-light);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 0.62rem;
    text-transform: uppercase;
}

.legal-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 54px;
    padding-top: 40px;
}

.legal-nav {
    position: sticky;
    top: 24px;
    align-self: start;
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(16, 21, 29, 0.68);
}

.legal-nav a {
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--muted-soft);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
    background: rgba(214, 183, 92, 0.1);
    color: var(--text);
}

.legal-content {
    min-width: 0;
    display: grid;
    gap: 26px;
}

.legal-section {
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line);
}

.legal-section:last-child {
    border-bottom: 0;
}

.legal-section h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 1.28rem;
    font-weight: 700;
}

.legal-section h3 {
    margin: 22px 0 10px;
    color: var(--gold-light);
    font-size: 0.98rem;
    font-weight: 700;
}

.legal-section p,
.legal-section li {
    color: var(--muted-soft);
    font-size: 1rem;
    font-weight: 300;
    line-height: 1.75;
}

.legal-section p {
    margin: 0 0 14px;
}

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

.legal-section ul {
    margin: 0;
    padding-left: 21px;
}

.legal-section li + li {
    margin-top: 8px;
}

.legal-callout {
    margin-top: 20px;
    padding: 18px 20px;
    border-left: 3px solid var(--gold);
    border-radius: 8px;
    background: rgba(214, 183, 92, 0.08);
}

.legal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.legal-action,
.legal-action-secondary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 0 17px;
    border-radius: 6px;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.legal-action {
    background: var(--gold);
    color: #11130e;
}

.legal-action:hover {
    color: #11130e;
    background: var(--gold-light);
}

.legal-action-secondary {
    border: 1px solid var(--line-strong);
    color: var(--text);
}

.legal-action-secondary:hover {
    border-color: rgba(214, 183, 92, 0.45);
    color: var(--gold-light);
}

@media (max-width: 820px) {
    .legal-hero,
    .legal-grid {
        grid-template-columns: 1fr;
    }

    .legal-nav {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .legal-experience {
        padding-inline: 20px;
    }

    .legal-shell {
        padding-top: 36px;
    }

    .legal-nav {
        grid-template-columns: 1fr;
    }

    .legal-hero h1 {
        font-size: 2.7rem;
    }
}

:is(html.light-theme-early, body.light-theme) :is(.legal-hero h1, .legal-section h2) { color: var(--text); }
:is(html.light-theme-early, body.light-theme) :is(.legal-kicker, .legal-kicker i, .legal-updated strong, .legal-section h3, .legal-action-secondary:hover) { color: #806018; }
:is(html.light-theme-early, body.light-theme) :is(.legal-updated, .legal-nav) {
    background: rgba(255, 255, 255, 0.92);
    border-color: var(--line);
}
:is(html.light-theme-early, body.light-theme) .legal-callout { background: #f9f1dc; }
