/* Robot Press — classic newspaper theme */

:root {
  --ink: #141414;
  --paper: #fdfcf7;
  --card: #ffffff;
  --rule: #e3ddd0;
  --rule-dark: #141414;
  --red: #b3261e;
  --muted: #6f6a5e;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", Times, serif;
  --display: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- top bar ---------- */
.topbar {
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  padding-bottom: 8px;
  gap: 12px;
}

/* ---------- masthead ---------- */
.masthead {
  text-align: center;
  padding: 34px 20px 10px;
}
.masthead h1 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(3.2rem, 10vw, 6.5rem);
  line-height: 1;
  margin: 0;
  letter-spacing: -0.01em;
}
.tagline-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 14px auto 0;
  max-width: 640px;
}
.tagline-row .rule {
  flex: 1;
  height: 1px;
  background: var(--rule-dark);
}
.tagline {
  font-style: italic;
  font-size: 1.15rem;
  margin: 0;
  white-space: nowrap;
  color: var(--red);
}

/* ---------- section nav ---------- */
.sections {
  border-top: 3px double var(--rule-dark);
  border-bottom: 1px solid var(--rule-dark);
  margin-top: 18px;
  background: var(--card);
}
.sections-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.sec-btn {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--ink);
}
.sec-btn:hover { color: var(--red); }
.sec-btn.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* ---------- front page ---------- */
.edition-line {
  text-align: center;
  margin: 30px 0 22px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 14px;
}
.edition-line::before,
.edition-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 10px;
}
.card {
  background: var(--card);
  border: 1px solid var(--rule);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover, .card:focus-visible {
  box-shadow: 0 8px 24px rgba(20, 20, 20, 0.12);
  transform: translateY(-2px);
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
}
.card-img {
  overflow: hidden;
  background: #eee;
}
.card-img img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.card.featured .card-img img { aspect-ratio: 16 / 10; }
.card-body { padding: 20px 22px 22px; }
.kicker {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 10px;
}
.card h2, .card h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 10px;
}
.card.featured h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.card h3 { font-size: 1.35rem; }
.card .summary {
  margin: 0 0 14px;
  color: #333;
  font-size: 1rem;
}
.read-more {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  margin-top: auto;
}
.card:hover .read-more { color: var(--red); }

.empty-note {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  padding: 40px 0;
  border: 1px dashed var(--rule);
  margin: 0 0 10px;
}

/* ---------- about ---------- */
.about {
  border-top: 3px double var(--rule-dark);
  margin: 44px 0 0;
  padding: 28px 0 40px;
}
.about h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.8rem;
  margin: 0 0 12px;
}
.about p {
  max-width: 68ch;
  margin: 0;
  font-size: 1.05rem;
}

/* ---------- footer ---------- */
footer {
  background: var(--ink);
  color: #f5f2ea;
  text-align: center;
  padding: 30px 20px;
  margin-top: 10px;
}
.foot-name {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.4rem;
  margin: 0 0 6px;
}
.foot-copy {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #b9b4a6;
  margin: 0;
}

/* ---------- article reader ---------- */
.reader {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4vh 16px;
}
.reader[hidden] { display: none; }
.reader-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.65);
}
.reader-card {
  position: relative;
  background: var(--paper);
  max-width: 760px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  padding: clamp(24px, 5vw, 56px);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}
.reader-close {
  position: sticky;
  top: 0;
  float: right;
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px 8px;
}
.reader-close:hover { color: var(--red); }
.reader-card .kicker { margin-top: 6px; }
.reader-card h2 {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  line-height: 1.15;
  margin: 0 0 8px;
}
.byline {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.reader-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  margin: 0 0 8px;
  background: #eee;
}
.photo-credit {
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 20px;
}
.reader-body p {
  font-size: 1.08rem;
  margin: 0 0 1.2em;
}
.reader-body p:first-of-type::first-letter {
  font-family: var(--display);
  font-weight: 900;
  font-size: 3.2em;
  float: left;
  line-height: 0.9;
  padding-right: 8px;
}
.sources {
  margin-top: 28px;
  padding: 18px 20px;
  background: #f4f1e8;
  border-left: 3px solid var(--red);
}
.sources h3 {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.sources ul { margin: 0; padding-left: 18px; }
.sources li { margin-bottom: 6px; font-size: 0.95rem; }
.sources a { color: var(--red); }
.sources a:hover { text-decoration: none; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .cards { grid-template-columns: 1fr; }
  .card.featured { grid-template-columns: 1fr; }
  .topbar-right { display: none; }
  .sections-inner { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; }
  .sec-btn { flex: 0 0 auto; }
}
@media (max-width: 520px) {
  .tagline { font-size: 1rem; }
  .reader { padding: 0; }
  .reader-card { max-height: 100vh; }
}
