/*
  near.com Help Scout Docs: starter stylesheet
  Paste into Docs > Site Settings > Custom Code > custom stylesheet.

  NOTE: written without admin access, from the public page structure
  (header#mainNav, section#contentArea, section#main-content, aside#sidebar,
  footer). Preview every page type on desktop and mobile before publishing
  and adjust selectors if something does not apply.
*/

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

body,
input,
button,
textarea {
  font-family: "Figtree", system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: "Figtree", system-ui, sans-serif;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: #171717;
}

/* Header */
header#mainNav.navbar {
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  box-shadow: none;
}

/* Article body */
#main-content,
#main-content p,
#main-content li {
  color: #404040;
}

#main-content a {
  color: #171717;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Sidebar */
#sidebar a {
  color: #737373;
  border-radius: 10px;
}

#sidebar .nav-list a:hover {
  color: #171717;
  text-decoration: none;
}

/* Footer: same dark grey as near.com */
footer {
  background: #262626;
  border-top: 0;
  color: #a1a1a1;
}

footer a,
footer p {
  color: #a1a1a1;
}

/* Cards (category and article lists) */
.category-list a.category,
.articleList li {
  border-radius: 16px;
}

/* Article rows need block display so the whole row is the link target */
.articleList li a {
  display: block;
}

/* Clickable affordance: chevron on home page links + hover state.
   Applies to Most Popular rows and category cards.
   Chevron = Heroicons 16/solid chevron-right, grey-400 (#a1a1a1). */
.articleList li a,
.category-list a.category {
  position: relative;
  padding-right: 48px;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

.articleList li a::after,
.category-list a.category::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 20px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23a1a1a1'%3E%3Cpath fill-rule='evenodd' d='M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 150ms ease;
}

.category-list a.category:hover,
.category-list a.category:focus-visible {
  background: #fafafa;
  text-decoration: none;
}

.category-list a.category:hover,
.category-list a.category:focus-visible {
  box-shadow: inset 0 0 0 1px #d4d4d4;
  border-radius: 16px;
}

.articleList li a:hover::after,
.category-list a.category:hover::after,
.articleList li a:focus-visible::after,
.category-list a.category:focus-visible::after {
  transform: translateX(4px);
  filter: brightness(0.25); /* chevron darkens on hover */
}

.articleList li a:focus-visible,
.category-list a.category:focus-visible {
  outline: 2px solid #171717;
  outline-offset: -2px;
}

/* Small green accents (brand green-500 #00ec97). Selectors unverified. */

/* Text selection, same as near.com */
::selection {
  background: #00ec97;
  color: #171717;
}

/* Active category in the sidebar: darker and bolder, no bar */
#sidebar .nav-list .active > a {
  color: #171717;
  font-weight: 600;
}

/* Link hover underline */
#main-content a:hover {
  text-decoration-color: #00ec97;
  text-decoration-thickness: 2px;
}

/* Article rating: "Was this article helpful?" with thumbs up / down.
   Classes below were read from the live Help Scout article page.
   The wording swap uses the question's ::before, so the real text is
   visually hidden but still in the page. */
.articleRatings {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 16px;
}

.articleRatings-question {
  font-size: 0;
  line-height: 0;
}

.articleRatings-question::before {
  content: "Was this article helpful?";
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  letter-spacing: -0.025em;
  color: #171717;
}

.articleRatings .articleRatings-actions {
  display: flex;
  flex: none;
  width: auto;
  gap: 8px;
}

/* Higher specificity + flex:none are needed: Help Scout's own button
   styles otherwise squeeze the buttons to ~27px wide (tested on the live page). */
.articleRatings .articleRatings-actions .rateAction {
  position: relative;
  flex: none;
  min-width: 40px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #d4d4d4;
  cursor: pointer;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

/* Hide Help Scout's smiley / sad faces, draw thumbs instead.
   Thumb = Heroicons 24/outline hand-thumb-up; thumbs-down is the same icon flipped. */
.rateAction .rating-face svg {
  display: none;
}

.rateAction::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23525252' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.633 10.25c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 0 1 2.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 0 0 .322-1.672V2.75a.75.75 0 0 1 .75-.75 2.25 2.25 0 0 1 2.25 2.25c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282m0 0h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 0 1-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 0 0-1.423-.23H5.904M14.25 9.75h2.252M5.904 18.5c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 0 1-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 9.953 4.167 9.5 5 9.5h1.053c.472 0 .745.556.5.96a8.958 8.958 0 0 0-1.302 4.665c0 1.194.232 2.333.654 3.375Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.rateAction--negative::before {
  transform: scaleY(-1);
}

.rateAction:hover,
.rateAction:focus-visible {
  background: #fafafa;
}

.rateAction--positive:hover,
.rateAction--positive:focus-visible {
  box-shadow: inset 0 0 0 1px #00ec97;
}

