.detail-body {
  background:
    radial-gradient(circle at top left, rgba(242, 207, 36, 0.08), transparent 24%),
    linear-gradient(180deg, #f8f2e8 0%, #f2ede2 100%);
}

.detail-loading {
  min-height: 70vh;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
}

.detail-hero {
  position: relative;
  min-height: 76vh;
  padding: 150px 6vw 70px;
  display: grid;
  align-items: end;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(0, 37, 43, 0.16), rgba(0, 37, 43, 0.78)),
    linear-gradient(90deg, rgba(0, 39, 46, 0.92), rgba(0, 71, 84, 0.52)),
    var(--detail-image, url("/assets/rural-hero.png")) center / cover no-repeat;
}

.detail-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .15;
  mask-image: linear-gradient(to right, #000, transparent 72%);
  pointer-events: none;
}

.detail-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 980px;
}

.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  color: rgba(255,255,255,.88);
  margin-bottom: 28px;
}

.detail-back:hover {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--forest-deep);
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.detail-title {
  margin: 22px 0 18px;
  font-family: var(--display);
  font-size: clamp(42px, 5.2vw, 82px);
  line-height: 1.04;
  letter-spacing: -.055em;
}

.detail-summary {
  max-width: 760px;
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 15px;
  line-height: 2;
}

.detail-main {
  padding: 70px 6vw 120px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 42px;
  align-items: start;
}

.detail-article {
  min-width: 0;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(16, 59, 63, 0.08);
  box-shadow: 0 30px 70px rgba(16, 59, 63, 0.08);
  backdrop-filter: blur(10px);
}

.detail-cover {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
}

.detail-content {
  padding: 40px 44px 46px;
}

.detail-prose {
  color: var(--ink);
  font-size: 15px;
  line-height: 2;
}

.detail-prose > *:first-child {
  margin-top: 0;
}

.detail-prose h2 {
  margin: 34px 0 14px;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.24;
}

.detail-prose p {
  margin: 0 0 18px;
}

.detail-prose blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--lime);
  background: rgba(18, 130, 72, 0.07);
  color: var(--forest-deep);
}

.detail-prose ul {
  margin: 0 0 22px;
  padding-left: 1.2em;
}

.detail-prose li + li {
  margin-top: 8px;
}

.detail-prose hr {
  width: 72px;
  height: 2px;
  margin: 48px auto;
  border: 0;
  background: var(--lime);
}

.detail-prose img {
  display: block;
  width: 100%;
  height: auto;
  margin: 26px 0;
  border-radius: 4px;
  border: 1px solid rgba(16, 59, 63, 0.08);
}

.project-image {
  margin: 34px auto 42px;
}

.project-image img {
  width: 100%;
  margin: 0;
}

.project-image-full {
  width: calc(100% + 88px);
  margin-left: -44px;
  margin-right: -44px;
}

.project-image-full img {
  border-left: 0;
  border-right: 0;
  border-radius: 0;
}

.project-image-wide { width: 100%; }
.project-image-medium { width: 72%; }
.project-image-small { width: 48%; }

.detail-prose .align-left { text-align: left; }
.detail-prose .align-center { text-align: center; }
.detail-prose .align-right { text-align: right; }
.detail-prose .text-size-small { font-size: 0.88em; }
.detail-prose .text-size-normal { font-size: 1em; }
.detail-prose .text-size-large { font-size: 1.16em; }
.detail-prose .text-size-xlarge { font-size: 1.34em; }
.detail-prose strong { font-weight: 800; }
.detail-prose em { font-style: italic; }
.project-image.align-left:not(.project-image-full) { margin-left: 0; margin-right: auto; }
.project-image.align-center:not(.project-image-full) { margin-left: auto; margin-right: auto; }
.project-image.align-right:not(.project-image-full) { margin-left: auto; margin-right: 0; }

.project-image figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
  text-align: center;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 34px 0 42px;
}

.project-gallery .project-image {
  width: auto;
  margin: 0;
}

.project-gallery .project-image img {
  height: 100%;
  min-height: 240px;
  object-fit: cover;
}

.detail-source {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--teal);
  font-size: 12px;
  border-bottom: 1px solid currentColor;
  padding-bottom: 4px;
}

.detail-side {
  display: grid;
  gap: 18px;
  position: sticky;
  top: 92px;
}

.detail-card {
  padding: 24px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(16, 59, 63, 0.08);
  box-shadow: 0 18px 50px rgba(16, 59, 63, 0.05);
}

.detail-card small {
  color: var(--green);
  font-size: 10px;
  letter-spacing: .16em;
}

.detail-card h3 {
  margin: 14px 0 10px;
  font-size: 24px;
}

.detail-card p,
.detail-card li {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.9;
}

.detail-card ul {
  margin: 0;
  padding-left: 18px;
}

.detail-contact {
  display: grid;
  gap: 8px;
}

.detail-contact strong {
  color: var(--ink);
  font-size: 13px;
}

.detail-contact-qr {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.detail-contact-qr img {
  width: 170px;
  max-width: 100%;
  background: #fff;
}

.detail-contact-qr span {
  color: var(--muted);
  font-size: 12px;
}

.detail-cta {
  display: inline-flex;
  justify-content: center;
  padding: 14px 18px;
  background: var(--forest-deep);
  color: #fff;
  margin-top: 22px;
}

.detail-cta:hover {
  background: var(--lime);
  color: var(--forest-deep);
}

@media (max-width: 980px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
  }
}

@media (max-width: 640px) {
  .detail-hero {
    min-height: 64vh;
    padding: 120px 22px 42px;
  }

  .detail-main {
    padding: 44px 22px 80px;
  }

  .detail-content {
    padding: 28px 22px 32px;
  }

  .project-image-full {
    width: calc(100% + 44px);
    margin-left: -22px;
    margin-right: -22px;
  }

  .project-image-medium,
  .project-image-small {
    width: 100%;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .project-gallery .project-image img {
    min-height: 0;
  }
}
