/* Learn / Glossary marketing pages */

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

.glossary-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.glossary-search__input {
  width: 100%;
  max-width: 420px;
  padding: 10px 16px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-family: var(--bb-font-ui, 'DM Sans', system-ui, sans-serif);
  font-size: 14px;
}

.glossary-search__input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.glossary-search__input:focus {
  outline: none;
  border-color: #c8513a;
  background: rgba(255, 255, 255, 0.12);
}

.glossary-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.glossary-filter {
  font-family: var(--bb-font-ui, 'DM Sans', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 500;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: rgba(240, 237, 232, 0.7);
  cursor: pointer;
}

.glossary-filter:hover {
  color: #f0ede8;
  border-color: rgba(255, 255, 255, 0.28);
}

.glossary-filter.is-active {
  background: rgba(200, 81, 58, 0.18);
  border-color: rgba(200, 81, 58, 0.55);
  color: #f0997b;
}

.glossary-letters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.glossary-letters__link {
  font-family: var(--bb-font-ui, 'DM Sans', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  color: rgba(240, 237, 232, 0.55);
  text-decoration: none;
  min-width: 1.5rem;
  text-align: center;
}

.glossary-letters__link:hover,
.glossary-letters__link.is-active {
  color: var(--bb-color-accent, #c8513a);
}

.glossary-letter-section {
  margin-bottom: 3rem;
}

.glossary-letter-heading {
  font-family: var(--bb-font-ui, 'DM Sans', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #888780;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
}

.glossary-letter-section.is-hidden,
.glossary-card.is-hidden {
  display: none;
}

.glossary-terms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 2.5rem;
}

.glossary-card {
  display: block;
  padding: 1.25rem 1.35rem;
  border-radius: 10px;
  background: #1a1714;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.glossary-card:hover {
  border-color: rgba(200, 81, 58, 0.55);
  text-decoration: none;
  transform: translateY(-1px);
}

.glossary-card__category {
  display: inline-block;
  font-family: var(--bb-font-ui, 'DM Sans', system-ui, sans-serif);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #993c1d;
  background: #faece7;
  border: 0.5px solid #f0997b;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  margin-bottom: 0.65rem;
}

.glossary-card__name {
  font-family: var(--bb-font-display, "Playfair Display", Georgia, serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: #f0ede8;
  margin: 0 0 0.4rem;
}

.glossary-card__def {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(240, 237, 232, 0.68);
}

.glossary-empty {
  color: rgba(240, 237, 232, 0.55);
  text-align: center;
  padding: 2rem 0;
}

/* Entry page */
.glossary-entry {
  padding-top: calc(var(--bb-nav-height, 52px) + 2rem);
}

.glossary-entry__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 2.5rem;
  align-items: start;
}

.glossary-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.85rem;
  color: rgba(240, 237, 232, 0.55);
  margin-bottom: 1.25rem;
}

.glossary-breadcrumb a {
  color: rgba(240, 237, 232, 0.75);
  text-decoration: none;
}

.glossary-breadcrumb a:hover {
  color: var(--bb-color-accent, #c8513a);
}

.glossary-entry__title {
  font-family: var(--bb-font-display, "Playfair Display", Georgia, serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 500;
  color: #f0ede8;
  margin: 0.5rem 0 0.5rem;
  line-height: 1.15;
}

.glossary-entry__one-line {
  font-size: 1.1rem;
  line-height: 1.5;
  color: rgba(240, 237, 232, 0.68);
  margin: 0 0 1.5rem;
}

.glossary-brief {
  background: #faece7;
  color: #633806;
  border-left: 3px solid #c8513a;
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.15rem;
  margin-bottom: 1.75rem;
}

.glossary-brief__label {
  font-family: var(--bb-font-ui, 'DM Sans', system-ui, sans-serif);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #993c1d;
  margin: 0 0 0.4rem;
}

.glossary-brief__text {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.6;
  color: #633806;
}

.glossary-entry__body {
  max-width: 42rem;
}

.glossary-entry__body p {
  margin: 0 0 1rem;
}

.glossary-composer {
  margin-top: 2rem;
  padding: 1.25rem;
  border-radius: 10px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.glossary-composer__note {
  color: rgba(240, 237, 232, 0.78);
  margin: 0.35rem 0 0.75rem;
}

.glossary-composer__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.glossary-related {
  position: sticky;
  top: calc(var(--bb-nav-height, 52px) + 1rem);
}

.glossary-related__title {
  font-family: var(--bb-font-ui, 'DM Sans', system-ui, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(240, 237, 232, 0.45);
  margin: 0 0 0.75rem;
}

.glossary-related__pills {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.glossary-related__pill {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  border: 0.5px solid rgba(255, 255, 255, 0.12);
  color: rgba(240, 237, 232, 0.82);
  text-decoration: none;
  font-size: 0.9rem;
  text-align: center;
}

.glossary-related__pill:hover {
  border-color: rgba(200, 81, 58, 0.55);
  color: #f0ede8;
  text-decoration: none;
}

.glossary-prevnext {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 0.5px solid rgba(255, 255, 255, 0.1);
}

.glossary-prevnext__link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  text-decoration: none;
  color: rgba(240, 237, 232, 0.75);
  max-width: 45%;
}

.glossary-prevnext__link--next {
  text-align: right;
  margin-left: auto;
}

.glossary-prevnext__dir {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(240, 237, 232, 0.45);
}

.glossary-prevnext__name {
  font-family: var(--bb-font-display, "Playfair Display", Georgia, serif);
  font-size: 1.1rem;
  color: #f0ede8;
}

.glossary-prevnext__link:hover .glossary-prevnext__name {
  color: var(--bb-color-accent, #c8513a);
}

@media (max-width: 800px) {
  .glossary-entry__layout {
    grid-template-columns: 1fr;
  }
  .glossary-related {
    position: static;
  }
  .glossary-related__pills {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
