/* Layout, cards and task navigation come from github-catalog.css. */
#tools-catalog{margin:0 0 30px;min-width:0}
#workspace #tools-catalog .gh-heading h1{font:750 28px/1.2 var(--font-sans);letter-spacing:-.025em;margin:0}
#tools-catalog .tc-draft{font-size:12px;color:var(--muted)}
#tools-catalog .tc-kind{margin-right:auto;font-size:12px;min-width:0}
#tools-catalog .tc-detail{padding-top:15px}
#tools-catalog .tc-detail p{font-size:14px;line-height:1.65;margin:0;color:#394858;overflow-wrap:anywhere}
#tools-catalog .tc-detail-actions{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:16px 0 0}
#tools-catalog .tc-detail-actions .gh-close{margin:0}
#tools-catalog .tc-detail .tc-license{font-size:12px;color:var(--muted);margin-top:16px}
#tools-catalog .tc-more{display:flex;justify-content:center;gap:18px;width:100%;margin-top:20px}
#tools-catalog .tc-more span{font-size:11px;color:var(--muted)}
@media(max-width:800px){
 #workspace #tools-catalog .gh-heading h1{font-size:27px}
 #tools-catalog .tc-draft{grid-column:2;grid-row:1}
}
@media(max-width:560px){
 .tools-catalog-open #global-search{width:100%;flex-basis:100%}
 #tools-catalog .tc-more{flex-direction:column;gap:3px}
}

/* Compact categories use the existing shared navigation and icons. */
#tools-catalog .tc-nav-task>svg{display:block;flex-shrink:0}
#tools-catalog .gh-category>svg{stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#tools-catalog .tc-nav-line{display:block;white-space:nowrap}
#tools-catalog .tc-nav-task>span:not(.gh-category-count){min-width:0;max-inline-size:15ch;text-wrap:balance}
@media(max-width:800px){
 #tools-catalog .gh-menu{gap:2px;padding:3px 0 6px}
 #tools-catalog .gh-category{flex:0 0 96px;width:96px;min-height:66px;padding:6px 4px;gap:4px;justify-content:flex-start;white-space:normal}
 #tools-catalog .gh-category>svg{width:20px;height:20px}
 #tools-catalog .gh-category-short{min-block-size:29px}
 #tools-catalog .tc-nav-task>svg{display:block;flex-shrink:0}
 #tools-catalog .tc-nav-task>span:not(.gh-category-count){font-size:11px;line-height:1.3;max-inline-size:88px;min-block-size:29px}
}

/* Direct actions are siblings of the expandable summary, never under its overlay. */
#tools-catalog .tc-card-actions{display:flex;align-items:center;gap:8px;padding:0;flex-wrap:nowrap;flex-shrink:0}
#tools-catalog .tc-action{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px;padding:6px 9px;border:1px solid transparent;border-radius:4px;font:700 12px/1.4 var(--font-sans);color:white;text-decoration:none}
#tools-catalog .tc-action-website{background:#2447d6}
#tools-catalog .tc-action-github{background:transparent;border-color:var(--line);color:#394858}
#tools-catalog .tc-action:hover{filter:brightness(.88);color:white}
#tools-catalog .tc-action svg{width:15px;height:15px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7}
#tools-catalog .tc-action .tc-github-icon{fill:currentColor;stroke:none}
#tools-catalog .tc-detail p.tc-story+p.tc-story{margin-top:12px}

/* Shared auto-sized rows align closed card pairs without clipping real text. */
#tools-catalog .gh-projects{align-items:stretch;row-gap:0;column-gap:24px}
#tools-catalog .gh-row{display:grid;grid-template-rows:subgrid;grid-row:span 5;row-gap:0;margin-bottom:24px}
#tools-catalog .gh-summary{display:grid;grid-template-rows:subgrid;grid-row:span 3;row-gap:0;padding:0;min-height:0}
#tools-catalog .gh-summary h3{margin:0;padding:14px 40px 0 16px}
#tools-catalog .gh-pick{flex-direction:column;align-items:flex-start;gap:6px}
#tools-catalog .gh-project-category{font-size:12px;line-height:1.4}
#tools-catalog .gh-summary>p{margin:0;padding:8px 16px 10px;line-height:1.6}
#tools-catalog .gh-summary>.gh-format{margin:0;padding:0 40px 10px 16px;align-items:center;gap:12px}
#tools-catalog .gh-arrow{top:auto;bottom:14px;right:16px}
#tools-catalog .tc-card-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 16px 14px}
#tools-catalog .tc-action-github:hover{background:var(--soft);filter:none;color:var(--ink)}
#tools-catalog .tc-action-primary{background:#2447d6;border-color:transparent;color:white}
#tools-catalog .tc-action-primary:hover{background:#1936b7;color:white}
#tools-catalog .tc-price{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%;font-size:12px;line-height:1.4;color:#445369}
#tools-catalog .tc-price svg{width:16px;height:16px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.7}
#tools-catalog .tc-price[data-pricing=free],#tools-catalog .tc-price[data-pricing=freemium],#tools-catalog .tc-price[data-pricing=local_free]{color:#17613f}
#tools-catalog .tc-price[data-pricing=trial]{color:#82530e}
#tools-catalog .tc-unsynced{display:block;align-self:start}
#tools-catalog .tc-unsynced .gh-summary{display:block}
#tools-catalog .tc-more{margin-top:0}
@media(max-width:800px){
 #tools-catalog .gh-projects{row-gap:16px}
 #tools-catalog .gh-row{display:block;grid-row:auto;margin-bottom:0}
 #tools-catalog .gh-summary{display:block}
 #tools-catalog .gh-summary h3{padding-left:14px}
 #tools-catalog .gh-summary>p{padding-left:14px;padding-right:14px}
 #tools-catalog .gh-summary>.gh-format{padding-left:14px}
 #tools-catalog .tc-card-footer{padding-left:14px;padding-right:14px;gap:8px}
 #tools-catalog .tc-card-actions{padding:0}
 #tools-catalog .tc-price{max-width:none}
 #tools-catalog .tc-action{min-height:40px}
 #tools-catalog .tc-more{margin-top:20px}
}

