/* ============================================================
   CSS Variables
   ============================================================ */
:root {
  --color-primary: #1a7a4f;
  --color-primary-dark: #0f5c3a;
  --color-primary-hover: #167044;
  --color-primary-bg: #e6f4ed;
  --color-primary-subtle: rgba(26, 122, 79, 0.1);

  --color-text: #1a1d21;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;

  --color-border: #e6e8eb;
  --color-border-light: #f0f2f4;
  --color-bg: #ffffff;
  --color-bg-subtle: #f8f9fa;
  --color-bg-code: #f6f8fa;
  --color-text-code: #1a1d21;

  --navbar-height: 56px;
  --sidebar-width: 250px;
  --content-max-width: 820px;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
    sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;

  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
}

/* ============================================================
   Base
   ============================================================ */
body {
  background-color: var(--color-bg);
  color: var(--color-text);
  padding-top: var(--navbar-height);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar {
  position: fixed;
  top: var(--navbar-height);
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 0;
  border-right: 1px solid var(--color-border);
  overflow-y: auto;
  background-color: var(--color-bg-subtle);
}

.sidebar-separator-line {
  padding: 0;
  margin: 0.5rem 0;
}

.sidebar-separator-content {
  height: 1px;
  background-color: var(--color-border);
  margin: 0;
}

.sidebar .nav-link {
  font-weight: 400;
  color: var(--color-text-secondary);
  padding: 0.3rem 1rem;
  font-size: 14px;
  border-radius: 0;
}

.sidebar .nav-link:hover {
  color: var(--color-primary);
  background-color: transparent;
}

.sidebar .nav-item .nav-link {
  font-size: 0.9em;
  padding-right: 0.5rem;
}

.sidebar-heading {
  padding-left: 1rem;
  padding-right: 1rem;
  font-size: 0.72em;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.25rem;
}

/* Active sidebar item */
.sidebar .nav-link.active {
  color: var(--color-primary) !important;
  background-color: var(--color-primary-subtle) !important;
  border-right: 3px solid var(--color-primary);
  font-weight: 500;
}

.sidebar .nav-link.active i {
  color: var(--color-primary);
}

.sidebar .nav-link.active:hover {
  background-color: transparent !important;
}

/* Level 1 separators */
.sidebar ul.nav.flex-column:not(.sidebar-children-list) > li.nav-item:not(.sidebar-separator-line) {
  border-bottom: 2px solid #ddd;
  padding-top: 4px;
  padding-bottom: 4px;
}

/* Sidebar tree lines */
.sidebar-children-list {
  position: relative;
}

.sidebar-children-list .sidebar-tree-item {
  position: relative;
  list-style: none;
}

.sidebar-link-container {
  position: relative;
  z-index: 2;
  align-items: center !important;
}

.sidebar-title-text {
  white-space: normal;
}

.sidebar-children-list .sidebar-tree-item > .nav-link {
  position: relative;
  padding-left: 32px !important;
  display: block;
  line-height: 1.3;
  font-size: 14px;
}

.sidebar-folder-icon-closed,
.sidebar-folder-icon-open {
  font-size: 1rem;
  color: var(--color-muted);
  margin-right: 5px;
  flex-shrink: 0;
  line-height: 1.3;
}

.sidebar-folder-icon {
  font-size: 1.1em;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.sidebar-folder-icon.folder-open::before {
  content: "\ea65";
}

.sidebar-folder-icon.folder-closed::before {
  content: "\ea62";
}

.sidebar-children-list .sidebar-tree-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  height: calc(100% - 20px + 20px);
  width: 1px;
  background-color: var(--color-border);
  z-index: 0;
}

.sidebar-children-list .sidebar-tree-item::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 14px;
  width: 20px;
  height: 1px;
  background-color: var(--color-border);
  z-index: 0;
}

/* ============================================================
   Fixed Sidebar Footer
   ============================================================ */
@media (max-width: 767.98px) {
  .sidebar-offcanvas.offcanvas {
    width: 250px;
  }

  body.offcanvas-active main {
    margin-left: 250px;
    transition: none !important;
  }

  #offcanvasSidebar {
    width: 90%;
  }

  .sidebar {
    width: 90%;
  }
}

/* ============================================================
   Navbar (np-help-*)
   ============================================================ */

.np-help-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  background-color: #0f2d1e;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.np-help-nav {
  display: flex;
  align-items: center;
  height: var(--navbar-height);
  padding: 0 20px;
  gap: 8px;
}

/* Logo */
.np-help-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.np-help-logo img {
  height: 28px;
  width: auto;
  display: block;
  border: none !important;
  border-radius: 0 !important;
  margin: 0 !important;
  cursor: default;
}

.np-help-logo-divider {
  width: 1px;
  height: 20px;
  background-color: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.np-help-logo-text {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Desktop nav links */
.np-help-links {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
  flex: 1;
}

.np-help-nav-item {
  position: relative;
}

.np-help-nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 11px;
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease, background-color 0.15s ease;
  text-decoration: none;
}

.np-help-nav-link:hover {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.08);
}

.np-help-nav-link.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.12);
  font-weight: 500;
}

/* Chevron icon in nav link */
.np-help-chevron {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.np-help-nav-item:hover .np-help-chevron {
  transform: rotate(180deg);
  opacity: 1;
}

/* CSS Hover Dropdown */
.np-help-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  padding-top: 8px; /* invisible bridge so mouse can reach dropdown */
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.np-help-nav-item:hover .np-help-dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.np-help-dropdown-inner {
  background: #ffffff;
  border: 1px solid #e2e6ea;
  border-radius: 10px;
  box-shadow:
    0 4px 6px -2px rgba(0, 0, 0, 0.05),
    0 12px 30px -4px rgba(0, 0, 0, 0.12);
  padding: 6px;
  min-width: 200px;
  position: relative;
}

/* Caret arrow */
.np-help-dropdown-inner::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 18px;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-left: 1px solid #e2e6ea;
  border-top: 1px solid #e2e6ea;
  transform: rotate(45deg);
  border-radius: 2px 0 0 0;
}

