/* Tools index (/pdf-tools/) in the new design — landing/new_ui/tools.html.

   The page is built from the home page's parts, so the two read as one site: home.css is loaded
   just above this file and brings the hero backdrop (.hh__bg), the two-column hero, the tool rows
   with their group pills and filter box, the .dsk band, .facts and the closing call to action.
   Only what an index page needs of its own lives here: the job map in the hero, the filter bar that
   follows the list down, and the description line on every row.

   Load order: base.html puts the page's own head block ABOVE desk.css, public.css and pages.css,
   so a rule here loses every specificity tie. Each one carries .tools-index (or a heavier
   selector) to win the ties it needs. */

/* One 1180px column for every section, as the home page has it. .page-wrap comes from pages.css,
   so the compound selector is what beats it. */
.page-wrap.tools-index { max-width: 1180px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.tools-index .section { padding-block: clamp(44px, 6.5vw, 70px); }
.tools-index .section--cta { padding-block: 0 clamp(44px, 6.5vw, 86px); }
.tools-index .section-title { margin-bottom: 8px; align-items: flex-end; }
.tools-index .section-title h2 { font-size: clamp(24px, 3.1vw, 36px); font-weight: var(--fw-bold); letter-spacing: -.03em; }
/* home.css scopes the eyebrow pill and the band heading to .home; same pills, same tokens. */
.tools-index .eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-small); font-weight: var(--fw-bold); letter-spacing: .1em; text-transform: uppercase; color: var(--primary-text); background: var(--primary-soft); border: 1px solid var(--primary-soft-border); border-radius: 999px; padding: 5px 13px 5px 10px; }
.tools-index .eyebrow svg { width: 13px; height: 13px; fill: currentColor; stroke: none; }
.tools-index .dsk h2 { margin: 14px 0 0; font-size: clamp(24px, 2.6vw, 32px); font-weight: var(--fw-bold); letter-spacing: -.03em; line-height: 1.14; text-wrap: balance; }

/* Header over the hero, the same way the home page does it: the grid runs up behind a clear header
   and the blur comes back the moment the page moves (home-sections.js toggles .is-stuck). */
body[data-page="tools"] .sc-header { background: transparent; backdrop-filter: none; border-bottom-color: transparent; transition: background .22s ease, border-color .22s ease, box-shadow .22s ease; }
body[data-page="tools"] .sc-header.is-stuck { background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom-color: var(--border); box-shadow: 0 10px 26px -22px rgba(10,29,41,.6); }
@media (prefers-reduced-motion: reduce) { body[data-page="tools"] .sc-header { transition: none; } }

/* The hero's right side is a map, not a demo, so the columns are a little more even and both
   start at the top instead of centring on each other. */
.tools-index .hh { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: start; padding-block: clamp(26px, 4vw, 48px) clamp(26px, 4vw, 44px); }
.tools-index .hh__copy { padding-top: clamp(0px, 1.4vw, 18px); }

/* ── The job map ───────────────────────────────────────────────────────────
   Six jobs and how many tools each holds, in the same window frame the home page's demo uses.
   Every tile is a plain link to the list below, so with JS off it still takes the reader there;
   tools-index.js turns a click into the matching group pill. */
