/* Extracted from lighthouse-app.html (UI redesign N1) — load order matters */
    /* METRICS TREND VISUALIZATION */
    /* ═══════════════════════════════════════ */
    
    .metrics-trend-container {
      background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(15, 23, 42, 0.95) 100%);
      border-bottom: 1px solid color-mix(in srgb, var(--brand-primary, var(--border)) 30%, var(--border));
      padding: 24px 32px;
      position: relative;
      overflow: hidden;
    }

    .metrics-trend-container::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background:
        radial-gradient(ellipse 80% 50% at 50% -20%,
          color-mix(in srgb, var(--brand-primary, var(--accent)) 8%, transparent) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 100%,
          color-mix(in srgb, var(--brand-secondary, var(--accent-purple)) 6%, transparent) 0%, transparent 50%);
      pointer-events: none;
    }


.radar-bg-watermark {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 200px;
      height: 200px;
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      opacity: 0.04;
      pointer-events: none;
      z-index: 0;
      filter: grayscale(0.5);
    }
    
    .metrics-trend-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 16px;
      position: relative;
      z-index: 1;
    }
    
    .metrics-trend-title {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: 16px;
      font-weight: 600;
      color: var(--text-primary);
    }
    
    .trend-icon {
      font-size: 20px;
    }
    
    .trend-subtitle {
      font-size: 12px;
      font-weight: 400;
      color: var(--text-muted);
      margin-left: 8px;
    }
    
    .metrics-trend-legend {
      display: flex;
      gap: 20px;
    }
    
    .legend-item {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: var(--text-secondary);
      cursor: pointer;
      transition: background 0.2s, color 0.2s, opacity 0.2s;
      padding: 4px 8px;
      border-radius: var(--radius-sm);
    }

    .legend-item:hover {
      background: rgba(255, 255, 255, 0.05);
      color: var(--text-primary);
    }
    
    .legend-item.active {
      background: rgba(255, 255, 255, 0.08);
    }
    
    .legend-item.dimmed {
      opacity: 0.3;
    }
    
    .legend-dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      flex-shrink: 0;
    }
    
    .metrics-trend-chart {
      position: relative;
      height: 300px;
      z-index: 1;
    }
    
    .metrics-trend-svg {
      width: 100%;
      height: 100%;
    }
    
    /* Trend lines - clean, no glow */
    .trend-line {
      fill: none;
      stroke-width: 3.5;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    /* literal hexes so the lines never fall back to black on stale token cache */
    .trend-line-visibility { stroke: #E8A830; }
    .trend-line-sentiment { stroke: #8B5CF6; }
    .trend-line-geo { stroke: #22C55E; }
    .trend-line-alignment { stroke: #FF5A36; }
    
    /* Area fills under lines */
    .trend-area {
      opacity: 0.1;
    }
    
    .trend-area-visibility { fill: var(--accent); }
    .trend-area-sentiment { fill: var(--accent-purple); }
    .trend-area-geo { fill: var(--accent-green); }
    .trend-area-alignment { fill: var(--accent-gold); }
    
    /* Data points — one clean filled dot per data point, ringed in the bg
       colour so it reads cleanly where it sits on the line. */
    .trend-point { cursor: pointer; }
    .trend-point-hit { pointer-events: all; }
    .trend-point-dot {
      pointer-events: none;
      stroke-width: 2;
      transition: r 0.15s ease, filter 0.15s ease;
    }
    .trend-point-visibility { color: #E8A830; }
    .trend-point-sentiment  { color: #8B5CF6; }
    .trend-point-geo        { color: #22C55E; }
    .trend-point-alignment  { color: #FF5A36; }
    /* dots inherit their series colour via currentColor (robust vs token cache) */
    .trend-point-dot { fill: currentColor; }
    .trend-point:hover .trend-point-dot {
      r: 8;
      filter: drop-shadow(0 0 8px currentColor);
    }

    /* Grid lines — crisp hairlines */
    .trend-grid-line {
      stroke: var(--hull);
      stroke-width: 1;
      opacity: 0.45;
    }

    .trend-axis-label {
      fill: var(--text-muted);
      font-size: 10px;
      font-family: var(--font-mono);
    }

    .trend-date-label {
      fill: var(--text-secondary);
      font-size: 11px;
      font-family: var(--font-mono);
      text-anchor: middle;
    }
    
    /* Tooltip */
    .metrics-trend-tooltip {
      position: absolute;
      background: rgba(15, 23, 42, 0.98);
      border: 1px solid var(--border);
      border-radius: var(--radius-lg);
      padding: 14px 18px;
      pointer-events: none;
      opacity: 0;
      transform: translateY(10px);
      transition: opacity 0.2s ease, transform 0.2s ease;
      z-index: 100;
      min-width: 200px;
      box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
      backdrop-filter: blur(8px);
    }

    .metrics-trend-tooltip.visible {
      opacity: 1;
      transform: translateY(0);
    }
    
    .tooltip-date {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-primary);
      margin-bottom: 10px;
      padding-bottom: 8px;
      border-bottom: 1px solid var(--border);
    }
    
    .tooltip-metrics {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }
    
    .tooltip-metric-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
    }
    
    .tooltip-metric-label {
      display: flex;
      align-items: center;
      gap: 6px;
      color: var(--text-secondary);
    }
    
    .tooltip-metric-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
    }
    
    .tooltip-metric-value {
      font-weight: 600;
      color: var(--text-primary);
    }
    
    .tooltip-hint {
      margin-top: 10px;
      padding-top: 8px;
      border-top: 1px solid var(--border);
      font-size: 10px;
      color: var(--text-muted);
      text-align: center;
    }
    
    /* Vertical indicator line */
    .trend-hover-line {
      stroke: rgba(255, 255, 255, 0.2);
      stroke-width: 1;
      stroke-dasharray: 4 4;
      pointer-events: none;
    }
    
    /* Empty state */
    .metrics-trend-empty {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      height: 180px;
      color: var(--text-muted);
      font-size: 14px;
    }
    
    .metrics-trend-empty-icon {
      font-size: 32px;
      margin-bottom: 12px;
      opacity: 0.5;
    }
    
    @media (max-width: 900px) {
      .metrics-trend-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
      }
      
      .metrics-trend-legend {
        flex-wrap: wrap;
        gap: 10px;
      }
    }
    
    /* Score Cards */
    .score-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 14px;
      padding: 24px 32px;
      background: var(--bg-primary);
      border-bottom: 1px solid var(--hull);
      /* padding/gap transitions removed – layout-triggering; grid reflows instantly */
    }

    .score-card {
      background: linear-gradient(180deg, var(--panel2), var(--panel));
      border: 1px solid var(--hull);
      border-radius: 14px;
      padding: 16px;
      text-align: center;
      position: relative;
      overflow: hidden;
      transition: border-color 0.2s ease, transform 0.2s ease;
      will-change: transform, opacity;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 160px;
      box-shadow: none;
    }

    .score-card:hover {
      border-color: var(--hull2);
      transform: translateY(-1px);
    }
    
    /* Score card — no decorative top-stripe or sweep animation */
    
    /* Score Dial - Donut style with centered content */
    .score-dial-container {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      width: 120px;
      height: 120px;
      transition: transform 0.3s ease;
    }

    .score-dial-svg {
      position: absolute;
      top: 0;
      left: 0;
      transition: transform 0.3s ease;
    }
    
    .score-dial-progress {
      transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .score-dial-content {
      position: relative;
      z-index: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 8px;
    }
    
    .score-dial-value {
      font-family: var(--font-mono);
      font-size: 32px;
      font-weight: 600;
      line-height: 1;
      margin-bottom: 4px;
      letter-spacing: -0.01em;
      transition: font-size 0.3s ease;
    }

    .score-dial-label {
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 500;
      color: var(--mist);
      text-transform: uppercase;
      letter-spacing: 0.12em;
      line-height: 1.3;
      max-width: 88px;
    }

    .score-dial-sublabel {
      font-family: var(--font-mono);
      font-size: 9px;
      color: var(--dim);
      letter-spacing: 0.06em;
      line-height: 1.3;
      max-width: 88px;
    }
    
    /* Score Bar (compact alternative to dial - hidden by default) */
    .score-bar { display: none; width: 100%; }
    .score-bar-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-secondary); margin-bottom: 5px; }
    .score-bar-track { position: relative; height: 26px; background: var(--bg-tertiary, rgba(255,255,255,0.06)); border-radius: var(--radius-md); overflow: hidden; }
    .score-bar-fill { height: 100%; border-radius: var(--radius-md); opacity: 0.25; }
    .score-bar-value { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 14px; font-weight: 800; }

    /* Premium hover effect for score cards */
    .score-card:hover .score-dial-svg {
      transform: scale(1.05);
      transition: transform 0.3s ease;
    }

    .score-card .score-dial-svg {
      transition: transform 0.3s ease;
    }
    
    .score-value {
      font-family: var(--font-mono);
      font-size: 42px;
      font-weight: 600;
      color: var(--score-color, var(--text-primary));
      line-height: 1;
      margin-bottom: 6px;
    }

    .score-label {
      font-family: var(--font-mono);
      font-size: 11px;
      font-weight: 500;
      color: var(--mist);
      text-transform: uppercase;
      letter-spacing: 0.12em;
    }

    .score-sublabel {
      font-family: var(--font-mono);
      font-size: 10px;
      color: var(--dim);
      letter-spacing: 0.06em;
      margin-top: 4px;
    }
    
    .score-submetric {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
    }
    
    .submetric-value {
      font-size: 13px;
      font-weight: 600;
      color: var(--text-secondary);
      font-family: 'IBM Plex Mono', 'JetBrains Mono', monospace;
    }
    
    .submetric-label {
      font-size: 10px;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    
    @media (max-width: 1100px) {
      .score-grid {
        grid-template-columns: repeat(3, 1fr);
      }
    }
    
    @media (max-width: 768px) {
      .score-grid {
        grid-template-columns: repeat(2, 1fr);
      }
    }

    /* ── Compact mode: non-overview tabs ── */

    /* Performance Trends collapses */
    .dashboard.tab-detail .metrics-trend-container {
      max-height: 0;
      padding-top: 0;
      padding-bottom: 0;
      border-bottom: none;
      opacity: 0;
      pointer-events: none;
      overflow: hidden;
      transition: max-height 0.35s ease, opacity 0.25s ease;
    }
    .metrics-trend-container {
      max-height: 600px;
      transition: max-height 0.35s ease, opacity 0.25s ease;
    }

    /* Score Grid becomes a compact strip */
    .dashboard.tab-detail .score-grid {
      padding: 10px 24px;
      gap: 10px;
      grid-template-columns: repeat(5, 1fr);
    }

    .dashboard.tab-detail .score-card {
      min-height: auto;
      padding: 10px 12px;
      border-radius: var(--radius-md);
    }
    .dashboard.tab-detail .score-card:hover {
      transform: none;
    }
    /* Swap donut → bar in compact mode */
    .dashboard.tab-detail .score-dial-container { display: none; }
    .dashboard.tab-detail .score-dial-sublabel { display: none; }
    .dashboard.tab-detail .score-bar { display: block; }
    .dashboard.tab-detail .score-card .pro-insight-tooltip { display: none; }

    @media (max-width: 1100px) {
      .dashboard.tab-detail .score-grid {
        grid-template-columns: repeat(5, 1fr);
      }
    }
    @media (max-width: 768px) {
      .dashboard.tab-detail .score-grid {
        grid-template-columns: repeat(5, 1fr);
        padding: 8px 12px;
        gap: 6px;
      }
      .dashboard.tab-detail .score-card {
        padding: 8px 10px;
      }
      .dashboard.tab-detail .score-bar-label { font-size: 9px; }
      .dashboard.tab-detail .score-bar-track { height: 22px; }
      .dashboard.tab-detail .score-bar-value { font-size: 12px; }
    }

    /* ═══════════════════════════════════════
       GSAP Animation Support Styles
       ═══════════════════════════════════════ */
    
    /* Cards and list items - animation ready */
    .prompt-card, .page-card, .citation-source-card, 
    .issue-card, .strategy-card, .quick-win-card,
    .recommendation-item, .commerce-metric, .commerce-card {
      will-change: transform, opacity;
      backface-visibility: hidden;
    }
    

    /* ── T1: chart credibility (m2) ── */
    .trend-cred-badge {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      font-size: 11px;
      color: var(--accent-green);
      border: 1px solid rgba(34, 197, 94, 0.5);
      border-radius: var(--radius-full);
      padding: 2px 10px;
      margin-left: 10px;
      white-space: nowrap;
    }
    .trend-smoothing-controls { display: flex; gap: 6px; align-items: center; }
    .trend-smooth-chip {
      padding: 4px 11px;
      border-radius: var(--radius-full);
      border: 1px solid var(--border);
      color: var(--text-secondary);
      font-size: 11px;
      background: var(--bg-tertiary);
      cursor: pointer;
      font-family: inherit;
      white-space: nowrap;
    }
    .trend-smooth-chip.on {
      border-color: rgba(232, 168, 48, 0.6);
      color: var(--accent);
      background: rgba(232, 168, 48, 0.10);
    }
    /* dots stay visible in both smoothed + raw modes */
    .trend-smoothed .trend-point { opacity: 1; }
    .trend-annotation text { font-family: inherit; }
