/* ==========================================================================
   KitFuse stylesheet
   Mobile first. Light and dark themes. No external fonts, no frameworks.
   ========================================================================== */

/* ---------- Design tokens ----------
   KitFuse theme: lemon-lime and sage greens, soft glass surfaces and gradients. */
:root {
  --bg: #f4f8ef;
  --bg-elev: #ffffff;
  --bg-sunken: #ebf2e4;
  --bg-hover: #eef5e7;
  --border: #dae5d0;
  --border-strong: #c2d2b5;
  --text: #12210f;
  --text-muted: #45563e;
  --text-subtle: #56684e;
  --accent: #2e7a12;
  --accent-hover: #23620c;
  --accent-text: #ffffff;
  --accent-soft: #e9f6d6;
  --accent-ring: rgba(122, 196, 30, 0.42);
  --lime: #a3e635;
  --lime-soft: #d9f99d;
  --sage: #8fae7c;
  --brand-a: #a3e635;
  --brand-b: #1f9d55;
  --grad: linear-gradient(135deg, #c8f560 0%, #6fd04b 48%, #1f9d55 100%);
  --grad-lime: linear-gradient(135deg, #e2fb93 0%, #b4ec4c 45%, #7fd23f 100%);
  --grad-text: linear-gradient(110deg, #4c9a0e 0%, #23874a 55%, #5c8a45 100%);
  --success: #2a7a14;
  --success-bg: #ebf7df;
  --success-border: #c3e5a6;
  --warn: #8a5300;
  --warn-bg: #fff5e0;
  --warn-border: #f3d79a;
  --danger: #b42318;
  --danger-bg: #fdeceb;
  --danger-border: #f5c2bd;
  --code-bg: #ebf2e4;
  --glass: rgba(255, 255, 255, 0.66);
  --glass-strong: rgba(255, 255, 255, 0.84);
  --glass-border: rgba(255, 255, 255, 0.8);
  --glass-ring: linear-gradient(135deg, rgba(163, 230, 53, 0.85), rgba(255, 255, 255, 0.4) 45%, rgba(143, 174, 124, 0.7));
  --page-glow-a: rgba(190, 242, 100, 0.38);
  --page-glow-b: rgba(134, 239, 172, 0.26);
  --page-glow-c: rgba(143, 174, 124, 0.22);
  --shadow-sm: 0 1px 2px rgba(18, 33, 15, 0.06);
  --shadow: 0 1px 2px rgba(18, 33, 15, 0.05), 0 10px 28px -10px rgba(36, 68, 20, 0.16);
  --shadow-lg: 0 2px 4px rgba(18, 33, 15, 0.04), 0 28px 56px -18px rgba(36, 68, 20, 0.22);
  --shadow-glow: 0 16px 36px -16px rgba(110, 190, 40, 0.55);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --header-h: 66px;
  --anchor-offset: 0px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b130c;
    --bg-elev: #111b12;
    --bg-sunken: #0e1710;
    --bg-hover: #182619;
    --border: #213222;
    --border-strong: #2f4630;
    --text: #ecf5e6;
    --text-muted: #adbfa5;
    --text-subtle: #94a98b;
    --accent: #b9f160;
    --accent-hover: #d2f891;
    --accent-text: #10230a;
    --accent-soft: rgba(185, 241, 96, 0.12);
    --accent-ring: rgba(185, 241, 96, 0.4);
    --grad-text: linear-gradient(110deg, #d8f88c 0%, #8fe07a 50%, #b8d6a0 100%);
    --success: #8be36f;
    --success-bg: rgba(139, 227, 111, 0.1);
    --success-border: rgba(139, 227, 111, 0.3);
    --warn: #f5c062;
    --warn-bg: rgba(245, 192, 98, 0.1);
    --warn-border: rgba(245, 192, 98, 0.32);
    --danger: #ff8a7f;
    --danger-bg: rgba(255, 138, 127, 0.1);
    --danger-border: rgba(255, 138, 127, 0.34);
    --code-bg: #182619;
    --glass: rgba(20, 32, 21, 0.62);
    --glass-strong: rgba(17, 27, 18, 0.84);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-ring: linear-gradient(135deg, rgba(197, 242, 90, 0.55), rgba(255, 255, 255, 0.06) 45%, rgba(143, 174, 124, 0.45));
    --page-glow-a: rgba(163, 230, 53, 0.13);
    --page-glow-b: rgba(31, 157, 85, 0.16);
    --page-glow-c: rgba(143, 174, 124, 0.1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -10px rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 28px 56px -18px rgba(0, 0, 0, 0.65);
    --shadow-glow: 0 18px 40px -18px rgba(163, 230, 53, 0.35);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0b130c;
  --bg-elev: #111b12;
  --bg-sunken: #0e1710;
  --bg-hover: #182619;
  --border: #213222;
  --border-strong: #2f4630;
  --text: #ecf5e6;
  --text-muted: #adbfa5;
  --text-subtle: #94a98b;
  --accent: #b9f160;
  --accent-hover: #d2f891;
  --accent-text: #10230a;
  --accent-soft: rgba(185, 241, 96, 0.12);
  --accent-ring: rgba(185, 241, 96, 0.4);
  --grad-text: linear-gradient(110deg, #d8f88c 0%, #8fe07a 50%, #b8d6a0 100%);
  --success: #8be36f;
  --success-bg: rgba(139, 227, 111, 0.1);
  --success-border: rgba(139, 227, 111, 0.3);
  --warn: #f5c062;
  --warn-bg: rgba(245, 192, 98, 0.1);
  --warn-border: rgba(245, 192, 98, 0.32);
  --danger: #ff8a7f;
  --danger-bg: rgba(255, 138, 127, 0.1);
  --danger-border: rgba(255, 138, 127, 0.34);
  --code-bg: #182619;
  --glass: rgba(20, 32, 21, 0.62);
  --glass-strong: rgba(17, 27, 18, 0.84);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-ring: linear-gradient(135deg, rgba(197, 242, 90, 0.55), rgba(255, 255, 255, 0.06) 45%, rgba(143, 174, 124, 0.45));
  --page-glow-a: rgba(163, 230, 53, 0.13);
  --page-glow-b: rgba(31, 157, 85, 0.16);
  --page-glow-c: rgba(143, 174, 124, 0.1);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 10px 28px -10px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 28px 56px -18px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 18px 40px -18px rgba(163, 230, 53, 0.35);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.6em; font-weight: 750; }
h1 { font-size: clamp(2rem, 1.35rem + 3.2vw, 3.4rem); letter-spacing: -0.035em; font-weight: 800; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1.1vw, 2rem); }
h3 { font-size: clamp(1.12rem, 1.05rem + 0.35vw, 1.3rem); letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
ul, ol { padding-inline-start: 1.3em; margin: 0 0 1.1em; }
li { margin: 0.3em 0; }
code, kbd, .mono { font-family: var(--mono); font-size: 0.9em; }
code { background: var(--code-bg); padding: 0.12em 0.4em; border-radius: 6px; word-break: break-word; }
kbd { border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0.05em 0.4em; background: var(--bg-elev); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
strong { font-weight: 650; }
.visually-hidden, .sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; padding: 10px 16px;
  background: var(--accent); color: var(--accent-text); border-radius: var(--radius-sm); font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--accent-text); }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .container { padding: 0 24px; } }
.container--narrow { max-width: 820px; }

/* ---------- Icons ---------- */
.icon, .btn svg, .icon-btn svg, .badge svg, .fi-alert svg, .fi-ok svg, .fi-note svg, .tool-notice svg, .trust-list svg, .check-list svg, .feature svg {
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none;
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--bg-elev); --btn-fg: var(--text); --btn-border: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 44px; padding: 0.6em 1.15em; border-radius: 10px;
  border: 1px solid var(--btn-border); background: var(--btn-bg); color: var(--btn-fg);
  font: 600 0.97rem/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.btn svg { width: 1.15em; height: 1.15em; }
.btn:hover { background: var(--bg-hover); color: var(--btn-fg); text-decoration: none; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { --btn-bg: var(--accent); --btn-fg: var(--accent-text); --btn-border: transparent; box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 6px 16px -6px var(--accent-ring); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-text); box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 10px 22px -8px var(--accent-ring); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); }
.btn-secondary { --btn-bg: var(--bg-elev); }
.btn-ghost { --btn-bg: transparent; --btn-border: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); }
.btn-lg { min-height: 54px; padding: 0.8em 1.6em; font-size: 1.06rem; border-radius: 12px; }
.btn-sm { min-height: 40px; padding: 0.45em 0.9em; font-size: 0.9rem; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; color: var(--text-muted); cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .site-header { background: var(--bg); } }
.header-inner { display: flex; align-items: center; gap: 12px; height: 100%; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -0.03em; margin-inline-end: auto; }
.brand:hover { color: var(--text); text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; transition: transform 0.3s ease; }
.brand:hover img { transform: rotate(-6deg) scale(1.05); }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.site-nav li { margin: 0; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: 8px; color: var(--text-muted);
  text-decoration: none; font-weight: 550; font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text); background: var(--bg-hover); }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--bg-sunken); box-shadow: inset 0 0 0 1px var(--border); }
