/* ChartRequest Knowledge Base - home refresh (Help Scout Docs "Upload stylesheet")
   Brand blue #4062E5. Neutrals reuse the site's existing greys.
   Scoped with `body` / ids to out-rank Help Scout's inline Customize <style>. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

:root {
  --cr-blue: #4062E5;
  --cr-blue-soft: rgba(64, 98, 229, 0.06);
  --cr-blue-ring: rgba(64, 98, 229, 0.18);
  --cr-text: #333333;
  --cr-text-2: #585858;
  --cr-border: #e0e0e0;
  --cr-radius: 10px;
}

body {
  font-family: Inter, "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Links: one blue everywhere ---------- */
body .collection a,
body .contentWrapper a,
body #fullArticle strong a,
body #fullArticle a strong,
body .most-pop-articles .popArticles a,
body .most-pop-articles .popArticles a:hover span,
body #serp-dd .result a:hover,
body #serp-dd .result > li.active {
  color: var(--cr-blue);
}

/* ---------- Header / nav ---------- */
body #mainNav {
  position: sticky;
  top: 0;
  z-index: 50;
}
body #mainNav .navbar-inner {
  background: #fff;
  background-image: none;
  border-bottom: 1px solid var(--cr-border);
  box-shadow: none;
}
body .navbar .brand img { width: 170px !important; height: auto; display: block; }
body .navbar .nav li a .caret { display: none; }

@media (min-width: 980px) {
  body #mainNav .container-fluid {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
  }
  body #mainNav .brand { padding: 14px 0; margin: 0; flex: none; }
  body #mainNav .nav-collapse { flex: 1; height: auto !important; overflow: visible; margin: 0; padding: 0; align-self: center; }
  body #mainNav nav { margin: 0; padding: 0; }
  body #mainNav .nav {
    position: static; /* Help Scout sets absolute, which pulls it out of the flex row */
    float: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 2px;
    margin: 0;
  }
  body #mainNav .nav > li { float: none; }
  body #mainNav .nav > li > a {
    padding: 8px 10px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    color: var(--cr-text);
    text-shadow: none;
    transition: background .15s, color .15s;
  }
  body #mainNav .nav > li > a:hover,
  body #mainNav .nav > li > a:focus {
    background: var(--cr-blue-soft);
    color: var(--cr-blue);
  }
}

/* ---------- Hero + search ---------- */
body #docsSearch {
  background: var(--cr-blue-soft);
  border-bottom: 1px solid var(--cr-border);
  margin: 0 -20px 8px;
  padding: 56px 20px 52px;
}
body #docsSearch h1 {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--cr-text);
  margin: 0;
  padding: 0;
}
body #searchBar {
  position: relative;
  width: min(680px, 100%);
  margin: 28px auto 0;
  padding: 0;
}
body #searchBar .search-query {
  height: 56px;
  margin: 0;
  padding: 0 130px 0 20px;
  font-size: 16px;
  line-height: 22px;
  border: 1px solid var(--cr-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color .15s, box-shadow .15s;
}
body #searchBar .search-query:focus {
  outline: none;
  border-color: var(--cr-blue);
  box-shadow: 0 0 0 4px var(--cr-blue-ring);
}
body #serp-dd { top: 62px; border-radius: 12px; overflow: hidden; }

@media (min-width: 769px) {
  body #searchBar button {
    top: 6px;
    right: 6px;
    height: 44px;
    padding: 0 22px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    text-shadow: none;
    background: var(--cr-blue);
    border: 0;
    border-radius: 8px;
    transition: filter .15s;
  }
  body #searchBar button:hover { background: var(--cr-blue); filter: brightness(0.92); }
}
@media (max-width: 768px) {
  body #docsSearch h1 { font-size: 26px; }
  body #searchBar .search-query { padding-right: 56px; }
  body #searchBar button { top: 6px; right: 4px; height: 44px; }
  body #searchBar button .icon-search { color: var(--cr-blue); }
}

/* ---------- Collection rows ---------- */
body #contentArea { max-width: 1120px; margin: 0 auto; }

body .collection-category {
  padding: 28px 0 32px;
  border-top: 1px solid var(--cr-border);
}
body .collection-category:first-of-type { border-top: 0; }

