:root {
  color-scheme: light;
  --ink: #263c32;
  --muted: #5d6c63;
  --green: #315f48;
  --line: #dce3d9;
  --paper: #f5f6f0;
  --accent: #e9eddf;
  font:
    16px/1.6 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 18px;
  border: 1px solid var(--green);
  border-radius: 8px;
  background: var(--green);
  color: white;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.35;
}
button:hover,
.button:hover {
  filter: brightness(0.94);
}
button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.secondary {
  background: white;
  color: var(--green);
  border-color: #c1cfbd;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid #729660;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}

main {
  width: min(1240px, 100%);
  padding: 36px clamp(18px, 3vw, 42px) 56px;
  margin: auto;
  min-height: 70dvh;
}
h1,
h2,
h3 {
  line-height: 1.18;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
h1 {
  font:
    400 clamp(32px, 4vw, 46px)/1.15 Georgia,
    serif;
  letter-spacing: -0.7px;
}
h2 {
  font:
    400 26px/1.25 Georgia,
    serif;
}
h3 {
  font-size: 17px;
}
p {
  margin: 0 0 18px;
  color: var(--muted);
}
.lead {
  font-size: clamp(17px, 2vw, 21px);
  max-width: 650px;
  line-height: 1.65;
}
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #5f7952;
  margin-bottom: 14px;
}
.page-heading {
  display: flex;
  gap: 24px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
}
.page-heading p {
  margin-bottom: 0;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  padding: clamp(20px, 3vw, 32px);
  margin-bottom: 24px;
  box-shadow: 0 4px 18px #263c3204;
  min-width: 0;
}
.two-column {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: start;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}
.form-stack {
  display: grid;
  gap: 18px;
}
.form-grid button,
.form-stack button {
  justify-self: start;
}
.form-grid .full {
  grid-column: 1/-1;
}
.full {
  min-width: 0;
}
label {
  display: grid;
  gap: 7px;
  min-width: 0;
}
label > span,
legend {
  font-size: 14px;
  font-weight: 600;
}
input,
textarea,
select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c9d3c4;
  border-radius: 8px;
  background: white;
  color: var(--ink);
}
textarea {
  resize: vertical;
}
input[type="file"] {
  padding: 8px;
  font-size: 14px;
}
input[type="checkbox"] {
  width: 18px;
  min-height: 18px;
  height: 18px;
  flex: none;
  accent-color: var(--green);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.check small {
  color: var(--muted);
  font-size: 12px;
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 16px;
  min-width: 0;
}
.account-picker {
  display: grid;
  gap: 12px;
  max-height: 240px;
  overflow: auto;
}
.hint {
  font-size: 13px;
  line-height: 1.55;
  margin: 12px 0 0;
}
.form-grid .hint {
  margin: 0;
}
.identity-panel {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.identity-panel h2 {
  margin-bottom: 6px;
}
.identity-panel p {
  margin-bottom: 4px;
}
.avatar {
  width: 64px;
  height: 64px;
  object-fit: cover;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e4ecdd;
  color: #426535;
  font:
    24px Georgia,
    serif;
  flex-shrink: 0;
}
.identity-panel dl {
  display: grid;
  gap: 12px;
  margin: 0 0 0 auto;
  font-size: 13px;
}
.identity-panel dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
dd {
  margin: 0;
}
.badge {
  display: inline-block;
  border-radius: 30px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  text-transform: capitalize;
  color: #496039;
  background: #edf1e6;
}
.state-invited,
.state-needs-information {
  background: #fff2d9;
  color: #86621f;
}
.state-suspended,
.state-declined {
  background: #f7e7e4;
  color: #8b4a3f;
}
.state-archived {
  background: #eee;
  color: #606861;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.metrics > div {
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fdfefb;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.metrics strong {
  font:
    30px Georgia,
    serif;
}
.metrics span {
  text-transform: capitalize;
  font-size: 13px;
  color: var(--muted);
}
.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}
.filters label:first-child {
  flex: 1;
  min-width: 170px;
}
.filters label {
  min-width: 130px;
}
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 14px;
}
th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  background: #f7f9f3;
}
td,
th {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
td small,
blockquote small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
td strong {
  font-weight: 600;
}
td button {
  font-size: 12px;
  min-height: 36px;
  padding: 7px 12px;
}
.pager {
  display: flex;
  gap: 20px;
  margin-top: 18px;
  font-size: 13px;
}
.pager span {
  margin-right: auto;
  color: var(--muted);
}
.row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.inline-form {
  margin: 0;
}
.role-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.role-grid p {
  font-size: 14px;
  margin: 0;
}
.role-grid h3 {
  margin-bottom: 7px;
}
.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(24px, 6vw, 100px);
  align-items: center;
  min-height: 65dvh;
  max-width: 1000px;
  margin: auto;
}
.auth-layout h1 {
  font-size: clamp(36px, 5vw, 60px);
}
.auth-card {
  max-width: 560px;
  margin: 32px auto;
}
.auth-card h1 {
  font-size: 34px;
}
.auth-card button {
  margin-top: 18px;
}
.flash {
  padding: 15px 20px;
  border: 1px solid #c7d7bd;
  border-radius: 10px;
  background: #eaf2e1;
  margin-bottom: 24px;
  font-size: 14px;
}
.flash.error {
  border-color: #e5bdb3;
  background: #fbefea;
  color: #843e31;
}
.welcome {
  padding: 44px 0 42px;
  max-width: 860px;
}
.welcome h1 {
  font-size: clamp(42px, 7vw, 76px);
}
.discovery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.discovery-card {
  display: block;
  min-height: 230px;
  padding: 26px 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  text-decoration: none;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.discovery-card:hover {
  border-color: #93aa85;
  box-shadow: 0 6px 22px #263c3210;
}
.discovery-card span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 26px;
}
.discovery-card h2 {
  font-size: 26px;
}
.discovery-card p {
  font-size: 14px;
}
.discovery-card b {
  font-size: 13px;
}
.research-item {
  border-top: 1px solid var(--line);
  padding: 24px 0 8px;
}
.research-item .preserve {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--ink);
}
.research-item .section-heading h3 {
  margin: 0 0 4px;
}
.research-item small {
  color: var(--muted);
  font-size: 12px;
}
blockquote {
  border-left: 3px solid #a3b394;
  background: #f5f7f0;
  margin: 18px 0;
  padding: 14px 18px;
  color: var(--muted);
  white-space: pre-wrap;
}
details {
  margin-top: 14px;
}
summary {
  cursor: pointer;
  color: var(--green);
  font-weight: 600;
  padding: 8px 0;
  min-height: 40px;
}
details form {
  margin-top: 16px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 28px 0;
}
.empty {
  padding: 24px;
  text-align: center;
  background: #f6f8f1;
  border-radius: 8px;
}
.portal-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  max-width: 1160px;
  margin: auto;
  padding: 22px 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}
