:root {
    color-scheme: dark;
    --bg: #050706;
    --surface: #0b100d;
    --surface-soft: #111813;
    --line: rgba(255, 255, 255, 0.1);
    --text: #f4f7f5;
    --muted: #a6aea9;
    --green: #e5e7eb;
    --green-deep: #8b929a;
    --max: 920px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% -10%, rgba(139, 146, 154, 0.18), transparent 32rem),
        var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.7;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--green);
    outline-offset: 4px;
}

.legal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--line);
    background: rgba(5, 7, 6, 0.86);
    backdrop-filter: blur(18px);
}

.legal-header-inner,
.legal-footer-inner {
    width: min(calc(100% - 40px), 1120px);
    margin: 0 auto;
}

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

.legal-brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.legal-brand img {
    display: block;
    width: 154px;
    height: auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 650;
    text-decoration: none;
    transition: color 160ms ease;
}

.back-link:hover { color: var(--text); }

.legal-main {
    width: min(calc(100% - 40px), var(--max));
    margin: 0 auto;
    padding: 84px 0 96px;
}

.legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: var(--green);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.legal-eyebrow::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 16px rgba(229, 231, 235, 0.45);
}

h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(2.5rem, 7vw, 4.8rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.legal-lead {
    max-width: 720px;
    margin: 26px 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.22rem);
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-top: 28px;
    color: #7f8983;
    font-size: 0.86rem;
}

.legal-notice {
    margin: 44px 0 0;
    padding: 20px 22px;
    border: 1px solid rgba(229, 231, 235, 0.22);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(229, 231, 235, 0.1), rgba(139, 146, 154, 0.025));
    color: #d7e9de;
}

.legal-notice strong { color: var(--green); }

.legal-content {
    margin-top: 64px;
    border-top: 1px solid var(--line);
}

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

.legal-section h2 {
    margin: 0 0 18px;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.legal-section h3 {
    margin: 28px 0 10px;
    font-size: 1.05rem;
}

.legal-section p,
.legal-section li { color: #c2c9c5; }

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

.legal-section ul,
.legal-section ol {
    margin: 16px 0;
    padding-left: 22px;
}

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

.legal-section strong { color: var(--text); }

.legal-section a,
.contact-card a {
    color: var(--green);
    text-underline-offset: 3px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 26px;
}

.contact-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
}

.contact-card small {
    display: block;
    margin-bottom: 7px;
    color: #7f8983;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.contact-card strong {
    display: block;
    font-size: 1.05rem;
}

.legal-footer {
    border-top: 1px solid var(--line);
    background: #030504;
}

.legal-footer-inner {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    color: #7f8983;
    font-size: 0.84rem;
}

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

.legal-footer a {
    color: #aeb6b1;
    text-decoration: none;
}

.legal-footer a:hover { color: var(--text); }

@media (max-width: 700px) {
    .legal-header-inner,
    .legal-footer-inner,
    .legal-main { width: min(calc(100% - 28px), var(--max)); }

    .legal-header-inner { min-height: 64px; }
    .legal-brand img { width: 132px; }
    .back-link span { display: none; }
    .legal-main { padding: 62px 0 72px; }
    .legal-content { margin-top: 48px; }
    .legal-section { padding: 34px 0; }
    .contact-grid { grid-template-columns: 1fr; }
    .legal-footer-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 30px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; }
}

/* Sistema editorial v2 — inspirado em leitores de documentação, sem aparência de template */
:root {
    --bg: #080808;
    --surface: #101010;
    --surface-soft: #171717;
    --line: rgba(255, 255, 255, 0.095);
    --text: #f5f7f5;
    --muted: #9aa29d;
    --green: #e5e7eb;
    --green-deep: #8b929a;
    --max: 1180px;
}

body {
    background: var(--bg);
    font-family: "Poppins", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}

.legal-header {
    background: rgba(8, 8, 8, 0.92);
    border-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(140%);
}

.legal-header-inner {
    min-height: 76px;
}

.legal-brand img { width: 146px; }

.legal-doc-nav {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.025);
}

.legal-doc-nav a {
    padding: 8px 14px;
    border-radius: 999px;
    color: #929a95;
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
    transition: color 160ms ease, background 160ms ease;
}

.legal-doc-nav a:hover { color: var(--text); }

.legal-doc-nav a[aria-current="page"] {
    color: #111214;
    background: var(--green);
}

.back-link {
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.84rem;
}

.back-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.legal-main {
    padding: 68px 0 110px;
}

