/* Site-level additions layered over Simple.css. */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border, #d8dee4);
}

.site-brand {
  color: var(--text, #212121);
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
}

.site-brand:hover,
.site-brand:focus-visible {
  text-decoration: underline;
}

.site-header .site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  margin: 0 0 0 auto;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border: 0;
  border-radius: 0.35rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a:focus {
  background: #eef2f5;
  text-decoration: underline;
}

.site-intro {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #d8dee4;
  border-left: 0.3rem solid #6b7280;
  border-radius: 0.4rem;
  background: #f7f9fa;
}

.site-intro p {
  margin: 0.55rem 0;
}

.site-intro p:first-child {
  margin-top: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.site-intro p:nth-child(2) {
  font-size: 1.05rem;
  font-weight: 500;
}

.site-intro p:nth-child(3) {
  margin-bottom: 1rem;
  color: #4b5563;
  font-style: italic;
}

.site-intro p:nth-child(4),
.site-intro p:nth-child(5) {
  color: #4b5563;
  font-size: 0.95rem;
}

/* Article metadata stays secondary; navigable links remain distinct. */
p.article-meta {
  color: var(--text-light, #585858);
  font-size: 0.85rem;
  line-height: 1.8;
}

li > p:has(+ p.article-meta) {
  margin-bottom: 0;
}

li > p.article-meta {
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
}

p.article-meta a {
  color: var(--accent, #0d47a1);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

p.article-meta code {
  color: inherit;
  font-size: 0.95em;
}

/* Org's generated publishing information acts as the page footer. */
#postamble {
  clear: both;
  margin-top: 3rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border, #d8dee4);
  color: var(--text-light, #585858);
  font-size: 0.8rem;
  text-align: center;
}

#postamble p {
  margin: 0;
}

#postamble a {
  color: #466b8a;
  text-decoration: none;
}

#postamble a:hover,
#postamble a:focus-visible {
  text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
  #postamble a {
    color: #9bbbd5;
  }

  .site-nav a:hover,
  .site-nav a:focus {
    background: #374151;
  }

  .site-intro {
    border-color: #4b5563;
    border-left-color: #9ca3af;
    background: #1f2937;
  }

  .site-intro p:nth-child(3),
  .site-intro p:nth-child(4),
  .site-intro p:nth-child(5) {
    color: #d1d5db;
  }
}

@media (max-width: 600px) {
  .site-header .site-nav {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }
}
