:root{
  --bg:#f4f8f5;
  --card:#fff;
  --text:#061936;
  --muted:#64748b;
  --border:#dbe3ea;
  --green:#166534;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,Arial,sans-serif;background:linear-gradient(120deg,#f8fafc,#eef7f0);color:var(--text)}
.page{width:min(1180px,calc(100% - 28px));margin:0 auto;padding:24px 0 48px}

.public-banner{
  width:100%;
  aspect-ratio:24 / 5;
  min-height:120px;
  max-height:220px;
  border-radius:22px;
  overflow:hidden;
  border:1px dashed #cbd5e1;
  background-color:#eef8ec;
  background-image:url('img/banner-topo.png');
  background-size:contain;
  background-repeat:no-repeat;
  background-position:center;
  margin-bottom:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#64748b;
}
.public-banner span{font-weight:500;letter-spacing:.01em}

.hero{text-align:center;margin-bottom:22px}
.hero h1{font-size:clamp(22px,2.4vw,32px);line-height:1.12;margin:0 0 8px;font-weight:650;letter-spacing:-.02em}
.hero p{font-size:clamp(13px,1.2vw,16px);margin:0;color:#5b6f8b}
.card{background:rgba(255,255,255,.96);border:1px solid var(--border);border-radius:24px;box-shadow:0 24px 70px rgba(15,23,42,.08);padding:28px}
.consulta-card{max-width:760px;margin:0 auto}
.consulta-intro{margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid #e5e7eb}
.consulta-intro h2{font-size:22px;margin:0 0 6px;font-weight:650;letter-spacing:-.01em}
.consulta-intro p{margin:0;color:var(--muted);font-weight:400;line-height:1.4}
.form-grid{display:grid;gap:18px}
.form-grid-consulta{grid-template-columns:1fr 1fr}
.span-2{grid-column:1 / -1}
.form-group{position:relative}
.form-group label{display:block;font-weight:600;margin-bottom:8px;font-size:15px}
.form-group input{width:100%;height:54px;border:1px solid var(--border);border-radius:16px;padding:0 16px;font-size:17px;font-weight:500;color:var(--text);outline:none;background:#fff}
.form-group input:focus{border-color:#166534;box-shadow:0 0 0 4px rgba(22,101,52,.10)}
.help{display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;border-radius:99px;background:#eef2ff;color:#1d4ed8;font-size:13px;font-weight:650;cursor:help}
.tooltip{display:none;position:absolute;z-index:20;left:0;top:27px;width:min(330px,90vw);background:#0f172a;color:#fff;border-radius:12px;padding:12px;font-size:13px;line-height:1.35;box-shadow:0 18px 40px rgba(15,23,42,.25)}
.codigo-group label:hover + input + .tooltip,.help:hover~.tooltip,.help:focus~.tooltip{display:block}
.recaptcha-wrap{margin-top:18px}
.btn-primary{margin-top:22px;width:100%;height:58px;border:0;border-radius:16px;background:#166534;color:#fff;font-size:18px;font-weight:650;cursor:pointer;box-shadow:0 12px 28px rgba(22,101,52,.18)}
.btn-primary:hover{filter:brightness(.96)}

.resultado-card{margin:0 auto}
.resultado-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:18px}
.resultado-head h2{font-size:24px;margin:0 0 4px;font-weight:650;letter-spacing:-.01em;line-height:1.08}
.resultado-head p{margin:0;color:var(--muted);font-weight:400}
.info-box{background:#eff6ff;border:1px solid #bfdbfe;color:#1e40af;padding:9px 12px;border-radius:12px;margin:18px 0 0;font-weight:400;line-height:1.35;font-size:12.5px}

.legenda{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:22px}
.legenda-item{display:inline-flex;align-items:center;gap:9px;border:1px solid var(--border);background:#fff;border-radius:999px;padding:9px 13px;font-weight:500;color:#1f2937;cursor:pointer;white-space:nowrap}
.legenda-item span{width:18px;height:18px;border-radius:6px;flex:0 0 auto}
.legenda-item em{font-style:normal;color:#64748b;font-size:12px}
.legenda-item.active{box-shadow:0 0 0 3px rgba(22,101,52,.12);border-color:#166534}
.limpar-filtro{background:#f8fafc;color:#334155}

.numeros-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(136px,1fr));gap:12px;align-items:stretch}
.numero-chip{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;min-height:82px;border:0;border-radius:18px;background:var(--cor);color:#fff;padding:13px 14px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;cursor:pointer;box-shadow:0 10px 22px color-mix(in srgb,var(--cor) 22%,transparent);transition:transform .18s ease,box-shadow .18s ease;text-align:center}
.numero-chip strong{font-size:23px;font-weight:800;letter-spacing:.045em;line-height:1}
.numero-chip small{font-size:11px;font-weight:400;line-height:1;opacity:.78;font-family:Inter,Arial,sans-serif}
.numero-chip:hover{transform:translateY(-2px) scale(1.02);box-shadow:0 14px 28px color-mix(in srgb,var(--cor) 26%,transparent)}

.regulamento-wrap{
    margin:-25px 0 25px 0;
    text-align:center;
}

.btn-regulamento{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-height:48px;
    padding:0 22px;

    border-radius:14px;

    background:#fff;
    border:1px solid #dbe3ea;

    color:#166534;
    font-size:15px;
    font-weight:600;

    text-decoration:none;

    transition:.2s;
}

.btn-regulamento:hover{
    background:#f8fafc;
    transform:translateY(-1px);
}

@media(max-width:820px){
  .page{width:min(100% - 24px,1180px);padding-top:14px;padding-bottom:34px}
  .card{padding:20px;border-radius:22px}
  .form-grid-consulta{grid-template-columns:1fr}
  .span-2{grid-column:auto}
  .hero h1{font-size:28px}
  .hero p{font-size:15px;line-height:1.35}
  .consulta-intro h2{font-size:20px}
  .resultado-head{display:block;margin-bottom:14px}
  .resultado-head h2{font-size:25px;word-break:break-word}
  .resultado-head p{font-size:15px;line-height:1.35}
  .legenda{flex-wrap:nowrap;overflow-x:auto;gap:8px;margin:12px -4px 18px;padding:0 4px 4px;scrollbar-width:none}
  .legenda::-webkit-scrollbar{display:none}
  .legenda-item{padding:8px 12px;font-size:14px;gap:8px}
  .legenda-item span{width:16px;height:16px;border-radius:5px}
  .limpar-filtro{font-size:13px;padding-inline:12px}
  .info-box{font-size:12px}
}

@media(max-width:640px){
  body{background:linear-gradient(130deg,#f8fafc,#eef7f0)}
  .page{width:100%;padding:12px 10px 30px}
  .public-banner{
    /* Banner mobile: mostra a arte inteira, sem cortar texto/laterais */
    aspect-ratio:24 / 5;
    min-height:auto;
    max-height:none;
    border-radius:18px;
    background-size:contain;
    background-repeat:no-repeat;
    background-position:center;
    background-color:#eef8ec;
    margin-bottom:18px;
  }
  .hero{margin-bottom:16px;text-align:left;padding:0 4px}
  .hero h1{font-size:28px;line-height:1.08;margin-bottom:8px}
  .hero p{font-size:14px;color:#607089}
  .card{border-radius:22px;padding:18px;box-shadow:0 16px 48px rgba(15,23,42,.08)}
  .consulta-card{max-width:none}
  .consulta-intro{margin-bottom:18px;padding-bottom:16px}
  .consulta-intro h2{font-size:20px;font-weight:650}
  .consulta-intro p{font-size:14px}
  .form-grid{gap:14px}
  .form-group label{font-size:14px;margin-bottom:7px}
  .form-group input{height:52px;border-radius:15px;font-size:16px}
  .btn-primary{height:56px;border-radius:16px;font-size:17px;margin-top:18px}

  .resultado-card{padding:18px 16px}
  .resultado-head h2{font-size:24px;line-height:1.08;margin-bottom:6px}
  .resultado-head p{font-size:15px;color:#64748b}

  .numeros-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .numero-chip{min-height:74px;border-radius:17px;padding:11px 8px;box-shadow:0 8px 18px color-mix(in srgb,var(--cor) 18%,transparent)}
  .numero-chip strong{font-size:21px;letter-spacing:.04em}
  .numero-chip small{font-size:11px;opacity:.75;margin-top:2px}
}

@media(max-width:370px){
  .page{padding-left:8px;padding-right:8px}
  .hero h1{font-size:25px}
  .resultado-head h2{font-size:22px}
  .numero-chip strong{font-size:19px;letter-spacing:.035em}
  .numero-chip{min-height:70px;padding-inline:6px}
}
