/* Hallmark · page: status ledger (estrutura fixada pelo pedido: a ordem do Statuspage) · genre: modern-minimal
 * theme: os tokens do fooxid.com (site/src/styles.css, lido e não mudado) · paper #ebedf1 · ink #080808 · accent #f87941
 * type: Bricolage Grotesque (títulos) + Atkinson Hyperlegible Next (texto), as fontes do site
 * nav: N1a (dois destinos de verdade: histórico e idioma) · footer: Ft1 · enrichment: none (só tipografia)
 * motivo de identidade: a faixa de palco preta do site com a raposa laranja no topo
 * dials: ENERGY 1 · RHYTHM 1 · MOTION 1 (página de consulta em hora de problema: calma e direta)
 * pre-emit critique: P4 H5 E4 S4 R5 V3
 *
 * Contraste conferido com o contrast-check do antislop-human:
 * - faixa verde #15803d com texto branco 5,0:1; vermelha #dc2626 com branco 4,8:1;
 *   laranja #f87941 com texto #080808 7,4:1 (o laranja nunca é texto sobre claro);
 * - sobre o branco: "Funcionando" em #15803d 5,0:1; secundário #706f70 5,0:1;
 * - barras sobre o branco (3:1 de elemento): verde 5,0:1, laranja #c9541f 4,4:1, vermelho 4,8:1,
 *   cinza de "sem dados" #8e8f93 3,2:1. A cor nunca vai sozinha: cada dia tem título e a lista
 *   de dias com tempo fora do ar diz o mesmo em texto. */

@font-face {
  font-family: "Atkinson Hyperlegible Next Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2) format("woff2-variations");
}
@font-face {
  font-family: "Bricolage Grotesque Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2-variations");
}

:root {
  color-scheme: light;
  --paper: #ebedf1;
  --surface: #ffffff;
  --ink: #080808;
  --ink-2: #353536;
  --ink-3: #706f70;
  --line: #d4d8df;
  --focus: #353536;
  --brand: #f87941;
  --brand-ink: #080808;
  --brand-deep: #c9541f;
  --alert: #dc2626;
  --alert-ink: #ffffff;
  --ok: #15803d;
  --ok-ink: #ffffff;
  --no-data: #8e8f93;
  --stage: #080808;
  --stage-text: #ebedf1;
  --stage-muted: #acadb1;

  --font-display: "Bricolage Grotesque Variable", "Atkinson Hyperlegible Next Variable", system-ui, sans-serif;
  --font-sans: "Atkinson Hyperlegible Next Variable", system-ui, sans-serif;
  --radius-control: 10px;
  --radius-panel: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: clip;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 1.2;
  overflow-wrap: anywhere;
  min-width: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--ink-3);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: 52rem;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
}
.skip:focus {
  top: 1rem;
}

/* Topo: a faixa de palco preta do site, com o símbolo laranja. */
.top {
  background: var(--stage);
  color: var(--stage-text);
}
.top :focus-visible {
  outline-color: var(--stage-text);
}
.top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
  padding-block: 0.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  text-decoration: none;
}
.brand img {
  height: 28px;
  width: auto;
}
.brand-name {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.brand-tag {
  color: var(--stage-muted);
  font-size: 1rem;
}
.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  margin-inline-end: -0.5rem;
}
.top-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.5rem;
  white-space: nowrap;
  text-decoration-color: var(--stage-muted);
}

main {
  padding-block: 1.75rem 3rem;
}

/* Faixa do estado geral: a única peça grande e colorida da página. */
.banner {
  display: grid;
  gap: 0.25rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-panel);
}
.banner h1 {
  font-size: clamp(1.5rem, 1.6vw + 1rem, 2.125rem);
  font-weight: 700;
}
.banner p {
  font-size: 0.9375rem;
}
.banner--operational {
  background: var(--ok);
  color: var(--ok-ink);
}
.banner--degraded,
.banner--partial {
  background: var(--brand);
  color: var(--brand-ink);
}
.banner--major {
  background: var(--alert);
  color: var(--alert-ink);
}
.banner--unknown {
  background: var(--ink-2);
  color: var(--surface);
}

/* Incidente aberto: o cabeçalho leva a cor do impacto, sólida, com texto que contrasta. */
.incident {
  margin-top: 1.25rem;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}
.incident-head {
  display: grid;
  gap: 0.125rem;
  padding: 0.875rem 1.25rem;
  border-radius: calc(var(--radius-panel) - 1px) calc(var(--radius-panel) - 1px) 0 0;
}
.incident-head :focus-visible {
  outline-color: currentColor;
}
.incident-head h2 {
  font-size: 1.25rem;
}
.incident-head a {
  text-decoration-color: currentColor;
}
.incident--major .incident-head {
  background: var(--alert);
  color: var(--alert-ink);
}
.incident--minor .incident-head {
  background: var(--brand);
  color: var(--brand-ink);
}
.incident--none .incident-head {
  background: var(--ink-2);
  color: var(--surface);
}
.incident-impact {
  font-size: 0.875rem;
  font-weight: 600;
}
.incident .affects,
.incident .updates {
  padding-inline: 1.25rem;
}
.incident .affects {
  padding-top: 0.875rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.incident .updates {
  padding-bottom: 0.5rem;
}

.updates {
  margin: 0;
  padding: 0;
  list-style: none;
}
.updates li {
  padding-block: 0.75rem;
}
.updates li + li {
  border-top: 1px solid var(--line);
}
.when {
  color: var(--ink-3);
  font-size: 0.875rem;
}

/* Partes medidas: um painel só, uma linha por parte. */
.services {
  margin-top: 2.5rem;
}
.services h2,
.past h2,
.month h2 {
  font-size: 1.5rem;
  font-weight: 700;
}
.rule {
  max-width: 62ch;
  margin-top: 0.375rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}
.parts {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}
.part {
  container-type: inline-size;
  padding: 1.125rem 1.25rem 1rem;
}
.part + .part {
  border-top: 1px solid var(--line);
}
.part-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}
.part-head h3 {
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: 0;
}
.state {
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
}
.state--operational {
  color: var(--ok);
}
.state--degraded {
  padding: 0.125rem 0.5rem;
  border-radius: 6px;
  background: var(--brand);
  color: var(--brand-ink);
}
.state--down {
  padding: 0.125rem 0.5rem;
  border-radius: 6px;
  background: var(--alert);
  color: var(--alert-ink);
}
.state--unmeasured {
  color: var(--ink-3);
}
.part-desc,
.part-note {
  margin-top: 0.125rem;
  color: var(--ink-3);
  font-size: 0.875rem;
}
.part-note {
  color: var(--ink-2);
}

