/* ==========================================================================
   BotManifold Documentation — Terminal Design System
   Dark-only. Exact match to botmanifold.com landing page aesthetic.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Color Tokens — identical to landing page globals.css
   -------------------------------------------------------------------------- */

:root {
  --lp-bg:            #030303;
  --lp-surface:       #080808;
  --lp-border:        #1c1c1c;
  --lp-border-subtle: #111111;
  --lp-amber:         #22d3ee;
  --lp-amber-glow:    rgba(34, 211, 238, 0.07);
  --lp-amber-border:  rgba(34, 211, 238, 0.20);
  --lp-text:          #e2e2e2;
  --lp-text-2:        #8a8a8a;
  --lp-text-3:        #787878;
  --lp-green:         #4ade80;
  --lp-red:           #f87171;
  --lp-orange:        #fb923c;

  /* MkDocs Material bindings */
  --md-text-font:                    "JetBrains Mono";
  --md-code-font:                    "JetBrains Mono";
  --md-primary-fg-color:             #22d3ee;
  --md-primary-fg-color--light:      #67e8f9;
  --md-primary-fg-color--dark:       #06b6d4;
  --md-accent-fg-color:              #22d3ee;
  --md-accent-fg-color--transparent: rgba(34, 211, 238, 0.07);

  --bm-success: #4ade80;
  --bm-error:   #f87171;
  --bm-warning: #fbbf24;
}

/* --------------------------------------------------------------------------
   Slate Scheme — the only scheme
   -------------------------------------------------------------------------- */

[data-md-color-scheme="slate"] {
  --md-hue: 195;

  --md-default-bg-color:           #030303;
  --md-default-bg-color--light:    #080808;
  --md-default-bg-color--lighter:  #0d0d0d;
  --md-default-bg-color--lightest: #1c1c1c;

  --md-typeset-color:              #e2e2e2;
  --md-default-fg-color:           #e2e2e2;
  --md-default-fg-color--light:    #8a8a8a;
  --md-default-fg-color--lighter:  #787878;
  --md-default-fg-color--lightest: #2a2a2a;

  --md-primary-fg-color:             #22d3ee;
  --md-primary-fg-color--light:      #67e8f9;
  --md-primary-fg-color--dark:       #06b6d4;
  --md-accent-fg-color:              #22d3ee;
  --md-accent-fg-color--transparent: rgba(34, 211, 238, 0.07);

  --md-code-bg-color: #020202;
  --md-code-fg-color: #e2e2e2;
  --md-code-hl-color: rgba(34, 211, 238, 0.10);

  --md-footer-bg-color:          #030303;
  --md-footer-bg-color--dark:    #000000;
  --md-footer-fg-color:          #e2e2e2;
  --md-footer-fg-color--light:   #8a8a8a;
  --md-footer-fg-color--lighter: #787878;
}

/* --------------------------------------------------------------------------
   Base font size — override MkDocs Material's 125% default so 1rem = 16px,
   matching the frontend landing page at localhost:3000
   -------------------------------------------------------------------------- */

:root,
html {
  font-size: 100% !important;
}

/* --------------------------------------------------------------------------
   Animations — matching landing page keyframes
   -------------------------------------------------------------------------- */

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

@keyframes lp-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes lp-progress {
  from { width: 0%; }
  to   { width: 84.7%; }
}

/* --------------------------------------------------------------------------
   Dot Grid Background + Radial Glow — scoped like the landing page HeroSection:
   visible in chrome/margins/home page; content pages get a solid surface so
   dense prose isn't competing with the pattern.
   -------------------------------------------------------------------------- */

body {
  background-color: #030303;
  background-image: radial-gradient(
    circle,
    rgba(34, 211, 238, 0.12) 1px,
    transparent 1px
  );
  background-size: 28px 28px;
  background-attachment: fixed;
}

