/* =====================================================================
   Template Web 02 — component library page chrome (index.html only)
   ===================================================================== */
.pv-section { scroll-margin-top: calc(var(--sp-topbar-h) + 16px); margin-bottom: 40px; }
.pv-section > header { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 14px; }
.pv-section > header h2 { font-size: 1.2rem; font-weight: 600; letter-spacing: -.02em; margin: 0 0 4px; }
.pv-section > header p { margin: 0; color: var(--sp-muted); font-size: .82rem; max-width: 760px; }
.pv-block { margin-bottom: 16px; }
.pv-label { font-size: .66rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--sp-subtle); margin: 0 0 12px; }
.pv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.pv-code {
  display: block; margin-top: 14px; padding: 14px 16px; border-radius: var(--sp-radius-md);
  background: #0f121a; color: #c9d4ef; font: 400 .74rem/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre; overflow-x: auto; border: 1px solid #1d2230;
}
[data-bs-theme="dark"] .pv-code { background: #090b10; }
.pv-path { font-size: .74rem; color: var(--sp-muted); }

/* Hero */

/* Page cards */
.pv-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.pv-page { display: flex; flex-direction: column; gap: 10px; padding: 14px; color: var(--sp-text); }
.pv-page:hover { color: var(--sp-text); }
.pv-page-thumb { height: 104px; border-radius: 10px; background: var(--sp-bg); border: 1px solid var(--sp-divider); display: grid; grid-template-columns: 22% 1fr; gap: 5px; padding: 6px; overflow: hidden; }
.pv-page-thumb .s { border-radius: 6px; background: var(--sp-surface); border: 1px solid var(--sp-divider); display: flex; flex-direction: column; gap: 4px; padding: 6px 5px; }
.pv-page-thumb .s i { height: 4px; border-radius: 2px; background: var(--sp-surface-3); }
.pv-page-thumb .s i.on { background: var(--sp-primary); opacity: .6; }
.pv-page-thumb .m { display: flex; flex-direction: column; gap: 5px; }
.pv-page-thumb .m .r { display: flex; gap: 5px; flex: 1; }
.pv-page-thumb .m .r > span { flex: 1; border-radius: 6px; background: var(--sp-surface); border: 1px solid var(--sp-divider); display: flex; align-items: center; justify-content: center; color: var(--sp-primary); font-size: 1.2rem; }
.pv-page-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .86rem; }
.pv-page-title iconify-icon { color: var(--sp-muted); margin-left: auto; transition: transform .15s; }
.pv-page:hover .pv-page-title iconify-icon { transform: translate(2px, -2px); color: var(--sp-primary); }
.pv-suite-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pv-suite-pick { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 4px; border: 1px solid var(--sp-border); border-radius: 999px; background: var(--sp-surface); color: var(--sp-text-2); font-size: .76rem; font-weight: 600; cursor: pointer; }
.pv-suite-pick .sp-ico-tile.sm { width: 26px; height: 26px; font-size: .9rem; border-radius: 50%; }
.pv-suite-pick .sp-count { min-width: 18px; }
.pv-suite-pick:hover { border-color: var(--sp-border-strong); color: var(--sp-text); }
.pv-suite-pick.is-on { border-color: transparent; background: var(--sp-primary-soft); color: var(--sp-primary-text); }

/* Swatches */
.pv-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pv-swatch { border: 1px solid var(--sp-border); border-radius: var(--sp-radius-md); overflow: hidden; background: var(--sp-surface); cursor: pointer; text-align: left; padding: 0; transition: box-shadow .15s; }
.pv-swatch:hover { box-shadow: var(--sp-shadow-md); }
.pv-swatch .chip { height: 56px; border-bottom: 1px solid var(--sp-divider); }
.pv-swatch .meta { padding: 8px 10px; }
.pv-swatch b { display: block; font-size: .74rem; font-weight: 600; color: var(--sp-text); }
.pv-swatch span { font-size: .68rem; color: var(--sp-muted); font-family: ui-monospace, Menlo, Consolas, monospace; }

