/* =========================================================
   DRUBS TOOLS · DESIGN SYSTEM v2
   Apple-clean. Pure white. Sharp typography. No texture.
   ========================================================= */

:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-elev: #f5f5f7;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.78);
  --ink: #1d1d1f;
  --ink-2: #424245;
  --ink-3: #6e6e73;
  --ink-4: #a1a1a6;
  --rule: #dcdce0;
  --rule-2: #ececf0;
  --accent: #1d1d1f;
  --accent-on: #ffffff;
  --brand: #0066cc;
  --brand-hover: #004499;
  --success: #1d8649;
  --shadow-1: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px -4px rgba(0,0,0,.06);
  --shadow-2: 0 4px 12px -2px rgba(0,0,0,.08), 0 24px 48px -12px rgba(0,0,0,.12);

  /* Per-accent palette (used by tool cards and category chips) */
  --acc-blue-bg:    #eaf2ff;
  --acc-blue-fg:    #0a66c2;
  --acc-blue-strong:#0066cc;
  --acc-purple-bg:    #f1ebff;
  --acc-purple-fg:    #6940d9;
  --acc-purple-strong:#5e35d0;
  --acc-green-bg:    #e5f7ec;
  --acc-green-fg:    #1d8649;
  --acc-green-strong:#159056;
  --acc-red-bg:    #fdeceb;
  --acc-red-fg:    #c4322f;
  --acc-red-strong:#d63b3b;
  --acc-amber-bg:    #fdf3e1;
  --acc-amber-fg:    #a06a00;
  --acc-amber-strong:#bd8200;
  --acc-cyan-bg:     #e1f5f7;
  --acc-cyan-fg:     #0a838f;
  --acc-cyan-strong: #0c95a3;
  --acc-pink-bg:     #fde8f0;
  --acc-pink-fg:     #c2185b;
  --acc-pink-strong: #d31f63;
  --acc-teal-bg:     #e0f4ee;
  --acc-teal-fg:     #00736b;
  --acc-teal-strong: #00867c;
  --acc-orange-bg:   #fee9d7;
  --acc-orange-fg:   #b04500;
  --acc-orange-strong:#c95200;
}
:root[data-theme="dark"] {
  --bg: #000000;
  --bg-elev: #1c1c1e;
  --bg-card: #1c1c1e;
  --bg-glass: rgba(0, 0, 0, 0.78);
  --ink: #f5f5f7;
  --ink-2: #d2d2d7;
  --ink-3: #86868b;
  --ink-4: #515154;
  --rule: #2c2c2e;
  --rule-2: #1c1c1e;
  --accent: #f5f5f7;
  --accent-on: #1d1d1f;
  --brand: #2997ff;
  --brand-hover: #5cb0ff;
  --success: #30d158;
  --shadow-1: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px -4px rgba(0,0,0,.5);
  --shadow-2: 0 4px 12px -2px rgba(0,0,0,.5), 0 24px 48px -12px rgba(0,0,0,.7);

  --acc-blue-bg:    rgba(41,151,255,.16);
  --acc-blue-fg:    #6cb6ff;
  --acc-blue-strong:#2997ff;
  --acc-purple-bg:    rgba(125,122,255,.16);
  --acc-purple-fg:    #b0a8ff;
  --acc-purple-strong:#7d7aff;
  --acc-green-bg:    rgba(48,209,88,.16);
  --acc-green-fg:    #66e08c;
  --acc-green-strong:#30d158;
  --acc-red-bg:    rgba(255,99,99,.16);
  --acc-red-fg:    #ff8d8d;
  --acc-red-strong:#ff5c5c;
  --acc-amber-bg:    rgba(255,180,77,.16);
  --acc-amber-fg:    #ffcd80;
  --acc-amber-strong:#ffb44d;
  --acc-cyan-bg:     rgba(64,209,229,.16);
  --acc-cyan-fg:     #6fdfeb;
  --acc-cyan-strong: #40d1e5;
  --acc-pink-bg:     rgba(255,99,160,.16);
  --acc-pink-fg:     #ff8db5;
  --acc-pink-strong: #ff5c92;
  --acc-teal-bg:     rgba(48,206,194,.16);
  --acc-teal-fg:     #66e0d2;
  --acc-teal-strong: #30d1c1;
  --acc-orange-bg:   rgba(255,140,77,.16);
  --acc-orange-fg:   #ffb88d;
  --acc-orange-strong:#ff8c4d;
}

*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Display', 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background .3s ease, color .3s ease;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

