/**
 * Website Performance Solution Page Stylesheet
 * Scoped under: .solution-performance-page
 * Fully responsive with native Dark and Light mode support.
 * Design tokens strictly following design system.
 */

/* Container & Scope */
.solution-performance-page {
  overflow-x: hidden;
}

.solution-performance-page * {
  box-sizing: border-box;
}

.solution-performance-page .wrap {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0;
}

.solution-performance-page .perf-section {
  padding: 84px 0;
  position: relative;
}

@media (max-width: 768px) {
  .solution-performance-page .perf-section {
    padding: 56px 0;
  }
}

/* Gradient text utility */
.perf-gradient-text {
  background: linear-gradient(135deg, var(--text) 30%, var(--text-dim) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

/* Common Badges */
.solution-performance-page .perf-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.solution-performance-page .tag-green {
  background: rgba(19, 165, 127, 0.14);
  color: #13a57f;
  border: 1px solid rgba(19, 165, 127, 0.25);
}

.solution-performance-page .tag-blue {
  background: rgba(96, 165, 250, 0.14);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.solution-performance-page .tag-purple {
  background: rgba(167, 139, 250, 0.14);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.solution-performance-page .tag-pink {
  background: rgba(244, 114, 182, 0.14);
  color: #f472b6;
  border: 1px solid rgba(244, 114, 182, 0.25);
}

.solution-performance-page .tag-yellow {
  background: rgba(250, 204, 21, 0.16);
  color: #b38800;
  border: 1px solid rgba(250, 204, 21, 0.25);
}

/* Section Header Typography */
.solution-performance-page .sec-head {
  margin-bottom: 48px;
}

.solution-performance-page .perf-section-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 16px;
}

.solution-performance-page .perf-section-lead {
  font-size: 15.5px;
  line-height: 1.68;
  color: var(--text-dim);
  max-width: 740px;
  margin: 0;
}

@media (max-width: 768px) {
  .solution-performance-page .perf-section-title {
    font-size: 28px;
  }
  .solution-performance-page .perf-section-lead {
    font-size: 14.5px;
  }
}

/* ==========================================================================
   SHARED UTILITY CLASSES
   ========================================================================== */
.good-val { color: #13a57f !important; font-weight: 700; }
.bad-val  { color: #f87171 !important; font-weight: 700; }
.delta-up { color: #13a57f !important; font-weight: 700; }

/* ==========================================================================
   HERO: SPEED ANALYZER (GAUGE + WATERFALL)
   ========================================================================== */
.perf-analyzer-wrapper {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  max-width: 1020px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .perf-analyzer-wrapper {
    grid-template-columns: 1fr;
  }
}

/* ---- Shared panel chrome ---- */
.perf-gauge-panel,
.perf-waterfall-panel {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.perf-gauge-topbar,
.perf-waterfall-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt, var(--surface));
  flex-wrap: wrap;
}

/* ---- Gauge Panel ---- */
.perf-gauge-body {
  padding: 16px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.perf-gauge-svg {
  width: 100%;
  max-width: 260px;
}

.gauge-track {
  stroke: var(--border);
}

.gauge-fill {
  animation: gauge-draw 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  stroke-dasharray: 340;
  stroke-dashoffset: 340;
}

@keyframes gauge-draw {
  to { stroke-dashoffset: 0; }
}

.gauge-needle-group {
  transform-origin: 130px 148px;
  animation: needle-sweep 2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  transform: rotate(-90deg);
}

@keyframes needle-sweep {
  to { transform: rotate(72deg); } /* 96/100 * 180deg - 90 */
}

.gauge-needle {
  stroke: var(--text);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.gauge-pivot {
  fill: var(--surface);
  stroke: var(--border);
  stroke-width: 2;
}

.gauge-pivot-inner {
  fill: #13a57f;
}

.gauge-zone-lbl {
  font-size: 9px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  fill: var(--text-dim);
}

.zone-red   { fill: #f87171; }
.zone-amber { fill: #facc15; }
.zone-green { fill: #13a57f; }

/* Score display */
.gauge-score-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: -8px;
}

.gauge-score-num {
  font-size: 52px;
  font-weight: 900;
  color: #13a57f;
  line-height: 1;
  letter-spacing: -0.03em;
  counter-reset: gauge var(--gauge-n);
}

.gauge-score-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Category scores row */
.gauge-categories {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.gauge-cat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
}

.gauge-cat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

.gcat-num {
  font-size: 18px;
  font-weight: 900;
  color: #13a57f;
}

.gcat-lbl {
  font-size: 9px;
  color: var(--text-dim);
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
}

/* CWV Pill badges */
.gauge-cwv-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
}

.cwv-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  white-space: nowrap;
  flex-wrap: nowrap;
}

.cwv-pill.good {
  border-color: rgba(19, 165, 127, 0.25);
  background: rgba(19, 165, 127, 0.04);
}

.cwv-pill-key {
  font-size: 10px;
  font-weight: 800;
  color: #60a5fa;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

.cwv-pill-val {
  font-size: 11px;
  font-weight: 700;
  color: #13a57f;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Waterfall Panel ---- */
.wf-total-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: #13a57f;
  margin-left: auto;
  flex-shrink: 0;
}

.wf-total-tag svg {
  width: 12px;
  height: 12px;
}

/* Ruler */
.wf-ruler {
  display: flex;
  justify-content: space-between;
  padding: 4px 100px 4px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt, rgba(0,0,0,0.03));
}

.wf-ruler span {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

/* Rows */
.wf-rows {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
  position: relative;
  flex: 1;
}

.wf-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  padding: 3px 14px;
  gap: 8px;
  min-height: 28px;
}

.wf-row:hover {
  background: rgba(96, 165, 250, 0.04);
}

.wf-label {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.wf-type {
  font-size: 8px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}

.wf-type.html { background: rgba(251, 146, 60, 0.2); color: #fb923c; }
.wf-type.css  { background: rgba(96, 165, 250, 0.2); color: #60a5fa; }
.wf-type.js   { background: rgba(250, 204, 21, 0.2); color: #b38800; }
.wf-type.img  { background: rgba(167, 139, 250, 0.2); color: #a78bfa; }
.wf-type.font { background: rgba(244, 114, 182, 0.2); color: #f472b6; }
.wf-type.json { background: rgba(19, 165, 127, 0.2); color: #13a57f; }

.wf-filename {
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wf-bar-track {
  position: relative;
  height: 16px;
  display: flex;
  align-items: center;
}

.wf-bar {
  position: absolute;
  left: var(--wf-start);
  width: var(--wf-width);
  height: 10px;
  border-radius: 3px;
  animation: wf-grow 0.8s ease forwards;
}

@keyframes wf-grow {
  from { opacity: 0; transform: scaleX(0); transform-origin: left; }
  to   { opacity: 1; transform: scaleX(1); }
}

.wf-html { background: linear-gradient(90deg, #f97316, #fb923c); }
.wf-css  { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.wf-js   { background: linear-gradient(90deg, #ca8a04, #b38800); }
.wf-img  { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.wf-font { background: linear-gradient(90deg, #db2777, #f472b6); }
.wf-json { background: linear-gradient(90deg, #16a34a, #13a57f); }

.wf-ms {
  position: absolute;
  right: 0;
  font-size: 9px;
  font-weight: 700;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  width: 36px;
  text-align: right;
}

/* Timing markers */
.wf-markers {
  position: relative;
  height: 28px;
  margin: 0 14px;
  border-top: 1px solid var(--border);
}

.wf-marker {
  position: absolute;
  left: calc(var(--marker-pos) - 2px);
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.wf-marker-line {
  width: 1.5px;
  height: 10px;
  flex-shrink: 0;
}

.wf-marker-lcp .wf-marker-line { background: #13a57f; }
.wf-marker-dom .wf-marker-line { background: #60a5fa; }
.wf-marker-load .wf-marker-line { background: #a78bfa; }

.wf-marker-tag {
  font-size: 8.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  white-space: nowrap;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

.green-tag  { background: rgba(19, 165, 127, 0.15); color: #13a57f; }
.blue-tag   { background: rgba(96, 165, 250, 0.15); color: #60a5fa; }
.purple-tag { background: rgba(167, 139, 250, 0.15); color: #a78bfa; }

/* Summary footer */
.wf-summary {
  display: flex;
  align-items: center;
  gap: 0;
  border-top: 1px solid var(--border);
  background: var(--surface-alt, rgba(0,0,0,0.02));
}

.wf-sum-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 8px 4px;
  border-right: 1px solid var(--border);
}

.wf-sum-item:last-child { border-right: none; }

.wf-sum-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.wf-sum-lbl {
  font-size: 9px;
  color: var(--text-dim);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Shared window chrome ---- */
.perf-hero {
  padding: 88px 0 60px;
  position: relative;
  text-align: center;
}

.perf-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.perf-hero-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 480px;
  background: radial-gradient(circle at center, rgba(19, 165, 127, 0.11) 0%, rgba(96, 165, 250, 0.07) 45%, transparent 75%);
  filter: blur(60px);
  pointer-events: none;
}

.perf-grid-pattern {
  display: none !important;
}

.perf-hero .wrap {
  position: relative;
  z-index: 1;
}

.perf-hero-content {
  max-width: 760px;
  margin: 0 auto 56px;
}

.perf-kicker-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(19, 165, 127, 0.1);
  border: 1px solid rgba(19, 165, 127, 0.22);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #13a57f;
  margin-bottom: 24px;
}

.perf-kicker-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #13a57f;
  box-shadow: 0 0 6px #13a57f;
  animation: perf-ping 1.6s infinite;
}

@keyframes perf-ping {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.perf-hero-title {
  font-size: clamp(36px, 5.5vw, 58px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0 0 20px;
}

.perf-hero-lead {
  font-size: 17px;
  line-height: 1.72;
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 32px;
}

.perf-hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.perf-hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.perf-hero-badges {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
}

.perf-hbadge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
}

.perf-hbadge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.perf-icon-green { color: #13a57f; }
.perf-icon-blue  { color: #60a5fa; }
.perf-icon-purple{ color: #a78bfa; }

/* ==========================================================================
   PERFORMANCE DASHBOARD WINDOW
   ========================================================================== */
.perf-dashboard-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.perf-dashboard-window {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

/* Window Title Bar */
.perf-dash-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface-alt, var(--surface));
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.perf-window-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.perf-window-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.dot.red    { background: #ef4444; }
.dot.yellow { background: #b38800; }
.dot.green  { background: #22c55e; }

.perf-bar-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
}

.perf-live-ping {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #13a57f;
  box-shadow: 0 0 6px #13a57f;
  animation: perf-ping 1.4s infinite;
  flex-shrink: 0;
}

.perf-bar-title {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.perf-dash-tabs {
  display: flex;
  gap: 4px;
}

.pd-tab-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.pd-tab-btn svg {
  width: 13px;
  height: 13px;
}

.pd-tab-btn:hover,
.pd-tab-btn.active {
  background: rgba(19, 165, 127, 0.12);
  border-color: rgba(19, 165, 127, 0.3);
  color: #13a57f;
}

/* Dashboard Body */
.perf-dash-body {
  padding: 24px;
}

.perf-dash-body.is-hidden {
  display: none;
}

/* Score Rings Row */
.perf-scores-row {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.score-ring-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.score-ring-wrap {
  position: relative;
  width: 80px;
  height: 80px;
}

.score-ring {
  width: 80px;
  height: 80px;
  transform: rotate(-90deg);
}

.ring-bg {
  fill: none;
  stroke: var(--border);
  stroke-width: 8;
}

.ring-fill {
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset 1.2s ease;
}

.ring-green  { stroke: #13a57f; }
.ring-orange { stroke: #fb923c; }
.ring-red    { stroke: #f87171; }

.score-ring-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}

.score-ring-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
}

.score-ring-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.score-ring-badge.good {
  background: rgba(19, 165, 127, 0.15);
  color: #13a57f;
  border: 1px solid rgba(19, 165, 127, 0.3);
}

/* Vitals Metrics List */
.perf-vitals-metrics {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vital-metric-row {
  display: grid;
  grid-template-columns: 180px 1fr 60px 65px;
  align-items: center;
  gap: 12px;
}

@media (max-width: 600px) {
  .vital-metric-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .vital-bar-wrap { grid-column: 1 / -1; }
}

.vital-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vital-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #60a5fa;
}

.vital-name {
  font-size: 11.5px;
  color: var(--text-dim);
}

.vital-bar-wrap {
  height: 6px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}

.vital-bar {
  height: 100%;
  width: var(--bar-pct);
  border-radius: 99px;
  background: var(--bar-color, #13a57f);
  animation: bar-grow 1s ease forwards;
}

@keyframes bar-grow {
  from { width: 0; }
  to   { width: var(--bar-pct); }
}

.vital-val {
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.vital-status {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  text-align: center;
}

.good-status {
  background: rgba(19, 165, 127, 0.15);
  color: #13a57f;
}

/* Before/After Table */
.perf-compare-box {
  border-radius: 8px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.perf-compare-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--surface-alt, rgba(0,0,0,0.04));
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.perf-compare-header span:first-child {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.perf-compare-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.perf-compare-rows { display: flex; flex-direction: column; }

.cmp-row {
  display: grid;
  grid-template-columns: 1fr 80px 80px 70px;
  gap: 8px;
  padding: 9px 16px;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.cmp-row:last-child { border-bottom: none; }

.cmp-head {
  background: rgba(0,0,0,0.03);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.cmp-metric { font-size: 12.5px; color: var(--text); }
.cmp-before, .cmp-after, .cmp-delta { font-size: 12.5px; text-align: center; }
.cmp-delta { font-size: 11.5px; }

/* ==========================================================================
   2. DIAGNOSIS SECTION
   ========================================================================== */
.perf-diag-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .perf-diag-grid {
    grid-template-columns: 1fr;
  }
}

.perf-diag-card {
  display: flex;
  gap: 20px;
  padding: 28px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.25s ease;
}

.perf-diag-card:hover {
  border-color: rgba(19, 165, 127, 0.35);
}

.diag-step-num {
  font-size: 28px;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  min-width: 40px;
}

.diag-content h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.diag-content p {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0 0 12px;
}

.diag-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.diag-tags span {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

/* ==========================================================================
   3. CORE WEB VITALS SECTION
   ========================================================================== */
.perf-cwv-section {
  background: var(--surface);
  border-top: none;
  border-bottom: 1px solid var(--layout-grid-line);
}

.perf-cwv-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .perf-cwv-grid {
    grid-template-columns: 1fr;
  }
}

.cwv-card {
  padding: 28px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cwv-metric-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
}

.cwv-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.cwv-desc {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0;
}

.cwv-fixes {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cwv-fix-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.5;
}

.fix-arrow {
  color: #13a57f;
  font-weight: 700;
  flex-shrink: 0;
}

.cwv-target {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(19, 165, 127, 0.06);
  border: 1px solid rgba(19, 165, 127, 0.15);
  margin-top: auto;
}

.target-lbl {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 600;
}

.target-val {
  font-size: 16px;
  font-weight: 800;
}

/* ==========================================================================
   4. BOTTLENECKS SECTION
   ========================================================================== */
.perf-bottleneck-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

@media (max-width: 900px) {
  .perf-bottleneck-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 540px) {
  .perf-bottleneck-grid {
    grid-template-columns: 1fr;
  }
}

.perf-btn-card {
  padding: 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.25s ease;
}

.perf-btn-card:hover {
  border-color: rgba(96, 165, 250, 0.35);
}

.perf-btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
}

.perf-btn-icon svg {
  width: 20px;
  height: 20px;
}

.perf-btn-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.perf-btn-card p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0;
}

/* ==========================================================================
   5. IMAGES / ASSETS SECTION (ETL Pipeline layout)
   ========================================================================== */
.perf-etl-pipeline {
  display: flex;
  align-items: stretch;
  gap: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.etl-stage {
  flex: 1;
  padding: 32px 28px;
  background: var(--surface);
}

.etl-stage + .etl-stage {
  border-left: 1px solid var(--border);
}

.etl-stage-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  background: rgba(167, 139, 250, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.25);
  margin-bottom: 12px;
}

.etl-stage h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.etl-stage p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0 0 14px;
}

.etl-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.etl-bullets li {
  font-size: 12.5px;
  color: var(--text-dim);
  padding-left: 16px;
  position: relative;
}

.etl-bullets li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #13a57f;
  font-weight: 700;
}

.etl-arrow-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  font-size: 20px;
  color: var(--text-dim);
  background: var(--surface);
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  min-width: 32px;
}

@media (max-width: 800px) {
  .perf-etl-pipeline {
    flex-direction: column;
  }

  .etl-stage + .etl-stage {
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .etl-arrow-divider {
    padding: 8px;
    border-left: none;
    border-right: none;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: rotate(90deg);
    min-width: unset;
  }
}

/* ==========================================================================
   6. CACHING & CDN SECTION
   ========================================================================== */
.perf-caching-section {
  background: var(--surface);
  border-top: none;
  border-bottom: 1px solid var(--layout-grid-line);
}

.perf-cache-layers {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cache-layer {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color 0.25s ease;
}

.cache-layer:hover {
  border-color: rgba(19, 165, 127, 0.3);
}

.cache-layer-num {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(19, 165, 127, 0.12);
  border: 1px solid rgba(19, 165, 127, 0.25);
  color: #13a57f;
  font-weight: 900;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
}

.cache-layer-body {
  flex: 1;
}

.cache-layer-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.cache-layer-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.cache-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cache-layer-body p {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0 0 12px;
}

.cache-tech-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cache-tech-row span {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(96, 165, 250, 0.08);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.18);
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   7. CODE & ARCHITECTURE SECTION
   ========================================================================== */
.perf-code-pillars {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .perf-code-pillars {
    grid-template-columns: 1fr;
  }
}

.code-pillar-card {
  padding: 28px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pillar-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.pillar-status {
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  flex-shrink: 0;
}

.pillar-status.pass {
  background: rgba(19, 165, 127, 0.15);
  color: #13a57f;
  border: 1px solid rgba(19, 165, 127, 0.3);
}

.pillar-header h4 {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

.code-pillar-card p {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0;
}

.pillar-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 7px;
  background: rgba(19, 165, 127, 0.06);
  border: 1px solid rgba(19, 165, 127, 0.15);
  margin-top: auto;
}

.stat-num {
  font-size: 26px;
  font-weight: 900;
  color: #13a57f;
}

.stat-lbl {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
}

/* ==========================================================================
   8. MEASUREMENT / MONITORING SECTION
   ========================================================================== */
.perf-mon-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .perf-mon-grid {
    grid-template-columns: 1fr;
  }
}

.perf-mon-card {
  padding: 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.mon-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.mon-icon-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mon-icon-circle svg {
  width: 18px;
  height: 18px;
}

.mon-icon-circle.green {
  background: rgba(19, 165, 127, 0.15);
  color: #13a57f;
  border: 1px solid rgba(19, 165, 127, 0.25);
}

.mon-icon-circle.blue {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.mon-icon-circle.purple {
  background: rgba(167, 139, 250, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(167, 139, 250, 0.25);
}

.mon-header h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.perf-mon-card p {
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.65;
  margin: 0 0 14px;
}

.mon-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mon-tag-row span {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--surface-alt, rgba(0,0,0,0.05));
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ==========================================================================
   9. RESULTS / CASE STUDY SECTION
   ========================================================================== */
.perf-results-section {
  background: var(--surface);
  border-top: none;
  border-bottom: 1px solid var(--layout-grid-line);
}

.perf-case-study {
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg);
  margin-bottom: 48px;
}

.case-study-header {
  padding: 28px 32px;
  border-bottom: 1px solid var(--border);
}

.case-study-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(250, 204, 21, 0.15);
  color: #b38800;
  border: 1px solid rgba(250, 204, 21, 0.25);
  margin-bottom: 12px;
}

.case-study-header h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 8px;
}

.case-study-header p {
  font-size: 13.5px;
  color: var(--text-dim);
  margin: 0;
}

.case-study-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
}

@media (max-width: 768px) {
  .case-study-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .case-study-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.cs-metric {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px;
  border-right: 1px solid var(--border);
}

.cs-metric:last-child {
  border-right: none;
}

.cs-before, .cs-after {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.cs-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.cs-val {
  font-size: 22px;
  font-weight: 900;
}

.cs-name {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
}

.cs-arrow {
  font-size: 18px;
  color: var(--text-dim);
}

.case-study-quote {
  padding: 24px 32px;
}

.case-study-quote blockquote {
  font-size: 15px;
  font-style: italic;
  color: var(--text);
  line-height: 1.7;
  margin: 0 0 8px;
  border-left: 3px solid #13a57f;
  padding-left: 16px;
}

.quote-attribution {
  font-size: 12.5px;
  color: var(--text-dim);
  font-weight: 600;
}

/* Industry Stats Row */
.perf-industry-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 768px) {
  .perf-industry-stats {
    grid-template-columns: 1fr;
  }
}

.industry-stat-item {
  padding: 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: center;
}

.industry-stat-num {
  font-size: 36px;
  font-weight: 900;
  color: #13a57f;
  margin-bottom: 8px;
}

.industry-stat-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}

/* ==========================================================================
   HERO RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .perf-hero {
    padding: 64px 0 40px;
  }

  .perf-hero-lead {
    font-size: 15px;
  }

  .perf-scores-row {
    gap: 16px;
  }

  .score-ring-wrap, .score-ring {
    width: 64px;
    height: 64px;
  }

  .score-ring-num {
    font-size: 15px;
  }

  .perf-dash-bar {
    gap: 8px;
  }

  .perf-dash-tabs {
    display: none;
  }
}
