/* BB inline link buttons (Brett, 2026-11-07: "instead of links can we do stylized buttons for all links?").
   Plain text links inside lesson content become small pill buttons with an arrow.
   Applies to class-less links in content text only (paragraphs, lists, table cells, callouts), never nav, footer,
   headers, or links that already have a class (real buttons, cards, tiles keep their own look).
   Theme parity: every color is a --bbl-* token re-declared per theme (Cyber default, Neon, Reserve, Americana, Old Glory). */

:root {
  --bbl-ink: #69f0ae;
  --bbl-ink-hover: #04110a;
  --bbl-bg: rgba(0, 200, 83, .1);
  --bbl-bg-hover: #00c853;
  --bbl-line: rgba(0, 200, 83, .55);
  --bbl-glow: rgba(0, 230, 118, .35);
}
[data-bb-theme="neon"] {
  --bbl-ink: #8ff3ff;
  --bbl-ink-hover: #10091c;
  --bbl-bg: rgba(77, 234, 255, .1);
  --bbl-bg-hover: #4deaff;
  --bbl-line: rgba(77, 234, 255, .55);
  --bbl-glow: rgba(255, 87, 200, .35);
}
[data-bb-theme="reserve"] {
  --bbl-ink: #f0d68c;
  --bbl-ink-hover: #08090a;
  --bbl-bg: rgba(216, 184, 93, .1);
  --bbl-bg-hover: #d8b85d;
  --bbl-line: rgba(216, 184, 93, .55);
  --bbl-glow: rgba(216, 184, 93, .35);
}
[data-bb-theme="patriotic"] {
  --bbl-ink: #19385b;
  --bbl-ink-hover: #f6f8fa;
  --bbl-bg: rgba(25, 56, 91, .08);
  --bbl-bg-hover: #19385b;
  --bbl-line: rgba(25, 56, 91, .45);
  --bbl-glow: rgba(163, 60, 69, .25);
}
[data-bb-theme="patriotic"][data-bb-variant="oldglory"] {
  --bbl-ink: #293e59;
  --bbl-ink-hover: #f7f2e7;
  --bbl-bg: rgba(41, 62, 89, .08);
  --bbl-bg-hover: #293e59;
  --bbl-line: rgba(41, 62, 89, .45);
  --bbl-glow: rgba(147, 72, 61, .25);
}

:is(.intel-content, .bb-lesson, article, main .cl-content) :is(p, li, td, dd, figcaption, blockquote, .callout, .exam-angle) a[href]:not([class]) {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .08em .7em .1em;
  margin: 0 .1em;
  border: 1px solid var(--bbl-line);
  border-radius: 999px;
  background: var(--bbl-bg);
  color: var(--bbl-ink) !important;
  font-weight: 700;
  line-height: 1.45;
  text-decoration: none !important;
  white-space: nowrap;
  vertical-align: baseline;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
:is(.intel-content, .bb-lesson, article, main .cl-content) :is(p, li, td, dd, figcaption, blockquote, .callout, .exam-angle) a[href]:not([class])::after {
  content: "\2192";               /* → */
  font-size: .9em;
  transition: transform .15s ease;
}
:is(.intel-content, .bb-lesson, article, main .cl-content) :is(p, li, td, dd, figcaption, blockquote, .callout, .exam-angle) a[href^="http"]:not([class])::after {
  content: "\2197";               /* ↗ external */
}
:is(.intel-content, .bb-lesson, article, main .cl-content) :is(p, li, td, dd, figcaption, blockquote, .callout, .exam-angle) a[href]:not([class]):hover {
  background: var(--bbl-bg-hover);
  color: var(--bbl-ink-hover) !important;
  box-shadow: 0 0 14px var(--bbl-glow);
}
:is(.intel-content, .bb-lesson, article, main .cl-content) :is(p, li, td, dd, figcaption, blockquote, .callout, .exam-angle) a[href]:not([class]):hover::after { transform: translateX(2px); }
:is(.intel-content, .bb-lesson, article, main .cl-content) :is(p, li, td, dd, figcaption, blockquote, .callout, .exam-angle) a[href]:not([class]):focus-visible {
  outline: 2px solid var(--bbl-bg-hover);
  outline-offset: 2px;
}
/* Long link text may wrap on phones instead of pushing the page sideways. */
@media (max-width: 760px) {
  :is(.intel-content, .bb-lesson, article, main .cl-content) :is(p, li, td, dd, figcaption, blockquote, .callout, .exam-angle) a[href]:not([class]) { white-space: normal; }
}
