/* faBolus docs — a clean, modern, Stripe-inspired theme on mkdocs-material.
   Persistent left sidebar, generous whitespace, blurple accent, soft cards,
   framed device screenshots. Tuned for both light and dark. */

:root {
  /* Brand accent tuned to the faBolus app icon (blue → purple gradient). */
  --fabolus-blue: #2b50be;
  --fabolus-purple: #5039b8;
  --cx2-blurple: #4a3fbf;        /* logo indigo-purple (mid gradient) */
  --cx2-blurple-dark: #372e9e;
  --cx2-blurple-soft: #ecebfa;
  --cx2-ink: #0a2540;          /* deep navy ink */
  --cx2-slate: #3c4257;
  --cx2-muted: #6b7280;
  --cx2-line: #e6e9ef;
  --cx2-line-soft: #eef1f6;
  --cx2-bg-soft: #f7f9fc;
  --cx2-radius: 12px;
  --cx2-radius-lg: 16px;
  --cx2-shadow-sm: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .05);
  --cx2-shadow: 0 2px 6px -1px rgba(50, 50, 93, .10), 0 1px 4px -1px rgba(0, 0, 0, .06);
  --cx2-shadow-lg: 0 18px 40px -12px rgba(50, 50, 93, .18), 0 8px 16px -8px rgba(0, 0, 0, .08);
}

/* =========================================================================
   Palette
   ========================================================================= */
[data-md-color-scheme="default"] {
  --md-accent-fg-color: var(--cx2-blurple);
  --md-typeset-a-color: var(--cx2-blurple);
  --md-default-bg-color: #ffffff;
  --md-typeset-color: var(--cx2-slate);
  --md-code-bg-color: #f6f8fb;
  --md-code-fg-color: #3c4257;
  --md-default-fg-color--lightest: #f2f4f8;
}
.md-typeset h1,
.md-typeset h2,
.md-typeset h3,
.md-typeset h4 { color: var(--cx2-ink); }

[data-md-color-scheme="slate"] {
  --md-hue: 222;
  --md-accent-fg-color: #a79df5;
  --md-typeset-a-color: #a79df5;
  --md-default-bg-color: #0b1220;
  --cx2-line: #232c40;
  --cx2-line-soft: #1a2233;
  --cx2-bg-soft: #121b2d;
  --cx2-ink: #eef2f8;
  --cx2-slate: #c4ccda;
  --cx2-muted: #8a94a6;
  --cx2-blurple-soft: #1e2440;
}

/* =========================================================================
   Layout: header + persistent left sidebar (Stripe-like)
   ========================================================================= */
.md-grid { max-width: 68rem; }             /* a touch wider, calmer margins */

