/* Priyanshu Cortex™ · Immersion · Phonetic Lab — Proprietary UI */

.feature-exclusive {
  border: 1px solid rgba(128, 90, 213, 0.35);
  background: linear-gradient(135deg, rgba(128, 90, 213, 0.06), rgba(206, 17, 38, 0.04));
  position: relative;
}
.feature-exclusive::after {
  content: 'EXCLUSIVE';
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #805ad5;
  opacity: 0.8;
}

.cortex-pill-btn {
  background: linear-gradient(135deg, rgba(128, 90, 213, 0.15), rgba(107, 70, 193, 0.1)) !important;
  border: 1px solid rgba(128, 90, 213, 0.3) !important;
}

.hub-badge-exclusive {
  background: linear-gradient(135deg, #805ad5, #6b46c1);
  color: #fff;
}

.cortex-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  margin: 0.75rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(128, 90, 213, 0.35);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(128, 90, 213, 0.12), rgba(45, 55, 72, 0.06));
  cursor: pointer;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.cortex-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(128, 90, 213, 0.18);
}
.cortex-banner-glow {
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(128, 90, 213, 0.2), transparent 70%);
  pointer-events: none;
}
.cortex-banner-left { position: relative; z-index: 1; }
.cortex-badge {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #805ad5;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}
.cortex-archetype {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text);
}
.cortex-passport {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: monospace;
}
.cortex-banner-right {
  text-align: right;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.cortex-oracle-label { font-size: 0.65rem; color: var(--text-dim); display: block; }
.cortex-oracle strong { font-size: 1.5rem; font-family: var(--font-display); display: block; }
.cortex-oracle small { font-size: 0.7rem; color: var(--text-dim); }
.cortex-cta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #805ad5;
}