.np-help-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  font-size: 13.5px;
  font-weight: 400;
  color: #374151;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.1s ease, color 0.1s ease;
  white-space: nowrap;
}

.np-help-dropdown-item:hover {
  background-color: #f0faf5;
  color: var(--color-primary);
  text-decoration: none;
}

.np-help-dropdown-item.active {
  background-color: var(--color-primary-subtle);
  color: var(--color-primary);
  font-weight: 500;
}

.np-help-dropdown-divider {
  height: 1px;
  background-color: #f0f2f4;
  margin: 4px 8px;
}

/* Mega menu */
.np-help-mega {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  padding-top: 8px;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.np-help-nav-item:hover .np-help-mega {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.np-help-mega-inner {
  background: #ffffff;
  border: 1px solid #e2e6ea;
  border-radius: 12px;
  box-shadow:
    0 4px 6px -2px rgba(0, 0, 0, 0.05),
    0 12px 30px -4px rgba(0, 0, 0, 0.14);
  padding: 16px;
  position: relative;
}

.np-help-mega-inner::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 18px;
  width: 10px;
  height: 10px;
  background: #ffffff;
  border-left: 1px solid #e2e6ea;
  border-top: 1px solid #e2e6ea;
  transform: rotate(45deg);
  border-radius: 2px 0 0 0;
}

.np-help-mega-header {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
  padding: 0 4px;
}

.np-help-mega-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.np-help-mega-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.1s ease;
}

.np-help-mega-item:hover {
  background-color: #f0faf5;
  text-decoration: none;
}

.np-help-mega-icon {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  background-color: var(--color-primary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--color-primary);
}

.np-help-mega-text {
  flex: 1;
  min-width: 0;
}

.np-help-mega-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1d21;
  line-height: 1.3;
}

.np-help-mega-desc {
  font-size: 11.5px;
  color: #6b7280;
  margin-top: 2px;
  line-height: 1.4;
}

/* Right section */
.np-help-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Language switcher in right area — dropdown aligns to the right edge */
.np-help-lang-item .np-help-dropdown {
  left: auto;
  right: 0;
}

.np-help-lang-item .np-help-dropdown-inner::before {
  left: auto;
  right: 18px;
}

/* Search */
.np-help-search {
  position: relative;
  width: 240px;
}

.np-help-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  pointer-events: none;
}

.np-help-search-input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  color: #fff;
  font-size: 13.5px;
  outline: none;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.np-help-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.np-help-search-input:focus {
  background-color: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
}

/* CTA button icon + text layout */
.np-help-btn-icon {
  font-size: 15px;
  flex-shrink: 0;
}
.np-help-btn-text {
  margin-left: 6px;
}

/* CTA buttons */
.np-help-cta {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  background-color: var(--color-primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border-radius: 20px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  flex-shrink: 0;
}

.np-help-cta:hover {
  background-color: var(--color-primary-dark);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 122, 79, 0.4);
  text-decoration: none;
}

.np-help-cta-ghost {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  background-color: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.np-help-cta-ghost:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
  text-decoration: none;
}

/* Mobile sidebar toggle (hamburger-like for offcanvas) */
.np-help-sidebar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.np-help-sidebar-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
}

/* Mobile hamburger (nav links toggle) */
.np-help-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}

.np-help-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: rgba(255, 255, 255, 0.85);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  transform-origin: center;
}

.np-help-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.np-help-hamburger.open span:nth-child(2) { opacity: 0; }
.np-help-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav panel */
.np-help-mobile-nav {
  display: none;
  background-color: #0f2d1e;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.25s ease;
}

.np-help-mobile-nav.open {
  max-height: 600px;
}

.np-help-mobile-links {
  list-style: none;
  margin: 0;
  padding: 8px 16px 16px;
}

.np-help-mobile-links .np-help-nav-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.np-help-mobile-links .np-help-nav-link {
  padding: 10px 4px;
  width: 100%;
  justify-content: space-between;
}

.np-help-mobile-links .np-help-dropdown {
  position: static;
  opacity: 1;
  pointer-events: auto;
  transform: none;
  display: none;
}

.np-help-mobile-links .np-help-dropdown.open {
  display: block;
}

.np-help-mobile-links .np-help-dropdown-inner {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0 0 8px 12px;
}

.np-help-mobile-links .np-help-dropdown-inner::before {
  display: none;
}

.np-help-mobile-links .np-help-dropdown-item {
  color: rgba(255, 255, 255, 0.7);
  padding: 7px 8px;
  border-radius: var(--radius-sm);
}

.np-help-mobile-links .np-help-dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.np-help-mobile-links .np-help-dropdown-divider {
  background-color: rgba(255, 255, 255, 0.08);
}

/* Search results */
.navbar-search-results {
  max-height: 60vh;
  overflow: auto;
  z-index: 2000;
}

.navbar-search-result-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.navbar-search-result-desc {
  font-size: 0.8rem;
  color: #6c757d;
  margin-top: 0.15rem;
}

/* Responsive */
@media (max-width: 767.98px) {
  .np-help-sidebar-toggle { display: flex; }
  .np-help-hamburger { display: flex; }
  .np-help-links { display: none; }
  .np-help-mobile-nav { display: block; }
  .np-help-search { width: 160px; }
  .np-help-logo-text { display: none; }
  .np-help-logo-divider { display: none; }

  /* Icon-only CTA buttons on mobile */
  .np-help-btn-text { display: none; }
  .np-help-btn-icon { margin: 0; }
  .np-help-cta { padding: 0; width: 34px; justify-content: center; }
  .np-help-cta-ghost { padding: 0; width: 34px; justify-content: center; }
}

@media (max-width: 400px) {
  .np-help-search { display: none; }
}

/* ============================================================
   Main content layout
   ============================================================ */
main {
  padding-top: 1rem;
  font-size: 16px;
}

