a.term-link {
  color: var(--leaf, #234e39);
  background-color: #edf1e6;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-thickness: .1em;
  text-underline-offset: .18em;
}
a.term-link:hover, a.term-link:focus-visible {
  color: var(--ink, #192f25);
  background-color: #e0e8d7;
  text-decoration-style: solid;
}
a.term-link:focus-visible, #term-definition-dialog :focus-visible {
  outline: 3px solid var(--rust, #9e432b);
  outline-offset: 3px;
}
.glossary-page {
  max-width: 52rem;
  margin: 0 auto;
  padding-block: clamp(1.8rem, 5vw, 4rem);
  overflow-wrap: break-word;
}
.glossary-page h1 {
  font: 400 clamp(2.6rem, 6vw, 4.4rem)/1.04 var(--serif, Georgia, serif);
  letter-spacing: -.05em;
}
.glossary-page .dek { max-width: 55ch; margin: 1rem 0; }
.glossary-jumps summary { cursor: pointer; font-weight: 650; padding: .55rem 0; }
.glossary-jumps ul { columns: 2 17rem; padding-left: 1.2rem; margin: .35rem 0 1rem; }
.glossary-jumps li { break-inside: avoid; padding: .25rem 0; }
.glossary-index {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: .35rem 1.25rem;
  margin: 1.6rem 0 2.4rem;
  padding-block: .5rem;
  border-block: 1px solid var(--line, #d1d5c9);
}
.glossary-index a, .glossary-links a {
  color: var(--leaf, #234e39);
  text-decoration: underline;
  text-underline-offset: .18em;
}
.glossary-index a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}
.glossary-page section, .glossary-entry { scroll-margin-block-start: 1.25rem; }
.glossary-page section + section { margin-top: clamp(2rem, 5vw, 3.4rem); }
.glossary-page section h2 {
  margin: 0 0 .6rem;
  color: var(--leaf, #234e39);
  font: 400 clamp(1.8rem, 3.8vw, 2.6rem)/1.1 var(--serif, Georgia, serif);
  letter-spacing: -.035em;
}
.glossary-entry {
  padding: clamp(1rem, 2.5vw, 1.5rem) clamp(.7rem, 2vw, 1.3rem);
  border-bottom: 1px solid var(--line, #d1d5c9);
}
.glossary-entry:target {
  background: #edf1e6;
  box-shadow: inset 4px 0 var(--leaf, #234e39);
}
.glossary-entry:focus-visible { outline: 2px solid var(--leaf, #234e39); }
.glossary-entry h3 {
  margin: 0;
  font: 500 clamp(1.4rem, 2.6vw, 1.8rem)/1.15 var(--serif, Georgia, serif);
  letter-spacing: -.025em;
}
.glossary-entry p { max-width: 68ch; margin: .65rem 0 0; line-height: 1.6; }
.glossary-entry .glossary-links { margin-top: .8rem; font-size: .9rem; }
#term-definition-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  box-sizing: border-box;
  width: min(25rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  overscroll-behavior: contain;
  padding: clamp(1.2rem, 4vw, 1.75rem);
  background: var(--paper, #fbfaf5);
  color: var(--ink, #192f25);
  border: 1px solid var(--line, #d1d5c9);
  border-top: 4px solid var(--leaf, #234e39);
  border-radius: 4px;
  box-shadow: 0 1rem 4rem #16291e38;
  overflow-wrap: anywhere;
}
#term-definition-dialog:not([open]) { display: none; }
#term-definition-dialog::backdrop { background: #172a214a; }
#term-definition-title {
  margin: 0;
  font: 500 clamp(1.65rem, 4vw, 2rem)/1.1 var(--serif, Georgia, serif);
  letter-spacing: -.03em;
}
#term-definition-text { margin: .8rem 0 1.2rem; font-size: 1rem; line-height: 1.55; }
.term-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding-top: .6rem;
  border-top: 1px solid var(--line, #d1d5c9);
}
.term-actions a, .term-actions button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 600 .9rem/1.3 "DM Sans", Arial, sans-serif;
}
.term-actions a { color: var(--leaf, #234e39); text-decoration: underline; text-underline-offset: .2em; }
.term-actions button {
  padding: .55rem 1rem;
  border: 0;
  border-radius: 3px;
  background: var(--leaf, #234e39);
  color: white;
  cursor: pointer;
}
@media print {
  #term-definition-dialog { display: none; }
  #term-definition-dialog::backdrop { background: transparent; }
  a.term-link { background: transparent; color: inherit; }
}
