/* /glossary page (templates/glossary.hubl.html). Body markup is generated by
   build/glossary.mjs; tooltip styles live in assets/js/t4n-glossary.js. */
.t4n-gl-page {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
}
/* Topic filter above the index (t4n-glossary.js): chips with term counts, the chosen one green */
.t4n-gl-topics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.25rem;
}
.t4n-gl-topic {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid #dfe5f1;
  border-radius: 999px;
  background: #fff;
  font-family: "IBM Plex Sans", "Noto Sans Armenian", Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  color: #09152b;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.t4n-gl-topic span {
  font-family: "Martian Mono", monospace;
  font-size: 0.66rem;
  font-weight: 500;
  color: #5a6680;
}
.t4n-gl-topic:hover,
.t4n-gl-topic:focus-visible {
  border-color: #0e9e77;
  color: #0b7f60;
}
.t4n-gl-topic[aria-pressed="true"] {
  border-color: #0e9e77;
  background: #0e9e77;
  color: #fff;
}
.t4n-gl-topic[aria-pressed="true"] span {
  color: rgba(255, 255, 255, 0.85);
}
.t4n-gl-topics__posts {
  margin-left: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #2964da;
  text-decoration: none;
}
.t4n-gl-topics__posts:hover {
  text-decoration: underline;
}
.t4n-gl-topics[hidden],
.t4n-gl-topics__posts[hidden],
.t4n-gl-index a[hidden],
.t4n-gl-group[hidden],
.t4n-gl-item[hidden] {
  display: none !important;
}
@media (max-width: 600px) {
  .t4n-gl-topics {
    gap: 0.35rem;
  }
  .t4n-gl-topic {
    padding: 0.4rem 0.65rem;
    font-size: 0.8rem;
  }
}
.t4n-gl-index {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
  margin: 0 0 2rem;
  padding: 0.7rem 0;
  background: #fff;
  border-bottom: 1px solid #dfe5f1;
}
.t4n-gl-index > span {
  margin-right: 0.6rem;
  font-family: "Martian Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a6680;
}
.t4n-gl-index a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.1rem;
  height: 2.1rem;
  padding: 0 0.45rem;
  border: 1px solid #dfe5f1;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #09152b;
  text-decoration: none;
}
.t4n-gl-index a:hover,
.t4n-gl-index a:focus-visible {
  border-color: #0e9e77;
  color: #0b7f60;
}
.t4n-gl-group {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 0 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid #dfe5f1;
  scroll-margin-top: 4.5rem;
}
.t4n-gl-index + .t4n-gl-group {
  border-top: 0;
  padding-top: 0.5rem;
}
.t4n-gl-group__letter {
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 700;
  color: #0e9e77;
}
.t4n-gl-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 2.5rem;
}
.t4n-gl-item {
  min-width: 0;
  scroll-margin-top: 5rem;
  padding: 0.2rem 0 0.2rem 0.9rem;
  border-left: 2px solid #d5efe6;
}
.t4n-gl-item:target {
  border-left-color: #0e9e77;
  background: #f1faf7;
}
.t4n-gl-item dt {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.15rem 0.6rem;
  margin: 0 0 0.3rem;
}
.t4n-gl-item dfn {
  font-style: normal;
  font-weight: 700;
  font-size: 1.05rem;
  color: #09152b;
}
.t4n-gl-item__full {
  font-family: "Martian Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: #0b7f60;
  overflow-wrap: anywhere;
}
.t4n-gl-item dd {
  margin: 0;
}
.t4n-gl-item dd p {
  margin: 0;
  color: #3b4763;
  line-height: 1.55;
  overflow-wrap: break-word;
}
.t4n-gl-item__link {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 600;
  font-size: 0.88rem;
  color: #2964da;
  text-decoration: none;
}
.t4n-gl-item__link::after {
  content: " \2192";
}
.t4n-gl-item__link:hover {
  text-decoration: underline;
}
.t4n-gl-item__seen {
  margin: 0.45rem 0 0 !important;
  font-size: 0.84rem;
  line-height: 1.5;
  color: #4b5876;
}
.t4n-gl-item__seen span {
  margin-right: 0.3rem;
  font-weight: 600;
}
.t4n-gl-item__seen a {
  color: #2964da;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.t4n-gl-item__seen a + a::before {
  content: "·";
  display: inline-block;
  margin: 0 0.4rem;
  color: #8892ac;
}
.t4n-gl-item__seen a:hover {
  text-decoration: underline;
}
.t4n-gl-item__fig {
  margin-top: 0.7rem !important;
  max-width: 20rem;
  padding: 0.6rem 0.7rem;
  background: #f7f9fc;
  border-radius: 8px;
}
.t4n-gl-item__fig > span {
  display: block;
}
.t4n-gl-item__fig svg {
  display: block;
  width: 100%;
  height: auto;
}
@media (max-width: 900px) {
  .t4n-gl-list {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .t4n-gl-group {
    grid-template-columns: minmax(0, 1fr);
  }
  .t4n-gl-group__letter {
    margin-bottom: 0.8rem;
    font-size: 1.5rem;
  }
}
/* Letter rail (built by t4n-glossary.js from the index): fixed on the right,
   shown once the index at the top has scrolled away, the current group in green;
   the bottom is left free for the chat button */
.t4n-gl-rail {
  position: fixed;
  top: 5rem;
  right: max(0.5rem, calc((100vw - var(--t4n-maxw, 1280px)) / 2 - var(--cols, 1) * 1.7rem - 1.2rem));
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(var(--cols, 1), 1.6rem);
  grid-auto-rows: clamp(1.05rem, calc((100vh - 12rem) / var(--rows, 30)), 1.6rem);
  gap: 0 0.15rem;
  max-height: calc(100vh - 11rem);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 0.45rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #dfe5f1;
  border-radius: 0.75rem;
  box-shadow: 0 6px 20px rgba(16, 28, 54, 0.08);
  opacity: 0;
  visibility: hidden;
  transform: translateX(0.5rem);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.t4n-gl-rail::-webkit-scrollbar {
  display: none;
}
.t4n-gl-rail.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.t4n-gl-rail a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  border-radius: 0.4rem;
  font-family: "IBM Plex Sans", "Noto Sans Armenian", Arial, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  color: #4b5876;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.t4n-gl-rail a.is-wide {
  grid-column: 1 / -1;
  font-size: 0.66rem;
  letter-spacing: 0.02em;
}
.t4n-gl-rail__sep {
  grid-column: 1 / -1;
  align-self: center;
  height: 1px;
  margin: 0 0.25rem;
  background: #dfe5f1;
}
.t4n-gl-rail a:hover,
.t4n-gl-rail a:focus-visible {
  background: #eaf6f1;
  color: #0b7f60;
}
.t4n-gl-rail a[aria-current] {
  background: #0e9e77;
  color: #fff;
}
.t4n-gl-index a[aria-current] {
  border-color: #0e9e77;
  color: #0b7f60;
}
@media (max-width: 1360px) {
  .t4n-gl-page.has-rail {
    padding-right: 3rem;
  }
}
@media (max-width: 1460px) {
  .t4n-gl-page.has-rail-wide {
    padding-right: 5.5rem;
  }
}
/* phones: one narrow column that scrolls to the current letter */
@media (max-width: 760px) {
  .t4n-gl-rail {
    grid-template-columns: 1.5rem;
    grid-auto-rows: 1.2rem;
    padding: 0.3rem 0.2rem;
  }
  .t4n-gl-rail a.is-wide {
    font-size: 0.55rem;
  }
  .t4n-gl-page.has-rail-wide {
    padding-right: 3rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .t4n-gl-rail {
    transition: none;
  }
}
/* Language chips under the centred hero text */
.t4n-sec-hero .t4n-lang--hero {
  justify-content: center;
}