.header-actions { display: flex; align-items: center; gap: 2px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }
.nav-toggle[aria-expanded="true"] .i-menu { display: none; }

@media (max-width: 899.98px) {
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
    background: var(--bg-elev); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
    padding: 8px 16px 20px; transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; transition: opacity 0.18s ease, transform 0.18s ease; }
  .site-nav ul { flex-direction: column; gap: 2px; }
  .site-nav a { padding: 14px 12px; font-size: 1.05rem; }
}
@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .site-nav { margin-inline-end: 8px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 36px 0 28px; overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 640px; z-index: -1;
  background:
    radial-gradient(40% 50% at 20% 30%, color-mix(in srgb, var(--brand-a) 22%, transparent), transparent 70%),
    radial-gradient(35% 45% at 85% 20%, color-mix(in srgb, var(--brand-b) 18%, transparent), transparent 70%);
  filter: blur(10px);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.5;
  background-image: radial-gradient(var(--border) 1px, transparent 1px); background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 70%); mask-image: linear-gradient(to bottom, #000 0%, transparent 70%);
}
.hero-inner { text-align: center; max-width: 860px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 6px 12px 6px 8px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--bg-elev);
  font-size: 0.85rem; font-weight: 600; color: var(--text-muted); box-shadow: var(--shadow-sm);
}
.eyebrow .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-bg); }
.grad-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); color: var(--text-muted); max-width: 680px; margin: 0 auto 20px; }
.trust-list { list-style: none; padding: 0; margin: 0 auto 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; color: var(--text-muted); font-size: 0.92rem; font-weight: 550; }
.trust-list li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.trust-list svg { width: 18px; height: 18px; color: var(--success); }

/* ---------- Tool ---------- */
.tool-card {
  position: relative; max-width: 900px; margin: 0 auto; padding: 12px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
}
@media (min-width: 640px) { .tool-card { padding: 16px; } }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  padding: 32px 16px 28px; border: 2px dashed var(--border-strong); border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, var(--bg-sunken), transparent 140%);
  transition: border-color 0.2s ease, background-color 0.2s ease, padding 0.25s ease;
}
@media (min-width: 640px) { .dropzone { padding: 48px 24px 40px; } }
.dropzone:hover { border-color: var(--accent); }
.dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.is-dragover .dz-visual { transform: translateY(-4px) scale(1.05); }
.dz-visual {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 8px;
  background: var(--grad); color: #fff; box-shadow: 0 10px 24px -10px var(--brand-b); transition: transform 0.25s ease;
}
.dz-visual svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dz-title { font-size: 1.15rem; font-weight: 700; margin: 0; }
.dz-or { color: var(--text-subtle); font-size: 0.9rem; margin: 2px 0 8px; }
.dz-hint { color: var(--text-subtle); font-size: 0.86rem; margin: 10px 0 0; }
.dz-touch { display: none; }
@media (hover: none) and (pointer: coarse) {
  .dz-mouse { display: none; }
  .dz-touch { display: inline; }
  .dz-or { display: none; }
}
.dz-choose { min-width: 220px; }
.dropzone.is-compact { flex-direction: row; flex-wrap: wrap; justify-content: center; padding: 14px; gap: 10px 14px; }
.dropzone.is-compact .dz-visual { width: 40px; height: 40px; border-radius: 12px; margin: 0; }
.dropzone.is-compact .dz-visual svg { width: 20px; height: 20px; }
.dropzone.is-compact .dz-title { font-size: 1rem; }
.dropzone.is-compact .dz-or, .dropzone.is-compact .dz-hint { display: none; }
.dropzone.is-compact .dz-choose { min-width: 0; min-height: 44px; font-size: 0.95rem; padding: 0.5em 1em; }
.dropzone.is-compact .dz-full { display: none; }
.dz-more { display: none; }
.dropzone.is-compact .dz-more { display: inline; }

.tool-options { margin: 12px 4px 0; font-size: 0.93rem; }
.tool-options summary { cursor: pointer; color: var(--text-muted); font-weight: 600; padding: 8px 4px; list-style: none; display: inline-flex; align-items: center; gap: 6px; border-radius: 6px; }
.tool-options summary::-webkit-details-marker { display: none; }
.tool-options summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.2s ease; margin-inline-end: 4px; }
.tool-options[open] summary::before { transform: rotate(45deg); }
.options-grid { display: grid; gap: 4px; padding: 4px 0 8px; }
@media (min-width: 720px) { .options-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; } }
.opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; background: var(--bg); }
.opt input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
.opt strong { display: block; font-size: 0.93rem; }
.opt span { color: var(--text-subtle); font-size: 0.84rem; line-height: 1.4; display: block; }

