:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7f8;
  color: #162023;
}

body {
  margin: 0;
}

* { box-sizing: border-box; letter-spacing: 0; }
main, section, .grid > div { min-width: 0; }
section { overflow-x: auto; }
td { max-width: 360px; overflow-wrap: anywhere; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.table-scroll { overflow-x: auto; }
.table-scroll table { min-width: 1080px; }
.table-scroll td:first-child { min-width: 160px; }
#daily td:first-child { min-width: 95px; white-space: nowrap; }
#installations td:nth-child(4) { min-width: 145px; }
dialog { border: 1px solid #bec9cf; border-radius: 8px; width: min(480px, 94vw); padding: 24px; }
dialog::backdrop { background: #0006; }
#enroll-form { display: grid; justify-content: stretch; }
#enroll-form label { display: grid; gap: 5px; }
#enroll-form p { line-height: 1.5; }
#enroll-error { color: #a32b31; }
.sample-toggle { display: flex; align-items: center; gap: 6px; font-size: 12px; }
.sample-toggle input[type="checkbox"] { width: 16px; min-height: 16px; margin: 0; }
#enroll-form .sample-toggle { display: flex; }
#more-events { margin-top: 12px; }

header {
  align-items: end;
  background: #ffffff;
  border-bottom: 1px solid #d8e0e4;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  padding: 18px 24px;
}

h1, h2, p {
  margin: 0;
}

h1 {
  font-size: 24px;
  font-weight: 720;
}

h2 {
  font-size: 16px;
  margin-bottom: 10px;
}

p, td, th, input, select, button, dd, dt {
  font-size: 13px;
}

form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

input, select, button {
  border: 1px solid #bec9cf;
  border-radius: 6px;
  min-height: 34px;
  padding: 0 10px;
}

button {
  background: #1f6f5b;
  border-color: #1f6f5b;
  color: #ffffff;
  cursor: pointer;
  font-weight: 650;
}

main {
  display: grid;
  gap: 16px;
  padding: 18px 24px 36px;
}

section, .grid > div {
  background: #ffffff;
  border-bottom: 1px solid #d8e0e4;
  padding: 14px;
}

.metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metrics article {
  border-left: 3px solid #2a7f62;
  min-width: 0;
  padding: 4px 10px;
}

.metrics span {
  color: #52636b;
  display: block;
  font-size: 12px;
}

.metrics strong {
  display: block;
  font-size: 28px;
  line-height: 1.1;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

table {
  border-collapse: collapse;
  width: 100%;
}

th {
  color: #52636b;
  font-weight: 650;
  text-align: left;
}

td, th {
  border-bottom: 1px solid #e4eaed;
  padding: 8px 6px;
  vertical-align: top;
}

td code {
  background: #eef3f2;
  border-radius: 4px;
  display: inline-block;
  max-width: 38vw;
  overflow-wrap: anywhere;
  padding: 2px 4px;
}

dl {
  display: grid;
  gap: 8px;
  grid-template-columns: max-content minmax(0, 1fr);
  margin: 0;
}

dt {
  color: #52636b;
  font-weight: 650;
}

dd {
  margin: 0;
}

#status {
  color: #8a3b2b;
}

@media (max-width: 760px) {
  header {
    align-items: stretch;
    flex-direction: column;
  }

  form, input, select, button {
    max-width: 100%;
  }

  input, select { width: 100%; min-width: 0; }
  header, main { padding-left: 12px; padding-right: 12px; }
  .section-heading { align-items: start; flex-wrap: wrap; }

  .metrics, .grid {
    grid-template-columns: 1fr;
  }

  section {
    overflow-x: auto;
  }

  td code {
    max-width: 70vw;
  }
}
