@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");
:root {
    --blue: #2185d5;
    --ink: #071019;
    --panel: #0d1a26;
    --light: #f3f3f3;
    --muted: #9db0c0;
    --border: rgba(255, 255, 255, 0.11);
}
* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: radial-gradient(
            circle at 10% 0,
            rgba(33, 133, 213, 0.15),
            transparent 28%
        ),
        var(--ink);
    color: var(--light);
    font-family: Poppins, system-ui, sans-serif;
    line-height: 1.75;
}
.container {
    width: min(calc(100% - 32px), 980px);
    margin: auto;
}
header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(7, 16, 25, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
header .container {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
header img {
    width: 190px;
}
header a:last-child {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 0.72rem;
}
.legal-hero {
    padding: 100px 0 55px;
}
.kicker {
    color: #86ccff;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    font-weight: 800;
}
.legal-hero h1 {
    font-size: clamp(2.6rem, 7vw, 5.3rem);
    line-height: 1;
    letter-spacing: -0.055em;
    margin: 12px 0 22px;
}
.legal-hero p {
    max-width: 760px;
    color: #b6c5d0;
    font-size: 1.05rem;
}
.notice {
    padding: 20px 22px;
    border-left: 4px solid #f2a53b;
    border-radius: 0 14px 14px 0;
    background: rgba(242, 165, 59, 0.08);
    color: #d5c3a5;
    font-size: 0.84rem;
    margin: 0 0 36px;
}
.notice strong {
    color: #ffd38f;
}
.notice.blue {
    border-color: var(--blue);
    background: rgba(33, 133, 213, 0.08);
    color: #add7f6;
}
.legal-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 42px;
    align-items: start;
    padding-bottom: 100px;
}
.toc {
    position: sticky;
    top: 105px;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 19px;
    background: rgba(255, 255, 255, 0.025);
}
.toc strong {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    margin-bottom: 10px;
}
.toc a {
    display: block;
    color: #8095a6;
    font-size: 0.7rem;
    padding: 5px 0;
}
.toc a:hover {
    color: #9fd6ff;
}
.article {
    min-width: 0;
}
.article section {
    scroll-margin-top: 100px;
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.article section:first-child {
    padding-top: 0;
}
.article h2 {
    font-size: clamp(1.45rem, 3vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: -0.035em;
    margin: 0 0 16px;
}
.article h3 {
    font-size: 1rem;
    margin: 25px 0 8px;
}
.article p,
.article li {
    color: #9eb0be;
    font-size: 0.88rem;
}
.article strong {
    color: #e9f1f6;
}
.article a {
    color: #82caff;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.article ul {
    padding-left: 22px;
}
.article table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 0.76rem;
}
.article th,
.article td {
    padding: 12px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.article th {
    background: rgba(33, 133, 213, 0.1);
    color: #cfeaff;
}
.placeholder {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(242, 165, 59, 0.13);
    color: #ffd18d;
    font-weight: 700;
}
.legal-card {
    padding: 20px;
    border: 1px solid rgba(33, 133, 213, 0.26);
    border-radius: 16px;
    background: rgba(33, 133, 213, 0.055);
}
.legal-card p:last-child {
    margin-bottom: 0;
}
.refs {
    display: grid;
    gap: 10px;
}
.refs a {
    display: block;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
}
.updated {
    display: inline-block;
    margin-top: 12px;
    color: #718696;
    font-size: 0.72rem;
}
footer {
    padding: 30px 0;
    border-top: 1px solid var(--border);
    background: #050d14;
    color: #6f8392;
    font-size: 0.72rem;
}
footer .container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}
@media (max-width: 800px) {
    .legal-layout {
        grid-template-columns: 1fr;
    }
    .toc {
        position: relative;
        top: auto;
    }
    .legal-hero {
        padding-top: 70px;
    }
    .article table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}
@media (max-width: 520px) {
    header img {
        width: 160px;
    }
    .legal-hero {
        padding-top: 55px;
    }
    .article p,
    .article li {
        font-size: 0.82rem;
    }
}
body {
    position: relative;
    isolation: isolate;
    background: #071019;
    overflow-x: hidden;
}
.legal-background {
    position: fixed;
    inset: -8%;
    z-index: -4;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    filter: saturate(1.06) contrast(1.06) brightness(0.56);
    transform: scale(1.12);
    transition: opacity 0.7s ease;
    will-change: transform;
}
.legal-background.ready {
    opacity: 0.34;
}
.legal-background::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(7, 16, 25, 0.68),
        rgba(7, 16, 25, 0.9) 48%,
        rgba(7, 16, 25, 0.98)
    );
}
.legal-background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
            90deg,
            rgba(33, 133, 213, 0.055) 1px,
            transparent 1px
        ),
        linear-gradient(180deg, rgba(33, 133, 213, 0.045) 1px, transparent 1px),
        radial-gradient(
            circle at 18% 15%,
            rgba(33, 133, 213, 0.22),
            transparent 0 24%
        );
    background-size: 84px 84px, 84px 84px, auto;
    animation: legalGrid 20s linear infinite;
    mix-blend-mode: screen;
}
.legal-back-button {
    position: relative;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 0 18px !important;
    border: 1px solid rgba(33, 133, 213, 0.5) !important;
    border-radius: 999px !important;
    background: linear-gradient(
        135deg,
        rgba(33, 133, 213, 0.2),
        rgba(33, 133, 213, 0.06)
    ) !important;
    color: #d9efff !important;
    font-size: 0.7rem !important;
    font-weight: 800;
    letter-spacing: 0.07em;
    box-shadow: 0 0 28px rgba(33, 133, 213, 0.12);
    overflow: hidden;
}
.legal-back-button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        115deg,
        transparent 0%,
        rgba(255, 255, 255, 0.18) 48%,
        transparent 58%
    );
    transform: translateX(-130%);
    transition: transform 0.7s ease;
}
.legal-back-button:hover {
    border-color: #6dc2ff !important;
    box-shadow: 0 0 35px rgba(33, 133, 213, 0.22);
    transform: translateY(-1px);
}
.legal-back-button:hover::before {
    transform: translateX(130%);
}
.legal-back-button span {
    font-size: 1rem;
}
.legal-hero .container,
.legal-layout,
.notice,
header .container {
    position: relative;
    z-index: 1;
}
.toc,
.article section,
.notice,
.legal-card {
    backdrop-filter: blur(12px);
}
.article section {
    padding-left: 18px;
    padding-right: 18px;
    border-radius: 16px;
    background: linear-gradient(
        145deg,
        rgba(8, 21, 32, 0.68),
        rgba(8, 18, 28, 0.46)
    );
    margin-bottom: 12px;
    border: 1px solid rgba(255, 255, 255, 0.055);
}
.legal-whatsapp {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 30;
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2da5fa, #2185d5);
    color: #fff;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    box-shadow: 0 18px 45px rgba(33, 133, 213, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.legal-whatsapp svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}
.legal-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 24px 55px rgba(33, 133, 213, 0.42);
}
@keyframes legalGrid {
    0% {
        background-position: 0 0, 0 0, center;
    }
    100% {
        background-position: 84px 0, 0 84px, center;
    }
}
@media (max-width: 620px) {
    .legal-back-button {
        padding: 0 13px !important;
        font-size: 0.58rem !important;
    }
    .legal-whatsapp {
        width: 54px;
        padding: 0;
        justify-content: center;
    }
    .legal-whatsapp span {
        display: none;
    }
    .legal-background.ready {
        opacity: 0.27;
    }
}

