/* Insights panel — v9: balanced deck layout.

   Lead card: headline + narrative paragraph + horizontal action strip.
   Three mini cards below in an equal-height grid. Each mini follows the
   same outline (header / content / footer-anchored-bottom) so the row
   reads as a balanced deck slide rather than a ragged column. */

.insights-panel { margin-bottom: 12px; }

/* === Story (lead) card === */
.insight-story {
  background: #fff;
  border: 1px solid var(--table-border);
  border-left: 4px solid var(--navy);
  border-radius: var(--radius);
  padding: 12px 16px 10px;
  margin-bottom: 6px;
  box-shadow: var(--shadow);
  font-family: var(--font-stack);
}

.insight-section-head {
  font-size: 11px; font-weight: 700;
  color: #6b7280;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: 4px;
  display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap;
}
.insight-scope { color: #9ca3af; font-weight: 400; letter-spacing: 1px; }

.insight-story-title {
  font-size: 20px; font-weight: 600;
  color: var(--navy); line-height: 1.3;
  margin-bottom: 6px;
}

/* Single narrative paragraph -- replaces the v6 stack of fact rows. */
.insight-narr {
  font-size: 13px; line-height: 1.5;
  color: #4b5563;
  margin-bottom: 8px;
}
.insight-narr strong { color: var(--navy); font-weight: 700; }
.insight-narr .pos   { color: var(--success-green); font-weight: 600; }
.insight-narr .neg   { color: var(--danger-red);    font-weight: 600; }

/* Horizontal action strip -- 3 numbered moves + total in one row. */
.insight-action-strip {
  background: var(--contest-soft);
  border-left: 3px solid var(--ashley-orange);
  padding: 7px 12px;
  border-radius: 4px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-size: 12px; color: #4b5563;
}
.insight-action-strip .a-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: #b45309;
  flex: 0 0 auto;
}
.insight-action-strip .a-step strong { color: var(--navy); font-weight: 700; }
.insight-action-strip .a-val  { color: var(--success-green); font-weight: 700; margin-left: 4px; }
.insight-action-strip .a-sep  { color: #9ca3af; }
.insight-action-strip .a-total { margin-left: auto; color: var(--success-green); font-weight: 700; }

/* === Mini-card row (balanced deck) === */
.insight-mini-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 6px;
  align-items: stretch;   /* equal heights across the row */
}

.insight-mini {
  background: #fff;
  border: 1px solid var(--table-border);
  border-radius: var(--radius);
  padding: 10px 12px;
  display: flex; flex-direction: column;
  font-family: var(--font-stack);
}

.mini-head {
  font-size: 10px; font-weight: 700;
  color: #6b7280;
  text-transform: uppercase; letter-spacing: 1.2px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--table-border);
}

/* Footer anchored to the bottom of the card -- empty space sits BETWEEN
   the content and the footer instead of trailing below it. Makes uneven
   content read as deliberate breathing room rather than wasted space. */
.mini-foot {
  background: rgba(246, 140, 44, 0.06);
  border-left: 2px solid var(--ashley-orange);
  padding: 6px 10px;
  border-radius: 3px;
  font-size: 11px; line-height: 1.5;
  color: #4b5563;
  margin-top: auto;   /* THIS is the anchor */
}
.mini-foot strong { color: var(--navy); font-weight: 700; }

/* === SPG mini -- $ per visitor productivity === */
.spg-flow {
  display: flex; align-items: baseline; gap: 8px;
  justify-content: center;
  padding: 4px 0 8px;
}
.spg-step { text-align: center; }
.spg-step .step-lbl { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: #9ca3af; }
.spg-step .step-val { font-size: 22px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.spg-step .step-val.target { color: var(--primary-blue); }
.spg-step .step-sub { font-size: 10px; color: #9ca3af; }
.spg-step .step-sub.pos { color: var(--success-green); font-weight: 600; }
.spg-step .step-sub.neg { color: var(--danger-red);    font-weight: 600; }
.spg-arrow { color: #9ca3af; font-size: 16px; }

.spg-gap-line {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 8px;
  background: var(--light-bg);
  border-radius: 4px;
  font-size: 12px;
  margin-bottom: 8px;
}
.spg-gap-line .gap-lbl {
  color: #9ca3af;
  text-transform: uppercase; letter-spacing: 0.5px;
  font-size: 10px;
}
.spg-gap-line .gap-val { color: var(--signal-yellow-text); font-weight: 700; font-size: 14px; }

.lever-row {
  display: flex; justify-content: space-between;
  font-size: 12px;
  padding: 3px 0;
  border-bottom: 1px dashed var(--table-border);
}
.lever-row:last-of-type { border-bottom: none; margin-bottom: 6px; }
.lever-row .lev-name { color: #4b5563; }
.lever-row .lev-val  { color: var(--success-green); font-weight: 700; }

/* === What's moving mini -- status dots === */
.move-row {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 0;
  border-bottom: 1px solid var(--table-border);
}
.move-row:last-of-type { border-bottom: none; }
.move-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex: 0 0 auto;
}
.move-dot.red   { background: var(--danger-red); }
.move-dot.amber { background: #d97706; }
.move-dot.green { background: var(--success-green); }
.move-mid { flex: 1; min-width: 0; }
.move-name { font-size: 13px; color: var(--navy); }
.move-sub  { font-size: 10px; color: #9ca3af; margin-top: 1px; }
.move-val  { font-size: 14px; font-weight: 700; }
.move-val.neg { color: var(--danger-red); }
.move-val.pos { color: var(--success-green); }

/* === Stores mini -- best & worst === */
.store-block-head {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: #9ca3af;
  display: flex; align-items: center; gap: 5px;
  margin: 4px 0 2px;
}
.store-block-head.up::before   { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--success-green); }
.store-block-head.down::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--danger-red); }
.store-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 13px; padding: 2px 0;
}
.store-row .store-name        { color: var(--navy); }
.store-row .store-delta.pos   { color: var(--success-green); font-weight: 700; }
.store-row .store-delta.neg   { color: var(--danger-red);    font-weight: 700; }
