.termbook {
  --term-ink: #242136;
  --term-muted: #605d70;
  --term-link: #5136a8;
  --term-line: #ded9e9;
  width: min(100%, 80rem);
  padding-inline: 1.5rem;
  box-sizing: border-box;
  margin-inline: auto;
  padding-block: clamp(2.5rem, 6vw, 5rem) 5rem;
  color: var(--term-ink);
  overflow-wrap: break-word;
}
.termbook *, .termbook *::before, .termbook *::after { box-sizing: border-box; }
.termbook-head { max-width: none; }
.termbook a { color: var(--term-link); }
.termbook a:focus-visible, .termbook button:focus-visible {
  outline: .17rem solid #7350d4;
  outline-offset: .2rem;
}
.termbook-crumbs { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; color: var(--term-muted); font-size: .85rem; }
.termbook-crumbs a, .termbook-sources a, .termbook-tools a, .termbook-order-link, .termbook-more a, .termbook-related a {
  text-decoration: underline;
  text-decoration-color: #b4a5d5;
  text-underline-offset: .2em;
}
.termbook a:hover { text-decoration-color: currentColor; }
.termbook h1 { margin: 1.3rem 0 .8rem; font-size: clamp(2.125rem, 5vw, 3.25rem); font-weight: 700; line-height: 1.05; letter-spacing: -.035em; }
.termbook-deck { max-width: 45rem; margin: 0 0 1.4rem; font-size: 1.0625rem; line-height: 1.55; color: #454054; }
.termbook-review { display: flex; flex-wrap: wrap; gap: .36em; align-items: baseline; margin: 0; color: var(--term-muted); font-size: .875rem; line-height: 1.6; }
.termbook-review time { color: var(--term-ink); font-weight: 600; }
.termbook-sources, .termbook-tools { display: flex; flex-wrap: wrap; align-items: center; column-gap: 1rem; row-gap: .4rem; margin-top: .5rem; font-size: .875rem; line-height: 1.6; }
.termbook-tools { margin-top: 1rem; }
.termbook-tools button { padding: .35rem .65rem; display: inline-flex; align-items: center; gap: .4rem; font: inherit; line-height: 1.4; border: 1px solid var(--term-line); border-radius: .5rem; color: var(--term-link); background: #fff; cursor: pointer; }
.termbook-tools svg { width: .9rem; height: .9rem; }
.termbook-index { margin-block: 2.35rem 1rem; padding: 1.4rem 1.55rem; border: 1px solid var(--term-line); border-radius: 1.1rem; background: #f7f5fb; }
.termbook-index h2 { margin: 0 0 .8rem; font-size: 1.125rem; line-height: 1.3; font-weight: 650; letter-spacing: -.02em; }
.termbook-index ul, .termbook-related ul, .termbook-more ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: baseline; }
.termbook-index ul { gap: .4rem .45rem; }
.termbook-index li, .termbook-related li, .termbook-more li { margin: 0; }
.termbook-index a { display: inline-block; padding: .35rem .65rem; font-size: .8125rem; line-height: 1.35; text-decoration: none; background: white; border: 1px solid #e2dcec; border-radius: 2rem; }
.termbook-index a:hover { border-color: #9478ce; background: #f2ecff; }
.termbook-entry { position: relative; margin: 0 0 1rem; padding: 1.5rem; border: 1px solid var(--term-line); border-radius: 14px; scroll-margin-top: 6rem; }
.termbook-entry:target { border-bottom-color: #9d83d0; }
.termbook-entry:target::before { content: ""; position: absolute; inset-inline-start: -.8rem; inset-block-start: 1.6rem; height: 1.7rem; width: .18rem; background: #7956bd; border-radius: .2rem; }
.termbook-entry h2, .termbook-action h2, .termbook-more h2, .termbook .evidence-table h2 { margin: 0 0 .6rem; font-size: clamp(1.3rem, 3vw, 1.625rem); line-height: 1.25; letter-spacing: -.025em; }
.termbook-titlelink { color: var(--term-ink) !important; text-decoration: none; }
.termbook-titlelink:hover { text-decoration: underline; text-underline-offset: .15em; }
.termbook-titlelink span { display: inline-block; font-size: .74em; font-weight: 500; color: var(--term-muted); letter-spacing: -.015em; }
.termbook-entry p, .termbook-action p { max-width: 50rem; line-height: 1.67; font-size: 1.0125rem; }
.termbook-entry h2 {font-size:clamp(22px,2.5vw,28px);line-height:1.1;font-weight:700}
.termbook-entry .termbook-definition { margin: 0 0 .5rem; font-weight: 400; font-size:16px;line-height:1.55;max-width:none }
.termbook-entry .termbook-detail { margin: 0; color: #484554; font-size:15px;line-height:1.65;max-width:none }
.termbook-related { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .75rem; margin-block-start: .7rem; color: var(--term-muted); font-size: .86rem; line-height: 1.6; }
.termbook-related ul, .termbook-more ul { gap: .25rem .85rem; }
.termbook-related > span { font-weight: 600; }
.termbook .evidence-table, .termbook-action, .termbook-more { margin-block-start: 2rem; }
.termbook .table-scroll { max-width: 100%; overflow-x: auto; }
.termbook-action { border-radius: 1.15rem; padding: clamp(1.35rem, 4vw, 2.2rem); background: #eee9f8; }
.termbook-action p { margin: .4rem 0 1.1rem; }
.termbook-action > div { display: flex; gap: .7rem 1.1rem; align-items: center; flex-wrap: wrap; }
.termbook-action .btn.primary { color: white; }
.termbook-more { padding-block: 0 1rem; }
html[dir="rtl"] .termbook { letter-spacing: normal; }
html[dir="rtl"] .termbook h1, html[dir="rtl"] .termbook h2 { line-height: 1.5; letter-spacing: 0; }
html[dir="rtl"] .termbook p, html[dir="rtl"] .termbook li, html[dir="rtl"] .termbook .termbook-index a { line-height: 1.95; }
@media (max-width: 620px) {
  .termbook { width: 100%; padding-inline:20px; padding-block: 1.8rem 3rem; }
  .termbook-index { margin-top: 1.75rem; padding: 1rem; border-radius: .8rem; }
  .termbook-entry { padding: 1.5rem; scroll-margin-top: 5rem; }
  .termbook-entry p, .termbook-action p { font-size: 1rem; }
}
