/* =========================================
   READ NEXT + NEW-STORY EMAILS
   End of every open story (open-stories/assets/_story-end.php),
   /open-stories/ and /follow. Uses currentColor so it suits the dark
   reader, reading mode, and the light pages alike.
   ========================================= */

/* ---------- Read next ---------- */

.story-next {
  max-width: 34rem;
  margin: 4rem auto 0;
  padding: 0 16px;
}

.story-next-kicker {
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
  margin: 0 0 1rem;
}

.story-next-card {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  color: inherit;
  text-decoration: none;
  border: 1px solid rgba(128, 128, 128, 0.35);
  border-radius: 4px;
  padding: 1rem;
}

.story-next-card:hover,
.story-next-card:focus-visible {
  border-color: currentColor;
}

.story-next-card img {
  flex: 0 0 auto;
  width: 64px;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 2px;
}

.story-next-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.story-next-name {
  font-size: 1.15rem;
  font-weight: normal;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.story-next-meta {
  font-size: 0.85rem;
  opacity: 0.7;
}

.story-next-desc {
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.85;
}

/* ---------- Follow box ---------- */

.follow-box {
  max-width: 34rem;
  margin: 4rem auto 1rem;
  padding: 2rem 16px 0;
  border-top: 1px solid rgba(128, 128, 128, 0.35);
  text-align: center;
  box-sizing: border-box;
}

.follow-title {
  font-size: 1.15rem;
  font-weight: normal;
  font-style: italic;
  margin: 0 0 0.5rem;
}

.follow-intro {
  font-size: 0.95rem;
  opacity: 0.75;
  margin: 0 0 1.4rem;
}

.follow-error {
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.follow-label {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.follow-row {
  display: flex;
  gap: 0.5rem;
  max-width: 26rem;
  margin: 0 auto;
}

.follow-row input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 1rem;
  color: inherit;
  background: rgba(128, 128, 128, 0.08);
  border: 1px solid rgba(128, 128, 128, 0.4);
  border-radius: 4px;
  padding: 0.55rem 0.75rem;
}

.follow-row input[type="email"]::placeholder {
  color: inherit;
  opacity: 0.5;
}

.follow-row input[type="email"]:focus {
  outline: 2px solid rgba(128, 128, 128, 0.7);
  outline-offset: 1px;
}

.follow-row button {
  flex: 0 0 auto;
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: inherit;
  background: transparent;
  border: 1px solid rgba(128, 128, 128, 0.6);
  border-radius: 4px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
}

.follow-row button:hover {
  border-color: currentColor;
}

.follow-alt {
  font-size: 0.85rem;
  opacity: 0.65;
  margin: 1rem 0 0;
}

.follow-alt a {
  color: inherit;
}

.follow-hp {
  position: absolute !important;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 420px) {
  .follow-row {
    flex-direction: column;
  }
}

@media print {
  .story-next,
  .follow-box {
    display: none !important;
  }
}

/* Light pages: the base stylesheet colors buttons and fields for the
   dark site, so set ink explicitly here. */
body.light-shell .follow-box,
body.light-shell .follow-row input[type="email"],
body.light-shell .follow-row button {
  color: var(--ls-ink, #2b2118);
}

body.light-shell .follow-row input[type="email"] {
  background: var(--ls-field-bg, #fff8ec);
  border-color: var(--ls-field-border, rgba(84, 55, 30, 0.42));
}

body.light-shell .follow-row button {
  border-color: var(--ls-field-border, rgba(84, 55, 30, 0.42));
}

body.light-shell .follow-row button:hover {
  border-color: var(--ls-accent-deep, #8a4e22);
}

body.light-shell .open-catalog .follow-box {
  margin-bottom: 56px;
}

/* ---------- /follow page ---------- */

.follow-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 4rem 16px 5rem;
}

.follow-page-head {
  text-align: center;
}

.follow-page-head h1 {
  margin: 0.25rem 0 1.25rem;
}

.follow-page-head p {
  line-height: 1.65;
}

.follow-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
}

.follow-page .follow-box:first-of-type {
  border-top: 0;
  margin-top: 2rem;
}

.follow-back {
  text-align: center;
  margin-top: 3rem;
}
