:root {
  color-scheme: light dark;
  font-family: ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  background: #f4f5f7;
  color: #1d1d1f;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 20px;
  background: color-mix(in srgb, #fff 88%, transparent);
  border-bottom: 1px solid #dedfe3;
}

.site-header__brand {
  color: inherit;
  font-weight: 750;
  text-decoration: none;
}

.site-header nav,
.site-header form {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0;
}

.site-header nav > a {
  color: inherit;
  text-decoration: none;
}

.site-header__button {
  padding: 7px 10px;
}

.login-dialog {
  width: min(100% - 40px, 360px);
  color: inherit;
  background: #fff;
  border: 1px solid #dedfe3;
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(35, 37, 45, 0.22);
}

.login-dialog::backdrop {
  background: rgba(20, 21, 24, 0.45);
}

.login-dialog form {
  padding: 6px;
}

.login-dialog h2 {
  margin: 0 0 16px;
}

.login-dialog__error {
  min-height: 1.2em;
  margin: 0;
  color: #a94e00;
}

.login-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

main {
  max-width: 760px;
  margin: 48px auto;
  padding: 0 20px 48px;
}

h1 {
  margin: 0 0 8px;
  letter-spacing: -0.04em;
}

.lede {
  margin: 0 0 28px;
  color: #67686d;
}

.card {
  margin-bottom: 18px;
  padding: 22px;
  background: #fff;
  border: 1px solid #dedfe3;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(35, 37, 45, 0.08);
}

.section-title {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 0 0 16px;
  font-size: 1.15rem;
}

.section-title span {
  color: #7b7c82;
  font-size: 0.875rem;
  font-weight: 400;
}

label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 650;
}

input,
select,
button {
  box-sizing: border-box;
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  color: inherit;
  background: #fff;
  border: 1px solid #c8c9ce;
  border-radius: 10px;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

button {
  padding: 10px 14px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  background: #1f6feb;
  border: 0;
  border-radius: 10px;
}

button.secondary {
  color: #292a2e;
  background: #e8e9ed;
}

button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.recipients {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.recipient {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px 6px 10px;
  color: #174ea6;
  font-size: 0.82rem;
  background: #e8f0ff;
  border-radius: 999px;
}

.recipient button {
  padding: 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  background: transparent;
}

.optional {
  color: #777980;
  font-weight: 400;
}

.hidden {
  display: none;
}

.checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  background: #fff7e7;
  border: 1px solid #f1d395;
  border-radius: 12px;
}

.checkbox input {
  width: auto;
  margin-top: 3px;
}

.checkbox label {
  margin: 0;
}

.send-button {
  margin-top: 18px;
}

#result {
  white-space: pre-wrap;
}

.result-success {
  color: #147d44;
}

.result-warning {
  color: #a94e00;
}

.error-page {
  max-width: 540px;
}

.error-page__status {
  margin: 0 0 8px;
  color: #a94e00;
  font-size: 0.875rem;
  font-weight: 750;
}

.skips {
  margin: 12px 0 0;
  padding-left: 20px;
}

.time-simulation-status {
	display: grid;
	gap: 12px;
	margin: 0 0 18px;
}

.time-simulation-status div {
	display: grid;
	grid-template-columns: 140px 1fr;
	gap: 12px;
}

.time-simulation-status dt {
	color: #67686d;
}

.time-simulation-status dd {
	margin: 0;
	font-variant-numeric: tabular-nums;
}

@media (prefers-color-scheme: dark) {
  body {
    color: #f5f5f7;
    background: #16171a;
  }

  .card {
    background: #222327;
    border-color: #3b3c43;
    box-shadow: none;
  }

  .site-header,
  .login-dialog {
    background: #222327;
    border-color: #3b3c43;
  }

  input,
  select {
    background: #191a1d;
    border-color: #52545c;
  }

  .checkbox {
    background: #3b2c12;
    border-color: #795317;
  }

  .recipient {
    color: #c9ddff;
    background: #13376b;
  }

  .secondary {
    color: #f5f5f7 !important;
    background: #3b3c43 !important;
  }
}
