/* "Everything PrimCut does": every feature as a list, after the tool cards (index.html #features).
   Markup from scripts/build-features.cjs; chips, search and the Highlights view from assets/js/feature-index.js.
   Without the script every row shows, grouped by category. */
.fx-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* heading with the search beside it, then the chips */
.fx-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 48px; margin-bottom: 28px; }
.feat-index .sec-head { flex: 1 1 560px; max-width: 780px; margin: 0; text-align: left; }
.feat-index .sec-head p { margin-left: 0; max-width: 690px; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.fx-chips[hidden], .fx-search[hidden] { display: none; }
.fx-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 100px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); font: 700 14px/1.2 'DM Sans', sans-serif; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.fx-chip span { font: 500 11px/1 'JetBrains Mono', monospace; color: var(--dim); }
.fx-chip:hover { border-color: var(--ink); }
.fx-chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--inverse-ink); }
.fx-chip[aria-pressed="true"] span { color: var(--accent); }
.fx-search { position: relative; flex: 0 1 320px; }
.fx-search svg { position: absolute; left: 15px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: none; stroke: var(--dim); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.fx-search input { width: 100%; padding: 10px 16px 10px 40px; border: 1.5px solid var(--line); border-radius: 100px; background: var(--bg); color: var(--ink); font: 500 15px/1.3 'DM Sans', sans-serif; outline: none; transition: border-color .15s, box-shadow .15s; }
.fx-search input::placeholder { color: var(--dim); }
.fx-search input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent); }
.fx-chip:focus-visible, .fx-more button:focus-visible, .fx-docs:focus-visible { outline: 3px solid #C2410C; outline-offset: 2px; }

/* groups */
.fx-group[hidden], .fx-row[hidden] { display: none; }
.fx-group-title { display: flex; align-items: center; gap: 10px; margin: 30px 0 4px; padding: 0 14px 10px; border-bottom: 1.5px solid var(--ink); font-size: 21px; font-weight: 900; }
.fx-group-title span { font: 500 11px/1 'JetBrains Mono', monospace; letter-spacing: .04em; color: var(--muted); background: var(--card); padding: 5px 8px; border-radius: 100px; }
/* Highlights and a single category read as one list: no group headings, one rule on top */
.fx-list[data-view="hl"], .fx-list[data-view="cat"] { margin-top: 22px; border-top: 1.5px solid var(--ink); }
.fx-list[data-view="hl"] .fx-group-title, .fx-list[data-view="cat"] .fx-group-title { display: none; }

/* rows: the whole row is the link to its spot in the docs */
.fx-rows { list-style: none; }
.fx-row { position: relative; display: grid; grid-template-columns: 44px minmax(0, 290px) minmax(0, 1fr) 132px; column-gap: 24px; align-items: center; padding: 16px 14px; border-radius: 14px; transition: background .15s; scroll-margin: 110px 0; }
.fx-row::before { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 1px; background: var(--line); }
.fx-row:hover { background: var(--card); }
.fx-row:hover::before { opacity: 0; }
.fx-row:has(a:focus-visible) { outline: 3px solid #C2410C; outline-offset: -3px; }
.fx-ic { width: 44px; height: 44px; padding: 10px; border-radius: 12px; background: #0d0f0b; box-shadow: inset 0 0 0 1px rgba(255,255,255,.07), 0 6px 14px -8px rgba(0,0,0,.45); overflow: visible; }
.fx-name { min-width: 0; }
.fx-name h4 { font-size: 16.5px; font-weight: 800; line-height: 1.25; letter-spacing: -0.015em; }
.fx-name a { outline: none; }
.fx-name a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.fx-tool { display: block; margin-top: 5px; font: 500 10.5px/1.4 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.fx-desc { color: var(--muted); font-size: 15px; line-height: 1.55; }
.fx-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.fx-tag { display: inline-block; padding: 4px 8px; border-radius: 4px; font: 500 10.5px/1.2 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: .08em; }
.fx-tag.free { background: var(--accent); color: #000; }
.fx-tag.beta { padding: 3px 7px; border: 1px solid #9a9a96; color: var(--muted); }
.fx-meta .fx-tag + .fx-tag { margin-top: -3px; }
.fx-go { display: inline-flex; align-items: center; gap: 8px; font: 500 12.5px/1 'JetBrains Mono', monospace; color: var(--muted); white-space: nowrap; transition: color .15s; }
.fx-watch i { position: relative; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); flex-shrink: 0; transition: transform .15s; }
.fx-watch i::after { content: ""; position: absolute; left: 10px; top: 8px; border-style: solid; border-width: 5px 0 5px 8px; border-color: transparent transparent transparent var(--accent); }
.fx-row:hover .fx-go { color: var(--ink); }
.fx-row:hover .fx-watch i { transform: scale(1.08); }
.fx-row.fx-flash { animation: fx-flash 2.6s ease-out; }
@keyframes fx-flash { 0%, 35% { background: color-mix(in srgb, var(--accent) 38%, var(--bg)); } 100% { background: transparent; } }

/* show all, no matches, and the plan note */
.fx-more { margin-top: 26px; text-align: center; }
.fx-more[hidden], .fx-empty[hidden] { display: none; }
.fx-more button { font-size: 15px; padding: 13px 26px; }
.fx-empty { padding: 44px 16px; text-align: center; color: var(--muted); font-size: 16px; border-bottom: 1px solid var(--line); }
.fx-foot { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; padding: 22px 26px; border-radius: 22px; background: var(--card); }
.fx-foot p { flex: 1 1 420px; color: var(--muted); font-size: 15px; line-height: 1.6; }
.fx-foot .fx-tag { margin-right: 4px; vertical-align: 1px; }
.fx-foot-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.fx-docs { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 15px; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }

/* tablets: the description moves under the name */
@media (max-width: 980px) {
  .fx-row { grid-template-columns: 44px minmax(0, 1fr) auto; row-gap: 8px; column-gap: 18px; align-items: start; }
  .fx-ic { grid-row: 1 / span 2; }
  .fx-name { align-self: center; }
  .fx-desc { grid-column: 2 / -1; }
  .fx-meta { grid-column: 3; grid-row: 1; align-self: center; }
}

/* phones: chips scroll sideways, rows stack */
@media (max-width: 640px) {
  .fx-top { gap: 18px; margin-bottom: 18px; }
  .fx-search { flex: 1 1 100%; }
  .fx-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -18px; padding: 2px 18px 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent); }
  .fx-chips::-webkit-scrollbar { display: none; }
  .fx-group-title { font-size: 19px; padding: 0 4px 10px; }
  .fx-row { grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 12px; row-gap: 10px; padding: 16px 4px; border-radius: 12px; }
  .fx-row::before { left: 4px; right: 4px; }
  .fx-ic { width: 40px; height: 40px; padding: 9px; border-radius: 11px; grid-row: 1; }
  .fx-name h4 { font-size: 16px; }
  .fx-desc { grid-column: 1 / -1; font-size: 14.5px; line-height: 1.5; }
  .fx-meta { gap: 6px; }
  .fx-go { font-size: 12px; gap: 6px; }
  .fx-watch i { width: 22px; height: 22px; }
  .fx-watch i::after { left: 8.5px; top: 6.5px; border-width: 4.5px 0 4.5px 7px; }
  .fx-foot { padding: 20px; }
  .fx-foot-actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .fx-row, .fx-go, .fx-watch i { transition: none; } }
