.pagina-escala .pag { gap: 14px; }
.es-titulo { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; }
.es-titulo .selo { padding: 4px 12px; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.es-grade { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px; align-items: start; }

.es-vai { padding: 22px 26px 24px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.es-vai > .marca-fundo { right: -110px; bottom: -130px; top: auto; width: 300px; opacity: 0.12; }
.es-vai .rotulo-caixa { color: var(--on-d); }
.es-vai h2 { margin: 0; font-size: 24px; line-height: 1.1; color: #FFFFFF; }
.es-vai .lista-quadrada { gap: 8px; }
.es-vai .lista-quadrada li { font-size: 15px; color: var(--on-d2); }
.es-vai .lista-quadrada li::before { background: var(--green); }
.es-quando { align-self: stretch; margin: 4px 0 0; padding-top: 12px; border-top: 1px solid var(--line-d); font-size: 14px; line-height: 1.5; font-weight: 600; color: #FFFFFF; }
.es-vai .link-seta, .es-vai .link-seta:hover { color: #FFFFFF; font-size: 14px; }
.es-vai .link-seta .seta { color: var(--green); }

.es-regra { padding: 20px 26px 18px; gap: 14px; }
.es-regra-cab { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }

.es-aviso { display: inline-flex; padding: 6px 16px 6px 12px; background: var(--ink); color: #FFFFFF; font-size: 12px; font-weight: 800; line-height: 1.35;
  letter-spacing: 0.06em; text-transform: uppercase; clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%); }
.es-regra-cab h2 { margin: 0; font-size: 24px; line-height: 1.1; }
.es-regra-cab p { margin: 0; max-width: 780px; font-size: 14px; line-height: 1.5; color: var(--ink2); }
.es-regra-corpo { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 28px; align-items: start; }
.es-controles { display: flex; flex-direction: column; gap: 14px; }
.es-campo { gap: 4px; }
.es-campo .par-cab { align-items: center; }
.es-campo .par-cab label { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ink2); }
.es-valor { font-size: 22px; line-height: 1; white-space: nowrap; }
.es-campo .regua { margin-top: -6px; }
.es-leitura { margin: 0; padding: 12px 14px; background: var(--tint); font-size: 14px; line-height: 1.5; color: var(--ink); }
.es-leitura strong { font-weight: 800; }

.es-regra-pe { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 12px 28px; padding-top: 12px; border-top: 1px solid var(--hair); }
.es-conta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.es-formula { margin: 0; font-size: 16px; line-height: 1.45; }
.es-formula > span { white-space: nowrap; }
.es-formula sup { font-size: 0.68em; line-height: 0; }
.es-notas { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.es-regra-pe .fonte { margin: 0; font-size: 13px; }
.es-regra-pe strong { color: var(--ink2); }

.es-area { position: relative; height: 260px; margin: 18px 40px 46px 44px; border-left: 1.5px solid var(--border); border-bottom: 1.5px solid var(--border); }
.es-linha { position: absolute; left: 0; right: 0; bottom: calc(var(--y, 0) * 100%); border-top: 1px solid var(--hair); }
.es-linha-ref { border-top-color: var(--border); }
.es-eixo-y { position: absolute; left: -44px; width: 36px; bottom: calc(var(--y, 0) * 100%); transform: translateY(50%); text-align: right; font-size: 11px; color: var(--muted); }
.es-eixo-x { position: absolute; left: calc(var(--x, 0) * 100%); bottom: -20px; transform: translateX(-50%); font-size: 12px; color: var(--muted); }
.es-curva { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.es-curva polyline { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.es-piso { position: absolute; left: 0; right: 0; bottom: calc(var(--y, 0) * 100%); border-top: 1.5px dashed var(--slate2); }
.es-piso span { position: absolute; left: 8px; bottom: 3px; font-size: 12px; font-weight: 600; color: var(--slate); white-space: nowrap; }
.es-ref { position: absolute; left: calc(var(--x, 0) * 100%); bottom: calc(var(--y, 0) * 100%); width: 14px; height: 14px; margin: 0 0 -7px -7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 3px #FFFFFF; z-index: 1; }
.es-ref-rotulo { position: absolute; left: calc(var(--x, 0) * 100% + 12px); bottom: calc(var(--y, 0) * 100% + 8px); font-size: 12px; font-weight: 700; color: var(--green-t); white-space: nowrap; }
.es-ponta { position: absolute; font-size: 16px; line-height: 1; color: var(--ink); white-space: nowrap; }
.es-ponta.inicio { left: 8px; bottom: calc(var(--y, 0) * 100% + 6px); }
.es-ponta.fim { left: calc(100% + 8px); bottom: calc(var(--y, 0) * 100%); transform: translateY(50%); }
.es-titulo-x { position: absolute; left: 50%; bottom: -42px; transform: translateX(-50%); font-size: 12px; color: var(--ink2); white-space: nowrap; }
.legenda i.es-leg-curva { width: 22px; height: 3px; background: var(--ink); }
.legenda i.es-leg-ref { border-radius: 50%; background: var(--green); }
.legenda i.es-leg-piso { border-top-color: var(--slate2); }

@media screen and (max-width: 1100px) {
  .es-grade { grid-template-columns: minmax(0, 1fr); }
  .es-vai > .marca-fundo { bottom: -150px; }
}
@media screen and (max-width: 860px) {
  .es-regra-corpo, .es-regra-pe { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .es-regra-pe { gap: 12px; }
}
@media screen and (max-width: 760px) {
  .es-vai { padding: 20px 18px; }
  .es-vai h2, .es-regra-cab h2 { font-size: 22px; }
  .es-regra { padding: 18px 16px 16px; }
  .es-area { height: 220px; margin: 18px 34px 46px 34px; }
  .es-eixo-y { left: -36px; width: 30px; }

  .es-ref-rotulo span { display: block; }
  .es-ref-rotulo .es-ref-sep { display: none; }
  .es-ref-rotulo { line-height: 1.25; bottom: calc(var(--y, 0) * 100% + 10px); }
}
