:root {
  color-scheme: light;
  --pagina: #fcfcfd;
  --superficie: #fff;
  --painel: #f4f5f6;
  --tinta: #19191b;
  --texto: #44464c;
  --suave: #595e66;
  --linha: #dddfe3;
  --vidro: #fcfcfdf2;
  --laranja: #be4300;
  --marca: #ff6a00;
  --marca-texto: var(--laranja);
  --marca-suave: var(--realce);
  --tinta-2: var(--texto);
  --sombra-forte: var(--sombra);
  --no-botao: #fff;
  --erro: #a62925;
  --positivo: #276242;
  --realce: #fff1e8;
  --borda-realce: #f1c5ab;
  --sombra: 0 2px 4px #16181d08, 0 14px 35px -24px #16181d38;
  --fonte: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --pagina: #151618;
  --superficie: #1c1d20;
  --painel: #232529;
  --tinta: #f3f3f5;
  --texto: #c8cbd1;
  --suave: #aeb3bd;
  --linha: #36393e;
  --vidro: #1c1d20f2;
  --laranja: #ffa574;
  --no-botao: #24140c;
  --erro: #ffada8;
  --positivo: #9adbb4;
  --realce: #2f231d;
  --borda-realce: #754a30;
  --sombra: 0 2px 4px #0003, 0 14px 35px -24px #000b;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--pagina); color: var(--tinta); font: 400 1rem/1.65 var(--fonte); }
button, input { font: inherit; }
button { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--laranja); text-underline-offset: .18em; }
ul, p, h1, h2, figure { margin: 0; }
:focus-visible { outline: 2px solid var(--laranja); outline-offset: 4px; }
.pular { position: absolute; z-index: 10; inset: 12px auto auto 12px; transform: translateY(-150%); background: var(--superficie); padding: 8px 12px; }
.pular:focus { transform: none; }
.site-limite { width: min(1120px, calc(100% - 36px)); margin-inline: auto; }
.nota-limite { width: min(780px, calc(100% - 40px)); margin-inline: auto; }
.nota-ampla { width: min(1040px, calc(100% - 40px)); margin-inline: auto; }
main :is(section[id], article[id], h2[id], .entrega-resultado) { scroll-margin-top: 86px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 15px;
  border: 1px solid var(--linha);
  border-radius: 10px;
  background: var(--superficie);
  color: var(--tinta);
  font-size: .925rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--painel); }
.btn-primario { border-color: transparent; background: var(--laranja); color: var(--no-botao); }
.btn-primario:hover { background: var(--laranja); filter: brightness(.95); }

.site-topo { position: relative; z-index: 3; padding-top: 16px; }
.site-barra {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  padding: 8px 10px 8px 20px;
  border: 1px solid var(--linha);
  border-radius: 32px;
  background: var(--vidro);
  box-shadow: var(--sombra);
}
.marca { display: inline-flex; align-items: center; flex: none; gap: 10px; color: var(--suave); font-size: .875rem; font-weight: 600; text-decoration: none; }
.marca img { width: 90px; }
.marca span { padding-inline-start: 10px; border-inline-start: 1px solid var(--linha); }
.site-menu { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
.site-menu a { color: var(--texto); padding: 7px 12px; border-radius: 18px; text-decoration: none; font-size: .9rem; font-weight: 500; }
.site-menu a:hover { color: var(--tinta); background: var(--painel); }
.site-acoes { display: flex; align-items: center; gap: 6px; }
.icone-botao {
  display: grid;
  place-items: center;
  flex: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--linha);
  border-radius: 50%;
  background: var(--superficie);
  color: var(--tinta);
  cursor: pointer;
}
.icone-botao:hover { background: var(--painel); color: var(--laranja); }
.sol { display: none; }
[data-theme="dark"] .lua { display: none; }
[data-theme="dark"] .sol { display: block; }
.menu-botao { display: none; }
.menu-botao span { width: 14px; height: 2px; border-radius: 2px; background: currentColor; box-shadow: 0 -4px currentColor, 0 4px currentColor; }

.nota-abertura { padding-block: clamp(48px, 7vw, 88px) 32px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; padding: 0; list-style: none; }
.tags li { padding: 3px 10px; border: 1px solid var(--linha); border-radius: 999px; background: var(--superficie); color: var(--suave); font-size: .8125rem; font-weight: 600; }
h1 { margin-block: 16px 18px; max-width: 23ch; font-size: clamp(2.4rem, 6.4vw, 3.7rem); font-weight: 650; letter-spacing: -.058em; line-height: 1.03; text-wrap: balance; }
.nota-resumo { max-width: 59ch; color: var(--texto); font-size: clamp(1.075rem, 2vw, 1.25rem); line-height: 1.55; text-wrap: pretty; }
.nota-meta { margin-top: 13px; color: var(--suave); font-size: .875rem; }
.nota-corpo h3 { margin: 19px 0 8px; font-size: 1.125rem; line-height: 1.3; }
.nota-corpo p + p { margin-top: 10px; }
.formula { margin-block: 18px; padding: 14px 17px; border: 1px solid var(--borda-realce); border-inline-start: 3px solid var(--laranja); border-radius: 10px; background: var(--realce); }
.nota-corpo .formula p { margin: 0; }
.nota-video { display: grid; justify-items: start; gap: 9px; margin-block: 20px; }
.nota-video iframe { width: 100%; min-height: 200px; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: var(--painel); }

