/* Documentos legais públicos do Meu Palcco */
.legal-page {
    --legal-purple: #6d28d9;
    --legal-purple-dark: #4c1d95;
    --legal-orange: #f97316;
    --legal-ink: #20142f;
    --legal-text: #4d4459;
    --legal-muted: #71687c;
    --legal-line: #e9e4ee;
    --legal-surface: #fff;
    --legal-surface-soft: #faf8fc;
    --legal-focus: rgba(249,115,22,.22);
    margin: 0;
    color: var(--legal-text);
    background:
        radial-gradient(circle at 8% 0%, rgba(109,40,217,.10), transparent 28rem),
        radial-gradient(circle at 95% 8%, rgba(249,115,22,.09), transparent 24rem),
        #f7f4fa;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.72;
    -webkit-font-smoothing: antialiased;
}

.legal-page *,
.legal-page *::before,
.legal-page *::after {
    box-sizing: border-box;
}

.legal-page a {
    color: var(--legal-purple);
}

.legal-page a:hover {
    color: var(--legal-orange);
}

.legal-page a:focus-visible {
    border-radius: 4px;
    outline: 3px solid var(--legal-focus);
    outline-offset: 4px;
}

.legal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(233,228,238,.9);
    background: rgba(255,255,255,.90);
    backdrop-filter: blur(18px);
}

.legal-header__inner,
.legal-shell,
.legal-footer__inner {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.legal-header__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.legal-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--legal-ink);
    text-decoration: none;
}

.legal-brand__mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-size: .82rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--legal-orange), var(--legal-purple));
    box-shadow: 0 10px 24px rgba(109,40,217,.22);
}

.legal-brand strong,
.legal-brand small {
    display: block;
}

.legal-brand strong {
    font-size: 1.08rem;
    letter-spacing: -.02em;
}

.legal-brand small {
    margin-top: 1px;
    color: var(--legal-muted);
    font-size: .7rem;
}

.legal-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--legal-muted);
    font-size: .92rem;
    font-weight: 650;
    text-decoration: none;
}

.legal-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
    padding-block: 54px 80px;
}

.legal-toc {
    position: sticky;
    top: 104px;
    padding: 20px;
    border: 1px solid var(--legal-line);
    border-radius: 18px;
    background: rgba(255,255,255,.82);
}

.legal-toc strong {
    display: block;
    margin-bottom: 10px;
    color: var(--legal-ink);
    font-size: .82rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.legal-toc ol {
    max-height: calc(100vh - 170px);
    margin: 0;
    padding-left: 23px;
    overflow: auto;
    font-size: .86rem;
    line-height: 1.45;
}

.legal-toc li {
    margin: 7px 0;
    padding-left: 3px;
    color: var(--legal-muted);
}

.legal-toc li::marker {
    color: var(--legal-orange);
}

.legal-toc a {
    color: inherit;
    text-decoration: none;
}

.legal-document {
    overflow: hidden;
    border: 1px solid var(--legal-line);
    border-radius: 22px;
    background: var(--legal-surface);
    box-shadow: 0 24px 70px rgba(32,20,47,.09);
}

.legal-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(34px, 6vw, 66px);
    border-bottom: 1px solid var(--legal-line);
    background: linear-gradient(145deg, #fff 12%, #f5efff 70%, #fff3e8);
}

.legal-hero::after {
    content: "";
    position: absolute;
    top: -100px;
    right: -80px;
    width: 290px;
    height: 290px;
    border: 48px solid rgba(249,115,22,.07);
    border-radius: 50%;
}

.legal-eyebrow {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 0 14px;
    color: var(--legal-orange);
    font-size: .78rem;
    font-weight: 780;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.legal-eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    border-radius: 99px;
    background: var(--legal-orange);
}

.legal-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 760px;
    margin: 0;
    color: var(--legal-ink);
    font-size: clamp(2.15rem, 5vw, 4rem);
    font-weight: 720;
    letter-spacing: -.055em;
    line-height: 1.02;
}

.legal-hero__description {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 20px 0 0;
    font-size: clamp(1rem, 2vw, 1.14rem);
}

.legal-updated {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 22px 0 0;
    padding: 8px 12px;
    border: 1px solid rgba(249,115,22,.20);
    border-radius: 999px;
    color: var(--legal-muted);
    background: rgba(255,255,255,.78);
    font-size: .86rem;
    font-weight: 620;
}

