/* Páginas legais (privacidade.html e termos-de-uso.html).
   Mesmos tokens, fonte e componentes do index.html (layout em blocos:
   amarelo #F7FF30, preto, papel e branco). */
:root {
    color-scheme: light;
    --yellow: #F7FF30;
    --yellow-soft: #FCFF9A;
    --ink: #0E0E0E;
    --graphite: #1C1C1C;
    --paper: #F3F3EE;
    --white: #FFFFFF;
    --line: rgba(14,14,14,.12);
    --muted: #5C5C5C;
    --muted-dark: #A6A6A6;
    --r: 28px;
    --r-sm: 16px;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; background: var(--white); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 32px); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--white); padding: .75rem 1rem; z-index: 999; }
.skip-link:focus { left: 1rem; top: 1rem; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.footer :focus-visible { outline-color: var(--yellow); }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .95rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: .95rem; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .25s ease, transform .25s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #ecf51f; }
.btn-ink { background: var(--ink); color: var(--white); }
.btn-ink:hover { background: #2a2a2a; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .btn:hover { transform: none; } }

/* ---------- nav ---------- */
.nav { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 1.5rem; }
.nav-logo { height: 34px; width: auto; }
.nav-actions { display: flex; align-items: center; gap: 1.25rem; }
.nav-login { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .92rem; text-decoration: none; }
.nav-login svg { width: 18px; height: 18px; }
.nav-login:hover, .nav-back:hover { opacity: .7; }
.nav-back { font-weight: 600; font-size: .92rem; text-decoration: none; }

/* ---------- capa ---------- */
.doc-hero { padding: clamp(1rem, 2vw, 1.5rem) 0 0; }
.doc-hero .blk { background: var(--yellow); border-radius: var(--r); padding: clamp(2rem, 5vw, 4rem); }
.tag { display: inline-flex; align-items: center; gap: .6rem; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.25rem; }
.tag::before { content: ""; width: 22px; height: 2px; background: currentColor; }
.doc-hero h1 { font-size: clamp(2.3rem, 4.6vw, 4rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; }
.doc-hero .doc-sub { font-size: clamp(1.02rem, 1.3vw, 1.18rem); max-width: 46em; margin-top: 1rem; }
.doc-meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.doc-meta span { background: var(--ink); color: var(--white); border-radius: 999px; padding: .4rem .9rem; font-size: .8rem; font-weight: 600; }
.doc-meta span b { color: var(--yellow); font-weight: 600; }

/* ---------- corpo: sumário + texto ---------- */
.doc { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); padding: clamp(2.5rem, 6vw, 5rem) 0; align-items: start; }
.toc { position: sticky; top: 96px; background: var(--paper); border-radius: var(--r-sm); padding: 1.5rem; max-height: calc(100vh - 120px); overflow: auto; }
.toc summary { list-style: none; font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; cursor: default; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: .15rem; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: .6rem; text-decoration: none; font-size: .86rem; line-height: 1.35; padding: .35rem .5rem; border-radius: 10px; color: var(--muted); }
.toc a::before { content: counter(toc, decimal-leading-zero); font-weight: 600; color: var(--ink); min-width: 1.5em; }
.toc a:hover { background: var(--white); color: var(--ink); }
.toc a.on { background: var(--ink); color: var(--white); }
.toc a.on::before { color: var(--yellow); }
.toc .toc-extra::before { content: "→"; }

.doc-body { max-width: 780px; }
.doc-sec { padding-bottom: 2.25rem; margin-bottom: 2.25rem; border-bottom: 1px solid var(--line); }
.doc-sec:last-child { border-bottom: 0; }
.doc-sec h2 { display: flex; align-items: baseline; gap: .9rem; font-size: clamp(1.45rem, 2.2vw, 2rem); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-bottom: 1.1rem; }
.doc-sec h2 .num { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; min-width: 2.4rem; height: 2.4rem; padding: 0 .4rem; border-radius: 999px; background: var(--yellow); font-size: .95rem; letter-spacing: 0; }
.doc-body p { font-size: 1.02rem; margin-bottom: .9rem; }
.doc-body p:last-child { margin-bottom: 0; }
.doc-body ul { list-style: none; margin: .25rem 0 1rem; display: flex; flex-direction: column; gap: .45rem; }
.doc-body ul li { position: relative; padding-left: 1.6rem; font-size: 1.02rem; }
.doc-body ul li::before { content: ""; position: absolute; left: 0; top: .62em; width: 10px; height: 10px; border-radius: 50%; background: var(--yellow); box-shadow: inset 0 0 0 2px var(--ink); }
.doc-body ul.defs li::before { border-radius: 3px; }
.doc-body a { font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.doc-body a:hover { background: var(--yellow); }
.tbl { overflow-x: auto; margin: .5rem 0 1.25rem; border-radius: var(--r-sm); border: 1px solid var(--line); }
.tbl table { width: 100%; border-collapse: collapse; font-size: .94rem; }
.tbl th { background: var(--ink); color: var(--white); text-align: left; font-weight: 600; padding: .85rem 1rem; }
.tbl td { padding: .85rem 1rem; border-top: 1px solid var(--line); vertical-align: top; }
.tbl tr:nth-child(even) td { background: var(--paper); }
.tbl td:first-child { font-weight: 600; }
.doc-refs li { font-size: .92rem !important; color: var(--muted); }
.doc-related { background: var(--paper); border-radius: var(--r-sm); padding: 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.doc-related p { margin: 0 !important; font-weight: 600; }

/* ---------- rodapé (igual ao do site) ---------- */
.footer { background: var(--ink); color: var(--white); padding: clamp(3rem, 6vw, 5rem) 0 2rem; }
.footer-top { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3rem; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-logo { height: 40px; width: auto; margin-bottom: 1.25rem; }
.footer p, .footer a { color: var(--muted-dark); font-size: .88rem; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--white); }
.f-head { font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--white) !important; margin-bottom: 1rem; }
.f-links { display: flex; flex-direction: column; gap: .55rem; }
.f-offices { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; padding: 2.5rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.f-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-top: 1.75rem; }
.f-socials { display: flex; gap: .5rem; }
.f-socials a { width: 40px; height: 40px; border-radius: 50%; background: var(--graphite); display: inline-flex; align-items: center; justify-content: center; }
.f-socials svg { width: 17px; height: 17px; fill: none; stroke: var(--white); stroke-width: 2; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
    .footer-top { grid-template-columns: 1fr 1fr; }
    .footer-top > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .doc { grid-template-columns: 1fr; }
    .toc { position: static; max-height: none; }
    .toc summary { cursor: pointer; display: flex; justify-content: space-between; }
    .toc summary::after { content: "+"; font-size: 1.1rem; line-height: 1; }
    .toc[open] summary::after { content: "–"; }
    .nav-login { display: none; }
}
@media (max-width: 600px) {
    .nav-actions .btn { padding: .7rem 1.1rem; font-size: .85rem; }
    .nav-back { display: none; }
    .footer-top { grid-template-columns: 1fr; }
    .f-offices { grid-template-columns: 1fr; }
    .doc-sec h2 { gap: .6rem; }
}
@media print {
    .nav, .toc, .footer, .doc-related .btn { display: none !important; }
    .doc { grid-template-columns: 1fr; padding: 0; }
    .doc-hero .blk { background: none; border: 2px solid var(--ink); }
    .doc-sec { break-inside: avoid-page; }
}
