/* ==========================================================================
   Payability Docs theme
   Layered on top of the Antora default UI (site.css). Brand colors are taken
   from the official Payability logo: navy #213049 and green #33B05C.
   ========================================================================== */

:root {
  /* Brand */
  --pyb-navy: #213049;
  --pyb-navy-900: #151f33;
  --pyb-navy-800: #1a263d;
  --pyb-navy-700: #2b3d5c;
  --pyb-green: #33b05c;
  --pyb-green-600: #2a9a4f;
  --pyb-green-700: #1f7a3f;   /* AA-contrast green for text links */
  --pyb-green-50: #ebf7ef;
  --pyb-green-100: #d4efdc;

  /* Neutrals */
  --pyb-ink: #1b2538;
  --pyb-text: #344157;
  --pyb-muted: #5f6e85;
  --pyb-subtle: #8a97ab;
  --pyb-border: #e3e8ef;
  --pyb-border-strong: #d3dae5;
  --pyb-bg: #ffffff;
  --pyb-bg-soft: #f6f8fb;
  --pyb-bg-softer: #fafbfd;

  /* Status */
  --pyb-note: #2f6fdb;
  --pyb-tip: #33b05c;
  --pyb-important: #d64545;
  --pyb-warning: #e08a1e;
  --pyb-caution: #9a4fb5;

  /* Type & shape */
  --pyb-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --pyb-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --pyb-radius: 10px;
  --pyb-radius-sm: 6px;
  --pyb-shadow-sm: 0 1px 2px rgba(21, 31, 51, 0.06);
  --pyb-shadow: 0 1px 3px rgba(21, 31, 51, 0.06), 0 6px 16px rgba(21, 31, 51, 0.06);
  --pyb-shadow-lg: 0 12px 32px rgba(21, 31, 51, 0.14);
  --pyb-ring: 0 0 0 3px rgba(51, 176, 92, 0.22);
}

/* ---------- Base ---------- */
html { scrollbar-color: #c6cedb var(--pyb-bg-soft); }
body {
  font-family: var(--pyb-font);
  color: var(--pyb-text);
  background: var(--pyb-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--pyb-green-100); color: var(--pyb-navy); }
:focus-visible { outline: 2px solid var(--pyb-green); outline-offset: 2px; }

/* ==========================================================================
   Top navbar
   ========================================================================== */
.navbar {
  background: var(--pyb-navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12), 0 4px 18px rgba(10, 18, 34, 0.18);
  font-size: 0.86rem;
}
.navbar-brand { padding-left: 1.25rem; }
.navbar .pyb-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.25rem 0 0;
  color: #fff;
  flex: none;
}
.navbar .pyb-brand:hover { background: none; }
.navbar .pyb-logo { display: block; height: 25px; width: auto; }
.navbar .pyb-brand-divider {
  width: 1px;
  height: 1.35rem;
  background: rgba(255, 255, 255, 0.22);
  padding: 0 !important;
}
.navbar .pyb-brand-label {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.92);
}

/* Search box (lunr). Selectors are prefixed with .navbar so they outrank the
   extension's search.css, which is injected after this stylesheet. */
.navbar .navbar-brand .navbar-item.search {
  flex: 1 1 auto;
  justify-content: flex-start;
  padding: 0 1rem 0 1.75rem;
  margin: 0;
}
.navbar #search-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 30rem;
}
.navbar #search-input {
  width: 100%;
  height: 2.15rem;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.85rem;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aab5c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='20' y1='20' x2='16.2' y2='16.2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.7rem center;
  background-size: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 0 2.4rem 0 2.25rem;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.navbar #search-input::placeholder { color: #aab5c8; }
.navbar #search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.navbar #search-input:hover { background-color: rgba(255, 255, 255, 0.12); }
.navbar #search-input:focus {
  background-color: #fff;
  color: var(--pyb-ink);
  border-color: var(--pyb-green);
  box-shadow: var(--pyb-ring);
}
.navbar #search-input:focus::placeholder { color: var(--pyb-subtle); }
.navbar .search-kbd {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font: 500 0.7rem/1 var(--pyb-mono);
  color: #c4cddb;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  padding: 0.18rem 0.38rem;
}
.navbar #search-input:focus ~ .search-kbd { opacity: 0; }

/* Search results dropdown */
.navbar .search-result-dropdown-menu {
  left: 0;
  right: auto;
  margin-top: 0.5rem;
  min-width: 34rem;
  max-width: 42rem;
  border-radius: var(--pyb-radius);
  box-shadow: var(--pyb-shadow-lg);
}
.navbar .search-result-dataset {
  border: 1px solid var(--pyb-border);
  border-radius: var(--pyb-radius);
  padding: 0.5rem;
  max-height: calc(100vh - 6rem);
  color: var(--pyb-text);
}
.navbar .search-result-component-header {
  color: var(--pyb-navy);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--pyb-border);
  padding: 0.6rem 0.25rem 0.4rem;
}
.navbar .search-result-document-title {
  color: var(--pyb-navy);
  font-weight: 600;
  border-right-color: var(--pyb-border);
}
.navbar .search-result-document-hit { color: var(--pyb-muted); }
.navbar .search-result-document-hit > a { border-radius: var(--pyb-radius-sm); }
.navbar .search-result-document-hit > a:hover,
.navbar .search-result-item.active .search-result-document-hit > a { background-color: var(--pyb-green-50); }
.navbar .search-result-document-hit .search-result-highlight {
  color: var(--pyb-green-700);
  background: var(--pyb-green-100);
  border-radius: 3px;
  font-weight: 600;
}
.navbar .search-result-document-hit .search-result-section-title { color: var(--pyb-ink); font-weight: 600; }
.navbar .search-result-dataset .no-result { padding: 0.75rem; color: var(--pyb-muted); }

