/* =============================================================
   SwiftAlerts — Shared Article Stylesheet
   Used by all /research article pages.
   To update branding: edit the .sa-header and .sa-footer blocks
   below, plus the HTML snippets in each article file.
   ============================================================= */

:root {
  --bg: #fafaf7;
  --text: #1a1a1a;
  --text-muted: #555;
  --text-faint: #888;
  --accent: #2E5AAC;
  --border: #e5e3dd;
  --code-bg: #f0eee8;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  line-height: 1.7;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---- branded header bar ---- */
.sa-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.sa-header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sa-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.sa-brand:hover { color: var(--accent); }
.sa-brand { border-bottom: none; }
.sa-logo {
  width: 20px;
  height: 20px;
  background: url(/favicon.svg) center/contain no-repeat;
  flex: none;
}
.sa-header-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}
.sa-header-nav a {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--text-faint);
  text-decoration: none;
  border-bottom: none;
  transition: color 0.15s;
}
.sa-header-nav a:hover { color: var(--accent); }

/* ---- article container ---- */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

h1 {
  font-family: Georgia, serif;
  font-size: 42px;
  line-height: 1.15;
  font-weight: bold;
  margin: 0 0 1rem;
  letter-spacing: -0.01em;
}

.subtitle {
  font-family: Georgia, serif;
  font-size: 22px;
  line-height: 1.4;
  font-style: italic;
  color: var(--text-muted);
  margin: 0 0 2.5rem;
  font-weight: normal;
}

.byline {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  color: var(--text-faint);
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}

.lead {
  font-size: 20px;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 1.5rem;
}

p { margin: 0 0 1.5rem; }

h2 {
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: bold;
  line-height: 1.3;
  margin: 3.5rem 0 1.5rem;
  letter-spacing: -0.005em;
}

blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text);
  font-size: 19px;
}

blockquote cite {
  display: block;
  font-style: normal;
  font-size: 14px;
  color: var(--text-faint);
  margin-top: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(46, 90, 172, 0.3);
  transition: border-color 0.15s;
}

a:hover { border-bottom-color: var(--accent); }

strong { font-weight: bold; }

/* ---- figures & charts ---- */
.figure { margin: 3rem 0; }

.figure svg {
  display: block;
  width: 100%;
  height: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 380px;
  margin-bottom: 0.75rem;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  margin-bottom: 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--text-muted);
}

.chart-legend span { display: flex; align-items: center; gap: 8px; }

.swatch { display: inline-block; width: 22px; height: 2px; flex-shrink: 0; }
.swatch.dashed { background: repeating-linear-gradient(90deg, currentColor 0 5px, transparent 5px 9px); }
.swatch.dotted { background: repeating-linear-gradient(90deg, currentColor 0 2px, transparent 2px 5px); }
.swatch.dotdash { background: repeating-linear-gradient(90deg, currentColor 0 8px, transparent 8px 11px, currentColor 11px 13px, transparent 13px 16px); }

.caption {
  font-size: 13px;
  color: var(--text-faint);
  font-style: italic;
  line-height: 1.5;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
  margin-top: 0.75rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3.5rem auto;
  width: 100px;
}

/* ---- pull stat ---- */
.pull-stat {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--accent);
  font-weight: bold;
  font-size: 17px;
}

/* ---- data table ---- */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  margin: 2rem 0;
}

table.data th, table.data td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

table.data th {
  color: var(--text-muted);
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 11px;
  border-bottom: 2px solid var(--text);
}

table.data td.num { text-align: right; }
table.data tr:last-child td { border-bottom: none; }

/* ---- methodology box (used by HN post) ---- */
.method {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  font-size: 15px;
  line-height: 1.6;
}
.method h3 {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.75rem;
}
.method ul { margin: 0; padding-left: 1.25rem; }
.method li { margin-bottom: 0.5rem; }

/* ---- footnotes ---- */
.footnotes {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}
.footnotes h3 {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 0 0 1rem;
}
.footnotes ol { padding-left: 1.5rem; margin: 0; }
.footnotes li { margin-bottom: 0.6rem; }

.disclosure {
  margin-top: 2.5rem;
  font-size: 13px;
  color: var(--text-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.6;
}

/* ---- article footer note ---- */
.footer-note {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-faint);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  line-height: 1.6;
}

/* ---- branded footer bar ---- */
.sa-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: var(--bg);
}
.sa-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--text-faint);
}
.sa-footer-inner a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: none;
}
.sa-footer-inner a:hover { color: var(--accent); }
.sa-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---- responsive ---- */
@media (max-width: 600px) {
  .container { padding: 2.5rem 1.25rem 4rem; }
  h1 { font-size: 32px; }
  .subtitle { font-size: 18px; }
  .lead { font-size: 18px; }
  h2 { font-size: 22px; }
  body { font-size: 17px; }
  .chart-wrap { height: 320px; }
  .sa-header-inner { padding: 0 1.25rem; }
}
