/* =========================================================================
   SNDCT / Syndicate — Material for MkDocs brand skin
   Brand neon green #04FE07 on near-black. Dark-first, light-aware.
   ========================================================================= */

/* ---- Brand tokens ---- */
:root {
  --sndct-green:        #04FE07;
  --sndct-green-soft:   #4dff50;
  --sndct-green-deep:   #03c405;

  --md-primary-fg-color:        #04FE07;
  --md-primary-fg-color--light: #4dff50;
  --md-primary-fg-color--dark:  #03c405;
  --md-accent-fg-color:         #04FE07;
  --md-accent-fg-color--transparent: rgba(4, 254, 7, 0.10);
}

[data-md-color-scheme="slate"] {
  --md-hue: 0;                              /* neutral grey, no tint */
  --md-default-bg-color:         #1D1D1D;   /* charcoal (per brand swatch) */
  --md-default-bg-color--light:  #242424;
  --md-default-bg-color--lighter:#2A2A2A;
  --md-code-bg-color:            #262626;   /* panels/cards a touch lighter -> read as panels */
  --md-typeset-a-color:          #4dff50;
  --md-accent-fg-color:          #04FE07;
  /* header/tabs sit on a dark bar -> foreground must be LIGHT */
  --md-primary-bg-color:         #EAFFEA;
  --md-primary-bg-color--light:  rgba(234,255,234,0.7);
  /* kill the muted greys — text is white, secondary text near-white */
  --md-default-fg-color:         #ffffff;
  --md-default-fg-color--light:  rgba(255,255,255,0.94);
  --md-default-fg-color--lighter:rgba(255,255,255,0.72);
  --md-default-fg-color--lightest:rgba(255,255,255,0.26);
}
[data-md-color-scheme="default"] {
  --md-typeset-a-color: #059212;
  /* header/tabs sit on a white bar in light mode -> foreground must be DARK */
  --md-primary-bg-color:         #0A0D0A;
  --md-primary-bg-color--light:  rgba(10,13,10,0.7);
}

/* ---- Layout rhythm ---- */
.md-grid { max-width: 1360px; }
.md-typeset { line-height: 1.72; }
.md-typeset h2 { margin-top: 2.2rem; }
.md-content { padding-bottom: 1.5rem; }

/* =========================================================================
   HEADER + TABS
   ========================================================================= */
.md-header {
  background-color: rgba(7, 9, 10, 0.85);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
          backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid rgba(4, 254, 7, 0.14);
}
[data-md-color-scheme="default"] .md-header {
  background-color: rgba(255,255,255,0.9);
  border-bottom-color: rgba(4,254,7,0.22);
}
.md-tabs {
  background-color: transparent;
  border-bottom: 1px solid rgba(4, 254, 7, 0.10);
}
/* Clean brand block: vertically centered mark + title, tight gap */
.md-header__button.md-logo {
  display: flex; align-items: center;
  margin: 0; padding: .2rem;
}
.md-header__button.md-logo img { height: 1.5rem; width: auto; }
.md-header__title {
  font-weight: 700; letter-spacing: .2px;
  line-height: 2.4rem; font-size: .92rem;
  margin-left: .1rem;
  cursor: pointer;                     /* clickable -> Home (via header-link.js) */
}
.md-header__title:hover { color: var(--sndct-green); }
.md-header__title .md-header__topic { display: flex; align-items: center; }

.md-tabs__link { opacity: .78; }
.md-tabs__link--active { color: var(--sndct-green); opacity: 1; }
.md-tabs__item--active { position: relative; }
.md-tabs__item--active::after {
  content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 0;
  height: 2px; border-radius: 2px;
  background: var(--sndct-green);
  box-shadow: 0 0 8px var(--sndct-green);
}

/* =========================================================================
   ANNOUNCEMENT BAR — centered, aligned
   ========================================================================= */
