.gh-tools-directory { --gh-td-gap: 20px; }
.gh-td-search {
	display: grid; grid-template-columns: minmax(280px, 1.7fr) repeat(3, minmax(150px, .7fr)) auto;
	gap: 12px; align-items: stretch; margin-block: 28px 34px; padding: 14px;
	background: var(--gh-bg-surface); border: 1px solid var(--gh-border-default); border-radius: var(--gh-radius-card);
}
.gh-td-search-field { position: relative; display: flex; align-items: center; min-width: 0; }
.gh-td-search-field svg { position: absolute; inset-inline-start: 16px; width: 21px; height: 21px; color: var(--gh-text-tertiary); pointer-events: none; }
.gh-td-search input, .gh-td-search select {
	width: 100%; min-width: 0; min-height: 52px; padding: 10px 16px; color: var(--gh-text-primary);
	background: var(--gh-bg-sunken); border: 1px solid var(--gh-border-default); border-radius: var(--gh-radius-control); outline: none;
}
.gh-td-search input { padding-inline-start: 48px; }
.gh-td-search input:focus, .gh-td-search select:focus { border-color: var(--gh-accent-solid); box-shadow: var(--gh-focus-ring); }
.gh-td-search .gh-btn { min-height: 52px; white-space: nowrap; }
.gh-td-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 28px; align-items: start; }
.gh-td-sidebar {
	grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--gh-header-height, 80px) + 18px);
	background: var(--gh-bg-surface); border: 1px solid var(--gh-border-default); border-radius: var(--gh-radius-card); overflow: hidden;
}
.gh-td-sidebar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 18px 15px; border-bottom: 1px solid var(--gh-border-subtle, var(--gh-border-default)); }
.gh-td-sidebar-head span { font-size: 17px; font-weight: 850; }
.gh-td-sidebar-head small { color: var(--gh-text-tertiary); font-size: var(--gh-font-caption); }
.gh-td-sidebar nav { display: grid; padding: 8px; }
.gh-td-sidebar a {
	display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 9px 12px;
	border-radius: var(--gh-radius-control); color: var(--gh-text-secondary); text-decoration: none; font-size: 14px; font-weight: 670;
}
.gh-td-sidebar a svg { width: 18px; height: 18px; }
.gh-td-sidebar a small { min-width: 28px; text-align: center; color: var(--gh-text-tertiary); font-variant-numeric: tabular-nums; }
.gh-td-sidebar a:hover { background: var(--gh-bg-sunken); color: var(--gh-text-primary); }
.gh-td-sidebar a.is-active { background: color-mix(in srgb, var(--gh-accent-solid) 11%, var(--gh-bg-surface)); color: var(--gh-accent-text); }
.gh-td-results { grid-column: 1; grid-row: 1; min-width: 0; }
.gh-td-results-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-block-end: 18px; }
.gh-td-results-head span { display: block; color: var(--gh-accent-text); font-size: var(--gh-font-kicker); font-weight: 750; }
.gh-td-results-head h2 { margin: 2px 0 0; font-size: clamp(24px, 3vw, 34px); }
.gh-td-results-head strong { color: var(--gh-text-secondary); font-size: 14px; white-space: nowrap; }
.gh-td-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gh-td-gap); }
.gh-td-card {
	display: flex; flex-direction: column; min-height: 346px; padding: 20px; overflow: hidden;
	background: var(--gh-bg-surface); border: 1px solid var(--gh-border-default); border-radius: var(--gh-radius-card);
}
.gh-td-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.gh-td-logo {
	position: relative; display: grid; place-items: center; width: 68px; height: 68px; flex: 0 0 68px; overflow: hidden;
	background: color-mix(in srgb, var(--gh-accent-solid) 9%, var(--gh-bg-sunken)); border: 1px solid var(--gh-border-default); border-radius: 20px;
}
.gh-td-logo b { color: var(--gh-accent-text); font-size: 25px; font-weight: 900; }
.gh-td-logo img { position: absolute; inset: 11px; width: calc(100% - 22px); height: calc(100% - 22px); object-fit: contain; }
.gh-td-featured { padding: 5px 10px; color: var(--gh-accent-text); background: color-mix(in srgb, var(--gh-accent-solid) 10%, transparent); border-radius: 999px; font-size: 12px; font-weight: 800; }
.gh-td-card-body { padding-block: 20px 15px; }
.gh-td-card-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.gh-td-card h3 { margin: 0; font-size: 20px; font-weight: 850; line-height: 1.45; }
.gh-td-card-title span { max-width: 115px; overflow: hidden; text-overflow: ellipsis; color: var(--gh-text-tertiary); font-size: 11px; white-space: nowrap; }
.gh-td-card p { margin: 10px 0 0; color: var(--gh-text-secondary); font-size: 14px; line-height: 1.85; }
.gh-td-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-block: auto 16px; }
.gh-td-tags span { padding: 5px 9px; background: var(--gh-bg-sunken); border: 1px solid var(--gh-border-subtle, var(--gh-border-default)); border-radius: 999px; color: var(--gh-text-secondary); font-size: 11.5px; }
.gh-td-card-link {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 45px; padding: 9px 13px;
	color: var(--gh-text-primary); background: var(--gh-bg-sunken); border: 1px solid var(--gh-border-default); border-radius: var(--gh-radius-control); text-decoration: none; font-size: 13.5px; font-weight: 800;
}
.gh-td-card-link svg { width: 18px; height: 18px; color: var(--gh-accent-text); }
.gh-td-card-link:hover { color: var(--gh-accent-on-solid); background: var(--gh-accent-solid); border-color: var(--gh-accent-solid); }
.gh-td-card-link:hover svg { color: inherit; }
.gh-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; padding-block: 32px 4px; direction: ltr; }
.gh-pagination .page-numbers { display: grid; place-items: center; min-width: 43px; height: 43px; padding-inline: 10px; color: var(--gh-text-secondary); background: var(--gh-bg-surface); border: 1px solid var(--gh-border-default); border-radius: var(--gh-radius-control); text-decoration: none; font-weight: 750; }
.gh-pagination .current { color: var(--gh-accent-on-solid); background: var(--gh-accent-solid); border-color: var(--gh-accent-solid); }
.gh-td-empty { display: grid; justify-items: center; text-align: center; padding: 70px 24px; background: var(--gh-bg-surface); border: 1px dashed var(--gh-border-default); border-radius: var(--gh-radius-card); }
.gh-td-empty > span { color: var(--gh-accent-text); font-size: 52px; line-height: 1; }
.gh-td-empty h2 { margin: 14px 0 6px; }
.gh-td-empty p { margin: 0 0 18px; color: var(--gh-text-secondary); }
.gh-td-note { margin: 26px 0 0; color: var(--gh-text-tertiary); font-size: var(--gh-font-caption); text-align: center; }

