/* Blog and article pages.
   Palette lifted from the landing page so the two read as one site.
   Reading measure is capped near 70 Arabic characters; long lines are
   the single biggest thing that stops people finishing an article. */
:root {
  --ink: #0F172A;
  --ink-2: #1E293B;
  --muted: #5C6572;
  --green: #10B981;
  --green-d: #059669;
  --gold: #F59E0B;
  --indigo: #6366F1;
  --paper: #FCFBF8;
  --cream: #F7F3EA;
  --lav: #EEF0FB;
  --line: rgba(15, 23, 42, .10);
  --line-2: rgba(15, 23, 42, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Cairo, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.95;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.skip {
  position: absolute; inset-inline-start: -9999px; top: 0; z-index: 99;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 0 0 12px 0;
}
.skip:focus { inset-inline-start: 0; }

/* ---------------- chrome ---------------- */
header.site {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 22px;
  background: rgba(252, 251, 248, .88);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-2);
}
header.site .brand {
  display: flex; align-items: center; gap: 9px;
  font-weight: 900; font-size: 17px; color: var(--ink); text-decoration: none;
}
header.site nav { display: flex; align-items: center; gap: 8px; }
header.site nav a {
  color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 14px;
  padding: 8px 12px; border-radius: 100px;
}
header.site nav a:hover { background: var(--lav); }
header.site nav a.dl {
  background: var(--ink); color: #fff;
}
header.site nav a.dl:hover { background: var(--green-d); }

main { display: block; }
.post, .hub { max-width: 760px; margin: 0 auto; padding: 30px 22px 70px; }

.crumbs { font-size: 12.5px; color: var(--muted); margin: 0 0 20px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--green-d); text-decoration: underline; }
.crumbs span { margin: 0 4px; }

.kicker {
  display: inline-block; margin: 0 0 10px;
  background: var(--lav); color: var(--indigo);
  font-size: 11.5px; font-weight: 800; letter-spacing: .02em;
  padding: 5px 13px; border-radius: 100px;
}
h1 {
  margin: 0 0 12px;
  font-size: clamp(27px, 5.4vw, 40px); font-weight: 900;
  line-height: 1.32; letter-spacing: -.015em;
  text-wrap: balance;
}
.dates { margin: 0 0 26px; font-size: 12.5px; color: var(--muted); }

/* The block an assistant is most likely to quote, and the block a
   student reads if they read nothing else. Kept to a few sentences on
   purpose — a summary that needs summarising is not one. */
.tldr {
  background: var(--cream); border: 1px solid rgba(245, 158, 11, .28);
  border-radius: 16px; padding: 16px 20px; margin: 0 0 28px;
}
.tldr b {
  display: block; font-size: 12px; letter-spacing: .04em;
  color: #92600B; margin-bottom: 6px;
}
.tldr p { margin: 0; font-size: 16.5px; font-weight: 600; line-height: 1.85; }