/* Radial cyan glow — mirrors HeroSection top-left glow */
body::before {
  content: "";
  position: fixed;
  top: -10%;
  left: -10%;
  width: 60%;
  height: 80%;
  background: radial-gradient(ellipse, rgba(34, 211, 238, 0.05) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Content pages: give the main area a solid background so the dot grid
   doesn't bleed through behind prose. Home/404 stay transparent (handled
   by their own container styles). */
.md-main {
  background: #030303;
}

.md-grid {
  max-width: 80rem;
}

.md-main__inner,
.md-content,
.md-content__inner {
  background: transparent !important;
}

/* --------------------------------------------------------------------------
   Announcement Banner — terminal breadcrumb bar
   ❯ botmanifold.com / docs              ● all systems operational
   -------------------------------------------------------------------------- */

.md-banner {
  background-color: rgba(3, 3, 3, 0.88);
  border-bottom: 1px solid rgba(34, 211, 238, 0.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 0;
}

/* Override Material's centred, max-width constrained default. */
.md-banner__inner {
  display: flex !important;
  align-items: center !important;
  max-width: 100% !important;
  padding: 0.35rem 1.5rem !important;
  font-family: "JetBrains Mono", monospace !important;
  font-size: 0.6rem !important;
  letter-spacing: 0.05em !important;
  color: var(--lp-text-3) !important;
}

/* ── Left: path breadcrumb ──────────────────────────────────────── */

.bm-topbar-path {
  display: flex;
  align-items: center;
  gap: 0.38rem;
}

.bm-topbar-prompt {
  color: #22d3ee;
  font-size: inherit;
  flex-shrink: 0;
}

.bm-topbar-site {
  color: var(--lp-text-2) !important;
  text-decoration: none !important;
  transition: color 0.12s ease;
}

.bm-topbar-site:hover {
  color: #22d3ee !important;
}

.bm-topbar-sep {
  color: #2a2a2a;
  user-select: none;
}

.bm-topbar-current {
  color: var(--lp-text-3);
}

@keyframes topbar-dot-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}

/* --------------------------------------------------------------------------
   Header — glassmorphism matching landing page LandingNav
   -------------------------------------------------------------------------- */

.md-header {
  background-color: rgba(3, 3, 3, 0.70);
  border-bottom: 1px solid #1c1c1c;
  box-shadow: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: background-color 0.3s ease;
}

.md-header__title {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;      /* font-semibold — matches frontend Logo text weight */
  font-size: 1.125rem;   /* 18px — matches frontend Logo size="sm" text-lg */
  letter-spacing: normal;
}

.md-header__title .md-ellipsis,
.md-header__title .md-header__topic {
  text-transform: none !important;  /* override Material's uppercase — matches frontend "BotManifold" */
  letter-spacing: normal !important;
}

/* Logo: match frontend Logo size="sm" mark (24px), gap-2 (8px) spacing to title */
.md-header__button.md-logo img,
.md-header__button.md-logo svg {
  height: 24px;
  width: 24px;
}

/* Tighten logo→title gap to match frontend gap-2 (8px) */
.md-header__button.md-logo {
  padding-right: 0 !important;
  margin-right: 0 !important;
}

.md-header__title {
  margin-left: 0.5rem !important;  /* 8px — matches frontend gap-2 */
}

/* --------------------------------------------------------------------------
   Navigation Tabs — glassmorphism like the landing nav
   -------------------------------------------------------------------------- */

.md-tabs {
  background-color: rgba(3, 3, 3, 0.70);
  border-bottom: 1px solid #1c1c1c;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.md-tabs__link {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;    /* 12px — matches frontend nav link text-xs */
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: lowercase;
  opacity: 0.45;
  color: #e2e2e2;
  transition: opacity 0.12s ease, color 0.12s ease;
}

.md-tabs__link--active,
.md-tabs__link:hover {
  opacity: 1;
  color: #22d3ee !important;
}

/* --------------------------------------------------------------------------
   Sidebar Navigation
   -------------------------------------------------------------------------- */

.md-sidebar {
  background-color: rgba(3, 3, 3, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.md-sidebar--primary {
  border-right: 1px solid #1c1c1c;
}

.md-sidebar--secondary {
  border-left: 1px solid #1c1c1c;
}

.md-nav {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
}

.md-nav__title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lp-text-2);
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
  background: transparent !important;
  box-shadow: none !important;
}

.md-nav__link {
  font-size: 0.73rem;
  letter-spacing: 0.02em;
  color: var(--lp-text-2);
  padding: 0.3rem 0.75rem;
  transition: color 0.12s ease, background-color 0.12s ease;
  border-radius: 0;
  border-left: 2px solid transparent;
}

.md-nav__link:hover {
  color: #e2e2e2;
  background-color: rgba(255, 255, 255, 0.02);
  border-left-color: #1c1c1c;
}

.md-nav__link--active,
.md-nav__link--active:hover {
  color: #22d3ee !important;
  font-weight: 600;
  background-color: rgba(34, 211, 238, 0.05) !important;
  border-left: 2px solid #22d3ee;
}

.md-nav__icon {
  color: var(--lp-text-3);
}

/* --------------------------------------------------------------------------
   Page Content — fade-in on load
   -------------------------------------------------------------------------- */

.md-content {
  animation: lp-fade-up 0.5s ease-out both;
}

/* --------------------------------------------------------------------------
   Typography — JetBrains Mono throughout, matching landing page
   -------------------------------------------------------------------------- */

.md-typeset {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #e2e2e2;
}

/* h1 — terminal prompt prefix */
.md-typeset h1 {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  letter-spacing: -0.03em;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 2rem;
  color: #e2e2e2;
}

.md-typeset h1::before {
  content: "❯ ";
  color: #22d3ee;
  font-weight: 400;
  letter-spacing: 0;
}

/* h2 — section divider */
.md-typeset h2 {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 3rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid #1c1c1c;
  color: #e2e2e2;
}

/* h3 */
.md-typeset h3 {
  font-family: "JetBrains Mono", monospace;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #878787;
  margin-top: 2rem;
}

/* h4–h6 */
.md-typeset h4,
.md-typeset h5,
.md-typeset h6 {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #646464;
}

.md-typeset p {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  line-height: 1.7;
  color: #e2e2e2;
  margin-bottom: 0.95rem;
}

/* Bold text — slightly brighter than body so it actually reads as bold */
.md-typeset strong {
  color: #f2f2f2;
  font-weight: 700;
}

/* Italic — soft cyan tint, same terminal family as the accent */
.md-typeset em {
  color: #a8dfe8;
  font-style: italic;
}

/* List vertical rhythm — currently collapses into a solid block */
.md-typeset ul li,
.md-typeset ol li {
  margin-bottom: 0.35rem;
  line-height: 1.75;
}

/* Nested lists: tighter than top-level */
.md-typeset li > ul,
.md-typeset li > ol {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
}

/* --------------------------------------------------------------------------
   Links — matching landing page (color only, no border-bottom underline)
   -------------------------------------------------------------------------- */

.md-typeset a {
  color: #22d3ee;
  text-decoration: none;
  transition: color 0.12s ease;
}

.md-typeset a:hover {
  color: #67e8f9;
}

/* --------------------------------------------------------------------------
   Code — inline
   -------------------------------------------------------------------------- */

.md-typeset code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82em;
  background-color: rgba(34, 211, 238, 0.07);
  color: #22d3ee;
  padding: 0.12em 0.42em;
  border-radius: 0;
  border: 1px solid rgba(34, 211, 238, 0.15);
}

