.glossary {
  padding: 48px 0 96px;
  color: rgb(29, 29, 31);
  background: linear-gradient(180deg, #fff8e8 0, #fff 430px);
}

.glossary .container {
  width: min(1210px, calc(100% - 48px));
  margin: 0 auto;
}

.glossary h1 {
  font-size: clamp(42px, 5.5vw, 72px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-top: 0;
  margin-bottom: 20px;
}

.glossary-hero {
  position: relative;
  z-index: 0;
  overflow: hidden;
  padding: 56px 64px 60px;
  margin-bottom: 34px;
  border-radius: 24px;
  background: #ffb300;
  box-shadow: 0 18px 44px rgba(255, 179, 0, 0.23);
}

.glossary-hero::after {
  content: 'SMS.BY';
  position: absolute;
  right: -18px;
  bottom: -46px;
  color: rgba(29, 29, 31, 0.09);
  font-size: 132px;
  font-weight: 800;
  letter-spacing: -0.08em;
  pointer-events: none;
}

.glossary-hero h1,
.glossary-hero p { position: relative; z-index: 1; }

.glossary-kicker {
  color: rgb(29, 29, 31);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.glossary-lead {
  color: rgba(29, 29, 31, 0.74);
  font-size: 18px;
  line-height: 1.5;
  max-width: 720px;
  margin-bottom: 0;
}

.glossary-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px;
  margin-bottom: 32px;
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 16px;
  background: #fff;
}

.glossary-letters a {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: rgb(29, 29, 31);
  font-weight: 600;
  font-size: 16px;
  transition: background .18s ease, color .18s ease;
}

.glossary-letters a:hover {
  color: rgb(29, 29, 31);
  background: #ffb300;
}

.glossary-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.glossary-letter {
  scroll-margin-top: 92px;
  margin-bottom: 0;
  padding: 26px 28px;
  border: 1px solid rgba(29, 29, 31, 0.1);
  border-radius: 16px;
  background: #fff;
}

.glossary-letter h2 {
  font-size: 30px;
  margin-bottom: 16px;
  color: rgb(29, 29, 31);
}

.glossary-letter ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.glossary-letter a {
  color: rgb(29, 29, 31);
  display: block;
  padding: 9px 0;
  line-height: 1.4;
  border-bottom: 1px solid rgba(29, 29, 31, 0.08);
}

.glossary-letter a:hover {
  color: rgb(29, 29, 31);
  padding-left: 8px;
}

.glossary-back {
  display: inline-block;
  margin-bottom: 16px;
  color: rgb(64, 125, 255);
}

.glossary-article {
  font-size: 18px;
  line-height: 1.6;
  max-width: 760px;
}

.glossary-article p + p {
  margin-top: 14px;
}

.glossary-experts {
  margin-top: 28px;
  max-width: 760px;
}

.glossary-experts[hidden] { display: none; }

.glossary-experts h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.glossary-expert {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  padding: 18px 18px 16px;
  border-radius: 18px;
  background: #f3f3f5;
}

.glossary-expert-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  font-weight: 700;
}

.glossary-expert-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.glossary-expert-content { min-width: 0; }

.glossary-expert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin: 0;
}

.glossary-expert-meta strong { font-size: 16px; }

.glossary-expert-meta span {
  color: #8e8e93;
  font-size: 14px;
}