.tmap { border-radius: 28px; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 40px 84px -44px rgba(3,61,99,.5), 0 6px 16px -10px rgba(10,29,41,.2); overflow: hidden; }
.tmap__bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface-alt); }
.tmap__bar .pill { margin-left: auto; }
.tmap__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 14px; }
.tmap__t { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 11px 12px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-alt); color: var(--text); text-decoration: none; transition: background .15s, border-color .15s, color .15s; }
.tmap__t:hover { background: var(--primary-soft); border-color: var(--primary-soft-border); color: var(--primary-text); }
.tmap__i { width: 34px; height: 34px; flex-shrink: 0; border-radius: 10px; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; }
.tmap__t:hover .tmap__i { background: var(--surface); }
.tmap__i svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tmap__t b { display: block; font-size: var(--fs-body); font-weight: var(--fw-semibold); line-height: 1.25; }
.tmap__t small { display: block; margin-top: 2px; font-size: var(--fs-label); color: var(--text-muted); }
.tmap__t:hover small { color: inherit; }
.tmap__foot { display: flex; align-items: center; gap: 7px; padding: 2px 16px 14px; font-size: var(--fs-small); color: var(--text-faint); }
.tmap__foot svg { width: 13px; height: 13px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── The list ──────────────────────────────────────────────────────────────
   The filter bar follows the list down, so the pills and the search box are still in reach thirty
   rows in. 62px is the header's own height (site-chrome.css .sc-header__inner). */
.tools-index .tools__head { max-width: 720px; }
.tools-index .tools__sub { margin-top: 10px; color: var(--text-muted); line-height: 1.55; }
.tbar { position: sticky; top: 75px; z-index: 4; display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 12px; padding: 9px 12px; border-radius: 999px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(8px); }
.tools-index .tbar .segs { flex: 1 1 auto; margin-top: 0; padding: 0; justify-content: flex-start; background: transparent; border: 0; }
.tools-index .tbar .seg { height: 32px; }
.tools-index .tbar .seg[aria-selected="true"] { background: var(--primary-soft); color: var(--primary-text); box-shadow: none; }
.tools-index .tbar .tfind { flex: 0 1 260px; margin: 0; width: auto; }

/* One list, two columns, and what each tool does under its name — which is the whole point of an
   index page, and the one thing the home page's version of this list leaves out. */
.tools-index .toollist { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 4px 18px; }
.tools-index .toolrow { align-items: flex-start; gap: 13px; padding: 11px 13px; }
.tools-index .toolrow__icon { width: 40px; height: 40px; border-radius: 12px; }
.tools-index .toolrow__icon svg { width: 19px; height: 19px; }
/* Marketplace rows carry the platform's own logo, which needs a white tile of its own to read in
   dark mode as well as light. */
.tools-index .toolrow__icon--img { background: #fff; border: 1px solid var(--border); }
.tools-index .toolrow__icon--img img { width: 24px; height: 24px; border-radius: 5px; }
.toolrow__txt { min-width: 0; }
.tools-index .toolrow__name { display: block; line-height: 1.3; }
.toolrow__txt small { display: block; margin-top: 2px; font-size: var(--fs-label); color: var(--text-muted); line-height: 1.45; }
/* On an index page, whether a tool uploads the file is part of what the reader came to find out,
   so the tag sits on the row instead of waiting for a hover (home.css fades it in). */
.tools-index .toolrow__tag { opacity: 1; align-self: center; white-space: nowrap; }
/* stars.js wraps each row in a .fav-row; the filter hides the row, so the wrapper has to go with
   it or the star is left behind on an empty line. */
.tools-index .toollist .fav-row { border-radius: var(--r-md); }
.tools-index .toollist .fav-row:has(> [hidden]) { display: none; }

/* ── Where the file goes ───────────────────────────────────────────────────
   The list says "on device" row by row; these two cards say what that means. */
.twhere { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.twhere__c { padding: 17px 19px; }
.twhere__h { display: flex; align-items: center; gap: 11px; }
.twhere__h b { font-size: var(--fs-section); font-weight: var(--fw-bold); }
.twhere__h .pill { margin-left: auto; }
.twhere__c p { margin-top: 11px; color: var(--text-muted); line-height: 1.6; }
.twhere__c p + p { margin-top: 8px; font-size: var(--fs-label); color: var(--text-faint); }

/* ── The hero rail ─────────────────────────────────────────────────────────
   All 39 tools roll past here, so a marketplace logo has to sit in a chip beside the drawn icons.
   Before home-sections.js sets the rail rolling - and for a reader who has asked for no motion,
   where it never rolls - the chips lay themselves out as a grid, which 39 of them turn into a block
   seven rows deep. On this page it stays one row, which can be swiped instead. */
.toolchip__i--img { background: #fff; border: 1px solid var(--border); }
.toolchip__i--img img { width: 18px; height: 18px; border-radius: 4px; }
.tools-index .marq--tools { overflow-x: auto; scrollbar-width: none; }
.tools-index .marq--tools::-webkit-scrollbar { display: none; }
.tools-index .marq--tools .marq__track { display: flex; width: max-content; }
.tools-index .marq--tools.is-rolling { overflow: hidden; }

/* A jump to a section clears the header, which is 62px tall once it is stuck */
.tools-index [id] { scroll-margin-top: 74px; }

/* ── Sellers band ──────────────────────────────────────────────────────────
   The twelve marketplaces as a logo wall beside the copy, which answers "is mine in there?"
   without sending the reader back up to the list. */
.tbrands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-content: start; min-width: 0; }
.tools-index .tbrands .sellers__brand { white-space: normal; }

@media (max-width: 1080px) {
  .tools-index .hh { grid-template-columns: minmax(0, 1fr); }
  .tools-index .hh__copy { padding-top: 0; }
}
@media (max-width: 860px) {
  .twhere { grid-template-columns: 1fr; }
  /* Seven pills and a search box wrap to three lines on a phone, which is too much of the screen
     to pin under the header, so the bar stops following the list and simply sits above it. */
  .tbar { position: static; }
  .tools-index .tbar .tfind { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .tmap__grid { grid-template-columns: 1fr; }
  .tbar { border-radius: var(--r-lg); }
  .tbrands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
