/* Page styles: zinc neutrals, Ruby red accent, light and dark. */
:root {
	--gq-bg: #ffffff;
	--gq-subtle: #fafafa;
	--gq-surface: #f4f4f5;
	--gq-border: #e4e4e7;
	--gq-text: #3f3f46;
	--gq-muted: #71717a;
	--gq-strong: #18181b;
	/* Ruby red, darkened from #cc342d to keep text contrast ≥ 4.5:1 */
	--gq-accent: #b42d27;
	--gq-accent-soft: #fdecea;
	--gq-on-accent: #ffffff;
	--gq-badge-text: #52525b;
	--gq-code-bg: #18181b;
	--gq-code-text: #e4e4e7;
	--gq-warn-bg: #fef2f2;
	--gq-warn-border: #fca5a5;
	--gq-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
	--gq-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
	:root {
		--gq-bg: #09090b;
		--gq-subtle: #111113;
		--gq-surface: #18181b;
		--gq-border: #27272a;
		--gq-text: #d4d4d8;
		--gq-muted: #a1a1aa;
		--gq-strong: #fafafa;
		--gq-accent: #f26b5b;
		--gq-accent-soft: rgba(242, 107, 91, 0.14);
		--gq-on-accent: #18181b;
		--gq-badge-text: #a1a1aa;
		--gq-code-bg: #111113;
		--gq-warn-bg: rgba(239, 68, 68, 0.1);
		--gq-warn-border: rgba(248, 113, 113, 0.45);
	}
}

/* Layout */
body {
	font-family: var(--gq-font);
	font-size: 15px;
	color: var(--gq-text);
	background: var(--gq-bg);
}
.nav_wrap {
	width: 280px;
	background: var(--gq-subtle);
}
#nav {
	border-right: 1px solid var(--gq-border);
}
#main {
	background: var(--gq-bg);
	padding: 0 40px 24px;
}
#header {
	position: sticky;
	top: 0;
	z-index: 6000;
	margin: 0 -40px;
	padding: 14px 40px;
	background: color-mix(in srgb, var(--gq-bg) 88%, transparent);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--gq-border);
}
#menu {
	font-size: 13px;
	color: var(--gq-muted);
}
#menu .title,
#menu a {
	font-size: 13px;
}
#menu .title {
	color: var(--gq-strong);
	font-weight: 600;
}
#menu a,
#menu a:visited {
	color: var(--gq-muted);
	border: 0;
}
#menu a:hover {
	color: var(--gq-accent);
}
#search a,
#search a:visited {
	color: var(--gq-muted);
	fill: var(--gq-muted);
	border-radius: 6px;
}
#content {
	max-width: 900px;
	margin: 0 auto;
	padding-top: 8px;
}

/* Typography */
h1,
h2,
h3,
h4 {
	color: var(--gq-strong);
	letter-spacing: -0.01em;
}
h1,
h1.noborder {
	font-size: 30px;
	font-weight: 700;
	border: 0;
	margin: 28px 0 12px;
	padding: 0;
}
h2 {
	font-size: 21px;
	font-weight: 650;
	border-bottom: 1px solid var(--gq-border);
	padding-bottom: 6px;
	margin: 36px 0 14px;
}
h3 {
	font-size: 16px;
}
.docstring,
.tags,
#filecontents {
	font-size: 15px;
	line-height: 1.65;
	color: var(--gq-text);
}
a {
	font-weight: 500;
}
#content a,
#content a:visited {
	color: var(--gq-accent);
}
#content a:hover {
	background: none;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Code */
*:not(pre) > code,
tt {
	font-family: var(--gq-mono);
	font-size: 0.88em;
	padding: 1px 5px;
	color: var(--gq-strong);
	background: var(--gq-surface);
	border: 1px solid var(--gq-border);
	border-radius: 5px;
}
pre,
.docstring pre.code,
#filecontents pre.code,
.tags pre.example {
	font-family: var(--gq-mono);
	font-size: 13px;
	line-height: 1.6;
	color: var(--gq-code-text);
	background: var(--gq-code-bg);
	border: 1px solid var(--gq-border);
	border-radius: 10px;
	padding: 14px 18px;
	overflow-x: auto;
}
pre.code,
pre code {
	color: var(--gq-code-text);
	background: none;
	border: 0;
	padding: 0;
}
pre.code a {
	border: 0;
}
#filecontents pre.code .object_link a,
.docstring pre.code .object_link a {
	color: #fca5a5;
}

