@import url("https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap");
:root {
  --bg: #f4f5f2;
  --surface: #fff;
  --ink: #192d2d;
  --muted: #63716b;
  --line: #dbe1da;
  --green: #27624e;
  --soft: #e8efe8;
  --mono: "IBM Plex Mono", monospace;
  --serif: Newsreader, Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
}
button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input,
textarea,
select {
  outline-offset: 4px;
}
button {
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 9px 14px;
}
button:hover {
  border-color: var(--green);
  background: var(--soft);
}
button:disabled {
  cursor: wait;
  opacity: 0.5;
}
a {
  color: var(--green);
  text-underline-offset: 3px;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 22px 36px;
  background: var(--surface);
  gap: 20px;
}
header nav {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 13px;
}
.brand {
  text-decoration: none;
  font: 500 27px var(--serif);
  color: var(--ink);
}
.brand span {
  display: block;
  font: 10px var(--mono);
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-top: 6px;
}
.shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  max-width: 1540px;
  margin: auto;
}
aside {
  border-right: 1px solid var(--line);
  padding: 36px 22px;
  min-height: calc(100vh - 190px);
}
.eyebrow {
  font: 11px var(--mono);
  letter-spacing: 0.13em;
  color: var(--green);
  text-transform: uppercase;
  margin: 0 0 18px;
}
aside nav {
  display: grid;
  gap: 5px;
}
aside nav button {
  display: flex;
  justify-content: space-between;
  text-align: left;
  border: 0;
  background: none;
  color: var(--muted);
  padding: 11px 12px;
}
aside nav button span {
  font: 11px var(--mono);
  opacity: 0.6;
}
.selected {
  background: var(--soft) !important;
  color: var(--green) !important;
}
main {
  padding: 40px 44px 64px;
  min-width: 0;
}
h1 {
  font: 500 clamp(34px, 4vw, 48px) / 1.08 var(--serif);
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}
h2 {
  font: 500 27px/1.2 var(--serif);
  margin: 0 0 14px;
}
h3 {
  font: 500 21px/1.25 var(--serif);
  margin: 0 0 10px;
}
p {
  margin: 0 0 16px;
}
.lede {
  font-size: 17px;
  color: var(--muted);
  max-width: 65ch;
  line-height: 1.6;
}
.hero {
  padding: 6px 0 27px;
  position: relative;
}
.hero .label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: 11px var(--mono);
  padding: 6px 9px;
  background: var(--soft);
  color: var(--green);
  border-radius: 3px;
  margin-bottom: 23px;
}
.dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  margin-right: 5px;
}
.aside-note {
  margin-top: 64px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.65;
}
.aside-note p {
  margin-top: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  background: var(--surface);
  margin-bottom: 32px;
}
.stat {
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}
.stat:last-child {
  border: 0;
}
.stat b {
  display: block;
  font: 500 34px var(--serif);
  margin-bottom: 7px;
}
.stat span {
  font: 10px var(--mono);
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: uppercase;
}
.columns {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
}
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 22px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.section-head h2 {
  margin: 0;
}
.section-head a,
.section-head button {
  font-size: 12px;
}
.row {
  border-top: 1px solid var(--line);
  padding: 16px 0;
}
.row:last-child {
  padding-bottom: 0;
}
.row h3 {
  margin-bottom: 6px;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  font: 11px var(--mono);
  color: var(--muted);
  margin: 6px 0 10px;
}
.badge {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 3px;
  font: 10px var(--mono);
  background: var(--soft);
  color: var(--green);
}
.badge.submitted,
.badge.pending {
  background: #fbf0d9;
  color: #805e18;
}
.badge.failed,
.badge.rejected,
.badge.revoked {
  background: #f8e6e0;
  color: #9a4433;
}
.fine {
  font-size: 12px;
  color: var(--muted);
}
.empty {
  color: var(--muted);
  padding: 18px 0;
  font-size: 14px;
}
.flow {
  list-style: none;
  padding: 0;
  counter-reset: step;
}
.flow li {
  position: relative;
  padding: 0 0 20px 35px;
  font-size: 13px;
  color: var(--muted);
}
.flow li::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  font: 11px var(--mono);
  color: var(--green);
}
.flow b {
  display: block;
  font-size: 14px;
  color: var(--ink);
  margin-bottom: 3px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.primary:hover {
  background: #194a39;
  color: #fff;
}
.callout {
  border-left: 3px solid var(--green);
  padding: 12px 16px;
  background: var(--soft);
  font-size: 13px;
  color: var(--green);
  margin-bottom: 24px;
}
label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 14px;
}
input,
textarea,
select {
  display: block;
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  margin-top: 6px;
}
textarea {
  min-height: 100px;
  resize: vertical;
}
form {
  max-width: 720px;
}
details {
  margin: 14px 0;
}
summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--green);
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font: 12px/1.6 var(--mono);
  background: var(--bg);
  padding: 16px;
  max-height: 480px;
  overflow: auto;
}
code {
  font: 12px var(--mono);
  overflow-wrap: anywhere;
}
.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 22px;
}
.toolbar input {
  margin: 0;
}
.toolbar select {
  width: 180px;
  margin: 0;
}
.notice {
  padding: 12px 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  margin-bottom: 20px;
  font-size: 13px;
}
.notice.error {
  background: #f8e6e0;
  color: #9a4433;
}
.notice:empty {
  display: none;
}
footer {
  border-top: 1px solid var(--line);
  padding: 22px 36px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
dialog {
  width: min(570px, 94vw);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  background: var(--surface);
  color: var(--ink);
  max-height: 90vh;
  overflow: auto;
}
dialog::backdrop {
  background: #12262170;
}
.close {
  float: right;
  padding: 2px 8px;
  font-size: 22px;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 26px 0;
}
.key {
  word-break: break-all;
  user-select: all;
  font: 12px var(--mono);
}
[hidden] {
  display: none !important;
}
@media (max-width: 1050px) {
  .columns {
    grid-template-columns: 1fr;
  }
  main {
    padding: 30px 25px;
  }
  .stat {
    padding: 16px;
  }
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}
@media (max-width: 720px) {
  header {
    padding: 18px 20px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 25px;
  }
  header nav {
    gap: 15px;
    flex-wrap: wrap;
  }
  .shell {
    display: block;
  }
  aside {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 18px;
  }
  aside > .eyebrow,
  .aside-note {
    display: none;
  }
  aside nav {
    display: flex;
    overflow: auto;
    gap: 3px;
  }
  aside nav button {
    white-space: nowrap;
    padding: 9px 12px;
  }
  aside nav button span {
    display: none;
  }
  main {
    padding: 28px 20px 40px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat:nth-child(2) {
    border-right: 0;
  }
  .stat:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .panel {
    padding: 20px;
  }
  .toolbar {
    flex-wrap: wrap;
  }
  .toolbar select {
    width: 100%;
  }
  footer {
    padding: 22px 20px;
  }
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.project-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.project-card p:not(.eyebrow) {
  flex: 1;
  color: var(--muted);
  font-size: 14px;
}
.project-card h3 {
  font-size: 26px;
}
.project-card .eyebrow {
  line-height: 1.5;
}
.research-overview {
  margin-bottom: 24px;
}
.research-figure {
  margin: 22px 0;
}
.research-figure img {
  max-width: 100%;
  height: auto;
  display: block;
  background: white;
  border: 1px solid var(--line);
}
.research-figure figcaption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 10px;
}
.panel li {
  margin-bottom: 12px;
}
@media (max-width: 1100px) {
  .project-grid {
    grid-template-columns: 1fr;
  }
}
.project-card .badge {
  white-space: normal;
}

.donation { max-width: 1100px; margin: 32px auto; padding: 24px; border: 1px solid var(--line, #ddd); border-radius: 12px; }
.donation h2 { margin: 0 0 8px; font-size: 1.35rem; }
.donation p { max-width: 66ch; margin: 0 0 18px; }
.donation-links { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donation .donate-button { display: inline-block; background: #194d40; color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.donation .donate-button:hover { background: #123c31; }
@media (max-width: 700px) { .donation { margin: 24px 16px; } }
