/* ==========================================================================
   tools.css — страница «Инструменты»
   ========================================================================== */

.tl-page {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* ==========================================================================
   Поиск и категории
   ========================================================================== */
.tl-search { max-width: 420px; }
.tl-search .field { height: 42px; }

.tl-tabs { padding-bottom: 0; }

/* ==========================================================================
   Сетка инструментов
   ========================================================================== */
.tl-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  align-items: stretch;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: border-color .14s ease, transform .14s ease;
}
.tool-card:hover { border-color: #cddbec; transform: translateY(-1px); }

.tool-card__ico {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
}
.tool-card__ico .icon { width: 20px; height: 20px; }

.tool-card__ico--blue   { background: var(--brand-soft); color: var(--brand); }
.tool-card__ico--green  { background: var(--green-soft); color: var(--green); }
.tool-card__ico--violet { background: var(--violet-soft); color: var(--violet); }
.tool-card__ico--amber  { background: var(--amber-soft); color: var(--amber); }
.tool-card__ico--red    { background: var(--red-soft);   color: var(--red); }

.tool-card__star {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--brand);
  fill: var(--brand);
}
.tool-card__star .icon { fill: var(--brand); stroke-width: 1.2; }

.tool-card__title {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tool-card__desc {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.5;
}

.tool-card__foot { margin-top: auto; padding-top: 16px; }

.tool-card__foot .btn { height: 32px; font-size: 12.5px; }

/* ==========================================================================
   Важно знать
   ========================================================================== */
.tl-notes__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.tl-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.tl-note__ico {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--brand-soft);
  color: var(--brand);
}
.tl-note__ico .icon { width: 16px; height: 16px; }

.tl-note__title { font-size: 12.5px; font-weight: 600; }
.tl-note__text  { margin-top: 3px; font-size: 11.5px; color: var(--text-3); line-height: 1.45; }

/* ==========================================================================
   Адаптив
   ========================================================================== */
@media (max-width: 1150px) {
  .tl-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tl-notes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .tl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .tl-grid,
  .tl-notes__grid { grid-template-columns: 1fr; }
}
