/* NativeERP shared chrome (nx-chrome v2, 2026-12-02).
   - Top bar for Native Rent and Screen Flow components: the Native Planner
     np-nav pattern (64px bar, 44px controls, drawer below 1200px with 48px
     accordion rows, search at the drawer top, CTAs pinned at the bottom).
   - One shared footer for Native Rent, Native Planner and Screen Flow components.
   - Guide chrome at phone widths: 44px rows for side nav, Next/Previous and the
     "In this chapter" and "On this page" disclosures.
   Framework-free and scoped to .nx-* so it does not touch Bootstrap (Planner)
   or the Rent site.css. Light and dark via prefers-color-scheme. */

:root {
  --nx-h: 64px;
  --nx-bg: #ffffff;
  --nx-bd: #e5e7eb;
  --nx-tx: #374151;
  --nx-tx-strong: #111827;
  --nx-ac: #5b21b6;
  --nx-menu-bg: #ffffff;
  --nx-menu-hover: #f3eeff;
  --nx-cur-bg: #f3eeff;
  --nx-pri-bg: #5b21b6;
  --nx-pri-tx: #ffffff;
  --nx-pri-hover: #4c1d95;
  --nx-well: #ffffff;
  --nx-well-bd: #9ca3af;
  --nx-ft-bg: #111827;
  --nx-ft-tx: #e5e7eb;
  --nx-ft-mu: #9ca3af;
  --nx-ft-ln: #ffffff;
  --nx-ft-bd: #374151;
}
@media (prefers-color-scheme: dark) {
  :root {
    --nx-bg: #0b0b12;
    --nx-bd: #2a2a36;
    --nx-tx: #e5e7eb;
    --nx-tx-strong: #ffffff;
    --nx-ac: #b79cff;
    --nx-menu-bg: #1c1630;
    --nx-menu-hover: #2b2350;
    --nx-cur-bg: #2b2350;
    --nx-pri-bg: #b79cff;
    --nx-pri-tx: #0b0b12;
    --nx-pri-hover: #d4c4ff;
    --nx-well: #0b0b12;
    --nx-well-bd: #52525b;
    --nx-ft-bg: #15101f;
    --nx-ft-bd: #2a2a36;
  }
}

/* ---------- Top bar ---------- */
html.nx-has-bar { scroll-padding-top: calc(var(--nx-h) + 12px); }
.nx-bar {
  position: sticky; top: 0; z-index: 1030;
  height: var(--nx-h);
  background: var(--nx-bg);
  border-bottom: 1px solid var(--nx-bd);
  font: 500 15px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.nx-bar *, .nx-bar *::before, .nx-bar *::after { box-sizing: border-box; }
.nx-bar ul { margin: 0; padding: 0; list-style: none; }
.nx-bar li { margin: 0; }
.nx-bar-inner {
  height: var(--nx-h);
  max-width: 1400px; margin: 0 auto;
  padding: 0 16px;
  display: flex; flex-wrap: nowrap; align-items: center; gap: 8px;
}
.nx-brand {
  display: inline-flex; align-items: center; min-height: 44px;
  margin: 0 8px 0 0; flex: 0 0 auto;
  text-decoration: none; color: var(--nx-tx-strong); line-height: 0;
}
.nx-brand img { height: 40px; width: auto; display: block; }
.nx-brand .nx-logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .nx-brand .nx-logo-light { display: none; }
  .nx-brand .nx-logo-dark { display: block; }
}
.nx-brand .nx-wordmark { font: 700 19px/1.1 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: -0.01em; white-space: nowrap; }
.nx-brand[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--nx-ac); }

