/* ==========================================================================
   Email Sleuth — Help Scout Docs custom CSS
   Paste into: Help Scout → Manage → Docs → (your site) → Custom Code → CSS.

   Brand v3.0, light context (design/brand_guidelines.html). The dark
   brand-deep green is reserved for the header + hero band; body is the
   light reading surface. Green is rationed: links, one hero, active states.
   Matte shadows only, no gradients, no glow.

   Also set (outside this CSS):
   - Docs site "brand color" setting: #05291B  (covers bits CSS can't reach)
   - Beacon appearance color: #06B86A
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
  --es-bg: #F2F5F1;
  --es-surface: #FFFFFF;
  --es-surface-2: #F6F8F5;
  --es-ink: #0B0F0D;
  --es-ink-2: #39423D;
  --es-ink-3: #69736D;
  --es-ink-4: #97A09A;
  --es-line: #E2E7E2;
  --es-line-2: #EDF1EC;
  --es-line-3: #D3DAD3;
  --es-brand: #06B86A;
  --es-brand-strong: #07854A;
  --es-brand-ink: #047A47;   /* AA on white — use for text/links */
  --es-brand-deep: #05291B;  /* header/hero band */
  --es-brand-tint: #E2F8ED;
  --es-risky-tint: #FCF1DC;
  --es-risky-ink: #9A5B05;
  --es-sans: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --es-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
  --es-radius: 12px;
  --es-radius-sm: 8px;
  --es-shadow: 0 1px 2px rgba(11, 15, 13, 0.06), 0 2px 8px rgba(11, 15, 13, 0.04);
}

/* ---------- Base ---------- */

body {
  background: var(--es-bg);
  color: var(--es-ink-2);
  font-family: var(--es-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--es-brand-ink); }
a:hover { color: var(--es-brand-strong); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--es-sans);
  color: var(--es-ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

::selection { background: var(--es-brand-tint); }

:focus-visible {
  outline: 2px solid var(--es-brand);
  outline-offset: 2px;
}

/* ---------- Top navigation ---------- */

#mainNav .navbar-inner,
.navbar-inner {
  background: var(--es-brand-deep);
  border: 0;
  box-shadow: none;
  filter: none; /* kill Bootstrap 2 gradient */
}

#mainNav .brand,
.navbar .brand {
  color: #ECF3EE;
  font-family: var(--es-sans);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: none;
}

/* The uploaded logo lockup renders at native size by default — pin it */
.navbar .brand img,
#mainNav .brand img {
  height: 40px;
  width: auto;
  display: block;
}

#mainNav .nav > li > a,
.navbar .nav > li > a {
  color: rgba(236, 243, 238, 0.85);
  font-weight: 500;
  text-shadow: none;
}

#mainNav .nav > li > a:hover,
#mainNav .nav > li.active > a,
.navbar .nav > li > a:hover { color: #FFFFFF; background: transparent; }

/* Contact link as a quiet pill */
#mainNav .contactUs a,
.navbar .contactUs a {
  border: 1px solid rgba(236, 243, 238, 0.35);
  border-radius: 999px;
  padding: 6px 16px;
  color: #ECF3EE;
}
#mainNav .contactUs a:hover {
  background: rgba(236, 243, 238, 0.12);
  text-decoration: none;
}

/* Mobile collapse button */
.navbar .btn-navbar {
  background: transparent;
  border-color: rgba(236, 243, 238, 0.35);
  box-shadow: none;
  filter: none;
}

/* ---------- Search (home hero + collection pages) ---------- */

/* Home hero only — #searchBar also exists as the small form on inner-page
   sidebars, so never paint it directly. */
#docsSearch {
  background: var(--es-brand-deep);
  border: 0;
}

#docsSearch h1 {
  color: #ECF3EE;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Keep the theme's input geometry (50px, absolute button); restyle surface */
