
    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    :root {
      /* Tiered Profit Tints */
      --nb-pos-subtle: #4D7C0F;
      --nb-pos-subtle-soft: #F7FEE7;
      --nb-pos-bold: #059669;
      --nb-pos-bold-soft: #D1FAE5;
      --nb-pos-bold-glow: rgba(16, 185, 129, 0.4);

      /* Freshness Decay */
      --fresh-live: #10B981;
      --fresh-mid: #F59E0B;
      --fresh-stale: #94A3B8;

      /* Shimmer Skeleton */
      --sk-bg: #E2E8F0;
      --sk-shine: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    }

    html[data-theme="dark"] {
      --nb-pos-subtle: #A3E635;
      --nb-pos-subtle-soft: rgba(163, 230, 53, 0.12);
      --nb-pos-bold: #10B981;
      --nb-pos-bold-soft: rgba(16, 185, 129, 0.18);
      --nb-pos-bold-glow: rgba(16, 185, 129, 0.5);

      --fresh-live: #34D399;
      --fresh-mid: #FBBF24;
      --fresh-stale: #64748B;

      --sk-bg: #1E293B;
      --sk-shine: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0) 100%);
    }

    /* Privacy / Counter Mode (Shopfront Protection) */
    .privacy-blur {
      transition: filter 0.25s ease, opacity 0.25s ease;
    }
    html[data-privacy="true"] .privacy-blur {
      filter: blur(8px);
      opacity: 0.6;
      user-select: none;
      cursor: pointer;
    }
    html[data-privacy="true"] .privacy-blur:hover {
      filter: blur(0px);
      opacity: 1;
    }

    /* Variant Matrix Chips */
    .variant-matrix {
      display: flex;
      flex-wrap: wrap;
      gap: 4px;
      margin-top: 4px;
    }
    .v-tag {
      font-size: 10px;
      font-weight: 700;
      padding: 1px 6px;
      border-radius: 4px;
      border: 1px solid var(--nb-line-2);
      background: var(--nb-surface-2);
      color: var(--nb-ink-2);
      line-height: 1.5;
    }
    .v-tag-zaa {
      border-color: rgba(37, 99, 235, 0.4);
      color: #3b82f6;
      background: rgba(37, 99, 235, 0.08);
    }
    .v-tag-nonactive {
      border-color: rgba(16, 185, 129, 0.4);
      color: #10b981;
      background: rgba(16, 185, 129, 0.08);
    }
    .v-tag-active {
      border-color: rgba(245, 158, 11, 0.4);
      color: #f59e0b;
      background: rgba(245, 158, 11, 0.08);
    }
    .v-tag-warranty {
      border-color: rgba(124, 58, 237, 0.4);
      color: #8b5cf6;
      background: rgba(124, 58, 237, 0.08);
    }

    /* Inline Sparkline Micro-chart */
    .sparkline-svg {
      width: 68px;
      height: 24px;
      display: inline-block;
      vertical-align: middle;
    }

    body {
      background-color: var(--nb-bg);
      color: var(--nb-ink);
      font-family: var(--nb-font);
      line-height: 1.6;
      transition: background-color 0.25s ease, color 0.25s ease;
      padding: 1.5rem 1.5rem 6.5rem;
    }
    .container {
      max-width: 1200px;
      margin: 0 auto;
    }

    .tabular-numbers {
      font-variant-numeric: tabular-nums;
      font-feature-settings: "tnum";
      letter-spacing: -0.01em;
    }

    /* 9. Price Shock Banner */
    .shock-banner {
      background: linear-gradient(135deg, rgba(220, 38, 38, 0.15) 0%, rgba(185, 28, 28, 0.05) 100%);
      border: 1px solid var(--nb-neg);
      border-radius: var(--nb-r-md);
      padding: 0.85rem 1.25rem;
      margin-bottom: 1.5rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
      gap: 0.75rem;
      box-shadow: 0 0 15px rgba(220, 38, 38, 0.15);
    }
    .shock-content {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      font-size: var(--nb-fs-sm);
      font-weight: 700;
    }
    .shock-pulse-dot {
      width: 10px;
      height: 10px;
      background: var(--nb-neg);
      border-radius: 50%;
      box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
      animation: pulseShock 1.5s infinite;
    }
    @keyframes pulseShock {
      0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
      70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
      100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
    }

    /* Top Preview Bar */
    .preview-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: var(--nb-surface);
      border: 1px solid var(--nb-line);
      border-radius: var(--nb-r-lg);
      padding: 1rem 1.5rem;
      margin-bottom: 2rem;
      box-shadow: var(--nb-shadow-sm);
      flex-wrap: wrap;
      gap: 1rem;
    }
    .brand-title {
      font-size: var(--nb-fs-xl);
      font-weight: 800;
      color: var(--nb-heading);
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    .ctrl-group {
      display: flex;
      gap: 0.5rem;
      flex-wrap: wrap;
    }
    .ctrl-btn {
      background: var(--nb-surface-2);
      color: var(--nb-ink);
      border: 1px solid var(--nb-line-2);
      border-radius: var(--nb-r-sm);
      padding: 0.5rem 0.85rem;
      font-family: inherit;
      font-size: var(--nb-fs-sm);
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
    }
    .ctrl-btn:hover {
      background: var(--nb-accent-soft);
      border-color: var(--nb-accent);
      color: var(--nb-accent);
    }
    .ctrl-btn.active {
      background: var(--nb-brand);
      color: #fff;
      border-color: var(--nb-brand);
    }

    .section-title {
      font-size: var(--nb-fs-lg);
      font-weight: 700;
      color: var(--nb-heading);
      margin: 2.5rem 0 1rem;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .section-title::before {
      content: "";
      width: 4px;
      height: 18px;
      background: var(--nb-brand);
      border-radius: var(--nb-r-pill);
    }

    .card-preview {
      background: var(--nb-surface);
      border: 1px solid var(--nb-line);
      border-radius: var(--nb-r-lg);
      padding: 1.5rem;
      box-shadow: var(--nb-shadow-md);
      margin-top: 1rem;
      position: relative;
    }

    /* 1. Keyboard Shortcuts (KBD) */
    kbd {
      display: inline-block;
      padding: 2px 7px;
      font-family: var(--nb-font-mono);
      font-size: var(--nb-fs-2xs);
      font-weight: 700;
      color: var(--nb-ink);
      background: var(--nb-surface-2);
      border: 1px solid var(--nb-line-2);
      border-radius: 4px;
      box-shadow: 0 1px 1px rgba(0,0,0,0.15);
      margin: 0 2px;
    }

    /* 2. Keyframes for Live Price Flash */
    @keyframes flashGreen {
      0% { background-color: var(--nb-pos); color: #fff; transform: scale(1.02); }
      100% { background-color: transparent; }
    }
    @keyframes flashRed {
      0% { background-color: var(--nb-neg); color: #fff; transform: scale(1.02); }
      100% { background-color: transparent; }
    }
    .flash-up {
      animation: flashGreen 1.6s ease-out;
      border-radius: var(--nb-r-xs);
    }
    .flash-down {
      animation: flashRed 1.6s ease-out;
      border-radius: var(--nb-r-xs);
    }

    /* 3. Freshness Dots */
    .fresh-tag {
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
      font-size: var(--nb-fs-2xs);
      font-weight: 600;
      padding: 2px 8px;
      border-radius: var(--nb-r-pill);
    }
    .fresh-live {
      background: rgba(16, 185, 129, 0.12);
      color: var(--fresh-live);
      border: 1px solid rgba(16, 185, 129, 0.3);
    }
    .fresh-mid {
      background: rgba(245, 158, 11, 0.12);
      color: var(--fresh-mid);
      border: 1px solid rgba(245, 158, 11, 0.3);
    }
    .fresh-stale {
      background: rgba(148, 163, 184, 0.12);
      color: var(--fresh-stale);
      border: 1px solid rgba(148, 163, 184, 0.3);
    }
    .fresh-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
    }

    /* 4. Shimmer Skeleton */
    .skeleton-box {
      background-color: var(--sk-bg);
      position: relative;
      overflow: hidden;
      border-radius: var(--nb-r-sm);
    }
    .skeleton-box::after {
      content: "";
      position: absolute;
      top: 0; right: 0; bottom: 0; left: 0;
      transform: translateX(100%);
      background-image: var(--sk-shine);
      animation: shimmer 1.8s infinite;
    }
    @keyframes shimmer {
      100% { transform: translateX(-100%); }
    }

    /* 5. Color-Blind Accessible Direction Icons */
    .trend-icon {
      display: inline-block;
      font-size: 0.8em;
      margin-left: 2px;
      font-weight: 900;
    }

    /* 6. Market Table & Density */
    .market-table-wrap {
      overflow-x: auto;
      border: 1px solid var(--nb-line);
      border-radius: var(--nb-r-md);
      background: var(--nb-surface);
    }
    .market-table {
      width: 100%;
      border-collapse: collapse;
      text-align: right;
    }
    .market-table th {
      background: var(--nb-surface-2);
      color: var(--nb-muted);
      font-size: var(--nb-fs-xs);
      font-weight: 700;
      padding: 0.85rem 1rem;
      border-bottom: 1px solid var(--nb-line);
    }
    .market-table td {
      padding: 0.85rem 1rem;
      border-bottom: 1px solid var(--nb-line);
      font-size: var(--nb-fs-sm);
      transition: padding 0.2s ease, font-size 0.2s ease;
    }
    .market-table tr.selected {
      background: var(--nb-brand-soft);
      outline: 2px solid var(--nb-accent);
    }
    html[data-density="compact"] .market-table th {
      padding: 0.45rem 0.75rem;
      font-size: var(--nb-fs-2xs);
    }
    html[data-density="compact"] .market-table td {
      padding: 0.45rem 0.75rem;
      font-size: var(--nb-fs-xs);
    }

    /* 7. Profit Tints */
    .badge {
      font-size: var(--nb-fs-xs);
      font-weight: 700;
      padding: 0.25rem 0.65rem;
      border-radius: var(--nb-r-pill);
      display: inline-flex;
      align-items: center;
      gap: 0.35rem;
    }
    .badge-subtle {
      background: var(--nb-pos-subtle-soft);
      color: var(--nb-pos-subtle);
      border: 1px solid var(--nb-pos-subtle);
    }
    .badge-standard {
      background: var(--nb-pos-soft);
      color: var(--nb-pos);
      border: 1px solid var(--nb-pos-line);
    }
    .badge-bold {
      background: var(--nb-pos-bold-soft);
      color: var(--nb-pos-bold);
      border: 1px solid var(--nb-pos-bold);
      box-shadow: 0 0 10px var(--nb-pos-bold-glow);
    }
    .badge-neg {
      background: var(--nb-neg-soft);
      color: var(--nb-neg);
      border: 1px solid var(--nb-neg-line);
    }

    /* 8. Floating Pinned Shelf */
    .pinned-shelf {
      position: fixed;
      bottom: 16px;
      left: 50%;
      transform: translateX(-50%);
      width: calc(100% - 32px);
      max-width: 980px;
      background: var(--nb-surface);
      border: 1px solid var(--nb-line-2);
      border-radius: var(--nb-r-pill);
      padding: 0.6rem 1.25rem;
      display: flex;
      justify-content: space-between;
      align-items: center;
      box-shadow: var(--nb-shadow-lg);
      z-index: 1000;
      backdrop-filter: blur(12px);
    }
    .shelf-items {
      display: flex;
      align-items: center;
      gap: 0.75rem;
      overflow-x: auto;
    }
    .shelf-item {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      background: var(--nb-surface-2);
      padding: 4px 10px;
      border-radius: var(--nb-r-pill);
      border: 1px solid var(--nb-line);
      font-size: var(--nb-fs-xs);
      white-space: nowrap;
    }

    /* 9. Vendor Bottom Sheet Modal */
    .modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.6);
      backdrop-filter: blur(4px);
      z-index: 2000;
      display: none;
      align-items: flex-end;
      justify-content: center;
    }
    .modal-overlay.active {
      display: flex;
    }
    .bottom-sheet {
      width: 100%;
      max-width: 600px;
      background: var(--nb-surface);
      border: 1px solid var(--nb-line);
      border-radius: var(--nb-r-lg) var(--nb-r-lg) 0 0;
      padding: 1.5rem;
      box-shadow: var(--nb-shadow-lg);
      animation: slideUp 0.25s ease-out;
    }
    @keyframes slideUp {
      from { transform: translateY(100%); }
      to { transform: translateY(0); }
    }
    .sheet-handle {
      width: 40px;
      height: 4px;
      background: var(--nb-line-2);
      border-radius: 2px;
      margin: 0 auto 1.25rem;
    }

    /* 10. Micro Toast Notifications */
    .toast-container {
      position: fixed;
      bottom: 80px;
      left: 24px;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      z-index: 3000;
      pointer-events: none;
    }
    .toast {
      background: var(--nb-surface);
      color: var(--nb-ink);
      border: 1px solid var(--nb-line);
      border-right: 4px solid var(--nb-pos-bold);
      border-radius: var(--nb-r-sm);
      padding: 0.75rem 1rem;
      font-size: var(--nb-fs-xs);
      font-weight: 600;
      box-shadow: var(--nb-shadow-md);
      display: flex;
      align-items: center;
      gap: 0.6rem;
      animation: fadeInToast 0.25s ease;
      pointer-events: auto;
    }
    @keyframes fadeInToast {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* 11. Mobile Responsive Styles (< 768px & < 640px) */
    .mobile-cards-wrap {
      display: none;
      flex-direction: column;
      gap: 1rem;
      margin-top: 1rem;
    }
    .mobile-product-card {
      background: var(--nb-surface);
      border: 1px solid var(--nb-line);
      border-radius: var(--nb-r-md);
      padding: 1rem;
      box-shadow: var(--nb-shadow-sm);
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
    }
    .mobile-product-card.selected {
      border-color: var(--nb-accent);
      box-shadow: 0 0 0 1px var(--nb-accent);
    }
    .m-card-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 0.5rem;
    }
    .m-card-body {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background: var(--nb-surface-2);
      border-radius: var(--nb-r-sm);
      padding: 0.75rem 0.85rem;
    }
    .m-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 0.5rem;
    }

    @media (max-width: 768px) {
      body {
        padding: 0.75rem 0.75rem 6.5rem;
      }
      .brand-title {
        font-size: var(--nb-fs-lg);
      }
      .preview-bar {
        padding: 0.85rem;
        gap: 0.75rem;
      }
      .ctrl-group {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 6px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
      }
      .ctrl-group::-webkit-scrollbar {
        display: none;
      }
      .ctrl-btn {
        flex-shrink: 0;
        font-size: 11px;
        padding: 0.45rem 0.75rem;
        min-height: 38px;
      }
      .shock-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem;
        padding: 0.75rem 1rem;
      }
      .shock-banner button {
        width: 100%;
        justify-content: center;
        min-height: 40px;
      }
      .kbd-bar {
        display: none !important;
      }
      .pinned-shelf {
        width: calc(100% - 16px);
        bottom: 8px;
        padding: 0.5rem 0.85rem;
        border-radius: 16px;
      }
      .pinned-shelf .ctrl-btn {
        padding: 6px 10px;
        font-size: 11px;
      }
      .section-title {
        font-size: var(--nb-fs-base);
        margin: 1.75rem 0 0.75rem;
      }
      .card-preview {
        padding: 1rem;
      }
      /* View Switcher: show mobile cards or table */
      .desktop-table-view {
        display: none;
      }
      .mobile-cards-wrap {
        display: flex;
      }
      .bottom-sheet {
        max-width: 100%;
        border-radius: 20px 20px 0 0;
        padding: 1.25rem 1rem;
      }
      .toast-container {
        left: 12px;
        right: 12px;
        bottom: 74px;
      }
      .toast {
        font-size: 11px;
        padding: 0.65rem 0.85rem;
      }
    }

    @media (max-width: 480px) {
      .brand-title {
        font-size: 15px;
      }
      .shelf-items {
        max-width: 160px;
      }
    }

    /* Print Preview Styles */
    @media print {
      body { background: #fff !important; color: #000 !important; padding: 0 !important; }
      .preview-bar, .pinned-shelf, .shock-banner, .ctrl-group, .modal-overlay, .toast-container { display: none !important; }
      .card-preview { border: 1px solid #000 !important; box-shadow: none !important; }
    }
  