*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #e6e0d4;
  color: #1c1916;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Inter, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color-scheme: light;
}

main {
  flex: 1 0 auto;
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 28px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}

h2 {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
}

.edition {
  margin: 4px 0 12px;
}

.hint,
.note,
.kicker,
.missing,
.status,
.lbl {
  color: #5e574e;
  font-size: 13px;
}

.hint {
  margin-top: 10px;
}

.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

button,
.choices button {
  font: inherit;
  font-size: 13px;
  line-height: 1.3;
  padding: 4px 10px;
  border: 1px solid #1c1916;
  border-radius: 6px;
  background: transparent;
  color: #1c1916;
  cursor: pointer;
  text-align: left;
}

button:hover {
  background: #f3ece1;
}

button[aria-pressed="true"],
button[aria-pressed="true"]:hover {
  background: #1c1916;
  color: #fffcf7;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid #1c1916;
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

button:disabled:hover {
  background: transparent;
  color: #1c1916;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

#form-body {
  margin-top: 10px;
}

.people-label {
  margin: 0 0 6px;
  font-size: 13px;
  color: #5e574e;
}

.person {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(0, 0.7fr) auto;
  gap: 6px;
  align-items: end;
}

.person.with-role {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 0.55fr) minmax(0, 0.95fr) auto;
}

.person + .person {
  margin-top: 6px;
}

.person .lbl {
  font-size: 12px;
  color: #5e574e;
}

.person .remove {
  align-self: end;
}

@media (min-width: 701px) {
  .person:not(:first-of-type) .lbl {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }
}

.people .add {
  margin-top: 6px;
}

.fields {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  font-size: 12px;
  color: #5e574e;
}

.field.w2 { grid-column: span 2; }
.field.w3 { grid-column: span 3; }
.field.w4 { grid-column: span 4; }
.field.w6 { grid-column: span 6; }

.tick {
  display: flex;
  align-items: center;
  gap: 6px;
  grid-column: 1 / -1;
  font-size: 14px;
  color: #1c1916;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.tick input,
.field input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: #1c1916;
}

input,
select {
  width: 100%;
  margin: 0;
  padding: 6px 8px;
  border: 1px solid #1c1916;
  border-radius: 6px;
  background: #fffcf7;
  color: #1c1916;
  font: inherit;
  font-size: 14px;
}

input::placeholder {
  color: #8c8478;
  opacity: 1;
}

.subchoice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  grid-column: 1 / -1;
}

.sublabel {
  font-size: 12px;
  color: #5e574e;
}

.block {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(28, 25, 22, 0.28);
}

.kicker {
  margin-top: 8px;
}

.missing {
  margin-top: 6px;
  color: #1c1916;
  font-size: 14px;
}

.hang {
  margin: 4px 0 0;
  padding-left: 0.5in;
  text-indent: -0.5in;
  font-family: "Liberation Serif", "Noto Serif", Georgia, serif;
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.hang em,
.form-line em {
  font-style: italic;
}

.hang a {
  color: inherit;
}

.form-line {
  margin: 4px 0 0;
  font-family: "Liberation Serif", "Noto Serif", Georgia, serif;
  font-size: 16px;
  line-height: 1.4;
}

.form-line .k {
  display: inline-block;
  min-width: 11.5em;
  margin-right: 6px;
  font-family: Inter, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: 12px;
  color: #5e574e;
  vertical-align: baseline;
}

.list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 12px;
}

.list-head button {
  margin-left: auto;
}

#empty {
  margin-top: 8px;
}

.entry + .entry {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(28, 25, 22, 0.28);
}

.entry .actions {
  margin-top: 8px;
}

.entry .form-line {
  font-size: 15px;
}

.status {
  min-height: 1.2em;
  margin-top: 10px;
}

@media (max-width: 700px) {
  h1 {
    font-size: 20px;
  }

  .fields {
    grid-template-columns: 1fr 1fr;
  }

  .field.w2,
  .field.w3,
  .field.w4,
  .field.w6 {
    grid-column: span 2;
  }

  .person,
  .person.with-role {
    grid-template-columns: 1fr;
  }

  .person .remove {
    justify-self: start;
  }

  .form-line .k {
    display: block;
    min-width: 0;
    margin-bottom: 1px;
  }

  .list-head button {
    margin-left: 0;
  }
}