/* Clean white header with a hairline */
.md-header {
  box-shadow: none;
  border-bottom: 1px solid var(--cx2-line);
}
[data-md-color-scheme="default"] .md-header { background-color: #fff; color: var(--cx2-ink); }
[data-md-color-scheme="slate"]   .md-header { background-color: #0b1220; }
.md-header__title { font-weight: 700; letter-spacing: -.01em; }

/* =========================================================================
   Persistent safety banner — stays pinned at the very top while scrolling.
   The banner (overrides/main.html → block announce) is normally in the flow and
   scrolls away; make it sticky and push the (also-sticky) header below it. The
   banner wraps on narrow screens, so its real height is synced into
   --fab-banner-h by docs/javascripts/banner.js (the value below is the fallback).
   ========================================================================= */
:root { --fab-banner-h: 2.6rem; }
/* Stick the ANNOUNCE WRAPPER, not the inner .md-banner. The wrapper
   (`[data-md-component="announce"]`) is the direct body child and a sibling of the header, so it
   sticks relative to the page like the header does. Making only `.md-banner` sticky pins it within
   this short wrapper — which itself scrolls away, so the banner appeared non-sticky. */
[data-md-component="announce"] {
  position: sticky;
  top: 0;
  z-index: 1001;                         /* above the sticky header */
}
.md-banner {
  background-color: #7a1220;             /* deep red so it clearly reads as a warning */
  color: #fff;
}
.md-banner a { color: #fff; text-decoration: underline; }
.md-header { top: var(--fab-banner-h, 0); }   /* sit directly below the pinned banner */
/* Keep anchor-link jumps from landing under the pinned banner + header. */
html { scroll-padding-top: calc(var(--fab-banner-h, 2.6rem) + 3rem); }

/* Search box */
[data-md-color-scheme="default"] .md-search__form {
  background: var(--cx2-bg-soft);
  box-shadow: inset 0 0 0 1px var(--cx2-line);
  border-radius: 10px;
}
[data-md-color-scheme="default"] .md-search__form:hover { background: #eef1f6; }
.md-search__input::placeholder { color: var(--cx2-muted); }

/* Sidebar: quiet, roomy, with clear section labels */
.md-sidebar { font-size: .74rem; }
.md-nav { line-height: 1.5; }
.md-nav__title { color: var(--cx2-muted); }

/* Top-level section labels (navigation.sections) → small caps, muted */
.md-nav--primary > .md-nav__list > .md-nav__item--section > .md-nav__link,
.md-nav--primary > .md-nav__list > .md-nav__item > label.md-nav__link {
  color: var(--cx2-muted);
  font-weight: 700;
  font-size: .66rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  margin-top: 1.1rem;
}

/* Nav links: pill hover + active */
.md-nav__link {
  border-radius: 8px;
  padding: .28rem .5rem;
  transition: background-color .12s ease, color .12s ease;
}
.md-nav__item .md-nav__link:hover { background: var(--cx2-bg-soft); color: var(--cx2-ink); }
.md-nav__link--active,
.md-nav__link[aria-current] {
  background: var(--cx2-blurple-soft) !important;
  color: var(--cx2-blurple) !important;
  font-weight: 650;
}
[data-md-color-scheme="slate"] .md-nav__link--active,
[data-md-color-scheme="slate"] .md-nav__link[aria-current] { color: #c7c2ff !important; }

/* Right-hand "on this page" */
.md-sidebar--secondary .md-nav__title { font-size: .66rem; text-transform: uppercase; letter-spacing: .07em; }

/* =========================================================================
   Typography
   ========================================================================= */
.md-typeset {
  font-size: .8rem;
  line-height: 1.72;
  letter-spacing: -.003em;
}
.md-typeset h1 {
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -.025em;
  line-height: 1.15;
  margin: 0 0 .3em;
}
.md-typeset h2 {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -.018em;
  margin: 2.4rem 0 .9rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--cx2-line-soft);
}
.md-typeset h3 { font-weight: 660; font-size: 1.02rem; letter-spacing: -.01em; margin-top: 1.8rem; }
.md-typeset h4 { font-weight: 650; }
.md-typeset a { font-weight: 550; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.md-typeset a:hover { text-decoration-color: currentColor; }
.md-typeset p { margin: .7em 0; }

/* Lead paragraph right under the H1 reads bigger/softer */
.md-typeset h1 + p { font-size: .95rem; color: var(--cx2-muted); line-height: 1.7; }

/* =========================================================================
   Buttons
   ========================================================================= */
.md-typeset .md-button {
  border-radius: 999px;
  border: 1px solid var(--cx2-line);
  padding: .55em 1.3em;
  font-weight: 600;
  font-size: .8rem;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, border-color .12s ease;
}
.md-typeset .md-button:hover { transform: translateY(-1px); box-shadow: var(--cx2-shadow); background: var(--cx2-bg-soft); }
.md-typeset .md-button--primary { background: var(--cx2-blurple); border-color: var(--cx2-blurple); color: #fff; }
.md-typeset .md-button--primary:hover { background: var(--cx2-blurple-dark); border-color: var(--cx2-blurple-dark); color: #fff; }

/* =========================================================================
   Cards (grid.cards)
   ========================================================================= */
.md-typeset .grid.cards > ul > li,
.md-typeset .grid > .card {
  border: 1px solid var(--cx2-line);
  border-radius: var(--cx2-radius-lg);
  box-shadow: var(--cx2-shadow-sm);
  padding: 1.15rem 1.25rem;
  background: var(--md-default-bg-color);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.md-typeset .grid.cards > ul > li:hover {
  transform: translateY(-3px);
  box-shadow: var(--cx2-shadow-lg);
  border-color: #cfd3ff;
}
.md-typeset .grid.cards > ul > li > hr { margin: .7rem 0; border: 0; border-top: 1px solid var(--cx2-line-soft); }
.md-typeset .grid.cards .twemoji, .md-typeset .grid.cards .lg { color: var(--cx2-blurple); }
.md-typeset .grid.cards a.md-button { margin-top: .4rem; }

/* =========================================================================
   Code
   ========================================================================= */
.md-typeset code { border-radius: 5px; font-size: .78em; padding: .12em .4em; }
.md-typeset pre > code { border-radius: 10px; padding: .9rem 1rem; font-size: .78em; line-height: 1.6; }
[data-md-color-scheme="default"] .md-typeset pre > code { box-shadow: inset 0 0 0 1px var(--cx2-line); }
.md-typeset .highlight > .filename { border-radius: 10px 10px 0 0; }

/* =========================================================================
   Admonitions / callouts (rounded, tinted, colored bar)
   ========================================================================= */
.md-typeset .admonition,
.md-typeset details {
  border-radius: var(--cx2-radius);
  border: 1px solid var(--cx2-line);
  border-left-width: 3px;
  box-shadow: var(--cx2-shadow-sm);
  font-size: .78rem;
}
.md-typeset .admonition-title, .md-typeset summary { font-weight: 700; }
[data-md-color-scheme="default"] .md-typeset .admonition.note,
[data-md-color-scheme="default"] .md-typeset .admonition.info { background: #f4f8ff; }
[data-md-color-scheme="default"] .md-typeset .admonition.tip { background: #f1fbf6; }
[data-md-color-scheme="default"] .md-typeset .admonition.warning { background: #fff8f0; }
[data-md-color-scheme="default"] .md-typeset .admonition.danger { background: #fff5f6; }

/* =========================================================================
   Tables
   ========================================================================= */
.md-typeset table:not([class]) {
  border-radius: var(--cx2-radius);
  overflow: hidden;
  box-shadow: var(--cx2-shadow-sm);
  border: 1px solid var(--cx2-line);
  font-size: .76rem;
}
.md-typeset table:not([class]) th { background: var(--cx2-bg-soft); color: var(--cx2-ink); font-weight: 650; }
.md-typeset table:not([class]) tr:hover { background: var(--cx2-bg-soft); }

/* =========================================================================
   Footer prev/next
   ========================================================================= */
.md-footer__inner { border-radius: 0; }
.md-footer__link { border-radius: var(--cx2-radius); transition: background-color .12s ease; }
.md-footer__link:hover { background: rgba(255,255,255,.06); }

/* =========================================================================
   Hero (home)
   ========================================================================= */
.cx2-hero {
  margin: .25rem 0 2.5rem;
  padding: 3rem 2.2rem 3.2rem;
  border-radius: 22px;
  background:
    radial-gradient(1100px 380px at 88% -20%, rgba(99, 91, 255, .20), transparent 60%),
    linear-gradient(125deg, #f7f9fc 0%, #eeecff 100%);
  border: 1px solid var(--cx2-line);
}
[data-md-color-scheme="slate"] .cx2-hero {
  background:
    radial-gradient(1100px 380px at 88% -20%, rgba(99, 91, 255, .28), transparent 60%),
    linear-gradient(125deg, #0d1526 0%, #161f38 100%);
  border-color: #232c40;
}
.cx2-hero .cx2-eyebrow {
  display: inline-block;
  font-size: .68rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--cx2-blurple);
  background: rgba(99, 91, 255, .1);
  padding: .3rem .75rem; border-radius: 999px; margin-bottom: 1.1rem;
}
.cx2-hero h1 { font-size: 2.6rem; line-height: 1.08; margin: 0 0 .5rem; }
.cx2-hero p { font-size: 1.02rem; max-width: 48ch; color: var(--cx2-slate); }
[data-md-color-scheme="slate"] .cx2-hero p { color: #c7cfdd; }
.cx2-hero .cx2-cta { margin-top: 1.5rem; display: flex; gap: .6rem; flex-wrap: wrap; }

/* =========================================================================
   Numbered steps (big friendly chips) — LoopDocs-style
   ========================================================================= */
.cx2-steps { counter-reset: cx2step; list-style: none; padding-left: 0; margin: 1.2rem 0; }
.cx2-steps > li {
  position: relative;
  padding: .15rem 0 1.15rem 3rem;
  margin: 0;
  border-left: 2px solid var(--cx2-line-soft);
  margin-left: .9rem;
}
.cx2-steps > li:last-child { border-left-color: transparent; padding-bottom: .2rem; }
.cx2-steps > li::before {
  counter-increment: cx2step;
  content: counter(cx2step);
  position: absolute; left: -1rem; top: -.15rem;
  width: 1.9rem; height: 1.9rem;
  border-radius: 999px;
  background: var(--cx2-blurple); color: #fff;
  font-weight: 700; font-size: .82rem;
  display: grid; place-items: center;
  box-shadow: 0 0 0 4px var(--md-default-bg-color);
}

/* =========================================================================
   Keyboard keys
   ========================================================================= */
.md-typeset kbd {
  border-radius: 6px;
  box-shadow: 0 1px 0 rgba(16,24,40,.15), inset 0 -1px 0 var(--cx2-line);
  border: 1px solid var(--cx2-line);
  background: var(--cx2-bg-soft);
  padding: .1em .5em;
  font-size: .8em;
}

/* =========================================================================
   Tags (now / planned)
   ========================================================================= */
.cx2-tag {
  display: inline-block; font-size: .62rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; padding: .16rem .5rem; border-radius: 999px; vertical-align: middle;
}
.cx2-tag.planned { color: #8a5a00; background: #fff1d6; }
.cx2-tag.now { color: #0a6b3b; background: #d8f5e5; }
[data-md-color-scheme="slate"] .cx2-tag.planned { color: #ffcf7a; background: #3a2c08; }
[data-md-color-scheme="slate"] .cx2-tag.now { color: #7ff0b6; background: #0d3323; }

/* =========================================================================
   Device screenshot frames
   ========================================================================= */
.cx2-shots { display: flex; flex-wrap: wrap; gap: 1.3rem; margin: 1.5rem 0; align-items: flex-start; }
.cx2-shot { text-align: center; margin: 0; }
.cx2-shot figcaption { margin-top: .6rem; font-size: .72rem; color: var(--cx2-muted); font-weight: 550; }
.cx2-shot.phone img { width: 232px; max-width: 62vw; border-radius: 30px; border: 9px solid #0a2540; background: #0a2540; box-shadow: var(--cx2-shadow-lg); }
.cx2-shot.watch img { width: 150px; max-width: 46vw; border-radius: 38px; border: 9px solid #0a2540; background: #0a2540; box-shadow: var(--cx2-shadow-lg); }
.cx2-shot.wide  img { width: 400px; max-width: 92vw; border-radius: 14px; border: 1px solid var(--cx2-line); box-shadow: var(--cx2-shadow-lg); }

/* =========================================================================
   "What you'll see / success" checkpoint block
   ========================================================================= */
.cx2-check {
  border: 1px solid var(--cx2-line);
  border-left: 3px solid #16a34a;
  background: #f1fbf6;
  border-radius: var(--cx2-radius);
  padding: .8rem 1rem;
  margin: 1.2rem 0;
  font-size: .78rem;
}
.cx2-check strong { color: #0a6b3b; }
[data-md-color-scheme="slate"] .cx2-check { background: #0d2a1e; border-left-color: #34d399; }
[data-md-color-scheme="slate"] .cx2-check strong { color: #7ff0b6; }

/* Responsive */
@media screen and (max-width: 76.1875em) {
  .cx2-hero h1 { font-size: 2.1rem; }
}
