:root {
  color-scheme: light;
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #20332b;
  background: #f3f5f0;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --forest: #1d3b30;
  --green: #376e4c;
  --accent: #a7c476;
  --ink: #20332b;
  --muted: #65756d;
  --line: #dce3db;
  --surface: #fff;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
.site-shell { position: relative; z-index: 20; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.45rem, 3vw, 1.8rem); letter-spacing: -.025em; }
h2 { margin-bottom: 12px; font-size: 1.2rem; letter-spacing: -.015em; }
h3 { margin-bottom: 8px; font-size: 1.05rem; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px max(24px, calc((100% - 1200px) / 2));
  color: white;
  background: var(--forest);
  border-bottom: 4px solid var(--accent);
}
.header-actions { display: flex; align-items: center; gap: 10px; }
.header-actions button.secondary { color: var(--forest); }
.menu-toggle { display: none; width: 44px; min-width: 44px; flex-direction: column; gap: 5px; padding: 10px; }
.menu-toggle span { display: block; width: 100%; height: 2px; background: currentColor; }
.menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-7px) rotate(-45deg); }
header .eyebrow { color: #c3d6c1; }
.eyebrow { margin-bottom: 7px; font-size: .72rem; font-weight: 750; letter-spacing: .14em; }
main { max-width: 1248px; margin: 0 auto; padding: 32px 24px 56px; }
.site-nav {
  display: flex;
  gap: 30px;
  padding: 0 max(24px, calc((100% - 1200px) / 2));
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  background: white;
}
.mobile-menu-action { display: none; }
.site-nav a {
  position: relative;
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  flex: 0 0 auto;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: .94rem;
  font-weight: 650;
  text-decoration: none;
}
.site-nav a:hover, .site-nav a.active { color: var(--forest); }
.site-nav a.active { border-bottom-color: var(--green); }
.page-view { min-height: 360px; }
.login-card { max-width: 620px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; }
button, .button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--green);
  border-radius: 2px;
  padding: 9px 16px;
  color: white;
  background: var(--green);
  font: inherit;
  font-size: .94rem;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, transform .15s ease;
}
button:hover, .button:hover { background: #2c5c3f; border-color: #2c5c3f; }
button:active { transform: translateY(1px); }
button.secondary { color: var(--forest); background: white; border-color: #9eada2; }
button.secondary:hover { background: #edf2eb; border-color: var(--green); }
button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
button:focus-visible, .button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #aac87c;
  outline-offset: 2px;
}

.card, .overview {
  margin-bottom: 22px;
  padding: clamp(20px, 3vw, 28px);
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  box-shadow: 0 4px 14px rgb(29 59 48 / 4%);
}
.card > :last-child { margin-bottom: 0; }
.muted, .count span { color: var(--muted); font-size: .92rem; }

form label { display: block; margin: 14px 0; font-weight: 650; }
input, textarea {
  display: block;
  width: min(100%, 380px);
  min-height: 44px;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid #aebbb1;
  border-radius: 2px;
  color: var(--ink);
  background: white;
  font: inherit;
}
textarea { min-height: 180px; resize: vertical; }
#broadcast-email-form input, #broadcast-email-form textarea { width: min(100%, 760px); }
#broadcast-email-form .actions { margin-top: 16px; }
.email-history-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.email-history-heading h2 { margin: 0; }
#email-history details { padding: 14px 0; border-top: 1px solid var(--line); }
#email-history summary { line-height: 1.5; }
.email-history-message {
  margin: 10px 0;
  padding: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: var(--ink);
  background: #f5f7f3;
  font: inherit;
}
.email-history-recipients { margin: 8px 0 0; padding-left: 22px; }
.email-history-recipients li { padding: 5px 0; overflow-wrap: anywhere; }
input::placeholder { color: #839087; }
#self-service > p { max-width: 760px; line-height: 1.55; }
#self-service-form, #verification-form {
  display: grid;
  grid-template-columns: minmax(210px, 360px) auto;
  align-items: end;
  gap: 10px 14px;
  margin: 18px 0 8px;
}
#self-service-form label, #verification-form label { margin: 0; }
#self-service-form button, #verification-form button { justify-self: start; }
#self-service-message { min-height: 1.4em; margin: 14px 0 0; }
#own-response {
  margin: 28px 0 0;
  border-top: 3px solid var(--accent);
  background: #fbfcfa;
  box-shadow: none;
}
#own-response h2 { margin-bottom: 18px; }
#own-answers { display: grid; grid-template-columns: minmax(150px, 250px) 1fr; gap: 0 20px; }
dt { padding: 10px 0; border-top: 1px solid var(--line); font-weight: 650; }
dd { margin: 0; padding: 10px 0; border-top: 1px solid var(--line); white-space: pre-wrap; }
#own-request { margin-top: 16px; }
#own-request p { margin-bottom: 0; }
#own-response .actions { margin-top: 18px; }

#login-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(190px, 1fr));
  align-items: end;
  gap: 8px 18px;
  max-width: 800px;
}
#login-form label { margin: 0; }
#login-form button { grid-column: 1 / -1; justify-self: start; margin-top: 8px; }