/* Keyboard users can bypass the long task list without changing site navigation. */
#tools-catalog .tc-skip-tasks{position:absolute;width:1px;height:1px;padding:0;border:0;clip-path:inset(50%);overflow:hidden}
#tools-catalog .tc-skip-tasks:focus{position:static;width:auto;height:auto;clip-path:none;overflow:visible;display:block;min-height:44px;padding:8px;background:white;color:var(--blue);font-size:13px}
#tools-catalog .tc-task-toggle{display:none}
@media(max-width:800px){
 .tools-catalog-open #query{font-size:16px}
 #tools-catalog .gh-topic-sidebar{padding-top:4px}
 #tools-catalog .gh-list-head{min-height:44px;padding:12px 0 8px}
 #tools-catalog .tc-task-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
 #tools-catalog .tc-task-heading h2{margin:0}
 #tools-catalog .tc-task-toggle{display:inline-flex;align-items:center;min-height:44px;padding:8px 0;border:0;background:none;color:var(--blue);font:650 13px/1.4 var(--font-sans)}
 #tools-catalog [data-tasks-expanded=true] .gh-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible;gap:4px 8px}
 #tools-catalog [data-tasks-expanded=true] .gh-category{width:auto;min-width:0;min-height:44px;flex-direction:row;text-align:left;justify-content:flex-start;white-space:normal;padding:8px;gap:8px}
 #tools-catalog [data-tasks-expanded=true] .tc-nav-task{min-height:52px}
 #tools-catalog [data-tasks-expanded=true] .tc-nav-task>svg{display:none}
 #tools-catalog [data-tasks-expanded=true] .gh-category>span:not(.gh-category-count){flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px;line-height:1.4}
 #tools-catalog [data-tasks-expanded=true] .tc-nav-task>span:not(.gh-category-count){min-block-size:0;max-inline-size:none}
 #tools-catalog [data-tasks-expanded=true] .gh-category-count{display:block;flex-shrink:0}
 #tools-catalog [data-tasks-expanded=true] .gh-category-full{display:block}
 #tools-catalog [data-tasks-expanded=true] .gh-category-short{display:none}
 #tools-catalog [data-tasks-expanded=true] [data-tools-group=all]{display:flex;grid-column:1/-1;width:auto}
 #tools-catalog #tools-results-title{scroll-margin-top:16px}
 #tools-catalog .gh-query button{min-height:44px}
 #tools-catalog .tc-action{min-height:44px}
}

/* Selecting a task changes only its colour, never the row's text metrics. */
#tools-catalog .gh-menu .gh-category{font-weight:500}
#tools-catalog .gh-layout{overflow-anchor:none}
@media(min-width:801px){
 #tools-catalog .gh-layout{grid-template-columns:minmax(0,1fr) 248px;gap:28px;min-height:var(--tc-workspace-height,0px)}
 #tools-catalog .gh-topic-sidebar{padding-left:18px}
 #tools-catalog .gh-category{gap:8px;padding:7px 8px}
 #tools-catalog .gh-list{position:sticky;top:20px;align-self:start}
}

/* Instrument topics occupy exactly the existing shared-header icon strip. */
.usb-global-header .topics [data-tools-area]{display:flex;flex:0 0 44px;align-items:center;justify-content:center;width:44px;height:44px;padding:10px;border:0;border-bottom:2px solid transparent;background:none;color:var(--ink)}
.usb-global-header .topics [data-tools-area]:hover{color:var(--blue);background:var(--soft)}
.usb-global-header .topics [data-tools-area][aria-pressed=true]{border-bottom-color:var(--blue);color:var(--blue);background:#edf1ff}
.usb-global-header .topics [data-tools-area]:focus-visible{outline-offset:-2px}
.usb-global-header .topics [data-tools-area] svg{fill:none;stroke:currentColor;stroke-width:1.6}
#tools-catalog .tc-action-launch{background:#2447d6;color:white}

/* Tools made for the task come first; the rest sit under one divider. */
#tools-catalog .tc-also{grid-column:1/-1;margin:4px 0 16px;padding-top:16px;border-top:1px solid var(--line);font:700 13px/1.4 var(--font-sans);color:var(--muted)}
#tools-catalog .tc-label{display:block;font:700 12px/1.4 var(--font-sans);color:var(--ink);margin-bottom:2px}

#tools-catalog .tc-role{font-size:12px;color:var(--muted);border:1px solid var(--line);border-radius:4px;padding:2px 6px;max-width:100%;overflow-wrap:anywhere}

#tools-catalog .tc-nav-heading{padding:12px 8px 4px;color:var(--muted);font:700 11px/1.4 var(--font-sans);text-transform:uppercase;letter-spacing:.04em}
#tools-catalog .tc-subfilters{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px}
#tools-catalog .tc-subfilters button{min-height:36px;padding:7px 10px;border:1px solid var(--line);border-radius:4px;background:white;color:var(--ink);font:600 12px/1.4 var(--font-sans)}
#tools-catalog .tc-subfilters button[aria-pressed=true]{background:var(--blue);border-color:var(--blue);color:white}
@media(max-width:800px){
 #tools-catalog .tc-nav-heading{display:none}
 #tools-catalog [data-tasks-expanded=true] .tc-nav-heading{display:block;grid-column:1/-1;padding:12px 8px 4px}
 #tools-catalog .tc-subfilters button{min-height:44px}
}
