:root {
  color-scheme: light;
  --ink: #17191b;
  --body: #41454a;
  --muted: #777c82;
  --soft: #f7f7f6;
  --line: #e9e9e7;
  --line-strong: #dedfdd;
  --font-display: 'Sora', sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font-body); font-size: 15px; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 5px; border-radius: 2px; }
button, input { font: inherit; }
::selection { background: #e4e6e9; color: #17191b; }
.container { width: min(100% - 96px, 1232px); margin-inline: auto; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; border: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--ink); color: white; padding: 12px 18px; text-decoration: none; border-radius: 8px; }
.skip-link:focus { top: 16px; }

.site-header { border-bottom: 1px solid var(--line); }
.site-header__inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.brand-symbol, .footer-brand__symbol { flex: none; display: inline-flex; align-items: center; justify-content: center; background: #191b1d; overflow: hidden; }
.brand-symbol { width: 37px; height: 37px; border-radius: 11px; }
.brand-symbol img { display: block; width: 22px; height: 27px; }
.brand-name { font: 700 22px/1 var(--font-display); letter-spacing: -.075em; }
.top-nav { display: flex; gap: 35px; align-self: stretch; align-items: center; }
.top-nav__link { position: relative; color: #72767b; text-decoration: none; font-weight: 600; font-size: 13.5px; transition: color .16s ease; white-space: nowrap; }
.top-nav__link:hover, .top-nav__link.is-current { color: var(--ink); }
.top-nav__link.is-current::after { content: ''; position: absolute; height: 2px; background: var(--ink); left: 0; right: 0; bottom: -33px; }

.hero { padding: 93px 0 71px; border-bottom: 1px solid var(--line); }
.hero__text { max-width: 1050px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(39px, 5.2vw, 66px); font-weight: 600; letter-spacing: -.073em; line-height: 1.2; margin: 0; text-wrap: balance; }
.hero__description { color: #63686d; font-size: 17px; line-height: 1.7; margin: 20px 0 0; max-width: 670px; }
.hero__meta { display: flex; align-items: center; flex-wrap: wrap; column-gap: 13px; row-gap: 6px; color: #85898d; font-size: 12.5px; font-weight: 500; margin-top: 34px; }
.hero__meta-separator { width: 3px; height: 3px; border-radius: 50%; background: #afb3b5; }

.document-layout { display: grid; grid-template-columns: 266px minmax(0, 1fr); column-gap: clamp(58px, 8.6vw, 138px); align-items: start; padding-block: 57px 133px; }
/* A lateral precisa ser o próprio item sticky do grid.
   Fazer sticky apenas no filho não funciona quando o aside tem a mesma altura do conteúdo. */
.document-sidebar { position: sticky; top: 24px; align-self: start; min-width: 0; max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); }
.sidebar-sticky { max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); overflow-y: auto; padding-right: 9px; scrollbar-width: thin; scrollbar-color: #dedede transparent; }
.sidebar-label { margin: 4px 0 20px 14px; color: #8c9094; font-size: 12px; font-weight: 600; }
.toc { display: flex; flex-direction: column; gap: 1px; }
.toc-link { display: grid; grid-template-columns: 27px minmax(0,1fr); gap: 7px; align-items: start; border-left: 2px solid transparent; padding: 10px 10px 10px 12px; border-radius: 0 5px 5px 0; color: #74797c; text-decoration: none; font-size: 12.5px; line-height: 1.52; font-weight: 500; transition: border-color .16s, background .16s, color .16s; }
.toc-link:hover { color: var(--ink); background: #f7f7f6; }
.toc-link.is-active { color: #232527; border-left-color: #17191b; background: #f6f6f5; font-weight: 650; }
.toc-number { color: #a3a7aa; font-variant-numeric: tabular-nums; font-size: 11px; padding-top: 1px; }
.toc-link.is-active .toc-number { color: #606368; }
.sidebar-help { margin: 23px 0 0 14px; padding-top: 22px; display: inline-flex; align-items: center; gap: 7px; border-top: 1px solid var(--line); font-size: 12.5px; text-decoration: none; font-weight: 600; color: #676c70; }
.sidebar-help:hover { color: var(--ink); }
.sidebar-help .ph { font-size: 14px; }
.document-content { min-width: 0; max-width: 790px; }
.mobile-toc { display: none; }
.document-details { padding: 23px 27px; border: 1px solid var(--line); border-radius: 9px; background: #fbfbfa; margin-bottom: 18px; }
.document-details dl { display: grid; gap: 11px; margin: 0; }
.document-details dl > div { display: grid; grid-template-columns: 103px minmax(0,1fr); gap: 12px; align-items: baseline; }
.document-details dt { font-size: 12px; color: #85898c; font-weight: 600; }
.document-details dd { margin: 0; color: #33373a; font-size: 12.5px; font-weight: 550; line-height: 1.65; overflow-wrap: anywhere; }
.detail-secondary { color: #868b8f; font-weight: 450; }
.document-details a { text-decoration-color: #b4b5b7; text-underline-offset: 3px; }
.document-details a:hover { color: #000; }
.document-details code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .91em; }
.legal-section { border-bottom: 1px solid var(--line); padding: 52px 0 47px; scroll-margin-top: 24px; }
.legal-section:last-child { border-bottom: 0; }
.section-heading { display: flex; align-items: center; gap: 13px; margin: 0 0 24px; }
.section-number { align-self: baseline; transform: translateY(-1px); color: #a4a8ab; font-family: var(--font-display); font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.03em; flex: none; }
.section-heading h2 { font: 600 clamp(20px,2.15vw,23px)/1.44 var(--font-display); letter-spacing: -.052em; margin: 0; }
.copy-link { color: #a6aaae; background: transparent; border: 0; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 5px; cursor: pointer; opacity: 0; margin-left: 1px; transition: background .16s, color .16s, opacity .16s; flex: none; }
.section-heading:hover .copy-link, .copy-link:focus-visible, .copy-link.copied { opacity: 1; }
.copy-link:hover { color: #252627; background: var(--soft); }
.copy-link .ph { font-size: 17px; }
.section-copy { color: var(--body); font-size: 14.5px; line-height: 1.93; font-weight: 450; letter-spacing: .002em; }
.section-copy p { margin: 0 0 17px; }
.section-copy p:last-child { margin-bottom: 0; }
.section-copy a { text-decoration-color: #aab1b8; text-underline-offset: 3px; overflow-wrap: anywhere; }
.section-copy a:hover { color: #14181a; text-decoration-color: currentColor; }
.section-copy strong { font-weight: 650; color: #252729; }
.section-copy code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86em; color: #303236; background: #f5f5f3; padding: 2px 5px; border-radius: 4px; }
.section-copy table { width: 100%; border-spacing: 0; border-collapse: collapse; font-size: 12.5px; line-height: 1.62; margin: 17px 0 21px; display: block; overflow-x: auto; scrollbar-color: #bbb transparent; }
.section-copy th, .section-copy td { vertical-align: top; text-align: left; min-width: 150px; border-bottom: 1px solid var(--line); padding: 13px 17px 13px 0; }
.section-copy th { white-space: nowrap; font-weight: 650; color: #252729; border-top: 1px solid var(--line-strong); }
.section-copy td:first-child, .section-copy th:first-child { min-width: 145px; }
.section-copy td:not(:first-child), .section-copy th:not(:first-child) { min-width: 172px; }
.section-copy td:last-child, .section-copy th:last-child { padding-right: 0; min-width: 205px; }
.section-copy td { color: #52575c; }
.article-end { display: flex; gap: 24px; justify-content: space-between; align-items: center; margin-top: 51px; padding: 31px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.article-end strong { font: 600 16px/1.5 var(--font-display); letter-spacing: -.04em; }
.article-end p { margin: 7px 0 0; font-size: 13.5px; color: var(--muted); }
.contact-link { flex: none; display: inline-flex; justify-content: center; align-items: center; gap: 13px; background: #1b1d20; border: 1px solid #1b1d20; color: white; text-decoration: none; border-radius: 7px; padding: 12px 16px; font-size: 12.5px; font-weight: 650; transition: background .16s, transform .16s; }
.contact-link:hover { background: #393c40; transform: translateY(-1px); }
.contact-link .ph { font-size: 16px; }
.back-to-top { display: inline-flex; align-items: center; gap: 9px; color: #757a7d; text-decoration: none; font-size: 12.5px; margin-top: 34px; font-weight: 600; }
.back-to-top:hover { color: var(--ink); }
.back-to-top .ph { font-size: 15px; }
.site-footer { border-top: 1px solid var(--line); }
.site-footer__inner { display: flex; align-items: center; justify-content: space-between; min-height: 112px; gap: 28px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 12px; color: #808589; font-weight: 550; }
.footer-brand__symbol { width: 25px; height: 25px; border-radius: 7px; }
.footer-brand__symbol img { display: block; }
.footer-separator { color: #b5b8ba; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 28px; color: #818588; font-size: 12px; font-weight: 500; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

@media (max-width: 1040px) {
  .container { width: min(100% - 68px, 1232px); }
  .document-layout { grid-template-columns: 226px minmax(0,1fr); gap: 54px; }
  .toc-link { font-size: 12px; }
}
@media (max-width: 800px) {
  .container { width: min(100% - 52px, 660px); }
  .hero { padding: 73px 0 54px; }
  .hero h1 { font-size: clamp(38px, 8vw, 55px); letter-spacing: -.065em; }
  .hero__description { font-size: 15px; margin-top: 15px; }
  .hero__meta { margin-top: 27px; }
  .document-layout { display: block; padding-block: 28px 90px; }
  .document-sidebar { display: none; }
  .document-content { max-width: none; }
  /* O índice acompanha a leitura sem esconder o conteúdo ou depender de JS. */
  .mobile-toc {
    display: block;
    position: sticky;
    top: 12px;
    z-index: 20;
    margin-bottom: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }
  .mobile-toc[open] { border-color: var(--line-strong); }
  .mobile-toc summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 19px; font-size: 13px; font-weight: 600; list-style: none; }
  .mobile-toc summary::-webkit-details-marker { display: none; }
  .mobile-toc summary .ph { color: #6e7377; font-size: 15px; transition: transform .18s; }
  .mobile-toc[open] summary .ph { transform: rotate(180deg); }
  /* Dropdown sobreposto: abrir o índice não desloca o artigo ou as âncoras. */
  .mobile-toc__links {
    position: absolute;
    top: calc(100% + 6px);
    left: -1px;
    right: -1px;
    display: flex;
    flex-direction: column;
    padding: 5px 9px 11px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background: #fff;
    max-height: min(360px, calc(100dvh - 104px));
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: 0 12px 28px rgb(0 0 0 / 6%);
  }
  .mobile-toc .toc-link { font-size: 12.5px; padding: 10px 12px; }
  .legal-section { padding: 43px 0 40px; scroll-margin-top: 94px; }
  .section-heading h2 { font-size: 21px; }
  .copy-link { opacity: 1; }
  .site-footer__inner { min-height: 126px; }
}
@media (max-width: 540px) {
  .container { width: calc(100% - 40px); }
  .site-header__inner { min-height: 73px; }
  .brand { gap: 8px; }
  .brand-symbol { width: 32px; height: 32px; border-radius: 9px; }
  .brand-symbol img { width: 19px; height: 22px; }
  .brand-name { font-size: 20px; }
  .top-nav { gap: 19px; }
  .top-nav__link { font-size: 11.8px; }
  .top-nav__link.is-current::after { bottom: -29px; }
  .hero { padding: 58px 0 48px; }
  .hero h1 { font-size: clamp(36px, 10vw, 48px); line-height: 1.2; }
  .hero__description { line-height: 1.75; font-size: 14.5px; margin-top: 17px; }
  .hero__meta { font-size: 11.5px; margin-top: 24px; }
  .document-layout { padding-top: 21px; padding-bottom: 78px; }
  .document-details { padding: 20px; }
  .document-details dl > div { display: block; }
  .document-details dt { margin-bottom: 2px; }
  .document-details dd { font-size: 12.5px; }
  .section-heading { gap: 10px; margin-bottom: 19px; }
  .section-heading h2 { font-size: 19px; }
  .section-number { font-size: 12px; }
  .section-copy { font-size: 14px; line-height: 1.85; }
  .section-copy table { font-size: 12px; }
  .article-end { align-items: flex-start; flex-direction: column; gap: 20px; margin-top: 35px; }
  .site-footer__inner { flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; padding-block: 28px; }
  .footer-links { gap: 17px; font-size: 11.5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
@media print {
  .site-header, .site-footer, .document-sidebar, .mobile-toc, .copy-link, .article-end, .back-to-top { display: none !important; }
  .container { width: 100%; }
  .hero { padding: 0 0 20px; }
  .hero h1 { font-size: 30pt; }
  .document-layout { display: block; padding-block: 8px 0; }
  .document-content { max-width: 100%; }
  .legal-section { break-inside: avoid-page; padding-block: 24px; }
  a { text-decoration: none; }
  .section-copy { color: #000; }
}
