/* A customer's page is an olde time newspaper about them: a blackletter
   masthead, the open conversation as the lead story, and earlier ones folded
   into columns on the back pages. */
.newspaper {
  --news-serif: "Libre Caslon Text", Georgia, "Times New Roman", serif;
  --news-headline: "Playfair Display", Georgia, serif;
  --news-blackletter: "UnifrakturMaguntia", "Old English Text MT", serif;
  --news-rule: color-mix(in srgb, var(--ink) 75%, transparent);

  margin-top: 1rem;
  padding: clamp(1rem, 3vw, 2.25rem);
  border: 1px solid var(--line);
  background-color: var(--surface);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 5%, transparent) 0.6px, transparent 0.8px);
  background-size: 4px 4px;
  box-shadow: 0 1px 0 var(--line), 0 18px 30px -24px rgb(0 0 0 / 0.55);
  color: var(--ink);
  font-family: var(--news-serif);
  line-height: 1.6;
}

/* Masthead */
.masthead { text-align: center; }

.masthead__top {
  display: grid;
  grid-template-columns: 1fr minmax(0, auto) 1fr;
  align-items: center;
  gap: 1rem;
}

.masthead__title {
  margin: 0;
  font: 400 clamp(2.1rem, 7vw, 4.75rem)/1.05 var(--news-blackletter);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.masthead__ear {
  justify-self: start;
  max-width: 11rem;
  margin: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--news-rule);
  font-size: 0.72rem;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.masthead__ear:last-child { justify-self: end; }
.masthead__ear strong { display: block; margin-top: 0.15rem; font-size: 0.82rem; letter-spacing: 0.02em; }

.masthead__motto {
  margin: 0.5rem auto 0.75rem;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.95rem;
}

.masthead__dateline {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.25rem 1.25rem;
  padding: 0.35rem 0;
  border-block: 1px solid var(--news-rule);
  box-shadow: 0 3px 0 -1px var(--surface), 0 4px 0 -1px var(--news-rule);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.masthead__dateline a { color: inherit; text-transform: none; letter-spacing: 0; }

@media (max-width: 700px) {
  .masthead__top { grid-template-columns: 1fr 1fr; }
  .masthead__title { grid-column: 1 / -1; grid-row: 1; }
  .masthead__dateline { justify-content: center; }
}

/* Shared story furniture */
.newspaper .kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.75rem;
  margin: 0 0 0.4rem;
  color: var(--ink-soft);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.newspaper .pill { font-family: var(--font-body); letter-spacing: 0; text-transform: none; }

.headline {
  margin: 0;
  font: 900 clamp(1.8rem, 4.5vw, 3.1rem)/1.08 var(--news-headline);
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.byline {
  margin: 0.5rem 0 1.25rem;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.92rem;
}

/* Lead story: the open conversation */
.lead-story { padding: 1.5rem 0 1.75rem; }
.lead-story--quiet { text-align: center; }

.lead-story__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 1.5rem;
  align-items: start;
}

.lead-story__photo {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  padding: 0.5rem;
  border: 1px solid var(--news-rule);
  text-align: center;
}

.lead-story__photo :is(.figure, .portrait) {
  display: block;
  width: 100%;
  height: auto;
  filter: grayscale(1) contrast(1.15);
}

.lead-story__photo .portrait { aspect-ratio: 1; border-radius: 0; }

.lead-story__photo figcaption { margin-top: 0.4rem; color: var(--ink-soft); font-size: 0.78rem; font-style: italic; }

@media (max-width: 700px) {
  .lead-story__body { grid-template-columns: 1fr; }
  .lead-story__photo { grid-column: auto; grid-row: auto; justify-self: center; width: 150px; }
}

/* The thread is the funnies: speech bubbles, inked on newsprint. */
.newspaper .thread { margin: 0 0 1.5rem; }
.newspaper .entry__bubble { font-family: var(--font-body); }
.newspaper .entry__speaker :is(.figure, .portrait) { filter: grayscale(1) contrast(1.15); }

.newspaper .sheet { font-family: var(--font-body); }

/* Back pages: earlier conversations, folded until opened */
.back-pages { padding-top: 0.5rem; border-top: 3px double var(--news-rule); }

.back-pages__title {
  margin: 0.4rem 0 1rem;
  font: 700 1.1rem/1.2 var(--news-headline);
  font-style: italic;
  text-align: center;
}

.stories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr));
  gap: 1.25rem 1.5rem;
}

.story { padding-top: 0.75rem; border-top: 1px solid var(--news-rule); }
.story[open] { grid-column: 1 / -1; }

.story__summary { display: grid; gap: 0.3rem; cursor: pointer; list-style: none; }
.story__summary::-webkit-details-marker { display: none; }

.story__headline { font: 700 1.3rem/1.2 var(--news-headline); text-wrap: balance; }
.story[open] .story__headline { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.story__summary:hover .story__headline { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.story__dateline { color: var(--ink-soft); font-size: 0.78rem; font-style: italic; }
.story__dek { font-size: 0.92rem; }
.story[open] .story__dek { display: none; }

.story__new {
  padding: 0 0.4em;
  border: 1.5px solid var(--coral);
  color: var(--coral);
  font-weight: 700;
  transform: rotate(-3deg);
}

.story__more { color: var(--accent-deep); font-size: 0.85rem; font-style: italic; }
.story__more::after { content: "Read the full story →"; }
.story[open] .story__more::after { content: "Fold it away ↑"; }
.story[open] .story__summary { margin-bottom: 1.25rem; }
