/* newspaper.css — the newsprint look: masthead, headlines, reader-update clippings. */

.newspaper {
  position: relative;
  padding: clamp(18px, 4vw, 44px);
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse at 15% 10%, rgba(255, 255, 255, 0.5), transparent 45%),
    radial-gradient(ellipse at 90% 95%, rgba(160, 120, 60, 0.16), transparent 50%),
    var(--paper-texture);
  border-radius: 2px;
  box-shadow: var(--shadow-paper);
}
/* Folded-corner shading along the right edge */
.newspaper::after {
  content: "";
  position: absolute;
  inset: 0 0 0 auto;
  width: 22px;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.06));
  pointer-events: none;
}

/* ── Masthead ──────────────────────────────────────────────────────────── */
.masthead {
  text-align: center;
  margin-bottom: 20px;
}
.masthead-top,
.masthead-rule {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-family: var(--font-type);
  font-size: 0.8rem;
  color: var(--ink-soft);
}
.masthead-title {
  font-family: var(--font-masthead);
  font-weight: 700;
  font-size: clamp(2.6rem, 9vw, 5.4rem);
  line-height: 1;
  padding: 6px 0 4px;
}
.masthead-title:focus {
  outline: none;
}
.masthead-rule {
  padding: 6px 0;
  border-top: 3px double var(--rule);
  border-bottom: 1px solid var(--rule);
}
.final-flag {
  color: var(--stamp-red);
  font-weight: bold;
  text-transform: uppercase;
}

/* ── Typography ────────────────────────────────────────────────────────── */
.kicker {
  font-family: var(--font-type);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--stamp-red);
  margin-bottom: 6px;
}
.headline {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: clamp(1.5rem, 4vw, 2.3rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  text-wrap: balance;
}
.headline:focus {
  outline: none;
}
.headline--huge {
  font-size: clamp(2rem, 6.2vw, 3.6rem);
}
.subhead {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.lede {
  text-align: justify;
  hyphens: auto;
}
.dropcap::first-letter {
  float: left;
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 3.4em;
  line-height: 0.82;
  padding: 6px 8px 0 0;
}
.section-title {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  border-top: 2px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 4px 0;
  margin: 26px 0 16px;
}

/* ── Morning layout ────────────────────────────────────────────────────── */
.morning-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 32px;
}
.front-article {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 8px;
}
.front-article + .front-article {
  margin-top: 16px;
}
.front-article--event {
  position: relative;
  padding: 16px 18px;
  border: 3px double var(--stamp-red);
  background: rgba(176, 40, 29, 0.05);
}

.no-updates {
  font-family: var(--font-type);
  text-align: center;
  color: var(--ink-soft);
  padding: 20px;
  border: 2px dashed var(--paper-edge);
}

/* ── Reader update clippings ───────────────────────────────────────────── */
.clippings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px 20px;
}
.clipping {
  position: relative;
  padding: 18px 16px 14px;
  background: #fbf5e4 var(--paper-texture);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12), 0 6px 14px rgba(60, 40, 20, 0.22);
  transform: rotate(var(--tilt, 0deg));
  /* Torn-paper bottom edge */
  clip-path: polygon(0 0, 100% 0, 100% 97%, 94% 100%, 86% 97.5%, 76% 100%, 63% 97%, 50% 100%, 38% 97.5%, 26% 100%, 14% 97%, 5% 99.5%, 0 97%);
}
.clip-tape {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 70px;
  height: 18px;
  transform: translateX(-50%) rotate(-3deg);
  background: rgba(240, 225, 170, 0.75);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}
.clip-re {
  font-family: var(--font-type);
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.clip-late {
  display: inline-block;
  font-family: var(--font-type);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  margin-bottom: 6px;
  background: var(--highlight);
}
.clip-headline {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 1.18rem;
  line-height: 1.12;
  margin-bottom: 6px;
}
.clip-text {
  font-size: 0.97rem;
}
.clip-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-bottom: 6px;
}

.mini-stamp {
  display: inline-block;
  font-family: var(--font-type);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 2px 8px;
  border: 2px solid currentColor;
  border-radius: 3px;
  transform: rotate(-4deg);
}
.mini-stamp--success {
  color: var(--stamp-green);
}
.mini-stamp--backfire {
  color: var(--stamp-red);
}

/* Stat change chips (+2 📰) */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.chips.inline {
  display: inline-flex;
  vertical-align: middle;
}
.chip {
  font-family: var(--font-type);
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid currentColor;
  white-space: nowrap;
}
.chip--readership {
  color: var(--c-readership);
}
.chip--reputation {
  color: var(--c-reputation);
}
.chip--chaos {
  color: var(--c-chaos);
}
.chip.down {
  background: rgba(0, 0, 0, 0.05);
}

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.around-town {
  border-left: 1px solid var(--rule);
  padding-left: 22px;
}
.around-town .section-title {
  margin-top: 0;
}
.brief {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px dotted var(--ink-faint);
}
.brief h4 {
  font-family: var(--font-headline);
  font-size: 0.98rem;
  line-height: 1.15;
  margin-bottom: 4px;
}
.brief p {
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.morning-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  padding-top: 18px;
  border-top: 3px double var(--rule);
  text-align: center;
}
.overnight {
  font-family: var(--font-type);
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.alarm {
  font-family: var(--font-type);
  color: var(--stamp-red);
  font-size: 1.05rem;
}

@media (max-width: 820px) {
  .morning-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .around-town {
    border-left: 0;
    padding-left: 0;
  }
  .around-town .section-title {
    margin-top: 18px;
  }
}

@media (max-width: 480px) {
  .masthead-motto {
    display: none;
  }
  .clippings {
    grid-template-columns: 1fr;
  }
  .lede {
    text-align: left;
  }
}