body .collection-category h2 {
  margin: 0 0 16px;
  padding: 0;
  text-align: left;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
body .collection-category h2 a { color: var(--cr-text); border: 0; }
body .collection-category h2 a:hover { color: var(--cr-blue); border: 0; }

@media (min-width: 900px) {
  body .collection-category {
    display: grid;
    grid-template-columns: 220px 1fr;
    column-gap: 32px;
    align-items: start;
  }
  body .collection-category h2 { margin: 4px 0 0; }
}

/* Collections with no categories on the home page: compact link row */
body .collection-category:not(:has(.category)) { padding: 18px 0; }
body .collection-category:not(:has(.category)) h2 { margin: 0; }
body .collection-category:not(:has(.category)) h2 a::after {
  content: " \2192";
  color: var(--cr-blue);
}

/* ---------- Category cards ---------- */
body .collection-category .category-list,
body .category-list.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin: 0;
  text-align: left;
}
body .category-list .category,
body .category-list.two-col .category {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  width: auto !important;
  height: auto !important; /* beats the legacy Headers rule (height:125px !important) */
  min-height: 80px;
  margin: 0 !important;
  padding: 16px 44px 16px 18px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--cr-border);
  border-radius: var(--cr-radius);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
body .category-list .category:hover,
body .category-list .category:focus-visible {
  background: #fff;
  border-color: var(--cr-blue);
  box-shadow: 0 2px 10px var(--cr-blue-ring);
  outline: none;
}
body .category-list .category::after {
  content: "\2192";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translate(-4px, -50%);
  color: var(--cr-blue);
  font-size: 16px;
  opacity: 0;
  transition: opacity .15s, transform .15s;
}
body .category-list .category:hover::after,
body .category-list .category:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}
body .category-list h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--cr-text);
}
body .category-list .category p:empty { display: none; }
body .category-list .category p { margin: 4px 0 0; font-size: 13px; color: var(--cr-text-2); }
body .category-list .category .article-count {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 18px;
  color: var(--cr-text-2);
}
body .category-list .category:hover .article-count { color: var(--cr-blue); }

/* ---------- Footer ---------- */
body footer.center { padding: 24px 0 8px; }
body footer.center p { font-size: 12px; color: var(--cr-text-2); }
body footer.center a { color: var(--cr-text-2); text-decoration: underline; }

/* Narrow desktop / small laptop: keep all nav links on one row */
@media (min-width: 980px) and (max-width: 1199px) {
  body #mainNav .nav > li > a { padding: 8px 6px; font-size: 12px; }
  body #mainNav .container-fluid { gap: 8px; }
  body .navbar .brand img { width: 150px !important; }
}

/* ---------- Sidebar search (article / category / search pages) ---------- */
body #searchBar.sm {
  width: 100%;
  margin: 0 0 30px;
}
body #searchBar.sm .search-query {
  height: 44px;
  padding: 0 52px 0 14px;
  font-size: 14px;
  border-radius: 10px;
  margin: 0;
}
body #searchBar.sm button {
  top: 4px;
  right: 4px;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 8px;
  background: var(--cr-blue);
  border: 0;
  filter: none;
}
body #searchBar.sm button:hover { background: var(--cr-blue); filter: brightness(0.92); }
body #searchBar.sm button .icon-search { display: block; color: #fff; line-height: 36px; }
body #searchBar.sm button span { display: none; }
body #serp-dd.sb { top: 48px; }

/* ---------- Search dropdown rows ---------- */
body #serp-dd .result { padding: 6px; margin: 0; }
body #serp-dd .result > li,
body #serp-dd .result > li:first-child,
body #serp-dd .result > li:last-child {
  margin: 0;
  border-radius: 8px;
  background: transparent;
}
body #serp-dd .result > li a {
  padding: 9px 12px;
  color: var(--cr-text);
  background: transparent;
  border-radius: 8px;
}
/* Help Scout paints li.active grey; replace it with a clean brand tint */
body #serp-dd .result > li:hover,
body #serp-dd .result > li.active {
  background: var(--cr-blue-soft);
}
body #serp-dd .result > li:hover a,
body #serp-dd .result > li.active a {
  color: var(--cr-blue);
  background: transparent;
}

/* ---------- Page titles (category, article, search results) ---------- */
body .contentWrapper h1,
body #fullArticle h1.title,
body #categoryHead h1 {
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--cr-text);
}

/* ---------- Article body text: darker for readability (7.1:1 -> 12.6:1) ---------- */
body #fullArticle,
body #fullArticle p,
body #fullArticle ul,
body #fullArticle ol,
body #fullArticle li,
body #fullArticle div,
body #fullArticle blockquote,
body #fullArticle dd,
body #fullArticle table {
  color: var(--cr-text);
}

/* ---------- Article readability: 16px text, ~70 chars per line ----------
   Only text blocks are capped; images, tables and embedded widgets keep full width. */
body #fullArticle p,
body #fullArticle li {
  font-size: 16px;
  line-height: 1.65;
}
body #fullArticle p,
body #fullArticle ul,
body #fullArticle ol,
body #fullArticle blockquote,
body #fullArticle h2,
body #fullArticle h3,
body #fullArticle h4 {
  max-width: 680px;
}
body #fullArticle li { margin-bottom: 6px; }