.mono { font-family: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, monospace; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
@media (max-width: 768px) { .container { padding: 0 1.25rem; } }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: .85rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.brand {
  display: inline-flex; align-items: baseline;
  font-family: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: .98rem;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
  text-decoration: none;
}
.brand-sub {
  color: var(--ink-3);
  font-weight: 450;
}
.brand-main {
  color: var(--ink);
  font-weight: 550;
}
.brand:hover .brand-sub { color: var(--ink-2); }

.nav-search { flex: 1; max-width: 380px; position: relative; }
.nav-search input {
  width: 100%;
  padding: .55rem 2.4rem .55rem 2.3rem;
  background: var(--bg-elev);
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .88rem;
  color: var(--ink);
  transition: all .15s;
}
.nav-search input:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(0,102,204,.1);
}
.nav-search input::placeholder { color: var(--ink-4); }
.nav-search svg {
  position: absolute; left: .8rem; top: 50%; transform: translateY(-50%);
  width: 14px; height: 14px; color: var(--ink-3);
}
.nav-search-shortcut {
  position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: .68rem;
  color: var(--ink-3);
  background: var(--bg-card);
  border: 1px solid var(--rule);
  padding: .1rem .35rem; border-radius: 4px;
  pointer-events: none;
}

.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-link {
  font-size: .88rem; color: var(--ink-2);
  font-weight: 450;
  transition: color .15s;
}
.nav-link:hover { color: var(--ink); }

.theme-toggle {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--ink-2);
  transition: all .15s ease;
}
.theme-toggle:hover { background: var(--bg-elev); color: var(--ink); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }

.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 8px;
  overflow: hidden;
  height: 34px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.lang-toggle button {
  padding: 0 .65rem;
  font-size: .72rem;
  font-weight: 600;
  color: var(--ink-3);
  background: transparent;
  border: none;
  cursor: pointer;
  letter-spacing: .03em;
  transition: all .15s ease;
}
.lang-toggle button + button { border-left: 1px solid var(--rule); }
.lang-toggle button:hover { color: var(--ink); background: var(--bg-elev); }
.lang-toggle button.active {
  background: var(--ink);
  color: var(--bg);
}
[data-theme="dark"] .lang-toggle button.active {
  background: var(--ink);
  color: var(--bg);
}

/* ===== MADE BY DRUBS.TECH FLOATING BADGE ===== */
.made-by-badge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .9rem .55rem .65rem;
  background: var(--bg-card);
  border: 1.5px solid var(--rule);
  border-radius: 980px;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  box-shadow: 0 4px 16px -4px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.04);
  transition: all .2s ease;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.92);
}
[data-theme="dark"] .made-by-badge {
  background: rgba(28, 28, 30, 0.92);
  border-color: var(--rule);
  box-shadow: 0 4px 16px -4px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.3);
}
.made-by-badge:hover {
  transform: translateY(-2px);
  border-color: var(--ink-3);
  box-shadow: 0 8px 24px -4px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  color: var(--ink);
}
[data-theme="dark"] .made-by-badge:hover {
  border-color: var(--ink-4);
}
.made-by-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0066cc, #5e35d0);
  color: #fff;
  flex-shrink: 0;
}
.made-by-icon svg {
  width: 14px;
  height: 14px;
}
.made-by-text {
  display: flex;
  align-items: baseline;
  gap: .3rem;
  white-space: nowrap;
}
.made-by-prefix {
  color: var(--ink-3);
  font-size: .78rem;
}
.made-by-brand {
  color: var(--ink);
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .8rem;
  letter-spacing: -.01em;
}

/* On small screens, collapse to just the icon */
@media (max-width: 540px) {
  .made-by-badge {
    bottom: 14px;
    right: 14px;
    padding: .5rem;
  }
  .made-by-text { display: none; }
}

