@import url("../themes/theme-tokens.css");
.bb-theme-enabled #bbNavAuth .bb-theme-setting {
  border-top: 1px solid var(--bb-control-border);
  margin-top: var(--bb-space-2);
  padding: var(--bb-space-3) 10px 8px;
}
.bb-theme-enabled #bbNavAuth .bb-theme-setting label {
  display: block;
  margin-bottom: var(--bb-space-2);
  color: var(--bb-control-muted);
  font: 700 14px/1.4 var(--bb-control-font);
  letter-spacing: 0;
}
.bb-theme-enabled #bbNavAuth .bb-theme-setting select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: var(--bb-control-compact-height);
  border: 1px solid var(--bb-control-field-border);
  border-radius: var(--bb-control-radius);
  padding: 8px 10px;
  color: var(--bb-control-ink);
  background: var(--bb-control-field-surface);
  font: 600 14px/1.4 var(--bb-control-font);
  letter-spacing: 0;
  color-scheme: dark;
}
.bb-theme-enabled #bbNavAuth .bb-theme-setting select:focus-visible { outline: 2px solid var(--bb-control-accent); outline-offset: 2px; }
.bb-theme-enabled #bbNavAuth .bb-nav-menu { width: 256px; max-width: calc(100vw - 24px); }
html.bb-theme-enabled[data-bb-theme='patriotic'] .bb-trust-watermark {
  background: var(--theme-component-ink-36);
  color: var(--theme-on-header, #f6f8fa);
  border-color: var(--theme-component-surface-36);
  opacity: 1;
}
html[data-bb-theme='patriotic'] #bbNavAuth .bb-nav-menu { background: var(--theme-component-ink-28); border-color: var(--bb-control-border); box-shadow: 0 12px 32px var(--theme-component-surface-47); }
html[data-bb-theme='patriotic'] #bbNavAuth .bb-nav-menu :is(a, button) { color: var(--bb-control-ink); }
html[data-bb-theme='patriotic'] #bbNavAuth .bb-nav-menu :is(a, button):hover { background: var(--bb-control-selected-surface); }
html[data-bb-theme='patriotic'] #bbNavAuth .bb-nav-email { color: var(--bb-control-muted); border-color: var(--bb-control-border); }
html[data-bb-theme='patriotic'] #bbNavAuth .bb-theme-setting select { color-scheme: light; }
html[data-bb-theme='patriotic'] .hero-actions .bb-action--secondary { --bb-action-ink: var(--theme-component-ink-28); --bb-action-border: var(--theme-component-border-12); --bb-action-surface: var(--theme-component-ink-37); }

/* Existing Dress Blues decoration visibility and document emphasis. */
html.bb-theme-document[data-bb-theme="patriotic"] .pin-cell { font-weight:700; }
html.bb-theme-document[data-bb-theme="patriotic"] :is(.header-overlay,.mission-header canvas,.scan-beam),
html.bb-drill-standard[data-bb-theme="patriotic"] :is(.bb-matrix-layer,.scan-beam),
html.bb-theme-hub[data-bb-theme="patriotic"] .scan-beam { display:none; }
/* Header logo follows the theme: gold for Reserve, red-white-blue for Dress Blues (2026-10-25). */
html.bb-theme-enabled[data-bb-theme='reserve'] img[src*="logo-bb-black-green"] { content: url("/logo/logo-bb-gold.png"); }
html.bb-theme-enabled[data-bb-theme='patriotic'] img[src*="logo-bb-black-green"] { content: url("/logo/logo-bb-dress-blues.png"); }
/* Old Glory: a light variant of Dress Blues (data-bb-variant="oldglory"). Faint stripes fading in from the right, a star canton top-left, and a red/parchment/navy rule under the header. */
html.bb-theme-enabled[data-bb-theme='patriotic'][data-bb-variant='oldglory'] body {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='364'%3E%3Cdefs%3E%3Cpattern id='s' width='52' height='52' patternUnits='userSpaceOnUse'%3E%3Cg fill='%23293e59'%3E%3Cpath d='M13 4l2.6 7.9H24l-6.8 4.9 2.6 8-6.8-4.9-6.8 4.9 2.6-8L2 11.9h8.4z'/%3E%3Cpath d='M39 30l2.6 7.9H50l-6.8 4.9 2.6 8-6.8-4.9-6.8 4.9 2.6-8-6.8-4.9h8.4z'/%3E%3C/g%3E%3C/pattern%3E%3CradialGradient id='f' cx='0' cy='0' r='1.2'%3E%3Cstop offset='.35' stop-color='%23fff'/%3E%3Cstop offset='.78' stop-color='%23fff' stop-opacity='0'/%3E%3C/radialGradient%3E%3Cmask id='m'%3E%3Crect width='560' height='364' fill='url(%23f)'/%3E%3C/mask%3E%3C/defs%3E%3Crect width='560' height='364' fill='url(%23s)' mask='url(%23m)' opacity='.085'/%3E%3C/svg%3E") 6px 6px / min(46vw, 560px) auto no-repeat fixed,
    linear-gradient(105deg, var(--theme-page) 18%, transparent 55%, color-mix(in srgb, var(--theme-page) 65%, transparent) 100%) fixed,
    repeating-linear-gradient(180deg, rgba(147,72,61,.075) 0 26px, transparent 26px 52px) fixed,
    var(--theme-page) !important;
}
html.bb-theme-enabled[data-bb-theme='patriotic'][data-bb-variant='oldglory'] .bb-return-host { box-shadow: 0 3px 0 #93483d, 0 5px 0 #f7f2e7, 0 7px 0 #293e59; }
html.bb-theme-enabled[data-bb-theme='patriotic'][data-bb-variant='oldglory'] .bb-return-host .bb-validate-link { color: var(--theme-on-primary) !important; border-color: var(--theme-primary) !important; }
html.bb-theme-enabled[data-bb-theme='patriotic'][data-bb-variant='oldglory'] .bb-trust-watermark { color: #f7f2e7; background: #293e59; }
html.bb-theme-enabled[data-bb-theme='patriotic'][data-bb-variant='oldglory'] img[src*="logo-bb-black-green"] { content: url("/logo/logo-bb-old-glory.png"); }
/* Old Glory header: a waving flag (canton on the left, stripes flying right) fills the empty right side of the nav bar; tune its strength with --og-flag-opacity. */
html.bb-theme-enabled[data-bb-theme='patriotic'][data-bb-variant='oldglory'] .bb-return-host { --og-flag-opacity: .5; position: relative; z-index: 2000; }
html.bb-theme-enabled[data-bb-theme='patriotic'][data-bb-variant='oldglory'] .bb-return-host::before {
  content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; right: 0; width: min(960px, 52%);
  background: url("/image/theme/old-glory-flag.svg") left center / cover no-repeat;
  opacity: var(--og-flag-opacity); pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%); mask-image: linear-gradient(90deg, transparent, #000 7%);
}
@media (max-width: 1100px) { html.bb-theme-enabled[data-bb-theme='patriotic'][data-bb-variant='oldglory'] .bb-return-host::before { display: none; } }
/* The Neon-only reduce-glow option stays hidden in the other themes even though .bb-theme-setting sets a display. */
#bbNavAuth #bbReduceGlowSetting[hidden] { display: none !important; }
/* Light themes: the dark drill/tool hero banner gets a wash of the theme surface so the hero follows the theme and its dark text stays readable. */
html.bb-theme-enabled[data-bb-theme='patriotic'] .hero.tool-hero { box-shadow: inset 0 0 0 3000px color-mix(in srgb, var(--theme-surface) 84%, transparent); border-color: var(--theme-border); }
/* Dark themes: tint the green Cyber hero banner toward the theme's own surface so it doesn't clash. */
html.bb-theme-enabled:is([data-bb-theme='neon'],[data-bb-theme='reserve']) .hero.tool-hero { box-shadow: inset 0 0 0 3000px color-mix(in srgb, var(--theme-surface) 62%, transparent); border-color: var(--theme-border); }
/* The page header (and its Account menu) stays above sticky page toolbars such as the Clearances search bar (z-index 1200), in every theme. */
.bb-standard-site .bb-page-header.bb-return-host { z-index: 2000; }
