/* Markdown/Prose specific styles - Only affects .prose containers */

/* Base typography - Premium reading experience */
.prose {
  --md-text: #c9d1d9;
  --md-heading: #f0f6fc;
  --md-muted: #8b949e;
  --md-border: rgba(139, 148, 158, 0.22);
  --md-surface: #161b22;
  --md-surface-raised: #1c2128;
  --md-accent: #58a6ff;
  font-size: 1rem !important;
  line-height: 1.7;
  letter-spacing: -0.004em;
  color: var(--md-text);
  max-width: none !important;
  text-rendering: optimizeLegibility;
}

.prose > :first-child {
  margin-top: 0 !important;
}
.prose > :last-child {
  margin-bottom: 0 !important;
}

/* Let every Markdown element use the full article content width. */
.prose
  :where(p, ul, ol, blockquote, h1, h2, h3, h4, h5, h6):not(
    :where(.not-prose, .not-prose *)
  ) {
  width: 100%;
  max-width: none;
}

/* Paragraphs - Perfect readability */
.prose :where(p):not(:where(.not-prose, .not-prose *)) {
  font-size: 1em;
  line-height: 1.85;
  margin-top: 0;
  margin-bottom: 1.05em;
  color: var(--md-text);
  text-align: left;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
}

/* Justify text on medium screens and larger (tablets and desktops) for better readability */
@media (min-width: 768px) {
  .prose :where(p):not(:where(.not-prose, .not-prose *)) {
    text-align: justify;
    text-align-last: left;
  }
}

/* Headings - Clean hierarchy with visual breathing room */
.prose :where(h1):not(:where(.not-prose, .not-prose *)) {
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 0;
  margin-bottom: 0.55em;
  padding-bottom: 0 !important;
  border-bottom: none !important;
  color: var(--md-heading);
  text-wrap: balance;
}

.prose :where(h2):not(:where(.not-prose, .not-prose *)) {
  font-size: 1.7rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
  padding-bottom: 0 !important;
  border-bottom: none !important;
  color: var(--md-heading);
  text-wrap: balance;
}

.prose :where(h3):not(:where(.not-prose, .not-prose *)) {
  font-size: 1.3rem;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 1.5em;
  margin-bottom: 0.55em;
  padding-bottom: 0 !important;
  border-bottom: none !important;
  color: var(--md-heading);
  text-wrap: balance;
}

.prose :where(h4):not(:where(.not-prose, .not-prose *)) {
  font-size: 1.15rem;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-top: 1.35em;
  margin-bottom: 0.5em;
  padding-bottom: 0 !important;
  border-bottom: none !important;
  color: var(--md-heading);
}

.prose :where(h5, h6):not(:where(.not-prose, .not-prose *)) {
  color: var(--md-heading);
  font-weight: 700;
  line-height: 1.4;
  margin-top: 1.5em;
  margin-bottom: 0.6em;
}

