:root {
  --bg: #f7f5f0;
  --card: #fffefa;
  --ink: #30251c;
  --muted: #6b5d4f;
  --accent: #8a5e2e;
  --accent-soft: #eee3d2;
  --line: #e5dfd4;
  --warn: #7a2e14;
  --warn-bg: #fbeee6;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Manrope', 'Segoe UI', Arial, sans-serif;
  --masthead-height: 88px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1510; --card: #251d16; --ink: #efe6da; --muted: #c0b09d;
    --accent: #dfb37b; --accent-soft: #34291e; --line: #4b3d2f; --warn: #f0b39a; --warn-bg: #3a2219;
  }
}
:root[data-theme="dark"] {
  --bg: #1c1510; --card: #251d16; --ink: #efe6da; --muted: #c0b09d;
  --accent: #dfb37b; --accent-soft: #34291e; --line: #4b3d2f; --warn: #f0b39a; --warn-bg: #3a2219;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
::selection { background: #e8d3b4; color: #30251c; }
.policy-document strong { font-weight: 600; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.85 var(--sans); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.policy-skip { position: absolute; top: 8px; left: 8px; z-index: 30; padding: 12px 16px; background: var(--card); color: var(--ink); transform: translateY(-180%); }
.policy-skip:focus { transform: none; }
/* Cabeçalho sólido acompanha o documento sem efeitos ou scripts. */
.policy-masthead { position: sticky; top: 0; z-index: 20; background: #1c1510; color: #f3e9d8; border-bottom: 1px solid rgba(217,178,124,.3); box-shadow: 0 2px 8px rgba(28,21,16,.06); }
.policy-masthead-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; max-width: 1120px; height: var(--masthead-height); margin-inline: auto; padding-inline: 24px; }
.policy-brand { display: inline-flex; align-items: center; gap: 16px; min-width: 0; color: #f3e9d8; text-decoration: none; }
.policy-brand img { display: block; height: 62px; width: auto; aspect-ratio: 150 / 181; flex-shrink: 0; object-fit: contain; }
.policy-brand > span { font: 500 36px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.policy-brand small { display: block; margin-top: 7px; color: #d9b27c; font: 500 9px/1.5 var(--sans); text-transform: uppercase; letter-spacing: .15em; }
.policy-back { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 48px; gap: 10px; padding: 0 20px; border: 1px solid rgba(217,178,124,.48); border-radius: 6px; background: rgba(217,178,124,.06); color: #f3e9d8; font-size: 13px; font-weight: 500; text-decoration: none; }
.policy-back svg { width: 16px; height: 16px; flex: 0 0 16px; color: #d9b27c; }
.policy-back:hover { border-color: #d9b27c; background: #34271b; }
.policy-masthead a:focus-visible { outline-color: #e8c796; }
/* Coluna de consulta + superfície única para o texto, sem dezenove caixas soltas. */
.wrap { display: grid; grid-template-columns: 192px minmax(0, 1fr); column-gap: 40px; max-width: 1120px; margin: 0 auto; padding: 48px 24px; }
.policy-sidebar { grid-column: 1; grid-row: 1 / 5; position: sticky; top: calc(var(--masthead-height) + 28px); align-self: start; padding: 4px 16px 0 0; }
.policy-sidebar-title { margin: 0 0 16px; color: var(--muted); font: 600 11px/1.5 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
.policy-sidebar ul { margin: 0; padding: 0; list-style: none; }
.policy-sidebar li { margin: 0 0 4px; }
.policy-sidebar a { display: flex; align-items: center; min-height: 48px; padding: 10px 12px; border-left: 2px solid transparent; border-radius: 0 4px 4px 0; color: var(--muted); font: 500 13px/1.6 var(--sans); text-decoration: none; }
.policy-sidebar a:hover, .policy-sidebar a:focus-visible { background: var(--accent-soft); color: var(--ink); border-left-color: var(--accent); }
.policy-intro { grid-column: 2; grid-row: 1; min-width: 0; margin-bottom: 28px; padding: 4px 0 28px; border-bottom: 1px solid var(--line); }
.kicker { margin-bottom: 14px; color: var(--accent); font: 600 11px/1.5 var(--sans); letter-spacing: .1em; text-transform: uppercase; }
h1 { margin: 0 0 18px; color: var(--ink); font: 500 clamp(28px, 3vw, 36px)/1.25 var(--sans); letter-spacing: -.025em; text-wrap: balance; }
.lead { max-width: 68ch; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.85; }
.policy-contents { grid-column: 2; grid-row: 2; min-width: 0; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); }
.policy-contents summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; padding: 14px 24px; list-style: none; cursor: pointer; border-radius: 6px; }
.policy-contents summary::-webkit-details-marker { display: none; }
.policy-contents summary:hover { background: var(--accent-soft); }
.policy-contents-label { color: var(--ink); font: 600 14px/1.5 var(--sans); }
.policy-contents-label > span { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.policy-contents-toggle { flex: 0 0 auto; width: 8px; height: 8px; margin-right: 4px; border-right: 1.5px solid var(--accent); border-bottom: 1.5px solid var(--accent); transform: rotate(45deg); }
.policy-contents[open] .policy-contents-toggle { transform: rotate(225deg); }
nav.toc { padding: 16px 24px 20px; border-top: 1px solid var(--line); }
nav.toc ol { margin: 0; padding-left: 24px; columns: 2; column-gap: 28px; font: 400 14px/1.6 var(--sans); }
nav.toc li { margin: 0; break-inside: avoid; padding-left: 4px; }
nav.toc li::marker { color: var(--accent); font-variant-numeric: tabular-nums; }
nav.toc a { display: inline-flex; align-items: center; min-height: 48px; padding-block: 6px; color: var(--ink); text-decoration: none; }
nav.toc a:hover { color: var(--accent); text-decoration: underline; }
.policy-document { grid-column: 2; grid-row: 3; min-width: 0; padding: 0 32px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); }
section { padding: 36px 0; scroll-margin-top: calc(var(--masthead-height) + 24px); }
section + section { border-top: 1px solid var(--line); }
section h2 { display: flex; align-items: baseline; gap: 12px; margin: 0 0 20px; color: var(--ink); font: 600 21px/1.45 var(--sans); letter-spacing: -.02em; text-wrap: balance; }
section h2 .n { display: inline-flex; align-items: center; justify-content: flex-start; flex: 0 0 auto; min-width: 26px; color: var(--accent); font: 600 13px/1.5 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: 0; }
h3 { margin: 24px 0 10px; color: var(--ink); font: 600 16px/1.5 var(--sans); }
p { margin: 0 0 18px; text-align: left; }
section > :last-child { margin-bottom: 0; }
ul, ol.alineas { margin: 0 0 20px; padding-left: 24px; }
ol.alineas { list-style: lower-alpha; }
li { margin: 6px 0; }
.destaque { margin: 22px 0; padding: 18px 20px; border-left: 3px solid var(--warn); border-radius: 4px; background: var(--warn-bg); }
.destaque p:last-child { margin-bottom: 0; }
.nota { margin: 22px 0; padding: 16px 20px; border-radius: 4px; background: var(--accent-soft); font-size: 15px; }
.tabela { overflow-x: auto; margin: 22px 0; }
table { width: 100%; min-width: 520px; border-collapse: collapse; font: 400 14px/1.7 var(--sans); }
th, td { padding: 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--accent-soft); font-weight: 600; }
.ref { color: var(--muted); font: 400 13px/1.75 var(--sans); }
footer { grid-column: 2; grid-row: 4; margin-top: 24px; color: var(--muted); text-align: center; font: 400 14px/1.6 var(--sans); }
footer a { display: inline-flex; align-items: center; min-height: 48px; }
@media (max-width: 1023px) {
  .wrap { display: block; max-width: 880px; padding-top: 32px; }
  .policy-masthead-inner { max-width: 880px; }
  .policy-sidebar { display: none; }
}
@media (max-width: 640px) {
  :root { --masthead-height: 76px; }
  .policy-masthead-inner { gap: 12px; padding-inline: 16px; }
  .policy-brand { gap: 10px; }
  .policy-brand img { height: 48px; }
  .policy-brand > span { font-size: 28px; }
  .policy-brand small { font-size: 7px; letter-spacing: .1em; }
  .policy-back { gap: 0; padding-inline: 12px; font-size: 12px; }
  .policy-back svg { display: none; }
  .wrap { padding: 28px 20px; }
  .policy-intro { margin-bottom: 20px; padding: 0 0 24px; }
  .policy-contents summary { padding-inline: 20px; }
  nav.toc { padding: 4px 20px 16px; }
  nav.toc ol { columns: 1; }
  .policy-document { padding-inline: 20px; }
  section { padding-block: 24px; }
  section h2 { align-items: flex-start; gap: 10px; font-size: 19px; }
  .destaque, .nota { padding: 16px; }
}
@media (max-width: 359px) {
  .policy-brand > span { font-size: 26px; }
  .policy-back { padding-inline: 10px; font-size: 11px; }
  .wrap { padding-inline: 16px; }
  .policy-document { padding-inline: 16px; }
}
@media (max-height: 560px) { .policy-sidebar { position: static; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: white; color: #222; }
  .policy-intro { padding: 0 0 20px; border: 0; background: white; box-shadow: none; }
  .policy-intro :is(h1, .lead, .kicker) { color: #222; }
  .policy-masthead, .policy-sidebar, .policy-skip, .policy-contents, footer { display: none; }
  .wrap { display: block; max-width: none; padding: 0; }
  .policy-document { padding: 0; border: 0; background: white; }
  section { padding: 16px 0; }
  h2, h3 { break-after: avoid; }
}
