/* =========================================================================
   THE TRUSTWORTHY TIMES — vintage broadsheet stylesheet
   Aesthetic: warm newsprint, blackletter nameplate, high-contrast serif
   headlines, column rules, red kickers, ironic trust stamps.
   ========================================================================= */

:root {
  --paper:      #f4efe3;
  --paper-2:    #efe8d8;
  --ink:        #1c1a16;
  --ink-soft:   #4a453b;
  --ink-faint:  #6f685b;
  --rule:       #cabfa6;
  --rule-soft:  #ddd4bf;
  --red:        #9c1c1c;
  --red-deep:   #771414;
  --stamp:      #9c1c1c;

  --display: "Playfair Display", "Times New Roman", Georgia, serif;
  --black-letter: "UnifrakturMaguntia", "Playfair Display", serif;
  --body: "PT Serif", Georgia, "Times New Roman", serif;
  --label: "Oswald", "Arial Narrow", sans-serif;

  --measure: 1180px;
}

/* ----------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* Newsprint grain + faint vignette, drawn behind everything. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  mix-blend-mode: multiply;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(120% 80% at 50% 0%, transparent 60%, rgba(60,48,28,0.10) 100%);
}

.page { position: relative; z-index: 1; }

a { color: inherit; }

/* ------------------------------------------------------------- masthead */
.masthead {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 18px 24px 0;
  text-align: center;
}

.masthead__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 8px;
}
.masthead__date, .masthead__edition { flex: 1; white-space: nowrap; }
.masthead__edition { text-align: right; }

.masthead__trust {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  font-weight: 600;
}
.masthead__meter {
  width: 64px; height: 9px;
  border: 1px solid var(--red);
  background: rgba(156,28,28,0.08);
  display: inline-block;
  position: relative;
  overflow: hidden;
}
.masthead__meter > i {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, var(--red) 0 4px, var(--red-deep) 4px 8px);
  width: 0;
  animation: fill 1.6s cubic-bezier(.2,.8,.2,1) 0.3s forwards;
}
@keyframes fill { to { width: var(--fill, 100%); } }

.masthead__nameplate {
  display: block;
  font-family: var(--black-letter);
  font-weight: 400;
  text-decoration: none;
  color: var(--ink);
  line-height: 0.92;
  font-size: clamp(2.6rem, 9vw, 6.2rem);
  margin: 10px 0 4px;
  letter-spacing: 0.01em;
}
.masthead__tagline {
  font-family: var(--body);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 10px;
  font-size: clamp(0.82rem, 1.6vw, 1rem);
}
.masthead__tagline sup { font-style: normal; font-size: 0.6em; }

.masthead__nav {
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.78rem;
  border-top: 3px double var(--ink);
  border-bottom: 1px solid var(--ink);
  padding: 9px 0;
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: center;
}
.masthead__nav a { text-decoration: none; color: var(--ink); transition: color .15s; }
.masthead__nav a:hover { color: var(--red); }
.masthead__nav span { color: var(--rule); }

/* --------------------------------------------------------------- layout */
.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.kicker {
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--red);
  margin: 0 0 6px;
}
.kicker--breaking { display: inline-flex; align-items: center; gap: 7px; }
.kicker--breaking::before {
  content: "BREAKING";
  background: var(--red);
  color: var(--paper);
  padding: 2px 7px;
  letter-spacing: 0.1em;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100%{opacity:1;} 50%{opacity:.55;} }

/* Lead story ----------------------------------------------------------- */
.lead {
  padding: 30px 0 26px;
  border-bottom: 4px double var(--ink);
}
.lead > .figure--lead { margin-bottom: 24px; }
.lead__body {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: 34px;
}
@media (min-width: 881px) {
  .lead > .figure--lead .figure__plate { aspect-ratio: 16 / 9; }
}
.lead__headline {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2.1rem, 3vw, 2.7rem);
  line-height: 1.02;
  margin: 6px 0 14px;
  letter-spacing: -0.01em;
}
.lead__headline a { text-decoration: none; }
.lead__dek {
  font-style: italic;
  font-size: 1.18rem;
  color: var(--ink-soft);
  margin: 0 0 16px;
  max-width: 36ch;
}
.lead__byline {
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--ink-faint);
  border-top: 1px solid var(--rule);
  padding-top: 8px;
}
.lead__aside {
  border-left: 1px solid var(--rule);
  padding-left: 30px;
  display: flex;
  flex-direction: column;
}
.lead__aside h3 {
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.78rem;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 6px;
  margin: 0 0 14px;
}

/* Story grid ----------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 30px;
}
.card {
  padding: 22px 26px 26px;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
  position: relative;
}
/* turn off left rule at the start of each row of 3 */
.card:nth-child(3n+1) { border-left: none; padding-left: 0; }
.card:nth-child(-n+3) { border-top: 3px solid var(--ink); }
.card__headline {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.42rem;
  line-height: 1.12;
  margin: 6px 0 10px;
}
.card__headline a {
  text-decoration: none;
  background-image: linear-gradient(var(--red), var(--red));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .3s ease;
}
.card:hover .card__headline a { background-size: 100% 1px; color: var(--red); }
.card__dek {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.98rem;
  margin: 0 0 12px;
}
.card__byline {
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.66rem;
  color: var(--ink-faint);
}

/* Aside list (most-read style) ---------------------------------------- */
.ranklist { list-style: none; margin: 0; padding: 0; counter-reset: rank; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.ranklist li {
  counter-increment: rank;
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 0.98rem;
  line-height: 1.25;
}
.ranklist li::before {
  content: counter(rank);
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--red);
  line-height: 1;
  flex: 0 0 auto;
}
.ranklist a { text-decoration: none; }
.ranklist a:hover { color: var(--red); text-decoration: underline; }

