:root {
  --ink: #2b2b2b;
  --muted: #5c5c5c;
  --accent: #ca3c08;        /* rust/red accent, sampled from the original site */
  --border: #ddd0b0;
  --page-bg: #f4ecd8;       /* cream, sampled from the original site */
  --nav-bg: #f4ecd8;
  --nav-text: #2b2b2b;
  --box-unexpanded: #faf5e8;  /* lighter cream — used for every closed accordion box */
  --box-expanded: #fdfbf3;    /* even lighter cream — used for every open accordion box */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--ink);
  background: var(--page-bg);
  line-height: 1.6;
  text-wrap: pretty;   /* avoids a stranded single word on the last line of
                           any paragraph; browsers without support just wrap
                           normally, so this is safe everywhere, including
                           the narrower columns on small screens. */
}

/* Short headline-style text gets balanced lines instead, rather than
   orphan-only correction — appropriate since these rarely run long. */
.site-title,
h1.page-title, h2.page-title,
details.accordion-entry > summary,
details.accordion-outer > summary {
  text-wrap: balance;
}

.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 8px;
  top: 8px;
  background: #fff;
  padding: 6px 10px;
  z-index: 100;
}

a { color: var(--accent); text-decoration: underline; }
a:hover { color: #8f2c06; }

/* ---------- Header: colorful triangle banner ---------- */
.site-header-banner {
  background-image: url('/images/header-triangles.svg');
  background-size: cover;
  background-position: center;
  padding: 24px 30px 30px;
}
.site-title {
  color: #33322f !important;
  text-decoration: none;
  font-size: 58px;
  font-weight: bold;
  line-height: 1.1;
  display: block;
  max-width: 1200px;
  margin: 0 auto;
}
.site-subtitle {
  display: block;
  font-size: 24px;
  font-weight: normal;
  font-style: italic;
  line-height: 1.3;
  color: #4a4842;
  margin-top: 2px;
}

/* ---------- Nav: cream bar ---------- */
.site-nav {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

/* Desktop nav: plain one-line list, hidden below 701px */
.nav-desktop {
  display: none;
  max-width: 1200px;
  margin: 0 auto;
  list-style: none;
  padding: 0 24px;
  flex-wrap: nowrap;
}
.nav-desktop li { margin: 0; white-space: nowrap; }
.nav-desktop a {
  display: block;
  color: var(--nav-text);
  text-decoration: none;
  padding: 16px 12px;
  font-size: 15px;
}
.nav-desktop a:hover { text-decoration: underline; }
.nav-desktop a.current { color: var(--accent); font-style: italic; }

/* Mobile nav: separate "Menu" accordion, hidden at and above 701px */
.nav-mobile { max-width: 1200px; margin: 0 auto; display: block; }
.nav-mobile summary {
  cursor: pointer;
  padding: 14px 24px;
  font-size: 16px;
  color: var(--nav-text);
  list-style: none;
}
.nav-mobile summary::-webkit-details-marker { display: none; }
.nav-mobile summary::before { content: "\2261  "; font-weight: bold; }
.nav-mobile ul {
  list-style: none;
  margin: 0;
  padding: 0 24px 10px;
  display: flex;
  flex-direction: column;
}
.nav-mobile li { margin: 0; }
.nav-mobile a {
  display: block;
  color: var(--nav-text);
  text-decoration: none;
  padding: 10px 4px;
  font-size: 15px;
}
.nav-mobile a.current { color: var(--accent); font-style: italic; }

@media (min-width: 701px) {
  .nav-desktop { display: flex; }
  .nav-mobile { display: none; }
}

/* ---------- Main content ---------- */
.site-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 24px 60px;
}

h1.page-title, h2.page-title, p.sectionheading {
  font-size: 24px;
  font-weight: normal;
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  margin: 0 0 20px;
}

.intro-text { color: var(--muted); margin-bottom: 30px; }

/* Homepage-only photo row: the third photo gets a percentage-based left
   margin roughly matching where the column boundary falls in .home-grid
   below (1.6fr : 1fr), so it stays roughly aligned across screen widths
   without needing to duplicate the grid itself. */
.home-photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 24px;
}
.home-photo-row .section-photo {
  width: auto;         /* override the base .section-photo width:100%, which
                           was forcing each image to claim a full row and
                           wrap onto its own line instead of sitting side
                           by side */
  flex: 0 1 240px;
  max-width: 240px;
}
.home-photo-straddle {
  margin-left: calc(63% - 16px);
}
@media (max-width: 800px) {
  .home-photo-straddle { margin-left: 0; }
}
.section-photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 24px;
}
.section-photo {
  display: block;
  width: 100%;
  max-width: 460px;
  height: auto;
  border-radius: 4px;
  margin: 0;
}
.section-photo-row .section-photo {
  max-width: 260px;
  flex: 1 1 220px;
}