.overview { display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.overview h2 { margin-bottom: 8px; font-size: 1.55rem; }
.overview p:last-child { margin-bottom: 0; }
.form-guidance {
  margin: 0 0 20px;
  padding: 18px 22px;
  border-left: 4px solid var(--accent);
  color: var(--forest);
  background: #eaf0e5;
  line-height: 1.55;
}
.form-guidance strong { display: block; margin-bottom: 5px; }
.form-guidance p { max-width: 900px; margin: 0; }
.count {
  display: flex;
  min-width: 124px;
  flex-direction: column;
  padding-left: 22px;
  border-left: 1px solid var(--line);
  color: var(--green);
}
.count strong { font-size: 2.25rem; line-height: 1.1; }
#updated-at { margin: -8px 0 24px; }

.section-heading { margin: 34px 0 16px; }
.section-heading h2 { margin-bottom: 6px; }
.section-heading p { margin-bottom: 0; color: var(--muted); font-size: .92rem; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; }
.metric {
  min-height: 132px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  background: white;
}
.metric strong { display: block; color: var(--green); font-size: 1.85rem; line-height: 1.2; }
.metric span { display: block; margin-top: 4px; font-weight: 700; }
.metric small { display: block; margin-top: 7px; color: var(--muted); line-height: 1.45; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.grid .card { margin-bottom: 0; }

.search-label { display: block; font-weight: 650; }
#search { margin: 8px 0 12px; }
#individual details, #request-queue details { border-top: 1px solid var(--line); padding: 15px 0; }
summary { cursor: pointer; font-weight: 650; }
#individual dl { margin-bottom: 0; }
#individual dt { margin-top: 10px; padding: 0; border: 0; }
#individual dd { padding: 4px 0 0; border: 0; }
#request-queue { margin-top: 18px; }
#request-queue .card { margin-bottom: 12px; padding: 20px; box-shadow: none; }
#request-queue .card p { color: var(--muted); font-size: .92rem; }

.bar-row { margin: 16px 0; }
.bar-label { display: flex; justify-content: space-between; gap: 14px; font-size: .92rem; }
.bar-label span { overflow-wrap: anywhere; }
.bar-track { height: 7px; margin-top: 7px; background: #e6ece5; }
.bar-fill { height: 100%; background: #719b60; }
#message:not(:empty) {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-left: 4px solid #c67446;
  color: #773a20;
  background: #fff2e9;
}
[hidden] { display: none !important; }

@media (max-width: 640px) {
  header { min-height: 78px; align-items: center; flex-direction: row; padding: 14px 18px; }
  header h1 { font-size: 1.2rem; }
  header .eyebrow { margin-bottom: 4px; }
  .header-actions { gap: 8px; }
  .header-refresh, .header-logout { display: none; }
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 12px;
    width: min(340px, calc(100vw - 24px));
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    overflow: visible;
    border: 1px solid var(--line);
    box-shadow: 0 12px 28px rgb(21 44 34 / 18%);
  }
  .site-shell.menu-open .site-nav { display: flex; }
  .site-nav a {
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-left: 3px solid transparent;
  }
  .site-nav a.active { border-left-color: var(--green); }
  .mobile-menu-action {
    display: inline-flex;
    width: calc(100% - 24px);
    justify-content: flex-start;
    margin: 5px 12px;
  }
  .mobile-menu-action.secondary { justify-content: flex-start; }
  main { padding: 22px 16px 40px; }
  .overview { align-items: flex-start; flex-direction: column; gap: 16px; }
  .count { min-width: 0; padding: 0; border: 0; }
  #self-service-form, #verification-form { grid-template-columns: 1fr; }
  #self-service-form button, #verification-form button { margin-top: 2px; }
  #own-answers { grid-template-columns: 1fr; gap: 0; }
  dd { padding-top: 0; border-top: 0; }
  #login-form { grid-template-columns: 1fr; }
  #login-form button { grid-column: 1; }
  .actions button { flex: 1 1 210px; }
  .email-history-heading { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
