/* =========================================================
   Financial-print style: warm paper, serif text, ruled lines,
   small sans labels, ruled tables with aligned figures.
   ========================================================= */

/* ---------- Fonts (self-hosted; no outside requests) ---------- */
@font-face { font-family: "Source Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Serif"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/source-serif-4-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Franklin"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/libre-franklin-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Franklin"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/libre-franklin-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Franklin"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/libre-franklin-latin-700-normal.woff2") format("woff2"); }

/* ---------- Colors ---------- */
:root {
  --paper: #fbf9f4;      /* faint newsprint warmth */
  --ink: #161616;
  --ink-soft: #4a4a4a;
  --rule: #161616;
  --hair: #cfcac0;
  --brand: #048EBD;      /* firm blue, used sparingly */
  --brand-ink: #0b4f6c;  /* logo and links */
  --shade: #f0ece3;      /* table header tint */
  --serif: "Source Serif", Georgia, "Times New Roman", serif;
  --sans: "Franklin", "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.6;
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 16px; }

a { color: var(--brand-ink); }

/* Small uppercase sans label: section heads, kickers, table heads */
.label {
  font-family: var(--sans); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink);
}

/* ---------- Masthead ---------- */
.masthead { padding-top: 0.5rem; }
.brand { display: block; text-align: center; padding: 1.4rem 0 1.2rem; }
.brand img { height: 72px; width: auto; display: inline-block; }

/* Thick-over-thin double rule, then the section bar */
.sections {
  border-top: 3px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  box-shadow: inset 0 2px 0 var(--paper), inset 0 3px 0 var(--rule);
  padding: 0.6rem 0 0.5rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem 2rem;
}
.sections a {
  font-family: var(--sans); font-weight: 600; font-size: 0.8rem;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); text-decoration: none;
}
.sections a:hover { color: var(--brand-ink); }
.sections a[aria-current="page"] { color: var(--brand-ink); border-bottom: 2px solid var(--brand); }

/* ---------- Main ---------- */
main.wrap { padding-top: 2.25rem; padding-bottom: 3.5rem; }

.prose { max-width: 42rem; margin: 0 auto; }
.prose h1 {
  font-family: var(--serif); font-weight: 700; font-size: 2.2rem; line-height: 1.15;
  letter-spacing: -0.01em; margin: 0 0 0.9rem;
}
.prose h2 {
  font-family: var(--sans); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.12em;
  text-transform: uppercase; margin: 2.4rem 0 0.6rem;
  border-top: 1px solid #bbb; padding-top: 0.75rem;
}
.prose h3 { font-family: var(--serif); font-size: 1.2rem; margin: 1.8rem 0 0.4rem; }
.prose p { margin: 0 0 1.15rem; }
.prose img { max-width: 100%; height: auto; display: block; margin: 1.5rem auto; }
.prose blockquote {
  margin: 1.5rem 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--hair); color: var(--ink-soft);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { border: 0; border-top: 1px solid var(--hair); margin: 2rem 0; }

.prose img[src*="cfp-logo"] { float: left; width: 175px; margin: 0.2rem 1.25rem 0.5rem 0; }

@media (max-width: 760px) {
  .prose img[src*="cfp-logo"] { width: 110px; }
}

/* ---------- Research article ---------- */
.kicker { margin: 0 0 0.6rem; color: var(--brand-ink); }
.deck { font-size: 1.25rem; line-height: 1.4; color: var(--ink-soft); font-style: italic; margin: 0 0 1rem; }
.byline {
  font-family: var(--sans); font-size: 0.85rem; line-height: 1.45;
  border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); padding: 0.5rem 0; margin: 0 0 1.6rem;
}
.byline strong { font-weight: 600; }
.byline span { display: block; color: var(--ink-soft); }
.back { font-family: var(--sans); font-size: 0.85rem; margin-top: 2.5rem; }

/* ---------- Tables: ruled, figures aligned ---------- */
.prose table {
  width: 100%; border-collapse: collapse; margin: 1.6rem 0 1.8rem;
  font-size: 0.9rem; line-height: 1.35;
  border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule);
  font-variant-numeric: lining-nums tabular-nums;
}
.prose thead th {
  font-family: var(--sans); font-weight: 700; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
  text-align: left; background: var(--shade); border-bottom: 1px solid var(--rule); padding: 0.45rem 0.6rem;
}
.prose td { padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--hair); vertical-align: top; }
.prose td[style*="right"] { white-space: nowrap; }
.prose tbody tr:last-child td { border-bottom: 0; }
/* Columns aligned right in Markdown (---:) get right-aligned figures */
.prose th[style*="right"], .prose td[style*="right"] { text-align: right; }
.table-wrap { overflow-x: auto; }

/* Charts and figures: ![alt text](chart.png "Caption. Source: …") */
.prose figure { margin: 1.8rem 0; }
.prose figure img { margin: 0 auto; }
.prose figcaption {
  font-family: var(--sans); font-size: 0.8rem; line-height: 1.45; color: var(--ink-soft);
  border-top: 1px solid var(--hair); margin-top: 0.5rem; padding-top: 0.4rem;
}

/* Table exhibits: {caption="…" source="…"} under a Markdown table.
   Small sans title above the rule, source and notes in smaller grey type below. */
.prose .table-figure table { margin: 0; }
.prose .table-figure figcaption {
  font-weight: 600; color: var(--ink);
  border-top: 0; margin: 0 0 0.45rem; padding-top: 0;
}
.prose .table-source {
  font-family: var(--sans); font-size: 0.72rem; line-height: 1.45; color: var(--ink-soft);
  margin: 0.45rem 0 0;
}

