/* ============================================================================
   Writings section. Series navigation and The Meticulous Post.
   Reuses shared components (.page-header, .ledger, .prose, .pagination,
   .breadcrumb, .sheet-nav, .cta-band); this file adds only what is local.
   ========================================================================== */

.writings {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 0 var(--gutter) var(--section-pad);
}

/* the ledger title/deck share one grid cell */
.ledger__body {
  display: block;
  min-width: 0;
}

.writings-empty {
  padding: 2.5rem 0;
  font-size: var(--text-lede);
  color: var(--ink);
}

/* ------------------------------------------------------------ series shelf */

.series-shelf {
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-top: clamp(2rem, 5vw, 3rem);
  border-top: 1px solid var(--hairline);
}

.series-shelf__heading {
  font-family: var(--font-display);
  font-size: var(--text-h3);
}

.series-shelf__lede {
  margin-top: 0.35rem;
  margin-bottom: 1.5rem;
  color: var(--ink);
}

.series-shelf__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.series-shelf__list--index {
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: 1.25rem;
}

.series-volume a {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  padding: 1.25rem 1.4rem;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  background: rgba(255, 255, 255, 0.3);
}

.series-volume--large a {
  padding: 1.6rem 1.75rem;
  gap: 0.75rem;
}

.series-volume__name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.2;
}

.series-volume--large .series-volume__name {
  font-size: var(--text-h3);
}

.series-volume__desc {
  font-size: var(--text-description);
  line-height: 1.6;
  color: var(--ink);
}

.series-volume__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 0.5rem;
}

.series-volume__date,
.series-volume__count {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.series-volume a:hover .series-volume__name {
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

.breadcrumb {
  margin-bottom: 1.75rem;
}

.series-intro {
  max-width: 68ch;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* The Meticulous Post: newspaper masthead, photographic covers, white paper. */
.post-index,
.post-story {
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 2.75rem var(--gutter) var(--section-pad);
}

.post-masthead {
  text-align: center;
}

.post-masthead__edition,
.post-masthead__details,
.post-kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.post-masthead__edition {
  color: var(--ink-muted);
  margin-bottom: 1rem;
}

.post-masthead h1 {
  font-size: clamp(2.8rem, 7.7vw, 6.1rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin-bottom: 1rem;
}

.post-masthead__strap {
  padding: 0.8rem 0.5rem;
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--hairline);
  font-size: clamp(0.75rem, 1.3vw, 0.9375rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.post-masthead__details {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.8rem;
  color: var(--ink-muted);
}

.post-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 1.25rem 0 2.5rem;
}

.post-filter a {
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--ink-muted);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.post-filter a:hover {
  background: var(--accent);
}

.post-filter a[aria-current="page"] {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.5rem 2rem;
}

.post-card {
  min-width: 0;
  background: white;
  border-bottom: 1px solid var(--hairline);
}

.post-card--featured {
  margin-bottom: 2.5rem;
}

.post-card__link {
  display: block;
  height: 100%;
  text-decoration: none;
}

.post-card__cover,
.post-hero {
  position: relative;
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
  background: #e9e3d6;
}

.post-card__cover {
  min-height: 18rem;
}

.post-card--featured .post-card__cover {
  min-height: 26rem;
}

.post-card__image,
.post-hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.post-card--illustrated .post-card__cover::after,
.post-hero--illustrated::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.65) 42%, rgba(0, 0, 0, 0.93) 100%);
  z-index: -1;
}

.post-card__headline {
  padding: 2rem;
}

.post-card--illustrated .post-card__headline,
.post-hero--illustrated .post-hero__headline {
  color: white;
}

.post-card .post-kicker,
.post-hero .post-kicker {
  display: block;
  margin-bottom: 0.8rem;
}

.post-card h2 {
  font-size: clamp(1.8rem, 2.7vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.post-card--featured h2 {
  font-size: clamp(2.25rem, 4.7vw, 4rem);
  max-width: 22ch;
}

.post-card__copy {
  padding: 1.5rem 2rem 1.75rem;
}

.post-card__copy time {
  display: block;
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.post-card__subtitle {
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1.35;
  margin-bottom: 0.65rem;
}

.post-card__excerpt {
  max-width: 72ch;
  color: var(--ink);
  font-size: var(--text-description);
  line-height: 1.75;
}

.post-card__more {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.post-card__more span {
  font-size: 1.5rem;
}

.post-card__link:hover h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.post-story__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.4rem;
  font-size: 0.75rem;
}

.post-story__breadcrumb a:first-child {
  font-family: var(--font-display);
  font-size: 1.35rem;
  text-decoration: none;
}

.post-hero {
  min-height: clamp(22rem, 40vw, 31rem);
}

.post-hero:not(.post-hero--illustrated) {
  min-height: 16rem;
  background: white;
  border-top: 3px double var(--ink);
}

.post-hero__headline {
  padding: clamp(1.5rem, 4vw, 3.5rem);
}

.post-hero h1 {
  font-size: clamp(2.2rem, 4.8vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 23ch;
  overflow-wrap: anywhere;
}

.post-story__columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: 3rem;
}

.post-paper {
  position: relative;
  padding: clamp(1.5rem, 4vw, 3.5rem);
  background: #fff;
  box-shadow: 3px 2px 7px rgba(13, 13, 13, 0.03);
  min-width: 0;
}

.post-paper__standfirst {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.3vw, 1.9rem);
  line-height: 1.4;
  margin-bottom: 2rem;
}

.post-paper__body {
  max-width: none;
  font-size: var(--text-base);
  line-height: 1.85;
}

.post-paper__body img {
  border: 0;
  max-width: 100%;
  height: auto;
}

.post-paper__body figure {
  margin-block: 2rem;
}

.post-paper__body figcaption {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-muted);
  margin-top: 0.75rem;
}

.post-paper__body table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
}

.post-paper__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.75rem;
}