main.col-lg-10 {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

main hr {
  color: var(--color-border);
  border-top: 1px dashed;
  opacity: 1;
}

@media (min-width: 768px) {
  main {
    margin-left: var(--sidebar-width);
  }
}

/* ============================================================
   Content wrapper — Typography (GitBook style)
   ============================================================ */
.content-wrapper {
  max-width: var(--content-max-width);
  width: 100%;
  box-sizing: border-box;
  padding: 0 48px 48px;
  margin: 0 auto;
}

@media (max-width: 767.98px) {
  .content-wrapper {
    padding: 0 16px 32px;
  }
}

/* Headings */
.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3,
.content-wrapper h4,
.content-wrapper h5,
.content-wrapper h6 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.content-wrapper h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.content-wrapper h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--color-border-light);
}

.content-wrapper h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.content-wrapper h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}

.content-wrapper h5 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.3rem;
}

.content-wrapper h6 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.3rem;
  color: var(--color-text-muted);
}

/* Paragraph */
.content-wrapper p {
  font-size: 1rem;
  line-height: 1.75;
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--color-text);
}

/* Links */
.content-wrapper a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

.content-wrapper a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
}

/* Lists */
.content-wrapper ul,
.content-wrapper ol {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-left: 1.75rem;
}

.content-wrapper li {
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.content-wrapper li > p {
  margin-bottom: 0.5rem;
}

/* Blockquote */
.content-wrapper blockquote {
  border-left: 3px solid var(--color-primary);
  background-color: var(--color-primary-bg);
  color: var(--color-text-secondary);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.content-wrapper blockquote p:last-child {
  margin-bottom: 0;
}

/* Inline code */
.content-wrapper code {
  background-color: rgba(26, 122, 79, 0.08);
  color: #0f5c3a;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.875em;
  padding: 0.15em 0.45em;
  font-weight: 500;
}

/* Code blocks */
.content-wrapper pre {
  background-color: var(--color-bg-code);
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.content-wrapper pre > code {
  display: block;
  background-color: transparent;
  color: var(--color-text-code);
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.65;
  white-space: pre;
  padding: 1.25rem 1.5rem;
  border-radius: 0;
}

/* Tables */
.content-wrapper table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.content-wrapper th,
.content-wrapper td {
  border: 1px solid var(--color-border);
  padding: 0.65rem 1rem;
  text-align: left;
}

.content-wrapper th {
  background-color: var(--color-bg-subtle);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.content-wrapper tr:nth-child(even) td {
  background-color: #fafbfc;
}

/* Images */
.content-wrapper img {
  width: auto;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* ============================================================
   Images (global)
   ============================================================ */
img {
  max-width: 1100px;
  width: 100%;
  height: auto;
  display: block;
  cursor: pointer;
  margin: 1.5em 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border-light);
}

.naviItem img {
  border: 0 !important;
}

img[alt="small-1-2"] {
  width: 50%;
}

img[alt="small-1-3"] {
  width: 33%;
}

img[alt="fix-100"] {
  width: 100px;
}

img[alt="fix-200"] {
  width: 200px;
}

img[alt="fix-300"] {
  width: 300px;
}

img[alt="fix-400"] {
  width: 400px;
}

img[alt="fix-500"] {
  width: 500px;
}

/* Image loading shimmer */
main img {
  background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  min-height: 180px;
}

main img.loaded {
  animation: none;
  background: none;
  min-height: auto;
}

main img.error {
  animation: none;
  background: var(--color-bg-subtle);
  min-height: 180px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Figure caption */
figure figcaption {
  text-align: center;
  font-size: 0.82em;
  color: var(--color-text-muted);
  margin-top: 0.5rem;
  font-style: italic;
}

/* ============================================================
   Code block container (with copy button)
   ============================================================ */
.code-block-container {
  position: relative;
  background-color: var(--color-bg-code);
  color: var(--color-text-code);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
}

.code-block-container:hover {
  border-color: #c8cdd3;
}

.code-block-container pre {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  overflow-x: auto;
}

.copy-code-button {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: rgba(0, 0, 0, 0.06);
  color: #586069;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 4px 10px;
  font-size: 12px;
  font-family: var(--font-body);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  z-index: 10;
}

.code-block-container:hover .copy-code-button {
  opacity: 1;
}

.copy-code-button:hover {
  background-color: rgba(0, 0, 0, 0.1);
  color: #24292e;
}

.copy-code-button.copied {
  background-color: rgba(26, 122, 79, 0.15);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* ============================================================
   Details / Summary (accordion) — Notion/Linear style
   ============================================================ */
.content-wrapper details {
  margin: 0.5rem 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.content-wrapper details + details {
  margin-top: 6px;
}

.content-wrapper details[open] {
  border-color: rgba(26, 122, 79, 0.35);
  box-shadow: 0 0 0 3px rgba(26, 122, 79, 0.06);
}

.content-wrapper details summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  position: relative;
  padding: 11px 16px 11px 40px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--color-text);
  background: transparent;
  transition: background-color 0.1s ease;
}

.content-wrapper details summary::-webkit-details-marker {
  display: none;
}

/* SVG chevron — mượt, không phụ thuộc icon font */
.content-wrapper details summary::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-wrapper details[open] summary::before {
  transform: translateY(-50%) rotate(90deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a7a4f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='9 18 15 12 9 6'%3E%3C/polyline%3E%3C/svg%3E");
}

.content-wrapper details summary:hover {
  background-color: #f8faf9;
}

.content-wrapper details[open] summary {
  background-color: rgba(26, 122, 79, 0.04);
  border-bottom: 1px solid rgba(26, 122, 79, 0.12);
}

.content-wrapper details[open] summary:hover {
  background-color: rgba(26, 122, 79, 0.07);
}

/* Content */
.content-wrapper details > *:not(summary) {
  padding: 14px 18px 14px 40px;
  color: var(--color-text-secondary);
  font-size: 14.5px;
  line-height: 1.7;
}

.content-wrapper details p:last-child {
  margin-bottom: 0;
}

details strong {
  font-weight: 600;
  color: var(--color-text);
}

/* ============================================================
   Prev / Next navigation
   ============================================================ */
.prev-next-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

.prev-next-col {
  min-width: 0;
}

.prev-next-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg);
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
  min-height: 0;
}

.prev-next-link:hover {
  border-color: var(--color-primary);
  background: rgba(26, 122, 79, 0.03);
  text-decoration: none;
}

.prev-next-next {
  justify-content: flex-end;
}

.prev-next-arrow {
  font-size: 16px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  transition: color 0.15s ease;
  line-height: 1;
}

.prev-next-link:hover .prev-next-arrow {
  color: var(--color-primary);
}

.prev-next-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.prev-next-next .prev-next-body {
  text-align: right;
}

.prev-next-label {
  font-size: 10.5px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  line-height: 1;
}

.prev-next-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.prev-next-link:hover .prev-next-title {
  color: var(--color-primary);
}

@media (max-width: 767.98px) {
  .prev-next-nav {
    grid-template-columns: 1fr;
  }

  .prev-next-next {
    justify-content: flex-start;
  }

  .prev-next-next .prev-next-body {
    text-align: left;
  }
}

/* ============================================================
   Article actions (floating buttons)
   ============================================================ */
.article-actions {
  position: static;
  padding: 0 48px;
  margin: 24px 0 8px;
}

.article-actions-inner {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}

.action-btn:hover {
  background: var(--color-bg-subtle);
  color: var(--color-primary);
  border-color: var(--color-primary);
  text-decoration: none;
}

.action-btn.active {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-primary-bg);
}

@media (min-width: 768px) {
  .article-actions {
    position: fixed;
    top: 66px;
    right: 20px;
    z-index: 1000;
    margin: 0;
    padding: 0;
    width: auto;
    transition: opacity 0.25s ease;
    opacity: 1;
  }

  .article-actions.hidden {
    opacity: 0;
    pointer-events: none;
  }

  .article-actions-inner {
    flex-direction: row;
    gap: 4px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  }
}

@media (max-width: 767.98px) {
  .article-actions {
    padding: 0 16px;
  }
}

/* ============================================================
   Favorites
   ============================================================ */
.favorite-item {
  position: relative;
}

.favorite-item .nav-link {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 0.3rem 1rem 0.3rem 0.5rem !important;
  color: var(--color-text) !important;
  background-color: transparent !important;
}

.favorite-item .nav-link .sidebar-title-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 8px;
  width: 200px;
}

.delete-favorite-icon {
  flex-shrink: 0;
  font-size: 1.1em;
  color: var(--color-text-muted);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  margin-left: auto;
}

.favorite-item:hover .delete-favorite-icon {
  opacity: 1;
}

.add-to-favorites-btn.active .ri-flag-line {
  color: var(--color-primary);
}

.favorite-item .nav-link:hover {
  background-color: var(--color-primary-subtle) !important;
  color: var(--color-primary) !important;
}

.favorite-item .nav-link.active {
  color: var(--color-primary-dark) !important;
  font-weight: 500;
  border-right: 3px solid var(--color-primary);
  background-color: transparent !important;
}

.favorite-item .nav-link.active i.ri-flag-line {
  color: var(--color-primary-dark) !important;
}

.favorite-item .nav-link.active:hover {
  color: var(--color-primary) !important;
}

html:not(.has-favorites) .favorites-heading,
html:not(.has-favorites) #favoritesList,
html:not(.has-favorites) .favorites-separator {
  display: none !important;
}

html.has-favorites .favorites-heading,
html.has-favorites .favorites-separator {
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
}

html.has-favorites.favorites-ready .favorites-heading,
html.has-favorites.favorites-ready .favorites-separator {
  opacity: 1;
}

html.has-favorites #favoritesList {
  min-height: var(--favorites-reserved-height, 102px);
  max-height: 220px;
  overflow-y: auto;
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
}

html.has-favorites.favorites-ready #favoritesList {
  opacity: 1;
}

