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

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

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  background-color: #fcfcfc;
  color: #1a1a1a;
  overflow-x: hidden;
}

a {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover,
a:focus-visible {
  color: #1e40af;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid #1d4ed8;
  outline-offset: 2px;
}

/* Header & Navigation */
.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.site-header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-brand {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.site-title:hover {
  color: #1d4ed8;
}

.site-tagline {
  font-size: 0.85rem;
  color: #4b5563;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
}

.site-nav a {
  display: inline-block;
  padding: 0.45rem 0.65rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: #374151;
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background-color: #eff6ff;
  color: #1d4ed8;
}

/* Main Content */
main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 2.25rem;
}

.breadcrumb {
  font-size: 0.875rem;
  color: #4b5563;
  margin-bottom: 1rem;
  word-wrap: break-word;
}

.breadcrumb a {
  color: #4b5563;
  text-decoration: none;
}

.breadcrumb a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

h1 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  line-height: 1.25;
  color: #111827;
  margin: 0 0 1rem;
  letter-spacing: -0.015em;
}

h2 {
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  line-height: 1.3;
  color: #111827;
  margin: 2rem 0 0.75rem;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.35;
  color: #1f2937;
  margin: 1.5rem 0 0.6rem;
}

p {
  margin: 0 0 1.1rem;
  font-size: 1.05rem;
}

ul,
ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
  font-size: 1.05rem;
}

li {
  margin-bottom: 0.45rem;
}

blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1.1rem;
  border-left: 3px solid #1d4ed8;
  background-color: #f8fafc;
  color: #374151;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92rem;
  background-color: #f3f4f6;
  border-radius: 4px;
}

code {
  padding: 0.15rem 0.35rem;
}

pre {
  padding: 1rem;
  overflow-x: auto;
  max-width: 100%;
}

hr {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

/* Images, Figures, and Video */
img,
video {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.25rem auto;
  border-radius: 6px;
}

img {
  border: 1px solid #e5e7eb;
}

figure {
  margin: 1.5rem auto;
  max-width: 100%;
  text-align: center;
}

figure img {
  margin: 0 auto 0.5rem;
}

figcaption,
.wp-caption-text {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.45;
  margin: 0.4rem 0 0;
}

/* Homepage Post Feed */
.home-intro {
  color: #374151;
  margin-bottom: 1.75rem;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.post-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem 1.4rem;
}

.post-card h2 {
  margin: 0 0 0.6rem;
  font-size: 1.3rem;
}

.post-card h2 a {
  color: #111827;
  text-decoration: none;
}

.post-card h2 a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.post-card p:last-child {
  margin-bottom: 0;
}

.read-more {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 600;
}

.unavailable-note {
  color: #4b5563;
  font-style: italic;
}

/* Categorized Utilities Directory & Promo Asides */
.utilities-nav {
  margin-top: 2.25rem;
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0 1.75rem;
}

.promo-card {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem 1.15rem;
}

.promo-card h2,
.promo-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.promo-card p {
  font-size: 0.95rem;
  margin: 0;
}

.promo-card img {
  margin: 0 auto;
  border: 0;
}

details {
  background-color: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  padding: 0.75rem 1rem;
}

summary {
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  list-style-position: inside;
  padding: 0.2rem 0;
}

details[open] summary {
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
}

details ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.98rem;
}

details li {
  margin-bottom: 0.35rem;
}

/* Footer */
.site-footer {
  background-color: #ffffff;
  border-top: 1px solid #e5e7eb;
  margin-top: 2rem;
}

.site-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.4rem 1.25rem;
  font-size: 0.95rem;
  color: #4b5563;
}

.site-footer-inner p {
  font-size: 0.95rem;
  margin: 0;
}

/* Mobile refinements */
@media (max-width: 640px) {
  .site-header-inner {
    padding: 0.85rem 1rem;
  }

  .site-nav {
    gap: 0.25rem;
  }

  .site-nav a {
    padding: 0.45rem 0.55rem;
    font-size: 0.9rem;
  }

  main {
    padding: 1.25rem 1rem 1.75rem;
  }

  p,
  ul,
  ol {
    font-size: 1rem;
  }

  .post-card {
    padding: 1rem;
  }
}
