/* Extracted from lighthouse-app.html (UI redesign N1) — load order matters */
    /* Competitor Comparison Modal */
    .viz-modal-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.75);
      backdrop-filter: blur(8px) saturate(0.8);
      -webkit-backdrop-filter: blur(8px) saturate(0.8);
      z-index: 1000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    
    .viz-modal-overlay.active {
      display: flex;
    }
    
    .viz-modal {
      background: linear-gradient(180deg, var(--panel2), var(--panel));
      border: 1px solid var(--hull);
      border-radius: var(--radius-xl);
      width: 100%;
      max-width: 700px;
      max-height: 80vh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1);
      animation: modalSlideIn 0.35s var(--ease-out);
    }
    
    .viz-modal-header {
      padding: 20px 24px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    
    .viz-modal-title {
      font-size: 18px;
      font-weight: 600;
    }
    
    .viz-modal-close {
      width: 32px;
      height: 32px;
      background: var(--bg-tertiary);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      color: var(--text-secondary);
      font-size: 18px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: border-color 0.2s ease, color 0.2s ease;
    }

    .viz-modal-close:hover {
      border-color: var(--accent-red);
      color: var(--accent-red);
    }
    
    .viz-modal-body {
      padding: 24px;
      overflow-y: auto;
    }

    /* ── Topic Editor Modal ── */
    .viz-topic-editor-overlay {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.75);
      backdrop-filter: blur(8px) saturate(0.8);
      -webkit-backdrop-filter: blur(8px) saturate(0.8);
      z-index: 1001;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
    }
    .viz-topic-editor-overlay.active {
      display: flex;
    }
    .viz-topic-editor-panel {
      background: var(--bg-secondary);
      border: 1px solid var(--border-subtle);
      border-radius: var(--radius-2xl);
      width: 100%;
      max-width: 600px;
      max-height: 80vh;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.1);
      animation: modalSlideIn 0.35s var(--ease-out);
    }
    .viz-topic-editor-header {
      padding: 20px 24px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .viz-topic-editor-title {
      font-size: 18px;
      font-weight: 600;
    }
    .viz-topic-editor-body {
      padding: 24px;
      overflow-y: auto;
      flex: 1;
    }
    .viz-topic-editor-row {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 10px;
      padding: 8px 10px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
    }
    .viz-topic-editor-dot {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    .viz-topic-editor-input {
      flex: 1;
      background: var(--bg-tertiary);
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      padding: 6px 10px;
      color: var(--text-primary);
      font-size: 13px;
      font-family: inherit;
    }
    .viz-topic-editor-input:focus {
      outline: none;
      border-color: var(--accent);
    }
    .viz-topic-editor-merge {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      color: var(--text-secondary);
      cursor: pointer;
    }
    .viz-topic-editor-merge input[type="checkbox"] {
      accent-color: var(--accent);
    }
    .viz-topic-editor-btn {
      padding: 4px 10px;
      background: transparent;
      border: 1px solid var(--border);
      border-radius: var(--radius-sm);
      color: var(--text-secondary);
      font-size: 11px;
      font-family: inherit;
      cursor: pointer;
      transition: border-color 0.2s ease, color 0.2s ease;
    }
    .viz-topic-editor-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }
    .viz-topic-editor-btn.remove:hover {
      border-color: var(--accent-red);
      color: var(--accent-red);
    }
    .viz-topic-editor-btn:disabled {
      opacity: 0.35;
      cursor: not-allowed;
    }
    .viz-topic-editor-btn:disabled:hover {
      border-color: var(--border);
      color: var(--text-secondary);
    }
    .viz-topic-editor-footer {
      padding: 16px 24px;
      border-top: 1px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .viz-topic-editor-footer-left {
      display: flex;
      gap: 8px;
    }
    .viz-topic-editor-footer-right {
      display: flex;
      gap: 8px;
    }
    .viz-topic-editor-apply {
      padding: 8px 20px;
      background: var(--accent);
      border: none;
      border-radius: var(--radius-md);
      color: #000;
      font-size: 13px;
      font-weight: 600;
      font-family: inherit;
      cursor: pointer;
      transition: filter 0.2s ease;
    }
    .viz-topic-editor-apply:hover {
      filter: brightness(1.15);
    }
    .viz-topic-editor-reset {
      padding: 8px 14px;
      background: transparent;
      border: 1px solid var(--border);
      border-radius: var(--radius-md);
      color: var(--text-secondary);
      font-size: 12px;
      font-family: inherit;
      cursor: pointer;
      transition: border-color 0.2s ease, color 0.2s ease;
    }
    .viz-topic-editor-reset:hover {
      border-color: var(--accent-yellow);
      color: var(--accent-yellow);
    }
    [data-theme="light"] .viz-topic-editor-panel {
      background: var(--bg-primary);
    }
    [data-theme="light"] .viz-topic-editor-input {
      background: var(--bg-secondary);
    }

    .competitor-comparison-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
    }
    
    .competitor-comparison-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 16px;
    }
    
    .competitor-comparison-card.yours {
      border-color: var(--accent);
      background: rgba(232, 168, 48, 0.05);
    }
    
    .competitor-comparison-card.competitor {
      border-color: var(--accent-red);
      background: rgba(239, 68, 68, 0.05);
    }
    
    .comparison-card-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 16px;
    }
    
    .comparison-card-badge {
      padding: 4px 10px;
      border-radius: var(--radius-sm);
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
    }
    
    .comparison-card-badge.yours {
      background: rgba(232, 168, 48, 0.2);
      color: var(--accent);
    }
    
    .comparison-card-badge.competitor {
      background: rgba(239, 68, 68, 0.2);
      color: var(--accent-red);
    }
    
    .comparison-card-name {
      font-size: 15px;
      font-weight: 600;
    }
    
    /* ═══════════════════════════════════════ */
    /* GUIDED WALKTHROUGH / TOUR */
    /* ═══════════════════════════════════════ */
    
    .tour-overlay {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.75);
      z-index: 9998;
      opacity: 0;
      transition: opacity 0.3s ease;
      pointer-events: none;
    }
    
    .tour-overlay.active {
      opacity: 1;
      pointer-events: all;
    }
    
    .tour-spotlight {
      /* fixed, not absolute: it is positioned with viewport (getBoundingClientRect)
         coordinates — absolute only lined up at scroll position zero */
      position: fixed;
      border-radius: var(--radius-md);
      box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.75);
      z-index: 9999;
      transition: top 0.4s ease, left 0.4s ease, width 0.4s ease, height 0.4s ease;
      pointer-events: none;
      display: none;
    }

    .tour-tooltip {
      position: fixed;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px;
      max-width: 360px;
      z-index: 10000;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(232, 168, 48, 0.1);
      opacity: 0;
      transform: translateY(10px);
      transition: opacity 0.3s ease, transform 0.3s ease;
      display: none;
    }
    
    .tour-tooltip.active {
      display: block;
      opacity: 1;
      transform: translateY(0);
    }
    
    .tour-tooltip-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 12px;
    }
    
    .tour-tooltip-step {
      background: var(--accent);
      color: #000;
      font-size: 11px;
      font-weight: 700;
      padding: 4px 10px;
      border-radius: var(--radius-lg);
    }
    
    .tour-tooltip-title {
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
    }
    
    .tour-tooltip-content {
      font-size: 14px;
      color: var(--text-secondary);
      line-height: 1.6;
      margin-bottom: 16px;
    }
    
    .tour-tooltip-content strong {
      color: var(--accent);
    }
    
    .tour-tooltip-actions {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .tour-skip-btn {
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 13px;
      cursor: pointer;
      padding: 8px 12px;
      transition: color 0.2s;
    }
    
    .tour-skip-btn:hover {
      color: var(--text-secondary);
    }
    
    .tour-nav-btns {
      display: flex;
      gap: 8px;
    }
    
    .tour-prev-btn, .tour-next-btn {
      padding: 10px 18px;
      border-radius: var(--radius-md);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
    }

    .tour-prev-btn {
      background: var(--bg-tertiary);
      border: 1px solid var(--border);
      color: var(--text-secondary);
    }

    .tour-prev-btn:hover {
      background: var(--bg-secondary);
      color: var(--text-primary);
    }
    
    .tour-next-btn {
      background: var(--accent);
      border: none;
      color: #000;
    }
    
    .tour-next-btn:hover {
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(232, 168, 48, 0.3);
    }
    
    .tour-progress {
      display: flex;
      gap: 4px;
      justify-content: center;
      margin-top: 12px;
    }
    
    .tour-progress-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--border);
      transition: background 0.2s, width 0.2s, border-radius 0.2s;
    }

    .tour-progress-dot.active {
      background: var(--accent);
      width: 18px;
      border-radius: var(--radius-xs);
    }
    
    .tour-progress-dot.completed {
      background: var(--accent-green);
    }
    
    /* Help button to restart tour */
    .help-tour-btn {
      position: fixed;
      bottom: 100px;
      right: 24px;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--bg-tertiary);
      border: 1px solid var(--border);
      color: var(--text-secondary);
      font-size: 18px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 999;
      transition: background 0.2s, color 0.2s, transform 0.2s;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }

    .help-tour-btn:hover {
      background: var(--bg-card);
      color: var(--accent);
      transform: scale(1.05);
    }
    
    /* Tour prompt banner */
    .tour-prompt {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%) translateY(100px);
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 16px 24px;
      display: flex;
      align-items: center;
      gap: 16px;
      z-index: 998;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
      opacity: 0;
      transition: opacity 0.4s ease, transform 0.4s ease;
    }

    .tour-prompt.visible {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
    }
    
    .tour-prompt-icon {
      font-size: 24px;
    }
    
    .tour-prompt-text {
      font-size: 14px;
      color: var(--text-secondary);
    }
    
    .tour-prompt-text strong {
      color: var(--text-primary);
      display: block;
      margin-bottom: 2px;
    }
    
    .tour-prompt-btn {
      background: var(--accent);
      border: none;
      color: #000;
      padding: 10px 20px;
      border-radius: var(--radius-md);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      white-space: nowrap;
      transition: transform 0.2s;
    }

    .tour-prompt-btn:hover {
      transform: scale(1.02);
    }
    
    .tour-prompt-dismiss {
      background: none;
      border: none;
      color: var(--text-muted);
      font-size: 18px;
      cursor: pointer;
      padding: 4px;
      line-height: 1;
    }

    /* Onboarding v2 — value tour intent + CTA buttons */
    .vt-intent-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      margin-top: 12px;
    }

    .vt-intent-btn {
      background: var(--bg-tertiary);
      border: 1px solid var(--border);
      color: var(--text-primary);
      padding: 10px 12px;
      border-radius: var(--radius-md);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      text-align: center;
      transition: border-color 0.2s, color 0.2s;
    }

    .vt-intent-btn:hover {
      border-color: var(--accent);
      color: var(--accent);
    }

    .vt-cta-btn {
      background: var(--accent);
      border: none;
      color: #000;
      padding: 10px 18px;
      border-radius: var(--radius-md);
      font-size: 13px;
      font-weight: 600;
      cursor: pointer;
      transition: transform 0.2s;
    }

    .vt-cta-btn:hover {
      transform: scale(1.02);
    }

    /* ════════════════════════════════════════════════════════════════
       GEO CONTENT SCORER STYLES
       ════════════════════════════════════════════════════════════════ */
    
    .geo-overview {
      background: linear-gradient(135deg, var(--bg-card), var(--bg-tertiary));
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      padding: 24px;
      display: flex;
      gap: 32px;
      align-items: center;
    }
    
    .geo-score-card-main {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      min-width: 140px;
    }
    
    .geo-score-circle {
      width: 140px;
      height: 140px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    .geo-score-circle svg {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
    }
    
    .geo-score-circle .geo-dial-progress {
      transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .geo-score-content {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
    }
    
    .geo-score-value {
      font-size: 42px;
      font-weight: 700;
      color: var(--text-primary);
      line-height: 1;
    }
    
    .geo-score-label {
      font-size: 10px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-top: 4px;
    }
    
    .geo-score-grade {
      font-size: 28px;
      font-weight: 800;
      padding: 8px 16px;
      border-radius: var(--radius-md);
      background: var(--accent-purple);
      color: white;
    }
    
    .geo-score-grade.grade-a { background: var(--accent-green); }
    .geo-score-grade.grade-b { background: #84cc16; }
    .geo-score-grade.grade-c { background: var(--accent-yellow); }
    .geo-score-grade.grade-d { background: var(--accent-orange); }
    .geo-score-grade.grade-f { background: var(--accent-red); }
    
    .geo-metrics-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
      flex: 1;
    }
    
    .geo-metric {
      background: var(--bg-primary);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 16px;
      text-align: center;
      position: relative;
    }
    
    .geo-metric-value {
      font-size: 28px;
      font-weight: 700;
      color: var(--accent-purple);
    }
    
    .geo-metric-label {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-primary);
      margin-top: 4px;
    }
    
    .geo-metric-desc {
      font-size: 10px;
      color: var(--text-muted);
      margin-top: 2px;
    }
    
    .geo-pages-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    
    .geo-page-item {
      display: flex;
      align-items: center;
      gap: 16px;
      padding: 16px;
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      cursor: pointer;
      transition: border-color 0.2s, transform 0.2s;
    }

    .geo-page-item:hover {
      border-color: var(--accent-purple);
      transform: translateX(4px);
    }
    
    .geo-page-score {
      width: 56px;
      height: 56px;
      border-radius: var(--radius-lg);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      font-weight: 700;
    }
    
    .geo-page-score.high { background: linear-gradient(135deg, var(--accent-green)33, var(--accent-green)11); color: var(--accent-green); }
    .geo-page-score.medium { background: linear-gradient(135deg, var(--accent-yellow)33, var(--accent-yellow)11); color: var(--accent-yellow); }
    .geo-page-score.low { background: linear-gradient(135deg, var(--accent-red)33, var(--accent-red)11); color: var(--accent-red); }
    
    .geo-page-score-value { font-size: 20px; }
    .geo-page-score-label { font-size: 8px; text-transform: uppercase; }
    
    .geo-page-info { flex: 1; }
    .geo-page-title { font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
    .geo-page-url { font-size: 11px; color: var(--text-muted); font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace; }
    
    .geo-page-bars {
      display: flex;
      gap: 4px;
      align-items: flex-end;
    }
    
    .geo-bar {
      width: 8px;
      border-radius: var(--radius-xs);
    }
    
    .geo-priority-fixes {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    
    .geo-priority-item {
      display: flex;
      gap: 16px;
      padding: 16px;
      background: var(--bg-card);
      border: 1px solid rgba(168, 85, 247, 0.2);
      border-radius: var(--radius-lg);
      background: rgba(168, 85, 247, 0.06);
    }

    .geo-priority-item.high { background: rgba(239, 68, 68, 0.06); border-color: rgba(239, 68, 68, 0.2); }
    .geo-priority-item.medium { background: rgba(234, 179, 8, 0.06); border-color: rgba(234, 179, 8, 0.2); }

    .geo-priority-icon { font-size: 24px; }
    .geo-priority-content { flex: 1; }
    .geo-priority-title { font-weight: 600; margin-bottom: 4px; }
    .geo-priority-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
    .geo-priority-impact { 
      display: inline-block;
      padding: 4px 8px;
      background: rgba(147, 51, 234, 0.15);
      color: var(--accent-purple);
      border-radius: var(--radius-xs);
      font-size: 11px;
      font-weight: 600;
    }
    
    /* ════════════════════════════════════════════════════════════════
       CITATION MAPPING STYLES
       ════════════════════════════════════════════════════════════════ */
    
    .citation-overview {
      background: linear-gradient(135deg, var(--bg-card), var(--bg-tertiary));
      border: 1px solid var(--border);
      border-radius: var(--radius-xl);
      padding: 24px;
    }
    
    .citation-stats-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 16px;
    }
    
    .citation-stat {
      background: var(--bg-primary);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 20px;
      text-align: center;
      position: relative;
    }
    
    .citation-stat-value {
      font-size: 36px;
      font-weight: 700;
      color: var(--accent-blue);
    }
    
    .citation-stat-label {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-primary);
      margin-top: 4px;
    }
    
    .citation-stat-desc {
      font-size: 10px;
      color: var(--text-muted);
      margin-top: 2px;
    }
    
    .citation-gaps-list, .citation-sources-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    
