/* ═════════════════════════════════════════════════════════════════
   Work Hierarchy — 5-Layer Strategic Structure Styles
   Goal → Project → Milestone → Task → Updates
   ═════════════════════════════════════════════════════════════════ */

/* ────────────────── SHARED ────────────────── */
.wh-health-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0; display: inline-block;
}
.wh-badge {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 10px; font-weight: 700; padding: 2px 8px;
  border-radius: 6px; text-transform: uppercase; letter-spacing: .03em;
  white-space: nowrap;
}
.wh-badge--active   { background: #dbeafe; color: #2563eb; }
.wh-badge--achieved { background: #dcfce7; color: #16a34a; }
.wh-badge--paused   { background: #fef3c7; color: #d97706; }
.wh-badge--late     { background: #fee2e2; color: #dc2626; }
.wh-meta-tag--late  { background: #fee2e2 !important; color: #dc2626 !important; font-weight: 700; }
.wh-goal-card--late { border-color: #fca5a5 !important; box-shadow: 0 0 0 1px #fca5a5 inset; }
.wh-badge--pri-critical { background: #fee2e2; color: #dc2626; }
.wh-badge--pri-high     { background: #ffedd5; color: #ea580c; }
.wh-badge--pri-medium   { background: #e0f2fe; color: #0284c7; }
.wh-badge--pri-low      { background: #f1f5f9; color: #64748b; }
.wh-badge--conf-high   { color: #10b981; background: #ecfdf5; }
.wh-badge--conf-medium { color: #f59e0b; background: #fffbeb; }
.wh-badge--conf-low    { color: #ef4444; background: #fef2f2; }
.wh-meta-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--ink3, #64748b);
}
.wh-overdue { color: #ef4444 !important; font-weight: 600; }
.wh-all-clear {
  display: flex; align-items: center; gap: 12px;
  padding: 24px; background: #f0fdf4; border-radius: 12px;
  font-size: 14px; color: #166534; font-weight: 500;
  margin-top: 16px;
}

/* ────────────────── GOAL DASHBOARD ──────────────────
   List view: stacked full-detail cards (default).
   Card view: kanban-ish grid, denser, hides bottom risks/activity.
   Heatmap view: compact color-coded tiles mapped to progress. */
.wh-goal-dashboard[data-view="card"] {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.wh-goal-dashboard[data-view="card"] .wh-goal-card {
  margin-bottom: 0; padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
}
.wh-goal-dashboard[data-view="card"] .wh-goal-head { gap: 10px; }
.wh-goal-dashboard[data-view="card"] .wh-goal-icon { width: 32px; height: 32px; border-radius: 8px; }
.wh-goal-dashboard[data-view="card"] .wh-goal-title { font-size: 13.5px; }
.wh-goal-dashboard[data-view="card"] .wh-goal-progress-row { margin: 4px 0 0; }
.wh-goal-dashboard[data-view="card"] .wh-goal-projects,
.wh-goal-dashboard[data-view="card"] .wh-goal-risks { display: none; }
.wh-goal-dashboard[data-view="card"] .wh-goal-activity { margin-top: 6px; padding-top: 6px; }

/* Card flash-highlight when a Top-Goals row is clicked. */
.wh-goal-card.wh-flash {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,.18), 0 8px 24px rgba(99,102,241,.15);
  animation: wh-flash-anim 1.2s ease-out;
}
@keyframes wh-flash-anim {
  0%   { box-shadow: 0 0 0 0 rgba(99,102,241,.55); }
  60%  { box-shadow: 0 0 0 8px rgba(99,102,241,.10); }
  100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
}

/* Top-Goals row hover */
.wh-tg-row:hover { border-color: #6366f1 !important; box-shadow: 0 2px 6px rgba(99,102,241,.10); }

/* Owner avatar chip — used in goal cards and Top-Goals rows. Mirrors the
   .mw-card-avatar / .wk-gld-owner-av pattern so a goal owner reads as a
   real person. */
.wh-owner-av {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  color: #fff; font-size: 8.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .03em;
  background: #cbd5e1; flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15,23,42,.10);
  overflow: hidden;
  vertical-align: middle;
}
.wh-owner-av--img { padding: 0; }
.wh-owner-av--img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Owner meta-tag: avatar inline with the name */
.wh-meta-tag--owner {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px 2px 2px;
  background: #f8fafc; border-radius: 999px;
  font-size: 11px; color: #0f172a; font-weight: 500;
}
.wh-meta-tag--owner .wh-owner-av { width: 20px; height: 20px; font-size: 9px; box-shadow: none; }

/* Wider Top-Goals row when an avatar is shown */
.wh-tg-row .wh-owner-av { width: 22px; height: 22px; font-size: 9.5px; }

.wh-goal-card {
  background: var(--surface1, #fff);
  border: 1.5px solid var(--border1, #e2e8f0);
  border-radius: 14px; padding: 20px;
  margin-bottom: 12px; transition: border-color .2s, box-shadow .2s;
}
.wh-goal-card:hover {
  border-color: #8b5cf6;
  box-shadow: 0 4px 16px rgba(139,92,246,.08);
}
.wh-goal-card.wh-achieved { border-left: 4px solid #10b981; }
.wh-goal-card.wh-paused   { border-left: 4px solid #f59e0b; opacity: .75; }

.wh-goal-head {
  display: flex; align-items: flex-start; gap: 14px;
}
.wh-goal-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.wh-goal-icon svg { stroke: #fff; }
.wh-achieved .wh-goal-icon { background: linear-gradient(135deg, #10b981, #059669); }
.wh-paused .wh-goal-icon   { background: linear-gradient(135deg, #f59e0b, #d97706); }

.wh-goal-info { flex: 1; min-width: 0; }
.wh-goal-title {
  font-size: 15px; font-weight: 700; color: var(--ink1, #0f172a);
  margin-bottom: 6px; line-height: 1.3;
}
.wh-goal-meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
/* Metric bar */
.wh-goal-metric { margin: 14px 0 8px; }
.wh-metric-label {
  font-size: 11px; font-weight: 600; color: var(--ink3, #64748b);
  text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px;
}
.wh-metric-row {
  display: flex; align-items: center; gap: 10px;
}
.wh-metric-bar {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--border1, #e2e8f0); overflow: hidden;
}
.wh-metric-fill { height: 100%; border-radius: 3px; transition: width .4s; }
.wh-metric-val {
  font-size: 12px; font-weight: 700; color: var(--ink2, #475569);
  white-space: nowrap;
}

/* Simple progress bar */
.wh-goal-progress-row {
  display: flex; align-items: center; gap: 14px; margin: 14px 0 8px;
}
.wh-goal-progress {
  display: flex; align-items: center; gap: 10px;
}
.wh-progress-bar {
  flex: 1; height: 6px; border-radius: 3px;
  background: var(--border1, #e2e8f0); overflow: hidden;
}
.wh-progress-fill { height: 100%; border-radius: 3px; transition: width .4s; }
.wh-progress-label {
  font-size: 12px; font-weight: 700; color: var(--ink2, #475569);
  min-width: 36px; text-align: right;
}

.wh-goal-desc {
  font-size: 13px; color: var(--ink3, #64748b); line-height: 1.5;
  margin: 4px 0 8px;
}

/* Linked projects */
.wh-goal-projects { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.wh-project-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--ink2, #475569);
}
.wh-project-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-project-bar {
  width: 60px; height: 4px; border-radius: 2px;
  background: var(--border1, #e2e8f0); overflow: hidden; flex-shrink: 0;
}
.wh-project-fill { height: 100%; border-radius: 2px; background: #8b5cf6; transition: width .3s; }
.wh-project-pct {
  font-size: 11px; font-weight: 600; color: var(--ink3, #64748b);
  min-width: 30px; text-align: right;
}

.wh-goal-hint {
  font-size: 12px; color: var(--ink4, #94a3b8); font-style: italic;
  margin-top: 8px;
}

/* Goal risks */
.wh-goal-risks { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.wh-risk-line {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink2, #475569);
}
.wh-risk-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}

/* Activity footer */
.wh-goal-activity {
  display: flex; gap: 12px; align-items: center;
  margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border-s, #f1f5f9);
}
.wh-activity-stat {
  font-size: 11px; font-weight: 600; color: var(--ink3, #64748b);
}
.wh-activity-recent {
  font-size: 11px; font-weight: 700; color: #10b981;
  background: #ecfdf5; padding: 2px 8px; border-radius: 6px;
}

/* ────────────────── PORTFOLIO MAP ────────────────── */
.wh-port-stats {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.wh-port-stat {
  flex: 1; min-width: 90px; padding: 14px 18px;
  background: var(--surface2, #f8fafc);
  border: 1px solid var(--border1, #e2e8f0);
  border-radius: 12px; text-align: center;
}
.wh-port-stat-val {
  font-size: 22px; font-weight: 800; color: var(--ink1, #0f172a);
  line-height: 1.2;
}
.wh-port-stat-lbl {
  font-size: 10px; font-weight: 600; color: var(--ink3, #64748b);
  margin-top: 4px; text-transform: uppercase; letter-spacing: .04em;
}

.wh-port-goal {
  background: var(--surface1, #fff);
  border: 1px solid var(--border1, #e2e8f0);
  border-radius: 14px; padding: 18px; margin-bottom: 12px;
}
.wh-port-goal-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.wh-port-goal-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.wh-port-goal-icon svg { stroke: #fff; width: 16px; height: 16px; }
.wh-port-goal-title {
  flex: 1; font-size: 14px; font-weight: 700; color: var(--ink1, #0f172a);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wh-port-goal-bar {
  width: 80px; height: 5px; border-radius: 3px;
  background: var(--border1, #e2e8f0); overflow: hidden; flex-shrink: 0;
}
.wh-port-goal-fill { height: 100%; border-radius: 3px; transition: width .4s; }
.wh-port-goal-pct { font-size: 13px; font-weight: 800; min-width: 36px; text-align: right; }
.wh-port-goal-count {
  font-size: 11px; font-weight: 600; color: var(--ink4, #94a3b8); white-space: nowrap;
}

.wh-port-projects { display: flex; flex-direction: column; gap: 6px; }
.wh-port-project {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  background: var(--surface2, #f8fafc);
  font-size: 12px; color: var(--ink2, #475569);
}
.wh-port-project--orphan { border-left: 3px solid #f59e0b; }
.wh-port-project-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.wh-port-project-ms, .wh-port-project-tasks {
  font-size: 11px; color: var(--ink3, #64748b); white-space: nowrap;
}
.wh-port-project-bar {
  width: 50px; height: 4px; border-radius: 2px;
  background: var(--border1, #e2e8f0); overflow: hidden; flex-shrink: 0;
}
.wh-port-project-fill { height: 100%; border-radius: 2px; background: #8b5cf6; transition: width .3s; }
.wh-port-project-pct { font-size: 11px; font-weight: 600; min-width: 28px; text-align: right; }
.wh-port-empty {
  font-size: 12px; color: var(--ink4, #94a3b8); font-style: italic; padding: 4px 0;
}

/* Unaligned work */
.wh-port-orphan {
  background: #fffbeb; border: 1.5px solid #fde68a;
  border-radius: 14px; padding: 18px; margin-top: 16px;
}
.wh-port-orphan-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; color: #92400e; margin-bottom: 12px;
}
.wh-port-orphan-head svg { stroke: #d97706; }
.wh-port-loose { margin-top: 12px; }
.wh-port-loose-label {
  font-size: 12px; font-weight: 600; color: #92400e; margin-bottom: 8px;
}
.wh-port-loose-task {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 0; border-bottom: 1px solid #fef3c7;
  font-size: 12px; color: var(--ink2, #475569);
}
.wh-port-loose-task:last-child { border-bottom: none; }
.wh-port-loose-due { font-size: 11px; color: var(--ink4, #94a3b8); }
.wh-port-more {
  font-size: 11px; font-weight: 600; color: var(--ink4, #94a3b8);
  padding-top: 6px; font-style: italic;
}

/* ────────────────── ALIGNMENT & HEALTH ────────────────── */
.wh-scores {
  display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px;
}
.wh-score {
  flex: 1; min-width: 90px; padding: 16px 20px;
  background: var(--surface2, #f8fafc);
  border: 1px solid var(--border1, #e2e8f0);
  border-radius: 12px; text-align: center;
}
.wh-score-val { font-size: 24px; font-weight: 800; line-height: 1.2; }
.wh-score-lbl {
  font-size: 10px; font-weight: 600; color: var(--ink3, #64748b);
  margin-top: 4px; text-transform: uppercase; letter-spacing: .04em;
}

.wh-section-group { margin-bottom: 20px; }
.wh-section-group-title {
  font-size: 13px; font-weight: 800; color: var(--ink1, #0f172a);
  text-transform: uppercase; letter-spacing: .04em;
  margin-bottom: 12px; padding-bottom: 6px;
  border-bottom: 2px solid var(--border1, #e2e8f0);
}
.wh-section {
  background: var(--surface1, #fff);
  border: 1px solid var(--border1, #e2e8f0);
  border-radius: 10px; padding: 14px; margin-bottom: 8px;
}
.wh-section-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 600; color: var(--ink1, #0f172a);
  margin-bottom: 8px;
}
.wh-section-count {
  font-size: 11px; font-weight: 700; background: #fee2e2;
  color: #dc2626; padding: 2px 8px; border-radius: 6px;
}
.wh-section-list { display: flex; flex-direction: column; gap: 4px; }
.wh-section-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 6px;
  background: var(--surface2, #f8fafc);
  font-size: 12px; color: var(--ink2, #475569);
}
.wh-item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-item-sub { font-size: 11px; color: var(--ink4, #94a3b8); white-space: nowrap; }
.wh-item-due { font-size: 11px; color: var(--ink4, #94a3b8); white-space: nowrap; }
.wh-item-pct { font-size: 11px; font-weight: 600; color: var(--ink3, #64748b); }

.wh-risk-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 14px; border-radius: 8px;
  background: var(--surface1, #fff); border: 1px solid var(--border1, #e2e8f0);
  margin-bottom: 6px;
}
.wh-risk-label { font-size: 13px; color: var(--ink1, #0f172a); line-height: 1.4; }
.wh-risk-subitems { padding: 0 14px 8px 24px; }
.wh-risk-subitem {
  font-size: 12px; color: var(--ink3, #64748b);
  padding: 3px 0; border-bottom: 1px solid var(--border-s, #f1f5f9);
}
.wh-risk-subitem:last-child { border-bottom: none; }

/* ────────────────── WEEKLY SUMMARY ────────────────── */
.wh-weekly-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.wh-weekly-title {
  font-size: 16px; font-weight: 800; color: var(--ink1, #0f172a);
}
.wh-weekly-auto {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: #8b5cf6;
  background: #ede9fe; padding: 3px 10px; border-radius: 6px;
}

.wh-weekly-section {
  background: var(--surface1, #fff);
  border: 1px solid var(--border1, #e2e8f0);
  border-radius: 12px; padding: 16px; margin-bottom: 12px;
}
.wh-weekly-section-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; margin-bottom: 12px;
}
.wh-weekly--moved   { color: #10b981; }
.wh-weekly--moved svg   { stroke: #10b981; }
.wh-weekly--slipped { color: #f59e0b; }
.wh-weekly--slipped svg { stroke: #f59e0b; }
.wh-weekly--blocked { color: #ef4444; }
.wh-weekly--blocked svg { stroke: #ef4444; }
.wh-weekly--threats { color: #7c3aed; }
.wh-weekly--threats svg { stroke: #7c3aed; }
.wh-weekly--decisions { color: #0284c7; }
.wh-weekly--decisions svg { stroke: #0284c7; }

.wh-weekly-count {
  font-size: 11px; font-weight: 700; background: var(--surface3, #e2e8f0);
  color: var(--ink2, #475569); padding: 2px 8px; border-radius: 6px;
  margin-left: auto;
}

.wh-weekly-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 8px;
  background: var(--surface2, #f8fafc);
  margin-bottom: 4px; font-size: 13px;
}
.wh-weekly-item--warn    { border-left: 3px solid #f59e0b; }
.wh-weekly-item--blocked { border-left: 3px solid #ef4444; }
.wh-weekly-item--threat  { border-left: 3px solid #7c3aed; }
.wh-weekly-item--decision { border-left: 3px solid #0284c7; }

.wh-wi-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink1, #0f172a); }
.wh-wi-project {
  font-size: 11px; font-weight: 600; color: var(--ink4, #94a3b8);
  white-space: nowrap;
}
.wh-wi-due { font-size: 11px; color: #f59e0b; font-weight: 600; white-space: nowrap; }
.wh-wi-status {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px;
  background: #fee2e2; color: #dc2626; white-space: nowrap;
}
.wh-wi-detail {
  font-size: 12px; color: var(--ink3, #64748b); white-space: nowrap;
}

.wh-weekly-empty {
  font-size: 13px; color: var(--ink4, #94a3b8); font-style: italic;
  padding: 4px 0;
}
.wh-weekly-more {
  font-size: 11px; font-weight: 600; color: var(--ink4, #94a3b8);
  padding-top: 4px; font-style: italic;
}

/* ────────────────── GOAL FORM ────────────────── */
.wh-goal-form {
  background: var(--surface2, #f8fafc);
  border: 2px solid #8b5cf6; border-radius: 14px;
  padding: 24px; margin-bottom: 16px;
  animation: whFormIn .3s ease;
}
@keyframes whFormIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wh-form-header {
  font-size: 16px; font-weight: 800; color: var(--ink1, #0f172a);
  margin-bottom: 18px;
}
.wh-form-row { margin-bottom: 14px; }
.wh-form-split { display: flex; gap: 14px; }
.wh-form-triple { display: flex; gap: 14px; }
.wh-form-field { flex: 1; min-width: 0; }
.wh-form-label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--ink2, #475569); margin-bottom: 4px;
}
.wh-req { color: #ef4444; }
.wh-form-input, .wh-form-textarea, .wh-form-select {
  width: 100%; padding: 8px 12px; font-size: 13px;
  border: 1.5px solid var(--border1, #e2e8f0); border-radius: 8px;
  background: var(--surface1, #fff); color: var(--ink1, #111);
  outline: none; transition: border-color .15s; font-family: inherit;
  box-sizing: border-box;
}
.wh-form-input:focus, .wh-form-textarea:focus, .wh-form-select:focus {
  border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,.08);
}
.wh-form-textarea { resize: vertical; }

.wh-project-picker {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 140px; overflow-y: auto; padding: 8px 0;
}

/* ═══════════════════════════════════════════════════════════════
   CROSS-TAB STRATEGY — Right-Side Module Styles
   ═══════════════════════════════════════════════════════════════ */

/* Goal Rollup right-side module */
.wh-goal-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--border, #f1f5f9);
}
.wh-goal-row:last-child { border-bottom: none; }
.wh-goal-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}
.wh-goal-info { flex: 1; min-width: 0; }
.wh-goal-name {
  font-size: 12px; font-weight: 600; color: var(--ink, #1e293b);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wh-goal-bar-wrap {
  height: 5px; border-radius: 3px; background: var(--border, #e2e8f0);
  margin-top: 4px; overflow: hidden;
}
.wh-goal-bar {
  height: 100%; border-radius: 3px;
  transition: width .4s ease;
}
.wh-goal-pct {
  font-size: 11px; font-weight: 800; flex-shrink: 0;
  min-width: 32px; text-align: right;
}

/* Strategic Risks right-side module */
.wh-risk-row {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0; border-bottom: 1px solid var(--border, #f1f5f9);
}
.wh-risk-row:last-child { border-bottom: none; }
.wh-risk-row-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 4px;
}
.wh-risk-row-text {
  font-size: 12px; font-weight: 500; color: var(--ink2, #475569);
  line-height: 1.4;
}
.wh-orphan-summary {
  display: flex; gap: 10px; flex-wrap: wrap;
  padding: 8px 0; border-bottom: 1px solid var(--border, #f1f5f9);
}
.wh-orphan-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700;
  background: var(--c-amber-bg, #fffbeb); color: var(--c-amber, #d97706);
}
.wh-orphan-chip-count {
  font-size: 12px; font-weight: 900;
}
.wh-strat-empty {
  font-size: 12px; color: var(--ink4, #94a3b8); text-align: center; padding: 12px 0;
}
.wh-strat-view-link {
  display: block; text-align: center; padding: 8px 0 4px;
  font-size: 11px; font-weight: 700; color: var(--c-blue, #2563eb);
  cursor: pointer; text-decoration: none;
}
.wh-strat-view-link:hover { text-decoration: underline; }
.wh-picker-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink1, #0f172a); cursor: pointer;
}
.wh-picker-item input[type="checkbox"] { accent-color: #8b5cf6; }
.wh-picker-empty { font-size: 12px; color: var(--ink4, #94a3b8); font-style: italic; }

.wh-form-actions { display: flex; gap: 10px; margin-top: 18px; }
.wh-form-btn {
  padding: 9px 22px; border-radius: 8px; border: none;
  font-size: 13px; font-weight: 700; cursor: pointer; transition: all .2s;
}
.wh-form-btn--save {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed); color: #fff;
}
.wh-form-btn--save:hover { box-shadow: 0 4px 12px rgba(139,92,246,.3); }
.wh-form-btn--cancel {
  background: var(--surface3, #e2e8f0); color: var(--ink2, #475569);
}
.wh-form-btn--cancel:hover { background: var(--border1, #cbd5e1); }

/* ────────────────── STRATEGY INNER TAB STRIP ────────────────── */
.gl-strat-tabs {
  display: flex; gap: 2px; flex-wrap: wrap;
  background: var(--surface3, #f1f5f9);
  border-radius: 8px; padding: 3px;
}
.gl-strat-tab {
  border: 0; background: transparent; cursor: pointer;
  padding: 6px 12px; border-radius: 6px;
  font-size: .82rem; font-weight: 600;
  color: var(--ink2, #475569);
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .12s, color .12s;
}
.gl-strat-tab:hover { color: var(--ink1, #1e293b); }
.gl-strat-tab.is-active {
  background: var(--surface1, #fff);
  color: var(--ink1, #1e293b);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}
.gl-strat-count {
  background: var(--surface3, #e2e8f0);
  color: var(--ink2, #64748b);
  font-size: .68rem; font-weight: 700;
  padding: 1px 6px; border-radius: 999px;
}
.gl-strat-tab.is-active .gl-strat-count {
  background: var(--accent-bg, #eef2ff);
  color: var(--accent, #4f46e5);
}
.gl-strat-view { display: none; padding-top: 4px; }
.gl-strat-view.is-active { display: block; }
.gl-strat-sub {
  font-size: .78rem; color: var(--ink3, #64748b);
  margin: 0 0 10px;
}

/* ────────────── STRATEGY STACKED SECTIONS ────────────── */
.gl-strat-section { margin-bottom: 14px; }
.gl-strat-section:last-child { margin-bottom: 0; }

/* ────────────── STRATEGY TOP TASKS LIST ────────────── */
.wh-strat-tasks { display: flex; flex-direction: column; gap: 4px; padding: 4px 0; }
.wh-strat-tasks .wh-st-row {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 8px;
  row-gap: 2px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: var(--surface1, #fff);
  font-size: .82rem;
  transition: background .12s, border-color .12s;
}
.wh-strat-tasks .wh-st-row:hover {
  background: var(--surface2, #f8fafc);
  border-color: var(--border1, #e2e8f0);
}
.wh-strat-tasks .wh-st-check {
  grid-row: 1 / span 2;
  width: 14px; height: 14px;
  border: 1.5px solid var(--border1, #cbd5e1);
  border-radius: 4px;
}
.wh-strat-tasks .wh-st-row.is-done .wh-st-check {
  background: var(--accent, #4f46e5); border-color: var(--accent, #4f46e5);
}
.wh-strat-tasks .wh-st-row.is-done .wh-st-title {
  text-decoration: line-through; color: var(--ink3, #94a3b8);
}
.wh-strat-tasks .wh-st-title {
  grid-column: 2;
  grid-row: 1;
  font-weight: 500; color: var(--ink1, #1e293b);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0;
}
.wh-strat-tasks .wh-st-due {
  grid-column: 3;
  grid-row: 1;
  font-size: .7rem; font-weight: 600;
  color: var(--ink3, #64748b);
  white-space: nowrap;
  margin-left: 6px;
}
.wh-strat-tasks .wh-st-due.is-overdue { color: var(--c-red, #ef4444); }
.wh-strat-tasks .wh-st-due.is-today { color: var(--c-amber, #f59e0b); }
.wh-strat-tasks .wh-st-goal {
  grid-column: 2 / span 2;
  grid-row: 2;
  justify-self: start;
  font-size: .68rem; font-weight: 600;
  padding: 1px 7px; border-radius: 999px;
  background: var(--accent-bg, #eef2ff);
  color: var(--accent, #4f46e5);
  max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wh-strat-tasks .wh-st-goal.is-unaligned {
  background: var(--surface3, #f1f5f9);
  color: var(--ink3, #94a3b8);
}

/* ────────────────── AI GOAL COACH ────────────────── */
.wh-coach-body {
  padding: 14px 16px;
  font-size: .88rem;
  line-height: 1.55;
  color: var(--ink1, #1e293b);
}
.wh-coach-reply p { margin: 0 0 10px; }
.wh-coach-reply h3.wh-coach-h {
  margin: 16px 0 6px; font-size: .98rem; font-weight: 700;
  color: var(--ink1, #1e293b);
  border-bottom: 1px solid var(--border1, #e2e8f0);
  padding-bottom: 4px;
}
.wh-coach-reply h4.wh-coach-h {
  margin: 12px 0 4px; font-size: .88rem; font-weight: 700;
  color: var(--ink2, #475569);
}
.wh-coach-bullet {
  padding: 3px 0 3px 4px;
  color: var(--ink2, #475569);
  font-size: .85rem;
}
.wh-coach-reply strong { color: var(--ink1, #1e293b); }

/* ────────────────── STRATEGY RIGHT-RAIL (Goal Progress / Top Goals / Movement) ────────────────── */
/* Let these three modules expand to fit their content instead of being capped at 260px */
.wk-support-stack--strategy .wk-support-body--auto {
  max-height: none;
  overflow: visible;
}
/* Loosen any inherited empty-state placeholder ("Loading…") on these auto-height bodies */
.wk-support-stack--strategy .wk-support-body--auto:empty::after { content: none; }

/* Let the strategy stack grow naturally with content instead of being clamped
   to viewport height. The default .wk-support-stack rule makes the rail sticky
   with max-height:calc(100vh - 80px) + overflow-y:auto, which squashes all
   three panels into whatever fits in the user's viewport and hides scroll
   handles. The right column on Strategy isn't tall (3 modest panels), so we
   drop sticky entirely and let the page scroll drive everything. */
@media (min-width: 1101px) {
  .wk-support-stack--strategy {
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
  }
}
/* Strategy modules: bodies grow to fit content, no inner clipping. The base
   .wk-support-body rule caps at 260px which crops Top Goals (3rd row hidden)
   and the Goal Movement section list. */
.wk-support-stack--strategy .wk-support-body,
.wk-support-stack--strategy .wk-support-body--auto {
  max-height: none;
  overflow: visible;
}

/* Hide the count pill in the head when there's no value — otherwise it renders
   as a stray colored dot next to the title (e.g. empty Goal Progress %) */
.wk-support-stack--strategy .wk-support-count:empty { display: none; }

/* Weekly summary inside a 340px module — the inner head was tuned for a full-
   width popup. Scale it down so the date + AUTO badge fit on one row. */
.wk-support-stack--strategy #wkWeeklyPanel .wh-weekly-head {
  flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.wk-support-stack--strategy #wkWeeklyPanel .wh-weekly-title {
  font-size: 12px; font-weight: 700; color: var(--ink2, #475569);
  letter-spacing: 0;
}
.wk-support-stack--strategy #wkWeeklyPanel .wh-weekly-auto {
  font-size: 8.5px; padding: 2px 6px; border-radius: 4px;
}

/* Nested section cards (What Moved / Slipped / Blocked …) — the default 16px
   padding + 12px gap eats too much of the narrow column. */
.wk-support-stack--strategy #wkWeeklyPanel .wh-weekly-section {
  padding: 10px 12px; margin-bottom: 8px; border-radius: 10px;
}
.wk-support-stack--strategy #wkWeeklyPanel .wh-weekly-section-head {
  font-size: 12px; margin-bottom: 8px; gap: 6px;
}
.wk-support-stack--strategy #wkWeeklyPanel .wh-weekly-section-head svg {
  width: 13px; height: 13px;
}
.wk-support-stack--strategy #wkWeeklyPanel .wh-weekly-count {
  font-size: 10px; padding: 1px 6px;
}
.wk-support-stack--strategy #wkWeeklyPanel .wh-weekly-empty {
  font-size: 11.5px;
}
.wk-support-stack--strategy #wkWeeklyPanel .wh-weekly-item {
  padding: 6px 9px; font-size: 12px; gap: 8px;
}

/* Clickable module shell — whole card opens a detail popup */
.wk-support-module--clickable {
  cursor: pointer;
  position: relative;
}
.wk-support-module--clickable:hover {
  border-color: var(--_sm-color, var(--c-blue));
}
.wk-support-module--clickable:focus-visible {
  outline: 2px solid var(--_sm-color, #6366f1);
  outline-offset: 2px;
}
.wk-support-module--clickable .wk-support-head { position: relative; padding-right: 22px; }
.wk-support-chev {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink4, #94a3b8); transition: transform .2s ease, color .2s ease;
  flex-shrink: 0;
}
.wk-support-chev svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.wk-support-module--clickable:hover .wk-support-chev {
  color: var(--_sm-color, var(--c-blue));
  transform: translateY(-50%) translateX(2px);
}

/* ────────────────── GOAL CARD TAG CHIPS (linked projects / programs / grants / tasks) ────────────────── */
.wh-goal-tags {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  margin-top: 6px;
}
.wh-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600;
  background: var(--_tg-bg, #f1f5f9);
  color: var(--_tg-color, #475569);
  border: 1px solid transparent;
  white-space: nowrap; line-height: 1.2;
  transition: border-color .15s ease, background .15s ease;
}
.wh-tag svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.wh-tag--projects  { --_tg-bg: #eef2ff; --_tg-color: #4f46e5; }
.wh-tag--programs  { --_tg-bg: #ecfeff; --_tg-color: #0891b2; }
.wh-tag--grants    { --_tg-bg: #fef3c7; --_tg-color: #b45309; }
.wh-tag--tasks     { --_tg-bg: #f0fdf4; --_tg-color: #15803d; }
.wh-tag--overdue   { --_tg-bg: #fef2f2; --_tg-color: #dc2626; }
.wh-tag--category  { --_tg-bg: #f5f3ff; --_tg-color: #7c3aed; text-transform: capitalize; }
.wh-tag.is-clickable { cursor: pointer; }
.wh-tag.is-clickable:hover { border-color: currentColor; }

/* ────────────────── STRATEGY POPUP CONTENT ────────────────── */
.wh-pop-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-bottom: 16px;
}
.wh-pop-card {
  background: var(--surface2, #f8fafc);
  border: 1px solid var(--border1, #e2e8f0);
  border-radius: 12px; padding: 14px;
  text-align: center;
}
.wh-pop-card-val {
  font: 800 24px/1 Inter, system-ui;
  margin-bottom: 4px;
}
.wh-pop-card-lbl {
  font-size: 11px; font-weight: 600; color: var(--ink3, #64748b);
  text-transform: uppercase; letter-spacing: .04em;
}
.wh-pop-list { display: flex; flex-direction: column; gap: 8px; }
.wh-pop-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: var(--surface1, #fff);
  border: 1px solid var(--border1, #e2e8f0);
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.wh-pop-row:hover { border-color: #6366f1; box-shadow: 0 2px 8px rgba(99,102,241,.10); }
.wh-pop-row-title {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 600;
  color: var(--ink1, #0f172a);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wh-pop-row-meta { font-size: 11px; color: var(--ink3, #64748b); flex-shrink: 0; }
.wh-pop-row-bar {
  flex: 0 0 80px; height: 5px; border-radius: 3px;
  background: #eef2f7; overflow: hidden;
}
.wh-pop-row-fill { height: 100%; border-radius: 3px; transition: width .4s; }
.wh-pop-section-title {
  font-size: 11px; font-weight: 700; color: var(--ink3, #64748b);
  text-transform: uppercase; letter-spacing: .05em;
  margin: 16px 0 8px;
}
.wh-pop-section-title:first-child { margin-top: 0; }

/* ────────────────── RESPONSIVE ────────────────── */
@media (max-width: 640px) {
  .wh-form-split, .wh-form-triple { flex-direction: column; gap: 10px; }
  .wh-port-stats, .wh-scores { flex-direction: column; }
  .wh-port-project { flex-wrap: wrap; }
  .wh-weekly-item { flex-wrap: wrap; }
}