.toc {
  background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 20px 18px; margin: 0 0 32px;
}
.toc b { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.toc ol { margin: 0; padding-inline-start: 22px; }
.toc li { margin: 5px 0; font-size: 15px; }
.toc a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.toc a:hover { color: var(--green-d); text-decoration: underline; }

/* ---------------- prose ---------------- */
.post h2 {
  margin: 46px 0 14px; font-size: clamp(21px, 3.6vw, 27px);
  font-weight: 900; line-height: 1.45; letter-spacing: -.01em;
  scroll-margin-top: 84px; text-wrap: balance;
}
.post h3 {
  margin: 32px 0 10px; font-size: 18.5px; font-weight: 800; line-height: 1.6;
}
.post p { margin: 0 0 17px; }
.post ul, .post ol { margin: 0 0 20px; padding-inline-start: 24px; }
.post li { margin: 8px 0; }
.post a { color: var(--green-d); font-weight: 600; }
.post strong, .hub strong { font-weight: 800; }
.post em { font-style: normal; background: rgba(110, 231, 183, .28); padding: 0 3px; border-radius: 4px; }

.post table {
  width: 100%; border-collapse: collapse; margin: 6px 0 24px;
  font-size: 15.5px; font-variant-numeric: tabular-nums;
}
.tw { overflow-x: auto; margin: 0 0 24px; }
.tw table { margin-bottom: 0; }
.post th, .post td {
  text-align: start; padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.post th { font-weight: 800; font-size: 13.5px; color: var(--muted); background: #fff; }
.post tbody tr:last-child td { border-bottom: 0; }
.post table caption {
  caption-side: bottom; text-align: start; padding-top: 10px;
  font-size: 12.5px; color: var(--muted); line-height: 1.8;
}

/* A stated source is the whole reason to trust a number, so it is a
   visible element rather than a footnote nobody reaches. */
.src {
  font-size: 13.5px; color: var(--muted); line-height: 1.85;
  border-inline-start: 3px solid var(--line);
  padding: 2px 14px; margin: 0 0 22px;
}
.src b { color: var(--ink-2); }

.note {
  background: var(--lav); border-radius: 14px; padding: 15px 19px;
  margin: 0 0 24px; font-size: 15.5px; line-height: 1.85;
}
.note b { color: var(--indigo); }

blockquote {
  margin: 0 0 24px; padding: 2px 18px;
  border-inline-start: 3px solid var(--green);
  color: var(--ink-2); font-weight: 600;
}

/* ---------------- faq ---------------- */
.faq { margin-top: 48px; }
.faq h2 { margin-bottom: 16px; }
.faq details {
  background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 0 18px; margin: 0 0 10px;
}
.faq summary {
  cursor: pointer; padding: 15px 0; font-weight: 800; font-size: 16px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; float: inline-end; color: var(--muted); font-weight: 700;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; font-size: 15.5px; color: var(--ink-2); }

/* ---------------- cta + related ---------------- */
.cta {
  margin: 52px 0 0; padding: 28px 26px; border-radius: 22px;
  background: linear-gradient(135deg, #0F172A, #1E293B);
  color: #fff; text-align: center;
}
.cta h2 { margin: 0 0 8px; font-size: 22px; font-weight: 900; color: #fff; }
.cta p { margin: 0 0 18px; color: rgba(255, 255, 255, .78); font-size: 15px; }
.cta .btn {
  display: inline-block; background: var(--green); color: #04231a;
  font-weight: 900; font-size: 15.5px; text-decoration: none;
  padding: 13px 30px; border-radius: 100px;
}
.cta .btn:hover { background: var(--mint, #6EE7B7); }

.related { margin-top: 46px; padding-top: 24px; border-top: 1px solid var(--line); }
.related h2 { margin: 0 0 12px; font-size: 19px; font-weight: 900; }
.related ul { margin: 0; padding-inline-start: 22px; }
.related li { margin: 8px 0; font-size: 16px; }
.related a { color: var(--green-d); font-weight: 700; text-decoration: none; }
.related a:hover { text-decoration: underline; }

/* ---------------- hub ---------------- */
.hub .lede { font-size: 18px; color: var(--ink-2); margin: 0 0 40px; max-width: 62ch; }
.tag-h {
  margin: 40px 0 14px; font-size: 13px; font-weight: 900; color: var(--muted);
  letter-spacing: .06em; padding-bottom: 9px; border-bottom: 1px solid var(--line);
}
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cards a {
  display: block; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; padding: 17px 20px; text-decoration: none; color: var(--ink);
  transition: border-color .18s, transform .18s;
}
.cards a:hover { border-color: rgba(16, 185, 129, .5); transform: translateY(-1px); }
.cards b { display: block; font-size: 17.5px; font-weight: 800; line-height: 1.55; margin-bottom: 5px; }
.cards span { display: block; font-size: 14.5px; color: var(--muted); line-height: 1.8; }
.cards time { display: block; margin-top: 8px; font-size: 12px; color: var(--muted); }

/* ---------------- footer ---------------- */
.site-foot { border-top: 1px solid var(--line); background: #fff; }
.fwrap { max-width: 760px; margin: 0 auto; padding: 34px 22px 44px; }
.fbrand { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 900; }
.fnote { margin: 0 0 18px; font-size: 14.5px; color: var(--muted); max-width: 58ch; }
.fwrap nav { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 18px; }
.fwrap nav a { color: var(--ink-2); font-size: 14px; font-weight: 700; text-decoration: none; }
.fwrap nav a:hover { color: var(--green-d); text-decoration: underline; }
.fsmall { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.9; }
.fsmall a { color: var(--muted); }

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .post, .hub { padding: 22px 18px 56px; }
  header.site { padding: 10px 16px; }
  header.site nav a { padding: 7px 10px; font-size: 13.5px; }
}