.results { margin-top: 14px; }
.results-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg);
}
.results-summary { margin: 0; font-size: 0.95rem; color: var(--text-muted); }
.results-summary strong { color: var(--text); }
.results-summary .danger, .action-bar-info .danger { color: var(--danger); font-weight: 650; }
.results-summary .ok, .action-bar-info .ok { color: var(--success); font-weight: 650; }
.results-actions { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 639.98px) {
  .results-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .results-actions .btn-primary { grid-column: 1 / -1; min-height: 52px; font-size: 1.02rem; }
  .results-actions [data-act="clear"] { grid-column: 1 / -1; }
  .results-actions .btn { white-space: normal; }
}
.progress { position: relative; margin: 12px 0 0; height: 30px; border-radius: 8px; background: var(--bg-sunken); overflow: hidden; border: 1px solid var(--border); }
.progress-bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--grad); transition: width 0.3s ease; }
.progress-bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent); animation: shimmer 1.2s linear infinite; }
.progress-text { position: relative; display: block; text-align: center; font-size: 0.85rem; font-weight: 650; line-height: 28px; color: var(--text); mix-blend-mode: normal; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.tool-notice { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 0; padding: 12px 14px; border-radius: 10px; font-size: 0.94rem; border: 1px solid var(--border); background: var(--bg); }
.tool-notice svg { width: 20px; height: 20px; margin-top: 1px; }
.tool-notice--success { background: var(--success-bg); border-color: var(--success-border); color: var(--text); }
.tool-notice--success svg { color: var(--success); }
.tool-notice--error { background: var(--danger-bg); border-color: var(--danger-border); }
.tool-notice--error svg { color: var(--danger); }
.tool-notice--info svg { color: var(--accent); }

.file-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.file-item { margin: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--bg-elev); padding: 12px; animation: pop-in 0.28s ease both; }
.file-item[data-status="clean"] { border-color: var(--success-border); }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(0.99); } to { opacity: 1; transform: none; } }
.fi-head { display: flex; align-items: center; gap: 12px; }
.fi-thumb { width: 56px; height: 56px; border-radius: 10px; flex: none; overflow: hidden; display: grid; place-items: center; background: var(--bg-sunken); color: var(--text-subtle); border: 1px solid var(--border); }
.fi-thumb svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.fi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.fi-info { min-width: 0; flex: 1; }
.fi-name { margin: 0; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-meta { margin: 0; color: var(--text-subtle); font-size: 0.85rem; }
.fi-remove { width: 40px; height: 40px; margin-inline-end: -6px; }
.fi-body:empty { display: none; }
.fi-body { margin-top: 10px; display: grid; gap: 10px; }
@media (max-width: 479.98px) {
  .fi-head { display: grid; grid-template-columns: 56px minmax(0, 1fr) 40px; column-gap: 12px; row-gap: 6px; align-items: center; }
  .fi-thumb { grid-row: 1 / 3; }
  .fi-info { grid-column: 2; grid-row: 1; }
  .fi-remove { grid-column: 3; grid-row: 1; margin-inline-end: -6px; }
  .fi-head .badge { grid-column: 2 / 4; grid-row: 2; justify-self: start; }
}

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; white-space: nowrap; border: 1px solid transparent; flex: none;
}
.badge svg { width: 14px; height: 14px; stroke-width: 2.5; }
.badge--neutral { background: var(--bg-sunken); color: var(--text-muted); border-color: var(--border); }
.badge--success { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge--warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-border); }
.badge--danger { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.file-item[data-status="clean"] .badge--success { animation: badge-pop 0.45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes badge-pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.fi-alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; font-size: 0.93rem; line-height: 1.5; border: 1px solid; }
.fi-alert > svg { width: 20px; height: 20px; margin-top: 1px; }
.fi-alert strong { display: block; margin-bottom: 2px; }
.fi-alert--gps { background: var(--danger-bg); border-color: var(--danger-border); }
.fi-alert--gps > svg { color: var(--danger); }
.fi-alert--error { background: var(--danger-bg); border-color: var(--danger-border); }
.fi-alert--error > svg { color: var(--danger); }
.fi-alert--success { background: var(--success-bg); border-color: var(--success-border); }
.fi-alert--success > svg { color: var(--success); }
.fi-alert--warn { background: var(--warn-bg); border-color: var(--warn-border); }
.fi-alert--warn > svg { color: var(--warn); }
.fi-hint { display: block; color: var(--text-subtle); font-size: 0.86rem; margin-top: 4px; }
.fi-alert .fi-hint { display: inline; }
.fi-ok, .fi-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 0.92rem; color: var(--text-muted); }
.fi-ok svg { width: 18px; height: 18px; color: var(--success); margin-top: 2px; }
.fi-note svg { width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.fi-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fi-filename { color: var(--text-subtle); font-size: 0.82rem; overflow-wrap: anywhere; }
@media (max-width: 479.98px) { .fi-actions .btn { flex: 1; } .fi-filename { width: 100%; } }
.fi-details { border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
.fi-details summary { cursor: pointer; padding: 10px 12px; font-weight: 650; font-size: 0.93rem; color: var(--text); border-radius: 10px; min-height: 44px; display: flex; align-items: center; }
.fi-details summary:hover { background: var(--bg-hover); }
.fi-groups { padding: 0 12px 12px; display: grid; gap: 12px; }
@media (min-width: 720px) { .fi-groups { grid-template-columns: 1fr 1fr; } }
.fi-group-title { margin: 0 0 4px; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--text-subtle); }
.fi-dl { margin: 0; display: grid; gap: 4px; }
.fi-dl > div { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 8px; padding: 6px 8px; border-radius: 6px; background: var(--bg-elev); border-inline-start: 3px solid var(--border-strong); font-size: 0.87rem; }
.fi-dl dt { color: var(--text-muted); font-weight: 600; }
.fi-dl dd { margin: 0; overflow-wrap: anywhere; }
.fi-dl .lvl-high { border-inline-start-color: var(--danger); }
.fi-dl .lvl-medium { border-inline-start-color: var(--warn); }

.tool-privacy { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 12px 0 2px; font-size: 0.86rem; color: var(--text-subtle); text-align: center; }
.tool-privacy svg { width: 16px; height: 16px; color: var(--success); flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Mobile sticky action bar */
.action-bar {
  position: fixed; left: 0; right: 0; z-index: 40;
  bottom: var(--anchor-offset);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg-elev) 94%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border); box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, 0.25);
  display: flex; flex-direction: column; gap: 6px; animation: bar-in 0.25s ease both;
}
.action-bar[hidden] { display: none; }
.action-bar-info { margin: 0; font-size: 0.85rem; text-align: center; color: var(--text-muted); }
.action-bar-info strong { color: var(--text); }
.action-bar .btn { min-height: 54px; font-size: 1.05rem; }
@keyframes bar-in { from { transform: translateY(100%); } to { transform: none; } }
body.has-action-bar { padding-bottom: calc(110px + var(--anchor-offset) + env(safe-area-inset-bottom)); }
body.consent-open .action-bar { display: none; }
@media (min-width: 900px) {
  .action-bar, .action-bar:not([hidden]) { display: none; }
  body.has-action-bar { padding-bottom: 0; }
}

/* ---------- Ad slots ----------
   Empty slots (only an HTML comment inside) stay hidden, so there are no blank
   boxes before approval. Once ad code is pasted in, the slot reserves its
   space up front to avoid layout shift. */
.ad-slot { display: block; position: relative; margin: 40px auto; text-align: center; overflow: hidden; clear: both; }
.ad-slot::before {
  content: attr(data-label); display: block; margin-bottom: 6px; font-size: 0.7rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-subtle);
}
.ad-slot:empty { display: none; }
.ad-slot--below-tool { max-width: 900px; min-height: 300px; margin-top: 56px; }
.ad-slot--in-article { min-height: 300px; }
.ad-slot--footer { min-height: 120px; max-width: 1180px; }
.ad-slot--sidebar { min-height: 620px; margin: 0; }
@media (min-width: 900px) {
  .ad-slot--below-tool, .ad-slot--in-article { min-height: 280px; }
  .ad-slot--footer { min-height: 110px; }
}
.ad-slot ins { display: block; }

