diff --git a/_sass/base.scss b/_sass/base.scss
index c3b6698722b59e53d8d437adb75aec4f06699cc3..4e7be5dabd93fb27f0ffe65ec2da92c6a70d18c9 100644
--- a/_sass/base.scss
+++ b/_sass/base.scss
@@ -1,7 +1,7 @@
 //
 // Base element style overrides
 //
-// stylelint-disable selector-no-type, selector-max-type
+// stylelint-disable selector-no-type, selector-max-type, selector-max-specificity, selector-max-id
 
 * {
   box-sizing: border-box;
@@ -45,7 +45,8 @@ h2,
 h3,
 h4,
 h5,
-h6 {
+h6,
+#toctitle {
   margin-top: 0;
   margin-bottom: 1em;
   font-weight: 500;
diff --git a/_sass/code.scss b/_sass/code.scss
index 684a764606c6f33d344fdcc8ac4075a010991980..a479c7029b573da2581f3c664205d178430aaff7 100644
--- a/_sass/code.scss
+++ b/_sass/code.scss
@@ -38,6 +38,9 @@ a:visited code {
 //   > td.gutter.gl > pre.lineno
 //   | td.code > pre
 //
+// ----...---- (AsciiDoc)
+//   div.listingblock > div.content > pre.rouge.highlight
+//
 // fix_linenos removes the outermost pre when it encloses table.rouge-table
 //
 // See docs/index-test.md for some tests.
@@ -46,7 +49,8 @@ a:visited code {
 // Kramdown line_numbers = true: fences have a wider gutter than with Liquid?
 
 // ```[LANG]...```
-div.highlighter-rouge {
+div.highlighter-rouge,
+div.listingblock {
   padding: $sp-3;
   margin-top: 0;
   margin-bottom: $sp-3;
@@ -123,6 +127,7 @@ figure.highlight {
   border-radius: $border-radius;
 
   + .highlighter-rouge,
+  + .sectionbody .listingblock,
   + figure.highlight {
     position: relative;
     margin-top: -$sp-4;
diff --git a/_sass/content.scss b/_sass/content.scss
index b28a97ae47dc8586b5641f8174517efe29e485eb..e2ed9178b0683adf058080a4256ac1d2d7063b0a 100644
--- a/_sass/content.scss
+++ b/_sass/content.scss
@@ -3,7 +3,7 @@
 //
 // Styles for rendered markdown in the .main-content container
 //
-// stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type
+// stylelint-disable selector-no-type, max-nesting-depth, selector-max-compound-selectors, selector-max-type, selector-max-specificity, selector-max-id
 
 .main-content {
   line-height: $content-line-height;
@@ -204,19 +204,17 @@
   h3,
   h4,
   h5,
-  h6 {
+  h6,
+  #toctitle {
     position: relative;
     margin-top: 1.5em;
     margin-bottom: 0.25em;
 
-    &:first-child {
-      margin-top: $sp-2;
-    }
-
     + table,
     + .table-wrapper,
     + .code-example,
-    + .highlighter-rouge {
+    + .highlighter-rouge,
+    + .sectionbody .listingblock {
       margin-top: 1em;
     }
 
@@ -224,4 +222,18 @@
       margin-top: 0;
     }
   }
+
+  > h1:first-child,
+  > h2:first-child,
+  > h3:first-child,
+  > h4:first-child,
+  > h5:first-child,
+  > h6:first-child,
+  > .sect1:first-child > h2,
+  > .sect2:first-child > h3,
+  > .sect3:first-child > h4,
+  > .sect4:first-child > h5,
+  > .sect5:first-child > h6 {
+    margin-top: $sp-2;
+  }
 }
diff --git a/_sass/typography.scss b/_sass/typography.scss
index 103d2579cac98a32b04db5e883532c723323ccb2..101c66a33d0d836e734cc9c6513558b0a6cc302c 100644
--- a/_sass/typography.scss
+++ b/_sass/typography.scss
@@ -1,7 +1,7 @@
 //
 // Typography
 //
-// stylelint-disable primer/selector-no-utility, primer/no-override, selector-no-type, selector-max-type
+// stylelint-disable primer/selector-no-utility, primer/no-override, selector-no-type, selector-max-type, selector-max-specificity, selector-max-id
 
 h1,
 .text-alpha {
@@ -10,7 +10,8 @@ h1,
 }
 
 h2,
-.text-beta {
+.text-beta,
+#toctitle {
   @include fs-6;
 }