/*
 * article.css — page content area. Generous padding, big title, lede
 * summary, body that hosts the rendered block tree, footer with
 * last-updated meta. Tringify-docs uses no max-width cap (full-width).
 */

.docs-article {
  padding: var(--space-12) var(--space-6);
}
@media (min-width: 640px) {
  .docs-article {
    padding: var(--space-12) var(--space-12);
  }
}
@media (min-width: 1024px) {
  .docs-article {
    padding: var(--space-12) var(--space-16);
  }
}

.docs-article-header {
  margin-bottom: var(--space-10);
}
.docs-article-title {
  font-size: var(--text-4xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: hsl(var(--foreground));
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
}
.docs-article-summary {
  font-size: var(--text-lg);
  color: hsl(var(--muted-foreground));
  line-height: var(--leading-relaxed);
  max-width: 48rem;
}

.docs-article-body {
  color: hsl(var(--foreground) / 0.9);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}

/* Default block element styles inside the body — block templates may
   override per-block via .block-* classes (see blocks.css). These are
   the safety-net rules that catch generic prose / list / link
   elements not wrapped in a typed block. */
.docs-article-body > * + * {
  margin-top: var(--space-4);
}
.docs-article-body h2 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  scroll-margin-top: calc(var(--header-height) + var(--space-4));
}
.docs-article-body h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
  scroll-margin-top: calc(var(--header-height) + var(--space-4));
}
.docs-article-body p {
  margin: var(--space-4) 0;
}
.docs-article-body a {
  color: hsl(var(--foreground));
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: hsl(var(--muted-foreground));
  transition: text-decoration-color 150ms ease;
}
.docs-article-body a:hover {
  text-decoration-color: hsl(var(--foreground));
}
.docs-article-body ul {
  list-style: disc;
  padding-left: var(--space-6);
  margin: var(--space-3) 0;
}
.docs-article-body ol {
  list-style: decimal;
  padding-left: var(--space-6);
  margin: var(--space-3) 0;
}
.docs-article-body li + li {
  margin-top: var(--space-1_5);
}
.docs-article-body code {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: hsl(var(--muted));
  padding: var(--space-0_5) var(--space-1_5);
  border-radius: var(--radius-sm);
}

.docs-article-footer {
  margin-top: var(--space-16);
  padding-top: var(--space-6);
  border-top: 1px solid hsl(var(--border));
}
.docs-article-meta {
  font-size: var(--text-xs);
  color: hsl(var(--muted-foreground));
}

/* Prototype designer banner (vascula landing) — a contained media block
   above the article content. Sharp corners, no border. Refine later. */
.docs-proto-banner {
  margin: 0 0 32px;
}
.docs-proto-banner img {
  display: block;
  width: 100%;
  height: auto;
}

/* Vascula landing: tighter top + left padding (the banner sits high, so reclaim
   the room above + on the left). */
.docs-article--vascula-landing {
  padding-top: var(--space-4);
  padding-left: var(--space-4);
}
@media (min-width: 768px) {
  .docs-article--vascula-landing { padding-left: var(--space-6); }
}

/* Typewriter caret for the vascula landing title. The full title is server-
   rendered (SEO/no-JS safe); docs-typewriter.js retypes it. */
.docs-typewriter.is-typing::after,
.docs-typewriter.is-typed::after {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.9em;
  margin-left: 4px;
  vertical-align: -0.06em;
  background: currentColor;
  border-radius: 1px;
}
.docs-typewriter.is-typed::after { animation: docs-caret-blink 1s step-end infinite; }
@keyframes docs-caret-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* The breadcrumb above the title (only when there is one); Copy as
   Markdown sits beside the title. */
.docs-article-toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.docs-breadcrumb { flex: 1; min-width: 0; }
.docs-breadcrumb ol {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--text-sm);
  color: hsl(var(--muted-foreground));
  white-space: nowrap;
  overflow: hidden;
}
.docs-breadcrumb li { display: inline-flex; align-items: center; min-width: 0; }
.docs-breadcrumb li + li::before { content: "/"; margin-right: 6px; opacity: 0.5; }
.docs-breadcrumb li:last-child { overflow: hidden; }
.docs-breadcrumb li:last-child span { overflow: hidden; text-overflow: ellipsis; }
.docs-breadcrumb a { color: inherit; text-decoration: none; }
.docs-breadcrumb a:hover { color: hsl(var(--foreground)); }
.docs-article-titlerow {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-4);
}
.docs-article-titlerow > .docs-article-title { flex: 1; min-width: 0; }
.docs-article-titlerow > div { flex-shrink: 0; padding-top: 0.6em; }
.docs-copy-md {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid hsl(var(--border));
  border-radius: 999px;
  background: transparent;
  color: hsl(var(--muted-foreground));
  font: inherit;
  font-size: 12.5px;
  white-space: nowrap;
  cursor: pointer;
}
.docs-copy-md:hover { color: hsl(var(--foreground)); border-color: hsl(var(--muted-foreground)); }
.docs-copy-md[hidden] { display: none; }

/* Previous and Next at the end of a page. */
.docs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-top: var(--space-12);
}
.docs-pager-link {
  display: grid;
  gap: 4px;
  padding: var(--space-4) var(--space-5);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  color: hsl(var(--foreground));
  text-decoration: none;
}
.docs-pager-link:hover { border-color: hsl(var(--muted-foreground)); }
.docs-pager-next { grid-column: 2; text-align: right; }
.docs-pager-label { font-size: var(--text-xs); color: hsl(var(--muted-foreground)); }
.docs-pager-title { font-weight: 600; }
@media (max-width: 640px) {
  .docs-pager { grid-template-columns: 1fr; }
  .docs-pager-next { grid-column: 1; }
}
