/* KeenSec AI Scenario Studio: Aligned with Main Index Page Design System */

.ss-page {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
}

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

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

.ss-itab {
  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;
}

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

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

.ss-ipanel {
  padding: 20px;
}

.ss-ipanel[hidden] {
  display: none;
}

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

.ss-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;
}

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

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

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

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

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

.ss-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);
}

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

.ss-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;
}

.ss-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);
}

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

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

/* ==========================================================================
   2. Scenario Studio in Story Band
   ========================================================================== */
.ss-preset-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  background: rgba(12, 21, 39, 0.8);
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ss-preset-lbl {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  font-family: var(--font-mono);
  margin-right: 6px;
}

.ss-preset-pill {
  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: 8px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: #cbd5e1;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

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

.ss-preset-pill.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
}

.ss-pdot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ss-pdot.amber { background: #f59e0b; box-shadow: 0 0 6px #f59e0b; }
.ss-pdot.cyan { background: #38bdf8; box-shadow: 0 0 6px #38bdf8; }
.ss-pdot.purple { background: #c084fc; box-shadow: 0 0 6px #c084fc; }
.ss-pdot.green { background: #10b981; box-shadow: 0 0 6px #10b981; }

/* Studio Playground Grid */
.ss-playground {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-raised);
  color: var(--text);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
}

/* Left: Controls Deck */
.ss-controls {
  background: var(--bg-sunken);
  border-right: 1px solid var(--border);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.ss-control-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ss-step-number {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-ink);
  background: rgba(51, 113, 255, 0.1);
  border: 1px solid rgba(51, 113, 255, 0.25);
  border-radius: 4px;
  padding: 3px 6px;
  font-weight: 700;
}

.ss-control-head h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-heading);
}

.ss-controls > label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 16px 0 6px;
  line-height: 1.4;
}

.ss-controls select {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-raised);
  color: var(--text);
  font-size: 12.5px;
  font-family: var(--font-sans);
}

.ss-channels {
  border: 0;
  padding: 0;
  margin: 16px 0 0;
}

.ss-channels legend {
  padding: 0;
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.ss-channel-radio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.ss-channels label {
  margin: 0;
  padding: 0;
  position: relative;
  cursor: pointer;
}

.ss-channels input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.ss-channels label > span {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  border: 1px solid var(--border);
  background: var(--bg-raised);
  min-height: 36px;
  border-radius: 5px;
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.15s ease;
}

.ss-channels input:checked + span {
  background: rgba(51, 113, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.ss-objective {
  border-top: 1px solid var(--border);
  margin-top: 18px;
  padding-top: 14px;
}

.ss-objective > span {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.ss-objective > p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

.ss-build {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-size: 13px !important;
  padding: 10px 14px !important;
  width: 100%;
}

.ss-reset {
  border: 0;
  background: none;
  display: flex;
  gap: 6px;
  justify-content: center;
  align-items: center;
  color: var(--text-muted);
  font-size: 11.5px;
  padding: 10px 0;
  cursor: pointer;
  font-family: var(--font-sans);
}

.ss-local-note {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

/* Right: Preview Workspace */
.ss-preview {
  display: flex;
  flex-direction: column;
  background: var(--bg-raised);
}

.ss-preview-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.ss-preview-top h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--text-heading);
}

.ss-status-badge {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--accent-ink);
  background: rgba(51, 113, 255, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
  margin-left: auto;
  font-weight: 600;
}

.ss-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 24px 0;
  color: var(--text-muted);
  font-size: 10.5px;
  font-family: var(--font-mono);
}

.ss-progress > i {
  height: 2px;
  background: var(--border);
  flex: 1;
}

.ss-progress > span.is-active {
  color: var(--accent-ink);
  font-weight: 700;
}

.ss-progress > span.is-done {
  color: var(--success);
}

.ss-announcement {
  font-size: 11.5px;
  color: var(--text-muted) !important;
  line-height: 1.6;
  margin: 10px 24px 14px;
  font-family: var(--font-mono);
}

.ss-preview-tabs {
  display: flex;
  gap: 24px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
}

.ss-preview-tabs button {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: none;
  padding: 10px 0;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-sans);
}

.ss-preview-tabs button svg {
  display: inline-block;
}

.ss-preview-tabs button[aria-selected="true"] {
  border-bottom-color: var(--accent);
  color: var(--accent-ink);
}

#ss-result {
  padding: 24px;
  flex: 1;
  min-height: 380px;
}

.ss-message-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.ss-meta-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--accent-ink);
  background: rgba(51, 113, 255, 0.1);
  font-size: 12px;
  font-weight: 700;
  border-radius: 8px;
  flex-shrink: 0;
  font-family: var(--font-mono);
}

.ss-message-meta strong {
  font-size: 12.5px;
  color: var(--text-heading);
  display: block;
}

.ss-message-meta span {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}