.bars {
  display: flex;
  gap: 2px;
  height: 2rem;
  margin-top: 0.875rem;
}
.bar {
  flex: 1 1 0;
  min-width: 0;
  border-radius: 2px;
}
.bar--ok {
  background: var(--ok);
}
.bar--minor {
  background: var(--brand-deep);
}
.bar--major {
  background: var(--alert);
}
.bar--none {
  background: var(--no-data);
}
.bars-legend {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.375rem;
  color: var(--ink-3);
  font-size: 0.8125rem;
}
.bars-legend .uptime {
  color: var(--ink-2);
  font-weight: 600;
  text-align: center;
}
.from-60,
.from-30 {
  display: none;
}
/* Pela largura da linha: 90 dias com folga, 60 numa linha média, 30 no celular. */
@container (width < 36rem) {
  .d-90 {
    display: none;
  }
  .from-90 {
    display: none;
  }
  .from-60 {
    display: inline;
  }
}
@container (width < 22rem) {
  .d-60 {
    display: none;
  }
  .from-60 {
    display: none;
  }
  .from-30 {
    display: inline;
  }
}

.down-days {
  margin-top: 0.25rem;
  font-size: 0.875rem;
}
.down-days summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 600;
}
/* O marcador some com o inline-flex: o sinal diz se a lista abre ou fecha. */
.down-days summary::before {
  content: "+";
  width: 0.75em;
}
.down-days[open] summary::before {
  content: "−";
}
.down-days ul {
  margin: 0 0 0.5rem;
  padding-left: 1.25rem;
  color: var(--ink-2);
}

/* Incidentes anteriores, dia a dia, como nos dois exemplos. */
.past {
  margin-top: 2.75rem;
}
.day {
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}
.day h3 {
  font-size: 1.0625rem;
  font-weight: 650;
}
.quiet {
  margin-top: 0.25rem;
  color: var(--ink-3);
  font-size: 0.9375rem;
}
.past-incident {
  margin-top: 0.75rem;
  overflow-wrap: anywhere;
}
.past-incident h4 {
  font-family: var(--font-sans);
  font-size: 1rem;
  letter-spacing: 0;
}
.past-incident .updates li {
  padding-block: 0.5rem;
}
.more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.page-title {
  font-size: clamp(1.75rem, 2vw + 1rem, 2.5rem);
  font-weight: 700;
}
.incident-page .incident-impact {
  margin-top: 0.5rem;
  color: var(--ink-2);
}
.incident-page .page-title {
  margin-bottom: 0.5rem;
}
.month {
  margin-top: 2rem;
}
.history {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}
.history li {
  padding-block: 0.75rem;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}
.history a {
  font-weight: 600;
}

.foot {
  padding-block: 1.25rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.875rem;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  white-space: nowrap;
}

/* Admin (/admin, só o dono, atrás do Access). */
.admin-who {
  color: var(--ink-3);
  font-size: 0.875rem;
}
.admin-box {
  margin-top: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: var(--surface);
}
.admin-box h1,
.admin-box h2 {
  font-size: 1.375rem;
}
.admin-incident {
  padding-block: 1rem;
  border-top: 1px solid var(--line);
}
.admin-incident:first-of-type {
  border-top: 0;
}
.form {
  display: grid;
  gap: 0.875rem;
  margin-top: 0.875rem;
}
.form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.9375rem;
  font-weight: 600;
}
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr));
  gap: 0.875rem;
}
.form input,
.form select,
.form textarea {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--ink-3);
  border-radius: var(--radius-control);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}
.hint {
  color: var(--ink-3);
  font-size: 0.875rem;
}
.btn {
  justify-self: start;
  min-height: 44px;
  padding-inline: 1.125rem;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover {
  background: var(--ink-2);
}
.btn:active {
  scale: 0.97;
}
.table-wrap {
  margin-top: 0.75rem;
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
th,
td {
  padding: 0.5rem 0.625rem 0.5rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

@media (max-width: 30rem) {
  main {
    padding-block: 1.25rem 2.25rem;
  }
  .banner {
    padding: 1rem 1.125rem;
  }
  .part {
    padding-inline: 1rem;
  }
  .services {
    margin-top: 2rem;
  }
}

/* Alto contraste do sistema: as cores de estado são informação, então ficam. */
@media (forced-colors: active) {
  .bar,
  .banner,
  .incident-head,
  .state {
    forced-color-adjust: none;
  }
}
