/* ── VARIABLES ── */
:root {
  --warm-paper: #F9F7F4;
  --near-black: #1A1A1A;
  --circuit-green: #16A34A;
  --rule-grey: #D1D5DB;
  --mid-grey: #6B7280;
  --light-green: #DCFCE7;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--warm-paper);
  color: var(--near-black);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── GRID PAPER TEXTURE ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--rule-grey) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-grey) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

/* ── LAYOUT ── */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── HEADER ── */
header {
  border-bottom: 1px solid var(--rule-grey);
  padding: 28px 0 20px;
}

.header-inner {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.logotype {
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--near-black);
  text-decoration: none;
}

.logotype .w-accent { color: var(--circuit-green); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-nav a {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mid-grey);
  text-decoration: none;
  transition: color 0.15s;
}

.header-nav a:hover,
.header-nav a.nav-current {
  color: var(--circuit-green);
}

/* ── NEWS PAGE HEADER ── */
.news-main {
  padding: 56px 0 80px;
}

.news-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--rule-grey);
}

.section-label {
  font-family: 'DM Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid-grey);
  margin-bottom: 12px;
}

.news-heading {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--near-black);
  margin-bottom: 12px;
}

.news-sub {
  font-size: 0.95rem;
  color: var(--mid-grey);
  line-height: 1.6;
  max-width: 500px;
}

/* ── NEWS CARD GRID ── */
.news-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--rule-grey);
  border: 1px solid var(--rule-grey);
  margin-bottom: 40px;
}

/* ── NEWS CARD ── */
.news-card {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr;
  grid-template-rows: auto auto;
  background: var(--warm-paper);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}

.news-card:hover {
  background: #F3F1EE;
}

.pinned-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: 'DM Mono', monospace;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--circuit-green);
  background: var(--light-green);
  border: 1px solid var(--circuit-green);
  padding: 2px 8px;
  border-radius: 2px;
  z-index: 1;
}

.card-image-wrap {
  grid-column: 1;
  grid-row: 1 / 3;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  align-self: stretch;
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.3s ease;
}

.news-card:hover .card-image {
  transform: scale(1.03);
}

.card-body {
  grid-column: 2;
  grid-row: 1;
  padding: 20px 20px 12px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-source {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.source-logo {
  height: 18px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.source-name {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--mid-grey);
}

.card-date {
  font-family: 'DM Mono', monospace;
  font-size: 0.68rem;
  color: var(--mid-grey);
  margin-left: auto;
}

.card-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--near-black);
  line-height: 1.35;
}

.card-summary {
  font-size: 0.85rem;
  color: var(--mid-grey);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-cta {
  grid-column: 2;
  grid-row: 2;
  padding: 8px 20px 16px 20px;
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--circuit-green);
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--rule-grey);
}

.pagination-link {
  font-family: 'DM Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--circuit-green);
  text-decoration: none;
  transition: color 0.15s;
}

.pagination-link:hover { color: #15803D; }

.pagination-disabled {
  color: var(--rule-grey);
  cursor: default;
}

.pagination-info {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--mid-grey);
}

/* ── EMPTY STATE ── */
.no-articles {
  font-family: 'DM Mono', monospace;
  font-size: 0.85rem;
  color: var(--mid-grey);
  padding: 40px 0;
}

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--rule-grey);
  padding: 32px 0 48px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-brand {
  font-family: 'DM Mono', monospace;
  font-size: 0.82rem;
  color: var(--near-black);
  font-weight: 500;
}

.footer-brand .w-accent { color: var(--circuit-green); }

.footer-meta {
  font-family: 'DM Mono', monospace;
  font-size: 0.72rem;
  color: var(--mid-grey);
  line-height: 1.7;
  text-align: right;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .news-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .card-image-wrap {
    grid-column: 1;
    grid-row: 1;
    aspect-ratio: 16 / 9;
  }

  .card-body {
    grid-column: 1;
    grid-row: 2;
  }

  .card-cta {
    grid-column: 1;
    grid-row: 3;
  }

  .card-date { margin-left: 0; }

  .footer-meta { text-align: left; }
}