/* --------------------------------------------------------------------------
   Code blocks — terminal window aesthetic matching TerminalWindow component
   -------------------------------------------------------------------------- */

.md-typeset pre {
  position: relative;
  background-color: #020202 !important;
  border: 1px solid #1c1c1c;
  border-radius: 0;
  padding-top: 2.8rem;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.04),
    0 0 80px rgba(34, 211, 238, 0.06);
}

/* Terminal chrome — three OS window buttons */
.md-typeset pre::before {
  content: "";
  position: absolute;
  top: 0.95rem;
  left: 1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff5f56;
  box-shadow: 18px 0 0 #febc2e, 36px 0 0 #28c840;
  pointer-events: none;
}

/* Separator under chrome */
.md-typeset pre::after {
  content: "";
  position: absolute;
  top: 2.4rem;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #1c1c1c;
  pointer-events: none;
}

.md-typeset pre > code {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  padding: 1.25rem;
  line-height: 1.7;
  background: transparent !important;
  color: #e2e2e2 !important;
  border: none !important;
}

/* Copy button — sits in the chrome area */
.md-clipboard {
  color: var(--lp-text-3);
  top: 0.55rem;
  right: 0.65rem;
}

.md-clipboard:hover {
  color: #22d3ee;
}

/* --------------------------------------------------------------------------
   Admonitions
   -------------------------------------------------------------------------- */

