/* Relational Study II — publication interiors.
   Layer after relational-v1.css and relational-runtime.css. Every adapter is
   body-scoped: the homepage owns the same research module names independently.
   Satoshi, paper/ink tokens, navigation and the shared logo lockup come from
   the selected reference; this layer adds no artwork or alternate identity. */
body:is(.research-detail, .research-index) {
  --detail-margin: 220px;
  --detail-gap: clamp(40px, 5.55vw, 80px);
  --detail-measure: 790px;
  background: var(--paper);
  color: var(--ink);
}

body:is(.research-detail, .research-index) main,
body:is(.research-detail, .research-index) .page-hero,
body.research-detail .content-section,
body.research-index .research-index-section {
  background: var(--paper);
  color: var(--ink);
}

/* A single metadata margin continues from the opening into the publication. */
body:is(.research-detail, .research-index) .page-hero {
  padding: 32px 0 80px;
}
body:is(.research-detail, .research-index) .page-hero > .shell {
  display: grid;
  grid-template-columns: var(--detail-margin) minmax(0, var(--detail-measure));
  gap: 30px var(--detail-gap);
}
body:is(.research-detail, .research-index) .breadcrumbs {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 12px;
  min-width: 0;
  margin-bottom: 36px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
body:is(.research-detail, .research-index) .breadcrumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
body:is(.research-detail, .research-index) .breadcrumbs > span:last-child {
  overflow-wrap: anywhere;
}
body:is(.research-detail, .research-index) .breadcrumbs a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}
body:is(.research-detail, .research-index) .page-hero .eyebrow {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 9px 0 0;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .065em;
  color: var(--muted);
}
body:is(.research-detail, .research-index) .page-hero .signal-dot {
  flex: 0 0 4px;
  background: var(--muted);
}
body:is(.research-detail, .research-index) .page-hero h1 {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  max-width: 15ch;
  font-size: clamp(48px, 5.2vw, 76px);
  font-weight: 500;
  line-height: 1.055;
  letter-spacing: -.05em;
  text-wrap: pretty;
  overflow-wrap: break-word;
}
body:is(.research-detail, .research-index) .page-summary {
  grid-column: 2;
  grid-row: 3;
  max-width: 65ch;
  margin: 0;
  font-size: 20px;
  line-height: 1.8;
  letter-spacing: -.015em;
  color: var(--muted);
}
body.research-detail .page-meta-grid {
  grid-column: 1;
  grid-row: 3;
  display: grid;
  align-content: start;
  gap: 25px;
  margin: 5px 0 0;
  min-width: 0;
}
body.research-detail .page-meta-grid dt {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .065em;
  text-transform: uppercase;
  color: var(--muted);
}
body.research-detail .page-meta-grid dd {
  margin: 7px 0 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--ink);
}
body.research-detail .page-meta-grid > div:nth-child(2) dd {
  font-variant-numeric: tabular-nums;
}

