.detail-main {
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 40px) 20px 80px;
}

.detail-back {
  display: inline-block;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 32px;
}

.detail-back:hover {
  text-decoration: underline;
}

.detail-header {
  padding-bottom: 32px;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.detail-title {
  font-family: var(--font-heading);
  font-size: clamp(30px, 6vw, 40px);
  font-weight: 700;
  margin: 12px 0 12px;
}

.detail-summary {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Status / Role / Stack row */
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  margin: 24px 0 28px;
}

.detail-meta dt {
  font-family: var(--font-accent);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 400;
}

.detail-meta dd {
  font-size: 14px;
  margin: 2px 0 0;
}

.detail-section {
  margin-bottom: 48px;
}

.detail-section h2 {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 14px;
}

.detail-section h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.detail-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.detail-code {
  background: var(--text-primary);
  color: var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  font-size: 13px;
  line-height: 1.6;
  overflow-x: auto; /* long lines scroll inside the block, not the page */
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.detail-gallery figure {
  margin: 0;
}

.detail-gallery img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.detail-gallery figcaption {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.detail-list {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
  padding-left: 20px;
}
 
.detail-list li + li {
  margin-top: 4px;
}

/* Wide UI screenshots: one per row so the text stays readable */
.detail-gallery--stack {
  grid-template-columns: 1fr;
}