.md-typeset .admonition,
.md-typeset details {
  background-color: transparent;
  border: 1px solid #1c1c1c;
  border-left: 3px solid;
  border-radius: 0;
  box-shadow: none;
  margin: 1.5rem 0;
}

.md-typeset .admonition-title,
.md-typeset summary {
  font-family: "JetBrains Mono", monospace !important;
  font-size: 0.68rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  padding: 0.65rem 1rem !important;
  background-color: transparent !important;
}

.md-typeset .admonition-title::before,
.md-typeset summary::before {
  margin-right: 0.55rem;
  vertical-align: middle;
}

/* Note / Info — cyan */
.md-typeset .admonition.note,
.md-typeset .admonition.info,
.md-typeset details.note,
.md-typeset details.info {
  border-left-color: #22d3ee;
}

.md-typeset .note > .admonition-title,
.md-typeset .info > .admonition-title,
.md-typeset .note > summary,
.md-typeset .info > summary {
  color: #22d3ee !important;
  background-color: rgba(34, 211, 238, 0.05) !important;
}

.md-typeset .note > .admonition-title::before,
.md-typeset .info > .admonition-title::before {
  background-color: #22d3ee;
}

/* Tip / Success — green */
.md-typeset .admonition.tip,
.md-typeset .admonition.success,
.md-typeset details.tip,
.md-typeset details.success {
  border-left-color: #4ade80;
}

.md-typeset .tip > .admonition-title,
.md-typeset .success > .admonition-title,
.md-typeset .tip > summary,
.md-typeset .success > summary {
  color: #4ade80 !important;
  background-color: rgba(74, 222, 128, 0.05) !important;
}

.md-typeset .tip > .admonition-title::before,
.md-typeset .success > .admonition-title::before {
  background-color: #4ade80;
}

/* Warning / Caution — amber */
.md-typeset .admonition.warning,
.md-typeset .admonition.caution,
.md-typeset details.warning,
.md-typeset details.caution {
  border-left-color: #fbbf24;
}

.md-typeset .warning > .admonition-title,
.md-typeset .caution > .admonition-title,
.md-typeset .warning > summary,
.md-typeset .caution > summary {
  color: #fbbf24 !important;
  background-color: rgba(251, 191, 36, 0.05) !important;
}

.md-typeset .warning > .admonition-title::before,
.md-typeset .caution > .admonition-title::before {
  background-color: #fbbf24;
}

/* Danger / Error — red */
.md-typeset .admonition.danger,
.md-typeset .admonition.error,
.md-typeset details.danger,
.md-typeset details.error {
  border-left-color: #f87171;
}

.md-typeset .danger > .admonition-title,
.md-typeset .error > .admonition-title,
.md-typeset .danger > summary,
.md-typeset .error > summary {
  color: #f87171 !important;
  background-color: rgba(248, 113, 113, 0.05) !important;
}

