:root {
  font-family:
    system-ui,
    -apple-system,
    "PingFang SC",
    sans-serif;
  color: #20382d;
  background: #f5f4ed;
  font-size: 18px;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 5%;
  border-bottom: 1px solid #d6ddce;
}
a {
  color: inherit;
  text-decoration: none;
}
header > a {
  font-weight: 800;
  font-size: 27px;
}
small {
  font-size: 16px;
  font-weight: 400;
  margin-left: 14px;
}
main {
  max-width: 1200px;
  margin: 64px auto;
  padding: 0 24px;
}
h1 {
  font-size: clamp(30px, 4.2vw, 46px);
  letter-spacing: -1px;
  margin: 14px 0 24px;
}
h2 {
  margin: 0;
  font-size: 24px;
}
.eyebrow {
  font-size: 14px;
  letter-spacing: 2px;
  color: #64835c;
}
.muted {
  color: #6e7c6e;
  line-height: 1.8;
}
#login {
  max-width: 460px;
  margin: 90px auto;
}
label {
  display: block;
  font-size: 16px;
  color: #59704d;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  border: 1px solid #c9d4bf;
  background: #fffefa;
  color: #20382d;
  border-radius: 0;
  padding: 12px;
  margin: 8px 0 20px;
  font: inherit;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
button,
.button {
  display: inline-block;
  border: 1px solid #bac9ad;
  background: transparent;
  color: #20382d;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
}
button:hover,
.button:hover {
  background: #e3e9d8;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
.primary {
  background: #244735;
  color: #fff;
  border-color: #244735;
}
.primary:hover {
  background: #386449;
}
#login-form button {
  width: 100%;
}
.title {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
}
#filters {
  display: flex;
  gap: 16px;
  align-items: end;
  border-top: 1px solid #c9d4bf;
  padding-top: 25px;
  margin-top: 20px;
}
#filters label:first-child {
  flex: 1;
}
#filters input,
#filters select {
  margin-bottom: 0;
}
#filters button {
  height: 46px;
}
.lead {
  border: 1px solid #ced7c4;
  background: #fffefa;
  margin: 20px 0;
  padding: 26px;
}
.lead-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.badge {
  padding: 6px 12px;
  background: #e6edda;
  color: #416238;
  font-size: 14px;
  white-space: nowrap;
}
.lead p {
  line-height: 1.9;
  overflow-wrap: anywhere;
}
.contact a {
  text-decoration: underline;
}
.details {
  white-space: pre-wrap;
}
.lead-edit {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  margin-top: 20px;
}
.lead-edit button {
  grid-column: 2;
  justify-self: end;
}
.history {
  font-size: 14px;
  color: #6e7c6e;
  border-top: 1px solid #e2e7dc;
  margin-top: 18px;
  padding-top: 12px;
}
.history summary {
  cursor: pointer;
}
.pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  margin-top: 32px;
}
#status {
  color: #9d4325;
  line-height: 1.8;
}
footer {
  max-width: 1200px;
  margin: 60px auto;
  padding: 24px;
  color: #7c8976;
  font-size: 14px;
  border-top: 1px solid #d6ddce;
}
input:focus-visible,
button:focus-visible,
a:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid #ff8054;
  outline-offset: 3px;
}
@media (max-width: 650px) {
  main {
    margin-top: 36px;
    padding: 0 16px;
  }
  .title,
  #filters,
  .lead-top {
    align-items: stretch;
    flex-direction: column;
  }
  .title .button {
    align-self: start;
  }
  .lead {
    padding: 18px;
  }
  .lead-edit {
    grid-template-columns: 1fr;
  }
  .lead-edit button {
    grid-column: 1;
  }
  .lead-top {
    gap: 10px;
  }
  .badge {
    align-self: start;
  }
  #login {
    margin: 50px auto;
  }
}
