/* Sidebar (docs list iframe): zinc neutrals, Ruby red accent. */
:root {
	--gq-bg: #fafafa;
	--gq-surface: #ffffff;
	--gq-border: #e4e4e7;
	--gq-text: #3f3f46;
	--gq-muted: #71717a;
	--gq-strong: #18181b;
	--gq-hover: #f4f4f5;
	--gq-accent: #b42d27;
	--gq-badge-text: #52525b;
	--gq-accent-soft: #fdecea;
	--gq-font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
		"Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
	:root {
		--gq-bg: #111113;
		--gq-surface: #18181b;
		--gq-border: #27272a;
		--gq-text: #d4d4d8;
		--gq-muted: #a1a1aa;
		--gq-strong: #fafafa;
		--gq-hover: #27272a;
		--gq-accent: #f26b5b;
		--gq-badge-text: #a1a1aa;
		--gq-accent-soft: rgba(242, 107, 91, 0.14);
	}
}

body {
	font-family: var(--gq-font);
	font-size: 14px;
	background: var(--gq-bg);
	color: var(--gq-text);
	height: auto;
	color-scheme: light dark;
}

/* Header: title, list links, search */
.fixed_header {
	background: var(--gq-bg);
	height: auto;
	padding: 16px 14px 12px;
	box-sizing: border-box;
	border-bottom: 1px solid var(--gq-border);
}
#full_list_header {
	padding: 0;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--gq-strong);
}
#full_list_nav {
	margin: 8px 0 0;
	font-size: 12px;
	display: flex;
	gap: 4px;
}
#full_list_nav span {
	padding: 0;
}
#full_list_nav span a {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	color: var(--gq-muted);
	border: 1px solid var(--gq-border);
}
/* Highlight the tab of the list being shown */
#content:has(#full_list.file) #full_list_nav a[href*="file_list"],
#content:has(#full_list.class) #full_list_nav a[href*="class_list"],
#content:has(#full_list.method) #full_list_nav a[href*="method_list"] {
	color: var(--gq-accent);
	border-color: var(--gq-accent);
}
#full_list_nav span a:hover {
	color: var(--gq-strong);
	background: var(--gq-hover);
}
#search {
	position: static;
	margin-top: 10px;
	padding: 0;
}
#search label {
	display: none;
}
#search input {
	width: 100%;
	box-sizing: border-box;
	padding: 7px 10px;
	font: inherit;
	font-size: 13px;
	color: var(--gq-strong);
	background: var(--gq-surface);
	border: 1px solid var(--gq-border);
	border-radius: 8px;
	outline: none;
}
#search input::placeholder {
	color: var(--gq-muted);
}
#search input:focus {
	border-color: var(--gq-accent);
	box-shadow: 0 0 0 3px var(--gq-accent-soft);
}
#content.insearch #search {
	background: none;
}

/* Tree */
#full_list {
	margin-top: 128px;
	padding: 4px 8px 24px;
	font-size: 14px;
}
#full_list li,
#full_list li.odd,
#full_list li.even {
	background: none;
	color: var(--gq-text);
}
#full_list li .item {
	padding: 5px 10px 5px 12px;
	margin: 1px 0;
	border-radius: 6px;
	display: flex;
	align-items: center;
	gap: 6px;
}
#full_list .item:hover {
	background: var(--gq-hover);
}
#full_list ul ul li .item {
	padding-left: 30px;
}
#full_list ul ul ul li .item {
	padding-left: 44px;
}
a,
a:visited,
#full_list li a,
#full_list li a:visited {
	color: var(--gq-text);
}
#full_list .item a:hover {
	color: var(--gq-strong);
}
#full_list .object_link {
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Sections: "GraphQL API", "Ruby client" */
#full_list > li.gqlmd-section {
	margin-top: 14px;
}
#full_list > li.gqlmd-section > .item,
#full_list > li.gqlmd-section > .item a {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--gq-muted);
}
#full_list > li.gqlmd-section > .item a:hover {
	color: var(--gq-accent);
}

/* Groups: Queries, Objects, ... */
.gqlmd-group > .item {
	font-weight: 600;
	color: var(--gq-strong);
	cursor: pointer;
}
.gqlmd-count {
	margin-left: auto;
	min-width: 18px;
	padding: 0 6px;
	font-size: 11px;
	font-weight: 500;
	line-height: 18px;
	text-align: center;
	color: var(--gq-badge-text);
	background: var(--gq-hover);
	border-radius: 999px;
}
.gqlmd-kind {
	margin-left: auto;
	font-size: 11px;
	color: var(--gq-muted);
}

/* Chevron toggle instead of YARD's sprite */
#full_list li a.toggle,
#full_list li.collapsed a.toggle,
#full_list li.clicked > .item a.toggle {
	position: static;
	float: none;
	flex: none;
	width: 16px;
	height: 16px;
	margin: 0 -2px 0 -6px;
	background: none;
	opacity: 1;
	text-indent: 0;
	font-size: 0;
	cursor: pointer;
}
#full_list li a.toggle::before {
	content: "";
	display: block;
	width: 6px;
	height: 6px;
	margin: 4px 0 0 4px;
	border-right: 1.5px solid var(--gq-muted);
	border-bottom: 1.5px solid var(--gq-muted);
	transform: rotate(45deg);
	transition: transform 0.15s ease;
}
#full_list li.collapsed > .item a.toggle::before {
	margin-top: 5px;
	margin-left: 2px;
	transform: rotate(-45deg);
}

/* Current page */
#full_list li.clicked > .item {
	background: var(--gq-accent-soft);
	color: var(--gq-accent);
}
#full_list li.clicked > .item a,
#full_list li.clicked > .item a:visited {
	color: var(--gq-accent);
	font-weight: 600;
}

/* Search results */
#full_list.insearch li .item {
	padding-left: 12px !important;
}
#full_list li.found .item,
#full_list .found {
	background: none;
}
#full_list .found strong {
	color: var(--gq-accent);
}
#noresults {
	margin: 8px 16px;
	padding: 0;
	font-size: 12px;
	color: var(--gq-muted);
	background: none;
}

/* YARD defaults the pills and search box replace */
#full_list_nav span:after,
#full_list_nav span:last-child:after {
	content: none;
}
#search {
	width: auto;
	margin: 10px 0 0;
	padding: 0;
	font-size: 13px;
}
#search input {
	width: 100%;
}
#search input::-webkit-search-cancel-button {
	cursor: pointer;
}

/* Search: show matches inside collapsed groups too (YARD's
   `li.collapsed ul` rule outranks its own `.insearch ul`) */
#full_list.insearch li.collapsed ul {
	display: block;
}

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