/* Rivas Will — editorial stylesheet. Frozen. Hand-edit only. */

:root {
  --bg: #FAFAF7;
  --text: #1A1A1A;
  --muted: #6B6B66;
  --rule: #E4E2DC;
  --accent: #8B3A2F;
  --serif: "Source Serif 4", "Charter", Georgia, "Times New Roman", serif;
  --sans: -apple-system, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  --measure: 38rem;
}

* { box-sizing: border-box; }

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-feature-settings: "kern", "liga", "onum";
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.site-header,
main,
.site-footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
}

.brand {
  font-family: var(--serif);
  font-size: 1.3125rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.015em;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.875rem;
}

nav a:first-child { margin-left: 0; }
nav a:hover { color: var(--accent); }

main {
  padding-top: 3rem;
  padding-bottom: 4rem;
}

.article-header {
  margin-bottom: 2.5rem;
}

.kicker {
  font-family: var(--sans);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 0.75rem;
  font-weight: 600;
}

h1 {
  font-size: 2.375rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.022em;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  font-weight: 600;
  margin: 2.75rem 0 0.75rem;
  letter-spacing: -0.012em;
}

h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 0.5rem;
}

.meta {
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
  margin: 0;
}

p {
  margin: 0 0 1.25rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
a:hover { text-decoration-thickness: 2px; }

ul, ol {
  padding-left: 1.5rem;
  margin: 0 0 1.25rem;
}
li { margin-bottom: 0.5rem; }

blockquote {
  margin: 1.75rem 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--muted);
}

code {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.875em;
  background: var(--rule);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

pre {
  background: var(--rule);
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.875em;
  line-height: 1.5;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.875rem;
  margin: 1.75rem 0;
}

th, td {
  text-align: left;
  padding: 0.625rem 0.5rem;
  border-bottom: 1px solid var(--rule);
}

th {
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3rem 0;
}

.site-footer {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  padding-bottom: 3rem;
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
}

.site-footer p { margin: 0 0 0.5rem; }

/* Sources block — every published page must end with one. */
.sources {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 0.8125rem;
  color: var(--muted);
}

.sources h2 {
  font-family: var(--sans);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.sources ul {
  list-style: none;
  padding: 0;
}

.sources li {
  margin-bottom: 0.625rem;
  line-height: 1.5;
}
