/* Каталог /tools/: недавние, поиск, задачи, строки инструментов. Разметка — templates/components/tool-catalog.php. */
.cat-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 var(--s-md); }
.cat-recent[hidden] { display: none; }
.cat-recent-h { font-size: .85rem; font-weight: 600; color: var(--text-muted); }
.prose .cat-recent ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.prose .cat-recent li { margin: 0; padding: 0; }
.cat-recent li::before { content: none; }
.prose .cat-recent a { display: block; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--card); color: var(--text); font-size: .9rem; line-height: 1.3; text-decoration: none; }
.prose .cat-recent a:hover { border-color: var(--cyan); }
.cat-recent small { display: block; max-width: 30ch; overflow: hidden; color: var(--text-muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.cat-clear { min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--cyan); font: inherit; font-size: .9rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.tool-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cat-more { margin: var(--s-sm) 0; border: 1px solid var(--line); border-radius: var(--r-md); padding: 0 14px; }
.cat-more > summary { display: flex; align-items: center; min-height: 44px; font-size: .875rem; font-weight: 600; cursor: pointer; list-style: none; color: var(--text); }
.cat-more > summary::-webkit-details-marker { display: none; }
.cat-more > summary::after { content: "▾"; margin-left: auto; color: var(--text-muted); }
.cat-more[open] > summary::after { content: "▴"; }
.cat-group { scroll-margin-top: calc(var(--header-h) + 16px); margin-top: var(--s-lg); }
.cat-group[hidden] { display: none; }
.prose .cat-group h3 { margin: 0 0 var(--s-xs); }
.prose .cat-hub, .prose .cat-also { margin: var(--s-xs) 0; color: var(--text-muted); font-size: .95rem; line-height: 1.55; }
.prose ul.cat-rows { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.prose .cat-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 8px 24px; align-items: start; margin: 0; padding: 14px 8px; border-bottom: 1px solid var(--line); }
.cat-row::before { content: none !important; }
.cat-row[hidden] { display: none !important; }
.cat-row:hover { background: var(--card); }
.prose .cat-name { color: var(--text); font-weight: 600; text-decoration: none; }
.cat-name::after { content: ""; position: absolute; inset: 0; }
.cat-row:hover .cat-name { color: var(--cyan); }
.cat-name:focus-visible { outline: none; }
.cat-name:focus-visible::after { outline: 2px solid var(--cyan); outline-offset: -2px; }
.prose .cat-say { margin: 2px 0 0; color: var(--text-read); font-size: .98rem; line-height: 1.5; }
.prose .cat-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 0; color: var(--text-muted); font-size: .85rem; }
.cat-stats b { color: var(--text); }
.cat-side { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.cat-effort { color: var(--text-muted); font-size: .88rem; line-height: 1.4; }
.cat-effort em { display: block; color: var(--text-muted); font-size: .8rem; font-style: normal; }
.prose .cat-alt { position: relative; z-index: 1; display: inline-flex; align-items: center; min-height: 44px; color: var(--cyan); font-size: .9rem; }

.prose .cat-none { margin: var(--s-md) 0; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); color: var(--text); }
.cat-none[hidden] { display: none; }

@media (max-width: 767px) {
  .prose .cat-row { grid-template-columns: minmax(0, 1fr); padding: 14px 4px; }
}

/* Вариант C: что у вас есть → что получите. Линии идут от того, что на руках, к инструменту */
.is-tools .cat-top { max-width: none; display: grid; gap: 10px; margin: 6px 0 16px; }
.cat-line { color: var(--text-muted); font-size: .97rem; line-height: 1.4; margin: 0; }
.cat-q-l { display: block; font-size: .94rem; font-weight: 600; margin-bottom: 4px; }
.cat-input { display: block; width: 100%; min-height: 54px; padding: 10px 18px; border: 1.5px solid var(--line); border-radius: var(--r-field); background: var(--card); color: var(--text); font: inherit; font-size: 17px; }
.cat-input::placeholder { color: var(--text-muted); opacity: .85; }
.cat-input:focus { outline: 0; border-color: var(--cyan); }

.cat-map { position: relative; }
.cat-lines { display: none; }
.cat-col-h { display: block; font-weight: 600; font-size: .94rem; color: var(--text-muted); margin-bottom: 8px; }
.prose ul.cat-have { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.prose .cat-have li { margin: 0; padding: 0; }
.cat-have li::before { content: none !important; }
.cat-pill { position: relative; min-height: 44px; padding: 7px 13px; border-radius: 22px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: .94rem; font-weight: 600; line-height: 1.2; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.cat-pill:hover { border-color: var(--sea); }
.cat-pill[aria-pressed="true"] { border-color: var(--cyan); background: rgba(0, 229, 255, .1); }

.cat-g[hidden] { display: none; }
.cat-g + .cat-g { margin-top: 28px; }
.is-tools main .prose .cat-g-h { margin: 0 0 10px; font-size: clamp(19px, 1.8vw, 23px); }
.cat-rows2 { display: grid; gap: 6px; }
.prose a.cat-tile { display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 9px 18px 9px 14px; border-radius: var(--r-row); background: var(--card); color: inherit; text-decoration: none; transition: background .2s, opacity .3s; }
.prose a.cat-tile:hover { background: #10233a; }
.prose a.cat-tile:hover .cat-tile-go { color: var(--cyan); }
.cat-tile[hidden] { display: none !important; }
.cat-tile .tool-ic { flex: none; width: 34px; height: 34px; background: none; border: 0; border-radius: 0; color: var(--cyan); }
.cat-tile .tool-ic svg { display: block; width: 34px; height: 34px; }
.cat-tile-t { display: flex; flex-direction: column; min-width: 0; }
.cat-tile-q { font-weight: 600; font-size: 17px; line-height: 1.28; }
.cat-tile-go { font-size: 14.5px; line-height: 1.35; color: var(--text-muted); }
.cat-tile-go small { font-size: inherit; color: var(--text-muted); }
.cat-tile-go small::before { content: " · "; }

@media (max-width: 999px) {
  .is-tools .cat-top h1 { font-size: clamp(20px, 5.8vw, 34px); white-space: nowrap; letter-spacing: -.05em; }
  .cat-input { min-height: 48px; font-size: 16px; padding: 8px 16px; }
  .cat-line { font-size: .91rem; line-height: 1.35; }
  .cat-col-h { font-size: .91rem; margin-bottom: 5px; }
  .prose ul.cat-have { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 14px; }
  .cat-pill { width: 100%; font-size: 14px; padding: 4px 12px; }
  .is-tools main .prose .cat-g-h { font-size: 16.5px; letter-spacing: -.045em; margin-bottom: 8px; }
  .prose a.cat-tile { min-height: 56px; padding: 6px 12px; gap: 10px; }
  .cat-tile-q { font-size: 15.5px; line-height: 1.22; }
  .cat-tile-go { font-size: 13.5px; line-height: 1.25; }
  .cat-tile .tool-ic, .cat-tile .tool-ic svg { width: 30px; height: 30px; }
  .cat-rows2 { gap: 5px; }
  .prose a.cat-tile.is-off { display: none; }
}
@media (min-width: 1000px) {
  .is-tools .cat-top { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: 52px; margin: 12px 0 18px; align-items: end; }
  .is-tools .cat-top h1 { font-size: 32px; grid-column: 1; grid-row: 1; margin: 0; }
  .cat-line { grid-column: 1; grid-row: 2; }
  .cat-tools { grid-column: 2; grid-row: 1 / span 2; }
  .cat-input { min-height: 62px; border-radius: 24px; padding: 10px 24px; }
  .cat-map { display: grid; grid-template-columns: 300px minmax(0, 1fr); column-gap: 96px; align-items: start; }
  .cat-lines { display: block; position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
  .cat-lines path { fill: none; stroke: var(--sea); stroke-width: 1.5; opacity: .62; transition: opacity .3s, stroke-width .3s; }
  .cat-lines path.is-on { opacity: 1; stroke-width: 2.25; }
  .cat-lines path.is-off { opacity: .12; }
  .cat-lines circle { fill: var(--bg); stroke: var(--sea); stroke-width: 1.5; transition: opacity .3s; }
  .cat-lines circle.is-off { opacity: .15; }
  .cat-in { position: relative; z-index: 1; padding-top: 37px; }
  .cat-col-h { position: absolute; top: 0; left: 0; margin: 0; line-height: 1.3; }
  .prose ul.cat-have { display: grid; gap: 12px; margin: 0; justify-items: start; }
  .prose .cat-have li:nth-child(2) { margin-left: 34px; }
  .prose .cat-have li:nth-child(3) { margin-left: 62px; }
  .prose .cat-have li:nth-child(4) { margin-left: 22px; }
  .prose .cat-have li:nth-child(5) { margin-left: 50px; }
  .prose .cat-have li:nth-child(6) { margin-left: 8px; margin-top: 18px; }
  .cat-pill { min-height: 54px; padding: 10px 22px; border-radius: 27px; font-size: 16.5px; }
  .cat-tiles { position: relative; z-index: 1; }
  .is-tools main .prose .cat-g-h { font-size: 18px; margin-bottom: 12px; }
  .prose a.cat-tile.is-off { opacity: .28; }
}

/* блоки инструментов шире текста страницы */
.prose-wide:has(> .cat-map) { max-width: none; }
.prose-wide:has(> .cat-map) > :not(.cat-map) { max-width: 820px; }
