/* Column help: the header popover and the glossary link under the table.
   Tokens come from theme.css; the fallbacks keep it readable without it. */
.column-help {
  position: fixed; z-index: 70; left: 0; top: 0; box-sizing: border-box;
  width: max-content; max-width: min(320px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto;
  margin: 0; padding: 12px 14px 11px; border: 1px solid var(--line, #1f2632); border-radius: 10px;
  background: var(--panel-2, #151a23); box-shadow: 0 10px 28px rgba(0, 0, 0, .34);
  color: var(--muted, #9aa6b7); font: 400 13px/1.5 var(--v2-font, system-ui, sans-serif);
  letter-spacing: 0; text-align: left; text-transform: none; white-space: normal;
  opacity: 0; transition: opacity .12s ease;
}
.column-help[hidden] { display: none; }
.column-help.is-open { opacity: 1; }
.column-help-title { display: block; margin: 0 0 3px; color: var(--text, #eef2f7); font-weight: 600; }
.column-help-text { margin: 0; color: inherit; font: inherit; }
.column-help-more { display: inline-block; margin-top: 8px; color: var(--accent, #8fb4ff); font-weight: 500; text-decoration: none; }
.column-help-more:hover { text-decoration: underline; }
.column-help-more:focus-visible { outline: 2px solid var(--accent, #8fb4ff); outline-offset: 3px; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { .column-help { transition: none; } }

.column-help-note { margin: 0; padding: 5px 18px 6px; border-top: 1px solid var(--line-soft, #171d27); font-size: 13px; line-height: 1.4; text-align: left; }
/* The padding belongs to the link so a thumb has more than a line of text to hit. */
.column-help-note a { display: inline-block; padding: 6px 0; color: var(--muted, #9aa6b7); text-decoration: underline; text-decoration-color: var(--subtle, #6f7b8c); text-underline-offset: 3px; }
.column-help-note a:hover { color: var(--text, #eef2f7); }
/* With a mouse the headers explain themselves, so the link only appears when
   it receives keyboard focus. The test is on the main input, not on any input:
   a phone with a hovering stylus is still used by touch and keeps the link. */
@media (hover: hover) and (pointer: fine) {
  .column-help-note:not(:focus-within) { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 700px) { .column-help-note { padding: 4px 9px 5px; } }