/* ============================================================
   Table of Contents
   ============================================================ */
#tableOfContents {
  position: fixed;
  top: 160px;
  right: 20px;
  width: 210px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 16px;
  z-index: 999;
  transition:
    opacity 0.3s ease-in-out,
    transform 0.3s ease-in-out;
  opacity: 1;
  transform: translateX(0);
  border: 1px solid var(--color-border);
}

.toc-title {
  font-size: 0.72em;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.toc-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.toc-nested {
  margin-top: 0.25rem;
}

.toc-item {
  margin-bottom: 0.4rem;
}

.toc-link {
  display: block;
  color: var(--color-text-secondary);
  text-decoration: none;
  font-size: 0.83em;
  line-height: 1.4;
  padding: 0.2rem 0;
  transition: color 0.15s ease;
}

.toc-link:hover {
  color: var(--color-primary);
}

.toc-link.active {
  color: var(--color-primary);
  font-weight: 600;
  border-left: 2px solid var(--color-primary);
  padding-left: 0.5rem;
  margin-left: -0.5rem;
}

.toc-level-2 .toc-link {
  font-weight: 500;
}

.toc-level-3 .toc-link {
  font-size: 0.78em;
  padding-left: 0.75rem;
}

.toc-level-4 .toc-link {
  font-size: 0.73em;
  padding-left: 1.25rem;
  color: var(--color-text-muted);
}

@media (max-width: 1365.98px) {
  #tableOfContents {
    display: none !important;
  }
}

@media (min-width: 1366px) {
  main.col-lg-10 {
    padding-right: 230px !important;
  }

  main .content-wrapper {
    max-width: var(--content-max-width);
  }
}

/* ============================================================
   Footer
   ============================================================ */
footer {
  text-align: left;
  padding: 1rem 0 1.25rem;
  font-size: 0.8em;
  color: var(--color-text-muted);
  margin-top: auto;
  border-top: 1px solid var(--color-border);
}

header {
  text-align: left;
  margin-bottom: 1rem;
  padding-left: 0;
}

/* ============================================================
   Offcanvas
   ============================================================ */
.collapse,
.collapsing {
  transition: none !important;
}

.offcanvas {
  transition: none !important;
}

/* ============================================================
   Sitemap
   ============================================================ */
.sitemap-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.sitemap-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px dashed var(--color-border);
}