/* Right-hand menu */
.navbar-end > .navbar-item,
.navbar-end .navbar-link {
  color: rgba(255, 255, 255, 0.86);
  font-weight: 500;
  border-radius: 8px;
}
.navbar-end > .navbar-item,
.navbar-end > .has-dropdown { margin: 0.55rem 0.15rem; padding-top: 0; padding-bottom: 0; }
.navbar-end > a.navbar-item { display: flex; align-items: center; padding: 0 0.85rem; }
.navbar-end .navbar-link {
  background: none;
  border: none;
  font: inherit;
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 2.1rem 0 0.85rem;
  cursor: pointer;
}
.navbar-end > a.navbar-item:hover,
.navbar-end .navbar-link:hover,
.navbar-end .navbar-item.has-dropdown:hover .navbar-link,
.navbar-end .navbar-item.has-dropdown.is-active .navbar-link {
  background: rgba(255, 255, 255, 0.09) !important;
  color: #fff !important;
}
.navbar .pyb-external::after {
  content: "";
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.4em;
  background-color: currentColor;
  opacity: 0.7;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7'/%3E%3Cpath d='M8 7h9v9'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7'/%3E%3Cpath d='M8 7h9v9'/%3E%3C/svg%3E") no-repeat center / contain;
}
.navbar-dropdown {
  border: 1px solid var(--pyb-border);
  border-radius: var(--pyb-radius);
  box-shadow: var(--pyb-shadow-lg);
  padding: 0.4rem;
  min-width: 15rem;
}
.navbar-end .navbar-dropdown { margin-top: 0.4rem; }
.navbar-dropdown .navbar-item {
  color: var(--pyb-ink) !important;
  border-radius: var(--pyb-radius-sm);
  padding: 0.45rem 0.75rem;
  font-weight: 500;
}
.navbar-dropdown a.navbar-item:hover { background: var(--pyb-bg-soft) !important; color: var(--pyb-navy) !important; }
.navbar-dropdown .navbar-item.is-current {
  background: var(--pyb-green-50);
  color: var(--pyb-green-700) !important;
  font-weight: 600;
}
@media screen and (min-width: 1024px) {
  .navbar-end .navbar-item.has-dropdown.is-active .navbar-dropdown { display: block; }
  .navbar-end .navbar-dropdown { right: 0; left: auto; }
}