/* ---------- Sections and layout ---------- */
.section { padding: 48px 0; }
.section--alt { background: var(--bg-sunken); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin: 0 auto 28px; text-align: center; }
.section-head p { color: var(--text-muted); }
.kicker { display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }

.layout { display: grid; gap: 40px; padding-top: 8px; padding-bottom: 32px; }
@media (min-width: 1024px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
}
.sidebar { display: none; }
@media (min-width: 1024px) {
  .sidebar { display: block; }
  .sidebar-sticky { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 20px; }
}
.side-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); padding: 18px; }
.side-title { margin: 0 0 10px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subtle); }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; counter-reset: toc; }
.toc li { margin: 0; }
.toc a { display: block; padding: 5px 8px; border-radius: 6px; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; line-height: 1.4; }
.toc a:hover { background: var(--bg-hover); color: var(--text); }
.side-cta p { font-size: 0.92rem; color: var(--text-muted); }

/* ---------- Inner page hero ---------- */
.page-hero { position: relative; padding: 32px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 32px; overflow: hidden; isolation: isolate; }
.page-hero::before {
  content: ""; position: absolute; inset: -60% -20% auto; height: 420px; z-index: -1;
  background: radial-gradient(40% 60% at 15% 40%, color-mix(in srgb, var(--brand-a) 14%, transparent), transparent 70%),
              radial-gradient(30% 50% at 90% 30%, color-mix(in srgb, var(--brand-b) 12%, transparent), transparent 70%);
}
.page-hero h1 { font-size: clamp(1.85rem, 1.3rem + 2.5vw, 2.9rem); max-width: 900px; }
.page-hero .lede { margin: 0; text-align: start; max-width: 760px; }
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 4px; font-size: 0.88rem; color: var(--text-subtle); }
.breadcrumb li { margin: 0; display: inline-flex; align-items: center; gap: 4px; }
.breadcrumb li + li::before { content: "/"; color: var(--border-strong); margin-inline-end: 2px; }
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent); text-decoration: underline; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; font-size: 0.88rem; color: var(--text-subtle); }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Prose ---------- */
.prose { font-size: 1.04rem; min-width: 0; }
.prose > * + h2 { margin-top: 2.2em; }
.prose > * + h3 { margin-top: 1.7em; }
.prose h2 { scroll-margin-top: calc(var(--header-h) + 16px); }
.prose p, .prose li { color: var(--text); }
:where(.prose) li::marker { color: var(--text-subtle); }
:where(.prose) :where(ul, ol) > li { padding-inline-start: 0.2em; }
.prose blockquote { margin: 1.5em 0; padding: 0.6em 1.2em; border-inline-start: 3px solid var(--accent); color: var(--text-muted); background: var(--bg-sunken); border-start-end-radius: 10px; border-end-end-radius: 10px; }
.prose img { border-radius: var(--radius); }
.table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); -webkit-overflow-scrolling: touch; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 520px; }
.table-wrap th, .table-wrap td { padding: 11px 14px; text-align: start; vertical-align: top; border-bottom: 1px solid var(--border); }
.table-wrap thead th { background: var(--bg-sunken); font-weight: 700; font-size: 0.85rem; color: var(--text-muted); }
.table-wrap tbody tr:last-child td, .table-wrap tbody tr:last-child th { border-bottom: 0; }
.table-wrap tbody th { font-weight: 650; }
.yes { color: var(--success); font-weight: 650; }
.no { color: var(--danger); font-weight: 650; }
.partly { color: var(--warn); font-weight: 650; }

.summary-box {
  margin: 0 0 2em; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--accent-soft), transparent 80%), var(--bg-elev);
}
.summary-box > p:first-child { margin-bottom: 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.summary-box > :last-child { margin-bottom: 0; }
.summary-box ul { margin-bottom: 0; }
.callout { margin: 1.6em 0; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg-elev); }
.callout > :last-child { margin-bottom: 0; }
.callout--tip { border-color: var(--success-border); background: var(--success-bg); }
.callout--warn { border-color: var(--warn-border); background: var(--warn-bg); }
.callout-title { font-weight: 700; margin-bottom: 4px; }
.lead-answer { font-size: 1.08rem; color: var(--text); }

.steps { list-style: none; counter-reset: step; padding: 0; display: grid; gap: 12px; }
.steps > li { counter-increment: step; position: relative; margin: 0; padding-block: 16px; padding-inline: 64px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); }
.steps > li::before {
  content: counter(step); position: absolute; inset-inline-start: 16px; top: 15px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--grad);
}
.steps > li > strong:first-child { display: block; margin-bottom: 2px; }
.steps > li > :last-child { margin-bottom: 0; }

.check-list { list-style: none; padding: 0; }
.check-list li { position: relative; padding-inline-start: 30px; }
.check-list li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: 0.35em; width: 18px; height: 18px; border-radius: 6px;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232e7a12' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.def-list { margin: 1.2em 0; display: grid; gap: 10px; }
.def-list > div { padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); }
.def-list dt { font-weight: 700; margin-bottom: 2px; }
.def-list dd { margin: 0; color: var(--text-muted); }

/* ---------- Feature grid (home) ---------- */
.features { display: grid; gap: 12px; margin: 1.4em 0; padding: 0; list-style: none; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }
.feature { margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); transition: border-color 0.2s ease, transform 0.2s ease; }
.feature:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.feature-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 10px; }
.feature-icon svg { width: 20px; height: 20px; }
.feature strong { display: block; margin-bottom: 2px; }
.feature p { margin: 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Q&A blocks (AEO) ---------- */
.qa-list { display: grid; gap: 10px; margin: 1.2em 0; }
.qa { border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); padding: 16px 18px; }
.qa h3 { margin: 0 0 6px; font-size: 1.08rem; }
.qa p:last-child, .qa ul:last-child, .qa ol:last-child { margin-bottom: 0; }
.qa .qa-a > :last-child { margin-bottom: 0; }

/* ---------- Cards (blog) ---------- */
.cards { display: grid; gap: 16px; padding: 0; list-style: none; margin: 0; }
@media (min-width: 700px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; display: flex; flex-direction: column; margin: 0; padding: 20px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-elev);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.card-tag { display: inline-block; align-self: flex-start; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); margin-bottom: 12px; }
.card h2, .card h3 { font-size: 1.18rem; margin: 0 0 8px; }
.card h2 a, .card h3 a { color: var(--text); text-decoration: none; }
.card h2 a::after, .card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card h2 a:hover, .card h3 a:hover { color: var(--accent); }
.card p { color: var(--text-muted); font-size: 0.95rem; margin: 0 0 14px; }
.card-meta { margin-top: auto; font-size: 0.84rem; color: var(--text-subtle); }