.nota-indice { position: sticky; z-index: 2; top: 0; padding-block: 8px; }
.indice-barra {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border: 1px solid var(--linha);
  border-radius: 15px;
  background: var(--vidro);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--sombra);
}
.indice-titulo { flex: none; padding-inline: 6px; color: var(--suave); font-size: .8125rem; font-weight: 600; }
.indice-barra ul { display: flex; align-items: stretch; gap: 2px; min-width: 0; overflow-x: auto; padding: 4px 3px; list-style: none; scrollbar-width: thin; scrollbar-color: var(--linha) transparent; }
.indice-barra li { flex: none; }
.indice-barra a { display: block; padding: 7px 8px; border-radius: 8px; color: var(--texto); font-size: .875rem; font-weight: 550; text-decoration: none; white-space: nowrap; }
.indice-barra a:hover { background: var(--painel); color: var(--tinta); }
.indice-barra a[aria-current="location"] { background: var(--realce); color: var(--laranja); }
.indice-botao { display: none; }

.nota-corpo { padding-block: 30px 16px; }
.nota-corpo section + section { margin-top: 39px; padding-top: 34px; border-top: 1px solid var(--linha); }
.nota-corpo h2 { margin-bottom: 10px; scroll-margin-top: 88px; font-size: clamp(1.6rem, 3.2vw, 2rem); font-weight: 650; line-height: 1.15; letter-spacing: -.032em; text-wrap: balance; }
.nota-corpo p { max-width: 69ch; color: var(--texto); font-size: 1.0625rem; }
.nota-corpo .destaque {
  max-width: none;
  margin-top: 20px;
  padding: 13px 16px;
  border: 1px solid var(--borda-realce);
  border-inline-start: 3px solid var(--laranja);
  border-radius: 10px;
  background: var(--realce);
  color: var(--tinta);
  font-size: .975rem;
}
.nota-foto { margin-top: 20px; }
.nota-foto img { width: 100%; max-height: 320px; object-fit: cover; object-position: center 65%; border-radius: 12px; }
.nota-foto figcaption, .nota-tabela caption { margin-top: 7px; color: var(--suave); text-align: left; font-size: .875rem; }
.nota-tabela { width: 100%; margin-top: 17px; border: 1px solid var(--linha); border-radius: 12px; border-spacing: 0; background: var(--superficie); color: var(--texto); font-size: .925rem; }
.nota-tabela caption { margin: 0 0 7px; }
.nota-tabela :is(th, td) { padding: 10px 12px; vertical-align: top; text-align: left; }
.nota-tabela th { color: var(--tinta); font-weight: 600; }
.nota-tabela thead th { background: var(--painel); }
.nota-tabela thead th:first-child { border-top-left-radius: 11px; }
.nota-tabela thead th:last-child { border-top-right-radius: 11px; }
.nota-tabela tbody :is(th, td) { border-top: 1px solid var(--linha); }
.checklist { display: grid; gap: 7px; margin-top: 14px; padding: 12px; border: 1px solid var(--linha); border-radius: 12px; background: var(--superficie); list-style: none; }
.checklist label { display: flex; gap: 10px; align-items: baseline; padding: 5px 6px; cursor: pointer; }
.checklist input { width: 17px; height: 17px; margin: 0; flex: none; accent-color: var(--laranja); }
.nota-relacionado { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-block: 15px 62px; color: var(--suave); font-size: .925rem; }
.nota-relacionado a { font-weight: 600; }
.site-rodape { border-top: 1px solid var(--linha); background: var(--superficie); }
.rodape-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; min-height: 78px; padding-block: 14px; }
.rodape-barra a:not(.marca) { color: var(--texto); font-size: .875rem; text-decoration: none; }
.rodape-barra a:hover { text-decoration: underline; }
.rodape-barra small { margin-inline-start: auto; color: var(--suave); }
.rodape-barra .marca img { width: 75px; }

@media (max-width: 760px) {
  .site-barra { justify-content: space-between; gap: 8px; }
  .menu-botao { display: grid; }
  .site-topo[data-pronto] .site-menu {
    position: absolute;
    inset: calc(100% + 7px) 0 auto;
    display: grid;
    padding: 8px;
    border: 1px solid var(--linha);
    border-radius: 18px;
    background: var(--vidro);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: var(--sombra);
  }
  .site-topo[data-pronto] .site-menu:not(.aberto) { display: none; }
  .site-topo:not([data-pronto]) .site-barra { flex-wrap: wrap; }
  .site-topo:not([data-pronto]) .site-menu { flex: 0 0 100%; flex-wrap: wrap; }
  .site-menu a { min-height: 44px; padding-block: 10px; }
}

@media (max-width: 620px) {
  .indice-titulo { display: none; }
  .indice-barra { display: block; padding: 0; }
  .indice-botao { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 48px; padding: 8px 13px; border: 0; border-radius: inherit; background: transparent; font-size: .875rem; font-weight: 650; text-align: left; cursor: pointer; }
  .indice-atual { overflow: hidden; color: var(--suave); font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
  .indice-botao::after { width: 7px; height: 7px; flex: none; margin-inline-start: auto; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); content: ""; }
  .indice-botao[aria-expanded="true"]::after { transform: rotate(225deg); }
  .indice-barra ul {
    position: absolute;
    inset: calc(100% + 6px) 0 auto;
    display: grid;
    max-height: 52vh;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--linha);
    border-radius: 12px;
    background: var(--superficie);
    box-shadow: var(--sombra);
  }
  .indice-botao[aria-expanded="false"] + ul { display: none; }
  .indice-barra a { min-height: 42px; padding-block: 10px; white-space: normal; }
}

@media (max-width: 480px) {
  .site-limite { width: calc(100% - 24px); }
  .nota-limite { width: calc(100% - 32px); }
  .nota-ampla { width: calc(100% - 32px); }
  .nota-abertura { padding-bottom: 23px; }
  .nota-corpo { padding-top: 25px; }
  .site-barra { padding-left: 13px; }
  .marca img { width: 80px; }
  .rodape-barra small { width: 100%; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
