/* The layout every page shares: the header bar, and the footer of the pages
   that show readings and alerts. */
:root {
  --surface: #ffffff;
  --plane: #f9f9f7;
  --ink: #1f1f1f;
  --ink-secondary: #4a4a4a;
  --ink-muted: #6b6a66;
  --hairline: #d0d0d0;
  --error: #b00020;
  --link: #1c5cab;
  /* The two colours of the logo's name. */
  --brand-green: #1c8232;
  --brand-blue: #005cc3;
}

html,
body {
  margin: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--surface);
}

a {
  color: var(--link);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--hairline);
}

.bar .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.bar .brand img {
  display: block;
  width: 28px;
  height: 28px;
}

.brand-agri {
  color: var(--brand-green);
}

.brand-proact {
  color: var(--brand-blue);
}

.bar h1 {
  margin: 0;
  font-size: 1.15rem;
}

.bar .pages {
  display: flex;
  gap: 0.8rem;
  font-size: 0.9rem;
}

.bar .pages[hidden] {
  display: none;
}

.bar .pages a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.bar p {
  flex: 1;
  min-width: 12rem;
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-secondary);
}

.bar button {
  font: inherit;
  font-size: 0.85rem;
}

.error,
.bar p.error {
  color: var(--error);
}

.scope {
  padding: 0.35rem 1rem;
  border-top: 1px solid var(--hairline);
  background: var(--plane);
  font-size: 0.8rem;
  color: var(--ink-secondary);
}

.scope p {
  margin: 0;
}

/* The content of a page with sections and tables, below the header. */
.page {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0.5rem 1rem 1.5rem;
}

.page h2 {
  margin: 1.2rem 0 0.3rem;
  font-size: 1.05rem;
}

.page .note {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-secondary);
}

.table-box {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 0.3rem 0.8rem 0.3rem 0;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  white-space: nowrap;
}

th {
  font-size: 0.8rem;
  color: var(--ink-secondary);
  font-weight: 600;
}

td.number,
th.number {
  text-align: right;
}

td .partial {
  color: var(--ink-secondary);
  font-size: 0.8rem;
}

tr.level-orange td,
tr.level-red td {
  font-weight: 600;
}