.post-cta {
  margin: 2.5em 0 1em; padding: 24px; border-radius: var(--radius-lg); color: #fff;
  background: radial-gradient(120% 140% at 0% 0%, #4ea62a 0%, #155c32 100%);
  box-shadow: var(--shadow);
}
.post-cta h2 { color: #fff; font-size: 1.4rem; margin-bottom: 6px; }
.post-cta p { color: rgba(255, 255, 255, 0.9); }
.post-cta .btn { --btn-bg: #fff; --btn-fg: #14401f; --btn-border: transparent; }
.post-cta .btn:hover { background: #f1fbe4; color: #14401f; }
.related { margin: 2.5em 0 0; }
.related h2 { font-size: 1.3rem; }

/* ---------- Forms ---------- */
.contact-form { display: grid; gap: 16px; margin: 1.5em 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-elev); }
.field { display: grid; gap: 6px; }
.field label { font-weight: 650; font-size: 0.95rem; }
.field .help { font-size: 0.85rem; color: var(--text-subtle); margin: 0; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--text); font: inherit; font-size: 1rem;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.form-note { font-size: 0.88rem; color: var(--text-subtle); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-sunken); padding: 48px 0 24px; margin-top: 24px; font-size: 0.93rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) { .footer-brand { grid-column: auto; } }
.footer-brand p { color: var(--text-muted); max-width: 340px; margin-top: 12px; }
.footer-title { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subtle); margin: 0 0 10px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin: 0; }
.footer-links a, .footer-links button {
  display: inline-block; padding: 6px 0; color: var(--text-muted); text-decoration: none; background: none; border: 0;
  font: inherit; cursor: pointer; text-align: start;
}
.footer-links a:hover, .footer-links button:hover { color: var(--accent); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); color: var(--text-subtle); font-size: 0.86rem; }
.footer-bottom p { margin: 0; }
.privacy-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 6px 12px; border-radius: 999px; background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); font-weight: 650; font-size: 0.85rem; }
.privacy-pill svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Cookie consent ---------- */
.consent {
  position: fixed; z-index: 60; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 560px; margin: 0 auto; padding: 18px; border-radius: var(--radius-lg);
  background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: consent-in 0.3s ease both;
}
.consent[hidden] { display: none; }
@media (min-width: 900px) { .consent { inset-inline-start: auto; inset-inline-end: 24px; bottom: 24px; margin: 0; } }
.consent-title { font-weight: 750; margin: 0 0 4px; }
.consent p { font-size: 0.92rem; color: var(--text-muted); margin: 0 0 14px; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.consent-actions .btn { white-space: normal; }
@keyframes consent-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 72px 0 40px; }
.notfound .code { font-size: clamp(4rem, 3rem + 8vw, 8rem); font-weight: 800; letter-spacing: -0.06em; line-height: 1; margin: 0 0 8px; }
.notfound .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.muted { color: var(--text-muted); }
.small { font-size: 0.9rem; }
.mt-0 { margin-top: 0; }
.stack-sm > * + * { margin-top: 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Welcome animation (first page of a visit; see INTRO_MODE in build.py) ----------
   Pure CSS: it plays and hides itself even before JavaScript loads. main.js only adds tap/key to skip. */
.intro { display: none; }
.kl-intro .intro {
  display: grid; place-items: center; position: fixed; inset: 0; z-index: 1000;
  background:
    radial-gradient(520px 380px at 50% 42%, color-mix(in srgb, var(--lime) 30%, transparent), transparent 70%),
    radial-gradient(900px 600px at 50% 120%, color-mix(in srgb, var(--sage) 26%, transparent), transparent 70%),
    var(--bg);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  animation: intro-out 0.45s cubic-bezier(0.4, 0, 0.2, 1) 1.75s forwards;
}
.intro.is-skipping { animation: intro-out 0.2s ease forwards; }
.intro-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 24px; text-align: center; }
.intro-mark {
  width: clamp(84px, 8vw, 108px); height: auto; aspect-ratio: 1; border-radius: 25%; margin-bottom: 6px;
  box-shadow: 0 20px 50px -14px rgba(90, 170, 30, 0.6);
  animation: intro-pop 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.25) both, intro-glow 0.9s ease 0.9s both;
}
.intro-bolt { fill: #fff; fill-opacity: 0; stroke: #fff; stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: intro-draw 0.65s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards, intro-fill 0.3s ease 0.8s forwards; }
.intro-spark { fill: none; stroke: #f2ffcc; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 0.16 0.84; stroke-dashoffset: 0.16; opacity: 0; animation: intro-spark 0.7s linear 1.05s forwards; }
.intro-word { display: flex; font-size: clamp(2.6rem, 5vw, 3.4rem); font-weight: 800; letter-spacing: -0.045em; line-height: 1; color: var(--text); }
.intro-word span { display: inline-block; opacity: 0; transform: translateY(14px); animation: intro-letter 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; animation-delay: calc(0.5s + var(--i) * 0.05s); }
.intro-word .intro-accent { color: var(--accent); }
.intro-tag { font-size: clamp(0.95rem, 1.4vw, 1.1rem); font-weight: 600; color: var(--text-muted); opacity: 0; animation: intro-fade 0.5s ease 0.95s forwards; }
@keyframes intro-pop { from { opacity: 0; transform: scale(0.5) rotate(-12deg); } to { opacity: 1; transform: none; } }
@keyframes intro-glow { 0%, 100% { box-shadow: 0 20px 50px -14px rgba(90, 170, 30, 0.6); } 45% { box-shadow: 0 0 0 16px rgba(163, 230, 53, 0.2), 0 24px 60px -12px rgba(110, 200, 40, 0.75); } }
@keyframes intro-draw { to { stroke-dashoffset: 0; } }
@keyframes intro-fill { to { fill-opacity: 1; } }
@keyframes intro-spark { 0% { opacity: 1; stroke-dashoffset: 0.16; } 90% { opacity: 1; } 100% { opacity: 0; stroke-dashoffset: -0.84; } }
@keyframes intro-letter { to { opacity: 1; transform: none; } }
@keyframes intro-fade { to { opacity: 1; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .kl-intro .intro { display: none; } }
@media print { .intro { display: none !important; } }

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .ad-slot, .consent, .action-bar, .sidebar, .tool-card { display: none !important; }
  body { background: #fff; color: #000; }
}

/* Long button labels wrap on very small phones instead of overflowing */
@media (max-width: 420px) {
  .btn { white-space: normal; text-align: center; }
  .post-cta .btn { width: 100%; }
}

/* ==========================================================================
   Multi-tool additions
   ========================================================================== */

/* ---------- Language switcher ---------- */
.lang-switch { position: relative; }
.lang-switch > summary {
  list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px;
  border-radius: 10px; cursor: pointer; color: var(--text-muted); font-weight: 650; font-size: 0.88rem; text-transform: uppercase;
}
.lang-switch > summary::-webkit-details-marker { display: none; }
.lang-switch > summary:hover { background: var(--bg-hover); color: var(--text); }
.lang-switch svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lang-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 60; min-width: 200px; list-style: none; margin: 0; padding: 6px;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
}
.lang-menu li { margin: 0; }
.lang-menu a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.95rem; }
.lang-menu a:hover { background: var(--bg-hover); color: var(--text); }
.lang-menu a[aria-current="true"] { color: var(--accent); font-weight: 700; }
.lang-menu small { color: var(--text-subtle); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }

/* ---------- Tool grid ---------- */
.tool-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); list-style: none; padding: 0; margin: 0 0 8px; }
.tool-tile {
  position: relative; display: flex; gap: 14px; align-items: flex-start; margin: 0; padding: 18px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg-elev);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.tool-tile:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.tt-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.tt-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tool-tile h3 { font-size: 1.05rem; margin: 0 0 4px; letter-spacing: -0.01em; }