/* Cortex Screen */
.cortex-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(128, 90, 213, 0.08), rgba(26, 95, 158, 0.05));
  border: 1px solid rgba(128, 90, 213, 0.2);
}
.cortex-version {
  font-size: 0.7rem;
  font-weight: 700;
  color: #805ad5;
  letter-spacing: 0.05em;
}
.cortex-hero h3 {
  font-family: var(--font-display);
  margin: 0.35rem 0;
  font-size: 1.35rem;
}
.cortex-hero p { font-size: 0.85rem; color: var(--text-dim); margin: 0 0 0.75rem; }
.cortex-passport-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 0.85rem;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed rgba(128, 90, 213, 0.4);
}
.passport-label { font-size: 0.65rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }
.passport-id { font-family: monospace; font-size: 1rem; color: #805ad5; }
.passport-archetype { font-size: 0.8rem; color: var(--text-dim); }
.cortex-radar-wrap { width: 200px; flex-shrink: 0; }
.cortex-radar-svg { width: 100%; height: auto; }
.radar-label { font-size: 11px; fill: var(--text-dim); }

.cortex-oracle-panel {
  margin: 0 0 1rem;
  padding: 1.15rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
}
.cortex-oracle-panel h4 { margin: 0 0 0.75rem; font-family: var(--font-display); }
.oracle-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}
.oracle-stat {
  text-align: center;
  padding: 0.5rem;
  border-radius: var(--radius);
  background: var(--bg);
}
.oracle-stat span { display: block; font-size: 0.65rem; color: var(--text-dim); }
.oracle-stat strong { font-size: 1.25rem; font-family: var(--font-display); }
.oracle-stat.highlight {
  background: linear-gradient(135deg, rgba(128, 90, 213, 0.15), rgba(107, 70, 193, 0.08));
  border: 1px solid rgba(128, 90, 213, 0.25);
}
.oracle-rec { font-size: 0.85rem; color: var(--text-dim); margin: 0 0 0.75rem; }
.oracle-sections { display: flex; flex-direction: column; gap: 0.45rem; }
.oracle-sec-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto auto;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
}
.oracle-sec-row.bottleneck { color: #c45c2c; }
.oracle-sec-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.oracle-sec-bar div {
  height: 100%;
  background: linear-gradient(90deg, #805ad5, #6b46c1);
  border-radius: 3px;
}
.bn-tag { font-size: 0.75rem; }

.cortex-mission-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(107, 70, 193, 0.1), rgba(128, 90, 213, 0.05));
  border: 1px solid rgba(107, 70, 193, 0.3);
}
.cortex-mission-card.done { opacity: 0.75; }
.cm-badge { font-size: 0.7rem; color: #6b46c1; font-weight: 600; display: block; }
.cm-left strong { display: block; margin: 0.2rem 0; }
.cm-left p { font-size: 0.8rem; color: var(--text-dim); margin: 0; }

.cortex-dim-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.55rem;
  margin-bottom: 1rem;
}
.cortex-dim {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}
.cd-icon { font-size: 1.25rem; }
.cd-body { flex: 1; min-width: 0; }
.cd-body strong { font-size: 0.8rem; display: block; }
.cd-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0.25rem 0;
  overflow: hidden;
}
.cd-bar div {
  height: 100%;
  background: var(--dim-color, #805ad5);
  border-radius: 2px;
}
.cd-body small { font-size: 0.7rem; color: var(--text-dim); }

.weak-clusters { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1rem; }
.weak-cluster {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  background: rgba(196, 92, 44, 0.08);
  border: 1px solid rgba(196, 92, 44, 0.2);
  font-size: 0.85rem;
}
.wc-count { font-weight: 600; color: #c45c2c; }

.cortex-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.cortex-footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: 0.5rem;
}

.cortex-stats-compact {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.cortex-mini-dims {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.mini-dim {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}

/* Immersion */
.immersion-intro {
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
}
.immersion-intro h3 { font-family: var(--font-display); margin: 0 0 0.35rem; }
.immersion-intro p { font-size: 0.85rem; color: var(--text-dim); margin: 0; }

.immersion-scenario-list { display: flex; flex-direction: column; gap: 0.55rem; padding: 0 1rem 1.5rem; }
.immersion-scenario-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border);
  border-left: 4px solid var(--sc-color);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: transform 0.15s;
}
.immersion-scenario-card:hover { transform: translateX(4px); }
.isc-icon { font-size: 1.75rem; }
.isc-body { flex: 1; min-width: 0; }
.isc-body strong { display: block; font-size: 0.95rem; }
.isc-sub { font-size: 0.78rem; color: var(--text-dim); display: block; }
.isc-meta { display: flex; gap: 0.5rem; margin-top: 0.35rem; font-size: 0.7rem; color: var(--text-dim); }
.isc-best { color: #1a7a4c; font-weight: 600; }
.isc-arrow { color: var(--text-dim); }

.immersion-play-card {
  margin: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 4px solid var(--sc-color);
}
.ip-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}
.ip-scenario { font-weight: 600; }
.ip-score { color: #805ad5; font-weight: 600; }
.ip-scene {
  font-size: 0.9rem;
  color: var(--text-dim);
  font-style: italic;
  margin-bottom: 1rem;
  padding: 0.65rem;
  background: var(--bg);
  border-radius: var(--radius);
}
.ip-npc-bubble {
  position: relative;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(26, 95, 158, 0.1), rgba(26, 95, 158, 0.04));
  border: 1px solid rgba(26, 95, 158, 0.2);
}
.ip-npc-label { font-size: 0.65rem; font-weight: 700; color: #1a5f9e; letter-spacing: 0.05em; }
.ip-npc-bubble p { font-size: 1.1rem; margin: 0.35rem 0 0; font-style: italic; }
.ip-speak {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
}
.ip-prompt { font-size: 0.8rem; font-weight: 600; margin-bottom: 0.5rem; }
.ip-choices { display: flex; flex-direction: column; gap: 0.5rem; }
.ip-choice {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}
.ip-choice:hover {
  border-color: #1a5f9e;
  background: rgba(26, 95, 158, 0.06);
}
.ip-choice-text { font-size: 0.9rem; flex: 1; }
.ip-choice-reg {
  font-size: 0.6rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
}
.ip-choice-reg.formal { background: rgba(26, 122, 76, 0.15); color: #1a7a4c; }
.ip-choice-reg.informal, .ip-choice-reg.rude { background: rgba(206, 17, 38, 0.12); color: #ce1126; }
.ip-choice-reg.weak, .ip-choice-reg.minimal { background: rgba(201, 146, 10, 0.15); color: #c9920a; }

.immersion-result {
  margin: 1.5rem 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  border-radius: var(--radius-lg);
}
.immersion-result.success { background: rgba(26, 122, 76, 0.1); border: 1px solid rgba(26, 122, 76, 0.3); }
.immersion-result.partial { background: rgba(201, 146, 10, 0.1); border: 1px solid rgba(201, 146, 10, 0.3); }
.immersion-result.fail { background: rgba(206, 17, 38, 0.08); border: 1px solid rgba(206, 17, 38, 0.25); }
.ir-icon { font-size: 3rem; display: block; margin-bottom: 0.5rem; }
.ir-score {
  font-size: 2.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  color: #805ad5;
  margin: 0.5rem 0;
}
.ir-npc { font-style: italic; color: var(--text-dim); font-size: 0.9rem; }

/* Phonetics */
.phonetics-hero {
  padding: 1rem 1.15rem;
  margin-bottom: 0.5rem;
}
.phonetics-hero h3 { font-family: var(--font-display); margin: 0 0 0.35rem; }
.phonetics-hero p { font-size: 0.85rem; color: var(--text-dim); margin: 0 0 0.5rem; }
.ph-avg { font-size: 0.9rem; }
.ph-avg strong { color: #805ad5; font-size: 1.1rem; }

.phonetics-list { display: flex; flex-direction: column; gap: 0.45rem; padding: 0 1rem 1.5rem; }
.phonetics-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  text-align: left;
}
.ph-level {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: rgba(128, 90, 213, 0.12);
  color: #805ad5;
}
.ph-body { flex: 1; min-width: 0; }
.ph-fr { display: block; font-size: 0.95rem; }
.ph-en { font-size: 0.75rem; color: var(--text-dim); }
.ph-best { font-size: 0.7rem; color: #1a7a4c; font-weight: 600; display: block; margin-top: 0.2rem; }
.ph-mic { font-size: 1.5rem; }

.phonetics-practice { padding: 1rem; }
.ph-practice-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  text-align: center;
}
.ph-fr-large {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 0.75rem 0 0.35rem;
  line-height: 1.4;
}
.ph-steps { display: flex; flex-direction: column; gap: 0.65rem; margin: 1.25rem 0; }
.ph-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ph-step span:first-child {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #805ad5;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.ph-step .btn { flex: 1; }
.btn.recording {
  background: #ce1126 !important;
  animation: pulse-rec 1s infinite;
}
@keyframes pulse-rec {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}
.ph-result { margin-top: 1rem; }
.ph-score-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(#805ad5 calc(var(--pct) * 1%), var(--border) 0);
  position: relative;
}
.ph-score-ring::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--surface);
}
.ph-score-ring span {
  position: relative;
  z-index: 1;
  font-size: 1.5rem;
  font-weight: 700;
  color: #805ad5;
}
.ph-feedback { font-size: 0.9rem; margin-bottom: 0.75rem; }
.ph-breakdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}
.ph-error { color: #ce1126; font-size: 0.85rem; }

.hidden { display: none !important; }

@media (max-width: 640px) {
  .cortex-hero { grid-template-columns: 1fr; }
  .cortex-radar-wrap { width: 100%; max-width: 220px; margin: 0 auto; }
  .oracle-grid { grid-template-columns: repeat(2, 1fr); }
  .cortex-mission-card { flex-direction: column; align-items: stretch; }
  .cortex-dim-grid { grid-template-columns: 1fr; }
  .cortex-stats-compact { grid-template-columns: 1fr; }
  .cortex-banner { flex-direction: column; align-items: flex-start; }
  .cortex-banner-right { text-align: left; }
}