#searchBar .search-query,
#sidebar form .search-query,
input.search-query {
  background: #FFFFFF;
  border: 1.5px solid transparent;
  border-radius: var(--es-radius-sm);
  box-shadow: var(--es-shadow);
  color: var(--es-ink);
  font-family: var(--es-sans);
}
#searchBar .search-query:focus,
#sidebar form .search-query:focus,
input.search-query:focus {
  border-color: var(--es-brand);
  box-shadow: 0 0 0 3px rgba(6, 184, 106, 0.25);
  outline: none;
}

/* The theme spaces the hero form with `padding: 2em 0` and pins its button
   at top:24px — that only lines up at the theme's 12px base font (2em=24px).
   Our 16px base inflates the padding to 32px and leaves the button riding
   8px high, so fix the padding in pixels to match the button. */
#docsSearch #searchBar { padding: 24px 0; }

/* Hero search button. The theme positions it absolutely as the right half
   of the 50px input (top:24px, right:-1px, height:50px) — change ONLY
   colors/type; overriding its geometry breaks the alignment. */
#searchBar button {
  background: var(--es-brand);
  border: 0;
  border-radius: 0 var(--es-radius-sm) var(--es-radius-sm) 0;
  color: var(--es-brand-deep);
  font-family: var(--es-sans);
  font-weight: 700;
  text-shadow: none;
}
#searchBar button:hover {
  background: var(--es-brand-strong);
  color: #FFFFFF;
}
/* The compact `.sm` variant (collection/article pages) is an icon-only
   button on a light background — keep it transparent like the theme. */
#searchBar.sm button, #searchBar.sm button:hover {
  background: transparent;
  color: var(--es-ink-3);
}

/* Generic primary buttons elsewhere (e.g. contact form submit) */
.btn-primary {
  background: var(--es-brand-strong);
  border: 0;
  border-radius: var(--es-radius-sm);
  box-shadow: none;
  color: #FFFFFF;
  font-family: var(--es-sans);
  font-weight: 600;
  text-shadow: none;
  filter: none; /* kill Bootstrap 2 gradient */
}
.btn-primary:hover { background: var(--es-brand-ink); color: #FFFFFF; }

/* Search results dropdown */
#serp-dd {
  background: var(--es-surface);
  border: 1px solid var(--es-line);
  border-radius: var(--es-radius-sm);
  box-shadow: 0 8px 24px rgba(11, 15, 13, 0.12);
}
#serp-dd .result { border-color: var(--es-line-2); }
#serp-dd .result a { color: var(--es-ink); }
#serp-dd .result a:hover,
#serp-dd .result.sel { background: var(--es-surface-2); }

/* ---------- Homepage collection cards ---------- */

.collection {
  background: var(--es-surface);
  border: 1px solid var(--es-line);
  border-radius: var(--es-radius);
  box-shadow: var(--es-shadow);
  transition: border-color 140ms ease, transform 140ms ease;
}
.collection:hover {
  border-color: var(--es-line-3);
  transform: translateY(-2px);
}

/* Titles stay ink — green is for the hover moment, not resting state */
.collection-head h2, .collection-head h3,
.collection a h2, .collection a h3,
.collection-head a { color: var(--es-ink); font-weight: 700; }
.collection a { text-decoration: none; }
.collection:hover .collection-head h2,
.collection:hover .collection-head h3,
.collection:hover .collection-head a { color: var(--es-brand-ink); }
.collection-body, .collection p { color: var(--es-ink-3); }

/* Article counts / meta read as data → mono, muted */
.collection .sm, .lu, .sb {
  font-family: var(--es-mono);
  font-size: 12px;
  color: var(--es-ink-4);
}

/* Popular articles block */
.popArticles { border-color: var(--es-line); }
.popArticles a { color: var(--es-brand-ink); }

/* ---------- Collection page: sidebar + article list ---------- */

#sidebar .nav-list > li > a {
  color: var(--es-ink-2);
  border-radius: var(--es-radius-sm);
  text-shadow: none;
}
#sidebar .nav-list > li > a:hover {
  background: var(--es-surface-2);
  color: var(--es-ink);
}
#sidebar .nav-list > li.active > a {
  background: var(--es-brand-tint);
  color: var(--es-brand-ink);
  box-shadow: none;
  font-weight: 600;
}