.sitemap-heading {
  font-size: 2.8em;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.sitemap-subtitle {
  font-size: 1.2em;
  color: var(--color-text-muted);
  font-weight: 400;
}

.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.sitemap-section {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  transition: all 0.2s ease;
}

.sitemap-section:hover {
  box-shadow: 0 4px 12px rgba(26, 122, 79, 0.08);
  border-color: var(--color-primary);
}

.sitemap-section-title {
  font-size: 1.1em;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-border-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sitemap-section-title i {
  color: var(--color-primary);
  font-size: 1.1em;
}

.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sitemap-list-item {
  margin-bottom: 0.4rem;
}

.sitemap-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-text-secondary);
  font-size: 0.95em;
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
}

.sitemap-link:hover {
  background-color: var(--color-primary-subtle);
  color: var(--color-primary);
  padding-left: 0.75rem;
}

.sitemap-link i {
  font-size: 1em;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.sitemap-link:hover i {
  color: var(--color-primary);
}

.sitemap-single-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-primary);
  font-size: 0.9em;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: var(--color-primary-bg);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.sitemap-single-link:hover {
  background: var(--color-primary-subtle);
}

.content-wrapper ul.sitemap-list {
  padding-left: 0;
}

.content-wrapper .sitemap-section-title {
  padding: 0;
  border: 0;
  font-size: 18px;
}

.content-wrapper .sitemap-section-title i {
  color: var(--color-text-muted);
  font-size: 18px;
}

.content-wrapper .sitemap-list-item {
  margin: 0;
}

.content-wrapper .sitemap-list-item a {
  padding: 0;
}

/* ============================================================
   Misc
   ============================================================ */
.bg-dark {
  padding-top: 0;
  padding-bottom: 0;
}

/* ============================================================
   Homepage
   ============================================================ */
.home-page {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 48px 80px;
}

@media (max-width: 767.98px) {
  .home-page {
    padding: 0 16px 60px;
  }
}

/* Hero */
.home-hero {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 56px;
}

.home-hero-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.home-hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0 0 16px;
  border: none;
  padding: 0;
}

.home-hero-desc {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  max-width: 600px;
  margin: 0 0 28px;
}

.home-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Section */
.home-section {
  margin-bottom: 56px;
}

.home-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
  margin: 0 0 6px;
  border: none;
  padding: 0;
}

.home-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 8px;
}

.home-section-desc {
  color: var(--color-text-secondary);
  margin: 0 0 24px;
  font-size: 0.95rem;
}

/* Buttons */
.home-btn-primary,
.content-wrapper .home-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--color-primary);
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 20px;
  border-radius: 20px;
  text-decoration: none !important;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.home-btn-primary:hover,
.content-wrapper .home-btn-primary:hover {
  background: var(--color-primary-dark);
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 3px 10px rgba(26, 122, 79, 0.35);
}

.home-btn-ghost,
.content-wrapper .home-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--color-text-secondary) !important;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 20px;
  border-radius: 20px;
  border: 1px solid var(--color-border);
  text-decoration: none !important;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.home-btn-ghost:hover,
.content-wrapper .home-btn-ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary) !important;
  text-decoration: none !important;
}

.home-btn-ghost-dark,
.content-wrapper .home-btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary) !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.home-btn-ghost-dark:hover,
.content-wrapper .home-btn-ghost-dark:hover {
  color: var(--color-primary-dark) !important;
  text-decoration: none !important;
}

/* 3-col cards (New here?) */
.home-cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 767.98px) {
  .home-cards-3 {
    grid-template-columns: 1fr;
  }
}

.home-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  background: var(--color-bg);
}

.home-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 2px 12px rgba(26, 122, 79, 0.08);
  text-decoration: none !important;
}

.home-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--color-primary-bg);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.home-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.home-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text) !important;
  line-height: 1.3;
}

.home-card-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Menu type grid */
.home-menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .home-menu-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 550px) {
  .home-menu-grid {
    grid-template-columns: 1fr;
  }
}

.home-menu-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  text-decoration: none;
  background: var(--color-bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.home-menu-card:hover {
  border-color: var(--color-primary);
  box-shadow: 0 4px 16px rgba(26, 122, 79, 0.1);
  transform: translateY(-1px);
  text-decoration: none !important;
}

.home-menu-icon {
  font-size: 22px;
  color: var(--color-primary);
  line-height: 1;
}

.home-menu-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--color-text) !important;
}

.home-menu-desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.55;
}

/* Popular guides list */
.home-guides {
  margin-top: 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  overflow: hidden;
}

.home-guide-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  color: var(--color-text-secondary) !important;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  border-bottom: 1px solid var(--color-border-light);
  transition: background 0.1s ease, color 0.1s ease;
}

.home-guide-item:last-child {
  border-bottom: none;
}

.home-guide-item > i:first-child {
  font-size: 16px;
  color: var(--color-text-muted);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.home-guide-item > span {
  flex: 1;
  min-width: 0;
}

.home-guide-arrow {
  font-size: 16px;
  color: var(--color-border);
  flex-shrink: 0;
  transition: color 0.1s ease, transform 0.1s ease;
}

.home-guide-item:hover {
  background: #f8faf9;
  color: var(--color-primary) !important;
  text-decoration: none !important;
}

.home-guide-item:hover > i:first-child {
  color: var(--color-primary);
}

.home-guide-item:hover .home-guide-arrow {
  color: var(--color-primary);
  transform: translateX(2px);
}

/* Support section */
.home-support-section {
  margin-top: 24px;
}

.home-support-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .home-support-grid {
    grid-template-columns: 1fr;
  }
}

