/*
 * BastionGuard Unified — common frontend design system
 * Based on the actual bbPress premium palette. Intentionally applies to the
 * existing WordPress/Bootstrap/Gutenberg markup; no menu or page builders replaced.
 */
:root {
  --bsg-bg: #ffffff;
  --bsg-bg-soft: #ffffff;
  --bsg-surface: #ffffff;
  --bsg-surface-strong: #ffffff;
  --bsg-border: rgba(90,163,204,0.23);
  --bsg-text: #121f32;
  --bsg-muted: #4d5d73;
  --bsg-primary: #086beb;
  --bsg-primary-dark: #086beb;
  --bsg-accent: #1ba9ff;
  --bsg-purple: #086beb;
  --bsg-radius: 14px;
  --bsg-shadow: 0 12px 35px rgba(10,45,90,0.063);
  --bsgx-bg: #ffffff;
  --bsgx-surface: #ffffff;
  --bsgx-panel: #ffffff;
  --bsgx-panel-high: #ffffff;
  --bsgx-border: rgba(90,163,204,0.23);
  --bsgx-text: #121f32;
  --bsgx-muted: #4d5d73;
  --bsgx-accent: #086beb;
  --bsgx-blue: #1ba9ff;
  --bsgx-purple: #086beb;
  --bsgx-radius: 14px;
  --bs-body-bg: #ffffff;
  --bs-body-color: #121f32;
  --bs-link-color: #086beb;
  --bs-border-color: rgba(90,163,204,0.23);
}
html, body { background-color: #ffffff; }
body {
  color: var(--bsg-text);
  font-family: "Cantarell", system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #ffffff;
}
body :where(a,button,input,select,textarea):focus-visible { outline: 2px solid rgba(8,107,235,0.6); outline-offset: 3px; }
body a { color: #086beb; transition: color .2s; }
body a:hover, body a:focus { color: #086beb; }
body :where(h1,h2,h3,h4,h5,h6) { color: #121f32; letter-spacing: -.025em; }
body :where(p,li) { line-height: 1.65; }
body :where(hr) { border-color: rgba(90,163,204,0.25); opacity: 1; }
body :where(small,.text-muted,.text-secondary) { color: #4d5d73 !important; }

/* One global header for the whole portal, bbPress included. No page-specific markup. */
body .site-header.bsg-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(90,163,204,0.23);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px rgba(10,45,90,0.06);
}
body .bsg-header .navbar, body .bsg-header .bsg-navbar { background: transparent; }
body .bsg-header .navbar-nav > li > a,
body .bsg-header .navbar .nav-link { color: #66768a; }
body .bsg-header .navbar-nav > li.current-menu-item > a,
body .bsg-header .navbar .nav-link:hover,
body .bsg-header .navbar .nav-link:focus { color: #086beb; }
body .bsg-header .navbar-toggler {
  border: 1px solid rgba(148,190,226,0.35);
  border-radius: 12px;
  background: rgba(255,255,255,0.92);
  padding: .7rem .8rem;
}
body .bsg-header .navbar-toggler:focus { box-shadow: 0 0 0 2px rgba(8,107,235,0.216); }
body .bsg-header .dropdown-menu,
body .bsg-header .bsg-account-dropdown {
  background: #ffffff;
  border: 1px solid rgba(90,163,204,0.28);
  border-radius: 12px;
  color: #121f32;
}
body .bsg-header .dropdown-menu .dropdown-item { color: #66768a; }
body .bsg-header .dropdown-menu .dropdown-item:hover,
body .bsg-header .dropdown-menu .dropdown-item:focus { color: #086beb; background: rgba(14,122,244,0.11); }
body .bsg-header .btn-bsg-icon { border: 1px solid rgba(90,163,204,0.25); background: rgba(255,255,255,0.92); color: #121f32; }
body .bsg-header .btn-bsg-icon:hover { border-color: rgba(8,107,235,0.5); color: #086beb; }

/* Buttons: same flat-corner teal/cyan controls as the forum. */
body .btn-bsg-primary, body .btn.btn-bsg-primary,
body .wp-block-button .wp-block-button__link:not(.has-background),
body input[type=submit], body .button:not(.wp-element-button),
body button.btn-primary, body a.btn-primary {
  --bs-btn-bg: #0c75f1;
  --bs-btn-color: #022525;
  --bs-btn-border-color: rgba(8,107,235,0.6);
  --bs-btn-hover-bg: #0f7df6;
  --bs-btn-hover-color: #022525;
  --bs-btn-hover-border-color: rgba(8,107,235,0.6);
  background: linear-gradient(135deg, #0a6fed, #0e79f4);
  border: 1px solid rgba(8,107,235,0.65);
  border-radius: 10px;
  color: #ffffff;
  font-size: .9rem;
  font-weight: 800;
  padding: .73rem 1.15rem;
  box-shadow: 0 8px 26px rgba(8,107,235,0.096);
  text-decoration: none;
  transition: transform .18s, filter .18s;
}
body .btn-bsg-primary:hover, body .btn.btn-bsg-primary:hover,
body .wp-block-button .wp-block-button__link:not(.has-background):hover,
body input[type=submit]:hover, body .button:not(.wp-element-button):hover {
  color: #022525;
  filter: brightness(1.08);
  transform: translateY(-1px);
}
body .btn-bsg-outline, body .btn-outline-primary,
body .wp-block-button.is-style-outline .wp-block-button__link {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(101,177,218,0.32);
  border-radius: 10px;
  color: #66768a;
  font-weight: 750;
  box-shadow: none;
}
body .btn-bsg-outline:hover, body .btn-outline-primary:hover,
body .wp-block-button.is-style-outline .wp-block-button__link:hover { border-color: rgba(8,107,235,0.6); color: #086beb; background: rgba(255,255,255,0.92); }

/* Hero/title style: same gradients, geometry and typography in page, archive, post and landing. */
body .bsg-hero, body .bsg-page-hero,
body .wp-block-cover.bsg-hero, body .wp-block-group.is-style-bsg-hero {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  border-bottom: 1px solid rgba(8,107,235,0.35);
  background: radial-gradient(ellipse at 5% 6%, rgba(8,107,235,0.19), transparent 33%),
              radial-gradient(ellipse at 76% 10%, rgba(8,107,235,0.024), transparent 40%),
              linear-gradient(115deg,#ffffff 0%,#ffffff 56%,#ffffff 100%);
}
body .bsg-page-hero::before, body .bsg-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(17,128,248,0.036) 1px, transparent 1px),
                    linear-gradient(90deg,rgba(17,128,248,0.036) 1px,transparent 1px);
  background-size: 52px 52px; opacity: .67;
  -webkit-mask-image: linear-gradient(#000,transparent); mask-image: linear-gradient(#000,transparent);
}
body .bsg-page-hero::after {
  background: linear-gradient(90deg, transparent,rgba(14,122,244,0.7),rgba(27,169,255,0.56),transparent);
  box-shadow: 0 0 16px rgba(8,107,235,0.184);
}
body .bsg-page-hero .container, body .bsg-hero > .container { position: relative; z-index: 1; }
body .bsg-page-hero h1, body .bsg-hero h1 { font-size: clamp(2.1rem,3.8vw,3.25rem); font-weight: 850; letter-spacing: -.046em; line-height: 1.13; overflow-wrap: break-word; }
body .bsg-kicker, body .bsg-page-context { color: #086beb; letter-spacing: .12em; }
body .bsg-page-description, body .archive-description { color: #4d5d73; font-size: 1rem; line-height: 1.7; }
body .bsg-page-description { display: block; }
body .bsg-page-hero a { color: #c7f4ff; }
body .bsg-section, body .bsg-section-alt { background: #ffffff; }

/* Premium forum panels shared by cards/archives/sidebar/WordPress blocks. */
body .bsg-card, body article.card.bsg-card,
body .stat-card, body .bsg-terminal-card,
body .wp-block-query .wp-block-post,
body .is-style-bsg-card, body .is-style-bsg-panel,
body .widget-area .widget,
body .bsg-search-modal .modal-content {
  color: #121f32;
  background: linear-gradient(155deg, #ffffff, #ffffff);
  border: 1px solid rgba(90,163,204,0.25);
  border-radius: 14px;
  box-shadow: 0 8px 35px rgba(10,45,90,0.048);
}
body .bsg-card:hover, body .wp-block-query .wp-block-post:hover,
body .is-style-bsg-card:hover {
  border-color: rgba(8,107,235,0.48);
  box-shadow: 0 14px 32px rgba(10,45,90,0.072),0 0 24px rgba(8,107,235,0.064);
}
body .bsg-card .card-body, body .wp-block-query .wp-block-post { padding: clamp(1rem,2.4vw,1.5rem); }
body .bsg-card .card-title, body .bsg-card .card-title a { color: #121f32; }
body .bsg-card .card-text, body .bsg-card .text-white-50 { color: #4d5d73 !important; }
body .bsg-card-img { border-radius: 13px 13px 0 0; }
body .bsg-icon { border: 1px solid rgba(8,107,235,0.3); border-radius: 11px; color: #ffffff; background: rgba(9,109,236,0.1); }
body .stat-card { padding: 1.25rem; }
body .stat-card strong { color: #121f32; }
body .stat-card span { color: #4d5d73; }
body .timeline > div { background: #ffffff; border: 1px solid rgba(90,163,204,0.23); border-radius: 12px; }
body .widget-area .widget { margin-bottom: 1.1rem; padding: 1.3rem; }
body .widget-area .widget-title, body .widget-area h2 { color: #121f32; font-weight: 800; }
body :where(.entry-content,.bsg-content) blockquote,
body .wp-block-quote, body .wp-block-pullquote { background: rgba(8,107,235,0.06); border-left: 3px solid rgba(8,107,235,0.6); border-radius: 0 12px 12px 0; color: #121f32; padding: 1rem 1.25rem; }
body .entry-content :where(pre,.wp-block-code), body .bsg-content pre {
  max-width: 100%; overflow-x: auto; border-radius: 12px;
  color: #086beb; background: #ffffff; border: 1px solid rgba(90,163,204,0.23);
  padding: 1rem; white-space: pre;
}
body .entry-content :where(code), body .bsg-content code { color: #086beb; }
body :where(.entry-content,.bsg-content) table,
body .wp-block-table table, body .table {
  color: #66768a; border: 1px solid rgba(90,163,204,0.23);
  background: #ffffff;
}
body :where(.entry-content,.bsg-content) th,
body :where(.entry-content,.bsg-content) td,
body .wp-block-table :where(th,td) { padding: .8rem 1rem; border: 1px solid rgba(90,163,204,0.2); }
body .wp-block-table th, body .table thead { background: rgba(8,107,235,0.26); color: #ffffff; }
body .wp-block-separator { border-color: rgba(90,163,204,0.23); }
body .wp-block-group.has-background, body .wp-block-columns .wp-block-column.has-background { border-radius: 14px; }
body .wp-block-details, body details { border: 1px solid rgba(90,163,204,0.23); border-radius: 12px; background: #ffffff; padding: .8rem 1rem; }
body .wp-block-details summary, body details summary { color: #121f32; font-weight: 750; cursor: pointer; }
body .wp-block-image img, body .wp-block-gallery img { border-radius: 12px; }

/* Form controls across site, including search and user profile. Exclude checkboxes/radio. */
body :where(.bsg-content,.entry-content,.widget-area,.bsg-search-modal,.bsg-footer)
  :where(input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=hidden]), select, textarea, .form-control, .form-select),
body .bsg-search-modal .form-control {
  color: #121f32; background: #ffffff;
  border: 1px solid rgba(96,163,203,0.32); border-radius: 10px;
  padding: .7rem .9rem; max-width: 100%;
}
body :where(.bsg-content,.entry-content,.widget-area,.bsg-search-modal,.bsg-footer) :where(input,textarea)::placeholder { color: #4d5d73; opacity: 1; }
body :where(.bsg-content,.entry-content,.widget-area,.bsg-search-modal,.bsg-footer) :where(input,select,textarea,.form-control):focus {
  color: #121f32; background-color: #ffffff; border-color: rgba(8,107,235,0.6); box-shadow: 0 0 0 3px rgba(8,107,235,0.08);
}
body .bsg-search-modal .modal-title { color: #121f32; }
/* 1.11.88: the modal is white, so the X must stay dark (invert(1) made it white on white). */
body .bsg-search-modal .modal-header .btn-close {
  filter: none !important; opacity: 1; flex: 0 0 auto;
  width: 38px; height: 38px; padding: 0; margin: 0 0 0 auto; box-sizing: border-box;
  background: #f1f5fb url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23121f32'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center / 13px 13px no-repeat;
  border: 1px solid rgba(90,163,204,0.35); border-radius: 10px; box-shadow: none;
}
body .bsg-search-modal .modal-header .btn-close:hover { background-color: #e3ecf8; border-color: rgba(8,107,235,0.5); }
body .bsg-search-modal .modal-header .btn-close:focus { outline: none; box-shadow: none; }
body .bsg-search-modal .modal-header .btn-close:focus-visible { outline: 2px solid #086beb; outline-offset: 2px; }

/* Uniform pagination outside bbPress. Forum-specific pager is styled separately. */
body .bsg-pagination .nav-links, body .page-links, body .post-navigation .nav-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem;
  padding: .75rem; background: #ffffff;
  border: 1px solid rgba(90,163,204,0.25); border-radius: 12px;
}
body .bsg-pagination .nav-links :where(a,span), body .page-links :where(a,span),
body .post-navigation a { display: inline-flex; padding: .55rem .8rem; min-height: 2.4rem; align-items: center; border-radius: 8px; border: 1px solid rgba(90,163,204,0.22); color: #66768a; background: rgba(8,107,235,0.05); }
body .bsg-pagination .nav-links .current { background: #0e7af4; color: #ffffff; border-color: rgba(8,107,235,0.6); }

/* Keep the user's existing logo/menu structure identical across all URLs. */
@media (max-width: 991.98px) {
  body .bsg-header .navbar-collapse {
    border: 1px solid rgba(90,163,204,0.26);
    border-radius: 16px; padding: 1rem;
    background: linear-gradient(145deg,#ffffff,#ffffff);
    box-shadow: 0 18px 40px rgba(10,45,90,0.072);
  }
  body .bsg-header .navbar-collapse .navbar-nav > li > a,
  body .bsg-header .navbar-collapse .navbar-nav > li > .nav-link {
    border-radius: 11px;
    color: #121f32; min-height: 2.9rem;
  }
  body .bsg-header .navbar-collapse .navbar-nav > li.current-menu-item > a,
  body .bsg-header .navbar-collapse .navbar-nav > li > a:hover {
    background: linear-gradient(110deg,rgba(8,107,235,0.32),rgba(8,107,235,0.05)); color: #086beb;
  }
  body .bsg-header .bsg-header-actions { border-top: 1px solid rgba(90,163,204,0.2); }
  body .bsg-page-hero h1 { font-size: clamp(1.85rem,6vw,2.65rem); }
}
@media (max-width: 600px) {
  body .bsg-card .card-body { padding: 1rem; }
  body .bsg-page-hero .container { padding-block: .8rem; }
  body .bsg-page-hero h1 { overflow-wrap: anywhere; }
  body :where(.entry-content,.bsg-content) table { display: block; max-width: 100%; overflow-x: auto; }
  body .bsg-pagination .nav-links { gap: .35rem; }
}
@media (prefers-reduced-motion: reduce) {
  body .bsg-card, body .btn, body a { transition: none !important; }
}


/* Site footer, 404 and default navigation: same surface palette as bbPress. */
body footer.site-footer.bsg-footer:not(.swmm-footer) {
  color: #ffffff;
  border-top: 1px solid rgba(90,163,204,0.26);
  background: radial-gradient(ellipse at 8% 0%,rgba(11,115,240,0.11),transparent 42%),
              linear-gradient(150deg,#ffffff,#ffffff 56%,#ffffff);
}
body footer.site-footer.bsg-footer:not(.swmm-footer) a { color: #66768a; }
body footer.site-footer.bsg-footer:not(.swmm-footer) a:hover { color: #086beb; }
body footer.site-footer.bsg-footer:not(.swmm-footer) .bsg-footer-widget,
body footer.site-footer.bsg-footer:not(.swmm-footer) .bsg-footer-card {
  border-color: rgba(90,163,204,0.23); color: #121f32;
}
body .bsg-404-page { color: #121f32; background: #ffffff; }
body .bsg-404-page .bsg-404-shell {
  background: radial-gradient(ellipse at 5% 10%,rgba(9,108,236,0.16),transparent 45%),
              radial-gradient(ellipse at 92% 25%,rgba(8,107,235,0.02),transparent 42%), #ffffff;
}
body .bsg-404-search :where(input,button) { border-radius: 10px; }
body .bsg-404-message { color: #4d5d73; }
