/* ==========================================================================
   Page Speed Optimization  —  /page-speed-optimization/
   Base utilities (wrb-*) are loaded from website-rebuild.css.
   Only PSO-specific components are defined here.
   ========================================================================== */

/* ==========================================================================
   Symptom Selector
   ========================================================================== */
.pso-sym__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 0;
}

.pso-sym__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  font-family: inherit;
  width: 100%;
}
.pso-sym__card:hover {
  border-color: #D97706;
  box-shadow: 0 4px 16px rgba(217,119,6,.12);
  transform: translateY(-2px);
}
.pso-sym__card--active {
  border-color: #D97706;
  border-top: 4px solid #D97706;  /* clear active indicator */
  background: #fff7ed;            /* strong orange tint, was #fffbf2 */
  box-shadow: 0 4px 20px rgba(217,119,6,.22);
}
.pso-sym__icon { font-size: 28px; line-height: 1; }
.pso-sym__text { font-size: 14px; font-weight: 600; color: #0a0a0a; line-height: 1.4; }
.pso-sym__hint {
  font-size: 13px;
  color: #D97706;
  font-weight: 500;
  margin-top: 4px;
}
.pso-sym__card--active .pso-sym__hint { display: none; }

/* Result Panel */
.pso-result {
  margin-top: 28px;
  border-radius: 12px;
  border: 1px solid #D97706;
  background: #fffbf2;
  overflow: hidden;
  animation: pso-fade-in .25s ease;
}
@keyframes pso-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pso-result__inner {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: start;
  gap: 28px;
  padding: 28px 32px;
}
.pso-result__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #D97706;
  margin-bottom: 8px;
}
.pso-result__layer {
  font-size: 15px;
  font-weight: 700;
  color: #0a0a0a;
  margin: 0 0 4px;
  line-height: 1.5;
}
.pso-result__fixable {
  font-size: 14px;
  color: #059669;
  font-weight: 600;
  margin: 0;
  line-height: 1.5;
}
.pso-result__cause {
  font-size: 15px;
  color: #374151;
  line-height: 1.7;
  margin: 0 0 16px;
}
.pso-result__checks-wrap { border-top: 1px solid #fde68a; padding-top: 12px; }
.pso-result__checks {
  font-size: 13px;
  color: #92400e;
  font-weight: 600;
  margin: 0;
  line-height: 1.6;
}
.pso-result__footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.pso-result__note {
  font-size: 12px;
  color: #92400e;
  margin: 0;
  text-align: center;
}

/* ==========================================================================
   Result panel — soft link
   ========================================================================== */
.pso-result__soft-link {
  font-size: 13px;
  color: #92400e;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-top: 4px;
}
.pso-result__soft-link:hover { color: #D97706; }

/* ==========================================================================
   S04 — action buttons row
   ========================================================================== */
.pso-s04__actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
}

/* ==========================================================================
   Layer 1 Scope Visual
   ========================================================================== */
.pso-scope__sub {
  font-size: 15px;
  color: #6b7280;
  margin: -8px 0 0;
  font-style: italic;
}
.pso-scope__note {
  margin-top: 32px;
  text-align: center;
  padding: 24px 28px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}
.pso-scope__note p {
  font-size: 14px;
  color: #4b5563;
  margin: 0 0 16px;
  line-height: 1.7;
}
.pso-scope__btn {
  font-size: 13px;
  color: #6b7280;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-block;
  margin-top: 4px;
}
.pso-scope__btn:hover { color: #D97706; }
.pso-layers__strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 680px;
  margin: 0 auto;
}
.pso-layer-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 16px 12px;
  border-radius: 12px;
  background: #e5e7eb;
  text-align: center;
  position: relative;
  cursor: default;
}
.pso-layer-pill[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: #0a0a0a;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  width: 220px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
  z-index: 20;
  white-space: normal;
}
.pso-layer-pill[data-tooltip]:hover::after { opacity: 1; }
.pso-layer-pill--active {
  background: #D97706;
}
.pso-layer-pill__num {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.8);
}
.pso-layer-pill--active .pso-layer-pill__num { color: rgba(255,255,255,.9); }
.pso-layer-pill:not(.pso-layer-pill--active) .pso-layer-pill__num { color: #9ca3af; }

.pso-layer-pill__name {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}
.pso-layer-pill:not(.pso-layer-pill--active) .pso-layer-pill__name { color: #6b7280; }

.pso-layer-pill__flag {
  font-size: 10px;
  color: #6b7280;
  font-style: italic;
  line-height: 1.3;
}

/* ==========================================================================
   S06  —  Our Commitment (cream bg, 2-col) — kept for reference, not rendered
   ========================================================================== */
.pso-commit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
  text-align: left;
}
.pso-commit__col        { padding: 28px; border-radius: 12px; }
.pso-commit__col--no    { background: #fff8f8; border: 1px solid #fecaca; }
.pso-commit__col--yes   { background: #f0fdf4; border: 1px solid #bbf7d0; }

.pso-commit__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.pso-commit__label--no  { color: #dc2626; }
.pso-commit__label--yes { color: #059669; }

.pso-commit__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.6;
}
.pso-commit__item--no  { color: #7f1d1d; }
.pso-commit__item--yes { color: #14532d; }

.pso-commit__icon       { flex-shrink: 0; font-size: 14px; margin-top: 1px; }
.pso-commit__icon--no   { color: #dc2626; }
.pso-commit__icon--yes  { color: #059669; }

/* ==========================================================================
   S09  —  CTA decision line
   ========================================================================== */
.pso-cta__decision {
  font-size: 16px;
  font-weight: 700;
  color: #D97706;
  margin: -24px 0 32px;
  letter-spacing: .02em;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .pso-result__inner { grid-template-columns: 1fr 1fr; }
  .pso-result__footer { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  .pso-commit         { grid-template-columns: 1fr; }
  .pso-sym__grid      { grid-template-columns: repeat(2, 1fr); }
  .pso-result__inner  { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .pso-layers__strip  { grid-template-columns: repeat(2, 1fr); max-width: 360px; }
}
@media (max-width: 480px) {
  .pso-sym__grid { grid-template-columns: 1fr; }
}
