/* Free tools hub, /free-tools/ (0.16.0). Frame from blog.css (hero, ruled topic band, rails); the catalogue is its own:
   rounded tool cards, each previewing the calculator (the homepage .cw-* calculator card, small) on the dark
   violet plate with contours. Calculate hue only in the previews, bearings and the active filter. No counts (they change). */

/* Hero: the headline runs on two wide lines; the line under it sits in a narrower column (as the homepage hero) */
.bh--ft .bh-intro h1 .l{white-space:nowrap}
.bh--ft .bh-intro p.ft-lede{max-width:600px}
@media (max-width:700px){.bh--ft .bh-intro h1 .l{white-space:normal}}
.ft-facts{margin:18px auto 0!important;font:500 13px/1.4 var(--mono)!important;letter-spacing:.06em;color:#5A3FC4!important;text-transform:uppercase}
.ft-facts i{font-style:normal;margin:0 6px;color:#B9AEE6}

/* Topic pills, the "Browse all calculators" button and the pager: the blog's, in violet (as .bh--st does in green) */
.bh--ft .bh-pills a:hover,.bh--ft .bh-pills a:focus-visible,.bh--ft .bh-pills a[aria-current]{border-color:#5A3FC4;background:#F5F1FF;color:#5A3FC4}
.bh--ft .bh-eyebrow{color:#5A3FC4}
.ft-btn{background:#fff;color:var(--ink);border:1px solid #CFD5D2;transition:border-color .15s ease,background-color .15s ease}
.ft-btn:hover{background:#F3F5F4;border-color:#9AA5A0}
.ft-btn .arr{display:inline-block;transition:transform .15s ease}
.ft-btn:hover .arr{transform:translateX(3px)}
.bh--ft .gcta{margin-top:56px}
.bh--ft .bh-pg-nums span[aria-current]{border-color:#5A3FC4;background:#F5F1FF;color:#5A3FC4}
.bh--ft a.bh-pg-prev:hover,.bh--ft a.bh-pg-next:hover{border-color:#5A3FC4;background:#F5F1FF}

/* Catalogue: rounded cards like the rest of the site (as the blog and stats cards: the panel runs to the card edges, 20px top corners; the text block carries the border and the bottom corners) */
.ft-cat{padding-block:72px 96px!important}
.ft-cells{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;padding:0 20px}
.ft-cell{position:relative;display:flex;flex-direction:column;min-width:0;border-radius:20px;background:#fff;cursor:pointer}

.ft-cell[hidden]{display:none}

/* Preview: the calculator card on the dark violet plate (the hero recipe for large coloured areas), with violet contours */
.ft-pv{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;justify-content:center;min-height:330px;padding:36px 30px;border-radius:20px 20px 0 0;background:radial-gradient(120% 90% at 85% 0%,#2C1F72 0,#170E3A 55%,#0E0826 100%)}
.ft-ter{position:absolute;inset:0;width:100%;height:100%;z-index:-1;opacity:.55;pointer-events:none;transform-origin:60% 40%;transition:transform .6s cubic-bezier(.2,.7,.2,1),opacity .4s ease}
.ft-mini{width:100%;max-width:340px;background:#fff;border-radius:12px;box-shadow:0 24px 44px -20px rgba(6,2,20,.7)}
.ft-mini .cw-h{flex-wrap:wrap;gap:6px 8px;padding:11px 14px}
.ft-mini .cw-h b{font-size:13.5px;white-space:nowrap}
.ft-mini .cw-chip{margin-left:auto;font-size:10px;white-space:nowrap}
.ft-in{display:grid;gap:7px;padding:11px 14px 0}
.ft-in--2{grid-template-columns:1fr 1fr}
.ft-in--3{grid-template-columns:1fr 1fr 1fr}
.ft-in .cw-f{padding:6px 9px;min-width:0}
.ft-in .cw-f span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ft-in .cw-f b{font-size:13.5px}
.ft-out{padding:10px 14px 13px}
.ft-out .cw-res{padding:9px 12px}
.ft-out .cw-res b{font-size:28px}
.ft-fx{display:block;margin-top:9px;font:400 10.5px/1.45 var(--mono);color:#6B6390;white-space:normal}

/* Hover and keyboard focus: the blog and stats card hover in violet. The card stays still; the contours zoom in a
   little and brighten (.6s, the site's easing), the title and the card border take the hue (no underline, as on the blog and stats cards), the button darkens one step
   and its arrow nudges. */
.ft-cell:hover .ft-ter,.ft-cell:focus-within .ft-ter{transform:scale(1.04);opacity:.85}
.ft-cell:hover .ft-cb,.ft-cell:focus-within .ft-cb{border-color:rgba(90,63,196,.55)}
.ft-cell:hover h2,.ft-cell:focus-within h2{color:#5A3FC4}
.ft-cell:hover .ft-use .arr,.ft-use:focus-visible .arr{transform:translateX(3px)}
.ft-use:focus-visible{outline:2px solid var(--ink);outline-offset:3px}

/* Text and the button */
.ft-cb{display:flex;flex-direction:column;flex:1;padding:24px 24px 24px;border:1px solid var(--rail);border-top:0;border-radius:0 0 20px 20px;background:#fff;transition:border-color .2s ease}
.ft-meta{margin:0 0 10px;font:600 11px/1.3 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:#5A3FC4}
.ft-cb h2{margin:0;font:600 22px/1.25 var(--serif);letter-spacing:-.01em;color:var(--ink);transition:color .2s ease}
.ft-q{margin:8px 0 22px;font-size:16px;line-height:1.55;color:var(--muted)}
/* Card button: --calculate, each card's single primary action (manual: page-type hue button = the primary action of
   a section or step card; each tool card is one). Hover darkens one step. "Browse all calculators" is the second
   action of the section, so it is --soft (manual: "a second action is --soft on white"). */
.ft-use{position:static;margin-top:auto;justify-content:center;width:100%;background:#A78BFA;color:#170E3A;border:0;transition:background-color .15s ease}
.ft-cell:hover .ft-use,.ft-use:focus-visible{background:#9572F5}
/* One link per card: the button's link covers the whole card, so a click anywhere opens the calculator */
.ft-use::after{content:"";position:absolute;inset:0;z-index:1;border-radius:20px}
.ft-use .arr{display:inline-block;transition:transform .15s ease}

@media (max-width:1180px){.ft-cells{grid-template-columns:repeat(2,minmax(0,1fr))}.ft-pv{padding:28px 18px}}
@media (max-width:700px){
  .ft-cat{padding-block:48px 64px!important}
  .ft-cells{grid-template-columns:minmax(0,1fr);gap:20px;padding:0}
  .ft-pv{min-height:0;padding:28px 18px}
  .ft-cb{padding:20px 20px 22px}
}
@media (max-width:420px){.ft-pv{padding:22px 10px}.ft-in{gap:5px;padding:10px 10px 0}.ft-in .cw-f{padding:5px 7px}.ft-in .cw-f b{font-size:12.5px}.ft-mini .cw-h,.ft-out{padding-left:10px;padding-right:10px}}
@media (prefers-reduced-motion:reduce){.ft-ter,.ft-cb,.ft-cb h2,.ft-use .arr{transition:none}.ft-cell:hover .ft-ter,.ft-cell:focus-within .ft-ter{transform:none}}
/* The whole card is the link (0.18.0 fix): the button's stretched link must keep covering the card while pressed.
   .btn:active moves the button with a transform, which made the stretched link shrink to the button on mousedown,
   so a click on the cover or the text never reached the link. No transform on the card button. */
.ft-use,.ft-use:hover,.ft-use:active,.ft-use:focus-visible{transform:none!important}

/* 0.21.0: calculator card count-up (free-tools.js): the result box glows once in Calculate purple while it counts */
.ft-cell .cw-res{transition:box-shadow .6s cubic-bezier(.2,.7,.2,1)}
.ft-cell .cw-res.is-calc{box-shadow:inset 0 0 0 1.5px rgba(167,139,250,.55)}
.ft-cell .cw-res b{display:inline-block;font-variant-numeric:tabular-nums;will-change:transform,opacity}