#contentArea {
  background: var(--es-surface);
  border: 1px solid var(--es-line);
  border-radius: var(--es-radius);
  box-shadow: var(--es-shadow);
}

.articleList li { border-bottom: 1px solid var(--es-line-2); }
.articleList li:last-child { border-bottom: 0; }
.articleList a {
  color: var(--es-ink);
  font-weight: 500;
  text-decoration: none;
}
.articleList a:hover { color: var(--es-brand-ink); }
.articleList .icon-article-doc { opacity: 0.55; }

/* ---------- Article page ---------- */

#fullArticle { color: var(--es-ink-2); }

#fullArticle h1.title,
#fullArticle .title {
  color: var(--es-ink);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

#fullArticle h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 2em;
  color: var(--es-ink);
}
#fullArticle h3 { font-size: 18px; font-weight: 600; color: var(--es-ink); }

#fullArticle p, #fullArticle li { font-size: 16px; line-height: 1.7; }
#fullArticle strong { color: var(--es-ink); }
#fullArticle img {
  border: 1px solid var(--es-line);
  border-radius: var(--es-radius-sm);
  box-shadow: var(--es-shadow);
}

/* Callouts (blockquotes) — quiet surface, brand accent edge */
#fullArticle blockquote {
  background: var(--es-surface-2);
  border-left: 3px solid var(--es-brand-strong);
  border-radius: 0 var(--es-radius-sm) var(--es-radius-sm) 0;
  padding: 14px 18px;
  margin: 1.5em 0;
  color: var(--es-ink-2);
  font-size: 15.5px;
}
#fullArticle blockquote p { margin: 0; }

/* Code — the product's voice is mono */
code, .inline-code, pre {
  font-family: var(--es-mono);
  font-size: 0.88em;
}
code, .inline-code {
  background: var(--es-surface-2);
  border: 1px solid var(--es-line);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--es-ink);
}
pre {
  background: var(--es-surface-2);
  border: 1px solid var(--es-line);
  border-radius: var(--es-radius-sm);
  padding: 14px 16px;
  line-height: 1.6;
}
pre code { background: transparent; border: 0; padding: 0; }

/* Tables (plans, top-up packs) */
#fullArticle table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
#fullArticle th {
  font-family: var(--es-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--es-ink-3);
  text-align: left;
  border-bottom: 1px solid var(--es-line-3);
  padding: 8px 12px;
}
#fullArticle td {
  border-bottom: 1px solid var(--es-line-2);
  padding: 10px 12px;
  font-variant-numeric: tabular-nums;
}

/* Article footer: dates + ratings */
.articleFoot {
  border-top: 1px solid var(--es-line-2);
  color: var(--es-ink-4);
  font-family: var(--es-mono);
  font-size: 12px;
}

.articleRatings {
  background: var(--es-surface-2);
  border: 1px solid var(--es-line);
  border-radius: var(--es-radius);
}
.articleRatings-question { color: var(--es-ink-2); font-weight: 600; }
.rateAction {
  border-radius: var(--es-radius-sm);
  transition: transform 120ms ease;
}
.rateAction:hover { transform: scale(1.06); }

.printArticle { color: var(--es-ink-4); }
.printArticle:hover { color: var(--es-ink-2); }

/* ---------- Contact block ---------- */

#contact .btn, #sbContact .btn, .contactUs .btn {
  background: var(--es-brand-strong);
  border: 0;
  border-radius: var(--es-radius-sm);
  box-shadow: var(--es-shadow);
  color: #FFFFFF;
  font-family: var(--es-sans);
  font-weight: 600;
  text-shadow: none;
  filter: none;
}
#contact .btn:hover, #sbContact .btn:hover, .contactUs .btn:hover {
  background: var(--es-brand-ink);
  color: #FFFFFF;
}

/* ---------- Small screens ---------- */

@media (max-width: 767px) {
  body { font-size: 15.5px; }
  #contentArea { border-radius: var(--es-radius-sm); }
}
