/* Archify Diagram Mobile Overrides — loaded after styles.css */
/* Optimized for vertical (direction: down) diagrams */

.archify-diagram {
  margin: 1.5em 0;
  max-width: 100%;
  overflow-x: auto;
}

.archify-diagram iframe {
  display: block;
  width: 100%;
  height: min(72vh, 640px);
  min-height: 320px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
}

.archify-diagram .archify-full {
  margin: 0.5em 0 0;
  font-size: 0.85em;
  text-align: right;
}

.archify-diagram img,
.archify-diagram svg {
  border-radius: var(--radius-md);
  max-width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  .archify-diagram img,
  .archify-diagram svg {
    border-radius: var(--radius-md);
    width: 100%;
    height: auto;
  }

  /* Standalone SVGs rendered via Pandoc <figure> — let them use full width */
  .post-content figure:has(img[src$=".svg"]) {
    overflow-x: hidden;
    margin: 1.5em 0;
    max-width: 100%;
  }

  .post-content figure img[src$=".svg"] {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
  }
}
