/* RBM GitHub docs - styles for [rbm_github_doc]. Scoped under .rbm-ghdoc.
   Colours are either neutral rgba() or the theme's preset variables, which
   style.css remaps under html.theme-dark - so day/night follows on its own and
   nothing here may hardcode #fff or #000. */

.rbm-ghdoc { --ghd-line: rgba(128,128,128,.35); --ghd-fill: rgba(128,128,128,.12); }

/* inter-document nav */
.rbm-ghdoc-nav {
	display: flex; flex-wrap: wrap; gap: .35rem .5rem;
	margin: 0 0 2rem; padding-bottom: .9rem;
	border-bottom: 1px solid var(--ghd-line);
	font-size: .9em;
}
.rbm-ghdoc-nav a,
.rbm-ghdoc-nav span {
	padding: .25em .7em; border-radius: 999px;
	border: 1px solid var(--ghd-line); text-decoration: none; line-height: 1.4;
}
.rbm-ghdoc-nav a:hover { border-color: var(--wp--preset--color--accent-1); color: var(--wp--preset--color--accent-1); }
.rbm-ghdoc-nav span[aria-current] {
	background: var(--ghd-fill); font-weight: 600; cursor: default;
}

/* code */
.rbm-ghdoc pre {
	overflow-x: auto; padding: .8em 1em; border-radius: 6px;
	background: var(--ghd-fill); border: 1px solid var(--ghd-line);
	font-size: .85em; line-height: 1.45;
}
.rbm-ghdoc pre code { background: none; padding: 0; font-size: inherit; }
.rbm-ghdoc :not(pre) > code {
	padding: .15em .38em; border-radius: 4px;
	background: rgba(128,128,128,.18); font-size: .9em;
}

/* tables. GitHub emits a bare <table> with no wrapper, so the scroll container
   has to be the table itself: display:block makes it scrollable, and
   width:max-content + min-width:100% keeps it full width when it fits.
   Deliberately not alignfull - nested constrained containers neutralise those
   negative margins (CLAUDE.md section 7). */
.rbm-ghdoc table {
	display: block; overflow-x: auto;
	width: max-content; min-width: 100%; max-width: 100%;
	border-collapse: collapse; margin: 1.25rem 0; font-size: .92em;
}
.rbm-ghdoc th,
.rbm-ghdoc td { padding: .45em .7em; border: 1px solid var(--ghd-line); text-align: left; vertical-align: top; }
.rbm-ghdoc thead th { background: var(--ghd-fill); }
.rbm-ghdoc tbody tr:nth-child(even) { background: rgba(128,128,128,.06); }

/* prose */
.rbm-ghdoc h1, .rbm-ghdoc h2, .rbm-ghdoc h3,
.rbm-ghdoc h4, .rbm-ghdoc h5, .rbm-ghdoc h6 { scroll-margin-top: 1rem; }
.rbm-ghdoc h2 { padding-bottom: .25em; border-bottom: 1px solid var(--ghd-line); }
.rbm-ghdoc blockquote {
	margin-left: 0; padding: .1em 0 .1em 1em;
	border-left: 3px solid var(--ghd-line);
}
.rbm-ghdoc img { max-width: 100%; height: auto; }
.rbm-ghdoc hr { border: 0; border-top: 1px solid var(--ghd-line); }

.rbm-ghdoc-error { padding: 1em; border: 1px solid var(--ghd-line); border-radius: 6px; }
