.tgx-live-search {
  position: relative;
  width: 100%;
}

html,
body {
  overflow-x: clip !important;
  overflow-y: visible !important;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }
}

.site-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 100 !important;
  width: 100%;
}

.site-header .brand-link {
  min-width: 0;
}

.site-header .brand-text {
  display: block !important;
  white-space: nowrap !important;
  letter-spacing: 0 !important;
}

@media (max-width: 639px) {
  .site-header .brand-link {
    gap: .5rem !important;
    max-width: calc(100vw - 5rem);
  }

  .site-header .brand-mark {
    width: 1.875rem !important;
    height: 1.875rem !important;
    font-size: 1rem !important;
  }

  .site-header .brand-text {
    font-size: 1rem !important;
    line-height: 1.1 !important;
  }
}

body.admin-bar .site-header {
  top: 32px !important;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px !important;
  }
}

.article-sidebar {
  position: sticky !important;
  top: 80px !important;
  align-self: flex-start !important;
  max-height: none !important;
  overflow: visible !important;
}

body.admin-bar .article-sidebar {
  top: 112px !important;
  max-height: none !important;
}

@media (max-width: 1023px) {
  .article-sidebar {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

.toc-card--sidebar .toc-list {
  max-height: none !important;
  overflow: visible !important;
}

.tingiaxe-ad--sidebar {
  min-height: 280px;
}

.tingiaxe-ad--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed !important;
  background: #F8FAFC !important;
  color: #94A3B8;
}

.tingiaxe-ad--placeholder span {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.article-content p + ul,
.article-content p + ol {
  margin-top: 1.6rem !important;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  scroll-margin-top: 32px !important;
}

.article-faq details {
  margin: 0 !important;
}

.article-faq details + details {
  margin-top: .55rem !important;
}

.article-faq summary {
  min-height: 3.15rem !important;
  padding: .8rem 1rem !important;
  list-style: none !important;
}

.article-faq summary::-webkit-details-marker {
  display: none;
}

.article-faq summary svg {
  flex: 0 0 auto;
  transition: transform .18s ease;
}

.article-faq details[open] summary svg {
  transform: rotate(180deg);
}

.article-faq details > div {
  padding: 0 1rem .95rem !important;
}

.tgx-scroll-toggle {
  position: fixed;
  right: clamp(16px, 2.2vw, 28px);
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 999px;
  color: #2563EB;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
  cursor: pointer;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .18s ease, transform .18s ease, color .18s ease, background .18s ease, border-color .18s ease;
  overflow: hidden !important;
  -webkit-mask-image: -webkit-radial-gradient(white, black) !important;
  mask-image: radial-gradient(white, black) !important;
}

.tgx-scroll-toggle:hover,
.tgx-scroll-toggle:focus-visible {
  color: #FFFFFF;
  background: linear-gradient(135deg, #2563EB, #06B6D4);
  border-color: transparent;
  outline: none;
}

.tgx-scroll-toggle.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.tgx-scroll-toggle svg {
  width: 21px;
  height: 21px;
  transition: transform .18s ease;
}

.tgx-scroll-toggle.is-up svg {
  transform: rotate(180deg);
}

.tgx-search-wrap {
  position: relative;
  width: 100%;
}

#desktop-search-root {
  width: clamp(252px, 21vw, 336px) !important;
}

@media (min-width: 1024px) and (max-width: 1180px) {
  #desktop-search-root {
    width: 232px !important;
  }
}

.tgx-search-leading-icon,
.tgx-search-leading-icon-wrap {
  position: absolute !important;
  left: 9px !important;
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  inset-inline-start: 9px !important;
  inset-block-start: 50% !important;
  z-index: 3;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 1px solid rgba(37, 99, 235, .12);
  border-radius: 999px;
  color: #2563EB !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, .13), rgba(6, 182, 212, .13));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
  transform: translate3d(0, -50%, 0) !important;
  pointer-events: none;
}

.tgx-search-leading-icon-wrap svg,
.tgx-search-leading-icon svg {
  display: block !important;
  width: 15px !important;
  height: 15px !important;
  margin: 0 !important;
  flex: 0 0 15px !important;
}

.tgx-live-search .search-input,
.tgx-live-search .tgx-search-input {
  width: 100% !important;
  min-height: 44px !important;
  border: 1px solid rgba(203, 213, 225, .78) !important;
  border-radius: 999px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(248, 250, 252, .78)) !important;
  color: #0F172A !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  font-weight: 650 !important;
  letter-spacing: 0 !important;
  padding: 0 46px 0 44px !important;
  outline: none !important;
  box-shadow:
    0 12px 30px rgba(15, 23, 42, .055),
    inset 0 1px 0 rgba(255, 255, 255, .86) !important;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .18s ease !important;
  -webkit-appearance: none;
  appearance: none;
}

