.glossary-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
  font-family: inherit;
}

.glossary-search {
  margin-bottom: 20px;
}
.glossary-search input {
  width: 100%;
  padding: 10px 16px;
  font-size: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
}
.glossary-search input:focus {
  border-color: #3b82f6;
}

.glossary-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.g-tab {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid #ddd;
  background: #f5f5f5;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.g-tab:hover,
.g-tab.active {
  /* background: var(--second-color); */
  border-color: 1px var(--second-color);
  color: #000;
}

.g-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
  background: #fff;
  transition: border-color .15s;
}
.g-card:hover {
  border-color: #9ca3af;
}
.g-card.hidden {
  display: none;
}
.g-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  gap: 12px;
}
.g-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.g-term {
  font-weight: 500;
  font-size: 1rem;
  color: #111;
}
.g-term-en {
  font-size: 13px;
  color: #666;
}
.g-card-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.g-chevron {
  font-size: 18px;
  color: #9ca3af;
  transition: transform .2s;
  line-height: 1;
}
.g-card.open .g-chevron {
  transform: rotate(180deg);
}

.g-card-body {
  display: none;
  padding: 0 16px 14px;
  border-top: 1px solid #f3f4f6;
}
.g-card.open .g-card-body {
  display: block;
}
.g-card-body p {
  margin: 10px 0 0;
  font-size: 14px;
  color: #111;
  line-height: 1.65;
}

.g-badge {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 10px;
  white-space: nowrap;
}
.g-badge--modeli_kontrakty { background: #dbeafe; color: #1e40af; }
.g-badge--oborudovaniye { background: #d1fae5; color: #065f46; }
.g-badge--raskhodnyye-materialy { background: #fef3c7; color: #92400e; }
.g-badge--programmnoye-obespecheniye { background: #ede9fe; color: #4c1d95; }
.g-badge--servis-podderzhka { background: #fee2e2; color: #991b1b; }
.g-badge--optimizatsiya-analitika { background: #dcfce7; color: #166534; }

.g-empty {
  text-align: center;
  padding: 40px 0;
  color: #9ca3af;
  font-size: 14px;
}

@media (max-width: 600px) {
  .g-card-right .g-badge { display: none; }
  .g-tab { font-size: 12px; padding: 4px 10px; }
}