/* Ajustes premium v1.8 */
header .legal-back-button,
.legal-back-button,
.legal-back-button:link,
.legal-back-button:visited,
.legal-back-button:hover,
.legal-back-button:focus-visible {
    text-decoration: none !important;
    text-underline-offset: 0 !important;
}
.legal-back-button {
    min-height: 48px;
    padding: 0 21px !important;
    border: 1px solid rgba(123, 199, 255, 0.58) !important;
    background: linear-gradient(
            135deg,
            rgba(50, 166, 255, 0.25),
            rgba(16, 61, 98, 0.58)
        ),
        rgba(7, 22, 35, 0.88) !important;
    color: #eef9ff !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28),
        0 0 28px rgba(33, 133, 213, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
    transition: transform 0.22s ease, border-color 0.22s ease,
        box-shadow 0.22s ease, background 0.22s ease;
}
.legal-back-button::after {
    content: "";
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: inherit;
    pointer-events: none;
}
.legal-back-button:hover,
.legal-back-button:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(145, 214, 255, 0.9) !important;
    background: linear-gradient(
            135deg,
            rgba(58, 174, 255, 0.36),
            rgba(19, 75, 119, 0.7)
        ),
        rgba(7, 22, 35, 0.92) !important;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.34),
        0 0 38px rgba(33, 133, 213, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.legal-whatsapp {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 80;
    width: 58px;
    height: 58px;
    min-height: 58px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
    border: 0;
    background: #1fbc63;
    color: #fff;
    text-decoration: none !important;
    box-shadow: 0 15px 40px rgba(16, 150, 75, 0.35),
        0 0 0 0 rgba(31, 188, 99, 0.28);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.legal-whatsapp svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}
.legal-whatsapp::after {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    min-width: max-content;
    padding: 10px 14px;
    border: 1px solid rgba(64, 214, 139, 0.45);
    border-radius: 10px;
    color: #eafff3;
    background: rgba(5, 22, 16, 0.96);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35),
        0 0 24px rgba(31, 188, 99, 0.14);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    opacity: 0;
    pointer-events: none;
    transform: translate(10px, -50%) scale(0.96);
    transform-origin: right center;
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}
.legal-whatsapp::before {
    content: "";
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    width: 10px;
    height: 10px;
    border-top: 1px solid rgba(64, 214, 139, 0.45);
    border-right: 1px solid rgba(64, 214, 139, 0.45);
    background: rgba(5, 22, 16, 0.96);
    opacity: 0;
    pointer-events: none;
    transform: translate(8px, -50%) rotate(45deg);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.legal-whatsapp:hover,
.legal-whatsapp:focus-visible {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 18px 48px rgba(16, 150, 75, 0.44),
        0 0 0 8px rgba(31, 188, 99, 0.08);
}
.legal-whatsapp:hover::after,
.legal-whatsapp:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%) scale(1);
}
.legal-whatsapp:hover::before,
.legal-whatsapp:focus-visible::before {
    opacity: 1;
    transform: translate(0, -50%) rotate(45deg);
}
@media (max-width: 620px) {
    .legal-whatsapp {
        right: 16px;
        bottom: 16px;
        width: 54px;
        height: 54px;
        min-height: 54px;
    }
    .legal-whatsapp::after,
    .legal-whatsapp::before {
        display: none;
    }
}

/* Alinhamento da marca nas páginas legais igual ao cabeçalho principal */
header .brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    line-height: 0;
}
header .brand img {
    display: block;
    width: 117px !important;
    height: auto !important;
    object-fit: contain;
}

/* Pulso discreto do WhatsApp nas páginas legais */
@keyframes legalWhatsappSoftPulse {
    0%, 72%, 100% {
        box-shadow: 0 15px 40px rgba(16, 150, 75, 0.35), 0 0 0 0 rgba(31, 188, 99, 0.22);
    }
    84% {
        box-shadow: 0 17px 44px rgba(16, 150, 75, 0.42), 0 0 0 10px rgba(31, 188, 99, 0.09);
    }
    92% {
        box-shadow: 0 16px 42px rgba(16, 150, 75, 0.39), 0 0 0 4px rgba(31, 188, 99, 0.05);
    }
}
.legal-whatsapp {
    animation: legalWhatsappSoftPulse 3.8s ease-in-out infinite;
}
.legal-whatsapp:hover,
.legal-whatsapp:focus-visible {
    animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
    .legal-whatsapp { animation: none !important; }
}