.tgx-live-search .tgx-search-input::-webkit-search-cancel-button,
.tgx-live-search .search-input::-webkit-search-cancel-button {
  display: none;
}

.tgx-live-search .tgx-search-input::placeholder,
.tgx-live-search .search-input::placeholder {
  color: #64748B !important;
  font-weight: 600;
}

.tgx-live-search:focus-within .tgx-search-leading-icon,
.tgx-live-search:focus-within .tgx-search-leading-icon-wrap {
  color: #FFFFFF;
  border-color: transparent;
  background: linear-gradient(135deg, #2563EB, #06B6D4);
}

.tgx-live-search .tgx-search-input:focus,
.tgx-live-search .search-input:focus {
  border-color: rgba(37, 99, 235, .48) !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .9)) !important;
  box-shadow:
    0 0 0 4px rgba(37, 99, 235, .10),
    0 20px 42px rgba(15, 23, 42, .12),
    inset 0 1px 0 rgba(255, 255, 255, .94) !important;
}

.tgx-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(203, 213, 225, .72);
  border-radius: 999px;
  color: #64748B;
  background: rgba(255, 255, 255, .78);
  cursor: pointer;
  transform: translateY(-50%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
  transition: color .16s ease, background .16s ease, border-color .16s ease, transform .16s ease;
}

.tgx-search-clear:hover,
.tgx-search-clear:focus-visible {
  color: #0F172A;
  background: #F8FAFC;
  border-color: rgba(148, 163, 184, .58);
  outline: none;
}

.tgx-search-clear:active {
  transform: translateY(-50%) scale(.96);
}

.tgx-live-search .hidden {
  display: none !important;
}

.tgx-search-results,
.search-dropdown.tgx-search-results {
  position: absolute !important;
  top: calc(100% + 10px) !important;
  left: 0;
  right: 0;
  z-index: 120 !important;
  max-height: min(440px, 72vh) !important;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  border: 1px solid rgba(203, 213, 225, .74) !important;
  border-radius: 22px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(248, 250, 252, .82)) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.25);
  backdrop-filter: blur(22px) saturate(1.25);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, .18),
    0 8px 24px rgba(37, 99, 235, .07),
    inset 0 1px 0 rgba(255, 255, 255, .88) !important;
  padding: 9px !important;
  transform-origin: top right;
  animation: tgxSearchPanelIn .16s ease-out both;
}

@keyframes tgxSearchPanelIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#desktop-search-root .tgx-search-results {
  left: auto !important;
  right: 0 !important;
  width: min(430px, calc(100vw - 32px)) !important;
}

#mobile-search-root {
  z-index: 130;
}

#mobile-search-root .tgx-search-input,
#mobile-search-root .search-input {
  min-height: 46px !important;
  border-radius: 999px !important;
}

#mobile-search-root .tgx-search-results {
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 150 !important;
  max-height: min(390px, 62vh) !important;
  border-radius: 20px !important;
}

#mobile-menu-panel {
  overflow: visible;
}

.tgx-search-results ul {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.tgx-search-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 5px 10px;
  border-bottom: 1px solid rgba(226, 232, 240, .68);
  margin-bottom: 7px;
}

.tgx-search-panel-title {
  color: #0F172A;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0;
}

.tgx-search-panel-hint {
  color: #64748B;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.tgx-search-item,
.tgx-search-results li > a:not(.tgx-search-item) {
  position: relative;
  display: grid !important;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 10px !important;
  color: #0F172A;
  text-decoration: none;
  outline: none;
  background: rgba(255, 255, 255, .36);
  transition: background .16s ease, transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.tgx-search-results li > a:not(.tgx-search-item)::before {
  content: "";
  grid-row: 1 / span 2;
  width: 38px;
  height: 38px;
  border-radius: 15px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .16), rgba(6, 182, 212, .15)),
    url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 5h14v14H5V5Z' stroke='%232563EB' stroke-width='2'/%3E%3Cpath d='M8 9h8M8 13h8M8 17h5' stroke='%232563EB' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
}

