:root {
  --ink: #17222d;
  --muted: #56636c;
  --paper: #fffdf9;
  --cream: #fde9da;
  --orange: #e77942;
  --blue: #c95f30;
  --line: rgba(23, 34, 45, 0.2);
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); line-height: 1.5; }
a { color: inherit; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: white; padding: .7rem 1rem; z-index: 5; }
.skip-link:focus { top: 1rem; }
.sr-only { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

.site-header { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 72px; padding: 0 5vw; background: rgba(246, 242, 233, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.wordmark { display: flex; align-items: center; gap: .65rem; font-weight: 760; font-size: 1.05rem; text-decoration: none; letter-spacing: -.02em; }
.wordmark em { font-family: var(--serif); font-weight: 400; }
.wordmark-mark { width: 14px; height: 14px; background: var(--orange); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.site-nav { display: flex; gap: clamp(.55rem, 1.2vw, 1.2rem); font-size: .78rem; font-weight: 650; }
.site-nav a { text-decoration: none; border-bottom: 2px solid transparent; padding: .4rem 0; }
.site-nav a:hover, .site-nav a:focus-visible { border-color: var(--orange); }
.site-nav a[aria-current="page"] { border-color: var(--orange); }
.menu-button { display: none; color: var(--ink); border: 1px solid var(--ink); background: transparent; padding: .45rem .65rem; }

.hero { min-height: min(780px, calc(100vh - 72px)); display: flex; overflow: hidden; }
.hero-content { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; padding: 9vw 8vw 10vw; text-align: center; }
.eyebrow, .kicker, .section-label { color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { max-width: 980px; margin: .5rem 0 1.5rem; font-family: var(--serif); font-size: clamp(3rem, 6.2vw, 6.4rem); line-height: .98; font-weight: 400; letter-spacing: -.055em; }
.hero h1 span { color: var(--orange); font-style: normal; }
.hero-dek { max-width: 650px; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); }
.text-link { margin-top: 2rem; width: max-content; font-weight: 750; text-decoration: none; border-bottom: 2px solid var(--orange); padding-bottom: .3rem; }
.text-link:hover { color: var(--orange); }
main { position: relative; overflow: hidden; background: radial-gradient(circle at 76% 10%, rgba(255,253,249,.92) 0 5%, rgba(255,253,249,.38) 16%, transparent 33%), linear-gradient(135deg, #f8d9c3 0%, #fffaf3 43%, #f2b38c 100%); }
main::before, main::after { position: absolute; z-index: 0; content: ""; width: 145%; left: -28%; border-radius: 50% 50% 0 0 / 40% 40% 0 0; pointer-events: none; }
main::before { top: 14%; height: 42%; transform: rotate(-8deg); background: linear-gradient(135deg, rgba(255,253,249,.64), rgba(249,201,166,.46)); box-shadow: 0 -14px 0 rgba(255,253,249,.2), 0 -30px 0 rgba(249,208,179,.22); }
main::after { top: 55%; height: 38%; transform: rotate(7deg); background: linear-gradient(135deg, rgba(231,121,66,.14), rgba(255,253,249,.62)); }
.hero, .story-section, .visualization-preview { position: relative; z-index: 1; }

.story-section { display: grid; grid-template-columns: minmax(130px, .35fr) minmax(0, 1.65fr); gap: clamp(2rem, 6vw, 9rem); padding: clamp(4.5rem, 9vw, 9rem) 5vw; border-top: 1px solid var(--line); background: rgba(255,253,249,.66); }
.section-label { padding-top: .6rem; }
.section-content { max-width: 960px; }
h2 { margin: .3rem 0 2.5rem; max-width: 820px; font-family: var(--serif); font-size: clamp(2.5rem, 5vw, 5.3rem); line-height: .96; font-weight: 400; letter-spacing: -.06em; }
.two-column-copy { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 6vw, 7rem); max-width: 850px; color: var(--muted); font-size: 1.05rem; }
.two-column-copy p { margin: 0; }
.question-section { background: rgba(248,201,167,.78); color: var(--ink); }
.question-section .section-label, .question-section .kicker { color: #a83f1f; }
.question-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(23,34,45,.3); }
.question-list li { display: grid; grid-template-columns: 74px 1fr; align-items: baseline; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid rgba(23,34,45,.3); }
.question-list span { color: #a83f1f; font-size: .75rem; font-weight: 800; letter-spacing: .1em; }
.question-list p { margin: 0; font-family: var(--serif); font-size: clamp(1.45rem, 2.5vw, 2.4rem); line-height: 1.1; }
.method-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.method-grid article { min-height: 240px; padding: 1.5rem; background: var(--paper); }
.method-number { margin: 0 0 3rem; color: var(--orange); font-family: var(--serif); font-size: 2rem; font-style: italic; }
.method-grid h3 { margin: 0 0 .65rem; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; }
.method-grid p:last-child { color: var(--muted); font-size: .94rem; }

.visualization-preview { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 4rem; padding: clamp(4.5rem, 9vw, 9rem) max(5vw, calc((100vw - 1300px)/2)); background: rgba(253,233,218,.78); }
.visualization-preview h2 { margin-bottom: 1rem; }
.visualization-preview > div > p:last-child { max-width: 390px; color: var(--muted); }
.visual-frame { position: relative; min-height: 350px; overflow: hidden; border: 1px solid var(--ink); background: #e2d8c8; }
.frame-label { position: absolute; top: 1.1rem; left: 1.1rem; font-size: .65rem; font-weight: 800; letter-spacing: .12em; }
.frame-axis { position: absolute; left: 12%; right: 10%; bottom: 20%; height: 1px; background: var(--ink); }
.frame-axis::before { position: absolute; content: ""; width: 1px; height: 66%; bottom: 0; background: var(--ink); }
.frame-circles { display: flex; align-items: end; gap: 7%; position: absolute; left: 20%; right: 14%; bottom: 20%; height: 60%; }
.frame-circles i { display: block; width: 22%; border-radius: 50%; background: var(--blue); }
.frame-circles i:nth-child(1) { aspect-ratio: 1; } .frame-circles i:nth-child(2) { aspect-ratio: 1; background: var(--orange); transform: translateY(-55%); } .frame-circles i:nth-child(3) { aspect-ratio: 1; transform: translateY(-20%); } .frame-circles i:nth-child(4) { aspect-ratio: 1; background: var(--orange); transform: translateY(-100%); }
.frame-rule { position: absolute; width: 130%; height: 2px; left: -15%; top: 51%; background: var(--ink); transform: rotate(-24deg); opacity: .8; }
.source-intro { max-width: 720px; color: var(--muted); font-size: 1.05rem; }
.source-list { margin: 2.5rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.source-list li { display: grid; grid-template-columns: 1fr 1fr; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.source-list li span:first-child { font-weight: 750; }
.source-list li span:last-child { color: var(--muted); }
.site-footer { display: grid; grid-template-columns: 1fr 1fr auto; gap: 2rem; padding: 2.5rem 5vw; color: var(--paper); background: var(--ink); font-size: .85rem; }
.site-footer p { margin: 0; color: rgba(246,242,233,.7); } .site-footer strong { color: var(--paper); } .back-to-top { color: var(--paper); font-weight: 750; text-decoration: none; }
.inner-page { min-height: calc(100vh - 72px); }
.page-hero { padding: clamp(5rem, 12vw, 10rem) max(5vw, calc((100vw - 1300px)/2)) clamp(3.5rem, 7vw, 6rem); background: var(--cream); border-bottom: 1px solid var(--line); }
.page-hero h1 { max-width: 900px; margin: .4rem 0 1.25rem; font-family: var(--serif); font-size: clamp(3.5rem, 8vw, 7rem); line-height: .9; font-weight: 400; letter-spacing: -.07em; }
.page-hero > p:last-child { max-width: 650px; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.25rem); }
.page-content { max-width: 1100px; padding: clamp(4.5rem, 9vw, 8rem) max(5vw, calc((100vw - 1300px)/2)); }
.page-content .question-list { color: var(--ink); border-color: var(--line); }
.page-content .question-list li { border-color: var(--line); }
.page-content .question-list span { color: var(--orange); }
.topic-section { padding: clamp(3.5rem, 7vw, 6.5rem) max(5vw, calc((100vw - 1100px)/2)); border-top: 1px solid var(--line); background: rgba(255,253,249,.66); }
.topic-section h2 { margin-bottom: 1.25rem; font-size: clamp(2.2rem, 4.5vw, 4.4rem); }
.topic-section > p { max-width: 760px; color: var(--muted); font-size: 1.04rem; }
.topic-section + .topic-section { background: rgba(253,233,218,.64); }
.data-table { width: 100%; max-width: 850px; margin: 1.75rem 0 0; border-collapse: collapse; font-size: .96rem; }
.data-table th, .data-table td { padding: .85rem 1rem; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { color: var(--blue); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.data-table td:last-child, .data-table th:last-child { text-align: right; }
.source-ref { color: var(--blue); font-size: .72em; font-weight: 800; text-decoration: none; vertical-align: super; }
.source-ref:hover, .source-ref:focus-visible { color: var(--orange); text-decoration: underline; }
.citation-dialog { width: min(560px, calc(100vw - 2rem)); border: 1px solid var(--line); border-radius: 14px; padding: 1.75rem; color: var(--ink); background: var(--paper); box-shadow: 0 1.5rem 4rem rgba(23,34,45,.24); }
.citation-dialog::backdrop { background: rgba(23,34,45,.48); }
.citation-dialog form { position: absolute; top: .75rem; right: .75rem; }
.citation-close { width: 2rem; height: 2rem; border: 0; border-radius: 50%; color: var(--ink); background: var(--cream); font-size: 1.35rem; line-height: 1; cursor: pointer; }
.citation-label { margin: 0 2rem .8rem 0; color: var(--blue); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.citation-text { margin: 0; font-family: var(--serif); font-size: 1.1rem; line-height: 1.55; }
.citation-source-link { display: inline-block; margin-top: 1rem; color: var(--blue); font-weight: 750; }
.source-category { margin: 3rem 0 .75rem; color: var(--blue); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
.topic-note { max-width: 850px; margin: 1.4rem 0 0; padding: 1rem 1.15rem; border-left: 3px solid var(--orange); background: rgba(255,253,249,.7); color: var(--muted); }
.sources-catalog { max-width: 1100px; padding: 0 max(5vw, calc((100vw - 1300px)/2)) clamp(5rem, 9vw, 8rem); }
.source-entry { max-width: 900px; padding: 1.35rem 0; border-top: 1px solid var(--line); }
.source-entry:last-child { border-bottom: 1px solid var(--line); }
.source-entry p { margin: .35rem 0 0; color: var(--muted); }
.source-entry a { color: var(--blue); }

/* Each research page keeps the shared palette while using a calm, distinct texture. */
.inner-page { --page-tint: rgba(253, 233, 218, .42); --page-pattern: none; --page-wave: rgba(231, 121, 66, .08); }
.inner-page { background: var(--page-pattern), linear-gradient(140deg, #fffdf9 0%, var(--page-tint) 52%, #fffdf9 100%); }
.inner-page::before { opacity: .34; background: linear-gradient(135deg, rgba(255,253,249,.82), var(--page-wave)); }
.inner-page::after { opacity: .26; background: linear-gradient(135deg, var(--page-wave), rgba(255,253,249,.84)); }
.inner-page .page-hero { background: rgba(255, 253, 249, .74); }
.inner-page .page-content { background: rgba(255, 253, 249, .62); }
.inner-page .topic-section { background: rgba(255, 253, 249, .78); }
.inner-page .topic-section + .topic-section { background: rgba(255, 247, 241, .78); }

.page-questions .inner-page { --page-tint: rgba(253, 213, 187, .42); --page-wave: rgba(231, 121, 66, .12); --page-pattern: linear-gradient(30deg, transparent 46%, rgba(231,121,66,.06) 47% 48%, transparent 49%) 0 0 / 42px 36px, linear-gradient(150deg, transparent 46%, rgba(231,121,66,.06) 47% 48%, transparent 49%) 0 0 / 42px 36px, linear-gradient(90deg, transparent 46%, rgba(231,121,66,.045) 47% 48%, transparent 49%) 0 0 / 42px 36px; }
.page-questions .inner-page::before { transform: rotate(-4deg); }
.page-questions .inner-page::after { top: 62%; transform: rotate(3deg); }

.page-education .inner-page { --page-tint: rgba(253, 229, 212, .45); --page-wave: rgba(231, 121, 66, .09); --page-pattern: repeating-linear-gradient(0deg, transparent 0 39px, rgba(231,121,66,.045) 40px); }
.page-education .inner-page::before { top: 22%; transform: rotate(-5deg); }
.page-education .inner-page::after { top: 63%; transform: rotate(4deg); }

.page-neighborhood .inner-page { --page-tint: rgba(249, 219, 197, .44); --page-wave: rgba(201, 95, 48, .10); --page-pattern: radial-gradient(ellipse at 86% 12%, transparent 0 18%, rgba(231,121,66,.07) 18.3% 18.6%, transparent 18.9% 28%, rgba(231,121,66,.05) 28.3% 28.6%, transparent 28.9%); }
.page-neighborhood .inner-page::before { top: 18%; transform: rotate(-10deg); }
.page-neighborhood .inner-page::after { top: 57%; transform: rotate(8deg); }

.page-employment .inner-page { --page-tint: rgba(254, 225, 202, .46); --page-wave: rgba(231, 121, 66, .10); --page-pattern: linear-gradient(90deg, rgba(231,121,66,.045) 1px, transparent 1px) 0 0 / 42px 42px, linear-gradient(0deg, rgba(231,121,66,.045) 1px, transparent 1px) 0 0 / 42px 42px; }
.page-employment .inner-page::before { top: 12%; transform: rotate(-6deg); }
.page-employment .inner-page::after { top: 61%; transform: rotate(5deg); }

.page-racial-statistics .inner-page { --page-tint: rgba(249, 217, 196, .46); --page-wave: rgba(201, 95, 48, .10); --page-pattern: linear-gradient(30deg, transparent 46%, rgba(201,95,48,.055) 47% 48%, transparent 49%) 0 0 / 52px 45px, linear-gradient(150deg, transparent 46%, rgba(201,95,48,.055) 47% 48%, transparent 49%) 0 0 / 52px 45px, linear-gradient(90deg, transparent 46%, rgba(201,95,48,.04) 47% 48%, transparent 49%) 0 0 / 52px 45px; }
.page-racial-statistics .inner-page::before { top: 17%; transform: rotate(-9deg); }
.page-racial-statistics .inner-page::after { top: 60%; transform: rotate(6deg); }

.page-sources .inner-page { --page-tint: rgba(253, 233, 218, .34); --page-wave: rgba(231, 121, 66, .06); --page-pattern: radial-gradient(rgba(231,121,66,.07) .7px, transparent .8px) 0 0 / 16px 16px; }
.page-sources .inner-page::before { opacity: .20; transform: rotate(-4deg); }
.page-sources .inner-page::after { opacity: .17; transform: rotate(4deg); }
.page-sources .sources-catalog { position: relative; z-index: 1; background: rgba(255, 253, 249, .65); }

@media (max-width: 1120px) {
  .site-header { min-height: 62px; padding: 0 1.25rem; }
  .menu-button { display: block; }
  .site-nav { display: none; position: absolute; top: 61px; left: 0; right: 0; flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: .8rem 0; }
}

@media (max-width: 760px) {
  .site-header { min-height: 62px; padding: 0 1.25rem; } .menu-button { display: block; }
  .site-nav { display: none; position: absolute; top: 61px; left: 0; right: 0; flex-direction: column; gap: 0; padding: .5rem 1.25rem 1rem; background: var(--paper); border-bottom: 1px solid var(--line); } .site-nav.is-open { display: flex; } .site-nav a { padding: .8rem 0; }
  .hero { min-height: auto; } .hero-content { padding: 5rem 1.25rem 4rem; }
  .story-section { grid-template-columns: 1fr; gap: 1.25rem; padding: 4.5rem 1.25rem; } .two-column-copy, .method-grid, .visualization-preview { grid-template-columns: 1fr; }
  .visualization-preview { gap: 2.5rem; padding: 4.5rem 1.25rem; } .visual-frame { min-height: 270px; } .method-grid article { min-height: 0; } .method-number { margin-bottom: 1rem; }
  .site-footer { grid-template-columns: 1fr; gap: 1rem; padding: 2.5rem 1.25rem; } .source-list li { grid-template-columns: 1fr; gap: .25rem; }
  .page-hero, .page-content { padding-left: 1.25rem; padding-right: 1.25rem; }
  .topic-section, .sources-catalog { padding-left: 1.25rem; padding-right: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
