/* ─────────────────────────────────────────────────────────
   QUALITY CONTROL — methodology page using editorial layout
   Reuses rl- system from Research Lifecycle for consistency
   ───────────────────────────────────────────────────────── */

/* ─── Hero ─── */
.qc-hero {
  padding-top: clamp(140px, 16vw, 200px);
  padding-bottom: clamp(56px, 8vw, 80px);
}
.qc-hero .container {
  max-width: 780px;
}
.qc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin-bottom: 28px;
}
.qc-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.qc-hero__title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(2.8rem, 5vw + 1rem, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.qc-hero__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.qc-lead {
  margin-top: clamp(24px, 3vw, 36px);
  font-size: clamp(1.05rem, 0.6vw + 0.85rem, 1.2rem);
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 64ch;
}
.qc-lead em {
  font-family: var(--font-serif);
  color: var(--ink);
}

/* ─── Section primitives ─── */
.qc-section {
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid var(--rule);
}
.qc-section .container {
  max-width: 960px;
}
.qc-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin-bottom: 20px;
}
.qc-section h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.6rem, 2vw + 0.6rem, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.qc-section h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.qc-intro {
  margin-top: clamp(16px, 2vw, 24px);
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.65;
  max-width: 60ch;
}

/* ─── 3-principle cards ─── */
.qc-principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
  margin-top: clamp(32px, 4vw, 48px);
}
.qc-principle-card {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--rule);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 300ms var(--ease-out-strong);
}
.qc-principle-card:hover {
  border-color: var(--accent);
}
.qc-principle-card__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.qc-principle-card p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ─── Phase rows (numbered, no price) ─── */
.qc-rows {
  margin-top: clamp(28px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 0;
}
.qc-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 20px;
  align-items: baseline;
  padding: clamp(16px, 2vw, 22px) 0;
  border-bottom: 1px solid var(--rule);
}
.qc-row:first-child {
  border-top: 1px solid var(--rule);
}
.qc-row__num {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
}
.qc-row__name {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.qc-row__sub {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-top: 2px;
}

/* ─── 3-column cards (verification, bias) ─── */
.qc-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
  margin-top: clamp(32px, 4vw, 48px);
}
.qc-card {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--rule);
  background: var(--paper-deeper);
}
.qc-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 10px;
}
.qc-card p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ─── 4-column tier cards (evidence hierarchy) ─── */
.qc-tier-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 20px);
  margin-top: clamp(32px, 4vw, 48px);
}
.qc-tier {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--rule);
  background: var(--paper);
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 3px solid var(--accent);
}
.qc-tier__label {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.qc-tier h4 {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 0.8vw + 0.7rem, 1.15rem);
  color: var(--ink);
  line-height: 1.3;
}
.qc-tier p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* Tier accent colors */
.qc-tier--t1 { border-top-color: oklch(0.870 0.180 130); } /* green */
.qc-tier--t1 .qc-tier__label { color: oklch(0.500 0.150 130); }
.qc-tier--t2 { border-top-color: var(--accent); }
.qc-tier--t3 { border-top-color: oklch(0.700 0.180 35); } /* amber */
.qc-tier--t3 .qc-tier__label { color: oklch(0.550 0.150 35); }
.qc-tier--t4 { border-top-color: var(--ink-mute); }
.qc-tier--t4 .qc-tier__label { color: var(--ink-mute); }

/* ─── Confidence cards ─── */
.qc-confidence-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(16px, 2vw, 24px);
  margin-top: clamp(32px, 4vw, 48px);
}
.qc-confidence {
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--rule);
  background: var(--paper);
  border-top: 3px solid var(--ink-mute);
}
.qc-confidence__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.qc-confidence p {
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.6;
}
.qc-confidence--high { border-top-color: oklch(0.870 0.180 130); }
.qc-confidence--high .qc-confidence__label { color: oklch(0.500 0.150 130); }
.qc-confidence--medium { border-top-color: oklch(0.700 0.180 35); }
.qc-confidence--medium .qc-confidence__label { color: oklch(0.550 0.150 35); }
.qc-confidence--low { border-top-color: oklch(0.600 0.100 15); }
.qc-confidence--low .qc-confidence__label { color: oklch(0.500 0.100 15); }

.qc-callout {
  margin-top: clamp(24px, 3vw, 36px);
  padding: 20px 28px;
  border-left: 3px solid var(--rule);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 60ch;
}

/* ─── 4-column deliverable cards ─── */
.qc-deliverable-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(12px, 2vw, 20px);
  margin-top: clamp(32px, 4vw, 48px);
}
.qc-deliverable {
  padding: clamp(20px, 3vw, 28px);
  border: 1px solid var(--rule);
  background: var(--paper-deeper);
}
.qc-deliverable h4 {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 0.8vw + 0.7rem, 1.15rem);
  color: var(--ink);
  line-height: 1.3;
  margin-bottom: 8px;
}
.qc-deliverable p {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ─── Closing ─── */
.qc-closing {
  padding: clamp(56px, 8vw, 96px) 0;
  border-top: 1px solid var(--rule);
  text-align: center;
}
.qc-closing .container {
  max-width: 580px;
}
.qc-closing h2 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.6rem, 2vw + 0.6rem, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.qc-closing h2 em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
}
.qc-closing p {
  margin-top: 20px;
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.65;
}
.qc-closing-cta {
  margin-top: 32px;
}
.qc-closing-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.qc-closing-links a {
  color: var(--ink-mute);
  text-decoration: none;
  transition: color 200ms;
}
.qc-closing-links a:hover {
  color: var(--accent);
}

/* ─── Dark mode ─── */
html.dark .qc-principle-card {
  border-color: oklch(1 0 0 / 0.08);
  background: oklch(0.10 0.02 260);
}
html.dark .qc-card {
  border-color: oklch(1 0 0 / 0.08);
  background: oklch(0.10 0.02 260);
}
html.dark .qc-tier {
  border-color: oklch(1 0 0 / 0.08);
  background: oklch(0.12 0.02 260);
}
html.dark .qc-confidence {
  border-color: oklch(1 0 0 / 0.08);
  background: oklch(0.12 0.02 260);
}
html.dark .qc-deliverable {
  border-color: oklch(1 0 0 / 0.08);
  background: oklch(0.10 0.02 260);
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .qc-principles,
  .qc-card-grid,
  .qc-confidence-grid { grid-template-columns: 1fr 1fr; }
  .qc-tier-grid,
  .qc-deliverable-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .qc-principles,
  .qc-card-grid,
  .qc-confidence-grid,
  .qc-tier-grid,
  .qc-deliverable-grid { grid-template-columns: 1fr; }
}