.md-typeset .danger > .admonition-title::before,
.md-typeset .error > .admonition-title::before {
  background-color: #f87171;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */

.md-typeset table:not([class]) {
  border: 1px solid #1c1c1c;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  width: 100%;
  font-size: 0.82rem;
}

.md-typeset table:not([class]) th {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background-color: #080808;
  border-bottom: 1px solid #1c1c1c;
  padding: 0.65rem 1rem;
  color: var(--lp-text-2);
}

.md-typeset table:not([class]) td {
  font-family: "JetBrains Mono", monospace;
  border-bottom: 1px solid #111111;
  padding: 0.6rem 1rem;
}

.md-typeset table:not([class]) tr:last-child td {
  border-bottom: none;
}

.md-typeset table:not([class]) tr:hover td {
  background-color: rgba(34, 211, 238, 0.03);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.md-typeset .md-button {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 0;
  padding: 0.75rem 1.5rem;
  transition: all 0.15s ease;
}

.md-typeset .md-button--primary {
  background-color: #22d3ee;
  color: #030303 !important;
  border-color: #22d3ee;
}

.md-typeset .md-button--primary:hover {
  background-color: #06b6d4;
  border-color: #06b6d4;
  opacity: 0.9;
}

.md-typeset .md-button:not(.md-button--primary) {
  color: var(--lp-text-2);
  border: 1px solid #1c1c1c;
  background: transparent;
}

.md-typeset .md-button:not(.md-button--primary):hover {
  color: #e2e2e2;
  background: #080808;
  border-color: rgba(34, 211, 238, 0.4);
}

/* --------------------------------------------------------------------------
   Search
   -------------------------------------------------------------------------- */

.md-search__form {
  background-color: #080808;
  border: 1px solid #1c1c1c;
  border-radius: 0;
  transition: border-color 0.15s ease;
}

.md-search__form:focus-within {
  border-color: rgba(34, 211, 238, 0.35);
  background-color: #0d0d0d;
}

.md-search__input {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.md-search__input::placeholder {
  color: var(--lp-text-3);
}

.md-search-result__link {
  border-radius: 0;
  transition: background-color 0.1s ease;
}

.md-search-result__link:hover {
  background-color: rgba(34, 211, 238, 0.04) !important;
}

.md-search-result__title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  font-weight: 600;
}

.md-search-result__teaser {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  color: var(--lp-text-2);
}

.md-search-result mark {
  background-color: rgba(34, 211, 238, 0.18);
  color: #22d3ee;
}

/* --------------------------------------------------------------------------
   Content Tabs
   -------------------------------------------------------------------------- */

.md-typeset .tabbed-labels {
  border-bottom: 1px solid #1c1c1c;
}

.md-typeset .tabbed-labels > label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lp-text-2);
  padding: 0.5rem 1rem;
  border-radius: 0;
  transition: color 0.12s ease;
}

.md-typeset .tabbed-labels > label:hover {
  color: #e2e2e2;
}

.md-typeset .tabbed-labels > label.tabbed-labels--active {
  color: #22d3ee;
  border-bottom: 2px solid #22d3ee;
}

/* --------------------------------------------------------------------------
   Table of Contents (right sidebar)
   -------------------------------------------------------------------------- */

.md-nav--secondary .md-nav__link {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.md-nav--secondary .md-nav__link--active {
  color: #22d3ee;
  border-left: 2px solid #22d3ee;
  background: rgba(34, 211, 238, 0.04);
}

/* --------------------------------------------------------------------------
   Navigation Path Breadcrumb (navigation.path feature)
   -------------------------------------------------------------------------- */

.md-path {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  padding: 0.5rem 0 0;
}

.md-path__item {
  color: var(--lp-text-3);
}

.md-path__item + .md-path__item::before {
  color: #2a2a2a;
}

.md-path__item:last-child {
  color: var(--lp-text-2);
}

/* --------------------------------------------------------------------------
   Blockquotes
   -------------------------------------------------------------------------- */

.md-typeset blockquote {
  border-left: 3px solid #1c1c1c;
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background-color: #080808;
  font-style: normal;
  color: var(--lp-text-2);
}

.md-typeset blockquote p {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  line-height: 1.65;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Horizontal Rules
   -------------------------------------------------------------------------- */

.md-typeset hr {
  border: none;
  border-top: 1px solid #1c1c1c;
  margin: 2.5rem 0;
}

/* --------------------------------------------------------------------------
   Task Lists
   -------------------------------------------------------------------------- */

.md-typeset .task-list-control .task-list-indicator::before {
  background-color: #22d3ee;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.md-footer {
  background-color: #030303;
  border-top: 1px solid #1c1c1c;
  margin-top: 4rem;
}

.md-footer-meta {
  background-color: #000000;
  border-top: 1px solid #111111;
}

/* Footer meta row: copyright left, [status + social] right */
.md-footer-meta__inner {
  display: flex;
  align-items: center;
}

.bm-footer-status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--lp-text-3);
  flex-shrink: 0;
  margin-left: auto;  /* pushes status + social icons to the right */
  margin-right: 1rem;
}

