/* KeenSec AI Human Risk Intelligence: Aligned with Main Index Page Design System */

.hri-page {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
}

.hri-page .brand-hero {
  padding-bottom: clamp(40px, 5vw, 64px);
}

/* ==========================================================================
   1. Showcase Console (Inside .dashboard-preview)
   ========================================================================== */
.hri-signal-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hri-stab {
  flex: 1;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  border-bottom: 2px solid transparent;
  font-family: var(--font-sans);
  text-align: center;
}

.hri-stab:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.03);
}

.hri-stab.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
}

.hri-spanel {
  padding: 20px;
}

.hri-spanel[hidden] {
  display: none;
}

.hri-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.hri-metric-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
}

.hri-met-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.hri-met-val {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}

.hri-met-val.green { color: #10b981; }
.hri-met-val.purple { color: #a855f7; }
.hri-met-val.red { color: #ef4444; }
.hri-met-val.amber { color: #f59e0b; }
.hri-met-val.cyan { color: #38bdf8; }

.hri-met-sub {
  font-size: 11px;
  color: #94a3b8;
}

.hri-code-block {
  background: #070d18;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}

.hri-code-header {
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #94a3b8;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hri-code-badge {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}

.hri-code-block pre {
  margin: 0;
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.5;
  color: #cbd5e1;
  overflow-x: auto;
}

.hri-preview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: #94a3b8;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.hri-ft-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
}

.hri-ft-id {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
}

/* ==========================================================================
   2. Human Risk Studio in Story Band
   ========================================================================== */
.hri-studio-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  margin-top: 16px;
}

.hri-studio-pane {
  background: #0c1527;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.hri-pane-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hri-pane-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: #38bdf8;
  font-weight: 600;
}

.hri-cohort-count,
.hri-ask-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hri-cohort-pills {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.hri-cpill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.hri-cpill:hover {
  background: rgba(30, 41, 59, 0.9);
  border-color: rgba(56, 189, 248, 0.4);
  color: #ffffff;
}

.hri-cpill.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.hri-cpill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.hri-cpill-dot.amber { background: #f59e0b; }
.hri-cpill-dot.cyan { background: #38bdf8; }
.hri-cpill-dot.purple { background: #c084fc; }

/* Dynamic Meters Stack */
.hri-meter-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.hri-meter-row {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px 14px;
}

.hri-meter-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 8px;
}

.hri-m-name {
  color: #94a3b8;
  font-weight: 500;
}

.hri-m-val {
  font-family: var(--font-mono);
  font-weight: 700;
}

.text-emerald { color: #34d399 !important; }
.text-amber { color: #fbbf24 !important; }
.text-blue { color: #38bdf8 !important; }
.text-purple { color: #c084fc !important; }
.bg-emerald { background: #10b981 !important; }
.bg-amber { background: #f59e0b !important; }
.bg-blue { background: #38bdf8 !important; }
.bg-purple { background: #a855f7 !important; }

.hri-meter-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 6px;
}

.hri-meter-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

.hri-m-sub {
  display: block;
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.4;
}

.hri-cohort-summary-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 14px;
  margin-top: auto;
}

.hri-summary-tag {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #38bdf8;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.hri-cohort-summary-card p {
  font-size: 12.5px;
  color: #cbd5e1;
  line-height: 1.5;
  margin: 0;
}

/* Right Studio Pane: Ask KeenSec Console */
.hri-query-box {
  margin-bottom: 18px;
}

.hri-query-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 12px;
  color: #38bdf8;
}

.hri-query-bar input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 13px;
  font-family: var(--font-sans);
}

.hri-query-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.hri-chip-label {
  font-size: 11px;
  color: #94a3b8;
  font-family: var(--font-mono);
  margin-right: 4px;
}

.hri-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-sans);
}

.hri-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border-color: rgba(56, 189, 248, 0.3);
}

.hri-chip.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
}

.hri-answer-dossier {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.hri-answer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.hri-answer-status {
  color: #38bdf8;
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.hri-answer-conf {
  color: #34d399;
  font-family: var(--font-mono);
  font-weight: 600;
}

.hri-answer-content h4 {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
  line-height: 1.4;
}

.hri-answer-content p {
  font-size: 12.5px;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0 0 14px;
}

.hri-evidence-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hri-epill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 11px;
  color: #94a3b8;
  font-family: var(--font-mono);
}

/* ==========================================================================
   3. Pipeline Grid (Light Cards Matching Homepage .path-card)
   ========================================================================== */
.hri-pipeline-section {
  padding-top: clamp(60px, 7vw, 90px);
  padding-bottom: clamp(60px, 7vw, 90px);
}

.hri-pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.hri-pcard {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.hri-pcard h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.hri-pcard p {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}

.hri-pcard-specs {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.hri-pcard-specs li {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.hri-pcard-specs li::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ==========================================================================
   4. Telemetry Dimensions Grid (Light Cards)
   ========================================================================== */
.hri-dimensions-section {
  padding-top: clamp(50px, 6vw, 80px);
  padding-bottom: clamp(60px, 7vw, 90px);
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hri-dimensions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.hri-dim-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.hri-dim-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.hri-dim-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.hri-dim-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
}

.hri-dim-card h3 {
  font-size: 17px;
  margin-bottom: 10px;
  color: var(--text-heading);
}

.hri-dim-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}

.hri-dim-proof {
  background: var(--bg-sunken);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 12px;
  border: 1px solid var(--border);
}

.hri-proof-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.hri-proof-val {
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
}

/* ==========================================================================
   5. Facts Section (Light Cards Matching Homepage Standards)
   ========================================================================== */
.hri-facts-section {
  padding-top: clamp(60px, 7vw, 90px);
  padding-bottom: clamp(60px, 7vw, 90px);
}

.hri-facts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.hri-fact-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.hri-fact-card .mono {
  display: block;
  font-size: 11px;
  color: var(--accent-ink);
  margin-bottom: 8px;
}

.hri-fact-card h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-heading);
}

.hri-fact-card p {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0;
}

/* Responsive */
@media (max-width: 1024px) {
  .hri-pipeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hri-dimensions-grid,
  .hri-facts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .hri-studio-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hri-pipeline-grid,
  .hri-dimensions-grid,
  .hri-facts-grid {
    grid-template-columns: 1fr;
  }
  .hri-signal-tabs {
    flex-direction: column;
  }
  .hri-grid-2col {
    grid-template-columns: 1fr;
  }
}