/* Footnotes: write [^1] in the text and [^1]: … at the end */
.footnotes { margin-top: 2.5rem; font-size: 0.85rem; color: var(--ink-soft); }
.footnotes hr { display: none; }
.footnotes ol { border-top: 1px solid var(--hair); padding-top: 0.8rem; padding-left: 1.2rem; }
sup a { text-decoration: none; }

/* ---------- Home ---------- */
.home h1 { font-size: 2.6rem; }
.home-links { list-style: none; padding: 0; margin: 1.8rem 0 0; border-top: 1px solid var(--hair); }
.home-links li { border-bottom: 1px solid var(--hair); }
.home-links a { display: block; padding: 0.55rem 0; font-weight: 600; color: var(--ink); text-decoration: none; }
.home-links a::before { content: "→ "; color: var(--brand-ink); }
.home-links a:hover { color: var(--brand-ink); text-decoration: underline; }

/* ---------- Call to action: one ruled line ---------- */
.cta {
  margin: 2.2rem 0 0; padding: 0.75rem 0; text-align: center;
  border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.cta a {
  font-family: var(--sans); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brand-ink); text-decoration: none;
}
.cta a:hover { text-decoration: underline; }

/* ---------- About: portrait ---------- */
.prose h2 { display: flow-root; }   /* section rule stops short of the portrait */
.cta, .article-note, .back { clear: both; }
.prose .portrait { float: right; width: 15rem; height: auto; margin: 0.2rem 0 1rem 1.75rem; }

/* ---------- Article closing note ---------- */
.article-note {
  margin-top: 2.2rem; padding-top: 0.6rem; border-top: 1px solid var(--hair);
  font-family: var(--sans); font-size: 0.78rem; line-height: 1.5; color: var(--ink-soft);
}

/* ---------- Research library ---------- */
.library .theme h2.label { font-size: 0.75rem; }
.articles { list-style: none; padding: 0; margin: 0; }
.articles li { padding: 0.7rem 0; border-bottom: 1px solid var(--hair); }
.articles li > a { font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.articles li > a:hover { color: var(--brand-ink); text-decoration: underline; }
.summary { display: block; color: var(--ink-soft); font-size: 0.95rem; margin-top: 0.15rem; }
.date { display: block; font-family: var(--sans); font-size: 0.8rem; color: var(--ink-soft); margin-top: 0.2rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 3px solid var(--rule); color: var(--ink-soft);
  font-family: var(--sans); font-size: 0.78rem; line-height: 1.55; padding: 1.25rem 0 2.5rem;
}
.site-footer p { margin: 0 0 0.6rem; }
.site-footer a { color: var(--ink-soft); }
.footer-links { list-style: disc; margin: 0.5rem 0 0; padding-left: 1.2rem; }
.footer-links li { margin: 0 0 0.3rem; }

/* ---------- Narrow screens ---------- */
@media (max-width: 760px) {
  body { font-size: 18px; }
  .brand img { height: 52px; }
  .sections { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; padding: 0; }
  .sections a { font-size: 0.72rem; text-align: center; padding: 0.55rem 0.2rem 0.5rem; }
  .sections a:nth-child(-n+2) { grid-column: span 3; }
  .sections a:nth-child(n+3) { grid-column: span 2; border-top: 1px solid var(--hair); }
  .sections a[aria-current="page"] { border-bottom: 0; text-decoration: underline; text-decoration-color: var(--brand); text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .prose .portrait { float: none; display: block; width: 12rem; margin: 0 auto 1.5rem; }
  .home h1 { font-size: 2rem; }
  .cta a { font-size: 0.82rem; letter-spacing: 0.06em; }
  .prose h1 { font-size: 1.9rem; }
}

/* Smallest phones: keep each menu label on one line */
@media (max-width: 360px) {
  .sections a { font-size: 0.66rem; letter-spacing: 0.06em; }
}

/* ---------- Print / Save as PDF (for advertising-record snapshots) ---------- */
@media print {
  body { background: #fff; font-size: 11pt; }
  .sections, .cta, .back { display: none; }
  .brand img { height: 48px; }
  main.wrap { padding-top: 0.5rem; }
  a { color: inherit; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; color: #555; }
  .prose table, .prose figure { break-inside: avoid; }
  .site-footer::after { content: "Printed from bormannwm.com"; display: block; text-align: center; font-size: 8pt; margin-top: 1rem; }
}
/* Home page: link list and CTA spacing */
.prose.home .home-links,
.prose.home .home-links li,
.prose.home .home-links a {
  border: 0;
}
.prose.home .home-links {
  margin: 0.75rem 0 0;
  padding: 0;
}
.prose.home .home-links li {
  margin: 0;
  padding: 0.35rem 0;
  line-height: 1.45;
}
.prose.home .cta {
  margin-top: 2.5rem;
  padding: 1.25rem 0;
  border-top: 3px solid #1a1a1a;
}

/* ---------- Share line (end of research articles) ---------- */
.share {
  clear: both; margin-top: 2rem; padding: 0.55rem 0;
  border-top: 3px solid var(--rule); border-bottom: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 0.3rem 1.4rem;
  font-family: var(--sans); font-size: 0.85rem;
}
.share .label { margin: 0 0.4rem 0 0; }
.share a { font-weight: 600; color: var(--brand-ink); text-decoration: none; }
.share a:hover { text-decoration: underline; }
.prose .share + .back { margin-top: 1.2rem; }