.legal-content {
    padding: clamp(30px, 6vw, 66px);
}

.legal-content section {
    scroll-margin-top: 102px;
    padding: 0 0 38px;
}

.legal-content section + section {
    padding-top: 38px;
    border-top: 1px solid var(--legal-line);
}

.legal-content h2 {
    margin: 0 0 18px;
    color: var(--legal-ink);
    font-size: clamp(1.35rem, 2.4vw, 1.72rem);
    font-weight: 680;
    letter-spacing: -.03em;
    line-height: 1.25;
}

.legal-content h3 {
    margin: 26px 0 10px;
    color: var(--legal-ink);
    font-size: 1.05rem;
    font-weight: 680;
    line-height: 1.35;
}

.legal-content p {
    margin: 0 0 15px;
}

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

.legal-content ul {
    margin: 14px 0 18px;
    padding-left: 1.35rem;
}

.legal-content li {
    margin: 8px 0;
    padding-left: 4px;
}

.legal-content li::marker {
    color: var(--legal-orange);
}

.legal-card {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid rgba(109,40,217,.14);
    border-radius: 16px;
    background: var(--legal-surface-soft);
}

.legal-card strong {
    color: var(--legal-ink);
}

.legal-card--contact {
    display: grid;
    gap: 4px;
}

.legal-card--developer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-color: rgba(249,115,22,.24);
    background: linear-gradient(135deg, #fcf9ff, #fff6ed);
}

.legal-card--developer p {
    margin: 4px 0 0;
    color: var(--legal-muted);
    font-size: .92rem;
}

.legal-card--developer a {
    flex: 0 0 auto;
    font-weight: 700;
    text-decoration: none;
}

.legal-note {
    margin: 18px 0 0;
    padding: 17px 19px;
    border: 1px solid rgba(249,115,22,.22);
    border-left: 4px solid var(--legal-orange);
    border-radius: 14px;
    color: #5e493b;
    background: #fff9f3;
}

.legal-footer {
    border-top: 1px solid rgba(233,228,238,.9);
    background: #fff;
}

.legal-footer__inner {
    min-height: 94px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: var(--legal-muted);
    font-size: .86rem;
}

.legal-footer__copy {
    display: grid;
    gap: 2px;
}

.legal-footer__copy a {
    color: inherit;
    font-weight: 650;
    text-decoration: none;
}

.legal-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.legal-footer__links a {
    color: inherit;
    text-decoration: none;
}

.legal-footer__links a[aria-current="page"] {
    color: var(--legal-orange);
    font-weight: 700;
}

@media (max-width: 880px) {
    .legal-shell {
        grid-template-columns: 1fr;
        padding-top: 26px;
    }

    .legal-toc {
        position: static;
    }

    .legal-toc ol {
        max-height: 220px;
        column-count: 2;
        column-gap: 32px;
    }
}

@media (max-width: 620px) {
    .legal-header__inner,
    .legal-shell,
    .legal-footer__inner {
        width: min(100% - 24px, 1180px);
    }

    .legal-header {
        position: static;
    }

    .legal-header__inner {
        min-height: 64px;
    }

    .legal-back span {
        display: none;
    }

    .legal-shell {
        gap: 16px;
        padding-bottom: 40px;
    }

    .legal-toc {
        padding: 16px;
    }

    .legal-toc ol {
        column-count: 1;
    }

    .legal-document {
        border-radius: 18px;
    }

    .legal-hero,
    .legal-content {
        padding: 26px 22px;
    }

    .legal-content section {
        scroll-margin-top: 20px;
        padding-bottom: 30px;
    }

    .legal-content section + section {
        padding-top: 30px;
    }

    .legal-card--developer {
        align-items: flex-start;
        flex-direction: column;
    }

    .legal-footer__inner {
        align-items: flex-start;
        flex-direction: column;
        padding-block: 22px;
    }
}

@media print {
    .legal-page {
        background: #fff;
    }

    .legal-header,
    .legal-toc,
    .legal-footer {
        display: none;
    }

    .legal-shell {
        display: block;
        width: 100%;
        padding: 0;
    }

    .legal-document {
        border: 0;
        box-shadow: none;
    }

    .legal-hero,
    .legal-content {
        padding: 28px;
    }

    .legal-content section {
        break-inside: avoid;
    }
}