/* Mobile navbar */
.navbar-burger span { background-color: #fff; }
@media screen and (max-width: 1023.5px) {
  .navbar .pyb-brand-divider, .navbar .pyb-brand-label { display: none; }
  .navbar .navbar-brand .navbar-item.search { padding-left: 1rem; }
  .navbar .search-kbd { display: none; }
  .navbar .search-result-dropdown-menu { min-width: calc(100vw - 2.5rem); left: -4.5rem; }
  .navbar-menu {
    background: #fff;
    border-bottom: 1px solid var(--pyb-border);
    box-shadow: var(--pyb-shadow-lg);
  }
  .navbar-end > .navbar-item,
  .navbar-end > .has-dropdown { margin: 0; }
  .navbar-end > .navbar-item,
  .navbar-end .navbar-link { color: var(--pyb-ink); padding: 0.75rem 1.25rem; border-radius: 0; }
  .navbar-end > a.navbar-item:hover,
  .navbar-end .navbar-link:hover,
  .navbar-end .navbar-item.has-dropdown:hover .navbar-link,
  .navbar-end .navbar-item.has-dropdown.is-active .navbar-link {
    background: var(--pyb-bg-soft) !important;
    color: var(--pyb-navy) !important;
  }
  .navbar-dropdown { border: none; box-shadow: none; padding: 0 0.75rem 0.5rem; }
}

/* ==========================================================================
   Left navigation
   ========================================================================== */
.nav {
  background: var(--pyb-bg-softer);
  border-right: 1px solid var(--pyb-border);
}
@media screen and (min-width: 1024px) {
  .nav-container { width: 17rem; }
}
.nav-menu { padding: 0 0.75rem 1.25rem; color: var(--pyb-text); }

/* Sticky header: component title + filter box */
.nav-head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--pyb-bg-softer);
  margin: 0 -0.75rem 0.5rem;
  padding: 1rem 0.9rem 0.75rem;
  border-bottom: 1px solid var(--pyb-border);
}
.nav-menu h3.title {
  margin: 0 0 0.65rem;
  padding: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-menu h3.title a { color: var(--pyb-navy); }
.nav-menu h3.title a:hover { color: var(--pyb-green-700); }
.nav-filter { position: relative; }
.nav-filter-input {
  width: 100%;
  box-sizing: border-box;
  font: inherit;
  font-size: 0.82rem;
  color: var(--pyb-ink);
  border: 1px solid var(--pyb-border-strong);
  border-radius: 8px;
  padding: 0.42rem 0.6rem 0.42rem 2rem;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a97ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 3H2l8 9.46V19l4 2v-8.54L22 3z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.65rem center;
  background-size: 0.85em;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.nav-filter-input::placeholder { color: var(--pyb-subtle); }
.nav-filter-input:focus { border-color: var(--pyb-green); box-shadow: var(--pyb-ring); }

/* Items */
.nav-list { margin-left: 0.75rem; }
.nav-menu > .nav-list { margin-left: 0.85rem; }
.nav-menu > .nav-list > .nav-item:not(.is-top) > .nav-list { margin-left: 0; }
.nav-item { margin-top: 0.1rem; }
.nav-link, .nav-text {
  display: block;
  border-radius: var(--pyb-radius-sm);
  padding: 0.32rem 0.55rem;
  color: var(--pyb-text);
  line-height: 1.4;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.nav-menu a.nav-link:hover { color: var(--pyb-navy); background: #eef1f6; }

/* Group headers (top level, see is-top in footer-scripts.hbs) */
.nav-item.is-top.has-children > .nav-link,
.nav-item.is-top.has-children > .nav-text {
  font-weight: 600;
  color: var(--pyb-navy);
}
.nav-item.is-top { margin-top: 0.35rem; }

/* Top-level icons (mask follows currentColor) */
.nav-ico { display: none; }
.nav-item.is-top > .nav-link > .nav-ico,
.nav-item.is-top > .nav-text > .nav-ico {
  display: inline-block;
  width: 1em;
  height: 1em;
  margin-right: 0.5em;
  vertical-align: -0.15em;
  background-color: currentColor;
  opacity: 0.55;
  -webkit-mask: var(--nav-ico) no-repeat center / contain;
  mask: var(--nav-ico) no-repeat center / contain;
}
.nav-item.is-top.has-children > .nav-link .nav-ico,
.nav-item.is-top.has-children > .nav-text .nav-ico {
  --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2 2 7l10 5 10-5-10-5z'/%3E%3Cpath d='m2 17 10 5 10-5'/%3E%3Cpath d='m2 12 10 5 10-5'/%3E%3C/svg%3E");
}
.nav-item.is-top.is-leaf > .nav-link .nav-ico,
.nav-item.is-top.is-leaf > .nav-text .nav-ico {
  --nav-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
}

/* Collapse chevron */
.nav-item-toggle {
  opacity: 0.45;
  margin-top: 0.1em;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.nav-item-toggle:hover { opacity: 0.9; }

/* Current page */
.nav-item.is-current-page > .nav-link {
  color: var(--pyb-green-700);
  font-weight: 600;
  background: var(--pyb-green-50);
  box-shadow: inset 3px 0 0 var(--pyb-green);
}
.nav-item.is-current-page > .nav-link .nav-ico { opacity: 0.9; }

/* Client-side filtering states */
.nav-menu.is-filtering .nav-list { display: block !important; }
.nav-item.filter-hidden { display: none !important; }

/* Component explorer (bottom of sidebar) */
.nav-panel-explore { background: var(--pyb-bg-softer); }
.nav-panel-explore .context {
  font-size: 0.8rem;
  color: var(--pyb-muted);
  border-top: 1px solid var(--pyb-border);
  box-shadow: none;
  background: #fff;
}
.nav-panel-explore .context .title { color: var(--pyb-navy); font-weight: 600; }
.nav-panel-explore .components { background: var(--pyb-bg-softer); border-top: 1px solid var(--pyb-border); padding: 0.75rem; }
.nav-panel-explore .component .title a { color: var(--pyb-text); }
.nav-panel-explore .component .title a:hover { color: var(--pyb-green-700); }
.nav-panel-explore .component.is-current .title a { color: var(--pyb-green-700); }

/* ==========================================================================
   Toolbar (breadcrumbs strip)
   ========================================================================== */
.toolbar {
  background-color: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  backdrop-filter: saturate(160%) blur(8px);
  box-shadow: 0 1px 0 var(--pyb-border);
  color: var(--pyb-muted);
  font-size: 0.8rem;
}
.breadcrumbs a { color: var(--pyb-muted); }
.breadcrumbs a:hover { color: var(--pyb-green-700); }
.breadcrumbs li:last-of-type { color: var(--pyb-ink); font-weight: 500; }
.toolbar .edit-this-page a {
  color: var(--pyb-muted);
  border: 1px solid var(--pyb-border-strong);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-weight: 500;
}
.toolbar .edit-this-page a:hover { color: var(--pyb-green-700); border-color: var(--pyb-green); }

/* ==========================================================================
   Article
   ========================================================================== */
.doc {
  color: var(--pyb-text);
  font-size: 0.95rem;
  -webkit-hyphens: manual;
  hyphens: manual;
}
@media screen and (min-width: 1024px) {
  .doc { max-width: 48rem; margin: 0 2.5rem; }
}
.doc p, .doc li, .doc dd { line-height: 1.7; }
.doc strong { color: var(--pyb-ink); font-weight: 600; }

.doc h1, .doc h2, .doc h3, .doc h4, .doc h5, .doc h6 {
  color: var(--pyb-navy);
  font-family: var(--pyb-font);
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.3;
}
.doc h1.page {
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}
@media screen and (min-width: 769px) {
  .doc > h1.page:first-child { margin-top: 2.25rem; }
}
.doc h2,
.doc h2:not(.discrete) {
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  font-size: 1.5rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--pyb-border);
  margin-top: 2.5rem;
}
.doc h3 { font-size: 1.2rem; margin-top: 2rem; }
.doc h4 { font-size: 1.02rem; }
.doc h1 .anchor, .doc h2 .anchor, .doc h3 .anchor,
.doc h4 .anchor, .doc h5 .anchor, .doc h6 .anchor { color: var(--pyb-green); }

/* Lead paragraph (first paragraph after the title) */
.doc > h1.page + #preamble > .sectionbody > .paragraph:first-child p,
.doc > h1.page + .paragraph p {
  font-size: 1.08rem;
  color: var(--pyb-muted);
  line-height: 1.65;
}

/* Links */
.doc a {
  color: var(--pyb-green-700);
  text-decoration: none;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
.doc a:hover { color: var(--pyb-green-600); text-decoration: underline; }

/* Lists */
.doc ul li::marker { color: var(--pyb-subtle); }
.doc .olist ol li::marker { color: var(--pyb-muted); font-weight: 600; }

/* Inline code */
.doc code {
  font-family: var(--pyb-mono);
}
.doc :not(pre) > code {
  font-size: 0.85em;
  color: var(--pyb-navy);
  background: #eef1f6;
  border: 1px solid #e2e7ef;
  border-radius: 5px;
  padding: 0.1em 0.38em;
  word-wrap: break-word;
}
.doc a > code { color: inherit; }
.doc kbd {
  font-family: var(--pyb-mono);
  font-size: 0.8em;
  background: #fff;
  border: 1px solid var(--pyb-border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 0.1em 0.4em;
}

/* ---------- Code blocks (navy theme) ---------- */
.doc .listingblock,
.doc .literalblock { margin-top: 1.25rem; }
.doc .listingblock > .content { position: relative; }
.doc .listingblock pre:not(.highlight),
.doc .literalblock pre,
.doc pre.highlight > code {
  font-family: var(--pyb-mono);
  font-size: 0.82rem;
  line-height: 1.65;
  color: #dbe3ef;
  background: var(--pyb-navy-900);
  border: 1px solid var(--pyb-navy-800);
  border-radius: var(--pyb-radius);
  box-shadow: none;
  padding: 1rem 1.15rem;
}
.doc pre.highlight { background: none; border: none; padding: 0; }
.doc .listingblock .title,
.doc .literalblock .title {
  font-style: normal;
  color: var(--pyb-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding-bottom: 0.35rem;
}
.doc .source-toolbox {
  top: 0.55rem;
  right: 0.75rem;
  color: #8f9cb3;
  font-family: var(--pyb-font);
  font-size: 0.68rem;
}
.doc .source-toolbox .copy-button { color: #c4cddb; }
.doc .source-toolbox .copy-button:hover { color: #fff; }
.doc .source-toolbox .copy-icon { filter: invert(1) brightness(1.6); }
.doc .source-toolbox .copy-toast {
  background: var(--pyb-green);
  color: #fff;
  border-radius: 4px;
  font-weight: 600;
}
.doc .source-toolbox .copy-toast::after { border-top-color: var(--pyb-green); }

/* Syntax highlighting (tuned for the navy background) */
.doc pre.highlight .hljs-comment,
.doc pre.highlight .hljs-quote { color: #7c8ba3; font-style: italic; }
.doc pre.highlight .hljs-keyword,
.doc pre.highlight .hljs-selector-tag,
.doc pre.highlight .hljs-subst { color: #c79bff; font-weight: 500; }
.doc pre.highlight .hljs-literal,
.doc pre.highlight .hljs-number,
.doc pre.highlight .hljs-tag .hljs-attr,
.doc pre.highlight .hljs-template-variable,
.doc pre.highlight .hljs-variable { color: #f6b26b; }
.doc pre.highlight .hljs-doctag,
.doc pre.highlight .hljs-string { color: #7fd99a; }
.doc pre.highlight .hljs-section,
.doc pre.highlight .hljs-selector-id,
.doc pre.highlight .hljs-title { color: #7cc4ff; font-weight: 500; }
.doc pre.highlight .hljs-class .hljs-title,
.doc pre.highlight .hljs-type { color: #ffd479; font-weight: 500; }
.doc pre.highlight .hljs-attribute,
.doc pre.highlight .hljs-name,
.doc pre.highlight .hljs-tag,
.doc pre.highlight .hljs-attr { color: #7cc4ff; font-weight: 400; }
.doc pre.highlight .hljs-link,
.doc pre.highlight .hljs-regexp { color: #5fd3c6; }
.doc pre.highlight .hljs-bullet,
.doc pre.highlight .hljs-symbol { color: #ff8fb1; }
.doc pre.highlight .hljs-built_in,
.doc pre.highlight .hljs-builtin-name { color: #5fd3c6; }
.doc pre.highlight .hljs-meta { color: #8f9cb3; font-weight: 500; }
.doc pre.highlight .hljs-deletion { background: rgba(214, 69, 69, 0.22); }
.doc pre.highlight .hljs-addition { background: rgba(51, 176, 92, 0.22); }

/* Callout numbers */
.doc .conum[data-value] {
  background: var(--pyb-green);
  border-color: var(--pyb-green);
  color: #fff;
  font-family: var(--pyb-font);
}
.doc pre .conum[data-value] { background: var(--pyb-green); color: #fff; }
.doc .colist td:first-child { padding-top: 0.2rem; }

/* ---------- Tables ---------- */
.doc table.tableblock {
  font-size: 0.85rem;
  border: 1px solid var(--pyb-border) !important;
  border-radius: var(--pyb-radius);
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  box-shadow: var(--pyb-shadow-sm);
}
.doc table.tableblock > * > tr > * { border: none !important; }
.doc table.tableblock thead th,
.doc table.tableblock > thead > tr > th {
  background: var(--pyb-bg-soft);
  color: var(--pyb-navy);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  text-align: left;
  border-bottom: 1px solid var(--pyb-border-strong) !important;
}
.doc table.tableblock td,
.doc table.tableblock th { padding: 0.6rem 0.85rem; vertical-align: top; }
.doc table.tableblock tbody tr + tr > * { border-top: 1px solid var(--pyb-border) !important; }
.doc table.tableblock tbody tr:hover { background: var(--pyb-bg-softer); }
.doc table.tableblock tbody th { background: var(--pyb-bg-softer); color: var(--pyb-ink); }
.doc .tablecontainer { overflow-x: auto; }

/* ---------- Admonitions (callouts) ---------- */
.doc .admonitionblock { margin-top: 1.5rem; }
.doc .admonitionblock > table,
.doc .admonitionblock > table > tbody,
.doc .admonitionblock > table > tbody > tr {
  display: block;
  width: 100%;
}
.doc .admonitionblock > table {
  --adm: var(--pyb-muted);
  --adm-bg: var(--pyb-bg-soft);
  background: var(--adm-bg);
  border: 1px solid color-mix(in srgb, var(--adm) 22%, transparent);
  border-left: 4px solid var(--adm);
  border-radius: 8px;
  padding: 0.8rem 1.1rem 0.9rem;
  box-sizing: border-box;
}
.doc .admonitionblock td.icon {
  display: block;
  position: static;
  transform: none;
  padding: 0 0 0.3rem;
  font-size: 0.72rem;
}
.doc .admonitionblock td.icon i {
  background: none !important;
  color: var(--adm) !important;
  padding: 0;
  height: auto;
  gap: 0.4em;
  letter-spacing: 0.06em;
}
.doc .admonitionblock td.icon i::before {
  content: "";
  width: 1.15em;
  height: 1.15em;
  background-color: currentColor;
  -webkit-mask: var(--adm-ico) no-repeat center / contain;
  mask: var(--adm-ico) no-repeat center / contain;
}
.doc .admonitionblock td.icon i::after { font-weight: 700; }
.doc .admonitionblock td.content {
  display: block;
  padding: 0;
  background: none;
  border: none;
  color: var(--pyb-text);
  font-size: 0.9rem;
}
.doc .admonitionblock td.content p { font-size: inherit; }
.doc .admonitionblock.note > table {
  --adm: var(--pyb-note); --adm-bg: #f1f6fe;
  --adm-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E");
}
.doc .admonitionblock.tip > table {
  --adm: var(--pyb-green-600); --adm-bg: var(--pyb-green-50);
  --adm-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6'/%3E%3Cpath d='M10 22h4'/%3E%3Cpath d='M12 2a7 7 0 0 0-4 12.7V17h8v-2.3A7 7 0 0 0 12 2z'/%3E%3C/svg%3E");
}
.doc .admonitionblock.important > table {
  --adm: var(--pyb-important); --adm-bg: #fdf3f3;
  --adm-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E");
}
.doc .admonitionblock.warning > table {
  --adm: var(--pyb-warning); --adm-bg: #fef7ee;
  --adm-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E");
}
.doc .admonitionblock.caution > table {
  --adm: var(--pyb-caution); --adm-bg: #f8f2fb;
  --adm-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2c1 4 6 6 6 12a6 6 0 0 1-12 0c0-3 1.5-5 3-6.5C9.5 10 11 11 12 11c0-3-1-6 0-9z'/%3E%3C/svg%3E");
}

/* ---------- Other blocks ---------- */
.doc .exampleblock > .content {
  background: #fff;
  border: 1px solid var(--pyb-border);
  border-radius: var(--pyb-radius);
  box-shadow: var(--pyb-shadow-sm);
}
.doc .sidebarblock {
  background: var(--pyb-bg-soft);
  border: 1px solid var(--pyb-border);
  border-radius: var(--pyb-radius);
}
.doc .sidebarblock > .content > .title { color: var(--pyb-navy); }
.doc .quoteblock blockquote,
.doc .verseblock pre {
  border-left: 3px solid var(--pyb-green);
  color: var(--pyb-muted);
}
.doc details {
  border: 1px solid var(--pyb-border);
  border-radius: var(--pyb-radius);
  padding: 0.6rem 1rem 0.6rem 2rem;
  background: #fff;
}
.doc details > summary { color: var(--pyb-navy); font-weight: 600; }
.doc .imageblock img,
.doc .image > img { border-radius: var(--pyb-radius-sm); }
.doc hr { border: none; border-top: 1px solid var(--pyb-border); }
.doc .dlist dt { color: var(--pyb-ink); font-weight: 600; }
.doc .hdlist th { color: var(--pyb-navy); }

/* ---------- Mermaid diagrams (see js/diagram-viewer.js) ---------- */
.doc .pyb-diagram { margin: 1.5rem 0 0; }
.doc .pyb-diagram-title {
  color: var(--pyb-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding-bottom: 0.4rem;
}
.doc .pyb-diagram-frame {
  position: relative;
  background-color: #fff;
  background-image: radial-gradient(circle, #e6eaf1 1px, transparent 1px);
  background-size: 18px 18px;
  border: 1px solid var(--pyb-border);
  border-radius: var(--pyb-radius);
  overflow: hidden;
}
.doc pre.mermaid {
  margin: 0;
  padding: 1.25rem 1rem;
  background: transparent;
  border: none;
  box-shadow: none;
  text-align: center;
  overflow-x: auto;
  font-family: var(--pyb-font);
  white-space: pre;
}
/* Once enhanced, the viewport clips and the SVG is positioned by transform. */
.doc .pyb-diagram.is-enhanced pre.mermaid {
  position: relative;
  padding: 0;
  overflow: hidden;
  text-align: left;
  cursor: grab;
  touch-action: pan-x pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.doc .pyb-diagram.is-enhanced pre.mermaid.is-dragging { cursor: grabbing; }
.doc .pyb-diagram.is-enhanced pre.mermaid > svg {
  position: absolute;
  top: 0;
  left: 0;
  will-change: transform;
}

/* Toolbar (inline + modal) */
.pyb-dg-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 0.1rem;
  padding: 0.2rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--pyb-border);
  border-radius: 8px;
  box-shadow: var(--pyb-shadow);
  font-family: var(--pyb-font);
}
.pyb-diagram-frame > .pyb-dg-toolbar {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  opacity: 0;
  transform: translateY(-3px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.pyb-diagram-frame:hover > .pyb-dg-toolbar,
.pyb-diagram-frame:focus-within > .pyb-dg-toolbar { opacity: 1; transform: none; }
@media (hover: none) {
  .pyb-diagram-frame > .pyb-dg-toolbar { opacity: 1; transform: none; }
}
.pyb-dg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--pyb-muted);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}
.pyb-dg-btn:hover { background: var(--pyb-green-50); color: var(--pyb-green-700); }
.pyb-dg-btn:focus-visible { outline: 2px solid var(--pyb-green); outline-offset: 0; }
.pyb-dg-level {
  min-width: 3.1rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--pyb-text);
}
.pyb-dg-sep { width: 1px; height: 1.1rem; margin: 0 0.2rem; background: var(--pyb-border); }

/* Fullscreen viewer */
html.pyb-dg-locked, html.pyb-dg-locked body { overflow: hidden; }
.pyb-dg-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  background-color: var(--pyb-bg-softer);
  background-image: radial-gradient(circle, #dfe4ec 1px, transparent 1px);
  background-size: 22px 22px;
  font-family: var(--pyb-font);
  animation: pyb-dg-in 0.16s ease-out;
}
.pyb-dg-modal[hidden] { display: none; }
@keyframes pyb-dg-in { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
.pyb-dg-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0.9rem 0.65rem 1.25rem;
  padding-top: calc(0.65rem + env(safe-area-inset-top, 0px));
  background: var(--pyb-navy);
  color: #fff;
  box-shadow: 0 2px 12px rgba(10, 18, 34, 0.2);
}
.pyb-dg-modal-title {
  font-size: 0.9rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pyb-dg-modal-head .pyb-dg-toolbar {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
  flex: none;
}
.pyb-dg-modal-head .pyb-dg-btn { color: rgba(255, 255, 255, 0.8); }
.pyb-dg-modal-head .pyb-dg-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.pyb-dg-modal-head .pyb-dg-level { color: #fff; }
.pyb-dg-modal-head .pyb-dg-sep { background: rgba(255, 255, 255, 0.18); }
.pyb-dg-modal-viewport {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.pyb-dg-modal-viewport.is-dragging { cursor: grabbing; }
.pyb-dg-modal-viewport > svg { position: absolute; top: 0; left: 0; will-change: transform; }
.pyb-dg-hint {
  position: absolute;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(33, 48, 73, 0.88);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.72rem;
  white-space: nowrap;
  pointer-events: none;
  animation: pyb-dg-hint 4s ease forwards;
}
@keyframes pyb-dg-hint { 0%, 70% { opacity: 1; } 100% { opacity: 0; } }
@media screen and (max-width: 768px) {
  .pyb-dg-hint { white-space: normal; text-align: center; width: max-content; max-width: calc(100vw - 2rem); }
}
@media print {
  .pyb-dg-toolbar { display: none !important; }
}

/* ---------- Pagination ---------- */
nav.pagination {
  border-top: 1px solid var(--pyb-border);
  margin-top: 3rem;
  padding-top: 1.5rem;
  gap: 1rem;
}
nav.pagination span {
  flex: 1 1 0;
  border: 1px solid var(--pyb-border);
  border-radius: var(--pyb-radius);
  padding: 0.8rem 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
nav.pagination span:hover { border-color: var(--pyb-green); box-shadow: var(--pyb-shadow); }
nav.pagination span::before { color: var(--pyb-muted); font-size: 0.75rem; font-weight: 500; }
nav.pagination a { color: var(--pyb-navy); font-weight: 600; }
nav.pagination a:hover { color: var(--pyb-green-700); text-decoration: none; }

/* ==========================================================================
   Right-hand TOC
   ========================================================================== */
aside.toc.sidebar .toc-menu { top: 7rem; }
aside.toc .toc-menu h3 {
  color: var(--pyb-navy);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding-bottom: 0.5rem;
}
aside.toc .toc-menu ul { font-size: 0.8rem; }
aside.toc .toc-menu a {
  color: var(--pyb-muted);
  border-left: 2px solid var(--pyb-border) !important;
  padding-top: 0.22rem;
  padding-bottom: 0.22rem;
  line-height: 1.4;
}
aside.toc .toc-menu a:hover { color: var(--pyb-navy); }
aside.toc .toc-menu a.is-active {
  color: var(--pyb-green-700);
  font-weight: 600;
  border-left-color: var(--pyb-green) !important;
}

/* ==========================================================================
   Home page (index.adoc uses :page-role: home)
   ========================================================================== */
body.home aside.toc.sidebar,
body.home nav.pagination,
body.home aside.toc.embedded { display: none; }
body.home .toolbar .breadcrumbs,
body.home .toolbar .edit-this-page { visibility: hidden; }
@media screen and (min-width: 1024px) {
  body.home .doc { max-width: 64rem; margin: 0 auto; padding: 0 2.5rem; }
}

.pyb-hero {
  position: relative;
  overflow: hidden;
  margin: 1.75rem 0 0.5rem;
  padding: 3rem 2.75rem 2.75rem;
  border-radius: 16px;
  color: #fff;
  background:
    radial-gradient(circle at 92% -10%, rgba(51, 176, 92, 0.38), transparent 42%),
    radial-gradient(circle at 0% 120%, rgba(51, 176, 92, 0.16), transparent 45%),
    linear-gradient(135deg, var(--pyb-navy) 0%, var(--pyb-navy-900) 100%);
  box-shadow: var(--pyb-shadow-lg);
}
.pyb-hero::after {
  /* subtle grid texture */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 20%, #000 100%);
  pointer-events: none;
}
.pyb-hero > * { position: relative; z-index: 1; }
.doc .pyb-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9fe0b4;
}
.doc .pyb-hero-eyebrow::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--pyb-green);
  box-shadow: 0 0 0 4px rgba(51, 176, 92, 0.25);
}
.doc .pyb-hero h1.page {
  color: #fff;
  font-size: 2.6rem;
  margin: 0;
  max-width: 22ch;
}
.doc .pyb-hero-lead {
  margin: 0.9rem 0 0;
  max-width: 40rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.08rem;
  line-height: 1.65;
}
.pyb-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1.9rem;
}
.pyb-hero-search {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: min(24rem, 100%);
  padding: 0.7rem 0.8rem 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 0.9rem;
  text-align: left;
  cursor: text;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.pyb-hero-search:hover { background: rgba(255, 255, 255, 0.13); border-color: rgba(255, 255, 255, 0.3); }
.pyb-hero-search > span:nth-child(2) { flex: 1; }
.pyb-hero-search kbd {
  font: 500 0.72rem/1 var(--pyb-mono);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 0.2rem 0.4rem;
  color: #c4cddb;
}
.pyb-hero-search-ico {
  width: 1rem;
  height: 1rem;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='20' y1='20' x2='16.2' y2='16.2'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='20' y1='20' x2='16.2' y2='16.2'/%3E%3C/svg%3E") no-repeat center / contain;
}
.doc a.pyb-hero-link {
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
}
.doc a.pyb-hero-link::after { content: " \2192"; color: var(--pyb-green); }
.doc a.pyb-hero-link:hover { color: #9fe0b4; text-decoration: none; }

/* Section headings on the landing page */
body.home .doc h2 {
  border-bottom: none;
  font-size: 1.35rem;
  margin-top: 2.75rem;
  padding-bottom: 0;
}
body.home .doc h3 {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--pyb-muted);
  margin-top: 1.9rem;
}
body.home .doc .sect1 > .sectionbody > .paragraph:first-child p { color: var(--pyb-muted); }

/* ---------- Component cards ([.cards] unordered lists) ---------- */
.doc .ulist.cards > ul {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: 1rem;
  margin: 0.85rem 0 0;
  padding: 0;
  list-style: none;
}
.doc .ulist.cards > ul > li {
  position: relative;
  margin: 0;
  background: #fff;
  border: 1px solid var(--pyb-border);
  border-radius: 12px;
  padding: 1.2rem 1.25rem 1.25rem;
  box-shadow: var(--pyb-shadow-sm);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.doc .ulist.cards > ul > li::marker { content: none; }
.doc .ulist.cards > ul > li:hover {
  border-color: rgba(51, 176, 92, 0.55);
  box-shadow: var(--pyb-shadow-lg);
  transform: translateY(-2px);
}
.doc .ulist.cards > ul > li > p {
  margin: 0;
  color: var(--pyb-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}
.doc .ulist.cards > ul > li a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--pyb-navy);
  text-decoration: none;
}
/* Whole card is clickable */
.doc .ulist.cards > ul > li a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.doc .ulist.cards > ul > li:hover a { color: var(--pyb-green-700); }
/* Icon tile */
.doc .ulist.cards > ul > li a::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background:
    var(--card-ico, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333b05c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z'/%3E%3C/svg%3E")) no-repeat center / 1.25rem,
    var(--pyb-green-50);
  border: 1px solid var(--pyb-green-100);
  transition: background-color 0.18s ease;
}
/* Per-component icons, matched on the link target */
.doc .ulist.cards a[href*="automatic-uw-tool/"] { --card-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333b05c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.doc .ulist.cards a[href*="oppa/"] { --card-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333b05c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cline x1='19' y1='8' x2='19' y2='14'/%3E%3Cline x1='22' y1='11' x2='16' y2='11'/%3E%3C/svg%3E"); }
.doc .ulist.cards a[href*="internal-admin/"] { --card-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333b05c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1'/%3E%3C/svg%3E"); }
.doc .ulist.cards a[href*="actionstools-app/"] { --card-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333b05c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 11l3 3L22 4'/%3E%3Cpath d='M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11'/%3E%3C/svg%3E"); }
.doc .ulist.cards a[href*="morpheus/"] { --card-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333b05c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='16' rx='2'/%3E%3Crect x='9' y='9' width='6' height='6'/%3E%3Cpath d='M9 1v3M15 1v3M9 20v3M15 20v3M20 9h3M20 14h3M1 9h3M1 14h3'/%3E%3C/svg%3E"); }
.doc .ulist.cards a[href*="dialer-v2/"] { --card-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333b05c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.8 19.8 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.9.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E"); }
.doc .ulist.cards a[href*="supplier-client/"] { --card-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333b05c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m19 9-5 5-4-4-3 3'/%3E%3C/svg%3E"); }

/* ==========================================================================
   Footer
   ========================================================================== */
footer.footer.pyb-footer {
  background: var(--pyb-navy);
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.82rem;
  padding: 0;
  border-top: 3px solid var(--pyb-green);
  position: relative;
  z-index: 1;
}
.pyb-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem 3rem;
  max-width: 76rem;
  margin: 0 auto;
  padding: 2.25rem 2rem 1.5rem;
}
.pyb-footer-brand .pyb-logo { height: 24px; width: auto; display: block; }
.pyb-footer-brand p { margin: 0.85rem 0 0; max-width: 28rem; line-height: 1.6; }
.pyb-footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.75rem; padding-top: 0.2rem; }
.pyb-footer .pyb-footer-links a { color: rgba(255, 255, 255, 0.86); text-decoration: none; font-weight: 500; }
.pyb-footer .pyb-footer-links a:hover { color: #9fe0b4; }
.pyb-footer-legal {
  max-width: 76rem;
  margin: 0 auto;
  padding: 1rem 2rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Small screens
   ========================================================================== */
@media screen and (max-width: 768px) {
  .doc h1.page { font-size: 1.8rem; }
  .pyb-hero { padding: 2rem 1.4rem; border-radius: 12px; margin-top: 1rem; }
  .doc .pyb-hero h1.page { font-size: 2rem; }
  .pyb-hero-search { min-width: 100%; }
  .pyb-footer-inner, .pyb-footer-legal { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* Print: keep it clean */
@media print {
  .pyb-hero { background: none; color: var(--pyb-ink); box-shadow: none; padding: 0; }
  .doc .pyb-hero h1.page, .doc .pyb-hero-lead { color: var(--pyb-ink); }
  .pyb-hero-actions, .pyb-hero::after { display: none; }
  .doc pre.highlight > code, .doc .listingblock pre:not(.highlight) { background: #f6f8fb; color: var(--pyb-ink); }
}