.nx-toggler {
  width: 44px; height: 44px; flex: 0 0 44px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; color: var(--nx-tx-strong);
  border: 1px solid var(--nx-bd); border-radius: 6px; cursor: pointer;
}
.nx-toggler-icon, .nx-toggler-icon::before, .nx-toggler-icon::after {
  display: block; width: 22px; height: 2px; background: currentColor; border-radius: 1px; content: "";
}
.nx-toggler-icon { position: relative; }
.nx-toggler-icon::before { position: absolute; top: -7px; left: 0; }
.nx-toggler-icon::after { position: absolute; top: 7px; left: 0; }
.nx-toggler[aria-expanded="true"] .nx-toggler-icon { background: transparent; }
.nx-toggler[aria-expanded="true"] .nx-toggler-icon::before { top: 0; transform: rotate(45deg); }
.nx-toggler[aria-expanded="true"] .nx-toggler-icon::after { top: 0; transform: rotate(-45deg); }

.nx-link {
  display: flex; align-items: center; min-height: 44px; padding: 0 12px;
  font: inherit; font-weight: 500; white-space: nowrap; text-align: left;
  color: var(--nx-tx); background: transparent; border: 0; border-radius: 6px;
  text-decoration: none; cursor: pointer;
}
.nx-link:hover, .nx-link:focus { color: var(--nx-ac); }
.nx-erp-link { font-weight: 400; }
.nx-group-toggle::after {
  content: ""; width: 7px; height: 7px; margin: 0 2px 3px 8px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .15s ease;
}
.nx-group.nx-open > .nx-group-toggle::after { transform: rotate(-135deg); margin-bottom: -3px; }
.nx-link.nx-current,
.nx-group.nx-current-group > .nx-group-toggle {
  font-weight: 700; color: var(--nx-tx-strong);
  box-shadow: inset 0 -3px 0 var(--nx-ac); border-radius: 6px 6px 0 0;
}
.nx-dd a {
  display: flex; align-items: center; min-height: 44px; padding: 0 16px;
  color: var(--nx-tx); text-decoration: none; white-space: nowrap;
  border-left: 3px solid transparent;
}
.nx-dd a:hover, .nx-dd a:focus { background: var(--nx-menu-hover); color: var(--nx-tx-strong); }
.nx-dd a[aria-current="page"] {
  font-weight: 700; color: var(--nx-tx-strong);
  background: var(--nx-cur-bg); border-left-color: var(--nx-ac);
}
.nx-dd a[target="_blank"]::after { content: "\2197"; margin-left: 6px; font-size: .85em; opacity: .75; }

/* Nested "Retiring components" accordion, last in the Components menu.
   Closed by default. Opens when the current page is one of its items. */
.nx-sub { width: 100%; }
.nx-sub-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; min-height: 44px; padding: 0 16px;
  font: inherit; font-weight: 500; text-align: left; white-space: nowrap;
  color: var(--nx-tx); background: transparent; border: 0; cursor: pointer;
}
.nx-sub-toggle:hover, .nx-sub-toggle:focus { background: var(--nx-menu-hover); color: var(--nx-tx-strong); }
.nx-sub-toggle::after {
  content: ""; width: 7px; height: 7px; margin: 0 2px 3px 8px; flex: 0 0 auto;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .15s ease;
}
.nx-sub.nx-open > .nx-sub-toggle::after { transform: rotate(-135deg); margin-bottom: -3px; }
.nx-sub.nx-current-group > .nx-sub-toggle { font-weight: 700; color: var(--nx-tx-strong); }
.nx-sub-dd { display: none; }
.nx-sub.nx-open > .nx-sub-dd { display: block; }
.nx-sub-dd a { padding-left: 28px; }
#nx-dd-components { min-width: 280px; }


/* Search: the Rent search form, reused */
.nx-bar .search-form { position: relative; margin: 0; min-width: 0; max-width: none; flex: 0 0 220px; width: 220px; }
.nx-bar .search-form input[type="search"] {
  width: 100%; min-height: 44px; padding: 8px 12px; font: 400 15px/1.2 inherit; font-family: inherit;
  background: var(--nx-well); color: var(--nx-tx-strong);
  border: 1px solid var(--nx-well-bd); border-radius: 8px;
}
.nx-bar .search-results { left: auto; right: 0; min-width: 320px; z-index: 1040; }