.bm-footer-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #4ade80;
  flex-shrink: 0;
  animation: topbar-dot-pulse 3s ease-in-out infinite;
}

.md-footer__link {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--lp-text-2);
  transition: color 0.15s ease;
}

.md-footer__link:hover {
  color: #22d3ee;
  opacity: 1;
}

.md-footer__title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lp-text-2);
}

.md-copyright {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--lp-text-3);
}

/* --------------------------------------------------------------------------
   Scrollbar — matching landing page (8px)
   -------------------------------------------------------------------------- */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #030303;
}

::-webkit-scrollbar-thumb {
  background: #1c1c1c;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--lp-text-3);
}

/* --------------------------------------------------------------------------
   Focus States — matching landing page (4px border-radius)
   -------------------------------------------------------------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #22d3ee;
  outline-offset: 2px;
  border-radius: 4px;
}

:focus:not(:focus-visible) {
  outline: none;
}

/* --------------------------------------------------------------------------
   Home Page — hero layout, catalog, terminal components
   -------------------------------------------------------------------------- */

/* Hide both sidebars when on the home page */
.bm-home .md-sidebar,
.bm-home .md-nav--primary { display: none !important; }

.bm-home .md-content {
  max-width: 100%;
  margin: 0;
}

.bm-home .md-content__inner {
  padding: 0;
  margin: 0;
}

/* Full-width wrapper centred to match landing page max-width */
.bm-home-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.bm-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid #1c1c1c;
  animation: lp-fade-up 0.5s ease-out both;
}

@media (max-width: 768px) {
  .bm-hero { grid-template-columns: 1fr; }
  .bm-hero-right { display: none; }
}

.bm-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid #1c1c1c;
  padding: 0.25rem 0.625rem;
  margin-bottom: 2rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lp-text-2);
}

.bm-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: #4ade80;
  flex-shrink: 0;
}

.bm-hero-headline {
  font-family: "JetBrains Mono", monospace !important;
  font-weight: 700 !important;
  font-size: clamp(2.8rem, 5.5vw, 4.5rem) !important;
  letter-spacing: -0.04em !important;
  text-transform: uppercase !important;
  line-height: 0.88 !important;
  margin-bottom: 2rem !important;
  color: #e2e2e2 !important;
}

/* Override the ❯ prefix for home page h1 — we don't want it here */
.bm-home .md-typeset h1::before,
.bm-hero-headline::before { display: none !important; content: none !important; }

.bm-hero-accent { color: #22d3ee; }

.bm-hero-sub {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  color: var(--lp-text-2);
  line-height: 1.75;
  margin-bottom: 2rem;
  max-width: 360px;
}

.bm-hero-ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.bm-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background-color: #22d3ee;
  color: #030303 !important;
  text-decoration: none !important;
  border: none;
  transition: opacity 0.15s ease;
}

.bm-btn-primary:hover { opacity: 0.9; color: #030303 !important; }

.bm-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: transparent;
  color: var(--lp-text-2) !important;
  border: 1px solid #1c1c1c;
  text-decoration: none !important;
  transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.bm-btn-secondary:hover {
  color: #e2e2e2 !important;
  border-color: rgba(34, 211, 238, 0.35);
  background-color: #080808;
}

.bm-stats-row {
  display: flex;
  gap: 2rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #1c1c1c;
}

.bm-stat-value {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 1rem;
  font-weight: 700;
  color: #22d3ee;
}

.bm-stat-label {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--lp-text-2);
  margin-top: 0.2rem;
}

/* ── Terminal component (shared by home + 404) ────────────────────────────── */

.bm-terminal {
  background: #020202;
  border: 1px solid #1c1c1c;
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, 0.04),
    0 0 80px rgba(34, 211, 238, 0.06);
}

.bm-terminal-chrome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #1c1c1c;
  background: #060606;
}

.bm-terminal-dots { display: flex; gap: 6px; }

