/* ==========================================================================
   Atobi Help Center — HelpScout Docs custom stylesheet
   Direction: Intercom-style home (hero + card grid), Linear-style reading
   (neutral greys, hairline borders, tight type, generous whitespace).
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,500;12..96,600;12..96,700&family=Inter:wght@400;500;600&display=swap');

:root {
  --ink: #18181b;          /* headings, primary text */
  --ink-2: #3f3f46;        /* body text */
  --muted: #71717a;        /* secondary text */
  --faint: #a1a1aa;        /* meta, placeholders */
  --line: #e9e9ec;         /* hairline borders */
  --surface: #fafafa;      /* subtle fills */
  --surface-2: #f4f4f5;    /* hover fills */
  --accent: #f5603e;       /* Atobi orange — buttons, focus, highlights */
  --accent-hover: #e3431f;
  --accent-text: #c4401f;  /* orange dark enough for text on white (AA) */
  --accent-soft: #fff1ec;
  --radius: 12px;
  --radius-sm: 8px;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Bricolage Grotesque', var(--font-body);
  --shadow-sm: 0 1px 2px rgba(24, 24, 27, .04);
  --shadow-md: 0 1px 2px rgba(24, 24, 27, .04), 0 8px 24px -8px rgba(24, 24, 27, .10);
}

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

body {
  background: #fff;
  color: var(--ink-2);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent-text); }
a:hover { color: var(--accent-hover); }

::selection { background: var(--accent-soft); color: var(--ink); }

/* ---------- Top nav ---------- */

#mainNav .navbar-inner {
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.navbar .brand { padding: 14px 0; }
.navbar .brand img { height: 36px; width: auto; }
.navbar .nav li a {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}
.navbar .nav li a:hover { color: var(--ink); }

/* ---------- Home hero + search ---------- */

#docsSearch {
  background: #fff;
  border-bottom: 1px solid var(--line);
  margin-bottom: 56px;
  padding: 72px 20px 64px;
  top: 0;
}
#docsSearch h1 {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 8px;
}

#searchBar {
  width: 100%;
  max-width: 640px;
  padding: 24px 0 0;
}
#searchBar .search-query {
  height: 56px;
  padding: 0 128px 0 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  transition: border-color .15s, box-shadow .15s;
}
#searchBar .search-query::placeholder { color: var(--faint); }
#searchBar .search-query:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 96, 62, .15), var(--shadow-md);
  outline: none;
}
#searchBar button {
  top: 32px;
  right: 8px;
  height: 40px;
  padding: 0 18px;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  text-shadow: none;
  transition: background .15s;
}
#searchBar button:hover { background: var(--accent-hover); }

/* Live search dropdown */
#serp-dd {
  top: calc(100% + 6px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
#serp-dd .result a {
  padding: 10px 16px;
  font-size: 14px;
  color: var(--ink-2);
}
#serp-dd .result a:hover,
#serp-dd .result > li.active { background: var(--surface-2); color: var(--ink); }

/* Sidebar search (category/article pages) */
#searchBar.sm { padding: 0; margin-bottom: 28px; }
#searchBar.sm .search-query,
#sidebar form .search-query {
  height: 38px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: none;
  font-size: 14px;
  background: var(--surface);
}
#sidebar form .search-query:focus {
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 96, 62, .15);
}
#searchBar.sm button,
#sidebar form button {
  top: 11px;
  right: 12px;
  height: auto;
  padding: 0;
  background: none;
  color: var(--faint);
}
#searchBar.sm #serp-dd { top: 44px; }

/* ---------- Home category grid (Intercom/Linear cards) ---------- */

.category-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 1080px;
  margin: 0 auto 64px;
}
.category-list .category {
  display: flex;
  flex-direction: column;
  width: auto;
  margin: 0;
  padding: 0 0 24px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s, background .15s;
}
.category-list .category:hover {
  background: var(--surface);
  border-color: #d4d4d8;
  text-decoration: none;
}

