/* Newsletter archive index and issue reader. */
/* stylelint-disable no-descending-specificity, selector-class-pattern */

.wh-archive {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 0 68px;
  color: var(--wh-ink);
}

.wh-archive-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 36px;
  align-items: end;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--wh-line);
}

.wh-archive-title {
  margin: 0 0 10px;
  color: var(--wh-ink);
  font-family: "Instrument Serif", georgia, serif;
  font-size: clamp(40px, 5vw, 56px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.wh-archive-sub {
  max-width: 52ch;
  margin: 0;
  color: var(--wh-body);
  font-size: 16px;
  line-height: 1.5;
}

.wh-archive-subscribed {
  margin: 0;
  color: var(--wh-muted);
  font-size: 14px;
}

.wh-archive-form form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.wh-archive-input {
  width: 240px;
  max-width: 100%;
  height: 44px;
  padding: 0 16px;
  border: 1px solid var(--wh-line);
  border-radius: var(--wh-pill);
  background: var(--wh-surface);
  color: var(--wh-ink);
  font-size: 14px;
}

.wh-archive-input:focus-visible {
  outline: 2px solid var(--wh-focus);
  outline-offset: 2px;
}

.wh-archive-button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--wh-pill);
  background: var(--wh-accent);
  color: #fff;
  font-family: var(--wh-font-label);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 140ms ease;
}

.wh-archive-button:hover,
.wh-archive-button:focus-visible {
  background: var(--wh-accent-hover);
  color: #fff;
}

.wh-archive-button:focus-visible {
  outline: 2px solid var(--wh-focus);
  outline-offset: 3px;
}

.wh-ledger {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wh-ledger-item {
  border-bottom: 1px solid var(--wh-line);
}

.wh-ledger-link {
  display: grid;
  grid-template-columns: 126px minmax(0, 1fr) auto;
  gap: 8px 24px;
  align-items: start;
  padding: 24px 14px;
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: background-color 140ms ease;
}

.wh-ledger-link:hover,
.wh-ledger-link:focus-visible {
  background: rgb(255 255 255 / 38%);
  color: inherit;
  text-decoration: none;
}

.wh-ledger-link:focus-visible {
  outline: 2px solid var(--wh-focus);
  outline-offset: 2px;
}

.wh-ledger-date {
  padding-top: 4px;
  color: var(--wh-muted);
  font-family: var(--wh-font-label);
  font-size: 12px;
  line-height: 1.4;
}

.wh-ledger-latest {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  color: var(--wh-accent);
  font-family: var(--wh-font-label);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wh-ledger-latest::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wh-accent);
  content: "";
}

.wh-ledger-headline {
  margin: 0 0 12px;
  color: var(--wh-ink);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.012em;
  transition: color 140ms ease;
}

.wh-ledger-link:hover .wh-ledger-headline,
.wh-ledger-link:focus-visible .wh-ledger-headline {
  color: var(--wh-accent);
}

.wh-pick-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 8px;
}

.wh-pick-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 4px 10px 4px 6px;
  border: 1px solid var(--wh-line);
  border-radius: var(--wh-pill);
  background: rgb(251 249 247 / 74%);
  color: var(--wh-body);
  font-size: 12.5px;
  line-height: 1.2;
  text-decoration: none;
  transition: border-color 140ms ease, color 140ms ease, background-color 140ms ease;
}

a.wh-pick-chip:hover,
a.wh-pick-chip:focus-visible {
  border-color: var(--wh-ink);
  background: var(--wh-surface);
  color: var(--wh-ink);
  text-decoration: none;
}

.wh-pick-chip img {
  width: 15px;
  height: 15px;
  border-radius: 3px;
  object-fit: contain;
}

.wh-ledger-arrow {
  padding-top: 3px;
  color: var(--wh-muted);
  font-size: 16px;
  transition: color 140ms ease;
}

.wh-ledger-link:hover .wh-ledger-arrow,
.wh-ledger-link:focus-visible .wh-ledger-arrow {
  color: var(--wh-accent);
}

.wh-archive-empty {
  padding: 48px 0;
  color: var(--wh-muted);
  font-size: 15px;
}

.wh-archive-pagination {
  margin-top: 32px;
}