.bm-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.bm-dot--red    { background: #ff5f56; }
.bm-dot--yellow { background: #febc2e; }
.bm-dot--green  { background: #28c840; }

.bm-terminal-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--lp-text-3);
}

.bm-terminal-spacer { width: 56px; }

.bm-terminal-body {
  padding: 1.25rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  line-height: 1.75;
}

.bm-terminal-line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.bm-terminal-gap { height: 0.75rem; }

.bm-terminal-divider {
  height: 1px;
  background: #1c1c1c;
  margin: 0.75rem 0;
}

.bm-prompt { color: #22d3ee; flex-shrink: 0; }
.bm-repl   { color: var(--lp-text-2); flex-shrink: 0; }

.bm-t-text    { color: #e2e2e2; }
.bm-t-dim     { color: var(--lp-text-2); }
.bm-t-str     { color: #4ade80; }
.bm-t-num     { color: #fb923c; }
.bm-t-value   { color: #22d3ee; padding-left: 1.5rem; }
.bm-t-success { color: #4ade80; padding-left: 1.5rem; }
.bm-t-error   { color: #f87171; }
.bm-t-indent  { padding-left: 3rem; color: #e2e2e2; }

.bm-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  background-color: #22d3ee;
  vertical-align: text-bottom;
  animation: cursor-blink 1s step-end infinite;
}

/* ── Catalog / Quick Links ────────────────────────────────────────────────── */

.bm-catalog {
  padding: 3rem 0 4rem;
}

.bm-catalog-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #1c1c1c;
}

.bm-catalog-cmd {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  color: var(--lp-text-2);
  margin-bottom: 0.35rem;
}

.bm-catalog-comment {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.68rem;
  color: var(--lp-text-3);
}

.bm-catalog-labels {
  display: grid;
  grid-template-columns: 12rem 1fr 5rem;
  gap: 1rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid #1c1c1c;
  margin-bottom: 0.15rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lp-text-3);
}

.bm-catalog-row {
  display: grid;
  grid-template-columns: 12rem 1fr 5rem;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 0;
  border-bottom: 1px solid #1c1c1c;
  text-decoration: none !important;
  transition: background-color 0.12s ease, padding 0.12s ease;
  cursor: pointer;
}

.bm-catalog-row:hover {
  background-color: #080808;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
}

.bm-catalog-row:hover .bm-arrow { color: #22d3ee; }
.bm-catalog-row:hover .bm-row-title { color: #22d3ee; }

.bm-catalog-row--last { border-bottom: none; }

.bm-row-title {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: #e2e2e2;
  transition: color 0.12s ease;
}

.bm-row-cmd {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.62rem;
  color: var(--lp-text-3);
  margin-top: 0.15rem;
}

.bm-col-desc {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.73rem;
  color: var(--lp-text-2);
}

.bm-col-action {
  text-align: right;
}

.bm-arrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  color: var(--lp-text-2);
  transition: color 0.12s ease;
}

@media (max-width: 640px) {
  .bm-catalog-labels { grid-template-columns: 1fr 3rem; }
  .bm-catalog-labels .bm-col-desc { display: none; }
  .bm-catalog-row    { grid-template-columns: 1fr 3rem; }
  .bm-catalog-row .bm-col-desc { display: none; }
}

/* --------------------------------------------------------------------------
   404 Page
   -------------------------------------------------------------------------- */

.bm-404 .md-sidebar,
.bm-404 .md-nav--primary { display: none !important; }

.bm-404 .md-content { max-width: 100%; margin: 0; }
.bm-404 .md-content__inner { padding: 0; margin: 0; }

.bm-404-container {
  max-width: 40rem;
  margin: 6rem auto;
  padding: 0 1.5rem;
}

.bm-404-terminal {
  margin-bottom: 2rem;
  animation: lp-fade-up 0.4s ease-out both;
}

.bm-404-actions {
  display: flex;
  gap: 0.75rem;
  animation: lp-fade-up 0.4s 0.15s ease-out both;
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */

@media print {
  .md-header,
  .md-tabs,
  .md-sidebar,
  .md-footer,
  .md-banner {
    display: none;
  }

  .md-content {
    max-width: 100%;
  }

  body {
    background-image: none;
    background-color: #ffffff;
  }

  body::before {
    display: none;
  }
}
