#opam {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 60px;
  /* Capped and centred, so the two columns stay together rather than drifting
     to the edges of a wide screen. Padding keeps the content off the edges
     before the cap kicks in. */
  max-width: 1380px;
  margin: 60px auto 100px auto;
  padding: 0 40px;
  align-items: start;
}

/* ---------------------------------------------------------------- signup */

#opam h2 {
  color: var(--color-5);
  font-size: var(--font-size-1);
  margin-bottom: 24px;
}
#opam .opam-lede {
  font-family: var(--font-family-1);
  font-size: var(--font-size-5);
  line-height: 1.35;
  color: var(--color-2);
  margin-bottom: 40px;
  max-width: 20em;
}

#opam .subscribe form {
  display: flex;
  flex-flow: column nowrap;
  gap: 18px;
  max-width: 420px;
}
#opam .form-field-group label {
  display: block;
  font-family: var(--font-family-2);
  font-size: var(--font-size-4);
  color: var(--color-2);
  margin-bottom: 6px;
}
#opam .form-field-group input[type="email"],
#opam .form-field-group input[type="text"] {
  width: 100%;
  padding: 14px 12px;
  background: transparent;
  border: 1px solid var(--color-4);
  color: var(--color-2);
  font-family: var(--font-family-2);
  font-size: var(--font-size-8);
}
#opam .form-field-group input:focus {
  outline: none;
  border-color: var(--color-2);
}
#opam input[type="submit"] {
  align-self: flex-start;
  padding: 14px 28px;
  background: transparent;
  border: 1px solid var(--color-2);
  border-radius: 4px;
  color: var(--color-2);
  font-family: var(--font-family-1);
  font-size: var(--font-size-2);
  cursor: pointer;
}
#opam input[type="submit"]:hover:not(:disabled) {
  background: var(--color-2);
  color: var(--color-1);
}
#opam input[type="submit"]:disabled {
  opacity: 0.5;
  cursor: default;
}

/* --------------------------------------------------------------- archive */

#opam .opam-archive {
  margin-top: 70px;
}
#opam .opam-year-static,
#opam .opam-year {
  color: var(--color-5);
  font-family: var(--font-family-1);
  font-size: var(--font-size-1);
  margin-bottom: 18px;
}
#opam .opam-year {
  background: transparent;
  border: 0;
  padding: 0 22px 0 0;
  cursor: pointer;
  /* the chevron, so the select does not read as a form control */
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='9'><path d='M1 1l6 6 6-6' stroke='%23FF9900' stroke-width='1.6' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right center;
}
#opam .opam-year option {
  background: var(--color-1);
}

#opam .opam-months {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px 22px;
  border-top: 1px solid var(--color-3);
  padding-top: 26px;
}
#opam .opam-months li {
  display: flex;
  flex-flow: column nowrap;
  gap: 10px;
}
#opam .opam-month {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
#opam .opam-month.is-waiting {
  border: 1px dashed var(--color-3);
  color: var(--color-4);
  font-family: var(--font-family-2);
  font-size: var(--font-size-2);
}
#opam .opam-month.is-sent {
  border: 1px solid var(--color-2);
  padding: 3px;
}
#opam .opam-month.is-sent img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#opam .opam-month.is-sent:hover {
  border-color: var(--color-5);
}
#opam .opam-month-name {
  font-family: var(--font-family-2);
  font-size: var(--font-size-4);
  color: var(--color-2);
}

/* --------------------------------------------------------------- letters */

#opam .opam-letters {
  position: relative;
  padding-left: 30px;
}
#opam .opam-letter {
  position: relative;
  background: #ffffff;
  color: #1a1a1a;
  padding: 26px 26px 34px 26px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  /* Each card behind peeks out above and to the left of the one in front. */
  transform: rotate(calc(var(--i) * 1.4deg));
  z-index: calc(10 - var(--i));
}
#opam .opam-letter:first-child {
  transform: rotate(-0.8deg);
}
#opam .opam-letter + .opam-letter {
  margin-top: -94%;
  margin-left: -26px;
}
#opam .opam-tag {
  position: absolute;
  top: -12px;
  right: 26px;
  background: var(--color-6);
  color: #1a1a1a;
  font-family: 'Courier New', Courier, monospace;
  font-size: var(--font-size-4);
  padding: 4px 12px;
  transform: rotate(-1.5deg);
}
#opam .opam-letter-head {
  font-family: 'Courier New', Courier, monospace;
  font-size: var(--font-size-4);
  line-height: 1.5;
  color: #1a1a1a;
  padding-bottom: 14px;
  border-bottom: 1px dashed #b4b4b4;
  margin-bottom: 22px;
}
#opam .opam-letter-image {
  display: block;
}
#opam .opam-letter-image img {
  width: 100%;
  display: block;
}
#opam .opam-letter-caption {
  font-family: var(--font-family-2);
  font-size: var(--font-size-4);
  color: #333333 !important;
  margin: 12px 0 0 0;
}
#opam .opam-letter-body {
  margin-top: 22px;
}
#opam .opam-letter-body p {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: var(--font-size-8);
  line-height: 1.6;
  color: #1a1a1a !important;
  margin-bottom: 0;
}
#opam .opam-letter-sign {
  margin-top: 16px !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------------------------------------------------------- mobile */

@media (max-width: 1000px) {
  #opam {
    grid-template-columns: 1fr;
    gap: 70px;
  }
  #opam .opam-letters {
    padding-left: 0;
  }
}

@media (max-width: 600px) {
  /* body already carries a small margin, so ease off here */
  #opam {
    padding: 0 6px;
  }
  #opam .opam-months {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 16px;
  }
  #opam .opam-lede {
    font-size: var(--font-size-6);
  }
  /* Stacking reads as a mess on a narrow screen, so run them as a column. */
  #opam .opam-letter,
  #opam .opam-letter:first-child {
    transform: none;
  }
  #opam .opam-letter + .opam-letter {
    margin-top: 30px;
    margin-left: 0;
  }
}
