/* lajm.info — public site. Broadsheet-inspired editorial design (§9). */
:root {
  --ink: #111;
  --paper: #fff;
  --accent: #1a6dcc;
  --hairline: #e2e2e2;
  --meta: #666;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --body: 'Source Serif 4', Georgia, serif;
  --ui: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* ---------- utility bar ---------- */
.utility-bar {
  background: var(--ink);
  color: #ddd;
  font-family: var(--ui);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.utility-inner { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.utility-date { color: #bbb; }
.utility-login { color: #999; }
.utility-login:hover { color: #fff; }

/* ---------- masthead ---------- */
.masthead { padding: 26px 0 0; }
.masthead .wrap { text-align: center; }
.wordmark {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(38px, 7vw, 54px);
  letter-spacing: -0.015em;
  color: var(--ink);
  line-height: 1;
}
.masthead-rule {
  max-width: 1000px;
  margin: 18px auto 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  height: 3px;
}

main.wrap { padding-top: 30px; padding-bottom: 40px; }

/* ---------- lead story ---------- */
.lead-story {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 34px;
  align-items: start;
  padding-bottom: 30px;
}
.lead-headline {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 4.2vw, 42px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
.lead-headline a:hover { color: var(--accent); }
.lead-standfirst {
  font-size: 19px;
  line-height: 1.5;
  color: #333;
  margin: 0 0 12px;
}
.lead-story-img { display: block; }
.lead-story-img img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }

.story-meta {
  font-family: var(--ui);
  font-size: 12.5px;
  color: var(--meta);
  margin: 0;
  letter-spacing: 0.01em;
}

.river-rule { border-top: 1px solid var(--ink); margin-bottom: 6px; }

/* ---------- river ---------- */
.river {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 44px;
}
.river-item {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}
.river-thumb { flex: 0 0 128px; }
.river-thumb img { aspect-ratio: 1 / 1; object-fit: cover; width: 128px; }
.river-text { min-width: 0; }
.river-headline {
  font-family: var(--display);
  font-weight: 700;
  font-size: 20.5px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  margin: 0 0 7px;
}
.river-headline a:hover { color: var(--accent); }
.river-lead {
  font-size: 15px;
  line-height: 1.5;
  color: #444;
  margin: 0 0 9px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty-river { text-align: center; color: var(--meta); padding: 80px 0; font-family: var(--ui); }

/* ---------- pagination ---------- */
.pagination {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 0 10px;
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 600;
}
.pagination .more { margin-left: auto; }
.page-link { color: var(--ink); border: 1px solid var(--ink); padding: 9px 20px; }
.page-link:hover { background: var(--ink); color: #fff; }

/* ---------- article page ---------- */
.article-page { max-width: 680px; margin: 0 auto; }
.article-headline {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 4.5vw, 40px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  margin: 6px 0 16px;
}
.article-lead {
  font-size: 20px;
  line-height: 1.5;
  color: #333;
  margin: 0 0 16px;
}
.article-meta {
  font-family: var(--ui);
  font-size: 13px;
  color: var(--meta);
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 22px;
}
.article-meta a { color: var(--accent); }
.article-meta a:hover { text-decoration: underline; }
.article-figure { margin: 0 0 24px; }
.article-figure img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.article-figure figcaption { font-family: var(--ui); font-size: 12px; color: var(--meta); padding-top: 8px; }
.article-body { font-size: 18px; line-height: 1.7; }
.article-body p { margin: 0 0 1.25em; }
.article-body a { color: var(--accent); }
.article-body a:hover { text-decoration: underline; }

.attribution-box {
  font-family: var(--ui);
  font-size: 13.5px;
  color: var(--meta);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--ink);
  padding: 14px 18px;
  margin: 34px 0;
}
.attribution-box a { color: var(--accent); }
.attribution-box a:hover { text-decoration: underline; }

/* related */
.related { margin-top: 44px; }
.related-title {
  font-family: var(--ui);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  border-top: 1px solid var(--ink);
  padding-top: 12px;
  margin: 0 0 6px;
}
.related-item { padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.related-item h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  line-height: 1.25;
  margin: 0 0 5px;
}
.related-item h3 a:hover { color: var(--accent); }

/* error page */
.error-page { text-align: center; padding: 70px 0; font-family: var(--ui); }
.error-page h1 { font-family: var(--display); font-size: 70px; margin: 0 0 10px; }
.error-page a { color: var(--accent); }

/* ---------- footer ---------- */
.site-footer {
  margin-top: 50px;
  border-top: 3px double var(--ink);
  padding: 26px 0 40px;
}
.footer-brand { font-family: var(--display); font-weight: 700; font-size: 20px; margin: 0 0 6px; }
.footer-note { font-family: var(--ui); font-size: 12.5px; color: var(--meta); margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .lead-story { grid-template-columns: 1fr; gap: 18px; }
  .lead-story-img { order: -1; }
  .river { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .river-thumb { flex-basis: 96px; }
  .river-thumb img { width: 96px; }
  .lead-standfirst { font-size: 17px; }
  .article-body { font-size: 17px; }
}