/* Icon zone: icon tile top-left, hairline divider underneath */
.category-list .category::before {
  content: '';
  display: block;
  height: 112px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  background-repeat: no-repeat;
  background-position: 24px 24px;
  background-size: 44px 44px;
}

.category-list h3 {
  margin: 0 24px 8px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}
.category-list .category p {
  margin: 0 24px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.category-list .category .article-count,
.category-list .category:hover .article-count {
  margin-top: auto;
  padding-top: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--faint);
}

/* Category icons (Lucide, ISC licence). Keyed to HelpScout category ids —
   add a line here when a new category is created, otherwise it gets the fallback. */
/* fallback for new categories */
.category-list .category::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><rect width='44' height='44' rx='10' fill='%23f4f3f0'/><g transform='translate%2812 12%29 scale%28.8333%29' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/><path d='M14 2v6h6'/><path d='M16 13H8'/><path d='M16 17H8'/></g></svg>"); }
/* Content Creation */
.category-list #category-134::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><rect width='44' height='44' rx='10' fill='%23f4f3f0'/><g transform='translate%2812 12%29 scale%28.8333%29' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 20h9'/><path d='M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z'/></g></svg>"); }
/* Platform Settings */
.category-list #category-330::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><rect width='44' height='44' rx='10' fill='%23f4f3f0'/><g transform='translate%2812 12%29 scale%28.8333%29' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><line x1='21' x2='14' y1='4' y2='4'/><line x1='10' x2='3' y1='4' y2='4'/><line x1='21' x2='12' y1='12' y2='12'/><line x1='8' x2='3' y1='12' y2='12'/><line x1='21' x2='16' y1='20' y2='20'/><line x1='12' x2='3' y1='20' y2='20'/><line x1='14' x2='14' y1='2' y2='6'/><line x1='8' x2='8' y1='10' y2='14'/><line x1='16' x2='16' y1='18' y2='22'/></g></svg>"); }
/* Engagement & Rewards */
.category-list #category-296::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><rect width='44' height='44' rx='10' fill='%23f4f3f0'/><g transform='translate%2812 12%29 scale%28.8333%29' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='6'/><path d='M15.477 12.89 17 22l-5-3-5 3 1.523-9.11'/></g></svg>"); }
/* Best Practices */
.category-list #category-300::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><rect width='44' height='44' rx='10' fill='%23f4f3f0'/><g transform='translate%2812 12%29 scale%28.8333%29' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5'/><path d='M9 18h6'/><path d='M10 22h4'/></g></svg>"); }
/* FAQ & Support */
.category-list #category-106::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><rect width='44' height='44' rx='10' fill='%23f4f3f0'/><g transform='translate%2812 12%29 scale%28.8333%29' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><path d='M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3'/><path d='M12 17h.01'/></g></svg>"); }
/* Member Management */
.category-list #category-4::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><rect width='44' height='44' rx='10' fill='%23f4f3f0'/><g transform='translate%2812 12%29 scale%28.8333%29' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/><circle cx='9' cy='7' r='4'/><path d='M22 21v-2a4 4 0 0 0-3-3.87'/><path d='M16 3.13a4 4 0 0 1 0 7.75'/></g></svg>"); }
/* Dashboards */
.category-list #category-81::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><rect width='44' height='44' rx='10' fill='%23f4f3f0'/><g transform='translate%2812 12%29 scale%28.8333%29' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 3v18h18'/><path d='M18 17V9'/><path d='M13 17V5'/><path d='M8 17v-3'/></g></svg>"); }
/* External Distribution */
.category-list #category-144::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><rect width='44' height='44' rx='10' fill='%23f4f3f0'/><g transform='translate%2812 12%29 scale%28.8333%29' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='18' cy='5' r='3'/><circle cx='6' cy='12' r='3'/><circle cx='18' cy='19' r='3'/><line x1='8.59' x2='15.42' y1='13.51' y2='17.49'/><line x1='15.41' x2='8.59' y1='6.51' y2='10.49'/></g></svg>"); }
/* Security & Privacy */
.category-list #category-58::before { background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><rect width='44' height='44' rx='10' fill='%23f4f3f0'/><g transform='translate%2812 12%29 scale%28.8333%29' fill='none' stroke='%2318181b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect width='18' height='11' x='3' y='11' rx='2' ry='2'/><path d='M7 11V7a5 5 0 0 1 10 0v4'/></g></svg>"); }