/* Type scale */
.pv-type { display: grid; grid-template-columns: 140px 1fr 150px; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--sp-divider); }
.pv-type:last-child { border-bottom: 0; }
.pv-type .l { font-size: .72rem; color: var(--sp-muted); font-weight: 500; }
.pv-type .s { font-size: .7rem; color: var(--sp-subtle); text-align: right; font-family: ui-monospace, Menlo, Consolas, monospace; }
@media (max-width: 767.98px) { .pv-type { grid-template-columns: 1fr; gap: 4px; } .pv-type .s { text-align: left; } }

/* Icons */
.pv-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.pv-icon { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border: 1px solid var(--sp-border); border-radius: var(--sp-radius); background: var(--sp-surface); color: var(--sp-text-2); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.pv-icon:hover { border-color: var(--sp-primary); color: var(--sp-primary); background: var(--sp-primary-soft); }
.pv-icon iconify-icon { font-size: 1.45rem; }
.pv-icon span { font-size: .62rem; color: var(--sp-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Library table */
.pv-lib { width: 100%; font-size: .8rem; border-collapse: collapse; }
.pv-lib th { font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; color: var(--sp-muted); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--sp-divider); text-align: left; }
.pv-lib td { padding: 9px 10px; border-bottom: 1px solid var(--sp-divider); color: var(--sp-text-2); vertical-align: top; }
.pv-lib td code { white-space: nowrap; }

/* QA style picker */
.pv-qa-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.pv-qa-style { text-align: left; padding: 10px; border: 1px solid var(--sp-border); border-radius: var(--sp-radius-md); background: var(--sp-surface); transition: border-color .15s, box-shadow .15s; }
.pv-qa-style:hover { border-color: var(--sp-border-strong); }
.pv-qa-style.is-active { border-color: var(--sp-primary); box-shadow: 0 0 0 3px var(--sp-primary-ring); }
.pv-qa-style .art { height: 84px; border-radius: 8px; background: var(--sp-surface-3); position: relative; margin-bottom: 8px; overflow: hidden; }
.pv-qa-style .art i { position: absolute; background: var(--sp-surface); border-radius: 6px; box-shadow: var(--sp-shadow-sm); }
.pv-qa-style .art i::before { content: ''; position: absolute; left: 6px; right: 6px; top: 6px; height: 5px; border-radius: 3px; background: var(--sp-primary); opacity: .55; }
.pv-qa-style b { display: block; font-size: .8rem; }
.pv-qa-style span { font-size: .7rem; color: var(--sp-muted); }

/* Library nav: active section */
.pv-nav .sp-nav-link { height: 34px; font-size: .82rem; }
.pv-nav .sp-nav-link > iconify-icon { font-size: 1.05rem; }
.pv-nav .sp-nav-cap { padding-top: 12px; }
.pv-nav .pv-nav-title {
  height: auto; margin: 8px 0 2px; padding: 12px 10px 6px;
  border-radius: 0; background: transparent;
  color: var(--sp-subtle); font-size: .68rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
}
.pv-nav .pv-nav-title:hover { background: transparent; color: var(--sp-text); }
.pv-nav .pv-nav-title > iconify-icon:first-child { display: none; }
.pv-nav .pv-nav-title .sp-nav-caret { font-size: .8rem !important; color: var(--sp-subtle) !important; }
.pv-nav .sp-nav-group > .sp-nav-sub { padding: 0 0 4px !important; }
.pv-nav .sp-nav-group > .sp-nav-sub::before,
.pv-nav .sp-nav-group > .sp-nav-sub li::before { display: none; }
.pv-nav .sp-nav-group > .sp-nav-sub .sp-nav-link { height: 34px; padding-left: 10px; font-size: .82rem; }
.pv-nav .sp-nav-group > .sp-nav-sub .sp-nav-link.is-active { background: var(--sp-primary-soft); font-weight: 600; }
html.sp-mini .pv-nav .pv-nav-title { height: 40px; margin: 0 0 2px; padding: 0; justify-content: center; text-transform: none; }
html.sp-mini .pv-nav .pv-nav-title > iconify-icon:first-child { display: inline-flex; }
.pv-topbar-title { min-width: 0; }
.pv-topbar-title b { display: block; font-size: .92rem; letter-spacing: -.01em; white-space: nowrap; }
.pv-topbar-title span { display: block; font-size: .7rem; color: var(--sp-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 991.98px) { .pv-topbar-title { display: none; } }

/* =====================================================================
   Hero (v2) — "Commerce meets logistics"
   Always rendered on deep blue, in both themes.
   ===================================================================== */
.hx {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: 12px 28px;
  padding: 40px 40px 22px; border-radius: 24px; color: #fff;
  background: linear-gradient(135deg, #2465ff 0%, #1c47c4 34%, #152d78 68%, #0e1530 100%);
  box-shadow: 0 30px 60px -30px rgba(23, 61, 180, .65), inset 0 1px 0 rgba(255, 255, 255, .14);
}
.hx-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hx-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 34px 34px; -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 10%, transparent 75%); mask-image: radial-gradient(ellipse 70% 80% at 70% 30%, #000 10%, transparent 75%); }
.hx-glow { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: hx-drift 14s ease-in-out infinite; }
.hx-glow.a { width: 380px; height: 380px; right: -60px; top: -140px; background: #6aa2ff; }
.hx-glow.b { width: 300px; height: 300px; left: 30%; bottom: -200px; background: #1ad1ff; opacity: .28; animation-delay: -5s; }
.hx-glow.c { width: 220px; height: 220px; left: -80px; top: -60px; background: #8f6bff; opacity: .3; animation-delay: -9s; }
@keyframes hx-drift { 50% { transform: translate(30px, 24px) scale(1.08); } }

.hx-copy { position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.hx-copy > * { animation: hx-in .7s var(--sp-ease) both; }
.hx-copy > :nth-child(2) { animation-delay: .06s; } .hx-copy > :nth-child(3) { animation-delay: .12s; } .hx-copy > :nth-child(4) { animation-delay: .18s; } .hx-copy > :nth-child(5) { animation-delay: .24s; }
@keyframes hx-in { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } }
.hx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.hx-chip { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: .74rem; font-weight: 600; color: rgba(255, 255, 255, .92); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(8px); }
.hx-chip.is-new { background: linear-gradient(90deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .06)); }
.hx-chip.is-new iconify-icon { color: #ffd66b; }
.hx-dot { width: 7px; height: 7px; border-radius: 50%; background: #5cf0a8; box-shadow: 0 0 0 3px rgba(92, 240, 168, .25); animation: wh-pulse 2s infinite; }
@keyframes wh-pulse { 50% { opacity: .4; } }
.hx-title { color: #fff; font-size: clamp(2.1rem, 3.6vw, 3.3rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.02; margin: 0 0 14px; }
.hx-grad { background: linear-gradient(90deg, #ffffff 0%, #b9d2ff 45%, #7fe3ff 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hx-lead { color: rgba(255, 255, 255, .78); font-size: .95rem; line-height: 1.6; max-width: 560px; margin: 0 0 22px; }
.hx-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 26px; }
.hx-btn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; font-size: .85rem; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); transition: background .2s, transform .2s var(--sp-ease), box-shadow .2s; }
.hx-btn:hover { color: #fff; background: rgba(255, 255, 255, .18); transform: translateY(-1px); }
.hx-btn.is-solid { color: #1648c9; background: #fff; border-color: #fff; box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .5); }
.hx-btn.is-solid:hover { color: #1648c9; background: #f2f6ff; box-shadow: 0 14px 28px -10px rgba(0, 0, 0, .55); }
.hx-btn.is-solid iconify-icon { transition: transform .2s var(--sp-ease); }
.hx-btn.is-solid:hover iconify-icon { transform: translateX(3px); }
.hx-kbd { display: inline-flex; align-items: center; gap: 4px; height: 42px; padding: 0 6px; border: 0; background: transparent; color: rgba(255, 255, 255, .7); font-size: .78rem; }
.hx-kbd kbd { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); color: #fff; }
.hx-kbd span { margin-left: 4px; }
.hx-kbd:hover { color: #fff; }
.hx-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 18px; width: 100%; }
.hx-stats > div { padding: 0 22px; border-left: 1px solid rgba(255, 255, 255, .14); }
.hx-stats > div:first-child { padding-left: 0; border-left: 0; }
.hx-stats b { display: block; font-size: 1.55rem; font-weight: 700; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hx-stats span { font-size: .72rem; color: rgba(255, 255, 255, .62); }

/* Floating preview cards */
.hx-stage { position: relative; min-height: 330px; }
.hx-orb { position: absolute; right: 18%; top: 34%; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #a9d0ff 0%, #3a8cff 35%, #1f5ae0 70%, #10307e 100%); box-shadow: 0 30px 60px -10px rgba(10, 40, 160, .8), inset -10px -14px 24px rgba(5, 20, 90, .5); animation: hx-float 7s ease-in-out infinite; }
.hx-card { position: absolute; padding: 12px 14px; border-radius: 16px; background: #fff; color: #0b0e14; box-shadow: 0 24px 48px -18px rgba(5, 15, 60, .55), 0 2px 6px rgba(5, 15, 60, .12); animation: hx-pop .8s var(--sp-ease) both, hx-float 7s ease-in-out infinite; }
.hx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: .74rem; font-weight: 600; color: #363a3d; margin-bottom: 6px; }
.hx-card-head iconify-icon { color: #2264ff; font-size: 1rem; }
.hx-num { font-size: 1.45rem; font-weight: 700; letter-spacing: -.035em; }
.hx-c1 { left: 0; top: 4px; width: 210px; animation-delay: .15s, -1s; }
.hx-c1 .sp-delta.up { color: #21b35f; background: #e7f6ef; }
.hx-spark { display: block; width: 100%; height: 34px; margin-top: 4px; }
.hx-spark-line { stroke-dasharray: 200; stroke-dashoffset: 200; animation: hx-draw 1.6s .6s var(--sp-ease) forwards; }
.hx-c2 { right: 0; top: 0; width: 250px; animation-delay: .3s, -3s; }
.hx-route { display: block; width: 100%; height: auto; }
.hx-route-done { stroke-dasharray: 100; stroke-dashoffset: 100; animation: hx-route 1.8s .8s var(--sp-ease) forwards; }
@keyframes hx-route { to { stroke-dashoffset: 42; } }
.hx-plane { position: absolute; left: 55%; top: 47px; width: 28px; height: 28px; margin-left: -14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(180deg, #3a76fe, #2160f5); box-shadow: 0 6px 14px -4px rgba(34, 100, 255, .7), 0 0 0 3px #fff; font-size: .85rem; opacity: 0; animation: hx-fade .4s 2.2s forwards; }
.hx-plane iconify-icon { transform: rotate(52deg); }
.hx-codes { font-size: .7rem; color: #646879; align-items: baseline; margin-top: 2px; }
.hx-codes b { font-size: .95rem; color: #0b0e14; letter-spacing: .02em; }
.hx-live { display: inline-flex; align-items: center; gap: 5px; font-size: .66rem; color: #21b35f; }
.hx-live i { width: 6px; height: 6px; border-radius: 50%; background: #21b35f; animation: wh-pulse 1.6s infinite; }
.hx-c3 { left: 8%; bottom: 8px; width: 200px; animation-delay: .45s, -5s; }
.hx-bars { display: flex; align-items: flex-end; gap: 6px; height: 70px; }
.hx-bars i { flex: 1; height: var(--h); border-radius: 6px; background: #eef0f4; transform-origin: bottom; animation: hx-grow .9s var(--sp-ease) both; }
.hx-bars i:nth-child(2) { animation-delay: .62s; } .hx-bars i:nth-child(3) { animation-delay: .68s; } .hx-bars i:nth-child(4) { animation-delay: .74s; } .hx-bars i:nth-child(5) { animation-delay: .8s; } .hx-bars i:nth-child(6) { animation-delay: .86s; } .hx-bars i:nth-child(7) { animation-delay: .92s; }
.hx-bars i:first-child { animation-delay: .56s; }
.hx-bars i.on { background: linear-gradient(180deg, #6a97ff, #2f6cfe); box-shadow: 0 8px 14px -6px rgba(34, 100, 255, .7); }
.hx-c4 { right: 4%; bottom: 30px; display: flex; align-items: center; gap: 10px; width: 236px; animation-delay: .6s, -2s; }
.hx-c4 b { display: block; font-size: .82rem; letter-spacing: .02em; }
.hx-c4 span { display: block; font-size: .7rem; color: #646879; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-c4-ico { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; color: #fff; background: linear-gradient(180deg, #1cc0e6, #0f93b8); }
@keyframes hx-pop { from { opacity: 0; transform: translateY(18px) scale(.94); } }
@keyframes hx-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes hx-draw { to { stroke-dashoffset: 0; } }
@keyframes hx-grow { from { transform: scaleY(0); } }
@keyframes hx-fade { to { opacity: 1; } }

/* Module rail */
.hx-modules { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-top: 14px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .14); }
.hx-modules a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; color: #fff; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); transition: background .2s, transform .25s var(--sp-ease), border-color .2s; animation: hx-in .6s var(--sp-ease) both; animation-delay: calc(.35s + var(--d) * .06s); }
.hx-modules a:hover { color: #fff; background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); transform: translateY(-3px); }
.hx-modules iconify-icon { font-size: 1.6rem; color: #b9d2ff; flex-shrink: 0; }
.hx-modules b { display: block; font-size: .82rem; font-weight: 600; }
.hx-modules small { display: block; font-size: .68rem; color: rgba(255, 255, 255, .6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-modules span { min-width: 0; }

@media (max-width: 1199.98px) { .hx-modules { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 991.98px) {
  .hx { grid-template-columns: 1fr; padding: 28px 24px 18px; }
  .hx-stage { min-height: 260px; }
}
@media (max-width: 575.98px) {
  .hx { padding: 24px 18px 16px; border-radius: 18px; }
  .hx-stage { min-height: 200px; }
  .hx-c3, .hx-c4, .hx-orb { display: none; }
  .hx-c1 { width: 170px; } .hx-c2 { width: 200px; top: 90px; }
  .hx-stats > div { padding: 0 12px; } .hx-stats b { font-size: 1.25rem; }
  .hx-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .hx *, .hx { animation: none !important; } .hx-spark-line, .hx-route-done { stroke-dashoffset: 0; } .hx-plane { opacity: 1; } }

/* Motion demo (library) */
.pv-motion-stage { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pv-motion-stage > div { height: 70px; border-radius: 12px; background: var(--sp-surface-2); border: 1px solid var(--sp-border); }
.pv-motion-stage > div:first-child { grid-column: 1 / -1; height: 40px; }

/* Workspaces section */
.pv-ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.pv-ws { display: flex; gap: 12px; align-items: flex-start; padding: 14px; color: var(--sp-text); transition: border-color .2s, transform .2s, box-shadow .2s; }
.pv-ws:hover { color: var(--sp-text); border-color: var(--sp-primary); transform: translateY(-2px); box-shadow: var(--sp-shadow-md); }
.pv-ws b { display: block; font-size: .86rem; }
.pv-ws small { display: block; font-size: .72rem; color: var(--sp-muted); line-height: 1.4; margin-top: 2px; }
.pv-ws em { display: inline-block; font-style: normal; font-size: .66rem; font-weight: 600; color: var(--sp-primary-text); background: var(--sp-primary-soft); border-radius: 6px; padding: 1px 6px; margin-top: 6px; }
.pv-ws-panels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.pv-ws-panels span { font-size: .72rem; color: var(--sp-muted); padding: 7px 9px; border: 1px solid var(--sp-border); border-radius: 8px; }
.pv-ws-panels b { display: block; font-size: .74rem; color: var(--sp-text); font-family: ui-monospace, Menlo, monospace; }