.ss-example-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  margin-left: auto;
  border: 1px solid var(--border);
  padding: 3px 6px;
  border-radius: 4px;
}

#ss-result h4 {
  font-size: 18px;
  line-height: 1.4;
  margin: 16px 0 14px;
  font-weight: 700;
  color: var(--text-heading);
}

.ss-message-body p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
  margin: 0 0 12px;
}

.ss-example-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(51, 113, 255, 0.1);
  color: var(--accent-ink);
  border: 1px solid rgba(51, 113, 255, 0.25);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 5px;
  margin: 8px 0 16px;
}

.ss-safe-benchmark-card {
  border-top: 1px solid var(--border);
  margin-top: 20px;
  padding-top: 14px;
}

.safe-bench-head strong {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--success);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 4px;
}

.ss-safe-benchmark-card > p {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

.ss-preview-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
}

.ss-foot-note {
  font-size: 11px;
  color: var(--text-muted);
}

.ss-preview-bottom button {
  font-size: 12px;
  color: var(--accent-ink);
  border: 0;
  background: none;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Sovereign Human Review Gate Bar */
.ss-review-gate-bar {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #0c1527;
}

.gate-status-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  color: #f1f5f9;
}

.gate-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.gate-dot.yellow { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
.gate-dot.green { background: #34d399; box-shadow: 0 0 6px #34d399; }

.gate-sub {
  font-size: 11.5px;
  color: #94a3b8 !important;
  margin-top: 4px;
  margin-bottom: 0;
}

.gate-right button {
  font-size: 12px !important;
  padding: 8px 14px !important;
}

/* Landing & Learning Previews Inside Result */
.sc-browser {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.sc-address {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 10px 14px;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}

.sc-landing {
  padding: 24px;
  background: var(--bg-raised);
  text-align: center;
}

.sc-landing > span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent-ink);
}

.sc-landing h4 {
  font-size: 20px !important;
  color: var(--text-heading) !important;
  margin: 12px 0 10px !important;
}

.sc-landing p {
  color: var(--text-muted);
}

.sc-inactive-field {
  padding: 10px 14px;
  margin: 10px auto;
  border: 1px dashed var(--border);
  border-radius: 5px;
  color: var(--text-muted);
  font-size: 12px;
  max-width: 300px;
  background: var(--bg-sunken);
}

.sc-landing > button {
  display: block;
  max-width: 300px;
  width: 100%;
  border: 0;
  background: var(--button-bg);
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12.5px;
  margin: 14px auto 0;
  cursor: pointer;
  font-weight: 600;
}

.sc-browser-note {
  font-size: 11px;
  line-height: 1.6;
  padding: 12px 16px;
  margin: 0;
  color: var(--text-muted);
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
}

.ss-aware-canvas h4 {
  font-size: 18px;
  margin-top: 0;
  color: var(--text-heading);
}

.sc-clues {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.sc-clues > div {
  border-left: 3px solid var(--accent);
  padding: 0 0 0 12px;
}

.sc-clues strong {
  font-size: 12px;
  color: var(--text-heading);
  display: block;
}

.sc-clues p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 2px 0 0;
}

.ss-quiz-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.quiz-question {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading) !important;
  margin: 0 0 10px;
}

.quiz-btn-row {
  display: grid;
  gap: 6px;
}

.quiz-choice-btn {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-sunken);
  color: var(--text);
  text-align: left;
  font-size: 12px;
  cursor: pointer;
  line-height: 1.5;
  transition: all 0.15s ease;
}

.quiz-choice-btn:hover {
  background: var(--bg-raised);
}

.quiz-choice-btn[aria-pressed="true"] {
  border-color: var(--accent);
  background: rgba(51, 113, 255, 0.12);
  color: var(--accent-ink);
  font-weight: 600;
}

.quiz-feedback {
  font-size: 12px;
  line-height: 1.6;
  margin-top: 10px;
  color: var(--accent-ink) !important;
}

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

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

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

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

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

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

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

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

/* ==========================================================================
   4. Channels Grid (Light Cards on Wash)
   ========================================================================== */
.sc-channels-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);
}

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

.sc-channel-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;
}

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

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

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

.sc-channel-card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-heading);
  margin-bottom: 10px;
}

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

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

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

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

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

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

.sc-fact-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease;
}

.sc-fact-card:hover {
  border-color: var(--accent);
}

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

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

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

/* Responsive */
@media (max-width: 1024px) {
  .sc-pipeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .sc-channels-grid,
  .sc-facts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ss-playground {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .sc-pipeline-grid,
  .sc-channels-grid,
  .sc-facts-grid {
    grid-template-columns: 1fr;
  }
  .ss-intent-tabs {
    flex-direction: column;
  }
  .ss-grid-2col {
    grid-template-columns: 1fr;
  }
  .ss-review-gate-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}
