/* Articles section (/articles/). The index follows the Learn index, each article follows a Learn article.
   Pages are generated by .jez/articles/render.py. */

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #17211d;
  background: #fff;
  line-height: 1.75;
}

.wrap { width: min(1120px, calc(100% - 48px)); margin: auto; }

header { border-bottom: 1px solid #e8ecea; background: #fff; }
.nav { min-height: 96px; display: flex; align-items: center; }
.logo { height: 76px; width: auto; display: block; }

.hero { padding: 85px 0 70px; background: linear-gradient(180deg, #f4faf7, #fff); }
.eyebrow { color: #176b4b; font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
h1 { max-width: 900px; font-size: clamp(40px, 6vw, 70px); line-height: 1.05; letter-spacing: -.04em; margin: 15px 0 25px; }
.lead { max-width: 800px; color: #596760; font-size: 21px; margin: 0; }

footer { padding: 40px 0; border-top: 1px solid #e8ecea; color: #718079; font-size: 13px; }

/* ---------- One article ---------- */

.article-body { width: min(820px, calc(100% - 48px)); margin: auto; padding: 60px 0 90px; font-size: 18px; }
.article-body h2 { font-size: 34px; line-height: 1.2; letter-spacing: -.025em; margin: 55px 0 18px; }
.article-body p { margin: 0 0 22px; }
.article-body ul { margin: 0 0 26px; padding-left: 1.3em; }
.article-body li { margin: 0 0 10px; }
.article-body li::marker { color: #176b4b; }

.intro { font-size: 20px; color: #2c3833; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 40px 0 14px; }
.stat { padding: 22px 18px; background: #f0f8f4; border-radius: 14px; }
.stat-num { display: block; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; color: #176b4b; margin-bottom: 8px; }
.stat-cap { display: block; font-size: 14px; line-height: 1.45; color: #4d5b54; }

.source { font-size: 14px; font-style: italic; color: #718079; }

.point strong { color: #176b4b; }

.table { margin: 30px 0 40px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
thead th { background: #176b4b; color: #fff; text-align: left; font-size: 13px; letter-spacing: .04em; padding: 12px 14px; }
tbody th, tbody td { text-align: left; vertical-align: top; padding: 14px; border-bottom: 1px solid #e0e7e3; }
tbody th { color: #176b4b; width: 26%; }
tbody tr:nth-child(even) { background: #fafcfb; }

.question { padding: 26px 30px; margin: 40px 0; background: #17211d; color: #fff; border-radius: 14px; }
.question-label { color: #80c7a6; font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; margin-bottom: 10px; }
.question p { margin: 0; font-size: 21px; line-height: 1.5; }

.flow { margin: 34px 0; padding: 20px 22px; border: 1px solid #e0e7e3; border-radius: 12px; background: #fafcfb;
  font-size: 13px; font-weight: 700; letter-spacing: .08em; line-height: 2; color: #176b4b; text-align: center; }
.flow span { white-space: nowrap; }
.flow .arrow { color: #9aa8a1; margin: 0 4px; }

.cite { color: #176b4b; text-decoration: none; font-size: .85em; }
.cite:hover { text-decoration: underline; }

.sources { margin-top: 60px; padding-top: 30px; border-top: 1px solid #dfe6e2; font-size: 15px; color: #5f6d66; }
.sources p { overflow-wrap: anywhere; }
.sources a { color: #176b4b; }
.sources p:target { background: #f0f8f4; }

.disclaimer { margin: 40px 0 20px; padding: 24px 28px; background: #fafcfb; border: 1px solid #e0e7e3; border-radius: 12px; font-size: 15px; color: #5f6d66; }
.disclaimer strong { display: block; color: #17211d; margin-bottom: 6px; }
.disclaimer p { margin: 0; }

.tagline { margin: 34px 0 0; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .15em; color: #176b4b; }

.all-articles { margin: 50px 0 0; }
.all-articles a { color: #176b4b; font-weight: 700; text-decoration: none; }
.all-articles a:hover { text-decoration: underline; }

@media (max-width: 800px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .logo { height: 58px; }
  .hero { padding: 60px 0 50px; }
  .lead { font-size: 19px; }
  .article-body { padding-top: 40px; font-size: 17px; }
  .article-body h2 { font-size: 28px; margin-top: 45px; }
  .intro { font-size: 18px; }
  .stat-num { font-size: 26px; }
  .question p { font-size: 19px; }

  /* The three-column tables become one card per row: a 390px screen cannot hold three columns of prose. */
  .table { overflow: visible; }
  table, tbody, tr, th, td { display: block; width: auto; }
  thead { display: none; }
  tbody tr { border: 1px solid #e0e7e3; border-radius: 12px; margin-bottom: 14px; padding: 6px 0; background: #fff; }
  tbody tr:nth-child(even) { background: #fff; }
  tbody th { width: auto; border: 0; padding: 10px 16px 4px; font-size: 16px; }
  tbody td { border: 0; padding: 6px 16px 10px; }
  tbody td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #718079; }
}

/* ---------- The index ---------- */

.articles-index { line-height: 1.65; }
.articles-index .wrap { width: min(1160px, calc(100% - 48px)); }
.articles-index header { background: rgba(255,255,255,.97); position: sticky; top: 0; z-index: 20; }
.articles-index .nav { gap: 28px; }
.articles-index .brand { margin-right: auto; display: flex; align-items: center; }
:where(.articles-index) nav { display: flex; gap: 26px; }
:where(.articles-index) nav a { text-decoration: none; color: #4d5b54; font-size: 14px; }
:where(.articles-index) nav a:hover { color: #176b4b; }
.articles-index .hero { padding: 90px 0 85px; }
.articles-index h1 { max-width: 1100px; font-size: clamp(40px, 6.5vw, 70px); line-height: 1.03; letter-spacing: -.045em; margin: 16px 0 24px; }
.articles-index h1 span { display: block; color: #176b4b; }
.articles-index .lead { font-size: 20px; max-width: 780px; }

.library { padding: 20px 0 90px; }
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card { position: relative; border: 1px solid #e0e7e3; border-radius: 16px; padding: 30px 34px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.card:hover { border-color: #176b4b; box-shadow: 0 8px 24px rgba(23,107,75,.08); }
.card .tag { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #176b4b; }
.card h2 { font-size: 25px; line-height: 1.25; letter-spacing: -.01em; margin: 10px 0 12px; }
.card h2 a { color: #17211d; text-decoration: none; }
.card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; } /* the whole card is the link */
.card h2 a:focus-visible { outline: none; }
.card:focus-within { outline: 2px solid #176b4b; outline-offset: 2px; }
.card:hover h2 a { color: #176b4b; }
.card p { color: #627069; margin: 0; }

@media (max-width: 800px) {
  .articles-index .logo { height: 58px; }
  .grid { grid-template-columns: 1fr; }
  .articles-index .hero { padding: 65px 0 55px; }
}