.legal-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: #7f8882;
    font-size: 0.86rem;
}

.legal-breadcrumb a {
    color: #aab2ad;
    text-decoration: none;
}

.legal-breadcrumb a:hover { color: var(--text); }
.legal-breadcrumb-separator { color: #505651; }

h1 {
    max-width: 760px;
    font-family: "Source Serif 4", Georgia, serif;
    font-weight: 600;
    font-size: clamp(2.7rem, 6vw, 4.65rem);
    line-height: 1.03;
    letter-spacing: -0.035em;
}

.legal-lead {
    max-width: 660px;
    margin-top: 22px;
    color: #aeb5b1;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: clamp(1.12rem, 1.9vw, 1.3rem);
    line-height: 1.62;
}

.legal-meta {
    margin-top: 24px;
    color: #747c77;
}

.legal-notice {
    max-width: 880px;
    margin: 48px 0 0;
    padding: 22px 24px;
    border-color: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: #111214;
    color: #cbd1cd;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.04rem;
    line-height: 1.7;
    box-shadow: inset 3px 0 0 var(--green);
}

.legal-layout {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: clamp(34px, 6vw, 76px);
    align-items: start;
    margin-top: 74px;
}

.legal-toc {
    position: sticky;
    top: 108px;
}

.legal-toc-label {
    display: block;
    margin-bottom: 15px;
    color: #69706c;
    font-size: 0.73rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.legal-toc nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 13px;
    border-left: 1px solid var(--line);
}

.legal-toc a {
    display: block;
    padding: 6px 0 6px 13px;
    color: #7e8781;
    font-size: 0.82rem;
    line-height: 1.35;
    text-decoration: none;
    transition: color 150ms ease, transform 150ms ease;
}

.legal-toc a:hover {
    color: var(--green);
    transform: translateX(2px);
}

.legal-content {
    min-width: 0;
    margin-top: 0;
    border-top: 0;
}

.legal-section {
    scroll-margin-top: 106px;
    padding: 0 0 48px;
    border-bottom: 0;
}

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

.legal-section h2 {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
    font-family: "Source Serif 4", Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.45rem, 2.7vw, 1.9rem);
    letter-spacing: -0.02em;
}

.section-number {
    flex: 0 0 auto;
    color: #626870;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.legal-section p,
.legal-section li {
    color: #b6bdb9;
    font-family: "Source Serif 4", Georgia, serif;
    font-size: 1.06rem;
    line-height: 1.78;
}

.legal-section li::marker { color: #737981; }

.contact-card {
    border-color: rgba(255, 255, 255, 0.09);
    border-radius: 16px;
    background: #0f1011;
    transition: border-color 160ms ease, transform 160ms ease;
}

.contact-card:hover {
    border-color: rgba(229, 231, 235, 0.3);
    transform: translateY(-2px);
}

.contact-card strong {
    overflow-wrap: anywhere;
}

.legal-footer {
    background: #050605;
}

@media (max-width: 900px) {
    .legal-layout {
        grid-template-columns: 1fr;
        gap: 44px;
        margin-top: 58px;
    }

    .legal-toc {
        position: static;
        overflow: hidden;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: #0f1011;
    }

    .legal-toc-label { margin: 0 8px 10px; }

    .legal-toc nav {
        overflow-x: auto;
        flex-direction: row;
        gap: 7px;
        padding: 0 0 3px;
        border: 0;
        scrollbar-width: none;
    }

    .legal-toc nav::-webkit-scrollbar { display: none; }

    .legal-toc a {
        flex: 0 0 auto;
        padding: 8px 11px;
        border: 1px solid var(--line);
        border-radius: 9px;
        background: rgba(255, 255, 255, 0.02);
        white-space: nowrap;
    }

    .legal-toc a:hover { transform: none; }
}

@media (max-width: 700px) {
    .legal-header-inner {
        min-height: 66px;
        gap: 12px;
    }

    .legal-brand img { width: 126px; }
    .legal-doc-nav { display: none; }
    .back-link { margin-left: auto; }
    .legal-main { padding: 48px 0 78px; }
    .legal-breadcrumb { margin-bottom: 17px; }
    h1 { font-size: clamp(2.45rem, 13vw, 3.45rem); }
    .legal-notice { margin-top: 36px; }
    .legal-layout { margin-top: 44px; }
    .legal-section { padding-bottom: 36px; }
    .legal-section + .legal-section { padding-top: 36px; }
    .legal-section h2 { gap: 9px; }
    .legal-footer-inner { gap: 20px; }
}
