/* The glossary term component (owner 10-12): the word itself is the explanation, not a parenthesis.
   One underlined word, a small circled ?, and a popover on hover (devices with a mouse), keyboard focus and tap (touch screens).
   Colours are central-theme tokens only (blue-ink is the theme's AA link ink in every style, light and dark). */
.rasrouting-term { position: relative; display: inline; }
/* The doubled class beats a page sheet's own `button { ... }` (the sign-in sheet makes every button a full-width block). */
body .rasrouting-term > .rasrouting-term-btn.rasrouting-term-btn, body .rasrouting-term > .rasrouting-term-btn.rasrouting-term-btn:hover, body .rasrouting-term > .rasrouting-term-btn.rasrouting-term-btn:active {
  position: relative; display: inline; box-sizing: content-box; width: auto; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; font: inherit; letter-spacing: inherit; text-align: inherit;
  color: var(--rasrouting-theme-blue-ink); cursor: help;
  text-decoration: underline dotted; text-decoration-thickness: 2px; text-underline-offset: 3px;
}
.rasrouting-term-btn > .fit-ellipsis { display: inline; white-space: inherit; }
/* Form labels and legends fit the word and its question mark into the field's available width. */
:is(label, legend) .rasrouting-term { display: inline-flex; min-width: 0; max-width: 100%; vertical-align: middle; }
body :is(label, legend) .rasrouting-term > .rasrouting-term-btn.rasrouting-term-btn { display: inline-flex; align-items: center; min-width: 0; max-width: 100%; }
:is(label, legend) .rasrouting-term-btn > .fit-ellipsis { display: block; min-width: 0; white-space: nowrap; }
/* A 44px-tall tap area without changing the line. It hangs BELOW the word only: a later word paints over an earlier word's area,
   so an area reaching up would cover the word on the line above and steal its tap (walk 10-27: "Frequently Asked Questions"
   opened "Starter templates"). */
.rasrouting-term-btn::after { content: ""; position: absolute; inset: 0 -6px -28px; }
/* In a label or legend the field sits right below the word: the tap area must not hang over it, or it steals taps meant for the field. */
:is(label, legend) .rasrouting-term-btn::after { inset: 0 -6px; }
.rasrouting-term-btn:focus-visible { outline: 3px solid var(--skin-focus, var(--rasrouting-theme-focus)); outline-offset: 2px; border-radius: 2px; }
.rasrouting-term-q {
  flex-shrink: 0;
  box-sizing: border-box; width: 1.1em; height: 1.1em; margin-inline-start: 0.2em; border: 1.5px solid currentColor; border-radius: 50%;
  font-size: 0.72em; font-weight: 700; line-height: 1; text-align: center; vertical-align: 0.15em; text-decoration: none; font-style: normal;
  display: inline-flex; align-items: center; justify-content: center;
}
/* The ? is drawn here, not typed into the page, so the word reads, copies and translates as itself ("domain", not "domain?"). */
.rasrouting-term-q::before { content: "?"; }
.rasrouting-term-pop {
  display: none; box-sizing: border-box; text-align: left; font-style: normal; font-weight: 400; font-size: 0.9375rem; line-height: 1.5;
  padding: 14px 16px; border: 1px solid var(--rasrouting-theme-line); border-radius: var(--rasrouting-theme-radius-lg, 12px);
  background: var(--rasrouting-theme-surface); color: var(--rasrouting-theme-ink); box-shadow: var(--rasrouting-theme-shadow-lg); overflow-wrap: break-word;
  text-decoration: none; text-transform: none; letter-spacing: normal;
  /* A tooltip floating ON TOP of the page at every width, phone included (owner 10-30: help is a tooltip on top, never expand in flow).
     Fixed, so it takes no room and moves nothing; rasrouting-terms.js place puts it under or above its word and inside the window. */
  position: fixed; z-index: 1000; width: min(280px, calc(100vw - 16px));
}
.rasrouting-term-title { display: block; margin-bottom: 4px; font-size: 0.9375rem; font-weight: 700; color: var(--rasrouting-theme-ink-strong); }
.rasrouting-term-more { display: inline-block; margin-top: 8px; font-weight: 600; color: var(--rasrouting-theme-blue-ink); min-height: 24px; }
.rasrouting-term-btn[aria-expanded="true"] + .rasrouting-term-pop { display: block; }
/* Close (walk 10-29): a quiet × in the popover's top corner, the same ink as its text; a 44px square on a phone (the tap floor),
   smaller where a mouse points. The doubled class beats a page sheet's own `button { ... }`. */
.rasrouting-term-pop { padding-inline-end: 44px; }   /* room for the Close in its corner */
body .rasrouting-term-pop > .rasrouting-term-close.rasrouting-term-close {
  position: absolute; top: 0; right: 0; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  width: 44px; height: 44px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: var(--rasrouting-theme-radius-lg, 12px);
  background: none; box-shadow: none; color: var(--rasrouting-theme-ink-soft, currentColor); font: 400 1.375rem/1 system-ui, sans-serif; cursor: pointer;
}
body .rasrouting-term-pop > .rasrouting-term-close.rasrouting-term-close::before { content: "\00D7"; }
body .rasrouting-term-pop > .rasrouting-term-close.rasrouting-term-close:hover { color: var(--rasrouting-theme-ink-strong, currentColor); }
body .rasrouting-term-pop > .rasrouting-term-close.rasrouting-term-close:focus-visible { outline: 3px solid var(--skin-focus, var(--rasrouting-theme-focus)); outline-offset: -4px; }
@media (min-width: 721px) {
  .rasrouting-term-pop { padding-inline-end: 36px; }
  body .rasrouting-term-pop > .rasrouting-term-close.rasrouting-term-close { width: 32px; height: 32px; font-size: 1.25rem; }
}
/* Hover shows it only where the device has a mouse; a touch screen opens it by tap (aria-expanded, above), never by a stuck :hover. */
@media (hover: hover) and (pointer: fine) {
  .rasrouting-term:hover > .rasrouting-term-btn:not([data-dismissed]) + .rasrouting-term-pop { display: block; }   /* Escape sets data-dismissed */
}
/* A bridge across the gap between the word and the tooltip, so a mouse can travel to a link inside it without it closing. */
.rasrouting-term-pop::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.rasrouting-term-pop[data-place="above"]::before { top: 100%; }
@media (forced-colors: active) {
  .rasrouting-term-btn { color: LinkText; }
  .rasrouting-term-pop { border-color: CanvasText; }
  body .rasrouting-term-pop > .rasrouting-term-close.rasrouting-term-close { color: ButtonText; }
}
@media print { .rasrouting-term-pop, .rasrouting-term-q { display: none !important; } .rasrouting-term-btn { color: inherit; text-decoration: none; } }
