html:has(body.residential-editorial) { scroll-padding-top: 0; }

body.residential-editorial {
  --res-ink: #0b1729;
  --res-body: #24374b;
  --res-accent: #365570;
  --res-surface: #f1f5fa;
  --res-line: #d4dfe9;
  background: #fff;
  color: var(--res-ink);
}

.res-layout {
  width: min(calc(100% - clamp(36px, 8vw, 104px)), 960px);
  margin-inline: auto;
  padding-block: clamp(46px, 7vw, 88px) clamp(64px, 9vw, 112px);
}

.res-retrospective { min-width: 0; }
.res-retrospective :is(header, section, .res-implementation) { scroll-margin-top: 108px; }
.res-retrospective .res-reading { width: 100%; margin-inline: 0; }

.res-retrospective .res-back {
  display: inline-flex;
  margin-bottom: clamp(24px, 4vw, 42px);
  color: var(--res-accent);
  font-size: .94rem;
  text-underline-offset: .22em;
}

.res-retrospective .res-kicker {
  margin: 0 0 12px;
  color: var(--res-accent);
  font: 500 .82rem/1.45 var(--mono, monospace);
  letter-spacing: .055em;
  text-transform: uppercase;
}

.res-retrospective :is(h1, h2, h3) {
  margin: 0;
  color: var(--res-ink);
  font-family: var(--sans, sans-serif);
  font-weight: 650;
  letter-spacing: -.04em;
}

.res-retrospective h1 {
  font-size: clamp(2.5rem, 5.1vw, 4.35rem);
  line-height: 1.04;
  text-wrap: balance;
}

.res-retrospective h2 {
  font-size: clamp(1.95rem, 3.8vw, 2.8rem);
  line-height: 1.12;
  text-wrap: pretty;
}

.res-retrospective h3 {
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  line-height: 1.2;
  text-wrap: pretty;
}

.res-retrospective p {
  margin: 16px 0 0;
  color: var(--res-body);
  font-size: clamp(1.0625rem, 1.55vw, 1.1875rem);
  line-height: 1.65;
}

.res-retrospective .res-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 20px;
  margin: 22px 0 0;
  padding-block: 16px;
  border-block: 1px solid var(--res-line);
}

.res-details dt {
  margin: 0 0 4px;
  color: var(--res-accent);
  font-size: .8rem;
  font-weight: 650;
}

.res-details dd { margin: 0; font-size: .95rem; line-height: 1.45; }

.res-retrospective .res-section {
  margin-top: clamp(48px, 7vw, 72px);
  padding-top: clamp(24px, 4vw, 34px);
  border-top: 1px solid var(--res-line);
}

.res-retrospective figure { min-width: 0; margin: 24px 0 0; }
.res-retrospective .res-homepage-comparison { margin-top: 30px; }
.res-retrospective picture, .res-retrospective .res-expand { display: block; }

.res-retrospective .res-evidence img,
.res-process-video video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--res-line);
  border-radius: 6px;
  background: var(--res-surface);
}

.res-retrospective :is(a, video):focus-visible {
  outline: 2px solid var(--res-accent);
  outline-offset: 3px;
}

.res-retrospective figcaption {
  margin: 9px 0 0;
  color: var(--res-accent);
  font-size: .875rem;
  line-height: 1.55;
}

.res-retrospective figcaption a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.res-evidence-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 18px;
  margin-top: 6px;
}

.res-deliverables ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.res-deliverables li {
  padding: 28px;
  border: 1px solid var(--res-ink);
  border-radius: 4px;
  background: #fff;
}

.res-deliverable-symbol {
  display: grid;
  width: 40px;
  height: 40px;
  margin-bottom: 20px;
  place-items: center;
  border-radius: 4px;
  background: #edf3ff;
  color: #1957d1;
}

.res-deliverable-icon { width: 24px; height: 24px; }

.res-retrospective .res-deliverables li h3 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.5rem;
}

.res-retrospective .res-deliverables li p {
  margin-top: 12px;
  font-size: 1rem;
  line-height: 1.5rem;
}

@media (max-width: 760px) {
  .res-deliverables ul { grid-template-columns: minmax(0, 1fr); }
}

.res-process-step { margin-top: clamp(24px, 4vw, 38px); }
.res-process-step + .res-process-step {
  margin-top: clamp(38px, 6vw, 58px);
  padding-top: clamp(22px, 4vw, 34px);
  border-top: 1px solid var(--res-line);
}

.res-process-evidence {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 230px);
  align-items: start;
  gap: 16px;
}

.res-process-video video { max-width: 230px; }
.res-implementation { margin-top: clamp(24px, 4vw, 36px); }

.res-implementation h4 {
  margin: 0;
  color: var(--res-ink);
  font-size: 1.125rem;
  line-height: 1.4;
}

.res-retrospective .res-implementation figure {
  max-width: 568px;
  margin-top: 16px;
}

.res-retrospective .res-measure {
  margin-top: 24px;
  padding: clamp(18px, 4vw, 32px);
  border: 1px solid var(--res-line);
  border-radius: 6px;
  background: var(--res-surface);
}

.res-retrospective .res-measure p { margin: 0; }
.res-measure-value, .res-measure-label { display: block; color: var(--res-ink); }
.res-measure-value {
  font-size: clamp(3.3rem, 7vw, 5.5rem);
  font-weight: 650;
  line-height: .95;
  letter-spacing: -.07em;
}

.res-measure-label {
  margin-top: 8px;
  max-width: 37ch;
  font-size: clamp(1.125rem, 2.4vw, 1.5rem);
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.res-retrospective .res-measure small {
  display: block;
  margin-top: 10px;
  color: var(--res-accent);
  font-size: .875rem;
  line-height: 1.5;
}

.res-retrospective .case-next { margin: clamp(44px, 7vw, 76px) auto 0; }

@media (max-width: 600px) {
  .res-retrospective .res-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .res-process-evidence { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