.prose :where(h5):not(:where(.not-prose, .not-prose *)) {
  font-size: 1.05rem;
}
.prose :where(h6):not(:where(.not-prose, .not-prose *)) {
  font-size: 0.9rem;
  color: var(--md-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Extra override for any remaining borders */
.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  border: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  background-image: none !important;
  padding-bottom: 0 !important;
}

/* Lists - Polished and spacious */
.prose :where(ul):not(:where(.not-prose, .not-prose *)) {
  margin-top: 1em;
  margin-bottom: 1em;
  padding-left: 0;
  list-style: none;
}

.prose :where(ul > li):not(:where(.not-prose, .not-prose *)) {
  position: relative;
  padding-left: 2em;
  margin-top: 0.4em;
  margin-bottom: 0.4em;
  line-height: 1.68;
  color: var(--md-text);
}

.prose :where(ul > li):not(:where(.not-prose, .not-prose *))::before {
  content: "▸";
  position: absolute;
  left: 0.3em;
  top: 0em;
  width: auto;
  height: auto;
  font-size: 1rem;
  line-height: 1.68;
  color: #58a6ff;
  text-shadow: 0 0 8px rgba(88, 166, 255, 0.4);
}

.prose :where(ol):not(:where(.not-prose, .not-prose *)) {
  margin-top: 1em;
  margin-bottom: 1em;
  padding-left: 0;
  counter-reset: list-counter;
  list-style: none;
}

.prose :where(ol > li):not(:where(.not-prose, .not-prose *)) {
  position: relative;
  padding-left: 2em;
  margin-top: 0.4em;
  margin-bottom: 0.4em;
  line-height: 1.68;
  counter-increment: list-counter;
  color: var(--md-text);
}

/* GitHub-style task lists */
.prose :where(li input[type="checkbox"]):not(:where(.not-prose, .not-prose *)) {
  width: 1em;
  height: 1em;
  margin: 0 0.55em 0 -1.45em;
  accent-color: var(--md-accent);
  vertical-align: -0.08em;
}

.prose
  :where(li:has(input[type="checkbox"])):not(:where(.not-prose, .not-prose *)) {
  padding-left: 1.35em;
}

.prose
  :where(li:has(input[type="checkbox"])):not(
    :where(.not-prose, .not-prose *)
  )::before {
  display: none;
}

.prose :where(ol > li):not(:where(.not-prose, .not-prose *))::before {
  content: counter(list-counter);
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 1.5em;
  height: 1.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f6feb 0%, #0d419d 100%);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(31, 111, 235, 0.3);
}

.prose :where(li > p):not(:where(.not-prose, .not-prose *)) {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.prose
  :where(ul ul, ol ul, ul ol, ol ol):not(:where(.not-prose, .not-prose *)) {
  margin-top: 0.75em;
  margin-bottom: 0.75em;
}

/* Blockquotes - Elegant emphasis */
.prose :where(blockquote):not(:where(.not-prose, .not-prose *)) {
  position: relative;
  font-style: italic;
  font-size: 1.0625rem;
  line-height: 1.75;
  margin-top: 1.4em;
  margin-bottom: 1.4em;
  padding: 1.1em 1.25em 1.1em 1.7em;
  background: linear-gradient(
    135deg,
    rgba(88, 166, 255, 0.05) 0%,
    rgba(31, 111, 235, 0.05) 100%
  );
  border-left: 4px solid #58a6ff;
  border-radius: 0 8px 8px 0;
  color: var(--md-muted);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.prose
  :where(blockquote p):not(
    :where(.not-prose, .not-prose *)
  ):first-child::before {
  content: "“";
  position: absolute;
  left: 0.35em;
  top: 0.15em;
  font-size: 3.5rem;
  color: rgba(88, 166, 255, 0.2);
  font-family: Georgia, serif;
  line-height: 1;
}

/* Horizontal rule - Subtle divider */
.prose :where(hr):not(:where(.not-prose, .not-prose *)) {
  margin-top: 2em;
  margin-bottom: 2em;
  border: none;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #30363d 50%,
    transparent 100%
  );
}

/* Links - Premium interaction */
.prose :where(a):not(:where(.not-prose, .not-prose *)) {
  color: #58a6ff;
  text-decoration: underline;
  text-decoration-color: rgba(88, 166, 255, 0.3);
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.prose :where(a):not(:where(.not-prose, .not-prose *)):hover {
  color: #79c0ff;
  text-decoration-color: #79c0ff;
}

.prose :where(a):not(:where(.not-prose, .not-prose *)):focus-visible {
  outline: 2px solid var(--md-accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Strong emphasis */
.prose :where(strong):not(:where(.not-prose, .not-prose *)) {
  font-weight: 700;
  color: #e6edf3;
}

/* Code emphasis */
.prose :where(em):not(:where(.not-prose, .not-prose *)) {
  font-style: italic;
  color: #c9d1d9;
}

.prose :where(del):not(:where(.not-prose, .not-prose *)) {
  color: var(--md-muted);
}

.prose :where(kbd):not(:where(.not-prose, .not-prose *)) {
  padding: 0.15em 0.45em;
  border: 1px solid #484f58;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #21262d;
  color: var(--md-heading);
  font:
    0.78em/1.2 "JetBrains Mono",
    monospace;
}

/* Images - Polished presentation */
.prose :where(img):not(:where(.not-prose, .not-prose *)),
.prose :where(video):not(:where(.not-prose, .not-prose *)) {
  margin-top: 1.7em;
  margin-bottom: 1.7em;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid #30363d;
}

.prose :where(figure):not(:where(.not-prose, .not-prose *)) {
  margin: 2.5em 0;
}
.prose :where(figure img):not(:where(.not-prose, .not-prose *)) {
  margin: 0;
}
.prose :where(figcaption):not(:where(.not-prose, .not-prose *)) {
  margin-top: 0.75em;
  color: var(--md-muted);
  font-size: 0.85em;
  text-align: center;
}

/* Code blocks - Premium styling with highlight.js */
.prose .code-block-wrapper {
  position: relative;
  margin-top: 1.4em;
  margin-bottom: 1.4em;
  border-radius: 8px;
  background: #0d1117;
  border: 1px solid #30363d;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    inset 0 4px 12px rgba(0, 0, 0, 0.6),
    inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.prose .code-block-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background: #161b22;
  border-bottom: 1px solid #30363d;
  border-radius: 8px 8px 0 0;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.3);
}

.prose .code-block-language {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.prose .code-block-language svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.prose .code-block-actions {
  display: flex;
  gap: 0.5rem;
}

.prose .code-block-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  background: transparent;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #8b949e;
  cursor: pointer;
  transition: all 0.2s ease;
}

.prose .code-block-btn:hover {
  background: #21262d;
  color: #c9d1d9;
  border-color: #484f58;
}

.prose .code-block-btn:active {
  transform: scale(0.95);
}

.prose .code-block-btn.active {
  background: #21262d;
  color: #58a6ff;
  border-color: #58a6ff;
}

.prose .code-block-btn .check-icon {
  color: #3fb950;
}

.prose .code-block-btn svg {
  width: 16px;
  height: 16px;
}

.prose .code-block-wrapper pre {
  margin: 0;
  border: none;
  border-radius: 0 0 8px 8px;
  box-shadow:
    inset 0 3px 8px rgba(0, 0, 0, 0.5),
    inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.prose .code-block-wrapper pre.wrap-enabled {
  white-space: pre-wrap;
  word-break: break-all;
}

.prose :where(pre):not(:where(.not-prose, .not-prose *)) {
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 8px;
  padding: 1.5em;
  margin-top: 1.4em;
  margin-bottom: 1.4em;
  margin-left: 0;
  margin-right: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  font-size: 0.875rem;
  line-height: 1.7;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.5),
    inset 0 1px 3px rgba(0, 0, 0, 0.3);
  -webkit-overflow-scrolling: touch;
}

.prose :where(pre code):not(:where(.not-prose, .not-prose *)) {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  font-weight: 400;
}

.prose :where(pre):not(:where(.not-prose, .not-prose *))::-webkit-scrollbar {
  height: 10px;
}

.prose
  :where(pre):not(:where(.not-prose, .not-prose *))::-webkit-scrollbar-track {
  background: #161b22;
  border-radius: 6px;
}

.prose
  :where(pre):not(:where(.not-prose, .not-prose *))::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 6px;
  border: 2px solid #0d1117;
}

.prose
  :where(pre):not(
    :where(.not-prose, .not-prose *)
  )::-webkit-scrollbar-thumb:hover {
  background: #484f58;
}

/* Remove pseudo-elements from code */
.prose :where(code):not(:where(.not-prose, .not-prose *))::before,
.prose :where(code):not(:where(.not-prose, .not-prose *))::after {
  content: "";
}

/* Inline code - Distinct and readable */
.prose :where(code):not(:where(pre code, .not-prose, .not-prose *)) {
  background: rgba(110, 118, 129, 0.15);
  color: #ffffff;
  border: 1px solid rgba(110, 118, 129, 0.3);
  padding: 0 0.3em;
  border-radius: 6px;
  font-family:
    "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;
  font-size: 0.9em;
  font-weight: 500;
  line-height: 1.6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: inline;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: none;
}

/* Tables - Stunning design */
.prose :where(table):not(:where(.not-prose, .not-prose *)) {
  width: 100%;
  max-width: 100%;
  margin-top: 1.7em;
  margin-bottom: 1.7em;
  margin-left: 0;
  margin-right: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  border-collapse: separate;
  border-spacing: 0;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.prose :where(thead):not(:where(.not-prose, .not-prose *)) {
  background: linear-gradient(180deg, #1f2937 0%, #161b22 100%);
  border-bottom: 2px solid #58a6ff;
}

.prose :where(thead th):not(:where(.not-prose, .not-prose *)) {
  padding: 1em 1.25em;
  text-align: left;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #58a6ff;
  border-bottom: 2px solid #58a6ff;
}

.prose :where(thead th):not(:where(.not-prose, .not-prose *)):not(:last-child) {
  border-right: 1px solid rgba(48, 54, 61, 0.5);
}

.prose :where(tbody):not(:where(.not-prose, .not-prose *)) {
  background: #161b22;
}

.prose :where(tbody td):not(:where(.not-prose, .not-prose *)) {
  padding: 1em 1.25em;
  border-bottom: 1px solid #21262d;
  color: #c9d1d9;
  vertical-align: top;
}

.prose :where(tbody td):not(:where(.not-prose, .not-prose *)):not(:last-child) {
  border-right: 1px solid rgba(48, 54, 61, 0.3);
}

.prose :where(tbody tr):not(:where(.not-prose, .not-prose *)):hover {
  background: linear-gradient(
    90deg,
    rgba(88, 166, 255, 0.08) 0%,
    rgba(31, 111, 235, 0.08) 100%
  );
}

.prose :where(tbody tr):not(:where(.not-prose, .not-prose *)):last-child td {
  border-bottom: none;
}

.prose :where(tbody td code):not(:where(.not-prose, .not-prose *)) {
  font-size: 0.85em;
}

/* Table wrapper for horizontal scroll */
.prose .table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.7em 0;
  border: 1px solid #30363d;
  border-radius: 8px;
  background: #161b22;
  box-shadow: none;
}

.prose .table-wrapper table {
  margin: 0;
  border: 0;
  border-radius: 0;
}

.prose .table-wrapper::-webkit-scrollbar {
  height: 10px;
}

.prose .table-wrapper::-webkit-scrollbar-track {
  background: #0d1117;
  border-radius: 6px;
}

.prose .table-wrapper::-webkit-scrollbar-thumb {
  background: #30363d;
  border-radius: 6px;
  border: 2px solid #0d1117;
}

.prose .table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #484f58;
}

.prose .mermaid-wrapper {
  position: relative;
  margin: 1.7em auto;
  background: #0d1117;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #21262d;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.5),
    inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.prose .mermaid-shell {
  position: relative;
  overflow: hidden;
  padding: 1rem;
  background: #0d1117;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 10px,
      rgba(255, 255, 255, 0.01) 10px,
      rgba(255, 255, 255, 0.01) 20px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 10px,
      rgba(255, 255, 255, 0.01) 10px,
      rgba(255, 255, 255, 0.01) 20px
    );
  border: 1px solid #30363d;
  border-radius: 8px;
  text-align: center;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
}

.prose .mermaid-shell pre.mermaid {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  min-height: 0 !important;
}

.prose .mermaid-shell svg {
  transform-origin: center center;
  transition: transform 0.15s ease;
  cursor: grab;
}

.prose .mermaid-controls {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 2rem);
  grid-template-rows: repeat(3, 2rem);
  gap: 0.25rem;
  background: #161b22;
  border: 1px solid #30363d;
  padding: 0.5rem;
  border-radius: 8px;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.3);
  margin-top: 0.75rem;
  margin-left: auto;
  width: fit-content;
}

.prose .mermaid-controls button {
  width: 2rem;
  height: 2rem;
  border: 1px solid #484f58;
  border-radius: 0.35rem;
  background: #161b22;
  color: #e6edf3;
  cursor: pointer;
}

.prose .mermaid-controls button:hover {
  background: #21262d;
}

@media (max-width: 640px) {
  .prose .mermaid-wrapper {
    padding: 0.75rem;
  }
  .prose .mermaid-shell {
    padding: 0.5rem;
  }
  .prose .mermaid-controls {
    margin-top: 0.5rem;
    transform: scale(0.9);
    transform-origin: top right;
  }
}

.prose svg.flowchart {
  display: block;
  width: min(100%, 1100px);
  max-width: 1100px;
  height: auto;
  margin: 1.7em auto;
  overflow: visible;
}

.prose :where(pre.mermaid):not(:where(.not-prose, .not-prose *)) {
  margin: 1.7em 0;
  text-align: center;
  background: #0d1117;
  border: none;
  border-radius: 8px;
  padding: 2em;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  overflow: visible;
  display: flex;
  justify-content: center;
  align-items: center;
}

.prose :where(pre.mermaid svg):not(:where(.not-prose, .not-prose *)) {
  max-width: 100%;
  height: auto;
}

/* Hide the raw mermaid text before rendering */
.prose
  :where(pre.mermaid):not(:where(.not-prose, .not-prose *)):not(
    [data-processed="true"]
  ) {
  color: transparent;
  min-height: 100px;
}

/* Give standalone callouts and details a quiet, native feel. */
.prose :where(details):not(:where(.not-prose, .not-prose *)) {
  margin: 1.5em 0;
  padding: 1em 1.2em;
  border: 1px solid var(--md-border);
  border-radius: 10px;
  background: rgba(28, 33, 40, 0.65);
}

.prose :where(summary):not(:where(.not-prose, .not-prose *)) {
  cursor: pointer;
  color: var(--md-heading);
  font-weight: 650;
}

.prose :where(details[open] summary):not(:where(.not-prose, .not-prose *)) {
  margin-bottom: 0.8em;
}

/* Mobile responsive typography */
@media (max-width: 768px) {
  .prose {
    font-size: 1rem !important;
    line-height: 1.65;
  }

  .prose :where(h1):not(:where(.not-prose, .not-prose *)) {
    font-size: 1.8rem;
  }

  .prose :where(h2):not(:where(.not-prose, .not-prose *)) {
    font-size: 1.55rem;
    margin-top: 1.5em;
  }

  .prose :where(h3):not(:where(.not-prose, .not-prose *)) {
    font-size: 1.2rem;
  }

  .prose :where(h4):not(:where(.not-prose, .not-prose *)) {
    font-size: 1.1rem;
  }

  .prose :where(pre):not(:where(.not-prose, .not-prose *)) {
    padding: 1em;
    border-radius: 10px;
    font-size: 0.875rem;
  }

  .prose :where(img, video):not(:where(.not-prose, .not-prose *)) {
    margin-top: 2em;
    margin-bottom: 2em;
    border-radius: 9px;
  }

  .prose :where(table):not(:where(.not-prose, .not-prose *)) {
    font-size: 0.8125rem;
  }

  .prose :where(thead th):not(:where(.not-prose, .not-prose *)),
  .prose :where(tbody td):not(:where(.not-prose, .not-prose *)) {
    padding: 0.75em 1em;
  }
}

@media (max-width: 480px) {
  .prose {
    font-size: 1rem !important;
  }

  .prose :where(h1):not(:where(.not-prose, .not-prose *)) {
    font-size: 1.7rem;
  }

  .prose :where(ol > li):not(:where(.not-prose, .not-prose *))::before {
    width: 1.5em;
    height: 1.5em;
    font-size: 0.75rem;
  }

  .prose :where(blockquote):not(:where(.not-prose, .not-prose *)) {
    padding: 1.25em 1.25em 1.25em 1.75em;
  }
}

/* Final heading reset: Markdown headings must not render divider lines. */
.post-page article > header {
  border-bottom: 0 !important;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6,
.prose h1::before,
.prose h1::after,
.prose h2::before,
.prose h2::after,
.prose h3::before,
.prose h3::after,
.prose h4::before,
.prose h4::after,
.prose h5::before,
.prose h5::after,
.prose h6::before,
.prose h6::after {
  border: 0 !important;
  border-bottom: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  background: none !important;
  background-image: none !important;
}

/* Markdown hierarchy: blue section headings, with a divider only for h2. */
.prose :where(h2):not(:where(.not-prose, .not-prose *)) {
  color: #58a6ff !important;
  border-bottom: 1px solid rgba(88, 166, 255, 0.35) !important;
  padding-bottom: 0.35em !important;
}

.prose :where(h3):not(:where(.not-prose, .not-prose *)) {
  color: #79c0ff !important;
}

/* Higher-specificity fallback for headings inside the post renderer. */
.post-page .prose h2 {
  color: #58a6ff !important;
  border-bottom: 1px solid rgba(88, 166, 255, 0.35) !important;
  padding-bottom: 0.35em !important;
}
