/* Red Line Strategy: shared stylesheet. System fonts only; no external requests. */

:root {
  --bg: #FAFAF7;
  --text: #1F2328;
  --muted: #5B616B;
  --rule: #D9D9D3;
  --accent: #8B1E1E;
  --font-serif: "Iowan Old Style", "Charter", "Georgia", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --column: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171A;
    --text: #E6E6E1;
    --muted: #A3A8AF;
    --rule: #33373D;
    --accent: #D98A8A;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: calc(var(--column) + 2.5rem);
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Links */

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--rule);
}

.skip-link:focus {
  top: 1rem;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
  padding-top: 1.5rem;
  padding-bottom: 1.25rem;
}

.wordmark {
  display: block;
  line-height: 0;
  text-decoration: none;
}

.wordmark svg {
  display: block;
  width: 11rem;
  height: auto;
}

.wordmark .wm-text {
  fill: var(--text);
}

.wordmark .wm-line {
  stroke: var(--accent);
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  font-size: 0.9375rem;
}

/* Navigation links use the body color so the underline can mark the current page. */
.site-nav a {
  color: var(--text);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

/* Page body */

main .wrap {
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}

h1,
h2,
h3 {
  font-family: var(--font-serif);
  color: var(--text);
  line-height: 1.25;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 3rem 0 0.75rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.75rem 0 0.35rem;
}

p {
  margin: 0 0 1rem;
}

.subtitle {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  line-height: 1.4;
  margin: 0 0 2rem;
}

.lead {
  font-size: 1.1875rem;
  line-height: 1.55;
  margin-bottom: 1.5rem;
}

.effective {
  color: var(--muted);
  margin-bottom: 1.25rem;
}

/* Research diagram */

.diagram {
  margin: 2.5rem 0 2.75rem;
}

.diagram svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram .dg-v {
  max-width: 320px;
  margin: 0 auto;
}

.dg-box {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.25;
}

.dg-box.dg-accent {
  stroke: var(--accent);
  stroke-width: 2;
}

.dg-label {
  fill: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
}

.dg-arrow {
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.25;
}

.dg-head {
  fill: var(--muted);
}

@media (max-width: 559px) {
  .diagram .dg-h {
    display: none;
  }

  .diagram .dg-v[hidden] {
    display: block;
  }
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--rule);
}

.site-footer .wrap {
  padding-top: 1.25rem;
  padding-bottom: 2rem;
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}