.rateAction--negative:hover,
.rateAction--negative:focus-visible {
  box-shadow: inset 0 0 0 1px #a1a1a1;
}

.rateAction:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 2px;
}

/* ---------- Layout: flat pages, no boxes or shadows ---------- */

/* Header: smaller logo, no caret under "Home" */
header#mainNav .brand {
  padding: 22px 20px 22px 0;
}

header#mainNav .brand img {
  height: 28px;
  width: auto;
}

header#mainNav .nav .caret {
  display: none;
}

/* Home hero */
#docsSearch {
  background: #ffffff;
  border: 0;
  padding: 56px 0 40px;
}

#docsSearch h1 {
  font-size: 36px;
  line-height: 44px;
  letter-spacing: -0.03em;
  color: #171717;
  margin-bottom: 24px;
}

/* Category cards: 3 across, left aligned, same look as near.com cards */
.category-list a.category {
  box-sizing: border-box;
  text-align: left;
  padding: 20px 48px 20px 20px;
  border: 1px solid #e5e5e5;
  box-shadow: none;
  background: #ffffff;
}

.category-list a.category h3 {
  font-size: 16px;
  line-height: 24px;
  margin: 0 0 2px;
}

.category-list a.category p:empty {
  display: none;
}

.category-list a.category .article-count {
  margin: 0;
  font-size: 14px;
  line-height: 20px;
  color: #737373;
}

/* Content: remove the boxed, shadowed panel */
#main-content {
  background: none;
  padding: 0 0 0 48px;
}

#main-content .contentWrapper {
  padding: 24px 0 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  min-height: 0;
}

/* Article list rows: divider lines, no underline, no icon, no highlight */
.articleList li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #e5e5e5;
  border-radius: 0;
}

.articleList li:last-child {
  border-bottom: 0;
}

.articleList li a {
  display: block;
  margin: 0;
  padding: 16px 40px 16px 0;
}

.articleList li a::after {
  right: 4px;
}

.articleList .icon-article-doc {
  display: none;
}

#main-content .articleList a {
  text-decoration: none;
}

.articleList li a:hover span {
  color: #000000;
}

/* Sort dropdown */
#sortBy {
  -webkit-appearance: none;
  appearance: none;
  height: 36px;
  padding: 0 32px 0 12px;
  font-size: 14px;
  color: #171717;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23737373'%3E%3Cpath d='M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E") right 10px center / 16px no-repeat;
}

/* Article rating: flat row with a divider instead of a boxed card */
.articleRatings {
  justify-content: flex-start;
  border: 0;
  border-top: 1px solid #e5e5e5;
  border-radius: 0;
  box-shadow: none;
  background: none;
  padding: 24px 0 0;
}

/* Footer: full width dark bar, copyright left, "Powered by" right.
   Pinned to the bottom of the window on short pages (category pages),
   and after the content on long ones. */
footer {
  margin-top: 64px;
  padding: 24px 0;
  box-shadow: 0 0 0 100vmax #262626;
  clip-path: inset(0 -100vmax);
}

#contentArea {
  position: relative;
  min-height: calc(100vh - 77px); /* 77px = header height */
  padding-bottom: 130px;          /* room for the footer */
  box-sizing: border-box;
}

#docsSearch ~ #contentArea {
  min-height: 0; /* home page: footer follows the content */
}

#contentArea > footer {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 0;
  margin-top: 0;
}

footer p {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.3em;
  width: 100%;
  margin: 0;
  text-align: left;
}

/* Everything from "Powered by Help Scout" onward (including Log Out) goes right */
footer p span {
  margin-left: auto;
}

/* Search: icon on the left, no button (Enter submits), green focus ring */
#searchBar input.search-query {
  box-sizing: border-box;
  height: 44px;
  padding: 4px 14px 4px 42px;
  border: 1px solid #d4d4d4;
  border-radius: 12px;
  box-shadow: none;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23a1a1a1'%3E%3Cpath fill-rule='evenodd' d='M9 3.5a5.5 5.5 0 1 0 0 11 5.5 5.5 0 0 0 0-11ZM2 9a7 7 0 1 1 12.452 4.391l3.328 3.329a.75.75 0 1 1-1.06 1.06l-3.329-3.328A7 7 0 0 1 2 9Z' clip-rule='evenodd'/%3E%3C/svg%3E") 14px center / 20px no-repeat;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

#searchBar input.search-query:focus {
  outline: none;
  border-color: #a1a1a1;
  box-shadow: 0 0 0 4px rgba(23, 23, 23, 0.08);
}

#searchBar button[type="submit"] {
  display: none;
}

#docsSearch #searchBar input.search-query {
  height: 52px;
  font-size: 16px;
}

/* Home: Most Popular as two columns of cards, same width as the categories */
hr.sep {
  display: none;
}

#contentArea .most-pop-articles {
  width: auto;
  max-width: none;
  margin: 0 8px;
}