@media (max-width: 1080px) {
	.gh-td-search { grid-template-columns: 1fr 1fr 1fr; }
	.gh-td-search-field { grid-column: 1 / -1; }
	.gh-td-search .gh-btn { grid-column: 3; }
	.gh-td-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
	.gh-tools-directory { --gh-td-gap: 14px; }
	.gh-td-search { grid-template-columns: 1fr 1fr; margin-block: 20px 24px; }
	.gh-td-search select, .gh-td-search .gh-btn { grid-column: auto; }
	.gh-td-layout { display: flex; flex-direction: column; gap: 22px; }
	.gh-td-sidebar { position: static; order: 0; width: 100%; overflow-x: auto; }
	.gh-td-sidebar-head { padding: 14px 16px; }
	.gh-td-sidebar nav { display: flex; width: max-content; max-width: none; padding: 8px; }
	.gh-td-sidebar a { white-space: nowrap; }
	.gh-td-sidebar a svg { display: none; }
	.gh-td-results { order: 1; width: 100%; }
}
@media (max-width: 560px) {
	.gh-td-search { grid-template-columns: 1fr; padding: 10px; }
	.gh-td-search-field, .gh-td-search select, .gh-td-search .gh-btn { grid-column: 1; }
	.gh-td-grid { grid-template-columns: 1fr; }
	.gh-td-card { min-height: 320px; }
	.gh-td-results-head { align-items: center; }
}
