/* =========================================================
   AXEBOW QUARTO DOCS – FINAL STYLES.CSS
   Coherent layout + code styling (Catppuccin-compatible)
   ========================================================= */

/* =======================
   GLOBAL LAYOUT
   ======================= */

.navbar .nav-link { font-weight: 600; }
.navbar .nav-link.active,
.navbar .nav-link[aria-current="page"] { font-weight: 700; }
.navbar-brand { font-weight: 700; letter-spacing: 0.2px; }

#quarto-sidebar, .sidebar {
  border-right: 1px solid var(--bs-border-color);
}
#TOC {
  border-left: 1px solid var(--bs-border-color);
  padding-left: 1rem;
}

/* Article as a card */
main.content > article {
  background: var(--bs-card-bg);
  border: 1px solid var(--bs-border-color);
  box-shadow: var(--bs-box-shadow-sm);
  padding: 2rem 2.5rem;
  border-radius: var(--bs-border-radius-lg);
}


/* =======================
   AXEBOW HEADER + FOOTER
   ======================= */

:root {
  --ax-bar-bg: #344a5f;
  --ax-bar-fg: rgba(255,255,255,.88);
  --ax-bar-fg-strong: #fff;
  --ax-bar-border: rgba(255,255,255,.14);

  /* Code surfaces (light) */
  --ax-code-bg: rgba(0,0,0,0.02);
  --ax-code-border: rgba(0,0,0,0.08);
  --ax-inlinecode-bg: rgba(0,0,0,0.03);
  --ax-inlinecode-border: rgba(0,0,0,0.07);
}

[data-bs-theme="dark"] {
  --ax-bar-bg: #2b3f52;
  --ax-bar-fg: rgba(255,255,255,.88);
  --ax-bar-fg-strong: #fff;
  --ax-bar-border: rgba(255,255,255,.16);

  /* Code surfaces (dark): blend with page/card */
  --ax-code-bg: var(--bs-card-bg);
  --ax-code-border: rgba(255,255,255,0.10);
  --ax-inlinecode-bg: rgba(255,255,255,0.05);
  --ax-inlinecode-border: rgba(255,255,255,0.10);
}

/* Full bleed bars */
.nav-footer,
footer.footer,
#quarto-footer {
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  background: var(--ax-bar-bg) !important;
  color: var(--ax-bar-fg) !important;
  border-top: 1px solid var(--ax-bar-border) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* Footer + nav links */
.nav-footer a,
footer.footer a,
#quarto-footer a {
  color: var(--ax-bar-fg) !important;
  font-weight: 600;
  text-decoration: none;
}
.nav-footer a:hover,
footer.footer a:hover,
#quarto-footer a:hover {
  color: var(--ax-bar-fg-strong) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Navbar */
.navbar {
  background: var(--ax-bar-bg) !important;
  border-bottom: 1px solid var(--ax-bar-border) !important;
}
.navbar .navbar-brand,
.navbar .nav-link {
  color: var(--ax-bar-fg) !important;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
  color: #fff !important;
}


/* =======================
   CODE BLOCKS (FINAL)
   ======================= */

/* Remove ALL rounding and decorative layers */
pre,
pre.sourceCode,
div.sourceCode,
div.sourceCode pre,
div.sourceCode::before,
div.sourceCode::after,
pre::before,
pre::after {
  border-radius: 0 !important;
  box-shadow: none !important;
  content: none !important;
}

/* Wrapper for all code blocks */
div.sourceCode {
  background: var(--ax-code-bg) !important;
  border: 1px solid var(--ax-code-border) !important;
  border-left: 4px solid var(--ax-code-border) !important; /* LEFT BORDER */
  margin: 1rem 0 !important;
}

/* Quarto line-number table normalization */
div.sourceCode table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: transparent !important;
}
div.sourceCode td {
  padding: 0 !important;
  background: transparent !important;
  vertical-align: top;
}

/* Line number column */
div.sourceCode td.lineNumbers {
  user-select: none;
  text-align: right;
  padding: 1rem 0.75rem;
  background: transparent;
}
div.sourceCode td.lineNumbers pre {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
[data-bs-theme="light"] div.sourceCode td.lineNumbers {
  color: rgba(0,0,0,0.40);
  border-right: 1px solid rgba(0,0,0,0.10);
}
[data-bs-theme="dark"] div.sourceCode td.lineNumbers {
  color: rgba(255,255,255,0.42);
  border-right: 1px solid rgba(255,255,255,0.14);
}

/* Code column */
div.sourceCode td.sourceCode {
  padding: 1rem 1.1rem;
}
div.sourceCode td.sourceCode pre {
  margin: 0;
  padding: 0;
  background: transparent;
  overflow-x: auto;
}

/* Non-line-numbered code blocks */
pre:not(.sourceCode):not(div.sourceCode pre) {
  background: var(--ax-code-bg);
  border: 1px solid var(--ax-code-border);
  border-left: 4px solid var(--ax-code-border);
  padding: 1rem 1.1rem;
  margin: 1rem 0;
  overflow-x: auto;
}


/* =======================
   INLINE CODE (SUBTLE)
   ======================= */

code:not(pre code) {
  background: var(--ax-inlinecode-bg);
  border: 1px solid var(--ax-inlinecode-border);
  padding: 0.10em 0.30em;
  border-radius: 0;
  box-shadow: none;
}

/* Slight tone adjustment in dark mode */
[data-bs-theme="dark"] code:not(pre code) {
  color: rgba(255,255,255,0.92);
}


/* =======================
   TYPOGRAPHY CONSISTENCY
   ======================= */

code,
pre,
kbd,
samp {
  font-family: var(--bs-font-monospace);
  font-size: 0.95em;
}


/* =========================================================
   INLINE CODE – Quarto dark mode (uses body.quarto-dark)
   Subtle box (not sticker-like), only for inline code
   ========================================================= */

/* Dark mode inline code */
body.quarto-dark :not(pre) > code {
  background: rgba(255,255,255,0.03) !important;  /* very subtle */
  border: 1px solid rgba(255,255,255,0.06) !important;
  padding: 0.06em 0.18em !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

/* If you want it EVEN less boxed, uncomment this instead of the rule above */
/*
body.quarto-dark :not(pre) > code {
  background: rgba(255,255,255,0.02) !important;
  border: none !important;
  padding: 0.06em 0.18em !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
*/
