:root {
  --ink: #163b32;
  --green: #316c55;
  --mint: #e8f2e9;
  --line: #dce5dd;
  --muted: #66776e;
  --paper: #f6f7f2;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    15px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
header {
  padding: 22px 5vw;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 22px;
  align-items: center;
}
.brand {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--green);
  text-decoration: none;
}
.brand img {
  display: block;
  width: clamp(156px, 22vw, 240px);
  height: auto;
}
.brand span {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.4px;
}
.badge {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--muted);
}
main {
  max-width: 1440px;
  padding: 44px 4vw;
  margin: auto;
}
h1 {
  font:
    500 clamp(30px, 3.4vw, 48px)/1.16 Georgia,
    serif;
  letter-spacing: -1px;
  margin: 12px 0;
}
h2 {
  font:
    500 25px/1.3 Georgia,
    serif;
  margin: 5px 0 18px;
}
h3 {
  font-size: 16px;
  margin: 24px 0 5px;
}
p {
  margin: 9px 0 16px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--green);
}
.heading,
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.heading p {
  color: var(--muted);
}
#freshness {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.filters {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 25px 0;
}
.filters label {
  flex: 1;
  min-width: 140px;
}
label {
  font-size: 11px;
  font-weight: 650;
  display: block;
  color: var(--muted);
}
input,
select {
  display: block;
  width: 100%;
  border: 1px solid #c9d8cc;
  border-radius: 9px;
  padding: 11px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  margin-top: 5px;
  min-height: 44px;
}
button {
  background: var(--green);
  color: white;
  border: 1px solid var(--green);
  border-radius: 9px;
  padding: 12px 18px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  min-height: 44px;
}
button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button.secondary,
#logout {
  background: transparent;
  color: var(--green);
}
:focus-visible {
  outline: 3px solid #c4a643;
  outline-offset: 3px;
}
.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 25px 0;
}
.kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 25px;
  min-height: 170px;
}
.kpi:first-child {
  background: var(--ink);
  color: #fff;
}
.kpi .label {
  font-size: 12px;
  font-weight: 650;
}
.kpi .value {
  font:
    500 46px/1.2 Georgia,
    serif;
  display: block;
  margin: 14px 0 8px;
}
.kpi .detail {
  font-size: 12px;
  color: var(--muted);
}
.kpi:first-child .detail {
  color: #bbd3c5;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 26px;
  margin-bottom: 22px;
  min-width: 0;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.health {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
.health article {
  border-left: 3px solid #a7c8af;
  padding: 10px 18px;
}
.health h3 {
  margin: 0 0 8px;
}
.health p {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
}
.health strong {
  color: var(--ink);
}
.chart {
  width: 100%;
  overflow: hidden;
  min-height: 220px;
}
.chart svg {
  display: block;
  width: 100%;
  height: 240px;
}
.legend {
  display: flex;
  gap: 14px;
  font-size: 11px;
  flex-wrap: wrap;
}
.legend span:nth-child(1) {
  color: #317859;
}
.legend span:nth-child(2) {
  color: #c18c31;
}
.legend span:nth-child(3) {
  color: #517fa8;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.scroll {
  overflow: auto;
  max-height: 430px;
}
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  white-space: nowrap;
}
th,
td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid #edf0e9;
}
th {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  background: #fff;
  position: sticky;
  top: 0;
}
td:first-child {
  padding-left: 0;
}
code {
  font-size: 11px;
}
summary {
  cursor: pointer;
  font-size: 12px;
  color: var(--green);
  padding: 10px 0;
}
.empty {
  padding: 25px 5px;
  color: var(--muted);
  font-size: 13px;
}
.mini-stats {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.mini-stats strong {
  display: block;
  font:
    500 29px Georgia,
    serif;
}
.mini-stats span {
  font-size: 11px;
  color: var(--muted);
}
.notice {
  background: #fff4db;
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 12px;
}
.error {
  color: #ab382c;
  font-size: 13px;
}
.definitions {
  font-size: 12px;
  color: var(--muted);
}
.definitions strong {
  color: var(--ink);
}
.definitions dl {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 12px;
}
.definitions dt {
  font-weight: 700;
  color: var(--ink);
}
.definitions dd {
  margin: 0;
}
.gate {
  max-width: 560px;
  margin: 70px auto;
}
.gate h1 {
  font-size: 56px;
}
.gate p {
  color: var(--muted);
}
.password-row {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-top: 8px;
}
.password-row input {
  flex: 1;
  min-width: 0;
}
.gate form {
  margin: 30px 0;
}
.gate .error {
  color: #ab382c;
}
footer {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  padding: 15px 0 35px;
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  .highlights,
  .health {
    grid-template-columns: repeat(2, 1fr);
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .heading,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  #freshness {
    text-align: left;
  }
  .panel {
    padding: 20px;
  }
  .definitions dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .definitions dd {
    margin-bottom: 10px;
  }
}
@media (max-width: 500px) {
  main {
    padding: 28px 18px;
  }
  .highlights {
    gap: 10px;
  }
  .kpi {
    padding: 17px;
    min-height: 160px;
  }
  .kpi .value {
    font-size: 35px;
  }
  .health {
    grid-template-columns: 1fr;
  }
  .badge {
    display: none;
  }
  header {
    padding: 15px 18px;
    justify-content: space-between;
  }
  #logout {
    margin-left: auto;
    font-size: 11px;
    padding: 9px;
  }
  .gate {
    margin: 40px auto;
  }
  .gate h1 {
    font-size: 42px;
  }
  .filters label {
    min-width: 130px;
  }
  .filters {
    gap: 10px;
  }
}
