:root {
  --papel: #eef0f4;
  --folha: #fbfcfe;
  --tinta: #161a33;
  --suave: #50566f;
  --linha: #cdd1de;
  --azul: #2438d6;
  --vermelho: #cf1b55;
  --ui: system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 16px/1.55 var(--ui);
  font-synthesis: none; /* nada de negrito ou itálico falso: só o que a fonte tem */
}

.topo {
  position: sticky; top: 0; z-index: 3;
  display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center;
  padding: 12px max(20px, calc((100vw - 1180px) / 2));
  background: var(--tinta); color: #fff;
}
.topo a { color: inherit; text-decoration: none; }
.marca { font: 700 20px "Outfit", var(--ui); margin-right: auto; }
.topo nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; }
.topo nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

main { max-width: 1220px; margin: 0 auto; padding: 0 20px; }
section { padding: 72px 0; border-bottom: 1px solid var(--linha); }

h1, h2 { font-family: "Urbanist", var(--ui); line-height: 1.02; margin: 0 0 16px; letter-spacing: -0.02em; }
h1 { font-size: clamp(44px, 8vw, 104px); font-weight: 800; }
h2 { font-size: clamp(30px, 4.5vw, 52px); font-weight: 700; }
.intro { max-width: 62ch; color: var(--suave); font-size: 18px; margin: 0 0 32px; }

.controles { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: end; margin-bottom: 24px; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; font-weight: 600; }
label.largo { flex: 1 1 260px; }
label.marcar { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; }
output { font-weight: 400; color: var(--suave); font-variant-numeric: tabular-nums; }
input, select, button { font: 400 16px var(--ui); color: var(--tinta); accent-color: var(--azul); }
input[type="text"], select, button {
  min-height: 44px; padding: 8px 12px;
  background: var(--folha); border: 1px solid #8a90a8; border-radius: 6px;
}
input[type="range"] { width: 180px; height: 28px; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--azul); outline-offset: 2px; }
.tinta select { border: 2px solid; font-weight: 600; }
.tinta.a, .tinta.a select { color: var(--azul); }
.tinta.b, .tinta.b select { color: var(--vermelho); }

#prova { display: block; width: 100%; height: clamp(220px, 40vw, 480px); background: var(--folha); border-radius: 4px; }

.fixos { position: sticky; top: 52px; z-index: 2; background: var(--papel); padding: 12px 0; border-bottom: 1px solid var(--linha); }
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { padding: 20px 0; border-bottom: 1px solid var(--linha); }
.lista li:last-child { border: 0; }
.ficha { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--suave); }
.ficha b { color: var(--tinta); }
.amostra { margin: 6px 0 0; line-height: 1.25; overflow-wrap: anywhere; }

.rolagem { overflow-x: auto; background: var(--folha); border-radius: 4px; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid var(--linha); padding: 10px; text-align: left; }
tbody th { font-size: 13px; white-space: nowrap; position: sticky; left: 0; background: var(--folha); z-index: 1; }
.glifos td { padding: 0; }
.glifos button { width: 100%; min-width: 52px; min-height: 68px; border: 0; border-radius: 0; background: none; font-size: 40px; line-height: 1; }
.glifos button:hover, .glifos button.sel { background: #dde2fb; }

.lupa { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 2px; margin-bottom: 24px; }
.lupa figure { margin: 0; background: var(--tinta); color: #fff; text-align: center; padding: 8px 0 12px; }
.lupa span { display: block; font-size: 112px; line-height: 1.3; }
.lupa figcaption { font-size: 13px; }

.medidas thead th { font-size: 13px; }
.barra { display: flex; align-items: center; gap: 10px; min-width: 170px; font-variant-numeric: tabular-nums; font-size: 14px; }
.barra i { height: 12px; background: var(--azul); }

.par { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.cartao { background: var(--folha); border-radius: 18px; padding: 28px; border: 1px solid var(--linha); }
.cartao h3 { margin: 20px 0 4px; font-size: 28px; line-height: 1.15; font-weight: 700; }
.cartao p { margin: 0 0 16px; color: var(--suave); }
.cartao dl { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 0 0 20px; font-variant-numeric: tabular-nums; }
.cartao dd { margin: 0; text-align: right; }
.cartao .total { font-weight: 700; font-size: 22px; border-top: 1px solid var(--linha); padding-top: 10px; }
.cartao .botao { display: block; text-align: center; background: var(--azul); color: #fff; border-radius: 10px; padding: 14px; font-weight: 600; }
.cartao select { width: 100%; font-family: var(--ui); }

#candidatas h3 { margin: 32px 0 4px; font-size: 24px; }
#candidatas a { color: var(--azul); }
.amostra-img { margin: 0 0 12px; }
.amostra-img img { display: block; max-width: 100%; height: auto; border-radius: 4px; }
.escolha { max-width: 320px; }
.nota { color: var(--suave); }
.degrau { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: baseline; border-bottom: 1px solid var(--linha); padding: 6px 0; }
.degrau small { color: var(--suave); font-variant-numeric: tabular-nums; }
.degrau span { font-size: clamp(24px, 4vw, 46px); overflow-wrap: anywhere; }

footer { max-width: 1220px; margin: 0 auto; padding: 32px 20px 64px; font-size: 13px; color: var(--suave); }
footer a { color: var(--azul); }

@media (max-width: 760px) { .fixos, .topo { position: static; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