/* CTAs */
.nx-cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 16px; font-weight: 600; white-space: nowrap;
  border-radius: 6px; text-decoration: none; line-height: 1.2;
}
.nx-cta-primary { background: var(--nx-pri-bg); color: var(--nx-pri-tx); border: 1px solid var(--nx-pri-bg); }
.nx-cta-primary:hover { background: var(--nx-pri-hover); border-color: var(--nx-pri-hover); color: var(--nx-pri-tx); }
.nx-cta-secondary { background: transparent; color: var(--nx-ac); border: 1px solid var(--nx-ac); }
.nx-cta-secondary:hover { background: var(--nx-menu-hover); color: var(--nx-ac); }

.nx-bar a:focus-visible, .nx-bar button:focus-visible, .nx-bar input:focus-visible,
.nx-footer a:focus-visible, .nx-footer button:focus-visible {
  outline: 2px solid var(--nx-ac); outline-offset: 2px; box-shadow: none;
}
.nx-footer a:focus-visible, .nx-footer button:focus-visible { outline-color: #ffffff; }

/* Desktop, 1200px and up */
@media (min-width: 1200px) {
  .nx-toggler, .nx-cta-bar { display: none !important; }
  .nx-menu { display: flex; flex: 1 1 auto; align-items: center; gap: 8px; height: var(--nx-h); }
  .nx-links { display: flex; align-items: center; gap: 2px; }
  .nx-group { position: relative; }
  .nx-dd {
    display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 1035;
    min-width: 240px; padding: 6px 0;
    background: var(--nx-menu-bg); border: 1px solid var(--nx-bd); border-radius: 8px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .14);
  }
  .nx-group.nx-open > .nx-dd { display: block; }
  .nx-bar .search-form { margin-left: auto; }
  .nx-ctas { display: flex; gap: 8px; flex: 0 0 auto; }
}

/* Drawer, below 1200px */
@media (max-width: 1199.98px) {
  .nx-bar-inner { padding: 0 12px; gap: 10px; }
  .nx-brand img { height: 36px; }
  .nx-cta-bar { margin-left: auto; padding: 0 14px; }
  .nx-menu {
    display: none;
    position: fixed; top: var(--nx-h); left: 0; right: 0;
    height: calc(100vh - var(--nx-h)); height: calc(100dvh - var(--nx-h));
    overflow-y: auto; overscroll-behavior: contain;
    background: var(--nx-bg); border-top: 1px solid var(--nx-bd);
    padding: 12px 16px 0;
    flex-direction: column; align-items: stretch;
  }
  .nx-menu.nx-show { display: flex; }
  .nx-bar .search-form { order: -1; flex: 0 0 auto; width: 100%; margin: 0 0 12px; z-index: 3; }
  .nx-bar .search-results { left: 0; right: 0; min-width: 0; }
  .nx-links { display: flex; flex-direction: column; width: 100%; margin-bottom: 16px; }
  .nx-links > li { width: 100%; border-bottom: 1px solid var(--nx-bd); }
  .nx-link { width: 100%; min-height: 48px; padding: 0 8px; white-space: normal; border-radius: 0; }
  .nx-group-toggle { justify-content: space-between; }
  .nx-group-toggle::after { width: 8px; height: 8px; margin: 0 6px 4px 12px; }
  .nx-link.nx-current, .nx-group.nx-current-group > .nx-group-toggle { box-shadow: inset 3px 0 0 var(--nx-ac); border-radius: 0; padding-left: 12px; }
  .nx-dd { display: none; margin: 0 0 8px; }
  .nx-group.nx-open > .nx-dd { display: block; }
  .nx-dd a { min-height: 48px; padding: 0 16px 0 24px; white-space: normal; }
  .nx-sub-toggle { min-height: 48px; padding: 0 16px 0 24px; white-space: normal; }
  .nx-sub-dd a { min-height: 48px; padding: 0 16px 0 36px; white-space: normal; }
  .nx-ctas {
    position: sticky; bottom: 0; z-index: 2;
    display: flex; flex-direction: column; gap: 10px;
    margin: auto -16px 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--nx-bg); border-top: 1px solid var(--nx-bd);
    box-shadow: 0 -6px 12px rgba(0, 0, 0, .06);
  }
  .nx-ctas .nx-cta { width: 100%; min-height: 48px; }
  .nx-brand[aria-current="page"] { box-shadow: none; }
  html.nx-open, html.nx-open body { overflow: hidden !important; }
}
@media (max-width: 479.98px) {
  .nx-brand .nx-wordmark { white-space: normal; font-size: 16px; line-height: 1.1; max-width: 120px; }
}
@media (max-width: 359.98px) {
  .nx-cta-bar { padding: 0 10px; font-size: 14px; }
  .nx-brand img { height: 32px; }
  .nx-brand .nx-wordmark { font-size: 16px; }
}