/* ---------- Page shell (category, article, search) ---------- */

#contentArea { max-width: 1160px; margin: 0 auto; }
#main-content { background: none; padding: 0; }

.contentWrapper {
  background: transparent;
  border: 0;
  padding: 40px 0 40px 56px;
  min-height: 0;
  color: var(--ink-2);
}
.contentWrapper p { color: var(--ink-2); }

/* ---------- Sidebar (Linear-style) ---------- */

#sidebar { margin-top: 40px; }
#sidebar h3 {
  margin: 0 0 8px;
  padding: 0 10px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--faint);
}
#sidebar .nav-list { margin: 0 0 32px; }
#sidebar .nav-list li { margin: 1px 0; }
#sidebar .nav-list a {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 20px;
  color: var(--muted);
  transition: background .12s, color .12s;
}
#sidebar .nav-list a:hover,
#sidebar .nav-list a:focus { background: var(--surface-2); color: var(--ink); }
#sidebar .nav-list .active a,
#sidebar .nav-list .active a:hover,
#sidebar .nav-list .active a:focus {
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 500;
}
#sidebar .nav-list .icon-arrow,
#sidebar .nav-list .active a .icon-arrow { display: none; }

/* ---------- Category page ---------- */

#categoryHead { margin-bottom: 24px; }
#categoryHead h1,
.contentWrapper h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
.contentWrapper p.descrip { font-size: 16px; color: var(--muted); margin: 8px 0 16px; }
#categoryHead .sort select {
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  color: var(--muted);
  background: #fff;
}

.articleList { margin: 0 0 40px; font-size: 16px; border-top: 1px solid var(--line); }
.articleList li { margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.articleList a {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 14px 8px;
  color: var(--ink);
  font-weight: 500;
  transition: background .12s;
}
.articleList a:hover { background: var(--surface); text-decoration: none; }
.articleList a:hover span { text-decoration: none; color: var(--accent-text); }
.articleList .icon-article-doc { display: none; }
.articleList a::after {
  content: '→';
  margin-left: auto;
  padding-left: 16px;
  color: var(--faint);
  transition: transform .15s, color .15s;
}
.articleList a:hover::after { color: var(--accent-text); transform: translateX(3px); }

/* Search results page */
#serp .articleList > li { padding: 0; }
#serp .articleList > li a { font-size: 16px; margin: 0; display: flex; }
#serp .articleList > li p { padding: 0 8px 14px; margin: -6px 0 0; font-size: 14px; color: var(--muted); }

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

#fullArticle {
  max-width: 720px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
}
#fullArticle p,
#fullArticle ul,
#fullArticle ol,
#fullArticle li,
#fullArticle div,
#fullArticle blockquote,
#fullArticle dd,
#fullArticle table { color: var(--ink-2); }
#fullArticle p { margin: 0 0 1.1em; }

#fullArticle .title {
  margin: 0 40px 24px 0;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--ink);
}
#fullArticle h2 {
  margin: 48px 0 12px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--ink);
}
#fullArticle h3 {
  margin: 32px 0 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ink);
}
#fullArticle h4 {
  margin: 24px 0 6px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}
#fullArticle h2[id],
#fullArticle h3[id] { scroll-margin-top: 88px; }

#fullArticle strong, #fullArticle b { font-weight: 600; color: var(--ink); }

#fullArticle a,
#fullArticle strong a,
#fullArticle a strong,
#fullArticle a b {
  color: var(--accent-text);
  text-decoration: underline;
  text-decoration-color: rgba(196, 64, 31, .3);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: text-decoration-color .15s;
}
#fullArticle a:hover { text-decoration-color: currentColor; }