.tool-tile h3 a { color: var(--text); text-decoration: none; }
.tool-tile h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.tool-tile p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }
.tt-new { display: inline-block; margin-inline-start: 6px; padding: 1px 7px; border-radius: 999px; font-size: 0.7rem; font-weight: 700; vertical-align: 2px; background: var(--brand-b); color: #fff; }
.grid-group { margin: 0 0 36px; }
.grid-group > h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.grid-group > h2::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--grad); }
.home-grid { padding-block: 8px 24px; }

/* ---------- Tool page hero ---------- */
.tool-hero { position: relative; padding: 24px 0 18px; overflow: hidden; isolation: isolate; }
.tool-hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 480px; z-index: -1;
  background: radial-gradient(40% 55% at 15% 30%, color-mix(in srgb, var(--brand-a) 16%, transparent), transparent 70%),
              radial-gradient(35% 50% at 88% 20%, color-mix(in srgb, var(--brand-b) 14%, transparent), transparent 70%);
}
.tool-hero .hero-inner { text-align: center; max-width: 860px; margin: 0 auto; }
.tool-hero .breadcrumb ol { justify-content: center; }
.tool-hero h1 { font-size: clamp(1.8rem, 1.3rem + 2.4vw, 2.8rem); margin-bottom: 0.4em; }
.tool-hero .lede { margin-bottom: 18px; }