/* Tables */
#filecontents table {
	border-collapse: collapse;
	border: 1px solid var(--gq-border);
}
#filecontents table td,
#filecontents table th,
#filecontents table tr:nth-child(odd),
#filecontents table tr:nth-child(even) {
	background: none;
	border-color: var(--gq-border);
}

/* Table of contents */
#toc {
	right: 0;
	max-width: 260px;
	padding: 14px 18px 14px 14px;
	font-size: 13px;
	background: var(--gq-bg);
	border: 1px solid var(--gq-border);
	border-radius: 10px;
	box-shadow: none;
}
#toc.hidden {
	background: var(--gq-bg);
}
#toc .title {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--gq-muted);
}
#toc ol {
	padding-left: 1.2em;
	list-style: none;
}
#toc > ol {
	padding-left: 0;
}
#toc li,
#toc > ol > li {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.6;
}
#toc a,
#toc a:visited {
	color: var(--gq-text);
}
#toc a:hover {
	color: var(--gq-accent);
}

/* Notes and labels (YARD's own classes, reused for GraphQL badges/callouts) */
.note {
	color: var(--gq-text);
	background: var(--gq-subtle);
	border: 1px solid var(--gq-border);
	border-left: 3px solid var(--gq-muted);
	border-radius: 8px;
	padding: 12px 16px;
}
.note.deprecated {
	background: var(--gq-warn-bg);
	border-color: var(--gq-warn-border);
	border-left-color: var(--gq-accent);
}
.note.todo {
	background: #fffbeb;
	border-color: #fcd34d;
}
.note p:first-child {
	margin-top: 0;
}
.note p:last-child {
	margin-bottom: 0;
}
.note.title,
h1 .note.title {
	display: inline-block;
	padding: 1px 8px;
	font-family: var(--gq-font);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: lowercase;
	line-height: 18px;
	color: var(--gq-muted);
	background: var(--gq-surface);
	border: 1px solid var(--gq-border);
	border-left-width: 1px;
	border-radius: 999px;
	vertical-align: middle;
}
.note.title.deprecated,
.note.title.readonly,
.note.title.writeonly,
.note.title.constructor {
	color: var(--gq-accent);
	background: var(--gq-accent-soft);
	border-color: transparent;
}

/* GraphQL entity headings: `Type.field ● Type!` */
#filecontents h3 {
	margin: 26px 0 8px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.8;
}
#filecontents h3 code {
	font-size: 14px;
	padding: 0;
	border: 0;
	background: none;
}
#filecontents h3 .gqlmd-mdx-entity-parent {
	color: var(--gq-muted);
	font-weight: 500;
}
#filecontents h3 a code,
#filecontents h3 a .gqlmd-mdx-entity-name {
	color: var(--gq-accent);
}
.gqlmd-mdx-bullet {
	color: var(--gq-border);
}

/* Ruby API pages */
.method_details {
	border-top: 1px solid var(--gq-border);
}
h3.signature,
.method_details.first h3.signature {
	font-family: var(--gq-mono);
	font-size: 14px;
	padding: 8px 12px;
	color: var(--gq-strong);
	background: var(--gq-subtle);
	border: 1px solid var(--gq-border);
	border-radius: 8px;
}
h3.signature tt {
	padding: 0;
	border: 0;
	background: none;
}
ul.summary li,
.summary_signature {
	background: var(--gq-subtle);
	border-color: var(--gq-border);
	border-radius: 6px;
}
.summary_signature:hover {
	background: var(--gq-surface);
	border-color: var(--gq-border);
}
.box_info dl > *,
.box_info dl:nth-child(odd) > *,
.box_info dl:nth-child(even) > * {
	background: none;
	border-color: var(--gq-border);
}
.box_info dl dt {
	color: var(--gq-muted);
}
.tags .tag_title {
	color: var(--gq-strong);
}
h2 small a {
	color: var(--gq-muted);
	background: var(--gq-subtle);
	border-color: var(--gq-border);
}