/* ---------- Homepage two-column layout ---------- */
.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr);
  column-gap: 40px;
  row-gap: 0;
  align-items: stretch;  /* if lengths still don't match exactly after editing,
                             the sidebar's bordered box absorbs the difference
                             cleanly rather than leaving a stray gap */
}
/* Both headings sit in row 1 and are styled identically (see .page-title
   above), so row 2 — the bio text and the What's New box — always starts
   at exactly the same point on both sides, right after the red line. */
.home-grid h1.home-heading {
  border-bottom: none;
  padding-bottom: 8px;
  margin-bottom: 0;
}
.home-heading-spacer { min-height: 0; }
.home-rule {
  grid-column: 1 / -1;
  border-bottom: 2px solid var(--accent);
  margin: 0 0 20px;
}
.home-main, .home-sidebar { margin-top: 0; }
.home-main > *:first-child { margin-top: 0; }
.home-sidebar {
  background: var(--box-unexpanded);
  border: 1px solid var(--border);
  padding: 20px 24px;
}
.sidebar-photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 0 0 14px;
}
.sidebar-title {
  font-size: 20px;
  font-style: italic;
  font-weight: normal;
  color: var(--accent);
  margin: 0 0 14px;
  border-bottom: none;
}
.home-sidebar p { font-size: 15px; }

@media (max-width: 800px) {
  .home-grid { grid-template-columns: 1fr; }
}

/* ---------- Accordions (native details/summary) ---------- */
details.accordion-outer {
  border: 1px solid var(--border);
  margin-bottom: 14px;
  background: var(--box-unexpanded);
}
details.accordion-outer[open] {
  background: var(--box-expanded);
}
details.accordion-outer > summary {
  cursor: pointer;
  padding: 12px 16px;
  font-size: 19px;
  color: var(--accent);
  list-style: none;
}
details.accordion-outer > summary::-webkit-details-marker { display: none; }
.accordion-outer-body {
  padding: 14px 16px;
}

/* Entries: the whole box (not just the text) is indented under its parent
   topic/year section, in both the open and closed state. */
details.accordion-entry {
  margin: 0 0 10px 28px;
  background: var(--box-unexpanded);
  border: 1px solid var(--border);
  scroll-margin-top: 140px;
}
details.accordion-entry[open] {
  background: var(--box-expanded);
}
details.accordion-entry > summary {
  cursor: pointer;
  padding: 10px 14px;
  color: var(--accent);
  font-size: 17px;
  list-style: none;
}
details.accordion-entry > summary::-webkit-details-marker { display: none; }

/* Plain year/section headings on Reports, Articles, and Videos pages —
   not accordions, always show their entries beneath. */
h2.year-heading {
  font-size: 20px;
  font-weight: normal;
  color: var(--ink);
  margin: 30px 0 10px;
}
.year-body { margin-bottom: 10px; }

.accordion-entry-body {
  padding: 4px 18px 18px;
}
.entry-byline {
  color: var(--accent);
  font-style: normal;
  margin: 0 0 12px;
}
.entry-byline span { display: block; }

/* The entry's prose splits into two columns on wide screens, computed at
   build time (not the browser's CSS column-balance algorithm) so both
   columns always start at exactly the same height, regardless of how many
   short or long paragraphs there are. */
.entry-body-text { max-width: 100%; }
.entry-body-text p { margin: 0 0 1em; }
.entry-body-columns { display: block; }
@media (min-width: 700px) {
  .entry-body-columns {
    display: flex;
    gap: 36px;
  }
  .entry-body-columns > div {
    flex: 1;
    min-width: 0;
  }
}

.entry-source-link { margin: 14px 0; }
.entry-topics { font-size: 14px; color: var(--muted); }
.entry-topics a { margin-right: 2px; }

/* highlight the entry that was just jumped to via a keyword link */
details.accordion-entry.flash-highlight {
  animation: flashbg 1.6s ease;
}
@keyframes flashbg {
  0% { background: #f3d9bd; }
  100% { background: var(--box-expanded); }
}

/* ---------- Contact form ---------- */
form.contact-form label { display: block; margin: 14px 0 6px; font-weight: bold; }
form.contact-form input, form.contact-form textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 15px;
  background: #fff;
}
form.contact-form button {
  margin-top: 16px;
  padding: 10px 22px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 15px;
  cursor: pointer;
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 24px 40px;
  font-size: 16px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

@media (max-width: 700px) {
  .site-title { font-size: 34px; }
  .site-subtitle { font-size: 17px; }
  details.accordion-entry { margin-left: 14px; }
}
