:root {
  --bsai-bg: #060c13;
  --bsai-line-soft: #13232f;
  --bsai-fg: #eaf2f6;
  --bsai-muted: #94a7b5;
  --bsai-on-accent: #03141a;
  --bsai-accent: #22d3ee;
  --bsai-accent-ink: #7ee7f7;
  --bsai-radius-sm: 6px;
  --bsai-header-height: 66px;
  --bsai-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-x: clip !important;
  scroll-behavior: smooth;
  scroll-padding-top: var(--bsai-header-height);
}

body {
  overflow: visible !important;
  margin: 0;
  background: var(--bsai-bg);
  color: var(--bsai-fg);
  font-family: var(--bsai-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.bsai-page {
  min-height: 100vh;
  background: var(--bsai-bg);
}

.bsai-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bsai-bg);
}

.bsai-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--bsai-header-height);
  padding: 0 130px;
  border-bottom: 1px solid var(--bsai-line-soft);
  background: var(--bsai-bg);
}

.bsai-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--bsai-fg);
  text-decoration: none;
  flex-shrink: 0;
}

.bsai-page .bsai-logo:hover,
.bsai-page .bsai-logo:focus,
.bsai-page .bsai-logo:active,
.bsai-page .bsai-logo:hover .bsai-logo__word,
.bsai-page .bsai-logo:focus .bsai-logo__word,
.bsai-page .bsai-logo:active .bsai-logo__word {
  color: var(--bsai-fg);
  text-decoration: none;
}

.bsai-logo__img {
  display: block;
  width: auto;
  height: 40px;
  max-width: 100%;
}

.bsai-logo__mark {
  display: block;
  width: 20px;
  height: 28px;
  flex-shrink: 0;
}

.bsai-logo__word {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 4.16px;
  text-transform: uppercase;
  white-space: nowrap;
}

.bsai-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.bsai-nav__link {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--bsai-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.bsai-nav__link:hover {
  color: var(--bsai-fg);
}

.bsai-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--bsai-radius-sm);
  background: var(--bsai-accent);
  color: var(--bsai-on-accent);
  font-family: var(--bsai-font);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.bsai-btn:hover {
  background: var(--bsai-accent-ink);
  color: #fff !important;
}

.bsai-btn:focus-visible,
.bsai-nav__link:focus-visible,
.bsai-logo:focus-visible {
  outline: 3px solid var(--bsai-accent);
  outline-offset: 2px;
}

.bsai-main {
  display: block;
}

.bsai-section {
  display: block;
  scroll-margin-top: var(--bsai-header-height);
}

.bsai-page .contextual-region { position: relative; }

.bsai-admin {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 500;
  max-width: calc(100vw - 32px);
  padding: 8px;
  border: 1px solid #1b3040;
  border-radius: 10px;
  background: #0f202d;
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
}

.bsai-admin ul {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bsai-admin a {
  display: block;
  padding: 6px 12px;
  border: 1px solid #1b3040;
  border-radius: 6px;
  font-family: var(--bsai-font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #eaf2f6;
  text-decoration: none;
}

.bsai-admin a:hover,
.bsai-admin a.is-active { border-color: #22d3ee; color: #22d3ee; }

.bsai-admin h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.bsai-404 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--bsai-header-height) - 80px);
  padding: 80px 24px;
  text-align: center;
}

.bsai-404__eyebrow {
  margin: 0 0 20px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--bsai-amber, #f59e0b);
}

.bsai-404__title {
  margin: 0 0 16px;
  font-size: 52px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--bsai-fg);
}

.bsai-404__text {
  margin: 0 0 40px;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--bsai-muted);
}

.bsai-404__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.bsai-404__btn {
  padding: 16px 22px;
  font-size: 14px;
}

.bsai-btn--outline {
  background: transparent;
  border: 1px solid var(--bsai-line-soft);
  color: var(--bsai-fg);
}

.bsai-btn--outline:hover {
  background: transparent;
  border-color: var(--bsai-accent);
}

@media (max-width: 600px) {
  .bsai-404__title { font-size: 36px; }
  .bsai-404__text { font-size: 16px; }
}