/* Footer */
#footer {
	max-width: 900px;
	margin: 48px auto 0;
	padding: 20px 0 8px;
	font-size: 13px;
	color: var(--gq-muted);
	border-top: 1px solid var(--gq-border);
}
#footer a,
#footer a:visited {
	color: var(--gq-strong);
	border: 0;
}
#footer a:hover {
	color: var(--gq-accent);
}

/* Landing page (docs/introduction.md) */
.gqlmd-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: 32px;
	align-items: center;
	margin: 32px 0 28px;
}
.gqlmd-hero-headline {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: var(--gq-accent);
}
#filecontents h1.gqlmd-hero-title {
	margin: 10px 0 14px;
	font-size: 40px;
	line-height: 1.1;
	letter-spacing: -0.03em;
}
.gqlmd-hero-description {
	margin: 0 0 22px;
	font-size: 17px;
	color: var(--gq-muted);
}
.gqlmd-hero-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
#content a.gqlmd-btn {
	display: inline-block;
	padding: 9px 16px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 8px;
	text-decoration: none;
}
#content a.gqlmd-btn-primary {
	color: #fff;
	background: var(--gq-accent);
}
#content a.gqlmd-btn-outline {
	color: var(--gq-strong);
	border: 1px solid var(--gq-border);
}
#content a.gqlmd-btn-outline:hover {
	background: var(--gq-subtle);
}
.gqlmd-schema-preview {
	overflow: hidden;
	background: var(--gq-code-bg);
	border: 1px solid var(--gq-border);
	border-radius: 12px;
}
.gqlmd-schema-preview-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 16px;
	font-family: var(--gq-mono);
	font-size: 12px;
	color: #a1a1aa;
	border-bottom: 1px solid #27272a;
}
.gqlmd-schema-preview-chip {
	padding: 1px 8px;
	font-size: 10px;
	letter-spacing: 0.08em;
	color: #fca5a5;
	background: rgba(242, 107, 91, 0.15);
	border-radius: 999px;
}
#filecontents .gqlmd-schema-preview pre {
	margin: 0;
	border: 0;
	border-radius: 0;
}
.token-keyword {
	color: #f87171;
}
.token-type {
	color: #fcd34d;
}
.token-field {
	color: #93c5fd;
}
.gqlmd-highlights {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 12px;
}
.gqlmd-highlight {
	padding: 14px 16px;
	background: var(--gq-subtle);
	border: 1px solid var(--gq-border);
	border-radius: 10px;
}
.gqlmd-highlight p {
	margin: 0;
}
.gqlmd-highlight-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: var(--gq-accent);
}
.gqlmd-highlight-title {
	margin-top: 4px !important;
	font-weight: 600;
	color: var(--gq-strong);
}

/* Narrow screens: YARD moves the nav into an overlay */
@media (max-width: 920px) {
	#main {
		padding: 0 18px 24px;
	}
	#header {
		margin: 0 -18px;
		padding: 12px 18px;
	}
	.gqlmd-hero,
	.gqlmd-highlights {
		grid-template-columns: 1fr;
	}
	#filecontents h1.gqlmd-hero-title {
		font-size: 32px;
	}
}

/* The landing page has its own layout: no table of contents */
#main:has(.gqlmd-landing) #toc {
	display: none;
}

#filecontents h3 {
	margin-bottom: 2px;
}

/* YARD's "show all" / "collapse" buttons */
.inheritanceTree,
.toggleDefines,
h2 small a {
	color: var(--gq-muted);
	background: var(--gq-subtle);
	border: 1px solid var(--gq-border);
	border-radius: 6px;
}

/* Linked type names (Returned By, Member Of, ...) keep the link color */
#content a code {
	color: var(--gq-accent);
}

/* ---- Visual review fixes ---- */

/* Monospace everywhere code shows (Chrome has no `ui-monospace`) */
:root {
	--gq-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Monaco, Consolas,
		"Liberation Mono", monospace;
}
pre,
pre code,
code,
tt,
.summary_signature,
ul.summary,
h3.signature,
#filecontents h3 code {
	font-family: var(--gq-mono);
}

/* Inline code in Ruby docstrings: neutral, like the GraphQL pages */
.docstring p > code,
.docstring p > tt,
.tags p > tt,
.tags tt,
.summary_desc tt,
.tags .name {
	color: var(--gq-strong);
	background: var(--gq-surface);
	border-color: var(--gq-border);
}

