/* ============================================
   Grow Halal Research Standard™ v1.0
   Flagship transparency components
   ============================================ */

/* ── Research Depth (Signature Component) ── */
.research-depth-card {
  padding: 2rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-2xl);
  max-width: 700px;
  margin: 0 auto;
}
.research-depth-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--color-border-light);
}
.research-depth-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.research-depth-card__badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 100px;
  background: rgba(4, 120, 87, 0.06);
  color: var(--color-positive);
}
.research-depth-card__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}
.rd-metric {
  text-align: center;
}
.rd-metric__value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  letter-spacing: -0.02em;
  margin-bottom: 0.15rem;
}
.rd-metric__label {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-text-subtle);
  line-height: 1.3;
}

/* Research checks progress */
.research-depth-card__checks {
  margin-bottom: 1.5rem;
}
.rd-checks__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.rd-checks__title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--color-text-subtle);
}
.rd-checks__count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-positive);
}
.rd-checks__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.4rem;
}
.rd-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.6rem;
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-text);
}
.rd-check__icon {
  width: 14px; height: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rd-check__icon svg {
  width: 10px; height: 10px;
  stroke-width: 3; fill: none;
}
.rd-check--done .rd-check__icon svg { stroke: var(--color-positive); }
.rd-check--pending .rd-check__icon svg { stroke: var(--color-text-subtle); }
.rd-check--review .rd-check__icon svg { stroke: var(--color-warning); }

/* Cross validation bar */
.rd-validation {
  margin-bottom: 1.5rem;
}
.rd-validation__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}
.rd-validation__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-subtle);
}
.rd-validation__value {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-positive);
}
.rd-validation__bar {
  height: 5px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}
.rd-validation__fill {
  height: 100%;
  background: var(--color-positive);
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Confidence footer */
.research-depth-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-border-light);
}
.rd-confidence {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.rd-confidence__score {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-positive);
  letter-spacing: -0.03em;
}
.rd-confidence__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-muted);
}
.rd-freshness {
  text-align: right;
}
.rd-freshness__status {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-positive);
  margin-bottom: 0.1rem;
}
.rd-freshness__date {
  font-size: 0.65rem;
  color: var(--color-text-subtle);
}

/* ── Research Log (Audit Trail) ── */
.research-log {
  padding: 1.5rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}
.research-log__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 1rem;
}
.research-log__list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.log-entry {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  transition: background 0.15s ease;
}
.log-entry:hover { background: var(--color-bg); }
.log-entry__status {
  width: 16px; height: 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.log-entry__status--done { background: rgba(4, 120, 87, 0.08); }
.log-entry__status--done svg {
  width: 9px; height: 9px;
  stroke: var(--color-positive); stroke-width: 3; fill: none;
}
.log-entry__status--pending { background: var(--color-bg); border: 1.5px solid var(--color-border); }
.log-entry__text {
  flex: 1;
  font-weight: 500;
  color: var(--color-text);
}
.log-entry__meta {
  font-size: 0.65rem;
  color: var(--color-text-subtle);
  white-space: nowrap;
}

/* ── Evidence Tier Display ── */
.evidence-tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.evidence-tier {
  padding: 1.25rem;
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
}
.evidence-tier__header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}
.evidence-tier__num {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--color-text-subtle);
  background: var(--color-white);
  border: 1px solid var(--color-border);
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.evidence-tier__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.evidence-tier__list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.evidence-tier__item {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  padding-left: 0.85rem;
  position: relative;
}
.evidence-tier__item::before {
  content: '';
  position: absolute;
  left: 0; top: 0.45rem;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--color-text-subtle);
}

/* ── Explainable Conclusion ── */
.explainable {
  padding: 1.5rem;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
}
.explainable__verdict {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.explainable__status {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-positive);
}
.explainable__status--review { color: var(--color-warning); }
.explainable__status--unsuitable { color: var(--color-negative); }
.explainable__reasoning {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border-light);
}
.explainable__evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.explainable__point {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-bg);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-sm);
}
.explainable__point-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--color-positive);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .research-depth-card { padding: 1.5rem; }
  .research-depth-card__grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .rd-checks__grid { grid-template-columns: 1fr; }
  .evidence-tiers { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .research-depth-card__grid { grid-template-columns: 1fr; }
  .rd-metric__value { font-size: 1.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .rd-validation__fill { transition: none; }
}