/* Badges + stamp ------------------------------------------------------- */
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.badge {
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.66rem;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 4px 9px;
  border-radius: 2px;
  white-space: nowrap;
}
.stamp {
  font-family: var(--label);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--stamp);
  border: 3px double var(--stamp);
  border-radius: 6px;
  padding: 8px 14px;
  text-align: center;
  line-height: 1.05;
  transform: rotate(-11deg);
  opacity: 0.82;
  letter-spacing: 0.06em;
  box-shadow: inset 0 0 0 1px rgba(156,28,28,.25);
}
.stamp small { display: block; font-size: 0.55em; letter-spacing: 0.16em; }

/* ----------------------------------------------------------- figures (art) */
.figure { margin: 0 0 18px; }
.figure__plate {
  position: relative;
  color: var(--ink);
  background-color: var(--paper-2);
  border: 1px solid var(--ink);
  aspect-ratio: 3 / 2;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.figure__plate::before {            /* halftone "printed" screen */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(currentColor 1.3px, transparent 1.5px);
  background-size: 6px 6px;
  opacity: 0.16;
}
.figure__plate::after {             /* soft ink vignette for a printed feel */
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% -10%, transparent 55%, rgba(28,26,22,0.12));
  pointer-events: none;
}
.motif { position: relative; width: 78%; height: 78%; display: block; }
.figure__img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.03);
}
.figure__caption {
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.64rem;
  line-height: 1.45;
  color: var(--ink-faint);
  padding: 7px 1px 9px;
  border-bottom: 1px solid var(--rule);
}
.figure__credit { color: var(--red); }

.figure--hero { margin: 4px 0 22px; }
.figure--thumb { margin-bottom: 14px; }

/* --------------------------------------------------------------- article */
.article { max-width: 720px; margin: 0 auto; padding-top: 34px; }
.article__head { border-bottom: 1px solid var(--rule); padding-bottom: 18px; margin-bottom: 8px; }
.article__headline {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.04;
  margin: 8px 0 14px;
  letter-spacing: -0.01em;
}
.article__dek {
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.article__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  align-items: center;
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.72rem;
  color: var(--ink-faint);
}
.article__toprow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.article__body { font-size: 1.12rem; line-height: 1.74; }
.article__body p { margin: 0 0 1.1em; }
.article__body .dateline { font-weight: 700; font-variant: small-caps; letter-spacing: 0.03em; }
.article__body p:first-of-type::first-letter {
  font-family: var(--display);
  font-weight: 900;
  float: left;
  font-size: 4.4rem;
  line-height: 0.72;
  padding: 8px 10px 0 0;
  color: var(--red);
}
.pullquote {
  font-family: var(--display);
  font-weight: 700;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--ink);
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  padding: 18px 0;
  margin: 26px 0;
  text-align: center;
}
.backlink {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--red);
  text-decoration: none;
  border-bottom: 1px solid var(--red);
  padding-bottom: 2px;
}
.backlink:hover { color: var(--red-deep); }

/* ----------------------------------------------------------------- about */
.about { max-width: 680px; margin: 0 auto; padding-top: 40px; }
.about__title {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.05;
  margin: 8px 0 20px;
}
.about p { font-size: 1.12rem; line-height: 1.74; margin: 0 0 1.1em; }
.about strong { color: var(--red); }
.about__sign {
  margin-top: 30px;
  border-top: 2px solid var(--ink);
  padding-top: 16px;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.35rem;
}
.about__sign span {
  display: block;
  font-family: var(--label);
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  color: var(--ink-faint);
  margin-top: 4px;
}

/* ------------------------------------------------------------------ 404 */
.retraction { max-width: 620px; margin: 0 auto; padding: 70px 0; text-align: center; }
.retraction .stamp { display: inline-block; transform: rotate(-6deg); font-size: 1.1rem; margin-bottom: 26px; }
.retraction h1 {
  font-family: var(--display); font-weight: 900;
  font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.08; margin: 0 0 14px;
}
.retraction p { font-style: italic; color: var(--ink-soft); font-size: 1.1rem; }

/* --------------------------------------------------------------- footer */
.foot {
  border-top: 3px double var(--ink);
  max-width: var(--measure);
  margin: 0 auto;
  padding: 22px 24px 50px;
  font-family: var(--label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.9;
}
.foot a { color: var(--red); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot strong { color: var(--ink); }

/* --------------------------------------------------------- reveal motion */
.reveal { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .masthead__meter > i { animation: none; width: var(--fill, 100%); }
  .kicker--breaking::before { animation: none; }
}

/* ----------------------------------------------------------- responsive */
@media (max-width: 880px) {
  .lead__body { grid-template-columns: 1fr; gap: 22px; }
  .lead__aside { border-left: none; border-top: 3px double var(--ink); padding-left: 0; padding-top: 18px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card:nth-child(3n+1) { border-left: 1px solid var(--rule); padding-left: 26px; }
  .card:nth-child(2n+1) { border-left: none; padding-left: 0; }
  .card:nth-child(-n+3) { border-top: 1px solid var(--rule); }
  .card:nth-child(-n+2) { border-top: 3px solid var(--ink); }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .masthead__topbar { flex-wrap: wrap; justify-content: center; gap: 6px 14px; }
  .masthead__date, .masthead__edition { flex: 0 0 auto; text-align: center; }
  .grid { grid-template-columns: 1fr; }
  .card, .card:nth-child(3n+1), .card:nth-child(2n+1) { border-left: none; padding-left: 0; }
  .card:nth-child(n) { border-top: 1px solid var(--rule); }
  .card:first-child { border-top: 3px solid var(--ink); }
  .article__toprow { flex-direction: column; }
  .article__body p:first-of-type::first-letter { font-size: 3.6rem; }
}