#contentArea .most-pop-articles h2,
.category-list::before {
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.025em;
  font-weight: 500;
  color: #171717;
  text-align: left;
  margin: 0 0 16px;
}

/* Categories: CSS grid, so it lines up exactly with Most Popular above */
#contentArea .category-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 0 8px;
  text-align: left;
}

#contentArea .category-list::before {
  content: "Categories";
  display: block;
  grid-column: 1 / -1;
  margin: 48px 0 0;
}

#contentArea .category-list a.category {
  float: none;
  width: auto;
  margin: 0;
}

@media (max-width: 900px) {
  #contentArea .category-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #contentArea .category-list {
    grid-template-columns: 1fr;
  }
}

#contentArea .most-pop-articles .popArticles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  columns: auto;
  margin: 0;
  padding: 0;
  list-style: none;
}

#contentArea .most-pop-articles .popArticles li {
  float: none;
  width: auto;
  margin: 0;
  border: 1px solid #e5e5e5;
  border-radius: 16px;
  background: #ffffff;
  transition: background-color 150ms ease, box-shadow 150ms ease;
}

#contentArea .most-pop-articles .popArticles li:hover {
  background: #fafafa;
  box-shadow: inset 0 0 0 1px #d4d4d4;
}

#contentArea .most-pop-articles .popArticles li a {
  position: relative;
  display: block;
  margin: 0;
  padding: 16px 48px 16px 20px;
  color: #171717;
  text-decoration: none;
}

#contentArea .most-pop-articles .popArticles .icon-article-doc {
  display: none;
}

#contentArea .most-pop-articles .popArticles li a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 20px;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23a1a1a1'%3E%3Cpath fill-rule='evenodd' d='M6.22 4.22a.75.75 0 0 1 1.06 0l3.25 3.25a.75.75 0 0 1 0 1.06l-3.25 3.25a.75.75 0 0 1-1.06-1.06L8.94 8 6.22 5.28a.75.75 0 0 1 0-1.06Z' clip-rule='evenodd'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 150ms ease;
}

#contentArea .most-pop-articles .popArticles li:hover a::after {
  transform: translateX(4px);
  filter: brightness(0.25);
}

@media (max-width: 640px) {
  #contentArea .most-pop-articles .popArticles {
    grid-template-columns: 1fr;
  }
}

/* Category page: hide the sort dropdown */
#categoryHead .sort {
  display: none;
}

/* Search suggestions dropdown */
#sidebar #serp-dd {
  left: 0;
  right: 0;
  width: auto;
  box-sizing: border-box;
  top: 100%; /* the 8px gap comes from margin-top below */
}

#serp-dd {
  margin-top: 8px;
  padding: 6px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(23, 23, 23, 0.08);
  overflow: hidden;
}

#serp-dd ul.result li a {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 20px;
  color: #171717;
  text-decoration: none;
}

#serp-dd ul.result li a:hover,
#serp-dd ul.result li.active a,
#serp-dd ul.result li.selected a,
#serp-dd ul.result li a.active {
  background: #f5f5f5;
  color: #171717;
}

/* Home search: more specific placeholder than "Search the knowledge base".
   The real placeholder is hidden and replaced by text drawn on the form,
   shown only while the box is empty (uses :has, supported by current browsers). */
#docsSearch #searchBar {
  position: relative;
}

#docsSearch #searchBar input.search-query::placeholder {
  color: transparent;
}

#docsSearch #searchBar:has(input.search-query:placeholder-shown)::after {
  content: "Search swaps, deposits, passkeys…";
  position: absolute;
  left: 43px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  line-height: 24px;
  color: #a1a1a1;
  pointer-events: none;
}

/* Home: show only the top 6 Most Popular articles */
#contentArea .most-pop-articles .popArticles li:nth-child(n + 7) {
  display: none;
}

/* "View in Help Scout" button (only visible to signed-in Help Scout users).
   Selectors are a best guess; adjust if it does not apply. */
#main-content a.btn,
#main-content .btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border: 1px solid #d4d4d4;
  border-radius: 10px;
  background: #ffffff;
  background-image: none;
  box-shadow: none;
  text-shadow: none;
  font-size: 14px;
  font-weight: 500;
  color: #171717;
  text-decoration: none;
}

#main-content a.btn:hover,
#main-content .btn:hover {
  background: #fafafa;
  border-color: #a1a1a1;
  color: #171717;
}

/* "Last updated" line: match the site font instead of italic serif */
time.lu {
  font-family: "Figtree", system-ui, sans-serif;
  font-style: normal;
  font-size: 14px;
  color: #737373;
}

@media (prefers-reduced-motion: reduce) {
  .rateAction {
    transition: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .articleList li a,
  .category-list a.category,
  .articleList li a::after,
  .category-list a.category::after {
    transition: none;
  }
}
