
/* ── Weekly Research Brief (wrb-*) ─────────────────────────────────────── */
.wrb-page .wrb-section-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.wrb-page .wrb-section-hint {
  font-size: 0.72rem;
  color: #64748b;
  margin: 0.15rem 0 0;
}
.wrb-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.wrb-hero-grid {
  display: grid;
  gap: 0.75rem;
}
@media (min-width: 900px) {
  .wrb-hero-grid { grid-template-columns: 1.05fr 0.95fr; }
}

.wrb-context-card {
  padding: 1rem 1.1rem;
  border-left: 4px solid #6366f1;
  background: linear-gradient(135deg, rgba(99,102,241,.06), rgba(255,255,255,.75));
}
.wrb-context-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}
.wrb-context-card__ret {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 0.45rem;
  font-variant-numeric: tabular-nums;
}
.wrb-context-card__ret.is-up { color: #047857; background: rgba(16,185,129,.12); }
.wrb-context-card__ret.is-down { color: #b91c1c; background: rgba(239,68,68,.12); }
.wrb-context-card__summary {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #475569;
  margin: 0 0 0.75rem;
}
.wrb-pill-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.wrb-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
}
.wrb-pill--flat { background: rgba(99,102,241,.1); color: #4338ca; }

.wrb-week-chart { padding: 1rem; min-height: 220px; display: flex; flex-direction: column; }
.wrb-week-chart__head { margin-bottom: 0.5rem; }
.wrb-week-chart__bars {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  min-height: 150px;
  padding-top: 0.5rem;
}
.wrb-week-bar {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  height: 100%;
}
.wrb-week-bar__track {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 120px;
}
.wrb-week-bar__col {
  width: 100%;
  max-width: 2.4rem;
  min-height: 8%;
  border-radius: 0.35rem 0.35rem 0.1rem 0.1rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.wrb-week-bar__col--green { background: linear-gradient(180deg, #34d399, #10b981); }
.wrb-week-bar__col--red { background: linear-gradient(180deg, #f87171, #ef4444); }
.wrb-week-bar__col--flat { background: linear-gradient(180deg, #cbd5e1, #94a3b8); }
.wrb-week-bar--current .wrb-week-bar__col { box-shadow: 0 0 0 2px rgba(99,102,241,.45); }
.wrb-week-bar__val {
  font-size: 0.58rem;
  font-weight: 800;
  color: #fff;
  padding: 0.15rem 0.1rem 0;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.wrb-week-bar__label {
  font-size: 0.62rem;
  color: #64748b;
  font-weight: 600;
}

.wrb-participation,
.wrb-sector-chart,
.wrb-rotation,
.wrb-mosaic-section,
.wrb-shifts,
.wrb-heatmap { padding: 1rem; }

.wrb-gauge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (min-width: 768px) {
  .wrb-gauge-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.wrb-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
}
.wrb-gauge__ring {
  --pct: 50;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  background: conic-gradient(#6366f1 calc(var(--pct) * 1%), #e2e8f0 0);
  display: grid;
  place-items: center;
  position: relative;
}
.wrb-gauge__ring::before {
  content: "";
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  position: absolute;
}
.wrb-gauge__ring--stage2 {
  background: conic-gradient(#818cf8 calc(var(--pct) * 1%), #e2e8f0 0);
}
.wrb-gauge__value {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
}
.wrb-gauge__value--plain { font-size: 1.35rem; line-height: 1; }
.wrb-gauge__label {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  margin: 0;
}
.wrb-gauge--stat { justify-content: center; padding: 0.5rem 0; }

.wrb-bar-list { display: flex; flex-direction: column; gap: 0.45rem; }
.wrb-bar-row {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) minmax(0, 2.2fr) auto auto;
  gap: 0.55rem;
  align-items: center;
  padding: 0.45rem 0.35rem;
  border-radius: 0.65rem;
  text-decoration: none;
  color: inherit;
  transition: background .15s ease;
}
.wrb-bar-row:hover { background: rgba(99,102,241,.06); }
.wrb-bar-row__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wrb-bar-row__track {
  height: 0.55rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.wrb-bar-row__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #818cf8, #6366f1);
}
.wrb-bar-row__val {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}
.wrb-bar-row__sub {
  font-size: 0.62rem;
  color: #64748b;
  font-weight: 600;
}

.wrb-rotation__grid {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 768px) {
  .wrb-rotation__grid { grid-template-columns: 1fr 1fr; }
}
.wrb-rotation__heading {
  font-size: 0.75rem;
  font-weight: 800;
  color: #334155;
  margin: 0 0 0.5rem;
}
.wrb-rotation__row {
  display: grid;
  grid-template-columns: minmax(5.5rem, 1fr) minmax(0, 1.6fr) auto;
  gap: 0.45rem;
  align-items: center;
  padding: 0.35rem 0;
  text-decoration: none;
  color: inherit;
}
.wrb-rotation__row:hover .wrb-rotation__name { color: #4338ca; }
.wrb-rotation__name {
  font-size: 0.74rem;
  font-weight: 700;
  color: #1e293b;
}
.wrb-rotation__track {
  height: 0.45rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.wrb-rotation__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}
.wrb-rotation__fill--lead { background: linear-gradient(90deg, #818cf8, #6366f1); }
.wrb-rotation__fill--lag { background: linear-gradient(90deg, #cbd5e1, #94a3b8); }
.wrb-rotation__val {
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #334155;
}

.wrb-mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
  gap: 0.55rem;
}
.wrb-mosaic__tile {
  --scale: 50;
  min-height: calc(4.5rem + (var(--scale) * 0.04rem));
  padding: 0.65rem 0.55rem;
  border-radius: 0.85rem;
  text-decoration: none;
  color: #1e293b;
  background: linear-gradient(
    145deg,
    rgba(99,102,241, calc(0.08 + var(--scale) * 0.004)),
    rgba(255,255,255,.85)
  );
  border: 1px solid rgba(99,102,241,.15);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.wrb-mosaic__tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99,102,241,.12);
}
.wrb-mosaic__count {
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: #312e81;
}
.wrb-mosaic__label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #4338ca;
}
.wrb-mosaic__full {
  font-size: 0.6rem;
  color: #64748b;
  line-height: 1.2;
}

.wrb-shifts__list { display: flex; flex-direction: column; gap: 0.45rem; }
.wrb-shift-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 1fr) minmax(0, 1.5fr) auto auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.35rem;
  border-radius: 0.65rem;
  text-decoration: none;
  color: inherit;
}
.wrb-shift-row:hover { background: rgba(99,102,241,.06); }
.wrb-shift-row__label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #1e293b;
}
.wrb-shift-row__track {
  height: 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.wrb-shift-row__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #818cf8, #6366f1);
}
.wrb-shift-row--up .wrb-shift-row__fill { background: linear-gradient(90deg, #93c5fd, #3b82f6); }
.wrb-shift-row--down .wrb-shift-row__fill { background: linear-gradient(90deg, #cbd5e1, #64748b); }
.wrb-shift-row__counts {
  font-size: 0.68rem;
  font-weight: 700;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}
.wrb-shift-row__delta {
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #4338ca;
}

.wrb-heatmap__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: 0.55rem;
}
.wrb-heat-tile {
  padding: 0.65rem;
  border-radius: 0.75rem;
  background: rgba(248,250,252,.9);
  border: 1px solid rgba(148,163,184,.25);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.wrb-heat-tile:hover { border-color: rgba(99,102,241,.35); background: rgba(99,102,241,.04); }
.wrb-heat-tile__name {
  font-size: 0.74rem;
  font-weight: 800;
  color: #0f172a;
}
.wrb-heat-tile__tier {
  font-size: 0.62rem;
  font-weight: 700;
  color: #6366f1;
}
.wrb-heat-tile__track {
  height: 0.35rem;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.wrb-heat-tile__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #818cf8, #6366f1);
}
.wrb-heat-tile__val {
  font-size: 0.62rem;
  font-weight: 700;
  color: #64748b;
}

@media (max-width: 640px) {
  .wrb-bar-row,
  .wrb-shift-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .wrb-bar-row__sub { grid-column: 1 / -1; }
}