/* ---------- Tool option panels ---------- */
.tool-panel { display: grid; gap: 14px; margin: 14px 0 0; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); }
.tool-panel[hidden] { display: none; }
.field-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0; }
.field-label { font-weight: 650; font-size: 0.93rem; min-width: 120px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; margin: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border: 1px solid var(--border-strong); border-radius: 10px;
  font-weight: 650; font-size: 0.92rem; background: var(--bg-elev); cursor: pointer; transition: background-color 0.15s ease, color 0.15s ease;
}
.seg input:checked + span { background: var(--accent); color: var(--accent-text); border-color: transparent; }
.seg input:focus-visible + span { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.tool-panel input[type="range"] { flex: 1; min-width: 150px; accent-color: var(--accent); height: 28px; }
.tool-panel select, .tool-panel input[type="number"], .tool-panel input[type="text"] {
  min-height: 42px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--bg-elev); color: var(--text); font: inherit; font-size: 0.95rem; max-width: 100%;
}
.tool-panel input[type="number"] { width: 110px; }
.tool-panel input[type="text"] { flex: 1; min-width: 180px; }
.tool-panel input[type="color"] { width: 46px; height: 38px; padding: 2px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--bg-elev); cursor: pointer; }
.tool-panel select:focus, .tool-panel input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 0.93rem; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.panel-note { font-size: 0.86rem; color: var(--text-subtle); margin: 0; }
.tool-panel output { font-variant-numeric: tabular-nums; font-weight: 650; min-width: 3.5ch; }
.tool-run { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.tool-run .btn-primary { min-width: 200px; }
.tool-crosslink { text-align: center; font-size: 0.92rem; margin: 10px 0 0; }

/* ---------- Results extras ---------- */
.fi-result { margin: 0; font-size: 0.93rem; color: var(--text-muted); }
.fi-result strong { color: var(--text); }
.fi-order { display: inline-flex; }
.fi-order .icon-btn { width: 36px; height: 36px; }
.fi-video { width: 100%; max-height: 280px; border-radius: 10px; background: #000; }
.pdf-output { margin-top: 12px; display: grid; gap: 10px; }

/* ---------- Editors (blur, video to GIF, GIF to MP4) ---------- */
.editor { margin-top: 14px; display: grid; gap: 12px; }
.editor[hidden] { display: none; }
.editor-info { font-size: 0.88rem; color: var(--text-subtle); margin: 0; overflow-wrap: anywhere; }
.redact-stage { display: grid; place-items: center; padding: 8px; border-radius: 12px; border: 1px solid var(--border); background: repeating-conic-gradient(var(--bg-sunken) 0% 25%, var(--bg) 0% 50%) 50% / 20px 20px; }
.redact-canvas { display: block; max-width: 100%; max-height: 70vh; width: auto; height: auto; border-radius: 8px; touch-action: none; cursor: crosshair; }
.redact-canvas:focus-visible { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.vg-video { width: 100%; max-height: 380px; background: #000; border-radius: 12px; }
.result-box { display: grid; gap: 10px; justify-items: center; padding: 14px; border: 1px solid var(--success-border); border-radius: 12px; background: var(--success-bg); }
.result-box[hidden] { display: none; }
.result-box img, .result-box video { max-width: 100%; max-height: 420px; border-radius: 10px; background: #000; }
.result-box .btn-row { justify-content: center; }
.result-size { margin: 0; font-size: 0.9rem; color: var(--text-muted); }

/* ---------- Related tools and tool-page content ---------- */
.related-tools { margin: 2.5em 0 0; }
.related-tools h2 { font-size: 1.3rem; }
.tool-content .lead-answer { font-size: 1.08rem; }

/* ---------- Right-to-left (Arabic) ---------- */
[dir="rtl"] .tool-options summary::before { transform: rotate(135deg); }
[dir="rtl"] .tool-options[open] summary::before { transform: rotate(45deg); }
[dir="rtl"] .mono, [dir="rtl"] .fi-filename { direction: ltr; unicode-bidi: isolate; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(ar) .brand, :lang(ar) .grad-text,
:lang(hi) h1, :lang(hi) h2, :lang(hi) h3 { letter-spacing: 0; }
:lang(ar) body { font-family: "Segoe UI", "Noto Sans Arabic", Tahoma, "Geeza Pro", var(--font); line-height: 1.75; }
:lang(hi) body { font-family: "Nirmala UI", "Noto Sans Devanagari", "Kohinoor Devanagari", var(--font); line-height: 1.75; }
:lang(ar) .kicker, :lang(ar) .side-title, :lang(ar) .footer-title, :lang(ar) .fi-group-title, :lang(ar) .summary-box > p:first-child { letter-spacing: 0; }

/* ---------- Footer (multi-tool) ---------- */
@media (min-width: 900px) { .footer-grid--wide { grid-template-columns: 1.5fr repeat(5, 1fr); gap: 28px; } }
@media (min-width: 640px) and (max-width: 899.98px) { .footer-grid--wide { grid-template-columns: repeat(3, 1fr); } }
.footer-langs p { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 28px 0 0; font-size: 0.9rem; color: var(--text-subtle); }
.footer-langs svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.footer-langs a { color: var(--text-muted); text-decoration: none; }
.footer-langs a:hover { color: var(--accent); text-decoration: underline; }

/* ==========================================================================
   KitFuse design layer: glass surfaces, green gradients, professional layout
   ========================================================================== */

/* Hero glows fade out instead of ending in a hard edge */
.hero::before, .tool-hero::before, .page-hero::before { -webkit-mask-image: linear-gradient(#000 45%, transparent 92%); mask-image: linear-gradient(#000 45%, transparent 92%); }

/* Soft lime/sage glow behind every page (fixed, no blur filter: cheap on phones) */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vmax 42vmax at 6% -8%, var(--page-glow-a), transparent 62%),
    radial-gradient(48vmax 38vmax at 102% 6%, var(--page-glow-b), transparent 60%),
    radial-gradient(55vmax 45vmax at 70% 108%, var(--page-glow-c), transparent 62%);
}
::selection { background: color-mix(in srgb, var(--lime) 55%, transparent); color: var(--text); }

/* Category colors (tiles, mobile menu, group headings) */
.tt-privacy, .nt-privacy, .gg-privacy { --cat: linear-gradient(135deg, #4ade80, #047857); --cat-glow: rgba(16, 163, 106, 0.55); }
.tt-image, .nt-image, .gg-image { --cat: linear-gradient(135deg, #a3e635, #3f7d0b); --cat-glow: rgba(110, 178, 26, 0.55); }
.tt-video, .nt-video, .gg-video { --cat: linear-gradient(135deg, #5eead4, #0b7f76); --cat-glow: rgba(20, 163, 148, 0.5); }
.tt-pdf, .nt-pdf, .gg-pdf { --cat: linear-gradient(135deg, #b9cf98, #4f7439); --cat-glow: rgba(109, 143, 82, 0.5); }

/* Gradient hairline ring used by glass panels (masked border) */
.tool-card::before, .tool-tile::before, .consent::before, .finder-search::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: var(--glass-ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); mask-composite: exclude;
}

/* ---------- Buttons ---------- */
.btn { border-radius: 12px; }
.btn-primary {
  background: var(--grad-lime); color: #13280a; border-color: transparent;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 -1px 0 rgba(30, 80, 10, 0.12) inset, var(--shadow-glow);
}
.btn-primary:hover { background: linear-gradient(135deg, #effdb5 0%, #c6f363 45%, #8fdc4a 100%); color: #13280a; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 20px 40px -16px rgba(110, 190, 40, 0.7); }
.btn-secondary { --btn-bg: var(--glass-strong); }
.skip-link { background: var(--grad-lime); color: #13280a; }
.skip-link:focus { color: #13280a; }

/* ---------- Header ---------- */
.site-header {
  background: color-mix(in srgb, var(--bg) 66%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
}
.brand { font-size: 1.28rem; gap: 10px; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 6px 16px -6px rgba(90, 170, 30, 0.6); }
.brand-accent { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.site-nav > ul > li > a { border-radius: 999px; padding: 8px 14px; }
.site-nav > ul > li > a:hover { background: color-mix(in srgb, var(--bg-elev) 70%, transparent); }
.site-nav > ul > li > a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--lime) 45%, transparent); }
.icon-btn { border-radius: 12px; }
.icon-btn:hover, .lang-switch > summary:hover { background: color-mix(in srgb, var(--bg-elev) 70%, transparent); }
.lang-menu {
  /* Inside the glass header a nested blur can't reach the page, so menus are near-opaque */
  background: linear-gradient(160deg, color-mix(in srgb, var(--lime) 10%, transparent), transparent 60%), var(--bg-elev);
  border-color: var(--glass-border); border-radius: 16px; box-shadow: var(--shadow-lg);
}
.nav-tools { display: none; }
@media (max-width: 899.98px) {
  .site-nav {
    background: linear-gradient(170deg, color-mix(in srgb, var(--lime) 12%, transparent), transparent 45%), var(--bg);
    border-bottom: 1px solid var(--border); border-radius: 0 0 24px 24px; box-shadow: 0 30px 60px -20px rgba(18, 33, 15, 0.35);
    max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
    padding: 12px 16px 22px;
  }
  .site-nav > ul { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .site-nav > ul > li > a { padding: 9px 15px; font-size: 0.94rem; border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); }
  .nav-tools { display: grid; gap: 16px; margin-top: 18px; }
  .nt-title { margin: 0 0 8px; font-size: 0.74rem; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-subtle); }
  .site-nav .nt-group ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .site-nav .nt-group li { margin: 0; }
  .site-nav .nt-group a {
    display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 9px 10px; border-radius: 14px;
    background: var(--bg-elev); border: 1px solid var(--border); color: var(--text);
    font-size: 0.88rem; font-weight: 620; line-height: 1.25; text-decoration: none;
  }
  .site-nav .nt-group a:hover, .site-nav .nt-group a:active { border-color: color-mix(in srgb, var(--lime) 60%, var(--border)); }
  .nt-icon { width: 32px; height: 32px; flex: none; border-radius: 10px; display: grid; place-items: center; color: #fff; background: var(--cat); box-shadow: 0 6px 14px -8px var(--cat-glow); }
  .nt-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
}
@media (max-width: 339.98px) { .site-nav .nt-group ul { grid-template-columns: 1fr; } }

/* ---------- Home hero ---------- */
.hero { padding: 44px 0 30px; }
.hero::before {
  background:
    radial-gradient(42% 52% at 18% 28%, color-mix(in srgb, var(--lime) 30%, transparent), transparent 70%),
    radial-gradient(36% 48% at 86% 18%, color-mix(in srgb, var(--sage) 30%, transparent), transparent 70%),
    radial-gradient(30% 40% at 55% 0%, color-mix(in srgb, #34d399 16%, transparent), transparent 70%);
}
.hero::after { background-image: radial-gradient(color-mix(in srgb, var(--sage) 45%, transparent) 1px, transparent 1px); opacity: 0.55; }
.hero h1 { font-size: clamp(2.05rem, 1.25rem + 3.6vw, 3.7rem); line-height: 1.08; }
.eyebrow {
  background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-color: var(--glass-border); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border);
}
.trust-list { gap: 8px; margin-bottom: 26px; }
.trust-list li { padding: 6px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--border); font-size: 0.88rem; color: var(--text-muted); }
.trust-list svg { width: 16px; height: 16px; }
@media (max-width: 639.98px) {
  .hero { padding: 28px 0 18px; }
  .hero .lede { font-size: 1rem; margin-bottom: 16px; }
  .eyebrow { font-size: 0.8rem; margin-bottom: 14px; }
  .trust-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 20px; }
  .trust-list li { justify-content: center; font-size: 0.8rem; padding: 6px 8px; }
}

/* ---------- Tool finder (search + category chips) ---------- */
.finder { max-width: 680px; margin: 0 auto; display: grid; gap: 14px; }
.finder-search {
  position: relative; display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 18px; border-radius: 20px; cursor: text;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(16px) saturate(170%); backdrop-filter: blur(16px) saturate(170%);
  box-shadow: var(--shadow-lg); transition: box-shadow 0.2s ease;
}
.finder-search:focus-within { box-shadow: 0 0 0 4px var(--accent-ring), var(--shadow-lg); }
.finder-search > svg { width: 22px; height: 22px; flex: none; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; }
.finder-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font: 500 1.05rem/1 var(--font); }
.finder-search input::placeholder { color: var(--text-subtle); opacity: 1; }
.finder-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip {
  flex: none; min-height: 40px; padding: 8px 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--glass); color: var(--text-muted);
  font: 650 0.92rem/1 var(--font); transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip:active { transform: scale(0.97); }
.chip.is-active { background: var(--grad-lime); color: #13280a; border-color: transparent; box-shadow: var(--shadow-glow); }
@media (max-width: 639.98px) {
  .finder-search { height: 54px; border-radius: 16px; }
  .finder-search input { font-size: 1rem; }
  .finder-chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .finder-chips::-webkit-scrollbar { display: none; }
}
.finder-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; margin: 8px auto 32px; padding: 20px; max-width: 640px; text-align: center; color: var(--text-muted); border: 1px dashed var(--border-strong); border-radius: 18px; background: var(--glass); }

/* ---------- Tool grid ---------- */
.home-grid { padding-block: 22px 24px; }
.grid-group { margin: 0 0 36px; }
.grid-group > h2 { font-size: 1.12rem; gap: 10px; margin-bottom: 14px; }
.grid-group > h2::before { width: 12px; height: 12px; border-radius: 4px; background: var(--cat, var(--grad)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 18%, transparent); }
.tool-grid { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 14px; }
.tool-tile {
  flex-direction: column; gap: 14px; padding: 20px 18px 18px; border-radius: 20px;
  background: var(--glass); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.tool-tile::before { opacity: 0; transition: opacity 0.2s ease; }
.tool-tile:hover { border-color: transparent; transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.tool-tile:hover::before { opacity: 1; }
.tt-icon { width: 48px; height: 48px; border-radius: 15px; color: #fff; background: var(--cat, var(--grad)); box-shadow: 0 10px 20px -10px var(--cat-glow, rgba(90, 170, 30, 0.6)); }
.tt-icon svg { width: 23px; height: 23px; stroke-width: 2.1; }
.tt-body { min-width: 0; }
.tool-tile h3 { font-size: 1.04rem; margin: 0 0 5px; }
.tool-tile p { font-size: 0.9rem; }
.tt-new {
  position: absolute; top: 16px; inset-inline-end: 16px; margin: 0; padding: 3px 9px;
  background: var(--grad-lime); color: #173006; font-size: 0.7rem; letter-spacing: 0.02em; box-shadow: 0 4px 10px -4px rgba(110, 190, 40, 0.6);
}
.tt-arrow { position: absolute; bottom: 18px; inset-inline-end: 18px; width: 18px; height: 18px; color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transform: translateX(-4px); transition: opacity 0.2s ease, transform 0.2s ease; }
.tool-tile:hover .tt-arrow { opacity: 1; transform: none; }
[dir="rtl"] .tt-arrow { transform: scaleX(-1) translateX(-4px); }
[dir="rtl"] .tool-tile:hover .tt-arrow { transform: scaleX(-1); }
@media (hover: none) { .tool-tile:hover { transform: none; } }
@media (min-width: 340px) and (max-width: 639.98px) {
  .tool-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tool-tile { gap: 10px; padding: 14px 12px 14px; border-radius: 18px; }
  .tt-icon { width: 42px; height: 42px; border-radius: 13px; }
  .tt-icon svg { width: 21px; height: 21px; }
  .tool-tile h3 { font-size: 0.95rem; line-height: 1.25; }
  .tool-tile p { font-size: 0.8rem; line-height: 1.42; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .tt-new { top: 12px; inset-inline-end: 10px; font-size: 0.64rem; padding: 2px 7px; }
  .tt-arrow { display: none; }
  .grid-group { margin-bottom: 28px; }
}

/* ---------- Tool pages ---------- */
.tool-hero { padding: 26px 0 22px; }
.tool-hero::before {
  background:
    radial-gradient(40% 55% at 15% 30%, color-mix(in srgb, var(--lime) 26%, transparent), transparent 70%),
    radial-gradient(35% 50% at 88% 20%, color-mix(in srgb, var(--sage) 28%, transparent), transparent 70%);
}
.tool-hero h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.9rem); line-height: 1.12; }
@media (max-width: 639.98px) {
  .tool-hero { padding: 16px 0 16px; }
  .tool-hero .breadcrumb ol { margin-bottom: 10px; font-size: 0.82rem; }
  .tool-hero .eyebrow { margin-bottom: 12px; }
  .tool-hero .lede { font-size: 0.98rem; margin-bottom: 16px; }
}
.tool-card {
  padding: 14px; border-radius: 26px; border: 1px solid transparent;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 640px) { .tool-card { padding: 18px; } }
@media (max-width: 639.98px) { .tool-card { padding: 10px; border-radius: 22px; } }
.dropzone {
  border-radius: 20px; border-color: color-mix(in srgb, var(--lime) 50%, var(--border-strong));
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-soft) 85%, transparent), transparent 120%);
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--lime); }
.dropzone.is-dragover { background: color-mix(in srgb, var(--lime) 18%, transparent); }
.dz-visual { width: 68px; height: 68px; border-radius: 21px; background: var(--grad); box-shadow: var(--shadow-glow); }
.tool-panel, .results-bar, .opt, .fi-details, .tool-notice { background: color-mix(in srgb, var(--bg-elev) 55%, transparent); }
.tool-panel { border-radius: 16px; }
.file-item { border-radius: 18px; background: var(--bg-elev); box-shadow: var(--shadow-sm); }
.seg span { border-radius: 12px; background: var(--bg-elev); }
.seg input:checked + span { background: var(--grad-lime); color: #13280a; box-shadow: var(--shadow-glow); }
.progress { border-radius: 12px; }
.progress-text { color: var(--text); }
.action-bar { background: var(--glass-strong); -webkit-backdrop-filter: blur(18px) saturate(170%); backdrop-filter: blur(18px) saturate(170%); border-top-color: var(--glass-border); border-radius: 20px 20px 0 0; }

/* ---------- Content blocks ---------- */
.summary-box { border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--lime) 18%, transparent), transparent 75%), var(--glass-strong); }
.steps > li, .qa, .side-card, .feature, .card, .def-list > div, .callout, .contact-form, .table-wrap { background: var(--glass-strong); border-radius: 18px; }
.steps > li::before { background: var(--grad-lime); color: #13280a; border-radius: 11px; box-shadow: var(--shadow-glow); }
.side-card { box-shadow: var(--shadow-sm); }
.toc a:hover { background: var(--accent-soft); color: var(--accent); }
.table-wrap thead th { background: color-mix(in srgb, var(--accent-soft) 70%, var(--bg-elev)); }
.card-tag, .kicker { color: var(--accent); }

/* ---------- Footer: deep green in both themes ---------- */
.site-footer {
  --text: #ecf5e6; --text-muted: #bccbb3; --text-subtle: #a2b597; --border: rgba(236, 245, 230, 0.12);
  --accent: #c8f560; --accent-hover: #e0fb9c; --success: #c8f560; --success-bg: rgba(200, 245, 96, 0.1); --success-border: rgba(200, 245, 96, 0.3);
  color: var(--text); border-top: 0; margin-top: 40px; border-radius: 28px 28px 0 0;
  background:
    radial-gradient(640px 260px at 0% 0%, rgba(163, 230, 53, 0.16), transparent 70%),
    radial-gradient(600px 320px at 100% 100%, rgba(31, 157, 85, 0.24), transparent 70%),
    linear-gradient(180deg, #13261b, #0a1610);
}
.site-footer .brand { color: var(--text); }
.site-footer .brand-accent { background: linear-gradient(110deg, #d8f88c, #8fe07a); -webkit-background-clip: text; background-clip: text; }
@media (max-width: 639.98px) { .site-footer { border-radius: 22px 22px 0 0; padding-top: 36px; } }

/* ---------- Consent banner ---------- */
.consent {
  border-color: transparent; border-radius: 22px;
  background: var(--glass-strong); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
}

/* No backdrop-filter support: use solid surfaces so text stays readable */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .tool-card, .consent, .action-bar, .finder-search { background: var(--bg-elev); }
}
