/* Wex link previews (wexpreview.py, wexpreview.js). Colors come from site.css's variables, so light,
   dark and high contrast follow the reader's display settings. Hidden unless the script opens a card. */
.wexp[hidden]{display:none}
.wexp{position:fixed;z-index:50;box-sizing:border-box;width:min(22rem,calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;
  padding:.75rem .9rem;background:var(--panel,var(--bg));color:var(--fg);border:1px solid var(--rule);border-radius:6px;
  box-shadow:0 4px 18px rgba(0,0,0,.22);font-size:.9rem;line-height:1.45;text-align:left;font-weight:normal;font-style:normal;white-space:normal}
.wexp>span{display:block}
.wexp-t{font-weight:700;color:var(--strong,var(--fg));margin-bottom:.25rem}
.wexp-c{margin-top:.5rem;font-size:.8rem;color:var(--muted)}
.wexp a{color:var(--accent)}
.wexp-go{display:none}
.wexp.touch .wexp-go{display:inline-block;margin-top:.5rem;padding:.35rem 0;font-weight:700}
@media (prefers-reduced-motion:no-preference){.wexp.open{animation:wexp-in .12s ease-out}}
@keyframes wexp-in{from{opacity:0}to{opacity:1}}
@media (forced-colors:active){.wexp{border-color:CanvasText;box-shadow:none}.wexp a{color:LinkText}}
@media print{.wexp{display:none!important}}
/* Wex links are definitions, not sources: dotted underline (carries the meaning) plus their own color.
   --wex: light #6a3d9a (7.6:1 on bg, 7.0:1 on panel), dark #c9a8f0 (8.8:1, 8.0:1); high contrast uses the link color. */
:root{--wex:#6a3d9a}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--wex:#c9a8f0}}
:root[data-theme="dark"]{--wex:#c9a8f0}
:root[data-hc="1"]{--wex:var(--accent)}
@media (prefers-color-scheme: dark){:root[data-hc="1"]:not([data-theme="light"]){--wex:var(--accent)}}
a.wex{color:var(--wex);text-decoration-line:underline;text-decoration-style:dotted;text-decoration-thickness:max(1.5px,.09em);text-underline-offset:.18em}
a.wex:hover{text-decoration-thickness:max(2px,.12em)}
@media (forced-colors:active){a.wex{color:LinkText}}
/* Reader option (display panel): Wex definitions off. theme.js also strips the href and aria links. */
:root[data-wex="off"] a.wex{color:inherit;text-decoration:none;cursor:text}
:root[data-wex="off"] a.wex .visually-hidden{display:none}
:root[data-wex="off"] .wexp{display:none!important}
@media (forced-colors:active){:root[data-wex="off"] a.wex{color:CanvasText}}
/* Charlie's notes on terms (notes.py): same card, dotted underline in the regular text color, no link. */
.term-note{text-decoration-line:underline;text-decoration-style:dotted;text-decoration-color:var(--muted);text-decoration-thickness:max(1.5px,.09em);text-underline-offset:.18em;cursor:help}
.term-note:hover{text-decoration-thickness:max(2px,.12em)}
.term-note:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media (forced-colors:active){.term-note{text-decoration-color:CanvasText}}
