/* ===== Colors: apne brand ke hisaab se badlo ===== */
:root {
  --bg: #f6f6f8;
  --card: #ffffff;
  --text: #1d1d22;
  --muted: #6b6b76;
  --border: #e3e3ea;
  --accent: #3b3bd4;
  --mark: #fff1a8;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111116; --card: #1b1b22; --text: #ececf2; --muted: #9a9aa8;
    --border: #2c2c36; --accent: #8a8aff; --mark: #5a4b00;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.tools { max-width: 1180px; margin: 0 auto; padding: 40px 16px 64px; }
.tools h1 { text-align: center; font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 6px; }
.tools__sub { text-align: center; color: var(--muted); margin: 0 0 24px; }

/* Search box */
.tools__search { position: relative; max-width: 560px; margin: 0 auto 18px; }
.tools__search input {
  width: 100%; padding: 14px 44px 14px 18px; font: inherit; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: 999px; outline: none;
  -webkit-appearance: none; appearance: none;
}
.tools__search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 59, 212, .2); }
.tools__search kbd {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font: 12px ui-monospace, monospace; color: var(--muted);
  border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px;
}
@media (hover: none) { .tools__search kbd { display: none; } }

/* Category chips */
.tools__filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 28px; }
.tag {
  font: inherit; font-size: .95rem; cursor: pointer; padding: 8px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--card); color: var(--text);
}
.tag:hover { border-color: var(--accent); }
.tag.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.tag:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Cards */
.tools__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.tools__item a {
  position: relative; display: block; height: 100%; padding: 20px; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .15s, border-color .15s;
}
.tools__item a:hover, .tools__item a:focus-visible { transform: translateY(-2px); border-color: var(--accent); outline: none; }
.tools__icon { display: block; font-size: 1.8rem; line-height: 1; margin-bottom: 12px; }
.tools__badge {
  position: absolute; top: 14px; right: 14px; font-size: .72rem; font-weight: 600;
  padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff;
}
.tools__item h3 { margin: 0 0 6px; font-size: 1.1rem; }
.tools__item p { margin: 0; font-size: .9rem; color: var(--muted); }
.tools__item mark { background: var(--mark); color: inherit; border-radius: 3px; }

.hidden { display: none !important; }
.tools__empty { text-align: center; color: var(--muted); padding: 40px 0; }
.tools__count { text-align: center; color: var(--muted); font-size: .85rem; margin: -14px 0 18px; min-height: 1.3em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