.search-results {
  position: absolute; top: calc(100% + .4rem); left: 0; right: 0;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  max-height: 400px; overflow-y: auto;
  display: none; z-index: 200;
  padding: .35rem;
}
.search-results.show { display: block; }
.search-result {
  display: flex; align-items: center; gap: .85rem;
  padding: .65rem .75rem;
  border-radius: 8px;
  cursor: pointer; transition: background .12s;
}
.search-result:hover { background: var(--bg-elev); }
.search-result-icon {
  width: 30px; height: 30px;
  background: var(--bg-elev);
  border-radius: 7px;
  display: grid; place-items: center;
  color: var(--ink-2); flex-shrink: 0;
}
.search-result:hover .search-result-icon { background: var(--bg-card); }
.search-result-icon svg { width: 14px; height: 14px; }
.search-result-meta { flex: 1; min-width: 0; }
.search-result-name { font-size: .9rem; font-weight: 500; }
.search-result-desc {
  font-size: .76rem; color: var(--ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: .1rem;
}

/* ============ HERO ============ */
.hero {
  padding: 8.5rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Gradient blobs positioned below the headline so the very top reads as pure white */
.hero::before {
  content: '';
  position: absolute;
  bottom: -50px; left: 50%;
  transform: translateX(-50%);
  width: 1100px; height: 500px;
  background:
    radial-gradient(ellipse 360px 240px at 25% 60%, rgba(0,102,204,.10), transparent 65%),
    radial-gradient(ellipse 380px 260px at 75% 50%, rgba(94,53,208,.10), transparent 65%),
    radial-gradient(ellipse 300px 200px at 50% 90%, rgba(21,144,86,.06), transparent 65%);
  filter: blur(50px);
  z-index: -1;
  pointer-events: none;
}
[data-theme="dark"] .hero::before {
  background:
    radial-gradient(ellipse 360px 240px at 25% 60%, rgba(41,151,255,.16), transparent 65%),
    radial-gradient(ellipse 380px 260px at 75% 50%, rgba(125,122,255,.16), transparent 65%),
    radial-gradient(ellipse 300px 200px at 50% 90%, rgba(48,209,88,.08), transparent 65%);
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .85rem;
  color: var(--brand);
  font-weight: 500;
  margin-bottom: 1.5rem;
}
.hero-eyebrow svg { width: 14px; height: 14px; }

.hero h1 {
  font-weight: 600;
  font-size: clamp(2.5rem, 6.5vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -.04em;
  margin-bottom: 1.5rem;
  max-width: 18ch;
  margin-left: auto; margin-right: auto;
  color: var(--ink);
}
.hero h1 .accent {
  background: linear-gradient(135deg, #0066cc, #5856d6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .hero h1 .accent {
  background: linear-gradient(135deg, #2997ff, #7d7aff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  max-width: 580px;
  margin: 0 auto 2.5rem;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ink-3);
}

.hero-cta { display: inline-flex; gap: .65rem; flex-wrap: wrap; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .85rem 1.5rem;
  font-size: .92rem; font-weight: 500;
  border-radius: 980px;
  transition: all .15s ease;
  border: 1px solid transparent;
  letter-spacing: -.005em;
  cursor: pointer;
}
.btn svg { width: 14px; height: 14px; }
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-hover); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: transparent; color: var(--ink);
  border-color: var(--ink-4);
}
.btn-ghost:hover { background: var(--bg-elev); border-color: var(--ink-3); }

.hero-stats {
  margin-top: 4rem;
  display: flex; justify-content: center; gap: 3rem;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num {
  font-size: 2rem; font-weight: 600;
  letter-spacing: -.03em;
  color: var(--ink);
  line-height: 1;
}
.stat-label {
  font-size: .8rem; color: var(--ink-3);
  margin-top: .35rem;
}

/* ============ CATEGORY TABS ============ */
.categories-wrap {
  position: sticky; top: 60px; z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--rule);
  padding: .75rem 0;
}
.categories {
  display: flex; gap: .25rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0 1.5rem;
  max-width: 1200px; margin: 0 auto;
}
.categories::-webkit-scrollbar { display: none; }
.cat-tab {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .9rem;
  font-size: .85rem; font-weight: 500;
  color: var(--ink-3);
  border-radius: 980px;
  white-space: nowrap;
  transition: all .15s;
}
.cat-tab:hover { color: var(--ink); background: var(--bg-elev); }
.cat-tab svg { width: 14px; height: 14px; }
.cat-tab .count { font-size: .72rem; opacity: .65; margin-left: .1rem; }

/* Active tab uses the category's accent color */
.cat-tab.active.acc-blue   { color: #fff; background: var(--acc-blue-strong);   }
.cat-tab.active.acc-purple { color: #fff; background: var(--acc-purple-strong); }
.cat-tab.active.acc-green  { color: #fff; background: var(--acc-green-strong);  }
.cat-tab.active.acc-red    { color: #fff; background: var(--acc-red-strong);    }
.cat-tab.active.acc-amber  { color: #fff; background: var(--acc-amber-strong);  }
.cat-tab.active.acc-cyan   { color: #fff; background: var(--acc-cyan-strong);   }
.cat-tab.active.acc-pink   { color: #fff; background: var(--acc-pink-strong);   }
.cat-tab.active.acc-teal   { color: #fff; background: var(--acc-teal-strong);   }
.cat-tab.active.acc-orange { color: #fff; background: var(--acc-orange-strong); }
[data-theme="dark"] .cat-tab.active { color: var(--bg); }
[data-theme="dark"] .cat-tab.active.acc-amber { color: var(--bg); }

/* ============ TOOLS GRID ============ */
.tools-section {
  padding: 4rem 0 6rem;
  background: linear-gradient(to bottom, var(--bg) 0%, var(--bg-elev) 100%);
}
[data-theme="dark"] .tools-section {
  background: linear-gradient(to bottom, var(--bg) 0%, #0a0a0a 100%);
}
.tools-cat {
  margin-bottom: 4rem;
  scroll-margin-top: 130px;
  position: relative;
}
.tools-cat-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  padding-left: 1rem;
  border-left: 3px solid currentColor;
}
.tools-cat-header.acc-blue   { color: var(--acc-blue-strong);   }
.tools-cat-header.acc-purple { color: var(--acc-purple-strong); }
.tools-cat-header.acc-green  { color: var(--acc-green-strong);  }
.tools-cat-header.acc-red    { color: var(--acc-red-strong);    }
.tools-cat-header.acc-amber  { color: var(--acc-amber-strong);  }
.tools-cat-header.acc-cyan   { color: var(--acc-cyan-strong);   }
.tools-cat-header.acc-pink   { color: var(--acc-pink-strong);   }
.tools-cat-header.acc-teal   { color: var(--acc-teal-strong);   }
.tools-cat-header.acc-orange { color: var(--acc-orange-strong); }
.tools-cat-header.acc-cyan   { color: var(--acc-cyan-strong);   }
.tools-cat-header.acc-pink   { color: var(--acc-pink-strong);   }
.tools-cat-header.acc-teal   { color: var(--acc-teal-strong);   }
.tools-cat-header.acc-orange { color: var(--acc-orange-strong); }

.tools-cat-title {
  font-size: 1.75rem; font-weight: 600;
  letter-spacing: -.02em;
  color: var(--ink);  /* keep title in ink, only the border is colored */
}
.tools-cat-meta { font-size: .82rem; color: var(--ink-3); }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: .85rem;
}
@media (max-width: 540px) { .tools-grid { grid-template-columns: 1fr; } }

.tool-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1.5px solid var(--rule);
  border-radius: 16px;
  transition: all .2s ease;
  min-height: 170px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
[data-theme="dark"] .tool-card {
  border-color: var(--rule);
  box-shadow: 0 1px 0 rgba(255,255,255,.02);
}
.tool-card:hover {
  border-color: var(--ink-3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
[data-theme="dark"] .tool-card:hover { border-color: var(--ink-4); }

.tool-card-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 1rem;
}
.tool-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bg-elev);
  color: var(--brand);
  transition: all .2s;
}
.tool-icon svg { width: 20px; height: 20px; stroke-width: 1.8; }

/* Accent variants — colorful icon tiles by category */
.tool-icon.acc-blue   { background: var(--acc-blue-bg);   color: var(--acc-blue-fg);   }
.tool-icon.acc-purple { background: var(--acc-purple-bg); color: var(--acc-purple-fg); }
.tool-icon.acc-green  { background: var(--acc-green-bg);  color: var(--acc-green-fg);  }
.tool-icon.acc-red    { background: var(--acc-red-bg);    color: var(--acc-red-fg);    }
.tool-icon.acc-amber  { background: var(--acc-amber-bg);  color: var(--acc-amber-fg);  }
.tool-icon.acc-cyan   { background: var(--acc-cyan-bg);   color: var(--acc-cyan-fg);   }
.tool-icon.acc-pink   { background: var(--acc-pink-bg);   color: var(--acc-pink-fg);   }
.tool-icon.acc-teal   { background: var(--acc-teal-bg);   color: var(--acc-teal-fg);   }
.tool-icon.acc-orange { background: var(--acc-orange-bg); color: var(--acc-orange-fg); }

.tool-card:hover .tool-icon.acc-blue   { background: var(--acc-blue-strong);   color: #fff; }
.tool-card:hover .tool-icon.acc-purple { background: var(--acc-purple-strong); color: #fff; }
.tool-card:hover .tool-icon.acc-green  { background: var(--acc-green-strong);  color: #fff; }
.tool-card:hover .tool-icon.acc-red    { background: var(--acc-red-strong);    color: #fff; }
.tool-card:hover .tool-icon.acc-amber  { background: var(--acc-amber-strong);  color: #fff; }
.tool-card:hover .tool-icon.acc-cyan   { background: var(--acc-cyan-strong);   color: #fff; }
.tool-card:hover .tool-icon.acc-pink   { background: var(--acc-pink-strong);   color: #fff; }
.tool-card:hover .tool-icon.acc-teal   { background: var(--acc-teal-strong);   color: #fff; }
.tool-card:hover .tool-icon.acc-orange { background: var(--acc-orange-strong); color: #fff; }

.tool-card:hover { background: var(--bg-card); }

.tool-num {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: .68rem;
  color: var(--ink-4);
}

.tool-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: .35rem;
  letter-spacing: -.015em;
  color: var(--ink);
}
.tool-desc {
  font-size: .85rem;
  color: var(--ink-3);
  line-height: 1.45;
  flex: 1;
}

.tool-bottom {
  margin-top: 1rem;
  display: flex; justify-content: space-between; align-items: center;
}
.tool-badge {
  font-size: .7rem;
  font-weight: 500;
  padding: .22rem .55rem;
  border-radius: 980px;
  background: var(--bg-elev);
  color: var(--ink-3);
}
.tool-badge.live {
  background: rgba(29, 134, 73, .12);
  color: var(--success);
}
[data-theme="dark"] .tool-badge.live { background: rgba(48, 209, 88, .15); }
.tool-badge.broken {
  background: rgba(214, 59, 59, .12);
  color: #d63b3b;
  font-weight: 600;
}
[data-theme="dark"] .tool-badge.broken {
  background: rgba(255, 89, 89, .15);
  color: #ff5959;
}

.broken-banner {
  background: linear-gradient(135deg, rgba(214, 59, 59, .12), rgba(214, 59, 59, .08));
  border: 1.5px solid rgba(214, 59, 59, .35);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  color: #b32a2a;
  font-weight: 500;
  font-size: .98rem;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: .65rem;
}
.broken-banner::before {
  content: '⚠';
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}
[data-theme="dark"] .broken-banner {
  background: linear-gradient(135deg, rgba(255, 89, 89, .12), rgba(255, 89, 89, .06));
  border-color: rgba(255, 89, 89, .35);
  color: #ff8080;
}
.tool-badge.ai {
  background: rgba(88, 86, 214, .12);
  color: #5856d6;
}
[data-theme="dark"] .tool-badge.ai { background: rgba(125, 122, 255, .15); color: #7d7aff; }
.tool-arrow {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  color: var(--ink-4);
  transition: all .2s;
}
.tool-arrow svg { width: 14px; height: 14px; }
.tool-card:hover .tool-arrow { color: var(--brand); transform: translate(3px, -3px); }

/* ============ TRUST ============ */
.trust { padding: 6rem 0; border-top: 1px solid var(--rule); }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-eyebrow {
  font-size: .85rem;
  color: var(--brand);
  font-weight: 500;
  margin-bottom: 1rem;
}
.section-title {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.05;
  margin-bottom: 1rem;
  color: var(--ink);
}
.section-sub {
  font-size: 1.1rem;
  color: var(--ink-3);
  max-width: 540px; margin: 0 auto;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}
.trust-item {
  background: var(--bg-elev);
  padding: 2rem 1.75rem;
  border-radius: 18px;
}
.trust-icon {
  width: 44px; height: 44px;
  margin-bottom: 1.25rem;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--bg-card);
  color: var(--brand);
}
.trust-icon svg { width: 20px; height: 20px; }
.trust-title {
  font-size: 1.05rem; font-weight: 600;
  margin-bottom: .4rem;
  letter-spacing: -.015em;
  color: var(--ink);
}
.trust-desc { font-size: .9rem; color: var(--ink-3); line-height: 1.5; }

/* ============ AI PREVIEW ============ */
.ai-preview { padding: 6rem 0; border-top: 1px solid var(--rule); }

/* ============ FOOTER ============ */
.footer {
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--rule);
  background: var(--bg-elev);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr repeat(4, 1fr);
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
.footer-tagline {
  font-size: .92rem;
  line-height: 1.5;
  color: var(--ink-3);
  max-width: 32ch;
  margin-top: .85rem;
}
.footer-col-title {
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  font-size: .88rem;
  color: var(--ink-3);
  padding: .3rem 0;
  transition: color .15s;
}
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
  display: flex; justify-content: space-between; align-items: center;
  font-size: .8rem;
  color: var(--ink-3);
}
@media (max-width: 540px) {
  .footer-bottom { flex-direction: column; gap: .75rem; text-align: center; }
}

/* ============ TOOL PAGE ============ */
.tool-page { padding: 6rem 0 5rem; }

.breadcrumb {
  display: flex; align-items: center; gap: .4rem;
  font-size: .82rem;
  color: var(--ink-3);
  margin-bottom: 2rem;
}
.breadcrumb a { color: var(--ink-3); transition: color .15s; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb span.sep { color: var(--ink-4); }

.tool-hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}
.tool-hero h1 {
  font-weight: 600;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
  letter-spacing: -.035em;
  margin-bottom: 1.25rem;
  color: var(--ink);
}
.tool-hero h1 .accent {
  background: linear-gradient(135deg, #0066cc, #5856d6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="dark"] .tool-hero h1 .accent {
  background: linear-gradient(135deg, #2997ff, #7d7aff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tool-hero p {
  font-size: 1.1rem;
  color: var(--ink-3);
  max-width: 540px;
  margin: 0 auto;
}

.converter-card {
  max-width: 880px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}

.dropzone {
  display: block;
  position: relative;
  padding: 1.75rem;
  cursor: pointer;
  border: none;
  width: 100%;
  background: var(--bg-card);
}
.dropzone-inner {
  position: relative;
  border: 2px dashed var(--rule);
  border-radius: 14px;
  padding: 4rem 2rem;
  text-align: center;
  transition: all .2s;
  background: var(--bg-elev);
}
.dropzone:hover .dropzone-inner,
.dropzone.drag .dropzone-inner {
  border-color: var(--brand);
  background: rgba(0,102,204,.04);
}
[data-theme="dark"] .dropzone:hover .dropzone-inner,
[data-theme="dark"] .dropzone.drag .dropzone-inner {
  background: rgba(41,151,255,.06);
}

.dropzone-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 16px;
  background: var(--bg-card);
  display: grid; place-items: center;
  color: var(--brand);
  box-shadow: var(--shadow-1);
  transition: transform .25s ease;
}
.dropzone:hover .dropzone-icon { transform: scale(1.05) translateY(-2px); }
.dropzone-icon svg { width: 26px; height: 26px; }
.dropzone-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: .4rem;
  letter-spacing: -.02em;
  color: var(--ink);
}
.dropzone-sub {
  color: var(--ink-3);
  font-size: .98rem;
  margin-bottom: 1.5rem;
}
.dropzone-formats {
  display: inline-flex; flex-wrap: wrap; justify-content: center;
  gap: .35rem;
}
.dropzone-formats span {
  font-size: .72rem;
  font-weight: 500;
  padding: .25rem .65rem;
  background: var(--bg-card);
  border-radius: 980px;
  color: var(--ink-3);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
#fileInput, .file-input { display: none; }

.file-list { padding: 0 1.75rem; display: none; }
.file-list.show { display: block; padding-bottom: .5rem; }
.file-item {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1rem;
  align-items: center;
  padding: .95rem 1.1rem;
  background: var(--bg-elev);
  border-radius: 12px;
  margin-bottom: .55rem;
  transition: background .15s;
}
.file-item:hover { background: var(--rule-2); }
.file-icon-pill {
  width: 40px; height: 40px;
  background: var(--bg-card);
  border-radius: 9px;
  display: grid; place-items: center;
  font-size: .65rem;
  font-weight: 600;
  color: var(--brand);
  letter-spacing: .02em;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.file-meta { min-width: 0; }
.file-name {
  font-size: .93rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink);
}
.file-size {
  font-size: .76rem; color: var(--ink-3);
  margin-top: .15rem;
}
.format-select {
  font-size: .78rem; font-weight: 500;
  padding: .45rem 2rem .45rem .85rem;
  border: 1px solid var(--rule);
  background: var(--bg-card);
  color: var(--ink);
  border-radius: 8px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236e6e73' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  transition: border-color .15s;
}
.format-select:hover, .format-select:focus { border-color: var(--brand); outline: none; }
.file-action {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  color: var(--ink-3);
  transition: all .15s;
}
.file-action:hover { color: var(--ink); background: var(--bg-card); }
.file-action svg { width: 16px; height: 16px; }
.file-status {
  font-size: .78rem; font-weight: 500;
  color: var(--success);
  padding: 0 .5rem;
  display: inline-flex; align-items: center; gap: .35rem;
}
.file-status svg { width: 14px; height: 14px; }

.actions-row {
  padding: 1.25rem 1.75rem;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--rule);
  background: var(--bg-card);
  gap: 1rem;
}

/* Options panel inside converter card */
.tool-options {
  padding: 1rem 1.75rem 1.25rem;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem 1.5rem;
  background: var(--bg-card);
}
.tool-options-row {
  display: flex; flex-direction: column; gap: .4rem;
}
.tool-options-row label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--ink-2);
  letter-spacing: -.005em;
}
.tool-options-row input,
.tool-options-row select {
  padding: .55rem .75rem;
  font: inherit; font-size: .9rem;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid transparent;
  border-radius: 8px;
  transition: all .15s;
}
.tool-options-row input:focus,
.tool-options-row select:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(0,102,204,.1);
}
.tool-options-row .help {
  font-size: .72rem; color: var(--ink-3);
}
.tool-options-row.full {
  grid-column: 1 / -1;
}

/* ============ DEV TOOL CARD (text in / text out) ============ */
.dev-tool-card .dev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-card);
}
@media (max-width: 720px) {
  .dev-tool-card .dev-grid { grid-template-columns: 1fr; }
}
.dev-pane {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--rule);
  min-height: 280px;
}
.dev-pane + .dev-pane {
  border-left: 1px solid var(--rule);
}
@media (max-width: 720px) {
  .dev-pane + .dev-pane { border-left: none; border-top: 1px solid var(--rule); }
}
.dev-pane-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .65rem 1rem;
  font-size: .76rem;
  font-weight: 500;
  color: var(--ink-3);
  letter-spacing: .04em;
  text-transform: uppercase;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--rule);
}
.dev-pane-btn {
  font: inherit;
  font-size: .72rem; font-weight: 500;
  padding: .25rem .65rem;
  background: var(--bg-card);
  color: var(--ink-2);
  border: 1px solid var(--rule);
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0;
  text-transform: none;
  transition: all .15s;
}
.dev-pane-btn:hover { background: var(--bg-elev); color: var(--ink); border-color: var(--ink-3); }
.dev-pane-btn.copied { background: var(--success); color: white; border-color: var(--success); }

.dev-pane textarea {
  flex: 1;
  border: none;
  padding: 1rem;
  font-family: ui-monospace, 'JetBrains Mono', 'SF Mono', Menlo, Consolas, monospace;
  font-size: .85rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-card);
  resize: none;
  outline: none;
}
.dev-pane textarea[readonly] {
  background: var(--bg-elev);
  color: var(--ink-2);
}
.dev-status {
  padding: .65rem 1.5rem;
  background: var(--bg-card);
  font-size: .82rem;
  color: var(--ink-3);
  min-height: 1em;
  border-top: 1px solid var(--rule);
}
.dev-status.ok { color: var(--success); }
.dev-status.err { color: #d63b3b; }

.btn-ghost {
  background: var(--bg-elev);
  color: var(--ink-2);
  border: 1px solid var(--rule);
  padding: .55rem 1rem;
  border-radius: 980px;
  font: inherit; font-size: .85rem; font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.btn-ghost:hover { background: var(--bg-card); color: var(--ink); border-color: var(--ink-3); }

/* ============ CALC CARD ============ */
.calc-card .calc-fields {
  padding: 1.5rem 1.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem 1.5rem;
  background: var(--bg-card);
}
.calc-field {
  display: flex; flex-direction: column; gap: .4rem;
}
.calc-field label {
  font-size: .82rem; font-weight: 500;
  color: var(--ink-2);
}
.calc-field input,
.calc-field select {
  padding: .65rem .85rem;
  font: inherit; font-size: .95rem;
  color: var(--ink);
  background: var(--bg-elev);
  border: 1px solid transparent;
  border-radius: 8px;
}
.calc-field input:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--brand);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px rgba(0,102,204,.1);
}
.calc-result {
  padding: 1.5rem 1.75rem 1.75rem;
  border-top: 1px solid var(--rule);
  background: var(--bg-card);
  display: none;
}
.calc-result.has-content { display: block; }
.calc-result .result-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: .55rem 0;
  border-bottom: 1px solid var(--rule-2);
}
.calc-result .result-row:last-child { border-bottom: none; }
.calc-result .result-label { color: var(--ink-3); font-size: .9rem; }
.calc-result .result-value {
  color: var(--ink); font-size: 1.1rem; font-weight: 600;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
}
.calc-result .result-primary {
  margin: -.5rem 0 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--rule);
}
.calc-result .result-primary .result-value {
  font-size: 2rem;
  color: var(--brand);
}
.privacy-note {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .82rem;
  color: var(--ink-3);
}
.privacy-dot {
  width: 7px; height: 7px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(29,134,73,.18);
}

@media (max-width: 640px) {
  .actions-row { flex-direction: column; gap: 1rem; align-items: stretch; }
  .actions-row .btn { justify-content: center; }
  .file-item { grid-template-columns: auto 1fr auto; gap: .75rem; }
  .file-item .format-select { grid-column: 1 / -1; margin-top: .5rem; }
  .dropzone { padding: 1rem; }
  .dropzone-inner { padding: 2.5rem 1rem; }
}

.tool-features {
  max-width: 880px;
  margin: 4rem auto 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 700px) { .tool-features { grid-template-columns: 1fr; } }
.feat-item {
  padding: 1.5rem;
  background: var(--bg-elev);
  border-radius: 14px;
}
.feat-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--bg-card);
  display: grid; place-items: center;
  color: var(--brand);
  margin-bottom: 1rem;
}
.feat-icon svg { width: 16px; height: 16px; }
.feat-title { font-weight: 600; font-size: .95rem; margin-bottom: .35rem; color: var(--ink); letter-spacing: -.01em; }
.feat-desc { font-size: .85rem; color: var(--ink-3); line-height: 1.5; }

.related-tools { max-width: 1100px; margin: 5rem auto 0; }
.related-title {
  font-size: 1.5rem; font-weight: 600;
  letter-spacing: -.02em;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--ink);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem;
}

/* ============ FAQ ============ */
.faq-section {
  max-width: 760px;
  margin: 5rem auto 0;
}
.faq-title {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -.025em;
  margin-bottom: 1.75rem;
  text-align: center;
  color: var(--ink);
}
.faq-item {
  border-bottom: 1px solid var(--rule);
  padding: 0;
}
.faq-item:first-of-type { border-top: 1px solid var(--rule); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.4rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 550;
  font-size: 1.02rem;
  color: var(--ink);
  letter-spacing: -.01em;
  transition: color .15s;
}
.faq-item summary:hover { color: var(--brand); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '';
  width: 12px; height: 12px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .25s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-item[open] summary { color: var(--brand); }
.faq-answer {
  padding: 0 0 1.4rem 0;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 65ch;
}
.faq-answer a { color: var(--brand); }
.faq-answer a:hover { text-decoration: underline; }

.toast {
  position: fixed;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%) translateY(150%);
  background: var(--ink);
  color: var(--bg);
  padding: .8rem 1.4rem;
  border-radius: 980px;
  font-size: .85rem;
  font-weight: 500;
  z-index: 1000;
  box-shadow: var(--shadow-2);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
.toast.show { transform: translateX(-50%) translateY(0); }

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0; transform: translateY(12px);
    animation: reveal .7s cubic-bezier(.16,1,.3,1) forwards;
  }
  .reveal-1 { animation-delay: .03s; }
  .reveal-2 { animation-delay: .1s; }
  .reveal-3 { animation-delay: .18s; }
  .reveal-4 { animation-delay: .28s; }
  .reveal-5 { animation-delay: .4s; }
}
@keyframes reveal { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 880px) {
  .nav-search { display: none; }
}
@media (max-width: 640px) {
  .nav-link[data-mobile-hide] { display: none; }
  .nav-inner { gap: 1rem; padding: .75rem 1.25rem; }
  .hero { padding: 6.5rem 0 4rem; }
  .hero-stats { gap: 2rem; }
  .categories-wrap { top: 56px; }
}

/* ─────────────────────────────────────────────────────────
   FOTO SKENERIS — interactive editor
   ───────────────────────────────────────────────────────── */
.scanner-card { padding: 0; overflow: hidden; }
.scanner-editor { padding: 1rem 0 0; }

.scanner-pages-strip {
  display: flex;
  gap: .65rem;
  padding: .85rem 1.25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--rule);
  background: var(--bg-elev);
  min-height: 110px;
}
.scn-page-thumb {
  position: relative;
  width: 90px;
  flex-shrink: 0;
  padding: .35rem;
  border: 2px solid var(--rule);
  border-radius: 8px;
  cursor: pointer;
  background: var(--bg-card);
  transition: all .12s ease;
}
.scn-page-thumb:hover { border-color: var(--ink-3); }
.scn-page-thumb.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,102,204,.18); }
.scn-page-thumb-canvas {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
}
.scn-page-thumb-canvas canvas { max-width: 100%; max-height: 80px; display: block; }
.scn-page-thumb-num {
  position: absolute;
  top: -7px; left: -7px;
  background: var(--ink);
  color: var(--bg);
  font-size: .65rem;
  font-weight: 700;
  border-radius: 980px;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  font-family: ui-monospace, monospace;
}
.scn-page-thumb-x {
  position: absolute;
  top: -7px; right: -7px;
  background: #d63b3b;
  color: #fff;
  border: none;
  font-size: .7rem;
  font-weight: 700;
  border-radius: 980px;
  width: 18px; height: 18px;
  display: grid; place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.scn-page-thumb:hover .scn-page-thumb-x { opacity: 1; }

.scanner-stage {
  padding: 1.5rem;
  display: flex;
  justify-content: center;
  background: var(--bg);
  border-bottom: 1px solid var(--rule);
}
.scanner-preview-wrap {
  max-width: 100%;
  position: relative;
  display: flex;
  justify-content: center;
}
#scnPreview {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,.10);
  background: white;
}

