/* Docs article typography. Shared by the dochouse panel (the in-SPA
 * docs reader) — dochouse.js drops rendered markdown into a
 * `.docs-article` element. Tokens come from themes/labrador.css; no hex
 * literals here. Panel layout (rail, etc.) lives in dochouse.css. */

.docs-article {
  width: 100%;
  max-width: 820px;
  line-height: 1.65;
  font-size: 15.5px;
  color: var(--text);
}

.docs-article h1 {
  font-size: 30px;
  line-height: 1.2;
  margin: 0 0 24px;
  color: var(--text);
}
.docs-article h2 {
  font-size: 21px;
  margin: 38px 0 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 20px;
  position: relative;
}
.docs-article h3 {
  font-size: 17px;
  margin: 26px 0 8px;
  scroll-margin-top: 20px;
  position: relative;
}

/* Hover-to-grab section permalinks (added by docs.js). The id lives on
   the heading server-side; this is just the affordance to copy it. */
.docs-anchor {
  position: absolute;
  left: -1.1em;
  top: 0;
  color: var(--accent);
  text-decoration: none;
  opacity: 0;
  font-weight: 400;
  transition: opacity 0.12s;
}
.docs-article h2:hover .docs-anchor,
.docs-article h3:hover .docs-anchor,
.docs-anchor:focus {
  opacity: 0.7;
}
.docs-anchor:hover {
  opacity: 1;
  text-decoration: none;
}

/* Embedded UI screenshots — framed so they read as "here's the actual
   thing," not inline decoration. */
.docs-article img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px 0 20px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: 0 8px 30px var(--shadow-strong);
}
.docs-article p {
  margin: 0 0 16px;
}
.docs-article ul,
.docs-article ol {
  margin: 0 0 16px;
  padding-left: 24px;
}
.docs-article li {
  margin: 4px 0;
}
.docs-article a {
  color: var(--accent);
  text-decoration: none;
}
.docs-article a:hover {
  text-decoration: underline;
}

.docs-article code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
}
.docs-article pre {
  position: relative;                /* anchor the copy button */
  background: linear-gradient(
    180deg,
    var(--surface-codeblock-top),
    var(--surface-codeblock-bot)
  );
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 18px;
}
/* copy-to-run button injected on every docs code block by clipboard.js.
   Shares the CTA styling with the home install button (see home.css
   .codeblock .copy) — kept visually identical here to avoid a shared
   import; both flip to green on success. */
.docs-article pre.has-copy { padding-right: 74px; }
.docs-article pre .copy {
  position: absolute;
  /* Absolutely positioned via `top`, so no vertical margin. (The
     old `button { margin-top: 16px }` global that once leaked here
     is gone — form-button styling is now scoped under `.card`.)
     14px centers the button on the first code line: pre padding-top
     14px + ~20px line, line-height:1 button ~20px. */
  margin: 0;
  top: 14px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  gap: 6px;
  background: linear-gradient(180deg, var(--accent-bright), var(--accent-deep));
  color: var(--bg);
  border: 0;
  border-radius: 7px;
  padding: 5px 11px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;                        /* reveal on hover/focus to keep code clean */
  box-shadow: 0 3px 10px -3px rgba(var(--accent-rgb), 0.5);
  transition: opacity 0.12s ease, transform 0.12s ease, filter 0.12s ease, background 0.15s ease;
}
.docs-article pre:hover .copy,
.docs-article pre .copy:focus-visible { opacity: 1; }
.docs-article pre .copy::before {
  content: "";
  width: 11px; height: 11px;
  background: currentColor;
  -webkit-mask: var(--icon-clipboard) center / contain no-repeat;
          mask: var(--icon-clipboard) center / contain no-repeat;
  flex: none;
}
.docs-article pre .copy:hover { transform: translateY(-1px); filter: brightness(1.06); }
.docs-article pre .copy.copied {
  background: var(--positive);
  opacity: 1;
}
.docs-article pre .copy.copied::before {
  -webkit-mask-image: var(--icon-check);
          mask-image: var(--icon-check);
}
.docs-article pre code {
  background: none;
  border: none;
  padding: 0;
  color: var(--text-codeblock);
  font-size: 13px;
  line-height: 1.55;
}

.docs-article blockquote {
  margin: 0 0 18px;
  padding: 10px 16px;
  border-left: 3px solid var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
}
.docs-article blockquote p:last-child {
  margin-bottom: 0;
}

.docs-article table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 18px;
  font-size: 14px;
}
.docs-article th,
.docs-article td {
  border: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
}
.docs-article th {
  background: var(--surface-2);
}


