/* Global text styles */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  margin: 8px;
}

/* Top navigation bar */
.nav {
  position: sticky;
  top: 0;
  background: #ffffff;
  padding: 10px 20px;
  margin-top: 8px;
  margin-bottom: 18px;
  z-index: 9999;
}

.nav a {
  text-decoration: none;
  margin-right: 8px;
  padding: 2px 0;
}

/* Hover state on desktop */
.nav a:hover {
  text-decoration: underline;
}

/* Paragraph and list spacing */
.main-content p {
  margin: 0 0 7px;
}

/* Offset in-page anchor jumps so sticky nav doesn't cover section headings */
.main-content h3[id],
.main-content h4[id] {
  scroll-margin-top: 110px;
}

.main-content li {
  margin-bottom: 2px;
  line-height: 1.3;
}

.main-content h3 {
  margin: 0 0 8px;
  line-height: 1.2;
}

.main-content h3:not(:first-child) {
  margin-top: 18px;
}

.main-content h4 {
  margin: 14px 0 6px;
  line-height: 1.2;
}

.main-content ul,
.main-content ol {
  margin: 5px 0 8px 22px;
  padding: 0;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  body {
    font-size: 17px;
    line-height: 1.7;
  }

  .main-content {
    padding: 16px 18px;
  }

  .main-content li {
    margin-bottom: 10px;
  }

  /* Make tap targets larger (content only) */
  .main-content a {
    padding: 2px 0;
    display: inline-block;
  }
}

#content{
  display: block;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
  text-align: left;
}

#content .site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 14px;
  width: 100%;
  flex-wrap: nowrap;
  flex-direction: row-reverse;
}

#content .site-header img.photo {
  display: block;
  width: 220px;
  height: auto;
  flex: 0 0 auto;

  transform: rotate(3deg);
  -webkit-transform: rotate(3deg);
  -moz-transform: rotate(3deg);
}

.site-header-text {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}

.site-header-text h3 {
  margin: 0 0 8px 0;
}

.site-header-meta {
  line-height: 1.4;
}

@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .site-header-text {
    text-align: center;
  }
}

/* Kill legacy dotted rules on the nav paragraph from jeh.css */
#content p.nav {
  border-top: none;
  border-bottom: none;
}

/* 2) Section boxes */
.content-section {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 11px 14px;
  margin: 10px 0;
}

/* Lists inside boxes whitespace */
.content-section ul,
.content-section ol {
  margin-bottom: 0;
}

/* 5) Mobile padding*/
@media (max-width: 768px) {
  .main-content {
    padding: 14px 14px;
    border-radius: 8px;
  }

  .content-section {
    padding: 12px 12px;
    margin: 12px 0;
    border-radius: 8px;
  }
}

.main-content > a img {
  display: block;
  margin: 6px 0 12px;
}

.intro-links {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 10px;
}

.intro-links p {
  margin: 0 0 5px;
}
.intro-links p:last-child {
  margin-bottom: 0;
}

/* Subtle divider between header/nav and content card */
.nav::after {
  content: "";
  display: block;
  height: 1px;
  background: #e2e2e2;
  margin-top: 12px;
}

/* body background color */
body {
  background-color: #fffef4;
}

.main-content {
  max-width: 900px;
  margin: 20px auto 0;
  padding: 14px 18px;

  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);

  text-align: left;
}

.year-nav {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

/* Make the summary look like a clickable control */
.year-nav > summary {
  cursor: pointer;
  font-weight: bold;
  list-style: none; /* hide default marker in some browsers */
}

/* Hide the default triangle in WebKit so we can use our own */
.year-nav > summary::-webkit-details-marker {
  display: none;
}

/* Add a chevron */
.year-nav > summary::after {
  content: " ▾";
  font-size: 0.9em;
}

/* Flip the chevron when open */
.year-nav[open] > summary::after {
  content: " ▴";
}

/* Container for the year links */
.year-nav-links {
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Year links */
.year-nav-links a {
  text-decoration: none;
}

.year-nav-links a:hover {
  text-decoration: underline;
}

.year-nav {
  display: inline-block;
  padding: 8px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  background: #fafafa;
}

.year-nav-links {
  padding-top: 6px;
}

/* ===== Mailings (archive) density tweaks ===== */
.page-mailings h4 {
  margin: 10px 0 5px;
  line-height: 1.15;
}

.page-mailings p {
  margin: 0 0 7px;
}

.page-mailings ul,
.page-mailings ol {
  margin: 3px 0 7px 22px;
  padding: 0;
}

.page-mailings li {
  margin: 0 0 2px;
  line-height: 1.25;
}

.page-mailings h4[id] {
  scroll-margin-top: 100px;
}

/* Support CSAS button */
.support-csas{
  display: inline-block;
  margin: 8px 0 14px 0;
}

.support-csas img{
  display: block;
  width: 320px;
  height: auto;
  max-width: 100%;
}

.support-csas:hover{
  opacity: 0.92;
}

.content-section h4{
  font-size: 1.1rem;
  margin: 0 0 10px 0;
  line-height: 1.25;
  color: #0b3a5a;
}

/* Homepage: Contents box refinement */
.contents-box{
  background: #f6f8fb;
  border: 1px solid #d7dee7;
}

.contents-box h4{
  color: #23384a;
  font-size: 1.1rem;
}

.main-content > .content-section > h4{
  font-size: 1.1rem;
  color: #0b3a5a;
}