/* ---------- Shared footer ---------- */
footer.nx-footer,
.nx-footer {
  margin: 0; padding: 40px 16px calc(28px + env(safe-area-inset-bottom, 0px));
  background: var(--nx-ft-bg); color: var(--nx-ft-tx);
  border-top: 1px solid var(--nx-ft-bd);
  font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: left;
}
.nx-footer *, .nx-footer *::before, .nx-footer *::after { box-sizing: border-box; }
.nx-ft-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px 48px;
}
.nx-footer .nx-ft-name { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: #ffffff; }
.nx-footer address { margin: 0; font-style: normal; color: var(--nx-ft-tx); }
.nx-footer address span { display: block; }
.nx-footer a, .nx-footer .nx-translate { color: var(--nx-ft-ln); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.nx-footer a:hover, .nx-footer .nx-translate:hover { text-decoration-thickness: 2px; }
.nx-ft-nav { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 28px; }
.nx-ft-nav ul { margin: 0; padding: 0; list-style: none; }
.nx-ft-nav li { margin: 0; }
.nx-ft-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.nx-ft-label { display: block; margin: 0; padding-top: 10px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--nx-ft-mu); }
.nx-ft-legal {
  grid-column: 1 / -1; margin: 0; padding-top: 16px; border-top: 1px solid var(--nx-ft-bd);
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; font-size: 14px; color: var(--nx-ft-mu);
}
.nx-footer .nx-translate {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0;
  font: inherit; font-size: 14px; background: none; border: 0; cursor: pointer;
}
.nx-footer #google_translate_element:empty { display: none; }
@media (max-width: 720px) {
  .nx-ft-inner { grid-template-columns: 1fr; gap: 16px; }
  .nx-ft-nav { flex-direction: column; }
}

/* ---------- Guide chrome at phone widths (Rent guide and Screen Flow components) ---------- */
@media (max-width: 880px) {
  .nx-guide .toc { padding: 4px 16px; }
  .nx-guide .toc .toc-fold + .toc-fold,
  .nx-guide .toc .nx-chapter-fold + .toc-fold { border-top: 1px solid var(--bd, #e5e7eb); }
  .nx-guide .toc .toc-fold > summary {
    display: flex; align-items: center; justify-content: space-between;
    min-height: 44px; margin: 0;
  }
  .nx-guide .toc .toc-fold[open] > summary { margin-bottom: 4px; }
  .nx-guide .toc .toc-chapter { display: block; margin: 0; }
  .nx-guide .toc .toc-chapter > strong { display: none; }
  .nx-guide .toc a,
  .nx-guide .toc .toc-chapter span[aria-current] {
    display: flex; align-items: center; min-height: 44px; padding: 0 0 0 8px;
  }
  .nx-guide .toc .toc-chapter span[aria-current] { box-shadow: inset 2px 0 0 var(--ac, #5b21b6); color: var(--tx, #111827); font-weight: 700; }
  .nx-guide .toc .l3 { padding-left: 20px; }
  .nx-guide .guide-nav { gap: 8px 16px; }
  .nx-guide .guide-nav a { display: inline-flex; align-items: center; min-height: 44px; }
  .nx-guide .chapter-siblings a,
  .nx-guide .chapter-siblings [aria-current] { display: inline-flex; align-items: center; min-height: 44px; }
  .nx-guide .chapter-siblings li { margin: 0; }
  .nx-guide .crumbs a { display: inline-flex; align-items: center; min-height: 44px; }
}

@media (min-width: 881px) {
  .nx-chapter-fold > summary { display: none; }
}

/* Polish: Rent landing FAQ rows are 44px tap targets at every width */
.faq details { padding-top: 7px; padding-bottom: 7px; }
.faq summary { min-height: 44px; padding: 9px 0; box-sizing: border-box; }

/* Polish: Native Planner components page buttons are 44px tap targets */
.nx-btn44 .btn { display: inline-flex; align-items: center; min-height: 44px; }
.nx-footer address a { display: inline-flex; align-items: center; min-height: 44px; }

/* ---------- Polish 2026-12-02: sizes, guide layout, 44px targets ---------- */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-5, 32px) var(--space-4, 24px) var(--space-7, 64px);
  display: grid;
  gap: var(--space-5, 32px);
}
.page.with-toc { grid-template-columns: 220px minmax(0, 1fr); }
.page.with-toc > .content { min-width: 0; max-width: none; }
.toc {
  position: sticky;
  top: 80px;
  align-self: start;
  font-size: 14px;
  color: var(--mu, #4B5563);
  max-height: calc(100vh - 100px);
  overflow: auto;
}
.toc a { display: flex; align-items: center; color: var(--mu, #4B5563); text-decoration: none; }
.toc a:hover { color: var(--ac, #5b21b6); }
.crumbs { font-size: 14px; color: var(--mu, #4B5563); margin: 0; }
.crumbs a { color: inherit; }
@media (min-width: 881px) {
  .page.with-toc > .crumbs { grid-column: 2; }
  .page.with-toc > .toc { grid-row: 1 / span 2; }
  .toc a,
  .toc span[aria-current="page"] {
    display: flex;
    align-items: center;
    min-height: 32px;
    box-sizing: border-box;
    padding: 4px 0;
  }
}
.guide-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0;
  padding: 8px 0;
  border-top: 1px solid var(--bd, #e5e7eb);
  border-bottom: 1px solid var(--bd, #e5e7eb);
  font-size: 15px;
}
.guide-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  box-sizing: border-box;
}
.toc-fold > summary {
  display: block;
  cursor: pointer;
  color: var(--tx, #111827);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
  list-style: none;
}
.toc-fold > summary::-webkit-details-marker { display: none; }
.toc-fold > summary::after {
  content: "";
  display: inline-block;
  width: .45em;
  height: .45em;
  margin-left: .6em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-.15em);
}
.toc-fold[open] > summary::after { transform: rotate(-135deg) translateY(-.1em); }
.toc-fold:not([open]) > summary { margin-bottom: 0; }
.toc-fold > summary:focus-visible { outline: 2px solid var(--ac, #5b21b6); outline-offset: 2px; }
@media (max-width: 880px) {
  .page.with-toc { grid-template-columns: 1fr; }
  .toc {
    position: static;
    max-height: none;
    border: 1px solid var(--bd, #e5e7eb);
    border-radius: 8px;
    padding: 12px 16px;
    background: var(--co, #f8f9fa);
  }
  main h3[id] a,
  .nc-cards .nc-card h4 a,
  .nc-products .nc-card h3 a,
  .nc-sub a,
  .feature-card h3 a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
  }
  .cta-row .btn,
  .cta-row a.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    box-sizing: border-box;
  }
}
.figure button.nr-zoom-trigger {
  min-height: 44px;
  box-sizing: border-box;
}

/* ---------- Polish 2026-12-02c: leftover tap targets and crumbs ---------- */
.lede-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  box-sizing: border-box;
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.crumbs [aria-current="page"] {
  white-space: nowrap;
}
@media (min-width: 881px) {
  main.content h3[id] a,
  main h3[id] a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    box-sizing: border-box;
  }
  .nc-cards .nc-card h4 a,
  .nc-products .nc-card h3 a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
  }
}
