:root {
  color-scheme: light;
  --ink: #0a0f10;
  --ink-2: #465659;
  --ink-3: #5f7175;
  --paper: #fbfcfc;
  --paper-2: #f1f5f5;
  --line: rgba(10, 15, 16, .1);
  --line-2: rgba(10, 15, 16, .2);
  --teal-ink: #136f7a;
  --plate: #0f343d;
  --ok: #1f8a5b;
  --ok-fundo: #e5f4ec;
  --atencao: #9a6406;
  --atencao-fundo: #fbf0dc;
  --queda: #b4332b;
  --queda-fundo: #fbeae8;
  --sem: #d6dfe0;
  --indicio: #e0a33a;
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --m: clamp(16px, 4vw, 40px);
  --i-certo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm4.7 7.7-5.4 5.6a1 1 0 0 1-1.4 0l-2.6-2.6 1.4-1.4 1.9 1.9 4.7-4.9 1.4 1.4Z'/%3E%3C/svg%3E");
  --i-alerta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm-1 5h2v7h-2V7Zm0 9h2v2h-2v-2Z'/%3E%3C/svg%3E");
  --i-relogio: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 5h-2v6l5 3 1-1.7-4-2.3V7Z'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 1rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, p, ol, ul, table { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 3px; border-radius: 4px; }
.so-leitor { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.barra { display: flex; align-items: center; gap: 14px; max-width: 920px; margin: 0 auto; padding: 22px var(--m); }
.barra .logo img { height: 30px; width: auto; }
.titulo-barra { padding-left: 14px; border-left: 1px solid var(--line-2); font-weight: 500; letter-spacing: -.01em; }
.volta { margin-left: auto; font-size: .9375rem; color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; }
.volta:hover { color: var(--ink); text-decoration-color: var(--ink); }

main { max-width: 920px; margin: 0 auto; padding: 8px var(--m) 72px; }

.resumo { padding: clamp(20px, 3vw, 28px) clamp(20px, 3vw, 28px); border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.estado-geral { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: clamp(1.4rem, 3.4vw, 2rem); line-height: 1.15; letter-spacing: -.035em; }
.sinal { flex: none; width: 30px; height: 30px; background: var(--sem); -webkit-mask: var(--i-certo) center / contain no-repeat; mask: var(--i-certo) center / contain no-repeat; }
.estado-geral.no-ar .sinal { background: var(--ok); }
.estado-geral.instavel .sinal, .estado-geral.sem-leitura .sinal { background: var(--atencao); -webkit-mask-image: var(--i-alerta); mask-image: var(--i-alerta); }
.estado-geral.fora .sinal { background: var(--queda); -webkit-mask-image: var(--i-alerta); mask-image: var(--i-alerta); }
.estado-geral.carregando .sinal { -webkit-mask-image: var(--i-relogio); mask-image: var(--i-relogio); }
.atualizado { margin-top: 8px; color: var(--ink-2); font-size: .9375rem; }

.componentes { margin-top: 28px; }
.componente { padding: 22px 0 20px; border-top: 1px solid var(--line-2); }
.componente:first-child { border-top-color: var(--ink); }
.linha-topo { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.componente h3 { margin: 0; font-weight: 600; font-size: 1.1875rem; letter-spacing: -.02em; }
.componente .descricao { margin-top: 2px; font-size: .9375rem; color: var(--ink-2); }
.situacao { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px; border-radius: 999px; font-size: .875rem; font-weight: 500; white-space: nowrap; }
.situacao::before { content: ""; width: 15px; height: 15px; background: currentColor; -webkit-mask: var(--i-certo) center / contain no-repeat; mask: var(--i-certo) center / contain no-repeat; }
.situacao.no-ar { background: var(--ok-fundo); color: var(--ok); }
.situacao.instavel, .situacao.sem-leitura { background: var(--atencao-fundo); color: var(--atencao); }
.situacao.fora { background: var(--queda-fundo); color: var(--queda); }
.situacao:not(.no-ar)::before { -webkit-mask-image: var(--i-alerta); mask-image: var(--i-alerta); }

.barras { display: flex; gap: 2px; height: 34px; margin-top: 14px; }
.barras li { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--sem); }
.barras li.ok { background: var(--ok); }
.barras li.queda { background: var(--queda); }
.barras li.indicio { background: var(--indicio); }
.barras li:hover, .barras li:focus-visible { opacity: .72; }
.pe-barras { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: .8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pe-barras b { font-weight: 500; color: var(--ink-2); }
.pe-barras i { font-style: normal; }
.detalhe-dia { min-height: 1.4em; margin-top: 6px; font-size: .8125rem; color: var(--ink-2); }

.esqueleto .linha-topo span { display: block; height: 18px; width: 30%; border-radius: 6px; background: var(--paper-2); }
.esqueleto .linha-topo span + span { width: 72px; }
.esqueleto .barras { background: linear-gradient(90deg, var(--paper-2), #fff, var(--paper-2)); background-size: 200% 100%; border-radius: 4px; animation: brilho 1.4s ease-in-out infinite; }
@keyframes brilho { from { background-position: 100% 0; } to { background-position: -100% 0; } }

.erro-carga { margin-top: 16px; padding: 16px 18px; border-radius: 14px; background: var(--queda-fundo); color: var(--queda); }
.erro-carga p { color: var(--ink); }
.botao { margin-top: 12px; height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--plate); color: #fff; font: inherit; font-weight: 500; cursor: pointer; }
.botao:hover { background: #17505b; }

.legenda { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--ink-3); }
.legenda li { display: inline-flex; align-items: center; gap: 7px; }
.legenda i { width: 10px; height: 10px; border-radius: 2px; }
.cor-ok { background: var(--ok); }
.cor-queda { background: var(--queda); }
.cor-sem { background: var(--sem); }
.cor-indicio { background: var(--indicio); }
.nota-secao { max-width: 66ch; margin-top: 10px; color: var(--ink-2); text-wrap: pretty; }
.tabela.quebra th, .tabela.quebra td { white-space: normal; text-wrap: pretty; }
.tabela.quebra td:first-child { white-space: nowrap; }

.secao { margin-top: clamp(44px, 7vw, 72px); }
.secao h2 { font-weight: 600; font-size: clamp(1.3rem, 2.4vw, 1.625rem); letter-spacing: -.03em; }
.tabela-rola { overflow-x: auto; margin-top: 14px; }
.tabela { width: 100%; border-collapse: collapse; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.tabela th { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--ink); font-size: .8125rem; font-weight: 500; color: var(--ink-3); text-align: left; white-space: nowrap; }
.tabela td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tabela td:first-child { font-weight: 500; }
.tabela td b { font-weight: 600; }
.tabela td small { display: block; margin-bottom: 2px; font-size: .8125rem; color: var(--ink-3); }
.tabela td small:last-child { margin-bottom: 0; }
.tabela .sem-registro { color: var(--ink-3); }

.incidentes { margin-top: 14px; border-top: 1px solid var(--ink); }
.incidentes li { padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.incidentes b { display: block; font-weight: 600; }
.incidentes span { display: block; margin-top: 2px; font-size: .9375rem; color: var(--ink-2); }
.vazio { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--ink); color: var(--ink-2); }

.como p { max-width: 66ch; margin-top: 12px; color: var(--ink-2); text-wrap: pretty; }
.fontes { display: grid; gap: 12px; max-width: 66ch; margin: 14px 0 0; }
.fontes dt { font-weight: 600; color: var(--ink); }
.fontes dd { margin: 2px 0 0; color: var(--ink-2); text-wrap: pretty; }
.como p b { color: var(--ink); font-weight: 600; }
.como a { color: var(--teal-ink); text-underline-offset: 3px; }

.rodape { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; max-width: 920px; margin: 0 auto; padding: 18px var(--m) calc(22px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); font-size: .8125rem; color: var(--ink-3); }
.rodape nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.rodape a { text-decoration: none; }
.rodape a:hover { color: var(--ink); }

@media (min-width: 621px) { .so-estreito { display: none; } }
@media (max-width: 620px) {
  .barra { gap: 10px; }
  .barra .logo img { height: 26px; }
  .titulo-barra { padding-left: 10px; }
  .barras { height: 32px; }
  .barras li:nth-child(-n+60) { display: none; }
  .so-largo { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .esqueleto .barras { animation: none; }
}
