/**
 * TW-COMPOSITION-ALIGNMENT-001 — canonical composition grammar (spacing / shell / rhythm only).
 * No object surfaces, no preset logic, no palette literals.
 */

/* ── Shell width ── */
.tw-shell-narrow {
  width: 100%;
  max-width: min(40rem, 94vw);
  margin-inline: auto;
}

.tw-shell-medium {
  width: 100%;
  max-width: min(56rem, 94vw);
  margin-inline: auto;
}

.tw-shell-wide {
  width: 100%;
  max-width: min(72rem, 96vw);
  margin-inline: auto;
}

/* ── Section rhythm ── */
.tw-section-flow {
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.8vw, 30px);
}

.tw-section-tight {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.8vw, 16px);
}

.tw-section-airy {
  display: flex;
  flex-direction: column;
  gap: clamp(26px, 4vw, 44px);
}

/* ── Content stacks ── */
.tw-stack-sm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tw-stack-md {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tw-stack-lg {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* ── Page cadence (padding complements domain composition layers) ── */
.tw-page-rhythm {
  box-sizing: border-box;
}

body.tw-page-rhythm[data-tw-domain="admin"].tw-admin-ops-surface {
  padding: clamp(24px, 3vw, 32px) clamp(18px, 2.5vw, 28px);
}

body.tw-page-rhythm[data-tw-domain="admin"].tw-admin-ops-cluster {
  padding: clamp(20px, 2.5vw, 28px) clamp(16px, 2vw, 24px);
}

body.tw-page-rhythm[data-tw-domain="explorer"].tw-explorer-surface {
  padding: clamp(22px, 3vw, 32px) clamp(16px, 2.5vw, 24px);
}

/* ── Typography cadence (rhythm via shared tokens; visuals in typography_objects.css) ── */
.page-title {
  margin: 0 0 var(--tw-page-title-margin-bottom, clamp(10px, 1.8vw, 16px));
}

.section-title {
  margin: 0 0 clamp(8px, 1.4vw, 12px);
  font-size: clamp(0.92rem, 1.6vw, 1.08rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--tw-text-primary);
}

.lead-copy {
  margin: 0;
  max-width: 48ch;
  font-size: clamp(0.9375rem, 1.45vw, 1.05rem);
  line-height: 1.62;
  color: var(--tw-text-secondary);
}

.meta-copy {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--tw-text-muted);
}

/* ── Action placement zones ── */
.tw-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.tw-action-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.tw-action-quiet {
  margin-top: clamp(14px, 2.2vw, 22px);
  padding-top: clamp(12px, 1.8vw, 18px);
}
