/* Code blocks look like an editor window; `# =>` lines are live-verified output. */

.md-typeset .highlight {
  border-radius: var(--dorm-radius-sm);
  overflow: hidden;
  border: 1px solid #1d2438;
  box-shadow: var(--dorm-shadow);
  margin: 1.1em 0 1.4em;
}
.md-typeset .highlight pre,
.md-typeset pre > code {
  font-size: 0.74rem;
  line-height: 1.6;
  font-variant-ligatures: none;
}
.md-typeset .highlight code {
  scrollbar-color: #2b3350 transparent;
}

.md-typeset .highlight span.filename {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 0.3rem;
  column-gap: 0.6rem;
  margin: 0;
  padding: 0.55rem 0.9rem 0.55rem 3.6rem;
  position: relative;
  background: #161c2f;
  color: #a6accd;
  border-bottom: 1px solid #1d2438;
  font-family: var(--md-code-font-family);
  font-size: 0.68rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.md-typeset .highlight span.filename::before {
  content: "";
  position: absolute;
  left: 0.9rem;
  top: 0.92rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: 0.85rem 0 0 #febc2e, 1.7rem 0 0 #28c840;
  -webkit-mask-image: none;
  mask-image: none;
}
.md-typeset .highlight:has(.hll) span.filename::after {
  content: "✓ outputs verified on PostgreSQL";
  margin-left: auto;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgb(61 214 181 / 14%);
  color: #3dd6b5;
  font-family: var(--md-text-font-family);
  font-size: 0.6rem;
  font-weight: 650;
  white-space: nowrap;
}

@media screen and (max-width: 37.4375em) {
  .md-typeset .highlight span.filename {
    padding: 0.5rem 0.75rem 0.5rem 3.2rem;
    font-size: 0.64rem;
  }
  .md-typeset .highlight span.filename::before {
    left: 0.75rem;
    top: 0.82rem;
    width: 0.48rem;
    height: 0.48rem;
    box-shadow: 0.72rem 0 0 #febc2e, 1.44rem 0 0 #28c840;
  }
  .md-typeset .highlight:has(.hll) span.filename::after {
    content: "✓ verified on PostgreSQL";
  }
}

/* Verified `# =>` output lines (inherits Material's `display: block` line layout) */
.md-typeset .highlight .hll {
  background: rgb(61 214 181 / 13%);
  box-shadow: inset 3px 0 0 #3dd6b5;
}
.md-typeset .highlight .hll .c1 {
  color: #7ff0d4;
  font-style: normal;
}

.md-typeset .md-clipboard {
  color: #7f89a8;
}
.md-typeset .md-clipboard:hover,
.md-typeset .md-clipboard:focus {
  color: #e3e8f4;
}

/* Wire transcripts: what PostgreSQL received */
.md-typeset details.wire {
  border: 1px solid var(--dorm-line);
  border-left: 4px solid var(--dorm-ok);
  background: var(--dorm-surface);
}
.md-typeset details.wire > summary {
  background: var(--dorm-ok-soft);
  color: var(--dorm-ink);
  font-weight: 650;
}
.md-typeset details.wire > summary::before {
  background-color: var(--dorm-ok);
  -webkit-mask-image: var(--md-admonition-icon--example, none);
  mask-image: var(--md-admonition-icon--example, none);
}
.md-typeset details.wire .highlight {
  box-shadow: none;
  margin: 0.6rem 0 0.2rem;
}
.md-typeset details.wire .highlight .c1 {
  color: #6ee7c6;
}