.md-banner {
  background: linear-gradient(90deg, #04FE07 0%, #26d92f 100%);
  color: #05140a;
}
.md-banner__inner { margin: .4rem auto; font-size: .72rem; }
.sndct-announce {
  display: flex; align-items: center; justify-content: center;
  gap: .5rem; font-weight: 600; text-align: center;
}
.sndct-announce svg { width: 1rem; height: 1rem; fill: currentColor; flex-shrink: 0; }
.sndct-announce a { color: #05140a; font-weight: 800; text-decoration: underline; white-space: nowrap; }
.sndct-announce a:hover { color: #05140a; opacity: .68; }   /* stay dark on hover, don't blend into green */
.md-banner .md-banner__button { color: #05140a; }

/* =========================================================================
   HERO (homepage) — compact
   ========================================================================= */
.sndct-hero {
  position: relative; text-align: center;
  padding: 2.4rem 1.5rem 2.2rem;
  margin: -0.5rem -0.8rem 2.2rem;
  border-radius: 18px; overflow: hidden;
  background:
    radial-gradient(70% 130% at 50% -20%, rgba(4,254,7,0.16) 0%, rgba(4,254,7,0) 62%),
    linear-gradient(180deg, #0B0F0C 0%, #07090A 100%);
  border: 1px solid rgba(4, 254, 7, 0.16);
}
[data-md-color-scheme="default"] .sndct-hero {
  background:
    radial-gradient(70% 130% at 50% -20%, rgba(4,254,7,0.12) 0%, rgba(4,254,7,0) 62%),
    linear-gradient(180deg, #f6fff6 0%, #ffffff 100%);
  border-color: rgba(4, 254, 7, 0.25);
}
.sndct-hero::after {
  content: ""; position: absolute; left: 20%; right: 20%; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--sndct-green), transparent);
  opacity: .5;
}
.md-typeset .sndct-hero h1 {
  font-size: 1.9rem; font-weight: 800; line-height: 1.12;
  margin: 0 0 .5rem; letter-spacing: -.5px; color: #f4fff4;
  border-bottom: none; padding-bottom: 0;   /* no divider on the hero title */
}
[data-md-color-scheme="default"] .md-typeset .sndct-hero h1 { color: #08120a; }
.sndct-hero-sub {
  max-width: 600px; margin: 0 auto 1.3rem;
  font-size: .85rem; color: var(--md-default-fg-color--light);
}
.sndct-hero .md-button { margin: .25rem .3rem; }
/* balance vertical padding: kill the first/last child margins (the buttons <p>
   otherwise adds ~1em below, making the block bottom-heavy) */
.sndct-hero > :first-child { margin-top: 0; }
.sndct-hero > :last-child { margin-bottom: 0; }

/* =========================================================================
   CARD GRID — symmetric, equal height, fully clickable, aligned icons
   ========================================================================= */
.md-typeset .grid.cards.sndct-cards {
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem; margin: .6rem 0 0;
}
@media (max-width: 1200px) {
  .md-typeset .grid.cards.sndct-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .md-typeset .grid.cards.sndct-cards { grid-template-columns: 1fr; }
}

.md-typeset .grid.cards > ul > li {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: 16px;
  border: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-code-bg-color);
  padding: 1.1rem 1.2rem;
  transition: transform .18s ease, box-shadow .2s ease, border-color .2s ease;
}
.md-typeset .grid.cards > ul > li:hover {
  transform: translateY(-4px);
  border-color: var(--sndct-green);
  box-shadow: 0 14px 34px rgba(0,0,0,.35), 0 0 0 1px rgba(4,254,7,.35);
}
/* icon + title on ONE line, baseline-centered */
.md-typeset .grid.cards > ul > li > p:first-child {
  display: flex; align-items: center; gap: .5rem;
  margin: 0 0 .1rem; font-weight: 700;
}
.md-typeset .grid.cards > ul > li > p:first-child .twemoji { color: var(--sndct-green); }
.md-typeset .grid.cards > ul > li > p:first-child .twemoji svg { height: 1.2rem; width: 1.2rem; }
/* divider */
.md-typeset .grid.cards > ul > li > hr {
  margin: .55rem 0; border: 0; border-top: 1px solid var(--md-default-fg-color--lightest);
}
/* body grows, CTA pinned to bottom -> all CTAs align */
.md-typeset .grid.cards > ul > li > p:nth-child(3) { flex: 1 0 auto; margin: 0; font-size: .78rem; }
.md-typeset .grid.cards > ul > li > p:last-child {
  margin: .8rem 0 0; font-weight: 600;
}
.md-typeset .grid.cards > ul > li > p:last-child > a { color: var(--sndct-green-soft); }
/* whole card clickable — stretch the CTA link over the card */
.md-typeset .grid.cards > ul > li > p:last-child > a::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
}

/* =========================================================================
   BUTTONS
   ========================================================================= */
.md-typeset .md-button {
  border-radius: 10px; font-weight: 600; border-width: 1px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.md-typeset .md-button--primary {
  color: #05140a; background: var(--sndct-green); border-color: var(--sndct-green);
  box-shadow: 0 6px 22px rgba(4,254,7,.35);
}
.md-typeset .md-button--primary:hover {
  transform: translateY(-2px); background: var(--sndct-green-soft);
  border-color: var(--sndct-green-soft); color: #05140a;
  box-shadow: 0 10px 30px rgba(4,254,7,.5);
}
.md-typeset .md-button:not(.md-button--primary):hover {
  background: var(--sndct-green);
  border-color: var(--sndct-green);
  color: #05140a;                 /* dark text on green fill — stays readable */
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(4,254,7,.35);
}

/* =========================================================================
   ADMONITIONS / TABLES / MISC
   ========================================================================= */
/* Clean callouts: thin uniform border + rounded box + tinted title row.
   No thick rounded left bar (that lozenge accent is an obvious AI-doc marker). */
.md-typeset .admonition,
.md-typeset details {
  border-radius: 10px;
  border-width: 1px;
  box-shadow: 0 4px 16px rgba(0,0,0,.18);
  font-size: .78rem;
  overflow: hidden;                 /* square the title-row tint to the box edges */
}
.md-typeset .admonition-title,
.md-typeset summary {
  font-weight: 700; letter-spacing: .2px;
  border-radius: 0;
}
.md-typeset .admonition-title::before,
.md-typeset summary::before { border-radius: 0; }
.md-typeset .admonition.note,
.md-typeset details.note { border-color: var(--sndct-green); }
.md-typeset .note > .admonition-title,
.md-typeset .note > summary { background-color: rgba(4,254,7,.10); }
.md-typeset .note > .admonition-title::before,
.md-typeset .note > summary::before { background-color: var(--sndct-green); }

.md-typeset table:not([class]) {
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--md-default-fg-color--lightest);
}
.md-typeset table:not([class]) th {
  background-color: var(--md-accent-fg-color--transparent); font-weight: 700;
}
.md-typeset blockquote { border-left-color: var(--sndct-green); }
.md-search__input:focus { box-shadow: 0 0 0 2px rgba(4,254,7,.3); }

/* =========================================================================
   FOOTER — Syndicate wordmark (theme-aware) bottom-left, linking to landing
   ========================================================================= */
.md-footer-meta__inner { align-items: center; }
.md-copyright { width: auto; }
.sndct-footer-logo { display: inline-flex; align-items: center; line-height: 0; }
.sndct-footer-logo .sndct-wm {
  height: 26px; width: auto; opacity: .8;
  transition: opacity .2s ease, transform .2s ease;
}
.sndct-footer-logo:hover .sndct-wm { opacity: 1; transform: translateY(-1px); }
/* footer meta bar is dark in BOTH themes -> always use the white-text wordmark */
.sndct-footer-logo .sndct-wm--for-dark  { display: inline; }
.sndct-footer-logo .sndct-wm--for-light { display: none; }

.md-footer { background-color: #191919; }
.md-footer-meta { background-color: #141414; }

/* =========================================================================
   GEOMETRY — column dividers, nav structure, section rules (GitBook-like)
   ========================================================================= */

/* --- Three-column dividers: full-height vertical rules framing the content --- */
:root { --sndct-divider: rgba(0,0,0,0.09); }
[data-md-color-scheme="slate"] { --sndct-divider: rgba(255,255,255,0.08); }

@media screen and (min-width: 76.25em) {
  .md-content {
    border-left: 1px solid var(--sndct-divider);
    border-right: 1px solid var(--sndct-divider);
    min-height: calc(100vh - 8.5rem);
  }
}

/* --- Left-nav section label as small-caps (GitBook style) — DESKTOP ONLY.
   On mobile this element is the drawer header (logo + title) and Material
   needs its own padding, so never restyle it there. --- */
@media screen and (min-width: 76.25em) {
  .md-nav--primary > .md-nav__title {
    text-transform: uppercase;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .12em;
    color: var(--md-default-fg-color--light);
    padding: 0 .6rem .5rem;
    margin-bottom: .4rem;
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
  }
}

/* --- Section headers as small-caps labels (GitBook style) --- */
.md-nav--primary .md-nav__item--section > .md-nav__link,
.md-nav--primary .md-nav__item--section > label.md-nav__link {
  text-transform: uppercase;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: var(--md-default-fg-color--light);
  opacity: .85;
  margin-top: 1.1rem;
  cursor: default;
}
.md-nav--primary .md-nav__item--section > .md-nav__list {
  margin-left: 0;
}

/* --- Nav links: tighter, hover + active accent bar --- */
.md-nav__link { border-radius: 6px; transition: color .15s ease, background .15s ease; }
.md-nav__item .md-nav__link:hover { color: var(--sndct-green); }
.md-nav__link--active,
.md-nav__link--active:focus,
.md-nav__link--active:hover {
  color: var(--sndct-green) !important;
  font-weight: 700;
}
/* green vertical accent bar on the active page */
.md-nav--primary .md-nav__item > .md-nav__link--active {
  position: relative;
}
.md-nav--primary .md-nav__item > .md-nav__link--active::before {
  content: "";
  position: absolute; left: -.7rem; top: .2em; bottom: .2em;
  width: 2px; border-radius: 2px;
  background: var(--sndct-green);
  box-shadow: 0 0 8px rgba(4,254,7,.6);
}

/* --- Breadcrumbs (navigation.path) --- */
.md-path {
  padding-top: .8rem;
  margin-bottom: .4rem;
}
.md-path__link { color: var(--md-default-fg-color--light); }
.md-path__link:hover { color: var(--sndct-green); }

/* --- Page title gets a divider (GitBook look); skip on the hero --- */
.md-typeset h1 {
  padding-bottom: .55rem;
  margin-bottom: 1.3rem;
  border-bottom: 1px solid var(--md-default-fg-color--lightest);
  font-weight: 700;
}

/* --- Boxed search field --- */
.md-search__form {
  border-radius: 8px;
  background-color: var(--md-default-bg-color--light);
  box-shadow: none;
  border: 1px solid var(--md-default-fg-color--lightest);
}
.md-search__form:hover { border-color: rgba(4,254,7,.4); background-color: var(--md-default-bg-color--light); }
[data-md-color-scheme="slate"] .md-search__input::placeholder { color: rgba(234,255,234,.5); }

/* --- Dark mode: lift borders so surfaces read as panels, not void --- */
[data-md-color-scheme="slate"] {
  --md-default-fg-color--lightest: rgba(255,255,255,0.09);
  --md-default-fg-color--lighter:  rgba(255,255,255,0.14);
}

/* --- Breathing room inside the content column --- */
@media screen and (min-width: 76.25em) {
  .md-content__inner { padding: 0 1.4rem 1.5rem; }
}

/* =========================================================================
   COMPACT FOOTER + sidebar/footer scroll behaviour
   ========================================================================= */
/* Prev/Next row — tight top/bottom, centered arrow, full page names.
   Social icons get relocated here (by footer-social.js) and centered. */
.md-footer__inner[hidden] { display: none !important; }   /* honor `hide: footer` (home) */
.md-footer__inner.md-grid {
  padding: .2rem .4rem;                  /* compact band */
  margin: 0 auto;
  display: flex; align-items: flex-end;  /* everything sits on the page-name baseline */
  justify-content: space-between;        /* prev · social(center) · next */
}
.md-footer__link { width: auto; }        /* drop the 50% so space-between can center social */
/* social icons: centered group, aligned to the "Home"/"Next" text line */
.md-footer__inner .md-social {
  align-self: flex-end;
  display: flex; align-items: center; gap: .35rem; padding: 0;
  margin: 0 0 .3rem;                     /* nudge onto the page-name baseline */
}
.md-footer__inner .md-social__link { width: 1.9rem; height: 1.9rem; }
.md-footer__inner .md-social__link svg { width: 1.05rem; height: 1.05rem; }
/* Home: no prev/next row -> center the social in the meta bar (same look) */
.md-footer-meta__inner.md-grid { justify-content: center; padding: .6rem .4rem; }
.md-footer-meta .md-social { margin: 0 auto; display: flex; gap: .35rem; padding: 0; }
.md-footer-meta .md-social__link { width: 2rem; height: 2rem; }
.md-footer-meta .md-social__link svg { width: 1.1rem; height: 1.1rem; }
.md-footer__link {
  padding: .3rem .4rem; opacity: .85;
  display: flex; align-items: center;         /* arrow centered against the 2-line title */
  width: 50%;
}
.md-footer__link:hover { opacity: 1; }
.md-footer__direction { font-size: .56rem; margin-bottom: 0; line-height: 1.15; }
.md-footer__title { flex: 1; line-height: 1.2; padding: 0 .6rem; }
/* show the FULL page name, no "..." truncation */
.md-footer__title .md-ellipsis {
  font-size: .8rem; overflow: visible; text-overflow: clip; white-space: nowrap;
}
.md-footer__button.md-icon { padding: .2rem; margin: 0; align-self: center; }

/* Meta bar (wordmark + social) — tighter */
.md-footer-meta__inner.md-grid { min-height: 0; padding: .4rem .4rem; align-items: center; }
.sndct-footer-logo .sndct-wm { height: 20px; }
.md-social { padding: 0; margin: 0; }
.md-social__link { width: 1.5rem; height: 1.5rem; }

/* --- Left nav scrolls WITH the page (one scrollbar; never hides under footer) --- */
@media screen and (min-width: 76.25em) {
  /* Keep Material's sticky sidebar (slides with scroll, JS caps it above the
     footer); just trim the top padding so the nav starts under the header. */
  .md-sidebar--primary { padding-top: 0; }
  .md-nav--primary > .md-nav__title { margin-top: .4rem; padding-top: 0; }
}
.md-nav--primary .md-nav__list { padding-bottom: .5rem; }

/* =========================================================================
   MOBILE (< 76.25em) — drawer header, footer nav, social in the burger
   ========================================================================= */
@media screen and (max-width: 76.1875em) {

  /* --- Burger drawer header: dark text on the neon-green block --- */
  .md-nav--primary .md-nav__title {
    background-color: var(--sndct-green);
    color: #05140a;
    font-weight: 800;
    letter-spacing: normal;
    text-transform: none;
  }
  .md-nav--primary .md-nav__title .md-nav__button.md-logo img,
  .md-nav--primary .md-nav__title .md-nav__button.md-logo svg {
    height: 2rem; width: auto;
  }
  /* back-arrow rows inside nested drawer levels stay readable */
  .md-nav--primary .md-nav__title ~ .md-nav__list { background: var(--md-default-bg-color); }

  /* --- Social icons live in the burger, not in the footer --- */
  .md-footer__inner .md-social { display: none !important; }

  .sndct-drawer-social { margin-top: .6rem; border-top: 1px solid var(--md-default-fg-color--lightest); }
  .sndct-drawer-social__list {
    display: flex; justify-content: center; align-items: center;
    gap: .5rem; padding: .9rem .4rem; margin: 0;
  }
  .sndct-drawer-social__list .md-social__link { width: 2.2rem; height: 2.2rem; }
  .sndct-drawer-social__list .md-social__link svg { width: 1.2rem; height: 1.2rem; }

  /* --- Prev/Next: make it an obvious, tappable pair --- */
  .md-footer__inner.md-grid {
    padding: .5rem .5rem; gap: .5rem;
    align-items: stretch;
  }
  .md-footer__link {
    opacity: 1; padding: .7rem .5rem;
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 10px;
    background: var(--md-code-bg-color);
    flex: 1 1 0; min-width: 0;
  }
  .md-footer__link:hover,
  .md-footer__link:active { border-color: var(--sndct-green); }
  .md-footer__link--next { justify-content: flex-end; text-align: right; }
  .md-footer__title { padding: 0 .5rem; }
  .md-footer__title .md-ellipsis {
    font-size: .82rem; white-space: normal; overflow: visible;
  }
  .md-footer__direction { opacity: .8; }
}

/* --- Mobile spacing fixes: hero was flush to the viewport edges --- */
@media screen and (max-width: 76.1875em) {
  .sndct-hero {
    margin: .2rem 0 1.6rem;       /* was negative side margins -> edge-to-edge */
    padding: 1.8rem 1.1rem 1.6rem;
    border-radius: 14px;
  }
  .md-typeset .sndct-hero h1 { font-size: 1.5rem; }
  .sndct-hero-sub { font-size: .8rem; margin-bottom: 1.1rem; }
  .sndct-hero .md-button { display: block; margin: .4rem auto 0; max-width: 15rem; }

  /* breathing room on the content column */
  .md-content__inner { padding: 0 .2rem 1.2rem; }
  .md-main__inner { margin-top: .6rem; }

  /* cards: comfortable padding, full width */
  .md-typeset .grid.cards > ul > li { padding: 1rem 1.1rem; }
  .md-typeset .grid.cards.sndct-cards { gap: .8rem; }
}

/* Material hides the prev-link label on small screens — bring it back so both
   footer buttons read the same. */
@media screen and (max-width: 76.1875em) {
  .md-footer__link--prev .md-footer__title { display: block; }
  .md-footer__link--prev { justify-content: flex-start; text-align: left; }
}

/* --- Audit fixes --- */
/* 1. Hero subtitle: Material's `.md-typeset p {margin:1em 0}` outranked the
      class rule and injected a gap under the H1. */
.md-typeset .sndct-hero-sub { margin: 0 auto 1.3rem; }

/* 2. Burger drawer header: force dark text on the neon-green block */
@media screen and (max-width: 76.1875em) {
  .md-nav--primary .md-nav__title,
  .md-nav--primary .md-nav__title .md-ellipsis,
  .md-nav--primary .md-nav__title > span { color: #05140a !important; }
}

/* Mobile prev/next: arrow hugs the outer edge, label centered in the card */
@media screen and (max-width: 76.1875em) {
  .md-footer__link--prev,
  .md-footer__link--next {
    justify-content: space-between;
    padding: .7rem .35rem;
    text-align: center;
  }
  .md-footer__link .md-footer__title {
    flex: 1 1 auto; text-align: center; padding: 0 .2rem;
  }
  .md-footer__link .md-footer__button.md-icon { flex: 0 0 auto; margin: 0; }
}

/* Mobile prev/next: rigid 50/50 grid — equal size, equal height, full width */
@media screen and (max-width: 76.1875em) {
  .md-footer__inner.md-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    padding: .5rem .6rem .7rem;
    align-items: stretch;
  }
  .md-footer__link {
    display: flex; align-items: center; justify-content: space-between;
    width: auto; min-width: 0; margin: 0;
    min-height: 4.2rem;                 /* same height whether the title wraps or not */
    padding: .6rem .5rem;
    box-sizing: border-box;
  }
  /* a lone prev/next (first or last page) spans the full row */
  .md-footer__link:only-child { grid-column: 1 / -1; }
  .md-footer__title { flex: 1 1 auto; min-width: 0; text-align: center; padding: 0 .15rem; }
  .md-footer__title .md-ellipsis { font-size: .8rem; line-height: 1.25; }
  .md-footer__button.md-icon { flex: 0 0 auto; }
}

/* Material narrows .md-footer__link--next on small screens — force both links
   to fill their grid cell so the pair is truly 50/50. */
@media screen and (max-width: 76.1875em) {
  .md-footer__inner .md-footer__link--prev,
  .md-footer__inner .md-footer__link--next,
  .md-footer__inner .md-footer__link {
    width: 100%;
    max-width: none;
    justify-self: stretch;
  }
}

/* First/last page has only one link — let it span the full row (no empty half) */
@media screen and (max-width: 76.1875em) {
  .md-footer__inner:not(:has(.md-footer__link--next)) .md-footer__link--prev,
  .md-footer__inner:not(:has(.md-footer__link--prev)) .md-footer__link--next {
    grid-column: 1 / -1;
  }
}

/* The drawer social block is a mobile-only affordance — never show it in the
   desktop sidebar (footer-social.js injects it regardless of viewport). */
@media screen and (min-width: 76.25em) {
  .sndct-drawer-social { display: none !important; }
}

/* =========================================================================
   QA FIX PASS — defects found in the full-matrix audit
   ========================================================================= */

/* 1. Breadcrumb hung left of the content column on every page.
      It is a SIBLING of .md-content__inner, so it misses that element's
      margin-left. Match the inner's total left offset exactly. */
@media screen and (max-width: 76.1875em) {
  .md-path { margin-left: 0; padding-left: 20px; }   /* inner: 16 margin + 4 pad */
}
@media screen and (min-width: 76.25em) {
  .md-path { margin-left: 24px; padding-left: 28px; } /* inner: 24 margin + 28 pad */
}

/* 2. Home: column rules were drawn even though both sidebars are hidden,
      leaving two orphan rails bounding nothing. Only rule the content column
      when the nav sidebar is actually present. */
@media screen and (min-width: 76.25em) {
  .md-content { border-left: 0; border-right: 0; }
  .md-main__inner:has(.md-sidebar--primary:not([hidden])) .md-content {
    border-left: 1px solid var(--sndct-divider);
    border-right: 1px solid var(--sndct-divider);
  }
}

/* 3. Hero overhung the card grid by 16px each side — align the edges */
.sndct-hero { margin-left: 0; margin-right: 0; }

/* 4. Hero H1 was pulled 16px left by the invisible permalink glyph */
.md-typeset .sndct-hero h1 .headerlink { display: none; }

/* 5. Footer: rigid 3-column grid so the social cluster stays centred even on
      the last page (no Next link) — it used to collapse to the right edge */
@media screen and (min-width: 76.25em) {
  .md-footer__inner.md-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
  }
  .md-footer__link--prev { grid-column: 1; justify-self: start; }
  .md-footer__inner .md-social { grid-column: 2; justify-self: center; }
  .md-footer__link--next { grid-column: 3; justify-self: end; }
  /* symmetric outer padding (was 64px left vs 81px right) */
  .md-footer__inner.md-grid { padding-left: .8rem; padding-right: .8rem; }
  .md-footer__link { padding-left: .4rem; padding-right: .4rem; }
}

/* 6. Emoji in the right-hand TOC were sliced off at the right edge */
.md-nav--secondary .md-nav__link,
.md-nav--secondary .md-ellipsis { overflow: visible; text-overflow: clip; }

/* 7. Active sidebar indicator was a blurred smudge — make it a real bar */
.md-nav--primary .md-nav__item > .md-nav__link--active::before {
  left: -.5rem; width: 3px; border-radius: 2px;
  background: var(--sndct-green); box-shadow: none;
}

/* 8. H1 divider was nearly invisible in dark mode */
.md-typeset h1 { border-bottom-color: rgba(255,255,255,0.22); }
[data-md-color-scheme="default"] .md-typeset h1 { border-bottom-color: rgba(0,0,0,0.14); }

/* 9. "Previous"/"Next" micro-labels were the only grey text on the site */
.md-footer__direction { color: var(--md-default-fg-color--light); opacity: .9; }

/* 10. Home footer was a different component (darker + shorter) than the rest */
.md-footer-meta { background-color: #191919; }

/* 11. Tables shrank to content, floating in an empty half-column.
   The table's own width:100% is circular inside Material's inline-block
   .md-typeset__table wrapper — widen the wrapper too. */
.md-typeset table:not([class]) { width: 100%; display: table; }
.md-typeset .md-typeset__table { display: block; width: 100%; }
.md-typeset .md-typeset__table > table { width: 100%; }

/* 12. Sidebar label underline overhung the labels by 14px */
@media screen and (min-width: 76.25em) {
  .md-nav--primary > .md-nav__title { margin-left: .6rem; padding-left: 0; }
}

/* ---- QA fix pass, round 2 ---- */

/* Breadcrumb links should read as links */
.md-path__link { color: var(--md-default-fg-color--light); }
.md-path__link:hover { color: var(--sndct-green); }
.md-path__link:not(:last-child) { text-decoration: none; }

@media screen and (max-width: 76.1875em) {
  /* footer buttons were inset 12px while all content sits at 20px */
  .md-footer__inner.md-grid { padding-left: 1.25rem; padding-right: 1.25rem; gap: .55rem; }

  /* label was 24px off-centre because only one side carries an arrow —
     use symmetric side columns so the title centres in the button */
  .md-footer__link {
    display: grid;
    grid-template-columns: 1.75rem 1fr 1.75rem;
    align-items: center;
    min-height: 5.2rem;              /* one height whether the title wraps or not */
  }
  .md-footer__link--prev .md-footer__button { grid-column: 1; justify-self: start; }
  .md-footer__link--prev .md-footer__title  { grid-column: 2; }
  .md-footer__link--next .md-footer__title  { grid-column: 2; }
  .md-footer__link--next .md-footer__button { grid-column: 3; justify-self: end; }
  .md-footer__title { text-align: center; padding: 0; }

  /* header: logo broke the 20px gutter every other element uses */
  .md-header__inner.md-grid { padding-left: .6rem; padding-right: .6rem; }
}

/* Fix: `align-items:end` on the desktop footer grid clipped the
   "Previous"/"Next" micro-labels against the top of the band. */
@media screen and (min-width: 76.25em) {
  .md-footer__inner.md-grid { align-items: center; padding-top: .5rem; padding-bottom: .5rem; }
  .md-footer__link { align-items: center; }
  .md-footer__inner .md-social { align-self: center; margin-bottom: 0; }
}

/* Social cluster must sit on the page-name baseline (same line as
   "Getting Started" / "SynPoints"), not on the row's vertical centre. */
@media screen and (min-width: 76.25em) {
  .md-footer__inner .md-social { align-self: end; margin-bottom: 0.9rem; }
}


/* =========================================================================
   App media (v12 content fill): screenshot grids, demo videos, banners
   ========================================================================= */

/* Phone-screenshot grid: uniform framed cards, wraps responsively */
.md-typeset .sndct-shots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: .8rem;
  margin: 1.2rem 0;
  align-items: start;
}
.md-typeset .sndct-shots > p { margin: 0; }
.md-typeset .sndct-shots img,
.md-typeset .sndct-shots video {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--sndct-divider);
  background: #000;
}

/* Demo video slightly wider than a screenshot cell */
.md-typeset .sndct-shots .sndct-video-cell { grid-column: span 1; }

/* Standalone demo video (outside a grid) */
.md-typeset video.sndct-video {
  display: block;
  width: 100%;
  max-width: 300px;
  border-radius: 14px;
  border: 1px solid var(--sndct-divider);
  background: #000;
  margin: 1.2rem 0;
}

/* Wide banner image (ecosystem / Internpass) */
.md-typeset .sndct-banner img {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--sndct-divider);
  margin: 1.2rem 0;
}

/* Mobile: two screenshots per row keeps them readable */
@media screen and (max-width: 44.984375em) {
  .md-typeset .sndct-shots { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
}

/* --- Lightbox (glightbox): zoom affordance + brand-dark overlay --- */
.md-typeset .sndct-shots img,
.md-typeset .sndct-banner img { cursor: zoom-in; }
.glightbox-clean .goverlay { background: rgba(10, 13, 10, .94); }
.glightbox-clean .gslide-media {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, .6);
}
.glightbox-clean .gnext, .glightbox-clean .gprev, .glightbox-clean .gclose {
  background: rgba(255, 255, 255, .08);
}
.glightbox-clean .gnext:hover, .glightbox-clean .gprev:hover, .glightbox-clean .gclose:hover {
  background: rgba(4, 254, 7, .25);
}

/* =========================================================================
   Doc polish pass (v13): steps, chips, SP pills, checklists
   ========================================================================= */

/* Numbered step list: green circled counters (wrap ol in .sndct-steps div) */
.sndct-steps ol { counter-reset: sndct-step; list-style: none; padding-left: 0 !important; }
.sndct-steps ol > li {
  counter-increment: sndct-step;
  position: relative;
  padding-left: 2.3rem;
  margin-bottom: .55rem !important;
}
.sndct-steps ol > li::before {
  content: counter(sndct-step);
  position: absolute; left: 0; top: .02rem;
  width: 1.5rem; height: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(4, 254, 7, .10);
  border: 1px solid rgba(4, 254, 7, .45);
  color: var(--sndct-green);
  font-weight: 800; font-size: .68rem; line-height: 1;
}
[data-md-color-scheme="default"] .sndct-steps ol > li::before {
  color: #059212; background: rgba(4, 254, 7, .12);
}

/* Inline chips — feature/category enumerations */
.md-typeset .sndct-chip {
  display: inline-block;
  margin: .15rem .25rem .15rem 0;
  padding: .18em .7em;
  border-radius: 999px;
  border: 1px solid var(--md-default-fg-color--lightest);
  background: var(--md-code-bg-color);
  font-size: .68rem; font-weight: 600;
  white-space: nowrap;
  transition: border-color .15s ease, transform .15s ease;
}
.md-typeset .sndct-chip:hover { border-color: var(--sndct-green); transform: translateY(-1px); }

/* SP reward pills: `+50 SP` code spans inside plain tables */
.md-typeset table:not([class]) code {
  font-family: var(--md-text-font-family, inherit);
  font-size: .68rem; font-weight: 800;
  padding: .18em .65em;
  border-radius: 999px;
  background: rgba(4, 254, 7, .12);
  border: 1px solid rgba(4, 254, 7, .38);
  color: var(--sndct-green);
  white-space: nowrap;
}
[data-md-color-scheme="default"] .md-typeset table:not([class]) code { color: #047a0f; }

/* Checklist (pymdownx.tasklist custom checkboxes) — green ticks */
.md-typeset .task-list-item { list-style-type: none; }
.md-typeset .task-list-control .task-list-indicator::before {
  background-color: var(--md-default-fg-color--lightest);
}
.md-typeset .task-list-control [type="checkbox"]:checked + .task-list-indicator::before {
  background-color: var(--sndct-green);
}

/* Contact buttons row (partners) */
.md-typeset .sndct-btn-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 1.2rem; }
.md-typeset .sndct-btn-row .md-button { margin: 0; }

/* --- Section dividers: every H2 opens a new section with a full-width rule
   (GitBook-style separation). H1's own underline divider stays as is. --- */
.md-typeset h2 {
  border-top: 1px solid var(--sndct-divider);
  padding-top: 1.5rem;
  margin-top: 2.4rem;
}
/* No double rule when a page starts with an H2 right after the intro
   admonition on hero-less pages — keep it: the intro box provides contrast.
   But the home hero sections keep their tighter rhythm: */
.sndct-hero + h2 { border-top: none; }

/* No doubled rule when an H2 directly follows the H1's own underline */
.md-typeset h1 + h2 { border-top: none; padding-top: 0; }

/* --- Page-end tightening: content → footer gap was 78px stacked from three
   layers (.md-content__inner padding 24 + margin 24 + .md-content padding 30).
   One compact layer instead. --- */
.md-content { padding-bottom: 0; }
.md-content__inner { margin-bottom: 0; padding-bottom: 1.1rem; }

/* --- Long prev/next titles wrapped one ragged word per line — balance the
   lines so multi-word page names split evenly and stay centered. --- */
.md-footer__title .md-ellipsis {
  text-wrap: balance;
  hyphens: none;
}

/* --- Footer title must FILL its grid cell (it shrank to min-content and
   wrapped one ragged word per line on long page names), and multi-line
   titles wrap in balanced, centered lines. --- */
@media screen and (max-width: 76.1875em) {
  .md-footer__link .md-footer__title {
    width: 100%;
    max-width: none;
    justify-self: stretch;
    text-wrap: balance;
  }
  .md-footer__title .md-ellipsis { display: block; text-wrap: balance; }
}

/* Slimmer arrow gutters on mobile: 1.75rem side columns left the title only
   ~72px on a 390px viewport. Keep them symmetric (centering), just narrower. */
@media screen and (max-width: 76.1875em) {
  .md-footer__link {
    grid-template-columns: 1.1rem 1fr 1.1rem;
    padding-left: .35rem;
    padding-right: .35rem;
  }
}

/* Contact button row: three equal-width buttons spanning the full content
   column (same width as the admonition above). Stack on mobile. */
.md-typeset .sndct-btn-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .6rem;
}
.md-typeset .sndct-btn-row .md-button {
  width: 100%;
  margin: 0;
  text-align: center;
  box-sizing: border-box;
}
@media screen and (max-width: 44.984375em) {
  .md-typeset .sndct-btn-row { grid-template-columns: 1fr; }
}

/* Markdown wraps the buttons in <p> — dissolve it so the <a> themselves
   become the grid items. */
.md-typeset .sndct-btn-row > p { display: contents; }
.md-typeset .sndct-btn-row .md-button { white-space: nowrap; }

/* Home: the divider-less H2 right after the hero kept the divider's
   padding-top, stacking ~80px of dead space — tighten it. */
.sndct-hero + h2,
.md-typeset .sndct-hero + h2 { border-top: none; padding-top: 0; margin-top: 1.4rem; }

/* Inline brand icon (replaces ad-hoc emoji in running text) */
.md-typeset .sndct-icon { color: var(--sndct-green); vertical-align: -15%; }
.md-typeset .sndct-icon svg { width: 1.1em; height: 1.1em; }
[data-md-color-scheme="default"] .md-typeset .sndct-icon { color: #059212; }

/* =========================================================================
   PAGE ACTIONS — "Copy page" (docs/js/copy-page.js)
   Split pill anchored to the H1 line on desktop, stacked above it on mobile.
   ========================================================================= */
.md-content__inner { position: relative; }

.sndct-page-actions {
  position: absolute;
  top: .55rem;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: stretch;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 999px;
  background: var(--md-code-bg-color);
  transition: border-color .18s, box-shadow .18s;
}
.sndct-page-actions:hover,
.sndct-page-actions[data-open] {
  border-color: rgba(4, 254, 7, .45);
  box-shadow: 0 0 0 3px rgba(4, 254, 7, .08);
}

/* Reserve the lane so a long title never slides under the pill. */
.md-content__inner > h1 { padding-right: 9.5rem; }

.sndct-page-actions__copy,
.sndct-page-actions__toggle {
  display: flex;
  align-items: center;
  gap: .32rem;
  margin: 0;
  padding: .34rem .62rem;
  border: 0;
  background: none;
  color: var(--md-default-fg-color--light);
  font-size: .62rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: .2px;
  cursor: pointer;
  transition: color .18s;
}
.sndct-page-actions__copy { border-radius: 999px 0 0 999px; padding-left: .74rem; }
.sndct-page-actions__toggle {
  border-radius: 0 999px 999px 0;
  padding-right: .5rem;
  border-left: 1px solid var(--md-default-fg-color--lightest);
}
.sndct-page-actions__copy:hover,
.sndct-page-actions__toggle:hover { color: var(--sndct-green); }
[data-md-color-scheme="default"] .sndct-page-actions__copy:hover,
[data-md-color-scheme="default"] .sndct-page-actions__toggle:hover { color: #059212; }

.sndct-page-actions svg {
  width: .82rem;
  height: .82rem;
  flex-shrink: 0;
  fill: currentColor;
}
.sndct-page-actions__toggle svg { width: .72rem; height: .72rem; transition: transform .18s; }
.sndct-page-actions[data-open] .sndct-page-actions__toggle svg { transform: rotate(180deg); }

.sndct-page-actions__copy[data-state="busy"] { opacity: .55; cursor: progress; }
.sndct-page-actions__copy[data-state="done"] { color: var(--sndct-green); }
.sndct-page-actions__copy[data-state="error"] { color: #ff6b6b; }
[data-md-color-scheme="default"] .sndct-page-actions__copy[data-state="done"] { color: #059212; }

/* ---- dropdown ---- */
.sndct-page-actions__menu {
  position: absolute;
  top: calc(100% + .35rem);
  right: 0;
  width: 14.5rem;
  padding: .25rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 14px;
  background: var(--md-default-bg-color--light, var(--md-default-bg-color));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-.25rem);
  transition: opacity .16s, transform .16s, visibility .16s;
}
[data-md-color-scheme="default"] .sndct-page-actions__menu {
  background: #fff;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .12);
}
.sndct-page-actions[data-open] .sndct-page-actions__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.md-typeset .sndct-page-actions__item {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .42rem .5rem;
  border-radius: 10px;
  color: var(--md-default-fg-color);
  text-decoration: none;
  transition: background-color .14s, color .14s;
}
.md-typeset .sndct-page-actions__item:hover {
  background: var(--md-accent-fg-color--transparent);
  color: var(--md-default-fg-color);
}
.sndct-page-actions__item svg { margin-top: .1rem; color: var(--sndct-green); }
[data-md-color-scheme="default"] .sndct-page-actions__item svg { color: #059212; }
.sndct-page-actions__text { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.sndct-page-actions__title { font-size: .64rem; font-weight: 600; line-height: 1.25; }
.sndct-page-actions__sub {
  font-size: .58rem;
  line-height: 1.25;
  color: var(--md-default-fg-color--lighter);
}

/* ---- mobile: no absolute lane, sit above the title ---- */
@media screen and (max-width: 59.984375em) {
  .sndct-page-actions {
    position: relative;                 /* still the menu's anchor, just back in flow */
    top: auto;
    right: auto;
    display: inline-flex;
    margin: 0 0 .9rem;
  }
  .md-content__inner > h1 { padding-right: 0; }
  .sndct-page-actions__menu { left: 0; right: auto; width: min(14.5rem, calc(100vw - 2.4rem)); }
}

@media (prefers-reduced-motion: reduce) {
  .sndct-page-actions,
  .sndct-page-actions__menu,
  .sndct-page-actions__toggle svg { transition: none; }
}

/* =========================================================================
   LIGHT-MODE FOOTER FIX
   The prev/next band is dark in BOTH schemes (.md-footer is #191919), but the
   mobile cards and the micro-labels were painted from light-scheme tokens
   (--md-code-bg-color = near-white panel, --md-default-fg-color--light =
   near-black text). Result on light theme: white title on a white card and a
   dark-grey label on a dark band. Everything inside the footer is styled
   against dark, regardless of scheme.
   ========================================================================= */
[data-md-color-scheme="default"] .md-footer__direction { color: rgba(255, 255, 255, .72); }
[data-md-color-scheme="default"] .md-footer__link { color: #fff; }

@media screen and (max-width: 76.1875em) {
  [data-md-color-scheme="default"] .md-footer__link {
    background: #262626;
    border-color: rgba(255, 255, 255, .16);
  }
  [data-md-color-scheme="default"] .md-footer__link:hover,
  [data-md-color-scheme="default"] .md-footer__link:active { border-color: var(--sndct-green); }
}

/* Light scheme: --md-code-bg-color / --md-default-fg-color--lightest render the
   pill as grey-on-grey with a hairline border — it read as disabled. */
[data-md-color-scheme="default"] .sndct-page-actions {
  background: #fff;
  border-color: rgba(0, 0, 0, .16);
}
[data-md-color-scheme="default"] .sndct-page-actions__copy,
[data-md-color-scheme="default"] .sndct-page-actions__toggle { color: var(--md-default-fg-color); }
[data-md-color-scheme="default"] .sndct-page-actions__toggle { border-left-color: rgba(0, 0, 0, .14); }
[data-md-color-scheme="default"] .sndct-page-actions__menu { border-color: rgba(0, 0, 0, .12); }
[data-md-color-scheme="default"] .sndct-page-actions__sub { color: rgba(0, 0, 0, .58); }