.tgx-search-item:hover,
.tgx-search-item:focus-visible,
.tgx-search-item.is-active,
.tgx-search-results li > a:not(.tgx-search-item):hover,
.tgx-search-results li > a:not(.tgx-search-item):focus-visible {
  background: rgba(255, 255, 255, .82) !important;
  border-color: rgba(37, 99, 235, .18);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .08);
}

.tgx-search-item:active,
.tgx-search-results li > a:not(.tgx-search-item):active {
  transform: translateY(1px);
}

.tgx-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 15px;
  color: #2563EB;
  background: linear-gradient(135deg, rgba(37, 99, 235, .16), rgba(6, 182, 212, .15));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78);
}

.tgx-search-title,
.tgx-search-results li > a:not(.tgx-search-item) > span:first-child {
  display: -webkit-box;
  min-width: 0;
  color: #0F172A !important;
  font-size: 14px !important;
  font-weight: 850 !important;
  line-height: 1.35 !important;
  letter-spacing: 0 !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tgx-search-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: #64748B;
  font-size: 12px;
  line-height: 1.35;
}

.tgx-search-excerpt {
  display: -webkit-box;
  margin-top: 6px;
  color: #475569;
  font-size: 12.5px;
  line-height: 1.48;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tgx-search-chip,
.tgx-search-results li > a:not(.tgx-search-item) > span:last-child {
  display: inline-flex !important;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  border-radius: 999px;
  background: rgba(239, 246, 255, .9);
  color: #2563EB !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  line-height: 1;
  letter-spacing: 0 !important;
  padding: 5px 8px;
  margin-top: 6px !important;
  text-transform: none !important;
}

.tgx-search-state,
.tgx-search-empty,
.tgx-search-loading,
.tgx-search-error,
.tgx-search-results > p,
.tgx-search-results > div:not(.tgx-search-panel-head) {
  border: 1px solid rgba(226, 232, 240, .72);
  border-radius: 17px;
  background: rgba(255, 255, 255, .55);
  padding: 16px !important;
  color: #64748B;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.tgx-search-state-title {
  display: block;
  color: #0F172A;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
  margin-bottom: 3px;
}

.tgx-search-loading {
  position: relative;
  padding-top: 44px !important;
}

.tgx-search-loading::before {
  content: "";
  position: absolute;
  left: calc(50% - 13px);
  top: 14px;
  width: 26px;
  height: 26px;
  border: 3px solid rgba(37, 99, 235, .16);
  border-top-color: #2563EB;
  border-radius: 999px;
  animation: tgxSearchSpin .75s linear infinite;
}

@keyframes tgxSearchSpin {
  to {
    transform: rotate(360deg);
  }
}

.tgx-search-error {
  color: #B45309;
  background: rgba(255, 251, 235, .72);
  border-color: rgba(245, 158, 11, .26);
}

@media (max-width: 640px) {
  .tgx-search-wrap {
    width: 100%;
  }

  .tgx-live-search .tgx-search-input,
  .tgx-live-search .search-input {
    min-height: 46px !important;
    font-size: 14px !important;
    padding-left: 44px !important;
    padding-right: 46px !important;
  }

  .tgx-search-results {
    max-height: min(390px, 62vh) !important;
    border-radius: 19px !important;
    padding: 8px !important;
  }

  .tgx-search-panel-head {
    padding-bottom: 8px;
  }

  .tgx-search-panel-hint {
    display: none;
  }

  .tgx-search-item,
  .tgx-search-results li > a:not(.tgx-search-item) {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 9px;
    padding: 9px !important;
    border-radius: 15px;
  }

  .tgx-search-icon,
  .tgx-search-results li > a:not(.tgx-search-item)::before {
    width: 36px;
    height: 36px;
    border-radius: 14px;
  }

  .tgx-search-title,
  .tgx-search-results li > a:not(.tgx-search-item) > span:first-child {
    font-size: 13.5px !important;
  }

  .tgx-search-excerpt {
    font-size: 12px;
    -webkit-line-clamp: 1;
  }
}