/* Issue Reader */
.wh-issue {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 0 76px;
  color: var(--wh-ink);
}

.wh-issue-back {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--wh-muted);
  font-size: 13px;
  text-decoration: none;
}

.wh-issue-back:hover,
.wh-issue-back:focus-visible {
  color: var(--wh-ink);
  text-decoration: none;
}

.wh-issue-date {
  margin: 0 0 10px;
  color: var(--wh-muted);
  font-family: var(--wh-font-label);
  font-size: 12px;
}

.wh-issue-title {
  margin: 0 0 20px;
  color: var(--wh-ink);
  font-family: "Instrument Serif", georgia, serif;
  font-size: clamp(36px, 5vw, 50px);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.wh-issue-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.wh-issue-sheet {
  padding: 36px 36px 28px;
  border: 1px solid var(--wh-line);
  border-radius: 16px;
  background: var(--wh-surface);
  box-shadow: 0 14px 36px -28px rgb(45 37 31 / 35%);
  color: var(--wh-body);
  font-size: 15.5px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.wh-issue-sheet table {
  max-width: 100% !important;
  box-shadow: none !important;
}

.wh-issue-sheet > table > tbody > tr > td {
  padding: 0 !important;
}

.wh-issue-sheet .content-block {
  padding: 0 0 20px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.wh-issue-sheet .website-card {
  margin-bottom: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--wh-line);
}

.wh-issue-sheet .website-card:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.wh-issue-sheet .website-image-container {
  overflow: hidden;
  width: 100%;
  margin: 14px 0;
  border-radius: 10px;
  background: var(--wh-paper-raised);
}

.wh-issue-sheet img {
  max-width: 100%;
  height: auto;
}

.wh-issue-sheet a {
  color: var(--wh-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.wh-issue-sheet a:hover {
  color: var(--wh-accent-hover);
}

.wh-issue-sheet .cta-button {
  display: inline-block;
  margin: 12px 0;
  padding: 10px 20px;
  border-radius: var(--wh-pill);
  background: var(--wh-accent) !important;
  color: #fff !important;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none !important;
}

.wh-issue-sheet .cta-button:hover {
  background: var(--wh-accent-hover) !important;
}

.wh-issue-sheet .footer {
  display: none;
}

.wh-issue-pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--wh-line);
  border-bottom: 1px solid var(--wh-line);
}

.wh-pager-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
  transition: background-color 140ms ease;
}

a.wh-pager-link:hover,
a.wh-pager-link:focus-visible {
  background: rgb(255 255 255 / 40%);
  color: inherit;
  text-decoration: none;
}

.wh-pager-link--next {
  text-align: right;
}

.wh-pager-link--muted {
  opacity: 0.5;
}

.wh-pager-dir {
  color: var(--wh-muted);
  font-family: var(--wh-font-label);
  font-size: 11px;
}

.wh-pager-title {
  color: var(--wh-ink);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.35;
}

.wh-issue-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding: 28px 30px;
  border-radius: 14px;
  background: var(--wh-ink);
  color: var(--wh-surface);
}

.wh-issue-cta h2 {
  margin: 0 0 4px;
  color: var(--wh-surface);
  font-family: "Instrument Serif", georgia, serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1.1;
}

.wh-issue-cta p {
  margin: 0;
  color: rgb(251 249 247 / 74%);
  font-size: 14px;
}

.wh-issue-cta .wh-archive-input {
  border-color: transparent;
}

@media (width <= 767.98px) {
  .wh-archive {
    padding: 28px 0 48px;
  }

  .wh-archive-head {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }

  .wh-archive-input {
    width: 100%;
    flex: 1 1 200px;
  }

  .wh-ledger-link {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 14px;
    padding: 20px 6px;
  }

  .wh-ledger-date {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 0;
  }

  .wh-ledger-latest {
    margin-top: 0;
  }

  .wh-issue-sheet {
    padding: 22px 18px;
  }

  .wh-issue-pager {
    grid-template-columns: minmax(0, 1fr);
  }

  .wh-pager-link--next {
    text-align: left;
  }

  .wh-issue-cta {
    padding: 22px 20px;
  }
}
