:root {
  --bg: #fbf8f6;
  --surface: #ffffff;
  --surface-2: #f4ece8;
  --text: #2a2226;
  --muted: #6b5d63;
  --border: #e6dcd7;
  --accent: #8c3b5e;
  --accent-soft: #f3dfe7;
  --bar-a: #8c3b5e;
  --bar-b: #c9a3b4;
  --shadow: 0 1px 2px rgba(42, 34, 38, .06), 0 4px 16px rgba(42, 34, 38, .05);
  --radius: 12px;
  --maxw: 860px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17131a;
    --surface: #201a23;
    --surface-2: #2a222d;
    --text: #eee6ea;
    --muted: #b3a5ac;
    --border: #3a2f3d;
    --accent: #e59bbb;
    --accent-soft: #3d2533;
    --bar-a: #e59bbb;
    --bar-b: #7d5a6b;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #17131a;
  --surface: #201a23;
  --surface-2: #2a222d;
  --text: #eee6ea;
  --muted: #b3a5ac;
  --border: #3a2f3d;
  --accent: #e59bbb;
  --accent-soft: #3d2533;
  --bar-a: #e59bbb;
  --bar-b: #7d5a6b;
  --shadow: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h2 { font-size: 1.6rem; margin: 0 0 .75rem; }
h3 { font-size: 1.15rem; margin: 1.5rem 0 .4rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); }
a:focus-visible, summary:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 56px;
}
.brand { font-family: "Fraunces", Georgia, serif; font-weight: 600; text-decoration: none; color: var(--text); }
.nav { display: flex; gap: 1.1rem; font-size: .9rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--accent); }
@media (max-width: 640px) { .nav { display: none; } }

/* Hero */
.hero { padding: 4rem 0 2.5rem; }
.eyebrow {
  display: inline-block; font-size: .78rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: .25rem .65rem; border-radius: 999px; margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin: 0 0 1rem; }
.meta { color: var(--muted); font-size: .92rem; }
.meta span + span::before { content: "·"; margin: 0 .5rem; }

/* Content */
main section { padding: 2rem 0; border-top: 1px solid var(--border); }
.abstract {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 4px solid var(--accent); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow);
}
.abstract h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .06em; }
.keywords { font-size: .9rem; color: var(--muted); margin: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow);
}
.stat strong { display: block; font-family: "Fraunces", Georgia, serif; font-size: 2.1rem; color: var(--accent); line-height: 1.1; }
.stat span { font-size: .88rem; color: var(--muted); }

figure { margin: 1.5rem 0; }
.chart {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow);
}
.bar-row { display: grid; grid-template-columns: 9.5rem 1fr 2.8rem; align-items: center; gap: .75rem; margin: .45rem 0; font-size: .9rem; }
.bar-track { background: var(--surface-2); border-radius: 6px; height: 14px; overflow: hidden; }
.bar { height: 100%; border-radius: 6px; background: var(--bar-b); }
.bar.women { background: var(--bar-a); }
.bar-row .val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
figcaption { font-size: .85rem; color: var(--muted); margin-top: .75rem; }
@media (max-width: 480px) { .bar-row { grid-template-columns: 7rem 1fr 2.6rem; font-size: .82rem; } }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1rem; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.2rem; box-shadow: var(--shadow);
}
.card h3 { margin-top: 0; }
.card p { font-size: .95rem; margin: 0; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 1rem 0; }
th, td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; }
.table-scroll { overflow-x: auto; }

.callout {
  background: var(--accent-soft); border-radius: var(--radius);
  padding: 1rem 1.25rem; font-size: .95rem; margin: 1.25rem 0;
}
.refs { padding-left: 0; list-style: none; font-size: .9rem; }
.refs li { padding-left: 2em; text-indent: -2em; margin-bottom: .6rem; }

/* Illustrations (inline SVG, theme-aware) */
.hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: center; }
.hero-art svg { width: 100%; height: auto; display: block; }
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 240px; margin: 0 auto; order: -1; }
}
.ill-soft { fill: var(--accent-soft); }
.ill-mid { fill: var(--bar-b); }
.ill-accent { fill: var(--accent); }
.ill-surface { fill: var(--surface); }
.ill-ring { fill: none; stroke: var(--accent); }
.ill-ring-2 { fill: none; stroke: var(--bar-b); }
.ill-track { fill: none; stroke: var(--border); stroke-width: 2; stroke-dasharray: 4 6; }
.diagram svg { width: 100%; max-width: 560px; height: auto; display: block; margin: 0 auto; }
.diagram .node { fill: var(--surface); stroke: var(--accent); stroke-width: 1.5; }
.diagram text { fill: var(--text); font-family: "Inter", system-ui, sans-serif; font-size: 15px; }
.diagram .center-title { font-family: "Fraunces", Georgia, serif; font-size: 24px; font-weight: 600; }
.diagram .center-sub { fill: var(--muted); font-size: 13px; }
.icon {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: .75rem;
}
.icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
main section { display: flow-root; }
.float-fig { float: right; width: 200px; margin: .25rem 0 1rem 1.5rem; }
.float-fig svg { width: 100%; height: auto; display: block; }
@media (max-width: 560px) { .float-fig { float: none; width: 170px; margin: 0 auto 1rem; } }
.photo { width: 100%; height: auto; display: block; border-radius: var(--radius); object-fit: cover; background: var(--surface-2); }
.hero-art .photo { aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.float-fig.photo-fig { width: 250px; }
.float-fig.photo-fig .photo { aspect-ratio: 2 / 3; }
@media (max-width: 720px) { .hero-art { max-width: 420px; } }
@media (max-width: 560px) { .float-fig.photo-fig { width: 100%; max-width: 340px; } }
.credits { font-size: .8rem; }

/* Footer */
.site-footer {
  margin-top: 3rem; background: var(--surface); border-top: 1px solid var(--border);
  padding: 2.5rem 0 2rem; font-size: .9rem; color: var(--muted);
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2rem; margin-bottom: 1.5rem; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--text); font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .6rem; }
.policy-links { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.policy-links a { color: var(--muted); text-decoration: none; }
.policy-links a:hover { color: var(--accent); text-decoration: underline; }
.policies details {
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); margin-bottom: .6rem;
}
.policies summary {
  cursor: pointer; padding: .75rem 1rem; font-weight: 600; color: var(--text);
}
.policies .policy-body { padding: 0 1rem 1rem; }
.policies .policy-body p, .policies .policy-body li { font-size: .88rem; }
.policies .policy-body ul { padding-left: 1.2rem; margin: 0 0 .8rem; }
.copyright { border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: 1.25rem; font-size: .82rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }

@media print {
  .site-header { position: static; }
  .policies details { break-inside: avoid; }
  body { background: #fff; color: #000; }
}

/* Home page */
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.post-card {
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 1.5rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; box-shadow: var(--shadow); color: var(--text); text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}
.post-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.post-card .photo { aspect-ratio: 1200 / 630; }
.post-card h3 { font-size: 1.35rem; margin: .25rem 0 .5rem; }
.post-card p { font-size: .95rem; }
.post-card .eyebrow { margin-bottom: .25rem; }
.read-more { color: var(--accent); font-weight: 600; font-size: .95rem; }
@media (max-width: 720px) { .post-card { grid-template-columns: 1fr; } }
.post-card + .post-card { margin-top: 1rem; }
.callout { display: flow-root; }