.post-paper__footer span {
  font-style: italic;
  color: var(--ink-muted);
}

.post-sidebar {
  padding-top: 2.5rem;
  min-width: 0;
  font-size: 0.8125rem;
  line-height: 1.75;
}

.post-sidebar__section {
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
  margin-bottom: 2.5rem;
}

.post-sidebar h2 {
  font-family: var(--font-body);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.post-sidebar__avatar {
  border-radius: 50%;
  width: 4rem;
  height: 4rem;
  object-fit: cover;
  margin-bottom: 0.75rem;
}

.post-sidebar__author,
.post-sidebar__title,
.post-sidebar__related {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.post-sidebar__bio,
.post-sidebar__title + p {
  margin-top: 0.75rem;
  color: var(--ink);
  font-size: 1rem;
}

.post-sidebar__related {
  margin-bottom: 1.25rem;
}

.post-sidebar__colophon {
  margin-top: 3rem;
  border-top: 3px double var(--hairline);
  padding-top: 1.25rem;
}

.post-sidebar__colophon p {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.post-sidebar__colophon span {
  font-size: 0.6875rem;
  color: var(--ink-muted);
}

@media (max-width: 767px) {
  .post-index,
  .post-story {
    padding-top: 1.5rem;
  }

  .post-masthead__details {
    font-size: 0.5625rem;
    letter-spacing: 0.06em;
  }

  .post-grid,
  .post-story__columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .post-card__cover,
  .post-card--featured .post-card__cover,
  .post-hero,
  .post-hero:not(.post-hero--illustrated) {
    min-height: 0;
  }

  .post-card__image,
  .post-hero__image {
    position: static;
    aspect-ratio: 16 / 9;
    height: auto;
    z-index: auto;
  }

  .post-card--illustrated .post-card__cover::after,
  .post-hero--illustrated::after {
    display: none;
  }

  .post-card__headline,
  .post-hero__headline {
    padding: 1.5rem;
    background: white;
  }

  .post-card--illustrated .post-card__headline,
  .post-hero--illustrated .post-hero__headline {
    color: var(--ink);
  }

  .post-card__copy {
    padding: 0 1.5rem 1.5rem;
  }

  .post-sidebar {
    padding: 0 1.5rem;
  }


}
