.artifact-shell {
  width: min(100% - 3rem, 92rem);
  margin-inline: auto;
  padding-block: clamp(2rem, 6vw, 5rem);
}

.artifact-header {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.8fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: end;
  padding-bottom: clamp(2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--ink);
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  max-width: 16ch;
  margin-bottom: 0;
  font: 700 clamp(2.2rem, 5.4vw, 5.5rem)/0.98 var(--font-display);
  letter-spacing: -0.055em;
}

.artifact-header > p {
  max-width: 38rem;
  margin-bottom: 0.25rem;
  color: var(--body-text);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
  line-height: 1.6;
}

.process-section,
.artifact-section { padding-block: clamp(3rem, 7vw, 6rem); }
.artifact-section { border-top: 1px solid var(--border); }

.section-heading {
  display: grid;
  grid-template-columns: minmax(12rem, 0.45fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: baseline;
  margin-bottom: 2rem;
}

.eyebrow {
  margin-bottom: 0;
  color: var(--accent-text);
  font: 600 0.7rem/1.3 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h2 {
  margin-bottom: 0;
  font: 700 clamp(1.65rem, 3.6vw, 3.4rem)/1.05 var(--font-display);
  letter-spacing: -0.045em;
}

.markdown-flow {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 3rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  border: 1px solid var(--border);
  background: var(--surface);
  font: 500 0.78rem/1.35 var(--font-display);
  white-space: nowrap;
}

.markdown-flow span { color: var(--accent-text); }

.process-stage + .process-stage { margin-top: 0; }

.stage-label {
  display: flex;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.8rem;
  font: 600 0.82rem/1.3 var(--font-display);
}

.stage-label span {
  display: inline-grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--surface);
  background: var(--ink);
  font-size: 0.68rem;
}

.process-scroll { width: 100%; overflow-x: auto; padding: 0.15rem 0.15rem 1rem; }

.process-track {
  display: grid;
  gap: 1.6rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.process-track--response {
  grid-template-columns: repeat(7, minmax(9.5rem, 1fr));
  min-width: 76rem;
}

.process-track--prevention {
  grid-template-columns: repeat(3, minmax(13rem, 1fr));
  min-width: 44rem;
  max-width: 58rem;
}

.process-card {
  position: relative;
  min-height: 13.5rem;
  padding: 1.05rem;
  border: 1px solid var(--ink);
  background: var(--surface);
  box-shadow: 0.35rem 0.35rem 0 var(--accent-pale);
}

.process-card:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  left: calc(100% + 0.38rem);
  color: var(--accent-text);
  font: 600 1.15rem/1 var(--font-display);
  transform: translateY(-50%);
}

.process-card--signal { border-top: 0.35rem solid var(--signal); padding-top: 0.75rem; }
.process-card--closed { color: var(--surface); background: var(--ink); }

.step {
  display: block;
  margin-bottom: 2.5rem;
  color: var(--accent-text);
  font: 600 0.68rem/1 var(--font-display);
}

.process-card--closed .step { color: var(--surface-raised); }

.process-card h3 {
  margin-bottom: 0.75rem;
  font: 700 0.95rem/1.2 var(--font-display);
  letter-spacing: -0.02em;
}

.process-card p { margin-bottom: 0; color: var(--body-text); font-size: 0.83rem; line-height: 1.5; }
.process-card--closed p { color: var(--surface-raised); }
.process-card code { font: inherit; }

.loop-note {
  display: inline-block;
  margin-top: 1rem;
  color: var(--signal);
  font: 600 0.68rem/1.35 var(--font-display);
}

.stage-connector {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0 1.25rem 1rem;
  color: var(--accent-text);
  font: 500 0.7rem/1 var(--font-display);
}

.stage-connector b { font-size: 1.2rem; }

.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--ink); }

table {
  width: 100%;
  min-width: 48rem;
  border-collapse: collapse;
  background: var(--surface);
  font: 400 0.84rem/1.5 var(--font-display);
}

th,
td { padding: 0.9rem 1rem; border: 1px solid var(--border); text-align: left; vertical-align: top; }
thead th { color: var(--surface); background: var(--ink); font-weight: 600; }
tbody th { width: 26%; font-weight: 600; }

.role-note,
.key-distinction {
  max-width: 74ch;
  margin: 1.4rem 0 0;
  color: var(--body-text);
  font: 400 0.92rem/1.65 var(--font-display);
}

.object-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.object-grid article { min-height: 12rem; padding: 1.2rem; border-top: 0.35rem solid var(--accent); background: var(--surface); }
.object-grid article > span { color: var(--accent-text); font: 600 0.68rem/1 var(--font-display); }
.object-grid h3 { margin: 2.2rem 0 0.65rem; font: 700 1.05rem/1.2 var(--font-display); }
.object-grid p { margin-bottom: 0; color: var(--body-text); font-size: 0.9rem; line-height: 1.55; }
.object-grid code,
.key-distinction code { font-family: var(--font-display); }

@media (max-width: 760px) {
  .artifact-shell { width: min(100% - 2rem, 92rem); }
  .artifact-header,
  .section-heading { grid-template-columns: 1fr; gap: 1.25rem; }
  .artifact-header > p { margin-bottom: 0; }
  .object-grid { grid-template-columns: 1fr; }
  .object-grid article { min-height: 0; }
}

@media print {
  .process-scroll { overflow: visible; }
}