#fullArticle ul,
#fullArticle ol { margin: 0 0 1.2em 1.4em; }
#fullArticle li { margin-bottom: .35em; }
#fullArticle li::marker { color: var(--faint); }

#fullArticle hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

#fullArticle img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

#fullArticle blockquote {
  margin: 0 0 1.4em;
  padding: 2px 0 2px 16px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 16px;
}

#fullArticle code {
  padding: 2px 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: .875em;
  color: var(--ink);
}
#fullArticle pre {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 14px;
}
#fullArticle pre code { padding: 0; background: none; border: 0; }

/* Tables */
#fullArticle table {
  width: 100%;
  margin: 0 0 1.6em;
  border: 1px solid var(--line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 14px;
  line-height: 1.55;
}
#fullArticle table th,
#fullArticle table td {
  padding: 10px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
#fullArticle table th {
  background: var(--surface);
  font-weight: 600;
  color: var(--ink);
}
#fullArticle table tr:last-child td { border-bottom: 0; }

/* Callouts — soft fill, hairline border, no heavy left bar */
#fullArticle .callout,
#fullArticle .callout-blue,
#fullArticle .callout-green,
#fullArticle .callout-red,
#fullArticle .callout-yellow,
#fullArticle .private-note {
  margin: 0 0 1.6em;
  padding: 14px 18px;
  border: 1px solid;
  border-radius: var(--radius-sm);
  font-size: 15px;
  line-height: 1.6;
}
#fullArticle .callout p,
#fullArticle .callout-blue p,
#fullArticle .callout-green p,
#fullArticle .callout-red p,
#fullArticle .callout-yellow p,
#fullArticle .private-note p { font-size: 15px; margin-bottom: .5em; }
#fullArticle .callout ul,
#fullArticle .callout-blue ul,
#fullArticle .callout-green ul,
#fullArticle .callout-red ul,
#fullArticle .callout-yellow ul { margin-bottom: 0; }

#fullArticle .callout        { background: var(--surface); border-color: var(--line); }
#fullArticle .callout-yellow { background: #fffbeb; border-color: #fbe7a6; }
#fullArticle .callout-blue   { background: #f0f6ff; border-color: #cfe0fb; }
#fullArticle .callout-green  { background: #effbf3; border-color: #c4ebd2; }
#fullArticle .callout-red    { background: #fff3f1; border-color: #fbd0c7; }

/* Print icon — quieter */
#fullArticle .printArticle { color: var(--faint); opacity: .6; transition: opacity .15s; }
#fullArticle .printArticle:hover { opacity: 1; }

/* Article footer + related */
.articleFoot {
  max-width: 720px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.articleFoot p,
.articleFoot time {
  font-family: var(--font-body);
  font-style: normal;
  font-size: 13px;
  color: var(--faint);
}

.related {
  max-width: 720px;
  margin: 8px 0 0 56px;
  padding: 24px 0 0;
  background: transparent;
  border: 0;
}
.related h3 {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--faint);
}
.related ul { margin: 0; padding: 8px 0 0; }
.related ul > li { padding: 0; }
.related ul > li a {
  display: block;
  margin: 0;
  padding: 8px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
}
.related ul > li a:hover span { text-decoration: none; color: var(--accent-text); }
.related .icon-article-doc { display: none; }

/* ---------- Footer ---------- */

footer {
  margin-top: 48px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  text-align: center;
}
footer p { font-size: 13px; color: var(--faint); }
footer a { color: var(--muted); }

/* ---------- Responsive ---------- */

@media (max-width: 979px) {
  .category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 20px; }
  .contentWrapper { padding: 32px 0; }
  .related { margin-left: 0; }
}
@media (max-width: 767px) {
  #docsSearch { padding: 48px 20px 40px; margin-bottom: 32px; }
  #docsSearch h1 { font-size: 32px; }
  #searchBar .search-query { padding-right: 20px; }
  #searchBar button { display: none; }
  .category-list { grid-template-columns: 1fr; gap: 12px; }
  #fullArticle .title { font-size: 30px; }
  #fullArticle h2 { font-size: 22px; margin-top: 36px; }
}