/* Ruby method summary: one card per method, plain signature */
ul.summary li {
	background: none;
	border: 0;
	margin-bottom: 6px;
}
#content .summary_signature,
.summary_signature {
	display: inline-block;
	padding: 3px 10px;
	font-size: 13px;
	background: var(--gq-subtle);
	border: 1px solid var(--gq-border);
	border-radius: 6px;
}
#content .summary_signature a,
#content .summary_signature a:visited {
	color: var(--gq-strong);
}
#content .summary_signature strong {
	color: var(--gq-accent);
}
.summary_desc {
	margin: 4px 0 0 12px;
	color: var(--gq-muted);
}

/* Field entries: description right under its heading */
#filecontents h3 {
	margin: 28px 0 0;
}
#filecontents h3 + p {
	margin-top: 2px;
}

/* Headings and blocks stop at floats instead of running under them */
h2,
#filecontents pre {
	display: flow-root;
}

/* Syntax highlighting tokens (yard/syntax_highlight.rb) */
pre .token-keyword {
	color: #f87171;
}
pre .token-type {
	color: #fcd34d;
}
pre .token-field {
	color: #93c5fd;
}
pre .token-string {
	color: #86efac;
}
pre .token-number {
	color: #fdba74;
}
pre .token-directive,
pre .token-variable {
	color: #c4b5fd;
}
pre .token-comment {
	color: #71717a;
	font-style: italic;
}

/* Table of contents: one line under the title (js/gqlmd.js) */
#toc.gqlmd-toc {
	float: none;
	position: static;
	max-width: none;
	margin: -4px 0 18px;
	padding: 0 0 12px;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--gq-border);
	border-radius: 0;
	box-shadow: none;
	overflow: visible;
}
#toc.gqlmd-toc > ol {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 6px;
	margin: 0;
	padding: 0;
}
#toc.gqlmd-toc > ol::before {
	content: "On this page";
	margin-right: 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--gq-muted);
}
#toc.gqlmd-toc li {
	margin: 0;
	font-size: 13px;
	line-height: 1.4;
}
#toc.gqlmd-toc li a,
#toc.gqlmd-toc li a:visited {
	display: inline-block;
	padding: 2px 10px;
	color: var(--gq-text);
	background: var(--gq-subtle);
	border: 1px solid var(--gq-border);
	border-radius: 999px;
	text-decoration: none;
}
#toc.gqlmd-toc li a:hover {
	color: var(--gq-accent);
	border-color: var(--gq-accent);
}

/* Mobile menu button (YARD's #search link) */
#search a,
#search a:visited {
	margin-top: 8px;
	padding: 6px 8px;
	color: var(--gq-text);
	fill: var(--gq-text);
	background: var(--gq-bg);
	border: 1px solid var(--gq-border);
	border-radius: 8px;
	box-shadow: none;
}
#search a svg {
	display: block;
	width: 18px;
	height: 18px;
}
#search a:hover,
#search a.active {
	padding-bottom: 6px;
	color: var(--gq-accent);
	fill: var(--gq-accent);
	background: var(--gq-subtle);
	border-color: var(--gq-accent);
}

/* Badges are `.note`s: drop YARD's 20px block margin so headings stay compact */
.note.title,
h1 .note.title {
	margin: 0 0 0 4px;
}

/* ---- UI/UX review fixes ---- */

/* Contrast: badges, primary button text, separators, YARD's grey extras */
.note.title,
h1 .note.title {
	color: var(--gq-badge-text);
}
#content a.gqlmd-btn-primary {
	color: var(--gq-on-accent);
}
.gqlmd-mdx-bullet {
	color: var(--gq-muted);
	font-size: 0.7em;
}
.extras,
h3.signature .extras,
.summary_signature .extras,
#content small,
#listing ul small,
.defines {
	color: var(--gq-muted);
}

/* Alphabetic index (_index.html) */
.index_inline_list li,
.index_inline_list li:nth-child(odd),
.index_inline_list li:nth-child(even) {
	background: none;
}
.index_inline_list li a {
	padding: 2px 10px;
	border: 1px solid var(--gq-border);
	border-radius: 999px;
}
h1.alphaindex,
#listing h2 {
	color: var(--gq-strong);
}

/* Keyboard focus in the accent color */
:focus-visible {
	outline: 2px solid var(--gq-accent);
	outline-offset: 2px;
	border-radius: 4px;
}
