/* ==========================================================================
   Free tools (/free-tools): the colourful list of tools, and each tool's page (a calm working area).
   Loaded only on these pages. Every class starts with ft- so nothing clashes with site.css.
   ========================================================================== */

/* ---------- Colours: each tool has its own ---------- */
.ft-tone-red { --t1: #ef4444; --t2: #be123c; --t-soft: #fff1f2; --t-ink: #be123c; }
.ft-tone-orange { --t1: #fb923c; --t2: #ea580c; --t-soft: #fff7ed; --t-ink: #c2410c; }
.ft-tone-green { --t1: #22c55e; --t2: #15803d; --t-soft: #f0fdf4; --t-ink: #15803d; }
.ft-tone-teal { --t1: #2dd4bf; --t2: #0f766e; --t-soft: #f0fdfa; --t-ink: #0f766e; }
.ft-tone-blue { --t1: #60a5fa; --t2: #1d4ed8; --t-soft: #eff6ff; --t-ink: #1d4ed8; }
.ft-tone-indigo { --t1: #818cf8; --t2: #4338ca; --t-soft: #eef2ff; --t-ink: #4338ca; }
.ft-tone-purple { --t1: #c084fc; --t2: #7e22ce; --t-soft: #faf5ff; --t-ink: #7e22ce; }
.ft-tone-pink { --t1: #f472b6; --t2: #be185d; --t-soft: #fdf2f8; --t-ink: #be185d; }

/* ---------- The list of tools: hero ---------- */
.ft-hero {
    position: relative; overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); align-items: center; gap: 24px;
    padding: 44px 48px; border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .13) 1px, transparent 0) 0 0 / 22px 22px,
        radial-gradient(120% 120% at 100% 0, #0f766e 0, transparent 55%),
        linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4c1d95 100%);
    color: #fff;
}
.ft-hero-copy > * { animation: ft-rise .7s var(--ease-out) both; }
.ft-hero-copy > :nth-child(2) { animation-delay: .07s; }
.ft-hero-copy > :nth-child(3) { animation-delay: .14s; }
.ft-hero-copy > :nth-child(4) { animation-delay: .21s; }
.ft-hero-tag {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
    background: rgba(255, 255, 255, .12); font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.ft-hero-tag i { color: #fbbf24; }
.ft-hero h1 { margin: 14px 0 10px; font-size: clamp(28px, 4vw, 44px); line-height: 1.12; font-weight: 800; color: #fff; }
.ft-hero h1 span { background: linear-gradient(90deg, #fbbf24, #f472b6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ft-hero p { max-width: 560px; color: rgba(255, 255, 255, .82); font-size: 15px; line-height: 1.6; }
.ft-search {
    display: flex; align-items: center; gap: 10px; max-width: 520px; margin-top: 22px; padding: 0 16px;
    height: 52px; border-radius: 14px; background: #fff; color: var(--muted); box-shadow: 0 14px 30px rgba(0, 0, 0, .25);
}
.ft-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 15px; color: var(--ink); }
.ft-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; font-size: 13px; color: rgba(255, 255, 255, .88); }
.ft-trust li { display: inline-flex; align-items: center; gap: 7px; }
.ft-trust i { color: #5eead4; }

.ft-hero-art { position: relative; aspect-ratio: 1; max-width: 360px; width: 100%; justify-self: center; }
.ft-orbit { position: absolute; inset: 9%; border-radius: 50%; border: 2px dashed rgba(255, 255, 255, .22); animation: ft-spin 40s linear infinite; }
.ft-core {
    position: absolute; inset: 34%; display: grid; place-items: center; border-radius: 30%;
    background: linear-gradient(135deg, #fbbf24, #f97316); color: #fff; font-size: clamp(30px, 4vw, 46px);
    box-shadow: 0 18px 40px rgba(249, 115, 22, .45); animation: ft-bob 4s ease-in-out infinite;
}
.ft-float {
    --angle: calc(var(--i) * 45deg);
    position: absolute; left: 50%; top: 50%; width: 19%; aspect-ratio: 1; margin: -9.5% 0 0 -9.5%;
    display: grid; place-items: center; border-radius: 28%;
    background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; font-size: clamp(16px, 2vw, 24px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .28);
    transform: rotate(var(--angle)) translateY(-205%) rotate(calc(var(--angle) * -1));
    animation: ft-pop .6s var(--ease-out) both, ft-bob 5s ease-in-out infinite;
    animation-delay: calc(var(--i) * 90ms), calc(var(--i) * -600ms);
}

.ft-jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; }
.ft-jump a {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
    background: #fff; box-shadow: var(--shadow-sm); font-size: 13px; font-weight: 600; color: var(--ink);
}
.ft-jump a:hover { color: var(--red); }

/* ---------- Groups and tool cards ---------- */
.ft-group { margin-top: 30px; scroll-margin-top: 90px; }
.ft-group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.ft-group-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #fff; font-size: 19px; }
.ft-group-print .ft-group-icon { background: linear-gradient(135deg, #818cf8, #7e22ce); }
.ft-group-pdf .ft-group-icon { background: linear-gradient(135deg, #f87171, #be123c); }
.ft-group-image .ft-group-icon { background: linear-gradient(135deg, #34d399, #0f766e); }
.ft-group-head h2 { font-size: 21px; font-weight: 700; color: var(--ink); }
.ft-group-head p { font-size: 13px; color: var(--muted); }

.ft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ft-card {
    position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: var(--radius-lg);
    background: #fff; box-shadow: var(--shadow-sm); overflow: hidden;
    transition: transform .25s var(--ease), box-shadow .25s;
}
.ft-card::after { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, var(--t1), var(--t2)); opacity: 0; transition: opacity .25s; }
.ft-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.ft-card:hover::after { opacity: 1; }
.ft-card-icon {
    display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px;
    background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; font-size: 21px;
    box-shadow: 0 8px 16px color-mix(in srgb, var(--t2) 30%, transparent);
}
.ft-card-text { display: grid; gap: 4px; flex: 1; }
.ft-card-text strong { font-size: 15px; font-weight: 700; color: var(--ink); }
.ft-card-text small { font-size: 13px; line-height: 1.5; color: var(--muted); }
.ft-card-go { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--t-ink); }
.ft-card:hover .ft-card-go i { transform: translateX(3px); }
.ft-card-go i { transition: transform .2s; font-size: 11px; }
.js .ft-group[data-reveal] .ft-card { opacity: 0; translate: 0 18px; }
.js .ft-group[data-reveal].is-visible .ft-card { animation: ft-rise .55s var(--ease-out) both; animation-delay: calc(var(--i) * 60ms); }
.ft-none { margin: 30px 0; padding: 24px; border-radius: var(--radius-lg); background: #fff; text-align: center; color: var(--muted); }

/* ---------- "We can print it" band, questions ---------- */
.ft-print {
    display: flex; align-items: center; gap: 18px; margin-top: 34px; padding: 24px 28px; border-radius: var(--radius-xl);
    background: linear-gradient(120deg, #fff 0%, #fff1f2 60%, #ffe4e6 100%); box-shadow: var(--shadow-sm);
}
.ft-print > div { flex: 1; }
.ft-print-icon { display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 18px; background: linear-gradient(135deg, #f87171, var(--red)); color: #fff; font-size: 23px; }
.ft-print h2 { font-size: 19px; font-weight: 700; color: var(--ink); }
.ft-print p { font-size: 13px; color: var(--muted); }

.ft-faq { margin: 30px 0 10px; display: grid; gap: 10px; }
.ft-faq h2, .ft-how h2, .ft-more h2 { font-size: 19px; font-weight: 700; color: var(--ink); margin-bottom: 4px; }
.ft-faq details { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.ft-faq summary { cursor: pointer; padding: 15px 18px; font-weight: 600; font-size: 14px; color: var(--ink); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.ft-faq summary::-webkit-details-marker { display: none; }
.ft-faq summary::after { content: "\f067"; font: var(--fa-font-solid); font-size: 12px; color: var(--muted); align-self: center; }
.ft-faq details[open] summary::after { content: "\f068"; }
.ft-faq details p { padding: 0 18px 16px; font-size: 14px; line-height: 1.6; color: var(--text); }

/* ---------- A tool's page ---------- */
.ft-head {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 24px; border-radius: var(--radius-xl);
    background: linear-gradient(110deg, #fff 45%, var(--t-soft)); box-shadow: var(--shadow-sm); border-left: 5px solid var(--t2);
}
.ft-head-icon { display: grid; place-items: center; flex: none; width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; font-size: 25px; }
.ft-head-text { flex: 1 1 260px; }
.ft-head h1 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; color: var(--ink); line-height: 1.2; }
.ft-head p { margin-top: 3px; font-size: 14px; color: var(--muted); }
.ft-head-trust { display: flex; flex-wrap: wrap; gap: 8px; }
.ft-head-trust li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; font-weight: 500; color: var(--text); }
.ft-head-trust i { color: var(--t-ink); }

.ft-app { margin-top: 16px; padding: 22px; border-radius: var(--radius-xl); background: #fff; box-shadow: var(--shadow-sm); }

.ft-about { margin-top: 26px; padding: 22px 24px; border-radius: var(--radius-xl); background: #fff; box-shadow: var(--shadow-sm); }
.ft-about h2 { font-size: 19px; font-weight: 700; color: var(--ink); }
.ft-about-lead { margin-top: 8px; max-width: 900px; font-size: 15px; line-height: 1.7; color: var(--text); }
.ft-about a:not(.ft-about-shop) { color: var(--t-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ft-about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.ft-about-box { padding: 16px 18px; border-radius: var(--radius); background: var(--t-soft); }
.ft-about-box h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; color: var(--ink); }
.ft-about-box h3 i { color: var(--t-ink); }
.ft-about-box ul { display: grid; gap: 7px; margin-top: 10px; }
.ft-about-box li { position: relative; padding-left: 18px; font-size: 14px; line-height: 1.55; color: var(--text); }
.ft-about-box li::before { content: ""; position: absolute; left: 3px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--t2); }
.ft-about-shop { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 10px 16px; border-radius: 999px; background: var(--red-50); color: var(--red); font-size: 13px; font-weight: 600; }
.ft-about-shop:hover { background: var(--red-100); }
.ft-faq details p a { color: var(--red); font-weight: 600; text-decoration: underline; }
.ft-how { margin-top: 26px; }
.ft-how ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
.ft-how li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); font-size: 14px; color: var(--text); }
.ft-how li span { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--red-50); color: var(--red); font-weight: 700; }
.ft-more { margin-top: 30px; }
.ft-more-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ft-more-head a { font-size: 13px; font-weight: 600; color: var(--red); }

/* ---------- Building blocks of the tools ---------- */
.ft-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 190px; padding: 26px;
    border: 2px dashed color-mix(in srgb, var(--t2) 40%, #fff); border-radius: var(--radius-lg); background: var(--t-soft);
    text-align: center; cursor: pointer; transition: background .2s, border-color .2s, transform .2s;
}
.ft-drop:hover, .ft-drop.is-over { border-color: var(--t2); background: color-mix(in srgb, var(--t-soft) 70%, var(--t1) 12%); }
.ft-drop.is-over { transform: scale(1.01); }
.ft-drop-icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; font-size: 25px; margin-bottom: 4px; box-shadow: 0 10px 20px color-mix(in srgb, var(--t2) 30%, transparent); }
.ft-drop strong { display: inline-flex; align-items: center; gap: 8px; padding: 11px 26px; border-radius: 999px; background: var(--red); color: #fff; font-size: 15px; font-weight: 600; box-shadow: var(--shadow-red); }
.ft-drop small { font-size: 13px; color: var(--muted); }
.ft-drop + .ft-split { margin-top: 16px; }
.ft-drop.is-small { flex-direction: row; min-height: 0; padding: 10px 14px; gap: 12px; }
.ft-drop.is-small .ft-drop-icon { width: 36px; height: 36px; font-size: 15px; margin: 0; box-shadow: none; }
.ft-drop.is-small strong { padding: 8px 18px; font-size: 13px; }
.ft-drop.is-small small { display: none; }

.ft-options { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 22px; margin: 16px 0; padding: 14px 16px; border-radius: var(--radius); background: var(--line-soft); }
.ft-options:empty { display: none; }
.ft-field { display: grid; gap: 6px; min-width: 0; }
.ft-field > span, .ft-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ft-field input[type="text"], .ft-field input[type="number"], .ft-field input[type="url"], .ft-field input[type="tel"], .ft-field input[type="email"], .ft-field select, .ft-field textarea {
    width: 100%; min-height: 42px; padding: 8px 12px; border: 1px solid #dcdde1; border-radius: 10px; background: #fff; font: inherit; font-size: 14px; color: var(--ink);
}
.ft-field textarea { min-height: 84px; resize: vertical; }
.ft-field input:focus, .ft-field select:focus, .ft-field textarea:focus { outline: 2px solid color-mix(in srgb, var(--t2) 45%, transparent); outline-offset: 1px; border-color: var(--t2); }
.ft-field input[type="range"] { width: 100%; accent-color: var(--t2); }
.ft-field-wide { flex: 1 1 260px; }
.ft-inline { display: flex; align-items: center; gap: 8px; }
.ft-inline input[type="number"] { width: 92px; }
.ft-unit { font-size: 13px; color: var(--muted); }
.ft-value { font-weight: 700; color: var(--ink); text-transform: none; letter-spacing: 0; }

/* Buttons that act like a choice of one (radio buttons underneath) */
.ft-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.ft-seg label { position: relative; cursor: pointer; }
.ft-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ft-seg span {
    display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 10px;
    background: #fff; box-shadow: inset 0 0 0 1px #dcdde1; font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap;
    transition: background .15s, box-shadow .15s, color .15s;
}
.ft-seg label:hover span { box-shadow: inset 0 0 0 1px var(--t2); }
.ft-seg input:checked + span { background: var(--t-soft); box-shadow: inset 0 0 0 2px var(--t2); color: var(--t-ink); font-weight: 600; }
.ft-seg input:focus-visible + span { outline: 2px solid var(--t2); outline-offset: 2px; }
.ft-seg-big span { min-height: 48px; padding: 0 18px; font-size: 14px; }

.ft-colors { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ft-colors label { position: relative; cursor: pointer; }
.ft-colors input[type="radio"] { position: absolute; opacity: 0; }
.ft-colors span { display: block; width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.ft-colors input:checked + span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--t2); }
.ft-colors .is-clear { background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 0 0 / 12px 12px; }
.ft-colors input[type="color"] { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }

.ft-check { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-size: 14px; color: var(--text); cursor: pointer; }
.ft-check input { width: 18px; height: 18px; accent-color: var(--t2); }

.ft-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.ft-actions .btn-lg { min-height: 48px; padding: 0 24px; font-size: 15px; }
.ft-btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ft-icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--text); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.ft-icon-btn:hover:not(:disabled) { color: var(--t-ink); box-shadow: inset 0 0 0 1px var(--t2); }
.ft-icon-btn:disabled { opacity: .35; cursor: default; }

.ft-msg { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--t-soft); font-size: 13px; line-height: 1.5; color: var(--text); }
.ft-msg i { margin-top: 3px; color: var(--t-ink); }
.ft-msg.is-error { background: #fef2f2; color: #991b1b; }
.ft-msg.is-error i { color: #dc2626; }
.ft-progress { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ft-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--t1), var(--t2)); transition: width .25s; }

/* A row per file */
.ft-list { display: grid; gap: 8px; margin-top: 14px; }
.ft-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.ft-item.is-selected { box-shadow: inset 0 0 0 2px var(--t2); }
.ft-item-pic { flex: none; width: 56px; height: 56px; padding: 0; border-radius: 9px; overflow: hidden; background: repeating-conic-gradient(#eef0f3 0 25%, #fff 0 50%) 0 0 / 12px 12px; cursor: pointer; }
.ft-item-pic img { width: 100%; height: 100%; object-fit: contain; }
.ft-item-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ft-item-text strong { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-item-text small { font-size: 12px; color: var(--muted); }
.ft-item-text small.is-done { color: var(--green); font-weight: 500; }
.ft-item-text small.is-error { color: #dc2626; }
.ft-item-text small.is-busy::before { content: "\f110"; font: var(--fa-font-solid); display: inline-block; margin-right: 6px; animation: ft-spin 1s linear infinite; }
.ft-item-acts { display: flex; gap: 6px; }
.ft-item-handle { color: var(--soft); cursor: grab; padding: 0 4px; }

.ft-bar {
    position: sticky; bottom: 10px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 12px;
    border-radius: 14px; background: rgba(255, 255, 255, .96); box-shadow: 0 8px 26px rgba(17, 19, 24, .14); backdrop-filter: blur(6px);
}
.ft-bar-sum { flex: 1; min-width: 160px; font-size: 13px; color: var(--muted); }
.ft-bar .btn-lg { min-height: 46px; }

/* Picture of pages / pictures you can drag around */
.ft-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 14px; }
.ft-tile { position: relative; display: grid; gap: 6px; padding: 8px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); cursor: grab; user-select: none; }
.ft-tile.is-ghost { opacity: .4; }
.ft-tile.is-off { opacity: .45; }
.ft-tile.is-off .ft-tile-pic::after { content: "Removed"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .6); font-weight: 700; color: #dc2626; }
.ft-tile-pic { position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: 8px; background: var(--line-soft); overflow: hidden; }
.ft-tile-pic img, .ft-tile-pic canvas { position: absolute; inset: 0; margin: auto; max-width: calc(100% - 12px); max-height: calc(100% - 12px); object-fit: contain; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); transition: transform .25s var(--ease); background: #fff; }
.ft-tile-num { position: absolute; top: 12px; left: 12px; z-index: 1; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: rgba(17, 19, 24, .78); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.ft-tile-name { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.ft-tile-acts { display: flex; justify-content: center; gap: 6px; }
.ft-tile-acts .ft-icon-btn { width: 32px; height: 32px; font-size: 13px; }
.ft-tile input[type="checkbox"] { position: absolute; top: 12px; right: 12px; z-index: 1; width: 20px; height: 20px; accent-color: var(--t2); }

/* A working area with the picture on one side and the choices on the other */
.ft-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.ft-stage { position: relative; display: grid; place-items: center; min-height: 280px; padding: 16px; border-radius: var(--radius-lg); background: repeating-conic-gradient(#eef0f3 0 25%, #f8f9fa 0 50%) 0 0 / 18px 18px; overflow: hidden; }
.ft-stage > canvas, .ft-stage > img { max-width: 100%; max-height: 560px; height: auto; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); background: #fff; }
.ft-stage.is-plain { background: var(--line-soft); }
.ft-stage-note { margin-top: 8px; font-size: 12px; color: var(--muted); text-align: center; }
.ft-controls { display: grid; gap: 16px; }
.ft-controls .ft-options { margin: 0; }

/* The crop frame */
.ft-crop { width: 100%; max-width: 420px; margin-inline: auto; display: block; border-radius: 6px; cursor: grab; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .1), 0 10px 26px rgba(0, 0, 0, .15); }
.ft-crop:active { cursor: grabbing; }
.ft-crop-wrap { position: relative; width: 100%; }
.ft-crop-guide { position: absolute; inset: 0; pointer-events: none; }

/* Tabs (QR types, signature draw/type) */
.ft-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.ft-tabs button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 14px; border-radius: 10px; background: var(--line-soft); font-size: 13px; font-weight: 600; color: var(--text); }
.ft-tabs button[aria-selected="true"] { background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; }

/* Pictures to pick a design from */
.ft-designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.ft-designs button { display: grid; gap: 4px; padding: 6px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 11px; font-weight: 600; color: var(--muted); }
.ft-designs button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--t2); color: var(--t-ink); }
.ft-designs canvas, .ft-designs img { width: 100%; aspect-ratio: 1; border-radius: 6px; }

.ft-hidden { display: none !important; }
.ft-gap { margin-top: 18px; }
.ft-gap-sm { margin-top: 10px; }
.ft-gap-xs { display: block; margin-top: 6px; }
.ft-step { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; color: var(--ink); }
.ft-step span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--t1), var(--t2)); color: #fff; font-size: 13px; }
.ft-item-pic { display: grid; place-items: center; }
.ft-item-pic canvas { max-width: 100%; max-height: 100%; background: #fff; }

/* One result line (PDF compressor) */
.ft-result { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 14px; padding: 14px 16px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.ft-result-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: #fef2f2; color: #dc2626; font-size: 22px; }
.ft-result-text { flex: 1 1 220px; display: grid; gap: 4px; min-width: 0; }
.ft-result-text strong { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-result-text > span:not(.ft-progress) { font-size: 13px; color: var(--muted); }

/* Watermark: the nine places as a little 3 x 3 board, and "All over" under it */
.ft-wm-pos { display: grid; grid-template-columns: repeat(3, 52px); gap: 6px; }
.ft-wm-pos label { display: block; }
.ft-wm-pos span { display: flex; width: 100%; justify-content: center; min-height: 36px; padding: 0; font-size: 8px; color: var(--soft); }
.ft-wm-pos .ft-wm-all { grid-column: 1 / -1; }
.ft-wm-pos .ft-wm-all span { font-size: 13px; color: var(--text); }

/* Background remover: colour row; Passport: face guide and sheet */
.ft-bg-pick .ft-unit { margin-left: 6px; white-space: nowrap; }
.ft-bg-view .ft-stage > img { background: none; max-height: 460px; } /* the checks show where it is see-through */
.ft-pp-frame { position: relative; max-width: 300px; width: 100%; margin-inline: auto; }
.ft-pp-frame .ft-crop { max-width: none; }
.ft-pp-guide { position: absolute; inset: 0; pointer-events: none; }
.ft-pp-guide::before { content: ""; position: absolute; left: 21%; right: 21%; top: 9%; height: 62%; border: 2px dashed rgba(255, 255, 255, .9); border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25); }
.ft-pp-sheet { min-height: 200px; }
.ft-pp-sheet canvas, .ft-stamp-stage canvas, .ft-qr-stage canvas { width: auto; max-width: 100%; max-height: 520px; }
.ft-stamp-stage canvas { max-height: 460px; background: transparent; box-shadow: none; }
.ft-stamp-oval { transform: scaleY(.7); }
.ft-qr-stage { background: var(--line-soft); }
.ft-qr-stage canvas { max-width: min(100%, 380px); }
.ft-qr-fields { display: grid; gap: 12px; }
.ft-qr-empty { display: grid; justify-items: center; gap: 10px; max-width: 320px; padding: 30px 10px; text-align: center; font-size: 14px; line-height: 1.55; color: var(--muted); }
.ft-qr-empty i { font-size: 54px; color: #cbd5e1; }
.ft-qr-empty.is-error { color: #b91c1c; }
.ft-qr-empty.is-error i { color: #fca5a5; }
.ft-stage-note.is-error { color: #dc2626; font-weight: 500; }

/* Signature: the pad and the handwriting styles */
.ft-sign-pad { position: relative; width: 100%; aspect-ratio: 3 / 1; border-radius: var(--radius-lg); background: #fff; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--t2) 25%, var(--line)); overflow: hidden; }
.ft-sign-pad canvas { position: relative; z-index: 1; display: block; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.ft-sign-line { position: absolute; left: 6%; right: 6%; bottom: 26%; border-bottom: 2px dashed #d4d4d8; }
.ft-sign-line i { position: absolute; left: -2px; bottom: 6px; font-size: 18px; color: #c4c4c9; }
.ft-sign-hint { position: absolute; inset: 0; display: grid; place-items: center; font-size: 15px; color: var(--soft); pointer-events: none; }
.ft-sign-fonts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ft-sign-fonts button { min-height: 74px; padding: 6px 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 30px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ft-sign-fonts button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--t2); background: var(--t-soft); }

/* ---------- Motion ---------- */
@keyframes ft-rise { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: 0 0; } }
@keyframes ft-spin { to { transform: rotate(360deg); } }
@keyframes ft-bob { 50% { translate: 0 -8px; } }
@keyframes ft-pop { from { opacity: 0; scale: .4; } to { opacity: 1; scale: 1; } }
@media (prefers-reduced-motion: reduce) {
    .ft-orbit, .ft-core, .ft-float, .ft-hero-copy > * { animation: none; }
    .js .ft-group[data-reveal] .ft-card { opacity: 1; translate: none; animation: none !important; }
}

/* ---------- Phones and tablets ---------- */
@media (max-width: 900px) {
    .ft-hero { grid-template-columns: 1fr; padding: 30px 22px; }
    .ft-hero-art { max-width: 240px; order: -1; }
    .ft-split { grid-template-columns: 1fr; }
    .ft-how ol { grid-template-columns: 1fr; }
    .ft-about-grid { grid-template-columns: 1fr; }
    .ft-print { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
    .ft-hero-art { display: none; }
    .ft-app { padding: 14px; border-radius: var(--radius-lg); }
    .ft-head { padding: 16px; }
    .ft-head-icon { width: 48px; height: 48px; font-size: 21px; }
    .ft-head-trust { display: none; }
    .ft-about { padding: 16px; }
    .ft-grid { grid-template-columns: 1fr; }
    .ft-card { flex-direction: row; align-items: center; padding: 14px; }
    .ft-card-go { display: none; }
    .ft-card-icon { width: 44px; height: 44px; font-size: 18px; flex: none; }
    .ft-tiles { grid-template-columns: repeat(2, 1fr); }
    .ft-bar { bottom: 70px; }
    .ft-bar .btn-lg { flex: 1 1 100%; }
    .ft-options { padding: 12px; }
    .ft-drop { min-height: 160px; }
}