/* Long-form text stays on paper; the rule, not alternating panels, owns each boundary. */
body.research-detail .content-section {
  padding: 0;
}
body.research-detail .content-grid {
  display: grid;
  grid-template-columns: var(--detail-margin) minmax(0, var(--detail-measure));
  gap: var(--detail-gap);
  border-top: 1px solid var(--line);
  padding-block: 56px 64px;
}
body.research-detail .content-label {
  min-width: 0;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: .065em;
  text-transform: uppercase;
  color: var(--muted);
}
body.research-detail .prose {
  min-width: 0;
  max-width: var(--detail-measure);
}
body.research-detail .prose h2 {
  max-width: 28ch;
  margin: 0 0 28px;
  font-size: clamp(32px, 3vw, 43px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.037em;
  text-wrap: pretty;
}
body.research-detail .prose p,
body.research-detail .prose li {
  font-size: 18px;
  line-height: 1.85;
  color: var(--muted);
}
body.research-detail .prose p + p {
  margin-top: 22px;
}
body.research-detail .prose ul {
  margin: 25px 0 0;
  padding-left: 1.15em;
}
body.research-detail .prose li {
  padding-left: 7px;
}
body.research-detail .prose li + li {
  margin-top: 12px;
}
body.research-detail .prose li::marker {
  color: var(--muted);
  font-size: .7em;
}
body.research-detail .prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
body.research-detail .prose a:hover {
  color: var(--ar-interactive, #546447);
  text-decoration-color: currentColor;
}
body.research-detail .page-actions {
  border-top: 1px solid var(--line);
  padding-block: 44px 80px;
  padding-left: calc(var(--detail-margin) + var(--detail-gap));
}
body.research-detail .page-actions > p {
  font-size: 20px;
  line-height: 1.6;
  letter-spacing: -.015em;
  margin-bottom: 24px;
}
body.research-detail .page-actions-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 32px;
}
body.research-detail .page-actions .button-secondary {
  color: var(--ink);
  border-color: var(--muted);
}
body.research-detail .page-actions .button-secondary:hover {
  color: var(--ar-interactive, #546447);
  border-color: currentColor;
}

/* The index is a publication list, not a grid of interchangeable feature tiles. */
body.research-index .research-index-section {
  padding: 0 0 80px;
}
body.research-index .research-groups {
  display: block;
}
body.research-index .research-group + .research-group {
  margin-top: 48px;
}
body.research-index .research-group-head {
  display: grid;
  grid-template-columns: var(--detail-margin) minmax(0, var(--detail-measure));
  gap: var(--detail-gap);
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 36px;
  margin-bottom: 36px;
}
body.research-index .research-group-head h2 {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .065em;
  text-wrap: pretty;
}
body.research-index .research-group-head > p {
  max-width: 65ch;
  font-size: 18px;
  line-height: 1.8;
  color: var(--muted);
}
body.research-index .research-module-grid {
  display: block;
}
body.research-index .research-module {
  display: grid;
  grid-template-columns: var(--detail-margin) minmax(0, var(--detail-measure));
  gap: 0 var(--detail-gap);
  align-items: start;
  min-width: 0;
  padding: 0 0 36px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
body.research-index .research-module + .research-module {
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
body.research-index .research-module .module-copy {
  display: contents;
}
body.research-index .research-module .module-meta {
  grid-column: 1;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
  margin: 5px 0 0;
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .055em;
  color: var(--muted);
}
body.research-index .research-module .state {
  font-size: 12px;
  line-height: 1.7;
  letter-spacing: .055em;
  color: var(--muted);
  white-space: normal;
}
body.research-index .research-module h3 {
  grid-column: 2;
  grid-row: 1;
  max-width: 28ch;
  margin: 0 0 20px;
  font-size: clamp(32px, 3vw, 43px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.037em;
  text-wrap: pretty;
}
body.research-index .research-module p {
  grid-column: 2;
  grid-row: 2;
  max-width: 65ch;
  margin: 0;
  font-size: 18px;
  line-height: 1.85;
  color: var(--muted);
}
body.research-index .research-module .module-link {
  grid-column: 2;
  grid-row: 3;
  justify-self: start;
  margin-top: 20px;
  min-height: 44px;
  font-size: 13px;
  color: var(--ink);
}
body.research-index .research-module .module-link:hover,
body.research-index .research-module .module-link:hover span {
  color: var(--ar-interactive, #546447);
}

/* The selected reference supplies the exact shared header/footer lockup. */
body:is(.research-detail, .research-index) .footer-meta {
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 14px 32px;
}
body:is(.research-detail, .research-index) .footer-meta a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

@media (max-width: 1180px) {
  body:is(.research-detail, .research-index) {
    --detail-margin: 180px;
    --detail-gap: 48px;
  }
}
@media (max-width: 900px) {
  body:is(.research-detail, .research-index) {
    --detail-margin: 150px;
    --detail-gap: 36px;
  }
  body:is(.research-detail, .research-index) .page-hero {
    padding-bottom: 56px;
  }
  body:is(.research-detail, .research-index) .page-hero > .shell {
    display: block;
  }
  body:is(.research-detail, .research-index) .breadcrumbs {
    margin-bottom: 28px;
  }
  body:is(.research-detail, .research-index) .page-hero .eyebrow {
    margin: 0 0 24px;
  }
  body:is(.research-detail, .research-index) .page-hero h1 {
    max-width: 19ch;
    font-size: 56px;
    margin-bottom: 26px;
  }
  body:is(.research-detail, .research-index) .page-summary {
    font-size: 18px;
  }
  body.research-detail .page-meta-grid {
    grid-template-columns: .8fr .8fr 1.4fr;
    gap: 24px;
    margin-top: 36px;
  }
  body.research-detail .content-grid {
    padding-block: 40px 48px;
  }
  body.research-detail .prose p,
  body.research-detail .prose li,
  body.research-index .research-module p,
  body.research-index .research-group-head > p {
    font-size: 17px;
  }
  body.research-detail .page-actions {
    padding-left: 0;
    padding-bottom: 56px;
  }
}
@media (max-width: 640px) {
  body:is(.research-detail, .research-index) .page-hero {
    padding: 22px 0 44px;
  }
  body:is(.research-detail, .research-index) .breadcrumbs {
    gap: 0 10px;
    margin-bottom: 28px;
  }
  body:is(.research-detail, .research-index) .page-hero h1 {
    font-size: clamp(40px, 10.4vw, 56px);
    line-height: 1.08;
    letter-spacing: -.045em;
    max-width: 100%;
  }
  body:is(.research-detail, .research-index) .page-summary {
    font-size: 17px;
    line-height: 1.8;
  }
  body.research-detail .page-meta-grid {
    grid-template-columns: 1fr 1fr;
    gap: 25px 22px;
    margin-top: 30px;
  }
  body.research-detail .page-meta-grid > div:last-child {
    grid-column: 1 / -1;
    max-width: 40ch;
  }
  body.research-detail .content-grid,
  body.research-index .research-group-head {
    display: block;
  }
  body.research-detail .content-grid {
    padding-block: 32px 40px;
  }
  body.research-detail .content-label {
    margin: 0 0 24px;
  }
  body.research-detail .prose h2,
  body.research-index .research-module h3 {
    font-size: 32px;
    line-height: 1.17;
    margin-bottom: 22px;
  }
  body.research-detail .prose p,
  body.research-detail .prose li,
  body.research-index .research-module p,
  body.research-index .research-group-head > p {
    font-size: 16px;
    line-height: 1.85;
  }
  body.research-detail .page-actions {
    padding-block: 32px 48px;
  }
  body.research-detail .page-actions-links {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }
  body.research-detail .page-actions .button-secondary {
    align-self: flex-start;
  }
  body.research-detail .page-actions .button-primary {
    justify-content: center;
    text-align: center;
  }
  body.research-index .research-index-section {
    padding-bottom: 48px;
  }
  body.research-index .research-group + .research-group {
    margin-top: 24px;
  }
  body.research-index .research-group-head {
    padding-top: 32px;
    margin-bottom: 32px;
  }
  body.research-index .research-group-head h2 {
    margin: 0 0 20px;
  }
  body.research-index .research-module {
    display: block;
    padding-bottom: 28px;
  }
  body.research-index .research-module + .research-module {
    padding-top: 32px;
  }
  body.research-index .research-module .module-meta {
    margin: 0 0 24px;
    gap: 8px;
  }
}