.scanner-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--rule);
}
.scn-tool-group { display: flex; flex-direction: column; gap: .5rem; }
.scn-tool-label {
  font-size: .82rem;
  color: var(--ink-3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.scn-tool-label span { color: var(--brand); font-weight: 600; }

.scn-filter-btns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}
.scn-filter-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .25rem;
  padding: .65rem .3rem;
  border: 1.5px solid var(--rule);
  border-radius: 10px;
  background: var(--bg-card);
  cursor: pointer;
  transition: all .15s ease;
  font-size: .82rem;
  color: var(--ink-2);
}
.scn-filter-btn:hover { border-color: var(--ink-3); }
.scn-filter-btn.active {
  border-color: var(--brand);
  background: rgba(0,102,204,.06);
  color: var(--brand);
  font-weight: 600;
}
.scn-fbtn-icon { font-size: 1.4rem; }

.scn-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--rule);
  outline: none;
}
.scn-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.scn-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--brand);
  cursor: pointer;
  border: 3px solid white;
}

.scn-select {
  padding: .5rem .75rem;
  border: 1.5px solid var(--rule);
  border-radius: 8px;
  background: var(--bg-card);
  font-size: .9rem;
  color: var(--ink);
  font-family: inherit;
}

.scn-checkbox {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: .92rem;
  color: var(--ink);
  cursor: pointer;
}
.scn-checkbox input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--brand);
}

@media (max-width: 640px) {
  .scanner-toolbar { grid-template-columns: 1fr; }
  .scn-filter-btn { padding: .5rem .2rem; font-size: .75rem; }
  .scn-fbtn-icon { font-size: 1.2rem; }
}
