/* Section dividers — old HTML used <hr> after every h2 */
.post-body h2::after {
  content: '';
  display: block;
  height: 1px;
  background-color: #a19f9f;
  margin-bottom: 20px;
}

/* Code */
pre {
  overflow: auto;
  background-color: rgb(42, 42, 42);
  color: #dbdbdb;
  padding: 10px;
  font-family: inherit;
  scrollbar-color: rgb(143, 143, 143) rgb(55, 55, 55);
  scrollbar-width: thin;
  margin: 0 0 20px;
  border-radius: 4px;
}

pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

code {
  background-color: rgb(55, 55, 55);
  padding: 0 4px;
  border-radius: 2px;
}

/* ASCII diagrams (marked by rehype plugin on box-drawing content) */
pre.ascii {
  background-color: #1a1a1a;
  padding: 0;
  border-radius: 0;
  line-height: 1;
  overflow: visible;
  font-family: SCP, 'Source Code Pro', ui-monospace, monospace;
}

pre.ascii code {
  display: block;
  line-height: 1;
  white-space: pre;
  font-family: inherit;
  letter-spacing: 0;
  tab-size: 4;
}

/* Images — preserve aspect ratio; don't force full column width */
.post-body img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 4px;
  margin: 0 0 20px;
}

.post-body p:has(> img:only-child) {
  margin-bottom: 0;
}

/* Callouts */
.warning,
.note,
.ack,
.bonus {
  padding: 10px;
  margin-bottom: 20px;
  border-radius: 4px;
}

.warning {
  border: 1px solid rgb(211, 62, 62);
  color: rgb(211, 62, 62);
}

.note {
  border: 1px solid rgb(137, 148, 211);
  color: rgb(137, 148, 211);
}

.ack {
  border: 1px solid rgb(109, 168, 104);
  color: rgb(109, 168, 104);
}

.bonus {
  border: 1px solid rgb(197, 178, 71);
  color: rgb(197, 178, 71);
}

.warning p,
.note p,
.ack p,
.bonus p {
  margin-bottom: 10px;
  color: inherit;
}

.warning h4,
.note h4,
.ack h4,
.bonus h4 {
  font-size: 14px;
  margin: 0 0 10px;
  font-weight: normal;
  color: inherit;
}

.warning h4 i,
.note h4 i,
.ack h4 i,
.bonus h4 i {
  margin-right: 4px;
  vertical-align: middle;
}

.warning p:last-child,
.note p:last-child,
.ack p:last-child,
.bonus p:last-child {
  margin-bottom: 0;
}
