/* Lukas Palmer Research: a research-publication look (quiet, legible, trustworthy).
   System fonts only: fast and private, no third-party requests. */
:root {
  --ink: #14213D;        /* headings, brand */
  --text: #24292F;       /* body text */
  --muted: #59636E;      /* meta, captions */
  --paper: #FBFBF8;      /* page */
  --panel: #F2F1EC;      /* boxes */
  --rule: #E2E0D9;       /* lines */
  --accent: #1F5BC4;     /* links, buttons (AA on paper) */
  --accent-soft: #E8EFFB;
  --neg: #A63A28;        /* negative numbers */
  --pos: #1E6B45;        /* positive numbers */
  --serif: "Iowan Old Style", "Charter", "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 720px;
  --wide: 1080px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 18px/1.65 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 24px; }
.measure { max-width: var(--measure); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; background: #fff; padding: 8px 12px; z-index: 10; }

/* header */
.top { border-bottom: 1px solid var(--rule); background: var(--paper); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -0.2px; }
.brand span { color: var(--muted); font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 1.5px; text-transform: uppercase; margin-left: 8px; }
.nav { display: flex; gap: 22px; font-size: 16px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }

/* type */
h1, h2, h3 { font-family: var(--serif); color: var(--ink); line-height: 1.2; letter-spacing: -0.3px; }
h1 { font-size: clamp(32px, 5vw, 46px); margin: 0 0 16px; }
h2 { font-size: clamp(25px, 3.4vw, 30px); margin: 48px 0 12px; }
h3 { font-size: 21px; margin: 32px 0 8px; }
p, ul, ol { margin: 0 0 18px; }
li { margin-bottom: 6px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 1.6px; text-transform: uppercase; color: var(--accent); margin: 0 0 12px; }
.dek { font-size: 21px; line-height: 1.5; color: var(--muted); margin: 0 0 20px; }
.meta { font-size: 15px; color: var(--muted); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 10px 0; margin: 0 0 28px; }
.meta strong { color: var(--ink); font-weight: 600; }
strong { color: var(--ink); }
.num-neg { color: var(--neg); font-weight: 600; }
.num-pos { color: var(--pos); font-weight: 600; }

/* article blocks */
.article { padding: 44px 0 24px; }
.keybox { background: var(--panel); border-left: 4px solid var(--ink); padding: 20px 24px 6px; margin: 0 0 32px; }
.keybox h2 { margin: 0 0 10px; font-size: 20px; font-family: var(--sans); letter-spacing: 0; }
.keybox ul { padding-left: 20px; }
.toc { border: 1px solid var(--rule); border-radius: 8px; padding: 16px 22px 8px; margin: 0 0 20px; background: #fff; }
.toc-title { font-size: 13px; font-weight: 600; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.toc ol { margin: 0 0 8px; padding-left: 22px; font-size: 16px; }
.toc li { margin-bottom: 4px; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
/* "On this page" as a sticky left sidebar on wide screens; the reading column stays centred.
   Below 1240px the sidebar is hidden and the inline box after Key findings is used instead. */
.side { display: none; }
@media (min-width: 1240px) {
  .article-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, var(--measure)) minmax(0, 1fr); }
  .article-layout > .measure { grid-column: 2; width: 100%; }
  .side { display: block; grid-column: 1; grid-row: 1; justify-self: end; width: 232px; margin-right: 8px; }
  .toc-side { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto;
              border: 0; border-left: 1px solid var(--rule); border-radius: 0; background: transparent;
              padding: 4px 0 4px 16px; margin: 220px 0 0; }
  .toc-side ol { list-style: none; padding-left: 0; font-size: 15px; line-height: 1.4; }
  .toc-side li { margin-bottom: 10px; }
  .toc-side a { color: var(--muted); display: block; }
  .toc-side a[aria-current] { color: var(--ink); font-weight: 600; box-shadow: -17px 0 0 -15px var(--ink); }
  .measure .toc { display: none; }
}
.howto { border: 1px solid var(--rule); border-radius: 8px; padding: 12px 22px; margin: 0 0 32px; background: var(--paper); font-size: 16px; }
.howto summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.howto ul { margin: 12px 0 8px; padding-left: 20px; }
.howto p { margin: 0 0 6px; }
h2[id], h3[id] { scroll-margin-top: 16px; }
.note { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 16px 20px 2px; margin: 24px 0; font-size: 17px; }
.disclosure { background: #FFF6E5; border-left: 4px solid #C27A12; padding: 14px 20px 2px; margin: 0 0 28px; font-size: 16px; }
/* embedded YouTube video (youtube-nocookie.com), 16:9 and full column width */
.video { position: relative; aspect-ratio: 16 / 9; margin: 20px 0 16px; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
figure { margin: 28px 0 32px; }
figure img { border: 1px solid var(--rule); border-radius: 6px; background: #fff; }
figcaption { font-size: 15px; color: var(--muted); margin-top: 8px; }
.table-wrap { overflow-x: auto; margin: 20px 0 28px; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-size: 16px; font-variant-numeric: tabular-nums; }
th, td { padding: 9px 12px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
th { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--ink); vertical-align: bottom; }
td:not(:first-child) { white-space: nowrap; }
/* text-heavy tables (detected by the build): left-aligned, wrapping, readable column widths */
table.text-table td, table.text-table th { text-align: left !important; white-space: normal; }
table.text-table td, table.text-table th { min-width: 120px; }
table.text-table td:first-child, table.text-table th:first-child { min-width: 90px; }
.table-wrap.scroll-hint { box-shadow: inset -12px 0 10px -10px rgba(20,33,61,.18); }
figure a { display: block; }
td:not(:first-child), th:not(:first-child) { text-align: right; }
tbody tr:hover { background: #F6F5F1; }
blockquote { margin: 24px 0; padding: 4px 20px; border-left: 3px solid var(--rule); color: var(--muted); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 40px 0; }
.sources { font-size: 15px; color: var(--muted); }
.sources li { word-break: break-word; }

/* cards */
.hero { padding: 64px 0 40px; border-bottom: 1px solid var(--rule); }
.hero .dek { max-width: 640px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin: 28px 0 8px; }
.card { background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 22px 22px 18px; display: flex; flex-direction: column; }
.card { overflow: hidden; }
.card-img { display: block; margin: -22px -22px 16px; }
.card-img img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-bottom: 1px solid var(--rule); }
.card h3 { margin: 4px 0 8px; font-size: 21px; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card p { font-size: 16px; color: var(--text); margin-bottom: 12px; }
.card .answer { font-weight: 600; color: var(--ink); }
.card .small { font-size: 14px; color: var(--muted); margin-top: auto; margin-bottom: 0; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; color: var(--muted); }
a.tag { text-decoration: none; }
a.tag:hover { color: var(--accent); text-decoration: underline; }
.eyebrow-link { color: inherit; text-decoration: none; }
a.eyebrow-link:hover { text-decoration: underline; }
/* topic filter row on the Research and topic pages: plain links styled as pills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.chips a { font-size: 15px; padding: 6px 14px; border: 1px solid var(--rule); border-radius: 999px; background: #fff; color: var(--ink); text-decoration: none; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
.chips a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.section { padding: 40px 0; }
.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.pillars h3 { margin-top: 0; font-size: 19px; }
.pillars p { font-size: 16px; color: var(--muted); }
.btn { display: inline-block; background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 16px; }
.btn:hover { background: #22325A; color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.signup { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; padding: 24px; margin: 40px 0; }
.signup h2 { margin-top: 0; font-size: 22px; }
.signup .row { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input { flex: 1 1 220px; padding: 11px 12px; font-size: 16px; border: 1px solid #C9C6BD; border-radius: 6px; background: #fff; }
.signup .fine { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.ad-slot { margin: 32px 0; min-height: 90px; }
.related { border-top: 1px solid var(--rule); margin-top: 48px; padding-top: 8px; }

/* footer */
footer { border-top: 1px solid var(--rule); margin-top: 56px; padding: 32px 0 48px; font-size: 15px; color: var(--muted); background: var(--panel); }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
footer a { color: var(--ink); }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .dek { font-size: 19px; }
  .brand span { display: none; }
  .nav { gap: 16px; font-size: 15px; }
  th, td { padding: 8px 9px; font-size: 15px; }
  .hero { padding: 40px 0 28px; }
}
@media print {
  .top, footer, .ad-slot, .signup, .nav { display: none; }
  body { background: #fff; }
}
