.definition-trigger {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: .08em;
  text-underline-offset: .17em;
}
.definition-trigger:hover { text-decoration-style: solid; }
.definition-trigger:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.definition-context { display: block; margin-top: .65rem; }

.definition-dialog {
  box-sizing: border-box;
  width: min(34rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: clamp(18px, 4vw, 28px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-top: 4px solid var(--raspberry, #c52054);
  background: white;
  color: #253059;
  box-shadow: 0 12px 48px #161b3155;
}
.definition-dialog::backdrop { background: #141a3659; }
.definition-dialog-header { display: flex; justify-content: space-between; align-items: start; gap: .85rem; }
.definition-dialog h2 { margin: 0; color: #283666; font-size: clamp(1.3rem, 4vw, 1.85rem); line-height: 1.18; }
.definition-dialog form { flex: none; margin: 0; }
.definition-dialog button {
  min-height: 40px;
  padding: .35rem .65rem;
  border: 1px solid #c9cfdf;
  background: white;
  color: #273263;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}
.definition-dialog button span { margin-left: .25rem; font-size: 1.1em; }
.definition-dialog .definition-text { margin: .9rem 0 1rem; font-size: 1.02rem; line-height: 1.55; }
.definition-full-entry { color: #3d4d93; font-weight: 700; text-decoration: underline; text-underline-offset: .15em; }
.definition-dialog :is(a,button):focus-visible { outline: 2px solid #9b1946; outline-offset: 3px; }

.glossary-page .section { padding-block: clamp(34px, 6vw, 72px); }
.glossary-page .glossary-hero {
  background: var(--denim, #434e96);
  color: white;
  border-bottom: 5px solid var(--sky, #6dc5d1);
}
.glossary-hero h1 {
  max-width: 21ch;
  margin: .5rem 0 .8rem;
  color: white;
  font-size: clamp(2.3rem, 5vw, 4.65rem);
  line-height: 1.03;
}
.glossary-hero p { max-width: 53ch; margin: 0; color: #f3f4fd; }
.glossary-breadcrumb { color: white; font-size: .95rem; text-decoration: underline; text-underline-offset: .18em; }
.glossary-page .glossary-index { background: #f1f5fa; }
.glossary-index-group + .glossary-index-group { margin-top: 1.5rem; }
.glossary-index-group h3 { margin: 0 0 .45rem; font-size: 1.05rem; }
.glossary-index ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .15rem 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.glossary-index a { display: inline-block; padding-block: .35rem; color: #33417b; font-size: .97rem; text-decoration: underline; text-underline-offset: .15em; }
.glossary-page h2 { margin: 0 0 1rem; }
.glossary-page .glossary-group + .glossary-group { padding-top: 0; }
.glossary-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.25fr);
  gap: .65rem clamp(1.6rem, 5vw, 4.5rem);
  padding-block: 1.35rem;
  border-top: 1px solid #d8dce9;
  scroll-margin-top: calc(var(--sticky-header-height, 88px) + 1rem);
}
.glossary-entry:target { border-top: 3px solid var(--raspberry, #c52054); }
.glossary-entry h3 { margin: 0; color: #283666; font-size: clamp(1.14rem, 2.25vw, 1.55rem); line-height: 1.2; }
.glossary-entry p { margin: 0; max-width: 72ch; }
.glossary-entry p + p { margin-top: .55rem; }
.glossary-senses { margin: 0 0 .55rem; padding-inline-start: 1.4em; max-width: 72ch; }
.glossary-senses li + li { margin-top: .55rem; }
.glossary-entry .glossary-related,
.glossary-entry .glossary-source { font-size: .94rem; }
.glossary-entry a { color: #3b498a; text-decoration: underline; text-underline-offset: .15em; }
.glossary-entry a:hover, .glossary-index a:hover { color: #961943; }
.glossary-context-link { margin: 0; padding: 1.4rem 0 0; }
@media (max-width: 740px) {
  .glossary-index ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glossary-entry { grid-template-columns: 1fr; }
}
@media (max-width: 365px) {
  .glossary-index ul { grid-template-columns: 1fr; }
}
