/* Container, section rhythm, blueprint section headers, grids. */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding-block: var(--space-9); position: relative; }
.section--tint { background: var(--bg-tint); border-block: var(--border-w) solid var(--border); }
/* Keeps two consecutive plain sections visually separated after the reorder. */
.section--ruled { border-top: var(--border-w) solid var(--border); }

.section-head {
  display: flex; align-items: center; gap: var(--space-4);
  margin-bottom: var(--space-7); flex-wrap: wrap;
}
.section-index {
  font-family: var(--font-mono); font-size: var(--step--1);
  color: var(--accent); letter-spacing: 0.08em;
  border: var(--border-w) solid var(--border-strong);
  background: var(--accent-soft);
  border-radius: var(--radius-xs);
  padding: 0.15rem 0.55rem;
  line-height: 1.7;
  flex: none;
}
.section-head h2 { font-size: var(--step-2); font-weight: 700; line-height: 1.35; letter-spacing: -0.01em; flex: none; }
.section-rule { flex: 1 1 60px; height: 1px; background: linear-gradient(90deg, var(--border-strong), transparent); min-width: 40px; }
[dir="rtl"] .section-rule { background: linear-gradient(270deg, var(--border-strong), transparent); }
.section-note { font-size: var(--step--1); color: var(--text-faint); font-family: var(--font-mono); flex: none; }
.section-lead { max-width: 68ch; color: var(--text-muted); margin-bottom: var(--space-6); font-size: var(--step-1); line-height: 1.9; }

.grid { display: grid; gap: var(--space-4); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.prose { max-width: 68ch; }
.prose p + p { margin-top: var(--space-4); }
.prose p { color: var(--text-muted); font-size: var(--step-1); line-height: 2; }

@media (max-width: 980px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid--2, .grid--3 { grid-template-columns: minmax(0, 1fr); }
  .section-note { display: none; }
  .section-rule { min-width: 20px; }
}
