/* Extracted from lighthouse-app.html (UI redesign N1) — load order matters */
    /* Commerce Product Cards */
    .commerce-product-card {
      display: flex; align-items: center; gap: 12px;
      padding: 10px 14px; background: rgba(0,0,0,0.25); border-radius: 10px;
      border: 1px solid var(--border); transition: border-color 0.2s ease;
    }
    .commerce-product-card:hover { border-color: rgba(255, 153, 0, 0.4); }
    .commerce-product-card .product-img {
      width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
      background: var(--bg-tertiary);
    }
    .commerce-product-card .product-img-placeholder {
      width: 44px; height: 44px; border-radius: 8px; background: var(--bg-tertiary);
      display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--text-muted);
    }
    .commerce-product-card .product-info { flex: 1; min-width: 0; }
    .commerce-product-card .product-title { font-size: 12px; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .commerce-product-card .product-price { font-size: 11px; color: var(--accent-green); }
    .commerce-product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }

    /* Commerce Query Card - Expandable */
    .commerce-query-card {
      background: rgba(239, 68, 68, 0.06);
      border-radius: var(--radius-lg);
      padding: 18px;
      margin-bottom: 14px;
      border: 1px solid rgba(239, 68, 68, 0.2);
      cursor: pointer;
      transition: background 0.3s ease;
    }
    .commerce-query-card.brand-found { background: rgba(34, 197, 94, 0.06); border-color: rgba(34, 197, 94, 0.2); }
    .commerce-query-card:hover { background: rgba(0,0,0,0.3); }
    .commerce-query-card.expanded { background: rgba(0,0,0,0.3); }

    .commerce-query-header {
      display: flex;
      justify-content: space-between;
      align-items: start;
      margin-bottom: 8px;
    }

    .commerce-query-expand-icon {
      font-size: 10px;
      color: var(--text-muted);
      transition: transform 0.3s ease;
      margin-left: 8px;
      flex-shrink: 0;
    }
    .commerce-query-card.expanded .commerce-query-expand-icon {
      transform: rotate(180deg);
    }

    .commerce-citation-groups {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.4s ease;
    }
    .commerce-query-card.expanded .commerce-citation-groups {
      max-height: 2000px;
    }

    .citation-group {
      border-top: 1px solid rgba(255,255,255,0.08);
      padding: 14px 0 10px;
    }
    .citation-group:first-child { border-top: none; padding-top: 10px; }

    .citation-group-header {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
    }
    .citation-group-header .cg-icon { font-size: 16px; }
    .citation-group-header .cg-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
    .citation-group-header .cg-badge {
      font-size: 10px;
      padding: 2px 8px;
      border-radius: var(--radius-xs);
      font-weight: 600;
    }
    .citation-group-header .cg-badge.found {
      background: rgba(34, 197, 94, 0.2);
      color: var(--accent-green);
    }
    .citation-group-header .cg-badge.not-found {
      background: rgba(239, 68, 68, 0.2);
      color: var(--accent-red);
    }

    .citation-group-sentiment {
      font-size: 10px;
      padding: 2px 8px;
      border-radius: var(--radius-xs);
      font-weight: 600;
    }
    .citation-group-sentiment.positive { background: rgba(34,197,94,0.15); color: var(--accent-green); }
    .citation-group-sentiment.neutral { background: rgba(234,179,8,0.15); color: var(--accent-gold); }
    .citation-group-sentiment.negative { background: rgba(239,68,68,0.15); color: var(--accent-red); }

    .citation-group-snippet {
      background: rgba(0,0,0,0.3);
      border-radius: var(--radius-md);
      padding: 10px 12px;
      font-size: 12px;
      color: var(--text-secondary);
      line-height: 1.5;
      margin-bottom: 8px;
      font-style: italic;
    }

    .citation-links {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 8px;
    }
    .citation-links a {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 10px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: var(--radius-2xl);
      font-size: 11px;
      color: var(--accent);
      text-decoration: none;
      transition: background 0.2s, border-color 0.2s;
      max-width: 220px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .citation-links a:hover {
      background: rgba(232, 168, 48, 0.1);
      border-color: rgba(232, 168, 48, 0.3);
    }
    .citation-links a img {
      width: 14px;
      height: 14px;
      border-radius: var(--radius-xs);
      flex-shrink: 0;
    }

    .citation-group-products {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 8px;
      margin-top: 8px;
    }
    .citation-group-products .commerce-product-card { font-size: 11px; }

    /* Light theme overrides for citation groups */
    [data-theme="light"] .commerce-query-card { background: #f6f8fa; }
    [data-theme="light"] .commerce-query-card:hover,
    [data-theme="light"] .commerce-query-card.expanded { background: #eef1f5; }
    [data-theme="light"] .citation-group { border-top-color: rgba(0,0,0,0.08); }
    [data-theme="light"] .citation-group-snippet { background: #e8ecf0; color: #57606a; }
    [data-theme="light"] .citation-links a { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.1); color: #0969da; }
    [data-theme="light"] .citation-links a:hover { background: rgba(9, 105, 218, 0.08); border-color: rgba(9, 105, 218, 0.3); }

    /* Commerce Sub-Tabs */
    .commerce-sub-tab {
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: var(--radius-2xl);
      padding: 8px 18px;
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      color: #aaa;
      transition: background 0.2s, border-color 0.2s, color 0.2s;
    }
    .commerce-sub-tab:hover,
    .commerce-sub-tab.active {
      background: rgba(255, 153, 0, 0.15);
      border-color: rgba(255, 153, 0, 0.4);
      color: #fff;
    }
    [data-theme="light"] .commerce-sub-tab {
      background: #f6f8fa;
      border-color: #d1d9e0;
      color: #57606a;
    }
    [data-theme="light"] .commerce-sub-tab:hover,
    [data-theme="light"] .commerce-sub-tab.active {
      background: rgba(255, 153, 0, 0.12);
      border-color: rgba(255, 153, 0, 0.4);
      color: #1f2328;
    }

    /* Commerce Products Grid (large cards) */
    .commerce-products-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 16px;
    }
    .commerce-product-card-lg {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      overflow: hidden;
      transition: border-color 0.2s ease;
      cursor: default;
    }
    .commerce-product-card-lg:hover {
      border-color: rgba(255, 153, 0, 0.4);
    }
    .commerce-product-card-lg .product-img-lg {
      width: 100%;
      height: 200px;
      object-fit: contain;
      background: linear-gradient(135deg, rgba(255,153,0,0.04), rgba(255,102,0,0.02));
      display: block;
    }
    .commerce-product-card-lg .product-img-placeholder-lg {
      width: 100%;
      height: 200px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 48px;
      background: linear-gradient(135deg, rgba(255,153,0,0.04), rgba(255,102,0,0.02));
      color: var(--text-muted);
    }
    .commerce-product-card-lg .product-card-body {
      padding: 14px 16px 16px;
    }
    .commerce-product-card-lg .product-brand-row {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 6px;
    }
    .commerce-product-card-lg .product-brand-logo {
      width: 16px;
      height: 16px;
      border-radius: var(--radius-xs);
      object-fit: contain;
      background: var(--bg-tertiary);
    }
    .commerce-product-card-lg .product-brand-name {
      font-size: 11px;
      color: var(--accent-gold);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }
    .commerce-product-card-lg .product-title-lg {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-primary);
      line-height: 1.35;
      display: -webkit-box;
      -webkit-line-clamp: 2;
      -webkit-box-orient: vertical;
      overflow: hidden;
      margin-bottom: 10px;
    }
    .commerce-product-card-lg .product-metrics {
      display: flex;
      justify-content: space-between;
      gap: 8px;
    }
    .commerce-product-card-lg .product-metric {
      text-align: center;
      flex: 1;
    }
    .commerce-product-card-lg .product-metric-value {
      font-size: 16px;
      font-weight: 700;
    }
    .commerce-product-card-lg .product-metric-label {
      font-size: 10px;
      color: var(--text-muted);
      margin-top: 2px;
    }

    /* Product enrichment badges (ratings, merchants, sources) */
    .product-rating {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 12px;
      color: var(--accent-gold);
      margin-bottom: 4px;
    }
    .product-rating .stars {
      letter-spacing: -1px;
    }
    .product-rating .review-count {
      font-size: 10px;
      color: var(--text-muted);
    }
    .product-merchant {
      font-size: 10px;
      color: var(--text-secondary);
      display: flex;
      align-items: center;
      gap: 4px;
      margin-bottom: 4px;
    }
    .product-source-badge {
      display: inline-block;
      font-size: 9px;
      padding: 1px 6px;
      border-radius: var(--radius-xs);
      font-weight: 600;
      letter-spacing: 0.3px;
      text-transform: uppercase;
    }
    .product-source-badge.google-shopping {
      background: rgba(66, 133, 244, 0.15);
      color: #4285f4;
    }
    .product-source-badge.amazon {
      background: rgba(255, 153, 0, 0.15);
      color: #ff9900;
    }
    .product-source-badge.walmart {
      background: rgba(0, 113, 206, 0.15);
      color: #0071ce;
    }
    .product-source-badge.llm {
      background: rgba(255, 255, 255, 0.08);
      color: var(--text-muted);
    }
    .product-detail-link {
      display: inline-block;
      font-size: 11px;
      color: var(--accent);
      text-decoration: none;
      margin-top: 4px;
      opacity: 0.8;
      transition: opacity 0.2s;
    }
    .product-detail-link:hover {
      opacity: 1;
      text-decoration: underline;
    }
    .product-price-lg {
      font-size: 16px;
      font-weight: 700;
      color: var(--accent-green);
      margin-bottom: 2px;
    }

    /* Commerce Brand Cards */
    .commerce-brand-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 16px;
    }
    .commerce-brand-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      padding: 20px;
      transition: border-color 0.2s ease;
    }
    .commerce-brand-card:hover {
      border-color: rgba(255, 153, 0, 0.3);
    }
    .commerce-brand-card.brand-you {
      border-color: rgba(34, 197, 94, 0.4);
      background: linear-gradient(135deg, rgba(34, 197, 94, 0.06), transparent);
    }
    .commerce-brand-card .brand-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 16px;
    }
    .commerce-brand-card .brand-logo {
      width: 40px;
      height: 40px;
      border-radius: var(--radius-lg);
      object-fit: contain;
      background: var(--bg-tertiary);
    }
    .commerce-brand-card .brand-logo-placeholder {
      width: 40px;
      height: 40px;
      border-radius: var(--radius-lg);
      background: var(--bg-tertiary);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      color: var(--text-muted);
    }
    .commerce-brand-card .brand-name {
      font-size: 16px;
      font-weight: 700;
      color: var(--text-primary);
    }
    .commerce-brand-card .brand-badge {
      font-size: 9px;
      font-weight: 700;
      background: rgba(34, 197, 94, 0.2);
      color: var(--accent-green);
      padding: 2px 6px;
      border-radius: var(--radius-xs);
      margin-left: auto;
    }
    .commerce-brand-card .brand-stat {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 6px 0;
      border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    .commerce-brand-card .brand-stat:last-child {
      border-bottom: none;
    }
    .commerce-brand-card .brand-stat-label {
      font-size: 12px;
      color: var(--text-muted);
    }
    .commerce-brand-card .brand-stat-value {
      font-size: 14px;
      font-weight: 600;
    }

    /* Commerce Platform Cards (upgraded) */
    .commerce-platform-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
      gap: 14px;
    }
    .commerce-platform-card-lg {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      padding: 20px;
      text-align: center;
      transition: border-color 0.2s ease;
    }
    .commerce-platform-card-lg:hover {
      border-color: rgba(255, 153, 0, 0.3);
    }
    .commerce-platform-card-lg .platform-icon {
      font-size: 28px;
      margin-bottom: 8px;
    }
    .commerce-platform-card-lg .platform-name {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 10px;
    }
    .commerce-platform-card-lg .platform-share {
      font-size: 28px;
      font-weight: 700;
      line-height: 1;
    }
    .commerce-platform-card-lg .platform-rank {
      font-size: 12px;
      color: var(--text-muted);
      margin-top: 4px;
    }
    .commerce-platform-card-lg .platform-badge {
      display: inline-block;
      font-size: 9px;
      background: rgba(34, 197, 94, 0.2);
      color: var(--accent-green);
      padding: 2px 6px;
      border-radius: var(--radius-xs);
      margin-top: 8px;
    }
    
    /* Progress bars - smooth animation */
    .visibility-bar-fill, .loading-progress-fill, .association-bar-fill,
    .strength-bar-fill-mini, .affinity-bar-fill, .competitor-citation-bar-fill,
    .citation-bar-fill, .progress-fill {
      transition: width 0.8s ease-out;
    }
    
    /* Tab content - animation ready */
    .tab-content {
      will-change: opacity, transform;
    }
    
    /* Visualization canvas - GPU optimized */
    #vizCanvas {
      will-change: opacity, transform;
      backface-visibility: hidden;
    }
    
    /* GEO score ring animation */
    .geo-score-ring {
      will-change: transform, opacity;
    }
    