.skip {
  position: fixed;
  left: 14px;
  top: 14px;
  transform: translateY(-150%);
  z-index: 999;
  background: white;
  padding: 10px;
}
.skip:focus {
  transform: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
progress {
  width: 100%;
  accent-color: var(--green);
}
@media (max-width: 1000px) {
  .discovery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two-column {
    grid-template-columns: 1fr;
  }
  .role-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  main {
    padding-top: 24px;
  }
  .page-heading {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .metrics > div {
    padding: 12px 16px;
  }
  .form-grid,
  .auth-layout,
  .role-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .full {
    grid-column: auto;
  }
  .auth-layout {
    gap: 28px;
  }
  .auth-layout h1 {
    font-size: 38px;
  }
  .identity-panel dl {
    margin: 0;
    flex-basis: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .discovery-grid {
    grid-template-columns: 1fr;
  }
  .discovery-card {
    min-height: 180px;
  }
  .discovery-card span {
    margin-bottom: 14px;
  }
  .welcome {
    padding-top: 20px;
  }
  .section-heading {
    flex-wrap: wrap;
  }
  td,
  th {
    padding: 11px;
  }
  .form-grid button,
  .form-stack button {
    width: 100%;
  }
  .filters button {
    flex-grow: 1;
  }
  .portal-footer {
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.photo-editor {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8faf5;
}
.photo-editor .avatar {
  width: 64px;
  height: 64px;
}
.photo-editor input[type="file"] {
  max-width: 100%;
}
.photo-editor .hint {
  margin: 10px 0;
}
.account-person {
  display: flex;
  gap: 12px;
  align-items: center;
}
.account-person .avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  font-size: 13px;
}
.evidence-picker {
  border: 1px dashed #a3b394;
  border-radius: 10px;
  padding: 18px;
  background: #f8faf5;
}
.evidence-picker .hint {
  margin: 10px 0 0;
}
.evidence-section {
  margin: 20px 0;
}
.evidence-section h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
}
.evidence-section h4 span {
  color: var(--muted);
  font-weight: 400;
}
.evidence-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.evidence-card {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fafbf7;
  border-radius: 9px;
  padding: 12px;
  min-width: 0;
}
.evidence-card > div {
  min-width: 0;
}
.evidence-card strong {
  display: block;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.evidence-card small {
  display: block;
  margin: 2px 0 4px;
}
.evidence-card a {
  font-size: 13px;
}
.evidence-preview,
.evidence-filetype {
  flex: 0 0 88px;
  height: 72px;
  border-radius: 5px;
  overflow: hidden;
  background: #e9eddf;
  display: grid;
  place-items: center;
}
.evidence-preview img {
  width: 88px;
  height: 72px;
  object-fit: contain;
}
.evidence-filetype {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--green);
}
.selected-evidence {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
}
.selected-evidence li {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 8px 0;
  font-size: 13px;
}
.selected-evidence li > span {
  flex: 1;
  overflow-wrap: anywhere;
}
.selected-evidence button {
  flex: 0 0 auto;
  padding: 6px 12px;
  min-height: 40px;
  font-size: 12px;
  width: auto;
}
[data-submit-status]:empty,
[data-evidence-status]:empty {
  display: none;
}
[data-submit-status],
[data-evidence-status] {
  overflow-wrap: anywhere;
}
@media (max-width: 620px) {
  .photo-editor {
    grid-template-columns: 1fr;
  }
}