.home-support-card {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-support-icon {
  font-size: 28px;
  color: var(--color-primary);
  line-height: 1;
}

.home-support-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.home-support-card p {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* ============================================================
   Common first questions page
   ============================================================ */
body.page-common-first-questions .content-wrapper {
  max-width: 820px;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

body.page-common-first-questions .content-wrapper > h1 {
  margin-bottom: 1.6rem;
}

body.page-common-first-questions .content-wrapper > h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 2.2rem;
  margin-bottom: 0.9rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  border: 1px solid rgba(26, 122, 79, 0.22);
  border-radius: 999px;
  background: var(--color-primary-bg);
}

body.page-common-first-questions .content-wrapper > h3::before {
  content: "FAQ";
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: rgba(26, 122, 79, 0.12);
}

body.page-common-first-questions .content-wrapper > h4 {
  margin-top: 1rem;
  margin-bottom: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--color-border);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, #ffffff 0%, #f7faf8 100%);
  font-size: 1.02rem;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

body.page-common-first-questions .content-wrapper > h4::before {
  content: "Q";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
  border-radius: 50%;
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  background: var(--color-primary);
}

body.page-common-first-questions .content-wrapper > h4 + p,
body.page-common-first-questions .content-wrapper > h4 + ul {
  margin-top: 0;
  margin-bottom: 1rem;
  padding: 0.95rem 1rem 1.05rem;
  border: 1px solid var(--color-border);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: #fff;
}

body.page-common-first-questions .content-wrapper > h4 + ul {
  padding-left: 2.25rem;
}

body.page-common-first-questions .content-wrapper > hr {
  margin: 2rem 0 1.4rem;
  border-top-style: solid;
  border-top-color: var(--color-border-light);
}

@media (max-width: 767.98px) {
  body.page-common-first-questions .content-wrapper {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.page-common-first-questions .content-wrapper > h4 {
    padding: 0.8rem 0.85rem;
  }

  body.page-common-first-questions .content-wrapper > h4 + p,
  body.page-common-first-questions .content-wrapper > h4 + ul {
    padding: 0.8rem 0.85rem 0.95rem;
  }
}

/* ============================================================
   How to install Navi+ page
   ============================================================ */
body.page-how-to-install-navi .content-wrapper {
  max-width: 820px;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

body.page-how-to-install-navi .content-wrapper > h1 {
  margin-bottom: 1rem;
}

body.page-how-to-install-navi .content-wrapper > h1 + p {
  margin-bottom: 1.5rem;
  padding: 1rem 1.15rem;
  border-left: 4px solid var(--color-primary);
  border-radius: 10px;
  background: var(--color-primary-bg);
}

.install-step {
  margin-bottom: 1rem;
  padding: 1.2rem 1.4rem 1.2rem;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: #fff;
}

.install-step > h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
  padding: 0.45rem 0.95rem;
  font-size: 0.93rem;
  font-weight: 700;
  color: var(--color-primary);
  border: 1px solid rgba(26, 122, 79, 0.24);
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f1f8f4 100%);
}

.install-step > h3::before {
  content: "STEP";
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  color: #fff;
  background: var(--color-primary);
}

.install-step > p,
.install-step > ol,
.install-step > ul {
  margin-bottom: 0.6rem;
}

.install-step > p:last-child,
.install-step > ol:last-child,
.install-step > ul:last-child {
  margin-bottom: 0;
}

.install-step > p strong,
.install-step > ul strong {
  color: var(--color-text);
}

@media (max-width: 767.98px) {
  body.page-how-to-install-navi .content-wrapper {
    padding-left: 16px;
    padding-right: 16px;
  }

  .install-step {
    padding: 1rem 1rem 1rem;
  }
}

/* docs.naviplus.io home — article count on section cards (2026-09-16) */
.home-menu-count {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a8f98;
}

/* ── docs.naviplus.io article components (2026-09-16) ─────────────────────
   .np-tabs      : per-platform tabs inside one article (Shopify / WordPress / Wix / Other)
   .np-callout   : Note / Tip / Caution (Polaris labels only — no "Warning" / "Important")
   .np-platform  : platform badge line under the title
   .np-help-foot : "Was this helpful?" + "Still stuck?" block, same on every article
*/
.np-platform { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin:0 0 1.25rem; font-size:12px; color:var(--color-text-muted); }
.np-platform span { border:1px solid var(--color-border); border-radius:999px; padding:2px 10px; background:#fff; color:var(--color-text-secondary); }

.np-tabs { margin:1rem 0 1.5rem; border:1px solid var(--color-border); border-radius:10px; overflow:hidden; }
.np-tabs-nav { display:flex; flex-wrap:wrap; gap:0; border-bottom:1px solid var(--color-border); background:var(--color-bg-subtle, #f6f7f8); }
.np-tabs-nav button { background:none; border:0; border-bottom:2px solid transparent; padding:10px 16px; font:inherit; font-size:14px; font-weight:500; color:var(--color-text-secondary); cursor:pointer; }
.np-tabs-nav button[aria-selected="true"] { color:var(--color-primary); border-bottom-color:var(--color-primary); background:#fff; }
.np-tabs-panel { padding:4px 18px 8px; }
.np-tabs-panel[hidden] { display:none; }
.np-tabs-panel > :first-child { margin-top:0.75rem; }

.np-callout { display:block; margin:1.1rem 0; padding:0 0 0 14px; border-left:2px solid var(--color-border); background:none; border-radius:0; font-size:14.5px; line-height:1.6; color:var(--color-text-secondary); }
.np-callout .np-callout-label { font-weight:600; color:var(--color-text); text-transform:none; letter-spacing:0; font-size:14.5px; }
.np-callout .np-callout-label::after { content:" — "; color:var(--color-text-muted); font-weight:400; }
.np-callout p { display:inline; margin:0; }
.np-callout.caution { border-left-color:#c2410c; }

.np-help-foot { margin:2.5rem 0 .5rem; padding:16px 0 0; border:0; border-top:1px solid var(--color-border); background:none; border-radius:0; font-size:14.5px; }
.np-help-foot .np-foot-ask { margin:0 0 6px; display:flex; flex-wrap:wrap; align-items:center; gap:8px; color:var(--color-text-secondary); }
.np-help-foot button { font:inherit; font-size:13px; padding:3px 12px; border-radius:999px; border:1px solid var(--color-border); background:#fff; cursor:pointer; color:var(--color-text-secondary); }
.np-help-foot button:hover { border-color:#111827; color:#111827; }
.np-help-foot button:disabled { opacity:.5; cursor:default; }
.np-help-foot .np-foot-contact { margin:0; color:var(--color-text-muted); font-size:13.5px; line-height:1.6; max-width:70ch; }
.np-help-foot .np-thanks { color:var(--color-text-muted); font-size:13px; }

/* Footer trang: 1 hàng link, không lặp chữ Navi+ */
footer > .np-site-foot { max-width:var(--content-max-width); margin-left:auto !important; margin-right:auto !important; padding:0 48px; box-sizing:border-box; width:100%; display:flex; flex-wrap:wrap; align-items:center; gap:0 10px; margin:0; font-size:13px; color:var(--color-text-muted); }
footer .np-site-foot a { color:var(--color-text-secondary); text-decoration:none; }
footer .np-site-foot a:hover { color:var(--color-primary); text-decoration:underline; }
footer .np-site-foot .sep { color:var(--color-border); }
footer .np-site-foot .np-foot-made { margin-left:auto; }

/* ── docs: bước đánh số to (np-steps), ảnh có caption (np-figure), khối gập (np-details) ── */
.content-wrapper .np-steps ol { list-style:none; counter-reset:npstep; padding-left:0; margin:1rem 0 1.75rem; border-left:2px solid var(--color-border); margin-left:13px; }
.content-wrapper .np-steps ol > li { counter-increment:npstep; position:relative; padding:0 0 22px 40px; margin:0; border:0; background:none; font-size:16.5px; line-height:1.65; }
.content-wrapper .np-steps ol > li:last-child { padding-bottom:4px; }
.content-wrapper .np-steps ol > li::before { content:counter(npstep); position:absolute; left:-15px; box-sizing:border-box; top:0; width:28px; height:28px; border-radius:50%; background:#111827; border:0; color:#fff; font-weight:700; font-size:14px; display:flex; align-items:center; justify-content:center; }
.content-wrapper .np-steps ol > li > p { margin:0; }

.np-figure { margin:1.1rem 0 1.75rem; padding:12px; background:#f6f8fb; border:1px solid var(--color-border); border-radius:14px; }
.np-figure img { display:block; width:100%; height:auto; border-radius:8px; background:#fff; }
.np-figure figcaption { margin:10px 4px 2px; font-size:13px; line-height:1.4; color:var(--color-text-secondary); font-style:normal; text-align:left; }

.np-details { margin:1.25rem 0; border:1px solid var(--color-border); border-radius:10px; background:var(--color-bg-subtle, #f6f7f8); }
.np-details summary { cursor:pointer; padding:12px 16px; font-weight:600; font-size:14.5px; list-style:none; display:flex; align-items:center; gap:8px; }
.np-details summary::-webkit-details-marker { display:none; }
.np-details summary::before { content:"▸"; font-size:12px; color:var(--color-text-muted); transition:transform .15s; }
.np-details[open] summary::before { transform:rotate(90deg); }
.np-details[open] summary { border-bottom:1px solid var(--color-border); }
.np-details > :not(summary) { padding:0 16px; }
.np-details ul { margin:12px 0 12px 18px; font-size:14.5px; }

/* np-tabs: label + chips NẰM CÙNG 1 DÒNG; chip chọn = viền đậm + chữ đen (không nền đen đặc) */
.np-tabs { border:0; overflow:visible; margin:1.25rem 0; }
.np-tabs-head { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.np-tabs-label { font-size:14.5px; font-weight:600; color:var(--color-text); margin:0; }
.np-tabs-nav { display:flex; flex-wrap:wrap; gap:8px; padding:0; margin:0; border:0; background:none; border-radius:0; }
.np-tabs-nav button { border:1px solid var(--color-border); border-radius:999px; padding:5px 14px; font-size:14px; font-weight:500; color:var(--color-text-secondary); background:#fff; }
.np-tabs-nav button:hover { border-color:#9aa3af; color:var(--color-text); }
.np-tabs-nav button[aria-selected="true"] { background:#fff; border-color:#111827; color:#111827; font-weight:600; box-shadow:inset 0 0 0 1px #111827; }
.np-tabs-panel { padding:12px 0 0; }

/* Next steps / Additional resources: mục kết bài — nhỏ, không đậm như H2 nội dung, cách xa content (Khôi 2026-09-16) */
.content-wrapper h2#next-steps,
.content-wrapper h2#additional-resources {
  margin-top: 3.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border);
  border-bottom: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}
.content-wrapper h2#additional-resources { margin-top: 2rem; }
.content-wrapper h2#next-steps + ul,
.content-wrapper h2#additional-resources + ul { margin-top: .5rem; }
.content-wrapper h2#next-steps + ul li,
.content-wrapper h2#additional-resources + ul li { font-size: 14.5px; }

/* Common first questions: 6 câu cơ bản dạng thẻ (Khôi 17/09 — câu còn lại nằm ở mục FAQ riêng) */
.np-qa { display:grid; grid-template-columns:repeat(2,1fr); gap:14px; margin:1.25rem 0 1.5rem; }
.np-qa a { display:block; padding:16px 18px; border:1px solid var(--color-border); border-radius:12px; background:#fff; text-decoration:none; color:inherit; transition:border-color .15s, box-shadow .15s; }
.np-qa a:hover { border-color:var(--color-primary); box-shadow:0 2px 10px rgba(15,23,42,.06); text-decoration:none; }
.np-qa .q { display:flex; width:100%; align-items:flex-start; gap:9px; font-weight:600; font-size:15px; line-height:1.4; }
.np-qa .q i { color:var(--color-primary); font-size:17px; line-height:1.35; }
.np-qa .a { display:block; margin:7px 0 0 26px; font-size:13.5px; line-height:1.55; color:var(--color-text-secondary); }
.np-qa .more { display:block; margin:8px 0 0 26px; font-size:12.5px; color:var(--color-primary); font-weight:500; }
@media (max-width:760px){ .np-qa { grid-template-columns:1fr; } }

/* Sidebar: hàng mục cha = nút [+]/[−] riêng + link tới trang tổng quan (TASK00954) */
.sidebar-parent-row { align-items:center !important; gap:0; padding-right:4px; }
.sidebar-parent-row .sidebar-folder-toggle { flex:0 0 auto; border:0; background:none; padding:4px 0 4px 2px; line-height:1; color:var(--color-text-muted); cursor:pointer; font-size:15px; }
.sidebar-parent-row .sidebar-folder-toggle:hover { color:var(--color-text); }
.sidebar-parent-row .sidebar-parent-link { flex:1 1 auto; padding-left:0; margin-left:-7px; font-size:15px; font-weight:600; color:var(--color-text); }
.sidebar-parent-row.active .sidebar-parent-link { font-weight:700; color:var(--color-primary); }

/* Trang tổng quan của MỤC (section landing): đoạn dẫn + danh sách bài con (TASK00954) */
.np-section-intro { font-size:16.5px; line-height:1.7; color:var(--color-text-secondary); max-width:var(--content-text-width, 760px); margin:0 0 1.75rem; }
.np-section-list { display:grid; gap:0; margin:0 0 1.5rem; border-top:1px solid var(--color-border); }
.np-section-list { max-width:var(--content-text-width, 760px); }
.np-section-list a { display:grid; grid-template-columns:28px 1fr auto; align-items:baseline; gap:0 14px; padding:15px 4px; border-bottom:1px solid var(--color-border); text-decoration:none; color:inherit; }
.np-section-list a:hover { background:#fafbfc; text-decoration:none; }
.np-section-list .n { font:600 13px/1.5 var(--font-mono, ui-monospace,Menlo,monospace); color:var(--color-text-muted); }
.np-section-list .t { font-size:16px; font-weight:600; color:var(--color-text); }
.np-section-list .d { grid-column:2/4; font-size:14px; line-height:1.55; color:var(--color-text-secondary); margin-top:3px; }
.np-section-list .go { color:var(--color-text-muted); font-size:14px; }
.np-section-list a:hover .go, .np-section-list a:hover .t { color:var(--color-primary); }

/* Nhãn cụm chức năng trên trang tổng quan mục (TASK00990) — không phải link, chỉ chia nhóm */
.np-section-group-label { padding:22px 4px 6px; font:600 12px/1.4 var(--font-sans, inherit); text-transform:uppercase; letter-spacing:.05em; color:var(--color-text-muted); border-bottom:none; }
.np-section-group-label:first-child { padding-top:2px; }

/* Sidebar active: nền chạy hết bề rộng cột trái (Khôi 17/09) — trước đó nền chỉ ôm chữ, lệch mép */
.sidebar .nav-item { position:relative; }
.sidebar .nav-link,
.sidebar .sidebar-parent-row { padding-left:16px; padding-right:12px; }
.sidebar .sidebar-children-list .nav-link { padding-left:14px; }
.sidebar .nav-link.active,
.sidebar .sidebar-parent-row.active { position:relative; background-color:transparent !important; border-right:0; }
.sidebar .nav-link.active::before,
.sidebar .sidebar-parent-row.active::before { content:""; position:absolute; inset:0 -100vw 0 -100vw; background:var(--color-primary-subtle); z-index:-1; }
.sidebar .sidebar-parent-row.active .sidebar-parent-link.active { background:none !important; }
.sidebar .sidebar-parent-row.active .sidebar-folder-toggle { color:var(--color-primary); }
/* Hover: cùng kiểu nền full width như active, chỉ nhạt hơn (Khôi 17/09) */
.sidebar .nav-link:hover::before,
.sidebar .sidebar-parent-row:hover::before { content:""; position:absolute; inset:0 -100vw 0 -100vw; background:rgba(26,122,79,.05); z-index:-1; }
.sidebar .nav-link.active:hover::before,
.sidebar .sidebar-parent-row.active:hover::before { background:var(--color-primary-subtle); }

/* Dòng "Next:" cuối bài — thay 2 mục Next steps / Additional resources (Khôi 17/09) */
.content-wrapper .np-next { margin:2.25rem 0 0; padding-top:1.1rem; border-top:1px solid var(--color-border); font-size:15px; }
.content-wrapper .np-next strong { font-weight:600; }


/* Footer: dùng ĐÚNG khuôn của cột nội dung (sidebar % + chừa TOC) để chữ thẳng hàng với bài */
@media (min-width: 768px)  { footer { padding-left: 25%; } }
@media (min-width: 992px)  { footer { padding-left: 16.6667%; } }
@media (min-width: 1366px) { footer { padding-right: 230px; } }
@media (max-width: 767.98px) { footer > .np-site-foot { padding: 0 16px; } }

/* Ảnh trong stepper: full bề rộng cột nội dung; ảnh dọc (điện thoại) căn giữa trên nền khung */
.np-steps .np-figure { margin:.9rem 0 .25rem; }
.np-figure--phone img { max-width:420px; margin:0 auto; }

/* Ảnh GIF của trang "Which menu fits your store": nền khung lấy đúng màu nền của chính ảnh
   (đo vành ngoài frame đầu của 3 file GIF → trung bình rgb(235,239,242)) để ảnh hoà vào khung,
   không còn thấy ranh giới giữa ảnh và nền. */
.np-figure--blend { background:#ebeff2; border-color:#e3e8ed; }
.np-figure--blend img { background:#ebeff2; }

/* Nút "xem thật" sang showcase — nút primary to, dùng chung cho mọi bài Choose a menu.
   Bấm là mở showcase đúng khung máy của loại menu đang nói (?mode=desktop|mobile). */
.np-live { display:flex; align-items:center; gap:18px; margin:1.4rem 0 1.6rem; padding:16px 18px;
  border:1px solid var(--color-border); border-radius:12px; background:var(--color-primary-bg); }
.np-live .np-live-text { flex:1 1 auto; font-size:14.5px; line-height:1.45; color:var(--color-text); }
.np-live-btn, .np-live-line a {
  display:inline-flex; align-items:center; gap:8px; white-space:nowrap;
  padding:12px 22px; border-radius:10px; border:1px solid var(--color-primary-dark);
  background:var(--color-primary); color:#fff !important; font-size:15px; font-weight:600;
  text-decoration:none !important; box-shadow:0 1px 2px rgba(15,92,58,.25); }
.np-live-btn:hover, .np-live-line a:hover { background:var(--color-primary-hover); color:#fff !important; }
.np-live-line { margin:.5rem 0 .3rem; }
@media (max-width:560px) {
  .np-live { flex-direction:column; align-items:stretch; gap:12px; }
  .np-live-btn, .np-live-line a { justify-content:center; }
}
