:root {
  color-scheme: light;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #263d37;
  background: #f5f3ed;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }

header {
  max-width: 1200px;
  margin: auto;
  padding: 28px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid #d9ded4;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  color: #214d3f;
  font: 36px/1 Georgia, "Times New Roman", serif;
  text-decoration: none;
}
.brand span {
  font: 700 14px/1 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .2em;
}
.edition, .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .14em; line-height: 1.5; }
.edition { color: #586b5e; text-align: right; }

main { max-width: 850px; margin: 68px auto 64px; padding: 0 24px; }
.intro { max-width: 680px; }
.eyebrow { color: #52683e; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; }
h1 { margin: 14px 0 16px; font-size: clamp(35px, 5vw, 52px); font-weight: 400; line-height: 1.12; letter-spacing: -.035em; }
p { line-height: 1.7; }
.intro p { max-width: 600px; margin: 0 0 36px; color: #53665b; font-size: 16px; }

form {
  padding: 28px;
  border: 1px solid #d5ddd2;
  border-radius: 12px;
  background: #fffef9;
  box-shadow: 0 10px 30px rgb(32 57 43 / 5%);
}
label { display: block; margin-bottom: 14px; font-size: 15px; font-weight: 650; }
textarea {
  display: block;
  width: 100%;
  min-height: 108px;
  max-height: 400px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  resize: vertical;
  overflow-wrap: anywhere;
}
textarea::placeholder { color: #68786e; opacity: 1; }

.response-modes { min-width: 0; margin: 20px 0 0; padding: 0; border: 0; }
.response-modes legend { margin-bottom: 10px; padding: 0; color: #53665b; font-size: 13px; font-weight: 650; }
.mode-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.response-modes label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid #d5ddd2;
  border-radius: 8px;
  background: #fffef9;
  cursor: pointer;
  font-size: 14px;
  line-height: 1.3;
}
.response-modes label:hover { border-color: #8ca28c; }
.response-modes label:has(input:checked) { border-color: #557953; background: #edf3e9; }
.response-modes label:has(input:focus-visible) { outline: 2px solid #356c51; outline-offset: 3px; }
.response-modes input { flex: 0 0 auto; width: 18px; height: 18px; margin: 0; accent-color: #285744; }
.response-modes small { display: block; margin-top: 4px; color: #53665b; font-size: 12px; font-weight: 400; line-height: 1.4; }
.response-modes:disabled { opacity: .6; }
.response-modes:disabled label { cursor: wait; }

.form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e4e8df;
}
.form-footer > span { max-width: 330px; color: #596b60; font-size: 12px; line-height: 1.5; }
.form-footer > div { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
button, .support-primary, .support-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 7px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
button, .support-primary { background: #285744; color: #fff; }
button:hover:enabled, .support-primary:hover { background: #1c4333; }
button:disabled { opacity: .6; cursor: wait; }
#stop, .support-secondary { border-color: #cbd9cc; background: #e8ede5; color: #263d37; }
#stop:hover, .support-secondary:hover { background: #dce7d9; }
#submit span { margin-left: 16px; }

#site-stats {
  margin: 26px 0;
  padding: 16px 20px;
  border: 1px solid #dfe4d9;
  border-radius: 9px;
  background: #f0f2e9;
}
#site-stats-title {
  margin: 0 0 10px;
  color: #53665b;
  font: 700 12px/1.4 ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.stats-caption { margin: 0 0 12px; color: #53665b; font-size: 13px; line-height: 1.5; }
#site-stats dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
#site-stats dl > div { min-width: 0; }
#site-stats dl > div + div { padding-left: 14px; border-left: 1px solid #d8dfd3; }
#site-stats dt { color: #53665b; font-size: 12px; line-height: 1.4; }
#site-stats dd {
  margin: 3px 0 0;
  color: #214d3f;
  font-size: clamp(18px, 3vw, 23px);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
#stats-status { margin: 10px 0 0; color: #596b60; font-size: 12px; line-height: 1.5; }
#stats-status:empty { display: none; }

#research { margin-top: 36px; }
.status-line { display: flex; align-items: center; gap: 10px; min-height: 30px; }
#status { margin: 0; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.activity { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #62865a; animation: pulse 1.3s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
#progress { margin: 14px 0 0; padding-left: 22px; color: #53665b; font-size: 13px; line-height: 1.7; }
#progress li { margin: 7px 0; overflow-wrap: anywhere; }
#answer { margin: 28px 0; line-height: 1.8; overflow-wrap: anywhere; }
#answer h2, #answer h3 { margin: 1.3em 0 .45em; font-weight: 400; line-height: 1.3; }
#answer a { color: #176042; text-underline-offset: 3px; }
#answer pre { max-width: 100%; padding: 16px; overflow: auto; border-radius: 6px; background: #e8ece4; }
#answer table { display: block; max-width: 100%; overflow: auto; border-collapse: collapse; }
#answer td, #answer th { padding: 8px; border: 1px solid #cdd6c9; }
#answer blockquote { margin-left: 0; padding-left: 18px; border-left: 3px solid #a5b393; color: #53665b; }
#sources-panel { padding-top: 12px; border-top: 1px solid #d9ded4; }
summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-size: 14px; font-weight: 650; line-height: 1.4; }
#sources details { border-bottom: 1px solid #e2e6db; scroll-margin-top: 20px; }
#sources summary { font-weight: 400; overflow-wrap: anywhere; }
#sources p { margin: 0 0 16px; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }

#site-support { margin-top: 48px; }
.support-panel {
  padding: 28px 30px;
  border-top: 1px solid #cfd9cc;
  border-bottom: 1px solid #cfd9cc;
  background: #edf1e8;
}
.support-panel h2 { margin: 0 0 8px; color: #214d3f; font-size: 25px; font-weight: 400; line-height: 1.25; }
.support-panel p { max-width: 600px; margin: 0 0 18px; color: #53665b; font-size: 14px; }
.support-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.support-primary { flex-direction: column; }
.support-primary small { display: block; font-size: 11px; font-weight: 400; }
footer { padding: 24px 24px 36px; color: #596b60; font-size: 12px; line-height: 1.8; text-align: center; }
footer a { color: #285744; text-underline-offset: 3px; }
.signature { display: block; margin-top: 8px; }

[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #356c51; outline-offset: 4px; }

@media (max-width: 600px) {
  header { padding: 20px 24px; }
  .edition { display: none; }
  main { margin-top: 44px; }
  form { padding: 22px; }
  .form-footer { align-items: flex-start; flex-direction: column; }
  .form-footer > div { align-self: flex-end; }
}

@media (max-width: 420px) {
  header { padding: 18px 16px; }
  main { margin-top: 36px; padding: 0 16px; }
  .intro p { margin-bottom: 28px; }
  form { padding: 18px; }
  .mode-options { grid-template-columns: 1fr; }
  #site-stats { padding: 14px; }
  #site-stats dl { gap: 8px; }
  #site-stats dl > div + div { padding-left: 8px; }
  #site-stats dt { font-size: 11px; }
  .support-panel { padding: 24px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .activity { animation: none; }
}