.glossary-expert-body {
  margin: 6px 0 0;
  color: #1d1d1f;
  font-size: 16px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.glossary-comments {
  margin-top: 48px;
  max-width: 760px;
}

.glossary-comments h2 {
  font-size: 24px;
  margin-bottom: 16px;
}

.glossary-comment {
  padding: 16px 0;
  border-bottom: 1px solid rgba(37, 40, 57, 0.08);
}

.glossary-comment-meta {
  color: rgb(110, 110, 115);
  margin-bottom: 8px;
}

.glossary-comments-empty {
  color: rgb(110, 110, 115);
  margin-bottom: 16px;
}

.glossary-comment-form {
  margin-top: 24px;
  display: grid;
  gap: 14px;
  position: relative;
}

.glossary-comment-form label {
  display: grid;
  gap: 6px;
  font-weight: 500;
}

.glossary-comment-form .req {
  color: rgb(255, 31, 49);
  margin-left: 2px;
}

.glossary-comment-form input[type='text'],
.glossary-comment-form input[type='email'],
.glossary-comment-form textarea {
  display: block !important;
  width: 100% !important;
  max-width: 100%;
  height: 52px !important;
  box-sizing: border-box;
  background: #f5f5f7 !important;
  color: rgb(29, 29, 31) !important;
  border: 1px solid rgba(37, 40, 57, 0.2) !important;
  border-radius: 8px;
  padding: 12px 14px !important;
  font-size: 16px;
  line-height: 1.4;
}

.glossary-comment-form textarea {
  height: auto;
  min-height: 120px;
  resize: vertical;
}

.glossary-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.glossary-comment-status {
  min-height: 1.4em;
  color: rgb(110, 110, 115);
}

.glossary-comment-form .button-primary {
  justify-self: start;
}

@media (max-width: 768px) {
  .glossary {
    padding: 40px 0 64px;
  }

  .glossary h1 {
    font-size: 28px;
  }

  .glossary-hero { padding: 36px 28px; border-radius: 18px; }
  .glossary-hero::after { font-size: 82px; bottom: -26px; }
  .glossary-groups { grid-template-columns: 1fr; }

  .glossary-letter ul {
    grid-template-columns: 1fr;
  }
}

/* Calm editorial layout for the glossary index. */
.glossary-index {
  padding-top: 56px;
  background: #fff;
}

.glossary-index h1 {
  max-width: 820px;
  font-size: clamp(38px, 4.5vw, 58px);
  line-height: 1.08;
  color: rgb(29, 29, 31);
}

.glossary-index .glossary-hero {
  overflow: visible;
  padding: 0;
  margin: 0 0 28px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.glossary-index .glossary-hero::after { display: none; }

.glossary-index .glossary-kicker { color: rgb(255, 179, 0); }

.glossary-index .glossary-lead,
.glossary-index .glossary-search {
  max-width: 680px;
}

.glossary-search {
  position: relative;
  margin: 0 0 22px;
}

.glossary-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.glossary-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: rgb(142, 142, 147);
  pointer-events: none;
}

.glossary-search input {
  width: 100%;
  height: 44px;
  padding: 0 18px 0 44px;
  border: 1px solid rgb(216, 216, 220);
  border-radius: 999px;
  background: #fff;
  color: rgb(29, 29, 31);
  font-size: 16px;
  font-weight: 400;
  -webkit-appearance: none;
  appearance: none;
}

.glossary-search input::-webkit-search-decoration,
.glossary-search input::-webkit-search-cancel-button,
.glossary-search input::-webkit-search-results-button {
  -webkit-appearance: none;
  appearance: none;
}

.glossary-search input::placeholder { color: rgb(142, 142, 147); }

.glossary-search input:focus {
  outline: none;
  border-color: rgb(174, 174, 178);
  background: #fff;
}

.glossary-empty {
  margin: -6px 0 22px;
  color: rgb(110, 110, 115);
  font-size: 16px;
}

.glossary-index .glossary-letters {
  gap: 10px 18px;
  padding: 0 0 28px;
  margin-bottom: 34px;
  border: 0;
  border-bottom: 1px solid rgba(29, 29, 31, 0.14);
  border-radius: 0;
}

.glossary-index .glossary-letters a {
  width: auto;
  height: auto;
  padding: 0;
  border-radius: 0;
  color: rgb(29, 29, 31);
}

.glossary-index .glossary-letters a:hover { background: transparent; color: rgb(255, 179, 0); }

.glossary-index .glossary-groups { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 42px 48px; }

.glossary-index .glossary-letter {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.glossary-index .glossary-letter h2 { color: rgb(255, 179, 0); font-size: 32px; }

.glossary-index .glossary-letter a { padding: 7px 0; }

@media (max-width: 900px) {
  .glossary-index .glossary-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .glossary-index .glossary-groups { grid-template-columns: 1fr; }
}

.glossary-empty[hidden],
.glossary-index .glossary-letters[hidden],
.glossary-index .glossary-letter[hidden],
.glossary-letter[hidden],
.glossary-letter li[hidden],
.glossary-index .glossary-letters a[hidden],
.glossary-letters a[hidden] {
  display: none;
}
