@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300;1,9..40,400&display=swap');

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

:root {
  --ink:        #1C1C1A;
  --ink-mid:    #4A4A46;
  --ink-muted:  #8A8A84;
  --paper:      #F8F7F3;
  --paper-mid:  #EFEDE7;
  --paper-dark: #E4E1D8;
  --white:      #FFFFFF;
  --accent:     #1A6B4A;
  --accent-mid: #155739;
  --accent-lt:  #E8F4EE;
  --border:     rgba(28,28,26,0.10);
  --border-mid: rgba(28,28,26,0.18);

  --p1:         #C04828;
  --p1-lt:      #FAECE7;
  --p2:         #854F0B;
  --p2-lt:      #FEF0DA;
  --p3:         #1A6B4A;
  --p3-lt:      #E8F4EE;
  --p4:         #3C3489;
  --p4-lt:      #EEEDFE;
  --p5:         #0C447C;
  --p5-lt:      #E6F1FB;

  --max:        1160px;
  --prose:      700px;
  --r:          6px;
  --r-lg:       12px;
}

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

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── Nav ──────────────────────────────────────────────── */
.nav {
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-logo-mark svg { width: 16px; height: 16px; }
.nav-wordmark {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  letter-spacing: 0.01em;
}
.nav-wordmark span {
  color: var(--accent);
  font-weight: 400;
}
.nav-tag {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,0.4);
  font-family: 'DM Sans', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-link {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
  transition: color 0.15s;
  font-weight: 400;
}
.nav-link:hover { color: #fff; }
.nav-link--active { color: #fff !important; }
.nav-cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  background: var(--accent);
  padding: 7px 16px;
  border-radius: var(--r);
  transition: background 0.15s;
}
.nav-cta:hover { background: var(--accent-mid); }

/* ─── Hero (listing page) ──────────────────────────────── */
.hero {
  background: var(--ink);
  padding: 72px 2rem 64px;
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(26,107,74,0.15);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  max-width: 640px;
  margin: 0 auto 1.1rem;
  letter-spacing: -0.01em;
}
.hero p {
  font-size: 17px;
  color: rgba(255,255,255,0.55);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.65;
  font-weight: 300;
}

/* ─── Listing ───────────────────────────────────────────── */
.listing {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 2rem 80px;
}
.listing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

/* ─── Article Card ─────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 8px 32px rgba(28,28,26,0.09);
  transform: translateY(-2px);
}
.card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}
.card-tag {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
}
.card-tag.p1 { background: var(--p1-lt); color: var(--p1); }
.card-tag.p2 { background: var(--p2-lt); color: var(--p2); }
.card-tag.p3 { background: var(--p3-lt); color: var(--p3); }
.card-tag.p4 { background: var(--p4-lt); color: var(--p4); }
.card-tag.p5 { background: var(--p5-lt); color: var(--p5); }
.card-read-time {
  font-size: 12px;
  color: var(--ink-muted);
}
.card h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.card p {
  font-size: 14px;
  color: var(--ink-mid);
  line-height: 1.65;
  flex: 1;
}
.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-date {
  font-size: 12px;
  color: var(--ink-muted);
}
.card-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-mid);
  font-size: 14px;
  transition: background 0.15s, border-color 0.15s;
}
.card:hover .card-arrow {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ─── Article Layout ───────────────────────────────────── */
.article-hero {
  background: var(--ink);
  padding: 64px 2rem 56px;
}
.article-hero-inner {
  max-width: var(--prose);
  margin: 0 auto;
}
.article-hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.5rem;
}
.back-link {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}
.back-link:hover { color: #fff; }
.meta-divider { color: rgba(255,255,255,0.2); font-size: 12px; }
.article-hero h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 1.25rem;
}
.article-hero-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
  line-height: 1.6;
  max-width: 560px;
}
.article-stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.article-stat { font-size: 13px; color: rgba(255,255,255,0.4); }
.article-stat strong { color: rgba(255,255,255,0.75); font-weight: 500; margin-right: 4px; }

.article-body {
  max-width: var(--prose);
  margin: 0 auto;
  padding: 3.5rem 2rem 4rem;
}
.article-body p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  margin-bottom: 1.4rem;
}
.article-body h2 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 400;
  color: var(--ink);
  margin: 2.5rem 0 1rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.article-body h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  margin: 1.75rem 0 0.5rem;
  line-height: 1.4;
  letter-spacing: 0;
}
.article-body ul {
  margin: 0 0 1.4rem 0;
  padding: 0;
  list-style: none;
}
.article-body ul li {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  padding: 0.3rem 0 0.3rem 1.5rem;
  position: relative;
}
.article-body ul li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 300;
}
.callout {
  background: var(--accent-lt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 1.1rem 1.4rem;
  margin: 1.75rem 0;
}
.callout p {
  font-size: 16px !important;
  font-style: italic;
  color: var(--accent-mid) !important;
  margin: 0 !important;
  line-height: 1.65 !important;
}
.prompt-box {
  background: var(--paper-mid);
  border: 1px solid var(--border-mid);
  border-radius: var(--r-lg);
  padding: 1.25rem 1.5rem;
  margin: 1.75rem 0;
  font-family: 'DM Sans', monospace;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-mid);
}
.prompt-box-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.6rem;
}

/* ─── CTA Box ──────────────────────────────────────────── */
.cta-box {
  background: var(--ink);
  border-radius: var(--r-lg);
  padding: 2rem 2rem;
  margin: 3rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}
.cta-box-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.cta-box h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 400;
  color: #fff;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.cta-box p {
  font-size: 14px !important;
  color: rgba(255,255,255,0.5) !important;
  margin: 0 !important;
  line-height: 1.6 !important;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--r);
  transition: background 0.15s;
  margin-top: 0.25rem;
}
.cta-btn:hover { background: var(--accent-mid); }

/* ─── Related Articles ─────────────────────────────────── */
.related {
  background: var(--paper-mid);
  border-top: 1px solid var(--border);
  padding: 3rem 2rem;
}
.related-inner {
  max-width: var(--prose);
  margin: 0 auto;
}
.related h3 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: 1.25rem;
}
.related-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.related-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0.9rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: border-color 0.15s;
}
.related-item:hover { border-color: var(--accent); }
.related-item-tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 3px;
  flex-shrink: 0;
}
.related-item-title {
  font-size: 14px;
  color: var(--ink);
  line-height: 1.4;
  flex: 1;
}
.related-item-arrow { font-size: 14px; color: var(--ink-muted); flex-shrink: 0; }

/* ─── Footer ───────────────────────────────────────────── */
.footer {
  background: var(--ink);
  padding: 2.5rem 2rem;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.3);
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.35);
  transition: color 0.15s;
}
.footer-links a:hover { color: rgba(255,255,255,0.75); }

/* ─── Utilities ─────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ─── Mobile ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .nav-tag { display: none; }
  .nav-link { display: none; }
  .listing-grid { grid-template-columns: 1fr; }
  .article-stats { flex-wrap: wrap; gap: 0.75rem; }
  .hero { padding: 48px 1.25rem 44px; }
  .listing { padding: 36px 1.25rem 56px; }
  .article-hero { padding: 44px 1.25rem 40px; }
  .article-body { padding: 2.5rem 1.25rem 3rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
